Expand description
Pure terminal projection, rendering, routing, and lifecycle boundaries. Pure terminal state reduction, deterministic rendering, bounded effect routing, and panic-safe terminal lifecycle ownership.
Structs§
- Action
Loop - Owned bounded Action → Effect application loop.
- Action
Sender - Cloneable bounded sender for terminal actions.
- Approval
View - Persisted redacted approval projection suitable for terminal display.
- Cell
Node - One immutable typed presentation cell with stable identity and ownership metadata.
- Command
Catalog - Deterministic built-in and declarative slash command catalog.
- Command
Completion - One bounded slash-command completion menu owned by the local TUI.
- Composer
Attachment - One validated, path-free image retained in local composer state.
- Crossterm
Driver - Crossterm lifecycle driver over one exclusive terminal writer.
- Decision
Cell - Typed approval or another explicit durable decision.
- Diff
Cell - Typed persisted code change.
- Editor
- Unicode grapheme-safe bounded multiline editor state.
- Input
Pump - Owned cancellable crossterm input task.
- KeyMap
- Validated context-aware interactive key map.
- Lifecycle
Cell - Typed operational lifecycle activity.
- Memory
Clipboard - In-memory clipboard for hermetic tests and embedding.
- Message
Cell - Typed user or assistant message source.
- Model
Retry View - Ephemeral projection of one scheduled model retry.
- Notice
Cell - Typed informational, warning, or error notice.
- Plan
Cell - Typed plan proposal or progress update.
- Plan
Step - One bounded renderer-neutral plan step.
- Presentation
- Pure presentation projection split by durable and transient lifetime.
- Queued
Input Cell - Typed queued steering or follow-up preview.
- Reasoning
Cell - Typed reasoning source and disclosure state.
- Rendered
Line - One width-bounded terminal row.
- Renderer
- Deterministic terminal renderer with a bounded width/theme-aware cell cache.
- Result
Cell - Typed tool, process, artifact, or fallback result.
- Selector
- Filterable deterministic local selection view.
- Selector
Item - One bounded selector row.
- Sources
Cell - Typed provider-neutral external sources.
- Startup
Context - Immutable startup context counts shown above the transcript.
- Streaming
Block - One streamed content block not yet guaranteed durable.
- Streaming
Message - Ephemeral streamed assistant message assembled by content index.
- System
Clipboard - Host clipboard adapter using the platform’s standard non-shell command.
- Terminal
Capabilities - Terminal display features that are safe to use without an active probe.
- Terminal
Guard - RAII terminal owner with reverse-order teardown and foreground-child handoff.
- Terminal
Options - Requested terminal features. Unsupported keyboard enhancement is ignored during entry.
- Terminal
Title - Bounded terminal title with protocol control bytes removed.
- Theme
- Small semantic terminal palette independent of durable state.
- Timeline
Detail - One renderer-neutral, tree-prefixed detail row.
- Timeline
Source - One terminal-safe source label with an optional validated OSC8 destination.
- Tool
Progress View - Latest transient progress for one tool call.
- Tool
View - Durable tool state plus optional transient progress.
- Transcript
Viewport - Local transcript navigation state. It is never persisted in session records.
- TuiState
- Pure terminal projection of canonical durable state and bounded ephemeral observations.
- View
Preferences - Local-only view preferences; toggling them never changes durable state.
Enums§
- Action
- Typed inputs reduced into
TuiState. - Approval
Choice - One canonical choice supported by the durable approval contract.
- Attachment
Error - Safe failure returned while validating a local composer attachment.
- Binding
Action - Semantic action selected by one configured key chord.
- Cell
Content - Closed family of legal first-party cell payloads.
- CellId
- Stable typed identity for one projected cell.
- Cell
Lane - Presentation lane used only when a protocol identity is unavailable.
- Color
Capability - Conservative color support inferred from standard terminal environment variables.
- Command
Error - Invalid command catalog or invocation.
- Decision
Status - Durable approval or decision state.
- Dispatch
Error - Failure to enqueue work into a bounded application loop.
- Editor
Error - Rejected editor mutation.
- Effect
- Side effects requested by the pure reducer.
- Input
Event - Bounded terminal input projected into the interactive application loop.
- KeyMap
Error - Invalid or ambiguous key binding configuration.
- Lifecycle
Kind - Origin intrinsic to lifecycle activity.
- Lifecycle
Status - Observable lifecycle state used to choose markers and action emphasis.
- Message
Author - Author intrinsic to a message payload.
- Message
Cell Facet - Identity facet for one canonical message block.
- Notice
Kind - Origin intrinsic to a notice payload.
- Notice
Severity - Severity for a typed notice surface.
- Output
Format - Source format owned by a typed timeline body.
- Overlay
- The one top-priority local interaction view currently visible above composer input.
- Plan
Step Status - Protocol-ready status for one plan step.
- Queued
Input Kind - Semantic type for one queued input preview.
- Selector
Error - Invalid selector construction.
- Selector
Value - Typed value returned by a local selector.
- Slash
Command - Parsed interactive slash command.
- Stream
Cell Facet - Identity facet for active message streaming.
- Terminal
Mode - Every terminal feature managed by the canonical mode ledger.
- Timeline
Detail Kind - Semantic treatment for one structured detail row.
- Tool
Cell Facet - Identity facet for one tool call.
- Viewport
Mode - Fullscreen compatibility or Codex-style native scrollback ownership.
Constants§
- DEFAULT_
ACTION_ CAPACITY - Default bound for terminal actions awaiting reduction.
- DEFAULT_
EFFECT_ CAPACITY - Default bound for effects awaiting an executor.
- MAX_
COMPOSER_ ATTACHMENTS - Maximum image attachments retained in one session composer.
- MAX_
COMPOSER_ IMAGE_ BASE64_ BYTES - Maximum aggregate encoded image bytes retained in one session composer.
- MAX_
EDITOR_ BYTES - Maximum UTF-8 bytes retained by the interactive editor.
- MAX_
EDITOR_ HISTORY - Maximum submitted prompts retained for local history navigation.
- MAX_
MCP_ HEALTH_ ROWS - Maximum configured MCP server rows retained in the terminal projection.
- MAX_
NOTIFICATIONS - Maximum local notifications retained by the terminal projection.
- MAX_
OBSERVED_ EVENT_ IDS - Maximum event identities retained for duplicate observational-event detection.
- MAX_
VISIBLE_ QUEUE_ ITEMS - Maximum steering or follow-up entries retained for rendering.
Traits§
- Clipboard
- Explicit outward clipboard boundary used only by interactive commands.
- Effect
Executor - Async boundary used by the bounded application loop.
- Frame
Sink - Synchronous frame boundary injected into the asynchronous application loop.
- Terminal
Driver - Replaceable terminal lifecycle driver used by the guard and tests.
Functions§
- is_
observational - Returns whether an event is observational and safe to drop after a newer cursor.
- reduce
- Pure deterministic state transition.
- run
- Runs the production crossterm interactive mode.
- run_
with_ channels - Runs the bounded interactive loop with injected input, frame, and clipboard ports.
- run_
with_ channels_ with_ settings_ path - Runs the injected interactive loop with an explicit persistent settings target.
- spawn_
input_ pump - Starts one bounded crossterm input reader.