hatchery_session_events/lib.rs
1//! Session event layer.
2//!
3//! Turns what a provider CLI draws in its terminal (or what an ACP agent reports) into typed
4//! [`SessionEvent`]s. Web HQ (and later the TUI) read only this layer: chat answers, thought and
5//! action widgets, diffs, prompt-needed alerts and avatar states are all derived from events.
6//!
7//! Design (see docs/hatchery/research/session-ui-competitors-2026-10.md):
8//! * live PTY parsing is the quality base: [`ProviderParser`] modules, one per provider, plus a generic fallback;
9//! * every event carries its `source` and a [`Confidence`]: screen parsing is always `Heuristic`;
10//! * ACP is an additional source behind the same event type ([`acp::AcpAdapter`]), `Structured`.
11
12pub mod acp;
13mod engine;
14mod event;
15pub mod providers;
16
17pub use engine::EventStream;
18pub use event::{ActionStatus, Confidence, EventKind, PromptKind, SessionEvent, SessionState};
19pub use providers::{parser_for, Item, Parsed, ProviderParser};