Skip to main content

Module event

Module event 

Source
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

Structs§

KeyInput
Minimal, crossterm-independent representation of a single key press.
KeyModifiers
Modifier keys held alongside a KeyCode.
WorkstreamSummary
A minimal summary of a workstream (DOC-48 §2.1), enough for the status line and /workstream list output.

Enums§

DelegationOutcome
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.
ReplEvent
Every event that can flow through the shared TUI’s event channel.