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
58
59
60
61
62
//! agx-core — pure parsers, timeline model, and analytics for the
//! agx step-through-debugger CLI.
//!
//! This crate is the TUI-free half of the agx repo. It ships the
//! parsers for every supported agent-trace format (Claude Code,
//! Codex, Gemini, OpenAI-compatible, LangChain, Vercel AI SDK,
//! OpenTelemetry GenAI — JSON + optional binary), the shared
//! [`timeline::Step`] model, cost estimation, corpus aggregation,
//! export writers, annotation storage, and the PII scanner.
//!
//! The TUI layer lives in the top-level `agx` crate, which consumes
//! this library. Integrators who want to drive agx's parsers
//! programmatically — eval harnesses, custom CI guards, lightweight
//! dashboards — can depend on `agx-core` without pulling in ratatui /
//! crossterm / arboard.
//!
//! # Stability
//!
//! Public API tracks the stepwise-suite conventions in
//! [`docs/suite-conventions.md`](https://github.com/brevity1swos/agx/blob/main/docs/suite-conventions.md)
//! §5. Schema-breaking changes to [`timeline::Step`] field names,
//! [`format::Format`] variants, or the `--export json` shape
//! (mirrored here through [`export::json`]) require a minor-version
//! bump and a note in the main crate's README compat table. New
//! fields may appear; removals or renames are breaking.
//!
//! # Entry point
//!
//! ```no_run
//! use agx_core::loader::load_session;
//! # use std::path::Path;
//! # fn main() -> anyhow::Result<()> {
//! let steps = load_session(Path::new("session.jsonl"))?;
//! for step in &steps {
//! println!("{:?} {}", step.kind, step.label);
//! }
//! # Ok(())
//! # }
//! ```