ensureLocalServer() probes the origin named by the runtime file; if
nothing answers (and T3TUI_SERVER/T3TUI_TOKEN are unset) it spawns
`t3 serve` detached in its own process group, waits for the runtime
file to come up, and returns a handle whose stop() SIGTERMs the whole
group (SIGKILL after a grace period). Wired into the UI's destroy
handler, `list` and `tmux`, with a process exit hook as backstop. The
server's output goes to ~/.config/t3tui/server.log so it can't corrupt
the TUI screen. An existing, answering server is always used as-is.
Tests cover spawn+stop, existing-server reuse, and the no-spawn env
overrides, using a fake t3 binary.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
nixpkgs has no t3code package and the npm `t3` package is only a
downloader, so fetch the official GitHub release tarball for
v0.1.12-nightly.20261123.5165 (4 commits ahead of the vendor pin) and
wrap it as packages.t3 / a devShell binary. The Node SEA binary is left
unstripped and unpatched (patchelf/strip corrupt its embedded resource);
only native .node modules get an rpath to nix libraries.
Verified: `t3 serve` runs headless and writes the server-runtime.json
that t3tui discovers. `t3 --version` and `t3 serve --help` work through
`nix develop`.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- vendor/t3code submodule pinned to 42c9107983; deps in package.json
aligned with the upstream catalog, including upstream's effect@4.1.5
patch via patchedDependencies (patches/effect@4.1.5.patch)
- nix flake.nix devShell provides bun locally (no guix home install)
- scripts/link-vendor.ts now copies the vendored packages into
node_modules/@t3tools and applies tscPatches for the spots where
classic tsc can't infer what upstream's Effect language service can,
so `bun run typecheck` runs clean under full strict mode
- protocol drift fixes across model/ui/client: usage-limit copy, context
window snapshot, checkpoint totals, turn diff summaries, alert
observation, "once" schedules, composer trigger kinds, PR keying,
thread menu state, secret request answers, terminal summaries,
snapshot-required shell events, revert checkpoint lookup
- new parity features over the typed RPC: fork a turn into a new thread,
rewind a message with its attachments restored to the composer, guest
share links and turn-into-project in the thread menu
- tests updated and added (301 pass); typecheck, lint and build clean
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Build a windows-x64 binary and add install.ps1. The editor, browser links, paths, clipboard images and t3tui upgrade all learn Windows' way of doing things; t3tui tmux says it needs WSL.
Clipboard images come through OpenTUI's clipboard service, with wl-paste, xclip,
pngpaste and osascript behind it for any image type. ctrl+v or an empty bracketed
paste attaches the image; a pasted image path attaches the file. Over SSH it points
at a instead. User messages draw their image attachments with <image>.
ctrl+j opens the thread's T3 terminal in an embedded terminal that takes
the details column's place (or the conversation's on narrow terminals);
ctrl+g writes the message there and o on a changed file edits it. While
the pane has focus every key but ctrl+\ goes to its program. Full-screen
attach stays in the T picker and the palette.
Installing meant Bun, a clone with the T3 Code submodule and a build. Now
a tag builds a binary per platform with bun build --compile, carrying
Bun's runtime and OpenTUI's native library, and publishes them as a
GitHub Release after opening each one's dashboard on its own OS.
install.sh picks the right binary and checks it against SHA256SUMS;
`t3tui upgrade` replaces an installed binary with the latest release and
`t3tui version` prints the version. `t3tui tmux` started its windows as
`bun <file>`, which a compiled binary can't do, so it now runs itself.
The command, package, env vars (T3TUI_*), config folder, tmux session and
the session label it issues itself. An existing ~/.config/tui3 moves to
~/.config/t3tui on the first run.
Running the TypeScript sources makes Bun compile and keep hundreds of
vendored modules, which cost 110-130 MB at startup. scripts/build.ts
bundles bin.ts and OpenTUI's syntax-highlighting worker into dist/;
bun install builds it, bun run build rebuilds it, and the tui3 bin runs
it. bun run dev still runs the sources.
Drag to select copies on release. Request cards, the queue, attachments,
the PR view and the key hints get clickable buttons. Prompts, folds,
commands and diff files respond to clicks; prompts, replies, commands and
the PR view get right-click menus. Clicking a pane focuses it, the wheel
scrolls the thread list and palette, rows highlight under the pointer, and
the thread list's border drags to resize.
The composer's # suggests pull requests in the thread's repository
(recent list plus the exact number typed, linked ones first) and sends
the web's pull request reference record with the message.
P shows a linked pull request (picker first when several): state,
author, branches, description, checks, reviews, comments, commits and
the review guide. o opens it, r refreshes from the host, c comments
and R reviews in $EDITOR, a runs the host's actions behind a confirm,
w watches, u unlinks. The palette links a pull request by URL or
number and checks one out into a new draft thread.
Attachments upload like the web composer's (signed URL, then bytes) and ride on the next message or a draft's first message; pending names show above the composer and removal deletes the unsent upload. Settings shows provider limit windows, banked reset credits and the last 30 days' usage summary, with a status-line note near a limit and a confirmed reset-credit command. Automations can be created and edited in $EDITOR from a template parsed back against the web form's rules, and deleted behind a confirm. Asks for the diagnostics:read and providers:manage scopes the new RPCs need.
Queued messages show above the composer (Q to go through them: send now,
edit in the composer, remove; alt+up edits the last). An empty enter after
an interrupt continues where the run left off and releases held messages.
Secret requests get a masked field that never touches the message box.
Running subagents the web can stop get a palette command. Adds the
diagnostics:read and providers:manage scopes for usage limits.
- . or a right-click opens T3's thread menu, built by the web's buildThreadActionMenuItems
- Settle, pin, snooze (server presets or a typed time), rename, regenerate title, mark unread,
auto-settle, copy path/branch/thread/ID, archive, delete (confirmed), new thread on branch
- Submenus open as pickers; their items are searchable from the top
- Copy via OSC 52 plus the local clipboard tool
- Palette group keys no longer collide for untitled groups
- / offers /model, provider commands (at the message start) and skills; $ offers skills
- @ offers threads and the server's file search; thread mentions ride on the message's context
- Ranking, insertion and trigger detection follow T3's web composer and shared helpers
- The box measures wrapped lines after a programmatic insert
- c starts a draft thread (project, model, mode, worktree) launched with orchestration.launchThread
- m picks model, provider options and access mode from the server's providers, following the web's provider lock; model changes ride on the next message
- Alerts port T3's notification gate: bell, OSC 9/99 desktop notifications when unfocused, in-app flash
- ctrl+g edits the message in $EDITOR; ctrl+j attaches to the thread's T3 terminal
- Credential gains terminal:read
- tui3's own settings in ~/.config/tui3/config.json, under the web app's
names and defaults: followUpBehavior, sendShortcut, timestampFormat,
diffIgnoreWhitespace. A settings view (from the palette) cycles them and
shows the relevant server settings read-only.
- Subscribe to the server config; when it advertises shellThreadFamilies,
fetch an idle subagent's family so it gets full details and lineage.
- Details rows are actionable: view the working-tree diff (whole or per
file), run the web app's git quick action or menu after a confirmation,
stop a local server, run or toggle an automation, open lineage threads.
- Command palette (ctrl+k or :) searching commands and threads with T3's
own scoring.
- Subagent work entries link to their child threads; u goes to the parent.
- Threads open scrolled to the bottom.
- Mouse: thread rows, collapsed sections, details rows, palette, composer.
- The / filter opens in the thread list.
- Multi-line composer: shift+enter, ctrl+j, or a trailing backslash; it
grows to 8 lines.
- The credential asks for filesystem:read, source-control:write and
terminal:operate, and is reissued when a stored one lacks them.
A right-hand column like the web's thread details card: workspace,
model and mode, branch with ahead/behind and its PR, uncommitted
changes from the server's git status stream, lineage, background work
and the goal. Opens on wide terminals; d toggles it.
Reuse the web app's timeline derivation (turn folds, work groups, live
work), its sidebar sections and status words, steer-by-default sending,
the question panel, decline-with-feedback, and visit/read marking.
- Track selection by thread id and sort active threads by run start, so
reordering no longer resubscribes and reloads the open thread
- Cache blocks per turn item, reuse unchanged segments, memoize views,
and batch streamed updates to one redraw per frame
- Keep left threads subscribed for a minute so switching back is instant
- Fold runs of tool calls and reasoning into one summary line; clip long
user messages; e expands both
- Always-visible multi-line composer with per-thread drafts and
typing/navigation modes