zidane 6.3.5 → 6.3.7
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-IgXPptYr.js → acp-CAX3tOEY.js} +4 -4
- package/dist/{acp-IgXPptYr.js.map → acp-CAX3tOEY.js.map} +1 -1
- package/dist/acp-cli.js +6 -6
- package/dist/acp.d.ts +2 -2
- package/dist/acp.js +1 -1
- package/dist/{agent-BJuiohV_.js → agent-Emjeo5Ad.js} +236 -23
- package/dist/{agent-BJuiohV_.js.map → agent-Emjeo5Ad.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-Drd3842n.js → anthropic-BN0iPMox.js} +20 -5
- package/dist/anthropic-BN0iPMox.js.map +1 -0
- package/dist/{auth-WkdClN2Y.js → auth-Dptb8U5J.js} +10 -5
- package/dist/auth-Dptb8U5J.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +50 -6
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +4 -4
- package/dist/{context-transport-DAjjzK_x.js → context-transport-3b0qpM2m.js} +3 -3
- package/dist/{context-transport-DAjjzK_x.js.map → context-transport-3b0qpM2m.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +3 -3
- package/dist/contexts/docker.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +2 -2
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/contexts-DWVt7MvF.js.map +1 -1
- package/dist/contexts.d.ts +3 -3
- 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/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-B9jSo84a.d.ts → index-C8TwH34B.d.ts} +2 -2
- package/dist/index-C8TwH34B.d.ts.map +1 -0
- package/dist/{index-D-DPqXxU.d.ts → index-DTIe4e1R.d.ts} +268 -10
- package/dist/index-DTIe4e1R.d.ts.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +9 -9
- package/dist/{login-ClSY8pN6.js → login-C41DcRK-.js} +2 -2
- package/dist/{login-ClSY8pN6.js.map → login-C41DcRK-.js.map} +1 -1
- package/dist/{mcp-UIBc81Zm.js → mcp-8bEHU4WB.js} +3 -3
- package/dist/{mcp-UIBc81Zm.js.map → mcp-8bEHU4WB.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-B-Zt-_Oz.js → messages-DoHRwMw-.js} +2 -2
- package/dist/{messages-B-Zt-_Oz.js.map → messages-DoHRwMw-.js.map} +1 -1
- package/dist/{openai-compat-BF1pSB_F.js → openai-compat-Bf9uMTMa.js} +60 -3
- package/dist/openai-compat-Bf9uMTMa.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +4 -2
- package/dist/providers/baseten.js.map +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +2 -2
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +3 -1
- package/dist/providers/openrouter.js.map +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-C-lh3sVD.js → providers-BlaXBUwd.js} +3 -3
- package/dist/{providers-C-lh3sVD.js.map → providers-BlaXBUwd.js.map} +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +5 -5
- package/dist/restate.d.ts +2 -2
- package/dist/{sandbox-DqwpKX18.d.ts → sandbox-DLY6uah7.d.ts} +2 -2
- package/dist/{sandbox-DqwpKX18.d.ts.map → sandbox-DLY6uah7.d.ts.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-BE9_p0sN.js → session-Bdk31kA5.js} +2 -2
- package/dist/{session-BE9_p0sN.js.map → session-Bdk31kA5.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-e45MhlYy.js → stdio-BKFpPNvX.js} +2 -2
- package/dist/{stdio-e45MhlYy.js.map → stdio-BKFpPNvX.js.map} +1 -1
- package/dist/{stdio-loader-Bkrs9e8t.js → stdio-loader-DFDpBwwI.js} +2 -2
- package/dist/{stdio-loader-Bkrs9e8t.js.map → stdio-loader-DFDpBwwI.js.map} +1 -1
- package/dist/{tool-formatters-BX9TaWAr.d.ts → tool-formatters-B_dGfYqT.d.ts} +2 -2
- package/dist/{tool-formatters-BX9TaWAr.d.ts.map → tool-formatters-B_dGfYqT.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-BpCQElT6.d.ts → transcript-anchors-CqxIlrhv.d.ts} +15 -6
- package/dist/transcript-anchors-CqxIlrhv.d.ts.map +1 -0
- package/dist/{transcript-anchors-9LKsM0OZ.js → transcript-anchors-DhBTqTyc.js} +146 -32
- package/dist/transcript-anchors-DhBTqTyc.js.map +1 -0
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +350 -132
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-C_bn9UmE.d.ts → turn-operations-D7JhuW_X.d.ts} +3 -3
- package/dist/{turn-operations-C_bn9UmE.d.ts.map → turn-operations-D7JhuW_X.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/{types-DdZMQxfT.d.ts → types-M2DauK2D.d.ts} +2 -2
- package/dist/{types-DdZMQxfT.d.ts.map → types-M2DauK2D.d.ts.map} +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/{xai-CLqZQdcj.js → xai-BI4KgCGS.js} +2 -2
- package/dist/{xai-CLqZQdcj.js.map → xai-BI4KgCGS.js.map} +1 -1
- package/docs/ARCHITECTURE.md +29 -1
- package/docs/CHAT.md +4 -2
- package/docs/RUN_IN_BACKGROUND.md +2 -2
- package/docs/SKILL.md +1 -1
- package/docs/TUI.md +3 -3
- package/package.json +1 -1
- package/dist/anthropic-Drd3842n.js.map +0 -1
- package/dist/auth-WkdClN2Y.js.map +0 -1
- package/dist/index-B9jSo84a.d.ts.map +0 -1
- package/dist/index-D-DPqXxU.d.ts.map +0 -1
- package/dist/openai-compat-BF1pSB_F.js.map +0 -1
- package/dist/transcript-anchors-9LKsM0OZ.js.map +0 -1
- package/dist/transcript-anchors-BpCQElT6.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-loader-Bkrs9e8t.js","names":["spawn","nodeSpawn","spawnSync","nodeSpawnSync","spawn"],"sources":["../scripts/cross-spawn-shim.mjs","../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js"],"sourcesContent":["/**\n * Build-time replacement for the userland process-spawn helper that the\n * MCP SDK's stdio transport depends on. Injected by tsdown via the\n * rolldown alias plugin in `tsdown.config.ts`.\n *\n * Why this exists\n *\n * The upstream spawn helper is CJS and its first line dynamically resolves\n * Node's process-spawn built-in via a bare specifier. When a downstream\n * consumer re-bundles zidane as ESM (esbuild / Vite / tsup with\n * `format: 'esm'` and Node built-ins not externalized), that bare\n * resolution gets wrapped in esbuild's `__require` shim and throws at\n * runtime — every stdio MCP server fails to launch.\n *\n * Aliasing the helper to this file at zidane's own build step replaces\n * the offending bare resolution with explicit `node:`-prefixed imports.\n * Downstream bundlers recognize the `node:` prefix as a Node built-in\n * and externalize it automatically. The upstream MCP SDK is unmodified.\n *\n * Tradeoff\n *\n * The replaced helper does two extra things vs. raw spawn:\n * 1. Windows `.cmd` / `.bat` / `.ps1` resolution via PATHEXT + cmd.exe\n * shelling. Compensated below with `shell: true` on Win32, which\n * routes through cmd.exe and handles the common `npx` / `pnpm` /\n * `yarn` shims.\n * 2. Synthesizes a clean ENOENT error event for missing commands.\n * `node:child_process.spawn` already emits a perfectly usable\n * `error` event with `code === 'ENOENT'`, which the MCP SDK's stdio\n * transport forwards to `onerror`. Functionally equivalent.\n *\n * Net: zero behavioural change on POSIX, near-identical on Windows for\n * MCP-style stdio invocations.\n */\n\nimport { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from 'node:child_process'\nimport process from 'node:process'\n\nconst IS_WIN32 = process.platform === 'win32'\n\nfunction withWin32Shell(options) {\n // Only opt into shell mode on Windows, and only when the caller hasn't\n // explicitly disabled it. POSIX never needs the shell wrapper — args\n // would have to be re-quoted (changes argv semantics) and trap/`set -e`\n // behaviour shifts in subtle ways.\n if (!IS_WIN32)\n return options\n if (options && options.shell !== undefined)\n return options\n return { ...(options ?? {}), shell: true }\n}\n\nexport function spawn(command, args, options) {\n return nodeSpawn(command, args, withWin32Shell(options))\n}\n\nexport function spawnSync(command, args, options) {\n return nodeSpawnSync(command, args, withWin32Shell(options))\n}\n\n// Match cross-spawn's CommonJS interop shape so existing imports keep\n// working byte-for-byte:\n// - default import: `import spawn from 'cross-spawn'` (SDK uses this)\n// - named import: `import { spawn, sync } from 'cross-spawn'`\n// - require pattern: `const cs = require('cross-spawn'); cs.sync(...)`\nspawn.spawn = spawn\nspawn.sync = spawnSync\n\nexport const sync = spawnSync\nexport default spawn\n","import spawn from 'cross-spawn';\nimport process from 'node:process';\nimport { PassThrough } from 'node:stream';\nimport { ReadBuffer, serializeMessage } from '../shared/stdio.js';\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS = process.platform === 'win32'\n ? [\n 'APPDATA',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PROCESSOR_ARCHITECTURE',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'PROGRAMFILES'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment() {\n const env = {};\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n env[key] = value;\n }\n return env;\n}\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport {\n constructor(server) {\n this._readBuffer = new ReadBuffer();\n this._stderrStream = null;\n this._serverParams = server;\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start() {\n if (this._process) {\n throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n this._process.on('error', error => {\n reject(error);\n this.onerror?.(error);\n });\n this._process.on('spawn', () => {\n resolve();\n });\n this._process.on('close', _code => {\n this._process = undefined;\n this.onclose?.();\n });\n this._process.stdin?.on('error', error => {\n this.onerror?.(error);\n });\n this._process.stdout?.on('data', chunk => {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n });\n this._process.stdout?.on('error', error => {\n this.onerror?.(error);\n });\n if (this._stderrStream && this._process.stderr) {\n this._process.stderr.pipe(this._stderrStream);\n }\n });\n }\n /**\n * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to \"pipe\" or \"overlapped\".\n *\n * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to\n * attach listeners before the start method is invoked. This prevents loss of any early\n * error output emitted by the child process.\n */\n get stderr() {\n if (this._stderrStream) {\n return this._stderrStream;\n }\n return this._process?.stderr ?? null;\n }\n /**\n * The child process pid spawned by this transport.\n *\n * This is only available after the transport has been started.\n */\n get pid() {\n return this._process?.pid ?? null;\n }\n processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n async close() {\n if (this._process) {\n const processToClose = this._process;\n this._process = undefined;\n const closePromise = new Promise(resolve => {\n processToClose.once('close', () => {\n resolve();\n });\n });\n try {\n processToClose.stdin?.end();\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGTERM');\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n }\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGKILL');\n }\n catch {\n // ignore\n }\n }\n }\n this._readBuffer.clear();\n }\n send(message) {\n return new Promise(resolve => {\n if (!this._process?.stdin) {\n throw new Error('Not connected');\n }\n const json = serializeMessage(message);\n if (this._process.stdin.write(json)) {\n resolve();\n }\n else {\n this._process.stdin.once('drain', resolve);\n }\n });\n }\n}\n//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iBAAiB,KAAK;GAC5B,KAAK,WAAW,KAAA;GAChB,MAAM,eAAe,IAAI,SAAQ,YAAW;IACxC,eAAe,KAAK,eAAe;KAC/B,QAAQ;IACZ,CAAC;GACL,CAAC;GACD,IAAI;IACA,eAAe,OAAO,IAAI;GAC9B,QACM,CAEN;GACA,MAAM,QAAQ,KAAK,CAAC,cAAc,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;GAC5F,IAAI,eAAe,aAAa,MAAM;IAClC,IAAI;KACA,eAAe,KAAK,SAAS;IACjC,QACM,CAEN;IACA,MAAM,QAAQ,KAAK,CAAC,cAAc,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;GAChG;GACA,IAAI,eAAe,aAAa,MAC5B,IAAI;IACA,eAAe,KAAK,SAAS;GACjC,QACM,CAEN;EAER;EACA,KAAK,YAAY,MAAM;CAC3B;CACA,KAAK,SAAS;EACV,OAAO,IAAI,SAAQ,YAAW;GAC1B,IAAI,CAAC,KAAK,UAAU,OAChB,MAAM,IAAI,MAAM,eAAe;GAEnC,MAAM,OAAO,iBAAiB,OAAO;GACrC,IAAI,KAAK,SAAS,MAAM,MAAM,IAAI,GAC9B,QAAQ;QAGR,KAAK,SAAS,MAAM,KAAK,SAAS,OAAO;EAEjD,CAAC;CACL;AACJ"}
|
|
1
|
+
{"version":3,"file":"stdio-loader-DFDpBwwI.js","names":["spawn","nodeSpawn","spawnSync","nodeSpawnSync","spawn"],"sources":["../scripts/cross-spawn-shim.mjs","../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js"],"sourcesContent":["/**\n * Build-time replacement for the userland process-spawn helper that the\n * MCP SDK's stdio transport depends on. Injected by tsdown via the\n * rolldown alias plugin in `tsdown.config.ts`.\n *\n * Why this exists\n *\n * The upstream spawn helper is CJS and its first line dynamically resolves\n * Node's process-spawn built-in via a bare specifier. When a downstream\n * consumer re-bundles zidane as ESM (esbuild / Vite / tsup with\n * `format: 'esm'` and Node built-ins not externalized), that bare\n * resolution gets wrapped in esbuild's `__require` shim and throws at\n * runtime — every stdio MCP server fails to launch.\n *\n * Aliasing the helper to this file at zidane's own build step replaces\n * the offending bare resolution with explicit `node:`-prefixed imports.\n * Downstream bundlers recognize the `node:` prefix as a Node built-in\n * and externalize it automatically. The upstream MCP SDK is unmodified.\n *\n * Tradeoff\n *\n * The replaced helper does two extra things vs. raw spawn:\n * 1. Windows `.cmd` / `.bat` / `.ps1` resolution via PATHEXT + cmd.exe\n * shelling. Compensated below with `shell: true` on Win32, which\n * routes through cmd.exe and handles the common `npx` / `pnpm` /\n * `yarn` shims.\n * 2. Synthesizes a clean ENOENT error event for missing commands.\n * `node:child_process.spawn` already emits a perfectly usable\n * `error` event with `code === 'ENOENT'`, which the MCP SDK's stdio\n * transport forwards to `onerror`. Functionally equivalent.\n *\n * Net: zero behavioural change on POSIX, near-identical on Windows for\n * MCP-style stdio invocations.\n */\n\nimport { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from 'node:child_process'\nimport process from 'node:process'\n\nconst IS_WIN32 = process.platform === 'win32'\n\nfunction withWin32Shell(options) {\n // Only opt into shell mode on Windows, and only when the caller hasn't\n // explicitly disabled it. POSIX never needs the shell wrapper — args\n // would have to be re-quoted (changes argv semantics) and trap/`set -e`\n // behaviour shifts in subtle ways.\n if (!IS_WIN32)\n return options\n if (options && options.shell !== undefined)\n return options\n return { ...(options ?? {}), shell: true }\n}\n\nexport function spawn(command, args, options) {\n return nodeSpawn(command, args, withWin32Shell(options))\n}\n\nexport function spawnSync(command, args, options) {\n return nodeSpawnSync(command, args, withWin32Shell(options))\n}\n\n// Match cross-spawn's CommonJS interop shape so existing imports keep\n// working byte-for-byte:\n// - default import: `import spawn from 'cross-spawn'` (SDK uses this)\n// - named import: `import { spawn, sync } from 'cross-spawn'`\n// - require pattern: `const cs = require('cross-spawn'); cs.sync(...)`\nspawn.spawn = spawn\nspawn.sync = spawnSync\n\nexport const sync = spawnSync\nexport default spawn\n","import spawn from 'cross-spawn';\nimport process from 'node:process';\nimport { PassThrough } from 'node:stream';\nimport { ReadBuffer, serializeMessage } from '../shared/stdio.js';\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS = process.platform === 'win32'\n ? [\n 'APPDATA',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PROCESSOR_ARCHITECTURE',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'PROGRAMFILES'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment() {\n const env = {};\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n env[key] = value;\n }\n return env;\n}\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport {\n constructor(server) {\n this._readBuffer = new ReadBuffer();\n this._stderrStream = null;\n this._serverParams = server;\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start() {\n if (this._process) {\n throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n this._process.on('error', error => {\n reject(error);\n this.onerror?.(error);\n });\n this._process.on('spawn', () => {\n resolve();\n });\n this._process.on('close', _code => {\n this._process = undefined;\n this.onclose?.();\n });\n this._process.stdin?.on('error', error => {\n this.onerror?.(error);\n });\n this._process.stdout?.on('data', chunk => {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n });\n this._process.stdout?.on('error', error => {\n this.onerror?.(error);\n });\n if (this._stderrStream && this._process.stderr) {\n this._process.stderr.pipe(this._stderrStream);\n }\n });\n }\n /**\n * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to \"pipe\" or \"overlapped\".\n *\n * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to\n * attach listeners before the start method is invoked. This prevents loss of any early\n * error output emitted by the child process.\n */\n get stderr() {\n if (this._stderrStream) {\n return this._stderrStream;\n }\n return this._process?.stderr ?? null;\n }\n /**\n * The child process pid spawned by this transport.\n *\n * This is only available after the transport has been started.\n */\n get pid() {\n return this._process?.pid ?? null;\n }\n processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n async close() {\n if (this._process) {\n const processToClose = this._process;\n this._process = undefined;\n const closePromise = new Promise(resolve => {\n processToClose.once('close', () => {\n resolve();\n });\n });\n try {\n processToClose.stdin?.end();\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGTERM');\n }\n catch {\n // ignore\n }\n await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);\n }\n if (processToClose.exitCode === null) {\n try {\n processToClose.kill('SIGKILL');\n }\n catch {\n // ignore\n }\n }\n }\n this._readBuffer.clear();\n }\n send(message) {\n return new Promise(resolve => {\n if (!this._process?.stdin) {\n throw new Error('Not connected');\n }\n const json = serializeMessage(message);\n if (this._process.stdin.write(json)) {\n resolve();\n }\n else {\n this._process.stdin.once('drain', resolve);\n }\n });\n }\n}\n//# sourceMappingURL=stdio.js.map"],"x_google_ignoreList":[1],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,WAAW,QAAQ,aAAa;AAEtC,SAAS,eAAe,SAAS;CAK/B,IAAI,CAAC,UACH,OAAO;CACT,IAAI,WAAW,QAAQ,UAAU,KAAA,GAC/B,OAAO;CACT,OAAO;EAAE,GAAI,WAAW,CAAC;EAAI,OAAO;CAAK;AAC3C;AAEA,SAAgBA,QAAM,SAAS,MAAM,SAAS;CAC5C,OAAOC,MAAU,SAAS,MAAM,eAAe,OAAO,CAAC;AACzD;AAEA,SAAgBC,YAAU,SAAS,MAAM,SAAS;CAChD,OAAOC,UAAc,SAAS,MAAM,eAAe,OAAO,CAAC;AAC7D;AAOA,QAAM,QAAQH;AACd,QAAM,OAAOE;;;;;;AC3Db,MAAa,6BAA6B,QAAQ,aAAa,UACzD;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,IAEI;CAAC;CAAQ;CAAW;CAAQ;CAAS;CAAQ;AAAM;;;;AAI3D,SAAgB,wBAAwB;CACpC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,OAAO,4BAA4B;EAC1C,MAAM,QAAQ,QAAQ,IAAI;EAC1B,IAAI,UAAU,KAAA,GACV;EAEJ,IAAI,MAAM,WAAW,IAAI,GAErB;EAEJ,IAAI,OAAO;CACf;CACA,OAAO;AACX;;;;;;AAMA,IAAa,uBAAb,MAAkC;CAC9B,YAAY,QAAQ;EAChB,KAAK,cAAc,IAAI,WAAW;EAClC,KAAK,gBAAgB;EACrB,KAAK,gBAAgB;EACrB,IAAI,OAAO,WAAW,UAAU,OAAO,WAAW,cAC9C,KAAK,gBAAgB,IA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AAY,MACZ;GAEJ,KAAK,YAAY,OAAO;EAC5B,SACO,OAAO;GACV,KAAK,UAAU,KAAK;EACxB;CAER;CACA,MAAM,QAAQ;EACV,IAAI,KAAK,UAAU;GACf,MAAM,iBAAiB,KAAK;GAC5B,KAAK,WAAW,KAAA;GAChB,MAAM,eAAe,IAAI,SAAQ,YAAW;IACxC,eAAe,KAAK,eAAe;KAC/B,QAAQ;IACZ,CAAC;GACL,CAAC;GACD,IAAI;IACA,eAAe,OAAO,IAAI;GAC9B,QACM,CAEN;GACA,MAAM,QAAQ,KAAK,CAAC,cAAc,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;GAC5F,IAAI,eAAe,aAAa,MAAM;IAClC,IAAI;KACA,eAAe,KAAK,SAAS;IACjC,QACM,CAEN;IACA,MAAM,QAAQ,KAAK,CAAC,cAAc,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;GAChG;GACA,IAAI,eAAe,aAAa,MAC5B,IAAI;IACA,eAAe,KAAK,SAAS;GACjC,QACM,CAEN;EAER;EACA,KAAK,YAAY,MAAM;CAC3B;CACA,KAAK,SAAS;EACV,OAAO,IAAI,SAAQ,YAAW;GAC1B,IAAI,CAAC,KAAK,UAAU,OAChB,MAAM,IAAI,MAAM,eAAe;GAEnC,MAAM,OAAO,iBAAiB,OAAO;GACrC,IAAI,KAAK,SAAS,MAAM,MAAM,IAAI,GAC9B,QAAQ;QAGR,KAAK,SAAS,MAAM,KAAK,SAAS,OAAO;EAEjD,CAAC;CACL;AACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gu as StreamEvent, Uu as SessionMeta, Wu as Settings, cd as ModelInfo, id as ProviderKey, rd as ProviderAuth, xm as SessionTurn } from "./index-DTIe4e1R.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/turn-selection.d.ts
|
|
@@ -557,4 +557,4 @@ declare function displayNameFor(name: string, input?: Record<string, unknown>):
|
|
|
557
557
|
declare function formatToolCall(name: string, input: Record<string, unknown>): ToolFormatLine | null;
|
|
558
558
|
//#endregion
|
|
559
559
|
export { retagUserPromptEvents as $, highlightSegments as A, ApprovalDecision as B, SearchTurnResult as C, buildSessionSearchIndex as D, SessionSearchIndex as E, searchSessionIndex as F, useSafeModeActions as G, RequestApproval as H, searchSessionIndexAsync as I, EDIT_TOOL_NAMES as J, useSafeModeQueue as K, searchSessionTurns as L, searchSessionHistory as M, searchSessionHistoryIndex as N, buildSessionSearchIndexAsync as O, searchSessionHistoryIndexAsync as P, isVisible as Q, searchTurns as R, SearchSessionResult as S, SessionSearchExcerpt as T, SafeModeActions as U, ApprovalRequest as V, SafeModeProvider as W, isTurnHighlighted as X, isEditErrorResult as Y, isUserBashEvent as Z, splitMarkdownCodeBlocks as _, formatToolCall as a, IndexedSearchTurn as b, splitPromptSegments as c, filterModelCatalog as d, selectableTurnIds as et, indexOfEntry as f, normalizeMarkdownCodeFences as g, chunkMarkdownForRender as h, displayNameFor as i, searchHighlightRanges as j, filterSessionSearchCatalog as k, CatalogEntry as l, MarkdownSegment as m, ToolDisplayMeta as n, turnSelectionOwnership as nt, PromptSegment as o, MARKDOWN_RENDER_CHUNK_TARGET_BYTES as p, BASH_CALL_ID_PREFIX as q, ToolFormatLine as r, PromptSegmentRef as s, TOOL_DISPLAY as t, selectionAfterTurnRemoval as tt, buildModelCatalog as u, HighlightRange as v, SessionHistoryMatch as w, SearchExcerpt as x, HighlightSegment as y, searchableTurnText as z };
|
|
560
|
-
//# sourceMappingURL=tool-formatters-
|
|
560
|
+
//# sourceMappingURL=tool-formatters-B_dGfYqT.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-formatters-
|
|
1
|
+
{"version":3,"file":"tool-formatters-B_dGfYqT.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":";;;;;cAea,eAAA,EAAiB,WAAW;AAAzC;;;;AAAyC;AAAzC,iBAOgB,yBAAA,CACd,MAAA,qBACA,SAAA,UACA,KAAA;;;;;;;;AAAwB;AA2B1B;;;;AAA8C;AA0B9C;;;;iBA1BgB,iBAAA,CAAkB,IAAY;AA6B9C;;;;;;;;AAAA,cAHa,mBAAA;AAyDb;AAAA,iBAtDgB,eAAA,CAAgB,KAAA,EAAO,IAAI,CAAC,WAAA;;;AAyDrB;AAiEvB;;;;;;;;;AAAgE;AA2DhE;;;;;;;;AAA2E;AAkE3E;;;;;iBAjMgB,qBAAA,CACd,MAAA,WAAiB,WAAA,IACjB,aAAA,WAAwB,WAAA,cACd,WAAA;;;;;;;AAiM4B;AA8BxC;;;;;;iBA9JgB,SAAA,CAAU,KAAA,EAAO,WAAA,EAAa,QAAA,EAAU,QAAQ;;;;;;;;;;AAiKrB;;;;ACzU3C;;;;AAK6B;AAQ7B;;;;;;;;AAE4B;iBDoNZ,sBAAA,CAAuB,MAAA,WAAiB,WAAA,KAAgB,GAAG;;;;;;;;;;;;iBAkE3D,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,WAAA,aACZ,cAAA,iBACA,SAAA,EAAW,WAAA;;;;;;ACjRoB;AAIjC;;;;;;;;;;;;;;iBD2SgB,iBAAA,CACd,MAAA,WAAiB,WAAA,IACjB,QAAA,GAAW,QAAA,EACX,OAAA,IAAW,KAAA,EAAO,WAAA;;;;AAxT0B;AA0B9C;;;;AAAgC;AAGhC;;;;KC9CY,gBAAA;EAKJ,IAAA;EAAiB,IAAI;AAAA;ADyC8C;AAsD3E;;;;;AAtD2E,KCjC/D,kBAAA;EACJ,IAAA;AAAA;EACA,IAAA;EAAe,KAAA;AAAA;AAAA,UAEN,eAAA;EACf,EAAA;EACA,IAA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UAAA;AAAA;ALiDuC;AAsD3E;;;;;;;;;;;;;;AAGuB;AAiEvB;;;;;;AA1H2E,iBKzB3D,mBAAA,CACd,IAAA,UACA,IAAA,WAAe,gBAAA,KACd,aAAa;;;;;;;AL5ChB;;;;AAAyC;AAOzC;;;;;;;;UMFiB,cAAA;ENgCD;;;;AAA8B;EM1B5C,MAAA;ENoD8B;;;AAAA;AAGhC;EMjDE,IAAI;AAAA;AAAA,UAGW,eAAA;EN8CsB;;;;AAAoC;AAsD3E;;;;EM1FE,WAAA,aAAwB,KAAA,EAAO,MAAA;EN6FrB;;;;;EMvFV,MAAA,GAAS,KAAA,EAAO,MAAA,sBAA4B,cAAA;AAAA;AAAA,cAOjC,YAAA,EAAc,QAAA,CAAS,MAAA,SAAe,eAAA;;ANgF5B;AAiEvB;;;;;;;;;AAAgE;AA2DhE;;;iBMuGgB,cAAA,CACd,IAAA,UACA,KAAA,GAAQ,MAAM;;;;;ANzG2D;AAkE3E;iBMyDgB,cAAA,CAAe,IAAA,UAAc,KAAA,EAAO,MAAA,oBAA0B,cAAc"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ar as
|
|
1
|
+
import { $m as hydrateReadStateFromSession, Ar as createSkillsReadTool, As as SpawnToolOptions, Br as grep, Bs as matchModelEntries, Cr as ToolSearchToolOptions, Dr as SkillsRunScriptToolOptions, Ds as SpawnTaskInput, Er as createSkillsUseTool, Es as ExtensionSubagentDef, Fr as readFile, Fs as createSpawnTool, Gm as ToolContext, Hr as edit, Ir as multiEdit, Is as isSpawnTool, Jm as HydrateReadStateOptions, Km as ToolDef, Lr as listFiles, Ls as SpawnModelEntry, Mr as CreateShellToolOptions, Ms as SubagentDef, Nr as createShellTool, Ns as SubagentOverride, Or as createSkillsRunScriptTool, Os as SpawnTaskOutcome, Pr as shell, Ps as SubagentRegistry, Qm as hashContent, Rr as InteractionToolOptions, Rs as createModelSearchTool, Sr as LazyToolEntry, Tr as SkillsUseToolOptions, Ts as ChildAgent, Vr as glob, Xm as ReadStateMap, Ym as ReadStateEntry, Zm as getReadState, _r as waitTask, br as TailTruncateOptions, eh as hydrateReadStateFromSessionAsync, gr as WAIT_TASK_TIMED_OUT_PREFIX, hr as writeFile, jr as shellKill, js as SpawnToolState, kr as SkillsReadToolOptions, ks as SpawnTool, nh as resolveReadStateMap, qm as ToolMap, th as readStateKey, vr as ValidationResult, wr as createToolSearchTool, xr as tailTruncate, yr as validateToolArgs, zr as createInteractionTool, zs as formatModelLine } from "./index-DTIe4e1R.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-CNyeMG7W.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Bt as validateToolArgs, Ct as createSkillsRunScriptTool, Dt as shell, Et as createShellTool, Ft as listFiles, It as createInteractionTool, Lt as grep, Mt as createModelSearchTool, Nt as formatModelLine, Ot as tailTruncate, Pt as matchModelEntries, Rt as glob, St as createSkillsUseTool, Tt as shellKill, _t as WAIT_TASK_TIMED_OUT_PREFIX, bt as createSpawnTool, gt as writeFile, jt as multiEdit, kt as readFile, vt as waitTask, wt as createSkillsReadTool, xt as isSpawnTool, yt as createToolSearchTool, zt as edit } from "./agent-Emjeo5Ad.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 {
|
|
1
|
+
import { Dm as ThinkingLevel, Gu as StreamEvent, Lo as ExtensionRegistry, Lu as EditOutcome, Mm as ToolResultContent, Ns as SubagentOverride, Ps as SubagentRegistry, Tu as AgentRegistry, Uu as SessionMeta, Vu as Picked, Wa as ExtensionConfigCategory, Wu as Settings, Zp as McpServerConfig, _m as SessionContentBlock, cd as ModelInfo, fh as SessionData, hh as SessionStore, id as ProviderKey, mh as SessionRun, no as StoredExtensionConfigItem, qu as ModelChainEntry, rd as ProviderAuth, t as Preset, ud as ProviderDescriptor, xm as SessionTurn } from "./index-DTIe4e1R.js";
|
|
2
2
|
//#region src/chat/hints.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Single hint entry — `<key> <label>`, optionally followed by an inline
|
|
@@ -25,7 +25,15 @@ interface Hint {
|
|
|
25
25
|
*/
|
|
26
26
|
extra?: {
|
|
27
27
|
key: string;
|
|
28
|
-
label: string;
|
|
28
|
+
label: string;
|
|
29
|
+
/**
|
|
30
|
+
* Dispatchable binding spec behind `extra.key` when the displayed
|
|
31
|
+
* chord is an abbreviation (`/l` for `ctrl+l` — see `shortChord`).
|
|
32
|
+
* The abbreviation itself doesn't parse as a keypress, so a renderer
|
|
33
|
+
* that makes the secondary chord independently clickable needs the
|
|
34
|
+
* full spec. Defaults to `extra.key` when omitted.
|
|
35
|
+
*/
|
|
36
|
+
keySpec?: string; /** Defaults to mute on the renderer side. */
|
|
29
37
|
keyColor?: string; /** Defaults to dim on the renderer side. */
|
|
30
38
|
labelColor?: string;
|
|
31
39
|
};
|
|
@@ -1426,9 +1434,10 @@ declare function writeSessionExport(opts: {
|
|
|
1426
1434
|
//#region src/chat/transcript-anchors.d.ts
|
|
1427
1435
|
/**
|
|
1428
1436
|
* One entry in the partitioned transcript-row list. Single events
|
|
1429
|
-
* render as a normal row; `child-run`
|
|
1430
|
-
*
|
|
1431
|
-
*
|
|
1437
|
+
* render as a normal row; a `child-run` groups ONE subagent's events
|
|
1438
|
+
* from a consecutive run of subagent output into one bordered box
|
|
1439
|
+
* (concurrent siblings get a `child-run` each, so their rows never
|
|
1440
|
+
* braid together inside a shared frame); `tool-group`s
|
|
1432
1441
|
* collect ALL parent-owned tool/tool-result events of one exchange
|
|
1433
1442
|
* into a single collapsible summary row (`Settings.groupToolCalls`).
|
|
1434
1443
|
* `key` is stable across re-partitions of the same stream (derived
|
|
@@ -1476,4 +1485,4 @@ declare function computeTurnAnchors(items: readonly TranscriptItem[]): {
|
|
|
1476
1485
|
};
|
|
1477
1486
|
//#endregion
|
|
1478
1487
|
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 };
|
|
1479
|
-
//# sourceMappingURL=transcript-anchors-
|
|
1488
|
+
//# sourceMappingURL=transcript-anchors-CqxIlrhv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-anchors-CqxIlrhv.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;EAmBE;EAjBF,UAAA;EAqBE;;AAAU;AAcd;;;EA5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,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;;;;;;;;;;;KSQY,cAAA;EACJ,IAAA;EAAe,KAAA,EAAO,WAAA;EAAa,QAAA,GAAW,WAAA;AAAA;EAC9C,IAAA;EAAmB,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;EACrD,IAAA;EAAoB,GAAA;EAAa,MAAA,EAAQ,WAAA;EAAe,QAAA,GAAW,WAAA;AAAA;ATuDzB;AAqBlD;;;;AAAuC;AAavC;;;;;;;;;AAAuF;;;AAlCrC,iBSnClC,kBAAA,CAAmB,KAAA,WAAgB,cAAA;EACjD,QAAA,EAAU,WAAW;EACrB,GAAA;EACA,UAAA;AAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Dt as shell, Ft as listFiles, G as EMPTY_EXTENSION_REGISTRY, Lt as grep, Rt as glob, Tt as shellKill, Vt as resolveStorageDirs, Zt as mergeKeybindings, bt as createSpawnTool, en as readKeybindingsRaw, ft as composePresets, g as migrateSessionArtifactDirs, gt as writeFile$1, jt as multiEdit, kt as readFile$1, pt as definePreset, rt as buildExtensionPreset, tn as resolveExtensionKeybindings, vt as waitTask, zt as edit } from "./agent-Emjeo5Ad.js";
|
|
3
3
|
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId } from "./format-BF745pLL.js";
|
|
4
4
|
import { l as errorMessage } from "./errors-DJUxZg9b.js";
|
|
5
5
|
import { M as findGitRoot$1, i as discoverSkills, j as projectUserPaths } from "./resolve-BPTA1RpX.js";
|
|
6
6
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
7
|
-
import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-
|
|
7
|
+
import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-8bEHU4WB.js";
|
|
8
8
|
import { joinSystemPrompt } from "./prompt.js";
|
|
9
9
|
import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
10
10
|
import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions, t as applyInsert } from "./completion-core-BRo86R_L.js";
|
|
11
11
|
import { r as fetchUrl } from "./fetch-url-_5WKWpbQ.js";
|
|
12
12
|
import { webSearch } from "./tools/web-search.js";
|
|
13
|
-
import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-
|
|
13
|
+
import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-Dptb8U5J.js";
|
|
14
14
|
import { C as chunkMarkdownForRender, _t as chatReferenceTokensFromText, dt as parseEditOutcomesFromResult, m as ownerOf, nt as extractEditPayload, u as capTranscriptEvents } from "./turn-operations-CBdrdYiF.js";
|
|
15
15
|
import { createRequire } from "node:module";
|
|
16
16
|
import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
@@ -4931,6 +4931,8 @@ function resolveConfig(options) {
|
|
|
4931
4931
|
cwd: options.cwd ?? process.cwd(),
|
|
4932
4932
|
projectDb: options.projectDb
|
|
4933
4933
|
});
|
|
4934
|
+
const migration = migrateSessionArtifactDirs({ userDir: paths.cacheDir });
|
|
4935
|
+
if (process.env.ZIDANE_DEBUG && (migration.moved > 0 || migration.failed > 0)) process.stderr.write(`[zidane/chat] session-dir migration: moved ${migration.moved}, removed ${migration.removed}, failed ${migration.failed}\n`);
|
|
4934
4936
|
if (!options.store) throw new Error("resolveConfig: `store` is required. Pass a `SessionStore` instance, or a factory — terminal hosts can use `createTuiStore` from `zidane/session/sqlite`.");
|
|
4935
4937
|
const store = typeof options.store === "function" ? options.store(paths) : options.store;
|
|
4936
4938
|
const stateStore = createStateStore(paths.state);
|
|
@@ -7531,6 +7533,7 @@ function buildHints(options) {
|
|
|
7531
7533
|
labelColor: modelColor,
|
|
7532
7534
|
...chordLabel ? { extra: {
|
|
7533
7535
|
key: shortChord(keybindings.openEffortPicker),
|
|
7536
|
+
keySpec: keybindings.openEffortPicker,
|
|
7534
7537
|
keyColor: effortKeyColor,
|
|
7535
7538
|
label: chordLabel,
|
|
7536
7539
|
labelColor: effortColor
|
|
@@ -8685,11 +8688,86 @@ const LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
|
8685
8688
|
"[::1]"
|
|
8686
8689
|
]);
|
|
8687
8690
|
/**
|
|
8691
|
+
* The `redirect_uri` the authorization server was told to come back to,
|
|
8692
|
+
* read out of the authorization URL itself. That's our loopback callback
|
|
8693
|
+
* (`http://127.0.0.1:<port>/callback`) — the UI shows it so an SSH user
|
|
8694
|
+
* knows which address to fish out of the browser's URL bar, and
|
|
8695
|
+
* {@link normalizeRedirectPaste} uses it to rebuild a full callback URL
|
|
8696
|
+
* from a partial paste.
|
|
8697
|
+
*
|
|
8698
|
+
* Returns `null` when the URL doesn't parse or carries no usable
|
|
8699
|
+
* `redirect_uri` — callers degrade to "paste the whole URL".
|
|
8700
|
+
*/
|
|
8701
|
+
function redirectUriFromAuthUrl(authUrl) {
|
|
8702
|
+
let parsed;
|
|
8703
|
+
try {
|
|
8704
|
+
parsed = new URL(authUrl);
|
|
8705
|
+
} catch {
|
|
8706
|
+
return null;
|
|
8707
|
+
}
|
|
8708
|
+
const redirect = parsed.searchParams.get("redirect_uri");
|
|
8709
|
+
if (!redirect) return null;
|
|
8710
|
+
try {
|
|
8711
|
+
return new URL(redirect);
|
|
8712
|
+
} catch {
|
|
8713
|
+
return null;
|
|
8714
|
+
}
|
|
8715
|
+
}
|
|
8716
|
+
/**
|
|
8717
|
+
* Widen what counts as an acceptable paste. The happy path is the full
|
|
8718
|
+
* redirect URL out of the browser's address bar, but users on SSH
|
|
8719
|
+
* routinely end up holding less than that: some authorization servers
|
|
8720
|
+
* render the code on the page instead of redirecting, and copying from a
|
|
8721
|
+
* "can't reach this site" error page loses everything but the query.
|
|
8722
|
+
*
|
|
8723
|
+
* Accepted forms, given the authorization URL for context:
|
|
8724
|
+
*
|
|
8725
|
+
* - `http://127.0.0.1:5123/callback?code=x&state=y` — passthrough (any
|
|
8726
|
+
* absolute URL is returned untouched; the loopback guard in
|
|
8727
|
+
* {@link fetchOAuthRedirect} still has final say, so a pasted
|
|
8728
|
+
* `https://evil.test` is rejected there, not silently rewritten).
|
|
8729
|
+
* - `/callback?code=x&state=y` — path + query onto the callback origin.
|
|
8730
|
+
* - `?code=x&state=y` / `code=x&state=y` — query onto the callback URL.
|
|
8731
|
+
* - `x` — a bare authorization code; `state` is taken from the
|
|
8732
|
+
* authorization URL when it carried one (the loopback server forwards
|
|
8733
|
+
* `state` verbatim and the SDK owns verification, so a missing one is
|
|
8734
|
+
* not fatal). Anything with whitespace inside is prose (an error page
|
|
8735
|
+
* fragment), not a code — refused with a clearer error than a server
|
|
8736
|
+
* 400 would give.
|
|
8737
|
+
*
|
|
8738
|
+
* Throws when the input can't be turned into a URL — no `authUrl` context
|
|
8739
|
+
* for a partial paste, or an unusable authorization URL.
|
|
8740
|
+
*/
|
|
8741
|
+
function normalizeRedirectPaste(pasted, authUrl) {
|
|
8742
|
+
const trimmed = pasted.trim();
|
|
8743
|
+
if (!trimmed) throw new Error("Paste the redirect URL from your browser.");
|
|
8744
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) return trimmed;
|
|
8745
|
+
const callback = authUrl ? redirectUriFromAuthUrl(authUrl) : null;
|
|
8746
|
+
if (!callback) throw new Error("That doesn't look like a URL. Paste the full address your browser tried to reach (starting with http://127.0.0.1).");
|
|
8747
|
+
if (trimmed.startsWith("/")) return new URL(trimmed, callback).toString();
|
|
8748
|
+
const target = new URL(callback.toString());
|
|
8749
|
+
const query = trimmed.startsWith("?") ? trimmed.slice(1) : trimmed;
|
|
8750
|
+
if (query.includes("=")) {
|
|
8751
|
+
for (const [key, value] of new URLSearchParams(query)) target.searchParams.set(key, value);
|
|
8752
|
+
return target.toString();
|
|
8753
|
+
}
|
|
8754
|
+
if (/\s/.test(query)) throw new Error("That doesn't look like an authorization code. Paste the full address from your browser, or just the code itself.");
|
|
8755
|
+
target.searchParams.set("code", query);
|
|
8756
|
+
const state = new URL(authUrl).searchParams.get("state");
|
|
8757
|
+
if (state) target.searchParams.set("state", state);
|
|
8758
|
+
return target.toString();
|
|
8759
|
+
}
|
|
8760
|
+
/**
|
|
8688
8761
|
* Treat `pasted` as a callback-URL paste. Validates it's a loopback URL,
|
|
8689
8762
|
* fires a GET, returns the status.
|
|
8690
8763
|
*
|
|
8764
|
+
* Pass `authUrl` (the authorization URL currently on screen) to accept
|
|
8765
|
+
* partial pastes — a bare code, a query string, a path — via
|
|
8766
|
+
* {@link normalizeRedirectPaste}. Without it only a full absolute URL is
|
|
8767
|
+
* accepted, which is the pre-existing contract.
|
|
8768
|
+
*
|
|
8691
8769
|
* Throws when:
|
|
8692
|
-
* - `pasted` doesn't parse as a URL.
|
|
8770
|
+
* - `pasted` doesn't parse as a URL (and can't be completed from `authUrl`).
|
|
8693
8771
|
* - The URL host isn't loopback (rejects SSRF).
|
|
8694
8772
|
* - The fetch errors out (network, timeout).
|
|
8695
8773
|
*
|
|
@@ -8697,8 +8775,7 @@ const LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
|
8697
8775
|
* a 4xx is fatal (state mismatch is a 400 the user can retry from).
|
|
8698
8776
|
*/
|
|
8699
8777
|
async function fetchOAuthRedirect(pasted, options = {}) {
|
|
8700
|
-
const trimmed = pasted.
|
|
8701
|
-
if (!trimmed) throw new Error("Paste the redirect URL from your browser.");
|
|
8778
|
+
const trimmed = normalizeRedirectPaste(pasted, options.authUrl);
|
|
8702
8779
|
let url;
|
|
8703
8780
|
try {
|
|
8704
8781
|
url = new URL(trimmed);
|
|
@@ -9737,47 +9814,74 @@ function applyBucket(prev, bucket) {
|
|
|
9737
9814
|
*/
|
|
9738
9815
|
const unsplittableAtLength = /* @__PURE__ */ new WeakMap();
|
|
9739
9816
|
const SEGMENT_SPLIT_RETRY_GROWTH = 1.25;
|
|
9817
|
+
/** Is this event owned by a subagent (rather than the top-level agent)? */
|
|
9818
|
+
function isChildOwned(event) {
|
|
9819
|
+
return event.childId !== void 0 || (event.depth ?? 0) > 0;
|
|
9820
|
+
}
|
|
9821
|
+
/**
|
|
9822
|
+
* Index of the event `owner`'s next delta may coalesce into, or `-1` when the
|
|
9823
|
+
* owner has no open lane at the tail.
|
|
9824
|
+
*
|
|
9825
|
+
* Walks backwards over events owned by OTHER subagents — concurrent siblings
|
|
9826
|
+
* whose rows carry no ordering relation to this owner's output, and which the
|
|
9827
|
+
* per-owner drain interleaves at ~60Hz — and stops at the first event that is
|
|
9828
|
+
* either this owner's or a real ordering boundary (parent output, user
|
|
9829
|
+
* prompts, banners). The caller decides whether the event found is mergeable
|
|
9830
|
+
* for its kind.
|
|
9831
|
+
*
|
|
9832
|
+
* Exported for tests.
|
|
9833
|
+
*/
|
|
9834
|
+
function mergeTargetIndex(events, owner) {
|
|
9835
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
9836
|
+
const event = events[i];
|
|
9837
|
+
if (ownerOf(event) === owner) return i;
|
|
9838
|
+
if (!isChildOwned(event)) return -1;
|
|
9839
|
+
}
|
|
9840
|
+
return -1;
|
|
9841
|
+
}
|
|
9842
|
+
/** Coalesce a markdown delta into `owner`'s open block. Exported for tests. */
|
|
9740
9843
|
function appendMarkdownDelta(prev, delta, owner, depth, turnId) {
|
|
9741
|
-
const
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
const
|
|
9844
|
+
const at = mergeTargetIndex(prev, owner);
|
|
9845
|
+
const target = at >= 0 ? prev[at] : void 0;
|
|
9846
|
+
if (target && target.kind === "markdown" && target.streaming) {
|
|
9847
|
+
const merged = target.text + delta;
|
|
9848
|
+
const next = prev.slice();
|
|
9745
9849
|
if (merged.length > STREAMING_MARKDOWN_SEGMENT_CHARS) {
|
|
9746
|
-
const lastFailed = unsplittableAtLength.get(
|
|
9850
|
+
const lastFailed = unsplittableAtLength.get(target);
|
|
9747
9851
|
if (lastFailed === void 0 || merged.length > lastFailed * SEGMENT_SPLIT_RETRY_GROWTH) {
|
|
9748
9852
|
const chunks = chunkMarkdownForRender(merged);
|
|
9749
9853
|
if (chunks.length > 1) {
|
|
9750
|
-
|
|
9751
|
-
...
|
|
9854
|
+
const segments = chunks.map((chunk, i) => i === chunks.length - 1 ? {
|
|
9855
|
+
...target,
|
|
9856
|
+
text: chunk
|
|
9857
|
+
} : {
|
|
9858
|
+
...target,
|
|
9752
9859
|
text: chunk,
|
|
9753
9860
|
streaming: false
|
|
9754
9861
|
});
|
|
9755
|
-
next.
|
|
9756
|
-
...last,
|
|
9757
|
-
text: chunks[chunks.length - 1]
|
|
9758
|
-
});
|
|
9862
|
+
next.splice(at, 1, ...segments);
|
|
9759
9863
|
return next;
|
|
9760
9864
|
}
|
|
9761
9865
|
const grown = {
|
|
9762
|
-
...
|
|
9866
|
+
...target,
|
|
9763
9867
|
text: merged
|
|
9764
9868
|
};
|
|
9765
9869
|
unsplittableAtLength.set(grown, merged.length);
|
|
9766
|
-
next
|
|
9870
|
+
next[at] = grown;
|
|
9767
9871
|
return next;
|
|
9768
9872
|
}
|
|
9769
9873
|
const grown = {
|
|
9770
|
-
...
|
|
9874
|
+
...target,
|
|
9771
9875
|
text: merged
|
|
9772
9876
|
};
|
|
9773
9877
|
unsplittableAtLength.set(grown, lastFailed);
|
|
9774
|
-
next
|
|
9878
|
+
next[at] = grown;
|
|
9775
9879
|
return next;
|
|
9776
9880
|
}
|
|
9777
|
-
next
|
|
9778
|
-
...
|
|
9881
|
+
next[at] = {
|
|
9882
|
+
...target,
|
|
9779
9883
|
text: merged
|
|
9780
|
-
}
|
|
9884
|
+
};
|
|
9781
9885
|
return next;
|
|
9782
9886
|
}
|
|
9783
9887
|
return [...prev, tagEvent({
|
|
@@ -9786,15 +9890,25 @@ function appendMarkdownDelta(prev, delta, owner, depth, turnId) {
|
|
|
9786
9890
|
streaming: true
|
|
9787
9891
|
}, owner, depth, turnId)];
|
|
9788
9892
|
}
|
|
9893
|
+
/** Coalesce a thinking delta into `owner`'s open lane. Exported for tests. */
|
|
9789
9894
|
function appendThinkingLines(prev, delta, owner, depth, turnId) {
|
|
9790
9895
|
const lines = delta.split("\n");
|
|
9896
|
+
const at = mergeTargetIndex(prev, owner);
|
|
9897
|
+
const target = at >= 0 ? prev[at] : void 0;
|
|
9898
|
+
if (target && target.kind === "thinking") {
|
|
9899
|
+
const next = prev.slice();
|
|
9900
|
+
next[at] = {
|
|
9901
|
+
...target,
|
|
9902
|
+
text: target.text + lines[0]
|
|
9903
|
+
};
|
|
9904
|
+
if (lines.length > 1) next.splice(at + 1, 0, ...lines.slice(1).map((line) => tagEvent({
|
|
9905
|
+
kind: "thinking",
|
|
9906
|
+
text: line
|
|
9907
|
+
}, owner, depth, turnId)));
|
|
9908
|
+
return next;
|
|
9909
|
+
}
|
|
9791
9910
|
const result = [...prev];
|
|
9792
|
-
|
|
9793
|
-
if (last && last.kind === "thinking" && ownerOf(last) === owner) result[result.length - 1] = {
|
|
9794
|
-
...last,
|
|
9795
|
-
text: last.text + lines[0]
|
|
9796
|
-
};
|
|
9797
|
-
else if (lines[0] || lines.length > 1) result.push(tagEvent({
|
|
9911
|
+
if (lines[0] || lines.length > 1) result.push(tagEvent({
|
|
9798
9912
|
kind: "thinking",
|
|
9799
9913
|
text: lines[0]
|
|
9800
9914
|
}, owner, depth, turnId));
|
|
@@ -10154,6 +10268,6 @@ function computeTurnAnchors(items) {
|
|
|
10154
10268
|
};
|
|
10155
10269
|
}
|
|
10156
10270
|
//#endregion
|
|
10157
|
-
export {
|
|
10271
|
+
export { reduceMcpAuth as $, IDENTITY_PREFIX as $n, toggleChainEntry as $t, redirectUriFromAuthUrl as A, DEFAULT_BUDGET_EXCLUDE_TOOLS as An, resolveTheme as At, buildToolToggle as B, TODO_WRITE_COUNTS_METADATA_KEY as Bn, useDiscovery as Bt, projectsFilePath as C, resolvePlatformPackage as Cn, sumRunCosts as Cr, SETTINGS_TOGGLES as Ct, formatPathForCwd as D, BUILD_AGENT as Dn, updateToolEventOutcomes as Dr, BUILTIN_THEMES as Dt, writeProjects as E, renderAgentsMdBlock as En, toolResultText as Er, useSettings as Et, loadMcpToolsCache as F, singleAgentRegistry as Fn, CATPPUCCIN_LATTE as Ft, parentServerName as G, pickActiveRunId as Gn, resolveStoragePaths as Gt, useMcpToolToggleSet as H, getArchivedTodosForRun as Hn, ConfigProvider as Ht, mcpToolsCachePath as I, TODOREAD_TOOL as In, CATPPUCCIN_MACCHIATO as It, patchMcpCredential as J, setTodosForRun as Jn, chainsEqual as Jt, createFileMcpCredentialStore as K, pruneTodosByRun as Kn, buildRunModel as Kt, refreshMcpToolsCatalog as L, TODOS_METADATA_KEY as Ln, CATPPUCCIN_MOCHA as Lt, runOAuthLogin as M, PLAN_AGENT as Mn, GRUVBOX_DARK as Mt, supportsOAuth as N, accentColor as Nn, GRUVBOX_LIGHT as Nt, fetchOAuthRedirect as O, BUILTIN_AGENTS as On, usageByModel as Or, DEFAULT_THEME as Ot, clearMcpToolsCache as P, resolveAgentId as Pn, CATPPUCCIN_FRAPPE as Pt, getMcpAuthStatus as Q, DOING_TASKS_DOCTRINE as Qn, sanitizeModelChain as Qt, saveMcpToolsCache as R, TODOWRITE_TOOL as Rn, createDiscoverySlot as Rt, matchesSafelistEntry as S, performSelfUpdate as Sn, stripSpawnTokensLine as Sr, SETTINGS_INPUTS as St, suggestSafelistEntries as T, discoverAgentsMd as Tn, toolCallPreview as Tr, clampFps as Tt, buildVisibleMcpRows as U, getTodosForRun as Un, useConfig as Ut, useMcpToolToggleMap as V, createTodoTools as Vn, useDiscoveryOptional as Vt, indexOfServerRow as W, isTodoTool as Wn, resolveConfig as Wt, useMcpAuthDispatch as X, ACTIONS_WITH_CARE_DOCTRINE as Xn, providerKeySetChanged as Xt, McpAuthProvider as Y, useActiveTodos as Yn, filterChainFallbacks as Yt, useMcpAuthState as Z, COMMUNICATION_DOCTRINE as Zn, restoreChainFallbacks as Zt, useSafeModeQueue as _, compareSemver as _n, listSessionMeta as _r, listProjectFiles as _t, useSurfaces as a, removeMcpServer as an, TOKEN_DISCIPLINE_DOCTRINE as ar, isInteractionTool as at, getSafelist as b, parseSemver as bn, saveState as br, SETTINGS_CATEGORIES as bt, useStreamBuffer as c, defaultMcpsConfigPaths as cn, envSection as cr, serializeInteractionResponse as ct, discoverProjectSkills as d, tryOpenBrowser as dn, DEFAULT_SESSION_TITLE as dr, EMPTY_HINTS as dt, useCompletion as en, INTERACTION_GUIDANCE as er, ASK_USER_TOOL as et, renderSession as f, bootProfileEnabled as fn, compactSummaryEvent as fr, clipHintsToWidth as ft, useSafeModeActions as g, checkForUpdate as gn, lastContextSizeFromTurns as gr, shortChord as gt, SafeModeProvider as h, useUpdateCheck as hn, eventsFromTurns as hr, buildHints as ht, useSelectStyle as i, mcpsWritePath as in, SUBAGENT_GUIDANCE as ir, createInteractionTools as it, oauthUsesManualCodePaste as j, DEFAULT_PERSIST_EXCLUDE_TOOLS as jn, VAPORWAVE_THEME as jt, normalizeRedirectPaste as k, DEFAULT_AGENT_ID as kn, __exportAll as kr, resolveChipColor as kt, buildSkillsConfig as l, discoverProjectMcps as ln, chatReferenceTokensForPrompt as lr, useInteractionsActions as lt, writeSessionExport as m, buildUpdateHint as mn, deriveSessionTitle as mr, truncateTrailing as mt, ThemeProvider as n, hasClaudeCodeSetup as nn, PLAN_MODE_DOCTRINE as nr, PRESENT_PLAN_TOOL as nt, useSyntaxStyles as o, upsertMcpServer as on, buildBuildSystem as or, makeRequestInteraction as ot, resolveSessionExportTarget as p, bootTick as pn, createStateStore as pr, hintsLength as pt, mcpCredentialsPath as q, selectActiveTodos as qn, chainPositionOf as qt, useColors as r, importFromClaudeCode as rn, PLAN_MODE_DOCTRINE_NO_PROMPTS as rr, buildResumedToolResultsTurn as rt, useTheme as s, buildMcpServers as sn, buildPlanSystem as sr, pendingInteractionsFromTurns as st, computeTurnAnchors as t, countClaudeSessionFiles as tn, INTERACTION_GUIDANCE_NO_PROMPTS as tr, InteractionsProvider as tt, defaultSkillScanPaths as u, parseMcpsFile as un, createChatTurnsReadTool as ur, useInteractionsQueue as ut, IMPLICITLY_SAFE_TOOLS as v, detectLibc as vn, loadState as vr, useEnabledToggleSet as vt, readProjects as w, chatAutoCompactBehavior as wn, titleFromTurns as wr, SettingsProvider as wt, isOnSafelist as x, performInPlaceSelfUpdate as xn, serverToolResultSummary as xr, SETTINGS_CHOICES as xt, addToSafelist as y, detectPackageManager as yn, marginTopFor as yr, DEFAULT_SETTINGS as yt, subscribeMcpToolsCache as z, TODO_STATUS_GLYPHS as zn, DiscoveryProvider as zt };
|
|
10158
10272
|
|
|
10159
|
-
//# sourceMappingURL=transcript-anchors-
|
|
10273
|
+
//# sourceMappingURL=transcript-anchors-DhBTqTyc.js.map
|