refactor(fs): migrated remaining sync file operations to async

- Converted readdirSync, readFileSync, and statSync to async readdir, readFile, stat across skills and agent discovery.
- Made scanDirectoryForSkills async and refactored custom directory scanning to use Promise.all for concurrent processing.
- Updated agent discovery to use fs/promises for async file reading and refactored helper patterns.
- Added AgentParsingError exception class for better error handling during agent parsing.
- Added filesystem error type guards (isEnoent, isEacces, isPerm, etc.) to pi-utils for safe error checking.
- Added color manipulation utilities to pi-utils for accessibility features.
- Added color-blind mode setting to settings manager.
- Migrated plugins, settings, and config modules from sync to async file operations.
- Updated error handling to use new pi-utils type guards for type-safe checking.
This commit is contained in:
can1357
2026-01-24 00:49:24 +01:00
parent f66e5dba9b
commit e22d123009
190 changed files with 3800 additions and 2885 deletions
+4 -2
View File
@@ -36,8 +36,10 @@
"@oh-my-pi/omp-stats/*": ["./packages/stats/src/*"],
"@oh-my-pi/pi-tui": ["./packages/tui/src/index.ts"],
"@oh-my-pi/pi-tui/*": ["./packages/tui/src/*"],
"@sinclair/typebox": ["./node_modules/@sinclair/typebox/build/esm/index.d.mts"],
"@sinclair/typebox/*": ["./node_modules/@sinclair/typebox/build/esm/*"]
"@oh-my-pi/react-edit-benchmark": ["./packages/react-edit-benchmark/src/index.ts"],
"@oh-my-pi/react-edit-benchmark/*": ["./packages/react-edit-benchmark/src/*"],
"@sinclair/typebox": ["./node_modules/@sinclair/typebox/build/esm/index.d.mts"],
"@sinclair/typebox/*": ["./node_modules/@sinclair/typebox/build/esm/*"]
}
},
"files": ["./types/assets/index.d.ts"]