Commit Graph
3 Commits
Author SHA1 Message Date
venomade 5ebff7b68d Start t3 serve from t3tui when no local server is up, stop it on quit
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>
2026-11-24 01:29:13 +00:00
venomade 6a7b9d26a0 Package the headless T3 Code server CLI (t3) in the flake
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>
2026-11-24 01:14:30 +00:00
venomade b40f09e56f Bump vendored T3 Code to 42c9107983 (v0.1.12-nightly) and catch up
- 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>
2026-11-24 00:52:30 +00:00