zidane 6.2.24 → 6.2.26
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/dist/{acp-CTn1kFvP.js → acp-CNZqD1Fw.js} +3 -3
- package/dist/{acp-CTn1kFvP.js.map → acp-CNZqD1Fw.js.map} +1 -1
- package/dist/acp-cli.js +4 -4
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-tLfGSSQw.js → agent--VPMZ0nT.js} +267 -16
- package/dist/agent--VPMZ0nT.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{auth-CpdQebUy.js → auth-DIT_DMwa.js} +2 -2
- package/dist/{auth-CpdQebUy.js.map → auth-DIT_DMwa.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +4 -4
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +9 -2
- package/dist/contexts/daytona.js.map +1 -1
- package/dist/contexts/docker.js +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +3 -4
- package/dist/contexts/e2b.js.map +1 -1
- package/dist/{contexts-A4ep-iJs.js → contexts-0rmrBhTK.js} +8 -5
- package/dist/contexts-0rmrBhTK.js.map +1 -0
- package/dist/contexts.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{output-cap-kBUHBlnq.js → glob-DluQFSw1.js} +2 -50
- package/dist/glob-DluQFSw1.js.map +1 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/history-search-worker.js +6 -1
- package/dist/history-search-worker.js.map +1 -1
- package/dist/{index-8zm_hwdY.d.ts → index-AVZ6pYpi.d.ts} +212 -96
- package/dist/index-AVZ6pYpi.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/{inline-autocomplete-BAwBcZtD.js → inline-autocomplete-CbcdZpfC.js} +2 -1
- package/dist/inline-autocomplete-CbcdZpfC.js.map +1 -0
- package/dist/{login-DfJGuHUj.js → login-afiadwf0.js} +34 -18
- package/dist/login-afiadwf0.js.map +1 -0
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/output-cap-DM1HrgIp.js +100 -0
- package/dist/output-cap-DM1HrgIp.js.map +1 -0
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/{run-summary-nD3IQ4ZQ.js → run-summary-BU_NgwUT.js} +17 -1
- package/dist/run-summary-BU_NgwUT.js.map +1 -0
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-CZJYzP4x.d.ts → tool-formatters-Dual3Hdl.d.ts} +2 -2
- package/dist/{tool-formatters-CZJYzP4x.d.ts.map → tool-formatters-Dual3Hdl.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 +1 -1
- package/dist/{transcript-anchors-CJ2dmpQk.d.ts → transcript-anchors-CG85bieG.d.ts} +2 -2
- package/dist/transcript-anchors-CG85bieG.d.ts.map +1 -0
- package/dist/{transcript-anchors-Ded7iJjG.js → transcript-anchors-CnmxZ8QR.js} +88 -12
- package/dist/transcript-anchors-CnmxZ8QR.js.map +1 -0
- package/dist/tui.d.ts +44 -7
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +1397 -1124
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-ClGa1vnb.js → turn-operations-4tnvKwfJ.js} +77 -13
- package/dist/turn-operations-4tnvKwfJ.js.map +1 -0
- package/dist/{turn-operations-DZYpXcU1.d.ts → turn-operations-BUYaSCL3.d.ts} +3 -3
- package/dist/{turn-operations-DZYpXcU1.d.ts.map → turn-operations-BUYaSCL3.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +2 -1
- package/dist/agent-tLfGSSQw.js.map +0 -1
- package/dist/contexts-A4ep-iJs.js.map +0 -1
- package/dist/index-8zm_hwdY.d.ts.map +0 -1
- package/dist/inline-autocomplete-BAwBcZtD.js.map +0 -1
- package/dist/login-DfJGuHUj.js.map +0 -1
- package/dist/output-cap-kBUHBlnq.js.map +0 -1
- package/dist/run-summary-nD3IQ4ZQ.js.map +0 -1
- package/dist/transcript-anchors-CJ2dmpQk.d.ts.map +0 -1
- package/dist/transcript-anchors-Ded7iJjG.js.map +0 -1
- package/dist/turn-operations-ClGa1vnb.js.map +0 -1
package/dist/acp-cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { r as createProcessContext } from "./contexts-
|
|
2
|
+
import { It as resolveStorageDirs, ut as basic_default } from "./agent--VPMZ0nT.js";
|
|
3
|
+
import { r as createProcessContext } from "./contexts-0rmrBhTK.js";
|
|
4
4
|
import { createSandboxContext } from "./contexts/sandbox.js";
|
|
5
5
|
import { m as openaiCompat } from "./openai-compat-pHI0kBWH.js";
|
|
6
6
|
import { t as anthropic } from "./anthropic-uKvj1yle.js";
|
|
@@ -10,8 +10,8 @@ import { cerebras } from "./providers/cerebras.js";
|
|
|
10
10
|
import { t as xai } from "./xai-BwhzoehX.js";
|
|
11
11
|
import { openai } from "./providers/openai.js";
|
|
12
12
|
import { openrouter } from "./providers/openrouter.js";
|
|
13
|
-
import { d as StartUsageError, f as buildStartLocalOptions, h as startProviderNames, i as withAcpDefaultTools, m as startLocalArgOptions, p as parseStartArgValues, t as runAcpStdioServer } from "./acp-
|
|
14
|
-
import { f as credKeyOf, i as readCredentials, l as BUILTIN_PROVIDERS, r as credentialsPath, t as detectAuth, y as modelsForDescriptor } from "./auth-
|
|
13
|
+
import { d as StartUsageError, f as buildStartLocalOptions, h as startProviderNames, i as withAcpDefaultTools, m as startLocalArgOptions, p as parseStartArgValues, t as runAcpStdioServer } from "./acp-CNZqD1Fw.js";
|
|
14
|
+
import { f as credKeyOf, i as readCredentials, l as BUILTIN_PROVIDERS, r as credentialsPath, t as detectAuth, y as modelsForDescriptor } from "./auth-DIT_DMwa.js";
|
|
15
15
|
import { createDaytonaProvider } from "./contexts/daytona.js";
|
|
16
16
|
import { createDockerContext } from "./contexts/docker.js";
|
|
17
17
|
import { createE2BProvider } from "./contexts/e2b.js";
|
package/dist/acp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Li as AgentOptions, Md as AgentBehavior, Pf as TurnUsage, Pi as Agent, Tf as ToolResultContent, em as Provider, if as PromptPart, pf as SessionContentBlock, qd as McpServerConfig, rp as Session, sp as SessionStore, t as Preset, zf as ToolDef } from "./index-
|
|
1
|
+
import { Li as AgentOptions, Md as AgentBehavior, Pf as TurnUsage, Pi as Agent, Tf as ToolResultContent, em as Provider, if as PromptPart, pf as SessionContentBlock, qd as McpServerConfig, rp as Session, sp as SessionStore, t as Preset, zf as ToolDef } from "./index-AVZ6pYpi.js";
|
|
2
2
|
import { c as ExecutionContext } from "./types-BDccavwj.js";
|
|
3
3
|
import { Readable, Writable } from "node:stream";
|
|
4
4
|
|
package/dist/acp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as createJsonRpcConnection, a as wrapToolsForAcpClient, c as sessionBlocksToAcp, g as JsonRpcRemoteError, i as withAcpDefaultTools, l as stopReasonFromRun, n as AcpProtocolError, o as acpMcpServersToZidane, r as createAcpServer, s as acpPromptToPromptParts, t as runAcpStdioServer, u as toolResultToAcpContent } from "./acp-
|
|
1
|
+
import { _ as createJsonRpcConnection, a as wrapToolsForAcpClient, c as sessionBlocksToAcp, g as JsonRpcRemoteError, i as withAcpDefaultTools, l as stopReasonFromRun, n as AcpProtocolError, o as acpMcpServersToZidane, r as createAcpServer, s as acpPromptToPromptParts, t as runAcpStdioServer, u as toolResultToAcpContent } from "./acp-CNZqD1Fw.js";
|
|
2
2
|
export { AcpProtocolError, JsonRpcRemoteError, acpMcpServersToZidane, acpPromptToPromptParts, createAcpServer, createJsonRpcConnection, runAcpStdioServer, sessionBlocksToAcp, stopReasonFromRun, toolResultToAcpContent, withAcpDefaultTools, wrapToolsForAcpClient };
|
|
@@ -5,9 +5,10 @@ import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, n as g
|
|
|
5
5
|
import { n as estimateTokens, r as utf8ByteLength } from "./utils-ngQzYzZD.js";
|
|
6
6
|
import { t as buildContextBreakdown } from "./context-breakdown-Dzo25N45.js";
|
|
7
7
|
import { a as formatDuration, c as previewLine, o as formatTaskStatus, s as formatTaskSummary } from "./format-BF745pLL.js";
|
|
8
|
-
import {
|
|
8
|
+
import { i as parseGitLsFiles, r as GIT_LS_FILES_COMMAND } from "./glob-DluQFSw1.js";
|
|
9
9
|
import { n as alwaysQuote, r as shellQuote } from "./exec-file-size-PXkr-MGA.js";
|
|
10
|
-
import {
|
|
10
|
+
import { i as isOutputExceededMessage } from "./output-cap-DM1HrgIp.js";
|
|
11
|
+
import { r as createProcessContext, t as resolveDetachedTasksCapability } from "./contexts-0rmrBhTK.js";
|
|
11
12
|
import { i as AgentProviderError, l as errorMessage, m as toTypedError, n as AgentBudgetExceededError, o as AgentToolPairingError, t as AgentAbortedError, u as isAbortLikeError } from "./errors-DJUxZg9b.js";
|
|
12
13
|
import { C as stripShellInterpolations, O as validateResourcePathReal, S as interpolateShellCommands, _ as lastLine, b as resolveSubdirRoot, d as installAllowedToolsGate, f as createSkillActivationState, g as fetchInstallSource, h as defaultWhich, j as projectUserPaths, l as buildCatalog, m as defaultExec, p as InstallSourceError, t as resolveSkills, v as parseInstallSource, x as escapeXml, y as resolveNpmVersion } from "./resolve-BPTA1RpX.js";
|
|
13
14
|
import { n as writeFileAtomicAsync, t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
@@ -25,7 +26,7 @@ import { basename, delimiter, dirname, isAbsolute, join, resolve, sep } from "no
|
|
|
25
26
|
import { createHooks } from "hookable";
|
|
26
27
|
import { Buffer } from "node:buffer";
|
|
27
28
|
import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
28
|
-
import { readdir, rm, stat, unlink } from "node:fs/promises";
|
|
29
|
+
import { copyFile, mkdir, readdir, rm, stat, unlink } from "node:fs/promises";
|
|
29
30
|
import { pathToFileURL } from "node:url";
|
|
30
31
|
import { homedir, tmpdir } from "node:os";
|
|
31
32
|
import { createHash } from "node:crypto";
|
|
@@ -215,6 +216,7 @@ const DEFAULT_FAILED_MUTATIONS = 3;
|
|
|
215
216
|
const DEFAULT_NOOP_MUTATIONS = 3;
|
|
216
217
|
const DEFAULT_VALIDATION_REJECTS = 3;
|
|
217
218
|
const DEFAULT_TOOL_ERRORS = 3;
|
|
219
|
+
const DEFAULT_SINGLE_CALL_TURNS = 3;
|
|
218
220
|
const DEFAULT_MAX_NUDGES$1 = 3;
|
|
219
221
|
const DEFAULT_READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
220
222
|
"read_file",
|
|
@@ -228,6 +230,17 @@ const DEFAULT_READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
228
230
|
"skills_read",
|
|
229
231
|
"todoread"
|
|
230
232
|
]);
|
|
233
|
+
/**
|
|
234
|
+
* Discovery chains are inherently sequential — each call's input needs the
|
|
235
|
+
* prior result (`tool_search` → load → call, `skills_read` after `skills_use`)
|
|
236
|
+
* and `todoread` is a singleton by nature. Their single-call turns are not
|
|
237
|
+
* "unbatched", so they reset the streak instead of extending it.
|
|
238
|
+
*/
|
|
239
|
+
const SINGLE_CALL_EXEMPT_TOOLS = /* @__PURE__ */ new Set([
|
|
240
|
+
"tool_search",
|
|
241
|
+
"skills_read",
|
|
242
|
+
"todoread"
|
|
243
|
+
]);
|
|
231
244
|
function threshold(value, fallback) {
|
|
232
245
|
if (value === false) return false;
|
|
233
246
|
return clampPositiveInt(value, fallback);
|
|
@@ -239,6 +252,7 @@ function defaultMessage(kind) {
|
|
|
239
252
|
case "noopMutations": return "Several mutation calls produced no file changes. Check whether the requested state is already reached; if so, report that instead of issuing more edits.";
|
|
240
253
|
case "validationRejects": return "Several tool calls had invalid arguments. Re-check the advertised tool schema and emit one well-formed native tool call.";
|
|
241
254
|
case "toolErrors": return "Several tool calls errored. Pivot from repeating the failing call: inspect the error, adjust the input or approach, then continue with one concrete action.";
|
|
255
|
+
case "singleCallTurns": return "You are issuing one tool call per response. Independent read-only calls (file reads, searches, listings) have no dependencies between them — batch all of them into a single response instead of one per turn. Only sequence calls whose inputs depend on a previous result.";
|
|
242
256
|
}
|
|
243
257
|
}
|
|
244
258
|
function messageFor(config, kind, count) {
|
|
@@ -256,10 +270,12 @@ function installProgressNudges(hooks, config, deps) {
|
|
|
256
270
|
const noopMutations = threshold(resolvedConfig.noopMutations, DEFAULT_NOOP_MUTATIONS);
|
|
257
271
|
const validationRejects = threshold(resolvedConfig.validationRejects, DEFAULT_VALIDATION_REJECTS);
|
|
258
272
|
const toolErrors = threshold(resolvedConfig.toolErrors, DEFAULT_TOOL_ERRORS);
|
|
273
|
+
const singleCallTurns = resolvedConfig.singleCallTurns === void 0 ? false : threshold(resolvedConfig.singleCallTurns, DEFAULT_SINGLE_CALL_TURNS);
|
|
259
274
|
const readOnlyTools = /* @__PURE__ */ new Set([...resolvedConfig.readOnlyTools ?? DEFAULT_READ_ONLY_TOOLS]);
|
|
260
275
|
let nudgeCount = 0;
|
|
261
276
|
const fired = /* @__PURE__ */ new Set();
|
|
262
277
|
let consecutiveReadOnlyTurns = 0;
|
|
278
|
+
let consecutiveSingleCallTurns = 0;
|
|
263
279
|
let consecutiveFailedMutations = 0;
|
|
264
280
|
let consecutiveNoopMutations = 0;
|
|
265
281
|
let validationRejectCount = 0;
|
|
@@ -301,8 +317,17 @@ function installProgressNudges(hooks, config, deps) {
|
|
|
301
317
|
}),
|
|
302
318
|
hooks.hook("turn:after", (ctx) => {
|
|
303
319
|
const entries = Object.entries(ctx.toolCounts.turn).filter(([, count]) => count > 0);
|
|
304
|
-
if (entries.length === 0)
|
|
305
|
-
|
|
320
|
+
if (entries.length === 0) {
|
|
321
|
+
consecutiveSingleCallTurns = 0;
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const readOnly = entries.every(([tool]) => readOnlyTools.has(tool));
|
|
325
|
+
const totalCalls = entries.reduce((sum, [, count]) => sum + count, 0);
|
|
326
|
+
if (readOnly && totalCalls === 1 && !SINGLE_CALL_EXEMPT_TOOLS.has(entries[0][0])) {
|
|
327
|
+
consecutiveSingleCallTurns++;
|
|
328
|
+
maybeNudge("singleCallTurns", consecutiveSingleCallTurns, singleCallTurns);
|
|
329
|
+
} else consecutiveSingleCallTurns = 0;
|
|
330
|
+
if (!readOnly) {
|
|
306
331
|
consecutiveReadOnlyTurns = 0;
|
|
307
332
|
return;
|
|
308
333
|
}
|
|
@@ -3316,6 +3341,11 @@ function createInteractionTool(options) {
|
|
|
3316
3341
|
function entryPath(entry) {
|
|
3317
3342
|
return typeof entry === "string" ? entry : entry.path;
|
|
3318
3343
|
}
|
|
3344
|
+
/**
|
|
3345
|
+
* Entry ceiling — matches glob's default limit so a pathological
|
|
3346
|
+
* 100k-entry directory can't flood the context window.
|
|
3347
|
+
*/
|
|
3348
|
+
const MAX_ENTRIES = 1e3;
|
|
3319
3349
|
const listFiles = {
|
|
3320
3350
|
isConcurrencySafe: true,
|
|
3321
3351
|
spec: {
|
|
@@ -3333,7 +3363,9 @@ const listFiles = {
|
|
|
3333
3363
|
async execute({ path }, ctx) {
|
|
3334
3364
|
const target = path || ".";
|
|
3335
3365
|
try {
|
|
3336
|
-
|
|
3366
|
+
const entries = await ctx.execution.listFiles(ctx.handle, target);
|
|
3367
|
+
if (entries.length > MAX_ENTRIES) return `${entries.slice(0, MAX_ENTRIES).map(entryPath).join("\n")}\n…(${entries.length - MAX_ENTRIES} more entries omitted; use glob with a narrower pattern)`;
|
|
3368
|
+
return entries.map(entryPath).join("\n") || "(empty directory)";
|
|
3337
3369
|
} catch (err) {
|
|
3338
3370
|
ctx.reportOutcome?.("failed");
|
|
3339
3371
|
const message = errorMessage(err);
|
|
@@ -3964,6 +3996,8 @@ const readFile$1 = {
|
|
|
3964
3996
|
if (extMedia) {
|
|
3965
3997
|
const sizeCap = normalizeReadFileInteger(maxBytes, defaults.attachmentMaxBytes);
|
|
3966
3998
|
try {
|
|
3999
|
+
const probed = await ctx.execution.fileSize?.(ctx.handle, path) ?? null;
|
|
4000
|
+
if (probed !== null && sizeCap > 0 && probed > sizeCap) return `[image too large to inline: ${path}, ${probed} bytes (cap ${sizeCap}). Raise maxBytes, or use shell to inspect.]`;
|
|
3967
4001
|
const { base64, byteLength } = await readFileAsBase64(ctx.execution, ctx.handle, path);
|
|
3968
4002
|
if (sizeCap > 0 && byteLength > sizeCap) return `[image too large to inline: ${path}, ${byteLength} bytes (cap ${sizeCap}). Raise maxBytes, or use shell to inspect.]`;
|
|
3969
4003
|
const imgMedia = reconcileImageMediaType(extMedia, base64);
|
|
@@ -3984,6 +4018,8 @@ const readFile$1 = {
|
|
|
3984
4018
|
if (docMedia) {
|
|
3985
4019
|
const sizeCap = normalizeReadFileInteger(maxBytes, defaults.attachmentMaxBytes);
|
|
3986
4020
|
try {
|
|
4021
|
+
const probed = await ctx.execution.fileSize?.(ctx.handle, path) ?? null;
|
|
4022
|
+
if (probed !== null && sizeCap > 0 && probed > sizeCap) return `[document too large to attach: ${path}, ${probed} bytes (cap ${sizeCap}). Raise maxBytes, or use shell/read text extraction to inspect.]`;
|
|
3987
4023
|
const { base64, byteLength } = await readFileAsBase64(ctx.execution, ctx.handle, path);
|
|
3988
4024
|
if (sizeCap > 0 && byteLength > sizeCap) return `[document too large to attach: ${path}, ${byteLength} bytes (cap ${sizeCap}). Raise maxBytes, or use shell/read text extraction to inspect.]`;
|
|
3989
4025
|
if (docMedia === "application/pdf" && !isPdfBase64(base64)) return `[binary file: ${path}, ${byteLength} bytes; extension suggests PDF but file header does not start with %PDF-]`;
|
|
@@ -5344,7 +5380,8 @@ function buildSpawnTool(options, state) {
|
|
|
5344
5380
|
let index = childRuns.findIndex((r) => r.label === wanted);
|
|
5345
5381
|
if (index < 0) {
|
|
5346
5382
|
const labelMatch = /^child-(\d+)$/.exec(wanted);
|
|
5347
|
-
|
|
5383
|
+
const anyLabeled = childRuns.some((r) => r.label !== void 0);
|
|
5384
|
+
index = labelMatch && !anyLabeled ? Number(labelMatch[1]) - 1 : childRuns.findIndex((r) => r.id === wanted);
|
|
5348
5385
|
}
|
|
5349
5386
|
const run = index >= 0 ? childRuns[index] : void 0;
|
|
5350
5387
|
if (!run) return {
|
|
@@ -9415,6 +9452,147 @@ async function persistElidedToolResults(messages, items, opts) {
|
|
|
9415
9452
|
});
|
|
9416
9453
|
}
|
|
9417
9454
|
/**
|
|
9455
|
+
* Subdirectory of the session persist dir holding blobs written by
|
|
9456
|
+
* {@link releaseReplacedTurnContent}. Deliberately separate from the
|
|
9457
|
+
* top-level `<callId>.txt` blobs: once a released stub round-trips into the
|
|
9458
|
+
* session store (`session.save()` is delete-all-and-reinsert), the blob is
|
|
9459
|
+
* the ONLY remaining copy of that content — it must never be LRU-evicted by
|
|
9460
|
+
* {@link enforcePersistDirCap}, whose sweep only scans top-level `*.txt`
|
|
9461
|
+
* files. Released blobs live and die with the session
|
|
9462
|
+
* ({@link cleanupPersistedSession} removes the dir recursively).
|
|
9463
|
+
*/
|
|
9464
|
+
const RELEASED_BLOB_SUBDIR = "released";
|
|
9465
|
+
/**
|
|
9466
|
+
* Post-compaction memory release — swap the in-memory bodies of turns a
|
|
9467
|
+
* compaction summary just replaced for recoverable `<persisted-output …>`
|
|
9468
|
+
* stubs, so a long-lived host process stops retaining tool output the model
|
|
9469
|
+
* can never see again (`applyCompactSummaryCutoff` elides these turns from
|
|
9470
|
+
* every future wire projection).
|
|
9471
|
+
*
|
|
9472
|
+
* MUTATES the passed turn objects in place — that is the point: the session's
|
|
9473
|
+
* `data.turns` is the single canonical in-memory copy, and releasing anywhere
|
|
9474
|
+
* else would leave it pinned. Only `tool_result` blocks with large string /
|
|
9475
|
+
* all-text outputs are touched (media already lives behind content refs);
|
|
9476
|
+
* everything else — prompts, assistant text, thinking — is kept verbatim.
|
|
9477
|
+
*
|
|
9478
|
+
* Durability contract: each released output is written to
|
|
9479
|
+
* `<persistDir>/released/<callId>.txt` first, so even if a host later
|
|
9480
|
+
* round-trips the stubbed turns to the session store, the content stays
|
|
9481
|
+
* retrievable from the stub's path. Blobs are always written HOST-side
|
|
9482
|
+
* (never through an execution context): the session store is host-local,
|
|
9483
|
+
* so its recovery copy must be too — a sandboxed context write would
|
|
9484
|
+
* strand the only durable copy inside an ephemeral container. A blob write
|
|
9485
|
+
* failure skips that block — the original stays in memory rather than
|
|
9486
|
+
* being lost.
|
|
9487
|
+
*
|
|
9488
|
+
* Opt-in via `autoCompact.releaseReplacedTurns`: hosts that need the lossless
|
|
9489
|
+
* inline transcript (SFT capture, exporters) keep the default-off behavior.
|
|
9490
|
+
*/
|
|
9491
|
+
async function releaseReplacedTurnContent(turns, replacedTurnIds, opts) {
|
|
9492
|
+
const result = {
|
|
9493
|
+
releasedBlocks: 0,
|
|
9494
|
+
releasedBytes: 0
|
|
9495
|
+
};
|
|
9496
|
+
if (replacedTurnIds.size === 0 || !isAbsolute(opts.persistDir)) return result;
|
|
9497
|
+
const minBytes = opts.minBytes ?? 2048;
|
|
9498
|
+
const blobDir = join(opts.persistDir, RELEASED_BLOB_SUBDIR);
|
|
9499
|
+
const replaced = turns.filter((t) => t.id !== void 0 && replacedTurnIds.has(t.id));
|
|
9500
|
+
const toolNameByCallId = /* @__PURE__ */ new Map();
|
|
9501
|
+
for (const turn of replaced) for (const block of turn.content) if (block.type === "tool_call") toolNameByCallId.set(block.id, block.name);
|
|
9502
|
+
const callIdOccurrences = /* @__PURE__ */ new Map();
|
|
9503
|
+
for (const turn of replaced) for (let i = 0; i < turn.content.length; i++) {
|
|
9504
|
+
const block = turn.content[i];
|
|
9505
|
+
if (block.type !== "tool_result") continue;
|
|
9506
|
+
const ordinal = (callIdOccurrences.get(block.callId) ?? 0) + 1;
|
|
9507
|
+
callIdOccurrences.set(block.callId, ordinal);
|
|
9508
|
+
const text = textForPersistence(block.output);
|
|
9509
|
+
if (text === null || text.startsWith("<persisted-output tool=\"")) continue;
|
|
9510
|
+
const bytes = utf8ByteLength(text);
|
|
9511
|
+
if (bytes < minBytes) continue;
|
|
9512
|
+
if (!SAFE_CALL_ID.test(block.callId) || block.callId.includes("..")) continue;
|
|
9513
|
+
const persistedPath = join(blobDir, ordinal === 1 ? `${block.callId}.txt` : `${block.callId}.${ordinal}.txt`);
|
|
9514
|
+
let exists = false;
|
|
9515
|
+
try {
|
|
9516
|
+
exists = (await stat(persistedPath)).isFile();
|
|
9517
|
+
} catch {
|
|
9518
|
+
exists = false;
|
|
9519
|
+
}
|
|
9520
|
+
if (!exists) try {
|
|
9521
|
+
await writeAtomic(persistedPath, text);
|
|
9522
|
+
} catch {
|
|
9523
|
+
continue;
|
|
9524
|
+
}
|
|
9525
|
+
turn.content[i] = {
|
|
9526
|
+
...block,
|
|
9527
|
+
output: buildPersistedStub({
|
|
9528
|
+
toolName: toolNameByCallId.get(block.callId) ?? "tool",
|
|
9529
|
+
originalBytes: bytes,
|
|
9530
|
+
persistedPath,
|
|
9531
|
+
output: text,
|
|
9532
|
+
previewBytes: ELIDE_PERSIST_PREVIEW_BYTES
|
|
9533
|
+
})
|
|
9534
|
+
};
|
|
9535
|
+
result.releasedBlocks++;
|
|
9536
|
+
result.releasedBytes += bytes;
|
|
9537
|
+
}
|
|
9538
|
+
return result;
|
|
9539
|
+
}
|
|
9540
|
+
/**
|
|
9541
|
+
* Re-home `<persisted-output …>` stubs when turns are copied into a NEW
|
|
9542
|
+
* session (fork): released blob paths are per-session
|
|
9543
|
+
* (`resolvePersistDir` keys on the session id), so a fork that keeps the
|
|
9544
|
+
* origin's paths loses its content the moment the origin session is
|
|
9545
|
+
* deleted ({@link cleanupPersistedSession} removes the origin's blob dir).
|
|
9546
|
+
* Copies each referenced blob under `fromPersistDir` into the same
|
|
9547
|
+
* relative location under `toPersistDir` and rewrites the stub's `path`
|
|
9548
|
+
* attribute. Copy-on-write: input turns are never mutated (they are
|
|
9549
|
+
* usually shared with the origin session's live `data.turns`); a new turn
|
|
9550
|
+
* object is returned only where a stub was rewritten. A missing/uncopyable
|
|
9551
|
+
* blob leaves that stub pointing at the origin — no worse than before.
|
|
9552
|
+
*
|
|
9553
|
+
* Prefix matching happens on the XML-escaped attribute text: `escapeXml`
|
|
9554
|
+
* maps characters independently, so `escapeXml(a + b)` ===
|
|
9555
|
+
* `escapeXml(a) + escapeXml(b)` and a prefix match on escaped text is
|
|
9556
|
+
* exact. Blob filenames are `SAFE_CALL_ID`-constrained (`[\w.-]`), so the
|
|
9557
|
+
* relative remainder is escape-invariant.
|
|
9558
|
+
*/
|
|
9559
|
+
async function rehomePersistedStubs(turns, fromPersistDir, toPersistDir) {
|
|
9560
|
+
if (!isAbsolute(fromPersistDir) || !isAbsolute(toPersistDir) || fromPersistDir === toPersistDir) return [...turns];
|
|
9561
|
+
const fromPrefix = `path="${escapeXml(fromPersistDir)}/`;
|
|
9562
|
+
const out = [];
|
|
9563
|
+
for (const turn of turns) {
|
|
9564
|
+
let content;
|
|
9565
|
+
for (let i = 0; i < turn.content.length; i++) {
|
|
9566
|
+
const block = turn.content[i];
|
|
9567
|
+
if (block.type !== "tool_result" || typeof block.output !== "string" || !block.output.startsWith("<persisted-output tool=\"")) continue;
|
|
9568
|
+
const start = block.output.indexOf(fromPrefix);
|
|
9569
|
+
if (start === -1) continue;
|
|
9570
|
+
const restStart = start + fromPrefix.length;
|
|
9571
|
+
const end = block.output.indexOf("\"", restStart);
|
|
9572
|
+
if (end === -1) continue;
|
|
9573
|
+
const relative = block.output.slice(restStart, end);
|
|
9574
|
+
if (relative.includes("..")) continue;
|
|
9575
|
+
try {
|
|
9576
|
+
const target = join(toPersistDir, relative);
|
|
9577
|
+
await mkdir(dirname(target), { recursive: true });
|
|
9578
|
+
await copyFile(join(fromPersistDir, relative), target);
|
|
9579
|
+
} catch {
|
|
9580
|
+
continue;
|
|
9581
|
+
}
|
|
9582
|
+
content ??= [...turn.content];
|
|
9583
|
+
content[i] = {
|
|
9584
|
+
...block,
|
|
9585
|
+
output: `${block.output.slice(0, start)}path="${escapeXml(toPersistDir)}/${relative}${block.output.slice(end)}`
|
|
9586
|
+
};
|
|
9587
|
+
}
|
|
9588
|
+
out.push(content ? {
|
|
9589
|
+
...turn,
|
|
9590
|
+
content
|
|
9591
|
+
} : turn);
|
|
9592
|
+
}
|
|
9593
|
+
return out;
|
|
9594
|
+
}
|
|
9595
|
+
/**
|
|
9418
9596
|
* Write-then-rename for atomicity — delegates to the shared
|
|
9419
9597
|
* {@link writeFileAtomicAsync} helper (unique pid+counter tmp suffix,
|
|
9420
9598
|
* fsync before rename, tmp cleanup on failure). Creates the parent
|
|
@@ -9769,6 +9947,24 @@ function applyCompactSummaryCutoff(turns) {
|
|
|
9769
9947
|
const COMPACTION_STUB = "[…elided: older tool output trimmed to fit the context budget.]";
|
|
9770
9948
|
const COMPACTION_STUB_BYTES = toolOutputByteLength(COMPACTION_STUB);
|
|
9771
9949
|
const COMPACT_CHUNK_TURNS = 8;
|
|
9950
|
+
/**
|
|
9951
|
+
* Cross-turn memo for `toolOutputBudgetByteLength`, keyed on the tool_result
|
|
9952
|
+
* block object. The wire pipeline preserves block references for unchanged
|
|
9953
|
+
* blocks (sanitize/alias/elision copy only what they touch), so the same
|
|
9954
|
+
* block objects flow through the byte-accounting loops on every turn of a
|
|
9955
|
+
* run. Without the memo, tail compaction re-measures the ENTIRE transcript's
|
|
9956
|
+
* tool output each turn — O(total transcript bytes) per turn, O(n²) per run.
|
|
9957
|
+
* Blocks are immutable by pipeline convention; a transform that changes an
|
|
9958
|
+
* output produces a new object, which simply misses the memo once.
|
|
9959
|
+
*/
|
|
9960
|
+
const toolResultBudgetBytesMemo = /* @__PURE__ */ new WeakMap();
|
|
9961
|
+
function memoizedToolResultBudgetBytes(block) {
|
|
9962
|
+
const hit = toolResultBudgetBytesMemo.get(block);
|
|
9963
|
+
if (hit !== void 0) return hit;
|
|
9964
|
+
const bytes = toolOutputBudgetByteLength(block.output);
|
|
9965
|
+
toolResultBudgetBytesMemo.set(block, bytes);
|
|
9966
|
+
return bytes;
|
|
9967
|
+
}
|
|
9772
9968
|
function applyTailCompaction(messages, threshold, keepTurns, options) {
|
|
9773
9969
|
const elidedReadPaths = [];
|
|
9774
9970
|
const persistableElided = [];
|
|
@@ -9780,7 +9976,7 @@ function applyTailCompaction(messages, threshold, keepTurns, options) {
|
|
|
9780
9976
|
persistableElided
|
|
9781
9977
|
};
|
|
9782
9978
|
let totalBytes = 0;
|
|
9783
|
-
for (const msg of messages) for (const block of msg.content) if (block.type === "tool_result") totalBytes +=
|
|
9979
|
+
for (const msg of messages) for (const block of msg.content) if (block.type === "tool_result") totalBytes += memoizedToolResultBudgetBytes(block);
|
|
9784
9980
|
if (totalBytes <= threshold) return {
|
|
9785
9981
|
messages,
|
|
9786
9982
|
elidedReadPaths,
|
|
@@ -9796,7 +9992,7 @@ function applyTailCompaction(messages, threshold, keepTurns, options) {
|
|
|
9796
9992
|
let keptBytes = 0;
|
|
9797
9993
|
let budgetCutoff = floorCutoff;
|
|
9798
9994
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
9799
|
-
for (const block of messages[i].content) if (block.type === "tool_result") keptBytes +=
|
|
9995
|
+
for (const block of messages[i].content) if (block.type === "tool_result") keptBytes += memoizedToolResultBudgetBytes(block);
|
|
9800
9996
|
if (keptBytes > threshold) {
|
|
9801
9997
|
budgetCutoff = i + 1;
|
|
9802
9998
|
break;
|
|
@@ -10418,11 +10614,58 @@ async function runLoop(ctx) {
|
|
|
10418
10614
|
unregisterTtftTool();
|
|
10419
10615
|
}
|
|
10420
10616
|
}
|
|
10617
|
+
/**
|
|
10618
|
+
* Per-run LRU for resolved content-ref payloads, keyed by `type:ref`.
|
|
10619
|
+
*
|
|
10620
|
+
* Refs are content-addressed (`attachment://<hash>` and persist-dir blobs are
|
|
10621
|
+
* immutable once written), so within a run the same ref always resolves to the
|
|
10622
|
+
* same bytes — but the wire pipeline re-resolves EVERY ref in the history on
|
|
10623
|
+
* EVERY turn (resolution runs before media age-out, which then discards most
|
|
10624
|
+
* of the resolved base64 again). Without this cache an image-heavy session
|
|
10625
|
+
* re-reads and re-base64s each attachment from disk once per turn, O(refs)
|
|
10626
|
+
* disk I/O per turn → O(turns × refs) per run.
|
|
10627
|
+
*
|
|
10628
|
+
* Keyed on the LoopContext via WeakMap so the cache dies with the run and no
|
|
10629
|
+
* cross-run staleness question arises. Byte-bounded (UTF-8 bytes, measured
|
|
10630
|
+
* once at insert — `.length` counts UTF-16 code units and would let the
|
|
10631
|
+
* budget retain up to 2× its nominal size on multi-byte text), evicting
|
|
10632
|
+
* oldest-first (Map insertion order; hits re-insert to refresh recency).
|
|
10633
|
+
*/
|
|
10634
|
+
const CONTENT_REF_CACHE_MAX_BYTES = 64 * 1024 * 1024;
|
|
10635
|
+
const contentRefCaches = /* @__PURE__ */ new WeakMap();
|
|
10421
10636
|
async function resolveContentRefsForWire(ctx, messages) {
|
|
10422
10637
|
return resolveContentRefsInMessages(messages, { resolveContentRef: async (block) => {
|
|
10638
|
+
const key = `${block.type}:${block.ref}`;
|
|
10639
|
+
let cache = contentRefCaches.get(ctx);
|
|
10640
|
+
if (!cache) {
|
|
10641
|
+
cache = {
|
|
10642
|
+
bytes: 0,
|
|
10643
|
+
entries: /* @__PURE__ */ new Map()
|
|
10644
|
+
};
|
|
10645
|
+
contentRefCaches.set(ctx, cache);
|
|
10646
|
+
}
|
|
10647
|
+
const hit = cache.entries.get(key);
|
|
10648
|
+
if (hit !== void 0) {
|
|
10649
|
+
cache.entries.delete(key);
|
|
10650
|
+
cache.entries.set(key, hit);
|
|
10651
|
+
return { data: hit.data };
|
|
10652
|
+
}
|
|
10423
10653
|
const hookCtx = { block };
|
|
10424
10654
|
await ctx.hooks.callHook("content-ref:resolve", hookCtx);
|
|
10425
10655
|
if (typeof hookCtx.data !== "string") throw new Error(`Content ref "${block.ref}" (${block.type}) was not resolved by a content-ref:resolve hook.`);
|
|
10656
|
+
const dataBytes = Buffer.byteLength(hookCtx.data, "utf8");
|
|
10657
|
+
if (dataBytes <= CONTENT_REF_CACHE_MAX_BYTES) {
|
|
10658
|
+
cache.entries.set(key, {
|
|
10659
|
+
data: hookCtx.data,
|
|
10660
|
+
bytes: dataBytes
|
|
10661
|
+
});
|
|
10662
|
+
cache.bytes += dataBytes;
|
|
10663
|
+
for (const [k, v] of cache.entries) {
|
|
10664
|
+
if (cache.bytes <= CONTENT_REF_CACHE_MAX_BYTES) break;
|
|
10665
|
+
cache.entries.delete(k);
|
|
10666
|
+
cache.bytes -= v.bytes;
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10426
10669
|
return { data: hookCtx.data };
|
|
10427
10670
|
} });
|
|
10428
10671
|
}
|
|
@@ -10864,7 +11107,8 @@ function resolveAutoCompact(raw, opts = {}) {
|
|
|
10864
11107
|
restore: cfg.restore !== false,
|
|
10865
11108
|
maxFailures: typeof cfg.maxFailures === "number" && Number.isFinite(cfg.maxFailures) && cfg.maxFailures > 0 ? Math.floor(cfg.maxFailures) : DEFAULT_AUTO_COMPACT_MAX_FAILURES,
|
|
10866
11109
|
provider: cfg.provider ?? null,
|
|
10867
|
-
model: typeof cfg.model === "string" && cfg.model.length > 0 ? cfg.model : null
|
|
11110
|
+
model: typeof cfg.model === "string" && cfg.model.length > 0 ? cfg.model : null,
|
|
11111
|
+
releaseReplacedTurns: cfg.releaseReplacedTurns === true
|
|
10868
11112
|
};
|
|
10869
11113
|
}
|
|
10870
11114
|
/**
|
|
@@ -10966,6 +11210,11 @@ async function maybeAutoCompact(ctx, turn, lastTurnUsage, state) {
|
|
|
10966
11210
|
}
|
|
10967
11211
|
ctx.turns.push(summaryTurn, ...restorationTurns);
|
|
10968
11212
|
await ctx.persistTurns?.();
|
|
11213
|
+
if (cfg.releaseReplacedTurns && ctx.persistDir && result.summarizedTurnIds.length > 0) try {
|
|
11214
|
+
await releaseReplacedTurnContent(ctx.turns, new Set(result.summarizedTurnIds), { persistDir: ctx.persistDir });
|
|
11215
|
+
} catch (err) {
|
|
11216
|
+
if (process.env.ZIDANE_DEBUG) process.stderr.write(`[zidane/loop] post-compact turn release failed: ${errorMessage(err)}\n`);
|
|
11217
|
+
}
|
|
10969
11218
|
const absorbedIds = /* @__PURE__ */ new Set([...result.summarizedTurnIds, ...result.droppedDueToPtl]);
|
|
10970
11219
|
const onWireReads = new Set(readFilePathsInTurns(applyCompactSummaryCutoff(ctx.turns)));
|
|
10971
11220
|
markReadStateForElidedPaths(ctx, ctx.handle.cwd, readFilePathsInTurns(ctx.turns, absorbedIds).filter((p) => !onWireReads.has(p)));
|
|
@@ -11113,10 +11362,12 @@ async function executeTurn(ctx, turn, priorUsage) {
|
|
|
11113
11362
|
}
|
|
11114
11363
|
const wireMessages = rewriteMessagesToWire(canonicalMessages, ctx.aliasMaps);
|
|
11115
11364
|
let sanitizedMessages = sanitizeStoredToolResults(ctx.provider, wireMessages);
|
|
11365
|
+
let callMapsMemo;
|
|
11366
|
+
const callMaps = () => callMapsMemo ??= collectCallMaps(canonicalMessages);
|
|
11116
11367
|
if (ctx.compactStrategy === "tail") {
|
|
11117
11368
|
const threshold = typeof ctx.compactThreshold === "number" && ctx.compactThreshold > 0 ? ctx.compactThreshold : 131072;
|
|
11118
11369
|
const keep = typeof ctx.compactKeepTurns === "number" && ctx.compactKeepTurns >= 0 ? ctx.compactKeepTurns : 4;
|
|
11119
|
-
const { readPathByCallId, toolNameByCallId } =
|
|
11370
|
+
const { readPathByCallId, toolNameByCallId } = callMaps();
|
|
11120
11371
|
const compacted = applyTailCompaction(sanitizedMessages, threshold, keep, {
|
|
11121
11372
|
readPathByCallId,
|
|
11122
11373
|
toolNameByCallId,
|
|
@@ -11134,7 +11385,7 @@ async function executeTurn(ctx, turn, priorUsage) {
|
|
|
11134
11385
|
const threshold = typeof ctx.compactThreshold === "number" && ctx.compactThreshold > 0 ? ctx.compactThreshold : 131072;
|
|
11135
11386
|
const keep = typeof ctx.compactKeepTurns === "number" && ctx.compactKeepTurns >= 0 ? ctx.compactKeepTurns : 4;
|
|
11136
11387
|
let totalBytes = 0;
|
|
11137
|
-
for (const msg of sanitizedMessages) for (const block of msg.content) if (block.type === "tool_result") totalBytes +=
|
|
11388
|
+
for (const msg of sanitizedMessages) for (const block of msg.content) if (block.type === "tool_result") totalBytes += memoizedToolResultBudgetBytes(block);
|
|
11138
11389
|
try {
|
|
11139
11390
|
const compacted = await ctx.compactStrategy(sanitizedMessages, {
|
|
11140
11391
|
threshold,
|
|
@@ -11147,7 +11398,7 @@ async function executeTurn(ctx, turn, priorUsage) {
|
|
|
11147
11398
|
}
|
|
11148
11399
|
}
|
|
11149
11400
|
if (typeof ctx.mediaKeepTurns === "number" && ctx.mediaKeepTurns >= 0 && ctx.tools.read_file) {
|
|
11150
|
-
const { readPathByCallId } =
|
|
11401
|
+
const { readPathByCallId } = callMaps();
|
|
11151
11402
|
const aged = applyMediaAgeout(sanitizedMessages, ctx.mediaKeepTurns, {
|
|
11152
11403
|
chunkTurns: COMPACT_CHUNK_TURNS,
|
|
11153
11404
|
readPathByCallId,
|
|
@@ -11293,7 +11544,7 @@ async function executeTurn(ctx, turn, priorUsage) {
|
|
|
11293
11544
|
}
|
|
11294
11545
|
}
|
|
11295
11546
|
if (!wasAborted && classified?.kind === "context_exceeded" && cleanSlate && overflowRecoveries < CONTEXT_OVERFLOW_KEEP_TURNS.length) {
|
|
11296
|
-
const { readPathByCallId, toolNameByCallId } =
|
|
11547
|
+
const { readPathByCallId, toolNameByCallId } = callMaps();
|
|
11297
11548
|
let recoveredMessages;
|
|
11298
11549
|
const elidedReadPaths = [];
|
|
11299
11550
|
for (let k = overflowRecoveries; k < CONTEXT_OVERFLOW_KEEP_TURNS.length; k++) {
|
|
@@ -15100,6 +15351,6 @@ function createAgent(rawOptions) {
|
|
|
15100
15351
|
};
|
|
15101
15352
|
}
|
|
15102
15353
|
//#endregion
|
|
15103
|
-
export {
|
|
15354
|
+
export { buildExtensionRegistry as $, defaultExtensionScanPaths as $t, buildUpToCompactPrompt as A, listFiles as At, createExtensionPromptBridge as B, KEYBINDING_KEY_COL_WIDTH as Bt, BASE_INSTRUCTIONS as C, tailTruncate as Ct, buildFromCompactPrompt as D, createModelSearchTool as Dt, buildCompactPrompt as E, multiEdit as Et, summaryToTurn as F, validateToolArgs as Ft, parseExtensionInstallSource as G, matchesBinding as Gt, fetchExtensionSource as H, formatBindingForDisplay as Ht, truncateHeadForPtlRetry as I, resolveStorageDirs as It, updateInstalledExtension as J, readKeybindings as Jt, readExtensionInstallProvenance as K, mergeKeybindings as Kt, CompactInvalidInputError as L, DEFAULT_KEYBINDINGS as Lt, anchorPreviewFor as M, grep as Mt, sliceForCompaction as N, glob as Nt, buildFullCompactPrompt as O, formatModelLine as Ot, stripImagesFromTurns as P, edit as Pt, buildExtensionPreset as Q, ENTRY_CANDIDATES as Qt, CompactPromptTooLongError as R, KEYBINDING_DEFS as Rt, compactConversation as S, shell as St, TRAILER as T, looksBinary as Tt, installExtensionFromSpec as U, groupBindings as Ut, ExtensionInstallError as V, ensureKeybindingsFile as Vt, listExtensionCandidates as W, keybindingsPath as Wt, registerExtensionHostModules as X, resolveExtensionKeybindings as Xt, createExtensionHud as Y, readKeybindingsRaw as Yt, discoverAndBuildExtensionRegistry as Z, stripJsonComments as Zt, resolveTasksDir as _, shouldAutoCompact as _n, createSkillsUseTool as _t, SHELL_CASCADE_CANCEL_MESSAGE as a, defineExtension as an, createExtensionHostRuntimeBridge as at, selectFilesFromSession as b, normalizeShellCommand as bn, shellKill as bt, applyCompactSummaryCutoff as c, isValidExtensionConfigItem as cn, definePreset as ct, buildPersistedStub as d, resolveExtensionConfigValue as dn, writeFile$1 as dt, discoverExtensions as en, composeExtensionPreset as et, cleanupPersistedSession as f, sanitizeExtensionConfigActionPatch as fn, WAIT_TASK_TIMED_OUT_PREFIX as ft, resolvePersistDir as g, effectiveContextWindow as gn, isSpawnTool as gt, resolveMcpWarningsDir as h, OUTPUT_RESERVE_TOKENS as hn, createSpawnTool as ht, INTERRUPT_MESSAGE_FOR_TOOL_USE as i, scanExtensionDirectories as in, partitionExtensionCatalog as it, ANCHOR_PREVIEW_MAX_CHARS as j, createInteractionTool as jt, buildTailCompactPrompt as k, matchModelEntries as kt, PERSISTED_STUB_PREFIX as l, isValidExtensionConfigValue as ln, basicTools as lt, rehomePersistedStubs as m, AUTO_COMPACT_MIN_GROWTH_FRACTION as mn, createToolSearchTool as mt, normalizeProviders as n, isExtensionDefinition as nn, filterExtensionRegistry as nt, TOOL_USE_CANCELLED_MESSAGE as o, clampExtensionConfigNumber as on, createWorkspaceSurface as ot, maybePersistToolResult as p, toWireConfigSchema as pn, waitTask as pt, removeInstalledExtension as q, parseBindingSpec as qt, resolveModelTargets as r, parseExtensionScanPathEnv as rn, mergeContributions as rt, TOOL_USE_SKIPPED_MESSAGE as s, coerceExtensionConfigInput as sn, composePresets as st, createAgent as t, inlineLoadedExtension as tn, disposeExtensionRegistry as tt, PERSISTENCE_PREVIEW_BYTES as u, resolveExtensionConfig as un, basic_default as ut, buildPostCompactAttachments as v, defaultRepeatGuardNormalize as vn, createSkillsRunScriptTool as vt, NO_TOOLS_PREAMBLE as w, readFile$1 as wt, selectRecentFiles as x, stableStringify as xn, createShellTool as xt, selectFilesFromReadState as y, defaultRepeatGuardTracked as yn, createSkillsReadTool as yt, EMPTY_EXTENSION_REGISTRY as z, KEYBINDING_DEF_BY_ACTION as zt };
|
|
15104
15355
|
|
|
15105
|
-
//# sourceMappingURL=agent
|
|
15356
|
+
//# sourceMappingURL=agent--VPMZ0nT.js.map
|