everruns-local 0.16.0

Local, SQLite-backed runtime backend stores for embedded in-process Everruns hosts
Documentation

everruns-local

SQLite-backed, restart-survivable runtime stores for embedded, single-process Everruns hosts.

Crates.io Documentation License: MIT

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 — a SessionTaskRegistry over SQLite, persisting session tasks and their message channel.
  • LocalScheduleStore — a SessionScheduleStore over SQLite, with an additive JSON metadata bag (name/color/kind/…) kept local rather than widening the shared core primitive.
  • LocalPlatformStore — a PlatformStore that 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 of RuntimeBackends plus the local stores, preserving a caller-supplied event bus and session file-system factory.
  • LocalRuntimeBuilder — optional sugar over InProcessRuntimeBuilder.

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).

cargo add everruns-runtime everruns-local

Quick Example

use everruns_local::{LocalBackends, LocalProfile};
use everruns_runtime::{InProcessRuntimeBuilder, RuntimeBackends};

# fn example() -> Result<(), Box<dyn std::error::Error>> {
// LocalProfile stores plain filesystem paths and does not expand a leading
// `~`, so pass an absolute path your application owns. Its SQLite file is
// derived from the data dir.
let profile = LocalProfile::new("/var/lib/everruns")
    .with_workspace_root("/var/lib/everruns/workspace");

// Layer the local, SQLite-backed stores over a set of runtime backends. The
// event bus (and any other store) you pass on `RuntimeBackends` is preserved.
let local = LocalBackends::new(profile, RuntimeBackends::in_memory())?;

// Plug the assembled backends into the in-process runtime builder.
let _builder = InProcessRuntimeBuilder::new().backends(local.runtime_backends.clone());
# Ok(())
# }

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.