pub struct CommandLifecycleMessage {
pub command_uuid: String,
pub state: CommandLifecycleState,
pub ran_ahead: Option<bool>,
pub wakeup_source: Option<CommandWakeupSource>,
pub scheduled_for: Option<f64>,
pub uuid: String,
pub session_id: String,
}Expand description
command_lifecycle message — the fate of a queued command (slash command
or queued user prompt): queued when the inbound message enters the
command queue, started when it drains into a turn, then exactly one
terminal state (completed, cancelled, or discarded). Commands
enqueued without a client-supplied uuid emit no lifecycle events. Not a
strict pairing — a terminal state may arrive for a command_uuid that
never emitted started, and internally-enqueued commands skip queued.
Fields§
§command_uuid: StringThe queued command’s uuid — the client-supplied uuid on the inbound
message (distinct from the universal per-frame uuid).
state: CommandLifecycleState§ran_ahead: Option<bool>Present, and true, only on a repeated queued frame written to the
VS Code panel: the plugin hooks of this immediate command, typed
during a turn, have run and answered ahead of its turn. The command is
still queued, and its own turn prints the answer (CLI 2.1.300+).
wakeup_source: Option<CommandWakeupSource>Only on started, and only when the command being started is a
scheduler fire; matches the UserPromptSubmit hook’s source. A fire
removed from the queue without being started gets only its terminal
state, without this key. Advertised by the
lifecycle_wakeup_source_v1 capability on system/init
(CLI 2.1.307+).
scheduled_for: Option<f64>Only beside CommandWakeupSource::LoopWakeup: the epoch-millisecond
time the fired wakeup was set for (the scheduledFor of the
ScheduleWakeup call that armed it). The fire itself can come earlier
or later. A host keeping an idle session alive for a wakeup should stop
waiting only when this equals the time it is waiting for, and needs a
time limit of its own past it, since a fire that never starts sends no
such frame (CLI 2.1.307+).
uuid: String§session_id: String