Skip to main content

Crate luft_core

Crate luft_core 

Source
Expand description

§luft-core

Frozen contracts, scheduler, journal, and state management.

luft-core is the zero-dependency foundation of the Luft ecosystem. It defines the traits, types, scheduling logic, and persistence interfaces that every other crate builds on. Types defined here are frozen contracts — breaking changes are treated as major version bumps.

§Module Overview

ModuleResponsibility
contractCross-crate traits and types: AgentBackend, AgentTask, AgentResult, AgentEvent, Finding
schedulerConcurrency-limited agent dispatcher with retry and journal callbacks
journalCheckpoint store for run resume — write agent results, read on restart
stateRun/phase state machine: RunCheckpoint, CheckpointStatus
run_dirFilesystem layout helpers for .luft/runs/<run-id>/

§Stability Guarantees

§Feature Flags

FeatureDescription
testingExports MockBackend, MockFileBackend, and test data generators

Re-exports§

pub use journal::gc_runs;
pub use journal::AgentCacheKey;
pub use journal::CompositeJournalCallback;
pub use journal::JournalError;
pub use journal::JournalStore;
pub use journal::ResumeContext;
pub use journal::RunCreationMode;
pub use scheduler::BackendRegistry;
pub use scheduler::JournalCallback;
pub use scheduler::RetryPolicy;
pub use scheduler::Scheduler;
pub use scheduler::SchedulerConfig;
pub use scheduler::SchedulerError;
pub use state::get_run_store;
pub use state::list_runs;
pub use state::AgentResultCache;
pub use state::CheckpointStatus;
pub use state::PhaseSummary;
pub use state::RunCheckpoint;
pub use state::RunStore;
pub use contract::*;

Modules§

contract
Frozen contracts (code-design §1). These types are the shared basis for all modules; once reviewed they should change rarely. A companion CONTRACTS.md may track the freeze.
journal
Journal / Resume — checkpoint persistence with replay semantics (M1).
run_dir
Human-readable run directory naming: {slug}_{unix_timestamp}.
scheduler
Concurrent scheduler (M1, §2): concurrency limiting, per-run quota, retry, cancellation, and event reporting.
state
Progress persistence and resume for long-running workflows.