NS1 slice: Expose the local session socket and mimctl basics #10

Closed
opened 2026-06-20 23:28:13 +00:00 by tmk241 · 2 comments
Owner

OBJECTIVE: Add a local Unix socket plus mimctl state/command path for a running session.

AUTHORITY: Parent #1 NS1: Minimal protocol-first mim-min editor; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/001-004; req: coding/001; req: governance/001; req: governance/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: #1 via explicit issue link and parent checklist.

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

BOUNDARIES: No remote network control plane or plugin API.

ACCEPTANCE: A test starts a session, reads the exported socket path, queries state, sends one command, and observes changed 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: Add a local Unix socket plus `mimctl` state/command path for a running session. AUTHORITY: Parent #1 `NS1: Minimal protocol-first mim-min editor`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/001-004; req: coding/001; req: governance/001; req: governance/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: #1 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No remote network control plane or plugin API. ACCEPTANCE: A test starts a session, reads the exported socket path, queries state, sends one command, and observes changed 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:13 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:13 +00:00
Author
Owner

Implemented in commit 6c3b7fa55a (Expose local socket protocol and mimctl basics).

Verification:

  • zig fmt src/main.zig src/protocol.zig src/session.zig src/socket.zig: pass
  • zig build test: pass
  • zig build: pass
  • zig build run -- --help: pass; help now documents mim --mimctl <socket> <request...>
  • redgate lint / health: pass

Regular tests: protocol opens bytes, reports state, moves/inserts/deletes via commands; local Unix socket serves state and command requests; command requests mutate session state through the socket.
Adversarial tests: unknown protocol requests/commands are rejected, invalid UTF-8 insertion preserves state, no-buffer commands report err no buffer open, and overlong Unix socket paths fail explicitly.

Boundary: this is a local Unix socket and tiny same-binary mimctl path only; no daemon product, remote control plane, plugin API, replay, or TUI hosting was added.

Implemented in commit 6c3b7fa55a9e (Expose local socket protocol and mimctl basics). Verification: - zig fmt src/main.zig src/protocol.zig src/session.zig src/socket.zig: pass - zig build test: pass - zig build: pass - zig build run -- --help: pass; help now documents `mim --mimctl <socket> <request...>` - redgate lint / health: pass Regular tests: protocol opens bytes, reports state, moves/inserts/deletes via commands; local Unix socket serves `state` and command requests; command requests mutate session state through the socket. Adversarial tests: unknown protocol requests/commands are rejected, invalid UTF-8 insertion preserves state, no-buffer commands report `err no buffer open`, and overlong Unix socket paths fail explicitly. Boundary: this is a local Unix socket and tiny same-binary mimctl path only; no daemon product, remote control plane, plugin API, replay, or TUI hosting was added.
Author
Owner

Addendum: commit 72a9d3127c lets mim --mimctl - <request...> read the socket path from MIM_SOCKET, while explicit socket paths still work. This covers the exported-socket-path CLI convention for trusted child/tool environments.

Addendum: commit 72a9d3127c75 lets `mim --mimctl - <request...>` read the socket path from `MIM_SOCKET`, while explicit socket paths still work. This covers the exported-socket-path CLI convention for trusted child/tool environments.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#10