opencode-rs mini runs in a split footer and writes the session's transcript to the scrollback above it: the flags, piped stdin, session resolution behind the first frame, replay on resume and resize with --replay-limit, the theme quantized to the palette and mono output, SIGUSR2 theme reload, OPENCODE_SHOW_TTFD and OPENCODE_DIRECT_TRACE. The prompt, request footers, and tool output are stubs for M.2 to M.4. P-PTY scenarios in parity/scenarios/M.1 match the TS mini.
Mini writes its transcript into the terminal's scrollback, which the embedded terminal's screen() does not show. A checkpoint can now also record rows scrolled back above the screen, and a step can resize the pseudo-terminal and the emulator.
The TUI /stats poster had its own activityCalendar port and time zone
lookup. Move C.3's activity_calendar and time_zone, with the TS oracle
test, to opencode-ui and use them in both. Number formatting stays
apart: TS uses formatNumber in the CLI and statsNumber in the TUI.
Capture stderr while the full-screen TUI runs. Records go to the
console and reach the real stderr once the terminal is restored. TS
draws them over the screen; see parity/deviations/G02-print-logs-tui.md.
Every CLI step is merged, so drop the kit-wide dead_code allowance and
the builder options nothing calls: output on confirm, text, select,
multiselect, password and spinner; the spinner timer and messages;
password mask; multiselect max_items and cursor_at; autocomplete
placeholder and initial values. Options only the prompt demo uses keep
an item-level allowance. signals::on_shutdown had no allowance left.
The TUI /pair dialog drew its code with the qrcode crate, which picks
other masks than packages/util/src/qr.ts. Move the C.9 port to
opencode-ui so both use it, and drop the qrcode dependency.
permission, elicitation, config-option, replay, compaction,
additional-directories, and catalog, plus the location, diff, compaction,
replay, and permission-title cases C.11 left out of its ported files.
Tool calls carry locations, read display text, and images. Permission asks get
the TS titles, previews, and locations, and completed edits get full-file diffs
(ports of the patch format and jsdiff's apply). Question forms go out as
elicitations, session/load replays history, and compactions report standard
updates or markers. acp --login runs auth login in-process.
The TUI and UI integration tests moved under tests/all; comments and
step docs name the new paths, and docs/H.2.md and AGENTS.md give the
--test all commands.
pty::connect built the socket URL from the client's base URL, so after
the service restarted on a new port the ticket request followed it but
the socket went to the old port. Transport::route maps a URL to where a
request would go now; the following transport points it at the current
service, as the TS TUI rebuilds persistentPty with the new URL.
split-debuginfo = "unpacked" and line tables only for dependencies cut
the TUI test link from 2.3 GB to 1.05 GB peak RSS and 0.8 s to 0.4 s.
Backtraces still show file and line.
Each tests/*.rs file linked its own binary with the static opentui and
tree-sitter set, about 2 GB per link. tests/all/main.rs now declares the
former files as modules, so a suite run links once per crate, and the
shared helpers compile once under support.
opentui-rust's keymap now undoes a registration when its Disposer drops
(G.13). The install functions that dropped their layer handles forget()
them, so those layers stay for the keymap's lifetime. Views drop their
handles instead of calling dispose(), and the comments that said a
dropped Disposer keeps its layer are gone. Views still defer their
release past the current event, because a command may drop its own view.
Needs opentui-rust keymap-disposer, which adds Disposer::forget.
Port Effect CLI's wizard: it asks for the selected command's flags and arguments,
or for a subcommand, with Effect's select, confirm, toggle, integer, and text prompts,
prints the command line, and runs it after a confirmation by running the binary
again with it. Required arguments are not checked next to --wizard, so it can ask
for them. The prompts share the Clack kit's raw mode and key decoding.
TS keeps the last good diagram whether or not the fence has closed (markdown.ts has no such check), so the renderer itself does not read CodeBlock::closed.
Port StaticDiagramRenderable's left-drag scrolling and horizontal-wheel capture, record the layout dead ends that show the code as a deviation, and bring the design note up to date.
Port merman's state parser, layout, note placement, routing and drawing, with the spatial index they share. Measure text with string-width's wide set, so emoji arrows such as the fold check's count two cells as in TS. All 496 cases of the P-ORACLE corpus now match. Also applies cargo fmt to the crate.
P-COMP of TextPart's Markdown with a flowchart and a sequence fence matches every cell. The diagram drops TS's top margin, which the Rust Markdown widget already puts between blocks, and keeps TS's white default fg. A unit test covers the streaming fallbacks.
Port the three small merman diagram kinds with the plugin's default options; every gantt, gitgraph and timeline case of the TS tests matches the P-ORACLE fixture. State diagrams come next.
Port merman's core grid, parser, layout, routing and drawing for flowcharts, register opencode.merman as a code-block renderer, and prove all 222 flowchart cases of the TS tests equal through a P-ORACLE fixture.
Port the TS merman parser, layout and drawing: no Rust Mermaid crate draws cells close to TS, and the streaming fallback needs TS's line-numbered syntax errors.
opentui-rust CodeBlock now says whether the closing fence arrived. The LaTeX renderer keeps its last formula only while the fence is open, as TS does, so broken math in a closed fence shows its source before the message completes. Removes F13-latex-closed-fence.
opentui-rust scroll boxes now take their height from their content as Core does, so the error details and highlights dialogs use maxHeight with a zero content minimum height, as TS does, instead of counting wrapped lines. The height now follows a resize. DLG11 drops the part that came from the old layout.
The backdrop asked for selected text on press, which a drag has none of yet, so a drag that started on dialog text closed the dialog on release. It now also asks opentui-rust whether a selection drag is under way, as TS asks getSelection(). The link test now proves that a plain click opens a link: headless frames keep hyperlink ids.
Ports packages/cli/src/acp: JSON-RPC over stdio, sessions, catalog, prompt turns, content translation, and the private standalone server. Config options and directories are filled; tools, permission, elicitation, replay, compaction, and login are signatures with simple bodies for C.12.
The session route now reads its children as TS does, so terminal.rs and
root.rs route GET /api/session. Down past the newest history entry opens
the composer, and a child session's composer leaves leader keys out, as in
TS, so prompt.rs and actions.rs no longer rely on either.
TestApp tests for the client-mcp experiment and both tools, interrupting a
subagent, picking a terminal, and the shell output text. A key that opens
or closes the composer now syncs the session view, so the queued dock
hides under it.
The composer replaces the prompt with the Subagents, Shell, and Terminals
tabs: session.child.first opens it, terminal.select opens the terminal
list, and a child session shows it instead of a prompt. The Shell tab
opens the shell output dialog. With the client-mcp experiment on, the TUI
serves open_terminal and write_terminal over the client MCP socket.
The session route now reads its children, as TS does, and the queued dock
hides while the composer shows. P-APP E.13b/composer compares the tabs,
the dialog, the child session, and the kill request with TS.
A port of packages/client/src/mcp.ts: the client answers MCP JSON-RPC
over /api/experimental/client-mcp and reconnects with backoff until the
connection closes. The tests port packages/client/test/mcp.test.ts.
main.rs now registers the prompt kit's restore step, so pair drops its
own. Also apply clippy and rustfmt to the C.8 and C.9 files, and name the
command when the service test cannot spawn opencode-rs.
Run opencode-rs against a fake TS binary and service for stop, restart,
set and pair --remote, and against the TS CLI from source in an isolated
sandbox for start, stop, restart and set in both directions.
Port the seven service subcommands and pair: stop and restart shut the
persistent terminals down first, set remote true and pair --remote turn
remote access on through the TS command, and pair prints its QR code with a
port of the TS encoder. P-CLI and P-PTY scenarios compare both clients; the
runners gain a setup hook that writes files into the sandbox.
opencode.latex replaces its empty built-in: a sideways-scrolling formula in the theme text colors, the source when the math does not parse, and the last formula that parsed while a fence streams. P-COMP fixtures of the TS renderer in the transcript Markdown match every cell; the remaining differences are under parity/deviations/F13-latex-*. The stop case needs opentui-rust rs-plugin-latex.
pulldown-latex fails on \left(A\rightarrow B\right), \displaylines, and \cfrac[l], so the crate ports the TS parser, layout, and tables (docs/P.2.md). A P-ORACLE over 207 sources from packages/latex tests matches TS exactly.
auth and mcp use the remaining prompts, so the kit drops its
unused_imports allowance and the builder type re-exports nobody names.
dead_code stays for the options C.8, C.9 and C.15 may need; the demo
binary allows its own unused imports.