starweaver_runtime/
executor.rs1use std::sync::Arc;
4
5use async_trait::async_trait;
6pub use starweaver_context::{
7 AgentCheckpoint, AgentExecutionDecision, AgentExecutor, AgentExecutorError, AgentResumeCursor,
8 AgentResumeEvidence,
9};
10pub use starweaver_core::AgentExecutionNode;
11
12pub type DynAgentExecutor = Arc<dyn AgentExecutor>;
14
15#[derive(Clone, Debug, Default)]
17pub struct DirectAgentExecutor;
18
19#[async_trait]
20impl AgentExecutor for DirectAgentExecutor {
21 async fn checkpoint(
22 &self,
23 _checkpoint: AgentCheckpoint,
24 ) -> Result<AgentExecutionDecision, AgentExecutorError> {
25 Ok(AgentExecutionDecision::Continue)
26 }
27}