ZCode Auto 审批员 v1:对标 Claude Code auto mode 的外置审查 hook

- 任务感知 LLM 审查(UserPromptSubmit 捕获任务 + PostToolUse 组合风险)
- 四层流水线:工具白名单 / cwd 内编辑快速路径 / 命令白名单 / 灾难命令黑名单确定性拦截
- 防提示注入:授权只认键盘捕获段,伪造授权直接拒绝
- onUncertain 三值可配(deny/prompt/allow)+ ZCode 原生弹窗升级(已实测)
- approve 一次性放行逃生舱(精确匹配、用后即焚、审计留痕)
- 常驻 daemon:TLS 连接热复用、决策缓存、配置热重载、内联降级兜底
- 一键 install/uninstall/status、extraBody 请求体注入、29 项回归测试
This commit is contained in:
luoxiaoxin123
2026-09-13 20:11:49 +08:00
commit d1188c8eef
13 changed files with 1965 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
gatekeeper/config.json
gatekeeper/state/
gatekeeper/state-echo/
.zcode