Base implementation of EXT-14 (commands-as-tools, Q4 option A; proposal modules/documents/docs/proposals/2026-10-09-ext-g1-b1-b3-exec-backend.md §2):
agent-command pin cc1ad77 → 5c6dd0c (library PRs #4/#5): additive optional ExposeAsTool{Risk low|medium|high} on CommandSpec, and agent accepted as a canonical entrance (model-initiated calls were folding into "api").
cmdbus.Bus.CommandTools() projects enabled, exposed commands (risk defaults low; description falls back to title); runmgr.Manager.SetCommandSource wires the bus into the run: exposed commands appear in runCtx.Tools() (deduped — registry tools win), and model calls to them dispatch through the command bus with Entrance="agent", Actor/Owner = conversation owner, ConversationID set — same audit envelope and the same high-danger inline-confirm-card flow. Composition root wires a busAdapter.
Why
RDM's entire surface is rdm.* commands; without this bridge the agent cannot reach the two-trees-one-net during a run, and the V0.1 end-to-end acceptance (C-11, all-conversation operation) is impossible.
Tests
Red → green: TestCommandToolsProjected, TestCommandToolDispatchesThroughBus (runmgr), TestCommandToolsFiltering, TestCommandToolDispatchEnvelope (cmdbus). go test ./... 32/32 ok. CI on this PR is the GATE.
Compat
No pkg/extension change; commands without exposeAsTool and runs without a command source are byte-for-byte unchanged.
## Summary
Base implementation of **EXT-14** (commands-as-tools, Q4 option A; proposal `modules/documents/docs/proposals/2026-10-09-ext-g1-b1-b3-exec-backend.md` §2):
- `agent-command` pin `cc1ad77 → 5c6dd0c` (library PRs #4/#5): additive optional `ExposeAsTool{Risk low|medium|high}` on `CommandSpec`, and `agent` accepted as a canonical entrance (model-initiated calls were folding into "api").
- `cmdbus.Bus.CommandTools()` projects enabled, exposed commands (risk defaults low; description falls back to title); `runmgr.Manager.SetCommandSource` wires the bus into the run: exposed commands appear in `runCtx.Tools()` (deduped — registry tools win), and model calls to them **dispatch through the command bus** with `Entrance="agent"`, Actor/Owner = conversation owner, ConversationID set — same audit envelope and the same high-danger inline-confirm-card flow. Composition root wires a `busAdapter`.
## Why
RDM's entire surface is `rdm.*` commands; without this bridge the agent cannot reach the two-trees-one-net during a run, and the V0.1 end-to-end acceptance (C-11, all-conversation operation) is impossible.
## Tests
Red → green: `TestCommandToolsProjected`, `TestCommandToolDispatchesThroughBus` (runmgr), `TestCommandToolsFiltering`, `TestCommandToolDispatchEnvelope` (cmdbus). `go test ./...` 32/32 ok. CI on this PR is the GATE.
## Compat
No `pkg/extension` change; commands without `exposeAsTool` and runs without a command source are byte-for-byte unchanged.
Why: RDM's capabilities are rdm.* commands; the agent run has no bridge
to them, so the V0.1 end-to-end goal (full-conversation operation) and
the agent-driven two-trees-one-net access are unreachable (Q4 option A).
Evidence: SELF - red tests first: TestCommandToolsProjected and
TestCommandToolDispatchesThroughBus failed on undefined symbols, then
green; TestCommandToolsFiltering and TestCommandToolDispatchEnvelope
cover projection filtering (risk default low, description falls back to
title, unexposed commands absent) and the full dispatch receipt with
Entrance=agent preserved through CanonicalEntrance; go test ./... 32/32
packages ok.
Impact: agent-command pin cc1ad77 -> 5c6dd0c (library PRs #4/#5: optional
ExposeAsTool field + "agent" entrance). cmdbus gains CommandTool view and
Bus.CommandTools; runmgr gains SetCommandSource with projection into
runCtx.Tools (dedup: registry tools win) and routing in ExecuteTool -
model calls dispatch through the bus with Entrance=agent, Actor/Owner =
conversation owner, ConversationID set; high-danger commands keep the
inline-confirm-card flow via the bus; unregistered source = current
registry behavior. Composition root wires a busAdapter. No
pkg/extension change.
Refs: proposal 2026-10-09-ext-g1-b1-b3 section 2; Agent-Command #4/#5
weichen
merged commit 545dc404e5 into main2026-10-09 16:19:11 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Base implementation of EXT-14 (commands-as-tools, Q4 option A; proposal
modules/documents/docs/proposals/2026-10-09-ext-g1-b1-b3-exec-backend.md§2):agent-commandpincc1ad77 → 5c6dd0c(library PRs #4/#5): additive optionalExposeAsTool{Risk low|medium|high}onCommandSpec, andagentaccepted as a canonical entrance (model-initiated calls were folding into "api").cmdbus.Bus.CommandTools()projects enabled, exposed commands (risk defaults low; description falls back to title);runmgr.Manager.SetCommandSourcewires the bus into the run: exposed commands appear inrunCtx.Tools()(deduped — registry tools win), and model calls to them dispatch through the command bus withEntrance="agent", Actor/Owner = conversation owner, ConversationID set — same audit envelope and the same high-danger inline-confirm-card flow. Composition root wires abusAdapter.Why
RDM's entire surface is
rdm.*commands; without this bridge the agent cannot reach the two-trees-one-net during a run, and the V0.1 end-to-end acceptance (C-11, all-conversation operation) is impossible.Tests
Red → green:
TestCommandToolsProjected,TestCommandToolDispatchesThroughBus(runmgr),TestCommandToolsFiltering,TestCommandToolDispatchEnvelope(cmdbus).go test ./...32/32 ok. CI on this PR is the GATE.Compat
No
pkg/extensionchange; commands withoutexposeAsTooland runs without a command source are byte-for-byte unchanged.