nexus-agents 8.22.2 → 8.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/{ast-rule-runner-UMOL7AO3.js → ast-rule-runner-G6IOGUCV.js} +3 -3
  2. package/dist/{child-mcp-config-7DNOX3U3.js → child-mcp-config-GDTLUXGR.js} +2 -2
  3. package/dist/{chunk-XS423Y73.js → chunk-22EEMQUS.js} +2 -2
  4. package/dist/{chunk-DW3RU6GC.js → chunk-3VBOYUPH.js} +2 -2
  5. package/dist/{chunk-P3WRF3A7.js → chunk-4E6T32D3.js} +2 -2
  6. package/dist/{chunk-JNCOVP77.js → chunk-4O7NQB46.js} +4 -4
  7. package/dist/{chunk-6IOI5SK3.js → chunk-4XBYQAED.js} +2 -2
  8. package/dist/{chunk-NG7T6DN5.js → chunk-5O5FKZUU.js} +3 -3
  9. package/dist/{chunk-OPWJJXZU.js → chunk-7LFNF4PD.js} +3 -3
  10. package/dist/{chunk-BAWRHK4W.js → chunk-BTZ7BKID.js} +2 -2
  11. package/dist/{chunk-R2CDVI4E.js → chunk-C2EZXKVE.js} +2 -2
  12. package/dist/{chunk-OFLMRACR.js → chunk-CHP7WNJS.js} +2 -2
  13. package/dist/{chunk-RZUYKWEY.js → chunk-CN3VAMQD.js} +7 -7
  14. package/dist/{chunk-2IJOZA75.js → chunk-GEKIA6CI.js} +2 -2
  15. package/dist/{chunk-CY6KGPAP.js → chunk-JC3O7WTI.js} +4 -4
  16. package/dist/{chunk-3J5WKA2S.js → chunk-JQS2A5MW.js} +4 -4
  17. package/dist/{chunk-ZWI54SPH.js → chunk-KAWGEKXW.js} +2 -2
  18. package/dist/{chunk-HZ3R63IV.js → chunk-KIAMP743.js} +3 -3
  19. package/dist/{chunk-GHBR6ZG3.js → chunk-M4DC2HYF.js} +4 -4
  20. package/dist/{chunk-2RUDLEIT.js → chunk-MGG466HO.js} +12 -14
  21. package/dist/chunk-MGG466HO.js.map +1 -0
  22. package/dist/{chunk-SX5EZNPS.js → chunk-NDWIQFXW.js} +36 -36
  23. package/dist/{chunk-QWYY5DD6.js → chunk-OUOBB5XR.js} +5 -5
  24. package/dist/{chunk-BU5LR2JJ.js → chunk-OYTRYITB.js} +2 -2
  25. package/dist/{chunk-FCIAKQNN.js → chunk-OZD3IGK6.js} +2 -2
  26. package/dist/{chunk-3R5TFUS5.js → chunk-PMO7TY2K.js} +5 -5
  27. package/dist/{chunk-HSOZPMQN.js → chunk-Q5J7PV3G.js} +2 -2
  28. package/dist/{chunk-P4QYPDTB.js → chunk-QEZGPM4S.js} +2 -2
  29. package/dist/{chunk-NNM6ZIXQ.js → chunk-QOKSFHWH.js} +3 -3
  30. package/dist/{chunk-BKE522YB.js → chunk-TB2USTOO.js} +9 -9
  31. package/dist/{chunk-52QVQASD.js → chunk-TPBPFBO3.js} +16 -8
  32. package/dist/{chunk-52QVQASD.js.map → chunk-TPBPFBO3.js.map} +1 -1
  33. package/dist/{chunk-HILA36W2.js → chunk-UOKUUBJP.js} +2 -2
  34. package/dist/{chunk-V2RNDE4R.js → chunk-UWE6AN65.js} +2 -2
  35. package/dist/{chunk-KCDE6VIZ.js → chunk-V52KBX67.js} +6 -6
  36. package/dist/{chunk-SRC2TLRU.js → chunk-W5WSXEAB.js} +2 -2
  37. package/dist/{chunk-3MSPZLGF.js → chunk-YOT4GWJV.js} +2 -2
  38. package/dist/chunk-Z7ORWDXO.js +14 -0
  39. package/dist/chunk-Z7ORWDXO.js.map +1 -0
  40. package/dist/{cli-circuit-breaker-CWQPO6SJ.js → cli-circuit-breaker-QV5J45LJ.js} +3 -3
  41. package/dist/cli.js +163 -114
  42. package/dist/cli.js.map +1 -1
  43. package/dist/{composite-router-EVIISDZX.js → composite-router-5AAXEJI3.js} +2 -2
  44. package/dist/{consensus-vote-4Q4ZT5U7.js → consensus-vote-NM44VYAZ.js} +17 -17
  45. package/dist/{context-retriever-7KBTMNCV.js → context-retriever-GB4EC3XI.js} +8 -8
  46. package/dist/{doctor-deep-WFHCOZJY.js → doctor-deep-FDASNUC6.js} +3 -3
  47. package/dist/{doctor-live-LR2TJT45.js → doctor-live-M2A46PS3.js} +9 -9
  48. package/dist/{expert-bridge-KWVJB63Y.js → expert-bridge-M6OU7IYP.js} +4 -4
  49. package/dist/{factory-XOSRNGBJ.js → factory-NR2H2QR4.js} +5 -5
  50. package/dist/{factory-MVWNG55G.js → factory-OPVHIZ3G.js} +9 -9
  51. package/dist/{improvement-review-F7CCW4HQ.js → improvement-review-BTH44AEV.js} +6 -6
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +31 -31
  54. package/dist/{init-opencode-EEOVDBRF.js → init-opencode-2PVLMIJK.js} +6 -6
  55. package/dist/issue-triage-FCFX56WQ.js +17 -0
  56. package/dist/{pr-reviewer-helpers-2ZSPMIG4.js → pr-reviewer-helpers-3VQNHIXI.js} +4 -4
  57. package/dist/{registry-command-SD3YGORZ.js → registry-command-GAL4MBUA.js} +2 -2
  58. package/dist/{repo-security-plan-Z3EHJNZA.js → repo-security-plan-ZUZJEUIS.js} +3 -3
  59. package/dist/{research-helpers-synthesize-KIZIELHL.js → research-helpers-synthesize-Z2PJPIJD.js} +4 -4
  60. package/dist/{routing-memory-RRMEGPQB.js → routing-memory-N7YBCDAV.js} +2 -2
  61. package/dist/{session-memory-MMRSHXSO.js → session-memory-PRSYLZO7.js} +3 -3
  62. package/dist/{setup-config-54QMOSKC.js → setup-config-KF2VUAFU.js} +3 -3
  63. package/dist/{setup-custom-api-7CCRA6AP.js → setup-custom-api-T47OPCDE.js} +4 -4
  64. package/dist/setup-data-dir-2LQSQCYM.js +29 -0
  65. package/dist/{tool-memory-YV64LYJ3.js → tool-memory-CLV7MXC4.js} +5 -5
  66. package/dist/{unified-registry-DRKRTGHZ.js → unified-registry-33QL65WE.js} +10 -10
  67. package/dist/{weather-report-PJBGR7WX.js → weather-report-VFWJVLP3.js} +2 -2
  68. package/package.json +1 -1
  69. package/dist/chunk-2RUDLEIT.js.map +0 -1
  70. package/dist/chunk-X76M44I2.js +0 -7
  71. package/dist/chunk-X76M44I2.js.map +0 -1
  72. package/dist/issue-triage-WVSJEHYI.js +0 -17
  73. package/dist/setup-data-dir-6OR7TLY6.js +0 -29
  74. /package/dist/{ast-rule-runner-UMOL7AO3.js.map → ast-rule-runner-G6IOGUCV.js.map} +0 -0
  75. /package/dist/{child-mcp-config-7DNOX3U3.js.map → child-mcp-config-GDTLUXGR.js.map} +0 -0
  76. /package/dist/{chunk-XS423Y73.js.map → chunk-22EEMQUS.js.map} +0 -0
  77. /package/dist/{chunk-DW3RU6GC.js.map → chunk-3VBOYUPH.js.map} +0 -0
  78. /package/dist/{chunk-P3WRF3A7.js.map → chunk-4E6T32D3.js.map} +0 -0
  79. /package/dist/{chunk-JNCOVP77.js.map → chunk-4O7NQB46.js.map} +0 -0
  80. /package/dist/{chunk-6IOI5SK3.js.map → chunk-4XBYQAED.js.map} +0 -0
  81. /package/dist/{chunk-NG7T6DN5.js.map → chunk-5O5FKZUU.js.map} +0 -0
  82. /package/dist/{chunk-OPWJJXZU.js.map → chunk-7LFNF4PD.js.map} +0 -0
  83. /package/dist/{chunk-BAWRHK4W.js.map → chunk-BTZ7BKID.js.map} +0 -0
  84. /package/dist/{chunk-R2CDVI4E.js.map → chunk-C2EZXKVE.js.map} +0 -0
  85. /package/dist/{chunk-OFLMRACR.js.map → chunk-CHP7WNJS.js.map} +0 -0
  86. /package/dist/{chunk-RZUYKWEY.js.map → chunk-CN3VAMQD.js.map} +0 -0
  87. /package/dist/{chunk-2IJOZA75.js.map → chunk-GEKIA6CI.js.map} +0 -0
  88. /package/dist/{chunk-CY6KGPAP.js.map → chunk-JC3O7WTI.js.map} +0 -0
  89. /package/dist/{chunk-3J5WKA2S.js.map → chunk-JQS2A5MW.js.map} +0 -0
  90. /package/dist/{chunk-ZWI54SPH.js.map → chunk-KAWGEKXW.js.map} +0 -0
  91. /package/dist/{chunk-HZ3R63IV.js.map → chunk-KIAMP743.js.map} +0 -0
  92. /package/dist/{chunk-GHBR6ZG3.js.map → chunk-M4DC2HYF.js.map} +0 -0
  93. /package/dist/{chunk-SX5EZNPS.js.map → chunk-NDWIQFXW.js.map} +0 -0
  94. /package/dist/{chunk-QWYY5DD6.js.map → chunk-OUOBB5XR.js.map} +0 -0
  95. /package/dist/{chunk-BU5LR2JJ.js.map → chunk-OYTRYITB.js.map} +0 -0
  96. /package/dist/{chunk-FCIAKQNN.js.map → chunk-OZD3IGK6.js.map} +0 -0
  97. /package/dist/{chunk-3R5TFUS5.js.map → chunk-PMO7TY2K.js.map} +0 -0
  98. /package/dist/{chunk-HSOZPMQN.js.map → chunk-Q5J7PV3G.js.map} +0 -0
  99. /package/dist/{chunk-P4QYPDTB.js.map → chunk-QEZGPM4S.js.map} +0 -0
  100. /package/dist/{chunk-NNM6ZIXQ.js.map → chunk-QOKSFHWH.js.map} +0 -0
  101. /package/dist/{chunk-BKE522YB.js.map → chunk-TB2USTOO.js.map} +0 -0
  102. /package/dist/{chunk-HILA36W2.js.map → chunk-UOKUUBJP.js.map} +0 -0
  103. /package/dist/{chunk-V2RNDE4R.js.map → chunk-UWE6AN65.js.map} +0 -0
  104. /package/dist/{chunk-KCDE6VIZ.js.map → chunk-V52KBX67.js.map} +0 -0
  105. /package/dist/{chunk-SRC2TLRU.js.map → chunk-W5WSXEAB.js.map} +0 -0
  106. /package/dist/{chunk-3MSPZLGF.js.map → chunk-YOT4GWJV.js.map} +0 -0
  107. /package/dist/{cli-circuit-breaker-CWQPO6SJ.js.map → cli-circuit-breaker-QV5J45LJ.js.map} +0 -0
  108. /package/dist/{composite-router-EVIISDZX.js.map → composite-router-5AAXEJI3.js.map} +0 -0
  109. /package/dist/{consensus-vote-4Q4ZT5U7.js.map → consensus-vote-NM44VYAZ.js.map} +0 -0
  110. /package/dist/{context-retriever-7KBTMNCV.js.map → context-retriever-GB4EC3XI.js.map} +0 -0
  111. /package/dist/{doctor-deep-WFHCOZJY.js.map → doctor-deep-FDASNUC6.js.map} +0 -0
  112. /package/dist/{doctor-live-LR2TJT45.js.map → doctor-live-M2A46PS3.js.map} +0 -0
  113. /package/dist/{expert-bridge-KWVJB63Y.js.map → expert-bridge-M6OU7IYP.js.map} +0 -0
  114. /package/dist/{factory-MVWNG55G.js.map → factory-NR2H2QR4.js.map} +0 -0
  115. /package/dist/{factory-XOSRNGBJ.js.map → factory-OPVHIZ3G.js.map} +0 -0
  116. /package/dist/{improvement-review-F7CCW4HQ.js.map → improvement-review-BTH44AEV.js.map} +0 -0
  117. /package/dist/{init-opencode-EEOVDBRF.js.map → init-opencode-2PVLMIJK.js.map} +0 -0
  118. /package/dist/{issue-triage-WVSJEHYI.js.map → issue-triage-FCFX56WQ.js.map} +0 -0
  119. /package/dist/{pr-reviewer-helpers-2ZSPMIG4.js.map → pr-reviewer-helpers-3VQNHIXI.js.map} +0 -0
  120. /package/dist/{registry-command-SD3YGORZ.js.map → registry-command-GAL4MBUA.js.map} +0 -0
  121. /package/dist/{repo-security-plan-Z3EHJNZA.js.map → repo-security-plan-ZUZJEUIS.js.map} +0 -0
  122. /package/dist/{research-helpers-synthesize-KIZIELHL.js.map → research-helpers-synthesize-Z2PJPIJD.js.map} +0 -0
  123. /package/dist/{routing-memory-RRMEGPQB.js.map → routing-memory-N7YBCDAV.js.map} +0 -0
  124. /package/dist/{session-memory-MMRSHXSO.js.map → session-memory-PRSYLZO7.js.map} +0 -0
  125. /package/dist/{setup-config-54QMOSKC.js.map → setup-config-KF2VUAFU.js.map} +0 -0
  126. /package/dist/{setup-custom-api-7CCRA6AP.js.map → setup-custom-api-T47OPCDE.js.map} +0 -0
  127. /package/dist/{setup-data-dir-6OR7TLY6.js.map → setup-data-dir-2LQSQCYM.js.map} +0 -0
  128. /package/dist/{tool-memory-YV64LYJ3.js.map → tool-memory-CLV7MXC4.js.map} +0 -0
  129. /package/dist/{unified-registry-DRKRTGHZ.js.map → unified-registry-33QL65WE.js.map} +0 -0
  130. /package/dist/{weather-report-PJBGR7WX.js.map → weather-report-VFWJVLP3.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -23,11 +23,11 @@ import {
23
23
  parseExpertReview,
24
24
  reviewPostingBlock,
25
25
  sumFindings
26
- } from "./chunk-HZ3R63IV.js";
27
- import "./chunk-P3WRF3A7.js";
26
+ } from "./chunk-KIAMP743.js";
27
+ import "./chunk-4E6T32D3.js";
28
28
  import {
29
29
  runConfigInitSync
30
- } from "./chunk-ZWI54SPH.js";
30
+ } from "./chunk-KAWGEKXW.js";
31
31
  import {
32
32
  AuthHandler,
33
33
  CustomExpertDefinitionSchema,
@@ -157,11 +157,11 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-SX5EZNPS.js";
161
- import "./chunk-XS423Y73.js";
160
+ } from "./chunk-NDWIQFXW.js";
161
+ import "./chunk-22EEMQUS.js";
162
162
  import "./chunk-DGWT7DXX.js";
163
163
  import "./chunk-64GMIUM5.js";
164
- import "./chunk-BAWRHK4W.js";
164
+ import "./chunk-BTZ7BKID.js";
165
165
  import {
166
166
  CATEGORY_DISPLAY_NAMES,
167
167
  DEFAULT_PR_REVIEW_CONFIG
@@ -177,14 +177,14 @@ import {
177
177
  doctorCommand,
178
178
  initDataDirectories,
179
179
  runDoctor
180
- } from "./chunk-2RUDLEIT.js";
180
+ } from "./chunk-MGG466HO.js";
181
181
  import {
182
182
  buildOpenAICompatAdapters,
183
183
  readOpenAICompatEnv
184
- } from "./chunk-QWYY5DD6.js";
184
+ } from "./chunk-OUOBB5XR.js";
185
185
  import {
186
186
  shutdownExpertBridge
187
- } from "./chunk-RZUYKWEY.js";
187
+ } from "./chunk-CN3VAMQD.js";
188
188
  import {
189
189
  ConsensusVoteInputSchema,
190
190
  DEFAULT_VOTE_TIMEOUT_MS,
@@ -196,18 +196,18 @@ import {
196
196
  recordAuthenticVote,
197
197
  registerConsensusVoteTool,
198
198
  toRecordDecision
199
- } from "./chunk-BKE522YB.js";
199
+ } from "./chunk-TB2USTOO.js";
200
200
  import {
201
201
  loadUsageEvents,
202
202
  rollupByModel
203
- } from "./chunk-P4QYPDTB.js";
203
+ } from "./chunk-QEZGPM4S.js";
204
204
  import {
205
205
  allOf,
206
206
  anyOf
207
207
  } from "./chunk-OQB3XC5O.js";
208
208
  import {
209
209
  synthesizeResearch
210
- } from "./chunk-NG7T6DN5.js";
210
+ } from "./chunk-5O5FKZUU.js";
211
211
  import {
212
212
  DRAFT_REPLY_BODY_MAX_LENGTH,
213
213
  configureUntrustedInputFirewall,
@@ -217,12 +217,12 @@ import {
217
217
  runUntrustedInputFirewall,
218
218
  validateAgentAction,
219
219
  validateCorroboration
220
- } from "./chunk-KCDE6VIZ.js";
221
- import "./chunk-6IOI5SK3.js";
220
+ } from "./chunk-V52KBX67.js";
221
+ import "./chunk-4XBYQAED.js";
222
222
  import {
223
223
  ReputationCache,
224
224
  sanitizeInput
225
- } from "./chunk-BU5LR2JJ.js";
225
+ } from "./chunk-OYTRYITB.js";
226
226
  import {
227
227
  ImprovementReviewInputSchema,
228
228
  calculateFitnessScore,
@@ -236,20 +236,22 @@ import {
236
236
  registerImprovementReviewTool,
237
237
  runImprovementReview,
238
238
  scanForSecrets
239
- } from "./chunk-OPWJJXZU.js";
239
+ } from "./chunk-7LFNF4PD.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  stagePolicyFirewallForRollout
244
- } from "./chunk-GHBR6ZG3.js";
244
+ } from "./chunk-M4DC2HYF.js";
245
245
  import {
246
- VERSION
247
- } from "./chunk-X76M44I2.js";
248
- import "./chunk-3MSPZLGF.js";
246
+ NODE_ENGINE_RANGE,
247
+ VERSION,
248
+ isNodeVersionSupported
249
+ } from "./chunk-Z7ORWDXO.js";
250
+ import "./chunk-YOT4GWJV.js";
249
251
  import {
250
252
  createUnifiedRegistry,
251
253
  getGlobalRegistry
252
- } from "./chunk-JNCOVP77.js";
254
+ } from "./chunk-4O7NQB46.js";
253
255
  import {
254
256
  CodebaseIndexSchema,
255
257
  PaperStatusSchema,
@@ -275,26 +277,26 @@ import {
275
277
  loadSourcesRegistry,
276
278
  rankDiscoveredItems,
277
279
  saveSourcesRegistry
278
- } from "./chunk-3R5TFUS5.js";
280
+ } from "./chunk-PMO7TY2K.js";
279
281
  import {
280
282
  loadPapersRegistry,
281
283
  loadTechniquesRegistry,
282
284
  savePapersRegistry
283
- } from "./chunk-R2CDVI4E.js";
285
+ } from "./chunk-C2EZXKVE.js";
284
286
  import {
285
287
  resolveToken
286
- } from "./chunk-HILA36W2.js";
288
+ } from "./chunk-UOKUUBJP.js";
287
289
  import {
288
290
  MemoryError,
289
291
  configureToolMemory,
290
292
  shutdownToolMemory
291
- } from "./chunk-CY6KGPAP.js";
293
+ } from "./chunk-JC3O7WTI.js";
292
294
  import {
293
295
  capitalize,
294
296
  capitalizeKebab,
295
297
  truncateText
296
298
  } from "./chunk-7LP6VJRP.js";
297
- import "./chunk-SRC2TLRU.js";
299
+ import "./chunk-W5WSXEAB.js";
298
300
  import {
299
301
  BUILT_IN_EXPERTS
300
302
  } from "./chunk-43SVUIPL.js";
@@ -306,20 +308,21 @@ import {
306
308
  getAvailableClis,
307
309
  isRecord,
308
310
  probeAllClis,
309
- readSubprocessDepth
310
- } from "./chunk-52QVQASD.js";
311
- import "./chunk-DW3RU6GC.js";
311
+ readSubprocessDepth,
312
+ safeJsonParse
313
+ } from "./chunk-TPBPFBO3.js";
314
+ import "./chunk-3VBOYUPH.js";
312
315
  import {
313
316
  DEFAULTS
314
- } from "./chunk-2IJOZA75.js";
315
- import "./chunk-HSOZPMQN.js";
317
+ } from "./chunk-GEKIA6CI.js";
318
+ import "./chunk-Q5J7PV3G.js";
316
319
  import {
317
320
  nexusMkdtempSync
318
321
  } from "./chunk-DKHBIJO4.js";
319
- import "./chunk-V2RNDE4R.js";
322
+ import "./chunk-UWE6AN65.js";
320
323
  import "./chunk-QZUG667L.js";
321
- import "./chunk-OFLMRACR.js";
322
- import "./chunk-FCIAKQNN.js";
324
+ import "./chunk-CHP7WNJS.js";
325
+ import "./chunk-OZD3IGK6.js";
323
326
  import {
324
327
  API_TIMEOUTS,
325
328
  AgentCapability,
@@ -397,7 +400,7 @@ import {
397
400
  validateTimeout,
398
401
  writeEmptyLine,
399
402
  writeLine
400
- } from "./chunk-NNM6ZIXQ.js";
403
+ } from "./chunk-QOKSFHWH.js";
401
404
  import "./chunk-7WJGV5DN.js";
402
405
  import {
403
406
  applyPortableMode,
@@ -4451,7 +4454,7 @@ Provide a structured review with:
4451
4454
  * (Source: Issue #828 — Wire policy gate into production pipeline)
4452
4455
  */
4453
4456
  async postReviewToGitHub(provider, pr, result, gateDecision) {
4454
- const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-2ZSPMIG4.js");
4457
+ const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-3VQNHIXI.js");
4455
4458
  const formattedBody = formatReviewComment2(result);
4456
4459
  const body = truncateText(formattedBody, DRAFT_REPLY_BODY_MAX_LENGTH, "\u2026[review truncated]");
4457
4460
  const sources = pr.files.slice(0, 20).map((file) => ({ type: "repoFile", path: file.filename }));
@@ -11860,7 +11863,7 @@ function probeGrammars(register, parse6, probes = GRAMMAR_PROBES) {
11860
11863
  }
11861
11864
  async function loadGrammarModules() {
11862
11865
  const [{ ensurePolyglotLangs }, napi] = await Promise.all([
11863
- import("./ast-rule-runner-UMOL7AO3.js"),
11866
+ import("./ast-rule-runner-G6IOGUCV.js"),
11864
11867
  import("@ast-grep/napi")
11865
11868
  ]);
11866
11869
  return { register: ensurePolyglotLangs, parse: napi.parse };
@@ -11882,26 +11885,18 @@ async function checkNativeGrammars(load = loadGrammarModules) {
11882
11885
  // src/cli/verify-command.ts
11883
11886
  function checkNodeVersion() {
11884
11887
  const version = process.version;
11885
- const major = parseInt(version.slice(1).split(".")[0] ?? "0", 10);
11886
- if (major >= 22) {
11888
+ if (isNodeVersionSupported(version)) {
11887
11889
  return {
11888
11890
  name: "Node.js Version",
11889
11891
  passed: true,
11890
- message: `${version} (LTS)`
11891
- };
11892
- }
11893
- if (major >= 18) {
11894
- return {
11895
- name: "Node.js Version",
11896
- passed: true,
11897
- message: `${version} (supported, recommend 22.x LTS)`
11892
+ message: `${version} (supported)`
11898
11893
  };
11899
11894
  }
11900
11895
  return {
11901
11896
  name: "Node.js Version",
11902
11897
  passed: false,
11903
- message: `${version} (unsupported)`,
11904
- fix: "Install Node.js 22.x LTS from https://nodejs.org"
11898
+ message: `${version} (unsupported; requires Node.js ${NODE_ENGINE_RANGE})`,
11899
+ fix: `Install Node.js ${NODE_ENGINE_RANGE} from https://nodejs.org`
11905
11900
  };
11906
11901
  }
11907
11902
  function checkPackageExports() {
@@ -16882,6 +16877,7 @@ import { readFileSync as readFileSync12 } from "node:fs";
16882
16877
  // src/cli/release-validate-helpers.ts
16883
16878
  import { execSync as execSync5 } from "node:child_process";
16884
16879
  import { existsSync as existsSync15, readFileSync as readFileSync11 } from "node:fs";
16880
+ import { z as z9 } from "zod";
16885
16881
 
16886
16882
  // src/cli/release-secret-scan.ts
16887
16883
  import { execSync as execSync4 } from "node:child_process";
@@ -16905,24 +16901,77 @@ function scanRecentCommitsForSecrets(options = {}) {
16905
16901
  }
16906
16902
 
16907
16903
  // src/cli/release-validate-helpers.ts
16908
- async function validateSecurity(options) {
16909
- const startTime = Date.now();
16910
- const findings = [];
16904
+ var NPM_AUDIT_REPORT_SCHEMA = z9.object({
16905
+ metadata: z9.object({
16906
+ vulnerabilities: z9.object({
16907
+ moderate: z9.number().int().nonnegative(),
16908
+ high: z9.number().int().nonnegative(),
16909
+ critical: z9.number().int().nonnegative()
16910
+ })
16911
+ })
16912
+ });
16913
+ function parseNpmAuditCounts(output2) {
16914
+ const parsed = NPM_AUDIT_REPORT_SCHEMA.safeParse(safeJsonParse(output2));
16915
+ return parsed.success ? parsed.data.metadata.vulnerabilities : void 0;
16916
+ }
16917
+ function createNpmAuditFinding(counts) {
16918
+ const severeCounts = [
16919
+ ...counts.high > 0 ? [`${String(counts.high)} high`] : [],
16920
+ ...counts.critical > 0 ? [`${String(counts.critical)} critical`] : []
16921
+ ];
16922
+ if (severeCounts.length > 0) {
16923
+ return {
16924
+ severity: "error",
16925
+ category: "security",
16926
+ title: `npm audit found ${severeCounts.join(" and ")} vulnerabilities`,
16927
+ description: "npm audit reported high or critical vulnerabilities.",
16928
+ remediation: "Run npm audit fix or review and update vulnerable dependencies."
16929
+ };
16930
+ }
16931
+ if (counts.moderate === 0) return void 0;
16932
+ return {
16933
+ severity: "warning",
16934
+ category: "security",
16935
+ title: `npm audit found ${String(counts.moderate)} moderate vulnerabilities`,
16936
+ description: "npm audit reported moderate vulnerabilities.",
16937
+ remediation: "Review and update vulnerable dependencies."
16938
+ };
16939
+ }
16940
+ function unavailableNpmAuditFinding(reason) {
16941
+ return {
16942
+ severity: "error",
16943
+ category: "security",
16944
+ title: `npm audit unavailable: ${reason}`,
16945
+ description: "npm audit did not produce a valid vulnerability report.",
16946
+ remediation: "Restore npm audit availability and rerun release validation."
16947
+ };
16948
+ }
16949
+ function getErrorStdout(error) {
16950
+ if (typeof error !== "object" || error === null || !("stdout" in error)) return void 0;
16951
+ return typeof error.stdout === "string" ? error.stdout : void 0;
16952
+ }
16953
+ function runNpmAudit() {
16911
16954
  try {
16912
- execSync5("npm audit --audit-level=high 2>/dev/null", {
16955
+ const output2 = execSync5("npm audit --json --audit-level=high", {
16913
16956
  encoding: "utf-8",
16914
16957
  stdio: ["pipe", "pipe", "pipe"],
16915
16958
  timeout: CLI_SUBPROCESS_TIMEOUTS.ghCommandMs
16916
16959
  });
16917
- } catch {
16918
- findings.push({
16919
- severity: "warning",
16920
- category: "security",
16921
- title: "npm audit has findings",
16922
- description: "npm audit reported high or critical vulnerabilities.",
16923
- remediation: "Run npm audit fix or review and update vulnerable dependencies."
16924
- });
16960
+ const counts = parseNpmAuditCounts(output2);
16961
+ return counts === void 0 ? unavailableNpmAuditFinding("invalid JSON response") : createNpmAuditFinding(counts);
16962
+ } catch (error) {
16963
+ const stdout = getErrorStdout(error);
16964
+ const counts = stdout === void 0 ? void 0 : parseNpmAuditCounts(stdout);
16965
+ if (counts !== void 0) return createNpmAuditFinding(counts);
16966
+ const reason = error instanceof Error ? error.message : String(error);
16967
+ return unavailableNpmAuditFinding(reason);
16925
16968
  }
16969
+ }
16970
+ async function validateSecurity(options) {
16971
+ const startTime = Date.now();
16972
+ const findings = [];
16973
+ const auditFinding = runNpmAudit();
16974
+ if (auditFinding !== void 0) findings.push(auditFinding);
16926
16975
  if (existsSync15(".env")) {
16927
16976
  findings.push({
16928
16977
  severity: "error",
@@ -19672,7 +19721,7 @@ function startImprovementReviewScheduler(options) {
19672
19721
  let running = false;
19673
19722
  const runOnce = async () => {
19674
19723
  try {
19675
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-F7CCW4HQ.js");
19724
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-BTH44AEV.js");
19676
19725
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19677
19726
  const result = await runImprovementReview2(input, { logger: logger22 });
19678
19727
  logger22.info("Scheduled improvement_review complete", {
@@ -20105,8 +20154,8 @@ async function initUpstreamServers(gatewayConfig, server, logger22) {
20105
20154
  servers: upstreamServers.length,
20106
20155
  tools: tools.length
20107
20156
  });
20108
- const { z: z14 } = await import("zod");
20109
- const passthroughSchema = z14.looseObject({});
20157
+ const { z: z15 } = await import("zod");
20158
+ const passthroughSchema = z15.looseObject({});
20110
20159
  for (const tool of tools) {
20111
20160
  const toolName = tool.name;
20112
20161
  const desc = tool.description ?? `Upstream tool: ${toolName}`;
@@ -21758,7 +21807,7 @@ function adaptConfigToLibrary(config) {
21758
21807
  }
21759
21808
  function createBeliefPromoter() {
21760
21809
  return async (event) => {
21761
- const { getToolMemory } = await import("./tool-memory-YV64LYJ3.js");
21810
+ const { getToolMemory } = await import("./tool-memory-CLV7MXC4.js");
21762
21811
  const tm = getToolMemory();
21763
21812
  await tm.recordBelief(
21764
21813
  `skill:${event.name}`,
@@ -22980,7 +23029,7 @@ async function handleResearchCommand(args) {
22980
23029
  }
22981
23030
  }
22982
23031
  async function handleRegistryCommand(args) {
22983
- const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-SD3YGORZ.js");
23032
+ const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-GAL4MBUA.js");
22984
23033
  const subcommand = args.subcommand;
22985
23034
  if (!isValidRegistrySubcommand(subcommand)) {
22986
23035
  process.stdout.write(`${formatRegistryUsage()}
@@ -23028,12 +23077,12 @@ async function handleVerifyCommand(args) {
23028
23077
  async function handleDoctorCommand(args) {
23029
23078
  const exitCode = await doctorCommand({ fix: args.options.fix });
23030
23079
  if (args.options.deep) {
23031
- const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-WFHCOZJY.js");
23080
+ const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-FDASNUC6.js");
23032
23081
  const diag = runDeepDiagnostics2();
23033
23082
  process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
23034
23083
  }
23035
23084
  if (args.options.live) {
23036
- const { runLiveReadiness, formatLiveReadiness } = await import("./doctor-live-LR2TJT45.js");
23085
+ const { runLiveReadiness, formatLiveReadiness } = await import("./doctor-live-M2A46PS3.js");
23037
23086
  const report = await runLiveReadiness();
23038
23087
  process.stdout.write(formatLiveReadiness(report) + "\n");
23039
23088
  if (report.some((r) => r.levels.serves.status === "failed")) {
@@ -23086,7 +23135,7 @@ async function runInitPortableFlow(args) {
23086
23135
  return cliExit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
23087
23136
  }
23088
23137
  async function runInitOpencodeFlow(args) {
23089
- const { runInitOpencode } = await import("./init-opencode-EEOVDBRF.js");
23138
+ const { runInitOpencode } = await import("./init-opencode-2PVLMIJK.js");
23090
23139
  const opencodePath = args.options.opencode;
23091
23140
  if (opencodePath === void 0 || opencodePath === "") {
23092
23141
  process.stderr.write("Error: --opencode requires a path argument.\n");
@@ -23112,7 +23161,7 @@ async function runInitOpencodeFlow(args) {
23112
23161
  return cliExit(EXIT_CODES.SUCCESS);
23113
23162
  }
23114
23163
  async function renderOpencodeValidate(opencodePath) {
23115
- const { runOpencodeValidate } = await import("./init-opencode-EEOVDBRF.js");
23164
+ const { runOpencodeValidate } = await import("./init-opencode-2PVLMIJK.js");
23116
23165
  const result = await runOpencodeValidate(opencodePath);
23117
23166
  if (!result.ok) {
23118
23167
  process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
@@ -23151,7 +23200,7 @@ async function handleSetupCommandAsync(args) {
23151
23200
  return cliExitFromStatus(exitCode);
23152
23201
  }
23153
23202
  async function runCustomApiSetup(args) {
23154
- const { configureCustomApi } = await import("./setup-custom-api-7CCRA6AP.js");
23203
+ const { configureCustomApi } = await import("./setup-custom-api-T47OPCDE.js");
23155
23204
  const baseUrl = args.options.customApi;
23156
23205
  if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
23157
23206
  const input = {
@@ -25706,7 +25755,7 @@ import { writeFile as writeFile5, mkdir as mkdir4 } from "node:fs/promises";
25706
25755
  import { join as join21, dirname as dirname9 } from "node:path";
25707
25756
 
25708
25757
  // src/mcp/tools/improvement-remediation-capability.ts
25709
- import { z as z9 } from "zod";
25758
+ import { z as z10 } from "zod";
25710
25759
  var PHASE_CAPABILITIES = {
25711
25760
  research: /* @__PURE__ */ new Set(["untrusted-input", "secrets"]),
25712
25761
  implement: /* @__PURE__ */ new Set(["repo-write", "secrets"])
@@ -25747,7 +25796,7 @@ var CapabilityLedger = class {
25747
25796
  }
25748
25797
  }
25749
25798
  };
25750
- var RemediationActionKindSchema = z9.enum([
25799
+ var RemediationActionKindSchema = z10.enum([
25751
25800
  "investigate",
25752
25801
  "adjust-routing",
25753
25802
  "add-test",
@@ -25755,17 +25804,17 @@ var RemediationActionKindSchema = z9.enum([
25755
25804
  "update-docs",
25756
25805
  "fix-bug"
25757
25806
  ]);
25758
- var RemediationStepSchema = z9.object({
25807
+ var RemediationStepSchema = z10.object({
25759
25808
  kind: RemediationActionKindSchema,
25760
- description: z9.string().min(1).max(500),
25809
+ description: z10.string().min(1).max(500),
25761
25810
  /** Optional path hint; bounded inert string, validated for traversal at use. */
25762
- targetPath: z9.string().min(1).max(300).optional()
25811
+ targetPath: z10.string().min(1).max(300).optional()
25763
25812
  }).strict();
25764
- var RemediationPlanSchema = z9.object({
25813
+ var RemediationPlanSchema = z10.object({
25765
25814
  /** Source signal key (mirrors ImprovementSignal.signalKey). */
25766
- signalKey: z9.string().min(1).max(200),
25815
+ signalKey: z10.string().min(1).max(200),
25767
25816
  /** Signal category (mirrors SignalCategory; 'tool-fitness' #3852, 'perf-regression' #3692). */
25768
- category: z9.enum([
25817
+ category: z10.enum([
25769
25818
  "routing",
25770
25819
  "tech-debt",
25771
25820
  "bug",
@@ -25774,8 +25823,8 @@ var RemediationPlanSchema = z9.object({
25774
25823
  "tool-fitness",
25775
25824
  "perf-regression"
25776
25825
  ]),
25777
- summary: z9.string().min(1).max(1e3),
25778
- steps: z9.array(RemediationStepSchema).min(1).max(20)
25826
+ summary: z10.string().min(1).max(1e3),
25827
+ steps: z10.array(RemediationStepSchema).min(1).max(20)
25779
25828
  }).strict();
25780
25829
  function parseRemediationPlan(raw) {
25781
25830
  const result = RemediationPlanSchema.safeParse(raw);
@@ -25905,25 +25954,25 @@ function makeGhPrCreator() {
25905
25954
  }
25906
25955
 
25907
25956
  // src/mcp/tools/remediation-review.ts
25908
- import { z as z10 } from "zod";
25957
+ import { z as z11 } from "zod";
25909
25958
  function soakRefOf(record) {
25910
25959
  return `${record.signalKey}::${record.timestamp}`;
25911
25960
  }
25912
- var ReviewRecordSchema = z10.object({
25961
+ var ReviewRecordSchema = z11.object({
25913
25962
  /** Reference to the reviewed soak selection (`signalKey::timestamp`). */
25914
- soakRef: z10.string(),
25963
+ soakRef: z11.string(),
25915
25964
  /** ISO-8601 time the review was recorded. */
25916
- reviewedAt: z10.string(),
25965
+ reviewedAt: z11.string(),
25917
25966
  /** Always true — a persisted record is, by construction, a review. */
25918
- reviewed: z10.literal(true),
25967
+ reviewed: z11.literal(true),
25919
25968
  /** Whether the evaluator assessed the selection SOUND. */
25920
- sound: z10.boolean(),
25969
+ sound: z11.boolean(),
25921
25970
  /** Named evaluator who performed the review (required — the gate's named-evaluator criterion). */
25922
- evaluator: z10.string().min(1),
25971
+ evaluator: z11.string().min(1),
25923
25972
  /** Named owner accepting enforcement, recorded at sign-off time (optional per record). */
25924
- owner: z10.string().min(1).optional(),
25973
+ owner: z11.string().min(1).optional(),
25925
25974
  /** Free-text note (secret-scrubbed). */
25926
- note: z10.string().optional()
25975
+ note: z11.string().optional()
25927
25976
  });
25928
25977
  var REVIEW_MAX_RECORDS = 1e4;
25929
25978
  function getRemediationReviewFile() {
@@ -26069,12 +26118,12 @@ import { createHash as createHash3 } from "node:crypto";
26069
26118
  import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync11, rmSync as rmSync2, realpathSync as realpathSync2 } from "node:fs";
26070
26119
  import { dirname as dirname11, join as join22 } from "node:path";
26071
26120
  import { execFileSync as execFileSync5 } from "node:child_process";
26072
- import { z as z12 } from "zod";
26121
+ import { z as z13 } from "zod";
26073
26122
 
26074
26123
  // src/mcp/tools/codepr-guards.ts
26075
26124
  import { realpathSync } from "node:fs";
26076
26125
  import { isAbsolute as isAbsolute3, resolve as resolve13, relative as relative4, sep as sep3, dirname as dirname10, basename as basename5 } from "node:path";
26077
- import { z as z11 } from "zod";
26126
+ import { z as z12 } from "zod";
26078
26127
  function deny(reason, detail) {
26079
26128
  return { ok: false, reason, detail };
26080
26129
  }
@@ -26220,11 +26269,11 @@ function classifyPath(relPath) {
26220
26269
  }
26221
26270
  return { sensitive: false };
26222
26271
  }
26223
- var BlastRadiusLimitsSchema = z11.object({
26272
+ var BlastRadiusLimitsSchema = z12.object({
26224
26273
  /** Max number of files the change may touch. Default 20. */
26225
- maxFiles: z11.number().int().positive().default(20),
26274
+ maxFiles: z12.number().int().positive().default(20),
26226
26275
  /** Max total changed lines (added + removed across all files). Default 400. */
26227
- maxLines: z11.number().int().positive().default(400)
26276
+ maxLines: z12.number().int().positive().default(400)
26228
26277
  }).strict();
26229
26278
  var DEFAULT_BLAST_RADIUS_LIMITS = Object.freeze(
26230
26279
  BlastRadiusLimitsSchema.parse({})
@@ -26302,13 +26351,13 @@ function auditAutonomousEvent(logger22, record) {
26302
26351
  }
26303
26352
  return { ok: true };
26304
26353
  }
26305
- var ResourceBudgetLimitsSchema = z11.object({
26354
+ var ResourceBudgetLimitsSchema = z12.object({
26306
26355
  /** Wall-clock ceiling in ms. Default 600000 (10 min). */
26307
- maxWallClockMs: z11.number().int().positive().default(6e5),
26356
+ maxWallClockMs: z12.number().int().positive().default(6e5),
26308
26357
  /** Token ceiling. Default 200000. */
26309
- maxTokens: z11.number().int().positive().default(2e5),
26358
+ maxTokens: z12.number().int().positive().default(2e5),
26310
26359
  /** Tool-call ceiling. Default 200. */
26311
- maxToolCalls: z11.number().int().positive().default(200)
26360
+ maxToolCalls: z12.number().int().positive().default(200)
26312
26361
  }).strict();
26313
26362
  var DEFAULT_RESOURCE_BUDGET_LIMITS = Object.freeze(
26314
26363
  ResourceBudgetLimitsSchema.parse({})
@@ -26368,19 +26417,19 @@ function runGuard(name, fn) {
26368
26417
  }
26369
26418
 
26370
26419
  // src/mcp/tools/codepr-orchestrator.ts
26371
- var ProposedChangeSchema = z12.object({
26420
+ var ProposedChangeSchema = z13.object({
26372
26421
  /** Repo-relative path the change would write. */
26373
- relPath: z12.string().min(1),
26422
+ relPath: z13.string().min(1),
26374
26423
  /** The full new file content. */
26375
- newContent: z12.string()
26424
+ newContent: z13.string()
26376
26425
  }).strict();
26377
- var CodePrRunInputSchema = z12.object({
26426
+ var CodePrRunInputSchema = z13.object({
26378
26427
  /** Correlates all audit events for this run. */
26379
- runId: z12.string().min(1),
26428
+ runId: z13.string().min(1),
26380
26429
  /** Hash of the source signal (fitness/improvement) that triggered the run. */
26381
- sourceSignalHash: z12.string().min(1),
26430
+ sourceSignalHash: z13.string().min(1),
26382
26431
  /** The proposed change set. */
26383
- changes: z12.array(ProposedChangeSchema).min(1)
26432
+ changes: z13.array(ProposedChangeSchema).min(1)
26384
26433
  }).strict();
26385
26434
  var ORCHESTRATOR_USAGE_ZERO = { wallClockMs: 0, tokens: 0, toolCalls: 0 };
26386
26435
  function sha256(s) {
@@ -26591,20 +26640,20 @@ function planCodePrRun(input, logger22, options = {}) {
26591
26640
  }
26592
26641
 
26593
26642
  // src/mcp/tools/codepr-soak-store.ts
26594
- import { z as z13 } from "zod";
26595
- var CodePrSoakRecordSchema = z13.object({
26643
+ import { z as z14 } from "zod";
26644
+ var CodePrSoakRecordSchema = z14.object({
26596
26645
  /** ISO-8601 capture time. */
26597
- timestamp: z13.string(),
26646
+ timestamp: z14.string(),
26598
26647
  /** Correlates the data point to the dry-run's orchestrator runId. */
26599
- runId: z13.string(),
26648
+ runId: z14.string(),
26600
26649
  /** The improvement signal's stable key that triggered the dry-run. */
26601
- signalKey: z13.string(),
26650
+ signalKey: z14.string(),
26602
26651
  /** True when the dry-run plan succeeded with ZERO guard denial. */
26603
- green: z13.boolean(),
26652
+ green: z14.boolean(),
26604
26653
  /** The guard denial reason when `green` is false; omitted for a green plan. */
26605
- denialReason: z13.string().optional(),
26654
+ denialReason: z14.string().optional(),
26606
26655
  /** Files the dry-run plan touched (0 on denial before the diff was realized). */
26607
- filesTouched: z13.number().int().nonnegative()
26656
+ filesTouched: z14.number().int().nonnegative()
26608
26657
  }).strict();
26609
26658
  var CODEPR_SOAK_MAX_RECORDS = 1e4;
26610
26659
  function getCodePrSoakFile() {