Expand description
/tui/* external-controller group (PLAN §17; freeze parity probed live
2026-10-08 against upstream 1.18.31).
Semantics (v1 groups/tui.ts + handlers/tui.ts): every endpoint publishes
onto the global event stream and returns true; the attached TUI
(packages/tui/src/app.tsx:987) consumes tui.command.execute,
tui.toast.show, tui.session.select, tui.prompt.append and acts.
Primary external caller: the VS Code extension’s /tui/append-prompt.
Faithful quirks kept: open-themes publishes session.list (upstream
bug, replicated); unknown execute-command values publish an event whose
properties omit command (JS undefined drops from JSON); toast
duration defaults to 5000.
Control rendezvous (/tui/control/next GET long-poll + /response POST)
is the queue pair from v1 shared/tui-control.ts. No production caller
exists in-tree (test harness only); implemented with bounded channels so
a client disconnect releases the waiter.
Structs§
Functions§
- append_
prompt - bad_
request_ payload - Effect payload-decode envelope (probed live:
/tui/select-sessionwith a non-sesid returns this shape). - clear_
prompt - control_
next - control_
response - execute_
command - open_
help - open_
models - open_
sessions - open_
themes - Upstream quirk, replicated deliberately (handlers/tui.ts:51-54):
open-themes publishes
session.list. - publish_
event - Union dispatch (v1 handlers/tui.ts:86-96): unknown types answer
truewithout publishing. - select_
session - show_
toast - submit_
prompt