zidane 7.0.32 → 7.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/{acp-bBDF-dhy.js → acp-B5UfEhMd.js} +4 -4
- package/dist/{acp-bBDF-dhy.js.map → acp-B5UfEhMd.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-BCG9JcZl.js → agent-_xxElOgH.js} +162 -18
- package/dist/agent-_xxElOgH.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-B4UmPm4H.js → anthropic-DPPs3wjJ.js} +111 -7
- package/dist/anthropic-DPPs3wjJ.js.map +1 -0
- package/dist/{approvals-DkwGBMZ9.js → approvals-u2T19Dc-.js} +275 -88
- package/dist/approvals-u2T19Dc-.js.map +1 -0
- package/dist/{auth-D0BHBb02.js → auth-HRKkOErn.js} +3 -3
- package/dist/{auth-D0BHBb02.js.map → auth-HRKkOErn.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +8 -8
- 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-BSFQVclW.js → contexts-CRE9pw07.js} +544 -17
- package/dist/contexts-CRE9pw07.js.map +1 -0
- package/dist/contexts.d.ts +4 -4
- package/dist/contexts.js +2 -2
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +3 -3
- 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-B6FkK6ZN.d.ts → index-C37_ppWv.d.ts} +2 -2
- package/dist/index-C37_ppWv.d.ts.map +1 -0
- package/dist/{index-Ogi2CeHf.d.ts → index-D3TTaaQ5.d.ts} +20 -7
- package/dist/index-D3TTaaQ5.d.ts.map +1 -0
- package/dist/{index-CCB05-JZ.d.ts → index-DZhrTn-v.d.ts} +259 -12
- package/dist/index-DZhrTn-v.d.ts.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/{ipc-C10lnS-a.js → ipc-ChQeueur.js} +3 -3
- package/dist/{ipc-C10lnS-a.js.map → ipc-ChQeueur.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +3 -3
- package/dist/{types-U-rIVUDw.d.ts → isolation-Kfoof0MM.d.ts} +93 -2
- package/dist/isolation-Kfoof0MM.d.ts.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/{plugins-B531Tz5b.js → plugins-gbI7SBA6.js} +3 -3
- package/dist/{plugins-B531Tz5b.js.map → plugins-gbI7SBA6.js.map} +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/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 +2 -2
- package/dist/providers.js +1 -1
- package/dist/restate.d.ts +2 -2
- package/dist/restate.js +1 -1
- package/dist/{sandbox-CDl9tfTo.d.ts → sandbox-BH0WQkXn.d.ts} +2 -2
- package/dist/{sandbox-CDl9tfTo.d.ts.map → sandbox-BH0WQkXn.d.ts.map} +1 -1
- package/dist/{server--mwNA7oC.js → server-CTUpOdh3.js} +8 -8
- package/dist/{server--mwNA7oC.js.map → server-CTUpOdh3.js.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +7 -0
- package/dist/session/sqlite.js.map +1 -1
- package/dist/{session-CVy-2mAy.js → session-BqRP1hS7.js} +33 -3
- package/dist/session-BqRP1hS7.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/{skills-PJyiSRCp.js → skills-BC3dodWp.js} +2 -2
- package/dist/{skills-PJyiSRCp.js.map → skills-BC3dodWp.js.map} +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/{src-CjkY6fBj.js → src-CkNQKFKr.js} +3 -3
- package/dist/{src-CjkY6fBj.js.map → src-CkNQKFKr.js.map} +1 -1
- package/dist/{tool-formatters-Bu4repDJ.d.ts → tool-formatters-C5s88MUd.d.ts} +2 -2
- package/dist/{tool-formatters-Bu4repDJ.d.ts.map → tool-formatters-C5s88MUd.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-CJCxyVE-.d.ts → transcript-anchors-DxofXw_y.d.ts} +3 -3
- package/dist/transcript-anchors-DxofXw_y.d.ts.map +1 -0
- package/dist/tui.d.ts +21 -28
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +163 -69
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-HX3g3XIc.js → turn-operations-6JDu2ewy.js} +14 -2
- package/dist/{turn-operations-HX3g3XIc.js.map → turn-operations-6JDu2ewy.js.map} +1 -1
- package/dist/{turn-operations-qcv9UFcL.d.ts → turn-operations-BaQnxzhr.d.ts} +14 -4
- package/dist/{turn-operations-qcv9UFcL.d.ts.map → turn-operations-BaQnxzhr.d.ts.map} +1 -1
- package/dist/types-CWgENVLY.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/docs/ARCHITECTURE.md +2 -1
- package/docs/CHAT.md +9 -1
- package/docs/EXECUTION_CONTEXT.md +64 -3
- package/docs/SKILL.md +28 -0
- package/docs/TUI.md +6 -5
- package/package.json +1 -1
- package/dist/agent-BCG9JcZl.js.map +0 -1
- package/dist/anthropic-B4UmPm4H.js.map +0 -1
- package/dist/approvals-DkwGBMZ9.js.map +0 -1
- package/dist/contexts-BSFQVclW.js.map +0 -1
- package/dist/index-B6FkK6ZN.d.ts.map +0 -1
- package/dist/index-CCB05-JZ.d.ts.map +0 -1
- package/dist/index-Ogi2CeHf.d.ts.map +0 -1
- package/dist/session-CVy-2mAy.js.map +0 -1
- package/dist/transcript-anchors-CJCxyVE-.d.ts.map +0 -1
- package/dist/types-U-rIVUDw.d.ts.map +0 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.js";
|
|
2
2
|
import { n as THINKING_LEVELS, u as toolResultToText } from "./types-CWgENVLY.js";
|
|
3
|
-
import { $n as effectiveContextWindow, A as buildPostCompactAttachments, Bn as artifactKindLabel, Bt as multiEdit, D as resolvePersistDir, E as resolveMcpWarningsDir, Et as waitTask, It as shell, Jn as renderArtifactRow, Jt as edit, Kt as grep, M as selectFilesFromSession, Ot as createSpawnTool, P as compactConversation, Pt as shellKill, Qn as OUTPUT_RESERVE_TOKENS, Rt as readFile$1, S as migrateSessionArtifactDirs, Tn as createDebugLog, Wt as listFiles, Xt as artifacts_default, Z as EMPTY_EXTENSION_REGISTRY, bt as composePresets, cn as mergeKeybindings, dn as readKeybindingsRaw, dt as composeExtensionPreset, f as applyCompactSummaryCutoff, fn as resolveExtensionKeybindings, g as unwrapCallTool, k as resolveTasksDir, kt as isSpawnTool, lt as buildExtensionPreset, mt as filterRegistryPlugins, q as summaryToTurn, qt as glob, t as createAgent, wt as writeFile$1, xt as definePreset } from "./agent-
|
|
4
|
-
import { F as parseCommandInvocation, M as commandBlocksToContent, P as executeCommand, c as SKILL_EDIT_METADATA_KEY, g as readSkillEditMarker, j as commandBlockToEvent, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, s as EXTENSION_EDIT_METADATA_KEY, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, y as withZidaneSkillEditSkill } from "./src-
|
|
3
|
+
import { $n as effectiveContextWindow, A as buildPostCompactAttachments, Bn as artifactKindLabel, Bt as multiEdit, D as resolvePersistDir, E as resolveMcpWarningsDir, Et as waitTask, It as shell, Jn as renderArtifactRow, Jt as edit, Kt as grep, M as selectFilesFromSession, Ot as createSpawnTool, P as compactConversation, Pt as shellKill, Qn as OUTPUT_RESERVE_TOKENS, Rt as readFile$1, S as migrateSessionArtifactDirs, Tn as createDebugLog, Wt as listFiles, Xt as artifacts_default, Z as EMPTY_EXTENSION_REGISTRY, bt as composePresets, cn as mergeKeybindings, dn as readKeybindingsRaw, dt as composeExtensionPreset, f as applyCompactSummaryCutoff, fn as resolveExtensionKeybindings, g as unwrapCallTool, in as formatBindingForDisplay, k as resolveTasksDir, kt as isSpawnTool, lt as buildExtensionPreset, mt as filterRegistryPlugins, q as summaryToTurn, qt as glob, t as createAgent, wt as writeFile$1, xt as definePreset } from "./agent-_xxElOgH.js";
|
|
4
|
+
import { F as parseCommandInvocation, M as commandBlocksToContent, P as executeCommand, c as SKILL_EDIT_METADATA_KEY, g as readSkillEditMarker, j as commandBlockToEvent, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, s as EXTENSION_EDIT_METADATA_KEY, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, y as withZidaneSkillEditSkill } from "./src-CkNQKFKr.js";
|
|
5
5
|
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, s as formatTaskSummary, t as ageString } from "./format-BF745pLL.js";
|
|
6
|
-
import { r as createProcessContext } from "./contexts-
|
|
6
|
+
import { a as DEFAULT_UNREADABLE_DIRS, c as resolveUnreadableDirs, l as resolveWritableRoots, o as isolationAvailability, r as createProcessContext, s as parseAllowWriteSetting, u as resolveWritableRootsAsync } from "./contexts-CRE9pw07.js";
|
|
7
7
|
import { u as errorMessage$1 } from "./errors-DKiMrOKq.js";
|
|
8
|
-
import { L as projectUserPaths, R as findGitRoot$1, x as discoverSkills } from "./skills-
|
|
8
|
+
import { L as projectUserPaths, R as findGitRoot$1, x as discoverSkills } from "./skills-BC3dodWp.js";
|
|
9
9
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
10
|
-
import { n as defaultPluginDataRoot, p as resolveStorageDirs, r as loadAgentPlugin } from "./plugins-
|
|
10
|
+
import { n as defaultPluginDataRoot, p as resolveStorageDirs, r as loadAgentPlugin } from "./plugins-gbI7SBA6.js";
|
|
11
11
|
import { r as createLogger, t as consoleSink } from "./logger--C1VQjwJ.js";
|
|
12
12
|
import { h as McpOAuthProvider, l as normalizeMcpServers, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-CgNd-f3F.js";
|
|
13
13
|
import { appendDynamicSection, joinSystemPrompt, splitSystemPrompt } from "./prompt.js";
|
|
14
|
-
import { o as loadSession, t as createSession } from "./session-
|
|
14
|
+
import { l as withExtensionSession, o as loadSession, t as createSession } from "./session-BqRP1hS7.js";
|
|
15
15
|
import { n as flattenTurns, r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
16
16
|
import { i as installCacheBreakLogger } from "./cache-telemetry-ehVdWsg2.js";
|
|
17
17
|
import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions, t as applyInsert } from "./completion-core-BRo86R_L.js";
|
|
18
|
-
import {
|
|
18
|
+
import { h as sanitizeProviderDiagnosticMetadata, n as THINKING_BINDING_SETTING_ENV } from "./anthropic-DPPs3wjJ.js";
|
|
19
19
|
import { r as fetchUrl } from "./fetch-url-ma-5_p0p.js";
|
|
20
20
|
import { webSearch } from "./tools/web-search.js";
|
|
21
|
-
import { A as chunkMarkdownForRender, At as
|
|
22
|
-
import { T as restoreModelOptions, b as modelSupportsReasoning, d as BUILTIN_PROVIDERS, f as anthropicDescriptor, g as getContextWindow, h as enabledModelOptions, i as readCredentials, m as credKeyOf, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, x as modelsForDescriptor } from "./auth-
|
|
21
|
+
import { $t as formatRunReceiptLine, A as chunkMarkdownForRender, At as MAIN_PLAYBOOK_FRAGMENT, Bt as renderProjectsBriefing, Ct as promptTurnRefs, Ft as WORKER_REPORT_FRAGMENT, I as cacheBreakChip, It as artifactsFromTurns, L as cacheBreakNoticeText, Lt as isMainSession, Mt as ORCHESTRATED_BY_KEY, Pt as SESSION_ROLE_KEY, Rt as orchestratedBy, Sn as stripEditOutcomesAnnotation, Tn as chatReferenceTokensFromText, Vt as renderSessionEventXml, W as buildRunModel, Wt as sessionEventLabel, Y as filterChainFallbacks, bn as resolveApprovalForPayload, fn as previewEditPayload, gn as buildEditOutcomesAnnotation, jt as MAIN_SESSION_TITLE, m as ownerOf, nn as hasRunReceipt, rn as runReceiptFromRun, tt as restoreChainFallbacks, u as capTranscriptEvents, un as extractEditPayload, vn as mergeApprovalAndBodyOutcomes, xn as rewriteMultiEditHeader, yn as parseEditOutcomesFromResult, zt as parseSessionEventXml } from "./turn-operations-6JDu2ewy.js";
|
|
22
|
+
import { T as restoreModelOptions, b as modelSupportsReasoning, d as BUILTIN_PROVIDERS, f as anthropicDescriptor, g as getContextWindow, h as enabledModelOptions, i as readCredentials, m as credKeyOf, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, x as modelsForDescriptor } from "./auth-HRKkOErn.js";
|
|
23
23
|
import { basename, delimiter, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
24
24
|
import { Buffer } from "node:buffer";
|
|
25
25
|
import { chmodSync, closeSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
|
|
26
|
+
import { homedir, tmpdir } from "node:os";
|
|
26
27
|
import { readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
27
28
|
import { spawn } from "node:child_process";
|
|
28
|
-
import { homedir, tmpdir } from "node:os";
|
|
29
29
|
import { createHash, randomUUID } from "node:crypto";
|
|
30
30
|
import { Fzf } from "fzf";
|
|
31
31
|
import { createGunzip } from "node:zlib";
|
|
32
32
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
33
33
|
import { Writable } from "node:stream";
|
|
34
34
|
import { jsx } from "react/jsx-runtime";
|
|
35
|
+
import process$1 from "node:process";
|
|
35
36
|
//#region src/chat/store.ts
|
|
36
37
|
function ensureStateDir(path) {
|
|
37
38
|
const dir = dirname(path);
|
|
@@ -2307,6 +2308,7 @@ function discoveryDedupHash(input) {
|
|
|
2307
2308
|
const SHARED_BEHAVIOR = {
|
|
2308
2309
|
compactStrategy: "tail",
|
|
2309
2310
|
compactThreshold: 128 * 1024,
|
|
2311
|
+
compactThresholdWindowFraction: .25,
|
|
2310
2312
|
compactKeepTurns: 8,
|
|
2311
2313
|
elideStaleReads: "notice",
|
|
2312
2314
|
mediaKeepTurns: 8,
|
|
@@ -2816,6 +2818,23 @@ function chatAutoCompactBehavior(opts) {
|
|
|
2816
2818
|
releaseReplacedTurns: true
|
|
2817
2819
|
};
|
|
2818
2820
|
}
|
|
2821
|
+
/**
|
|
2822
|
+
* The per-run window knobs a chat host spreads into `agent.run`'s `behavior`:
|
|
2823
|
+
* the auto-compaction config from {@link chatAutoCompactBehavior} PLUS the
|
|
2824
|
+
* picked model's raw window as `behavior.contextWindow`, so window-relative
|
|
2825
|
+
* wire budgets (`compactThresholdWindowFraction`) see the window even when the
|
|
2826
|
+
* user has auto-compaction switched off. Both hosts go through this so they
|
|
2827
|
+
* cannot drift: the TUI and the GUI/daemon engine hand the loop the same
|
|
2828
|
+
* shape for the same settings.
|
|
2829
|
+
*/
|
|
2830
|
+
function chatWindowBehavior(opts) {
|
|
2831
|
+
const autoCompact = chatAutoCompactBehavior(opts);
|
|
2832
|
+
const contextWindow = typeof opts.rawContextWindow === "number" && Number.isFinite(opts.rawContextWindow) && opts.rawContextWindow > 0 ? opts.rawContextWindow : void 0;
|
|
2833
|
+
return {
|
|
2834
|
+
autoCompact,
|
|
2835
|
+
...contextWindow !== void 0 ? { contextWindow } : {}
|
|
2836
|
+
};
|
|
2837
|
+
}
|
|
2819
2838
|
//#endregion
|
|
2820
2839
|
//#region src/chat/auto-update.ts
|
|
2821
2840
|
const OPT_OUT_VARS$1 = [
|
|
@@ -7791,6 +7810,9 @@ const DEFAULT_SETTINGS = {
|
|
|
7791
7810
|
resumeLastSession: true,
|
|
7792
7811
|
persistToolResults: true,
|
|
7793
7812
|
stableToolList: false,
|
|
7813
|
+
sandbox: false,
|
|
7814
|
+
sandboxNetwork: "allow",
|
|
7815
|
+
sandboxAllowWrite: "",
|
|
7794
7816
|
autoCompact: true,
|
|
7795
7817
|
autoCompactThreshold: .8,
|
|
7796
7818
|
resumeOnMaxTokens: false,
|
|
@@ -7800,6 +7822,7 @@ const DEFAULT_SETTINGS = {
|
|
|
7800
7822
|
maxCostUsd: 0,
|
|
7801
7823
|
maxTotalTokens: 0,
|
|
7802
7824
|
maxWallMinutes: 0,
|
|
7825
|
+
thinkingBinding: "drop_block",
|
|
7803
7826
|
showEditDiffs: true,
|
|
7804
7827
|
editDiffDisplay: "full",
|
|
7805
7828
|
showCompactionSummary: false,
|
|
@@ -7934,7 +7957,13 @@ const SETTINGS_TOGGLES = [
|
|
|
7934
7957
|
category: "agent",
|
|
7935
7958
|
key: "stableToolList",
|
|
7936
7959
|
label: "Stable tool list (call_tool)",
|
|
7937
|
-
description: "invoke MCP tools surfaced by tool_search through `call_tool` instead of adding them to the model's tool list, so tool discovery never breaks the prompt cache (next session activation)"
|
|
7960
|
+
description: "invoke MCP tools surfaced by tool_search through `call_tool` instead of adding them to the model's tool list, so tool discovery never breaks the prompt cache. Anthropic always works this way (replayed thinking is bound to the tool list); this toggle affects other providers (next session activation)"
|
|
7961
|
+
},
|
|
7962
|
+
{
|
|
7963
|
+
category: "agent",
|
|
7964
|
+
key: "sandbox",
|
|
7965
|
+
label: "Sandbox shell commands",
|
|
7966
|
+
description: "run the model's shell commands under the OS sandbox (macOS Seatbelt / Linux bwrap): writes limited to the project, temp dirs and \"Sandbox writable paths\", credential dirs hidden; write_file/edit follow the same roots. Does not cover ! commands, MCP servers or fetch_url. Fails closed when the sandbox is unavailable (next session activation)"
|
|
7938
7967
|
},
|
|
7939
7968
|
{
|
|
7940
7969
|
category: "agent",
|
|
@@ -8133,6 +8162,19 @@ const SETTINGS_CHOICES = [
|
|
|
8133
8162
|
}
|
|
8134
8163
|
]
|
|
8135
8164
|
},
|
|
8165
|
+
{
|
|
8166
|
+
category: "agent",
|
|
8167
|
+
key: "sandboxNetwork",
|
|
8168
|
+
label: "Sandbox network",
|
|
8169
|
+
description: "network access for sandboxed shell commands (allow keeps bun install / git fetch / gh working; deny blocks all sockets, the only way to stop exfiltration of readable files). Needs \"Sandbox shell commands\"",
|
|
8170
|
+
options: [{
|
|
8171
|
+
value: "allow",
|
|
8172
|
+
label: "Allow"
|
|
8173
|
+
}, {
|
|
8174
|
+
value: "deny",
|
|
8175
|
+
label: "Deny"
|
|
8176
|
+
}]
|
|
8177
|
+
},
|
|
8136
8178
|
{
|
|
8137
8179
|
category: "agent",
|
|
8138
8180
|
key: "autoCompactThreshold",
|
|
@@ -8353,6 +8395,26 @@ const SETTINGS_CHOICES = [
|
|
|
8353
8395
|
}
|
|
8354
8396
|
]
|
|
8355
8397
|
},
|
|
8398
|
+
{
|
|
8399
|
+
category: "agent",
|
|
8400
|
+
key: "thinkingBinding",
|
|
8401
|
+
label: "Preserved thinking (Anthropic only)",
|
|
8402
|
+
description: "when earlier reasoning no longer matches the conversation prefix: drop it server-side and continue, fail the run with the API error (no retry, history untouched — for debugging), or let the account default decide. Applies on the next run",
|
|
8403
|
+
options: [
|
|
8404
|
+
{
|
|
8405
|
+
value: "drop_block",
|
|
8406
|
+
label: "Drop silently"
|
|
8407
|
+
},
|
|
8408
|
+
{
|
|
8409
|
+
value: "error",
|
|
8410
|
+
label: "Fail the run"
|
|
8411
|
+
},
|
|
8412
|
+
{
|
|
8413
|
+
value: "off",
|
|
8414
|
+
label: "Account default"
|
|
8415
|
+
}
|
|
8416
|
+
]
|
|
8417
|
+
},
|
|
8356
8418
|
{
|
|
8357
8419
|
category: "ui",
|
|
8358
8420
|
key: "toolCallDisplay",
|
|
@@ -8475,6 +8537,13 @@ const SETTINGS_CHOICES = [
|
|
|
8475
8537
|
}
|
|
8476
8538
|
];
|
|
8477
8539
|
const SETTINGS_INPUTS = [
|
|
8540
|
+
{
|
|
8541
|
+
category: "agent",
|
|
8542
|
+
key: "sandboxAllowWrite",
|
|
8543
|
+
label: "Sandbox writable paths",
|
|
8544
|
+
description: "extra directories sandboxed shell commands may write to, comma-separated, ~ expanded (the project, temp dirs and a worktree's git dir are always writable). Needs \"Sandbox shell commands\"",
|
|
8545
|
+
placeholder: "~/.cache, ~/.bun/install/cache"
|
|
8546
|
+
},
|
|
8478
8547
|
{
|
|
8479
8548
|
category: "ui",
|
|
8480
8549
|
key: "sessionIcon",
|
|
@@ -8799,7 +8868,7 @@ function buildHints(options) {
|
|
|
8799
8868
|
label: "select"
|
|
8800
8869
|
},
|
|
8801
8870
|
{
|
|
8802
|
-
key:
|
|
8871
|
+
key: formatBindingForDisplay(keybindings.abortRun),
|
|
8803
8872
|
label: "abort run"
|
|
8804
8873
|
}
|
|
8805
8874
|
]);
|
|
@@ -8813,7 +8882,7 @@ function buildHints(options) {
|
|
|
8813
8882
|
label: "select"
|
|
8814
8883
|
},
|
|
8815
8884
|
{
|
|
8816
|
-
key:
|
|
8885
|
+
key: formatBindingForDisplay(keybindings.abortRun),
|
|
8817
8886
|
label: "abort run"
|
|
8818
8887
|
}
|
|
8819
8888
|
]);
|
|
@@ -8838,9 +8907,13 @@ function buildHints(options) {
|
|
|
8838
8907
|
label: inFlightToolCount === 1 ? "cancel" : `cancel (${inFlightToolCount})`
|
|
8839
8908
|
});
|
|
8840
8909
|
baseBusyHints.push({
|
|
8841
|
-
key:
|
|
8910
|
+
key: formatBindingForDisplay(keybindings.abortRun),
|
|
8842
8911
|
label: "abort"
|
|
8843
8912
|
});
|
|
8913
|
+
baseBusyHints.push({
|
|
8914
|
+
key: "esc",
|
|
8915
|
+
label: "sessions"
|
|
8916
|
+
});
|
|
8844
8917
|
return withTodos(baseBusyHints);
|
|
8845
8918
|
}
|
|
8846
8919
|
if (screen === "auth") return [
|
|
@@ -9355,6 +9428,109 @@ function runEndNotice(reason) {
|
|
|
9355
9428
|
}
|
|
9356
9429
|
}
|
|
9357
9430
|
//#endregion
|
|
9431
|
+
//#region src/chat/mcp-credentials.ts
|
|
9432
|
+
const FILE_MODE = 384;
|
|
9433
|
+
function mcpCredentialsPath(dataDir) {
|
|
9434
|
+
return resolve(dataDir, "mcp-credentials.json");
|
|
9435
|
+
}
|
|
9436
|
+
function readAll(dataDir) {
|
|
9437
|
+
const path = mcpCredentialsPath(dataDir);
|
|
9438
|
+
if (!existsSync(path)) return {};
|
|
9439
|
+
try {
|
|
9440
|
+
const raw = readFileSync(path, "utf-8");
|
|
9441
|
+
const parsed = JSON.parse(raw);
|
|
9442
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
9443
|
+
return parsed;
|
|
9444
|
+
} catch {
|
|
9445
|
+
return {};
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9448
|
+
function writeAll(dataDir, all) {
|
|
9449
|
+
writeFileAtomic(mcpCredentialsPath(dataDir), `${JSON.stringify(all, null, 2)}\n`, {
|
|
9450
|
+
ensureDir: true,
|
|
9451
|
+
mode: FILE_MODE
|
|
9452
|
+
});
|
|
9453
|
+
}
|
|
9454
|
+
/**
|
|
9455
|
+
* Build a file-backed `McpCredentialStore`. All per-server reads / writes
|
|
9456
|
+
* funnel through the single `mcp-credentials.json` file — this keeps
|
|
9457
|
+
* concurrent flows for different servers from clobbering each other since
|
|
9458
|
+
* each save reads-modifies-writes the full file atomically.
|
|
9459
|
+
*
|
|
9460
|
+
* Two flows for the same server name CAN race (last write wins). MCP OAuth
|
|
9461
|
+
* flows are user-driven and serial in practice (one login modal at a time),
|
|
9462
|
+
* so this is acceptable; a per-server file split + cross-process lock would
|
|
9463
|
+
* be required to handle a multi-process scenario.
|
|
9464
|
+
*/
|
|
9465
|
+
function createFileMcpCredentialStore(dataDir) {
|
|
9466
|
+
return {
|
|
9467
|
+
load(name) {
|
|
9468
|
+
return readAll(dataDir)[name];
|
|
9469
|
+
},
|
|
9470
|
+
save(name, entry) {
|
|
9471
|
+
const all = readAll(dataDir);
|
|
9472
|
+
all[name] = entry;
|
|
9473
|
+
writeAll(dataDir, all);
|
|
9474
|
+
},
|
|
9475
|
+
delete(name) {
|
|
9476
|
+
const all = readAll(dataDir);
|
|
9477
|
+
if (!(name in all)) return;
|
|
9478
|
+
delete all[name];
|
|
9479
|
+
writeAll(dataDir, all);
|
|
9480
|
+
}
|
|
9481
|
+
};
|
|
9482
|
+
}
|
|
9483
|
+
/**
|
|
9484
|
+
* Convenience patches for individual sub-fields. The provider class uses
|
|
9485
|
+
* these so a `saveTokens` call doesn't have to round-trip `clientInformation`
|
|
9486
|
+
* + `discoveryState` it never touched.
|
|
9487
|
+
*/
|
|
9488
|
+
function patchMcpCredential(store, name, patch) {
|
|
9489
|
+
const existing = store.load(name) ?? {};
|
|
9490
|
+
store.save(name, {
|
|
9491
|
+
...existing,
|
|
9492
|
+
...patch
|
|
9493
|
+
});
|
|
9494
|
+
}
|
|
9495
|
+
//#endregion
|
|
9496
|
+
//#region src/chat/sandbox-settings.ts
|
|
9497
|
+
const OFF = {
|
|
9498
|
+
isolation: void 0,
|
|
9499
|
+
warning: void 0
|
|
9500
|
+
};
|
|
9501
|
+
/**
|
|
9502
|
+
* Credential paths hidden from sandboxed commands: the home-relative
|
|
9503
|
+
* defaults plus zidane's provider and MCP credential files at the host's
|
|
9504
|
+
* actual data dir. Exported for tests; hosts go through the resolvers.
|
|
9505
|
+
*/
|
|
9506
|
+
function sandboxUnreadableDirs(dataDir) {
|
|
9507
|
+
const dirs = resolveUnreadableDirs(DEFAULT_UNREADABLE_DIRS);
|
|
9508
|
+
if (dataDir) dirs.push(credentialsPath(dataDir), mcpCredentialsPath(dataDir));
|
|
9509
|
+
return [...new Set(dirs)];
|
|
9510
|
+
}
|
|
9511
|
+
function finish(settings, writableRoots, options) {
|
|
9512
|
+
const isolation = {
|
|
9513
|
+
writableRoots,
|
|
9514
|
+
network: settings.sandboxNetwork ?? "allow",
|
|
9515
|
+
unreadableDirs: sandboxUnreadableDirs(options.dataDir)
|
|
9516
|
+
};
|
|
9517
|
+
const availability = isolationAvailability();
|
|
9518
|
+
return {
|
|
9519
|
+
isolation,
|
|
9520
|
+
warning: availability.ok ? void 0 : `"Sandbox shell commands" is on but cannot be enforced: ${availability.reason}. Shell commands will be refused until you fix this or turn the setting off.`
|
|
9521
|
+
};
|
|
9522
|
+
}
|
|
9523
|
+
/** Sync form — in-process TUI (`buildAgent` is synchronous). */
|
|
9524
|
+
function resolveSandboxFromSettings(settings, cwd, options = {}) {
|
|
9525
|
+
if (!settings.sandbox) return OFF;
|
|
9526
|
+
return finish(settings, resolveWritableRoots(cwd, { extra: parseAllowWriteSetting(settings.sandboxAllowWrite ?? "", cwd) }), options);
|
|
9527
|
+
}
|
|
9528
|
+
/** Async form — daemon host; the git worktree probe must not block the shared loop. */
|
|
9529
|
+
async function resolveSandboxFromSettingsAsync(settings, cwd, options = {}) {
|
|
9530
|
+
if (!settings.sandbox) return OFF;
|
|
9531
|
+
return finish(settings, await resolveWritableRootsAsync(cwd, { extra: parseAllowWriteSetting(settings.sandboxAllowWrite ?? "", cwd) }), options);
|
|
9532
|
+
}
|
|
9533
|
+
//#endregion
|
|
9358
9534
|
//#region src/chat/model-chain-metadata.ts
|
|
9359
9535
|
/**
|
|
9360
9536
|
* Assemble the `metadata.modelChain` value for a model pick — the full
|
|
@@ -9437,6 +9613,27 @@ async function createMainSession(store) {
|
|
|
9437
9613
|
return id;
|
|
9438
9614
|
}
|
|
9439
9615
|
//#endregion
|
|
9616
|
+
//#region src/chat/thinking-binding.ts
|
|
9617
|
+
/**
|
|
9618
|
+
* Publish the user's `thinkingBinding` setting to the Anthropic provider.
|
|
9619
|
+
*
|
|
9620
|
+
* The chat runtimes build `anthropic()` through a no-arg factory, so the
|
|
9621
|
+
* setting travels through the environment: the provider resolves
|
|
9622
|
+
* `param > ZIDANE_THINKING_BINDING (shell) > ZIDANE_THINKING_BINDING_SETTING
|
|
9623
|
+
* (this) > 'drop_block'` on every request. Writing a DISTINCT variable keeps
|
|
9624
|
+
* the shell override authoritative without any launch-time capture — a host
|
|
9625
|
+
* or window created later in the same process cannot read this write back
|
|
9626
|
+
* as a shell value.
|
|
9627
|
+
*
|
|
9628
|
+
* Called by every runtime that starts runs: the chat host's send path
|
|
9629
|
+
* (daemon, GUI) and the in-process TUI on setting change. Process-global by
|
|
9630
|
+
* nature; matches settings being shared across windows today. Inert on
|
|
9631
|
+
* non-Anthropic providers.
|
|
9632
|
+
*/
|
|
9633
|
+
function applyThinkingBindingSetting(value) {
|
|
9634
|
+
process$1.env[THINKING_BINDING_SETTING_ENV] = value ?? "drop_block";
|
|
9635
|
+
}
|
|
9636
|
+
//#endregion
|
|
9440
9637
|
//#region src/chat/builtin-commands.ts
|
|
9441
9638
|
function createBuiltinCommands(opts) {
|
|
9442
9639
|
const commands = [{
|
|
@@ -9791,6 +9988,12 @@ function createCommandModule(deps) {
|
|
|
9791
9988
|
const sessionId = opts.sessionId;
|
|
9792
9989
|
const controller = new AbortController();
|
|
9793
9990
|
run.commandAbort = controller;
|
|
9991
|
+
const dispatchRunId = randomUUID();
|
|
9992
|
+
broadcast({
|
|
9993
|
+
kind: "run:start",
|
|
9994
|
+
sessionId,
|
|
9995
|
+
runId: dispatchRunId
|
|
9996
|
+
});
|
|
9794
9997
|
const requestInteraction = interactions.requestInteractionFor(sessionId);
|
|
9795
9998
|
const requestCommandInteraction = (request) => {
|
|
9796
9999
|
if (controller.signal.aborted) return Promise.reject(/* @__PURE__ */ new Error("command aborted"));
|
|
@@ -10112,7 +10315,7 @@ function createCommandModule(deps) {
|
|
|
10112
10315
|
separateNextEmit = true;
|
|
10113
10316
|
}
|
|
10114
10317
|
};
|
|
10115
|
-
const execute = () => executeCommand(command, ctx);
|
|
10318
|
+
const execute = () => withExtensionSession(session, () => executeCommand(command, ctx));
|
|
10116
10319
|
const executeScoped = env.hostRuntime ? () => env.hostRuntime.runWith(sessionHostRuntime(run, env, { appendNote: (blocks) => blocks.forEach(emitBlock) }), execute) : execute;
|
|
10117
10320
|
try {
|
|
10118
10321
|
if (session.turns.length > 0) emitEvent({
|
|
@@ -10139,7 +10342,7 @@ function createCommandModule(deps) {
|
|
|
10139
10342
|
}
|
|
10140
10343
|
return {
|
|
10141
10344
|
ran: true,
|
|
10142
|
-
runId:
|
|
10345
|
+
runId: dispatchRunId
|
|
10143
10346
|
};
|
|
10144
10347
|
}
|
|
10145
10348
|
return {
|
|
@@ -11599,6 +11802,7 @@ function createChatHost(env) {
|
|
|
11599
11802
|
persistThreshold: 0,
|
|
11600
11803
|
persistDir
|
|
11601
11804
|
};
|
|
11805
|
+
const sandbox = await resolveSandboxFromSettingsAsync(settings, cwd, { dataDir: env.userDataDir() });
|
|
11602
11806
|
const providerKey = readSessionProvider(data.metadata, providers);
|
|
11603
11807
|
const providerDescriptor = providerDescriptorFor(providers, providerKey);
|
|
11604
11808
|
const modelOverride = readSessionModel(data.metadata, providers);
|
|
@@ -11669,7 +11873,10 @@ function createChatHost(env) {
|
|
|
11669
11873
|
...system ? { system } : {},
|
|
11670
11874
|
session,
|
|
11671
11875
|
artifacts: artifactsEnabled,
|
|
11672
|
-
execution: createProcessContext({
|
|
11876
|
+
execution: createProcessContext({
|
|
11877
|
+
cwd,
|
|
11878
|
+
...sandbox.isolation ? { isolation: sandbox.isolation } : {}
|
|
11879
|
+
}),
|
|
11673
11880
|
skills: finalSkills,
|
|
11674
11881
|
mcpServers: dedupByName([
|
|
11675
11882
|
...mcpServers,
|
|
@@ -11693,12 +11900,43 @@ function createChatHost(env) {
|
|
|
11693
11900
|
});
|
|
11694
11901
|
});
|
|
11695
11902
|
installCacheBreakLogger(agent.hooks, { log: (line) => hostDebug("cache-break", line) });
|
|
11903
|
+
let pendingCacheNotice = null;
|
|
11696
11904
|
agent.hooks.hook("cache:break", (info) => {
|
|
11697
11905
|
broadcast({
|
|
11698
11906
|
kind: "cache:break",
|
|
11699
11907
|
sessionId,
|
|
11700
11908
|
info
|
|
11701
11909
|
});
|
|
11910
|
+
pendingCacheNotice = info;
|
|
11911
|
+
});
|
|
11912
|
+
agent.hooks.hook("session:turns", () => {
|
|
11913
|
+
const info = pendingCacheNotice;
|
|
11914
|
+
if (!info) return;
|
|
11915
|
+
pendingCacheNotice = null;
|
|
11916
|
+
const session = agent.session;
|
|
11917
|
+
if (!session) return;
|
|
11918
|
+
const chip = cacheBreakChip(info);
|
|
11919
|
+
const text = cacheBreakNoticeText(info);
|
|
11920
|
+
const notice = {
|
|
11921
|
+
severity: chip.tone === "warn" ? "warn" : "info",
|
|
11922
|
+
label: "cache"
|
|
11923
|
+
};
|
|
11924
|
+
const turnId = randomUUID();
|
|
11925
|
+
session.appendTurns([{
|
|
11926
|
+
id: turnId,
|
|
11927
|
+
role: "command",
|
|
11928
|
+
createdAt: Date.now(),
|
|
11929
|
+
content: noticeTurnContent(notice, text)
|
|
11930
|
+
}]).then(() => broadcast({
|
|
11931
|
+
kind: "event",
|
|
11932
|
+
sessionId,
|
|
11933
|
+
event: {
|
|
11934
|
+
kind: "info",
|
|
11935
|
+
text,
|
|
11936
|
+
notice,
|
|
11937
|
+
turnId
|
|
11938
|
+
}
|
|
11939
|
+
})).catch((err) => hostDebug("cache-break", `notice persist failed: ${String(err)}`));
|
|
11702
11940
|
});
|
|
11703
11941
|
broadcast({
|
|
11704
11942
|
kind: "system-md",
|
|
@@ -11706,6 +11944,18 @@ function createChatHost(env) {
|
|
|
11706
11944
|
file: builtInSystem?.systemFile ?? null,
|
|
11707
11945
|
shadowed: builtInSystem?.shadowedSystemFiles ?? []
|
|
11708
11946
|
});
|
|
11947
|
+
if (sandbox.warning) broadcast({
|
|
11948
|
+
kind: "event",
|
|
11949
|
+
sessionId,
|
|
11950
|
+
event: {
|
|
11951
|
+
kind: "info",
|
|
11952
|
+
text: sandbox.warning,
|
|
11953
|
+
notice: {
|
|
11954
|
+
severity: "warn",
|
|
11955
|
+
label: "sandbox"
|
|
11956
|
+
}
|
|
11957
|
+
}
|
|
11958
|
+
});
|
|
11709
11959
|
const spawnCandidate = (composedPreset.tools ?? {}).spawn;
|
|
11710
11960
|
const commandSeam = spawnCandidate && isSpawnTool(spawnCandidate) ? {
|
|
11711
11961
|
spawnTool: spawnCandidate,
|
|
@@ -12637,6 +12887,7 @@ function createChatHost(env) {
|
|
|
12637
12887
|
async function preparePrompt(opts, internal, trackSettlement) {
|
|
12638
12888
|
const generation = teardownGeneration;
|
|
12639
12889
|
const settings = env.readSettings();
|
|
12890
|
+
applyThinkingBindingSetting(settings.thinkingBinding);
|
|
12640
12891
|
const run = await ensureAgent(opts.sessionId);
|
|
12641
12892
|
assertDispatchOpen(generation);
|
|
12642
12893
|
if (run.agent.isRunning) throw new Error(`Session "${opts.sessionId}" already has a run in flight. Use steer/followUp (or pushQueued) to feed the active run.`);
|
|
@@ -12719,14 +12970,14 @@ function createChatHost(env) {
|
|
|
12719
12970
|
encoding: "base64",
|
|
12720
12971
|
...a.name ? { name: a.name } : {}
|
|
12721
12972
|
})] : opts.prompt;
|
|
12722
|
-
const autoCompactDescriptor = BUILTIN_PROVIDERS[run.providerKey] ?? BUILTIN_PROVIDERS.anthropic;
|
|
12723
12973
|
const sendRuntime = await env.runtimeConfig(run.cwd);
|
|
12974
|
+
const autoCompactDescriptor = sendRuntime.providers[run.providerKey] ?? BUILTIN_PROVIDERS[run.providerKey] ?? BUILTIN_PROVIDERS.anthropic;
|
|
12724
12975
|
assertDispatchOpen(generation);
|
|
12725
12976
|
const summarizer = resolveCompactionSummarizer(settings.compactionModel, (key) => buildProvider(sendRuntime.providers, key), {
|
|
12726
12977
|
providerKey: run.providerKey,
|
|
12727
12978
|
model: modelOverride ?? run.model
|
|
12728
12979
|
});
|
|
12729
|
-
const
|
|
12980
|
+
const windowRun = chatWindowBehavior({
|
|
12730
12981
|
enabled: settings.autoCompact,
|
|
12731
12982
|
threshold: settings.autoCompactThreshold,
|
|
12732
12983
|
rawContextWindow: getContextWindow(autoCompactDescriptor, modelOverride ?? run.model),
|
|
@@ -12745,7 +12996,7 @@ function createChatHost(env) {
|
|
|
12745
12996
|
system: systemNudge && run.system ? `${run.system}\n\n${systemNudge}` : systemNudge,
|
|
12746
12997
|
signal: run.controller.signal,
|
|
12747
12998
|
behavior: {
|
|
12748
|
-
|
|
12999
|
+
...windowRun,
|
|
12749
13000
|
...caps
|
|
12750
13001
|
},
|
|
12751
13002
|
...run.rules && !systemNudge ? { contextSections: run.rules } : {},
|
|
@@ -13184,7 +13435,8 @@ function createChatHost(env) {
|
|
|
13184
13435
|
for (const [key, value] of Object.entries(patch)) if (value === void 0) delete data.metadata[key];
|
|
13185
13436
|
else data.metadata[key] = value;
|
|
13186
13437
|
if (opts.bumpUpdatedAt !== false) data.updatedAt = Date.now();
|
|
13187
|
-
await env.store.
|
|
13438
|
+
if (env.store.saveMeta) await env.store.saveMeta(data);
|
|
13439
|
+
else await env.store.save(data);
|
|
13188
13440
|
},
|
|
13189
13441
|
async setSessionModel(sessionId, pick) {
|
|
13190
13442
|
await host.patchSessionMeta(sessionId, {
|
|
@@ -14004,71 +14256,6 @@ function useMcpAuthDispatch() {
|
|
|
14004
14256
|
return dispatch;
|
|
14005
14257
|
}
|
|
14006
14258
|
//#endregion
|
|
14007
|
-
//#region src/chat/mcp-credentials.ts
|
|
14008
|
-
const FILE_MODE = 384;
|
|
14009
|
-
function mcpCredentialsPath(dataDir) {
|
|
14010
|
-
return resolve(dataDir, "mcp-credentials.json");
|
|
14011
|
-
}
|
|
14012
|
-
function readAll(dataDir) {
|
|
14013
|
-
const path = mcpCredentialsPath(dataDir);
|
|
14014
|
-
if (!existsSync(path)) return {};
|
|
14015
|
-
try {
|
|
14016
|
-
const raw = readFileSync(path, "utf-8");
|
|
14017
|
-
const parsed = JSON.parse(raw);
|
|
14018
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
14019
|
-
return parsed;
|
|
14020
|
-
} catch {
|
|
14021
|
-
return {};
|
|
14022
|
-
}
|
|
14023
|
-
}
|
|
14024
|
-
function writeAll(dataDir, all) {
|
|
14025
|
-
writeFileAtomic(mcpCredentialsPath(dataDir), `${JSON.stringify(all, null, 2)}\n`, {
|
|
14026
|
-
ensureDir: true,
|
|
14027
|
-
mode: FILE_MODE
|
|
14028
|
-
});
|
|
14029
|
-
}
|
|
14030
|
-
/**
|
|
14031
|
-
* Build a file-backed `McpCredentialStore`. All per-server reads / writes
|
|
14032
|
-
* funnel through the single `mcp-credentials.json` file — this keeps
|
|
14033
|
-
* concurrent flows for different servers from clobbering each other since
|
|
14034
|
-
* each save reads-modifies-writes the full file atomically.
|
|
14035
|
-
*
|
|
14036
|
-
* Two flows for the same server name CAN race (last write wins). MCP OAuth
|
|
14037
|
-
* flows are user-driven and serial in practice (one login modal at a time),
|
|
14038
|
-
* so this is acceptable; a per-server file split + cross-process lock would
|
|
14039
|
-
* be required to handle a multi-process scenario.
|
|
14040
|
-
*/
|
|
14041
|
-
function createFileMcpCredentialStore(dataDir) {
|
|
14042
|
-
return {
|
|
14043
|
-
load(name) {
|
|
14044
|
-
return readAll(dataDir)[name];
|
|
14045
|
-
},
|
|
14046
|
-
save(name, entry) {
|
|
14047
|
-
const all = readAll(dataDir);
|
|
14048
|
-
all[name] = entry;
|
|
14049
|
-
writeAll(dataDir, all);
|
|
14050
|
-
},
|
|
14051
|
-
delete(name) {
|
|
14052
|
-
const all = readAll(dataDir);
|
|
14053
|
-
if (!(name in all)) return;
|
|
14054
|
-
delete all[name];
|
|
14055
|
-
writeAll(dataDir, all);
|
|
14056
|
-
}
|
|
14057
|
-
};
|
|
14058
|
-
}
|
|
14059
|
-
/**
|
|
14060
|
-
* Convenience patches for individual sub-fields. The provider class uses
|
|
14061
|
-
* these so a `saveTokens` call doesn't have to round-trip `clientInformation`
|
|
14062
|
-
* + `discoveryState` it never touched.
|
|
14063
|
-
*/
|
|
14064
|
-
function patchMcpCredential(store, name, patch) {
|
|
14065
|
-
const existing = store.load(name) ?? {};
|
|
14066
|
-
store.save(name, {
|
|
14067
|
-
...existing,
|
|
14068
|
-
...patch
|
|
14069
|
-
});
|
|
14070
|
-
}
|
|
14071
|
-
//#endregion
|
|
14072
14259
|
//#region src/chat/mcp-rows.ts
|
|
14073
14260
|
/**
|
|
14074
14261
|
* Flatten a server catalog plus the per-server expanded set into the
|
|
@@ -17030,6 +17217,6 @@ function createApprovalHub(options) {
|
|
|
17030
17217
|
};
|
|
17031
17218
|
}
|
|
17032
17219
|
//#endregion
|
|
17033
|
-
export { supportsOAuth as $,
|
|
17220
|
+
export { supportsOAuth as $, defaultMcpsConfigPaths as $n, getTodosForRun as $r, parsePluginScanPathEnv as $t, useSafeModeQueue as A, listSessionMeta as Ai, CATPPUCCIN_MOCHA as An, chatWindowBehavior as Ar, useInteractionsActions as At, USAGE_CACHE_TTL_MS as B, toolResultText as Bi, resolveStoragePaths as Bn, PLAN_AGENT as Br, serializePreview as Bt, resolveSessionExportTarget as C, DEFAULT_SESSION_TITLE as Ci, resolveTheme as Cn, detectLibc as Cr, createAutomaticInteractionResponse as Ct, scopeCwd as D, eventsFromTurns as Di, CATPPUCCIN_FRAPPE as Dn, performSelfUpdate as Dr, makeRequestInteraction as Dt, resolveSessionCwd as E, deriveSessionTitle as Ei, GRUVBOX_LIGHT as En, performInPlaceSelfUpdate as Er, isModelInteraction as Et, matchesSafelistEntry as F, serverToolResultSummary as Fi, useDiscovery as Fn, BUILD_AGENT as Fr, installProviderDiagnosticHook as Ft, usageChecksOptedOut as G, countClaudeSessionFiles as Gn, TODOREAD_TOOL as Gr, sessionModelFallbacks as Gt, fetchAllProviderUsage as H, usageByModel as Hi, createArtifactsCompletionProvider as Hn, resolveAgentId as Hr, applyThinkingBindingSetting as Ht, projectsFilePath as I, stripSpawnTokensLine as Ii, useDiscoveryOptional as In, BUILTIN_AGENTS as Ir, createInteractionHub as It, fetchOAuthRedirect as J, mcpsWritePath as Jn, TODO_STATUS_GLYPHS as Jr, mcpCredentialsPath as Jt, usageSourceFor as K, hasClaudeCodeSetup as Kn, TODOS_METADATA_KEY as Kr, resolveSandboxFromSettings as Kt, readProjects as L, sumRunCosts as Li, ConfigProvider as Ln, DEFAULT_AGENT_ID as Lr, extractEditPayloadForGate as Lt, addToSafelist as M, marginTopFor as Mi, quoteForShell as Mn, summarizeArtifactCounts as Mr, STALE_RUN_MARKER_MS as Mt, getSafelist as N, noticeTurnContent as Ni, createDiscoverySlot as Nn, discoverAgentsMd as Nr, createChatHost as Nt, SafeModeProvider as O, getSessionMeta as Oi, CATPPUCCIN_LATTE as On, resolvePlatformPackage as Or, pendingInteractionsFromTurns as Ot, isOnSafelist as P, saveState as Pi, DiscoveryProvider as Pn, renderAgentsMdBlock as Pr, toTodosSnapshot as Pt, runOAuthLogin as Q, dedupMcpServersByName as Qn, getArchivedTodosForRun as Qr, discoverProjectPlugins as Qt, suggestSafelistEntries as R, titleFromTurns as Ri, useConfig as Rn, DEFAULT_BUDGET_EXCLUDE_TOOLS as Rr, readFileSafe as Rt, renderSession as S, createChatTurnsReadTool as Si, resolveChipColor as Sn, compareSemver as Sr, buildResumedToolResultsTurn as St, folderlessCwd as T, createStateStore as Ti, GRUVBOX_DARK as Tn, parseSemver as Tr, isInteractionTool as Tt, fetchProviderUsage as U, scoreArtifacts as Un, singleAgentRegistry as Ur, createMainSession as Ut, clearProviderUsageCache as V, updateToolEventOutcomes as Vi, ARTIFACTS_COMPLETION_PROVIDER_ID as Vn, accentColor as Vr, createBuiltinCommands as Vt, providerUsageSupported as W, useCompletion as Wn, DEFAULT_MAX_TODO_ITEMS as Wr, modelChainMetadata as Wt, redirectUriFromAuthUrl as X, upsertMcpServer as Xn, applyTodosSnapshot as Xr, runEndNotice as Xt, normalizeRedirectPaste as Y, removeMcpServer as Yn, TODO_WRITE_COUNTS_METADATA_KEY as Yr, patchMcpCredential as Yt, oauthUsesManualCodePaste as Z, buildMcpServers as Zn, createTodoTools as Zr, buildPluginContributions as Zt, buildSpawnEndEvent as _, TOKEN_DISCIPLINE_DOCTRINE as _i, clampFps as _n, watchInstalledVersion as _r, ASK_USER_TOOL as _t, renderActiveTodoAnchor as a, setTodosForRun as ai, hintsLength as an, bootTick as ar, subscribeMcpToolsCache as at, defaultSkillScanPaths as b, envSection as bi, BUILTIN_THEMES as bn, checkForUpdate as br, InteractionsProvider as bt, useSelectStyle as c, ACTIONS_WITH_CARE_DOCTRINE as ci, shortChord as cn, buildUpdateHint as cr, useMcpToolToggleSet as ct, useTheme as d, IDENTITY_PREFIX as di, DEFAULT_SETTINGS as dn, UPDATE_APPLIED_MARKER as dr, parentServerName as dt, isTodoTool as ei, attachMcpWarnLog as en, discoverProjectMcps as er, clearMcpToolsCache as et, discoverSystemMd as f, INTERACTION_GUIDANCE as fi, SETTINGS_CATEGORIES as fn, hasUpdateAppliedMarker as fr, McpAuthProvider as ft, useStreamBuffer as g, SUBAGENT_GUIDANCE as gi, SettingsProvider as gn, useRestartRequired as gr, reduceMcpAuth as gt, userSystemMdPath as h, PLAN_MODE_DOCTRINE_NO_PROMPTS as hi, SETTINGS_TOGGLES as hn, updateAppliedMarkerPath as hr, getMcpAuthStatus as ht, createActiveTodoAnchorHooks as i, selectActiveTodos as ii, clipHintsToWidth as in, bootProfileEnabled as ir, saveMcpToolsCache as it, IMPLICITLY_SAFE_TOOLS as j, loadState as ji, parseEditorCommand as jn, groupArtifacts as jr, useInteractionsQueue as jt, useSafeModeActions as k, lastContextSizeFromTurns as ki, CATPPUCCIN_MACCHIATO as kn, chatAutoCompactBehavior as kr, serializeInteractionResponse as kt, useSurfaces as l, COMMUNICATION_DOCTRINE as li, listProjectFiles as ln, useUpdateCheck as lr, buildVisibleMcpRows as lt, userScopeOverridesLoad as m, PLAN_MODE_DOCTRINE as mi, SETTINGS_INPUTS as mn, readUpdateAppliedMarker as mr, useMcpAuthState as mt, createMemoryApprovalsStore as n, pruneTodosByRun as ni, runCompaction as nn, tryOpenBrowser as nr, mcpToolsCachePath as nt, ThemeProvider as o, todoProgressLabel as oi, truncateTrailing as on, upgradeInstalledPackages as or, buildToolToggle as ot, renderSystemMdSeed as p, INTERACTION_GUIDANCE_NO_PROMPTS as pi, SETTINGS_CHOICES as pn, probeInstalledVersion as pr, useMcpAuthDispatch as pt, formatPathForCwd as q, importFromClaudeCode as qn, TODOWRITE_TOOL as qr, createFileMcpCredentialStore as qt, computeTurnAnchors as r, sanitizeTodoItems as ri, EMPTY_HINTS as rn, tryRevealPath as rr, refreshMcpToolsCatalog as rt, useColors as s, useActiveTodos as si, buildHints as sn, buildRestartHint as sr, useMcpToolToggleMap as st, createApprovalHub as t, pickActiveRunId as ti, EditOutcomeLedger as tn, parseMcpsFile as tr, loadMcpToolsCache as tt, useSyntaxStyles as u, DOING_TASKS_DOCTRINE as ui, useEnabledToggleSet as un, runUpdateCommand as ur, indexOfServerRow as ut, buildSpawnStartEvent as v, buildBuildSystem as vi, enforceSettingsInvariants as vn, writeUpdateAppliedMarker as vr, AUTOMATIC_INTERACTION_INSTRUCTION as vt, writeSessionExport as w, compactSummaryEvent as wi, VAPORWAVE_THEME as wn, detectPackageManager as wr, createInteractionTools as wt, discoverProjectSkills as x, chatReferenceTokensForPrompt as xi, DEFAULT_THEME as xn, checkTarballAvailable as xr, PRESENT_PLAN_TOOL as xt, buildSkillsConfig as y, buildPlanSystem as yi, useSettings as yn, findInstalledCompanion as yr, HOST_INTERACTION_ID_PREFIX as yt, writeProjects as z, toolCallPreview as zi, resolveConfig as zn, DEFAULT_PERSIST_EXCLUDE_TOOLS as zr, resolveCwdPath as zt };
|
|
17034
17221
|
|
|
17035
|
-
//# sourceMappingURL=approvals-
|
|
17222
|
+
//# sourceMappingURL=approvals-u2T19Dc-.js.map
|