Skip to content

Commit fb5ca70

Browse files
committed
Merge remote-tracking branch 'github/main' into fix/preview-about-blank
2 parents 6d4fe05 + 71646e0 commit fb5ca70

99 files changed

Lines changed: 7606 additions & 312 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# T3 Code
22

3-
T3 Code is a minimal GUI for coding agents. A Node WebSocket server wraps provider CLIs and agents (Codex, Claude Code, Cursor, Grok, OpenCode, Antigravity) and serves web, desktop, and mobile clients.
3+
T3 Code is a minimal GUI for coding agents. A Node WebSocket server wraps provider CLIs and agents (Codex, Claude Code, Cursor, Grok, OpenCode, Antigravity, Kiro) and serves web, desktop, and mobile clients.
44

55
You can think of T3 Code as an open source "bring-your-own-subscription" alternative to apps like Claude Desktop, Codex App, Cursor Glass and Conductor.
66

@@ -68,7 +68,7 @@ The most common defect in this repo is a change that works on the path you teste
6868

6969
- **Entry points.** A behavior reachable from the chat view is usually also reachable from Settings, the command palette, and a keybinding. Fixing one is not fixing the feature.
7070
- **Clients.** Web, desktop (wraps web, adds Electron shell/IPC), and mobile (React Native, separate navigation). Shared logic lives in `packages/client-runtime`
71-
- **Providers.** Codex, Claude, Cursor, Grok, OpenCode, and Antigravity each have an adapter. Provider-shaped features need a decision per adapter, even if the decision is "not supported here".
71+
- **Providers.** Codex, Claude, Cursor, Grok, OpenCode, Antigravity, and Kiro each have an adapter. Provider-shaped features need a decision per adapter, even if the decision is "not supported here".
7272
- **Agents.** A capability a user can trigger is usually one an agent should reach through MCP tools, and scheduled tasks run the same paths. That only works when it is a service method, not handler code.
7373
- **Contracts.** Anything crossing the wire is typed in `packages/contracts`. Change the schema and the server, web, mobile, and desktop all follow.
7474
- **Reverse states.** If you added a way in, add the way out and the way to see it. Snooze needs unsnooze. Close needs reopen. A one-way door is a bug.

‎apps/server/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"record:pi-replay": "node scripts/record-pi-rpc-replay-fixture.ts",
2929
"record:grok-replay": "node scripts/record-grok-acp-replay-fixture.ts",
3030
"record:fx-replay": "node scripts/record-fx-acp-replay-fixture.ts",
31+
"record:kiro-replay": "node scripts/record-kiro-acp-replay-fixture.ts",
3132
"record:muse-replay": "node scripts/record-muse-msp-replay-fixture.ts",
3233
"generate": "graphqlgen",
3334
"generate:expo-schema": "node scripts/fetch-expo-schema.ts"
@@ -46,6 +47,7 @@
4647
"@t3tools/provider-cursor": "workspace:*",
4748
"@t3tools/provider-fx": "workspace:*",
4849
"@t3tools/provider-grok": "workspace:*",
50+
"@t3tools/provider-kiro": "workspace:*",
4951
"@t3tools/provider-muse": "workspace:*",
5052
"@t3tools/provider-opencode": "workspace:*",
5153
"@t3tools/provider-pi": "workspace:*",

‎apps/server/scripts/acp-replay-agent.ts‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,27 @@ const transcript = JSON.parse(
5050
? Buffer.from(encodedTranscript ?? "", "base64").toString("utf8")
5151
: NodeFS.readFileSync(transcriptPath, "utf8"),
5252
) as ReplayTranscript;
53-
let cursor = 0;
53+
/**
54+
* A recording can span processes: a `runtime_exit` mid-transcript marks where
55+
* one agent process ended, and a respawned replay agent continues from the
56+
* cursor the previous one left in the status file.
57+
*/
58+
function resumedCursor(): number {
59+
try {
60+
const previous = JSON.parse(NodeFS.readFileSync(statusPath ?? "", "utf8")) as {
61+
readonly cursor?: unknown;
62+
readonly failure?: unknown;
63+
};
64+
const resumeAt = typeof previous.cursor === "number" ? previous.cursor : 0;
65+
return previous.failure === undefined &&
66+
transcript.entries[resumeAt - 1]?.type === "runtime_exit"
67+
? resumeAt
68+
: 0;
69+
} catch {
70+
return 0;
71+
}
72+
}
73+
let cursor = resumedCursor();
5474
let stopped = false;
5575
let nextAgentRequestId = 1;
5676
const pendingClientRequestIds = new Map<string, string | number>();
@@ -232,6 +252,8 @@ function flushInbound(): void {
232252
break;
233253
}
234254
cursor += 1;
255+
// Frames after a mid-transcript exit belong to the next process.
256+
if (cursor < transcript.entries.length) break;
235257
continue;
236258
}
237259
const frame = entry.frame as LogicalFrame;
@@ -294,7 +316,8 @@ input.on("line", (line) => {
294316
});
295317

296318
input.on("close", () => {
297-
if (!stopped && cursor !== transcript.entries.length) {
319+
const processEnded = transcript.entries[cursor - 1]?.type === "runtime_exit";
320+
if (!stopped && cursor !== transcript.entries.length && !processEnded) {
298321
stopWithFailure("ACP replay input closed before transcript completion");
299322
}
300323
});

0 commit comments

Comments
 (0)