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
|
@@ -33,6 +33,7 @@ function createRunSummaryCollector(options = {}) {
|
|
|
33
33
|
const validationRejects = [];
|
|
34
34
|
const budgetEvents = [];
|
|
35
35
|
const repeatGuardEvents = [];
|
|
36
|
+
const streamRetries = [];
|
|
36
37
|
const pairingRepairs = {};
|
|
37
38
|
const children = [];
|
|
38
39
|
function resetForNewRun() {
|
|
@@ -42,6 +43,7 @@ function createRunSummaryCollector(options = {}) {
|
|
|
42
43
|
validationRejects.length = 0;
|
|
43
44
|
budgetEvents.length = 0;
|
|
44
45
|
repeatGuardEvents.length = 0;
|
|
46
|
+
streamRetries.length = 0;
|
|
45
47
|
for (const k of Object.keys(pairingRepairs)) delete pairingRepairs[k];
|
|
46
48
|
children.length = 0;
|
|
47
49
|
}
|
|
@@ -57,6 +59,18 @@ function createRunSummaryCollector(options = {}) {
|
|
|
57
59
|
unregisters.push(hooks.hook("agent:abort", () => {
|
|
58
60
|
aborted = true;
|
|
59
61
|
}));
|
|
62
|
+
unregisters.push(hooks.hook("stream:retry", (ctx) => {
|
|
63
|
+
const msg = ctx.err instanceof Error ? ctx.err.message : String(ctx.err);
|
|
64
|
+
streamRetries.push({
|
|
65
|
+
attempt: ctx.attempt,
|
|
66
|
+
delayMs: ctx.delayMs,
|
|
67
|
+
message: msg,
|
|
68
|
+
...ctx.err instanceof Error ? { errorType: ctx.err.name } : {},
|
|
69
|
+
...ctx.statusCode !== void 0 ? { statusCode: ctx.statusCode } : {},
|
|
70
|
+
...ctx.requestId !== void 0 ? { requestId: ctx.requestId } : {},
|
|
71
|
+
turnId: ctx.turnId
|
|
72
|
+
});
|
|
73
|
+
}));
|
|
60
74
|
unregisters.push(hooks.hook("stream:error", (ctx) => {
|
|
61
75
|
const msg = ctx.err instanceof Error ? ctx.err.message : String(ctx.err);
|
|
62
76
|
const errorType = ctx.err instanceof Error ? ctx.err.name : "unknown";
|
|
@@ -183,6 +197,7 @@ function createRunSummaryCollector(options = {}) {
|
|
|
183
197
|
blocks: blocks.slice(),
|
|
184
198
|
validationRejects: validationRejects.slice(),
|
|
185
199
|
budgetEvents: budgetEvents.slice(),
|
|
200
|
+
streamRetries: streamRetries.slice(),
|
|
186
201
|
repeatGuardEvents: repeatGuardEvents.slice(),
|
|
187
202
|
pairingRepairs: { ...pairingRepairs },
|
|
188
203
|
...children.length > 0 ? { children: children.slice() } : {}
|
|
@@ -242,6 +257,7 @@ function minimalSummaryFromStats(stats, meta) {
|
|
|
242
257
|
blocks: [],
|
|
243
258
|
validationRejects: [],
|
|
244
259
|
budgetEvents: [],
|
|
260
|
+
streamRetries: [],
|
|
245
261
|
repeatGuardEvents: [],
|
|
246
262
|
pairingRepairs: {},
|
|
247
263
|
...children.length > 0 ? { children } : {}
|
|
@@ -250,4 +266,4 @@ function minimalSummaryFromStats(stats, meta) {
|
|
|
250
266
|
//#endregion
|
|
251
267
|
export { createRunSummaryCollector as t };
|
|
252
268
|
|
|
253
|
-
//# sourceMappingURL=run-summary-
|
|
269
|
+
//# sourceMappingURL=run-summary-BU_NgwUT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-summary-BU_NgwUT.js","names":[],"sources":["../src/run-summary.ts"],"sourcesContent":["/**\n * Run summary collector — one JSON postmortem per `agent.run()`.\n *\n * `AgentStats` is great for billing and per-turn accounting but doesn't\n * carry a record of the *interesting* events that happened during a run\n * (errors, gate blocks, validation rejects, budget hits, MCP failures).\n * Reconstructing that from a hook stream after the fact is exactly the\n * kind of plumbing every consumer ends up re-implementing.\n *\n * This module ships:\n *\n * - {@link RunSummary} — a serializable shape that bundles totals,\n * per-model breakdown, and all the per-run incident lists.\n * - {@link createRunSummaryCollector} — installs hook listeners that\n * build up a {@link RunSummary} during the run and surfaces it on\n * `agent:done`. Calls an optional `onSummary` callback so the host can\n * forward to a log aggregator / DB / postmortem dashboard without\n * touching `agent.run()`'s return value.\n *\n * The collector is purely additive — it doesn't touch the agent loop,\n * doesn't change return shapes, and doesn't suppress any other hook\n * handlers. Drop it in alongside tracing / metrics / logging or use it\n * standalone when you only need the summary.\n */\n\nimport type { Hookable } from 'hookable'\nimport type { AgentHooks } from './agent'\nimport type { AgentStats } from './types'\nimport { statsByModel } from './stats'\n\n// ---------------------------------------------------------------------------\n// Public shape\n// ---------------------------------------------------------------------------\n\nexport interface RunSummaryTokens {\n input: number\n output: number\n cacheRead: number\n cacheCreation: number\n cost?: number\n /** First observable byte from the provider, ms from run start. */\n ttftMs?: number\n}\n\nexport interface RunSummaryByModel {\n modelId: string\n input: number\n output: number\n cacheRead: number\n cacheCreation: number\n cost: number\n turns: number\n}\n\nexport interface RunSummaryError {\n kind: 'stream' | 'tool' | 'mcp-tool' | 'mcp' | 'spawn'\n message: string\n errorType?: string\n turnId?: string\n callId?: string\n server?: string\n toolName?: string\n childId?: string\n statusCode?: number\n requestId?: string\n}\n\nexport interface RunSummaryBlock {\n callId: string\n toolName: string\n outcome: 'gate-block' | 'unknown' | 'invalid-input'\n reason?: string\n}\n\nexport interface RunSummaryValidation {\n callId: string\n toolName: string\n reason: string\n}\n\nexport interface RunSummaryBudget {\n kind: 'bytes' | 'tool-count'\n /** Tool name (for `'tool-count'`); absent for byte budgets. */\n toolName?: string\n /** `mode` for `'tool-count'`; absent for byte budgets. */\n mode?: 'steer' | 'block'\n observed: number\n limit: number\n turnId?: string\n}\n\nexport interface RunSummaryRepeatGuard {\n toolName: string\n /** Observed repeat count that tripped the guard. */\n count: number\n threshold: number\n action: 'block' | 'steer' | 'abort'\n turnId?: string\n}\n\n/**\n * One absorbed provider-stream retry. Retries are invisible in the transcript\n * (no turn, no tool result) yet their backoff is real wall time the user\n * waited — measured in production as unexplained 30-90s gaps before trivial\n * tool calls. Recording them makes \"LLM residual\" stalls attributable.\n */\nexport interface RunSummaryRetry {\n /** 1-based attempt number that failed and triggered this retry. */\n attempt: number\n /** Backoff delay taken before the next attempt (ms, after retry-after/cap). */\n delayMs: number\n message: string\n errorType?: string\n statusCode?: number\n requestId?: string\n turnId?: string\n}\n\n/**\n * Postmortem snapshot of one `agent.run()`. Strictly serializable — every\n * field round-trips through `JSON.stringify` / `JSON.parse` without loss\n * so a log aggregator can ingest it as-is.\n */\nexport interface RunSummary {\n runId?: string\n parentRunId?: string\n depth: number\n agentName?: string\n startedAt: number\n endedAt: number\n durationMs: number\n status: 'completed' | 'aborted'\n turns: number\n totals: RunSummaryTokens\n byModel: RunSummaryByModel[]\n errors: RunSummaryError[]\n blocks: RunSummaryBlock[]\n validationRejects: RunSummaryValidation[]\n budgetEvents: RunSummaryBudget[]\n /**\n * Provider-stream retries the loop absorbed. Empty on healthy runs; on\n * incident runs the summed `delayMs` explains wall time that appears\n * nowhere else (not in turns, not in tool durations).\n */\n streamRetries: RunSummaryRetry[]\n /**\n * Repeat-guard escalations. An `action: 'steer'` entry means the tool still\n * executed and got a steering message appended to its result. An\n * `action: 'abort'` entry means the guard terminated the run via the agent's\n * AbortController (the run finalizes as `'aborted'`).\n */\n repeatGuardEvents: RunSummaryRepeatGuard[]\n /** Counts of pairing repairs, keyed by repair mode. */\n pairingRepairs: Record<string, number>\n /**\n * Postmortem snapshots of child runs that bubbled their stats up via\n * `spawn:complete`. Only present when the run actually spawned.\n */\n children?: RunSummary[]\n}\n\n// ---------------------------------------------------------------------------\n// Collector\n// ---------------------------------------------------------------------------\n\nexport interface RunSummaryCollectorOptions {\n /**\n * Called with the assembled {@link RunSummary} on every `agent:done`.\n * Synchronous — heavy I/O should be deferred (e.g. via `setImmediate`).\n */\n onSummary?: (summary: RunSummary) => void\n}\n\nexport interface RunSummaryCollector {\n /** Install the collector's hook handlers. Returns an uninstall fn. */\n install: (hooks: Hookable<AgentHooks>) => () => void\n /** Most-recent summary; `undefined` until the first `agent:done` fires. */\n latest: () => RunSummary | undefined\n}\n\n/**\n * Build a run-summary collector. State is created fresh inside each\n * `install()` call, so a single collector instance can be installed\n * across multiple agents without attribution cross-talk. `latest()`\n * returns the most-recent summary across **any** install — install\n * per-agent collectors if you need separate post-run snapshots.\n *\n * @example\n * ```ts\n * const collector = createRunSummaryCollector({\n * onSummary: s => console.log(JSON.stringify(s)),\n * })\n * const uninstall = collector.install(agent.hooks)\n * try { await agent.run({ prompt }) }\n * finally { uninstall() }\n * ```\n */\nexport function createRunSummaryCollector(\n options: RunSummaryCollectorOptions = {},\n): RunSummaryCollector {\n let last: RunSummary | undefined\n\n return {\n latest: () => last,\n install(hooks: Hookable<AgentHooks>): () => void {\n // Per-run in-progress accumulators. The hookable bus serializes\n // agent.run lifecycles per agent — we reset between runs on\n // `agent:start` and consume on `agent:done`.\n let runId: string | undefined\n let parentRunId: string | undefined\n let depth = 0\n let agentName: string | undefined\n let startedAt = Date.now()\n let aborted = false\n const errors: RunSummaryError[] = []\n const blocks: RunSummaryBlock[] = []\n const validationRejects: RunSummaryValidation[] = []\n const budgetEvents: RunSummaryBudget[] = []\n const repeatGuardEvents: RunSummaryRepeatGuard[] = []\n const streamRetries: RunSummaryRetry[] = []\n const pairingRepairs: Record<string, number> = {}\n const children: RunSummary[] = []\n\n function resetForNewRun(): void {\n aborted = false\n errors.length = 0\n blocks.length = 0\n validationRejects.length = 0\n budgetEvents.length = 0\n repeatGuardEvents.length = 0\n streamRetries.length = 0\n for (const k of Object.keys(pairingRepairs))\n delete pairingRepairs[k]\n children.length = 0\n }\n\n const unregisters: Array<() => void> = []\n\n unregisters.push(hooks.hook('agent:start', (ctx) => {\n resetForNewRun()\n runId = ctx.runId\n parentRunId = ctx.parentRunId\n depth = ctx.depth\n agentName = ctx.agentName\n startedAt = ctx.startedAt\n }))\n\n unregisters.push(hooks.hook('agent:abort', () => {\n aborted = true\n }))\n\n unregisters.push(hooks.hook('stream:retry', (ctx) => {\n const msg = ctx.err instanceof Error ? ctx.err.message : String(ctx.err)\n streamRetries.push({\n attempt: ctx.attempt,\n delayMs: ctx.delayMs,\n message: msg,\n ...(ctx.err instanceof Error ? { errorType: ctx.err.name } : {}),\n ...(ctx.statusCode !== undefined ? { statusCode: ctx.statusCode } : {}),\n ...(ctx.requestId !== undefined ? { requestId: ctx.requestId } : {}),\n turnId: ctx.turnId,\n })\n }))\n\n unregisters.push(hooks.hook('stream:error', (ctx) => {\n const msg = ctx.err instanceof Error ? ctx.err.message : String(ctx.err)\n const errorType = ctx.err instanceof Error ? ctx.err.name : 'unknown'\n errors.push({\n kind: 'stream',\n message: msg,\n errorType,\n turnId: ctx.turnId,\n ...(ctx.statusCode !== undefined ? { statusCode: ctx.statusCode } : {}),\n ...(ctx.requestId !== undefined ? { requestId: ctx.requestId } : {}),\n })\n }))\n\n unregisters.push(hooks.hook('tool:error', (ctx) => {\n errors.push({\n kind: 'tool',\n message: ctx.error.message,\n errorType: ctx.error.name,\n turnId: ctx.turnId,\n callId: ctx.callId,\n toolName: ctx.name,\n })\n }))\n\n unregisters.push(hooks.hook('mcp:tool:error', (ctx) => {\n errors.push({\n kind: 'mcp-tool',\n message: ctx.error.message,\n errorType: ctx.error.name,\n turnId: ctx.turnId,\n callId: ctx.callId,\n server: ctx.server,\n toolName: ctx.displayName,\n })\n }))\n\n unregisters.push(hooks.hook('mcp:error', (ctx) => {\n errors.push({\n kind: 'mcp',\n message: ctx.error.message,\n errorType: ctx.error.name,\n server: ctx.name,\n })\n }))\n\n unregisters.push(hooks.hook('spawn:error', (ctx) => {\n errors.push({\n kind: 'spawn',\n message: ctx.error.message,\n errorType: ctx.error.name,\n childId: ctx.id,\n })\n }))\n\n unregisters.push(hooks.hook('tool:dispatched', (ctx) => {\n if (ctx.outcome === 'gate-block' || ctx.outcome === 'unknown' || ctx.outcome === 'invalid-input') {\n blocks.push({\n callId: ctx.callId,\n toolName: ctx.name,\n outcome: ctx.outcome,\n ...(ctx.reason ? { reason: ctx.reason } : {}),\n })\n }\n }))\n\n unregisters.push(hooks.hook('validation:reject', (ctx) => {\n validationRejects.push({\n callId: ctx.callId,\n toolName: ctx.name,\n reason: ctx.reason,\n })\n }))\n\n unregisters.push(hooks.hook('budget:exceeded', (ctx) => {\n budgetEvents.push({\n kind: 'bytes',\n observed: ctx.bytes,\n limit: ctx.budget,\n turnId: ctx.turnId,\n })\n }))\n\n unregisters.push(hooks.hook('tool-budget:exceeded', (ctx) => {\n budgetEvents.push({\n kind: 'tool-count',\n toolName: ctx.tool,\n mode: ctx.mode,\n observed: ctx.count,\n limit: ctx.max,\n turnId: ctx.turnId,\n })\n }))\n\n unregisters.push(hooks.hook('repeat-guard:exceeded', (ctx) => {\n repeatGuardEvents.push({\n toolName: ctx.tool,\n count: ctx.count,\n threshold: ctx.threshold,\n action: ctx.action,\n turnId: ctx.turnId,\n })\n }))\n\n unregisters.push(hooks.hook('pairing:repair', (ctx) => {\n pairingRepairs[ctx.mode] = (pairingRepairs[ctx.mode] ?? 0) + 1\n }))\n\n unregisters.push(hooks.hook('agent:done', (stats) => {\n const endedAt = Date.now()\n\n // Build per-model rollup via the existing `statsByModel` helper\n // so we stay in lockstep with how the rest of the harness\n // attributes cost and tokens by model id.\n const byModel: RunSummaryByModel[] = []\n for (const [modelId, usage] of statsByModel(stats)) {\n byModel.push({\n modelId,\n input: usage.input,\n output: usage.output,\n cacheRead: usage.cacheRead,\n cacheCreation: usage.cacheCreation,\n cost: usage.cost,\n turns: usage.turns,\n })\n }\n\n // Flatten child stats into nested summaries. We don't have the\n // child's full event lists here (those landed on the child's\n // own hooks), so the nested entry is a minimal totals-only\n // record — enough for a flat per-run audit trail; consumers\n // wanting full per-child event lists install a collector on\n // each subagent.\n for (const c of stats.children ?? []) {\n children.push(minimalSummaryFromStats(c.stats, {\n depth: c.depth ?? depth + 1,\n status: c.status === 'aborted' ? 'aborted' : 'completed',\n }))\n }\n\n const summary: RunSummary = {\n ...(runId ? { runId } : {}),\n ...(parentRunId ? { parentRunId } : {}),\n depth,\n ...(agentName ? { agentName } : {}),\n startedAt,\n endedAt,\n durationMs: endedAt - startedAt,\n status: aborted ? 'aborted' : 'completed',\n turns: stats.turns,\n totals: buildTotals(stats),\n byModel,\n errors: errors.slice(),\n blocks: blocks.slice(),\n validationRejects: validationRejects.slice(),\n budgetEvents: budgetEvents.slice(),\n streamRetries: streamRetries.slice(),\n repeatGuardEvents: repeatGuardEvents.slice(),\n pairingRepairs: { ...pairingRepairs },\n ...(children.length > 0 ? { children: children.slice() } : {}),\n }\n\n last = summary\n try {\n options.onSummary?.(summary)\n }\n catch {\n // Sink errors are not the collector's concern.\n }\n }))\n\n let disposed = false\n return function uninstall() {\n if (disposed)\n return\n disposed = true\n for (const un of unregisters) {\n try {\n un()\n }\n catch { /* ignore */ }\n }\n }\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction buildTotals(stats: AgentStats): RunSummaryTokens {\n return {\n input: stats.totalIn,\n output: stats.totalOut,\n cacheRead: stats.totalCacheRead,\n cacheCreation: stats.totalCacheCreation,\n ...(typeof stats.cost === 'number' ? { cost: stats.cost } : {}),\n ...(typeof stats.timeTillFirstTokenMs === 'number' ? { ttftMs: stats.timeTillFirstTokenMs } : {}),\n }\n}\n\nfunction minimalSummaryFromStats(\n stats: AgentStats,\n meta: { depth: number, status: 'completed' | 'aborted' },\n): RunSummary {\n const byModel: RunSummaryByModel[] = []\n for (const [modelId, usage] of statsByModel(stats)) {\n byModel.push({\n modelId,\n input: usage.input,\n output: usage.output,\n cacheRead: usage.cacheRead,\n cacheCreation: usage.cacheCreation,\n cost: usage.cost,\n turns: usage.turns,\n })\n }\n const children: RunSummary[] = []\n for (const c of stats.children ?? []) {\n children.push(minimalSummaryFromStats(c.stats, {\n depth: c.depth ?? meta.depth + 1,\n status: c.status === 'aborted' ? 'aborted' : 'completed',\n }))\n }\n return {\n depth: meta.depth,\n startedAt: 0,\n endedAt: 0,\n durationMs: stats.elapsed,\n status: meta.status,\n turns: stats.turns,\n totals: buildTotals(stats),\n byModel,\n errors: [],\n blocks: [],\n validationRejects: [],\n budgetEvents: [],\n streamRetries: [],\n repeatGuardEvents: [],\n pairingRepairs: {},\n ...(children.length > 0 ? { children } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqMA,SAAgB,0BACd,UAAsC,CAAC,GAClB;CACrB,IAAI;CAEJ,OAAO;EACL,cAAc;EACd,QAAQ,OAAyC;GAI/C,IAAI;GACJ,IAAI;GACJ,IAAI,QAAQ;GACZ,IAAI;GACJ,IAAI,YAAY,KAAK,IAAI;GACzB,IAAI,UAAU;GACd,MAAM,SAA4B,CAAC;GACnC,MAAM,SAA4B,CAAC;GACnC,MAAM,oBAA4C,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K;EACX;EACA,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,eAAe,MAAM;EACrB,MAAM,MAAM;EACZ,OAAO,MAAM;CACf,CAAC;CAEH,MAAM,WAAyB,CAAC;CAChC,KAAK,MAAM,KAAK,MAAM,YAAY,CAAC,GACjC,SAAS,KAAK,wBAAwB,EAAE,OAAO;EAC7C,OAAO,EAAE,SAAS,KAAK,QAAQ;EAC/B,QAAQ,EAAE,WAAW,YAAY,YAAY;CAC/C,CAAC,CAAC;CAEJ,OAAO;EACL,OAAO,KAAK;EACZ,WAAW;EACX,SAAS;EACT,YAAY,MAAM;EAClB,QAAQ,KAAK;EACb,OAAO,MAAM;EACb,QAAQ,YAAY,KAAK;EACzB;EACA,QAAQ,CAAC;EACT,QAAQ,CAAC;EACT,mBAAmB,CAAC;EACpB,cAAc,CAAC;EACf,eAAe,CAAC;EAChB,mBAAmB,CAAC;EACpB,gBAAgB,CAAC;EACjB,GAAI,SAAS,SAAS,IAAI,EAAE,SAAS,IAAI,CAAC;CAC5C;AACF"}
|
package/dist/session/sqlite.d.ts
CHANGED
package/dist/session.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ap as ToWireMessagesOptions, Bp as toAnthropic, Hp as toWireMessages, Lp as fromAnthropic, Mp as autoDetectAndConvert, Rp as fromOpenAI, Sp as createFileMapStore, Vp as toOpenAI, _f as SessionTurn, _p as RemoteStoreOptions, ap as SessionMetaRow, bp as FileMapAdapter, cp as createSession, dp as demoteStaleRunningStatus, fp as getExtensionSessionState, gf as SessionMessage, gp as withExtensionSession, hp as setExtensionSessionState, ip as SessionData, lp as currentExtensionSession, mp as resumeChainRunIds, np as CreateSessionOptions, op as SessionRun, pf as SessionContentBlock, pp as loadSession, rp as Session, sp as SessionStore, up as deleteExtensionSessionState, vp as createRemoteStore, xp as FileMapStoreOptions, yp as createMemoryStore } from "./index-
|
|
1
|
+
import { Ap as ToWireMessagesOptions, Bp as toAnthropic, Hp as toWireMessages, Lp as fromAnthropic, Mp as autoDetectAndConvert, Rp as fromOpenAI, Sp as createFileMapStore, Vp as toOpenAI, _f as SessionTurn, _p as RemoteStoreOptions, ap as SessionMetaRow, bp as FileMapAdapter, cp as createSession, dp as demoteStaleRunningStatus, fp as getExtensionSessionState, gf as SessionMessage, gp as withExtensionSession, hp as setExtensionSessionState, ip as SessionData, lp as currentExtensionSession, mp as resumeChainRunIds, np as CreateSessionOptions, op as SessionRun, pf as SessionContentBlock, pp as loadSession, rp as Session, sp as SessionStore, up as deleteExtensionSessionState, vp as createRemoteStore, xp as FileMapStoreOptions, yp as createMemoryStore } from "./index-AVZ6pYpi.js";
|
|
2
2
|
export { CreateSessionOptions, type FileMapAdapter, type FileMapStoreOptions, type RemoteStoreOptions, Session, type SessionContentBlock, SessionData, type SessionMessage, SessionMetaRow, SessionRun, SessionStore, type SessionTurn, type ToWireMessagesOptions, autoDetectAndConvert, createFileMapStore, createMemoryStore, createRemoteStore, createSession, currentExtensionSession, deleteExtensionSessionState, demoteStaleRunningStatus, fromAnthropic, fromOpenAI, getExtensionSessionState, loadSession, resumeChainRunIds, setExtensionSessionState, toAnthropic, toOpenAI, toWireMessages, withExtensionSession };
|
package/dist/skills.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $f as SkillResource, $s as SkillInstallResult, Bs as validateResourcePathReal, Fs as SkillValidationResult, Gs as interpolateShellCommands, Hs as validateSkillName, Is as isToolAllowedByUnion, Js as SkillCandidateDetail, Ks as stripShellInterpolations, Ls as matchesAllowedTool, Ms as writeSkillToDisk, Ns as writeSkillsToDisk, Ps as SkillValidationIssue, Qf as SkillDiagnostic, Qs as SkillInstallOptions, Rs as parseAllowedToolPattern, Us as resolveSkills, Vs as validateSkillForWrite, Ws as InterpolateShellCommandsOptions, Xf as ShellInterpolationApproval, Xs as SkillInstallError, Ys as SkillInstallCandidate, Zf as SkillConfig, Zs as SkillInstallErrorCode, _c as SkillActivationState, ac as SourcedScanPath, cc as inferSource, dc as buildCatalog, ec as SkillInstallSpec, ep as SkillSource, fc as IMPLICITLY_ALLOWED_SKILL_TOOLS, gc as DeactivationReason, hc as ActiveSkill, ic as readSkillProvenance, js as defineSkill, lc as parseFrontmatter, mc as ActivationVia, nc as listSkillCandidates, oc as discoverSkills, pc as installAllowedToolsGate, qs as SKILL_PROVENANCE_FILE, rc as parseSkillInstallSpec, sc as getDefaultScanPaths, tc as installSkillFromSpec, tp as SkillsConfig, uc as parseSkillFile, vc as SkillActivationStateOptions, yc as createSkillActivationState, zs as validateResourcePath } from "./index-
|
|
1
|
+
import { $f as SkillResource, $s as SkillInstallResult, Bs as validateResourcePathReal, Fs as SkillValidationResult, Gs as interpolateShellCommands, Hs as validateSkillName, Is as isToolAllowedByUnion, Js as SkillCandidateDetail, Ks as stripShellInterpolations, Ls as matchesAllowedTool, Ms as writeSkillToDisk, Ns as writeSkillsToDisk, Ps as SkillValidationIssue, Qf as SkillDiagnostic, Qs as SkillInstallOptions, Rs as parseAllowedToolPattern, Us as resolveSkills, Vs as validateSkillForWrite, Ws as InterpolateShellCommandsOptions, Xf as ShellInterpolationApproval, Xs as SkillInstallError, Ys as SkillInstallCandidate, Zf as SkillConfig, Zs as SkillInstallErrorCode, _c as SkillActivationState, ac as SourcedScanPath, cc as inferSource, dc as buildCatalog, ec as SkillInstallSpec, ep as SkillSource, fc as IMPLICITLY_ALLOWED_SKILL_TOOLS, gc as DeactivationReason, hc as ActiveSkill, ic as readSkillProvenance, js as defineSkill, lc as parseFrontmatter, mc as ActivationVia, nc as listSkillCandidates, oc as discoverSkills, pc as installAllowedToolsGate, qs as SKILL_PROVENANCE_FILE, rc as parseSkillInstallSpec, sc as getDefaultScanPaths, tc as installSkillFromSpec, tp as SkillsConfig, uc as parseSkillFile, vc as SkillActivationStateOptions, yc as createSkillActivationState, zs as validateResourcePath } from "./index-AVZ6pYpi.js";
|
|
2
2
|
export { type ActivationVia, type ActiveSkill, type DeactivationReason, IMPLICITLY_ALLOWED_SKILL_TOOLS, type InterpolateShellCommandsOptions, SKILL_PROVENANCE_FILE, type ShellInterpolationApproval, type SkillActivationState, type SkillActivationStateOptions, type SkillCandidateDetail, type SkillConfig, type SkillDiagnostic, type SkillInstallCandidate, SkillInstallError, type SkillInstallErrorCode, type SkillInstallOptions, type SkillInstallResult, type SkillInstallSpec, type SkillResource, type SkillSource, type SkillValidationIssue, type SkillValidationResult, type SkillsConfig, type SourcedScanPath, buildCatalog, createSkillActivationState, defineSkill, discoverSkills, getDefaultScanPaths, inferSource, installAllowedToolsGate, installSkillFromSpec, interpolateShellCommands, isToolAllowedByUnion, listSkillCandidates, matchesAllowedTool, parseAllowedToolPattern, parseFrontmatter, parseSkillFile, parseSkillInstallSpec, readSkillProvenance, resolveSkills, stripShellInterpolations, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Au as SessionMeta, Gu as ProviderKey, Mu as StreamEvent, Wu as ProviderAuth, Yu as ModelInfo, _f as SessionTurn, ju as Settings } from "./index-
|
|
1
|
+
import { Au as SessionMeta, Gu as ProviderKey, Mu as StreamEvent, Wu as ProviderAuth, Yu as ModelInfo, _f as SessionTurn, ju as Settings } from "./index-AVZ6pYpi.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/turn-selection.d.ts
|
|
@@ -518,4 +518,4 @@ declare function displayNameFor(name: string, input?: Record<string, unknown>):
|
|
|
518
518
|
declare function formatToolCall(name: string, input: Record<string, unknown>): ToolFormatLine | null;
|
|
519
519
|
//#endregion
|
|
520
520
|
export { turnSelectionOwnership 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, isEditErrorResult as J, useSafeModeQueue as K, searchSessionTurns as L, searchSessionHistory as M, searchSessionHistoryIndex as N, buildSessionSearchIndexAsync as O, searchSessionHistoryIndexAsync as P, selectionAfterTurnRemoval as Q, searchTurns as R, SearchSessionResult as S, SessionSearchExcerpt as T, SafeModeActions as U, ApprovalRequest as V, SafeModeProvider as W, isVisible as X, isTurnHighlighted as Y, selectableTurnIds as Z, splitMarkdownCodeBlocks as _, formatToolCall as a, IndexedSearchTurn as b, splitPromptSegments as c, filterModelCatalog as d, 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, EDIT_TOOL_NAMES as q, ToolFormatLine as r, PromptSegmentRef as s, TOOL_DISPLAY as t, buildModelCatalog as u, HighlightRange as v, SessionHistoryMatch as w, SearchExcerpt as x, HighlightSegment as y, searchableTurnText as z };
|
|
521
|
-
//# sourceMappingURL=tool-formatters-
|
|
521
|
+
//# sourceMappingURL=tool-formatters-Dual3Hdl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-formatters-
|
|
1
|
+
{"version":3,"file":"tool-formatters-Dual3Hdl.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/tool-formatters.ts"],"mappings":";;;;;cAca,eAAA,EAAiB,WAAW;;AAAzC;;;;iBAOgB,yBAAA,CACd,MAAA,qBACA,SAAA,UACA,KAAA;AAHF;;;;;;;;AAG0B;AA2B1B;;;;AAA8C;AAqF9C;;;AAnHA,iBA8BgB,iBAAA,CAAkB,IAAY;;;;;;;AAqNN;AA8BxC;;;;;;iBA9JgB,SAAA,CAAU,KAAA,EAAO,WAAA,EAAa,QAAA,EAAU,QAAQ;;;;;;;;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pawnTool, Gf as hashContent, Hf as ReadStateEntry, Jf as readStateKey, Kf as hydrateReadStateFromSession, Os as createModelSearchTool, Qn as WAIT_TASK_TIMED_OUT_PREFIX, Rf as ToolContext, Sr as grep, Ss as SubagentDef, Ts as createSpawnTool, Uf as ReadStateMap, Vf as HydrateReadStateOptions, Wf as getReadState, Yf as resolveReadStateMap, Zn as writeFile, _r as readFile, _s as SpawnTaskInput, ar as ToolSearchToolOptions, br as InteractionToolOptions, bs as SpawnToolOptions, cr as createSkillsUseTool, dr as SkillsReadToolOptions, er as ValidationResult, fr as createSkillsReadTool, gr as shell, gs as ExtensionSubagentDef, hr as createShellTool, hs as ChildAgent, ir as LazyToolEntry, ks as formatModelLine, lr as SkillsRunScriptToolOptions, mr as CreateShellToolOptions, nr as TailTruncateOptions, or as createToolSearchTool, pr as shellKill, qf as hydrateReadStateFromSessionAsync, rr as tailTruncate, sr as SkillsUseToolOptions, tr as validateToolArgs, ur as createSkillsRunScriptTool, vr as multiEdit, vs as SpawnTaskOutcome, wr as edit, ws as SubagentRegistry, xr as createInteractionTool, xs as SpawnToolState, yr as listFiles, ys as SpawnTool, zf as ToolDef } from "./index-
|
|
1
|
+
import { $n as waitTask, As as matchModelEntries, Bf as ToolMap, Cr as glob, Cs as SubagentOverride, Ds as SpawnModelEntry, Es as isSpawnTool, Gf as hashContent, Hf as ReadStateEntry, Jf as readStateKey, Kf as hydrateReadStateFromSession, Os as createModelSearchTool, Qn as WAIT_TASK_TIMED_OUT_PREFIX, Rf as ToolContext, Sr as grep, Ss as SubagentDef, Ts as createSpawnTool, Uf as ReadStateMap, Vf as HydrateReadStateOptions, Wf as getReadState, Yf as resolveReadStateMap, Zn as writeFile, _r as readFile, _s as SpawnTaskInput, ar as ToolSearchToolOptions, br as InteractionToolOptions, bs as SpawnToolOptions, cr as createSkillsUseTool, dr as SkillsReadToolOptions, er as ValidationResult, fr as createSkillsReadTool, gr as shell, gs as ExtensionSubagentDef, hr as createShellTool, hs as ChildAgent, ir as LazyToolEntry, ks as formatModelLine, lr as SkillsRunScriptToolOptions, mr as CreateShellToolOptions, nr as TailTruncateOptions, or as createToolSearchTool, pr as shellKill, qf as hydrateReadStateFromSessionAsync, rr as tailTruncate, sr as SkillsUseToolOptions, tr as validateToolArgs, ur as createSkillsRunScriptTool, vr as multiEdit, vs as SpawnTaskOutcome, wr as edit, ws as SubagentRegistry, xr as createInteractionTool, xs as SpawnToolState, yr as listFiles, ys as SpawnTool, zf as ToolDef } from "./index-AVZ6pYpi.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
1
|
import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, i as hydrateReadStateFromSession, r as hashContent, s as readStateKey, t as getReadState } from "./read-state-rDmfeLmz.js";
|
|
2
|
-
import { At as
|
|
2
|
+
import { At as listFiles, Ct as tailTruncate, Dt as createModelSearchTool, Et as multiEdit, Ft as validateToolArgs, Mt as grep, Nt as glob, Ot as formatModelLine, Pt as edit, St as shell, _t as createSkillsUseTool, bt as shellKill, dt as writeFile, ft as WAIT_TASK_TIMED_OUT_PREFIX, gt as isSpawnTool, ht as createSpawnTool, jt as createInteractionTool, kt as matchModelEntries, mt as createToolSearchTool, pt as waitTask, vt as createSkillsRunScriptTool, wt as readFile, xt as createShellTool, yt as createSkillsReadTool } from "./agent--VPMZ0nT.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,4 +1,4 @@
|
|
|
1
|
-
import { Au as SessionMeta, Cs as SubagentOverride, Do as ExtensionRegistry, Gu as ProviderKey, Ka as StoredExtensionConfigItem, Mu as StreamEvent, Ou as Picked, Pa as ExtensionConfigCategory, Pu as ModelChainEntry, Tf as ToolResultContent, Wu as ProviderAuth, Yu as ModelInfo, Zu as ProviderDescriptor, _f as SessionTurn, bf as ThinkingLevel, fu as AgentRegistry, ip as SessionData, ju as Settings, op as SessionRun, pf as SessionContentBlock, qd as McpServerConfig, sp as SessionStore, t as Preset, ws as SubagentRegistry, wu as EditOutcome } from "./index-
|
|
1
|
+
import { Au as SessionMeta, Cs as SubagentOverride, Do as ExtensionRegistry, Gu as ProviderKey, Ka as StoredExtensionConfigItem, Mu as StreamEvent, Ou as Picked, Pa as ExtensionConfigCategory, Pu as ModelChainEntry, Tf as ToolResultContent, Wu as ProviderAuth, Yu as ModelInfo, Zu as ProviderDescriptor, _f as SessionTurn, bf as ThinkingLevel, fu as AgentRegistry, ip as SessionData, ju as Settings, op as SessionRun, pf as SessionContentBlock, qd as McpServerConfig, sp as SessionStore, t as Preset, ws as SubagentRegistry, wu as EditOutcome } from "./index-AVZ6pYpi.js";
|
|
2
2
|
//#region src/chat/hints.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Single hint entry — `<key> <label>`, optionally followed by an inline
|
|
@@ -1467,4 +1467,4 @@ declare function computeTurnAnchors(items: readonly TranscriptItem[]): {
|
|
|
1467
1467
|
};
|
|
1468
1468
|
//#endregion
|
|
1469
1469
|
export { KEYBINDING_KEY_COL_WIDTH as $, resolveStorageDirs as A, loadState as B, ResolvedPaths as C, StorageDirs as D, ResolveStorageDirsOptions as E, createStateStore as F, titleFromTurns as G, saveState as H, deriveSessionTitle as I, updateToolEventOutcomes as J, toolCallPreview as K, eventsFromTurns as L, StateStoreApi as M, TuiState as N, StorageMode as O, compactSummaryEvent as P, KEYBINDING_DEF_BY_ACTION as Q, lastContextSizeFromTurns as R, ResolvedConfig as S, resolveStoragePaths as T, stripSpawnTokensLine as U, marginTopFor as V, sumRunCosts as W, DEFAULT_KEYBINDINGS as X, usageByModel as Y, KEYBINDING_DEFS as Z, discoverProjectMcps as _, EMPTY_HINTS as _t, SessionExportTarget as a, ResolvedExtensionKeybinding as at, ChatOptions as b, hintsLength as bt, writeSessionExport as c, groupBindings as ct, useEnabledToggleSet as d, mergeKeybindings as dt, KeyAction as et, DiscoveredMcp as f, parseBindingSpec as ft, defaultMcpsConfigPaths as g, stripJsonComments as gt, buildMcpServers as h, resolveExtensionKeybindings as ht, SessionExportFormat as i, ParsedBinding as it, ModelUsageSummary as j, StorageSlot as k, EnabledAllowlistKey as l, keybindingsPath as lt, DiscoveryResult as m, readKeybindingsRaw as mt, computeTurnAnchors as n, KeyBindingSection as nt, renderSession as o, ensureKeybindingsFile as ot, DiscoveryError as p, readKeybindings as pt, toolResultText as q, SessionExportAnchor as r, KeyBindings as rt, resolveSessionExportTarget as s, formatBindingForDisplay as st, TranscriptItem as t, KeyBindingDef as tt, EnabledToggleSet as u, matchesBinding as ut, parseMcpsFile as v, Hint as vt, resolveConfig as w, ProviderRegistry as x, truncateTrailing as xt, AutoUpdateConfig as y, clipHintsToWidth as yt, listSessionMeta as z };
|
|
1470
|
-
//# sourceMappingURL=transcript-anchors-
|
|
1470
|
+
//# sourceMappingURL=transcript-anchors-CG85bieG.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-anchors-CG85bieG.d.ts","names":[],"sources":["../src/chat/hints.ts","../src/start/shared-options.ts","../src/chat/keybindings.ts","../src/chat/store.ts","../src/chat/xdg.ts","../src/chat/config.ts","../src/chat/mcps-discovery.ts","../src/chat/enabled-toggle-set.ts","../src/chat/session-export.ts","../src/chat/transcript-anchors.ts"],"mappings":";;;;;;AAuBA;;;;;;UAAiB,IAAA;EACf,GAAA;EACA,KAAA;EAYE;EAVF,QAAA;EAaE;EAXF,UAAA;EAaY;AAAA;AAcd;;;;EApBE,KAAA;IACE,GAAA;IACA,KAAA,UA2CwC;IAzCxC,QAAA,WAyC8C;IAvC9C,UAAA;EAAA;AAAA;;AA4DmC;AAavC;;;;;;;;iBA3DgB,gBAAA,CAAiB,IAAA,UAAc,GAAW;AA2D6B;;;;AC3GvF;;AD2GuF,iBAlCvE,WAAA,CAAY,KAAsB,WAAN,IAAI;;ACzEiG;AACjJ;;;;AAAyD;AAEzD;cD2Fa,WAAA,WAAsB,IAAI;;;AC3FW;AAClD;;;;AAAqD;AAErD;;;iBDqGgB,gBAAA,CAAiB,KAAA,WAAgB,IAAA,IAAQ,MAAA,oBAA0B,IAAI;;;cC3G1E,kBAAA;AAAA,KACD,iBAAA,UAA2B,kBAAkB;AAAA,cAE5C,gBAAA;AAAA,KACD,eAAA,UAAyB,gBAAgB;AAAA,cAExC,gBAAA;AAAA,KACD,eAAA,UAAyB,gBAAgB;AAAA,UAEpC,iBAAA;EACf,MAAA;EACA,MAAA;EACA,KAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,YAAA,GAAe,MAAA;EACf,MAAA;EACA,iBAAA;EACA,WAAA;EAC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E2C;;;AAA8B;;;;EO9DrF,MAAA;AAAA,IACE,gBAAA;;;APZU;AAAA,KQdF,mBAAA;;;;AR4B8C;AAyB1D;KQ9CY,mBAAA;;UAGK,mBAAA;ER2CiC;EQzChD,GAAA;ER8D2D;EQ5D3D,QAAA;ER4DqC;EQ1DrC,MAAA,EAAQ,mBAAmB;AAAA;;UAInB,cAAA;ERmE6E;EQjErF,GAAA;ERiE+B;EQ/D/B,IAAA;ER+DiF;;AAAI;;EQ1DrF,MAAA;AAAA;APjDF;;;;AAAiJ;AACjJ;;;;AAAyD;AAEzD;;;AAHA,iBOmEgB,0BAAA,CAA2B,IAAA;EACzC,SAAA;EACA,MAAA,EAAQ,mBAAA;AAAA,IACN,cAAA,GAAiB,mBAAA;;;APlEgC;AAErD;;;;AAA+D;AAC/D;;;;AAAqD;AAErD;;iBOyFgB,aAAA,CAAc,OAAA,EAAS,WAAA,EAAa,MAAA,EAAQ,mBAAmB;;;;;;;iBAYzD,kBAAA,CACpB,IAAA;EAAQ,OAAA,EAAS,WAAA;EAAa,MAAA,EAAQ,mBAAA;AAAA,IAAwB,cAAA,GAC7D,OAAA,CAAQ,mBAAA;;;;;;ARjGX;;;;;;KSGY,cAAA;EACJ,IAAA;EAAe,KAAA,EAAO,WAAA;EAAa,QAAA,GAAW,WAAA;AAAA;EAC9C,IAAA;EAAmB,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;AT4B7D;;;;AAA0D;AAyB1D;;;;AAAkD;AAqBlD;;;;AAAuC;AAavC;;;AA3DA,iBSRgB,kBAAA,CAAmB,KAAA,WAAgB,cAAA;EACjD,QAAA,EAAU,WAAW;EACrB,GAAA;EACA,UAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
2
|
-
import {
|
|
2
|
+
import { At as listFiles, Et as multiEdit, It as resolveStorageDirs, Kt as mergeKeybindings, Mt as grep, Nt as glob, Pt as edit, Q as buildExtensionPreset, St as shell, Xt as resolveExtensionKeybindings, Yt as readKeybindingsRaw, bt as shellKill, ct as definePreset, dt as writeFile$1, ht as createSpawnTool, pt as waitTask, st as composePresets, wt as readFile$1, z as EMPTY_EXTENSION_REGISTRY } from "./agent--VPMZ0nT.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";
|
|
@@ -10,11 +10,10 @@ 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-
|
|
14
|
-
import { $ as extractEditPayload, ct as parseEditOutcomesFromResult, m as ownerOf, mt as chatReferenceTokensFromText, u as capTranscriptEvents } from "./turn-operations-
|
|
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-DIT_DMwa.js";
|
|
14
|
+
import { $ as extractEditPayload, C as chunkMarkdownForRender, ct as parseEditOutcomesFromResult, m as ownerOf, mt as chatReferenceTokensFromText, u as capTranscriptEvents } from "./turn-operations-4tnvKwfJ.js";
|
|
15
15
|
import { createRequire } from "node:module";
|
|
16
16
|
import { dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
17
|
-
import { Buffer as Buffer$1 } from "node:buffer";
|
|
18
17
|
import { chmodSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
19
18
|
import { readdir, stat, writeFile } from "node:fs/promises";
|
|
20
19
|
import { spawn } from "node:child_process";
|
|
@@ -181,6 +180,16 @@ function compactSummaryEvent(block, turnId) {
|
|
|
181
180
|
...turnId ? { turnId } : {}
|
|
182
181
|
};
|
|
183
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Decoded byte size of a base64 payload, computed arithmetically.
|
|
185
|
+
* `Buffer.from(data, 'base64').length` decodes the whole attachment —
|
|
186
|
+
* a full allocation per media block on EVERY `eventsFromTurns` replay
|
|
187
|
+
* (session load/switch/export/search) just to label a chip with a size.
|
|
188
|
+
*/
|
|
189
|
+
function base64DecodedSize(data) {
|
|
190
|
+
const padding = data.endsWith("==") ? 2 : data.endsWith("=") ? 1 : 0;
|
|
191
|
+
return Math.floor(data.length * 3 / 4) - padding;
|
|
192
|
+
}
|
|
184
193
|
function eventsFromTurns(turns, runs = []) {
|
|
185
194
|
const runById = /* @__PURE__ */ new Map();
|
|
186
195
|
for (const run of runs) if (!runById.has(run.id)) runById.set(run.id, run);
|
|
@@ -361,12 +370,12 @@ function eventsFromTurns(turns, runs = []) {
|
|
|
361
370
|
for (const sibling of turn.content) if (sibling.type === "image" || sibling.type === "audio" || sibling.type === "video") attachments.push({
|
|
362
371
|
name: sibling.name ?? sibling.type,
|
|
363
372
|
mediaType: sibling.mediaType,
|
|
364
|
-
size: typeof sibling.data === "string" ?
|
|
373
|
+
size: typeof sibling.data === "string" ? base64DecodedSize(sibling.data) : 0
|
|
365
374
|
});
|
|
366
375
|
else if (sibling.type === "document" && sibling.encoding === "base64") attachments.push({
|
|
367
376
|
name: sibling.name ?? "document",
|
|
368
377
|
mediaType: sibling.mediaType,
|
|
369
|
-
size: typeof sibling.data === "string" ?
|
|
378
|
+
size: typeof sibling.data === "string" ? base64DecodedSize(sibling.data) : 0
|
|
370
379
|
});
|
|
371
380
|
else if (sibling !== block && sibling.type === "text") {
|
|
372
381
|
const m = sibling.text.match(/^<attachment\s+(?:name="([^"]+)"\s*)?(?:media_type="([^"]+)")?/);
|
|
@@ -2459,7 +2468,8 @@ function chatAutoCompactBehavior(opts) {
|
|
|
2459
2468
|
...opts.summarizer ? {
|
|
2460
2469
|
provider: opts.summarizer.provider,
|
|
2461
2470
|
model: opts.summarizer.model
|
|
2462
|
-
} : {}
|
|
2471
|
+
} : {},
|
|
2472
|
+
releaseReplacedTurns: true
|
|
2463
2473
|
};
|
|
2464
2474
|
}
|
|
2465
2475
|
//#endregion
|
|
@@ -5276,6 +5286,7 @@ const DEFAULT_SETTINGS = {
|
|
|
5276
5286
|
showCompactionSummary: false,
|
|
5277
5287
|
compactionModel: "",
|
|
5278
5288
|
targetFps: 60,
|
|
5289
|
+
mouseInteractions: true,
|
|
5279
5290
|
allowInteraction: true,
|
|
5280
5291
|
smoothStreaming: true,
|
|
5281
5292
|
fileLogging: false,
|
|
@@ -5515,6 +5526,12 @@ const SETTINGS_TOGGLES = [
|
|
|
5515
5526
|
key: "fileLogging",
|
|
5516
5527
|
label: "File logging",
|
|
5517
5528
|
description: "persist this session's logs to ~/.zidane/logs/<datetime>.txt (the Logs tab shows them regardless)"
|
|
5529
|
+
},
|
|
5530
|
+
{
|
|
5531
|
+
category: "ui",
|
|
5532
|
+
key: "mouseInteractions",
|
|
5533
|
+
label: "Clickable UI",
|
|
5534
|
+
description: "mouse clicks, hovers & wheel scrolling on hints and rows (off = terminal-native text selection and scrollback)"
|
|
5518
5535
|
}
|
|
5519
5536
|
];
|
|
5520
5537
|
const SETTINGS_CHOICES = [
|
|
@@ -6293,8 +6310,8 @@ function buildHints(options) {
|
|
|
6293
6310
|
}] : [],
|
|
6294
6311
|
...modelHint ? [modelHint] : [],
|
|
6295
6312
|
{
|
|
6296
|
-
key: keybindings.
|
|
6297
|
-
label: "
|
|
6313
|
+
key: keybindings.openSettings,
|
|
6314
|
+
label: "settings"
|
|
6298
6315
|
}
|
|
6299
6316
|
];
|
|
6300
6317
|
return [
|
|
@@ -8962,6 +8979,20 @@ const SMOOTH_BURST_BACKLOG_CHARS = 400;
|
|
|
8962
8979
|
const SMOOTH_MAX_CPS = 4e3;
|
|
8963
8980
|
const SMOOTH_MAX_BACKLOG_CHARS = 4e3;
|
|
8964
8981
|
const PARENT_OWNER = "parent";
|
|
8982
|
+
/**
|
|
8983
|
+
* Segment bound for a growing streaming markdown event. Coalescing copies
|
|
8984
|
+
* the ENTIRE accumulated string into fresh React state on every ~16ms
|
|
8985
|
+
* drain tick, so one long streamed message costs O(L²) aggregate — past
|
|
8986
|
+
* this threshold the event is split and the copy re-bounded. The split
|
|
8987
|
+
* reuses {@link chunkMarkdownForRender} (blank-line boundaries outside
|
|
8988
|
+
* fences, unsafe-continuation guard), so the finalized segments are
|
|
8989
|
+
* byte-identical to the chunks the renderer would have produced inside a
|
|
8990
|
+
* single event, and the one-row markdown/markdown margin stands in for
|
|
8991
|
+
* the consumed blank line exactly like the renderer's inter-chunk gap.
|
|
8992
|
+
* When no safe boundary exists (one giant fence/list) the event keeps
|
|
8993
|
+
* growing until one arrives.
|
|
8994
|
+
*/
|
|
8995
|
+
const STREAMING_MARKDOWN_SEGMENT_CHARS = 64 * 1024;
|
|
8965
8996
|
function emptyBucket(owner, depth) {
|
|
8966
8997
|
return {
|
|
8967
8998
|
markdown: "",
|
|
@@ -8977,13 +9008,56 @@ function applyBucket(prev, bucket) {
|
|
|
8977
9008
|
if (bucket.markdown) result = appendMarkdownDelta(result, bucket.markdown, bucket.owner, bucket.depth, bucket.turnId);
|
|
8978
9009
|
return result;
|
|
8979
9010
|
}
|
|
9011
|
+
/**
|
|
9012
|
+
* Backoff for over-threshold events `chunkMarkdownForRender` could not
|
|
9013
|
+
* split (one giant fence/list): records the text length at the last failed
|
|
9014
|
+
* attempt, keyed on the streaming event object (re-keyed onto each tick's
|
|
9015
|
+
* replacement). Without it a single unsplittable segment re-runs the full
|
|
9016
|
+
* O(L) chunk walk on every ~16ms drain tick. Growth is geometric (retry at
|
|
9017
|
+
* +25%), so total re-chunk work stays O(L) amortized.
|
|
9018
|
+
*/
|
|
9019
|
+
const unsplittableAtLength = /* @__PURE__ */ new WeakMap();
|
|
9020
|
+
const SEGMENT_SPLIT_RETRY_GROWTH = 1.25;
|
|
8980
9021
|
function appendMarkdownDelta(prev, delta, owner, depth, turnId) {
|
|
8981
9022
|
const last = prev[prev.length - 1];
|
|
8982
9023
|
if (last && last.kind === "markdown" && last.streaming && ownerOf(last) === owner) {
|
|
9024
|
+
const merged = last.text + delta;
|
|
8983
9025
|
const next = prev.slice(0, -1);
|
|
9026
|
+
if (merged.length > STREAMING_MARKDOWN_SEGMENT_CHARS) {
|
|
9027
|
+
const lastFailed = unsplittableAtLength.get(last);
|
|
9028
|
+
if (lastFailed === void 0 || merged.length > lastFailed * SEGMENT_SPLIT_RETRY_GROWTH) {
|
|
9029
|
+
const chunks = chunkMarkdownForRender(merged);
|
|
9030
|
+
if (chunks.length > 1) {
|
|
9031
|
+
for (const chunk of chunks.slice(0, -1)) next.push({
|
|
9032
|
+
...last,
|
|
9033
|
+
text: chunk,
|
|
9034
|
+
streaming: false
|
|
9035
|
+
});
|
|
9036
|
+
next.push({
|
|
9037
|
+
...last,
|
|
9038
|
+
text: chunks[chunks.length - 1]
|
|
9039
|
+
});
|
|
9040
|
+
return next;
|
|
9041
|
+
}
|
|
9042
|
+
const grown = {
|
|
9043
|
+
...last,
|
|
9044
|
+
text: merged
|
|
9045
|
+
};
|
|
9046
|
+
unsplittableAtLength.set(grown, merged.length);
|
|
9047
|
+
next.push(grown);
|
|
9048
|
+
return next;
|
|
9049
|
+
}
|
|
9050
|
+
const grown = {
|
|
9051
|
+
...last,
|
|
9052
|
+
text: merged
|
|
9053
|
+
};
|
|
9054
|
+
unsplittableAtLength.set(grown, lastFailed);
|
|
9055
|
+
next.push(grown);
|
|
9056
|
+
return next;
|
|
9057
|
+
}
|
|
8984
9058
|
next.push({
|
|
8985
9059
|
...last,
|
|
8986
|
-
text:
|
|
9060
|
+
text: merged
|
|
8987
9061
|
});
|
|
8988
9062
|
return next;
|
|
8989
9063
|
}
|
|
@@ -9216,7 +9290,8 @@ function useStreamBuffer(setEvents, options) {
|
|
|
9216
9290
|
let next = prev;
|
|
9217
9291
|
for (const portion of portions) next = applyBucket(next, portion);
|
|
9218
9292
|
for (const u of queued) next = u(next);
|
|
9219
|
-
|
|
9293
|
+
const cap = maxEventsRef.current;
|
|
9294
|
+
return cap === null ? next : capTranscriptEvents(next, cap ?? void 0);
|
|
9220
9295
|
});
|
|
9221
9296
|
if (!stillHasContent) stopTicker();
|
|
9222
9297
|
}, [setEvents, stopTicker]);
|
|
@@ -9276,6 +9351,7 @@ function useStreamBuffer(setEvents, options) {
|
|
|
9276
9351
|
bucketsRef.current.clear();
|
|
9277
9352
|
pendingUpdatersRef.current = [];
|
|
9278
9353
|
}, [stopTicker]);
|
|
9354
|
+
useEffect(() => reset, [reset]);
|
|
9279
9355
|
return useMemo(() => ({
|
|
9280
9356
|
queueStreamDelta,
|
|
9281
9357
|
appendImmediate,
|
|
@@ -9361,4 +9437,4 @@ function computeTurnAnchors(items) {
|
|
|
9361
9437
|
//#endregion
|
|
9362
9438
|
export { McpAuthProvider as $, TOKEN_DISCIPLINE_DOCTRINE as $n, filterChainFallbacks as $t, runOAuthLogin as A, TODOREAD_TOOL as An, useSettings as At, mcpToolsCachePath as B, pruneTodosByRun as Bn, CATPPUCCIN_MACCHIATO as Bt, projectsFilePath as C, DEFAULT_AGENT_ID as Cn, DEFAULT_SETTINGS as Ct, formatPathForCwd as D, accentColor as Dn, SETTINGS_TOGGLES as Dt, writeProjects as E, PLAN_AGENT as En, SETTINGS_INPUTS as Et, parseJsonTolerant as F, createTodoTools as Fn, VAPORWAVE_THEME as Ft, useMcpToolToggleMap as G, COMMUNICATION_DOCTRINE as Gn, useDiscoveryOptional as Gt, saveMcpToolsCache as H, setTodosForRun as Hn, createDiscoverySlot as Ht, parseMcpsFile as I, getArchivedTodosForRun as In, GRUVBOX_DARK as It, indexOfServerRow as J, INTERACTION_GUIDANCE as Jn, resolveConfig as Jt, useMcpToolToggleSet as K, DOING_TASKS_DOCTRINE as Kn, ConfigProvider as Kt, parseClaudeState as L, getTodosForRun as Ln, GRUVBOX_LIGHT as Lt, buildMcpServers as M, TODOWRITE_TOOL as Mn, DEFAULT_THEME as Mt, defaultMcpsConfigPaths as N, TODO_STATUS_GLYPHS as Nn, resolveChipColor as Nt, fetchOAuthRedirect as O, resolveAgentId as On, SettingsProvider as Ot, discoverProjectMcps as P, TODO_WRITE_COUNTS_METADATA_KEY as Pn, resolveTheme as Pt, patchMcpCredential as Q, SUBAGENT_GUIDANCE as Qn, chainsEqual as Qt, clearMcpToolsCache as R, isTodoTool as Rn, CATPPUCCIN_FRAPPE as Rt, matchesSafelistEntry as S, BUILTIN_AGENTS as Sn, usageByModel as Sr, useEnabledToggleSet as St, suggestSafelistEntries as T, DEFAULT_PERSIST_EXCLUDE_TOOLS as Tn, SETTINGS_CHOICES as Tt, subscribeMcpToolsCache as U, useActiveTodos as Un, DiscoveryProvider as Ut, refreshMcpToolsCatalog as V, selectActiveTodos as Vn, CATPPUCCIN_MOCHA as Vt, buildToolToggle as W, ACTIONS_WITH_CARE_DOCTRINE as Wn, useDiscovery as Wt, createFileMcpCredentialStore as X, PLAN_MODE_DOCTRINE as Xn, buildRunModel as Xt, parentServerName as Y, INTERACTION_GUIDANCE_NO_PROMPTS as Yn, resolveStoragePaths as Yt, mcpCredentialsPath as Z, PLAN_MODE_DOCTRINE_NO_PROMPTS as Zn, chainPositionOf as Zt, useSafeModeQueue as _, resolvePlatformPackage as _n, sumRunCosts as _r, hintsLength as _t, useSurfaces as a, tryOpenBrowser as an, DEFAULT_SESSION_TITLE as ar, InteractionsProvider as at, getSafelist as b, renderAgentsMdBlock as bn, toolResultText as br, shortChord as bt, useStreamBuffer as c, buildUpdateHint as cn, deriveSessionTitle as cr, createInteractionTools as ct, discoverProjectSkills as d, compareSemver as dn, listSessionMeta as dr, pendingInteractionsFromTurns as dt, providerKeySetChanged as en, buildBuildSystem as er, useMcpAuthDispatch as et, renderSession as f, detectLibc as fn, loadState as fr, serializeInteractionResponse as ft, useSafeModeActions as g, performSelfUpdate as gn, stripSpawnTokensLine as gr, clipHintsToWidth as gt, SafeModeProvider as h, performInPlaceSelfUpdate as hn, serverToolResultSummary as hr, EMPTY_HINTS as ht, useSelectStyle as i, useCompletion as in, createChatTurnsReadTool as ir, ASK_USER_TOOL as it, supportsOAuth as j, TODOS_METADATA_KEY as jn, BUILTIN_THEMES as jt, oauthUsesManualCodePaste as k, singleAgentRegistry as kn, clampFps as kt, buildSkillsConfig as l, useUpdateCheck as ln, eventsFromTurns as lr, isInteractionTool as lt, writeSessionExport as m, parseSemver as mn, saveState as mr, useInteractionsQueue as mt, ThemeProvider as n, sanitizeModelChain as nn, envSection as nr, getMcpAuthStatus as nt, useSyntaxStyles as o, bootProfileEnabled as on, compactSummaryEvent as or, PRESENT_PLAN_TOOL as ot, resolveSessionExportTarget as p, detectPackageManager as pn, marginTopFor as pr, useInteractionsActions as pt, buildVisibleMcpRows as q, IDENTITY_PREFIX as qn, useConfig as qt, useColors as r, toggleChainEntry as rn, chatReferenceTokensForPrompt as rr, reduceMcpAuth as rt, useTheme as s, bootTick as sn, createStateStore as sr, buildResumedToolResultsTurn as st, computeTurnAnchors as t, restoreChainFallbacks as tn, buildPlanSystem as tr, useMcpAuthState as tt, defaultSkillScanPaths as u, checkForUpdate as un, lastContextSizeFromTurns as ur, makeRequestInteraction as ut, IMPLICITLY_SAFE_TOOLS as v, chatAutoCompactBehavior as vn, titleFromTurns as vr, truncateTrailing as vt, readProjects as w, DEFAULT_BUDGET_EXCLUDE_TOOLS as wn, SETTINGS_CATEGORIES as wt, isOnSafelist as x, BUILD_AGENT as xn, updateToolEventOutcomes as xr, listProjectFiles as xt, addToSafelist as y, discoverAgentsMd as yn, toolCallPreview as yr, buildHints as yt, loadMcpToolsCache as z, pickActiveRunId as zn, CATPPUCCIN_LATTE as zt };
|
|
9363
9439
|
|
|
9364
|
-
//# sourceMappingURL=transcript-anchors-
|
|
9440
|
+
//# sourceMappingURL=transcript-anchors-CnmxZ8QR.js.map
|