pub trait TurnHooksAsync: Send + Sync {
// Provided methods
fn on_turn_start<'life0, 'life1, 'async_trait>(
&'life0 self,
_input: &'life1 TurnInput,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_patch_dispatched<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 PatchDispatchContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_plan_step_execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_step_id: &'life1 str,
_tool: &'life2 str,
_args: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, PlanStepError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn on_turn_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_outcome: &'life1 TurnOutcome,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Async observability hooks for crate::AinlRuntime::run_turn_async (Tokio-friendly).
Graph SQLite I/O for that path runs on tokio::task::spawn_blocking; the graph itself stays
under Arc<std::sync::Mutex<_>> (not tokio::sync::Mutex) so the runtime can be constructed and
queried from any thread. See the crate root docs and README.md.
Provided Methods§
fn on_turn_start<'life0, 'life1, 'async_trait>(
&'life0 self,
_input: &'life1 TurnInput,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_patch_dispatched<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 PatchDispatchContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn on_plan_step_execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_step_id: &'life1 str,
_tool: &'life2 str,
_args: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, PlanStepError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn on_plan_step_execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_step_id: &'life1 str,
_tool: &'life2 str,
_args: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, PlanStepError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dispatch a single planner step (e.g. file_write, MCP tools). Default: no-op error.