zidane 6.2.36 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -5
- package/dist/{acp-DZNCQaTQ.js → acp-BCg03Fqc.js} +6 -6
- package/dist/{acp-DZNCQaTQ.js.map → acp-BCg03Fqc.js.map} +1 -1
- package/dist/acp-cli.js +7 -7
- package/dist/acp.d.ts +2 -2
- package/dist/acp.js +1 -1
- package/dist/{agent-CrPwqpLI.js → agent-DO8s7bDf.js} +168 -23
- package/dist/agent-DO8s7bDf.js.map +1 -0
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +4 -4
- package/dist/{anthropic-asnZVFS_.js → anthropic-B3hj9OMm.js} +32 -13
- package/dist/anthropic-B3hj9OMm.js.map +1 -0
- package/dist/{auth-C5YTniaq.js → auth-kqdSYLMU.js} +4 -4
- package/dist/{auth-C5YTniaq.js.map → auth-kqdSYLMU.js.map} +1 -1
- package/dist/{cache-telemetry-BhTryxFT.js → cache-telemetry-DzyfqSds.js} +87 -5
- package/dist/cache-telemetry-DzyfqSds.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +42 -4
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +31 -3
- package/dist/chat.js.map +1 -1
- package/dist/context-transport-CTLvmkj8.js +84 -0
- package/dist/context-transport-CTLvmkj8.js.map +1 -0
- package/dist/contexts/daytona.d.ts +33 -4
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +136 -0
- package/dist/contexts/daytona.js.map +1 -1
- package/dist/contexts/docker.d.ts +1 -1
- package/dist/contexts/docker.d.ts.map +1 -1
- package/dist/contexts/docker.js +85 -2
- package/dist/contexts/docker.js.map +1 -1
- package/dist/contexts/e2b.d.ts +34 -4
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +92 -0
- package/dist/contexts/e2b.js.map +1 -1
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/contexts/sandbox.js +4 -2
- package/dist/contexts/sandbox.js.map +1 -1
- package/dist/{contexts-o8y5B3Tm.js → contexts-DbMuUPjS.js} +92 -5
- package/dist/contexts-DbMuUPjS.js.map +1 -0
- package/dist/contexts.d.ts +4 -4
- package/dist/contexts.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +3 -3
- package/dist/{exec-file-size-PXkr-MGA.js → exec-file-size-BRpoB6Io.js} +3 -32
- package/dist/exec-file-size-BRpoB6Io.js.map +1 -0
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +4 -4
- package/dist/{index-DsPQbyUn.d.ts → index-B9jSo84a.d.ts} +2 -2
- package/dist/index-B9jSo84a.d.ts.map +1 -0
- package/dist/{index-CohO0oaX.d.ts → index-Bht3PKx6.d.ts} +5588 -5202
- package/dist/index-Bht3PKx6.d.ts.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +12 -12
- package/dist/{login-CWwu9Sex.js → login-DRy_-rQh.js} +2 -2
- package/dist/{login-CWwu9Sex.js.map → login-DRy_-rQh.js.map} +1 -1
- package/dist/{mcp-Ct5tF4oj.js → mcp-DHKk_tLV.js} +77 -34
- package/dist/mcp-DHKk_tLV.js.map +1 -0
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/{messages-Cpb4g_KV.js → messages-DHzFOdx_.js} +2 -2
- package/dist/{messages-Cpb4g_KV.js.map → messages-DHzFOdx_.js.map} +1 -1
- package/dist/{openai-compat-C77gOaHh.js → openai-compat-OI68avOl.js} +59 -16
- package/dist/openai-compat-OI68avOl.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +14 -0
- package/dist/prompt.js.map +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +2 -2
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-DnHPW-dL.js → providers-y_l5VkAZ.js} +3 -3
- package/dist/{providers-DnHPW-dL.js.map → providers-y_l5VkAZ.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/{read-state-rDmfeLmz.js → read-state-CNyeMG7W.js} +7 -4
- package/dist/read-state-CNyeMG7W.js.map +1 -0
- package/dist/restate.d.ts +2 -2
- package/dist/restate.js +2 -2
- package/dist/restate.js.map +1 -1
- package/dist/{sandbox-CgjG2VvQ.d.ts → sandbox-DqwpKX18.d.ts} +14 -2
- package/dist/{sandbox-CgjG2VvQ.d.ts.map → sandbox-DqwpKX18.d.ts.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-DpDBnktP.js → session-DdT2xT_d.js} +2 -2
- package/dist/{session-DpDBnktP.js.map → session-DdT2xT_d.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/shell-quote-BmnhZmdM.js +33 -0
- package/dist/shell-quote-BmnhZmdM.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-loader-Ce68wUmM.js → stdio-DU3ljLqy.js} +8 -215
- package/dist/stdio-DU3ljLqy.js.map +1 -0
- package/dist/stdio-loader-9PnQWshg.js +217 -0
- package/dist/stdio-loader-9PnQWshg.js.map +1 -0
- package/dist/stream-queue-Cd9OJxl7.js +71 -0
- package/dist/stream-queue-Cd9OJxl7.js.map +1 -0
- package/dist/{system-prompt-BlsdjcUi.d.ts → system-prompt-MNVHatSD.d.ts} +15 -1
- package/dist/system-prompt-MNVHatSD.d.ts.map +1 -0
- package/dist/{tool-formatters-bZYz74qU.d.ts → tool-formatters-B0ZXWJTe.d.ts} +2 -2
- package/dist/{tool-formatters-bZYz74qU.d.ts.map → tool-formatters-B0ZXWJTe.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +2 -2
- package/dist/{transcript-anchors-ZZYwCTjo.js → transcript-anchors-ChQH1fMm.js} +18 -8
- package/dist/transcript-anchors-ChQH1fMm.js.map +1 -0
- package/dist/{transcript-anchors-EBchHUMo.d.ts → transcript-anchors-yt0sGL0w.d.ts} +2 -2
- package/dist/{transcript-anchors-EBchHUMo.d.ts.map → transcript-anchors-yt0sGL0w.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +59 -7
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-DygcPreU.d.ts → turn-operations-XlnBT7p9.d.ts} +3 -3
- package/dist/{turn-operations-DygcPreU.d.ts.map → turn-operations-XlnBT7p9.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/{types-BDccavwj.d.ts → types-DdZMQxfT.d.ts} +117 -2
- package/dist/types-DdZMQxfT.d.ts.map +1 -0
- package/dist/types.d.ts +3 -3
- package/dist/{xai-B2hIs5We.js → xai-DxdI27ds.js} +2 -2
- package/dist/{xai-B2hIs5We.js.map → xai-DxdI27ds.js.map} +1 -1
- package/docs/ARCHITECTURE.md +62 -4
- package/docs/CHAT.md +11 -4
- package/docs/RESTATE.md +1 -1
- package/docs/SKILL.md +21 -1
- package/docs/TUI.md +2 -0
- package/package.json +1 -1
- package/dist/agent-CrPwqpLI.js.map +0 -1
- package/dist/anthropic-asnZVFS_.js.map +0 -1
- package/dist/cache-telemetry-BhTryxFT.js.map +0 -1
- package/dist/contexts-o8y5B3Tm.js.map +0 -1
- package/dist/exec-file-size-PXkr-MGA.js.map +0 -1
- package/dist/index-CohO0oaX.d.ts.map +0 -1
- package/dist/index-DsPQbyUn.d.ts.map +0 -1
- package/dist/mcp-Ct5tF4oj.js.map +0 -1
- package/dist/openai-compat-C77gOaHh.js.map +0 -1
- package/dist/read-state-rDmfeLmz.js.map +0 -1
- package/dist/stdio-loader-Ce68wUmM.js.map +0 -1
- package/dist/system-prompt-BlsdjcUi.d.ts.map +0 -1
- package/dist/transcript-anchors-ZZYwCTjo.js.map +0 -1
- package/dist/types-BDccavwj.d.ts.map +0 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { n as serializeMessage, t as ReadBuffer } from "./stdio-DU3ljLqy.js";
|
|
2
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { PassThrough } from "node:stream";
|
|
5
|
+
//#region scripts/cross-spawn-shim.mjs
|
|
6
|
+
/**
|
|
7
|
+
* Build-time replacement for the userland process-spawn helper that the
|
|
8
|
+
* MCP SDK's stdio transport depends on. Injected by tsdown via the
|
|
9
|
+
* rolldown alias plugin in `tsdown.config.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Why this exists
|
|
12
|
+
*
|
|
13
|
+
* The upstream spawn helper is CJS and its first line dynamically resolves
|
|
14
|
+
* Node's process-spawn built-in via a bare specifier. When a downstream
|
|
15
|
+
* consumer re-bundles zidane as ESM (esbuild / Vite / tsup with
|
|
16
|
+
* `format: 'esm'` and Node built-ins not externalized), that bare
|
|
17
|
+
* resolution gets wrapped in esbuild's `__require` shim and throws at
|
|
18
|
+
* runtime — every stdio MCP server fails to launch.
|
|
19
|
+
*
|
|
20
|
+
* Aliasing the helper to this file at zidane's own build step replaces
|
|
21
|
+
* the offending bare resolution with explicit `node:`-prefixed imports.
|
|
22
|
+
* Downstream bundlers recognize the `node:` prefix as a Node built-in
|
|
23
|
+
* and externalize it automatically. The upstream MCP SDK is unmodified.
|
|
24
|
+
*
|
|
25
|
+
* Tradeoff
|
|
26
|
+
*
|
|
27
|
+
* The replaced helper does two extra things vs. raw spawn:
|
|
28
|
+
* 1. Windows `.cmd` / `.bat` / `.ps1` resolution via PATHEXT + cmd.exe
|
|
29
|
+
* shelling. Compensated below with `shell: true` on Win32, which
|
|
30
|
+
* routes through cmd.exe and handles the common `npx` / `pnpm` /
|
|
31
|
+
* `yarn` shims.
|
|
32
|
+
* 2. Synthesizes a clean ENOENT error event for missing commands.
|
|
33
|
+
* `node:child_process.spawn` already emits a perfectly usable
|
|
34
|
+
* `error` event with `code === 'ENOENT'`, which the MCP SDK's stdio
|
|
35
|
+
* transport forwards to `onerror`. Functionally equivalent.
|
|
36
|
+
*
|
|
37
|
+
* Net: zero behavioural change on POSIX, near-identical on Windows for
|
|
38
|
+
* MCP-style stdio invocations.
|
|
39
|
+
*/
|
|
40
|
+
const IS_WIN32 = process.platform === "win32";
|
|
41
|
+
function withWin32Shell(options) {
|
|
42
|
+
if (!IS_WIN32) return options;
|
|
43
|
+
if (options && options.shell !== void 0) return options;
|
|
44
|
+
return {
|
|
45
|
+
...options ?? {},
|
|
46
|
+
shell: true
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function spawn$1(command, args, options) {
|
|
50
|
+
return spawn(command, args, withWin32Shell(options));
|
|
51
|
+
}
|
|
52
|
+
function spawnSync$1(command, args, options) {
|
|
53
|
+
return spawnSync(command, args, withWin32Shell(options));
|
|
54
|
+
}
|
|
55
|
+
spawn$1.spawn = spawn$1;
|
|
56
|
+
spawn$1.sync = spawnSync$1;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region node_modules/.bun/@modelcontextprotocol+sdk@1.29.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
59
|
+
/**
|
|
60
|
+
* Environment variables to inherit by default, if an environment is not explicitly given.
|
|
61
|
+
*/
|
|
62
|
+
const DEFAULT_INHERITED_ENV_VARS = process.platform === "win32" ? [
|
|
63
|
+
"APPDATA",
|
|
64
|
+
"HOMEDRIVE",
|
|
65
|
+
"HOMEPATH",
|
|
66
|
+
"LOCALAPPDATA",
|
|
67
|
+
"PATH",
|
|
68
|
+
"PROCESSOR_ARCHITECTURE",
|
|
69
|
+
"SYSTEMDRIVE",
|
|
70
|
+
"SYSTEMROOT",
|
|
71
|
+
"TEMP",
|
|
72
|
+
"USERNAME",
|
|
73
|
+
"USERPROFILE",
|
|
74
|
+
"PROGRAMFILES"
|
|
75
|
+
] : [
|
|
76
|
+
"HOME",
|
|
77
|
+
"LOGNAME",
|
|
78
|
+
"PATH",
|
|
79
|
+
"SHELL",
|
|
80
|
+
"TERM",
|
|
81
|
+
"USER"
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* Returns a default environment object including only environment variables deemed safe to inherit.
|
|
85
|
+
*/
|
|
86
|
+
function getDefaultEnvironment() {
|
|
87
|
+
const env = {};
|
|
88
|
+
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
89
|
+
const value = process.env[key];
|
|
90
|
+
if (value === void 0) continue;
|
|
91
|
+
if (value.startsWith("()")) continue;
|
|
92
|
+
env[key] = value;
|
|
93
|
+
}
|
|
94
|
+
return env;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
|
|
98
|
+
*
|
|
99
|
+
* This transport is only available in Node.js environments.
|
|
100
|
+
*/
|
|
101
|
+
var StdioClientTransport = class {
|
|
102
|
+
constructor(server) {
|
|
103
|
+
this._readBuffer = new ReadBuffer();
|
|
104
|
+
this._stderrStream = null;
|
|
105
|
+
this._serverParams = server;
|
|
106
|
+
if (server.stderr === "pipe" || server.stderr === "overlapped") this._stderrStream = new PassThrough();
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Starts the server process and prepares to communicate with it.
|
|
110
|
+
*/
|
|
111
|
+
async start() {
|
|
112
|
+
if (this._process) throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
|
|
113
|
+
return new Promise((resolve, reject) => {
|
|
114
|
+
this._process = spawn$1(this._serverParams.command, this._serverParams.args ?? [], {
|
|
115
|
+
env: {
|
|
116
|
+
...getDefaultEnvironment(),
|
|
117
|
+
...this._serverParams.env
|
|
118
|
+
},
|
|
119
|
+
stdio: [
|
|
120
|
+
"pipe",
|
|
121
|
+
"pipe",
|
|
122
|
+
this._serverParams.stderr ?? "inherit"
|
|
123
|
+
],
|
|
124
|
+
shell: false,
|
|
125
|
+
windowsHide: process.platform === "win32",
|
|
126
|
+
cwd: this._serverParams.cwd
|
|
127
|
+
});
|
|
128
|
+
this._process.on("error", (error) => {
|
|
129
|
+
reject(error);
|
|
130
|
+
this.onerror?.(error);
|
|
131
|
+
});
|
|
132
|
+
this._process.on("spawn", () => {
|
|
133
|
+
resolve();
|
|
134
|
+
});
|
|
135
|
+
this._process.on("close", (_code) => {
|
|
136
|
+
this._process = void 0;
|
|
137
|
+
this.onclose?.();
|
|
138
|
+
});
|
|
139
|
+
this._process.stdin?.on("error", (error) => {
|
|
140
|
+
this.onerror?.(error);
|
|
141
|
+
});
|
|
142
|
+
this._process.stdout?.on("data", (chunk) => {
|
|
143
|
+
this._readBuffer.append(chunk);
|
|
144
|
+
this.processReadBuffer();
|
|
145
|
+
});
|
|
146
|
+
this._process.stdout?.on("error", (error) => {
|
|
147
|
+
this.onerror?.(error);
|
|
148
|
+
});
|
|
149
|
+
if (this._stderrStream && this._process.stderr) this._process.stderr.pipe(this._stderrStream);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
|
|
154
|
+
*
|
|
155
|
+
* If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to
|
|
156
|
+
* attach listeners before the start method is invoked. This prevents loss of any early
|
|
157
|
+
* error output emitted by the child process.
|
|
158
|
+
*/
|
|
159
|
+
get stderr() {
|
|
160
|
+
if (this._stderrStream) return this._stderrStream;
|
|
161
|
+
return this._process?.stderr ?? null;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The child process pid spawned by this transport.
|
|
165
|
+
*
|
|
166
|
+
* This is only available after the transport has been started.
|
|
167
|
+
*/
|
|
168
|
+
get pid() {
|
|
169
|
+
return this._process?.pid ?? null;
|
|
170
|
+
}
|
|
171
|
+
processReadBuffer() {
|
|
172
|
+
while (true) try {
|
|
173
|
+
const message = this._readBuffer.readMessage();
|
|
174
|
+
if (message === null) break;
|
|
175
|
+
this.onmessage?.(message);
|
|
176
|
+
} catch (error) {
|
|
177
|
+
this.onerror?.(error);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async close() {
|
|
181
|
+
if (this._process) {
|
|
182
|
+
const processToClose = this._process;
|
|
183
|
+
this._process = void 0;
|
|
184
|
+
const closePromise = new Promise((resolve) => {
|
|
185
|
+
processToClose.once("close", () => {
|
|
186
|
+
resolve();
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
try {
|
|
190
|
+
processToClose.stdin?.end();
|
|
191
|
+
} catch {}
|
|
192
|
+
await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
|
|
193
|
+
if (processToClose.exitCode === null) {
|
|
194
|
+
try {
|
|
195
|
+
processToClose.kill("SIGTERM");
|
|
196
|
+
} catch {}
|
|
197
|
+
await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
|
|
198
|
+
}
|
|
199
|
+
if (processToClose.exitCode === null) try {
|
|
200
|
+
processToClose.kill("SIGKILL");
|
|
201
|
+
} catch {}
|
|
202
|
+
}
|
|
203
|
+
this._readBuffer.clear();
|
|
204
|
+
}
|
|
205
|
+
send(message) {
|
|
206
|
+
return new Promise((resolve) => {
|
|
207
|
+
if (!this._process?.stdin) throw new Error("Not connected");
|
|
208
|
+
const json = serializeMessage(message);
|
|
209
|
+
if (this._process.stdin.write(json)) resolve();
|
|
210
|
+
else this._process.stdin.once("drain", resolve);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
//#endregion
|
|
215
|
+
export { StdioClientTransport, getDefaultEnvironment };
|
|
216
|
+
|
|
217
|
+
//# sourceMappingURL=stdio-loader-9PnQWshg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-loader-9PnQWshg.js","names":["spawn","nodeSpawn","spawnSync","nodeSpawnSync","spawn"],"sources":["../scripts/cross-spawn-shim.mjs","../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js"],"sourcesContent":["/**\n * Build-time replacement for the userland process-spawn helper that the\n * MCP SDK's stdio transport depends on. Injected by tsdown via the\n * rolldown alias plugin in `tsdown.config.ts`.\n *\n * Why this exists\n *\n * The upstream spawn helper is CJS and its first line dynamically resolves\n * Node's process-spawn built-in via a bare specifier. When a downstream\n * consumer re-bundles zidane as ESM (esbuild / Vite / tsup with\n * `format: 'esm'` and Node built-ins not externalized), that bare\n * resolution gets wrapped in esbuild's `__require` shim and throws at\n * runtime — every stdio MCP server fails to launch.\n *\n * Aliasing the helper to this file at zidane's own build step replaces\n * the offending bare resolution with explicit `node:`-prefixed imports.\n * Downstream bundlers recognize the `node:` prefix as a Node built-in\n * and externalize it automatically. The upstream MCP SDK is unmodified.\n *\n * Tradeoff\n *\n * The replaced helper does two extra things vs. raw spawn:\n * 1. Windows `.cmd` / `.bat` / `.ps1` resolution via PATHEXT + cmd.exe\n * shelling. Compensated below with `shell: true` on Win32, which\n * routes through cmd.exe and handles the common `npx` / `pnpm` /\n * `yarn` shims.\n * 2. Synthesizes a clean ENOENT error event for missing commands.\n * `node:child_process.spawn` already emits a perfectly usable\n * `error` event with `code === 'ENOENT'`, which the MCP SDK's stdio\n * transport forwards to `onerror`. Functionally equivalent.\n *\n * Net: zero behavioural change on POSIX, near-identical on Windows for\n * MCP-style stdio invocations.\n */\n\nimport { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from 'node:child_process'\nimport process from 'node:process'\n\nconst IS_WIN32 = process.platform === 'win32'\n\nfunction withWin32Shell(options) {\n // Only opt into shell mode on Windows, and only when the caller hasn't\n // explicitly disabled it. POSIX never needs the shell wrapper — args\n // would have to be re-quoted (changes argv semantics) and trap/`set -e`\n // behaviour shifts in subtle ways.\n if (!IS_WIN32)\n return options\n if (options && options.shell !== undefined)\n return options\n return { ...(options ?? {}), shell: true }\n}\n\nexport function spawn(command, args, options) {\n return nodeSpawn(command, args, withWin32Shell(options))\n}\n\nexport function spawnSync(command, args, options) {\n return nodeSpawnSync(command, args, withWin32Shell(options))\n}\n\n// Match cross-spawn's CommonJS interop shape so existing imports keep\n// working byte-for-byte:\n// - default import: `import spawn from 'cross-spawn'` (SDK uses this)\n// - named import: `import { spawn, sync } from 'cross-spawn'`\n// - require pattern: `const cs = require('cross-spawn'); cs.sync(...)`\nspawn.spawn = spawn\nspawn.sync = spawnSync\n\nexport const sync = spawnSync\nexport default spawn\n","import spawn from 'cross-spawn';\nimport process from 'node:process';\nimport { PassThrough } from 'node:stream';\nimport { ReadBuffer, serializeMessage } from '../shared/stdio.js';\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS = process.platform === 'win32'\n ? [\n 'APPDATA',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PROCESSOR_ARCHITECTURE',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'PROGRAMFILES'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment() {\n const env = {};\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n env[key] = value;\n }\n return env;\n}\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport {\n constructor(server) {\n this._readBuffer = new ReadBuffer();\n this._stderrStream = null;\n this._serverParams = server;\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start() {\n if (this._process) {\n throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n this._process.on('error', error => {\n reject(error);\n this.onerror?.(error);\n });\n this._process.on('spawn', () => {\n resolve();\n });\n this._process.on('close', _code => {\n this._process = undefined;\n this.onclose?.();\n });\n this._process.stdin?.on('error', error => {\n this.onerror?.(error);\n });\n this._process.stdout?.on('data', chunk => {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n });\n this._process.stdout?.on('error', error => {\n this.onerror?.(error);\n });\n if (this._stderrStream && this._process.stderr) {\n this._process.stderr.pipe(this._stderrStream);\n }\n });\n }\n /**\n * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to \"pipe\" or \"overlapped\".\n *\n * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to\n * attach listeners before the start method is invoked. This prevents loss of any early\n * error output emitted by the child process.\n */\n get stderr() {\n if (this._stderrStream) {\n return this._stderrStream;\n }\n return this._process?.stderr ?? null;\n }\n /**\n * The child process pid spawned by this transport.\n *\n * This is only available after the transport has been started.\n */\n get pid() {\n return this._process?.pid ?? null;\n }\n processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n async close() {\n if (this._process) {\n const processToClose = this._process;\n this._process = undefined;\n const closePromise = new Promise(resolve => {\n processToClose.once('close', () => {\n resolve();\n });\n });\n try {\n processToClose.stdin?.end();\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGTERM');\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n }\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGKILL');\n }\n catch {\n // ignore\n }\n }\n }\n this._readBuffer.clear();\n }\n send(message) {\n return new Promise(resolve => {\n if (!this._process?.stdin) {\n throw new Error('Not connected');\n }\n const json = serializeMessage(message);\n if (this._process.stdin.write(json)) {\n resolve();\n }\n else {\n this._process.stdin.once('drain', resolve);\n }\n });\n }\n}\n//# sourceMappingURL=stdio.js.map"],"x_google_ignoreList":[1],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,WAAW,QAAQ,aAAa;AAEtC,SAAS,eAAe,SAAS;CAK/B,IAAI,CAAC,UACH,OAAO;CACT,IAAI,WAAW,QAAQ,UAAU,KAAA,GAC/B,OAAO;CACT,OAAO;EAAE,GAAI,WAAW,CAAC;EAAI,OAAO;CAAK;AAC3C;AAEA,SAAgBA,QAAM,SAAS,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e,aAAa,MAAM;IAClC,IAAI;KACA,eAAe,KAAK,SAAS;IACjC,QACM,CAEN;IACA,MAAM,QAAQ,KAAK,CAAC,cAAc,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;GAChG;GACA,IAAI,eAAe,aAAa,MAC5B,IAAI;IACA,eAAe,KAAK,SAAS;GACjC,QACM,CAEN;EAER;EACA,KAAK,YAAY,MAAM;CAC3B;CACA,KAAK,SAAS;EACV,OAAO,IAAI,SAAQ,YAAW;GAC1B,IAAI,CAAC,KAAK,UAAU,OAChB,MAAM,IAAI,MAAM,eAAe;GAEnC,MAAM,OAAO,iBAAiB,OAAO;GACrC,IAAI,KAAK,SAAS,MAAM,MAAM,IAAI,GAC9B,QAAQ;QAGR,KAAK,SAAS,MAAM,KAAK,SAAS,OAAO;EAEjD,CAAC;CACL;AACJ"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var StreamQueue = class {
|
|
2
|
+
onBacklog;
|
|
3
|
+
chunks = [];
|
|
4
|
+
waiting = null;
|
|
5
|
+
closed = false;
|
|
6
|
+
bufferedBytes = 0;
|
|
7
|
+
backlogWarned = false;
|
|
8
|
+
/**
|
|
9
|
+
* @param onBacklog Fired at most once, when unread bytes first exceed
|
|
10
|
+
* {@link BACKLOG_WARN_BYTES}. Diagnostic only — nothing is dropped and the
|
|
11
|
+
* queue keeps accepting data.
|
|
12
|
+
*/
|
|
13
|
+
constructor(onBacklog) {
|
|
14
|
+
this.onBacklog = onBacklog;
|
|
15
|
+
}
|
|
16
|
+
/** Feed a chunk in. No-op once closed. */
|
|
17
|
+
push(chunk) {
|
|
18
|
+
if (this.closed) return;
|
|
19
|
+
if (this.waiting) {
|
|
20
|
+
const resolve = this.waiting;
|
|
21
|
+
this.waiting = null;
|
|
22
|
+
resolve({
|
|
23
|
+
value: chunk,
|
|
24
|
+
done: false
|
|
25
|
+
});
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.chunks.push(chunk);
|
|
29
|
+
this.bufferedBytes += chunk.byteLength;
|
|
30
|
+
if (!this.backlogWarned && this.bufferedBytes > 8388608) {
|
|
31
|
+
this.backlogWarned = true;
|
|
32
|
+
this.onBacklog?.(this.bufferedBytes);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Signal end-of-stream; a parked consumer completes immediately. */
|
|
36
|
+
close() {
|
|
37
|
+
if (this.closed) return;
|
|
38
|
+
this.closed = true;
|
|
39
|
+
if (this.waiting) {
|
|
40
|
+
const resolve = this.waiting;
|
|
41
|
+
this.waiting = null;
|
|
42
|
+
resolve({
|
|
43
|
+
value: void 0,
|
|
44
|
+
done: true
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return { next: async () => {
|
|
50
|
+
const buffered = this.chunks.shift();
|
|
51
|
+
if (buffered !== void 0) {
|
|
52
|
+
this.bufferedBytes -= buffered.byteLength;
|
|
53
|
+
return {
|
|
54
|
+
value: buffered,
|
|
55
|
+
done: false
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (this.closed) return {
|
|
59
|
+
value: void 0,
|
|
60
|
+
done: true
|
|
61
|
+
};
|
|
62
|
+
return new Promise((resolve) => {
|
|
63
|
+
this.waiting = resolve;
|
|
64
|
+
});
|
|
65
|
+
} };
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { StreamQueue as t };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=stream-queue-Cd9OJxl7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-queue-Cd9OJxl7.js","names":[],"sources":["../src/contexts/stream-queue.ts"],"sourcesContent":["/**\n * Adapter turning a push-based callback stream into the pull-based\n * `AsyncIterable<Uint8Array>` that `StreamHandle` requires.\n *\n * Both sandbox providers hand output to a callback (`onStdout` on E2B,\n * `onData` on Daytona's PTY) rather than exposing a readable stream, while\n * the seam is defined in terms of async iteration so consumers can `for\n * await` and get natural backpressure. This bridges the two.\n *\n * Chunks are buffered when nobody is iterating yet — a provider callback\n * can fire before the consumer's loop starts, and dropping those bytes\n * would silently eat the first protocol frame.\n *\n * NO BACKPRESSURE, and that is not fixable here. Both providers hand output\n * to a synchronous `(data) => void` callback (`onStdout` on E2B, `onData` on\n * Daytona's PTY): there is no return value or promise the SDK inspects, so\n * there is no channel to tell the producer to slow down. The queue therefore\n * grows to whatever a slow — or absent — consumer leaves unread. Dropping on\n * overflow is not an option either: these carry framed JSON-RPC, and a lost\n * chunk desynchronises the stream permanently, which is far worse than\n * memory pressure.\n *\n * So the obligation sits with the consumer (see `StreamHandle`), and the\n * queue's job is to make a violation VISIBLE rather than to surface as an\n * unexplained OOM: `onBacklog` fires once when the unread backlog crosses\n * {@link BACKLOG_WARN_BYTES}.\n */\n\n/** Backlog at which a stalled consumer stops being plausibly transient. */\nexport const BACKLOG_WARN_BYTES = 8 * 1024 * 1024\n\nexport class StreamQueue implements AsyncIterable<Uint8Array> {\n private chunks: Uint8Array[] = []\n private waiting: ((value: IteratorResult<Uint8Array>) => void) | null = null\n private closed = false\n private bufferedBytes = 0\n private backlogWarned = false\n\n /**\n * @param onBacklog Fired at most once, when unread bytes first exceed\n * {@link BACKLOG_WARN_BYTES}. Diagnostic only — nothing is dropped and the\n * queue keeps accepting data.\n */\n constructor(private readonly onBacklog?: (bytes: number) => void) {}\n\n /** Feed a chunk in. No-op once closed. */\n push(chunk: Uint8Array): void {\n if (this.closed)\n return\n // A parked consumer takes the chunk directly — queueing it first would\n // reorder it behind nothing but still cost a tick.\n if (this.waiting) {\n const resolve = this.waiting\n this.waiting = null\n resolve({ value: chunk, done: false })\n return\n }\n this.chunks.push(chunk)\n this.bufferedBytes += chunk.byteLength\n if (!this.backlogWarned && this.bufferedBytes > BACKLOG_WARN_BYTES) {\n this.backlogWarned = true\n this.onBacklog?.(this.bufferedBytes)\n }\n }\n\n /** Signal end-of-stream; a parked consumer completes immediately. */\n close(): void {\n if (this.closed)\n return\n this.closed = true\n // Buffered chunks stay readable (`next()` drains before observing the\n // close), so the accounting must survive too.\n if (this.waiting) {\n const resolve = this.waiting\n this.waiting = null\n resolve({ value: undefined as never, done: true })\n }\n }\n\n [Symbol.asyncIterator](): AsyncIterator<Uint8Array> {\n return {\n next: async (): Promise<IteratorResult<Uint8Array>> => {\n // Buffered chunks drain before the close is observed, so bytes\n // that arrived just before the child exited are never lost.\n const buffered = this.chunks.shift()\n if (buffered !== undefined) {\n this.bufferedBytes -= buffered.byteLength\n return { value: buffered, done: false }\n }\n if (this.closed)\n return { value: undefined as never, done: true }\n return new Promise<IteratorResult<Uint8Array>>((resolve) => {\n this.waiting = resolve\n })\n },\n }\n }\n}\n"],"mappings":"AA+BA,IAAa,cAAb,MAA8D;CAY/B;CAX7B,SAA+B,CAAC;CAChC,UAAwE;CACxE,SAAiB;CACjB,gBAAwB;CACxB,gBAAwB;;;;;;CAOxB,YAAY,WAAsD;EAArC,KAAA,YAAA;CAAsC;;CAGnE,KAAK,OAAyB;EAC5B,IAAI,KAAK,QACP;EAGF,IAAI,KAAK,SAAS;GAChB,MAAM,UAAU,KAAK;GACrB,KAAK,UAAU;GACf,QAAQ;IAAE,OAAO;IAAO,MAAM;GAAM,CAAC;GACrC;EACF;EACA,KAAK,OAAO,KAAK,KAAK;EACtB,KAAK,iBAAiB,MAAM;EAC5B,IAAI,CAAC,KAAK,iBAAiB,KAAK,gBAAA,SAAoC;GAClE,KAAK,gBAAgB;GACrB,KAAK,YAAY,KAAK,aAAa;EACrC;CACF;;CAGA,QAAc;EACZ,IAAI,KAAK,QACP;EACF,KAAK,SAAS;EAGd,IAAI,KAAK,SAAS;GAChB,MAAM,UAAU,KAAK;GACrB,KAAK,UAAU;GACf,QAAQ;IAAE,OAAO,KAAA;IAAoB,MAAM;GAAK,CAAC;EACnD;CACF;CAEA,CAAC,OAAO,iBAA4C;EAClD,OAAO,EACL,MAAM,YAAiD;GAGrD,MAAM,WAAW,KAAK,OAAO,MAAM;GACnC,IAAI,aAAa,KAAA,GAAW;IAC1B,KAAK,iBAAiB,SAAS;IAC/B,OAAO;KAAE,OAAO;KAAU,MAAM;IAAM;GACxC;GACA,IAAI,KAAK,QACP,OAAO;IAAE,OAAO,KAAA;IAAoB,MAAM;GAAK;GACjD,OAAO,IAAI,SAAqC,YAAY;IAC1D,KAAK,UAAU;GACjB,CAAC;EACH,EACF;CACF;AACF"}
|
|
@@ -20,6 +20,20 @@
|
|
|
20
20
|
* suffix re-bills per turn. Net effect: a cwd change between turns no longer
|
|
21
21
|
* invalidates 4 KB of doctrine.
|
|
22
22
|
*
|
|
23
|
+
* IMPORTANT — "not cached" does NOT mean "free to churn". The dynamic half
|
|
24
|
+
* carries no `cache_control` marker of its own, but it still sits inside the
|
|
25
|
+
* prefix that the MESSAGE-level breakpoints hash (provider order is
|
|
26
|
+
* tools → system → messages, cumulative). Rewriting the dynamic half between
|
|
27
|
+
* turns therefore invalidates the whole conversation and leaves only `tools` +
|
|
28
|
+
* the static half readable — a partial break that shows up as a suspiciously
|
|
29
|
+
* CONSTANT `cacheRead`, not a zero one. A live counter appended below the marker
|
|
30
|
+
* is enough to lose the transcript on most turns of a run.
|
|
31
|
+
*
|
|
32
|
+
* So the split buys exactly one thing: content that varies ACROSS runs (cwd,
|
|
33
|
+
* env, project root) stops invalidating doctrine shared BETWEEN runs. It buys
|
|
34
|
+
* nothing for content that varies between turns OF a run — that has to be
|
|
35
|
+
* byte-stable wherever it lives, or be persisted into the transcript.
|
|
36
|
+
*
|
|
23
37
|
* Wire contract:
|
|
24
38
|
*
|
|
25
39
|
* - `splitSystemPrompt(s)` is pure; missing marker ⇒ entire string is static
|
|
@@ -136,4 +150,4 @@ declare function renderSystemForWire(system: string): string;
|
|
|
136
150
|
declare function hasSystemPromptBoundary(system: string): boolean;
|
|
137
151
|
//#endregion
|
|
138
152
|
export { hasSystemPromptBoundary as a, replaceDynamicSection as c, appendStaticSection as i, splitSystemPrompt as l, SystemPromptParts as n, joinSystemPrompt as o, appendDynamicSection as r, renderSystemForWire as s, SYSTEM_PROMPT_BOUNDARY as t };
|
|
139
|
-
//# sourceMappingURL=system-prompt-
|
|
153
|
+
//# sourceMappingURL=system-prompt-MNVHatSD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-prompt-MNVHatSD.d.ts","names":[],"sources":["../src/system-prompt.ts"],"mappings":";;AA2DA;;;;AAAmC;AAGnC;;;;AAIS;AAuBT;;;;AAAoE;AA8BpE;;;;AAAwE;AAoBxE;;;;AAAiE;AAqBjE;;;;AAAkE;AAelE;;;;AAAkE;AAiBlE;;;;AAAkD;AAYlD;;;;AAAsD;;;;;;;;;;;;;cAjJzC,sBAAA;;UAGI,iBAAA;;EAEf,MAAA;;EAEA,OAAO;AAAA;;;;;;;;;;;;;;;;;;;;;iBAuBO,iBAAA,CAAkB,MAAA,WAAiB,iBAAiB;;;;;;;;;;;;iBA8BpD,gBAAA,CAAiB,UAAA,UAAoB,WAAmB;;;;;;;;;;;;;iBAoBxD,mBAAA,CAAoB,MAAA,UAAgB,KAAa;;;;;;;;;;;;;;iBAqBjD,oBAAA,CAAqB,MAAA,UAAgB,KAAa;;;;;;;;iBAelD,qBAAA,CAAsB,MAAA,UAAgB,IAAY;;;;;;;;;;;;;iBAiBlD,mBAAA,CAAoB,MAAc;;iBAYlC,uBAAA,CAAwB,MAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Lu as SessionMeta, Qu as ProviderKey, Ru as Settings, Zu as ProviderAuth, lm as SessionTurn, nd as ModelInfo, zu as StreamEvent } from "./index-Bht3PKx6.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/turn-selection.d.ts
|
|
@@ -529,4 +529,4 @@ declare function displayNameFor(name: string, input?: Record<string, unknown>):
|
|
|
529
529
|
declare function formatToolCall(name: string, input: Record<string, unknown>): ToolFormatLine | null;
|
|
530
530
|
//#endregion
|
|
531
531
|
export { selectableTurnIds as $, highlightSegments as A, ApprovalDecision as B, SearchTurnResult as C, buildSessionSearchIndex as D, SessionSearchIndex as E, searchSessionIndex as F, useSafeModeActions as G, RequestApproval as H, searchSessionIndexAsync as I, EDIT_TOOL_NAMES as J, useSafeModeQueue as K, searchSessionTurns as L, searchSessionHistory as M, searchSessionHistoryIndex as N, buildSessionSearchIndexAsync as O, searchSessionHistoryIndexAsync as P, isVisible as Q, searchTurns as R, SearchSessionResult as S, SessionSearchExcerpt as T, SafeModeActions as U, ApprovalRequest as V, SafeModeProvider as W, isTurnHighlighted as X, isEditErrorResult as Y, isUserBashEvent as Z, splitMarkdownCodeBlocks as _, formatToolCall as a, IndexedSearchTurn as b, splitPromptSegments as c, filterModelCatalog as d, selectionAfterTurnRemoval as et, indexOfEntry as f, normalizeMarkdownCodeFences as g, chunkMarkdownForRender as h, displayNameFor as i, searchHighlightRanges as j, filterSessionSearchCatalog as k, CatalogEntry as l, MarkdownSegment as m, ToolDisplayMeta as n, PromptSegment as o, MARKDOWN_RENDER_CHUNK_TARGET_BYTES as p, BASH_CALL_ID_PREFIX as q, ToolFormatLine as r, PromptSegmentRef as s, TOOL_DISPLAY as t, turnSelectionOwnership as tt, buildModelCatalog as u, HighlightRange as v, SessionHistoryMatch as w, SearchExcerpt as x, HighlightSegment as y, searchableTurnText as z };
|
|
532
|
-
//# sourceMappingURL=tool-formatters-
|
|
532
|
+
//# sourceMappingURL=tool-formatters-B0ZXWJTe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-formatters-
|
|
1
|
+
{"version":3,"file":"tool-formatters-B0ZXWJTe.d.ts","names":[],"sources":["../src/chat/turn-selection.ts","../src/chat/safe-mode-context.tsx","../src/chat/history-search.ts","../src/chat/markdown-segments.ts","../src/chat/model-catalog.ts","../src/chat/prompt-segments.ts","../src/chat/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;AAAA;AAGhC;EMhDE,IAAI;AAAA;AAAA,UAGW,eAAA;EN6CsB;;;;AAAoC;AAwD3E;;;;EM3FE,WAAA,aAAwB,KAAA,EAAO,MAAA;EN2FP;;;;AAAsC;EMrF9D,MAAA,GAAS,KAAA,EAAO,MAAA,sBAA4B,cAAA;AAAA;AAAA,cAOjC,YAAA,EAAc,QAAA,CAAS,MAAA,SAAe,eAAA;;;;;;ANyIwB;AAkE3E;;;;;;;;;iBMwGgB,cAAA,CACd,IAAA,UACA,KAAA,GAAQ,MAAM;;;;;;ANvGwB;iBMyHxB,cAAA,CAAe,IAAA,UAAc,KAAA,EAAO,MAAA,oBAA0B,cAAc"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ar as multiEdit, As as isSpawnTool, Bm as hashContent, Cr as SkillsReadToolOptions, Cs as SpawnTool, Dr as createShellTool, Ds as SubagentOverride, Er as CreateShellToolOptions, Es as SubagentDef, Fm as ToolMap, Fr as glob, Hm as hydrateReadStateFromSessionAsync, Im as HydrateReadStateOptions, Ir as edit, Lm as ReadStateEntry, Mr as InteractionToolOptions, Ms as createModelSearchTool, Nm as ToolContext, Nr as createInteractionTool, Ns as formatModelLine, Or as shell, Os as SubagentRegistry, Pm as ToolDef, Pr as grep, Ps as matchModelEntries, Rm as ReadStateMap, Sr as createSkillsRunScriptTool, Ss as SpawnTaskOutcome, Tr as shellKill, Ts as SpawnToolState, Um as readStateKey, Vm as hydrateReadStateFromSession, Wm as resolveReadStateMap, _r as ToolSearchToolOptions, br as createSkillsUseTool, bs as ExtensionSubagentDef, dr as waitTask, fr as ValidationResult, gr as LazyToolEntry, hr as tailTruncate, jr as listFiles, js as SpawnModelEntry, kr as readFile, ks as createSpawnTool, lr as writeFile, mr as TailTruncateOptions, pr as validateToolArgs, ur as WAIT_TASK_TIMED_OUT_PREFIX, vr as createToolSearchTool, wr as createSkillsReadTool, ws as SpawnToolOptions, xr as SkillsRunScriptToolOptions, xs as SpawnTaskInput, yr as SkillsUseToolOptions, ys as ChildAgent, zm as getReadState } from "./index-Bht3PKx6.js";
|
|
2
2
|
export { type ChildAgent, type CreateShellToolOptions, type ExtensionSubagentDef, type HydrateReadStateOptions, type InteractionToolOptions, type LazyToolEntry, type ReadStateEntry, type ReadStateMap, type SkillsReadToolOptions, type SkillsRunScriptToolOptions, type SkillsUseToolOptions, type SpawnModelEntry, type SpawnTaskInput, type SpawnTaskOutcome, type SpawnTool, type SpawnToolOptions, type SpawnToolState, type SubagentDef, type SubagentOverride, type SubagentRegistry, type TailTruncateOptions, type ToolContext, type ToolDef, type ToolMap, type ToolSearchToolOptions, type ValidationResult, WAIT_TASK_TIMED_OUT_PREFIX, createInteractionTool, createModelSearchTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, formatModelLine, getReadState, glob, grep, hashContent, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, isSpawnTool, listFiles, matchModelEntries, multiEdit, readFile, readStateKey, resolveReadStateMap, shell, shellKill, tailTruncate, validateToolArgs, waitTask, writeFile };
|
package/dist/tools.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, i as hydrateReadStateFromSession, r as hashContent, s as readStateKey, t as getReadState } from "./read-state-
|
|
2
|
-
import { At as
|
|
1
|
+
import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, i as hydrateReadStateFromSession, r as hashContent, s as readStateKey, t as getReadState } from "./read-state-CNyeMG7W.js";
|
|
2
|
+
import { At as matchModelEntries, Ct as shell, Dt as multiEdit, Ft as edit, It as validateToolArgs, Mt as createInteractionTool, Nt as grep, Ot as createModelSearchTool, Pt as glob, St as createShellTool, Tt as readFile, _t as isSpawnTool, bt as createSkillsReadTool, ft as writeFile, gt as createSpawnTool, ht as createToolSearchTool, jt as listFiles, kt as formatModelLine, mt as waitTask, pt as WAIT_TASK_TIMED_OUT_PREFIX, vt as createSkillsUseTool, wt as tailTruncate, xt as shellKill, yt as createSkillsRunScriptTool } from "./agent-DO8s7bDf.js";
|
|
3
3
|
export { WAIT_TASK_TIMED_OUT_PREFIX, createInteractionTool, createModelSearchTool, createShellTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, formatModelLine, getReadState, glob, grep, hashContent, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, isSpawnTool, listFiles, matchModelEntries, multiEdit, readFile, readStateKey, resolveReadStateMap, shell, shellKill, tailTruncate, validateToolArgs, waitTask, writeFile };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as buildExtensionPreset, Ct as shell, Dt as multiEdit, Ft as edit, Lt as resolveStorageDirs, Nt as grep, Pt as glob, Tt as readFile$1, V as EMPTY_EXTENSION_REGISTRY, Xt as readKeybindingsRaw, Zt as resolveExtensionKeybindings, ct as composePresets, ft as writeFile$1, gt as createSpawnTool, jt as listFiles, lt as definePreset, mt as waitTask, qt as mergeKeybindings, xt as shellKill } from "./agent-DO8s7bDf.js";
|
|
3
3
|
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId } from "./format-BF745pLL.js";
|
|
4
4
|
import { l as errorMessage } from "./errors-DJUxZg9b.js";
|
|
5
5
|
import { M as findGitRoot$1, i as discoverSkills, j as projectUserPaths } from "./resolve-BPTA1RpX.js";
|
|
6
6
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
7
|
-
import {
|
|
7
|
+
import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-DHKk_tLV.js";
|
|
8
8
|
import { joinSystemPrompt } from "./prompt.js";
|
|
9
9
|
import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
10
10
|
import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions, t as applyInsert } from "./completion-core-BRo86R_L.js";
|
|
11
11
|
import { r as fetchUrl } from "./fetch-url-_5WKWpbQ.js";
|
|
12
12
|
import { webSearch } from "./tools/web-search.js";
|
|
13
|
-
import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-
|
|
13
|
+
import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-kqdSYLMU.js";
|
|
14
14
|
import { C as chunkMarkdownForRender, gt as chatReferenceTokensFromText, m as ownerOf, tt as extractEditPayload, u as capTranscriptEvents, ut as parseEditOutcomesFromResult } from "./turn-operations-CtEpeB_s.js";
|
|
15
15
|
import { createRequire } from "node:module";
|
|
16
16
|
import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
@@ -24,6 +24,16 @@ import { createGunzip } from "node:zlib";
|
|
|
24
24
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
25
25
|
import { jsx } from "react/jsx-runtime";
|
|
26
26
|
//#region \0rolldown/runtime.js
|
|
27
|
+
var __defProp = Object.defineProperty;
|
|
28
|
+
var __exportAll = (all, no_symbols) => {
|
|
29
|
+
let target = {};
|
|
30
|
+
for (var name in all) __defProp(target, name, {
|
|
31
|
+
get: all[name],
|
|
32
|
+
enumerable: true
|
|
33
|
+
});
|
|
34
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
27
37
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
28
38
|
//#endregion
|
|
29
39
|
//#region src/chat/store.ts
|
|
@@ -2011,7 +2021,7 @@ const SHARED_BEHAVIOR = {
|
|
|
2011
2021
|
compactStrategy: "tail",
|
|
2012
2022
|
compactThreshold: 128 * 1024,
|
|
2013
2023
|
compactKeepTurns: 8,
|
|
2014
|
-
elideStaleReads:
|
|
2024
|
+
elideStaleReads: "notice",
|
|
2015
2025
|
mediaKeepTurns: 8,
|
|
2016
2026
|
autoCompact: { threshold: .85 },
|
|
2017
2027
|
toolDisclosure: "lazy",
|
|
@@ -2028,7 +2038,6 @@ const SHARED_BEHAVIOR = {
|
|
|
2028
2038
|
repeatGuard: {},
|
|
2029
2039
|
thinkingDecay: {
|
|
2030
2040
|
afterTurn: 10,
|
|
2031
|
-
factor: .5,
|
|
2032
2041
|
floor: 1024
|
|
2033
2042
|
}
|
|
2034
2043
|
};
|
|
@@ -7406,7 +7415,7 @@ function toEntries(paths, source, maxFiles) {
|
|
|
7406
7415
|
* effort picker as a discoverable, in-place affordance.
|
|
7407
7416
|
*/
|
|
7408
7417
|
function buildHints(options) {
|
|
7409
|
-
const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, updateHint, sessionsScopeAll } = options;
|
|
7418
|
+
const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, updateHint, cacheBreakHint = null, sessionsScopeAll } = options;
|
|
7410
7419
|
if (pending) return [
|
|
7411
7420
|
{
|
|
7412
7421
|
key: "↑↓",
|
|
@@ -7556,6 +7565,7 @@ function buildHints(options) {
|
|
|
7556
7565
|
key: "esc",
|
|
7557
7566
|
label: "sessions"
|
|
7558
7567
|
},
|
|
7568
|
+
...cacheBreakHint ? [cacheBreakHint] : [],
|
|
7559
7569
|
...updateHint ? [updateHint] : []
|
|
7560
7570
|
];
|
|
7561
7571
|
}
|
|
@@ -10130,6 +10140,6 @@ function computeTurnAnchors(items) {
|
|
|
10130
10140
|
};
|
|
10131
10141
|
}
|
|
10132
10142
|
//#endregion
|
|
10133
|
-
export { InteractionsProvider as $, INTERACTION_GUIDANCE_NO_PROMPTS as $n, countClaudeSessionFiles as $t, runOAuthLogin as A, PLAN_AGENT as An, GRUVBOX_DARK as At, useMcpToolToggleSet as B, getArchivedTodosForRun as Bn, ConfigProvider as Bt, projectsFilePath as C, discoverAgentsMd as Cn, toolCallPreview as Cr, clampFps as Ct, formatPathForCwd as D, DEFAULT_AGENT_ID as Dn, resolveChipColor as Dt, writeProjects as E, BUILTIN_AGENTS as En, usageByModel as Er, DEFAULT_THEME as Et, refreshMcpToolsCatalog as F, TODOS_METADATA_KEY as Fn, CATPPUCCIN_MOCHA as Ft, mcpCredentialsPath as G, selectActiveTodos as Gn, chainPositionOf as Gt, indexOfServerRow as H, isTodoTool as Hn, resolveConfig as Ht, saveMcpToolsCache as I, TODOWRITE_TOOL as In, createDiscoverySlot as It, useMcpAuthDispatch as J, ACTIONS_WITH_CARE_DOCTRINE as Jn, providerKeySetChanged as Jt, patchMcpCredential as K, setTodosForRun as Kn, chainsEqual as Kt, subscribeMcpToolsCache as L, TODO_STATUS_GLYPHS as Ln, DiscoveryProvider as Lt, clearMcpToolsCache as M, resolveAgentId as Mn, CATPPUCCIN_FRAPPE as Mt, loadMcpToolsCache as N, singleAgentRegistry as Nn, CATPPUCCIN_LATTE as Nt, fetchOAuthRedirect as O, DEFAULT_BUDGET_EXCLUDE_TOOLS as On, resolveTheme as Ot, mcpToolsCachePath as P, TODOREAD_TOOL as Pn, CATPPUCCIN_MACCHIATO as Pt, ASK_USER_TOOL as Q, INTERACTION_GUIDANCE as Qn, useCompletion as Qt, buildToolToggle as R, TODO_WRITE_COUNTS_METADATA_KEY as Rn, useDiscovery as Rt, matchesSafelistEntry as S, chatAutoCompactBehavior as Sn, titleFromTurns as Sr, SettingsProvider as St, suggestSafelistEntries as T, BUILD_AGENT as Tn, updateToolEventOutcomes as Tr, BUILTIN_THEMES as Tt, parentServerName as U, pickActiveRunId as Un, resolveStoragePaths as Ut, buildVisibleMcpRows as V, getTodosForRun as Vn, useConfig as Vt, createFileMcpCredentialStore as W, pruneTodosByRun as Wn, buildRunModel as Wt, getMcpAuthStatus as X, DOING_TASKS_DOCTRINE as Xn, sanitizeModelChain as Xt, useMcpAuthState as Y, COMMUNICATION_DOCTRINE as Yn, restoreChainFallbacks as Yt, reduceMcpAuth as Z, IDENTITY_PREFIX as Zn, toggleChainEntry as Zt, useSafeModeQueue as _, detectPackageManager as _n, marginTopFor as _r, DEFAULT_SETTINGS as _t, useSurfaces as a, buildMcpServers as an, buildPlanSystem as ar, pendingInteractionsFromTurns as at, getSafelist as b, performSelfUpdate as bn, stripSpawnTokensLine as br, SETTINGS_INPUTS as bt, useStreamBuffer as c, parseMcpsFile as cn, createChatTurnsReadTool as cr, useInteractionsQueue as ct, discoverProjectSkills as d, bootTick as dn, createStateStore as dr, hintsLength as dt, hasClaudeCodeSetup as en, PLAN_MODE_DOCTRINE as er, PRESENT_PLAN_TOOL as et, renderSession as f, buildUpdateHint as fn, deriveSessionTitle as fr, truncateTrailing as ft, useSafeModeActions as g, detectLibc as gn, loadState as gr, useEnabledToggleSet as gt, SafeModeProvider as h, compareSemver as hn, listSessionMeta as hr, listProjectFiles as ht, useSelectStyle as i, upsertMcpServer as in, buildBuildSystem as ir, makeRequestInteraction as it, supportsOAuth as j, accentColor as jn, GRUVBOX_LIGHT as jt, oauthUsesManualCodePaste as k, DEFAULT_PERSIST_EXCLUDE_TOOLS as kn, VAPORWAVE_THEME as kt, buildSkillsConfig as l, tryOpenBrowser as ln, DEFAULT_SESSION_TITLE as lr, EMPTY_HINTS as lt, writeSessionExport as m, checkForUpdate as mn, lastContextSizeFromTurns as mr, shortChord as mt, ThemeProvider as n, mcpsWritePath as nn, SUBAGENT_GUIDANCE as nr, createInteractionTools as nt, useSyntaxStyles as o, defaultMcpsConfigPaths as on, envSection as or, serializeInteractionResponse as ot, resolveSessionExportTarget as p, useUpdateCheck as pn, eventsFromTurns as pr, buildHints as pt, McpAuthProvider as q, useActiveTodos as qn, filterChainFallbacks as qt, useColors as r, removeMcpServer as rn, TOKEN_DISCIPLINE_DOCTRINE as rr, isInteractionTool as rt, useTheme as s, discoverProjectMcps as sn, chatReferenceTokensForPrompt as sr, useInteractionsActions as st, computeTurnAnchors as t, importFromClaudeCode as tn, PLAN_MODE_DOCTRINE_NO_PROMPTS as tr, buildResumedToolResultsTurn as tt, defaultSkillScanPaths as u, bootProfileEnabled as un, compactSummaryEvent as ur, clipHintsToWidth as ut, IMPLICITLY_SAFE_TOOLS as v, parseSemver as vn, saveState as vr, SETTINGS_CATEGORIES as vt, readProjects as w, renderAgentsMdBlock as wn, toolResultText as wr, useSettings as wt, isOnSafelist as x, resolvePlatformPackage as xn, sumRunCosts as xr, SETTINGS_TOGGLES as xt, addToSafelist as y, performInPlaceSelfUpdate as yn, serverToolResultSummary as yr, SETTINGS_CHOICES as yt, useMcpToolToggleMap as z, createTodoTools as zn, useDiscoveryOptional as zt };
|
|
10143
|
+
export { InteractionsProvider as $, INTERACTION_GUIDANCE_NO_PROMPTS as $n, countClaudeSessionFiles as $t, runOAuthLogin as A, PLAN_AGENT as An, GRUVBOX_DARK as At, useMcpToolToggleSet as B, getArchivedTodosForRun as Bn, ConfigProvider as Bt, projectsFilePath as C, discoverAgentsMd as Cn, toolCallPreview as Cr, clampFps as Ct, formatPathForCwd as D, DEFAULT_AGENT_ID as Dn, __exportAll as Dr, resolveChipColor as Dt, writeProjects as E, BUILTIN_AGENTS as En, usageByModel as Er, DEFAULT_THEME as Et, refreshMcpToolsCatalog as F, TODOS_METADATA_KEY as Fn, CATPPUCCIN_MOCHA as Ft, mcpCredentialsPath as G, selectActiveTodos as Gn, chainPositionOf as Gt, indexOfServerRow as H, isTodoTool as Hn, resolveConfig as Ht, saveMcpToolsCache as I, TODOWRITE_TOOL as In, createDiscoverySlot as It, useMcpAuthDispatch as J, ACTIONS_WITH_CARE_DOCTRINE as Jn, providerKeySetChanged as Jt, patchMcpCredential as K, setTodosForRun as Kn, chainsEqual as Kt, subscribeMcpToolsCache as L, TODO_STATUS_GLYPHS as Ln, DiscoveryProvider as Lt, clearMcpToolsCache as M, resolveAgentId as Mn, CATPPUCCIN_FRAPPE as Mt, loadMcpToolsCache as N, singleAgentRegistry as Nn, CATPPUCCIN_LATTE as Nt, fetchOAuthRedirect as O, DEFAULT_BUDGET_EXCLUDE_TOOLS as On, resolveTheme as Ot, mcpToolsCachePath as P, TODOREAD_TOOL as Pn, CATPPUCCIN_MACCHIATO as Pt, ASK_USER_TOOL as Q, INTERACTION_GUIDANCE as Qn, useCompletion as Qt, buildToolToggle as R, TODO_WRITE_COUNTS_METADATA_KEY as Rn, useDiscovery as Rt, matchesSafelistEntry as S, chatAutoCompactBehavior as Sn, titleFromTurns as Sr, SettingsProvider as St, suggestSafelistEntries as T, BUILD_AGENT as Tn, updateToolEventOutcomes as Tr, BUILTIN_THEMES as Tt, parentServerName as U, pickActiveRunId as Un, resolveStoragePaths as Ut, buildVisibleMcpRows as V, getTodosForRun as Vn, useConfig as Vt, createFileMcpCredentialStore as W, pruneTodosByRun as Wn, buildRunModel as Wt, getMcpAuthStatus as X, DOING_TASKS_DOCTRINE as Xn, sanitizeModelChain as Xt, useMcpAuthState as Y, COMMUNICATION_DOCTRINE as Yn, restoreChainFallbacks as Yt, reduceMcpAuth as Z, IDENTITY_PREFIX as Zn, toggleChainEntry as Zt, useSafeModeQueue as _, detectPackageManager as _n, marginTopFor as _r, DEFAULT_SETTINGS as _t, useSurfaces as a, buildMcpServers as an, buildPlanSystem as ar, pendingInteractionsFromTurns as at, getSafelist as b, performSelfUpdate as bn, stripSpawnTokensLine as br, SETTINGS_INPUTS as bt, useStreamBuffer as c, parseMcpsFile as cn, createChatTurnsReadTool as cr, useInteractionsQueue as ct, discoverProjectSkills as d, bootTick as dn, createStateStore as dr, hintsLength as dt, hasClaudeCodeSetup as en, PLAN_MODE_DOCTRINE as er, PRESENT_PLAN_TOOL as et, renderSession as f, buildUpdateHint as fn, deriveSessionTitle as fr, truncateTrailing as ft, useSafeModeActions as g, detectLibc as gn, loadState as gr, useEnabledToggleSet as gt, SafeModeProvider as h, compareSemver as hn, listSessionMeta as hr, listProjectFiles as ht, useSelectStyle as i, upsertMcpServer as in, buildBuildSystem as ir, makeRequestInteraction as it, supportsOAuth as j, accentColor as jn, GRUVBOX_LIGHT as jt, oauthUsesManualCodePaste as k, DEFAULT_PERSIST_EXCLUDE_TOOLS as kn, VAPORWAVE_THEME as kt, buildSkillsConfig as l, tryOpenBrowser as ln, DEFAULT_SESSION_TITLE as lr, EMPTY_HINTS as lt, writeSessionExport as m, checkForUpdate as mn, lastContextSizeFromTurns as mr, shortChord as mt, ThemeProvider as n, mcpsWritePath as nn, SUBAGENT_GUIDANCE as nr, createInteractionTools as nt, useSyntaxStyles as o, defaultMcpsConfigPaths as on, envSection as or, serializeInteractionResponse as ot, resolveSessionExportTarget as p, useUpdateCheck as pn, eventsFromTurns as pr, buildHints as pt, McpAuthProvider as q, useActiveTodos as qn, filterChainFallbacks as qt, useColors as r, removeMcpServer as rn, TOKEN_DISCIPLINE_DOCTRINE as rr, isInteractionTool as rt, useTheme as s, discoverProjectMcps as sn, chatReferenceTokensForPrompt as sr, useInteractionsActions as st, computeTurnAnchors as t, importFromClaudeCode as tn, PLAN_MODE_DOCTRINE_NO_PROMPTS as tr, buildResumedToolResultsTurn as tt, defaultSkillScanPaths as u, bootProfileEnabled as un, compactSummaryEvent as ur, clipHintsToWidth as ut, IMPLICITLY_SAFE_TOOLS as v, parseSemver as vn, saveState as vr, SETTINGS_CATEGORIES as vt, readProjects as w, renderAgentsMdBlock as wn, toolResultText as wr, useSettings as wt, isOnSafelist as x, resolvePlatformPackage as xn, sumRunCosts as xr, SETTINGS_TOGGLES as xt, addToSafelist as y, performInPlaceSelfUpdate as yn, serverToolResultSummary as yr, SETTINGS_CHOICES as yt, useMcpToolToggleMap as z, createTodoTools as zn, useDiscoveryOptional as zt };
|
|
10134
10144
|
|
|
10135
|
-
//# sourceMappingURL=transcript-anchors-
|
|
10145
|
+
//# sourceMappingURL=transcript-anchors-ChQH1fMm.js.map
|