Skip to main content

Crate everruns_host

Crate everruns_host 

Source
Expand description

Shared effectful host orchestration for Everruns execution adapters.

everruns-host composes the shared everruns-engine execution kernel for application, worker, and local adapters. It resolves deployment services, credentials, and stores, then applies the engine planner’s effects. It is a transitive implementation boundary, not the ordinary application entrypoint; applications in the Everruns ecosystem should normally depend on everruns.

Advanced hosts — servers, evaluation harnesses, research runtimes, and specialized embedders — depend on everruns plus this crate and the focused sibling crates they actually need.

runtime_capability_registry owns the Framework preset: it starts from an empty core registry, adds the runtime-safe portable catalog selected by builtins, and then adds only the integrations selected by this crate’s filesystem, bashkit, web-fetch, and lua features. MCP transport wiring is separately enabled by mcp; local-process MCP additionally requires mcp-stdio. compose_runtime_capability_registry applies the selected integrations to a caller-supplied registry when a broader preset is required. runtime_egress_service supplies the matching direct transport only when a network-capable integration is selected. Advanced hosts can select direct-egress to construct [DirectEgressService] without enabling an integration bundle.

§Example

use everruns_host::{ResolvedTurnInputs, RuntimeHostAdapter};

fn accepts_host<A: RuntimeHostAdapter>() {}
fn accepts_inputs(_: ResolvedTurnInputs) {}

Re-exports§

pub use events::DEFAULT_EVENT_READ_LIMIT;
pub use events::EventCursor;
pub use events::EventDeliveryStats;
pub use events::EventDurability;
pub use events::EventHistory;
pub use events::EventHistoryPage;
pub use events::EventHistoryReadLimit;
pub use events::EventHistoryReadRequest;
pub use events::EventLog;
pub use events::EventLogError;
pub use events::EventPage;
pub use events::EventReadLimit;
pub use events::EventReadRequest;
pub use events::EventReader;
pub use events::EventSink;
pub use events::EventSinkError;
pub use events::HostEventEmitter;
pub use events::InMemoryEventLog;
pub use events::JsonlEventLog;
pub use events::MAX_EVENT_HISTORY_PAGE_SIZE;
pub use events::MAX_EVENT_HISTORY_REPLAY;
pub use events::MAX_EVENT_PAGE_SIZE;
pub use events::MAX_JSONL_RECOVERY_BYTES;
pub use events::MAX_JSONL_RECOVERY_EVENTS;
pub use events::NoopEventSink;
pub use execution_snapshot::load_execution_snapshot;
pub use execution_snapshot::load_execution_snapshot_for_session;
pub use session_services::GetSessionInfoTool;
pub use session_services::KvStoreTool;
pub use session_services::SESSION_CAPABILITY_ID;
pub use session_services::SESSION_STORAGE_CAPABILITY_ID;
pub use session_services::SecretStoreTool;
pub use session_services::SessionCapability;
pub use session_services::SessionCapabilityConfig;
pub use session_services::SessionMutator;
pub use session_services::SessionMutatorExt;
pub use session_services::SessionStorageCapability;
pub use session_services::SessionTitleMutation;
pub use session_services::WriteSessionTitleTool;
pub use session_services::is_internal_session_kv_key;
pub use session_services::is_internal_session_secret_name;
pub use session_services::session_title_updated_event;
pub use session_services::update_session_title_with_event;

Modules§

events
Canonical host event persistence, bounded replay, and message projection.
execution_snapshot
Store-backed loading for the neutral core execution snapshot.
native_async
Private local persistence for custom hosts using native async tools. The journal directory must not be exposed through session tools or shared with another conversation. Distributed hosts need an equivalent fenced store.
session_services
Backend-neutral session service contracts and capability implementations.

Structs§

AcceptedTurnInput
An application message accepted for a specific in-process turn.
AgentBuilder
Builds a portable AgentDefinition with runtime-friendly defaults.
ApprovalGatingFileStore
Gate destructive operations through an embedder-supplied FileApprovalGate. Reads pass through.
AssembledTurnContext
Credential-safe context consumed by kernel reason execution.
CapabilityDelta
Result of changing the session-scoped capability set of a live runtime.
DisabledSessionFileSystemFactory
Default factory used when a platform does not configure session files.
Environment
Session execution resources. Workspace is first; future compute/network resources attach through the open type-keyed extension seam.
EnvironmentBuilder
FixedSessionFileSystemFactory
Factory that returns one already-selected session filesystem.
HarnessBuilder
Builds a portable HarnessDefinition with runtime-friendly defaults, paired with the id it is seeded under.
HostBackends
Non-filesystem backend bundle supplied to an execution host.
HostComposition
The execution surface a deployment runs with.
HostCompositionBuilder
Builder for HostComposition.
InMemoryAgentStore
Application-grade in-memory agent store for embedded hosts.
InMemoryCompactionCheckpointStore
Application-grade in-memory compaction checkpoint store for embedded hosts.
InMemoryEnvironmentBindingStore
Process-local binding store used by the default embedded Agent lifecycle.
InMemoryHarnessStore
Application-grade in-memory harness store for embedded hosts.
InMemoryProviderStore
Application-grade in-memory provider store for embedded hosts.
InMemorySessionFileStore
In-memory implementation of the session virtual filesystem.
InMemorySessionFileSystemFactory
Factory for the runtime’s in-memory session filesystem.
InMemorySessionStorageStore
In-memory implementation of session key/value and secret storage.
InMemorySessionStore
In-memory SessionStore + SessionMutator for embedded runtimes.
InProcessExecution
Turn execution whose state lives in the current process.
InProcessRuntime
Public in-process runtime backed by either in-memory or custom stores.
InProcessRuntimeBuilder
Builder for the public in-process runtime.
PolicyFileStore
Apply a backend-independent WorkspacePolicy to a session filesystem.
RealDiskFileStore
A SessionFileSystem rooted at a real host directory.
RealDiskSessionFileSystemFactory
Factory for real-disk session files rooted at a fixed host directory.
ResolvedTurnInputs
Resolved inputs loaded in one batched call for runtime host execution.
RuntimeSessionLifecycle
SeededHarness
A portable harness definition seeded under an embedder-chosen id.
SessionBuilder
Builds a portable ExecutionSession with runtime-friendly defaults.
SessionFileSystemFactoryContext
Host-supplied values used by platform file-system factories.
SingleSessionBuilder
High-level builder for seeding one harness, one agent, and one session.
StoreCommandHost
Store-backed CommandHost shared by embedded and durable hosts.
StoreTurnContextResolver
Store-backed resolver used by direct atom callers and custom hosts.
TurnResult
TurnSteering
Concurrency-safe ingress for messages sent while an in-process turn runs.
Workspace
One logical workspace opened through a provider.
WorkspaceBinding
Provider-owned data sufficient to reopen the exact recorded head.
WorkspaceCheckpoint
Provider-neutral checkpoint metadata.
WorkspaceDescriptor
Provider-neutral identity and base metadata for a logical workspace.
WorkspaceDiff
Provider-neutral diff summary for one mutable head.
WorkspaceHead
One stable, reopenable mutable view of a workspace.
WorkspaceHeadBuilder
Builder for explicit isolated or shared heads.
WorkspaceHeadDescriptor
Provider-neutral identity and base metadata for a head.
WorkspaceHeadId
Stable identity of one mutable workspace head.
WorkspaceHeadRequest
Request to create or fork one head.
WorkspaceHeadResource
A provider-produced head resource before the Framework attaches lifecycle.
WorkspaceHeadStatus
Provider-neutral mutable-head status.
WorkspaceProviderId
Stable, provider-defined SPI identifier.
WriteBlocklistFileStore
Reject writes into vendored / build directories at any depth.

Enums§

EnvironmentBindingError
TaskTransition
A task lifecycle transition an observer can be notified of.
TurnSteeringPushError
Why a steered message could not join the running turn.
TurnStopReason
Stable reason a turn stopped, independent of provider-specific strings.
WorkspaceError
Errors exposed by workspace providers and lifecycle operations.
WorkspaceHeadAccess
Whether a head is intended for one session or intentionally shared.

Traits§

EnvironmentBindingStore
Durable compare-and-set store for a session’s opaque environment binding.
FileApprovalGate
Embedder-supplied approval callback used by ApprovalGatingFileStore.
HostToolAugmentor
Adds higher-level, execution-time tools without coupling the host to their implementation crate.
RuntimeAgentStore
Agent store contract for runtime seeding and lookup.
RuntimeHarnessStore
Harness store contract for runtime seeding and lookup.
RuntimeHostAdapter
Public adapter contract for server-backed or durable runtime hosts.
RuntimeProviderStore
Provider store contract for runtime lookup and default-model configuration.
RuntimeSessionStore
Session store contract for runtime seeding, lookup, and mutation.
SessionFileSystemFactory
Factory for deployment-selected session filesystem implementations.
TaskTransitionObserver
Receive task-transition notifications in process.
WorkspaceProvider
Open service-provider interface for physical workspace implementations.

Functions§

advance_host_execution
Determine the next host step after an activity finishes.
assemble_turn_context
Load and assemble a reason context, requiring at least one model-visible message.
assemble_turn_context_from_snapshot
Assemble a reason context from a snapshot a host already loaded.
compose_runtime_capability_registry
Add host integrations selected by Cargo features to an existing registry.
detect_dependency_blocker
execute_act_activity
execute_input_activity
execute_reason_activity
execute_reason_activity_with_prompt_messages
Execute a reason activity while applying user_prompt_submit hooks to the supplied messages. Hosts that inject synthetic user messages between reason iterations must include their ids here so they cross the same policy boundary as the turn’s original input.
in_process_internal_org_id
Derive an internal i64 org id from the public org_<32hex> form on a ExecutionSession.
inspect_turn_context
Load and assemble a context for inspection, allowing empty history.
multi_root_file_system
runtime_capability_registry
Return the runtime-safe portable bundle and integrations enabled as host Cargo features.
runtime_egress_service
Return the egress service matching the selected host integrations.

Type Aliases§

ScheduleStoreFactory
Factory producing a per-org SessionScheduleStore. Embedders that have a single global store can ignore the org_id argument and return the same Arc every time.
SubagentDelegateFactory
Factory for the neutral subagent delegate supplied by a higher-level host.
ToolContextExtensionsFactory
Factory for type-erased tool services supplied by a higher-level host.
WorkspaceId
Workspace ID (org-scoped named Workspace — see knowledge/runtime-resources/workspace.md)