feat: add argument parsing and module resolution for assistant app

- Implemented argument parsing in args.ts to handle root, home, and help options.
- Added parseHomeArg and parseHelpArg functions for command line argument handling.
- Created ModuleResolver class in assistant-app-resolve.ts to resolve module paths, including scoped packages and relative paths.
- Introduced caching mechanism for package.json reads to improve performance.
- Added utility functions for checking file existence and clearing the cache.
This commit is contained in:
2026-01-31 17:42:53 +08:00
parent 51822506d7
commit a80a3ede46
11 changed files with 517 additions and 337 deletions

View File

@@ -53,13 +53,13 @@
"@kevisual/router": "^0.0.64",
"@kevisual/types": "^0.0.12",
"@kevisual/use-config": "^1.0.28",
"@opencode-ai/plugin": "^1.1.44",
"@opencode-ai/plugin": "^1.1.47",
"@types/bun": "^1.3.8",
"@types/node": "^25.1.0",
"@types/send": "^1.2.1",
"@types/ws": "^8.18.1",
"chalk": "^5.6.2",
"commander": "^14.0.2",
"commander": "^14.0.3",
"cross-env": "^10.1.0",
"dayjs": "^1.11.19",
"dotenv": "^17.2.3",
@@ -77,12 +77,12 @@
"access": "public"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.978.0",
"@kevisual/ha-api": "^0.0.6",
"@aws-sdk/client-s3": "^3.980.0",
"@kevisual/ha-api": "^0.0.8",
"@kevisual/js-filter": "^0.0.5",
"@kevisual/oss": "^0.0.16",
"@kevisual/oss": "^0.0.18",
"@kevisual/video-tools": "^0.0.13",
"@opencode-ai/sdk": "^1.1.44",
"@opencode-ai/sdk": "^1.1.47",
"es-toolkit": "^1.44.0",
"eventemitter3": "^5.0.4",
"lowdb": "^7.0.1",