Skip to main content

Module state

Module state 

Source
Expand description

Pure worker-lifecycle state machine (spec §4). No I/O: models the states and the one-shot WORKER_RESTARTED notice so lifecycle decisions are unit-testable without spawning a JVM.

Structs§

InvalidTransition
WorkerLifecycle
Tracks worker state plus the one-shot “restarted after crash” notice that must surface EXACTLY once (spec §4: the next call after a crash returns WORKER_RESTARTED once, so the agent knows unsaved edits were lost).

Enums§

WorkerState
Worker lifecycle state (spec §4: starting|ready|busy|crashed).