Repository navigation
架构升级:Effect / Admission / Posture / Execution Journal / Capability - #92
Merged
Merged
Conversation
First step of the capability architecture upgrade. Each tool now declares one Effect (read/fetch/session/write/mutate/exec) and a Recovery (replay/inspect); replay_safe() and mutates() are derived from them, so plan mode, subagent hooks and crash recovery behave exactly as before. tool_intent records also carry the effect (older files load unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
killpanda
marked this pull request as draft
November 6, 2026 10:31
Every call now goes resolve -> admit -> run. Plan mode becomes PlanPolicy (blocks by effect), and the four subagent profile hooks become policies in subagents/policies.rs. Denial texts and visibility are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
|
Graphify reviews are paused for this workspace because nobody has used it in 7 days. A workspace owner can resume reviews from the Repositories page: https://app.graphify.com/angus-lab/repositories |
ToolRegistry's three mode flags become one Posture (policy x capability set x presentation); the goal loop's continuation is the goal Strategy. The set_*_mode verbs are sugar over Agent::set_posture. Session files keep the legacy plan_mode/daily_mode/code_mode fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
…records Every tool call appends an action record (started or denied) before it runs and completed/failed once its result is in; goal verify runs are journaled the same way. Resume uses the log to tell 'did not run', 'may have partially run' and the new 'ran to the end, result lost' apart. Legacy tool_intent records load as started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
Tools declare who carries them out: a local tool, a run_code program, the subagent task board, or the human (ask_user). Admission requests and action records carry the provider, and the read-only subagent policy now admits the board's own capabilities by provider instead of by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
killpanda
marked this pull request as ready for review
November 6, 2026 10:40
…ow it in the TUI - goal verify actions carry the new runtime provider - run_code sub-calls are journaled as their own actions (parent = the run_code call) through ToolContext.journal - AgentEvent::ToolCall carries the provider: TUI tool cards show it (read · tool), as do headless lines, --json events and the trace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd
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.
Requested by jack mini · project thread
概要
按架构升级计划把 Limbo 的核心收敛到 Capability / Policy / Effect / Journal。一个阶段一个 commit,默认行为不变。安全 Profile(原阶段 3)按讨论暂缓。
一次工具调用现在走的路径:Capability(provider)→ Effect → Admission(Policy → Allow / Deny)→ 执行 → Execution Journal → 恢复时按 Recovery 处理。
effect.rsEffect(read / fetch / session / write / mutate / exec)和Recovery(replay / inspect);replay_safe()/mutates()由它们推导,各工具的取值不变admission.rs,subagents/hooks.rs→policies.rsToolHook;ToolRegistry::execute= 解析 → 准入 → 执行。plan mode 变成PlanPolicy(按 effect 拦截),4 个 subagent hook 变成 Policy,拒绝文案不变posture.rsPosture= policy × capability set × presentation;/goal的续跑条件是Strategy::Goal。set_*_mode变成set_posture的语法糖;session 文件仍写旧的plan_mode/daily_mode/code_mode字段journal.rstool_intent泛化成action记录:执行前写started/denied,结果到达后写completed/failed;goal verify 也写(kindverify)。恢复时多了一种情况:“已执行完但结果丢失”。旧的tool_intent按started读入capability.rsCapability,带Provider(tool / program / subagent / human / runtime)。准入请求和 action 记录都带 provider;只读 subagent policy 改为按 provider 放行任务板工具,而不是按名字runtime;run_code子调用单独写 action 记录(parent= 外层 run_code 调用);AgentEvent::ToolCall带 provider,TUI 工具卡片显示为read · tool,headless 文本行、--json事件和 trace 的tool_call也带 provider兼容性
tool_intent读成started,meta 字段不变。action记录对旧版本来说是未知记录类型,会被跳过(旧版本会因此失去崩溃恢复信息,但不会加载失败)。有意没做的部分
测试
cargo test(127 个通过,新增 15 个:effect 表、准入顺序、profile policy、posture 往返、action 记录、结果丢失恢复、capability provider、run_code 子调用日志、工具卡片 provider 渲染)cargo fmt --checkcargo clippy --all-targets -- -D warnings🤖 Generated with Claude Code
https://claude.ai/code/session_014BrrmT45MDfJYo6atYUqsd