Skip to main content

wrapper_events/
lib.rs

1#![forbid(unsafe_code)]
2//! Shared ingestion primitives for wrapper JSONL/NDJSON outputs.
3//!
4//! This crate is intentionally **not** a Substrate envelope. It provides:
5//! - A bounded-memory, line-oriented ingestion loop (sync + optional tokio).
6//! - Adapter plumbing (feature-gated) for wrapper-specific parsers.
7//! - A minimal normalized event shape for consumers that want a unified view.
8
9mod channel;
10mod config;
11mod error;
12mod ingest;
13mod line_parser;
14mod normalized;
15mod reader;
16
17#[cfg(feature = "codex")]
18pub mod codex_adapter;
19
20#[cfg(feature = "claude_code")]
21pub mod claude_code_adapter;
22
23pub use channel::ValidatedChannelString;
24pub use config::{CaptureRaw, ErrorDetailCapture, IngestConfig, IngestLimits};
25pub use error::{
26    AdapterErrorCode, CapturedRaw, ErrorDetail, ErrorDetailSink, LineRecord, LineRecordError,
27};
28pub use ingest::{LineIngestor, RawCaptureBudget};
29pub use line_parser::{ClassifiedParserError, LineInput, LineParser};
30pub use normalized::{
31    NormalizationContext, NormalizedEventKind, NormalizedEvents, NormalizedWrapperEvent,
32    WrapperAgentKind,
33};
34
35#[cfg(feature = "tokio")]
36pub use ingest::AsyncLineIngestor;