docs: stop implying matrix/bash/forge is a closed todo-producer list

This commit is contained in:
damocles 2026-08-04 00:06:19 +02:00
commit 642377c5e0
10 changed files with 57 additions and 31 deletions

View file

@ -1,9 +1,12 @@
//! Wire types for the *in-agent* socket, served by the hive-agent harness
//! to the in-container producers (matrix / bash MCP daemons) and
//! `forge_notify`. Carries the loose-ends-v2 *todo* op family plus the
//! harness-local *reminder* and *question* op families; more in-agent
//! request families may be added over time (the socket is deliberately
//! named for the agent, not the todos).
//! to the in-container producers. Matrix / bash MCP daemons and
//! `forge_notify` are the built-in ones today, but `subsystem` on the todo
//! ops below is a plain string, not a closed set: any user-configured MCP
//! server declared in an agent's `agent.nix` can dial this socket and push
//! its own todos the same way. Carries the loose-ends-v2 *todo* op family
//! plus the harness-local *reminder* and *question* op families; more
//! in-agent request families may be added over time (the socket is
//! deliberately named for the agent, not the todos).
//!
//! Distinct from `hive-core-agent-sock`, the *host*-served core↔agent
//! protocol on `/run/hive/mcp.sock`: this socket never leaves the
@ -23,12 +26,16 @@ pub const DEFAULT_AGENT_SOCKET: &str = "/run/hive/agent.sock";
/// A request on the in-agent socket. Serialised with a `cmd` tag so the
/// in-container producers can emit a plain JSON line without linking a
/// typed client (matrix/bash build the JSON by hand).
/// typed client (matrix/bash build the JSON by hand; a user-configured
/// MCP server can do the same with its own `subsystem` marker).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "cmd", rename_all = "snake_case")]
pub enum Request {
/// Upsert a todo from an in-container subsystem (matrix / bash /
/// forge). `subsystem` is the producer marker; `key` the optional
/// Upsert a todo from an in-container subsystem — matrix / bash /
/// forge are the built-in producers, but any subsystem name is
/// accepted; nothing restricts `subsystem` to a fixed set, so a
/// user-configured MCP server can push its own todos here too.
/// `subsystem` is the producer marker; `key` the optional
/// subsystem-specific dedup key (a matrix room id, a bash task id).
/// A new-or-changed row signals the turn loop; an identical keyed
/// re-push is a silent no-op. Keyless todos always insert as one-offs.