Skip to main content

Crate runtimo_core

Crate runtimo_core 

Source
Expand description

Runtimo Core — Agent-centric capability runtime.

Runtimo provides structured execution, resource limits, crash recovery, and two-layer telemetry (hardware + process tracking) for machines that cannot be factory-reset. Every capability execution captures before/after snapshots, with full audit trails and undo support.

§Architecture

§Quick Start

use runtimo_core::{FileRead, Capability, Context};
use serde_json::json;

let cap = FileRead;
assert_eq!(cap.name(), "FileRead");

§Execution with Full Telemetry

use runtimo_core::{FileRead, execute_with_telemetry};
use serde_json::json;
use std::path::Path;

let cap = FileRead;
let result = execute_with_telemetry(
    &cap,
    &json!({"path": "/tmp/test.txt"}),
    false,
    Path::new("/tmp/runtimo.wal"),
).unwrap();
assert!(result.success);

§Performance (Measured on AMD EPYC 7B13)

OperationLatencyNotes
Cold start<1sBinary load + init
FileRead<10msSmall files (<1KB)
FileWrite<50msIncludes backup copy
Telemetry capture<100ms15+ shell subprocesses
Process snapshot<50msps aux parse
Memory baseline<50MBRSS at idle

§Feature Flags

No optional features currently. All functionality is included by default.

Re-exports§

pub use backup::BackupManager;
pub use capabilities::FileRead;
pub use capabilities::FileWrite;
pub use capabilities::GitExec;
pub use capabilities::Kill;
pub use capabilities::ShellExec;
pub use capabilities::Undo;
pub use capability::Capability;
pub use capability::CapabilityRegistry;
pub use capability::Context;
pub use capability::Output;
pub use config::RuntimoConfig;
pub use executor::execute_with_telemetry;
pub use executor::execute_with_telemetry_and_session;
pub use job::Job;
pub use job::JobId;
pub use job::JobState;
pub use llmosafe::LlmoSafeGuard;
pub use monitor::HealthMonitor;
pub use processes::ProcessSnapshot;
pub use telemetry::Telemetry;
pub use wal::WalEvent;
pub use wal::WalEventType;
pub use wal::WalReader;
pub use wal::WalWriter;

Modules§

backup
Backup manager for undo/rollback functionality.
capabilities
Pluggable capability implementations (file I/O, shell, git, etc.). Built-in capabilities.
capability
Core trait and registry for pluggable operations. Capability trait and registry.
cmd
Shell command execution helper. Shared command execution helper.
config
Global configuration and path resolution. Persistent configuration for Runtimo.
executor
Capability executor with telemetry and safety guards. Execution engine — telemetry-wrapped capability execution.
job
Job identity, state machine, and WAL event types. Job lifecycle management.
llmosafe
LLM safety guard — CPU/RAM circuit breakers and entropy source. LLMOSafe integration — Real resource limits via the llmosafe crate.
monitor
Health monitoring with alerting. Health Monitoring Daemon — Background health checks with alerting.
processes
Process snapshot, zombie detection, and top-N queries. Process Execution Awareness — What’s running and consuming resources.
session
Session tracking for reliable SSH. Session tracking for reliable SSH.
telemetry
System telemetry capture and reporting. System Telemetry — Via Negativa: raw observation, no interpretation.
utils
Utility functions for path management.
validation
Path validation against allowed-prefix lists. Unified path validation module.
wal
Write-ahead log for crash recovery. Write-Ahead Log (WAL) — Append-only, crash-resistant event log.

Enums§

Error
Error types for runtimo-core.

Type Aliases§

Result
Result alias for runtimo-core operations.