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
15
use std::sync::Arc;

use async_trait::async_trait;

use crate::state::StateCommand;
use awaken_contract::StateError;

use super::PhaseContext;

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

pub(crate) type PhaseHookArc = Arc<dyn PhaseHook>;