Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
3b3255c
fix(server): queued messages stay visible when a restart cancels thei…
juliusmarminge Nov 23, 2026
9cf81e2
fix(desktop): annotation Select picks elements inside open shadow roo…
fixfon Nov 23, 2026
65cd644
fix(web): archive folders with leading or repeated slashes show their…
only21mil Nov 23, 2026
fcdaef8
fix(server): provider updates keep running when the client disconnect…
juliusmarminge Nov 23, 2026
e20e769
fix(server): reject workflow signals with conflicting destinations (#…
only21mil Nov 23, 2026
37b316a
fix(desktop): declare Apple Events access for Computer Use cleanup (#…
loia5tqd001 Nov 23, 2026
f02a14e
fix(server): settling no longer ends background work the agent is wai…
Kazuya-Hibara Nov 23, 2026
8c5bd6f
fix(server): CLI single-executable builds again after MCP webhooks (#…
juliusmarminge Nov 23, 2026
f0d160f
fix(server): preserve spaces in workflow store keys and prefixes (#41…
only21mil Nov 23, 2026
f4c38ca
fix(web): remote open uses the environment's saved SSH route (#27236)
juliusmarminge Nov 23, 2026
43d9d67
fix(web): an IME Escape no longer clears a typed font family (#32768)
heki1224 Nov 23, 2026
face82e
fix(web): caret lands after closing Markdown markers after a paste (#…
juliusmarminge Nov 23, 2026
3389253
feat(skills): launch videos can stage file edits, commits and MCP sig…
juliusmarminge Nov 23, 2026
e688cf1
perf(server): the full thread snapshot is streamed in bounded chunks …
navidnadali Nov 23, 2026
8851fb7
fix(server): a reconnect burst checks a watched project's branch once…
juliusmarminge Nov 23, 2026
69f1d31
fix(server): follow replacements along linked theme paths (#41325)
StiensWout Nov 23, 2026
2a79803
fix(shared): search cwd for empty POSIX PATH components (#28106)
Motaghi Nov 23, 2026
76de50b
fix(server): repository lookup shows why a repository was not found (…
bmmmm Nov 23, 2026
780db26
docs: prune internal and operations docs and enforce them in review (…
juliusmarminge Nov 23, 2026
f99808e
test(server): remove the flaky workflow store case (#41344)
juliusmarminge Nov 23, 2026
2de6287
fix(server): RTF attachments that declare code page 0 or 866 reach th…
only21mil Nov 23, 2026
7180578
fix(desktop): macOS SnapShot skips the window-sharing indicator (#41334)
juliusmarminge Nov 23, 2026
1368854
fix(desktop): capture the whole oversized preview viewport (#36286)
shantanuojha Nov 23, 2026
d63b9c4
fix(web): retry a failed port-forward locality probe (#41353)
juliusmarminge Nov 23, 2026
f9f34aa
fix(web): start without WebAssembly by initialising Words in a guard …
juliusmarminge Nov 23, 2026
2936aa4
feat(scripts): server metrics read event-loop delay and GC in every w…
juliusmarminge Nov 23, 2026
d4976b0
feat(scripts): server metrics measure a busy server on a copy of real…
juliusmarminge Nov 23, 2026
87b2226
feat(scripts): server metrics attach real clients and time a reconnec…
juliusmarminge Nov 23, 2026
910ea8a
feat(scripts): server metrics time the turn pipeline and opening a la…
juliusmarminge Nov 23, 2026
977b7c7
perf(server): SQL transactions stop copying every service twice (#41379)
juliusmarminge Nov 23, 2026
1e088be
fix(cli): environment link --from no longer ignores --url (#41375)
only21mil Nov 23, 2026
350b05a
fix(server): a Claude turn no longer ignores messages added to its se…
matthewcosier Nov 23, 2026
f17114b
fix(server): projects behind a git insteadOf rewrite are recognized a…
Muzammil-Bit Nov 23, 2026
9219968
fix(web): hide Mark unread on threads with no completed run (#41365)
juliusmarminge Nov 23, 2026
fd44bde
fix(web): keep OpenDocument image descriptions in alt text (#41383)
geezoria Nov 23, 2026
2ee7a4f
fix(server): t3_thread_read returns the newest page to outside MCP cl…
mfazekas Nov 23, 2026
5b643a4
fix(server): pull request tools say when repository is not owner/repo…
iamshadmantaqi Nov 23, 2026
7d8a145
fix(server): storage cleanup retries and keeps reporting git metadata…
juliusmarminge Nov 23, 2026
302e94a
fix(desktop): ⇧⌘V (Paste as Text) pastes text in the composer on macO…
tiliakoos Nov 23, 2026
9292b03
perf(server): replay stored events about twice as fast (#26719)
hieu-lee Nov 23, 2026
0a0389e
fix(server): Codex async alerts keep their delivery marker in the thr…
juliusmarminge Nov 23, 2026
e0267fe
fix(desktop): recover frozen macOS backends on relaunch (#41401)
juliusmarminge Nov 23, 2026
e54ef0f
fix(cli): npx no longer skips the install offer for a directory or no…
only21mil Nov 23, 2026
5aa8fa0
fix(server): PR tools build URLs through the refined forge they are e…
juliusmarminge Nov 23, 2026
5e570ea
fix(desktop): a link opened while the macOS window is closed opens a …
Marve10s Nov 23, 2026
eeb1951
fix(server): slow provider batches stay whole while a write waits on …
juliusmarminge Nov 23, 2026
a1839ca
fix(server): agent browsers' DevTools ports no longer show as servers…
tiliakoos Nov 23, 2026
f274d47
fix(mobile): apply Android language changes immediately (#38982)
qi-hey Nov 23, 2026
7e624c0
fix(web): chat links open their menu from the keyboard on macOS (#37405)
Kenmege Nov 23, 2026
630de36
fix(server): report failed Finder reveals for missing files (#38748)
VinzentHubrich Nov 23, 2026
7474a28
fix(server): Word attachments leave hidden text out of what agents re…
only21mil Nov 23, 2026
5f506c4
fix(server): skip CodeRabbit review acknowledgement wakes (#32300)
voltcrash Nov 23, 2026
c768764
fix(cli): expand ~ in t3 environment link --from (#41430)
Marve10s Nov 23, 2026
27ecc0f
fix(cli): reject incomplete workflow signal addresses locally (#41431)
only21mil Nov 23, 2026
6ec46a6
fix(opencode): Usage → Limits no longer warns when no Console workspa…
nthewara Nov 23, 2026
0db39e6
fix(cli): uninstall removes a script launcher whose target names the …
only21mil Nov 23, 2026
3ab1ee2
fix(server): long setup scripts complete in macOS zsh (#37836)
sync Nov 23, 2026
c6fe23d
fix(server): preview type sends key events to the page (#41432)
juliusmarminge Nov 23, 2026
e6e863c
fix(shared): Open in Cursor skips a broken cursor on PATH (#38212)
N4M3Z Nov 23, 2026
5e12857
fix(cli): expand ~ in t3 policy templates --policy (#41438)
Marve10s Nov 23, 2026
4311566
fix(server): read relocated shared strings in XLSX attachments (#41441)
Lucenx9 Nov 23, 2026
2bc7878
fix(server): import Claude sessions whose first prompt carries a larg…
juliusmarminge Nov 23, 2026
d1a6c35
fix(server): keep PowerPoint slides with alternate relationship prefi…
Lucenx9 Nov 23, 2026
06f513d
fix(server): another agent's queued message no longer holds back an a…
juliusmarminge Nov 23, 2026
c977a70
feat(scripts): server metrics record machine load and derive noise fl…
juliusmarminge Nov 23, 2026
2041936
feat(scripts): server metrics measure many threads working at once wi…
juliusmarminge Nov 23, 2026
059d1bd
docs: point provider setup at ACP Registry agents like GitHub Copilot…
juliusmarminge Nov 23, 2026
8f724d6
fix: treat empty PATH entries as the working directory in launcher an…
Motaghi Nov 23, 2026
962bda2
test(web): open history documents without reloading the app in iframe…
juliusmarminge Nov 23, 2026
f1e3906
feat(scripts): server metrics reconnect a user's devices by default a…
juliusmarminge Nov 23, 2026
4280147
fix(cli): clarify provider-specific model option examples (#41484)
nettee Nov 23, 2026
36413ad
feat(scripts): server metrics get a --quick profile, one-line failure…
juliusmarminge Nov 23, 2026
1bc44f2
fix(server): analytics report every model name (#41237)
t3dotgg Nov 23, 2026
cee2ad3
Merge upstream main through 1bc44f2732ce
github-actions[bot] Nov 23, 2026
6be5502
fix(web): pass the fork's remote-open test through upstream's saved r…
github-actions[bot] Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .agents/skills/launch-video/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,25 @@ There are two ways to build one:
- Agent turns: pass `claude: [turns]` to `prepareHome` and the real Claude provider runs
`scripts/fake-claude.mjs` as its CLI, so the video shows Claude's logo, models, thinking
and tool rows. Each turn is `{ match, steps }`: `think`, `text`, `bash` (+ `output`, `ms`),
`wait`, and `tool` (+ `input`), which calls that T3 MCP tool for real, e.g.
`delegate_task`. Match generated titles with a `{ match: "title", repeat: true }` turn.
`<var:name>` is filled from the JSON file at `FAKE_CLAUDE_VARS`, for ids that change
every run. `fake-claude.log` in the home records the protocol, for debugging.
`wait`, `edit` (+ `old`, `new`) and `write` (+ `content`), which change the file for real
so diffs and checkpoints show them, and `tool` (+ `input`), which calls that T3 MCP tool
for real, e.g. `delegate_task`; with `server` and `output` it plays another MCP server's
tool instead. `<var:name>` is filled from the JSON file at `FAKE_CLAUDE_VARS`, for ids
that change every run. `bash` with `run: true` executes the command in the session's cwd
(to push a branch or open a pull request with a forge CLI); `as: "name"` keeps its output,
or the `pick` regex match in it, as `<var:name>` for the turn's later steps. A workflow
`agent` step with `returns` finishes on `submit: { ... }`, which hands it that value
through `t3_submit_output`. `fake-claude.log` in the home records the protocol, for debugging.
- Titles, commit messages and branch names come from `claude -p --json-schema`: answer them
with `{ match, json }` turns, where `match` is tested against the schema plus the prompt
(`'"title"'`, `'"subject"[\\s\\S]*products\\.ts'`). Unanswered ones fail in the app.
- An MCP server that needs a sign-in: pass `claude: { turns, servers: [{ name, authUrl }] }`.
The fake answers Claude's `mcp_status`, `mcp_authenticate` and `mcp_oauth_callback_url`,
and remembers the sign-in across processes like the real CLI.
- `createProject(env, title, files, { repos: ["api", "web"] })` makes a plain folder of
several repositories. Staged repos commit as a fictional author. Keep staging homes
outside this checkout (e.g. `<out>/home`): a project folder inside it shows this
checkout's branch.
- Data a real flow can't produce cheaply goes into the app's own stores, never into pixels.
`insertPeerLinks` writes link rows into a stopped server; `serveDescriptors` makes fake
machines answer the reachability probe. The client's saved environments and routes live
Expand Down Expand Up @@ -82,6 +97,11 @@ harness's task stop; it ends its servers' process groups.
only on tailnet names. `serve.mjs` links to this machine's tailnet DNS name.
- **Leaks.** Grep the beats for the real hostname, username and tailnet name before
rendering. `snapshot.mjs` drops hidden inputs' values (they hold local paths).
- **Timeline rows** (`[data-timeline-row-id]`) are placed by a transform; `rise`/`pop` on one
replaces it and the row vanishes. Animate an element inside the row.
- **The app's own animations** (a running tool's shine) are frozen into the beat and seeked
with the story, which can leave text invisible. Cancel them in `setup()`:
`iframe.contentDocument.getAnimations().forEach((a) => a.cancel())`.
- **Timing.** A replayed turn streams in real time (each frame delay caps at 2 s). Make a
recording long enough for the drive to catch the state you need, and freeze beats on a
timer when the UI summarises (a running command shows only "Running pnpm").
Expand Down
6 changes: 4 additions & 2 deletions .agents/skills/launch-video/assets/kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ window.Kit = (() => {
const visible = (target, from, to = Infinity, fade = 0) => {
const shown = from + fade;
const open = !Number.isFinite(to);
const end = open ? shown + 1 : to;
// A closed window stays shown through `to`: when the next beat starts exactly on a frame,
// its first keyframe is still 0 there, and both hiding would flash black.
const end = open ? shown + 1 : to + 0.002;
const keys = [
{ offset: 0, opacity: 0 },
{ offset: from / end, opacity: 0 },
Expand All @@ -169,7 +171,7 @@ window.Kit = (() => {
...(open
? [{ offset: 1, opacity: 1 }]
: [
{ offset: Math.max(shown, to - 0.001) / end, opacity: 1 },
{ offset: Math.max(shown, to) / end, opacity: 1 },
{ offset: 1, opacity: 0 },
]),
];
Expand Down
243 changes: 197 additions & 46 deletions .agents/skills/launch-video/scripts/fake-claude.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// A stand-in `claude` CLI for staged launch videos: T3's real Claude provider runs it, and it
// plays the scripted turns in FAKE_CLAUDE_SCRIPT over the Agent SDK's stream-json protocol.
// Script format: see the launch-video SKILL.md. FAKE_CLAUDE_LOG records every line.
import * as NodeChildProcess from "node:child_process";
import * as NodeCrypto from "node:crypto";
import * as NodeFS from "node:fs";
import * as NodePath from "node:path";
import * as NodeReadline from "node:readline";

const VERSION = "2.1.329";
Expand All @@ -28,10 +30,22 @@ const readJson = (file, fallback) => {
return fallback;
}
};
const script = readJson(process.env.FAKE_CLAUDE_SCRIPT ?? "", []);
// An array of turns, or { turns, servers } where servers are MCP servers that need a sign-in:
// [{ name, authUrl }]. Sign-in follows the SDK's mcp_authenticate / mcp_oauth_callback_url.
const loaded = readJson(process.env.FAKE_CLAUDE_SCRIPT ?? "", []);
const script = Array.isArray(loaded) ? loaded : (loaded.turns ?? []);
// Sign-ins outlive the process, like the real CLI's stored credentials.
const signedInFile = `${process.env.FAKE_CLAUDE_SCRIPT}.signed-in.json`;
const signedIn = new Set(readJson(signedInFile, []));
const signInServers = new Map(
(Array.isArray(loaded) ? [] : (loaded.servers ?? [])).map((server) => [
server.name,
{ ...server, status: signedIn.has(server.name) ? "connected" : "needs-auth" },
]),
);
const played = new Set();
const fill = (value) => {
const vars = readJson(process.env.FAKE_CLAUDE_VARS ?? "", {});
const fill = (value, local = {}) => {
const vars = { ...readJson(process.env.FAKE_CLAUDE_VARS ?? "", {}), ...local };
const walk = (v) =>
typeof v === "string"
? v.replace(/<var:([\w-]+)>/g, (m, name) => vars[name] ?? m)
Expand All @@ -47,6 +61,33 @@ const argValue = (name) => {
const i = process.argv.indexOf(name);
return i === -1 ? undefined : process.argv[i + 1];
};

// `-p --json-schema` is T3's text generation (titles, commit messages, branch names). It answers
// with the first `{ match, json }` turn whose regex matches the schema plus the prompt.
if (process.argv.includes("-p")) {
const schema = argValue("--json-schema") ?? "";
let prompt = "";
for await (const chunk of process.stdin) prompt += chunk;
log("print", { schema, prompt: prompt.slice(0, 2000) });
const turn = script.find(
(t) => t.json && new RegExp(t.match ?? "", "i").test(`${schema}\n${prompt}`),
);
if (!turn) {
console.error(`fake-claude: no json turn matches ${schema}`);
process.exit(1);
}
console.log(
JSON.stringify({
type: "result",
subtype: "success",
is_error: false,
result: "",
structured_output: fill(turn.json),
session_id: NodeCrypto.randomUUID(),
}),
);
process.exit(0);
}
const sessionId = argValue("--session-id") ?? argValue("--resume") ?? NodeCrypto.randomUUID();
let model = argValue("--model") ?? "claude-opus-5-5";
const cwd = process.cwd();
Expand Down Expand Up @@ -82,12 +123,12 @@ const assistant = (content, id = `msg_${uuid().replaceAll("-", "").slice(0, 24)}
session_id: sessionId,
uuid: uuid(),
});
const toolResult = (toolUseId, content, extra = {}) =>
const toolResult = (toolUseId, content, extra = {}, isError = false) =>
send({
type: "user",
message: {
role: "user",
content: [{ tool_use_id: toolUseId, type: "tool_result", content, is_error: false }],
content: [{ tool_use_id: toolUseId, type: "tool_result", content, is_error: isError }],
},
parent_tool_use_id: null,
session_id: sessionId,
Expand Down Expand Up @@ -164,6 +205,11 @@ const streamText = async (text, type = "text") => {
});
};

const serverStatuses = () => [
...Object.keys(mcpServers).map((name) => ({ name, status: "connected", scope: "dynamic" })),
...[...signInServers.values()].map(({ name, status }) => ({ name, status, scope: "user" })),
];

// One MCP tools/call over streamable HTTP against the server T3 registered.
async function callTool(name, args) {
const [serverName, server] = Object.entries(mcpServers).find(([, s]) => s.url) ?? [];
Expand Down Expand Up @@ -205,9 +251,11 @@ async function callTool(name, args) {

async function playTurn(prompt) {
let index = script.findIndex(
(turn, i) => !played.has(i) && turn.match && new RegExp(turn.match, "i").test(prompt),
(turn, i) =>
!played.has(i) && !turn.json && turn.match && new RegExp(turn.match, "i").test(prompt),
);
if (index === -1) index = script.findIndex((turn, i) => !played.has(i) && !turn.match);
if (index === -1)
index = script.findIndex((turn, i) => !played.has(i) && !turn.json && !turn.match);
const turn = index === -1 ? { steps: [{ text: "Done." }] } : script[index];
if (index !== -1 && !turn.repeat) played.add(index);
send({
Expand All @@ -217,7 +265,7 @@ async function playTurn(prompt) {
claude_code_version: VERSION,
cwd,
tools: ["Bash", "Read", "Edit"],
mcp_servers: Object.keys(mcpServers).map((name) => ({ name, status: "connected" })),
mcp_servers: serverStatuses().map(({ name, status }) => ({ name, status })),
model,
permissionMode: "bypassPermissions",
slash_commands: [],
Expand All @@ -229,44 +277,121 @@ async function playTurn(prompt) {
session_id: sessionId,
});
let last = "";
for (const step of fill(turn.steps)) {
if (step.wait) await sleep(step.wait);
if (step.think) await streamText(step.think, "thinking");
if (step.text) {
await streamText(step.text);
last = step.text;
}
if (step.bash) {
const id = `toolu_${uuid().replaceAll("-", "").slice(0, 24)}`;
assistant([
{
// `as` keeps a step's real output for later steps of the turn, as <var:name>.
const local = {};
// The tool call awaiting its result, so a failing step can still answer it.
let pending;
const toolUse = (block) => {
pending = block.id;
assistant([block]);
};
const answer = (...args) => {
toolResult(...args);
pending = undefined;
};
try {
for (const raw of turn.steps) {
const filled = fill(raw, local);
// `submit` hands a workflow agent step its typed result through T3's own MCP.
const step = filled.submit
? { ...filled, tool: "t3_submit_output", input: { json: JSON.stringify(filled.submit) } }
: filled;
if (step.wait) await sleep(step.wait);
if (step.think) await streamText(step.think, "thinking");
if (step.text) {
await streamText(step.text);
last = step.text;
}
if (step.bash) {
const id = `toolu_${uuid().replaceAll("-", "").slice(0, 24)}`;
toolUse({
type: "tool_use",
id,
name: "Bash",
input: { command: step.bash, description: step.description ?? step.bash },
},
]);
await sleep(step.ms ?? 1200);
toolResult(id, step.output ?? "", {
tool_use_result: {
stdout: step.output ?? "",
stderr: "",
interrupted: false,
isImage: false,
},
});
}
if (step.tool) {
const id = `toolu_${uuid().replaceAll("-", "").slice(0, 24)}`;
const serverName = Object.keys(mcpServers)[0] ?? "t3-code";
assistant([
{ type: "tool_use", id, name: `mcp__${serverName}__${step.tool}`, input: step.input ?? {} },
]);
const { text } = await callTool(step.tool, step.input ?? {}).catch((error) => ({
text: String(error),
}));
toolResult(id, [{ type: "text", text }]);
});
// `run` executes the command for real in the session's cwd, e.g. to push and open a PR.
let output = step.output ?? "";
if (step.run) {
const started = Date.now();
output = NodeChildProcess.execSync(step.bash, {
cwd,
encoding: "utf8",
stdio: ["ignore", "pipe", "pipe"],
}).trim();
await sleep(Math.max(0, (step.ms ?? 1200) - (Date.now() - started)));
} else await sleep(step.ms ?? 1200);
if (step.as)
local[step.as] = step.pick ? (new RegExp(step.pick).exec(output)?.[0] ?? output) : output;
answer(id, output, {
tool_use_result: {
stdout: output,
stderr: "",
interrupted: false,
isImage: false,
},
});
}
if (step.tool) {
const id = `toolu_${uuid().replaceAll("-", "").slice(0, 24)}`;
// `server` names a scripted server whose answer is `output`; otherwise T3's own MCP runs it.
const serverName = step.server ?? Object.keys(mcpServers)[0] ?? "t3-code";
toolUse({
type: "tool_use",
id,
name: `mcp__${serverName}__${step.tool}`,
input: step.input ?? {},
});
if (step.server) await sleep(step.ms ?? 900);
const { text, isError = false } = step.server
? { text: step.output ?? "" }
: await callTool(step.tool, step.input ?? {}).catch((error) => ({
text: String(error),
isError: true,
}));
answer(id, [{ type: "text", text }], {}, isError);
}
// Real edits, so checkpoints and diffs show them. Paths are relative to the session's cwd.
if (step.edit || step.write) {
const id = `toolu_${uuid().replaceAll("-", "").slice(0, 24)}`;
const file = NodePath.resolve(cwd, step.edit ?? step.write);
const input = step.edit
? { file_path: file, old_string: step.old, new_string: step.new }
: { file_path: file, content: step.content };
toolUse({ type: "tool_use", id, name: step.edit ? "Edit" : "Write", input });
await sleep(step.ms ?? 700);
if (step.edit) {
const before = NodeFS.readFileSync(file, "utf8");
if (!before.includes(step.old)) throw new Error(`${step.edit}: old text not found`);
NodeFS.writeFileSync(file, before.replace(step.old, step.new));
} else {
NodeFS.mkdirSync(NodePath.dirname(file), { recursive: true });
NodeFS.writeFileSync(file, step.content);
}
answer(id, `The file ${file} has been updated successfully.`);
}
}
} catch (error) {
// A scripted step that fails (an edit whose text is gone, a command that exits non-zero)
// still ends the turn, as a failed one, so the app does not wait forever.
log("step failed", String(error));
if (pending) answer(pending, String(error.message ?? error), {}, true);
send({
type: "result",
subtype: "error_during_execution",
is_error: true,
duration_ms: 4000,
duration_api_ms: 3500,
num_turns: 1,
result: String(error.message ?? error),
session_id: sessionId,
total_cost_usd: 0,
usage,
modelUsage: {},
permission_denials: [],
uuid: uuid(),
});
return;
}
send({
type: "result",
Expand Down Expand Up @@ -304,6 +429,29 @@ const controlResponse = (request) => {
return {};
case "get_usage":
return { rate_limits_available: false, rate_limits: [] };
case "mcp_status":
return { mcpServers: serverStatuses() };
case "mcp_authenticate": {
const server = signInServers.get(request.serverName);
if (!server) throw new Error(`no MCP server ${request.serverName}`);
if (server.status === "connected") return { requiresUserAction: false };
server.state = uuid();
const url = new URL(server.authUrl);
url.searchParams.set("state", server.state);
return { authUrl: url.toString(), requiresUserAction: true };
}
case "mcp_oauth_callback_url": {
const server = signInServers.get(request.serverName);
const state = new URL(request.callbackUrl).searchParams.get("state");
if (!server || !server.state || state !== server.state)
throw new Error("callback is not from this sign-in");
server.status = "connected";
signedIn.add(server.name);
NodeFS.writeFileSync(signedInFile, JSON.stringify([...signedIn]));
return {};
}
case "mcp_reconnect":
return {};
default:
return {};
}
Expand All @@ -321,14 +469,17 @@ input.on("line", (line) => {
}
log("in", message);
if (message.type === "control_request") {
send({
type: "control_response",
response: {
let response;
try {
response = {
subtype: "success",
request_id: message.request_id,
response: controlResponse(message.request ?? {}),
},
});
};
} catch (error) {
response = { subtype: "error", request_id: message.request_id, error: String(error) };
}
send({ type: "control_response", response });
return;
}
if (message.type === "user") {
Expand Down
Loading
Loading