Skip to main content

TodoStateProvider

Trait TodoStateProvider 

Source
pub trait TodoStateProvider:
    Send
    + Sync
    + Debug {
    // Required methods
    fn get_phases(&self) -> Vec<TodoPhase>;
    fn set_phases_sync(&self, phases: Vec<TodoPhase>);
    fn apply_ops<'a>(
        &'a self,
        ops: Vec<TodoOp>,
    ) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, String>> + Send + 'a>>;
}
Expand description

Todo state access capability. Implemented by the composition root (oxicode-cli) bridging to the session-scoped todo state. Used by the todo agent tool and the TUI sticky panel.

Required Methods§

Source

fn get_phases(&self) -> Vec<TodoPhase>

Return a snapshot of the current phase list (read-only, for TUI).

Source

fn set_phases_sync(&self, phases: Vec<TodoPhase>)

Synchronously replace the whole phase list. Used by the TUI’s subagent auto-reconcile path, which runs on the sync frame loop and cannot .await apply_ops. Only meaningful for local in-process providers; a remote provider may return a not supported error.

Source

fn apply_ops<'a>( &'a self, ops: Vec<TodoOp>, ) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, String>> + Send + 'a>>

Apply a sequence of todo ops, returning the updated state, the newly-completed transitions (for strikethrough animation), and any error messages from ambiguous op references.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§