Expand description
The shared event vocabulary: ReplEvent and its small payload types.
Why: both TuiEngine implementations (tagent’s AgentEngine, tcode’s
CodeEngine) and the shared event loop (Slice 2+) need one common
language for “things that happened” — a key press, a chunk of streamed
assistant output, a tool call, a workstream change. ReplEvent is that
language; generalizing it from tagent’s existing (tagent-specific)
ReplEvent in crates/trusty-agents/src/repl/tui/types.rs is the whole
point of the extraction (DOC-50 §2.3, §3.2).
What: this module defines the enum and the handful of payload types it
needs. It intentionally does NOT depend on crossterm — KeyInput is
trusty-code-tui’s own minimal key representation; Slice 2 (#3414) adds the
crossterm-backed terminal layer that translates real crossterm::event::KeyEvent
values into this type at the boundary, keeping ReplEvent itself
terminal-library-agnostic.
§Spec References
SPEC-TTUI-03~draft— Slice 1ReplEventdeliverable (§5, Slice 1).SPEC-TTUI-05~draft— per-variant slice ownership (Slices 5/6/8/9).
Structs§
- KeyInput
- Minimal,
crossterm-independent representation of a single key press. - KeyModifiers
- Modifier keys held alongside a
KeyCode. - Workstream
Summary - A minimal summary of a workstream (DOC-48 §2.1), enough for the status
line and
/workstream listoutput.
Enums§
- Delegation
Outcome - How a delegated sub-agent’s run ended (#7940) — the payload of
ReplEvent::DelegationFinished. - KeyCode
- The identity of a key, independent of any terminal library’s own enum.
- Repl
Event - Every event that can flow through the shared TUI’s event channel.