NS6 slice: Add explicit tool command path with protocol logging #34

Closed
opened 2026-06-20 23:28:20 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Allow trusted local tools to send intentional editor commands and record them for replay/debugging.

AUTHORITY: Parent #6 NS6: Pi and local tool bridge; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/002; req: session/004; req: governance/002-003).

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #6 via explicit issue link and parent checklist.

SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.

BOUNDARIES: No hidden background mutations.

ACCEPTANCE: A test sends one safe command through the tool path; protocol log/replay shows the action and resulting state.

VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.

BLOCKERS: none

GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant req: anchors in code/tests where applicable, and close only after verification passes.

OBJECTIVE: Allow trusted local tools to send intentional editor commands and record them for replay/debugging. AUTHORITY: Parent #6 `NS6: Pi and local tool bridge`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/002; req: session/004; req: governance/002-003). AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes. - Handoff state: committed clean, tracker commented/closed. PARENT: #6 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No hidden background mutations. ACCEPTANCE: A test sends one safe command through the tool path; protocol log/replay shows the action and resulting state. VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice. BLOCKERS: none GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant `req:` anchors in code/tests where applicable, and close only after verification passes.
tmk241 added this to the v1 milestone 2026-06-20 23:28:20 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:20 +00:00
Author
Owner

Implemented in commit 7170b7d14c (Add replayable tool protocol logs).

Verification:

  • zig fmt src/protocol.zig: pass
  • zig build test: pass
  • zig build: pass
  • zig build run -- --help: pass
  • redgate lint / health: pass

Regular tests: trusted same-user tool <name> <command...> requests validate the tool name, execute only the existing protocol command surface, and return a replayable tool-log\t<tool>\t<command>\t<status> prefix plus the normal command response. Replay applies only successful tool-log lines into a fresh session and reaches the same deterministic state.
Adversarial tests: malformed tool names, nested/hidden tool requests, malformed logs, and failed tool logs are rejected without applying mutations.

Boundary: deterministic protocol tool logging and replay only. No plugin host, background workflow, external authentication, arbitrary shell execution, cross-session privilege model, or new mutation surface beyond existing protocol commands added.

Implemented in commit 7170b7d14c63 (Add replayable tool protocol logs). Verification: - zig fmt src/protocol.zig: pass - zig build test: pass - zig build: pass - zig build run -- --help: pass - redgate lint / health: pass Regular tests: trusted same-user `tool <name> <command...>` requests validate the tool name, execute only the existing protocol command surface, and return a replayable `tool-log\t<tool>\t<command>\t<status>` prefix plus the normal command response. Replay applies only successful tool-log lines into a fresh session and reaches the same deterministic state. Adversarial tests: malformed tool names, nested/hidden tool requests, malformed logs, and failed tool logs are rejected without applying mutations. Boundary: deterministic protocol tool logging and replay only. No plugin host, background workflow, external authentication, arbitrary shell execution, cross-session privilege model, or new mutation surface beyond existing protocol commands added.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#34