feat: 添加权限管理系统
- 实现 tree-sitter 解析 bash 命令,准确识别管道、&&、子shell 等复杂命令 - 新增权限检查器模式,支持 allow/deny/ask 三级权限控制 - BashPermissionChecker: 支持命令模式匹配和外部目录访问检测 - FilePermissionChecker: 支持文件操作分级(read/write/edit/list/search/delete) - 敏感路径规则:系统目录拒绝,SSH/AWS 等凭证目录需确认 - 会话级权限记忆,用户决定可在当前会话内生效 - 所有工具(bash、read_file、write_file、edit_file、list_directory、search_files)已集成权限检查
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
"commander": "^12.1.0",
|
||||
"inquirer": "^12.0.0",
|
||||
"ora": "^8.1.0",
|
||||
"tree-sitter-bash": "^0.25.1",
|
||||
"web-tree-sitter": "^0.25.10",
|
||||
"zod": "^4.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user