everruns-local
SQLite-backed, restart-survivable runtime stores for embedded, single-process Everruns hosts.
everruns-local populates the optional host-backend slots of
everruns-runtime with local,
file-backed implementations. The runtime ships in-memory by default; this crate
swaps in durable, SQLite-backed stores so a freshly-spawned process can read,
continue, and inspect work an earlier process started.
The runtime stays generic and owns only the seams — durable local storage choices live here, behind an opt-in crate, so embedders (terminal coding agents, personal agents, …) don't each reinvent them.
Part of the Everruns ecosystem — the durable agentic harness engine for building unstoppable agents.
What It Provides
LocalSessionTaskRegistry— aSessionTaskRegistryover SQLite, persisting session tasks and their message channel.LocalScheduleStore— aSessionScheduleStoreover SQLite, with an additive JSONmetadatabag (name/color/kind/…) kept local rather than widening the shared core primitive.LocalScheduleRunner— an explicitly started/stopped in-process runner for due one-shot and recurring schedules. It scopes atomic SQLite claims to the sessions reported byLocalSessionRunner::routable_session_ids, recovers interrupted claims, and delivers prompts throughLocalSessionRunner::send_message.LocalPlatformStore— aPlatformStorethat implements the subagent-critical core honestly and returns explicit unsupported errors for platform-management-only operations.LocalProfile— named local environment config (data dir, workspace, base URL, org/principal identity defaults).LocalBackends— composable construction ofRuntimeBackendsplus the local stores, preserving a caller-supplied event bus and session file-system factory.LocalRuntimeBuilder— optional sugar overInProcessRuntimeBuilder.
Task and message state persists to a SQLite file, so process restarts survive: the next process picks up exactly where the last one left off.
Install
Requires Rust 1.94+ (edition 2024).
Quick Example
use ;
use ;
#
Hosts that enable create_schedule or scheduled spawn_background calls must
also run the executor for their lifetime. Use the same LocalSessionRunner
implementation that backs LocalPlatformStore. Hosts that cannot route every
session in the organization must implement routable_session_ids; return
Some(vec![]) when no route is active and update the returned snapshot as
sessions activate or stop. Then retain the handle:
let schedule_runner = local.start_schedule_runner?;
let local = local.with_platform_runner;
// Keep `schedule_runner` alive with the host, then stop cleanly.
schedule_runner.shutdown.await?;
Delivery is at-least-once across a process crash: concurrent live runners do
not deliver the same occurrence, and claims are heartbeated while
send_message runs, but a crash after the host accepts a message and before
SQLite records completion can cause a retry. Embedded hosts should make
scheduled turns tolerant of that standard crash window. A failed delivery stays
durable and waits the configured claim_timeout before retrying.
See the integration tests under tests/ for end-to-end coverage of
task lifecycle, restart survivability, schedule round-trips, composability, and
embedded turns.
Documentation
License
Licensed under the MIT License.