Skip to main content

TodoStore

Trait TodoStore 

Source
pub trait TodoStore: Send + Sync {
    // Required method
    fn replace(&self, todos: Vec<TodoItem>) -> Result<(), TodoError>;
}
Expand description

Where a validated checklist is written (#8235).

Why: the seam that keeps tools from depending on session — the only implementation, task::todo_store::SessionTodoStore, holds the Arc<SessionRegistry> and the writing agent’s identity, so this tool never learns which session or agent it serves. Same rationale as agent_loop::sink::ToolEventSink’s module docs. What: Self::replace is all-or-nothing — it either stores todos whole or returns TodoError::Unavailable having changed nothing. Not async: SessionRegistry’s writes are synchronous. Test: task::todo_store::tests::* (the real store); tests::* (a recording double).

Required Methods§

Source

fn replace(&self, todos: Vec<TodoItem>) -> Result<(), TodoError>

Replace the calling agent’s whole checklist with todos.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§