zidane 6.2.21 → 6.2.23

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.
Files changed (78) hide show
  1. package/dist/{acp-BqnSn-gl.js → acp-B7wH6LhE.js} +3 -3
  2. package/dist/{acp-BqnSn-gl.js.map → acp-B7wH6LhE.js.map} +1 -1
  3. package/dist/acp-cli.js +2 -2
  4. package/dist/acp.d.ts +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-BJLSgHAS.js → agent-BSIMsEtD.js} +126 -15
  7. package/dist/agent-BSIMsEtD.js.map +1 -0
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/chat/pure.d.ts +3 -3
  11. package/dist/chat.d.ts +21 -5
  12. package/dist/chat.d.ts.map +1 -1
  13. package/dist/chat.js +3 -3
  14. package/dist/contexts/daytona.d.ts +1 -1
  15. package/dist/contexts/e2b.d.ts +1 -1
  16. package/dist/eval.d.ts +1 -1
  17. package/dist/eval.js +1 -1
  18. package/dist/extensions.d.ts +1 -1
  19. package/dist/extensions.js +1 -1
  20. package/dist/headless.d.ts +1 -1
  21. package/dist/headless.js +2 -2
  22. package/dist/{index-BRxJUFyo.d.ts → index-Bv9qhj4n.d.ts} +69 -1
  23. package/dist/index-Bv9qhj4n.d.ts.map +1 -0
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +5 -5
  26. package/dist/{login-BvGRBGaY.js → login-BkZ_d5sT.js} +2 -2
  27. package/dist/{login-BvGRBGaY.js.map → login-BkZ_d5sT.js.map} +1 -1
  28. package/dist/mcp.d.ts +1 -1
  29. package/dist/output/stream-json.d.ts +1 -1
  30. package/dist/output/terminal.d.ts +1 -1
  31. package/dist/presets.d.ts +1 -1
  32. package/dist/presets.js +1 -1
  33. package/dist/providers/anthropic.d.ts +1 -1
  34. package/dist/providers/arcee.d.ts +1 -1
  35. package/dist/providers/baseten.d.ts +1 -1
  36. package/dist/providers/cerebras.d.ts +1 -1
  37. package/dist/providers/local.d.ts +1 -1
  38. package/dist/providers/openai-compat.d.ts +1 -1
  39. package/dist/providers/openai.d.ts +1 -1
  40. package/dist/providers/openrouter.d.ts +1 -1
  41. package/dist/providers/xai.d.ts +1 -1
  42. package/dist/providers.d.ts +1 -1
  43. package/dist/{resolve-R3VDQMT3.js → resolve-x5mlFtLX.js} +4 -3
  44. package/dist/resolve-x5mlFtLX.js.map +1 -0
  45. package/dist/restate.d.ts +1 -1
  46. package/dist/session/sqlite.d.ts +1 -1
  47. package/dist/{session-DzrXKLw-.js → session-Dbvz1ZUE.js} +3 -2
  48. package/dist/session-Dbvz1ZUE.js.map +1 -0
  49. package/dist/session.d.ts +1 -1
  50. package/dist/session.js +1 -1
  51. package/dist/{skills-6_Z49T6p.js → skills-C1vGKbqv.js} +2 -2
  52. package/dist/{skills-6_Z49T6p.js.map → skills-C1vGKbqv.js.map} +1 -1
  53. package/dist/skills.d.ts +1 -1
  54. package/dist/skills.js +2 -2
  55. package/dist/{tool-formatters-Dokpl_jU.d.ts → tool-formatters-D9P6Znip.d.ts} +2 -2
  56. package/dist/{tool-formatters-Dokpl_jU.d.ts.map → tool-formatters-D9P6Znip.d.ts.map} +1 -1
  57. package/dist/tools/fetch-url.d.ts +1 -1
  58. package/dist/tools/web-search.d.ts +1 -1
  59. package/dist/tools.d.ts +1 -1
  60. package/dist/tools.js +1 -1
  61. package/dist/{transcript-anchors-5wRP7hln.d.ts → transcript-anchors-Ci5888xS.d.ts} +18 -4
  62. package/dist/{transcript-anchors-5wRP7hln.d.ts.map → transcript-anchors-Ci5888xS.d.ts.map} +1 -1
  63. package/dist/{transcript-anchors-QeMjbphJ.js → transcript-anchors-CqzIr74w.js} +260 -22
  64. package/dist/transcript-anchors-CqzIr74w.js.map +1 -0
  65. package/dist/tui.d.ts +11 -3
  66. package/dist/tui.d.ts.map +1 -1
  67. package/dist/tui.js +892 -106
  68. package/dist/tui.js.map +1 -1
  69. package/dist/{turn-operations-D96guhSq.d.ts → turn-operations-C3y6A82G.d.ts} +3 -3
  70. package/dist/{turn-operations-D96guhSq.d.ts.map → turn-operations-C3y6A82G.d.ts.map} +1 -1
  71. package/dist/types-BIarq1qE.js.map +1 -1
  72. package/dist/types.d.ts +1 -1
  73. package/package.json +1 -1
  74. package/dist/agent-BJLSgHAS.js.map +0 -1
  75. package/dist/index-BRxJUFyo.d.ts.map +0 -1
  76. package/dist/resolve-R3VDQMT3.js.map +0 -1
  77. package/dist/session-DzrXKLw-.js.map +0 -1
  78. package/dist/transcript-anchors-QeMjbphJ.js.map +0 -1
@@ -1,8 +1,8 @@
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-BJLSgHAS.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-BSIMsEtD.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
- import { M as findGitRoot$1, i as discoverSkills, j as projectUserPaths } from "./resolve-R3VDQMT3.js";
5
+ import { M as findGitRoot$1, i as discoverSkills, j as projectUserPaths } from "./resolve-x5mlFtLX.js";
6
6
  import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
7
7
  import { n as connectMcpServers, o as normalizeMcpServers } from "./mcp-H6bqyM94.js";
8
8
  import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
@@ -15,7 +15,7 @@ import { $ as extractEditPayload, ct as parseEditOutcomesFromResult, m as ownerO
15
15
  import { createRequire } from "node:module";
16
16
  import { dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
17
17
  import { Buffer as Buffer$1 } from "node:buffer";
18
- import { chmodSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
18
+ import { chmodSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
19
19
  import { readdir, stat, writeFile } from "node:fs/promises";
20
20
  import { spawn } from "node:child_process";
21
21
  import { homedir, tmpdir } from "node:os";
@@ -311,9 +311,10 @@ function eventsFromTurns(turns, runs = []) {
311
311
  const pushSpawnStart = (run) => {
312
312
  const taskPreview = previewLine(run.prompt, 80);
313
313
  const model = run.turnUsage?.find((u) => u.modelId)?.modelId;
314
+ const resumes = run.resumedFromRunId ? labelFor(run.resumedFromRunId) : void 0;
314
315
  events.push({
315
316
  kind: "spawn-start",
316
- text: taskPreview,
317
+ text: resumes ? `resumes ${resumes} · ${taskPreview}` : taskPreview,
317
318
  childId: labelFor(run.id),
318
319
  depth: run.depth ?? 1,
319
320
  spawn: {
@@ -2102,6 +2103,157 @@ function singleAgentRegistry(preset) {
2102
2103
  } };
2103
2104
  }
2104
2105
  //#endregion
2106
+ //#region src/chat/ruler-configs.ts
2107
+ /** Subtrees of `.ruler/` that are NOT instruction markdown (mirrors ruler's own exclusions). */
2108
+ const NON_INSTRUCTION_DIRS = /* @__PURE__ */ new Set(["skills", "agents"]);
2109
+ /** Primary instruction file (ordered first), and ruler's legacy fallback primary. */
2110
+ const PRIMARY_MD = "AGENTS.md";
2111
+ const LEGACY_PRIMARY_MD = "instructions.md";
2112
+ function rulerRoots(opts) {
2113
+ const cwd = opts.cwd ?? process.cwd();
2114
+ const home = opts.home ?? homedir();
2115
+ const xdg = opts.xdgConfigHome ?? (opts.home !== void 0 ? resolve(opts.home, ".config") : process.env.XDG_CONFIG_HOME ?? resolve(home, ".config"));
2116
+ return {
2117
+ project: resolve(findGitRoot$1(cwd) ?? cwd, ".ruler"),
2118
+ user: resolve(xdg, "ruler")
2119
+ };
2120
+ }
2121
+ /**
2122
+ * MCP config files ruler maintains, project first. Returned regardless of
2123
+ * existence (callers `existsSync`-filter — same contract as
2124
+ * `foreignMcpConfigFiles`). The `codex-toml` format tag names the shared
2125
+ * `[mcp_servers.<name>]` TOML *grammar*, not the tool: ruler.toml uses it
2126
+ * verbatim, so the existing parser applies unchanged.
2127
+ */
2128
+ function rulerMcpConfigFiles(opts = {}) {
2129
+ const { project, user } = rulerRoots(opts);
2130
+ return [
2131
+ {
2132
+ path: join(project, "ruler.toml"),
2133
+ source: "project",
2134
+ format: "codex-toml"
2135
+ },
2136
+ {
2137
+ path: join(project, "mcp.json"),
2138
+ source: "project",
2139
+ format: "json"
2140
+ },
2141
+ {
2142
+ path: join(user, "ruler.toml"),
2143
+ source: "user",
2144
+ format: "codex-toml"
2145
+ },
2146
+ {
2147
+ path: join(user, "mcp.json"),
2148
+ source: "user",
2149
+ format: "json"
2150
+ }
2151
+ ];
2152
+ }
2153
+ /**
2154
+ * Skill directories ruler maintains, project first. Feed directly into
2155
+ * `discoverSkills` — ruler's `skills/<name>/SKILL.md` layout is the
2156
+ * ecosystem-shared format the lenient loader already parses.
2157
+ */
2158
+ function rulerSkillScanPaths(opts = {}) {
2159
+ const { project, user } = rulerRoots(opts);
2160
+ return [{
2161
+ path: join(project, "skills"),
2162
+ source: "project"
2163
+ }, {
2164
+ path: join(user, "skills"),
2165
+ source: "user"
2166
+ }];
2167
+ }
2168
+ /**
2169
+ * Instruction markdown files under both ruler roots, in ruler's own
2170
+ * concatenation order per root (primary first, rest sorted by relative
2171
+ * path), user scope before project scope so the narrower scope lands
2172
+ * closer to the conversation — matching `discoverAgentsMd`'s convention.
2173
+ *
2174
+ * Only existing files are returned (unlike the config-file lists above):
2175
+ * the walk itself has to touch the filesystem anyway, and callers feed
2176
+ * these straight into per-file readers.
2177
+ */
2178
+ function rulerInstructionFiles(opts = {}) {
2179
+ const { project, user } = rulerRoots(opts);
2180
+ return [...collectInstructionMd(user).map((path) => ({
2181
+ path,
2182
+ source: "user"
2183
+ })), ...collectInstructionMd(project).map((path) => ({
2184
+ path,
2185
+ source: "project"
2186
+ }))];
2187
+ }
2188
+ /**
2189
+ * True when a generated file (e.g. the repo-root `AGENTS.md`) was written
2190
+ * by `ruler apply` — it aggregates the `.ruler/*.md` sources, so loading
2191
+ * both would double every instruction. Two signals, either suffices:
2192
+ * ruler's generation marker, and the per-section source comments older
2193
+ * versions emitted without the marker.
2194
+ */
2195
+ function isRulerGenerated(contents) {
2196
+ return contents.includes("<!-- Generated by Ruler -->") || contents.includes("<!-- Source: .ruler/");
2197
+ }
2198
+ /**
2199
+ * Bounds for the instruction walk — same philosophy as the 64 KB per-file
2200
+ * cap in `agents-md.ts`: a `.ruler/docs -> $HOME` symlink or a huge
2201
+ * committed tree must not stall session activation (the walk runs on the
2202
+ * main path, per activation and per discovery refresh). Ruler setups in
2203
+ * the wild are a handful of files, two levels deep.
2204
+ */
2205
+ const MAX_WALK_DEPTH = 6;
2206
+ const MAX_INSTRUCTION_FILES = 100;
2207
+ /** Recursive `.md` walk under one ruler root, ruler-ordered. Missing/unreadable dirs → `[]`. */
2208
+ function collectInstructionMd(rulerDir) {
2209
+ if (!existsSync(rulerDir)) return [];
2210
+ const collected = [];
2211
+ const visited = /* @__PURE__ */ new Set([realpathOr(rulerDir)]);
2212
+ const walk = (dir, top, depth) => {
2213
+ if (depth > MAX_WALK_DEPTH || collected.length >= MAX_INSTRUCTION_FILES) return;
2214
+ let entries;
2215
+ try {
2216
+ entries = readdirSync(dir, { withFileTypes: true });
2217
+ } catch {
2218
+ return;
2219
+ }
2220
+ for (const entry of entries) {
2221
+ if (collected.length >= MAX_INSTRUCTION_FILES) return;
2222
+ if (entry.name.startsWith(".")) continue;
2223
+ const full = join(dir, entry.name);
2224
+ const kind = entry.isSymbolicLink() ? statKind(full) : entry.isDirectory() ? "dir" : entry.isFile() ? "file" : "other";
2225
+ if (kind === "dir") {
2226
+ if (top && NON_INSTRUCTION_DIRS.has(entry.name)) continue;
2227
+ const real = realpathOr(full);
2228
+ if (visited.has(real)) continue;
2229
+ visited.add(real);
2230
+ walk(full, false, depth + 1);
2231
+ } else if (kind === "file" && entry.name.endsWith(".md")) collected.push(full);
2232
+ }
2233
+ };
2234
+ walk(rulerDir, true, 0);
2235
+ const primary = join(rulerDir, PRIMARY_MD);
2236
+ const legacy = join(rulerDir, LEGACY_PRIMARY_MD);
2237
+ const first = collected.includes(primary) ? primary : collected.includes(legacy) ? legacy : void 0;
2238
+ const rest = collected.filter((p) => p !== first).sort();
2239
+ return first ? [first, ...rest] : rest;
2240
+ }
2241
+ function realpathOr(path) {
2242
+ try {
2243
+ return realpathSync(path);
2244
+ } catch {
2245
+ return path;
2246
+ }
2247
+ }
2248
+ function statKind(path) {
2249
+ try {
2250
+ const s = statSync(path);
2251
+ return s.isDirectory() ? "dir" : s.isFile() ? "file" : "other";
2252
+ } catch {
2253
+ return "other";
2254
+ }
2255
+ }
2256
+ //#endregion
2105
2257
  //#region src/chat/agents-md.ts
2106
2258
  /**
2107
2259
  * Personal instructions discovery — load user + project `AGENTS.md` /
@@ -2172,6 +2324,10 @@ function discoverAgentsMd(opts = {}) {
2172
2324
  const home = opts.home ?? homedir();
2173
2325
  const prefix = (opts.prefix ?? ".zidane").replace(/^\./, "");
2174
2326
  const projectRoot = findGitRoot$1(cwd) ?? cwd;
2327
+ const rulerFiles = opts.ruler ? rulerInstructionFiles({
2328
+ cwd,
2329
+ ...opts.home !== void 0 ? { home: opts.home } : {}
2330
+ }) : [];
2175
2331
  const userCandidates = [
2176
2332
  {
2177
2333
  path: resolve(home, `.agents/AGENTS.md`),
@@ -2184,7 +2340,11 @@ function discoverAgentsMd(opts = {}) {
2184
2340
  {
2185
2341
  path: resolve(home, `.claude/CLAUDE.md`),
2186
2342
  source: "user"
2187
- }
2343
+ },
2344
+ ...rulerFiles.filter((f) => f.source === "user").map((f) => ({
2345
+ path: f.path,
2346
+ source: "user"
2347
+ }))
2188
2348
  ];
2189
2349
  const projectCandidates = [
2190
2350
  {
@@ -2202,8 +2362,19 @@ function discoverAgentsMd(opts = {}) {
2202
2362
  {
2203
2363
  path: resolve(projectRoot, "CLAUDE.md"),
2204
2364
  source: "project"
2205
- }
2365
+ },
2366
+ ...rulerFiles.filter((f) => f.source === "project").map((f) => ({
2367
+ path: f.path,
2368
+ source: "project"
2369
+ }))
2206
2370
  ];
2371
+ const rulerSourcePaths = new Set(rulerFiles.map((f) => f.path));
2372
+ const rulerRead = /* @__PURE__ */ new Map();
2373
+ for (const f of rulerFiles) if (!rulerRead.has(f.path)) rulerRead.set(f.path, readIfPresent(f.path, f.source));
2374
+ const rulerLoadedByScope = {
2375
+ project: rulerFiles.some((f) => f.source === "project" && rulerRead.get(f.path)),
2376
+ user: rulerFiles.some((f) => f.source === "user" && rulerRead.get(f.path))
2377
+ };
2207
2378
  const ordered = [];
2208
2379
  if (scope !== "project") ordered.push(...userCandidates);
2209
2380
  if (scope !== "user") ordered.push(...projectCandidates);
@@ -2211,9 +2382,10 @@ function discoverAgentsMd(opts = {}) {
2211
2382
  const seen = /* @__PURE__ */ new Set();
2212
2383
  for (const c of ordered) {
2213
2384
  if (seen.has(c.path)) continue;
2214
- const file = readIfPresent(c.path, c.source);
2385
+ const file = rulerSourcePaths.has(c.path) ? rulerRead.get(c.path) ?? null : readIfPresent(c.path, c.source);
2215
2386
  if (file) {
2216
2387
  seen.add(c.path);
2388
+ if (!rulerSourcePaths.has(c.path) && rulerLoadedByScope[c.source] && isRulerGenerated(file.contents)) continue;
2217
2389
  files.push(file);
2218
2390
  }
2219
2391
  }
@@ -5083,6 +5255,7 @@ const DEFAULT_SETTINGS = {
5083
5255
  safeMode: true,
5084
5256
  loadProjectExtensions: false,
5085
5257
  importForeignConfigs: false,
5258
+ importRulerConfigs: true,
5086
5259
  hideSubagentOutput: true,
5087
5260
  subagentModels: true,
5088
5261
  theme: DEFAULT_THEME.id,
@@ -5094,6 +5267,7 @@ const DEFAULT_SETTINGS = {
5094
5267
  resumeOnMaxTokens: false,
5095
5268
  maxOutputTokens: 0,
5096
5269
  maxTurns: 0,
5270
+ retryMaxAttempts: 0,
5097
5271
  maxCostUsd: 0,
5098
5272
  maxTotalTokens: 0,
5099
5273
  maxWallMinutes: 0,
@@ -5228,6 +5402,12 @@ const SETTINGS_TOGGLES = [
5228
5402
  label: "Import configurations from other agents",
5229
5403
  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"
5230
5404
  },
5405
+ {
5406
+ category: "agent",
5407
+ key: "importRulerConfigs",
5408
+ label: "Support Ruler configuration (.ruler)",
5409
+ description: "discover MCP servers, skills + instructions from .ruler/ (project) and ~/.config/ruler (user) — read-only, zidane's own configs win collisions; stdio servers additionally need \"Import configurations from other agents\" (they execute local commands)"
5410
+ },
5231
5411
  {
5232
5412
  category: "agent",
5233
5413
  key: "attachmentsEnabled",
@@ -5414,6 +5594,38 @@ const SETTINGS_CHOICES = [
5414
5594
  }
5415
5595
  ]
5416
5596
  },
5597
+ {
5598
+ category: "agent",
5599
+ key: "retryMaxAttempts",
5600
+ label: "Provider retry attempts",
5601
+ description: "max attempts per provider call (retryable errors + silent stream stalls) — applies to the session and its subagents",
5602
+ options: [
5603
+ {
5604
+ value: 0,
5605
+ label: "Default (3)"
5606
+ },
5607
+ {
5608
+ value: 1,
5609
+ label: "1 (no retry)"
5610
+ },
5611
+ {
5612
+ value: 2,
5613
+ label: "2"
5614
+ },
5615
+ {
5616
+ value: 3,
5617
+ label: "3"
5618
+ },
5619
+ {
5620
+ value: 5,
5621
+ label: "5"
5622
+ },
5623
+ {
5624
+ value: 8,
5625
+ label: "8"
5626
+ }
5627
+ ]
5628
+ },
5417
5629
  {
5418
5630
  category: "agent",
5419
5631
  key: "maxTurns",
@@ -7525,7 +7737,7 @@ function discoverProjectMcps(opts = {}) {
7525
7737
  const servers = [];
7526
7738
  const errors = [];
7527
7739
  const claudeStateCache = /* @__PURE__ */ new Map();
7528
- for (const { path, source, format } of paths) {
7740
+ for (const { path, source, format, dropStdio } of paths) {
7529
7741
  const isClaudeState = format === "claude-user-state" || format === "claude-project-state";
7530
7742
  const cached = isClaudeState ? claudeStateCache.get(path) : void 0;
7531
7743
  if (cached && "failed" in cached) continue;
@@ -7558,8 +7770,13 @@ function discoverProjectMcps(opts = {}) {
7558
7770
  if (process.env.ZIDANE_DEBUG) process.stderr.write(`[zidane/chat] failed to parse "${path}": ${message}\n`);
7559
7771
  continue;
7560
7772
  }
7773
+ const droppedStdio = [];
7561
7774
  for (const config of configs) {
7562
7775
  if (seen.has(config.name)) continue;
7776
+ if (dropStdio && config.transport === "stdio") {
7777
+ droppedStdio.push(config.name);
7778
+ continue;
7779
+ }
7563
7780
  seen.add(config.name);
7564
7781
  servers.push({
7565
7782
  config,
@@ -7567,6 +7784,12 @@ function discoverProjectMcps(opts = {}) {
7567
7784
  path
7568
7785
  });
7569
7786
  }
7787
+ if (droppedStdio.length > 0) errors.push({
7788
+ path,
7789
+ source,
7790
+ message: `${droppedStdio.length} stdio server${droppedStdio.length === 1 ? "" : "s"} (${droppedStdio.join(", ")}) skipped — running stdio commands from Ruler files needs “Import configurations from other agents” enabled.`,
7791
+ informational: true
7792
+ });
7570
7793
  }
7571
7794
  return {
7572
7795
  servers,
@@ -7577,14 +7800,27 @@ function discoverProjectMcps(opts = {}) {
7577
7800
  * Full path list a discovery pass reads, formats attached — native
7578
7801
  * `mcp(s).json` locations first (they win name collisions), then the
7579
7802
  * foreign-agent files when enabled.
7803
+ *
7804
+ * Ruler files carry `dropStdio` unless the foreign-agent opt-in is ALSO
7805
+ * set: `importRulerConfigs` defaults ON (it's an intentional committed
7806
+ * config source), but stdio servers execute local commands — the exact
7807
+ * risk `importForeignConfigs` exists to gate (`types.ts`: "importing them
7808
+ * is an explicit opt-in"). Remote (url) ruler servers import by default;
7809
+ * `command`-based ones wait for the same opt-in as every other foreign
7810
+ * stdio source.
7580
7811
  */
7581
7812
  function mcpsDiscoveryPaths(opts = {}) {
7582
- const native = defaultMcpsConfigPaths(opts).map((p) => ({
7583
- ...p,
7584
- format: "json"
7585
- }));
7586
- if (!opts.foreignAgents) return native;
7587
- return [...native, ...foreignMcpConfigFiles(opts)];
7813
+ return [
7814
+ ...defaultMcpsConfigPaths(opts).map((p) => ({
7815
+ ...p,
7816
+ format: "json"
7817
+ })),
7818
+ ...opts.foreignAgents ? foreignMcpConfigFiles(opts) : [],
7819
+ ...opts.ruler ? rulerMcpConfigFiles(opts).map((p) => ({
7820
+ ...p,
7821
+ dropStdio: opts.foreignAgents !== true
7822
+ })) : []
7823
+ ];
7588
7824
  }
7589
7825
  /**
7590
7826
  * Map a user-toggled enable list onto the `mcpServers` array the agent
@@ -8634,12 +8870,14 @@ function aggregateUsage(runs) {
8634
8870
  * `discoverSkills` itself skips missing dirs without error.
8635
8871
  */
8636
8872
  function defaultSkillScanPaths(opts = {}) {
8637
- const native = projectUserPaths({
8638
- subPath: "skills",
8639
- ...opts
8640
- });
8641
- if (!opts.foreignAgents) return native;
8642
- return [...native, ...foreignSkillScanPaths(opts)];
8873
+ return [
8874
+ ...projectUserPaths({
8875
+ subPath: "skills",
8876
+ ...opts
8877
+ }),
8878
+ ...opts.foreignAgents ? foreignSkillScanPaths(opts) : [],
8879
+ ...opts.ruler ? rulerSkillScanPaths(opts) : []
8880
+ ];
8643
8881
  }
8644
8882
  /**
8645
8883
  * Discover every skill reachable from the default scan paths. Returns
@@ -9117,6 +9355,6 @@ function computeTurnAnchors(items) {
9117
9355
  };
9118
9356
  }
9119
9357
  //#endregion
9120
- 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, parseJsonTolerant 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 };
9358
+ export { McpAuthProvider as $, TOKEN_DISCIPLINE_DOCTRINE as $n, filterChainFallbacks as $t, runOAuthLogin as A, TODOREAD_TOOL as An, useSettings as At, mcpToolsCachePath as B, pruneTodosByRun as Bn, CATPPUCCIN_MACCHIATO as Bt, projectsFilePath as C, DEFAULT_AGENT_ID as Cn, DEFAULT_SETTINGS as Ct, formatPathForCwd as D, accentColor as Dn, SETTINGS_TOGGLES as Dt, writeProjects as E, PLAN_AGENT as En, SETTINGS_INPUTS as Et, parseJsonTolerant as F, createTodoTools as Fn, VAPORWAVE_THEME as Ft, useMcpToolToggleMap as G, COMMUNICATION_DOCTRINE as Gn, useDiscoveryOptional as Gt, saveMcpToolsCache as H, setTodosForRun as Hn, createDiscoverySlot as Ht, parseMcpsFile as I, getArchivedTodosForRun as In, GRUVBOX_DARK as It, indexOfServerRow as J, INTERACTION_GUIDANCE as Jn, resolveConfig as Jt, useMcpToolToggleSet as K, DOING_TASKS_DOCTRINE as Kn, ConfigProvider as Kt, parseClaudeState as L, getTodosForRun as Ln, GRUVBOX_LIGHT as Lt, buildMcpServers as M, TODOWRITE_TOOL as Mn, DEFAULT_THEME as Mt, defaultMcpsConfigPaths as N, TODO_STATUS_GLYPHS as Nn, resolveChipColor as Nt, fetchOAuthRedirect as O, resolveAgentId as On, SettingsProvider as Ot, discoverProjectMcps as P, TODO_WRITE_COUNTS_METADATA_KEY as Pn, resolveTheme as Pt, patchMcpCredential as Q, SUBAGENT_GUIDANCE as Qn, chainsEqual as Qt, clearMcpToolsCache as R, isTodoTool as Rn, CATPPUCCIN_FRAPPE as Rt, matchesSafelistEntry as S, BUILTIN_AGENTS as Sn, usageByModel as Sr, useEnabledToggleSet as St, suggestSafelistEntries as T, DEFAULT_PERSIST_EXCLUDE_TOOLS as Tn, SETTINGS_CHOICES as Tt, subscribeMcpToolsCache as U, useActiveTodos as Un, DiscoveryProvider as Ut, refreshMcpToolsCatalog as V, selectActiveTodos as Vn, CATPPUCCIN_MOCHA as Vt, buildToolToggle as W, ACTIONS_WITH_CARE_DOCTRINE as Wn, useDiscovery as Wt, createFileMcpCredentialStore as X, PLAN_MODE_DOCTRINE as Xn, buildRunModel as Xt, parentServerName as Y, INTERACTION_GUIDANCE_NO_PROMPTS as Yn, resolveStoragePaths as Yt, mcpCredentialsPath as Z, PLAN_MODE_DOCTRINE_NO_PROMPTS as Zn, chainPositionOf as Zt, useSafeModeQueue as _, resolvePlatformPackage as _n, sumRunCosts as _r, hintsLength as _t, useSurfaces as a, tryOpenBrowser as an, DEFAULT_SESSION_TITLE as ar, InteractionsProvider as at, getSafelist as b, renderAgentsMdBlock as bn, toolResultText as br, shortChord as bt, useStreamBuffer as c, buildUpdateHint as cn, deriveSessionTitle as cr, createInteractionTools as ct, discoverProjectSkills as d, compareSemver as dn, listSessionMeta as dr, pendingInteractionsFromTurns as dt, providerKeySetChanged as en, buildBuildSystem as er, useMcpAuthDispatch as et, renderSession as f, detectLibc as fn, loadState as fr, serializeInteractionResponse as ft, useSafeModeActions as g, performSelfUpdate as gn, stripSpawnTokensLine as gr, clipHintsToWidth as gt, SafeModeProvider as h, performInPlaceSelfUpdate as hn, serverToolResultSummary as hr, EMPTY_HINTS as ht, useSelectStyle as i, useCompletion as in, createChatTurnsReadTool as ir, ASK_USER_TOOL as it, supportsOAuth as j, TODOS_METADATA_KEY as jn, BUILTIN_THEMES as jt, oauthUsesManualCodePaste as k, singleAgentRegistry as kn, clampFps as kt, buildSkillsConfig as l, useUpdateCheck as ln, eventsFromTurns as lr, isInteractionTool as lt, writeSessionExport as m, parseSemver as mn, saveState as mr, useInteractionsQueue as mt, ThemeProvider as n, sanitizeModelChain as nn, envSection as nr, getMcpAuthStatus as nt, useSyntaxStyles as o, bootProfileEnabled as on, compactSummaryEvent as or, PRESENT_PLAN_TOOL as ot, resolveSessionExportTarget as p, detectPackageManager as pn, marginTopFor as pr, useInteractionsActions as pt, buildVisibleMcpRows as q, IDENTITY_PREFIX as qn, useConfig as qt, useColors as r, toggleChainEntry as rn, chatReferenceTokensForPrompt as rr, reduceMcpAuth as rt, useTheme as s, bootTick as sn, createStateStore as sr, buildResumedToolResultsTurn as st, computeTurnAnchors as t, restoreChainFallbacks as tn, buildPlanSystem as tr, useMcpAuthState as tt, defaultSkillScanPaths as u, checkForUpdate as un, lastContextSizeFromTurns as ur, makeRequestInteraction as ut, IMPLICITLY_SAFE_TOOLS as v, chatAutoCompactBehavior as vn, titleFromTurns as vr, truncateTrailing as vt, readProjects as w, DEFAULT_BUDGET_EXCLUDE_TOOLS as wn, SETTINGS_CATEGORIES as wt, isOnSafelist as x, BUILD_AGENT as xn, updateToolEventOutcomes as xr, listProjectFiles as xt, addToSafelist as y, discoverAgentsMd as yn, toolCallPreview as yr, buildHints as yt, loadMcpToolsCache as z, pickActiveRunId as zn, CATPPUCCIN_LATTE as zt };
9121
9359
 
9122
- //# sourceMappingURL=transcript-anchors-QeMjbphJ.js.map
9360
+ //# sourceMappingURL=transcript-anchors-CqzIr74w.js.map