pub trait AgentWrapperBackend: Send + Sync {
// Required methods
fn kind(&self) -> AgentWrapperKind;
fn capabilities(&self) -> AgentWrapperCapabilities;
fn run(
&self,
request: AgentWrapperRunRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunHandle, AgentWrapperError>> + Send + '_>>;
// Provided methods
fn run_control(
&self,
_request: AgentWrapperRunRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunControl, AgentWrapperError>> + Send + '_>> { ... }
fn mcp_list(
&self,
_request: AgentWrapperMcpListRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>> { ... }
fn mcp_get(
&self,
_request: AgentWrapperMcpGetRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>> { ... }
fn mcp_add(
&self,
_request: AgentWrapperMcpAddRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>> { ... }
fn mcp_remove(
&self,
_request: AgentWrapperMcpRemoveRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>> { ... }
}Required Methods§
fn kind(&self) -> AgentWrapperKind
fn capabilities(&self) -> AgentWrapperCapabilities
Sourcefn run(
&self,
request: AgentWrapperRunRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunHandle, AgentWrapperError>> + Send + '_>>
fn run( &self, request: AgentWrapperRunRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunHandle, AgentWrapperError>> + Send + '_>>
Starts a run and returns a handle producing events and a completion result.
Backends MUST enforce capability gating per run-protocol-spec.md.
Provided Methods§
Sourcefn run_control(
&self,
_request: AgentWrapperRunRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunControl, AgentWrapperError>> + Send + '_>>
fn run_control( &self, _request: AgentWrapperRunRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperRunControl, AgentWrapperError>> + Send + '_>>
Starts a run and returns a handle plus an explicit cancellation handle.
Backends that do not advertise agent_api.control.cancel.v1 MUST return:
AgentWrapperError::UnsupportedCapability { agent_kind, capability: "agent_api.control.cancel.v1" },
where agent_kind == self.kind().as_str().to_string().
Sourcefn mcp_list(
&self,
_request: AgentWrapperMcpListRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
fn mcp_list( &self, _request: AgentWrapperMcpListRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
Runs mcp list and returns bounded command output.
Backends that do not advertise agent_api.tools.mcp.list.v1 MUST return:
AgentWrapperError::UnsupportedCapability { agent_kind, capability: "agent_api.tools.mcp.list.v1" },
where agent_kind == self.kind().as_str().to_string().
Sourcefn mcp_get(
&self,
_request: AgentWrapperMcpGetRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
fn mcp_get( &self, _request: AgentWrapperMcpGetRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
Runs mcp get and returns bounded command output.
Backends that do not advertise agent_api.tools.mcp.get.v1 MUST return:
AgentWrapperError::UnsupportedCapability { agent_kind, capability: "agent_api.tools.mcp.get.v1" },
where agent_kind == self.kind().as_str().to_string().
Sourcefn mcp_add(
&self,
_request: AgentWrapperMcpAddRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
fn mcp_add( &self, _request: AgentWrapperMcpAddRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
Runs mcp add and returns bounded command output.
Backends that do not advertise agent_api.tools.mcp.add.v1 MUST return:
AgentWrapperError::UnsupportedCapability { agent_kind, capability: "agent_api.tools.mcp.add.v1" },
where agent_kind == self.kind().as_str().to_string().
Sourcefn mcp_remove(
&self,
_request: AgentWrapperMcpRemoveRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
fn mcp_remove( &self, _request: AgentWrapperMcpRemoveRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentWrapperMcpCommandOutput, AgentWrapperError>> + Send + '_>>
Runs mcp remove and returns bounded command output.
Backends that do not advertise agent_api.tools.mcp.remove.v1 MUST return:
AgentWrapperError::UnsupportedCapability { agent_kind, capability: "agent_api.tools.mcp.remove.v1" },
where agent_kind == self.kind().as_str().to_string().