pub enum State {
Spawning,
Working {
tools: Vec<String>,
},
AwaitingAnswer {
question: String,
},
PlanReady {
plan_file: Option<PathBuf>,
plan: Option<String>,
},
Blocked {
gate: String,
prompt: String,
options: Vec<String>,
},
IdleDone {
text: String,
},
Dead,
Unknown,
}Expand description
The externally-visible session state, serialized under a status tag for JSON consumers.
Variants§
Spawning
tmux session is up but the TUI hasn’t produced a classifiable turn yet.
Working
Assistant is streaming or a tool call is in flight (tools empty if just streaming).
AwaitingAnswer
Assistant asked a clarifying question and is waiting for an answer (PoC §3.2).
PlanReady
A plan is ready and the approval gate is on screen (PoC §3.3).
Blocked
A TUI gate is on screen (gate = “trust” | “permission”) — answer it with csd approve.
IdleDone
Assistant finished its turn cleanly and is waiting for the human.
Dead
The tmux session is gone.
Unknown
Session is up but produced output we don’t recognize.
Trait Implementations§
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more