Skip to main content

SubagentRuntimeAdapter

Trait SubagentRuntimeAdapter 

Source
pub trait SubagentRuntimeAdapter: Send + Sync {
    // Required methods
    fn provider_id(&self) -> &ProviderId;
    fn capabilities(&self) -> SubagentCapabilities;
    fn execution_admission(&self) -> ExecutionAdmissionEvidence;
    fn readiness(&self) -> ReadinessEvidence;
    fn resolve_resume_identity(
        &self,
        durable_binding: &DurableNativeBinding,
    ) -> Result<NativeResumeIdentity, AdapterFailure>;
    fn send(
        &self,
        request: &SubagentDispatchRequest,
    ) -> Result<RuntimeDispatchReceipt, AdapterFailure>;
    fn continue_turn(
        &self,
        request: &SubagentContinueRequest,
    ) -> Result<RuntimeDispatchReceipt, AdapterFailure>;
    fn observe(
        &self,
        dispatch_id: &str,
    ) -> Result<RuntimeObservation, AdapterFailure>;
    fn cancel_active(
        &self,
        dispatch_id: &str,
        identity: &NativeResumeIdentity,
    ) -> Result<RuntimeDispatchReceipt, AdapterFailure>;
    fn cleanup(
        &self,
        identity: &NativeResumeIdentity,
    ) -> Result<(), AdapterFailure>;
}
Expand description

Provider-owned target runtime port. Application code selects this trait through the registry and contains no provider conditional.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§