pub mod broker;
pub mod clock;
pub mod egress;
pub mod egress_spec;
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::{
BlobRead, Broker, CallerGrant, CapabilityLimits, Credential, CredentialDenied,
CredentialSource, EgressCall, EgressGrants, DEFAULT_CREDENTIAL_TTL,
};
pub use areev_core::types::capability::AllowedHost;
pub use areev_core::types::capability::{CapabilityDenied, Declaration};
pub use egress::{EgressDenied, EgressPolicy};
pub use egress_spec::EgressSpec;
pub use executor::{
env_allow_policy, is_sandbox_runtime, runtime_allows_capabilities, CodeExecutor,
CommandExecutor, EgressHandle, ExecResult, ExecutorRegistry, HostToolExecutor, PreparedCode,
};
pub use manifest::{
abstract_nodes, pin_from_definition, BudgetsSpec, ForkBase, PinnedTool, RunManifest,
};
pub use runner::{ns_in_scope, subgraph_run_id, 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 RunRow {
pub run_id: String,
pub ns: Option<String>,
pub created_at: i64,
pub outcome: String,
pub spent_usd_micros: Option<u64>,
pub spent_tokens: Option<u64>,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RunListPage {
pub runs: Vec<RunRow>,
pub total: usize,
pub truncated: bool,
pub offset: usize,
pub limit: usize,
pub unattributed: usize,
}
#[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};