Skip to main content

everruns_host/
lib.rs

1//! Shared effectful host orchestration for Everruns execution adapters.
2//!
3//! `everruns-host` sits between the pure `everruns-engine` planner and the
4//! application, worker, and local adapters that apply its effects. It is a
5//! transitive implementation boundary, not the ordinary application
6//! entrypoint; applications in the [Everruns](https://everruns.com) ecosystem
7//! should normally depend on `everruns`.
8//!
9//! The deprecated `everruns-runtime` package re-exports this implementation so
10//! its 0.17 public paths continue to use the same canonical code. Existing
11//! users should follow the [runtime migration guide](https://docs.everruns.com/framework/runtime-compatibility/).
12//!
13//! # Example
14//!
15//! ```
16//! use everruns_host::{RuntimeHostAdapter, RuntimeHostTurnContext};
17//!
18//! fn accepts_host<A: RuntimeHostAdapter>() {}
19//! fn accepts_context(_: RuntimeHostTurnContext) {}
20//! # let _ = accepts_context;
21//! ```
22
23mod backends;
24mod builders;
25pub mod events;
26mod file_store_decorators;
27mod grep_limits;
28mod host;
29mod in_memory;
30mod mcp;
31mod mcp_cache;
32mod real_disk;
33mod runtime;
34mod turn_strategy;
35
36pub use backends::{
37    HostBackends, PlatformStoreFactory, RuntimeAgentStore, RuntimeHarnessStore,
38    RuntimeProviderStore, RuntimeSessionStore, ScheduleStoreFactory,
39};
40pub use builders::{AgentBuilder, HarnessBuilder, SessionBuilder, SingleSessionBuilder};
41pub use events::{
42    DEFAULT_EVENT_READ_LIMIT, EventCursor, EventDeliveryStats, EventDurability, EventHistory,
43    EventHistoryPage, EventHistoryReadLimit, EventHistoryReadRequest, EventLog, EventLogError,
44    EventPage, EventReadLimit, EventReadRequest, EventReader, EventSink, EventSinkError,
45    HostEventEmitter, InMemoryEventLog, JsonlEventLog, MAX_EVENT_HISTORY_PAGE_SIZE,
46    MAX_EVENT_HISTORY_REPLAY, MAX_EVENT_PAGE_SIZE, NoopEventSink,
47};
48pub use everruns_core::AssembledTurnContext;
49pub use everruns_core::task_observer::{TaskTransition, TaskTransitionObserver};
50pub use everruns_core::turn::TurnStopReason;
51#[allow(deprecated)]
52pub use file_store_decorators::{
53    ApprovalGatingFileStore, DEFAULT_WRITE_BLOCKLIST, FileApprovalGate, PolicyFileStore,
54    WriteBlocklistFileStore,
55};
56
57pub use host::{
58    RuntimeHostAdapter, RuntimeHostTurnContext, RuntimeSessionLifecycle, detect_dependency_blocker,
59    execute_act_activity, execute_input_activity, execute_reason_activity,
60    execute_reason_activity_with_prompt_messages,
61};
62pub use in_memory::{
63    InMemorySessionFileStore, InMemorySessionFileSystemFactory, InMemorySessionStorageStore,
64    InMemorySessionStore,
65};
66pub use real_disk::{RealDiskFileStore, RealDiskSessionFileSystemFactory, multi_root_file_system};
67pub use runtime::{
68    AcceptedTurnInput, CapabilityDelta, InProcessRuntime, InProcessRuntimeBuilder, TurnResult,
69    TurnSteering, TurnSteeringPushError, in_process_internal_org_id,
70};
71pub use turn_strategy::{RuntimeActPlan, RuntimeTurnPlan, RuntimeTurnState, plan_next_host_turn};