awaken-runtime 0.4.0

Phase-based execution engine, plugin system, and agent loop for Awaken
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::sync::Arc;

use async_trait::async_trait;

use crate::PhaseContext;
use awaken_contract::StateError;
use awaken_contract::contract::tool_intercept::ToolInterceptPayload;

#[async_trait]
pub trait ToolGateHook: Send + Sync + 'static {
    async fn run(&self, ctx: &PhaseContext) -> Result<Option<ToolInterceptPayload>, StateError>;
}

pub(crate) type ToolGateHookArc = Arc<dyn ToolGateHook>;