Skip to main content

Module tui

Module tui 

Source
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§

ActionLoop
Owned bounded Action → Effect application loop.
ActionSender
Cloneable bounded sender for terminal actions.
ApprovalView
Persisted redacted approval projection suitable for terminal display.
CellNode
One immutable typed presentation cell with stable identity and ownership metadata.
CommandCatalog
Deterministic built-in and declarative slash command catalog.
CommandCompletion
One bounded slash-command completion menu owned by the local TUI.
ComposerAttachment
One validated, path-free image retained in local composer state.
CrosstermDriver
Crossterm lifecycle driver over one exclusive terminal writer.
DecisionCell
Typed approval or another explicit durable decision.
DiffCell
Typed persisted code change.
Editor
Unicode grapheme-safe bounded multiline editor state.
InputPump
Owned cancellable crossterm input task.
KeyMap
Validated context-aware interactive key map.
LifecycleCell
Typed operational lifecycle activity.
MemoryClipboard
In-memory clipboard for hermetic tests and embedding.
MessageCell
Typed user or assistant message source.
ModelRetryView
Ephemeral projection of one scheduled model retry.
NoticeCell
Typed informational, warning, or error notice.
PlanCell
Typed plan proposal or progress update.
PlanStep
One bounded renderer-neutral plan step.
Presentation
Pure presentation projection split by durable and transient lifetime.
QueuedInputCell
Typed queued steering or follow-up preview.
ReasoningCell
Typed reasoning source and disclosure state.
RenderedLine
One width-bounded terminal row.
Renderer
Deterministic terminal renderer with a bounded width/theme-aware cell cache.
ResultCell
Typed tool, process, artifact, or fallback result.
Selector
Filterable deterministic local selection view.
SelectorItem
One bounded selector row.
SourcesCell
Typed provider-neutral external sources.
StartupContext
Immutable startup context counts shown above the transcript.
StreamingBlock
One streamed content block not yet guaranteed durable.
StreamingMessage
Ephemeral streamed assistant message assembled by content index.
SystemClipboard
Host clipboard adapter using the platform’s standard non-shell command.
TerminalCapabilities
Terminal display features that are safe to use without an active probe.
TerminalGuard
RAII terminal owner with reverse-order teardown and foreground-child handoff.
TerminalOptions
Requested terminal features. Unsupported keyboard enhancement is ignored during entry.
TerminalTitle
Bounded terminal title with protocol control bytes removed.
Theme
Small semantic terminal palette independent of durable state.
TimelineDetail
One renderer-neutral, tree-prefixed detail row.
TimelineSource
One terminal-safe source label with an optional validated OSC8 destination.
ToolProgressView
Latest transient progress for one tool call.
ToolView
Durable tool state plus optional transient progress.
TranscriptViewport
Local transcript navigation state. It is never persisted in session records.
TuiState
Pure terminal projection of canonical durable state and bounded ephemeral observations.
ViewPreferences
Local-only view preferences; toggling them never changes durable state.

Enums§

Action
Typed inputs reduced into TuiState.
ApprovalChoice
One canonical choice supported by the durable approval contract.
AttachmentError
Safe failure returned while validating a local composer attachment.
BindingAction
Semantic action selected by one configured key chord.
CellContent
Closed family of legal first-party cell payloads.
CellId
Stable typed identity for one projected cell.
CellLane
Presentation lane used only when a protocol identity is unavailable.
ColorCapability
Conservative color support inferred from standard terminal environment variables.
CommandError
Invalid command catalog or invocation.
DecisionStatus
Durable approval or decision state.
DispatchError
Failure to enqueue work into a bounded application loop.
EditorError
Rejected editor mutation.
Effect
Side effects requested by the pure reducer.
InputEvent
Bounded terminal input projected into the interactive application loop.
KeyMapError
Invalid or ambiguous key binding configuration.
LifecycleKind
Origin intrinsic to lifecycle activity.
LifecycleStatus
Observable lifecycle state used to choose markers and action emphasis.
MessageAuthor
Author intrinsic to a message payload.
MessageCellFacet
Identity facet for one canonical message block.
NoticeKind
Origin intrinsic to a notice payload.
NoticeSeverity
Severity for a typed notice surface.
OutputFormat
Source format owned by a typed timeline body.
Overlay
The one top-priority local interaction view currently visible above composer input.
PlanStepStatus
Protocol-ready status for one plan step.
QueuedInputKind
Semantic type for one queued input preview.
SelectorError
Invalid selector construction.
SelectorValue
Typed value returned by a local selector.
SlashCommand
Parsed interactive slash command.
StreamCellFacet
Identity facet for active message streaming.
TerminalMode
Every terminal feature managed by the canonical mode ledger.
TimelineDetailKind
Semantic treatment for one structured detail row.
ToolCellFacet
Identity facet for one tool call.
ViewportMode
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.
EffectExecutor
Async boundary used by the bounded application loop.
FrameSink
Synchronous frame boundary injected into the asynchronous application loop.
TerminalDriver
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.