Skip to main content

harness_core/
lib.rs

1//! Core traits and types for the **harness** agent framework.
2//!
3//! This crate is intentionally **dependency-light** and **runtime-agnostic** so every
4//! upper-layer crate can share a single source of truth for the framework's vocabulary.
5//!
6//! See `DESIGN.md` at the workspace root for architectural intent.
7
8/// Re-exports used by the procedural macros in `harness-macros`. Not part of
9/// the stable public API — users should never need to reference these directly.
10#[doc(hidden)]
11pub mod __export {
12    pub use async_trait::async_trait;
13    pub use futures;
14    pub use inventory;
15    pub use serde_json;
16}
17
18pub mod compactor;
19pub mod context;
20pub mod embed;
21pub mod error;
22pub mod event;
23pub mod guide;
24pub mod hook;
25pub mod memory;
26pub mod model;
27pub mod profile;
28pub mod recall;
29pub mod recall_testkit;
30pub mod sensor;
31pub mod signal;
32pub mod skill;
33pub mod tool;
34pub mod world;
35
36pub use compactor::*;
37pub use context::*;
38pub use embed::*;
39pub use error::*;
40pub use event::*;
41pub use guide::*;
42pub use hook::*;
43pub use memory::*;
44pub use model::*;
45pub use profile::*;
46pub use recall::*;
47pub use recall_testkit::*;
48pub use sensor::*;
49pub use signal::*;
50pub use skill::*;
51pub use tool::*;
52pub use world::*;
53
54/// How a control-plane component executes:
55/// - **Computational**: deterministic, cheap, fast (CPU-bound: linter, type checker, AST tools).
56/// - **Inferential**: model-driven, slower, probabilistic (review agent, semantic dup detection).
57///
58/// This dichotomy is from Böckeler (2026); see DESIGN.md §3.
59#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
60#[serde(rename_all = "lowercase")]
61#[non_exhaustive]
62pub enum Execution {
63    Computational,
64    Inferential,
65}