Skip to main content

TurnHooks

Trait TurnHooks 

Source
pub trait TurnHooks: Send + Sync {
    // Provided methods
    fn on_artifact_loaded(&self, _agent_id: &str, _node_count: usize) { ... }
    fn on_persona_compiled(&self, _contribution: Option<&str>) { ... }
    fn on_memory_context_ready(&self, _ctx: &MemoryContext) { ... }
    fn on_episode_recorded(&self, _episode_id: Uuid) { ... }
    fn on_patch_dispatched(&self, _label: &str, _fitness: f32) { ... }
    fn on_extraction_complete(&self, _report: &ExtractionReport) { ... }
    fn on_emit(&self, _target: &str, _payload: &Value) { ... }
    fn on_turn_complete(&self, _outcome: &TurnOutcome) { ... }
    fn on_vitals_classified(&self, _gate: &str, _phase: &str, _trust: f32) { ... }
}
Expand description

Hooks for observability and host wiring. Every method has a default empty body.

Provided Methods§

Source

fn on_artifact_loaded(&self, _agent_id: &str, _node_count: usize)

Source

fn on_persona_compiled(&self, _contribution: Option<&str>)

Source

fn on_memory_context_ready(&self, _ctx: &MemoryContext)

Source

fn on_episode_recorded(&self, _episode_id: Uuid)

Source

fn on_patch_dispatched(&self, _label: &str, _fitness: f32)

Source

fn on_extraction_complete(&self, _report: &ExtractionReport)

Source

fn on_emit(&self, _target: &str, _payload: &Value)

Source

fn on_turn_complete(&self, _outcome: &TurnOutcome)

Source

fn on_vitals_classified(&self, _gate: &str, _phase: &str, _trust: f32)

Called after episode write when vitals were present on the TurnInput.

gate is “pass” / “warn” / “fail”; phase is e.g. “reasoning:0.69”; trust is in [0, 1]. Default implementation logs nothing; hosts use this for dashboards, alerting, or routing.

Implementors§