Skip to main content

Module todo_store

Module todo_store 

Source
Expand description

(#8235) The todo_write tool’s concrete TodoStore — writes a validated checklist onto one session’s roster row. Concrete TodoStore writing the todo_write tool’s list onto one session’s roster row (#8235).

Why: tools::checklist must not depend on session, and the tool must not learn which session or agent it serves — the same layering, and the same reason, as task::sink’s SessionToolEventSink (see agent_loop::sink’s module docs). This is the glue: task is the daemon-execution layer that knows both halves. What: SessionTodoStore holds an Arc<SessionRegistry> plus the session id and the WRITER’s agent/agent_id, so the tool’s every write is attributed to the loop that registered it and cannot address another agent’s list. A registry error becomes TodoError::Unavailable, which the tool reports to the model as a recoverable failure over an unchanged list. Test: tests::* — the tool-to-session.get_agents round trip #8235 asks for, asserted through the read path rather than the store’s own state.

Structs§

SessionTodoStore
Writes one agent’s checklist into one session’s roster (#8235).