nexus-agents 8.97.0 → 8.98.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 (128) hide show
  1. package/dist/{ast-rule-runner-QQIRWXJ4.js → ast-rule-runner-YBAZFEUB.js} +3 -3
  2. package/dist/{child-mcp-config-JTOIFT6B.js → child-mcp-config-VUERRL3V.js} +2 -2
  3. package/dist/{chunk-7TXK4ZU3.js → chunk-3EIK7A4M.js} +3 -3
  4. package/dist/{chunk-UVPFSWB3.js → chunk-62PINSC6.js} +2 -2
  5. package/dist/{chunk-E3DEDHRY.js → chunk-64R6TZYA.js} +3 -3
  6. package/dist/{chunk-OVE3YJSE.js → chunk-663MAM24.js} +2 -2
  7. package/dist/{chunk-HKTZFZSM.js → chunk-7JV3YVMZ.js} +5 -5
  8. package/dist/{chunk-KB7VXRC4.js → chunk-DEKU3ACZ.js} +2 -2
  9. package/dist/{chunk-FUU6LXIA.js → chunk-EAB77S7U.js} +7 -7
  10. package/dist/{chunk-GUEUV3ND.js → chunk-FJS4ASFA.js} +96 -40
  11. package/dist/chunk-FJS4ASFA.js.map +1 -0
  12. package/dist/{chunk-5I2I5G4U.js → chunk-GOQ6FHJD.js} +4 -4
  13. package/dist/{chunk-UDWF2XCA.js → chunk-IXDWCPN3.js} +3 -3
  14. package/dist/{chunk-ON4YR4KS.js → chunk-JD4PKLC2.js} +2 -2
  15. package/dist/{chunk-IR25EHPP.js → chunk-JGL3IKNA.js} +3 -3
  16. package/dist/{chunk-LFGVIWQ7.js → chunk-JORUH2K3.js} +10 -10
  17. package/dist/{chunk-6I6JETP7.js → chunk-L3YQNS32.js} +2 -2
  18. package/dist/{chunk-LFZUQNUH.js → chunk-LKAH6IYE.js} +2 -2
  19. package/dist/{chunk-R6EP6UNC.js → chunk-MDYMP54L.js} +5 -5
  20. package/dist/{chunk-YUYYMYPU.js → chunk-MK4KQJZV.js} +2 -2
  21. package/dist/{chunk-A7LUQRS4.js → chunk-NITPS7VD.js} +2 -2
  22. package/dist/{chunk-ZQJORAPU.js → chunk-OCMF5DK6.js} +2 -2
  23. package/dist/{chunk-NJ7ZYOFR.js → chunk-OTU374RO.js} +2 -2
  24. package/dist/{chunk-2A52CTLB.js → chunk-OUEHXYFU.js} +2 -2
  25. package/dist/{chunk-S2FT4YA6.js → chunk-PHN4KDGD.js} +328 -67
  26. package/dist/chunk-PHN4KDGD.js.map +1 -0
  27. package/dist/{chunk-6562BJ3L.js → chunk-Q5NXGSDC.js} +2 -2
  28. package/dist/{chunk-3CNLLCDQ.js → chunk-R45O47CR.js} +2 -2
  29. package/dist/{chunk-DGWVJ6HB.js → chunk-SJBEXKHC.js} +4 -4
  30. package/dist/{chunk-BGW4CHYZ.js → chunk-SRFWE23A.js} +2 -2
  31. package/dist/{chunk-YKTA5UBL.js → chunk-T6CLFLGL.js} +13 -2
  32. package/dist/{chunk-YKTA5UBL.js.map → chunk-T6CLFLGL.js.map} +1 -1
  33. package/dist/{chunk-CYP33W2C.js → chunk-V66T427F.js} +2 -2
  34. package/dist/{chunk-F7CB7C3P.js → chunk-VU4LLVHS.js} +4 -4
  35. package/dist/{chunk-AVGO46BN.js → chunk-Y2ESO2BO.js} +76 -12
  36. package/dist/chunk-Y2ESO2BO.js.map +1 -0
  37. package/dist/{chunk-OADHASVD.js → chunk-YFRCIJ5F.js} +8 -8
  38. package/dist/{chunk-UKU5ZBZF.js → chunk-YX2V2Y5Q.js} +3 -3
  39. package/dist/{chunk-MEBD2TMO.js → chunk-ZUUXVQI6.js} +2 -2
  40. package/dist/{cli-circuit-breaker-AWZO2BAC.js → cli-circuit-breaker-BVQU6TSV.js} +3 -3
  41. package/dist/cli.js +91 -51
  42. package/dist/cli.js.map +1 -1
  43. package/dist/{composite-router-BLVJAOFR.js → composite-router-JODIOJ3T.js} +2 -2
  44. package/dist/{consensus-vote-44KYPBV4.js → consensus-vote-PJ5LS36B.js} +16 -16
  45. package/dist/{context-retriever-QI63DBJI.js → context-retriever-VENNHB6Q.js} +8 -8
  46. package/dist/{doctor-deep-VJVT7H2S.js → doctor-deep-T2BEMMBG.js} +3 -3
  47. package/dist/{doctor-live-PNVKASBK.js → doctor-live-MYBKNA3S.js} +10 -10
  48. package/dist/{expert-bridge-WP7PJDNV.js → expert-bridge-DAJAYNMQ.js} +4 -4
  49. package/dist/{factory-H7WD46ZF.js → factory-LGXPPPBX.js} +5 -5
  50. package/dist/{factory-QJVIUHGU.js → factory-O427FFK5.js} +9 -9
  51. package/dist/{improvement-review-7JZHY2EK.js → improvement-review-6F3E26ER.js} +5 -5
  52. package/dist/index.d.ts +42 -3
  53. package/dist/index.js +30 -30
  54. package/dist/{init-opencode-3FT4RSEY.js → init-opencode-BKEKVAAW.js} +5 -5
  55. package/dist/issue-triage-BIPWKL66.js +16 -0
  56. package/dist/{pr-reviewer-helpers-BLDZ3ZQ7.js → pr-reviewer-helpers-SJN6OUY6.js} +4 -4
  57. package/dist/{registry-command-CABQPLN4.js → registry-command-6U434CUU.js} +2 -2
  58. package/dist/{repo-security-plan-5GNN6EQ2.js → repo-security-plan-7GPJJ577.js} +3 -3
  59. package/dist/{research-helpers-synthesize-MOJKZLS5.js → research-helpers-synthesize-Z7JMKOOQ.js} +4 -4
  60. package/dist/{routing-memory-FRZ3EZBT.js → routing-memory-S2MZCJBE.js} +2 -2
  61. package/dist/{session-memory-K63UQWAN.js → session-memory-VOFCMXU6.js} +3 -3
  62. package/dist/{setup-config-54EYGCDL.js → setup-config-TWVGUC4Y.js} +3 -3
  63. package/dist/{setup-custom-api-YWOZHDPK.js → setup-custom-api-ONTEN2CU.js} +4 -4
  64. package/dist/setup-data-dir-VWXVP5IJ.js +32 -0
  65. package/dist/{tool-memory-ZXN6EYVO.js → tool-memory-7JNUN7Z7.js} +5 -5
  66. package/dist/{unified-registry-BEYNDSAX.js → unified-registry-VOA2IUPK.js} +10 -10
  67. package/dist/{weather-report-YZIE7PAH.js → weather-report-NEHXHTWK.js} +2 -2
  68. package/package.json +2 -2
  69. package/dist/chunk-AVGO46BN.js.map +0 -1
  70. package/dist/chunk-GUEUV3ND.js.map +0 -1
  71. package/dist/chunk-S2FT4YA6.js.map +0 -1
  72. package/dist/issue-triage-DP27HRIY.js +0 -16
  73. package/dist/setup-data-dir-RUJUERZQ.js +0 -32
  74. /package/dist/{ast-rule-runner-QQIRWXJ4.js.map → ast-rule-runner-YBAZFEUB.js.map} +0 -0
  75. /package/dist/{child-mcp-config-JTOIFT6B.js.map → child-mcp-config-VUERRL3V.js.map} +0 -0
  76. /package/dist/{chunk-7TXK4ZU3.js.map → chunk-3EIK7A4M.js.map} +0 -0
  77. /package/dist/{chunk-UVPFSWB3.js.map → chunk-62PINSC6.js.map} +0 -0
  78. /package/dist/{chunk-E3DEDHRY.js.map → chunk-64R6TZYA.js.map} +0 -0
  79. /package/dist/{chunk-OVE3YJSE.js.map → chunk-663MAM24.js.map} +0 -0
  80. /package/dist/{chunk-HKTZFZSM.js.map → chunk-7JV3YVMZ.js.map} +0 -0
  81. /package/dist/{chunk-KB7VXRC4.js.map → chunk-DEKU3ACZ.js.map} +0 -0
  82. /package/dist/{chunk-FUU6LXIA.js.map → chunk-EAB77S7U.js.map} +0 -0
  83. /package/dist/{chunk-5I2I5G4U.js.map → chunk-GOQ6FHJD.js.map} +0 -0
  84. /package/dist/{chunk-UDWF2XCA.js.map → chunk-IXDWCPN3.js.map} +0 -0
  85. /package/dist/{chunk-ON4YR4KS.js.map → chunk-JD4PKLC2.js.map} +0 -0
  86. /package/dist/{chunk-IR25EHPP.js.map → chunk-JGL3IKNA.js.map} +0 -0
  87. /package/dist/{chunk-LFGVIWQ7.js.map → chunk-JORUH2K3.js.map} +0 -0
  88. /package/dist/{chunk-6I6JETP7.js.map → chunk-L3YQNS32.js.map} +0 -0
  89. /package/dist/{chunk-LFZUQNUH.js.map → chunk-LKAH6IYE.js.map} +0 -0
  90. /package/dist/{chunk-R6EP6UNC.js.map → chunk-MDYMP54L.js.map} +0 -0
  91. /package/dist/{chunk-YUYYMYPU.js.map → chunk-MK4KQJZV.js.map} +0 -0
  92. /package/dist/{chunk-A7LUQRS4.js.map → chunk-NITPS7VD.js.map} +0 -0
  93. /package/dist/{chunk-ZQJORAPU.js.map → chunk-OCMF5DK6.js.map} +0 -0
  94. /package/dist/{chunk-NJ7ZYOFR.js.map → chunk-OTU374RO.js.map} +0 -0
  95. /package/dist/{chunk-2A52CTLB.js.map → chunk-OUEHXYFU.js.map} +0 -0
  96. /package/dist/{chunk-6562BJ3L.js.map → chunk-Q5NXGSDC.js.map} +0 -0
  97. /package/dist/{chunk-3CNLLCDQ.js.map → chunk-R45O47CR.js.map} +0 -0
  98. /package/dist/{chunk-DGWVJ6HB.js.map → chunk-SJBEXKHC.js.map} +0 -0
  99. /package/dist/{chunk-BGW4CHYZ.js.map → chunk-SRFWE23A.js.map} +0 -0
  100. /package/dist/{chunk-CYP33W2C.js.map → chunk-V66T427F.js.map} +0 -0
  101. /package/dist/{chunk-F7CB7C3P.js.map → chunk-VU4LLVHS.js.map} +0 -0
  102. /package/dist/{chunk-OADHASVD.js.map → chunk-YFRCIJ5F.js.map} +0 -0
  103. /package/dist/{chunk-UKU5ZBZF.js.map → chunk-YX2V2Y5Q.js.map} +0 -0
  104. /package/dist/{chunk-MEBD2TMO.js.map → chunk-ZUUXVQI6.js.map} +0 -0
  105. /package/dist/{cli-circuit-breaker-AWZO2BAC.js.map → cli-circuit-breaker-BVQU6TSV.js.map} +0 -0
  106. /package/dist/{composite-router-BLVJAOFR.js.map → composite-router-JODIOJ3T.js.map} +0 -0
  107. /package/dist/{consensus-vote-44KYPBV4.js.map → consensus-vote-PJ5LS36B.js.map} +0 -0
  108. /package/dist/{context-retriever-QI63DBJI.js.map → context-retriever-VENNHB6Q.js.map} +0 -0
  109. /package/dist/{doctor-deep-VJVT7H2S.js.map → doctor-deep-T2BEMMBG.js.map} +0 -0
  110. /package/dist/{doctor-live-PNVKASBK.js.map → doctor-live-MYBKNA3S.js.map} +0 -0
  111. /package/dist/{expert-bridge-WP7PJDNV.js.map → expert-bridge-DAJAYNMQ.js.map} +0 -0
  112. /package/dist/{factory-H7WD46ZF.js.map → factory-LGXPPPBX.js.map} +0 -0
  113. /package/dist/{factory-QJVIUHGU.js.map → factory-O427FFK5.js.map} +0 -0
  114. /package/dist/{improvement-review-7JZHY2EK.js.map → improvement-review-6F3E26ER.js.map} +0 -0
  115. /package/dist/{init-opencode-3FT4RSEY.js.map → init-opencode-BKEKVAAW.js.map} +0 -0
  116. /package/dist/{issue-triage-DP27HRIY.js.map → issue-triage-BIPWKL66.js.map} +0 -0
  117. /package/dist/{pr-reviewer-helpers-BLDZ3ZQ7.js.map → pr-reviewer-helpers-SJN6OUY6.js.map} +0 -0
  118. /package/dist/{registry-command-CABQPLN4.js.map → registry-command-6U434CUU.js.map} +0 -0
  119. /package/dist/{repo-security-plan-5GNN6EQ2.js.map → repo-security-plan-7GPJJ577.js.map} +0 -0
  120. /package/dist/{research-helpers-synthesize-MOJKZLS5.js.map → research-helpers-synthesize-Z7JMKOOQ.js.map} +0 -0
  121. /package/dist/{routing-memory-FRZ3EZBT.js.map → routing-memory-S2MZCJBE.js.map} +0 -0
  122. /package/dist/{session-memory-K63UQWAN.js.map → session-memory-VOFCMXU6.js.map} +0 -0
  123. /package/dist/{setup-config-54EYGCDL.js.map → setup-config-TWVGUC4Y.js.map} +0 -0
  124. /package/dist/{setup-custom-api-YWOZHDPK.js.map → setup-custom-api-ONTEN2CU.js.map} +0 -0
  125. /package/dist/{setup-data-dir-RUJUERZQ.js.map → setup-data-dir-VWXVP5IJ.js.map} +0 -0
  126. /package/dist/{tool-memory-ZXN6EYVO.js.map → tool-memory-7JNUN7Z7.js.map} +0 -0
  127. /package/dist/{unified-registry-BEYNDSAX.js.map → unified-registry-VOA2IUPK.js.map} +0 -0
  128. /package/dist/{weather-report-YZIE7PAH.js.map → weather-report-NEHXHTWK.js.map} +0 -0
@@ -9,8 +9,8 @@ import {
9
9
  getBuiltInAstRulesPath,
10
10
  loadRules,
11
11
  runAstQaRules
12
- } from "./chunk-A7LUQRS4.js";
13
- import "./chunk-UDWF2XCA.js";
12
+ } from "./chunk-NITPS7VD.js";
13
+ import "./chunk-IXDWCPN3.js";
14
14
  import "./chunk-UE7A2XHM.js";
15
15
  import "./chunk-LWOX65CP.js";
16
16
  import "./chunk-PX6F3LHL.js";
@@ -26,4 +26,4 @@ export {
26
26
  loadRules,
27
27
  runAstQaRules
28
28
  };
29
- //# sourceMappingURL=ast-rule-runner-QQIRWXJ4.js.map
29
+ //# sourceMappingURL=ast-rule-runner-YBAZFEUB.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-OITVVSWO.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-UDWF2XCA.js";
6
+ } from "./chunk-IXDWCPN3.js";
7
7
  import "./chunk-UE7A2XHM.js";
8
8
  import "./chunk-LWOX65CP.js";
9
9
  import "./chunk-PX6F3LHL.js";
@@ -56,4 +56,4 @@ async function generateMcpConfig(options) {
56
56
  export {
57
57
  generateMcpConfig
58
58
  };
59
- //# sourceMappingURL=child-mcp-config-JTOIFT6B.js.map
59
+ //# sourceMappingURL=child-mcp-config-VUERRL3V.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-IR25EHPP.js";
10
+ } from "./chunk-JGL3IKNA.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -21,7 +21,7 @@ import {
21
21
  hasMeasuredCategory,
22
22
  isDeclaredNeverDeprecate,
23
23
  isRegisteredToolName
24
- } from "./chunk-UDWF2XCA.js";
24
+ } from "./chunk-IXDWCPN3.js";
25
25
  import {
26
26
  getNexusDataDir,
27
27
  nexusDataPath
@@ -2284,4 +2284,4 @@ export {
2284
2284
  runImprovementReview,
2285
2285
  registerImprovementReviewTool
2286
2286
  };
2287
- //# sourceMappingURL=chunk-7TXK4ZU3.js.map
2287
+ //# sourceMappingURL=chunk-3EIK7A4M.js.map
@@ -5,7 +5,7 @@ import {
5
5
  err,
6
6
  getErrorMessage,
7
7
  ok
8
- } from "./chunk-UDWF2XCA.js";
8
+ } from "./chunk-IXDWCPN3.js";
9
9
  import {
10
10
  findRepoRoot,
11
11
  getActiveWorkspaceRoot,
@@ -290,4 +290,4 @@ export {
290
290
  loadPapersRegistry,
291
291
  savePapersRegistry
292
292
  };
293
- //# sourceMappingURL=chunk-UVPFSWB3.js.map
293
+ //# sourceMappingURL=chunk-62PINSC6.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  loadPapersRegistry
3
- } from "./chunk-UVPFSWB3.js";
3
+ } from "./chunk-62PINSC6.js";
4
4
  import {
5
5
  getErrorMessage
6
- } from "./chunk-UDWF2XCA.js";
6
+ } from "./chunk-IXDWCPN3.js";
7
7
 
8
8
  // src/cli/research-helpers-synthesize.ts
9
9
  import { z } from "zod";
@@ -876,4 +876,4 @@ export {
876
876
  AttributedInsightSchema,
877
877
  synthesizeResearch
878
878
  };
879
- //# sourceMappingURL=chunk-E3DEDHRY.js.map
879
+ //# sourceMappingURL=chunk-64R6TZYA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-UDWF2XCA.js";
3
+ } from "./chunk-IXDWCPN3.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-OVE3YJSE.js.map
80
+ //# sourceMappingURL=chunk-663MAM24.js.map
@@ -8,13 +8,13 @@ import {
8
8
  loadTechniquesRegistry,
9
9
  resolveInsideRoot,
10
10
  savePapersRegistry
11
- } from "./chunk-UVPFSWB3.js";
11
+ } from "./chunk-62PINSC6.js";
12
12
  import {
13
13
  resolveToken
14
- } from "./chunk-ON4YR4KS.js";
14
+ } from "./chunk-JD4PKLC2.js";
15
15
  import {
16
16
  getToolMemory
17
- } from "./chunk-F7CB7C3P.js";
17
+ } from "./chunk-VU4LLVHS.js";
18
18
  import {
19
19
  capitalizeWords,
20
20
  tokenizeFiltered,
@@ -43,7 +43,7 @@ import {
43
43
  ok,
44
44
  registerPersistentDistillerFactory,
45
45
  sigmoidConfidence
46
- } from "./chunk-UDWF2XCA.js";
46
+ } from "./chunk-IXDWCPN3.js";
47
47
  import {
48
48
  ensureLearningDir,
49
49
  getRulesFile
@@ -4275,4 +4275,4 @@ export {
4275
4275
  DEFAULT_CONTEXT_BUDGET_TOKENS,
4276
4276
  getContextPromptPrefix
4277
4277
  };
4278
- //# sourceMappingURL=chunk-HKTZFZSM.js.map
4278
+ //# sourceMappingURL=chunk-7JV3YVMZ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  isRateLimitText,
11
11
  observedArmDisplaySlot,
12
12
  ok
13
- } from "./chunk-UDWF2XCA.js";
13
+ } from "./chunk-IXDWCPN3.js";
14
14
 
15
15
  // src/cli-adapters/circuit-breaker-types.ts
16
16
  var CircuitErrorCode = {
@@ -592,4 +592,4 @@ export {
592
592
  CliCircuitBreakerIntegration,
593
593
  createCliCircuitBreakerIntegration
594
594
  };
595
- //# sourceMappingURL=chunk-KB7VXRC4.js.map
595
+ //# sourceMappingURL=chunk-DEKU3ACZ.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-YUYYMYPU.js";
3
+ } from "./chunk-MK4KQJZV.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-UDWF2XCA.js";
8
+ } from "./chunk-IXDWCPN3.js";
9
9
 
10
10
  // src/pipeline/expert-bridge.ts
11
11
  function resolveCliFromModelString(model) {
@@ -30,7 +30,7 @@ async function getMcpConfigPath() {
30
30
  if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
31
31
  mcpConfigInitPromise ??= (async () => {
32
32
  try {
33
- const { generateMcpConfig } = await import("./child-mcp-config-JTOIFT6B.js");
33
+ const { generateMcpConfig } = await import("./child-mcp-config-VUERRL3V.js");
34
34
  const config = await generateMcpConfig();
35
35
  cachedMcpConfigPath = config.configPath;
36
36
  cachedMcpConfigCleanup = config.cleanup;
@@ -107,8 +107,8 @@ var routerInitPromise = null;
107
107
  async function getRouter() {
108
108
  if (cachedRouter !== null) return cachedRouter;
109
109
  routerInitPromise ??= (async () => {
110
- const { createAllAdapters } = await import("./factory-QJVIUHGU.js");
111
- const { createCompositeRouter } = await import("./composite-router-BLVJAOFR.js");
110
+ const { createAllAdapters } = await import("./factory-O427FFK5.js");
111
+ const { createCompositeRouter } = await import("./composite-router-JODIOJ3T.js");
112
112
  const adapters = createAllAdapters();
113
113
  if (adapters.size === 0) {
114
114
  routerInitPromise = null;
@@ -116,7 +116,7 @@ async function getRouter() {
116
116
  }
117
117
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
118
118
  try {
119
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-AWZO2BAC.js");
119
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-BVQU6TSV.js");
120
120
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
121
121
  } catch (error) {
122
122
  const msg = error instanceof Error ? error.message : String(error);
@@ -248,4 +248,4 @@ export {
248
248
  tokenSplitFromUsage,
249
249
  executeExpert
250
250
  };
251
- //# sourceMappingURL=chunk-FUU6LXIA.js.map
251
+ //# sourceMappingURL=chunk-EAB77S7U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-MEBD2TMO.js";
3
+ } from "./chunk-ZUUXVQI6.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-4GDMHCKX.js";
@@ -21,10 +21,10 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-LFGVIWQ7.js";
24
+ } from "./chunk-JORUH2K3.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-FUU6LXIA.js";
27
+ } from "./chunk-EAB77S7U.js";
28
28
  import {
29
29
  DEPRECATED_MODE_ALIAS_INPUT,
30
30
  JobStatusSchema,
@@ -46,6 +46,7 @@ import {
46
46
  defaultReplayEnvelope,
47
47
  deprecatedModeWarning,
48
48
  dispatchFieldDefaultSync,
49
+ ensureGatewayDiscovered,
49
50
  heartbeatJob,
50
51
  initTaskState,
51
52
  isAbandonedJob,
@@ -73,7 +74,10 @@ import {
73
74
  withFileLock,
74
75
  withWarnings,
75
76
  writeJobCancelled
76
- } from "./chunk-AVGO46BN.js";
77
+ } from "./chunk-Y2ESO2BO.js";
78
+ import {
79
+ parseGatewayExtraHeaders
80
+ } from "./chunk-PHN4KDGD.js";
77
81
  import {
78
82
  allOf,
79
83
  anyOf
@@ -81,7 +85,7 @@ import {
81
85
  import {
82
86
  normalizeTopicToCanonical,
83
87
  synthesizeResearch
84
- } from "./chunk-E3DEDHRY.js";
88
+ } from "./chunk-64R6TZYA.js";
85
89
  import {
86
90
  IssueTriage,
87
91
  createAuditTrail,
@@ -90,13 +94,13 @@ import {
90
94
  createGraphAuditBridge,
91
95
  emitPipelinePolicyEvent,
92
96
  readActionRefusal
93
- } from "./chunk-R6EP6UNC.js";
97
+ } from "./chunk-MDYMP54L.js";
94
98
  import {
95
99
  sanitizeInput
96
- } from "./chunk-CYP33W2C.js";
100
+ } from "./chunk-V66T427F.js";
97
101
  import {
98
102
  withPrerequisite
99
- } from "./chunk-7TXK4ZU3.js";
103
+ } from "./chunk-3EIK7A4M.js";
100
104
  import {
101
105
  NOOP_NOTIFIER,
102
106
  RateLimiter,
@@ -124,17 +128,17 @@ import {
124
128
  toolSuccessStructured,
125
129
  withProgressHeartbeat,
126
130
  wrapToolWithTimeout
127
- } from "./chunk-IR25EHPP.js";
131
+ } from "./chunk-JGL3IKNA.js";
128
132
  import {
129
133
  VERSION
130
- } from "./chunk-6I6JETP7.js";
134
+ } from "./chunk-L3YQNS32.js";
131
135
  import {
132
136
  EventTopics,
133
137
  UNRESOLVED_MODEL_ID,
134
138
  createEvent,
135
139
  getGlobalEventBus,
136
140
  getGlobalRegistry
137
- } from "./chunk-DGWVJ6HB.js";
141
+ } from "./chunk-SJBEXKHC.js";
138
142
  import {
139
143
  IDENTIFIER_RE,
140
144
  LANG_VALUES,
@@ -167,7 +171,7 @@ import {
167
171
  parseRegistry,
168
172
  sourceExistsInRegistry,
169
173
  summarizeContextForPrompt
170
- } from "./chunk-HKTZFZSM.js";
174
+ } from "./chunk-7JV3YVMZ.js";
171
175
  import {
172
176
  REGISTRY_PATH,
173
177
  getProjectRoot,
@@ -175,25 +179,25 @@ import {
175
179
  loadTechniquesRegistry,
176
180
  resolveInsideRoot,
177
181
  resolveRegistryRoot
178
- } from "./chunk-UVPFSWB3.js";
182
+ } from "./chunk-62PINSC6.js";
179
183
  import {
180
184
  getTokenEnvVars,
181
185
  resolveToken
182
- } from "./chunk-ON4YR4KS.js";
186
+ } from "./chunk-JD4PKLC2.js";
183
187
  import {
184
188
  DEFAULT_RELEVANCE_CONFIG,
185
189
  MemoryImportance,
186
190
  MemoryType,
187
191
  calculateTextJaccardSimilarity,
188
192
  getToolMemory
189
- } from "./chunk-F7CB7C3P.js";
193
+ } from "./chunk-VU4LLVHS.js";
190
194
  import {
191
195
  STOPWORDS,
192
196
  truncateWithInfo
193
197
  } from "./chunk-7LP6VJRP.js";
194
198
  import {
195
199
  createSessionMemory
196
- } from "./chunk-6562BJ3L.js";
200
+ } from "./chunk-Q5NXGSDC.js";
197
201
  import {
198
202
  BUILT_IN_EXPERTS,
199
203
  BuiltInExpertTypeSchema,
@@ -212,24 +216,24 @@ import {
212
216
  isCliDisabled,
213
217
  sleep,
214
218
  withTimeout
215
- } from "./chunk-OADHASVD.js";
219
+ } from "./chunk-YFRCIJ5F.js";
216
220
  import {
217
221
  BaseAdapter,
218
222
  createStream,
219
223
  requireApiKey,
220
224
  validateApiKeyPresence
221
- } from "./chunk-YKTA5UBL.js";
225
+ } from "./chunk-T6CLFLGL.js";
222
226
  import {
223
227
  DEFAULTS
224
- } from "./chunk-2A52CTLB.js";
228
+ } from "./chunk-OUEHXYFU.js";
225
229
  import {
226
230
  resolveGatewayEnv
227
- } from "./chunk-3CNLLCDQ.js";
231
+ } from "./chunk-R45O47CR.js";
228
232
  import {
229
233
  getAvailabilityCache,
230
234
  getCliForModelId,
231
235
  resolveFallback
232
- } from "./chunk-YUYYMYPU.js";
236
+ } from "./chunk-MK4KQJZV.js";
233
237
  import {
234
238
  sanitizeErrorDetails
235
239
  } from "./chunk-2NDA4DHW.js";
@@ -241,7 +245,7 @@ import {
241
245
  import {
242
246
  generateHyphenId,
243
247
  generateUUID
244
- } from "./chunk-LFZUQNUH.js";
248
+ } from "./chunk-LKAH6IYE.js";
245
249
  import {
246
250
  AGENT_ROUTER_TIMEOUTS,
247
251
  API_TIMEOUTS,
@@ -359,7 +363,7 @@ import {
359
363
  selectStrategyByManifest,
360
364
  toExpertTaskAnalysisResult,
361
365
  withStep
362
- } from "./chunk-UDWF2XCA.js";
366
+ } from "./chunk-IXDWCPN3.js";
363
367
  import {
364
368
  ensureLearningDir,
365
369
  getMetaOutcomesFile,
@@ -1058,6 +1062,17 @@ var NexusEnvSchema = z10.object({
1058
1062
  if (!parsed.ok) ctx.addIssue({ code: "custom", message: parsed.error.message });
1059
1063
  }).optional(),
1060
1064
  NEXUS_MODEL_REGISTRY_OVERLAY: z10.string().optional(),
1065
+ // #6608: the header carrying the gateway key instead of `Authorization:
1066
+ // Bearer` (OPENAI_COMPAT_AUTH_HEADER_ENV), e.g. `api-key`. The runtime
1067
+ // reader warns on an illegal header name and keeps the bearer default.
1068
+ NEXUS_OPENAI_COMPAT_AUTH_HEADER: z10.string().optional(),
1069
+ // #6608: extra static gateway headers, `Name=value,Name2=value2`
1070
+ // (OPENAI_COMPAT_EXTRA_HEADERS_ENV). Validated by the runtime parser; a
1071
+ // value can be a credential, so an invalid one is logged redacted.
1072
+ NEXUS_OPENAI_COMPAT_EXTRA_HEADERS: z10.string().superRefine((v, ctx) => {
1073
+ const parsed = parseGatewayExtraHeaders(v);
1074
+ if (!parsed.ok) ctx.addIssue({ code: "custom", message: parsed.reason });
1075
+ }).optional(),
1061
1076
  // #4392 increment 2 step 2: the `<endpoint>` of the `api:<endpoint>` arm the
1062
1077
  // voter gateway registers as (OPENAI_COMPAT_ENDPOINT_ENV; spelled out for
1063
1078
  // the coverage script). Same shape rule as a scoped NEXUS_GATEWAY_COST key,
@@ -1144,7 +1159,8 @@ var NexusEnvSchema = z10.object({
1144
1159
  var KNOWN_NAMES = Object.keys(NexusEnvSchema.shape);
1145
1160
  var REDACTED_VALUE_VARS = /* @__PURE__ */ new Set([
1146
1161
  "NEXUS_GATEWAY_COST",
1147
- "NEXUS_OPENAI_COMPAT_ENDPOINT"
1162
+ "NEXUS_OPENAI_COMPAT_ENDPOINT",
1163
+ "NEXUS_OPENAI_COMPAT_EXTRA_HEADERS"
1148
1164
  ]);
1149
1165
  var REDACTED_VALUE = "<redacted>";
1150
1166
  var DYNAMIC_FAMILIES = [
@@ -30360,7 +30376,7 @@ function execIdFields(executionId) {
30360
30376
  async function populateUnifiedContextOnState(state, options) {
30361
30377
  const taskCandidate = state["task"];
30362
30378
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
30363
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-QI63DBJI.js");
30379
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-VENNHB6Q.js");
30364
30380
  const category = inferTaskCategory2(taskCandidate);
30365
30381
  const executionId = options?.executionId;
30366
30382
  const execFields = execIdFields(executionId);
@@ -44972,6 +44988,7 @@ function policyDecisionFields(decision) {
44972
44988
  }
44973
44989
  }
44974
44990
  var DROP_WARN_INTERVAL = 1e3;
44991
+ var MAX_CLOSE_DRAIN_PASSES = 3;
44975
44992
  var AuditLogger = class {
44976
44993
  storage;
44977
44994
  logger;
@@ -45342,7 +45359,8 @@ var AuditLogger = class {
45342
45359
  * so an overlapping flush-timer tick cannot spawn parallel drains (see
45343
45360
  * #2979). A caller arriving while a flush is already running awaits the
45344
45361
  * existing promise; their newly-queued events, if any, are picked up by
45345
- * the next flush.
45362
+ * the next flush — the timer's, or the extra passes {@link close} runs
45363
+ * (#6573).
45346
45364
  */
45347
45365
  async flush() {
45348
45366
  if (this.inFlightFlush !== null) return this.inFlightFlush;
@@ -45362,10 +45380,47 @@ var AuditLogger = class {
45362
45380
  clearInterval(this.flushTimer);
45363
45381
  this.flushTimer = null;
45364
45382
  }
45365
- await this.flush();
45383
+ await this.drainForClose();
45366
45384
  await this.storage.close();
45367
45385
  this.logger.info("AuditLogger closed");
45368
45386
  }
45387
+ /**
45388
+ * Flush until the queue is empty (#6573).
45389
+ *
45390
+ * One flush() is not enough: when a drain is already in flight, flush()
45391
+ * joins it, and that drain spliced the queue before any event logged during
45392
+ * it — `system.shutdown.begin` among them — arrived. `closed` is set before
45393
+ * this runs, so log() admits nothing new: the in-flight drain plus one fresh
45394
+ * pass empties the queue. The bound turns a regression of that invariant
45395
+ * into a reported failure instead of a spin.
45396
+ *
45397
+ * A failed pass is not retried here. flush() has already counted and
45398
+ * reported it; a batch it could not link (lock timeout) is back in the queue
45399
+ * unwritten, so nothing is written twice, and with no later flush to come it
45400
+ * is stranded — named here so the loss is not silent.
45401
+ */
45402
+ async drainForClose() {
45403
+ for (let pass = 0; pass < MAX_CLOSE_DRAIN_PASSES; pass++) {
45404
+ try {
45405
+ await this.flush();
45406
+ } catch (err2) {
45407
+ if (this.eventQueue.length > 0) {
45408
+ this.logger.error(
45409
+ "AUDIT CLOSE \u2014 queued audit events were NOT persisted and will be lost",
45410
+ err2 instanceof Error ? err2 : new AuditError(String(err2)),
45411
+ { strandedEvents: this.eventQueue.length }
45412
+ );
45413
+ }
45414
+ throw err2;
45415
+ }
45416
+ if (this.eventQueue.length === 0) return;
45417
+ }
45418
+ const error = new AuditError(
45419
+ `${String(this.eventQueue.length)} audit events still queued after ${String(MAX_CLOSE_DRAIN_PASSES)} flush passes at close`
45420
+ );
45421
+ this.recordPersistFailure(error);
45422
+ throw error;
45423
+ }
45369
45424
  };
45370
45425
  function createAuditLogger(config, storage, logger60, onPersistFailure) {
45371
45426
  return new AuditLogger(config, storage, logger60, onPersistFailure);
@@ -46331,7 +46386,7 @@ async function tryIssueTriage(task) {
46331
46386
  try {
46332
46387
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
46333
46388
  if (issueMatch === null) return null;
46334
- const { createIssueTriage } = await import("./issue-triage-DP27HRIY.js");
46389
+ const { createIssueTriage } = await import("./issue-triage-BIPWKL66.js");
46335
46390
  const triage = createIssueTriage();
46336
46391
  const owner = issueMatch[1] ?? "";
46337
46392
  const num2 = issueMatch[2] ?? "";
@@ -46359,7 +46414,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
46359
46414
  ]);
46360
46415
  async function classifyWithLLM(task) {
46361
46416
  try {
46362
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-WP7PJDNV.js");
46417
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-DAJAYNMQ.js");
46363
46418
  const prompt = [
46364
46419
  "Classify this task into exactly one pipeline template.",
46365
46420
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -46733,7 +46788,7 @@ function buildVotingInput(plan, config) {
46733
46788
  }
46734
46789
  async function executeSingleVote(plan, config, log) {
46735
46790
  try {
46736
- const { executeVoting } = await import("./consensus-vote-44KYPBV4.js");
46791
+ const { executeVoting } = await import("./consensus-vote-PJ5LS36B.js");
46737
46792
  const input = buildVotingInput(plan, config);
46738
46793
  const result = await executeVoting(input, log);
46739
46794
  return parseVotingResult(result);
@@ -47466,7 +47521,7 @@ var memoryInitPromise = null;
47466
47521
  async function initPipelineMemory() {
47467
47522
  if (cachedMemory !== null) return cachedMemory;
47468
47523
  try {
47469
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-K63UQWAN.js");
47524
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VOFCMXU6.js");
47470
47525
  const { getLearningDir } = await import("./learning-persistence-FB4U5AX2.js");
47471
47526
  const mem = createSessionMemory2(getLearningDir());
47472
47527
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -47528,7 +47583,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47528
47583
  callRecord(routingMemoryCache);
47529
47584
  return;
47530
47585
  }
47531
- routingMemoryInitPromise ??= import("./routing-memory-FRZ3EZBT.js").then(({ createRoutingMemory }) => {
47586
+ routingMemoryInitPromise ??= import("./routing-memory-S2MZCJBE.js").then(({ createRoutingMemory }) => {
47532
47587
  routingMemoryCache ??= createRoutingMemory();
47533
47588
  return routingMemoryCache;
47534
47589
  }).catch((error) => {
@@ -47699,7 +47754,7 @@ function createVoteStage({ config, startStage }) {
47699
47754
  const strategy = config.votingStrategy ?? "higher_order";
47700
47755
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47701
47756
  try {
47702
- const { executeVoting } = await import("./consensus-vote-44KYPBV4.js");
47757
+ const { executeVoting } = await import("./consensus-vote-PJ5LS36B.js");
47703
47758
  const votingResult = await executeVoting(
47704
47759
  {
47705
47760
  proposal: buildVoteProposal(plan, research),
@@ -48459,7 +48514,7 @@ ${text}` : "";
48459
48514
  }
48460
48515
  async function getWeatherContext() {
48461
48516
  try {
48462
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YZIE7PAH.js");
48517
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-NEHXHTWK.js");
48463
48518
  const report = generateWeatherReport2({ includeAdaptive: true });
48464
48519
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
48465
48520
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -48477,7 +48532,7 @@ ${lines}
48477
48532
  }
48478
48533
  async function getMemoryContext(task) {
48479
48534
  try {
48480
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-K63UQWAN.js");
48535
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VOFCMXU6.js");
48481
48536
  const { getLearningDir } = await import("./learning-persistence-FB4U5AX2.js");
48482
48537
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
48483
48538
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -49042,7 +49097,7 @@ async function searchCodebaseForTask(task) {
49042
49097
  }
49043
49098
  async function queryResearchRegistry(task) {
49044
49099
  try {
49045
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-MOJKZLS5.js");
49100
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-Z7JMKOOQ.js");
49046
49101
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
49047
49102
  if (topic === void 0) return null;
49048
49103
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -49113,7 +49168,7 @@ function createScanStageWrapper() {
49113
49168
  try {
49114
49169
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
49115
49170
  if (slug !== void 0) {
49116
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-5GNN6EQ2.js");
49171
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-7GPJJ577.js");
49117
49172
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
49118
49173
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
49119
49174
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -49808,6 +49863,7 @@ function resolvePanelReadBudget(seats, bindingCapBytes, registry = getDefaultReg
49808
49863
  };
49809
49864
  }
49810
49865
  async function resolvePanelSeats(roles, gatewayAdapters, logger60) {
49866
+ await ensureGatewayDiscovered();
49811
49867
  const fallback = resolveAdapter({ gatewayAdapters });
49812
49868
  if ("error" in fallback) return { ok: false, reason: `no adapter: ${fallback.error}` };
49813
49869
  try {
@@ -52628,7 +52684,7 @@ var GitHubTaskTracker = class {
52628
52684
  cachedProvider = null;
52629
52685
  async getProvider() {
52630
52686
  if (this.cachedProvider !== null) return this.cachedProvider;
52631
- const { createScmProvider } = await import("./factory-H7WD46ZF.js");
52687
+ const { createScmProvider } = await import("./factory-LGXPPPBX.js");
52632
52688
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
52633
52689
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
52634
52690
  this.cachedProvider = result.value;
@@ -53600,7 +53656,7 @@ async function probeSource(source, includeModelIds) {
53600
53656
  }
53601
53657
  }
53602
53658
  async function defaultSources(includeOpenRouter) {
53603
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-QJVIUHGU.js");
53659
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-O427FFK5.js");
53604
53660
  const adapters = createAllAdapters2();
53605
53661
  return buildDefaultModelSources(adapters, { includeOpenRouter });
53606
53662
  }
@@ -56932,4 +56988,4 @@ export {
56932
56988
  startPipelineEventBridge,
56933
56989
  shutdownPipelineEventBridge
56934
56990
  };
56935
- //# sourceMappingURL=chunk-GUEUV3ND.js.map
56991
+ //# sourceMappingURL=chunk-FJS4ASFA.js.map