pub trait AgentAdapter {
// Required methods
fn agent(&self) -> Agent;
fn program(&self) -> &str;
fn mcp_entries(&self, workdir: &Workdir) -> Result<Vec<McpEntry>, String>;
fn register_mcp(
&self,
name: &str,
url: &str,
client_id: &str,
scope: McpScope,
workdir: &Workdir,
) -> FixAction;
fn remove_mcp(&self, entry: &McpEntry, workdir: &Workdir) -> FixAction;
// Provided method
fn launch(&self, args: &[String]) -> Command { ... }
}Required Methods§
fn agent(&self) -> Agent
Sourcefn mcp_entries(&self, workdir: &Workdir) -> Result<Vec<McpEntry>, String>
fn mcp_entries(&self, workdir: &Workdir) -> Result<Vec<McpEntry>, String>
Every MCP server the agent would load when started in workdir. An
unreadable or malformed file is an error that names it.
Sourcefn register_mcp(
&self,
name: &str,
url: &str,
client_id: &str,
scope: McpScope,
workdir: &Workdir,
) -> FixAction
fn register_mcp( &self, name: &str, url: &str, client_id: &str, scope: McpScope, workdir: &Workdir, ) -> FixAction
The command that registers an HTTP MCP server with a fixed OAuth
client in scope, for an agent started in workdir. An agent with a
single configuration ignores the scope.
Sourcefn remove_mcp(&self, entry: &McpEntry, workdir: &Workdir) -> FixAction
fn remove_mcp(&self, entry: &McpEntry, workdir: &Workdir) -> FixAction
The command that removes entry.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".