新增: F-260619-03 PhaseA AI工具文件访问动态权限白名单
- state.rs: AllowedDirs(persistent HashSet + is_authorized workspace_root+starts_with + canonicalize) + AppState allowed_dirs Arc + reload/set/get Settings KV - tool_registry.rs: resolve_workspace_path 多目录白名单双校验(词法+canonicalize) + handler闭包引入AllowedDirs Arc(9文件工具) + run_command不走白名单 - commands/config.rs: ai_get/set_allowed_dirs IPC + lib.rs注册 - 前端: api/ai.ts + AllowedDirsPanel.vue(Settings授权目录UI) + i18n - 测试: 5 AllowedDirs单测 + 基线适配(29工具不变) workspace_root始终授权(零回归); Phase A仅持久化(不含B弹窗/C写约束) 主代兜底: cargo check devflow 0 + test 129 + vue-tsc 0
This commit is contained in:
@@ -164,6 +164,9 @@ pub fn run() {
|
||||
commands::ai::ai_set_concurrency_config,
|
||||
commands::ai::ai_set_agent_max_iterations,
|
||||
commands::ai::ai_set_agent_max_retries,
|
||||
// F-260619-03 Phase A: AI 工具文件访问授权目录白名单
|
||||
commands::ai::ai_get_allowed_dirs,
|
||||
commands::ai::ai_set_allowed_dirs,
|
||||
// 审批历史面板(AE-2025-08:查 ai_tool_executions 表,敏感字段截断)
|
||||
commands::ai::audit::list_tool_executions,
|
||||
// 知识库
|
||||
|
||||
Reference in New Issue
Block a user