Skip to main content

SkillTransport

Trait SkillTransport 

Source
pub trait SkillTransport: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn kind(&self) -> &str;
    fn discover(&self, cx: &mut Cx) -> Result<Vec<SkillCard>>;
    fn call(
        &self,
        cx: &mut Cx,
        card: &SkillCard,
        args: Value,
        events: Option<&mut dyn SkillEventSink>,
    ) -> Result<Value>;
    fn health(&self, cx: &mut Cx) -> Result<Value>;
}
Expand description

Backend that discovers and runs skills.

A transport is the concrete behavior behind a SkillCard: it knows how to enumerate available skills and how to dispatch a call for one. Implementations include the in-process FixtureTransport and the feature-gated MCP, HTTP, process, and OpenAI-server transports.

Required Methods§

Source

fn id(&self) -> &str

Returns the transport’s stable identifier.

Source

fn kind(&self) -> &str

Returns the transport’s kind (for example fixture, mcp, http).

Source

fn discover(&self, cx: &mut Cx) -> Result<Vec<SkillCard>>

Discovers the skills this transport can run, as cards.

Source

fn call( &self, cx: &mut Cx, card: &SkillCard, args: Value, events: Option<&mut dyn SkillEventSink>, ) -> Result<Value>

Runs the skill described by card with the given args.

The optional events sink receives any streaming events emitted while the call is in progress.

Source

fn health(&self, cx: &mut Cx) -> Result<Value>

Returns a value describing the transport’s health.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§