Skip to main content

fluers_runtime/
lib.rs

1//! # fluers-runtime
2//!
3//! The harness layer — Flue's own contribution on top of the agent core.
4//!
5//! This is where the bulk of a faithful port lives:
6//!
7//! - [`agent`] — `define_agent` / `AgentProfile` (model + tools + skills +
8//!   sandbox + instructions), mirroring `@flue/runtime`'s `defineAgent`.
9//! - `env` — the `SessionEnv` trait: the filesystem +
10//!   process abstraction that every sandbox backend implements.
11//! - [`sandbox`] — virtual / local / remote sandbox backends.
12//! - [`session`] — session management, event store, dispatch/invoke.
13//! - [`runner`] — session-aware coordination and persistence after each turn.
14//! - [`skill`] — `SKILL.md` parsing and packaged-skill directories.
15//! - [`tool`] — the built-in tools: `read`, `write`, `edit`, `bash`, `grep`,
16//!   `glob` (with Flue's byte/line limits).
17//! - [`event`] — the event stream observers subscribe to.
18
19#![forbid(unsafe_code)]
20#![warn(missing_docs)]
21// Test code may use unwrap/expect/panic for clarity (project policy).
22#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used, clippy::panic))]
23
24pub mod agent;
25pub mod env;
26pub mod error;
27pub mod event;
28pub mod json_file_adapter;
29pub mod local_env;
30pub mod persistence;
31pub mod process_sandbox;
32pub mod runner;
33pub mod sandbox;
34pub mod session;
35pub mod skill;
36#[cfg(test)]
37mod skill_tests;
38pub mod tool;
39
40pub use agent::{define_agent, Agent, AgentProfile, AgentSpec};
41pub use env::{Limits, SessionEnv};
42pub use error::{RuntimeError, RuntimeResult};
43pub use event::{Event, EventBus};
44pub use json_file_adapter::JsonFileAdapter;
45pub use local_env::LocalSessionEnv;
46pub use persistence::PersistenceAdapter;
47pub use process_sandbox::{
48    Enforcement, ExecSandboxContext, OnUnavailable, ProcessSandbox, SandboxPolicy, SandboxProfile,
49    WrappedCommand,
50};
51pub use runner::SessionRunner;
52pub use sandbox::{local, LocalSandbox, Sandbox};
53pub use session::{Session, SessionId, SessionState, SessionStore};
54pub use skill::Skill;
55pub use tool::mvp_tools;