1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! `klieo-runlog` โ Tier 2 observability for klieo agents.
//!
//! This crate ships:
//! - A [`RunLog`] aggregate type (the spec ยง8.2 view: `run_id`,
//! `agent`, `started_at`, `finished_at`, `status`, `steps`, `tokens`,
//! `cost_estimate`).
//! - A pluggable [`RunLogStore`] trait. Default in-memory;
//! SQLite behind `sqlite` feature.
//! - Deterministic [`compaction`](mod@compaction) (drop-by-rule). LLM-summarise
//! compaction behind `compaction-llm` feature.
//! - A deterministic-only [`replay`](mod@replay) engine that re-runs recorded
//! LLM + tool calls.
//!
//! ## Design: projection over `EpisodicMemory`, not a new trait
//!
//! `RunLog` is **not** a separate sink. It is a projection computed by walking
//! a `Vec<klieo_core::Episode>` returned from any
//! `EpisodicMemory::replay(run_id)`. The crate adds **zero traits** to
//! `klieo-core`. Plan #11 froze that surface.
//!
//! Typical wiring:
//! ```text
//! EpisodicMemory --(replay)--> Vec<Episode> --(project)--> RunLog --(put)--> RunLogStore
//! ```
//!
//! ## Replay caveats
//!
//! [`replay`](mod@replay) is **deterministic-only**. It asserts that user-supplied
//! test-double `LlmClient` + `ToolInvoker` produce byte-identical outputs to
//! the recorded ones. Side effects that do not flow through these traits
//! (timestamps, randomness, network calls outside the recorded LLM/tool
//! calls) cannot be replayed.
pub use crateLlmCompaction;
pub use crate;
pub use crateRunLogError;
pub use crate;
pub use crate;
pub use cratereplay;
pub use crate;
pub use crateSqliteRunLogStore;
pub use crate;