pub struct NodeFacade {Show 15 fields
pub node_id: String,
pub graph_id: String,
pub generation: u64,
pub work_role: String,
pub lifecycle_state: NodeLifecycleState,
pub capabilities: BTreeSet<NodeCapability>,
pub adapter: Arc<dyn NodeCapabilityAdapter>,
pub session_id: Option<String>,
pub session_registry: Option<SingleWriterSessionRegistry>,
pub active_invocation: Option<NodeInvocation>,
pub invocation_history: Vec<InvocationRecord>,
pub durable_cursor: u64,
pub stop_requested: bool,
pub cancellation_facts: Option<CancellationFacts>,
pub follow_up_instructions: Vec<String>,
}Expand description
Facade presenting one uniform control surface for a node instance.
Fields§
§node_id: String§graph_id: String§generation: u64§work_role: String§lifecycle_state: NodeLifecycleState§capabilities: BTreeSet<NodeCapability>§adapter: Arc<dyn NodeCapabilityAdapter>§session_id: Option<String>§session_registry: Option<SingleWriterSessionRegistry>§active_invocation: Option<NodeInvocation>§invocation_history: Vec<InvocationRecord>§durable_cursor: u64§stop_requested: bool§cancellation_facts: Option<CancellationFacts>§follow_up_instructions: Vec<String>Implementations§
Source§impl NodeFacade
impl NodeFacade
pub fn new( node_id: impl Into<String>, graph_id: impl Into<String>, generation: u64, work_role: impl Into<String>, adapter: Arc<dyn NodeCapabilityAdapter>, session_id: Option<String>, session_registry: Option<SingleWriterSessionRegistry>, ) -> NodeFacade
Sourcepub fn metadata(&self) -> NodeMetadata
pub fn metadata(&self) -> NodeMetadata
Snapshot node metadata for registration and feature indexing.
Sourcepub fn steer(
&mut self,
invocation_id: &str,
instruction: &str,
follow_up: bool,
) -> Result<SteerResult, NodeExecutionError>
pub fn steer( &mut self, invocation_id: &str, instruction: &str, follow_up: bool, ) -> Result<SteerResult, NodeExecutionError>
Steer the active invocation with new instructions. Truthfully reports whether live in-flight steering was applied, follow-up was queued for safe boundary, or steering is unsupported. Never kills or restarts the process!
Sourcepub fn pause(&mut self) -> Result<PauseResult, NodeExecutionError>
pub fn pause(&mut self) -> Result<PauseResult, NodeExecutionError>
Request pause / drain for this node. In-flight work may suspend if supported, or drain to safe boundary. Never fakes pause by killing processes.
Sourcepub fn observe_safe_boundary(&mut self)
pub fn observe_safe_boundary(&mut self)
Mark that a safe boundary has been observed for this node.
Converts PauseRequested to Paused.
Sourcepub fn resume(&mut self) -> Result<ResumeResult, NodeExecutionError>
pub fn resume(&mut self) -> Result<ResumeResult, NodeExecutionError>
Resume a paused or waiting node.
Sourcepub fn stop(&mut self, reason: &str) -> Result<StopResult, NodeExecutionError>
pub fn stop(&mut self, reason: &str) -> Result<StopResult, NodeExecutionError>
Cooperatively stop this node. Preserves requested, acknowledged, and effect-unknown facts separately.
Sourcepub fn observe(&self) -> NodeObservation
pub fn observe(&self) -> NodeObservation
Observe current node state without starting or extending work.
Sourcepub fn settle_invocation_completion(
&mut self,
outcome: NodeExecutionOutcome,
cursor: u64,
) -> Result<NodeExecutionReceipt, NodeExecutionError>
pub fn settle_invocation_completion( &mut self, outcome: NodeExecutionOutcome, cursor: u64, ) -> Result<NodeExecutionReceipt, NodeExecutionError>
Settle an active invocation completion, issuing a durable execution receipt.