frizz-server 0.15.48 → 0.15.50

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 (156) hide show
  1. package/dist/acp-daemon.js +39 -5
  2. package/dist/claude-agent-broker.js +55 -17
  3. package/dist/codex-app-server-daemon.js +43 -9
  4. package/dist/dev-child.js +11174 -3664
  5. package/package.json +15 -8
  6. package/runtime/board/agent-status.mjs +3 -3
  7. package/runtime/cc-worker/DECISIONS.md +19 -0
  8. package/runtime/cc-worker/bin/frizz-mcp.mjs +4 -2
  9. package/runtime/cc-worker/bin/frizzctl.mjs +26 -3
  10. package/runtime/cc-worker/hooks/deny-plan.mjs +4 -3
  11. package/runtime/cc-worker/hooks/hooks.json +18 -18
  12. package/runtime/cc-worker/hooks/scratchpad.mjs +10 -6
  13. package/runtime/cc-worker/lib/frizz-tools.mjs +156 -77
  14. package/web-dist/assets/{abnfDiagram-VRR7QNED-B13Nf5uG.js → abnfDiagram-VCTEODGH-CSl-iUaD.js} +1 -1
  15. package/web-dist/assets/{arc-tjQgP-a1.js → arc-BSyeo0Gb.js} +1 -1
  16. package/web-dist/assets/architecture-7GRP2DOG-jYpGgJVJ.js +1 -0
  17. package/web-dist/assets/architectureDiagram-5GKGNRK7-Bo_gyMVC.js +36 -0
  18. package/web-dist/assets/blockDiagram-I7D4REHJ-9EtOS1Y1.js +129 -0
  19. package/web-dist/assets/c4Diagram-7LVT6UL2-CE1hW3oj.js +38 -0
  20. package/web-dist/assets/channel-CC-n29cI.js +1 -0
  21. package/web-dist/assets/chunk-2E4U76K2-QqOdoNOR.js +2 -0
  22. package/web-dist/assets/chunk-4HAMMTFA-Df2uLm9r.js +62 -0
  23. package/web-dist/assets/{chunk-ICXQ74PX-CUDlgeXU.js → chunk-75Z2AOVW-DF1G6d8q.js} +1 -1
  24. package/web-dist/assets/{chunk-VAUOI2AC-DpbSQ-0T.js → chunk-CLGD4ZFX-CMAQm7EJ.js} +1 -1
  25. package/web-dist/assets/chunk-DU6HZSFF-UWY5hXXp.js +127 -0
  26. package/web-dist/assets/{chunk-32BRIVSS-DCVxFWaV.js → chunk-F27PBJKO-C59uYSbj.js} +1 -1
  27. package/web-dist/assets/{chunk-KEIR6QF5-BfrZ3jm6.js → chunk-FOHPRMQF-CyTuVbu3.js} +2 -2
  28. package/web-dist/assets/chunk-GMAD6QVW-BsJsQjY4.js +72 -0
  29. package/web-dist/assets/chunk-GVQU2GXP-BuITwr9r.js +1 -0
  30. package/web-dist/assets/{chunk-EX3LRPZG-C57JKsUG.js → chunk-IMKFNOWR-5Ui4f5l4.js} +2 -2
  31. package/web-dist/assets/chunk-L3NEJ4N5-BISBblwX.js +1 -0
  32. package/web-dist/assets/chunk-LNGE3PJU-DNNNwF8Y.js +34 -0
  33. package/web-dist/assets/chunk-OSK3NFVY-CZl3XlkY.js +10 -0
  34. package/web-dist/assets/chunk-P2QGCYS3-DoytbW1J.js +1 -0
  35. package/web-dist/assets/{chunk-VR4S4FIN-BW2QJzbp.js → chunk-POPQ4Y6H-D28hnSIy.js} +1 -1
  36. package/web-dist/assets/{chunk-HOUHSVGY-rlZvVAjI.js → chunk-PWAF6VOD-CbZvnkji.js} +1 -1
  37. package/web-dist/assets/chunk-SHT3W25Y-DM4ozJwj.js +168 -0
  38. package/web-dist/assets/{chunk-MOJQB5TN-BGaw_67a.js → chunk-SVP7TREG-m6oapxSg.js} +1 -1
  39. package/web-dist/assets/{chunk-V7JOEXUC-kdk1Kj1f.js → chunk-TICWLB2K-Ochfyos9.js} +1 -1
  40. package/web-dist/assets/chunk-TLUHSLCS-iM7uiuAo.js +2 -0
  41. package/web-dist/assets/{chunk-XXDRQBXY-DISoSt1F.js → chunk-XXDRQBXY-DYlTP5J-.js} +1 -1
  42. package/web-dist/assets/classDiagram-ZZMXUADV-CXJ9OBBD.js +1 -0
  43. package/web-dist/assets/classDiagram-v2-VYDZK3BY-CXJ9OBBD.js +1 -0
  44. package/web-dist/assets/cose-bilkent-JH36ORCC-BUIsLrGc.js +1 -0
  45. package/web-dist/assets/cynefin-OW5HDTMX-XtTYGcIH.js +1 -0
  46. package/web-dist/assets/{cynefinDiagram-TSTJHNR4-D1KgH5Uh.js → cynefinDiagram-5FMLGOSQ--ClxINOZ.js} +1 -1
  47. package/web-dist/assets/dagre-BJJUWK_n.js +1 -0
  48. package/web-dist/assets/dagre-GXQ25YYZ-CupZ_9Gq.js +4 -0
  49. package/web-dist/assets/{diagram-OA4YK3LP-DQZYQQmQ.js → diagram-S7CK7UJ4-BlF7gkGi.js} +4 -4
  50. package/web-dist/assets/diagram-UQ7AKVKN-BMXRmU5D.js +41 -0
  51. package/web-dist/assets/{diagram-FQU43EPY-DJLjwc2E.js → diagram-VSXAHHWV-r5DJsSB3.js} +1 -1
  52. package/web-dist/assets/{diagram-G47NLZAW-R_nxXPm1.js → diagram-VX7I27RA-DxGq7Ln7.js} +1 -1
  53. package/web-dist/assets/{diagram-NH7WQ7WH-BgEKOFUU.js → diagram-Z3DM3KII-DqXtb_id.js} +1 -1
  54. package/web-dist/assets/dist-DoH_9pyS.js +1 -0
  55. package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DwgS-ruz.js → ebnfDiagram-PWID7BFC-BV_AT7TD.js} +1 -1
  56. package/web-dist/assets/erDiagram-RLTQ6QDP-BV70EqG9.js +99 -0
  57. package/web-dist/assets/eventmodeling-NTZA5JFV-Cw8GwV1a.js +1 -0
  58. package/web-dist/assets/flowDiagram-HODETNUW-B0Q6ZSg0.js +1 -0
  59. package/web-dist/assets/ganttDiagram-EL5Y4UJY-Cvkf14ib.js +292 -0
  60. package/web-dist/assets/gitGraph-4MIJSDKK-XBlZCz1U.js +1 -0
  61. package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-CZd5jqgf.js → gitGraphDiagram-WWUBYQGX-vDyL82tj.js} +1 -1
  62. package/web-dist/assets/index-D-pcMA7P.js +242 -0
  63. package/web-dist/assets/index-DqckQXcp.css +2 -0
  64. package/web-dist/assets/info-A6RAGUB7-DfR7iRgc.js +1 -0
  65. package/web-dist/assets/{infoDiagram-FWYZ7A6U-C2fsvj8W.js → infoDiagram-27XIBGKW-BT4k6N6o.js} +1 -1
  66. package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-DDputQI8.js → ishikawaDiagram-5VMMS53U-BJIdMG0T.js} +1 -1
  67. package/web-dist/assets/{journeyDiagram-5HDEW3XC-CiwOnh1u.js → journeyDiagram-3NMN7TZE-CUGzIF61.js} +2 -2
  68. package/web-dist/assets/{kanban-definition-HUTT4EX6-P8OTxob-.js → kanban-definition-UXKFOSKX-DIPC4kv7.js} +2 -2
  69. package/web-dist/assets/{line-Kk41edHq.js → line-CJKCWj73.js} +1 -1
  70. package/web-dist/assets/{linear-CCCAZbB0.js → linear-z2V0wJk9.js} +1 -1
  71. package/web-dist/assets/{mermaid-parser.core-BIyJ5CJF.js → mermaid-parser.core-BH-fcjsB.js} +3 -3
  72. package/web-dist/assets/mermaid.core-BSdNmJCs.js +11 -0
  73. package/web-dist/assets/{mindmap-definition-LN4V7U3C-CbKVoOZ5.js → mindmap-definition-YA3MSWOX-CJC3zMDF.js} +1 -1
  74. package/web-dist/assets/packet-AYTQ26CC-BET157L_.js +1 -0
  75. package/web-dist/assets/{pegDiagram-2B236MQR-DImDz479.js → pegDiagram-XKGWAZYB-Du8ALEoR.js} +1 -1
  76. package/web-dist/assets/pie-WAS4IAKB-CDs5cIGi.js +1 -0
  77. package/web-dist/assets/{pieDiagram-ENE6RG2P-C2e3M1_h.js → pieDiagram-E7YTZNPT-BX88bIIM.js} +1 -1
  78. package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-Dt3f_lrO.js → quadrantDiagram-AXDQQJYC-BkGxldmI.js} +1 -1
  79. package/web-dist/assets/radar-RG4KPBEZ-FMcFyhAF.js +1 -0
  80. package/web-dist/assets/railroad-74A4TZTK-Du0SbLQI.js +1 -0
  81. package/web-dist/assets/railroad-abnf-HS5TGJTU-DRi4RhLb.js +1 -0
  82. package/web-dist/assets/railroad-ebnf-LZEXJU2U-BmBkdsnK.js +1 -0
  83. package/web-dist/assets/railroad-peg-WCYAUIDC-CydTrmQm.js +1 -0
  84. package/web-dist/assets/{railroadDiagram-RFXS5EU6-CBZHt0Mo.js → railroadDiagram-O6MQD6OU-CYqN0dL6.js} +1 -1
  85. package/web-dist/assets/{requirementDiagram-TGXJPOKE-BxSs_q3D.js → requirementDiagram-BXWQKSXE-ClpQ_sLR.js} +2 -2
  86. package/web-dist/assets/rolldown-runtime-Bh1tDfsg.js +1 -0
  87. package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DeJR64nI.js → sankeyDiagram-P5KCCOFB-CEJUF8o9.js} +1 -1
  88. package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-oOI0fQW_.js → sequenceDiagram-WJ2MYXX4-BpJYUJhB.js} +1 -1
  89. package/web-dist/assets/src-C4XfhTaE.js +1 -0
  90. package/web-dist/assets/{stateDiagram-2N3HPSRC-C0geqCc2.js → stateDiagram-D77RDMKH-BmKLEj9Q.js} +1 -1
  91. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-D_c6vvvW.js +1 -0
  92. package/web-dist/assets/swimlanes-42K2YHIH-CyJxVets.js +1 -0
  93. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BcVx8rdP.js +8 -0
  94. package/web-dist/assets/threadSurfaces-CYpFDk_e.js +143 -0
  95. package/web-dist/assets/{timeline-definition-FHXFAJF6-CCY_OuVM.js → timeline-definition-24CTP7MA-ChEqw_62.js} +1 -1
  96. package/web-dist/assets/treeView-Q6P3EWNA-l1PaAwLT.js +1 -0
  97. package/web-dist/assets/treemap-WGGIJYW6-CxvHcEiT.js +1 -0
  98. package/web-dist/assets/{vennDiagram-L72KCM5P-OGzW7d1w.js → vennDiagram-4TSXK5OY-DF-yXPNP.js} +1 -1
  99. package/web-dist/assets/wardley-WFR3VGLG-BqkX6NQy.js +1 -0
  100. package/web-dist/assets/{wardleyDiagram-EHGQE667-CJKRWMOx.js → wardleyDiagram-VM6X3IG4-B9LU1bxh.js} +1 -1
  101. package/web-dist/assets/{xychartDiagram-FW5EYKEG-biGPRYAN.js → xychartDiagram-S5SC5T6Z-Zt_ZqCWS.js} +3 -3
  102. package/web-dist/index.html +3 -2
  103. package/runtime/board/agent-liveness.mjs +0 -367
  104. package/runtime/board/notify-shared.mjs +0 -90
  105. package/runtime/board/notify.mjs +0 -81
  106. package/runtime/board/rest-detect.mjs +0 -213
  107. package/runtime/board/thread-excerpt.mjs +0 -162
  108. package/web-dist/assets/architecture-TIHT7OUA-cscbyVpp.js +0 -1
  109. package/web-dist/assets/architectureDiagram-ZJ3FMSHR-Bse2UXVn.js +0 -36
  110. package/web-dist/assets/blockDiagram-677ZJIJ3-BLJZnqTz.js +0 -132
  111. package/web-dist/assets/c4Diagram-LMCZKHZV-DO7oo4h9.js +0 -10
  112. package/web-dist/assets/channel-ChsreyIE.js +0 -1
  113. package/web-dist/assets/chunk-52WLFC77-Cg3jpJ_e.js +0 -10
  114. package/web-dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  115. package/web-dist/assets/chunk-C7G6YPKG-Cb_zdGzQ.js +0 -1
  116. package/web-dist/assets/chunk-FWX5IMBZ-2PvmKNIs.js +0 -2
  117. package/web-dist/assets/chunk-OGEWGWER-CEeg8UMh.js +0 -1
  118. package/web-dist/assets/chunk-PUDLZKDR-xwNSwwyn.js +0 -156
  119. package/web-dist/assets/chunk-Q4XR5HBZ-msU0GK4L.js +0 -70
  120. package/web-dist/assets/chunk-RYQCIY6F-BBiFFmSH.js +0 -1
  121. package/web-dist/assets/chunk-WYO6CB5R-BouXl6Ea.js +0 -127
  122. package/web-dist/assets/chunk-ZGVPDNZ5-C7QT30bj.js +0 -62
  123. package/web-dist/assets/chunk-ZIRB5QZD-C6fEPe3t.js +0 -32
  124. package/web-dist/assets/classDiagram-OUVF2IWQ-DzRcM19r.js +0 -1
  125. package/web-dist/assets/classDiagram-v2-EOCWNBFH-DzRcM19r.js +0 -1
  126. package/web-dist/assets/cose-bilkent-JH36ORCC-B4uC0Pku.js +0 -1
  127. package/web-dist/assets/cynefin-VYW2F7L2-KGwY_f6i.js +0 -1
  128. package/web-dist/assets/dagre-CXRCoUWR.js +0 -1
  129. package/web-dist/assets/dagre-VKFMJZFB-CpBkJUGX.js +0 -4
  130. package/web-dist/assets/diagram-WEI45ONY-BPJydYC6.js +0 -41
  131. package/web-dist/assets/dist-KklTF2b-.js +0 -1
  132. package/web-dist/assets/erDiagram-Q63AITRT-CpxSzpX_.js +0 -85
  133. package/web-dist/assets/eventmodeling-45OFAUF4-pAxX2kmp.js +0 -1
  134. package/web-dist/assets/flowDiagram-23GEKE2U-CNUJOYgE.js +0 -1
  135. package/web-dist/assets/ganttDiagram-NO4QXBWP-DKV9dDLx.js +0 -292
  136. package/web-dist/assets/gitGraph-TEB2WS4Q-Di3-VfYF.js +0 -1
  137. package/web-dist/assets/index-CnoKcjA-.css +0 -2
  138. package/web-dist/assets/index-dgMYbeEx.js +0 -378
  139. package/web-dist/assets/info-DKCQHKI2-zUEOPGRX.js +0 -1
  140. package/web-dist/assets/map-DsCK-0Cs.js +0 -1
  141. package/web-dist/assets/mermaid.core-CrqCm1sE.js +0 -11
  142. package/web-dist/assets/packet-7NZHBO7P-Dk5Sv2nR.js +0 -1
  143. package/web-dist/assets/pie-RZYD4A2V-D4HndtMy.js +0 -1
  144. package/web-dist/assets/radar-I7S5WNFK-Bgms7oi0.js +0 -1
  145. package/web-dist/assets/railroad-3IZDKUUU-BZvaJJq3.js +0 -1
  146. package/web-dist/assets/railroad-abnf-AHOZXSZD-BaE30t8x.js +0 -1
  147. package/web-dist/assets/railroad-ebnf-EBAXGLYW-Cuetb6tx.js +0 -1
  148. package/web-dist/assets/railroad-peg-LSFZ7HO6-DDs0AouG.js +0 -1
  149. package/web-dist/assets/src-DLhDEMjC.js +0 -1
  150. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-l7nncg_Z.js +0 -1
  151. package/web-dist/assets/swimlanes-5IMT3BWC-BABUQ-Hv.js +0 -2
  152. package/web-dist/assets/swimlanesDiagram-G3AALYLV-BAhikHjx.js +0 -8
  153. package/web-dist/assets/treeView-QDETBFTQ-CjszFvr3.js +0 -1
  154. package/web-dist/assets/treemap-6X3UGDF4-BbdOWC-4.js +0 -1
  155. package/web-dist/assets/wardley-OPB4EBWU-GgVEIZwC.js +0 -1
  156. /package/web-dist/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
@@ -3,7 +3,7 @@ import { createRequire as __frizzCreateRequire } from "node:module"; const requi
3
3
  // packages/server/src/backend/acp-daemon.ts
4
4
  import { spawn } from "node:child_process";
5
5
  import { createServer } from "node:net";
6
- import { existsSync, readFileSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
6
+ import { existsSync, readFileSync as readFileSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
7
7
  import { dirname } from "node:path";
8
8
  import { StringDecoder } from "node:string_decoder";
9
9
 
@@ -91,6 +91,26 @@ function socketPathOwnership(socketPath) {
91
91
  };
92
92
  }
93
93
 
94
+ // packages/server/src/backend/daemon-identity.ts
95
+ import { readFileSync } from "node:fs";
96
+ function linuxExactStart(pid) {
97
+ if (process.platform !== "linux") return void 0;
98
+ try {
99
+ const bootId = readFileSync("/proc/sys/kernel/random/boot_id", "utf8").trim().toLowerCase();
100
+ if (!/^[0-9a-f-]{36}$/u.test(bootId)) return void 0;
101
+ const stat = readFileSync(`/proc/${pid}/stat`, "utf8").trim();
102
+ const suffixAt = stat.lastIndexOf(") ");
103
+ if (suffixAt < 0) return void 0;
104
+ const ticks = stat.slice(suffixAt + 2).trim().split(/\s+/u)[19];
105
+ return ticks && /^\d+$/u.test(ticks) ? `linux:${bootId}:${ticks}` : void 0;
106
+ } catch {
107
+ return void 0;
108
+ }
109
+ }
110
+ function selfProcessStart() {
111
+ return linuxExactStart("self");
112
+ }
113
+
94
114
  // packages/server/src/backend/acp-daemon.ts
95
115
  var MAX_QUEUED_LINES = 2e4;
96
116
  var MAX_QUEUED_BYTES = 64 * 1024 * 1024;
@@ -155,7 +175,7 @@ function main() {
155
175
  let socketPathIsOurs = () => true;
156
176
  const recordOwner = () => {
157
177
  try {
158
- const value = JSON.parse(readFileSync(config.recordPath, "utf8"));
178
+ const value = JSON.parse(readFileSync2(config.recordPath, "utf8"));
159
179
  return typeof value.daemonPid === "number" ? value.daemonPid : null;
160
180
  } catch {
161
181
  return null;
@@ -181,7 +201,7 @@ function main() {
181
201
  }
182
202
  }
183
203
  };
184
- const writeExitBreadcrumb = (reason) => {
204
+ const writeExitBreadcrumb = (reason, detail) => {
185
205
  try {
186
206
  writeFileSync(`${config.recordPath}.exit`, JSON.stringify({
187
207
  threadSlug: config.threadSlug,
@@ -190,13 +210,15 @@ function main() {
190
210
  daemonPid: process.pid,
191
211
  childPid: child.pid ?? null,
192
212
  reason,
213
+ // The message and stack of a crash (see `crash`). `reason` stays a short word a reader can match.
214
+ ...detail ? { detail } : {},
193
215
  at: (/* @__PURE__ */ new Date()).toISOString()
194
216
  }));
195
217
  } catch {
196
218
  }
197
219
  };
198
- const die = (code, reason) => {
199
- writeExitBreadcrumb(reason);
220
+ const die = (code, reason, detail) => {
221
+ writeExitBreadcrumb(reason, detail);
200
222
  cleanup();
201
223
  process.exit(code);
202
224
  };
@@ -319,12 +341,14 @@ function main() {
319
341
  if (message.id !== void 0 && message.method === void 0) pendingFromChild.delete(String(message.id));
320
342
  toChild(message);
321
343
  };
344
+ const processStart = selfProcessStart();
322
345
  const writeRecord = () => {
323
346
  writeFileSync(config.recordPath, JSON.stringify({
324
347
  threadSlug: config.threadSlug,
325
348
  sessionId: config.sessionId,
326
349
  generation: config.generation,
327
350
  daemonPid: process.pid,
351
+ ...processStart ? { processStart } : {},
328
352
  childPid: child.pid,
329
353
  socketPath: config.socketPath,
330
354
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -427,5 +451,15 @@ function main() {
427
451
  die(0, `signal-${signal}`);
428
452
  });
429
453
  }
454
+ const crash = (reason, error) => {
455
+ try {
456
+ child.kill("SIGTERM");
457
+ } catch {
458
+ }
459
+ return die(1, reason, (error instanceof Error ? `${error.message}
460
+ ${error.stack ?? ""}` : String(error)).slice(0, 2e3));
461
+ };
462
+ process.on("uncaughtException", (error) => crash("uncaught-exception", error));
463
+ process.on("unhandledRejection", (reason) => crash("unhandled-rejection", reason));
430
464
  }
431
465
  main();
@@ -2,7 +2,7 @@ import { createRequire as __frizzCreateRequire } from "node:module"; const requi
2
2
 
3
3
  // packages/server/src/backend/claude-agent-broker.ts
4
4
  import net from "node:net";
5
- import { readFileSync as readFileSync8, realpathSync as realpathSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync4 } from "node:fs";
5
+ import { readFileSync as readFileSync9, realpathSync as realpathSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync4 } from "node:fs";
6
6
  import { homedir as homedir3 } from "node:os";
7
7
  import { join as join11 } from "node:path";
8
8
  import { randomUUID } from "node:crypto";
@@ -14,7 +14,7 @@ import { accessSync, constants as fsConstants, rmSync as rmSync3 } from "node:fs
14
14
  import { delimiter, isAbsolute as isAbsolute3 } from "node:path";
15
15
  import { StringDecoder } from "node:string_decoder";
16
16
 
17
- // node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.321_@anthropic-ai+sdk@0.111.0_zod@4.4.3__@modelconte_70869ac51ce11fbc53a636bc22d589af/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
17
+ // node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.322_@anthropic-ai+sdk@0.111.0_zod@4.4.3__@modelconte_32210b6863debeec70012cf369e453bd/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
18
18
  import { createRequire as sX } from "node:module";
19
19
  import { createHash as nP, randomBytes as cX, randomUUID as za } from "crypto";
20
20
  import { basename as yX, dirname as mP } from "path";
@@ -20942,7 +20942,7 @@ function oWe(e10) {
20942
20942
  }
20943
20943
  }
20944
20944
  function VV(e10, t, n) {
20945
- let r = { timestamp: (/* @__PURE__ */ new Date()).toISOString(), level: e10, event: t, data: n, cc_version: typeof { VERSION: "0.3.321" } < "u" ? "0.3.321" : "unknown" };
20945
+ let r = { timestamp: (/* @__PURE__ */ new Date()).toISOString(), level: e10, event: t, data: n, cc_version: typeof { VERSION: "0.3.322" } < "u" ? "0.3.322" : "unknown" };
20946
20946
  return ce(r) + `
20947
20947
  `;
20948
20948
  }
@@ -24293,7 +24293,7 @@ function ZZ(e10, { strictPolicyHelperKeys: t = false } = {}) {
24293
24293
  if (typeof s !== "boolean") return s;
24294
24294
  return s ? {} : { commit: "", pr: "", sessionUrl: false };
24295
24295
  }).pipe(o).optional().describe('Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set. Set to false to hide all attribution, the same as { "commit": "", "pr": "", "sessionUrl": false }. Setting it to true is the same as leaving it out. Older Claude Code versions reject true or false here, so use the object form in settings files shared across versions.');
24296
- }, attributionProject: () => h().optional().describe(`The claude.ai Project this session names for your organization's usage reports: the Project's ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. An empty string names none and stops lower-precedence files from naming one; the organization default still applies. Sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT.`), attributionProjectPolicy: () => O({ default: h().optional().describe('The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project.') }).optional().describe("Your organization's default for attributionProject. Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json); ignored in user, project, local and --settings sources."), includeCoAuthoredBy: () => v().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"), ...false, ...false, includeGitInstructions: () => v().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"), permissions: () => or(() => BZ(e10)).describe("Tool usage permissions configuration"), model: () => h().optional().describe("Override the default model used by Claude Code"), fallbackModel: () => k(h()).optional().describe('Fallback model(s) tried in order when the primary model is overloaded or unavailable. Each element accepts a model name or alias; "default" expands to the default model. CLI --fallback-model takes precedence.'), availableModels: () => k(h()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows that version and any model ID that extends it, so "claude-opus-5" also allows "claude-opus-5-5"), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'), enforceAvailableModels: () => v().optional().describe("When true and availableModels is a non-empty array, the Default model selection is also constrained: if the default model for the user tier is not in availableModels, Default resolves to the first allowed availableModels entry instead. Has no effect when availableModels is unset or an empty array. Typically set in managed settings by enterprise administrators."), availableModelsMatch: () => K(["prefix", "exact"]).optional().describe('How availableModels entries match model IDs. "prefix" (the default) lets an entry also allow any model ID that extends it, so "claude-opus-5" allows "claude-opus-5-5". "exact" keeps that matching but stops a model ID entry from allowing other versions: "claude-opus-5" allows Opus 5 and its dated and -fast IDs, but not Opus 5.5 or a later release until it is listed, and a -latest ID needs a -latest entry. Family aliases ("opus") still allow the whole family; aliases whose model depends on the release or settings (best, opusplan, default) are ignored. With "exact" and a list that names at least one model, the Default option also uses only a listed model; if none can be used, Claude Code will not start. Haiku background models, and hooks and other helper requests that pick their own model, are not restricted (deniedModels covers them; allowManagedHooksOnly limits hooks). Read from managed settings only.'), deniedModels: () => k(h()).optional().describe('Models users cannot select, even when availableModels allows them. A family alias ("opus") blocks that family. A model ID blocks that version in every spelling: dates, -fast and provider prefixes are ignored, so "claude-opus-5-5" blocks every Opus 5.5 ID but not Opus 5. An ID with no minor version ("claude-opus-5") also blocks later minor versions, as it allows them in availableModels. Aliases whose model depends on the release or settings (best, opusplan, default) are ignored. The Default option steps down past a blocked model; if the Default has no allowed model to step down to, Claude Code will not start. Read from managed settings only.'), modelOverrides: () => q(h(), h()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'), modelPicker: () => O({ options: k(lx()).describe("Rows to show in the /model picker, in order."), replaceBuiltInOptions: v().optional().describe("When true, the picker shows only the Default row and these options \u2014 the built-in lineup, gateway-discovered models and ANTHROPIC_CUSTOM_MODEL_OPTION are hidden. When false or unset, these options are added after the built-in lineup.") }).optional().describe("Curate the /model picker: an ordered list of models with your own labels, independent of the built-in lineup and of Claude Code releases. availableModels still applies to these rows. Honored from managed, --settings/SDK, and user settings only (not from a project checkout); the highest-precedence of those that defines modelPicker wins outright (no merging across sources). Typically set in managed settings by enterprise administrators."), modelPricing: () => O({ multiplier: ax(), overrides: q(h(), ix()).optional() }).optional().describe(`Price usage at your organization's contracted rates instead of list price. Affects every spend figure Claude Code reports \u2014 /cost, the status line, the SDK total_cost_usd, --max-budget-usd, and the OpenTelemetry cost metric and events \u2014 which remain USD estimates, not an invoice (the per-Mtok price labels in /model stay at list). "overrides" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, cacheWrite \u2014 all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. A key Claude Code itself uses for a built-in model \u2014 its ID such as "claude-sonnet-4-6", or its first-party, Bedrock (any or no region prefix), Vertex or Foundry ID \u2014 covers every dated and provider form of that model; any other key \u2014 a gateway model alias, or a spelling Claude Code does not itself use \u2014 matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. "multiplier" in (0, 10] scales every computed cost, overridden or not (0.85 = 85% of the price, 1.2 = 120%). Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json), or \u2014 when none of those sets it \u2014 when supplied by a host application that manages the model provider; ignored in user, project, local and --settings sources.`), ...false, enableAllProjectMcpServers: () => v().optional().describe("Whether to automatically approve all MCP servers in the project"), enabledMcpjsonServers: () => k(h()).optional().describe("List of approved MCP servers from .mcp.json"), disabledMcpjsonServers: () => k(h()).optional().describe("List of rejected MCP servers from .mcp.json"), disableClaudeAiConnectors: () => v().optional().describe("When true in any settings source, claude.ai MCP cloud connectors are not auto-fetched or connected, and a claudeai-proxy server passed explicitly (e.g. via --mcp-config or the SDK mcpServers option) does not connect either. Any-source-true wins: a project can opt out, but a project-level false cannot override a user-level true."), skillOverrides: () => q(h(), K(["on", "name-only", "user-invocable-only", "off"])).optional().describe('Per-skill listing overrides keyed by skill name. "name-only" lists the skill without its description; "user-invocable-only" hides it from the model but keeps /name; "off" hides it from both. Absent = on.'), disableBundledSkills: () => v().optional().describe("Disable the skills and workflows that ship with Claude Code: bundled skills and workflows are removed entirely; built-in slash commands stay typable but are hidden from the model. Plugins, .claude/skills/, and .claude/commands/ are unaffected. Equivalent to CLAUDE_CODE_DISABLE_BUNDLED_SKILLS=1."), managedMcpServers: () => or(() => q(h().refine(hv, { error: fy }), _v(), { error: yv })).describe(`MCP servers the organization provides to every user, keyed by server name, each with the .mcp.json entry shape; only "http" and "sse" servers are accepted (nothing that names a program to run, no \${VAR} references). Honored from managed settings only; users cannot remove them, deniedMcpServers still applies, and they need no allowedMcpServers entry. Not read in Claude Desktop's Code tab on a third-party deployment or in Cowork sessions, where Claude Desktop supplies and locks the session's MCP servers itself.`), allowedMcpServers: () => or(() => k(ky())).describe("Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries with no ${VAR} in their command, args, url or header values) are allowed without being listed; a managed-mcp.json entry with ${VAR} in any of those must match this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied."), deniedMcpServers: () => or(() => k(Py())).describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."), hooks: () => or(() => wa()).describe("Custom commands to run before/after tool executions"), worktree: () => O({ symlinkDirectories: k(h()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'), sparsePaths: k(h()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). Dramatically faster in large monorepos \u2014 only the listed paths are written to disk."), baseRef: K(["fresh", "head"]).optional().describe("Which ref new worktrees branch from. 'fresh' (default) branches from origin/<default-branch> for a clean tree. 'head' branches from your current local HEAD so unpushed commits and feature-branch state are present. Applies to --worktree, EnterWorktree, and agent isolation."), bgIsolation: K(["worktree", "none"]).optional().catch(void 0).describe("Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly."), location: h().optional().catch(void 0).describe("Directory under which Claude Code Desktop creates the worktrees of SSH sessions that run on this machine (an absolute path or one starting with ~/), instead of <project>/.claude/worktrees. Read by the desktop app from the SSH host user settings; a location chosen in the desktop app's SSH connection settings takes precedence. The CLI (--worktree, EnterWorktree, agent isolation) does not read it yet.") }).optional().describe("Git worktree configuration: the CLI --worktree flag, EnterWorktree and agent isolation, plus the location Claude Code Desktop uses for SSH-session worktrees on this machine."), disableAllHooks: () => v().optional().describe("Disable all hooks and statusLine execution: the hooks defined in settings files and by installed plugins. Features built into Claude Code are not hooks in this sense and keep working; each has its own switch."), disableReplyCheck: () => v().optional().describe("Disable the reply check in Claude Tag sessions on a self-hosted runner. The check re-prompts Claude, at most four times a turn, when a turn ends without a call to one of Claude Tag's reply tools. It is not a hook, so disableAllHooks does not affect it. Disabling it also stops two messages to Claude that Anthropic's service can request for such a session: a nudge after a long stretch of work with no visible update, and a reminder added to prompts. Claude Code's built-in reminder to give progress updates, on models that have it, is then no longer held back. Set it in managed settings; false there keeps the check on. Everywhere else it is ignored and the check stays on. Has no effect on sessions that Anthropic hosts."), disableAgentView: () => v().optional().describe("Disable agent view (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENT_VIEW=1."), disableRemoteControl: () => v().optional().describe("Disable Remote Control (claude.ai/code, `claude remote-control`, `--remote-control`/`--rc`, auto-start, and the in-session toggle). Typically set in managed settings."), disableWorkflows: () => v().optional().describe("Disable the Workflows feature. Code Review on pull requests and /ultrareview run in Anthropic's cloud and are not stopped by this setting, except an /ultrareview that has to restart partway through. A machine that runs a review itself refuses it when that machine's own administrator set this, or CLAUDE_CODE_DISABLE_WORKFLOWS in an `env` block, in its managed settings (MDM, the managed-settings file or an administrator's policy helper). Set in the environment before Claude Code starts, CLAUDE_CODE_DISABLE_WORKFLOWS disables Workflows. Beyond the cases above it stops a review only when the review's own session starts with it set."), disableArtifact: () => v().optional().describe("Deprecated: use enableArtifact: false. Still honored \u2014 true disables the Artifact tool; false is ignored."), enableArtifact: () => v().optional().describe("Turn the Artifact tool on or off. Off in any of managed, --settings, or user settings wins; project and local settings can only turn it off. Unset defaults to on once the feature is available."), enableWorkflows: () => v().optional().describe("Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available."), workflowSizeGuideline: () => K(["unrestricted", "small", "medium", "large"]).optional().describe('Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium" fewer than 10, "large" fewer than 50, and "unrestricted" sends no guideline. Unset defaults to "medium", or "small" on Pro plans. A value here \u2014 including from managed settings \u2014 takes precedence over the "Dynamic workflow size" choice in /config, and that /config row is hidden while a settings file provides the key. This is a guideline, not an enforced limit.'), workflowKeywordTriggerEnabled: () => v().optional().describe('Enable the "ultracode" keyword trigger: including the keyword in a prompt opts that turn into the Workflow tool. Set to false to disable the trigger. Default: true.'), disableSkillShellExecution: () => v().optional().describe("Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run."), disableWindowsBashCommandSplit: () => v().optional().describe("Windows only. Set to true to keep every Bash command in a single argument to bash, so that endpoint security tools that match text in process command lines see it whole. Otherwise Claude Code may split a long command over several arguments. With true, a command of about 7,000 characters or more, or fewer if it is full of quotes, may reach bash cut short, and then usually fails with a syntax error. Only honored from managed settings; ignored in user, project, local and --settings sources."), defaultShell: () => K(["bash", "powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."), bashEditDiffEnabled: () => v().optional().describe("Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default: off, except in auto and bypassPermissions modes when the Bash tool handles file edits or the model's configuration turns it on. Only user, flag or policy settings can turn it on in other modes."), bashOutputMaxChars: () => Y().int().positive().optional().catch(void 0).describe("How many characters of a successful Bash or PowerShell command's output Claude receives inline (default 30000; values clamp to 4000-128000). Output past this is saved to a file and Claude receives a short preview plus the path. When set, this also replaces BASH_MAX_OUTPUT_LENGTH, which on its own only sizes the read-back window."), taskOutputMaxChars: () => Y().int().positive().optional().catch(void 0).describe("Deprecated: no longer has any effect (the TaskOutput tool was removed). Read a background task's output file with the Read tool instead."), respondToBashCommands: () => v().optional().describe("Whether Claude responds after an input-box ! bash command runs. Set to false to add the command output to context without a response. Default: true."), allowManagedHooksOnly: () => v().optional().describe("When true (and set in managed settings), only hooks from managed settings and from plugins that managed settings enable run. User, project, and local hooks and the hooks of plugins the user installed are ignored. Features built into Claude Code are not hooks in this sense and keep working."), allowedHttpHookUrls: () => k(h()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'), httpHookAllowedEnvVars: () => k(h()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."), allowManagedPermissionRulesOnly: () => v().optional().describe("When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins (in Claude Desktop, only while this is not set by the organization's own managed settings), the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name \u2014 unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply."), allowManagedMcpServersOnly: () => v().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."), allowAllClaudeAiMcps: () => v().optional().describe("When true (and set in managed settings), claude.ai cloud MCP connectors load alongside managed-mcp.json instead of being suppressed by its exclusive-control lockdown. Default off preserves the lockdown. Read from managed settings only."), allowClaudeInChromeWithManagedMcp: () => v().optional().describe("When true (and set in device managed settings: MDM, the managed-settings.json file, or a policy helper those configure), the built-in Claude in Chrome MCP server can run alongside managed-mcp.json instead of being blocked by its exclusive-control lockdown. deniedMcpServers and the organization's Claude in Chrome setting still block it. Default off preserves the lockdown."), strictPluginOnlyCustomization: () => qZ().optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. Composes with strictKnownMarketplaces for end-to-end admin control \u2014 plugins gated by marketplace allowlist, everything else blocked here.'), statusLine: () => O({ type: U("command"), command: h(), padding: Y().optional(), refreshInterval: Y().min(1).optional().catch(void 0).describe("Re-run the status line command every N seconds in addition to event-driven updates"), hideVimModeIndicator: v().optional().describe("Hide the built-in `-- INSERT --` / `-- VISUAL --` indicator below the prompt. Use this when your status line script renders `vim.mode` itself.") }).optional().describe("Custom status line display configuration"), prUrlTemplate: () => h().optional().describe('URL template for PR links in the footer link badges and inline messages. The detected git PR is rendered as the first footer-link badge. Placeholders: {host} {owner} {repo} {number} {url}. Example: "https://reviews.example.com/{owner}/{repo}/pull/{number}"'), footerLinksRegexes: () => k(K9e().catch(DZ)).transform((o) => o.filter((s) => s !== DZ)).optional().catch(void 0).describe("Extra clickable footer badges that appear when a regex matches turn output (tool results and assistant responses). Read from user, flag, and managed settings only; ignored in project .claude/settings.json and local .claude/settings.local.json. At most 5 badges render; the oldest is displaced by newer matches and /clear removes them. Use to surface IDs printed by project CLIs as session links."), subagentStatusLine: () => O({ type: U("command"), command: h() }).optional().describe("Custom per-subagent status line shown in the agent panel; receives row context as JSON on stdin"), enabledPlugins: () => q(h(), YZ()).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints. Settings precedence is user < project < local < flag < policy, so to disable a plugin that project settings enable, set it to false in .claude/settings.local.json \u2014 setting false in ~/.claude/settings.json is overridden by the project.'), prependPlugins: () => k(h()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins not listed here or in appendPlugins follow the listed ones; user, project and marketplace plugins come after those; then appendPlugins; then the built-in plugins. The bundled cc-plugin-sec-default@builtin seats itself outermost (on a machine with managed settings and for Team and Enterprise organizations) unless this list is set, in which case list it where it should sit or leave it out. Name it there as sec-default@builtin, the id every release reads, for as long as any machine in the organization may run a release from before its rename; a release that knows the new id reads either. Any other id that is not an enabled managed plugin is skipped; an id listed in both keys is prepended. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."), appendPlugins: () => k(h()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run last among plugins, innermost, in the listed order: the last id listed sits just above the built-in plugins and sees each event as every other plugin left it. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."), extraKnownMarketplaces: () => or(() => n("extraKnownMarketplaces")).describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."), additionalMarketplaces: () => or(() => n("additionalMarketplaces")).describe("Alias for extraKnownMarketplaces: this key is read exactly as if it were spelled extraKnownMarketplaces. Do not set both in one file \u2014 if both appear, this key is ignored with a warning. Claude Code may rewrite this key as extraKnownMarketplaces when it updates the file. Clients older than this alias ignore it, so prefer extraKnownMarketplaces while older Claude Code versions still share the same settings."), strictKnownMarketplaces: () => or(() => k(by())).describe('Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these sources can be added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to allow every repository under that owner. The check happens BEFORE downloading, so blocked sources never touch the filesystem. Note: this is a policy gate only \u2014 it does NOT register marketplaces. To pre-register allowed marketplaces for users, also set extraKnownMarketplaces.'), allowedMarketplaces: () => or(() => k(by())).describe("Alias for strictKnownMarketplaces (managed settings only): this key is read exactly as if it were spelled strictKnownMarketplaces. Do not set both in one file \u2014 if both appear, this key is ignored with a warning. Clients older than this alias ignore it, so keep using strictKnownMarketplaces when the allowlist must also bind older Claude Code versions."), blockedMarketplaces: () => or(() => k(Wv())).describe('Enterprise blocklist of marketplace sources. When set in managed settings, these sources are blocked from being added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to block every repository under that owner. The check happens BEFORE downloading, so blocked sources never touch the filesystem.'), disableCommandPluginSources: () => v().optional().describe("Controls the `command` plugin source, whose plugin directory is produced by running a marketplace-declared command on this machine. true: command-sourced plugins are never installed, updated, or re-resolved (the command never runs). false: explicitly allowed. Unset: follows allowManagedHooksOnly \u2014 an org that restricts hook execution to managed settings gets command sources disabled too. Only honored from managed settings."), ...false, disableSideloadFlags: () => v().optional().describe("When true (and set in managed settings), rejects the --plugin-dir, --plugin-url, --agents, and non-sdk --mcp-config CLI flags at startup. Closes the CLI-flag bypass of strictKnownMarketplaces. Pair with allowedMcpServers for per-server MCP control; this setting does not gate other MCP entry points (SDK setMcpServers, claude mcp add, .mcp.json). Also blocks surfaces that spawn the CLI with these flags internally (see settings documentation). Only honored from managed settings; ignored in user/project/local settings."), pluginSuggestionMarketplaces: () => k(h()).optional().describe("Marketplace names whose plugins may surface as contextual install suggestions (relevance-based tips). No marketplace-declared suggestions surface without this allowlist; the built-in tips for Anthropic's own plugins are unaffected. Only honored when set in managed settings (policy scope); the key is ignored in user, project, and local settings. A name only takes effect when the marketplace is registered on the machine AND its registered source is also declared in managed settings, either as the extraKnownMarketplaces entry for that name or as an entry of strictKnownMarketplaces. A marketplace registered from a different source under an allowlisted name is ignored. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source."), forceLoginMethod: () => K(["claudeai", "console", "gateway"]).optional().catch(void 0).describe('Force a specific login method: "claudeai" for a Claude subscription (individual, Team, or Enterprise plans), "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow'), forceLoginGatewayUrl: () => h().min(1).optional().catch(void 0).describe('Cloud gateway URL to pre-fill during login, alongside forceLoginMethod: "gateway". Honored from admin-controlled managed settings (MDM / managed-settings.json / policy helper) and, on a machine with none of those, from your own user settings; ignored in project, local, flag, and remote-delivered settings.'), gatewayInternalNetworks: () => k(h()).optional().catch([XZ]).meta({ default: void 0 }).describe("IPv4 CIDR blocks (at most 4, each /8 to /32, not overlapping) your Cloud gateway sits in: the public block your organization numbers its internal network from, which lets /login reach a gateway there. A block must lie entirely outside private space, where /login accepts a gateway without this key. /login accepts a gateway inside a listed block over a direct connection only, and only when this machine's own address on that connection is inside the same block, so /login must happen from a machine whose own address is inside the block (not through a proxy, VPN pool, container or NAT segment outside it). A bar against copied settings files, not proof of location. Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings."), parentSettingsBehavior: () => K(["first-wins", "merge"]).optional().describe(`Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (the default, except in a gateway session Claude Desktop's Code tab launched, where "merge" is): parent is dropped \u2014 admin tiers are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).`), managedSourcesBehavior: () => K(["first-wins", "merge"]).optional().describe(`Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json \u2014 scalars take the highest source's value (a restrictive boolean or enum \u2014 the allowManaged*Only locks, the disable* switches, the sandbox lock family \u2014 takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, allowedProviders, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). In both modes, a forceLoginOrgUUID, or a forceLoginMethod of claudeai or console, that this machine's own MDM policy or managed settings file sets applies ahead of server-managed settings. Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.`), forceLoginOrgUUID: () => ie([h(), k(h())]).optional().describe("Organization UUID to require for OAuth login. Accepts a single UUID string or an array of UUIDs (any one is permitted). When set in managed settings, login fails if the authenticated account does not belong to a listed organization."), allowedProviders: () => Me((o) => Array.isArray(o) ? o.filter(Ev) : o, k(K(Zp))).optional().catch(void 0).describe(`Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the Anthropic API or a cloud provider's API sent to some other host \u2014 ANTHROPIC_BASE_URL, that provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] \u2014 such as an LLM gateway; admitted only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set only in the admin console reaches only sessions that fetch your server-managed settings \u2014 not a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max/Ultra login, --bare without an API key, or a first launch before the fetch lands \u2014 all conditions the user controls. Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".`), ...false, forceRemoteSettingsRefresh: () => v().optional().describe("When set in managed settings, the CLI blocks startup until remote managed settings are freshly fetched, and exits if the fetch fails"), otelHeadersHelper: () => h().optional().describe("Path to a script that outputs OpenTelemetry headers"), outputStyle: () => h().optional().describe("Controls the output style for assistant responses"), viewMode: () => K(["default", "verbose", "focus"]).optional().catch(void 0).describe("Default transcript view mode on startup"), language: () => h().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'), skipWebFetchPreflight: () => v().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"), sandbox: () => or(() => sv()), ...false, feedbackSurveyRate: () => Y().min(0).max(1).optional().describe("Probability (0\u20131) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."), feedbackDrafts: () => K(["notify", "quiet", "off"]).optional().describe('Model-drafted feedback (the SendFeedback tool). "notify" (default) shows a one-line notice when a draft is queued; "quiet" shows only the footer counter; "off" disables the tool entirely so drafts are never queued.'), spinnerTipsEnabled: () => v().optional().describe("Whether to show tips in the spinner"), spinnerVerbs: () => O({ mode: K(["append", "replace"]), verbs: k(h()) }).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'), spinnerTipsOverride: () => O({ excludeDefault: v().optional().catch(void 0), tips: _9e().optional(), tipsFile: h().optional().catch(void 0).describe("Absolute or ~/ local path to a JSON file holding an array of tips (same shapes as `tips`); honored from user, --settings and on-disk managed settings only. Read once per CLI process (restart to pick up edits)."), label: h().optional().catch(void 0).describe('Prefix shown before your tips in the spinner (default "Tip")') }).passthrough().optional().catch(void 0).describe("Add your organization's own tips to the spinner tip rotation. tips: strings or {id, text, cooldownSessions?, priority?} objects; tipsFile: a JSON file of the same; label: prefix shown before your tips; excludeDefault: if true, only show your tips (default: false)."), syntaxHighlightingDisabled: () => v().optional().describe("Whether to disable syntax highlighting in diffs"), maxProseWidth: () => Y().int().min(40).optional().catch(void 0).describe("Maximum width, in terminal columns, of the prose in Claude's responses (paragraphs, headings, lists, blockquotes). In a wider terminal the prose wraps at this width while tables and code blocks keep the full width; only the display wraps, the response text itself gains no line breaks. Minimum 40. Unset (the default) uses the full terminal width."), spellcheck: () => O({ enabled: v().optional().catch(void 0).describe("Turn on spell checking of the prompt input (default: false)"), checker: h().optional().catch(void 0).describe(`Which spell checker to run: ${Ay.map((o) => `"${o}"`).join(", ")}, or "auto" (default) for the first of those found on PATH`), language: h().optional().catch(void 0).describe(`Dictionary to use, passed to the checker as-is (aspell --lang, hunspell -d, ispell -d), e.g. "en_GB"; names are checker-specific (letters, digits and _ - . , only). Default: the checker's own default`), color: h().optional().catch(void 0).describe(`Color of misspelled words (they are also underlined): a terminal color name such as "red" or "magenta", "#rrggbb", "rgb(r,g,b)", "ansi256(n)" or "ansi:<name>". Default: the theme's error color`) }).passthrough().optional().catch(void 0).describe(`Underline misspelled words in the prompt input as you type, using an installed ${Ay.slice(0, -1).join(", ")} or ${Ay.at(-1)} (off unless "enabled" is true; does nothing if none is installed). Read from user, flag and managed settings only (the whole block from the highest-precedence of those applies); ignored in project .claude/settings.json and .claude/settings.local.json.`), terminalTitleFromRename: () => v().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."), promptCacheTtl: () => K(fl).optional().catch(void 0).describe('Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it): "5m" or "1h". Unset = automatic: 1 hour on a Claude subscription within its usage limits, 5 minutes on an API key, Bedrock, Vertex or Foundry. 1-hour cache writes are billed at a higher rate; the cache stays warm across longer breaks. The CLAUDE_CODE_PROMPT_CACHE_TTL environment variable takes precedence.'), subagentPromptCacheTtl: () => K(fl).optional().catch(void 0).describe('Prompt cache TTL for everything outside the main conversation \u2014 subagents, workflows, background and helper requests: "5m" or "1h". Unset = automatic (5 minutes unless ENABLE_PROMPT_CACHING_1H=1). The CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL environment variable takes precedence.'), alwaysThinkingEnabled: () => v().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."), effortLevel: () => K(["low", "medium", "high", "xhigh"]).optional().catch(void 0).describe("Persisted effort level for supported models."), maxEffortLevel: () => K(Fp).optional().catch(void 0).describe("Maximum effort level. Anything above it (an /effort or /model pick, --effort, CLAUDE_CODE_EFFORT_LEVEL, a model default) is clamped to it, on every provider including Bedrock, Vertex and Foundry. Combines with an organization's per-model effort cap by taking the lower of the two; across settings files the lowest value wins, and modelSettings.<model>.maxEffortLevel replaces it per model. Enforced client-side: an effort supplied through CLAUDE_CODE_EXTRA_BODY is not clamped."), modelSettings: () => Me((o) => typeof o === "object" && o !== null && !Array.isArray(o) ? ba(o, (s, i) => Object.hasOwn(Object.prototype, i)) : o, q(h(), O({ effortLevel: K(["low", "medium", "high", "xhigh"]).optional().catch(void 0).describe("Persisted effort level for this model."), maxEffortLevel: K(Fp).optional().catch(void 0).describe('Maximum effort level for this model. Within one settings file it replaces the top-level maxEffortLevel for the model ("max" exempts it); across settings files the lowest applicable value wins. Keyed like effortLevel: the canonical model name also matches its dated, [1m], Bedrock and Vertex spellings.'), autoCompactWindow: ie([U("auto"), LZ()]).describe('Auto-compact window for this model, in tokens (100000 to 1000000), or "auto" for the window tuned for the model. Within one settings file it replaces the top-level autoCompactWindow for the model. /autocompact saves here. The canonical model name as key also matches its dated, [1m], Bedrock and Vertex spellings.') }).passthrough().optional().catch(void 0))).optional().catch(void 0).describe("Per-model settings keyed by canonical model name."), ultracode: () => v().optional().catch(void 0).describe("Enable ultracode for the session: standing dynamic-workflow orchestration at any effort level. Session-scoped \u2014 typically provided via --settings or the apply_flag_settings control request; interactive toggles never persist it. Requires workflows to be enabled and a model that supports ultracode."), autoCompactWindow: () => LZ().describe("Auto-compact window size"), ...false, advisorModel: () => h().optional().describe("Advisor model for the server-side advisor tool."), fastMode: () => v().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."), fastModePerSessionOptIn: () => v().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."), promptSuggestionEnabled: () => v().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."), emojiCompletionEnabled: () => v().optional().describe("When false, the :emoji: shortcode typeahead (the suggestion popup and the :name: inline replacement) is disabled. When absent or true, it is enabled."), awaySummaryEnabled: () => v().optional().describe("@internal When false, the session recap (shown when you return after being away for 5+ minutes) is disabled. When absent or true, recap is enabled. Hidden from public SDK types until external launch."), responseComparisonEnabled: () => v().optional().describe("@internal Set to false to stop Claude Code from showing two answers to one message and asking which is better. When absent or true, it may do so on some turns. Hidden from public SDK types until external launch."), showClearContextOnPlanAccept: () => v().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'), askUserQuestionTimeout: () => K(["60s", "5m", "10m", "never"]).optional().catch(void 0).describe("Idle time before Claude's questions auto-continue with any answers selected so far. Defaults to never \u2014 auto-continue only runs when explicitly set to 60s/5m/10m."), dialogExpiry: () => K(["60s", "5m", "10m", "never"]).optional().catch(void 0).describe('Max time a permission/user dialog forwarded to a remote client stays parked awaiting an answer, and how long a HELD cross-session message awaits approval, before either resolves to its safe no-action default (cancelled / dropped-with-denial). Defaults to 5m to match the long-standing remote-dialog deadline; "never" disables the deadline. Local-only permission prompts (no remote client) are unaffected. The CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS env var, when set, overrides this. Read from trusted sources only (never a checked-in repo settings file).'), agent: () => h().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."), modelProposedGoals: () => K(zY).optional().catch(void 0).describe("@internal Controls the ProposeGoal tool (model-proposed session goals). 'auto' (the default when absent) lets the model choose per proposal whether to ask for approval via its ask_user parameter; 'alwaysAsk' routes every model-proposed goal through the approval dialog; 'disabled' turns the tool off. A typed /goal is unaffected. Consent-affecting, so it is read from trusted sources only (user/policy/flag) \u2014 workspace-resident project and local settings are ignored."), companyAnnouncements: () => k(h()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"), pluginConfigs: () => q(h(), O({ mcpServers: q(h(), q(h(), ie([h(), Y(), v(), k(h())]))).optional().describe("User configuration values for MCP servers keyed by server name"), options: q(h(), ie([h(), Y(), v(), k(h())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.") }).or(fO())).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"), remote: () => O({ defaultEnvironmentId: h().optional().describe("Default environment ID to use for cloud sessions") }).optional().describe("Cloud session configuration"), autoUpdatesChannel: () => K(["latest", "stable", "rc"]).optional().describe("Release channel for auto-updates (latest or stable)"), minimumVersion: () => h().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"), requiredMinimumVersion: () => h().optional().describe("Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup with instructions to update. Only enforced from managed (policy) settings."), requiredMaximumVersion: () => h().optional().describe("Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup with instructions to install an approved version. Only enforced from managed (policy) settings."), plansDirectory: () => h().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"), tui: () => K(["default", "fullscreen"]).optional().describe('Terminal UI renderer. "fullscreen" uses the flicker-free alt-screen renderer with virtualized scrollback (equivalent to CLAUDE_CODE_NO_FLICKER=1). "default" uses the classic main-screen renderer.'), ...false, voice: () => O({ enabled: v().optional(), mode: K(["hold", "tap"]).optional().describe("'hold' (default): hold to talk. 'tap': tap to start, tap to stop+submit."), autoSubmit: v().optional().describe("Submit the prompt when hold-to-talk is released (hold mode only)") }).optional().describe("Voice mode settings (hold-to-talk / tap-to-toggle dictation)"), channelsEnabled: () => v().optional().describe("Managed-org opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). claude.ai Teams/Enterprise: default off. Console: default on unless managed settings exist. Set true to allow; users then select servers via --channels."), allowedChannelPlugins: () => k(jZ()).optional().describe("Managed-org allowlist of channel plugins. When set, replaces the default Anthropic allowlist \u2014 admins decide which plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."), prefersReducedMotion: () => v().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"), timeFormat: () => ie([K(FY), h()]).optional().describe('Clock format for times shown in the UI: "auto" (default, follows the locale), "12-hour", "24-hour", "24-hour-utc" ("18:05Z"), or a strftime pattern such as "%H:%M" (any value containing "%"; other values read as "auto"). A pattern replaces the time everywhere; message timestamps show only the pattern, so include %Y-%m-%d for the date. /config offers the presets; a pattern is set here.'), timeZone: () => h().optional().describe('IANA time zone for times shown in the UI, e.g. "UTC" or "Europe/Dublin". Default: the system time zone. An unknown name falls back to the system time zone.'), doneMeansMerged: () => v().optional().describe("@internal When true, Claude keeps working until the PR is ready for you to merge, a cron/Monitor is armed to resume later, or it hands you a self-contained next step."), totalTokensReminder: () => K(["off", "infinite", "fixed", "countdown", "padded-countdown"]).optional().describe("@internal Emit a <total_tokens>N tokens left</total_tokens> block in the system prompt, after each tool result, and (when totalTokensReminderAfterUserTurn is on) after each regular user prompt. 'infinite' uses the literal value Infinite, 'fixed' uses 5000000, 'countdown' uses the live remaining context-window tokens, 'padded-countdown' counts down from totalTokensReminderBudget (re-anchoring to the full budget on each regular user prompt when totalTokensReminderAfterUserTurn is on \u2014 task-budget semantics). Defaults to padded-countdown for a model with the total_tokens_reminder capability, else off. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER overrides."), totalTokensReminderBudget: () => Y().int().positive().optional().describe("@internal Starting budget (tokens) for totalTokensReminder 'padded-countdown' mode. Defaults to 15000000. Server-controlled via GrowthBook; env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET overrides."), totalTokensReminderAfterUserTurn: () => v().optional().describe("@internal When true, emit the totalTokensReminder block after each regular user prompt and (for 'padded-countdown') re-anchor the task budget to the full configured value at the start of each user turn. When false, the reminder appears only in the system prompt and after each tool-result batch, and 'padded-countdown' counts down over the whole session. Defaults to on. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_AFTER_USER_TURN overrides; server-controlled via GrowthBook tengu_lapis_anchor_user_turn."), autoMemoryEnabled: () => v().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."), autoMemoryDirectory: () => h().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."), ...false, autoDreamEnabled: () => v().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."), showThinkingSummaries: () => v().optional().describe("Request API-side thinking summaries and show them in the conversation and in the transcript view (ctrl+o). Set explicitly to override the default for your install."), skipDangerousModePermissionPrompt: () => v().optional().describe("Whether the user has accepted the bypass permissions mode dialog"), skipWorkflowUsageWarning: () => v().optional().describe("@internal Whether the user has accepted the multi-agent workflow usage warning. Until set, auto permission mode prompts before running a workflow."), disableAutoMode: () => K(["disable"]).optional().describe("Disable auto mode"), remoteTools: () => O({ allowUnattendedServing: v().optional().describe("@internal When false in managed or user settings, a cloud session in auto mode may not run commands on this computer without a person approving each one, whatever consent the computer has given; a project, local or --settings value is ignored. Default: true.") }).optional().describe("@internal How this computer serves tool calls to cloud sessions"), sshConfigs: () => k(O({ id: h().describe("Unique identifier for this SSH config. Used to match configs across settings sources."), name: h().describe("Display name for the SSH connection"), sshHost: h().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'), sshPort: Y().int().optional().describe("SSH port (default: 22)"), sshIdentityFile: h().optional().describe("Path to SSH identity file (private key)"), startDirectory: h().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.") })).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."), sshHostCommands: () => me().meta({ type: "array" }).optional().describe("SSH connections in Claude Desktop whose host comes from a command. A list of entries, each with `id`, `name` and `command`, and optionally `sshIdentityFile` and `startDirectory`. Desktop runs `command` on this computer when you create the connection or another host for it, not each time you connect. `command` is a program name or absolute path (single-quote a path with spaces), then plain arguments. Nothing else can be quoted. For pipes, variables or a leading `~`, use a script. On Windows, the program must be a full path from a drive letter, such as `C:/tools/acme.exe`, ending in `.exe`, `.cmd` or `.bat`. Quoted paths and Windows need Claude Desktop v4.16336.0 or later. The command must print only the host on standard output: `host` or `user@host` on one line, or a JSON object with `sshHost` and, optionally, `sshPort` and `startDirectory`. Desktop reads this key only from user settings and from this computer's managed settings. Claude Code itself does not use it."), claudeMd: () => h().optional().describe("CLAUDE.md-style instructions injected as organization-managed memory. Only honored from managed/policy settings."), claudeMdExcludes: () => k(h()).optional().describe('Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'), pluginTrustMessage: () => h().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").'), theme: () => ie([K($Y), h().startsWith("custom:").transform((o) => o)]).optional().catch(void 0).describe("Color theme for the UI"), editorMode: () => K(UY).optional().catch(void 0).describe("Key binding mode for the prompt input"), keybindingFlavor: () => K(["classic", "readline"]).optional().catch(void 0).describe("Deprecated: no longer has any effect. The prompt's word-editing keys always follow Bash (readline) conventions."), vimInsertModeRemaps: () => q(h(), me()).optional().catch(void 0).describe('Vim INSERT-mode key-sequence remaps, e.g. {"jj": "<Esc>"}. Each key is exactly two printable characters typed in sequence; "<Esc>" (return to NORMAL mode) is the only supported target. Applies when editorMode is "vim".'), verbose: () => v().optional().describe("Show full tool output instead of truncated summaries"), preferredNotifChannel: () => K(NY).optional().catch(void 0).describe("Preferred OS notification channel"), autoCompactEnabled: () => v().optional().describe("Automatically compact conversation when context fills"), precomputeCompactionEnabled: () => v().optional().describe("Precompute the compaction summary in the background before it is needed. Only applies when auto-compact is on."), idleCompaction: () => v().optional().describe("Set to false to stop Claude Code from compacting a long conversation while the session is idle. Defaults to true."), switchModelsOnFlag: () => v().optional().describe("When safeguards flag a message, automatically switch to a different model to keep chatting. When off, your session will pause instead."), autoContinueAtUsageLimit: () => v().optional().describe("When a claude.ai usage limit stops your session, wait for the limit to reset and continue the task automatically. When off, the limit dialog offers the wait as a choice instead."), autoScrollEnabled: () => v().optional().describe("Auto-scroll the conversation view to bottom (fullscreen mode only)"), wheelScrollAccelerationEnabled: () => v().optional().describe("Ramp mouse-wheel scroll speed during fast scrolls (fullscreen mode only)"), fileCheckpointingEnabled: () => v().optional().describe("Snapshot files before edits so /rewind can restore them"), showTurnDuration: () => v().optional().describe('Show "Cooked for Nm Ns" after each assistant turn'), showMessageTimestamps: () => v().optional().describe("Stamp each message with its arrival time"), terminalProgressBarEnabled: () => v().optional().describe("Emit OSC 9;4 progress sequences during long operations"), todoFeatureEnabled: () => v().optional().describe("Enable the todo / task tracking panel"), teammateMode: () => K(HY).optional().catch(void 0).describe("How spawned teammates execute (tmux, iterm2, in-process, auto)"), remoteControlAtStartup: () => v().optional().describe("Start Remote Control bridge automatically each session"), remoteControl: () => O({ shareHostProfile: K(xy).optional().catch(void 0).describe("@internal What a Remote Control environment reports about this machine when it registers: 'off' reports nothing, 'basic' the OS, architecture and detected developer tools, 'full' also the names of MCP servers configured on this machine (never a repository's .mcp.json). When unset, the level comes from the feature rollout, which may be any of the three. Managed, --settings and user settings choose the level (the most restrictive wins); project and local settings can only lower it, never raise it. Read when Remote Control starts; lowering it later applies from the next registration, raising it from the next start.") }).optional().describe("@internal Remote Control (`claude remote-control`) options"), isolatePeerMachines: () => v().optional().describe("Require explicit approval before SendMessage can reach a peer session on another machine via Remote Control"), daemonColdStart: () => K(["transient", "ask"]).optional().describe("When no background service is running: 'transient' spawns one for this login session; 'ask' offers to install it persistently"), crossSessionInbound: () => K(of).optional().catch(void 0).describe("Inbound cross-session peer messages (SendMessage from your other sessions): 'accept' delivers them, 'hold' parks them for your review without letting Claude act, 'refuse' opts this session out. An explicit value always wins. Unset (mode parity): a message auto-delivers only when the sending session's permission-mode class matches yours (bypass\u2194bypass or prompting\u2194prompting); a mismatched sender's message is held for your approval; a sender that asserts no class is held only while this session bypasses permission prompts."), autoUploadSessions: () => v().optional().describe("Mirror local sessions to claude.ai as view-only (no remote control)"), inputNeededNotifEnabled: () => v().optional().describe("Push to mobile when a permission prompt or question is waiting"), agentPushNotifEnabled: () => v().optional().describe("Allow Claude to push proactive mobile notifications"), ...K_(EZ(e10), (o) => () => o) };
24296
+ }, attributionProject: () => h().optional().describe(`The claude.ai Project this session names for your organization's usage reports: the Project's ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. An empty string names none and stops lower-precedence files from naming one; the organization default still applies. Sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT.`), attributionProjectPolicy: () => O({ default: h().optional().describe('The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project.') }).optional().describe("Your organization's default for attributionProject. Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json); ignored in user, project, local and --settings sources."), includeCoAuthoredBy: () => v().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"), ...false, ...false, includeGitInstructions: () => v().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"), permissions: () => or(() => BZ(e10)).describe("Tool usage permissions configuration"), model: () => h().optional().describe("Override the default model used by Claude Code"), fallbackModel: () => k(h()).optional().describe('Fallback model(s) tried in order when the primary model is overloaded or unavailable. Each element accepts a model name or alias; "default" expands to the default model. CLI --fallback-model takes precedence.'), availableModels: () => k(h()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows that version and any model ID that extends it, so "claude-opus-5" also allows "claude-opus-5-5"), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'), enforceAvailableModels: () => v().optional().describe("When true and availableModels is a non-empty array, the Default model selection is also constrained: if the default model for the user tier is not in availableModels, Default resolves to the first allowed availableModels entry instead. Has no effect when availableModels is unset or an empty array. Typically set in managed settings by enterprise administrators."), availableModelsMatch: () => K(["prefix", "exact"]).optional().describe('How availableModels entries match model IDs. "prefix" (the default) lets an entry also allow any model ID that extends it, so "claude-opus-5" allows "claude-opus-5-5". "exact" keeps that matching but stops a model ID entry from allowing other versions: "claude-opus-5" allows Opus 5 and its dated and -fast IDs, but not Opus 5.5 or a later release until it is listed, and a -latest ID needs a -latest entry. Family aliases ("opus") still allow the whole family; aliases whose model depends on the release or settings (best, opusplan, default) are ignored. With "exact" and a list that names at least one model, the Default option also uses only a listed model; if none can be used, Claude Code will not start. Haiku background models, and hooks and other helper requests that pick their own model, are not restricted (deniedModels covers them; allowManagedHooksOnly limits hooks). Read from managed settings only.'), deniedModels: () => k(h()).optional().describe('Models users cannot select, even when availableModels allows them. A family alias ("opus") blocks that family. A model ID blocks that version in every spelling: dates, -fast and provider prefixes are ignored, so "claude-opus-5-5" blocks every Opus 5.5 ID but not Opus 5. An ID with no minor version ("claude-opus-5") also blocks later minor versions, as it allows them in availableModels. Aliases whose model depends on the release or settings (best, opusplan, default) are ignored. The Default option steps down past a blocked model; if the Default has no allowed model to step down to, Claude Code will not start. Read from managed settings only.'), modelOverrides: () => q(h(), h()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'), modelPicker: () => O({ options: k(lx()).describe("Rows to show in the /model picker, in order."), replaceBuiltInOptions: v().optional().describe("When true, the picker shows only the Default row and these options \u2014 the built-in lineup, gateway-discovered models and ANTHROPIC_CUSTOM_MODEL_OPTION are hidden. When false or unset, these options are added after the built-in lineup.") }).optional().describe("Curate the /model picker: an ordered list of models with your own labels, independent of the built-in lineup and of Claude Code releases. availableModels still applies to these rows. Honored from managed, --settings/SDK, and user settings only (not from a project checkout); the highest-precedence of those that defines modelPicker wins outright (no merging across sources). Typically set in managed settings by enterprise administrators."), modelPricing: () => O({ multiplier: ax(), overrides: q(h(), ix()).optional() }).optional().describe(`Price usage at your organization's contracted rates instead of list price. Affects every spend figure Claude Code reports \u2014 /cost, the status line, the SDK total_cost_usd, --max-budget-usd, and the OpenTelemetry cost metric and events \u2014 which remain USD estimates, not an invoice (the per-Mtok price labels in /model stay at list). "overrides" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, cacheWrite \u2014 all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. A key Claude Code itself uses for a built-in model \u2014 its ID such as "claude-sonnet-4-6", or its first-party, Bedrock (any or no region prefix), Vertex or Foundry ID \u2014 covers every dated and provider form of that model; any other key \u2014 a gateway model alias, or a spelling Claude Code does not itself use \u2014 matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. "multiplier" in (0, 10] scales every computed cost, overridden or not (0.85 = 85% of the price, 1.2 = 120%). Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json), or \u2014 when none of those sets it \u2014 when supplied by a host application that manages the model provider; ignored in user, project, local and --settings sources.`), ...false, enableAllProjectMcpServers: () => v().optional().describe("Whether to automatically approve all MCP servers in the project"), enabledMcpjsonServers: () => k(h()).optional().describe("List of approved MCP servers from .mcp.json"), disabledMcpjsonServers: () => k(h()).optional().describe("List of rejected MCP servers from .mcp.json"), disableClaudeAiConnectors: () => v().optional().describe("When true in any settings source, claude.ai MCP cloud connectors are not auto-fetched or connected, and a claudeai-proxy server passed explicitly (e.g. via --mcp-config or the SDK mcpServers option) does not connect either. Any-source-true wins: a project can opt out, but a project-level false cannot override a user-level true."), skillOverrides: () => q(h(), K(["on", "name-only", "user-invocable-only", "off"])).optional().describe('Per-skill listing overrides keyed by skill name. "name-only" lists the skill without its description; "user-invocable-only" hides it from the model but keeps /name; "off" hides it from both. Absent = on.'), disableBundledSkills: () => v().optional().describe("Disable the skills and workflows that ship with Claude Code: bundled skills and workflows are removed entirely; built-in slash commands stay typable but are hidden from the model. Plugins, .claude/skills/, and .claude/commands/ are unaffected. Equivalent to CLAUDE_CODE_DISABLE_BUNDLED_SKILLS=1."), managedMcpServers: () => or(() => q(h().refine(hv, { error: fy }), _v(), { error: yv })).describe(`MCP servers the organization provides to every user, keyed by server name, each with the .mcp.json entry shape; only "http" and "sse" servers are accepted (nothing that names a program to run, no \${VAR} references). Honored from managed settings only; users cannot remove them, deniedMcpServers still applies, and they need no allowedMcpServers entry. Not read in Claude Desktop's Code tab on a third-party deployment or in Cowork sessions, where Claude Desktop supplies and locks the session's MCP servers itself.`), allowedMcpServers: () => or(() => k(ky())).describe("Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries with no ${VAR} in their command, args, url or header values) are allowed without being listed; a managed-mcp.json entry with ${VAR} in any of those must match this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied."), deniedMcpServers: () => or(() => k(Py())).describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."), hooks: () => or(() => wa()).describe("Custom commands to run before/after tool executions"), worktree: () => O({ symlinkDirectories: k(h()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'), sparsePaths: k(h()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). Dramatically faster in large monorepos \u2014 only the listed paths are written to disk."), baseRef: K(["fresh", "head"]).optional().describe("Which ref new worktrees branch from. 'fresh' (default) branches from origin/<default-branch> for a clean tree. 'head' branches from your current local HEAD so unpushed commits and feature-branch state are present. Applies to --worktree, EnterWorktree, and agent isolation."), bgIsolation: K(["worktree", "none"]).optional().catch(void 0).describe("Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly."), location: h().optional().catch(void 0).describe("Directory under which Claude Code Desktop creates the worktrees of SSH sessions that run on this machine (an absolute path or one starting with ~/), instead of <project>/.claude/worktrees. Read by the desktop app from the SSH host user settings; a location chosen in the desktop app's SSH connection settings takes precedence. The CLI (--worktree, EnterWorktree, agent isolation) does not read it yet.") }).optional().describe("Git worktree configuration: the CLI --worktree flag, EnterWorktree and agent isolation, plus the location Claude Code Desktop uses for SSH-session worktrees on this machine."), disableAllHooks: () => v().optional().describe("Disable all hooks and statusLine execution: the hooks defined in settings files and by installed plugins. Features built into Claude Code are not hooks in this sense and keep working; each has its own switch."), disableReplyCheck: () => v().optional().describe("Disable the reply check in Claude Tag sessions on a self-hosted runner. The check re-prompts Claude, at most four times a turn, when a turn ends without a call to one of Claude Tag's reply tools. It is not a hook, so disableAllHooks does not affect it. Disabling it also stops two messages to Claude that Anthropic's service can request for such a session: a nudge after a long stretch of work with no visible update, and a reminder added to prompts. Claude Code's built-in reminder to give progress updates, on models that have it, is then no longer held back. Set it in managed settings; false there keeps the check on. Everywhere else it is ignored and the check stays on. Has no effect on sessions that Anthropic hosts."), disableAgentView: () => v().optional().describe("Disable agent view (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENT_VIEW=1."), disableRemoteControl: () => v().optional().describe("Disable Remote Control (claude.ai/code, `claude remote-control`, `--remote-control`/`--rc`, auto-start, and the in-session toggle). Typically set in managed settings."), disableWorkflows: () => v().optional().describe("Disable the Workflows feature. Code Review on pull requests and /ultrareview run in Anthropic's cloud and are not stopped by this setting, except an /ultrareview that has to restart partway through. A machine that runs a review itself refuses it when that machine's own administrator set this, or CLAUDE_CODE_DISABLE_WORKFLOWS in an `env` block, in its managed settings (MDM, the managed-settings file or an administrator's policy helper). Set in the environment before Claude Code starts, CLAUDE_CODE_DISABLE_WORKFLOWS disables Workflows. Beyond the cases above it stops a review only when the review's own session starts with it set."), disableArtifact: () => v().optional().describe("Deprecated: use enableArtifact: false. Still honored \u2014 true disables the Artifact tool; false is ignored."), enableArtifact: () => v().optional().describe("Turn the Artifact tool on or off. Off in any of managed, --settings, or user settings wins; project and local settings can only turn it off. Unset defaults to on once the feature is available."), enableWorkflows: () => v().optional().describe("Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available."), workflowSizeGuideline: () => K(["unrestricted", "small", "medium", "large"]).optional().describe('Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium" fewer than 10, "large" fewer than 50, and "unrestricted" sends no guideline. Unset defaults to "medium", or "small" on Pro plans. A value here \u2014 including from managed settings \u2014 takes precedence over the "Dynamic workflow size" choice in /config, and that /config row is hidden while a settings file provides the key. This is a guideline, not an enforced limit.'), workflowKeywordTriggerEnabled: () => v().optional().describe('Enable the "ultracode" keyword trigger: including the keyword in a prompt opts that turn into the Workflow tool. Set to false to disable the trigger. Default: true.'), disableSkillShellExecution: () => v().optional().describe("Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run."), disableWindowsBashCommandSplit: () => v().optional().describe("Windows only. Set to true to keep every Bash command in a single argument to bash, so that endpoint security tools that match text in process command lines see it whole. Otherwise Claude Code may split a long command over several arguments. With true, a command of about 7,000 characters or more, or fewer if it is full of quotes, may reach bash cut short, and then usually fails with a syntax error. Only honored from managed settings; ignored in user, project, local and --settings sources."), defaultShell: () => K(["bash", "powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."), bashEditDiffEnabled: () => v().optional().describe("Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default: off, except in auto and bypassPermissions modes when the Bash tool handles file edits or the model's configuration turns it on. Only user, flag or policy settings can turn it on in other modes."), bashOutputMaxChars: () => Y().int().positive().optional().catch(void 0).describe("How many characters of a successful Bash or PowerShell command's output Claude receives inline (default 30000; values clamp to 4000-128000). Output past this is saved to a file and Claude receives a short preview plus the path. When set, this also replaces BASH_MAX_OUTPUT_LENGTH, which on its own only sizes the read-back window."), taskOutputMaxChars: () => Y().int().positive().optional().catch(void 0).describe("Deprecated: no longer has any effect (the TaskOutput tool was removed). Read a background task's output file with the Read tool instead."), respondToBashCommands: () => v().optional().describe("Whether Claude responds after an input-box ! bash command runs. Set to false to add the command output to context without a response. Default: true."), allowManagedHooksOnly: () => v().optional().describe("When true (and set in managed settings), only hooks from managed settings and from plugins that managed settings enable run. User, project, and local hooks and the hooks of plugins the user installed are ignored. Features built into Claude Code are not hooks in this sense and keep working."), allowedHttpHookUrls: () => k(h()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'), httpHookAllowedEnvVars: () => k(h()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."), allowManagedPermissionRulesOnly: () => v().optional().describe("When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins (in Claude Desktop, only while this is not set by the organization's own managed settings), the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name \u2014 unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched), and npm-direct (package@npm) plugins whose recorded resolution a registry-pinned managed npm strictKnownMarketplaces entry names (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. --disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply."), allowManagedMcpServersOnly: () => v().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."), allowAllClaudeAiMcps: () => v().optional().describe("When true (and set in managed settings), claude.ai cloud MCP connectors load alongside managed-mcp.json instead of being suppressed by its exclusive-control lockdown. Default off preserves the lockdown. Read from managed settings only."), allowClaudeInChromeWithManagedMcp: () => v().optional().describe("When true (and set in device managed settings: MDM, the managed-settings.json file, or a policy helper those configure), the built-in Claude in Chrome MCP server can run alongside managed-mcp.json instead of being blocked by its exclusive-control lockdown. deniedMcpServers and the organization's Claude in Chrome setting still block it. Default off preserves the lockdown."), strictPluginOnlyCustomization: () => qZ().optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. Composes with strictKnownMarketplaces for end-to-end admin control \u2014 plugins gated by marketplace allowlist, everything else blocked here.'), statusLine: () => O({ type: U("command"), command: h(), padding: Y().optional(), refreshInterval: Y().min(1).optional().catch(void 0).describe("Re-run the status line command every N seconds in addition to event-driven updates"), hideVimModeIndicator: v().optional().describe("Hide the built-in `-- INSERT --` / `-- VISUAL --` indicator below the prompt. Use this when your status line script renders `vim.mode` itself.") }).optional().describe("Custom status line display configuration"), prUrlTemplate: () => h().optional().describe('URL template for PR links in the footer link badges and inline messages. The detected git PR is rendered as the first footer-link badge. Placeholders: {host} {owner} {repo} {number} {url}. Example: "https://reviews.example.com/{owner}/{repo}/pull/{number}"'), footerLinksRegexes: () => k(K9e().catch(DZ)).transform((o) => o.filter((s) => s !== DZ)).optional().catch(void 0).describe("Extra clickable footer badges that appear when a regex matches turn output (tool results and assistant responses). Read from user, flag, and managed settings only; ignored in project .claude/settings.json and local .claude/settings.local.json. At most 5 badges render; the oldest is displaced by newer matches and /clear removes them. Use to surface IDs printed by project CLIs as session links."), subagentStatusLine: () => O({ type: U("command"), command: h() }).optional().describe("Custom per-subagent status line shown in the agent panel; receives row context as JSON on stdin"), enabledPlugins: () => q(h(), YZ()).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints. Settings precedence is user < project < local < flag < policy, so to disable a plugin that project settings enable, set it to false in .claude/settings.local.json \u2014 setting false in ~/.claude/settings.json is overridden by the project.'), prependPlugins: () => k(h()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins not listed here or in appendPlugins follow the listed ones; user, project and marketplace plugins come after those; then appendPlugins; then the built-in plugins. The bundled cc-plugin-sec-default@builtin seats itself outermost (on a machine with managed settings and for Team and Enterprise organizations) unless this list is set, in which case list it where it should sit or leave it out. Name it there as sec-default@builtin, the id every release reads, for as long as any machine in the organization may run a release from before its rename; a release that knows the new id reads either. Any other id that is not an enabled managed plugin is skipped; an id listed in both keys is prepended. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."), appendPlugins: () => k(h()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run last among plugins, innermost, in the listed order: the last id listed sits just above the built-in plugins and sees each event as every other plugin left it. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."), extraKnownMarketplaces: () => or(() => n("extraKnownMarketplaces")).describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."), additionalMarketplaces: () => or(() => n("additionalMarketplaces")).describe("Alias for extraKnownMarketplaces: this key is read exactly as if it were spelled extraKnownMarketplaces. Do not set both in one file \u2014 if both appear, this key is ignored with a warning. Claude Code may rewrite this key as extraKnownMarketplaces when it updates the file. Clients older than this alias ignore it, so prefer extraKnownMarketplaces while older Claude Code versions still share the same settings."), strictKnownMarketplaces: () => or(() => k(by())).describe('Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these sources can be added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to allow every repository under that owner. The check happens BEFORE downloading, so blocked sources never touch the filesystem. Note: this is a policy gate only \u2014 it does NOT register marketplaces. To pre-register allowed marketplaces for users, also set extraKnownMarketplaces.'), allowedMarketplaces: () => or(() => k(by())).describe("Alias for strictKnownMarketplaces (managed settings only): this key is read exactly as if it were spelled strictKnownMarketplaces. Do not set both in one file \u2014 if both appear, this key is ignored with a warning. Clients older than this alias ignore it, so keep using strictKnownMarketplaces when the allowlist must also bind older Claude Code versions."), blockedMarketplaces: () => or(() => k(Wv())).describe('Enterprise blocklist of marketplace sources. When set in managed settings, these sources are blocked from being added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to block every repository under that owner. The check happens BEFORE downloading, so blocked sources never touch the filesystem.'), disableCommandPluginSources: () => v().optional().describe("Controls the `command` plugin source, whose plugin directory is produced by running a marketplace-declared command on this machine. true: command-sourced plugins are never installed, updated, or re-resolved (the command never runs). false: explicitly allowed. Unset: follows allowManagedHooksOnly \u2014 an org that restricts hook execution to managed settings gets command sources disabled too. Only honored from managed settings."), ...false, disableSideloadFlags: () => v().optional().describe("When true (and set in managed settings), rejects the --plugin-dir, --plugin-url, --agents, and non-sdk --mcp-config CLI flags at startup. Closes the CLI-flag bypass of strictKnownMarketplaces. Pair with allowedMcpServers for per-server MCP control; this setting does not gate other MCP entry points (SDK setMcpServers, claude mcp add, .mcp.json). Also blocks surfaces that spawn the CLI with these flags internally (see settings documentation). Only honored from managed settings; ignored in user/project/local settings."), pluginSuggestionMarketplaces: () => k(h()).optional().describe("Marketplace names whose plugins may surface as contextual install suggestions (relevance-based tips). No marketplace-declared suggestions surface without this allowlist; the built-in tips for Anthropic's own plugins are unaffected. Only honored when set in managed settings (policy scope); the key is ignored in user, project, and local settings. A name only takes effect when the marketplace is registered on the machine AND its registered source is also declared in managed settings, either as the extraKnownMarketplaces entry for that name or as an entry of strictKnownMarketplaces. A marketplace registered from a different source under an allowlisted name is ignored. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source."), forceLoginMethod: () => K(["claudeai", "console", "gateway"]).optional().catch(void 0).describe('Force a specific login method: "claudeai" for a Claude subscription (individual, Team, or Enterprise plans), "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow'), forceLoginGatewayUrl: () => h().min(1).optional().catch(void 0).describe('Cloud gateway URL to pre-fill during login, alongside forceLoginMethod: "gateway". Honored from admin-controlled managed settings (MDM / managed-settings.json / policy helper) and, on a machine with none of those, from your own user settings; ignored in project, local, flag, and remote-delivered settings.'), gatewayInternalNetworks: () => k(h()).optional().catch([XZ]).meta({ default: void 0 }).describe("IPv4 CIDR blocks (at most 4, each /8 to /32, not overlapping) your Cloud gateway sits in: the public block your organization numbers its internal network from, which lets /login reach a gateway there. A block must lie entirely outside private space, where /login accepts a gateway without this key. /login accepts a gateway inside a listed block over a direct connection only, and only when this machine's own address on that connection is inside the same block, so /login must happen from a machine whose own address is inside the block (not through a proxy, VPN pool, container or NAT segment outside it). A bar against copied settings files, not proof of location. Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings."), parentSettingsBehavior: () => K(["first-wins", "merge"]).optional().describe(`Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (the default, except in a gateway session Claude Desktop's Code tab launched, where "merge" is): parent is dropped \u2014 admin tiers are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).`), managedSourcesBehavior: () => K(["first-wins", "merge"]).optional().describe(`Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed precedence server-managed > MDM > managed-settings.json \u2014 scalars take the highest source's value (a restrictive boolean or enum \u2014 the allowManaged*Only locks, the disable* switches, the sandbox lock family \u2014 takes the strictest value any source sets) and arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, allowedProviders, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). In both modes, a forceLoginOrgUUID, or a forceLoginMethod of claudeai or console, that this machine's own MDM policy or managed settings file sets applies ahead of server-managed settings. Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge.`), forceLoginOrgUUID: () => ie([h(), k(h())]).optional().describe("Organization UUID to require for OAuth login. Accepts a single UUID string or an array of UUIDs (any one is permitted). When set in managed settings, login fails if the authenticated account does not belong to a listed organization."), allowedProviders: () => Me((o) => Array.isArray(o) ? o.filter(Ev) : o, k(K(Zp))).optional().catch(void 0).describe(`Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the Anthropic API or a cloud provider's API sent to some other host \u2014 ANTHROPIC_BASE_URL, that provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] \u2014 such as an LLM gateway; admitted only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set only in the admin console reaches only sessions that fetch your server-managed settings \u2014 not a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max/Ultra login, --bare without an API key, or a first launch before the fetch lands \u2014 all conditions the user controls. Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".`), ...false, forceRemoteSettingsRefresh: () => v().optional().describe("When set in managed settings, the CLI blocks startup until remote managed settings are freshly fetched, and exits if the fetch fails"), otelHeadersHelper: () => h().optional().describe("Path to a script that outputs OpenTelemetry headers"), outputStyle: () => h().optional().describe("Controls the output style for assistant responses"), viewMode: () => K(["default", "verbose", "focus"]).optional().catch(void 0).describe("Default transcript view mode on startup"), language: () => h().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'), skipWebFetchPreflight: () => v().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"), sandbox: () => or(() => sv()), ...false, feedbackSurveyRate: () => Y().min(0).max(1).optional().describe("Probability (0\u20131) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."), feedbackDrafts: () => K(["notify", "quiet", "off"]).optional().describe('Model-drafted feedback (the SendFeedback tool). "notify" (default) shows a one-line notice when a draft is queued; "quiet" shows only the footer counter; "off" disables the tool entirely so drafts are never queued.'), spinnerTipsEnabled: () => v().optional().describe("Whether to show tips in the spinner"), spinnerVerbs: () => O({ mode: K(["append", "replace"]), verbs: k(h()) }).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'), spinnerTipsOverride: () => O({ excludeDefault: v().optional().catch(void 0), tips: _9e().optional(), tipsFile: h().optional().catch(void 0).describe("Absolute or ~/ local path to a JSON file holding an array of tips (same shapes as `tips`); honored from user, --settings and on-disk managed settings only. Read once per CLI process (restart to pick up edits)."), label: h().optional().catch(void 0).describe('Prefix shown before your tips in the spinner (default "Tip")') }).passthrough().optional().catch(void 0).describe("Add your organization's own tips to the spinner tip rotation. tips: strings or {id, text, cooldownSessions?, priority?} objects; tipsFile: a JSON file of the same; label: prefix shown before your tips; excludeDefault: if true, only show your tips (default: false)."), syntaxHighlightingDisabled: () => v().optional().describe("Whether to disable syntax highlighting in diffs"), maxProseWidth: () => Y().int().min(40).optional().catch(void 0).describe("Maximum width, in terminal columns, of the prose in Claude's responses (paragraphs, headings, lists, blockquotes). In a wider terminal the prose wraps at this width while tables and code blocks keep the full width; only the display wraps, the response text itself gains no line breaks. Minimum 40. Unset (the default) uses the full terminal width."), spellcheck: () => O({ enabled: v().optional().catch(void 0).describe("Turn on spell checking of the prompt input (default: false)"), checker: h().optional().catch(void 0).describe(`Which spell checker to run: ${Ay.map((o) => `"${o}"`).join(", ")}, or "auto" (default) for the first of those found on PATH`), language: h().optional().catch(void 0).describe(`Dictionary to use, passed to the checker as-is (aspell --lang, hunspell -d, ispell -d), e.g. "en_GB"; names are checker-specific (letters, digits and _ - . , only). Default: the checker's own default`), color: h().optional().catch(void 0).describe(`Color of misspelled words (they are also underlined): a terminal color name such as "red" or "magenta", "#rrggbb", "rgb(r,g,b)", "ansi256(n)" or "ansi:<name>". Default: the theme's error color`) }).passthrough().optional().catch(void 0).describe(`Underline misspelled words in the prompt input as you type, using an installed ${Ay.slice(0, -1).join(", ")} or ${Ay.at(-1)} (off unless "enabled" is true; does nothing if none is installed). Read from user, flag and managed settings only (the whole block from the highest-precedence of those applies); ignored in project .claude/settings.json and .claude/settings.local.json.`), terminalTitleFromRename: () => v().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."), promptCacheTtl: () => K(fl).optional().catch(void 0).describe('Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it): "5m" or "1h". Unset = automatic: 1 hour on a Claude subscription within its usage limits, 5 minutes on an API key, Bedrock, Vertex or Foundry. 1-hour cache writes are billed at a higher rate; the cache stays warm across longer breaks. The CLAUDE_CODE_PROMPT_CACHE_TTL environment variable takes precedence.'), subagentPromptCacheTtl: () => K(fl).optional().catch(void 0).describe('Prompt cache TTL for everything outside the main conversation \u2014 subagents, workflows, background and helper requests: "5m" or "1h". Unset = automatic (5 minutes unless ENABLE_PROMPT_CACHING_1H=1). The CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL environment variable takes precedence.'), alwaysThinkingEnabled: () => v().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."), effortLevel: () => K(["low", "medium", "high", "xhigh"]).optional().catch(void 0).describe("Persisted effort level for supported models."), maxEffortLevel: () => K(Fp).optional().catch(void 0).describe("Maximum effort level. Anything above it (an /effort or /model pick, --effort, CLAUDE_CODE_EFFORT_LEVEL, a model default) is clamped to it, on every provider including Bedrock, Vertex and Foundry. Combines with an organization's per-model effort cap by taking the lower of the two; across settings files the lowest value wins, and modelSettings.<model>.maxEffortLevel replaces it per model. Enforced client-side: an effort supplied through CLAUDE_CODE_EXTRA_BODY is not clamped."), modelSettings: () => Me((o) => typeof o === "object" && o !== null && !Array.isArray(o) ? ba(o, (s, i) => Object.hasOwn(Object.prototype, i)) : o, q(h(), O({ effortLevel: K(["low", "medium", "high", "xhigh"]).optional().catch(void 0).describe("Persisted effort level for this model."), maxEffortLevel: K(Fp).optional().catch(void 0).describe('Maximum effort level for this model. Within one settings file it replaces the top-level maxEffortLevel for the model ("max" exempts it); across settings files the lowest applicable value wins. Keyed like effortLevel: the canonical model name also matches its dated, [1m], Bedrock and Vertex spellings.'), autoCompactWindow: ie([U("auto"), LZ()]).describe('Auto-compact window for this model, in tokens (100000 to 1000000), or "auto" for the window tuned for the model. Within one settings file it replaces the top-level autoCompactWindow for the model. /autocompact saves here. The canonical model name as key also matches its dated, [1m], Bedrock and Vertex spellings.') }).passthrough().optional().catch(void 0))).optional().catch(void 0).describe("Per-model settings keyed by canonical model name."), ultracode: () => v().optional().catch(void 0).describe("Enable ultracode for the session: standing dynamic-workflow orchestration at any effort level. Session-scoped \u2014 typically provided via --settings or the apply_flag_settings control request; interactive toggles never persist it. Requires workflows to be enabled and a model that supports ultracode."), autoCompactWindow: () => LZ().describe("Auto-compact window size"), ...false, advisorModel: () => h().optional().describe("Advisor model for the server-side advisor tool."), fastMode: () => v().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off. On Vertex a saved value is ignored: use /fast each session."), fastModePerSessionOptIn: () => v().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."), promptSuggestionEnabled: () => v().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."), emojiCompletionEnabled: () => v().optional().describe("When false, the :emoji: shortcode typeahead (the suggestion popup and the :name: inline replacement) is disabled. When absent or true, it is enabled."), awaySummaryEnabled: () => v().optional().describe("@internal When false, the session recap (shown when you return after being away for 5+ minutes) is disabled. When absent or true, recap is enabled. Hidden from public SDK types until external launch."), responseComparisonEnabled: () => v().optional().describe("@internal Set to false to stop Claude Code from showing two answers to one message and asking which is better. When absent or true, it may do so on some turns. Hidden from public SDK types until external launch."), showClearContextOnPlanAccept: () => v().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'), askUserQuestionTimeout: () => K(["60s", "5m", "10m", "never"]).optional().catch(void 0).describe("Idle time before Claude's questions auto-continue with any answers selected so far. Defaults to never \u2014 auto-continue only runs when explicitly set to 60s/5m/10m."), dialogExpiry: () => K(["60s", "5m", "10m", "never"]).optional().catch(void 0).describe('Max time a permission/user dialog forwarded to a remote client stays parked awaiting an answer, and how long a HELD cross-session message awaits approval, before either resolves to its safe no-action default (cancelled / dropped-with-denial). Defaults to 5m to match the long-standing remote-dialog deadline; "never" disables the deadline. Local-only permission prompts (no remote client) are unaffected. The CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS env var, when set, overrides this. Read from trusted sources only (never a checked-in repo settings file).'), agent: () => h().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."), modelProposedGoals: () => K(zY).optional().catch(void 0).describe("@internal Controls the ProposeGoal tool (model-proposed session goals). 'auto' (the default when absent) lets the model choose per proposal whether to ask for approval via its ask_user parameter; 'alwaysAsk' routes every model-proposed goal through the approval dialog; 'disabled' turns the tool off. A typed /goal is unaffected. Consent-affecting, so it is read from trusted sources only (user/policy/flag) \u2014 workspace-resident project and local settings are ignored."), companyAnnouncements: () => k(h()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"), pluginConfigs: () => q(h(), O({ mcpServers: q(h(), q(h(), ie([h(), Y(), v(), k(h())]))).optional().describe("User configuration values for MCP servers keyed by server name"), options: q(h(), ie([h(), Y(), v(), k(h())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.") }).or(fO())).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"), remote: () => O({ defaultEnvironmentId: h().optional().describe("Default environment ID to use for cloud sessions") }).optional().describe("Cloud session configuration"), autoUpdatesChannel: () => K(["latest", "stable", "rc"]).optional().describe("Release channel for auto-updates (latest or stable)"), minimumVersion: () => h().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"), requiredMinimumVersion: () => h().optional().describe("Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup with instructions to update. Only enforced from managed (policy) settings."), requiredMaximumVersion: () => h().optional().describe("Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup with instructions to install an approved version. Only enforced from managed (policy) settings."), plansDirectory: () => h().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"), tui: () => K(["default", "fullscreen"]).optional().describe('Terminal UI renderer. "fullscreen" uses the flicker-free alt-screen renderer with virtualized scrollback (equivalent to CLAUDE_CODE_NO_FLICKER=1). "default" uses the classic main-screen renderer.'), ...false, voice: () => O({ enabled: v().optional(), mode: K(["hold", "tap"]).optional().describe("'hold' (default): hold to talk. 'tap': tap to start, tap to stop+submit."), autoSubmit: v().optional().describe("Submit the prompt when hold-to-talk is released (hold mode only)") }).optional().describe("Voice mode settings (hold-to-talk / tap-to-toggle dictation)"), channelsEnabled: () => v().optional().describe("Managed-org opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). claude.ai Teams/Enterprise: default off. Console: default on unless managed settings exist. Set true to allow; users then select servers via --channels."), allowedChannelPlugins: () => k(jZ()).optional().describe("Managed-org allowlist of channel plugins. When set, replaces the default Anthropic allowlist \u2014 admins decide which plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."), prefersReducedMotion: () => v().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"), timeFormat: () => ie([K(FY), h()]).optional().describe('Clock format for times shown in the UI: "auto" (default, follows the locale), "12-hour", "24-hour", "24-hour-utc" ("18:05Z"), or a strftime pattern such as "%H:%M" (any value containing "%"; other values read as "auto"). A pattern replaces the time everywhere; message timestamps show only the pattern, so include %Y-%m-%d for the date. /config offers the presets; a pattern is set here.'), timeZone: () => h().optional().describe('IANA time zone for times shown in the UI, e.g. "UTC" or "Europe/Dublin". Default: the system time zone. An unknown name falls back to the system time zone.'), doneMeansMerged: () => v().optional().describe("@internal When true, Claude keeps working until the PR is ready for you to merge, a cron/Monitor is armed to resume later, or it hands you a self-contained next step."), totalTokensReminder: () => K(["off", "infinite", "fixed", "countdown", "padded-countdown"]).optional().describe("@internal Emit a <total_tokens>N tokens left</total_tokens> block in the system prompt, after each tool result, and (when totalTokensReminderAfterUserTurn is on) after each regular user prompt. 'infinite' uses the literal value Infinite, 'fixed' uses 5000000, 'countdown' uses the live remaining context-window tokens, 'padded-countdown' counts down from totalTokensReminderBudget (re-anchoring to the full budget on each regular user prompt when totalTokensReminderAfterUserTurn is on \u2014 task-budget semantics). Defaults to padded-countdown for a model with the total_tokens_reminder capability, else off. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER overrides."), totalTokensReminderBudget: () => Y().int().positive().optional().describe("@internal Starting budget (tokens) for totalTokensReminder 'padded-countdown' mode. Defaults to 15000000. Server-controlled via GrowthBook; env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET overrides."), totalTokensReminderAfterUserTurn: () => v().optional().describe("@internal When true, emit the totalTokensReminder block after each regular user prompt and (for 'padded-countdown') re-anchor the task budget to the full configured value at the start of each user turn. When false, the reminder appears only in the system prompt and after each tool-result batch, and 'padded-countdown' counts down over the whole session. Defaults to on. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_AFTER_USER_TURN overrides; server-controlled via GrowthBook tengu_lapis_anchor_user_turn."), autoMemoryEnabled: () => v().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."), autoMemoryDirectory: () => h().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."), ...false, autoDreamEnabled: () => v().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."), showThinkingSummaries: () => v().optional().describe("Request API-side thinking summaries and show them in the conversation and in the transcript view (ctrl+o). Set explicitly to override the default for your install."), skipDangerousModePermissionPrompt: () => v().optional().describe("Whether the user has accepted the bypass permissions mode dialog"), skipWorkflowUsageWarning: () => v().optional().describe("@internal Whether the user has accepted the multi-agent workflow usage warning. Until set, auto permission mode prompts before running a workflow."), disableAutoMode: () => K(["disable"]).optional().describe("Disable auto mode"), remoteTools: () => O({ allowUnattendedServing: v().optional().describe("@internal When false in managed or user settings, a cloud session in auto mode may not run commands on this computer without a person approving each one, whatever consent the computer has given; a project, local or --settings value is ignored. Default: true.") }).optional().describe("@internal How this computer serves tool calls to cloud sessions"), sshConfigs: () => k(O({ id: h().describe("Unique identifier for this SSH config. Used to match configs across settings sources."), name: h().describe("Display name for the SSH connection"), sshHost: h().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'), sshPort: Y().int().optional().describe("SSH port (default: 22)"), sshIdentityFile: h().optional().describe("Path to SSH identity file (private key)"), startDirectory: h().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.") })).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."), sshHostCommands: () => me().meta({ type: "array" }).optional().describe("SSH connections in Claude Desktop whose host comes from a command. A list of entries, each with `id`, `name` and `command`, and optionally `sshIdentityFile` and `startDirectory`. Desktop runs `command` on this computer when you create the connection or another host for it, not each time you connect. `command` is a program name or absolute path (single-quote a path with spaces), then plain arguments. Nothing else can be quoted. For pipes, variables or a leading `~`, use a script. On Windows, the program must be a full path from a drive letter, such as `C:/tools/acme.exe`, ending in `.exe`, `.cmd` or `.bat`. Quoted paths and Windows need Claude Desktop v4.16336.0 or later. The command must print only the host on standard output: `host` or `user@host` on one line, or a JSON object with `sshHost` and, optionally, `sshPort` and `startDirectory`. Desktop reads this key only from user settings and from this computer's managed settings. Claude Code itself does not use it."), claudeMd: () => h().optional().describe("CLAUDE.md-style instructions injected as organization-managed memory. Only honored from managed/policy settings."), claudeMdExcludes: () => k(h()).optional().describe('Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'), pluginTrustMessage: () => h().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").'), theme: () => ie([K($Y), h().startsWith("custom:").transform((o) => o)]).optional().catch(void 0).describe("Color theme for the UI"), editorMode: () => K(UY).optional().catch(void 0).describe("Key binding mode for the prompt input"), keybindingFlavor: () => K(["classic", "readline"]).optional().catch(void 0).describe("Deprecated: no longer has any effect. The prompt's word-editing keys always follow Bash (readline) conventions."), vimInsertModeRemaps: () => q(h(), me()).optional().catch(void 0).describe('Vim INSERT-mode key-sequence remaps, e.g. {"jj": "<Esc>"}. Each key is exactly two printable characters typed in sequence; "<Esc>" (return to NORMAL mode) is the only supported target. Applies when editorMode is "vim".'), verbose: () => v().optional().describe("Show full tool output instead of truncated summaries"), preferredNotifChannel: () => K(NY).optional().catch(void 0).describe("Preferred OS notification channel"), autoCompactEnabled: () => v().optional().describe("Automatically compact conversation when context fills"), precomputeCompactionEnabled: () => v().optional().describe("Precompute the compaction summary in the background before it is needed. Only applies when auto-compact is on."), idleCompaction: () => v().optional().describe("Set to false to stop Claude Code from compacting a long conversation while the session is idle. Defaults to true."), switchModelsOnFlag: () => v().optional().describe("When safeguards flag a message, automatically switch to a different model to keep chatting. When off, your session will pause instead."), autoContinueAtUsageLimit: () => v().optional().describe("When a claude.ai usage limit stops your session, wait for the limit to reset and continue the task automatically. When off, the limit dialog offers the wait as a choice instead."), autoScrollEnabled: () => v().optional().describe("Auto-scroll the conversation view to bottom (fullscreen mode only)"), wheelScrollAccelerationEnabled: () => v().optional().describe("Ramp mouse-wheel scroll speed during fast scrolls (fullscreen mode only)"), fileCheckpointingEnabled: () => v().optional().describe("Snapshot files before edits so /rewind can restore them"), showTurnDuration: () => v().optional().describe('Show "Cooked for Nm Ns" after each assistant turn'), showMessageTimestamps: () => v().optional().describe("Stamp each message with its arrival time"), terminalProgressBarEnabled: () => v().optional().describe("Emit OSC 9;4 progress sequences during long operations"), todoFeatureEnabled: () => v().optional().describe("Enable the todo / task tracking panel"), teammateMode: () => K(HY).optional().catch(void 0).describe("How spawned teammates execute (tmux, iterm2, in-process, auto)"), remoteControlAtStartup: () => v().optional().describe("Start Remote Control bridge automatically each session"), remoteControl: () => O({ shareHostProfile: K(xy).optional().catch(void 0).describe("@internal What a Remote Control environment reports about this machine when it registers: 'off' reports nothing, 'basic' the OS, architecture and detected developer tools, 'full' also the names of MCP servers configured on this machine (never a repository's .mcp.json). When unset, the level comes from the feature rollout, which may be any of the three. Managed, --settings and user settings choose the level (the most restrictive wins); project and local settings can only lower it, never raise it. Read when Remote Control starts; lowering it later applies from the next registration, raising it from the next start.") }).optional().describe("@internal Remote Control (`claude remote-control`) options"), isolatePeerMachines: () => v().optional().describe("Require explicit approval before SendMessage can reach a peer session on another machine via Remote Control"), daemonColdStart: () => K(["transient", "ask"]).optional().describe("When no background service is running: 'transient' spawns one for this login session; 'ask' offers to install it persistently"), crossSessionInbound: () => K(of).optional().catch(void 0).describe("Inbound cross-session peer messages (SendMessage from your other sessions): 'accept' delivers them, 'hold' parks them for your review without letting Claude act, 'refuse' opts this session out. An explicit value always wins. Unset (mode parity): a message auto-delivers only when the sending session's permission-mode class matches yours (bypass\u2194bypass or prompting\u2194prompting); a mismatched sender's message is held for your approval; a sender that asserts no class is held only while this session bypasses permission prompts."), autoUploadSessions: () => v().optional().describe("Mirror local sessions to claude.ai as view-only (no remote control)"), inputNeededNotifEnabled: () => v().optional().describe("Push to mobile when a permission prompt or question is waiting"), agentPushNotifEnabled: () => v().optional().describe("Allow Claude to push proactive mobile notifications"), ...K_(EZ(e10), (o) => () => o) };
24297
24297
  }
24298
24298
  function dx(e10, t = {}) {
24299
24299
  let n = ZZ(e10, t);
@@ -27306,7 +27306,7 @@ var fS = class _fS {
27306
27306
  let e10 = performance.now(), t = /* @__PURE__ */ new Map(), n = false, r = async (p, f) => {
27307
27307
  try {
27308
27308
  if (await this.sdkMcpServers.get(p)?.connection, n) return;
27309
- let m = await this.handleMcpControlRequest(p, { server_name: p, message: { jsonrpc: "2.0", id: pS + "initialize", method: "initialize", params: { protocolVersion: jJ, capabilities: $J, clientInfo: { ...zJ, version: "0.3.321" } } } }, f);
27309
+ let m = await this.handleMcpControlRequest(p, { server_name: p, message: { jsonrpc: "2.0", id: pS + "initialize", method: "initialize", params: { protocolVersion: jJ, capabilities: $J, clientInfo: { ...zJ, version: "0.3.322" } } } }, f);
27310
27310
  if (n) return;
27311
27311
  if (!("result" in m)) {
27312
27312
  G(`[Query.captureSdkMcpServerManifests] '${p}' answered initialize with an error; leaving it to the CLI: ${ce(m)}`, { level: "warn" });
@@ -28460,7 +28460,7 @@ function Kk(e10, t) {
28460
28460
  else if (Array.isArray(i)) f = i;
28461
28461
  else if (i.type === "custom") f = i.prompt, _ = i.snapshot;
28462
28462
  else if (i.type === "preset") m = i.append, g = i.excludeDynamicSections, _ = i.snapshot;
28463
- process.env.CLAUDE_AGENT_SDK_VERSION = "0.3.321";
28463
+ process.env.CLAUDE_AGENT_SDK_VERSION = "0.3.322";
28464
28464
  let { abortController: y = Rf(), additionalDirectories: S = [], projectConfigRoot: E, agent: b, agents: C, allowedTools: A = [], betas: R, canUseTool: x, continue: L, cwd: F, debug: re, debugFile: T, disallowedTools: w = [], tools: I, env: M, executable: z = Xa() ? "bun" : "node", executableArgs: J = [], extraArgs: Q = {}, fallbackModel: W, enableFileCheckpointing: B, toolConfig: it, forkSession: Ve, hooks: ot, includeHookEvents: At, includePartialMessages: Zt, forwardSubagentText: Ke, verbatimPrompts: we = false, onElicitation: ge, onUserDialog: sn, supportedDialogKinds: Fe, perTaskStopAffordance: En, rapidFollowupPreempt: ys, workspaceTrust: Ni, persistSession: Io, sessionStore: gn, sessionStoreFlush: Na, thinking: Ss, effort: Df, maxThinkingTokens: Vr, maxTurns: Ui, maxBudgetUsd: Or, taskBudget: _u, mcpServers: yu, model: Su, outputFormat: Lf, permissionMode: Fi, allowDangerouslySkipPermissions: Eu = false, permissionPromptToolName: Ua, permissionPrompts: Mf, plugins: Es, pluginDelivery: bu = "argv", getOAuthToken: Nf, getHostAuthToken: he, workload: Rt, resume: Kt, resumeSessionAt: qr, resumeDropsTurn: Fa, sessionId: Uf, skills: Ha, stderr: Ff, strictMcpConfig: W5 } = p, qk = Fi;
28465
28465
  if (gn && Io === false) throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. To avoid keeping a local copy, pass env: { ...process.env, CLAUDE_CONFIG_DIR: dir }, where dir is a new private directory such as fs.mkdtempSync(path.join(os.tmpdir(), 'claude-')), and delete dir when the query ends.");
28466
28466
  xJ({ supportedDialogKinds: Fe, onUserDialog: sn });
@@ -28477,7 +28477,7 @@ function Kk(e10, t) {
28477
28477
  }
28478
28478
  let Zk = Lf?.type === "json_schema" ? Lf.schema : void 0, _t = M ? { ...M } : { ...process.env };
28479
28479
  if (!_t.CLAUDE_CODE_ENTRYPOINT) _t.CLAUDE_CODE_ENTRYPOINT = "sdk-ts";
28480
- if (!_t.CLAUDE_AGENT_SDK_VERSION) _t.CLAUDE_AGENT_SDK_VERSION = "0.3.321";
28480
+ if (!_t.CLAUDE_AGENT_SDK_VERSION) _t.CLAUDE_AGENT_SDK_VERSION = "0.3.322";
28481
28481
  if (B) _t.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING = "true";
28482
28482
  if (!Object.keys(_t).some((yt) => yt.toUpperCase() === "CLAUDE_CODE_SDK_READS_SESSION_STATE")) _t.CLAUDE_CODE_SDK_READS_SESSION_STATE = "1";
28483
28483
  if (s && !Object.keys(_t).some((yt) => yt.toUpperCase() === "CLAUDE_CODE_SDK_READS_STARTUP_MARKS")) _t.CLAUDE_CODE_SDK_READS_STARTUP_MARKS = "1";
@@ -30568,14 +30568,14 @@ function runtimeVersionDir(bin) {
30568
30568
  }
30569
30569
  return void 0;
30570
30570
  }
30571
- function leaseRuntime(bin, role) {
30571
+ function leaseRuntime(bin, role, pid = process.pid) {
30572
30572
  const versionDir = runtimeVersionDir(bin);
30573
30573
  if (!versionDir) return () => {
30574
30574
  };
30575
- const path = join4(versionDir, LEASES_DIR, `${process.pid}.json`);
30575
+ const path = join4(versionDir, LEASES_DIR, `${pid}.json`);
30576
30576
  try {
30577
30577
  mkdirSync3(dirname3(path), { recursive: true });
30578
- const lease = { pid: process.pid, role, bin, at: (/* @__PURE__ */ new Date()).toISOString() };
30578
+ const lease = { pid, role, bin, at: (/* @__PURE__ */ new Date()).toISOString() };
30579
30579
  writeFileSync2(path, JSON.stringify(lease));
30580
30580
  } catch {
30581
30581
  return () => {
@@ -31129,6 +31129,7 @@ function claudeCompactionWindowOf(env) {
31129
31129
  const window = Number(raw);
31130
31130
  return Number.isInteger(window) && window > 0 ? window : void 0;
31131
31131
  }
31132
+ var BROKER_DISALLOWED_TOOLS = ["ScheduleWakeup", "CronCreate", "CronDelete", "CronList"];
31132
31133
 
31133
31134
  // packages/server/src/backend/socket-ownership.ts
31134
31135
  import { statSync as statSync2 } from "node:fs";
@@ -31151,8 +31152,28 @@ function socketPathOwnership(socketPath) {
31151
31152
  };
31152
31153
  }
31153
31154
 
31155
+ // packages/server/src/backend/daemon-identity.ts
31156
+ import { readFileSync as readFileSync5 } from "node:fs";
31157
+ function linuxExactStart(pid) {
31158
+ if (process.platform !== "linux") return void 0;
31159
+ try {
31160
+ const bootId = readFileSync5("/proc/sys/kernel/random/boot_id", "utf8").trim().toLowerCase();
31161
+ if (!/^[0-9a-f-]{36}$/u.test(bootId)) return void 0;
31162
+ const stat = readFileSync5(`/proc/${pid}/stat`, "utf8").trim();
31163
+ const suffixAt = stat.lastIndexOf(") ");
31164
+ if (suffixAt < 0) return void 0;
31165
+ const ticks = stat.slice(suffixAt + 2).trim().split(/\s+/u)[19];
31166
+ return ticks && /^\d+$/u.test(ticks) ? `linux:${bootId}:${ticks}` : void 0;
31167
+ } catch {
31168
+ return void 0;
31169
+ }
31170
+ }
31171
+ function selfProcessStart() {
31172
+ return linuxExactStart("self");
31173
+ }
31174
+
31154
31175
  // packages/server/src/backend/claude-broker-diagnostics.ts
31155
- import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync5, readFileSync as readFileSync5, renameSync as renameSync3, statSync as statSync3 } from "node:fs";
31176
+ import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync5, readFileSync as readFileSync6, renameSync as renameSync3, statSync as statSync3 } from "node:fs";
31156
31177
  import { join as join7 } from "node:path";
31157
31178
  var MAX_BYTES = 4 * 1024 * 1024;
31158
31179
  function appendRecord(path, record) {
@@ -31186,12 +31207,12 @@ function createClaudeBrokerExitWriter(path, meta, now = () => /* @__PURE__ */ ne
31186
31207
 
31187
31208
  // packages/server/src/backend/claude-plugin-sync.ts
31188
31209
  import { createHash as createHash4 } from "node:crypto";
31189
- import { readFileSync as readFileSync7, readdirSync as readdirSync4, statSync as statSync5 } from "node:fs";
31210
+ import { readFileSync as readFileSync8, readdirSync as readdirSync4, statSync as statSync5 } from "node:fs";
31190
31211
  import { join as join9 } from "node:path";
31191
31212
 
31192
31213
  // packages/server/src/stable-plugin-path.ts
31193
31214
  import { createHash as createHash3 } from "node:crypto";
31194
- import { cpSync, lstatSync as lstatSync3, mkdirSync as mkdirSync6, readFileSync as readFileSync6, readdirSync as readdirSync3, readlinkSync as readlinkSync2, realpathSync as realpathSync2, renameSync as renameSync4, rmSync as rmSync4, statSync as statSync4, symlinkSync } from "node:fs";
31215
+ import { cpSync, lstatSync as lstatSync3, mkdirSync as mkdirSync6, readFileSync as readFileSync7, readdirSync as readdirSync3, readlinkSync as readlinkSync2, realpathSync as realpathSync2, renameSync as renameSync4, rmSync as rmSync4, statSync as statSync4, symlinkSync } from "node:fs";
31195
31216
  import { dirname as dirname4, isAbsolute as isAbsolute4, join as join8, resolve as resolve3 } from "node:path";
31196
31217
  var LINK_TYPE = process.platform === "win32" ? "junction" : void 0;
31197
31218
  function pluginFiles(root) {
@@ -31256,7 +31277,7 @@ function claudeDirEntries(root, entries) {
31256
31277
  for (const file of ["settings.json", "settings.local.json"]) {
31257
31278
  let raw;
31258
31279
  try {
31259
- raw = readFileSync7(join9(root, file), "utf8");
31280
+ raw = readFileSync8(join9(root, file), "utf8");
31260
31281
  } catch {
31261
31282
  continue;
31262
31283
  }
@@ -31553,13 +31574,15 @@ function runClaudeBroker(config, options = {}) {
31553
31574
  ),
31554
31575
  strictMcpConfig: true,
31555
31576
  allowedTools: config.allowedTools,
31556
- // NO `disallowedTools` here, and the asymmetry with the argv path (WORKER_DISALLOWED_TOOLS →
31577
+ // Claude Code's own schedulers are taken away (BROKER_DISALLOWED_TOOLS has the reason). AskUserQuestion
31578
+ // is NOT on that list, and the asymmetry with the argv path (WORKER_DISALLOWED_TOOLS →
31557
31579
  // `--disallowedTools=AskUserQuestion`) is DELIBERATE. That flag exists because a worker launched as
31558
31580
  // its own interactive `claude` process had nowhere to put the question: it opened a TUI dialog on a
31559
31581
  // terminal screen nobody was looking at. On this path it
31560
31582
  // has somewhere to go — canUseTool routes it to a real dashboard question card, the operator answers
31561
31583
  // it, and the chosen labels reach the model. A follow-up sent instead of an answer retires the card
31562
31584
  // and unwinds the tool call (see retirePendingFor in the bridge), so a parked turn is still steerable.
31585
+ disallowedTools: BROKER_DISALLOWED_TOOLS,
31563
31586
  canUseTool: async (request, context) => {
31564
31587
  const requestId = `perm-${++permSeq}`;
31565
31588
  return await new Promise((resolve4) => {
@@ -31764,7 +31787,7 @@ function runClaudeBroker(config, options = {}) {
31764
31787
  const recordOwner = () => {
31765
31788
  if (!config.recordPath) return null;
31766
31789
  try {
31767
- return JSON.parse(readFileSync8(config.recordPath, "utf8")).daemonPid;
31790
+ return JSON.parse(readFileSync9(config.recordPath, "utf8")).daemonPid;
31768
31791
  } catch {
31769
31792
  return null;
31770
31793
  }
@@ -31843,7 +31866,8 @@ function runClaudeBroker(config, options = {}) {
31843
31866
  published = true;
31844
31867
  socketPathIsOurs = socketPathOwnership(config.socketPath);
31845
31868
  if (config.recordPath) {
31846
- const record = { daemonPid: process.pid, socketPath: config.socketPath, sessionId: config.sessionId, generation, createdAt: (/* @__PURE__ */ new Date()).toISOString(), capabilities: BROKER_CAPABILITIES, compactionWindow: claudeCompactionWindowOf(config.workerEnv) };
31869
+ const processStart = selfProcessStart();
31870
+ const record = { daemonPid: process.pid, ...processStart ? { processStart } : {}, socketPath: config.socketPath, sessionId: config.sessionId, generation, createdAt: (/* @__PURE__ */ new Date()).toISOString(), capabilities: BROKER_CAPABILITIES, compactionWindow: claudeCompactionWindowOf(config.workerEnv) };
31847
31871
  try {
31848
31872
  writeFileSync4(config.recordPath, JSON.stringify(record), { mode: 384 });
31849
31873
  } catch {
@@ -31874,9 +31898,23 @@ if (process.env.FRIZZ_CLAUDE_BROKER) {
31874
31898
  generation: running?.generation ?? config.generation ?? ""
31875
31899
  })(reason, detail);
31876
31900
  };
31901
+ const dropOwnRecord = () => {
31902
+ if (!config.recordPath) return;
31903
+ try {
31904
+ const text = readFileSync9(config.recordPath, "utf8");
31905
+ if (JSON.parse(text).daemonPid !== process.pid) return;
31906
+ try {
31907
+ writeFileSync4(`${config.recordPath}.last`, text);
31908
+ } catch {
31909
+ }
31910
+ unlinkSync3(config.recordPath);
31911
+ } catch {
31912
+ }
31913
+ };
31877
31914
  for (const sig of ["SIGTERM", "SIGINT", "SIGHUP"]) {
31878
31915
  process.on(sig, () => {
31879
31916
  recordExit(`signal-${sig}`);
31917
+ dropOwnRecord();
31880
31918
  process.exit(0);
31881
31919
  });
31882
31920
  }