zidane 6.2.7 → 6.2.10
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-B_8CI9-1.js → acp-DuEMbOoQ.js} +4 -4
- package/dist/{acp-B_8CI9-1.js.map → acp-DuEMbOoQ.js.map} +1 -1
- package/dist/acp-cli.js +7 -7
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-DPO6GKX5.js → agent-6iGNP46b.js} +5 -5
- package/dist/{agent-DPO6GKX5.js.map → agent-6iGNP46b.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-J2tBjcSQ.js → anthropic-BD-lwEKp.js} +3 -3
- package/dist/{anthropic-J2tBjcSQ.js.map → anthropic-BD-lwEKp.js.map} +1 -1
- package/dist/{auth-Cexpxjfa.js → auth-BH6G59RL.js} +8 -8
- package/dist/auth-BH6G59RL.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +14 -44
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +3 -3
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-CNyYEOy0.d.ts → index-BFNt9GAs.d.ts} +59 -7
- package/dist/index-BFNt9GAs.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{login-Bp_tRj_e.js → login-B5nMPF8w.js} +3 -3
- package/dist/{login-Bp_tRj_e.js.map → login-B5nMPF8w.js.map} +1 -1
- package/dist/{mcp-CkHUripi.js → mcp-BCaN_Gyg.js} +140 -29
- package/dist/mcp-BCaN_Gyg.js.map +1 -0
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-DEPX32kc.js → messages-BDpXLFoe.js} +2 -2
- package/dist/{messages-DEPX32kc.js.map → messages-BDpXLFoe.js.map} +1 -1
- package/dist/{openai-compat-LGAsBush.js → openai-compat-J_JZ7qsw.js} +1 -19
- package/dist/openai-compat-J_JZ7qsw.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 +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 +548 -1
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-BM6VuE_i.js → providers-CclOzGxc.js} +3 -3
- package/dist/{providers-BM6VuE_i.js.map → providers-CclOzGxc.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +5 -5
- package/dist/restate.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-Dc1v4Otm.js → session-CIXE-Bzp.js} +2 -2
- package/dist/{session-Dc1v4Otm.js.map → session-CIXE-Bzp.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/{skills-BlmY7QhV.js → skills-CDpejYOf.js} +168 -44
- package/dist/skills-CDpejYOf.js.map +1 -0
- package/dist/skills.d.ts +2 -2
- package/dist/skills.js +1 -1
- package/dist/{tool-formatters-B7oWiy5m.d.ts → tool-formatters-B_zQsYfa.d.ts} +2 -2
- package/dist/{tool-formatters-B7oWiy5m.d.ts.map → tool-formatters-B_zQsYfa.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-DtOaKu4d.js → transcript-anchors-BUigMBQt.js} +227 -11
- package/dist/transcript-anchors-BUigMBQt.js.map +1 -0
- package/dist/{transcript-anchors-BUZ915pM.d.ts → transcript-anchors-C1Zqb8uS.d.ts} +49 -3
- package/dist/transcript-anchors-C1Zqb8uS.d.ts.map +1 -0
- package/dist/tui.d.ts +12 -7
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +391 -70
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-2Ou_DkbC.d.ts → turn-operations-DVA52KMG.d.ts} +3 -3
- package/dist/{turn-operations-2Ou_DkbC.d.ts.map → turn-operations-DVA52KMG.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{xai-BYAyEPiJ.js → xai-D-wALLuZ.js} +2 -2
- package/dist/{xai-BYAyEPiJ.js.map → xai-D-wALLuZ.js.map} +1 -1
- package/package.json +2 -2
- package/dist/auth-Cexpxjfa.js.map +0 -1
- package/dist/index-CNyYEOy0.d.ts.map +0 -1
- package/dist/mcp-CkHUripi.js.map +0 -1
- package/dist/openai-BcmYm0t4.js +0 -579
- package/dist/openai-BcmYm0t4.js.map +0 -1
- package/dist/openai-compat-LGAsBush.js.map +0 -1
- package/dist/skills-BlmY7QhV.js.map +0 -1
- package/dist/transcript-anchors-BUZ915pM.d.ts.map +0 -1
- package/dist/transcript-anchors-DtOaKu4d.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
2
|
-
import { Ct as readFile$1, Ft as resolveStorageDirs, Gt as mergeKeybindings, Jt as readKeybindingsRaw, Mt as glob, Nt as edit, R as EMPTY_EXTENSION_REGISTRY, Tt as multiEdit, Yt as resolveExtensionKeybindings, Z as buildExtensionPreset, ft as waitTask, jt as grep, kt as listFiles, mt as createSpawnTool, ot as composePresets, st as definePreset, ut as writeFile$1, xt as shell, yt as shellKill } from "./agent-
|
|
3
|
-
import { c as previewLine, i as fmtTokens, l as shortId } from "./format-BF745pLL.js";
|
|
2
|
+
import { Ct as readFile$1, Ft as resolveStorageDirs, Gt as mergeKeybindings, Jt as readKeybindingsRaw, Mt as glob, Nt as edit, R as EMPTY_EXTENSION_REGISTRY, Tt as multiEdit, Yt as resolveExtensionKeybindings, Z as buildExtensionPreset, ft as waitTask, jt as grep, kt as listFiles, mt as createSpawnTool, ot as composePresets, st as definePreset, ut as writeFile$1, xt as shell, yt as shellKill } from "./agent-6iGNP46b.js";
|
|
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-HtxmBWs9.js";
|
|
6
6
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
7
7
|
import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
8
8
|
import { joinSystemPrompt } from "./prompt.js";
|
|
9
|
-
import { a as normalizeMcpServers, n as connectMcpServers } from "./mcp-
|
|
9
|
+
import { a as normalizeMcpServers, n as connectMcpServers } from "./mcp-BCaN_Gyg.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-BH6G59RL.js";
|
|
14
14
|
import { ct as chatReferenceTokensFromText, nt as parseEditOutcomesFromResult, p as ownerOf, q as extractEditPayload, u as capTranscriptEvents } from "./turn-operations-CXjRaltC.js";
|
|
15
15
|
import { createRequire } from "node:module";
|
|
16
16
|
import { dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
@@ -246,6 +246,26 @@ function eventsFromTurns(turns, runs = []) {
|
|
|
246
246
|
}
|
|
247
247
|
return chain;
|
|
248
248
|
};
|
|
249
|
+
const childRunsOf = /* @__PURE__ */ new Map();
|
|
250
|
+
for (const run of runById.values()) {
|
|
251
|
+
if (!run.parentRunId) continue;
|
|
252
|
+
const siblings = childRunsOf.get(run.parentRunId) ?? [];
|
|
253
|
+
siblings.push(run);
|
|
254
|
+
childRunsOf.set(run.parentRunId, siblings);
|
|
255
|
+
}
|
|
256
|
+
const subtreeCost = (root) => {
|
|
257
|
+
let total = 0;
|
|
258
|
+
const queue = [root];
|
|
259
|
+
const seen = /* @__PURE__ */ new Set();
|
|
260
|
+
while (queue.length > 0) {
|
|
261
|
+
const run = queue.pop();
|
|
262
|
+
if (seen.has(run.id)) continue;
|
|
263
|
+
seen.add(run.id);
|
|
264
|
+
total += run.cost ?? run.turnUsage?.reduce((sum, u) => sum + (u.cost ?? 0), 0) ?? 0;
|
|
265
|
+
queue.push(...childRunsOf.get(run.id) ?? []);
|
|
266
|
+
}
|
|
267
|
+
return total;
|
|
268
|
+
};
|
|
249
269
|
const events = [];
|
|
250
270
|
/** Currently-open child runs, root-of-tree first, innermost last. */
|
|
251
271
|
const openStack = [];
|
|
@@ -259,9 +279,12 @@ function eventsFromTurns(turns, runs = []) {
|
|
|
259
279
|
totalCacheRead: run.totalUsage?.cacheRead ?? 0,
|
|
260
280
|
totalCacheCreation: run.totalUsage?.cacheCreation ?? 0
|
|
261
281
|
});
|
|
282
|
+
const elapsed = run.endedAt !== void 0 ? ` · ${formatDuration(run.endedAt - run.startedAt)}` : "";
|
|
283
|
+
const cost = subtreeCost(run);
|
|
284
|
+
const segments = `${elapsed}${cost > 0 ? ` · $${cost.toFixed(cost < .01 ? 4 : 2)}` : ""}`;
|
|
262
285
|
events.push({
|
|
263
286
|
kind: "spawn-end",
|
|
264
|
-
text: `${tag} ${usage}`,
|
|
287
|
+
text: segments ? `${tag}${segments} · ${usage}` : `${tag} ${usage}`,
|
|
265
288
|
childId: labelFor(run.id),
|
|
266
289
|
depth: run.depth ?? 1
|
|
267
290
|
});
|
|
@@ -5036,6 +5059,7 @@ const DEFAULT_SETTINGS = {
|
|
|
5036
5059
|
showFullShellOutput: false,
|
|
5037
5060
|
safeMode: true,
|
|
5038
5061
|
loadProjectExtensions: false,
|
|
5062
|
+
importForeignConfigs: false,
|
|
5039
5063
|
hideSubagentOutput: true,
|
|
5040
5064
|
subagentModels: true,
|
|
5041
5065
|
theme: DEFAULT_THEME.id,
|
|
@@ -5175,6 +5199,12 @@ const SETTINGS_TOGGLES = [
|
|
|
5175
5199
|
label: "Load project extensions",
|
|
5176
5200
|
description: "run extensions under <project>/.zidane/extensions — off by default (they execute arbitrary local code)"
|
|
5177
5201
|
},
|
|
5202
|
+
{
|
|
5203
|
+
category: "agent",
|
|
5204
|
+
key: "importForeignConfigs",
|
|
5205
|
+
label: "Import configurations from other agents",
|
|
5206
|
+
description: "discover MCP servers + skills from Claude Code, Codex, and Pi configs (project + user) — imported stdio servers execute commands from files zidane does not own"
|
|
5207
|
+
},
|
|
5178
5208
|
{
|
|
5179
5209
|
category: "agent",
|
|
5180
5210
|
key: "attachmentsEnabled",
|
|
@@ -7082,6 +7112,174 @@ function isCachedEntry(value) {
|
|
|
7082
7112
|
return true;
|
|
7083
7113
|
}
|
|
7084
7114
|
//#endregion
|
|
7115
|
+
//#region src/chat/foreign-configs.ts
|
|
7116
|
+
function roots(opts) {
|
|
7117
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
7118
|
+
return {
|
|
7119
|
+
projectRoot: findGitRoot$1(cwd) ?? cwd,
|
|
7120
|
+
home: opts.home ?? homedir()
|
|
7121
|
+
};
|
|
7122
|
+
}
|
|
7123
|
+
/**
|
|
7124
|
+
* MCP config files other agents maintain, project entries first.
|
|
7125
|
+
* Returned regardless of existence — callers `existsSync`-filter, same
|
|
7126
|
+
* contract as `defaultMcpsConfigPaths`.
|
|
7127
|
+
*/
|
|
7128
|
+
function foreignMcpConfigFiles(opts = {}) {
|
|
7129
|
+
const { projectRoot, home } = roots(opts);
|
|
7130
|
+
return [
|
|
7131
|
+
{
|
|
7132
|
+
path: resolve(projectRoot, ".mcp.json"),
|
|
7133
|
+
source: "project",
|
|
7134
|
+
format: "json"
|
|
7135
|
+
},
|
|
7136
|
+
{
|
|
7137
|
+
path: resolve(home, ".claude.json"),
|
|
7138
|
+
source: "project",
|
|
7139
|
+
format: "claude-project-state"
|
|
7140
|
+
},
|
|
7141
|
+
{
|
|
7142
|
+
path: resolve(projectRoot, ".pi/mcps.json"),
|
|
7143
|
+
source: "project",
|
|
7144
|
+
format: "json"
|
|
7145
|
+
},
|
|
7146
|
+
{
|
|
7147
|
+
path: resolve(projectRoot, ".pi/mcp.json"),
|
|
7148
|
+
source: "project",
|
|
7149
|
+
format: "json"
|
|
7150
|
+
},
|
|
7151
|
+
{
|
|
7152
|
+
path: resolve(home, ".claude.json"),
|
|
7153
|
+
source: "user",
|
|
7154
|
+
format: "claude-user-state"
|
|
7155
|
+
},
|
|
7156
|
+
{
|
|
7157
|
+
path: resolve(home, ".codex/config.toml"),
|
|
7158
|
+
source: "user",
|
|
7159
|
+
format: "codex-toml"
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
path: resolve(home, ".pi/agent/mcps.json"),
|
|
7163
|
+
source: "user",
|
|
7164
|
+
format: "json"
|
|
7165
|
+
},
|
|
7166
|
+
{
|
|
7167
|
+
path: resolve(home, ".pi/agent/mcp.json"),
|
|
7168
|
+
source: "user",
|
|
7169
|
+
format: "json"
|
|
7170
|
+
}
|
|
7171
|
+
];
|
|
7172
|
+
}
|
|
7173
|
+
/**
|
|
7174
|
+
* Skill directories other agents maintain, project entries first. Feed
|
|
7175
|
+
* directly into `discoverSkills` — the SKILL.md format is shared across
|
|
7176
|
+
* the ecosystem, so foreign skills parse with the same lenient loader.
|
|
7177
|
+
*/
|
|
7178
|
+
function foreignSkillScanPaths(opts = {}) {
|
|
7179
|
+
const { projectRoot, home } = roots(opts);
|
|
7180
|
+
return [
|
|
7181
|
+
{
|
|
7182
|
+
path: resolve(projectRoot, ".claude/skills"),
|
|
7183
|
+
source: "project"
|
|
7184
|
+
},
|
|
7185
|
+
{
|
|
7186
|
+
path: resolve(projectRoot, ".codex/skills"),
|
|
7187
|
+
source: "project"
|
|
7188
|
+
},
|
|
7189
|
+
{
|
|
7190
|
+
path: resolve(projectRoot, ".pi/skills"),
|
|
7191
|
+
source: "project"
|
|
7192
|
+
},
|
|
7193
|
+
{
|
|
7194
|
+
path: resolve(home, ".claude/skills"),
|
|
7195
|
+
source: "user"
|
|
7196
|
+
},
|
|
7197
|
+
{
|
|
7198
|
+
path: resolve(home, ".codex/skills"),
|
|
7199
|
+
source: "user"
|
|
7200
|
+
},
|
|
7201
|
+
{
|
|
7202
|
+
path: resolve(home, ".pi/agent/skills"),
|
|
7203
|
+
source: "user"
|
|
7204
|
+
}
|
|
7205
|
+
];
|
|
7206
|
+
}
|
|
7207
|
+
/**
|
|
7208
|
+
* Parse the two foreign-only formats. The `json` format is NOT handled
|
|
7209
|
+
* here — callers route it through the shared `parseMcpsFile` (keeping
|
|
7210
|
+
* whitespace sanitizing + error hints in one place, and avoiding an
|
|
7211
|
+
* import cycle with `mcps-discovery`).
|
|
7212
|
+
*/
|
|
7213
|
+
function parseForeignMcpConfig(text, format, opts = {}) {
|
|
7214
|
+
if (format === "codex-toml") return parseCodexToml(text);
|
|
7215
|
+
if (format === "claude-project-state") return parseClaudeProjectState(text, opts.projectRoot);
|
|
7216
|
+
return parseClaudeUserState(text);
|
|
7217
|
+
}
|
|
7218
|
+
/**
|
|
7219
|
+
* `~/.claude.json` → `projects["<abs project root>"].mcpServers` — the
|
|
7220
|
+
* per-project servers `claude mcp add` writes in its default "local"
|
|
7221
|
+
* scope. Exact-match on the resolved project root: Claude keys by the
|
|
7222
|
+
* directory it was launched from, which for repo work is the git root
|
|
7223
|
+
* we resolve to.
|
|
7224
|
+
*/
|
|
7225
|
+
function parseClaudeProjectState(text, projectRoot) {
|
|
7226
|
+
if (!projectRoot) return [];
|
|
7227
|
+
const raw = JSON.parse(text);
|
|
7228
|
+
const projects = raw && typeof raw === "object" ? raw.projects : void 0;
|
|
7229
|
+
if (!projects || typeof projects !== "object") return [];
|
|
7230
|
+
return normalizeForeignEntries(projects[projectRoot]?.mcpServers);
|
|
7231
|
+
}
|
|
7232
|
+
/**
|
|
7233
|
+
* `~/.claude.json` — Claude Code's user-state file. Import ONLY the
|
|
7234
|
+
* `mcpServers` map; absent/malformed key means "nothing to import"
|
|
7235
|
+
* rather than an error, since the file legitimately exists without it.
|
|
7236
|
+
*/
|
|
7237
|
+
function parseClaudeUserState(text) {
|
|
7238
|
+
const raw = JSON.parse(text);
|
|
7239
|
+
return normalizeForeignEntries(raw && typeof raw === "object" ? raw.mcpServers : void 0);
|
|
7240
|
+
}
|
|
7241
|
+
/**
|
|
7242
|
+
* Normalize a name-keyed server map ENTRY BY ENTRY, skipping the ones
|
|
7243
|
+
* `normalizeMcpServers` rejects (no inferrable transport, exotic shapes).
|
|
7244
|
+
* Whole-file normalization would let one bad entry drop every server in
|
|
7245
|
+
* a file the user doesn't own — and can't fix from zidane.
|
|
7246
|
+
*/
|
|
7247
|
+
function normalizeForeignEntries(servers) {
|
|
7248
|
+
if (!servers || typeof servers !== "object" || Array.isArray(servers)) return [];
|
|
7249
|
+
const out = [];
|
|
7250
|
+
for (const [name, entry] of Object.entries(servers)) try {
|
|
7251
|
+
out.push(...normalizeMcpServers({ [name]: entry }));
|
|
7252
|
+
} catch {}
|
|
7253
|
+
return out;
|
|
7254
|
+
}
|
|
7255
|
+
/**
|
|
7256
|
+
* `~/.codex/config.toml` — `[mcp_servers.<name>]` tables. TOML parsing
|
|
7257
|
+
* rides Bun's built-in parser; on a non-Bun host the Codex import is
|
|
7258
|
+
* silently unavailable (returns `[]`) rather than pulling in a TOML
|
|
7259
|
+
* dependency for one optional file. Only the fields our config
|
|
7260
|
+
* understands are forwarded — Codex-specific extras
|
|
7261
|
+
* (`startup_timeout_ms`, …) are dropped before normalization.
|
|
7262
|
+
*/
|
|
7263
|
+
function parseCodexToml(text) {
|
|
7264
|
+
const toml = globalThis.Bun?.TOML;
|
|
7265
|
+
if (!toml) return [];
|
|
7266
|
+
const parsed = toml.parse(text);
|
|
7267
|
+
const tables = parsed && typeof parsed === "object" ? parsed.mcp_servers : void 0;
|
|
7268
|
+
if (!tables || typeof tables !== "object" || Array.isArray(tables)) return [];
|
|
7269
|
+
const map = {};
|
|
7270
|
+
for (const [name, entry] of Object.entries(tables)) {
|
|
7271
|
+
if (!entry || typeof entry !== "object") continue;
|
|
7272
|
+
const raw = entry;
|
|
7273
|
+
map[name] = {
|
|
7274
|
+
...raw.command !== void 0 ? { command: raw.command } : {},
|
|
7275
|
+
...raw.args !== void 0 ? { args: raw.args } : {},
|
|
7276
|
+
...raw.env !== void 0 ? { env: raw.env } : {},
|
|
7277
|
+
...raw.url !== void 0 ? { url: raw.url } : {}
|
|
7278
|
+
};
|
|
7279
|
+
}
|
|
7280
|
+
return normalizeForeignEntries(map);
|
|
7281
|
+
}
|
|
7282
|
+
//#endregion
|
|
7085
7283
|
//#region src/chat/mcps-discovery.ts
|
|
7086
7284
|
/**
|
|
7087
7285
|
* File names searched in each of the four project/user roots. Order
|
|
@@ -7259,14 +7457,16 @@ function isEntryDisabled(entry) {
|
|
|
7259
7457
|
* log line is also emitted for ops visibility.
|
|
7260
7458
|
*/
|
|
7261
7459
|
function discoverProjectMcps(opts = {}) {
|
|
7262
|
-
const paths =
|
|
7460
|
+
const paths = mcpsDiscoveryPaths(opts).filter((p) => existsSync(p.path));
|
|
7461
|
+
const projectRoot = findGitRoot$1(opts.cwd ?? process.cwd()) ?? opts.cwd ?? process.cwd();
|
|
7263
7462
|
const seen = /* @__PURE__ */ new Set();
|
|
7264
7463
|
const servers = [];
|
|
7265
7464
|
const errors = [];
|
|
7266
|
-
for (const { path, source } of paths) {
|
|
7465
|
+
for (const { path, source, format } of paths) {
|
|
7267
7466
|
let configs;
|
|
7268
7467
|
try {
|
|
7269
|
-
|
|
7468
|
+
const text = readFileSync(path, "utf8");
|
|
7469
|
+
configs = format === "json" ? parseMcpsFile(text) : parseForeignMcpConfig(text, format, { projectRoot });
|
|
7270
7470
|
} catch (err) {
|
|
7271
7471
|
const message = errorMessage(err);
|
|
7272
7472
|
errors.push({
|
|
@@ -7293,6 +7493,20 @@ function discoverProjectMcps(opts = {}) {
|
|
|
7293
7493
|
};
|
|
7294
7494
|
}
|
|
7295
7495
|
/**
|
|
7496
|
+
* Full path list a discovery pass reads, formats attached — native
|
|
7497
|
+
* `mcp(s).json` locations first (they win name collisions), then the
|
|
7498
|
+
* foreign-agent files when enabled. Exported so the TUI's config-file
|
|
7499
|
+
* watcher can stat the exact same set the discovery reads.
|
|
7500
|
+
*/
|
|
7501
|
+
function mcpsDiscoveryPaths(opts = {}) {
|
|
7502
|
+
const native = defaultMcpsConfigPaths(opts).map((p) => ({
|
|
7503
|
+
...p,
|
|
7504
|
+
format: "json"
|
|
7505
|
+
}));
|
|
7506
|
+
if (!opts.foreignAgents) return native;
|
|
7507
|
+
return [...native, ...foreignMcpConfigFiles(opts)];
|
|
7508
|
+
}
|
|
7509
|
+
/**
|
|
7296
7510
|
* Map a user-toggled enable list onto the `mcpServers` array the agent
|
|
7297
7511
|
* receives. Conventions match `buildSkillsConfig`:
|
|
7298
7512
|
*
|
|
@@ -8340,10 +8554,12 @@ function aggregateUsage(runs) {
|
|
|
8340
8554
|
* `discoverSkills` itself skips missing dirs without error.
|
|
8341
8555
|
*/
|
|
8342
8556
|
function defaultSkillScanPaths(opts = {}) {
|
|
8343
|
-
|
|
8557
|
+
const native = projectUserPaths({
|
|
8344
8558
|
subPath: "skills",
|
|
8345
8559
|
...opts
|
|
8346
8560
|
});
|
|
8561
|
+
if (!opts.foreignAgents) return native;
|
|
8562
|
+
return [...native, ...foreignSkillScanPaths(opts)];
|
|
8347
8563
|
}
|
|
8348
8564
|
/**
|
|
8349
8565
|
* Discover every skill reachable from the default scan paths. Returns
|
|
@@ -8821,6 +9037,6 @@ function computeTurnAnchors(items) {
|
|
|
8821
9037
|
};
|
|
8822
9038
|
}
|
|
8823
9039
|
//#endregion
|
|
8824
|
-
export {
|
|
9040
|
+
export { useMcpAuthDispatch as $, buildBuildSystem as $n, providerKeySetChanged as $t, runOAuthLogin as A, TODOS_METADATA_KEY as An, BUILTIN_THEMES as At, refreshMcpToolsCatalog as B, selectActiveTodos as Bn, CATPPUCCIN_MOCHA as Bt, projectsFilePath as C, DEFAULT_BUDGET_EXCLUDE_TOOLS as Cn, SETTINGS_CATEGORIES as Ct, formatPathForCwd as D, resolveAgentId as Dn, SettingsProvider as Dt, writeProjects as E, accentColor as En, SETTINGS_TOGGLES as Et, mcpsDiscoveryPaths as F, getArchivedTodosForRun as Fn, GRUVBOX_DARK as Ft, useMcpToolToggleSet as G, DOING_TASKS_DOCTRINE as Gn, ConfigProvider as Gt, subscribeMcpToolsCache as H, useActiveTodos as Hn, DiscoveryProvider as Ht, parseMcpsFile as I, getTodosForRun as In, GRUVBOX_LIGHT as It, parentServerName as J, INTERACTION_GUIDANCE_NO_PROMPTS as Jn, resolveStoragePaths as Jt, buildVisibleMcpRows as K, IDENTITY_PREFIX as Kn, useConfig as Kt, clearMcpToolsCache as L, isTodoTool as Ln, CATPPUCCIN_FRAPPE as Lt, buildMcpServers as M, TODO_STATUS_GLYPHS as Mn, resolveChipColor as Mt, defaultMcpsConfigPaths as N, TODO_WRITE_COUNTS_METADATA_KEY as Nn, resolveTheme as Nt, fetchOAuthRedirect as O, singleAgentRegistry as On, clampFps as Ot, discoverProjectMcps as P, createTodoTools as Pn, VAPORWAVE_THEME as Pt, McpAuthProvider as Q, TOKEN_DISCIPLINE_DOCTRINE as Qn, filterChainFallbacks as Qt, loadMcpToolsCache as R, pickActiveRunId as Rn, CATPPUCCIN_LATTE as Rt, matchesSafelistEntry as S, DEFAULT_AGENT_ID as Sn, DEFAULT_SETTINGS as St, suggestSafelistEntries as T, PLAN_AGENT as Tn, SETTINGS_INPUTS as Tt, buildToolToggle as U, ACTIONS_WITH_CARE_DOCTRINE as Un, useDiscovery as Ut, saveMcpToolsCache as V, setTodosForRun as Vn, createDiscoverySlot as Vt, useMcpToolToggleMap as W, COMMUNICATION_DOCTRINE as Wn, useDiscoveryOptional as Wt, mcpCredentialsPath as X, PLAN_MODE_DOCTRINE_NO_PROMPTS as Xn, chainPositionOf as Xt, createFileMcpCredentialStore as Y, PLAN_MODE_DOCTRINE as Yn, buildRunModel as Yt, patchMcpCredential as Z, SUBAGENT_GUIDANCE as Zn, chainsEqual as Zt, useSafeModeQueue as _, chatAutoCompactBehavior as _n, titleFromTurns as _r, truncateTrailing as _t, useSurfaces as a, bootProfileEnabled as an, compactSummaryEvent as ar, PRESENT_PLAN_TOOL as at, getSafelist as b, BUILD_AGENT as bn, updateToolEventOutcomes as br, listProjectFiles as bt, useStreamBuffer as c, useUpdateCheck as cn, eventsFromTurns as cr, isInteractionTool as ct, discoverProjectSkills as d, detectLibc as dn, loadState as dr, serializeInteractionResponse as dt, restoreChainFallbacks as en, buildPlanSystem as er, useMcpAuthState as et, renderSession as f, detectPackageManager as fn, marginTopFor as fr, useInteractionsActions as ft, useSafeModeActions as g, resolvePlatformPackage as gn, sumRunCosts as gr, hintsLength as gt, SafeModeProvider as h, performSelfUpdate as hn, stripSpawnTokensLine as hr, clipHintsToWidth as ht, useSelectStyle as i, tryOpenBrowser as in, DEFAULT_SESSION_TITLE as ir, InteractionsProvider as it, supportsOAuth as j, TODOWRITE_TOOL as jn, DEFAULT_THEME as jt, oauthUsesManualCodePaste as k, TODOREAD_TOOL as kn, useSettings as kt, buildSkillsConfig as l, checkForUpdate as ln, lastContextSizeFromTurns as lr, makeRequestInteraction as lt, writeSessionExport as m, performInPlaceSelfUpdate as mn, serverToolResultSummary as mr, EMPTY_HINTS as mt, ThemeProvider as n, toggleChainEntry as nn, chatReferenceTokensForPrompt as nr, reduceMcpAuth as nt, useSyntaxStyles as o, bootTick as on, createStateStore as or, buildResumedToolResultsTurn as ot, resolveSessionExportTarget as p, parseSemver as pn, saveState as pr, useInteractionsQueue as pt, indexOfServerRow as q, INTERACTION_GUIDANCE as qn, resolveConfig as qt, useColors as r, useCompletion as rn, createChatTurnsReadTool as rr, ASK_USER_TOOL as rt, useTheme as s, buildUpdateHint as sn, deriveSessionTitle as sr, createInteractionTools as st, computeTurnAnchors as t, sanitizeModelChain as tn, envSection as tr, getMcpAuthStatus as tt, defaultSkillScanPaths as u, compareSemver as un, listSessionMeta as ur, pendingInteractionsFromTurns as ut, IMPLICITLY_SAFE_TOOLS as v, discoverAgentsMd as vn, toolCallPreview as vr, buildHints as vt, readProjects as w, DEFAULT_PERSIST_EXCLUDE_TOOLS as wn, SETTINGS_CHOICES as wt, isOnSafelist as x, BUILTIN_AGENTS as xn, usageByModel as xr, useEnabledToggleSet as xt, addToSafelist as y, renderAgentsMdBlock as yn, toolResultText as yr, shortChord as yt, mcpToolsCachePath as z, pruneTodosByRun as zn, CATPPUCCIN_MACCHIATO as zt };
|
|
8825
9041
|
|
|
8826
|
-
//# sourceMappingURL=transcript-anchors-
|
|
9042
|
+
//# sourceMappingURL=transcript-anchors-BUigMBQt.js.map
|