pub trait SupervisorSource:
Send
+ Sync
+ 'static {
// Required methods
fn act(
&self,
action: SupervisorAction,
) -> Result<SupervisorReply, SupervisorError>;
fn tear_down_socket(&self) -> Result<bool, SupervisorError>;
}Expand description
Dispatcher-side handle to the operator-local supervisor.
Implemented by the zero-headless adapter (production), by
crates/zero/src/main.rs when stubbed (current-M2 CLI has
no daemon binary yet), and by test scaffolding. When no
adapter is attached to crate::DispatchContext the
dispatcher emits a single “headless supervisor unavailable”
alert rather than hanging — same honesty contract as
crate::SessionSource on --no-persist.
Required Methods§
Sourcefn act(
&self,
action: SupervisorAction,
) -> Result<SupervisorReply, SupervisorError>
fn act( &self, action: SupervisorAction, ) -> Result<SupervisorReply, SupervisorError>
Issue an action to the supervisor.
§Errors
Propagates adapter-specific failures — see
SupervisorError.
Sourcefn tear_down_socket(&self) -> Result<bool, SupervisorError>
fn tear_down_socket(&self) -> Result<bool, SupervisorError>
Tear down the daemon’s listener socket as part of a
/kill. Idempotent: when the daemon is already stopped
this returns Ok(false) and the dispatch layer treats
that as “no tear-down needed”. When it did tear one
down, returns Ok(true) so the /kill line can tag
the compound behavior.
§Errors
Propagates adapter-specific failures.