Skip to main content

orchestral_runtime/generic_agent/
provider_spi.rs

1use super::*;
2
3#[async_trait]
4impl AgentProvider for InternalGenericAgentProvider {
5    fn describe(&self) -> AgentDescriptorEnvelope {
6        self.inner.descriptor.clone()
7    }
8
9    async fn start(&self, request: AgentStartRequest) -> Result<AgentStart, AgentStartError> {
10        self.start_run(request).await
11    }
12
13    async fn command(
14        &self,
15        execution: &AgentExecutionRef,
16        command: AgentCommandEnvelope,
17    ) -> Result<ProviderCommandDisposition, AgentProtocolError> {
18        self.apply_command(execution, command).await
19    }
20
21    async fn recover(
22        &self,
23        request: AgentRecoveryRequest,
24    ) -> Result<AgentRecovery, AgentProtocolError> {
25        self.recover_run(request).await
26    }
27}