feat(kernel): permission-model - #127
Merged
Merged
Conversation
…+ caller 矩阵 + permission 白/黑名单 - shell.ts:createIsolatedShellEnv → createAgentShellEnv,不再清空 GH_TOKEN/GITHUB_TOKEN/GH_CONFIG_DIR/HOME(复用宿主 gh auth),保留 GIT_CONFIG_NOSYSTEM/GIT_TERMINAL_PROMPT;删除 detectAmbientCredentials(advisory 降级机制废弃) - server.ts:移除 ambient credential 检测调用,agent 注入不再写 tools 布尔(permission 规则接管) - agents.ts:删除 tools 布尔 + capabilities 解析(废弃死代码),保留 permission 解析(含 OpenCode 嵌套规则对象语义) - caller.ts:新增 LIFECYCLE_TOOLS 矩阵 + rolesForTool + requireToolCaller(spec §2.2 第一道门) - kernel/permission.ts:matchPermission/isAllowedInAutoMode 纯函数(最后匹配优先 + auto 模式 deny 生效) - 测试:caller-matrix(5 工具×5 角色全组合)、permission(deny 置尾/黑名单完整性)、shell/server-permissions 适配
…试 + 收紧 agent permission(写命令 deny)+ capabilities 清理
…r gh pr diff + shell 注释 + 测试复用 matchPermission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
permission-model
src/plugin/shell.ts— createAgentShellEnv:不再清空 GH 凭据(复用宿主 gh auth),删除 detectAmbientCredentialssrc/plugin/agents.ts— 删除 tools/capabilities 布尔,迁移到 permission 规则src/kernel/caller.ts+caller-matrix— 5 工具 × 5 角色矩阵(primary 全量、developer 仅 tdd_checkpoint、goal-verify 仅 complete-flow、reviewer 无工具)src/kernel/permission.ts— matchPermission(最后匹配优先、deny 置尾)+ auto 模式Closes #111