pub mod broker;
pub mod clock;
pub mod egress;
pub mod executor;
pub mod journal;
pub mod lease;
pub mod manifest;
pub mod otel;
pub mod reducers;
pub mod runner;
pub mod stream;
pub use clock::{Clock, ScriptedClock, SystemClock};
pub use broker::{Broker, CallerGrant, Credential, EgressGrants};
pub use egress::{EgressDenied, EgressPolicy};
pub use executor::{CodeExecutor, CommandExecutor, EgressHandle, ExecResult, ExecutorRegistry, HostToolExecutor, PreparedCode};
pub use manifest::{BudgetsSpec, ForkBase, PinnedTool, RunManifest};
pub use runner::{CrashPoint, OnDangling, RunOptions, Runner};
pub use otel::OtelObserver;
pub use stream::{RunEvent, RunObserver};
pub use areev_run_core::{FailCause, RunError as CoreRunError, RunOutcome as CoreRunOutcome};
use areev_core::error::AreevError;
use areev_run_core::{RunError, RunOutcome};
pub fn err_run(e: AreevError) -> RunError {
RunError::Storage { detail: e.to_string() }
}
#[derive(Debug, Clone)]
pub enum RunSession {
Finished { outcome: RunOutcome, run_id: String },
Parked { envelope: serde_json::Value, run_id: String },
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct VerifyStep {
pub superstep: u64,
pub verdict: String,
pub ok: bool,
}
#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct VerifyReport {
pub verified: bool,
pub steps: Vec<VerifyStep>,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ShadowRun {
pub run_id: String,
pub consistent: bool,
pub effects_replayed: u64,
pub steps: Vec<VerifyStep>,
}
#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct ShadowReport {
pub runs: Vec<ShadowRun>,
pub all_consistent: bool,
pub effect_dispatches: u64,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct InspectReport {
pub run_id: String,
pub plan_hash: String,
pub principal: String,
pub pinned: Vec<serde_json::Value>,
pub budgets: serde_json::Value,
pub fork_of: Option<serde_json::Value>,
pub checkpoints: usize,
pub journal_entries: usize,
pub superstep: Option<serde_json::Value>,
pub phase: Option<String>,
pub spent: Option<serde_json::Value>,
pub pending_asks: serde_json::Value,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct OversightReport {
pub run_id: String,
pub plan_hash: String,
pub human_gates: serde_json::Value,
pub authorized_responders: serde_json::Value,
pub budgets: serde_json::Value,
pub kill_switch: serde_json::Value,
}
pub use lease::{RunLease, DEFAULT_RUN_LEASE_MS};