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>
This commit is contained in:
venomade committed 2026-11-24 00:52:30 +00:00
1 parent 3a93c35c41
commit b40f09e56f
38 files changed
+4786 -63

No files matched your search

+17 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test";
import { OrchestrationV2Command, ThreadId, type OrchestrationV2ShellSnapshot, type OrchestrationV2ThreadShell, type ServerConfig } from "@t3tools/contracts";
import { OrchestrationV2Command, RunId, ThreadId, type OrchestrationProjectShell, type OrchestrationV2ShellSnapshot, type OrchestrationV2ThreadShell, type ServerConfig } from "@t3tools/contracts";
import * as DateTime from "effect/DateTime";
import * as Schema from "effect/Schema";
@@ -99,6 +99,7 @@ describe("thread menu", () => {
await session.reorderThread(id, "pinned", "m");
await session.reorderThread(id, "active", "t");
await session.deleteThread(id, false);
await session.forkThread({ sourceThreadId: id, runId: RunId.make("run-1"), title: "Thread fork" });
expect(sent.filter((command) => !Schema.is(OrchestrationV2Command)(command))).toEqual([]);
expect(sent.map((command) => (command as { type: string }).type)).toEqual([
"thread.settle",
@@ -116,6 +117,21 @@ describe("thread menu", () => {
"thread.pin.reorder",
"thread.active.reorder",
"thread.delete",
"thread.fork",
]);
});
test("guest sharing shows only when the server's Labs beta is on", () => {
const guestConfig = { ...config, settings: { guestSharingEnabled: true } } as unknown as ServerConfig;
expect(ids(threadMenu({ thread, config: guestConfig, timestampFormat: "24-hour" }).items)).toContain("share-guest");
expect(ids(threadMenu({ thread, config, timestampFormat: "24-hour" }).items)).not.toContain("share-guest");
});
test("a scratch thread with its own folder can turn into a project when the server allows it", () => {
const scratch = { ...thread, worktreePath: "/tmp/scratch" } as unknown as OrchestrationV2ThreadShell;
const capConfig = { ...config, scratchWorkspaceRoot: "/tmp/scratch", environment: { environmentId: "env-1", capabilities: { threadProjectFromScratch: true } } } as unknown as ServerConfig;
const projects = [{ id: "p1", workspaceRoot: "/tmp/scratch" }] as unknown as OrchestrationProjectShell[];
expect(ids(threadMenu({ thread: scratch, config: capConfig, timestampFormat: "24-hour", projects }).items)).toContain("turn-into-project");
expect(ids(threadMenu({ thread, config, timestampFormat: "24-hour", projects }).items)).not.toContain("turn-into-project");
});
});