enact-core 0.0.1

Core agent runtime for Enact - Graph-Native AI agents
Documentation
//! Runner module - thin execution shell
//!
//! The runner is a thin orchestration layer that:
//! - Accepts invocations
//! - Passes to Kernel
//! - Wires callbacks
//! - Returns streams
//!
//! Core execution logic lives in the kernel module.
//! Context types are in the context module.
//!
//! ## CRITICAL INVARIANT: Runner Never Mutates State
//!
//! Runner is a thin orchestration shell. All execution semantics live in kernel/.
//!
//! Runner MUST NOT:
//! - Mutate execution state directly
//! - Retry steps (kernel handles retries)
//! - Handle backoff (kernel handles backoff)
//! - Skip nodes (kernel handles node execution)
//!
//! If Runner starts doing these things → duplicated kernel logic (architectural leak).
//!
//! **What Runner Does:**
//! - Wires services (session, memory, artifacts)
//! - Handles callbacks (before/after hooks)
//! - Delegates execution to ExecutionKernel
//! - Streams events to clients
//!
//! **What Runner Does NOT Do:**
//! - Mutate execution state directly
//! - Implement execution semantics
//! - Make policy decisions
//!
//! @see docs/TECHNICAL/01-EXECUTION-TELEMETRY.md
//! @see docs/TECHNICAL/25-STREAM-PROCESSORS.md

mod callbacks;
mod execution_runner;
mod r#loop;
mod protected_runner;

// Runner types
pub use execution_runner::{DefaultRunner, Runner};

// Protected runner (feat-09: Guardrails)
pub use protected_runner::{DefaultProtectedRunner, InputBlockedError, ProtectedRunner};

// Re-export from kernel (kernel owns parallel/interrupt logic)
pub use crate::kernel::{
    run_parallel, InterruptDecision, InterruptReason, InterruptableRunner, ParallelResult,
};

// Re-export from context
pub use crate::context::{
    InvocationContext, InvocationServices, ResourceLimits, RuntimeContext, RuntimeContextBuilder,
    SessionContext, TraceContext,
};