nexus-agents 2.82.0 → 2.83.0

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 (125) hide show
  1. package/dist/{child-mcp-config-BMSYR7VV.js → child-mcp-config-XVPIO5HV.js} +2 -2
  2. package/dist/{chunk-OYDJ3C4N.js → chunk-2W4QJ27D.js} +3 -3
  3. package/dist/{chunk-BQ4YXGGQ.js → chunk-3ACDP4E6.js} +124 -2
  4. package/dist/chunk-3ACDP4E6.js.map +1 -0
  5. package/dist/{chunk-C7P2HLJX.js → chunk-3ASED5PR.js} +4 -4
  6. package/dist/{chunk-TXIUCEFT.js → chunk-3GJAAENS.js} +3 -3
  7. package/dist/{chunk-GNG7URCR.js → chunk-3WUVWZUC.js} +2 -2
  8. package/dist/{chunk-FTT2IYYX.js → chunk-4BXQ2OZY.js} +34 -16
  9. package/dist/chunk-4BXQ2OZY.js.map +1 -0
  10. package/dist/{chunk-SBZVRH4S.js → chunk-54UXPJVM.js} +2 -2
  11. package/dist/{chunk-QHL4KGNB.js → chunk-5T6SYCH2.js} +2 -2
  12. package/dist/{chunk-BL5IBHEY.js → chunk-6WDJ3IE4.js} +3 -3
  13. package/dist/{chunk-2R5UUBGA.js → chunk-AFPHR72D.js} +2 -2
  14. package/dist/{chunk-S36LIUV2.js → chunk-AINOJRZX.js} +7 -7
  15. package/dist/{chunk-HJUHDPXJ.js → chunk-BZUEUD4G.js} +3 -3
  16. package/dist/{chunk-2SQXJQTA.js → chunk-FHGDJKCZ.js} +16 -13
  17. package/dist/{chunk-2SQXJQTA.js.map → chunk-FHGDJKCZ.js.map} +1 -1
  18. package/dist/{chunk-XGUDCUMB.js → chunk-FI77TGBY.js} +2 -2
  19. package/dist/{chunk-7J7PNOJQ.js → chunk-HFOQKCD2.js} +22 -5
  20. package/dist/chunk-HFOQKCD2.js.map +1 -0
  21. package/dist/{chunk-PZESEBD3.js → chunk-L362KRSU.js} +2 -2
  22. package/dist/{chunk-HMXQKDUV.js → chunk-NLPMYBIV.js} +23 -7
  23. package/dist/chunk-NLPMYBIV.js.map +1 -0
  24. package/dist/{chunk-4XNVJS5A.js → chunk-PMLVZXAE.js} +763 -728
  25. package/dist/chunk-PMLVZXAE.js.map +1 -0
  26. package/dist/{chunk-JM3R267Z.js → chunk-PPBZQKRP.js} +5 -5
  27. package/dist/{chunk-WUUEKFKG.js → chunk-Q6PZMGLU.js} +2 -2
  28. package/dist/{chunk-W2AIGD35.js → chunk-RVRXKNND.js} +3 -3
  29. package/dist/{chunk-7VNVDFD5.js → chunk-RXVH52UI.js} +44 -18
  30. package/dist/{chunk-7VNVDFD5.js.map → chunk-RXVH52UI.js.map} +1 -1
  31. package/dist/{chunk-HVZ52LOL.js → chunk-U6LDVJS7.js} +2 -2
  32. package/dist/{chunk-X3JR3GMT.js → chunk-WGSRH5EQ.js} +3 -3
  33. package/dist/{chunk-SXL744NF.js → chunk-WJFUTRHX.js} +2 -2
  34. package/dist/{chunk-U7JXQSEM.js → chunk-YO27YAEX.js} +3 -3
  35. package/dist/{chunk-G2DZBEMU.js → chunk-Z64MSLEK.js} +2 -2
  36. package/dist/{chunk-NTLJ3INA.js → chunk-ZIWEEVMI.js} +2 -2
  37. package/dist/{chunk-SHWGK7X6.js → chunk-ZM5JKJHI.js} +2 -2
  38. package/dist/{cli-circuit-breaker-BIJUQRQI.js → cli-circuit-breaker-Y26NPPNO.js} +4 -4
  39. package/dist/cli.js +366 -344
  40. package/dist/cli.js.map +1 -1
  41. package/dist/codebase-search-ZFJUVMVR.js +8 -0
  42. package/dist/{composite-router-FB7P22L5.js → composite-router-X2ZYIEHH.js} +2 -2
  43. package/dist/{consensus-vote-KKAIFULI.js → consensus-vote-KZ6UURUI.js} +11 -11
  44. package/dist/{context-retriever-4JCGMWH7.js → context-retriever-QY4FNTDZ.js} +5 -5
  45. package/dist/{doctor-deep-7YK4BZIJ.js → doctor-deep-2E2GBMYR.js} +3 -3
  46. package/dist/expert-bridge-FHPWDFJX.js +13 -0
  47. package/dist/{factory-PK4EZL7K.js → factory-STNVY3Y3.js} +4 -4
  48. package/dist/{factory-DOWBGVAL.js → factory-W6KROBFN.js} +5 -5
  49. package/dist/index.d.ts +104 -60
  50. package/dist/index.js +100 -105
  51. package/dist/index.js.map +1 -1
  52. package/dist/{init-opencode-QP5CAMWN.js → init-opencode-6LVZ4CAQ.js} +5 -5
  53. package/dist/{issue-triage-T3SKNBH5.js → issue-triage-Y77JI7WF.js} +4 -4
  54. package/dist/{registry-command-TH7U6UMC.js → registry-command-P5VIAEOL.js} +2 -2
  55. package/dist/{repo-analyze-D2OY2QSR.js → repo-analyze-JZEMBE6R.js} +2 -2
  56. package/dist/{repo-security-plan-V257RYTW.js → repo-security-plan-RHSLO7H6.js} +4 -4
  57. package/dist/{research-helpers-synthesize-Y3O76PY4.js → research-helpers-synthesize-PVP6JRZV.js} +3 -3
  58. package/dist/{routing-memory-AAH7NIHD.js → routing-memory-QRIJPRVD.js} +2 -2
  59. package/dist/{session-memory-MY6YS2VX.js → session-memory-WARRGYY7.js} +3 -3
  60. package/dist/{setup-command-B6EC3OJA.js → setup-command-GMP5FI7F.js} +10 -10
  61. package/dist/{setup-config-HVO6ZSLW.js → setup-config-G3KKZM7O.js} +3 -3
  62. package/dist/{setup-custom-api-UOIKUQL4.js → setup-custom-api-B63X7ISD.js} +4 -4
  63. package/dist/{tool-memory-T7ZYIUJ2.js → tool-memory-E7JW4YLT.js} +4 -4
  64. package/dist/{weather-report-O3Z3BBAX.js → weather-report-RACZWJQL.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunk-4XNVJS5A.js.map +0 -1
  67. package/dist/chunk-7J7PNOJQ.js.map +0 -1
  68. package/dist/chunk-AP2FD37C.js +0 -127
  69. package/dist/chunk-AP2FD37C.js.map +0 -1
  70. package/dist/chunk-BQ4YXGGQ.js.map +0 -1
  71. package/dist/chunk-ED6VQWNG.js +0 -63
  72. package/dist/chunk-ED6VQWNG.js.map +0 -1
  73. package/dist/chunk-FTT2IYYX.js.map +0 -1
  74. package/dist/chunk-HMXQKDUV.js.map +0 -1
  75. package/dist/codebase-search-PIBRTGBE.js +0 -9
  76. package/dist/expert-bridge-DJM5GAWZ.js +0 -11
  77. package/dist/shared-memory-CM6T2MYE.js +0 -8
  78. package/dist/symbol-extractor-WYXPJH65.js +0 -10
  79. package/dist/tool-memory-T7ZYIUJ2.js.map +0 -1
  80. package/dist/weather-report-O3Z3BBAX.js.map +0 -1
  81. /package/dist/{child-mcp-config-BMSYR7VV.js.map → child-mcp-config-XVPIO5HV.js.map} +0 -0
  82. /package/dist/{chunk-OYDJ3C4N.js.map → chunk-2W4QJ27D.js.map} +0 -0
  83. /package/dist/{chunk-C7P2HLJX.js.map → chunk-3ASED5PR.js.map} +0 -0
  84. /package/dist/{chunk-TXIUCEFT.js.map → chunk-3GJAAENS.js.map} +0 -0
  85. /package/dist/{chunk-GNG7URCR.js.map → chunk-3WUVWZUC.js.map} +0 -0
  86. /package/dist/{chunk-SBZVRH4S.js.map → chunk-54UXPJVM.js.map} +0 -0
  87. /package/dist/{chunk-QHL4KGNB.js.map → chunk-5T6SYCH2.js.map} +0 -0
  88. /package/dist/{chunk-BL5IBHEY.js.map → chunk-6WDJ3IE4.js.map} +0 -0
  89. /package/dist/{chunk-2R5UUBGA.js.map → chunk-AFPHR72D.js.map} +0 -0
  90. /package/dist/{chunk-S36LIUV2.js.map → chunk-AINOJRZX.js.map} +0 -0
  91. /package/dist/{chunk-HJUHDPXJ.js.map → chunk-BZUEUD4G.js.map} +0 -0
  92. /package/dist/{chunk-XGUDCUMB.js.map → chunk-FI77TGBY.js.map} +0 -0
  93. /package/dist/{chunk-PZESEBD3.js.map → chunk-L362KRSU.js.map} +0 -0
  94. /package/dist/{chunk-JM3R267Z.js.map → chunk-PPBZQKRP.js.map} +0 -0
  95. /package/dist/{chunk-WUUEKFKG.js.map → chunk-Q6PZMGLU.js.map} +0 -0
  96. /package/dist/{chunk-W2AIGD35.js.map → chunk-RVRXKNND.js.map} +0 -0
  97. /package/dist/{chunk-HVZ52LOL.js.map → chunk-U6LDVJS7.js.map} +0 -0
  98. /package/dist/{chunk-X3JR3GMT.js.map → chunk-WGSRH5EQ.js.map} +0 -0
  99. /package/dist/{chunk-SXL744NF.js.map → chunk-WJFUTRHX.js.map} +0 -0
  100. /package/dist/{chunk-U7JXQSEM.js.map → chunk-YO27YAEX.js.map} +0 -0
  101. /package/dist/{chunk-G2DZBEMU.js.map → chunk-Z64MSLEK.js.map} +0 -0
  102. /package/dist/{chunk-NTLJ3INA.js.map → chunk-ZIWEEVMI.js.map} +0 -0
  103. /package/dist/{chunk-SHWGK7X6.js.map → chunk-ZM5JKJHI.js.map} +0 -0
  104. /package/dist/{cli-circuit-breaker-BIJUQRQI.js.map → cli-circuit-breaker-Y26NPPNO.js.map} +0 -0
  105. /package/dist/{codebase-search-PIBRTGBE.js.map → codebase-search-ZFJUVMVR.js.map} +0 -0
  106. /package/dist/{composite-router-FB7P22L5.js.map → composite-router-X2ZYIEHH.js.map} +0 -0
  107. /package/dist/{consensus-vote-KKAIFULI.js.map → consensus-vote-KZ6UURUI.js.map} +0 -0
  108. /package/dist/{context-retriever-4JCGMWH7.js.map → context-retriever-QY4FNTDZ.js.map} +0 -0
  109. /package/dist/{doctor-deep-7YK4BZIJ.js.map → doctor-deep-2E2GBMYR.js.map} +0 -0
  110. /package/dist/{expert-bridge-DJM5GAWZ.js.map → expert-bridge-FHPWDFJX.js.map} +0 -0
  111. /package/dist/{factory-DOWBGVAL.js.map → factory-STNVY3Y3.js.map} +0 -0
  112. /package/dist/{factory-PK4EZL7K.js.map → factory-W6KROBFN.js.map} +0 -0
  113. /package/dist/{init-opencode-QP5CAMWN.js.map → init-opencode-6LVZ4CAQ.js.map} +0 -0
  114. /package/dist/{issue-triage-T3SKNBH5.js.map → issue-triage-Y77JI7WF.js.map} +0 -0
  115. /package/dist/{registry-command-TH7U6UMC.js.map → registry-command-P5VIAEOL.js.map} +0 -0
  116. /package/dist/{repo-analyze-D2OY2QSR.js.map → repo-analyze-JZEMBE6R.js.map} +0 -0
  117. /package/dist/{repo-security-plan-V257RYTW.js.map → repo-security-plan-RHSLO7H6.js.map} +0 -0
  118. /package/dist/{research-helpers-synthesize-Y3O76PY4.js.map → research-helpers-synthesize-PVP6JRZV.js.map} +0 -0
  119. /package/dist/{routing-memory-AAH7NIHD.js.map → routing-memory-QRIJPRVD.js.map} +0 -0
  120. /package/dist/{session-memory-MY6YS2VX.js.map → session-memory-WARRGYY7.js.map} +0 -0
  121. /package/dist/{setup-command-B6EC3OJA.js.map → setup-command-GMP5FI7F.js.map} +0 -0
  122. /package/dist/{setup-config-HVO6ZSLW.js.map → setup-config-G3KKZM7O.js.map} +0 -0
  123. /package/dist/{setup-custom-api-UOIKUQL4.js.map → setup-custom-api-B63X7ISD.js.map} +0 -0
  124. /package/dist/{shared-memory-CM6T2MYE.js.map → tool-memory-E7JW4YLT.js.map} +0 -0
  125. /package/dist/{symbol-extractor-WYXPJH65.js.map → weather-report-RACZWJQL.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -12,18 +12,18 @@ import {
12
12
  parseFindings,
13
13
  sumFindings
14
14
  } from "./chunk-3RZWLQSC.js";
15
- import "./chunk-XGUDCUMB.js";
15
+ import "./chunk-FI77TGBY.js";
16
16
  import {
17
17
  buildOpenAICompatAdapters,
18
18
  loadUsageEvents,
19
19
  readOpenAICompatEnv,
20
20
  rollupByModel
21
- } from "./chunk-BL5IBHEY.js";
21
+ } from "./chunk-6WDJ3IE4.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-JM3R267Z.js";
26
- import "./chunk-SXL744NF.js";
25
+ } from "./chunk-PPBZQKRP.js";
26
+ import "./chunk-WJFUTRHX.js";
27
27
  import {
28
28
  AuthHandler,
29
29
  DEFAULT_EXPERTS,
@@ -36,6 +36,7 @@ import {
36
36
  PaperStatusSchema,
37
37
  PuppeteerOrchestrator,
38
38
  READONLY_POLICY,
39
+ REGISTERED_TOOL_NAMES,
39
40
  ResearchDiscoverInputSchema,
40
41
  SwarmObserver,
41
42
  ValidationDashboard,
@@ -151,23 +152,25 @@ import {
151
152
  runImprovementReview,
152
153
  saveSourcesRegistry,
153
154
  setGlobalToolRateLimiterFactory,
155
+ shutdownFeedbackSubscriber,
156
+ startFeedbackSubscriber,
154
157
  validateArgs,
155
158
  validateCommand,
156
159
  validateWorkflow,
157
160
  wrapInMarkdownFence
158
- } from "./chunk-4XNVJS5A.js";
159
- import "./chunk-AP2FD37C.js";
160
- import "./chunk-ED6VQWNG.js";
161
+ } from "./chunk-PMLVZXAE.js";
161
162
  import {
162
163
  resolveToken
163
- } from "./chunk-G2DZBEMU.js";
164
+ } from "./chunk-Z64MSLEK.js";
164
165
  import {
165
166
  CATEGORY_DISPLAY_NAMES,
166
167
  DEFAULT_PR_REVIEW_CONFIG
167
168
  } from "./chunk-X2M7OF27.js";
168
- import "./chunk-X3JR3GMT.js";
169
- import "./chunk-OYDJ3C4N.js";
170
- import "./chunk-HMXQKDUV.js";
169
+ import "./chunk-WGSRH5EQ.js";
170
+ import "./chunk-2W4QJ27D.js";
171
+ import {
172
+ shutdownExpertBridge
173
+ } from "./chunk-NLPMYBIV.js";
171
174
  import {
172
175
  DEFAULT_VOTE_TIMEOUT_MS,
173
176
  ErrorPolicySchema,
@@ -185,31 +188,31 @@ import {
185
188
  toolSuccessStructured,
186
189
  warnIfSimulatedOutsideTests,
187
190
  wrapToolWithTimeout
188
- } from "./chunk-FTT2IYYX.js";
189
- import "./chunk-NTLJ3INA.js";
190
- import "./chunk-SBZVRH4S.js";
191
+ } from "./chunk-4BXQ2OZY.js";
192
+ import "./chunk-54UXPJVM.js";
193
+ import "./chunk-ZIWEEVMI.js";
191
194
  import {
192
195
  loadPapersRegistry,
193
196
  loadTechniquesRegistry,
194
197
  savePapersRegistry,
195
198
  synthesizeResearch
196
- } from "./chunk-2R5UUBGA.js";
199
+ } from "./chunk-AFPHR72D.js";
197
200
  import {
198
201
  classifyTrust,
199
202
  createFullGitHubProvider,
200
203
  evaluatePolicy,
201
204
  parsePRUrl,
202
205
  sanitizeInput
203
- } from "./chunk-HJUHDPXJ.js";
204
- import "./chunk-PZESEBD3.js";
205
- import "./chunk-W2AIGD35.js";
206
- import "./chunk-7J7PNOJQ.js";
207
- import "./chunk-BQ4YXGGQ.js";
208
- import "./chunk-TXIUCEFT.js";
206
+ } from "./chunk-BZUEUD4G.js";
207
+ import "./chunk-L362KRSU.js";
208
+ import "./chunk-RVRXKNND.js";
209
+ import "./chunk-HFOQKCD2.js";
210
+ import "./chunk-3ACDP4E6.js";
211
+ import "./chunk-3GJAAENS.js";
209
212
  import {
210
213
  MemoryError,
211
214
  shutdownToolMemory
212
- } from "./chunk-U7JXQSEM.js";
215
+ } from "./chunk-YO27YAEX.js";
213
216
  import {
214
217
  CustomExpertDefinitionSchema,
215
218
  DATA_SUBDIRECTORIES,
@@ -228,12 +231,12 @@ import {
228
231
  loadConfig,
229
232
  runDoctor,
230
233
  validateNexusEnv
231
- } from "./chunk-S36LIUV2.js";
232
- import "./chunk-GNG7URCR.js";
233
- import "./chunk-WUUEKFKG.js";
234
+ } from "./chunk-AINOJRZX.js";
235
+ import "./chunk-3WUVWZUC.js";
236
+ import "./chunk-Q6PZMGLU.js";
234
237
  import {
235
238
  DEFAULTS
236
- } from "./chunk-SHWGK7X6.js";
239
+ } from "./chunk-ZM5JKJHI.js";
237
240
  import "./chunk-NUBSJGQZ.js";
238
241
  import {
239
242
  capitalize,
@@ -245,11 +248,11 @@ import {
245
248
  getAvailableClis,
246
249
  isRecord,
247
250
  probeAllClis
248
- } from "./chunk-2SQXJQTA.js";
249
- import "./chunk-QHL4KGNB.js";
251
+ } from "./chunk-FHGDJKCZ.js";
252
+ import "./chunk-5T6SYCH2.js";
250
253
  import "./chunk-ZM4O442V.js";
251
254
  import "./chunk-PQHVC4BD.js";
252
- import "./chunk-HVZ52LOL.js";
255
+ import "./chunk-U6LDVJS7.js";
253
256
  import {
254
257
  API_TIMEOUTS,
255
258
  AgentCapability,
@@ -317,7 +320,7 @@ import {
317
320
  validateTimeout,
318
321
  writeEmptyLine,
319
322
  writeLine
320
- } from "./chunk-7VNVDFD5.js";
323
+ } from "./chunk-RXVH52UI.js";
321
324
  import {
322
325
  applyPortableMode,
323
326
  detectSandbox,
@@ -5395,10 +5398,10 @@ _Generated by \`nexus-agents system-review\`_`;
5395
5398
  }
5396
5399
  function createIssue(result) {
5397
5400
  const date = getTimeProvider().nowDateString();
5398
- const body = createIssueBody(result).replace(/'/g, "'\\''");
5401
+ const body = createIssueBody(result);
5399
5402
  const out = safeExecSandboxed(
5400
- `gh issue create --title 'System Review: ${date}' --body '${body}' --label 'system-review'`,
5401
- { context: "gh" }
5403
+ `gh issue create --title 'System Review: ${date}' --body-file - --label 'system-review'`,
5404
+ { context: "gh", stdin: body }
5402
5405
  );
5403
5406
  if (out !== null) {
5404
5407
  const m = out.match(/https:\/\/github\.com\/[^\s]+/);
@@ -6106,6 +6109,9 @@ ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
6106
6109
  }
6107
6110
  }
6108
6111
 
6112
+ // src/cli/issue-command.ts
6113
+ import { z as z2 } from "zod";
6114
+
6109
6115
  // src/cli/issue-template-definitions.ts
6110
6116
  var FEAT_TEMPLATE = {
6111
6117
  type: "feat",
@@ -6421,26 +6427,48 @@ function generateTemplateBody(type) {
6421
6427
  }
6422
6428
 
6423
6429
  // src/cli/issue-command.ts
6430
+ var GhIssueJsonSchema = z2.object({
6431
+ number: z2.number(),
6432
+ title: z2.string(),
6433
+ body: z2.string().nullable(),
6434
+ state: z2.string(),
6435
+ labels: z2.array(z2.object({ name: z2.string() }))
6436
+ });
6424
6437
  function fetchGitHubIssue(issueNumber) {
6438
+ let output2;
6425
6439
  try {
6426
- const output2 = safeExecSandboxed(
6440
+ output2 = safeExecSandboxed(
6427
6441
  `gh issue view ${String(issueNumber)} --json number,title,body,state,labels`,
6428
6442
  { context: "gh" }
6429
6443
  );
6430
- if (output2 === null) {
6431
- return null;
6432
- }
6433
- const data = JSON.parse(output2);
6434
- return {
6435
- number: data.number,
6436
- title: data.title,
6437
- body: data.body ?? "",
6438
- state: data.state === "OPEN" ? "open" : "closed",
6439
- labels: data.labels.map((l) => l.name)
6440
- };
6441
6444
  } catch {
6442
6445
  return null;
6443
6446
  }
6447
+ if (output2 === null) return null;
6448
+ let parsed;
6449
+ try {
6450
+ parsed = JSON.parse(output2);
6451
+ } catch {
6452
+ process.stderr.write(`[issue-command] malformed JSON from gh: ${output2.slice(0, 200)}
6453
+ `);
6454
+ return null;
6455
+ }
6456
+ const result = GhIssueJsonSchema.safeParse(parsed);
6457
+ if (!result.success) {
6458
+ process.stderr.write(
6459
+ `[issue-command] gh issue view schema drift: ${result.error.message} (payload preview: ${output2.slice(0, 200)})
6460
+ `
6461
+ );
6462
+ return null;
6463
+ }
6464
+ const data = result.data;
6465
+ return {
6466
+ number: data.number,
6467
+ title: data.title,
6468
+ body: data.body ?? "",
6469
+ state: data.state === "OPEN" ? "open" : "closed",
6470
+ labels: data.labels.map((l) => l.name)
6471
+ };
6444
6472
  }
6445
6473
  function validateIssue(issueNumber) {
6446
6474
  const issue = fetchGitHubIssue(issueNumber);
@@ -7049,8 +7077,8 @@ import * as path7 from "path";
7049
7077
  import * as yaml3 from "yaml";
7050
7078
 
7051
7079
  // src/research/research-schemas.ts
7052
- import { z as z2 } from "zod";
7053
- var ResearchTopicSchema = z2.string().min(1);
7080
+ import { z as z3 } from "zod";
7081
+ var ResearchTopicSchema = z3.string().min(1);
7054
7082
  var RESEARCH_TOPICS = [
7055
7083
  "consensus",
7056
7084
  "routing",
@@ -7079,7 +7107,7 @@ var TOPIC_DESCRIPTIONS = {
7079
7107
  "tool-use": "Tool augmentation, function calling, and MCP",
7080
7108
  reasoning: "Reasoning, self-reflection, and search strategies"
7081
7109
  };
7082
- var TechniqueStatusSchema = z2.enum([
7110
+ var TechniqueStatusSchema = z3.enum([
7083
7111
  "implemented",
7084
7112
  "planned",
7085
7113
  "in-progress",
@@ -7087,95 +7115,95 @@ var TechniqueStatusSchema = z2.enum([
7087
7115
  "rejected"
7088
7116
  ]);
7089
7117
  var PaperStatusSchema2 = PaperStatusSchema;
7090
- var TechniquePrioritySchema = z2.enum(["P1", "P2", "P3", "P4"]).nullable();
7091
- var TechniqueComplexitySchema = z2.enum(["low", "medium", "high"]);
7092
- var RelevanceSchema = z2.enum(["high", "medium", "low"]);
7093
- var PaperSourceSchema = z2.enum(["arxiv", "conference", "journal", "preprint"]);
7094
- var DecisionHistoryEntrySchema = z2.object({
7095
- date: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD format"),
7096
- decision: z2.string().min(1),
7097
- rationale: z2.string().min(1)
7118
+ var TechniquePrioritySchema = z3.enum(["P1", "P2", "P3", "P4"]).nullable();
7119
+ var TechniqueComplexitySchema = z3.enum(["low", "medium", "high"]);
7120
+ var RelevanceSchema = z3.enum(["high", "medium", "low"]);
7121
+ var PaperSourceSchema = z3.enum(["arxiv", "conference", "journal", "preprint"]);
7122
+ var DecisionHistoryEntrySchema = z3.object({
7123
+ date: z3.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD format"),
7124
+ decision: z3.string().min(1),
7125
+ rationale: z3.string().min(1)
7098
7126
  });
7099
- var ResearchPaperSchema = z2.object({
7127
+ var ResearchPaperSchema = z3.object({
7100
7128
  /** Paper title (required) */
7101
- title: z2.string().min(1),
7129
+ title: z3.string().min(1),
7102
7130
  /** Paper authors */
7103
- authors: z2.array(z2.string()).optional().default([]),
7131
+ authors: z3.array(z3.string()).optional().default([]),
7104
7132
  /** Source type */
7105
7133
  source: PaperSourceSchema.optional(),
7106
7134
  /** arXiv ID (e.g., '2501.06322') */
7107
- arxiv_id: z2.string().optional(),
7135
+ arxiv_id: z3.string().optional(),
7108
7136
  /** URL to the paper */
7109
7137
  // eslint-disable-next-line @typescript-eslint/no-deprecated -- z.url() fails at runtime despite being recommended
7110
- url: z2.string().url().optional(),
7138
+ url: z3.string().url().optional(),
7111
7139
  /** Publication date (YYYY-MM format) */
7112
- publication_date: z2.string().optional(),
7140
+ publication_date: z3.string().optional(),
7113
7141
  /** Publication venue */
7114
- venue: z2.string().nullable().optional(),
7142
+ venue: z3.string().nullable().optional(),
7115
7143
  /**
7116
7144
  * Research topics (array).
7117
7145
  * First topic is considered primary for counting purposes.
7118
7146
  */
7119
- topics: z2.array(z2.string()).optional().default([]),
7147
+ topics: z3.array(z3.string()).optional().default([]),
7120
7148
  /** Tags for searching */
7121
- tags: z2.array(z2.string()).optional().default([]),
7149
+ tags: z3.array(z3.string()).optional().default([]),
7122
7150
  /** Date when the paper was reviewed (YYYY-MM-DD) */
7123
- reviewed_date: z2.string().optional(),
7151
+ reviewed_date: z3.string().optional(),
7124
7152
  /** File where the paper is reviewed */
7125
- reviewed_in: z2.string().optional(),
7153
+ reviewed_in: z3.string().optional(),
7126
7154
  /** Summary of the paper */
7127
- summary: z2.string().optional(),
7155
+ summary: z3.string().optional(),
7128
7156
  /** Key findings from the paper */
7129
- key_findings: z2.array(z2.string()).optional().default([]),
7157
+ key_findings: z3.array(z3.string()).optional().default([]),
7130
7158
  /** Relevance to the project */
7131
7159
  relevance: RelevanceSchema.optional(),
7132
7160
  /** Techniques extracted from this paper */
7133
- techniques_extracted: z2.array(z2.string()).optional().default([]),
7161
+ techniques_extracted: z3.array(z3.string()).optional().default([]),
7134
7162
  /** Related GitHub issues */
7135
- related_issues: z2.array(z2.number().int().positive()).optional().default([]),
7163
+ related_issues: z3.array(z3.number().int().positive()).optional().default([]),
7136
7164
  /** Implementation status */
7137
7165
  implementation_status: PaperStatusSchema2.optional().default("not-started"),
7138
7166
  // ── Quality Assessment (Issue #1571) ──────────────────────────
7139
7167
  /** Citation count from Semantic Scholar (auto-fetched) */
7140
- citation_count: z2.number().nonnegative().optional(),
7168
+ citation_count: z3.number().nonnegative().optional(),
7141
7169
  /** Venue quality tier: 3=top (NeurIPS/ICML/ICLR), 2=good, 1=workshop, 0=preprint */
7142
- venue_tier: z2.number().min(0).max(3).optional(),
7170
+ venue_tier: z3.number().min(0).max(3).optional(),
7143
7171
  /** Whether the paper links to a code repository */
7144
- has_code: z2.boolean().optional(),
7172
+ has_code: z3.boolean().optional(),
7145
7173
  /** Code repository URL (from Papers With Code or manual) */
7146
- code_url: z2.string().optional(),
7174
+ code_url: z3.string().optional(),
7147
7175
  /** Rigor assessment tags (factual, verifiable signals) */
7148
- rigor_tags: z2.array(
7149
- z2.enum(["has-code", "has-dataset", "has-baselines", "peer-reviewed", "single-model-eval"])
7176
+ rigor_tags: z3.array(
7177
+ z3.enum(["has-code", "has-dataset", "has-baselines", "peer-reviewed", "single-model-eval"])
7150
7178
  ).optional().default([]),
7151
7179
  /** Composite quality score (0-10, auto-computed from signals) */
7152
- quality_score: z2.number().min(0).max(10).optional(),
7180
+ quality_score: z3.number().min(0).max(10).optional(),
7153
7181
  /** Evidence confidence tier for extracted techniques */
7154
- evidence_tier: z2.enum(["high", "medium", "low"]).optional(),
7182
+ evidence_tier: z3.enum(["high", "medium", "low"]).optional(),
7155
7183
  /** Why this paper scored low — enables future re-review when conditions change */
7156
- quality_notes: z2.string().optional(),
7184
+ quality_notes: z3.string().optional(),
7157
7185
  /** When quality was last assessed (ISO date) — enables periodic re-review */
7158
- last_quality_check: z2.string().optional()
7186
+ last_quality_check: z3.string().optional()
7159
7187
  });
7160
- var IntegrationFileObjectSchema = z2.object({
7161
- path: z2.string(),
7162
- type: z2.enum(["primary", "test", "types", "helpers"]).optional(),
7163
- required: z2.boolean().default(true)
7188
+ var IntegrationFileObjectSchema = z3.object({
7189
+ path: z3.string(),
7190
+ type: z3.enum(["primary", "test", "types", "helpers"]).optional(),
7191
+ required: z3.boolean().default(true)
7164
7192
  });
7165
- var IntegrationFileSchema = z2.union([z2.string(), IntegrationFileObjectSchema]);
7166
- var ResearchTechniqueSchema = z2.object({
7193
+ var IntegrationFileSchema = z3.union([z3.string(), IntegrationFileObjectSchema]);
7194
+ var ResearchTechniqueSchema = z3.object({
7167
7195
  /** Technique name (required) */
7168
- name: z2.string().min(1),
7196
+ name: z3.string().min(1),
7169
7197
  /** Description of the technique (required) */
7170
- description: z2.string().min(1),
7198
+ description: z3.string().min(1),
7171
7199
  /** Source papers (arXiv IDs or paper IDs) */
7172
- source_papers: z2.array(z2.string()).optional().default([]),
7200
+ source_papers: z3.array(z3.string()).optional().default([]),
7173
7201
  /** Primary topic (required) */
7174
7202
  topic: ResearchTopicSchema,
7175
7203
  /** Tags for searching */
7176
- tags: z2.array(z2.string()).optional().default([]),
7204
+ tags: z3.array(z3.string()).optional().default([]),
7177
7205
  /** Metrics associated with this technique */
7178
- metrics: z2.record(z2.string(), z2.string()).optional().default({}),
7206
+ metrics: z3.record(z3.string(), z3.string()).optional().default({}),
7179
7207
  /** Implementation status (required) */
7180
7208
  status: TechniqueStatusSchema,
7181
7209
  /** Priority level */
@@ -7183,35 +7211,35 @@ var ResearchTechniqueSchema = z2.object({
7183
7211
  /** Complexity level */
7184
7212
  complexity: TechniqueComplexitySchema.optional(),
7185
7213
  /** Files where this technique is implemented */
7186
- integration_files: z2.array(IntegrationFileSchema).optional().default([]),
7214
+ integration_files: z3.array(IntegrationFileSchema).optional().default([]),
7187
7215
  /** GitHub issue number for implementation */
7188
- implementation_issue: z2.number().int().positive().nullable().optional().default(null),
7216
+ implementation_issue: z3.number().int().positive().nullable().optional().default(null),
7189
7217
  /** Related PR numbers */
7190
- related_prs: z2.array(z2.number().int().positive()).optional().default([]),
7218
+ related_prs: z3.array(z3.number().int().positive()).optional().default([]),
7191
7219
  /** Implementation notes */
7192
- notes: z2.string().optional(),
7220
+ notes: z3.string().optional(),
7193
7221
  /** Dependent techniques */
7194
- dependencies: z2.array(z2.string()).optional().default([]),
7222
+ dependencies: z3.array(z3.string()).optional().default([]),
7195
7223
  /** Decision history */
7196
- decision_history: z2.array(DecisionHistoryEntrySchema).optional().default([]),
7224
+ decision_history: z3.array(DecisionHistoryEntrySchema).optional().default([]),
7197
7225
  // ── Evaluation Plan (Issue #1576 Wave 6) ──────────────────────
7198
7226
  /** Structured evaluation plan for keeping or removing the technique */
7199
- evaluation_plan: z2.object({
7200
- success_criteria: z2.string().optional(),
7201
- evaluation_method: z2.string().optional(),
7202
- evaluation_deadline: z2.string().optional(),
7203
- removal_criteria: z2.string().optional()
7227
+ evaluation_plan: z3.object({
7228
+ success_criteria: z3.string().optional(),
7229
+ evaluation_method: z3.string().optional(),
7230
+ evaluation_deadline: z3.string().optional(),
7231
+ removal_criteria: z3.string().optional()
7204
7232
  }).optional(),
7205
7233
  /** Evaluation status: pending (not yet evaluated), passed, failed, deferred */
7206
- evaluation_status: z2.enum(["pending", "passed", "failed", "deferred"]).optional()
7234
+ evaluation_status: z3.enum(["pending", "passed", "failed", "deferred"]).optional()
7207
7235
  });
7208
- var PapersRegistrySchema = z2.object({
7209
- schema_version: z2.string(),
7210
- papers: z2.record(z2.string(), ResearchPaperSchema)
7236
+ var PapersRegistrySchema = z3.object({
7237
+ schema_version: z3.string(),
7238
+ papers: z3.record(z3.string(), ResearchPaperSchema)
7211
7239
  });
7212
- var TechniquesRegistrySchema = z2.object({
7213
- schema_version: z2.string(),
7214
- techniques: z2.record(z2.string(), ResearchTechniqueSchema)
7240
+ var TechniquesRegistrySchema = z3.object({
7241
+ schema_version: z3.string(),
7242
+ techniques: z3.record(z3.string(), ResearchTechniqueSchema)
7215
7243
  });
7216
7244
  function getIntegrationFilePath(file) {
7217
7245
  if (typeof file === "string") {
@@ -8679,54 +8707,54 @@ import * as path17 from "path";
8679
8707
  import * as yaml6 from "yaml";
8680
8708
 
8681
8709
  // src/indexer/types.ts
8682
- import { z as z3 } from "zod";
8710
+ import { z as z4 } from "zod";
8683
8711
  var SCHEMA_VERSION = "1.0";
8684
- var ExportEntrySchema = z3.object({
8685
- name: z3.string(),
8686
- kind: z3.enum(["type", "interface", "class", "function", "const", "enum", "unknown"]),
8687
- isReExport: z3.boolean(),
8688
- sourceModule: z3.string().optional()
8712
+ var ExportEntrySchema = z4.object({
8713
+ name: z4.string(),
8714
+ kind: z4.enum(["type", "interface", "class", "function", "const", "enum", "unknown"]),
8715
+ isReExport: z4.boolean(),
8716
+ sourceModule: z4.string().optional()
8689
8717
  });
8690
- var DependencyEntrySchema = z3.object({
8691
- specifier: z3.string(),
8692
- isExternal: z3.boolean(),
8693
- imports: z3.array(z3.string()).readonly()
8718
+ var DependencyEntrySchema = z4.object({
8719
+ specifier: z4.string(),
8720
+ isExternal: z4.boolean(),
8721
+ imports: z4.array(z4.string()).readonly()
8694
8722
  });
8695
- var FileEntrySchema = z3.object({
8696
- path: z3.string(),
8697
- lines: z3.number().int().nonnegative(),
8698
- category: z3.enum(["types", "implementation", "test", "config", "cli", "util", "index"]),
8699
- exports: z3.array(ExportEntrySchema).readonly(),
8700
- dependencies: z3.array(DependencyEntrySchema).readonly(),
8701
- description: z3.string().optional()
8723
+ var FileEntrySchema = z4.object({
8724
+ path: z4.string(),
8725
+ lines: z4.number().int().nonnegative(),
8726
+ category: z4.enum(["types", "implementation", "test", "config", "cli", "util", "index"]),
8727
+ exports: z4.array(ExportEntrySchema).readonly(),
8728
+ dependencies: z4.array(DependencyEntrySchema).readonly(),
8729
+ description: z4.string().optional()
8702
8730
  });
8703
- var ModuleStatsSchema = z3.object({
8704
- fileCount: z3.number().int().nonnegative(),
8705
- totalLines: z3.number().int().nonnegative(),
8706
- exportCount: z3.number().int().nonnegative(),
8707
- internalDeps: z3.number().int().nonnegative(),
8708
- externalDeps: z3.number().int().nonnegative()
8731
+ var ModuleStatsSchema = z4.object({
8732
+ fileCount: z4.number().int().nonnegative(),
8733
+ totalLines: z4.number().int().nonnegative(),
8734
+ exportCount: z4.number().int().nonnegative(),
8735
+ internalDeps: z4.number().int().nonnegative(),
8736
+ externalDeps: z4.number().int().nonnegative()
8709
8737
  });
8710
- var ModuleEntrySchema = z3.object({
8711
- name: z3.string(),
8712
- path: z3.string(),
8713
- purpose: z3.string(),
8714
- files: z3.array(FileEntrySchema).readonly(),
8738
+ var ModuleEntrySchema = z4.object({
8739
+ name: z4.string(),
8740
+ path: z4.string(),
8741
+ purpose: z4.string(),
8742
+ files: z4.array(FileEntrySchema).readonly(),
8715
8743
  stats: ModuleStatsSchema,
8716
- dependsOn: z3.array(z3.string()).readonly()
8744
+ dependsOn: z4.array(z4.string()).readonly()
8717
8745
  });
8718
- var IndexStatsSchema = z3.object({
8719
- totalFiles: z3.number().int().nonnegative(),
8720
- totalLines: z3.number().int().nonnegative(),
8721
- totalExports: z3.number().int().nonnegative(),
8722
- moduleCount: z3.number().int().nonnegative(),
8723
- externalPackages: z3.array(z3.string()).readonly()
8746
+ var IndexStatsSchema = z4.object({
8747
+ totalFiles: z4.number().int().nonnegative(),
8748
+ totalLines: z4.number().int().nonnegative(),
8749
+ totalExports: z4.number().int().nonnegative(),
8750
+ moduleCount: z4.number().int().nonnegative(),
8751
+ externalPackages: z4.array(z4.string()).readonly()
8724
8752
  });
8725
- var CodebaseIndexSchema = z3.object({
8726
- schemaVersion: z3.literal(SCHEMA_VERSION),
8727
- generatedAt: z3.string(),
8753
+ var CodebaseIndexSchema = z4.object({
8754
+ schemaVersion: z4.literal(SCHEMA_VERSION),
8755
+ generatedAt: z4.string(),
8728
8756
  stats: IndexStatsSchema,
8729
- modules: z3.record(z3.string(), ModuleEntrySchema)
8757
+ modules: z4.record(z4.string(), ModuleEntrySchema)
8730
8758
  });
8731
8759
  var DEFAULT_EXTRACTOR_OPTIONS = {
8732
8760
  rootDir: "src",
@@ -9308,43 +9336,43 @@ function validateIndex(index, currentFiles) {
9308
9336
  }
9309
9337
 
9310
9338
  // src/indexer/entrypoint-types.ts
9311
- import { z as z4 } from "zod";
9339
+ import { z as z5 } from "zod";
9312
9340
  var ENTRYPOINT_SCHEMA_VERSION = "1.0";
9313
- var OptionSpecSchema = z4.object({
9314
- name: z4.string(),
9315
- type: z4.string(),
9316
- description: z4.string().optional(),
9317
- required: z4.boolean().optional(),
9318
- default: z4.string().optional(),
9319
- short: z4.string().optional()
9341
+ var OptionSpecSchema = z5.object({
9342
+ name: z5.string(),
9343
+ type: z5.string(),
9344
+ description: z5.string().optional(),
9345
+ required: z5.boolean().optional(),
9346
+ default: z5.string().optional(),
9347
+ short: z5.string().optional()
9320
9348
  });
9321
- var ParameterSpecSchema = z4.object({
9322
- name: z4.string(),
9323
- type: z4.string(),
9324
- description: z4.string().optional(),
9325
- required: z4.boolean().optional(),
9326
- default: z4.string().optional()
9349
+ var ParameterSpecSchema = z5.object({
9350
+ name: z5.string(),
9351
+ type: z5.string(),
9352
+ description: z5.string().optional(),
9353
+ required: z5.boolean().optional(),
9354
+ default: z5.string().optional()
9327
9355
  });
9328
- var CliCommandSpecSchema = z4.object({
9329
- name: z4.string(),
9330
- description: z4.string(),
9331
- subcommands: z4.array(z4.string()).readonly().optional(),
9332
- options: z4.array(OptionSpecSchema).readonly().optional(),
9333
- source_file: z4.string(),
9334
- source_line: z4.number().int().positive()
9356
+ var CliCommandSpecSchema = z5.object({
9357
+ name: z5.string(),
9358
+ description: z5.string(),
9359
+ subcommands: z5.array(z5.string()).readonly().optional(),
9360
+ options: z5.array(OptionSpecSchema).readonly().optional(),
9361
+ source_file: z5.string(),
9362
+ source_line: z5.number().int().positive()
9335
9363
  });
9336
- var McpToolSpecSchema = z4.object({
9337
- name: z4.string(),
9338
- description: z4.string(),
9339
- parameters: z4.array(ParameterSpecSchema).readonly(),
9340
- source_file: z4.string(),
9341
- source_line: z4.number().int().positive()
9364
+ var McpToolSpecSchema = z5.object({
9365
+ name: z5.string(),
9366
+ description: z5.string(),
9367
+ parameters: z5.array(ParameterSpecSchema).readonly(),
9368
+ source_file: z5.string(),
9369
+ source_line: z5.number().int().positive()
9342
9370
  });
9343
- var EntrypointManifestSchema = z4.object({
9344
- schema_version: z4.literal(ENTRYPOINT_SCHEMA_VERSION),
9345
- generated_at: z4.string(),
9346
- cli_commands: z4.array(CliCommandSpecSchema).readonly(),
9347
- mcp_tools: z4.array(McpToolSpecSchema).readonly()
9371
+ var EntrypointManifestSchema = z5.object({
9372
+ schema_version: z5.literal(ENTRYPOINT_SCHEMA_VERSION),
9373
+ generated_at: z5.string(),
9374
+ cli_commands: z5.array(CliCommandSpecSchema).readonly(),
9375
+ mcp_tools: z5.array(McpToolSpecSchema).readonly()
9348
9376
  });
9349
9377
  var DEFAULT_ENTRYPOINT_EXTRACTOR_OPTIONS = {
9350
9378
  packageRoot: "packages/nexus-agents",
@@ -9558,6 +9586,11 @@ var COMMAND_CATALOG = [
9558
9586
  description: "Relocate homedir state (sessions, checkpoints, traces, runs, audit, pipeline, tasks) into <repo>/.nexus-agents/ for users adopting NEXUS_REPO_PREFERRED=1. Cross-repo state stays homedir. --dry-run for a no-op plan. Epic #2872.",
9559
9587
  audience: "advanced"
9560
9588
  },
9589
+ {
9590
+ command: "init",
9591
+ description: "Initialize portable nexus-agents config in a repo. Flags: --portable (#2305/#2308/#2311), --install / --uninstall (#2311), --gitignore, --mcp-config, --opencode <path> (#2504), --force, --dry-run.",
9592
+ audience: "advanced"
9593
+ },
9561
9594
  {
9562
9595
  command: "review",
9563
9596
  description: "Review a GitHub PR (dogfooding helper)",
@@ -11232,32 +11265,32 @@ function learningMetricsCommand(options, context) {
11232
11265
  }
11233
11266
 
11234
11267
  // src/cli/config-command-types.ts
11235
- import { z as z5 } from "zod";
11268
+ import { z as z6 } from "zod";
11236
11269
  var CONFIG_ACTIONS = ["get", "set", "list", "reset", "export", "import"];
11237
11270
  var CONFIG_FORMATS = ["json", "yaml"];
11238
- var ConfigCommandOptionsSchema = z5.object({
11271
+ var ConfigCommandOptionsSchema = z6.object({
11239
11272
  /** Command action */
11240
- action: z5.enum(CONFIG_ACTIONS),
11273
+ action: z6.enum(CONFIG_ACTIONS),
11241
11274
  /** Configuration key (dot notation supported) */
11242
- key: z5.string().optional(),
11275
+ key: z6.string().optional(),
11243
11276
  /** Value to set */
11244
- value: z5.string().optional(),
11277
+ value: z6.string().optional(),
11245
11278
  /** File path for import/export */
11246
- file: z5.string().optional(),
11279
+ file: z6.string().optional(),
11247
11280
  /** Export format */
11248
- format: z5.enum(CONFIG_FORMATS).default("json"),
11281
+ format: z6.enum(CONFIG_FORMATS).default("json"),
11249
11282
  /** Force overwrite without backup */
11250
- force: z5.boolean().default(false),
11283
+ force: z6.boolean().default(false),
11251
11284
  /** Show verbose output */
11252
- verbose: z5.boolean().default(false)
11285
+ verbose: z6.boolean().default(false)
11253
11286
  });
11254
- var ParsedConfigKeySchema = z5.object({
11287
+ var ParsedConfigKeySchema = z6.object({
11255
11288
  /** Full key string */
11256
- fullKey: z5.string(),
11289
+ fullKey: z6.string(),
11257
11290
  /** Category portion */
11258
- category: z5.string(),
11291
+ category: z6.string(),
11259
11292
  /** Key within category */
11260
- key: z5.string()
11293
+ key: z6.string()
11261
11294
  });
11262
11295
  var ConfigCommandError = class extends Error {
11263
11296
  code;
@@ -11925,8 +11958,8 @@ async function configCommand(options) {
11925
11958
  }
11926
11959
 
11927
11960
  // src/cli/hooks/hook-types.ts
11928
- import { z as z6 } from "zod";
11929
- var HookEventName = z6.enum([
11961
+ import { z as z7 } from "zod";
11962
+ var HookEventName = z7.enum([
11930
11963
  "SessionStart",
11931
11964
  "UserPromptSubmit",
11932
11965
  "PreToolUse",
@@ -11941,100 +11974,100 @@ var HookEventName = z6.enum([
11941
11974
  "Notification",
11942
11975
  "Setup"
11943
11976
  ]);
11944
- var PermissionMode = z6.enum([
11977
+ var PermissionMode = z7.enum([
11945
11978
  "default",
11946
11979
  "plan",
11947
11980
  "acceptEdits",
11948
11981
  "dontAsk",
11949
11982
  "bypassPermissions"
11950
11983
  ]);
11951
- var HookInputBaseSchema = z6.object({
11952
- session_id: z6.string(),
11953
- transcript_path: z6.string(),
11954
- cwd: z6.string(),
11984
+ var HookInputBaseSchema = z7.object({
11985
+ session_id: z7.string(),
11986
+ transcript_path: z7.string(),
11987
+ cwd: z7.string(),
11955
11988
  permission_mode: PermissionMode,
11956
11989
  hook_event_name: HookEventName
11957
11990
  });
11958
- var SessionStartSource = z6.enum(["startup", "resume", "clear", "compact"]);
11991
+ var SessionStartSource = z7.enum(["startup", "resume", "clear", "compact"]);
11959
11992
  var SessionStartInputSchema = HookInputBaseSchema.extend({
11960
- hook_event_name: z6.literal("SessionStart"),
11993
+ hook_event_name: z7.literal("SessionStart"),
11961
11994
  source: SessionStartSource,
11962
- model: z6.string().optional(),
11963
- agent_type: z6.string().optional()
11995
+ model: z7.string().optional(),
11996
+ agent_type: z7.string().optional()
11964
11997
  });
11965
- var SessionEndReason = z6.enum(["clear", "logout", "prompt_input_exit", "other"]);
11998
+ var SessionEndReason = z7.enum(["clear", "logout", "prompt_input_exit", "other"]);
11966
11999
  var SessionEndInputSchema = HookInputBaseSchema.extend({
11967
- hook_event_name: z6.literal("SessionEnd"),
12000
+ hook_event_name: z7.literal("SessionEnd"),
11968
12001
  reason: SessionEndReason
11969
12002
  });
11970
12003
  var PreToolUseInputSchema = HookInputBaseSchema.extend({
11971
- hook_event_name: z6.literal("PreToolUse"),
11972
- tool_name: z6.string(),
11973
- tool_input: z6.record(z6.string(), z6.unknown()),
11974
- tool_use_id: z6.string()
12004
+ hook_event_name: z7.literal("PreToolUse"),
12005
+ tool_name: z7.string(),
12006
+ tool_input: z7.record(z7.string(), z7.unknown()),
12007
+ tool_use_id: z7.string()
11975
12008
  });
11976
12009
  var PostToolUseInputSchema = HookInputBaseSchema.extend({
11977
- hook_event_name: z6.literal("PostToolUse"),
11978
- tool_name: z6.string(),
11979
- tool_input: z6.record(z6.string(), z6.unknown()),
11980
- tool_response: z6.record(z6.string(), z6.unknown()),
11981
- tool_use_id: z6.string()
12010
+ hook_event_name: z7.literal("PostToolUse"),
12011
+ tool_name: z7.string(),
12012
+ tool_input: z7.record(z7.string(), z7.unknown()),
12013
+ tool_response: z7.record(z7.string(), z7.unknown()),
12014
+ tool_use_id: z7.string()
11982
12015
  });
11983
12016
  var PostToolUseFailureInputSchema = HookInputBaseSchema.extend({
11984
- hook_event_name: z6.literal("PostToolUseFailure"),
11985
- tool_name: z6.string(),
11986
- tool_input: z6.record(z6.string(), z6.unknown()),
11987
- tool_use_id: z6.string(),
11988
- error: z6.string().optional()
12017
+ hook_event_name: z7.literal("PostToolUseFailure"),
12018
+ tool_name: z7.string(),
12019
+ tool_input: z7.record(z7.string(), z7.unknown()),
12020
+ tool_use_id: z7.string(),
12021
+ error: z7.string().optional()
11989
12022
  });
11990
12023
  var StopInputSchema = HookInputBaseSchema.extend({
11991
- hook_event_name: z6.literal("Stop"),
11992
- stop_hook_active: z6.boolean()
12024
+ hook_event_name: z7.literal("Stop"),
12025
+ stop_hook_active: z7.boolean()
11993
12026
  });
11994
12027
  var SubagentStopInputSchema = HookInputBaseSchema.extend({
11995
- hook_event_name: z6.literal("SubagentStop"),
11996
- stop_hook_active: z6.boolean(),
11997
- agent_id: z6.string(),
11998
- agent_transcript_path: z6.string()
12028
+ hook_event_name: z7.literal("SubagentStop"),
12029
+ stop_hook_active: z7.boolean(),
12030
+ agent_id: z7.string(),
12031
+ agent_transcript_path: z7.string()
11999
12032
  });
12000
12033
  var UserPromptSubmitInputSchema = HookInputBaseSchema.extend({
12001
- hook_event_name: z6.literal("UserPromptSubmit"),
12002
- prompt: z6.string()
12034
+ hook_event_name: z7.literal("UserPromptSubmit"),
12035
+ prompt: z7.string()
12003
12036
  });
12004
- var NotificationType = z6.enum([
12037
+ var NotificationType = z7.enum([
12005
12038
  "permission_prompt",
12006
12039
  "idle_prompt",
12007
12040
  "auth_success",
12008
12041
  "elicitation_dialog"
12009
12042
  ]);
12010
12043
  var NotificationInputSchema = HookInputBaseSchema.extend({
12011
- hook_event_name: z6.literal("Notification"),
12012
- message: z6.string(),
12044
+ hook_event_name: z7.literal("Notification"),
12045
+ message: z7.string(),
12013
12046
  notification_type: NotificationType
12014
12047
  });
12015
- var PreCompactTrigger = z6.enum(["manual", "auto"]);
12048
+ var PreCompactTrigger = z7.enum(["manual", "auto"]);
12016
12049
  var PreCompactInputSchema = HookInputBaseSchema.extend({
12017
- hook_event_name: z6.literal("PreCompact"),
12050
+ hook_event_name: z7.literal("PreCompact"),
12018
12051
  trigger: PreCompactTrigger,
12019
- custom_instructions: z6.string().optional()
12052
+ custom_instructions: z7.string().optional()
12020
12053
  });
12021
- var SetupTrigger = z6.enum(["init", "maintenance"]);
12054
+ var SetupTrigger = z7.enum(["init", "maintenance"]);
12022
12055
  var SetupInputSchema = HookInputBaseSchema.extend({
12023
- hook_event_name: z6.literal("Setup"),
12056
+ hook_event_name: z7.literal("Setup"),
12024
12057
  trigger: SetupTrigger
12025
12058
  });
12026
12059
  var SubagentStartInputSchema = HookInputBaseSchema.extend({
12027
- hook_event_name: z6.literal("SubagentStart"),
12028
- agent_id: z6.string(),
12029
- agent_type: z6.string()
12060
+ hook_event_name: z7.literal("SubagentStart"),
12061
+ agent_id: z7.string(),
12062
+ agent_type: z7.string()
12030
12063
  });
12031
12064
  var PermissionRequestInputSchema = HookInputBaseSchema.extend({
12032
- hook_event_name: z6.literal("PermissionRequest"),
12033
- tool_name: z6.string(),
12034
- tool_input: z6.record(z6.string(), z6.unknown()),
12035
- tool_use_id: z6.string()
12065
+ hook_event_name: z7.literal("PermissionRequest"),
12066
+ tool_name: z7.string(),
12067
+ tool_input: z7.record(z7.string(), z7.unknown()),
12068
+ tool_use_id: z7.string()
12036
12069
  });
12037
- var HookInputSchema = z6.discriminatedUnion("hook_event_name", [
12070
+ var HookInputSchema = z7.discriminatedUnion("hook_event_name", [
12038
12071
  SessionStartInputSchema,
12039
12072
  SessionEndInputSchema,
12040
12073
  PreToolUseInputSchema,
@@ -12049,57 +12082,57 @@ var HookInputSchema = z6.discriminatedUnion("hook_event_name", [
12049
12082
  SubagentStartInputSchema,
12050
12083
  PermissionRequestInputSchema
12051
12084
  ]);
12052
- var PermissionDecision = z6.enum(["allow", "deny", "ask"]);
12053
- var HookDecision = z6.enum(["block"]);
12054
- var HookOutputBaseSchema = z6.object({
12055
- continue: z6.boolean().optional(),
12056
- stopReason: z6.string().optional(),
12057
- suppressOutput: z6.boolean().optional(),
12058
- systemMessage: z6.string().optional()
12085
+ var PermissionDecision = z7.enum(["allow", "deny", "ask"]);
12086
+ var HookDecision = z7.enum(["block"]);
12087
+ var HookOutputBaseSchema = z7.object({
12088
+ continue: z7.boolean().optional(),
12089
+ stopReason: z7.string().optional(),
12090
+ suppressOutput: z7.boolean().optional(),
12091
+ systemMessage: z7.string().optional()
12059
12092
  });
12060
12093
  var PreToolUseOutputSchema = HookOutputBaseSchema.extend({
12061
- hookSpecificOutput: z6.object({
12062
- hookEventName: z6.literal("PreToolUse"),
12094
+ hookSpecificOutput: z7.object({
12095
+ hookEventName: z7.literal("PreToolUse"),
12063
12096
  permissionDecision: PermissionDecision.optional(),
12064
- permissionDecisionReason: z6.string().optional(),
12065
- updatedInput: z6.record(z6.string(), z6.unknown()).optional(),
12066
- additionalContext: z6.string().optional()
12097
+ permissionDecisionReason: z7.string().optional(),
12098
+ updatedInput: z7.record(z7.string(), z7.unknown()).optional(),
12099
+ additionalContext: z7.string().optional()
12067
12100
  }).optional()
12068
12101
  });
12069
12102
  var PostToolUseOutputSchema = HookOutputBaseSchema.extend({
12070
12103
  decision: HookDecision.optional(),
12071
- reason: z6.string().optional(),
12072
- hookSpecificOutput: z6.object({
12073
- hookEventName: z6.literal("PostToolUse"),
12074
- additionalContext: z6.string().optional()
12104
+ reason: z7.string().optional(),
12105
+ hookSpecificOutput: z7.object({
12106
+ hookEventName: z7.literal("PostToolUse"),
12107
+ additionalContext: z7.string().optional()
12075
12108
  }).optional()
12076
12109
  });
12077
12110
  var StopOutputSchema = HookOutputBaseSchema.extend({
12078
12111
  decision: HookDecision.optional(),
12079
- reason: z6.string().optional()
12112
+ reason: z7.string().optional()
12080
12113
  });
12081
12114
  var UserPromptSubmitOutputSchema = HookOutputBaseSchema.extend({
12082
12115
  decision: HookDecision.optional(),
12083
- reason: z6.string().optional(),
12084
- hookSpecificOutput: z6.object({
12085
- hookEventName: z6.literal("UserPromptSubmit"),
12086
- additionalContext: z6.string().optional()
12116
+ reason: z7.string().optional(),
12117
+ hookSpecificOutput: z7.object({
12118
+ hookEventName: z7.literal("UserPromptSubmit"),
12119
+ additionalContext: z7.string().optional()
12087
12120
  }).optional()
12088
12121
  });
12089
12122
  var SessionStartOutputSchema = HookOutputBaseSchema.extend({
12090
- hookSpecificOutput: z6.object({
12091
- hookEventName: z6.literal("SessionStart"),
12092
- additionalContext: z6.string().optional()
12123
+ hookSpecificOutput: z7.object({
12124
+ hookEventName: z7.literal("SessionStart"),
12125
+ additionalContext: z7.string().optional()
12093
12126
  }).optional()
12094
12127
  });
12095
12128
  var PermissionRequestOutputSchema = HookOutputBaseSchema.extend({
12096
- hookSpecificOutput: z6.object({
12097
- hookEventName: z6.literal("PermissionRequest"),
12098
- decision: z6.object({
12099
- behavior: z6.enum(["allow", "deny"]),
12100
- updatedInput: z6.record(z6.string(), z6.unknown()).optional(),
12101
- message: z6.string().optional(),
12102
- interrupt: z6.boolean().optional()
12129
+ hookSpecificOutput: z7.object({
12130
+ hookEventName: z7.literal("PermissionRequest"),
12131
+ decision: z7.object({
12132
+ behavior: z7.enum(["allow", "deny"]),
12133
+ updatedInput: z7.record(z7.string(), z7.unknown()).optional(),
12134
+ message: z7.string().optional(),
12135
+ interrupt: z7.boolean().optional()
12103
12136
  })
12104
12137
  }).optional()
12105
12138
  });
@@ -12517,12 +12550,32 @@ async function exportSessionMetrics(storage, sessionId, exportPath) {
12517
12550
  await writeFile6(exportPath, JSON.stringify(metrics, null, 2));
12518
12551
  logger13.info("Metrics exported", { path: exportPath });
12519
12552
  } else {
12520
- logger13.debug("Session metrics", metrics);
12553
+ logger13.debug("Session metrics", summarizeMetricsForDebug(metrics));
12521
12554
  }
12522
12555
  } catch (error) {
12523
12556
  logger13.error("Failed to export metrics", new Error(getErrorMessage(error)));
12524
12557
  }
12525
12558
  }
12559
+ function summarizeMetricsForDebug(metrics) {
12560
+ const tasks = Array.isArray(metrics["tasks"]) ? metrics["tasks"] : [];
12561
+ return {
12562
+ sessionId: metrics["sessionId"],
12563
+ createdAt: metrics["createdAt"],
12564
+ updatedAt: metrics["updatedAt"],
12565
+ status: metrics["status"],
12566
+ taskCount: metrics["taskCount"],
12567
+ tasks: tasks.map((t) => {
12568
+ const obj = t ?? {};
12569
+ return {
12570
+ id: obj["id"],
12571
+ status: obj["status"],
12572
+ durationMs: obj["durationMs"],
12573
+ tokensUsed: obj["tokensUsed"]
12574
+ // `task` field deliberately omitted — user prompts may contain secrets.
12575
+ };
12576
+ })
12577
+ };
12578
+ }
12526
12579
  function buildMetricsObject(session, sessionId) {
12527
12580
  const tasks = session.tasks;
12528
12581
  return {
@@ -12609,7 +12662,11 @@ function logSensitiveFileAccess(input) {
12609
12662
  const filePath = safeString(input.tool_input.file_path);
12610
12663
  const warning = checkSensitiveFile(filePath);
12611
12664
  if (warning !== null) {
12612
- logger14.info("Sensitive file access", { filePath, warning });
12665
+ logger14.debug("Sensitive file access", {
12666
+ filePath,
12667
+ warning,
12668
+ toolUseId: input.tool_use_id
12669
+ });
12613
12670
  }
12614
12671
  }
12615
12672
  function validateBashCommand(command, customPatterns) {
@@ -17009,39 +17066,39 @@ function formatInitPortableMessage(result, dryRun) {
17009
17066
  }
17010
17067
 
17011
17068
  // src/mcp/tools/dev-pipeline-tool.ts
17012
- import { z as z7 } from "zod";
17069
+ import { z as z8 } from "zod";
17013
17070
  import * as fs17 from "fs";
17014
17071
  import * as path20 from "path";
17015
- var DevPipelineInputSchema = z7.object({
17072
+ var DevPipelineInputSchema = z8.object({
17016
17073
  /** Direct task instructions. */
17017
- task: z7.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
17074
+ task: z8.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
17018
17075
  /** Path to a plan file (.md, .yaml, .txt) to use as input. */
17019
- planFile: z7.string().max(500).optional().describe("Path to a plan/spec file to use as input"),
17076
+ planFile: z8.string().max(500).optional().describe("Path to a plan/spec file to use as input"),
17020
17077
  /** Whether to run in dry-run mode (plan+vote only, no implementation). */
17021
- dryRun: z7.boolean().default(false).describe("If true, stop after plan+vote (no implementation)"),
17078
+ dryRun: z8.boolean().default(false).describe("If true, stop after plan+vote (no implementation)"),
17022
17079
  /** Maximum vote iterations before proceeding (default: 3). */
17023
- maxVoteIterations: z7.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
17080
+ maxVoteIterations: z8.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
17024
17081
  /** Maximum QA iterations per task (default: 3). */
17025
- maxQaIterations: z7.number().int().min(1).max(5).default(3).describe("Max QA review iterations per task"),
17082
+ maxQaIterations: z8.number().int().min(1).max(5).default(3).describe("Max QA review iterations per task"),
17026
17083
  /** Working directory for the pipeline (default: cwd). Used for security scan and context. */
17027
- workingDir: z7.string().max(500).optional().describe("Working directory (default: cwd)"),
17084
+ workingDir: z8.string().max(500).optional().describe("Working directory (default: cwd)"),
17028
17085
  /** GitHub issue number to track progress on. Updates posted as comments. */
17029
- issueNumber: z7.number().int().positive().optional().describe("GitHub issue to post progress to"),
17086
+ issueNumber: z8.number().int().positive().optional().describe("GitHub issue to post progress to"),
17030
17087
  /** GitHub repo (owner/name) for issue tracking. */
17031
- repo: z7.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
17088
+ repo: z8.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
17032
17089
  /** Task tracking backend: github, gitlab, or json (default: json). */
17033
- trackerBackend: z7.enum(["github", "gitlab", "json"]).default("json").describe("Task tracking backend for issue creation"),
17090
+ trackerBackend: z8.enum(["github", "gitlab", "json"]).default("json").describe("Task tracking backend for issue creation"),
17034
17091
  /** Labels to apply to created issues. */
17035
- labels: z7.array(z7.string()).optional().describe("Labels for created issues"),
17092
+ labels: z8.array(z8.string()).optional().describe("Labels for created issues"),
17036
17093
  /** Session ID for checkpoint/resume. Enables crash recovery. */
17037
- sessionId: z7.string().max(128).regex(/^[a-zA-Z0-9_-]+$/).optional().describe("Session ID for checkpoint/resume (crash recovery)"),
17094
+ sessionId: z8.string().max(128).regex(/^[a-zA-Z0-9_-]+$/).optional().describe("Session ID for checkpoint/resume (crash recovery)"),
17038
17095
  /**
17039
17096
  * TESTS ONLY — when true, voters return random decisions. Must not be used as
17040
17097
  * a fallback when adapters are unavailable; configure an adapter instead. (#2319)
17041
17098
  */
17042
- simulateVotes: z7.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
17099
+ simulateVotes: z8.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
17043
17100
  /** Voting strategy for consensus stages. */
17044
- votingStrategy: z7.enum([
17101
+ votingStrategy: z8.enum([
17045
17102
  "simple_majority",
17046
17103
  "supermajority",
17047
17104
  "unanimous",
@@ -17050,11 +17107,11 @@ var DevPipelineInputSchema = z7.object({
17050
17107
  "opinion_wise"
17051
17108
  ]).optional().describe("Voting strategy for plan approval (default: higher_order)"),
17052
17109
  /** Use 3 agents instead of 6 for faster voting. */
17053
- quickMode: z7.boolean().default(false).describe("Use 3 agents instead of 6 for faster consensus voting"),
17110
+ quickMode: z8.boolean().default(false).describe("Use 3 agents instead of 6 for faster consensus voting"),
17054
17111
  /** Maximum execution time per stage in milliseconds (min 30s, max 600s). */
17055
- timeoutMs: z7.number().int().min(3e4).max(6e5).optional().describe("Max time per stage in ms (30000-600000). Default: varies by stage complexity"),
17112
+ timeoutMs: z8.number().int().min(3e4).max(6e5).optional().describe("Max time per stage in ms (30000-600000). Default: varies by stage complexity"),
17056
17113
  /** Pipeline execution mode. */
17057
- mode: z7.enum(["autonomous", "harness"]).default("autonomous").describe(
17114
+ mode: z8.enum(["autonomous", "harness"]).default("autonomous").describe(
17058
17115
  "'autonomous': full pipeline. 'harness': stops after decompose, returns tasks for caller to implement."
17059
17116
  )
17060
17117
  });
@@ -17564,46 +17621,7 @@ var OrchestratorUnavailableError = class extends NexusError {
17564
17621
  this.name = "OrchestratorUnavailableError";
17565
17622
  }
17566
17623
  };
17567
- var REGISTERED_TOOLS = [
17568
- "delegate_to_model",
17569
- "orchestrate",
17570
- "create_expert",
17571
- "execute_expert",
17572
- "run_workflow",
17573
- "list_experts",
17574
- "list_workflows",
17575
- "consensus_vote",
17576
- "research_query",
17577
- "research_add",
17578
- "research_add_source",
17579
- "research_discover",
17580
- "research_analyze",
17581
- "research_catalog_review",
17582
- "research_synthesize",
17583
- "survey_oss_landscape",
17584
- "vendor_publishing_audit",
17585
- "compare_data_feeds",
17586
- "memory_query",
17587
- "memory_stats",
17588
- "memory_write",
17589
- "weather_report",
17590
- "issue_triage",
17591
- "run_graph_workflow",
17592
- "execute_spec",
17593
- "registry_import",
17594
- "query_trace",
17595
- "query_task_state",
17596
- "verify_audit_chain",
17597
- "extract_symbols",
17598
- "search_codebase",
17599
- "run_dev_pipeline",
17600
- "run_pipeline",
17601
- "repo_analyze",
17602
- "repo_security_plan",
17603
- "improvement_review",
17604
- "pr_review",
17605
- "supply_chain_tradeoff_panel"
17606
- ];
17624
+ var REGISTERED_TOOLS = REGISTERED_TOOL_NAMES;
17607
17625
  var MOCK_ORCHESTRATION_ENV = "NEXUS_ALLOW_MOCK_ORCHESTRATION";
17608
17626
  function createOrchestratorForOrchestration(modelAdapter, logger18, useMockTechLead) {
17609
17627
  if (modelAdapter !== void 0) {
@@ -17783,8 +17801,8 @@ async function initUpstreamServers(gatewayConfig, server, logger18) {
17783
17801
  servers: upstreamServers.length,
17784
17802
  tools: tools.length
17785
17803
  });
17786
- const { z: z8 } = await import("zod");
17787
- const passthroughSchema = z8.looseObject({});
17804
+ const { z: z9 } = await import("zod");
17805
+ const passthroughSchema = z9.looseObject({});
17788
17806
  for (const tool of tools) {
17789
17807
  const toolName = tool.name;
17790
17808
  const desc = tool.description ?? `Upstream tool: ${toolName}`;
@@ -17900,11 +17918,13 @@ function initV2PipelineSubsystems(logger18) {
17900
17918
  const pluginRegistry = getPipelinePluginRegistry();
17901
17919
  const pipelineEventBus = getPipelineEventBus();
17902
17920
  const bridge = createEventBusBridge({ source: pipelineEventBus });
17921
+ startFeedbackSubscriber(pipelineEventBus, getOutcomeStore());
17903
17922
  const policyEngine = createDefaultPolicyEngine();
17904
17923
  const v2Config = resolveV2Config();
17905
17924
  logger18.info("V2 Pipeline OS initialized", {
17906
17925
  plugins: pluginRegistry.listEnabled().length,
17907
17926
  bridged: bridge.forwarded(),
17927
+ feedbackSubscriber: "active",
17908
17928
  policyRules: policyEngine.listRules().length,
17909
17929
  v2Mode: v2Config.mode,
17910
17930
  policyMode: v2Config.policyMode
@@ -19224,7 +19244,7 @@ function adaptConfigToLibrary(config) {
19224
19244
  }
19225
19245
  function createBeliefPromoter() {
19226
19246
  return async (event) => {
19227
- const { getToolMemory } = await import("./tool-memory-T7ZYIUJ2.js");
19247
+ const { getToolMemory } = await import("./tool-memory-E7JW4YLT.js");
19228
19248
  const tm = getToolMemory();
19229
19249
  await tm.recordBelief(
19230
19250
  `skill:${event.name}`,
@@ -19536,6 +19556,8 @@ function createShutdownCleanup(options) {
19536
19556
  recordServerShutdown(observer, eventContext);
19537
19557
  logFinalHealthMetrics(observer, logger18);
19538
19558
  shutdownToolMemory();
19559
+ await shutdownExpertBridge();
19560
+ shutdownFeedbackSubscriber();
19539
19561
  const closeResult = await closeServer(server, serverLogger);
19540
19562
  if (!closeResult.ok) {
19541
19563
  throw new Error(closeResult.error.message);
@@ -20085,7 +20107,7 @@ async function handleResearchCommand(args) {
20085
20107
  }
20086
20108
  }
20087
20109
  async function handleRegistryCommand(args) {
20088
- const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-TH7U6UMC.js");
20110
+ const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-P5VIAEOL.js");
20089
20111
  const subcommand = args.subcommand;
20090
20112
  if (!isValidRegistrySubcommand(subcommand)) {
20091
20113
  process.stdout.write(`${formatRegistryUsage()}
@@ -20133,7 +20155,7 @@ async function handleVerifyCommand(args) {
20133
20155
  async function handleDoctorCommand(args) {
20134
20156
  const exitCode = await doctorCommand({ fix: args.options.fix });
20135
20157
  if (args.options.deep) {
20136
- const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-7YK4BZIJ.js");
20158
+ const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-2E2GBMYR.js");
20137
20159
  const diag = runDeepDiagnostics2();
20138
20160
  process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
20139
20161
  }
@@ -20177,7 +20199,7 @@ async function handleInitCommand(args) {
20177
20199
  process.exit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
20178
20200
  }
20179
20201
  async function runInitOpencodeFlow(args) {
20180
- const { runInitOpencode } = await import("./init-opencode-QP5CAMWN.js");
20202
+ const { runInitOpencode } = await import("./init-opencode-6LVZ4CAQ.js");
20181
20203
  const opencodePath = args.options.opencode;
20182
20204
  if (opencodePath === void 0 || opencodePath === "") {
20183
20205
  process.stderr.write("Error: --opencode requires a path argument.\n");
@@ -20204,7 +20226,7 @@ async function runInitOpencodeFlow(args) {
20204
20226
  process.exit(EXIT_CODES.SUCCESS);
20205
20227
  }
20206
20228
  async function renderOpencodeValidate(opencodePath) {
20207
- const { runOpencodeValidate } = await import("./init-opencode-QP5CAMWN.js");
20229
+ const { runOpencodeValidate } = await import("./init-opencode-6LVZ4CAQ.js");
20208
20230
  const result = await runOpencodeValidate(opencodePath);
20209
20231
  if (!result.ok) {
20210
20232
  process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
@@ -20244,7 +20266,7 @@ async function handleSetupCommandAsync(args) {
20244
20266
  process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
20245
20267
  }
20246
20268
  async function runCustomApiSetup(args) {
20247
- const { configureCustomApi } = await import("./setup-custom-api-UOIKUQL4.js");
20269
+ const { configureCustomApi } = await import("./setup-custom-api-B63X7ISD.js");
20248
20270
  const baseUrl = args.options.customApi;
20249
20271
  if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
20250
20272
  const input = {