1d69fd876d
重构权限系统,将终端 UI 代码从 core 模块移除,实现基于 WebSocket 的权限确认流程: Core 模块清理: - 删除 permission/prompt.ts 和 file-prompt.ts(终端交互) - 删除 diff.ts 中的 chalk 渲染函数 - 删除 config.ts 中的 inquirer 交互 - 移除 chalk 依赖 Server 权限处理: - 新增 permission/handler.ts,实现 WebSocket 权限请求/响应 - 更新 agent/adapter.ts 设置权限回调 - 更新 ws.ts 处理 permission_response 消息 Web 权限组件: - 新增 PermissionDialog 组件,显示权限请求详情和 Diff - 更新 useChat hook 管理权限状态 - 更新 Chat 页面集成权限弹窗
78 lines
2.0 KiB
JSON
78 lines
2.0 KiB
JSON
{
|
|
"name": "@ai-assistant/core",
|
|
"version": "1.0.0",
|
|
"description": "Core engine for AI terminal assistant - Agent, Tools, LSP, Checkpoint",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
},
|
|
"./agent": {
|
|
"types": "./dist/core/agent.d.ts",
|
|
"import": "./dist/core/agent.js"
|
|
},
|
|
"./tools": {
|
|
"types": "./dist/tools/index.d.ts",
|
|
"import": "./dist/tools/index.js"
|
|
},
|
|
"./editors": {
|
|
"types": "./dist/editors/index.d.ts",
|
|
"import": "./dist/editors/index.js"
|
|
},
|
|
"./lsp": {
|
|
"types": "./dist/lsp/index.d.ts",
|
|
"import": "./dist/lsp/index.js"
|
|
},
|
|
"./checkpoint": {
|
|
"types": "./dist/checkpoint/index.d.ts",
|
|
"import": "./dist/checkpoint/index.js"
|
|
},
|
|
"./hooks": {
|
|
"types": "./dist/hooks/index.d.ts",
|
|
"import": "./dist/hooks/index.js"
|
|
},
|
|
"./types": {
|
|
"types": "./dist/types/index.d.ts",
|
|
"import": "./dist/types/index.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc && cp -r src/tools/descriptions dist/tools/",
|
|
"dev": "tsc --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^2.0.54",
|
|
"@ai-sdk/deepseek": "^1.0.31",
|
|
"@ai-sdk/openai": "^2.0.80",
|
|
"@tavily/core": "^0.6.0",
|
|
"ai": "^5.0.108",
|
|
"js-yaml": "^4.1.1",
|
|
"minimatch": "^10.1.1",
|
|
"nanoid": "^5.1.6",
|
|
"qwen-ai-provider-v5": "^1.0.2",
|
|
"simple-git": "^3.30.0",
|
|
"tree-sitter-bash": "^0.25.1",
|
|
"uuid": "^13.0.0",
|
|
"vscode-jsonrpc": "^8.2.1",
|
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
"web-tree-sitter": "^0.25.10",
|
|
"yaml": "^2.8.2",
|
|
"zod": "^4.1.13"
|
|
},
|
|
"devDependencies": {
|
|
"@types/js-yaml": "^4.0.9",
|
|
"@types/json-schema": "^7.0.15",
|
|
"@types/node": "^22.0.0",
|
|
"@types/uuid": "^10.0.0",
|
|
"@vitest/coverage-v8": "^4.0.15",
|
|
"typescript": "^5.6.0",
|
|
"vitest": "^4.0.15"
|
|
}
|
|
}
|