Skip to main content

RuntimeHostAdapter

Trait RuntimeHostAdapter 

Source
pub trait RuntimeHostAdapter:
    Send
    + Sync
    + Clone
    + 'static {
Show 31 methods // Required methods fn get_agent<'life0, 'async_trait>( &'life0 self, org_id: i64, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<Agent>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_harness<'life0, 'async_trait>( &'life0 self, org_id: i64, harness_id: HarnessId, ) -> Pin<Box<dyn Future<Output = Result<Option<Harness>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_session_status<'life0, 'async_trait>( &'life0 self, org_id: i64, session_id: SessionId, status: SessionStatus, ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn load_turn_context<'life0, 'async_trait>( &'life0 self, org_id: i64, session_id: SessionId, ) -> Pin<Box<dyn Future<Output = Result<RuntimeHostTurnContext>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn capability_registry(&self) -> CapabilityRegistry; fn driver_registry(&self) -> DriverRegistry; fn harness_store(&self, org_id: i64) -> Arc<dyn HarnessStore>; fn agent_store(&self, org_id: i64) -> Arc<dyn AgentStore>; fn session_store(&self, org_id: i64) -> Arc<dyn SessionStore>; fn session_mutator(&self, org_id: i64) -> Arc<dyn SessionMutator>; fn provider_store(&self, org_id: i64) -> Arc<dyn LlmProviderStore>; fn message_store(&self) -> Arc<dyn MessageRetriever>; fn event_emitter(&self) -> Arc<dyn EventEmitter>; fn file_store(&self) -> Arc<dyn SessionFileSystem>; // Provided methods fn image_resolver(&self, _org_id: i64) -> Option<Arc<dyn ImageResolver>> { ... } fn image_artifact_store( &self, _org_id: i64, ) -> Option<Arc<dyn ImageArtifactStore>> { ... } fn provider_credential_store( &self, _org_id: i64, ) -> Option<Arc<dyn ProviderCredentialStore>> { ... } fn utility_llm_service(&self) -> Option<Arc<dyn UtilityLlmService>> { ... } fn egress_service(&self) -> Option<Arc<dyn EgressService>> { ... } fn storage_store(&self) -> Option<Arc<dyn SessionStorageStore>> { ... } fn memory_store(&self, _org_id: i64) -> Option<Arc<dyn MemoryStoreBackend>> { ... } fn connection_resolver(&self) -> Option<Arc<dyn UserConnectionResolver>> { ... } fn sqldb_store(&self) -> Option<SessionSqlDbStoreRef> { ... } fn leased_resource_store(&self) -> Option<Arc<dyn LeasedResourceStore>> { ... } fn session_resource_registry( &self, ) -> Option<Arc<dyn SessionResourceRegistry>> { ... } fn schedule_store( &self, _org_id: i64, ) -> Option<Arc<dyn SessionScheduleStore>> { ... } fn platform_store( &self, _org_id: i64, _session_id: SessionId, ) -> Option<Arc<dyn PlatformStore>> { ... } fn budget_checker( &self, _org_id: i64, _agent_id: Option<AgentId>, ) -> Option<Arc<dyn BudgetChecker>> { ... } fn payment_authority( &self, _org_id: i64, _agent_id: Option<AgentId>, ) -> Option<Arc<dyn PaymentAuthority>> { ... } fn outbound_tool_rate_limiter( &self, _org_id: i64, ) -> Option<Arc<dyn OutboundToolRateLimiter>> { ... } fn mcp_executor<'life0, 'async_trait>( &'life0 self, _org_id: i64, _session_id: SessionId, ) -> Pin<Box<dyn Future<Output = Option<Arc<McpExecutor>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Public adapter contract for server-backed or durable runtime hosts.

everruns-runtime owns shared host orchestration for both embedded and durable execution. That includes phase execution (input -> reason -> act), lifecycle emission, and the generic turn-strategy decisions used by durable or custom hosts.

Host crates implement this trait to provide persistence, session-lifecycle plumbing, event delivery, and their own orchestration backend. The durable engine itself remains outside this crate.

Required Methods§

Source

fn get_agent<'life0, 'async_trait>( &'life0 self, org_id: i64, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<Agent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_harness<'life0, 'async_trait>( &'life0 self, org_id: i64, harness_id: HarnessId, ) -> Pin<Box<dyn Future<Output = Result<Option<Harness>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_session_status<'life0, 'async_trait>( &'life0 self, org_id: i64, session_id: SessionId, status: SessionStatus, ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn load_turn_context<'life0, 'async_trait>( &'life0 self, org_id: i64, session_id: SessionId, ) -> Pin<Box<dyn Future<Output = Result<RuntimeHostTurnContext>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn capability_registry(&self) -> CapabilityRegistry

Source

fn driver_registry(&self) -> DriverRegistry

Source

fn harness_store(&self, org_id: i64) -> Arc<dyn HarnessStore>

Source

fn agent_store(&self, org_id: i64) -> Arc<dyn AgentStore>

Source

fn session_store(&self, org_id: i64) -> Arc<dyn SessionStore>

Source

fn session_mutator(&self, org_id: i64) -> Arc<dyn SessionMutator>

Source

fn provider_store(&self, org_id: i64) -> Arc<dyn LlmProviderStore>

Source

fn message_store(&self) -> Arc<dyn MessageRetriever>

Source

fn event_emitter(&self) -> Arc<dyn EventEmitter>

Source

fn file_store(&self) -> Arc<dyn SessionFileSystem>

Provided Methods§

Source

fn image_resolver(&self, _org_id: i64) -> Option<Arc<dyn ImageResolver>>

Source

fn image_artifact_store( &self, _org_id: i64, ) -> Option<Arc<dyn ImageArtifactStore>>

Source

fn provider_credential_store( &self, _org_id: i64, ) -> Option<Arc<dyn ProviderCredentialStore>>

Source

fn utility_llm_service(&self) -> Option<Arc<dyn UtilityLlmService>>

Source

fn egress_service(&self) -> Option<Arc<dyn EgressService>>

Source

fn storage_store(&self) -> Option<Arc<dyn SessionStorageStore>>

Source

fn memory_store(&self, _org_id: i64) -> Option<Arc<dyn MemoryStoreBackend>>

Source

fn connection_resolver(&self) -> Option<Arc<dyn UserConnectionResolver>>

Source

fn sqldb_store(&self) -> Option<SessionSqlDbStoreRef>

Source

fn leased_resource_store(&self) -> Option<Arc<dyn LeasedResourceStore>>

Source

fn session_resource_registry(&self) -> Option<Arc<dyn SessionResourceRegistry>>

Source

fn schedule_store(&self, _org_id: i64) -> Option<Arc<dyn SessionScheduleStore>>

Source

fn platform_store( &self, _org_id: i64, _session_id: SessionId, ) -> Option<Arc<dyn PlatformStore>>

Source

fn budget_checker( &self, _org_id: i64, _agent_id: Option<AgentId>, ) -> Option<Arc<dyn BudgetChecker>>

Source

fn payment_authority( &self, _org_id: i64, _agent_id: Option<AgentId>, ) -> Option<Arc<dyn PaymentAuthority>>

Source

fn outbound_tool_rate_limiter( &self, _org_id: i64, ) -> Option<Arc<dyn OutboundToolRateLimiter>>

Per-org outbound tool-call rate limiter (TM-TOOL-009). Default: None (no rate limiting — suitable for in-process / test environments).

Source

fn mcp_executor<'life0, 'async_trait>( &'life0 self, _org_id: i64, _session_id: SessionId, ) -> Pin<Box<dyn Future<Output = Option<Arc<McpExecutor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

MCP executor routing mcp_* tool calls for this session, if the host configures MCP (specs/runtime-mcp.md D4). Default: None, so hosts without scoped MCP servers keep the plain tool registry unchanged.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§