pub trait AgentProvider:
Send
+ Sync
+ 'static {
Show 19 methods
// Provided methods
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn metadata(&self) -> Option<RuntimeMetadata> { ... }
fn warnings(&self) -> Vec<String> { ... }
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn create_session<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_session<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderSessionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderSessionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn update_session<'life0, 'async_trait>(
&'life0 self,
_request: UpdateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn create_turn<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_turn<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_turns<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn cancel_turn<'life0, 'async_trait>(
&'life0 self,
_request: CancelAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_turn_events<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnEventsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnEventsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_interaction<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn list_interactions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderInteractionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderInteractionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn resolve_interaction<'life0, 'async_trait>(
&'life0 self,
_request: ResolveAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_capabilities<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderCapabilitiesRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentProviderCapabilities>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Provider trait for serving the Gestalt agent-provider protocol.
Provided Methods§
Sourcefn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Configures the provider before it starts serving requests.
Sourcefn metadata(&self) -> Option<RuntimeMetadata>
fn metadata(&self) -> Option<RuntimeMetadata>
Returns runtime metadata that should augment the static manifest.
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Performs an optional health check.
Sourcefn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts provider-owned background work after configuration.
Sourcefn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shuts the provider down before the runtime exits.
Sourcefn create_session<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_session<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates or idempotently returns an agent session.
Mints the session id returned on the AgentSession. Must be
idempotent on idempotency_key scoped per subject
(context.subject.id); an empty key always creates.
Sourcefn get_session<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns one agent session by ID.
Sourcefn list_sessions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderSessionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderSessionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderSessionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderSessionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists agent sessions visible to the request subject.
Sourcefn update_session<'life0, 'async_trait>(
&'life0 self,
_request: UpdateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_session<'life0, 'async_trait>(
&'life0 self,
_request: UpdateAgentProviderSessionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates mutable agent session metadata or state.
Sourcefn create_turn<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_turn<'life0, 'async_trait>(
&'life0 self,
_request: CreateAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts or idempotently returns an agent turn.
Sourcefn get_turn<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_turn<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns one agent turn by ID.
Sourcefn list_turns<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_turns<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists turns for a session or query.
Sourcefn cancel_turn<'life0, 'async_trait>(
&'life0 self,
_request: CancelAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_turn<'life0, 'async_trait>(
&'life0 self,
_request: CancelAgentProviderTurnRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentTurn>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Requests cancellation of a running or pending turn.
Sourcefn list_turn_events<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnEventsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnEventsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_turn_events<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderTurnEventsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderTurnEventsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists ordered events emitted by a turn.
Sourcefn get_interaction<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_interaction<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns one pending or resolved interaction.
Sourcefn list_interactions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderInteractionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderInteractionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_interactions<'life0, 'async_trait>(
&'life0 self,
_request: ListAgentProviderInteractionsRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<ListAgentProviderInteractionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists interactions associated with a turn.
Sourcefn resolve_interaction<'life0, 'async_trait>(
&'life0 self,
_request: ResolveAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resolve_interaction<'life0, 'async_trait>(
&'life0 self,
_request: ResolveAgentProviderInteractionRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentInteraction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Records a response to a pending interaction.
Sourcefn get_capabilities<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderCapabilitiesRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentProviderCapabilities>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_capabilities<'life0, 'async_trait>(
&'life0 self,
_request: GetAgentProviderCapabilitiesRequest,
) -> Pin<Box<dyn Future<Output = ProviderResult<AgentProviderCapabilities>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the provider’s supported agent features.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".