Expand description
session.* JSON-RPC method handlers (#2054, vision spec Axiom 4 / §4.3).
Why: this is the API surface Axiom 4 requires — every session operation
goes through JSON-RPC, reachable identically over STDIO and HTTP, so the
CLI (and later TUI/TELGUI/REST) never touch SessionRegistry directly.
What: register wires session.create, session.list,
session.status, session.send, session.attach, session.detach,
session.cancel, (#2058) session.get_transcript, (#2350)
session.set_goal/session.clear_goal/session.get_goals,
(DOC-39 §5.6 Slice D) session.get_readiness, (DOC-39 §5.4)
session.get_agents, (issue #3015) session.get_context_budget, and
(issue #3072) session.get_search_audit onto a Router, all
closed over the SAME Arc<SessionRegistry> so every method sees a
consistent view. Each handler parses its typed params, forwards to the
matching SessionRegistry method, and maps the result onto the JSON-RPC
result shape the vision spec’s §4.3 examples describe.
The three goal methods’ handler bodies live in the sibling
protocol_goals module, session.get_readiness’s in the sibling
protocol_readiness module, session.get_agents’s in the sibling
protocol_agents module, and session.get_context_budget’s in the
sibling protocol_budget module (all kept out of this file purely for
the 500-SLOC cap — see each module’s docs), but are registered here
alongside every other session.* method so this remains the one place
listing the full surface.
Test: protocol::tests::* (parameter validation, error mapping);
protocol_goals::tests::* (the three goal methods);
protocol_readiness::tests::* (session.get_readiness);
protocol_agents::tests::* (session.get_agents);
protocol_budget::tests::* (session.get_context_budget); the full
attach/detach streaming behaviour is covered by session::registry_tests
(registry-level) and tests/session_e2e.rs/tests/task_e2e.rs
(API-driven, real daemon).
Functions§
- register
- Register every
session.*method ontorouter, all sharingregistry.