nexus-agents 4.6.0 → 4.8.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 (121) hide show
  1. package/dist/{child-mcp-config-OBOA4PE2.js → child-mcp-config-7EMSHBAR.js} +2 -2
  2. package/dist/{chunk-BAWVMEXA.js → chunk-2HHQTXNM.js} +4 -4
  3. package/dist/{chunk-HBGA62JG.js → chunk-2IEKHIBA.js} +2 -2
  4. package/dist/{chunk-NMX7AYYB.js → chunk-3WCKPSX5.js} +2 -2
  5. package/dist/{chunk-KMUOL3AL.js → chunk-5MSYZOYQ.js} +2 -2
  6. package/dist/{chunk-YY67CP2U.js → chunk-5WNGNIEI.js} +3 -3
  7. package/dist/{chunk-VRJAJUUR.js → chunk-6AG3OYAZ.js} +7 -7
  8. package/dist/{chunk-D7X2AMEB.js → chunk-6JFY6VEF.js} +2 -2
  9. package/dist/{chunk-JDUTA6FI.js → chunk-6MTWEBXE.js} +2 -2
  10. package/dist/{chunk-75K4TN5H.js → chunk-7ZTPA3DA.js} +8 -8
  11. package/dist/{chunk-LVE7MN2F.js → chunk-BE256P4K.js} +6 -6
  12. package/dist/{chunk-C6SAPXUV.js → chunk-BZAE4CSC.js} +2 -2
  13. package/dist/{chunk-EYZIMY6I.js → chunk-DP7MSK65.js} +2 -2
  14. package/dist/{chunk-34UKF4FB.js → chunk-DQ3M2FOT.js} +3 -3
  15. package/dist/{chunk-NH3O2D5O.js → chunk-E55HKUGD.js} +70 -24
  16. package/dist/{chunk-NH3O2D5O.js.map → chunk-E55HKUGD.js.map} +1 -1
  17. package/dist/{chunk-YLESXBB3.js → chunk-EP3DR54Z.js} +2 -2
  18. package/dist/{chunk-EKS3ECXS.js → chunk-HC6PAAX6.js} +5 -5
  19. package/dist/{chunk-SWUYPFXS.js → chunk-HSXKPBIL.js} +2 -2
  20. package/dist/{chunk-7BMK5VEO.js → chunk-IM7N3F3Q.js} +8 -8
  21. package/dist/{chunk-6HSDJ5H6.js → chunk-IORRDBLS.js} +2 -2
  22. package/dist/{chunk-7Y7UFVQ5.js → chunk-IQ5HSF5T.js} +2 -2
  23. package/dist/{chunk-ZZED3BWY.js → chunk-IS4LVP6J.js} +50 -35
  24. package/dist/{chunk-ZZED3BWY.js.map → chunk-IS4LVP6J.js.map} +1 -1
  25. package/dist/{chunk-BT6ONNFH.js → chunk-JRIXLD4P.js} +2 -2
  26. package/dist/{chunk-BLY3DXM2.js → chunk-KFXGTYVY.js} +5 -5
  27. package/dist/{chunk-ANTZOHQ6.js → chunk-KNSXXGQO.js} +5 -5
  28. package/dist/{chunk-XCUO5YUJ.js → chunk-KQ57UMTL.js} +2 -2
  29. package/dist/{chunk-TD6I5UHY.js → chunk-LZQNX52I.js} +2 -2
  30. package/dist/{chunk-TI65NJOM.js → chunk-PBTWTF24.js} +2 -2
  31. package/dist/{chunk-ARTRA6YC.js → chunk-QJ7DCRNA.js} +3 -3
  32. package/dist/{chunk-O32DMSG5.js → chunk-RAIVRA2P.js} +3 -3
  33. package/dist/{chunk-ESWY4Y7S.js → chunk-RQDAZHIO.js} +4 -4
  34. package/dist/{chunk-B6DNL7LG.js → chunk-WD4PYSXP.js} +4 -4
  35. package/dist/{chunk-RWI6YQXG.js → chunk-WSYJJRUG.js} +8 -8
  36. package/dist/{chunk-5JRYCJ37.js → chunk-YWDM4NSG.js} +2 -2
  37. package/dist/{cli-circuit-breaker-TJVDSJU5.js → cli-circuit-breaker-FTBP6VL7.js} +3 -3
  38. package/dist/cli.js +41 -41
  39. package/dist/{composite-router-CIC4BU6A.js → composite-router-M4HWHAH2.js} +2 -2
  40. package/dist/{consensus-vote-77UCSVGM.js → consensus-vote-FNKU6MOA.js} +16 -16
  41. package/dist/{context-retriever-CP72SNYZ.js → context-retriever-RZ6ES6UT.js} +8 -8
  42. package/dist/{doctor-deep-WI2ZC7Z3.js → doctor-deep-T6SANBEH.js} +3 -3
  43. package/dist/{doctor-live-W2KY3OIA.js → doctor-live-7GJFIAZ3.js} +9 -9
  44. package/dist/{expert-bridge-HGBVHVJI.js → expert-bridge-KXTXS4WO.js} +4 -4
  45. package/dist/{factory-LEYEWZ4Y.js → factory-ARF7IPRR.js} +5 -5
  46. package/dist/{factory-GEBBVQHZ.js → factory-RPJYETAX.js} +9 -9
  47. package/dist/{improvement-review-XN2GZX3V.js → improvement-review-VXPGIWDO.js} +5 -5
  48. package/dist/index.d.ts +20 -2
  49. package/dist/index.js +30 -30
  50. package/dist/{init-opencode-UPA3R362.js → init-opencode-YEEJEZ6X.js} +6 -6
  51. package/dist/issue-triage-JL6OR4GW.js +17 -0
  52. package/dist/{pr-reviewer-helpers-KRKXKZIA.js → pr-reviewer-helpers-UKY5W27A.js} +4 -4
  53. package/dist/{registry-command-2SCTKLEO.js → registry-command-36ODRNON.js} +2 -2
  54. package/dist/{repo-security-plan-NFYC64IS.js → repo-security-plan-4GYJGZNI.js} +3 -3
  55. package/dist/{research-helpers-synthesize-K5TX2WM3.js → research-helpers-synthesize-EOL5JFU5.js} +4 -4
  56. package/dist/{routing-memory-JPDPHK7P.js → routing-memory-6CGLV4VC.js} +2 -2
  57. package/dist/{session-memory-XIIEIJPT.js → session-memory-RW2IVSPA.js} +3 -3
  58. package/dist/{setup-command-GEWL2HS4.js → setup-command-4WEZL6SC.js} +14 -14
  59. package/dist/{setup-config-SUEPUZYL.js → setup-config-BVH2PQJI.js} +3 -3
  60. package/dist/{setup-custom-api-5TTLIPV3.js → setup-custom-api-2KPTNTPJ.js} +4 -4
  61. package/dist/{tool-memory-ACUOYCYG.js → tool-memory-IX552UIJ.js} +5 -5
  62. package/dist/{unified-registry-P3PLOFBN.js → unified-registry-U25O2HBT.js} +10 -10
  63. package/dist/{weather-report-464SS6FY.js → weather-report-GTMO64Y6.js} +2 -2
  64. package/package.json +1 -1
  65. package/dist/issue-triage-QAI2FNMN.js +0 -17
  66. /package/dist/{child-mcp-config-OBOA4PE2.js.map → child-mcp-config-7EMSHBAR.js.map} +0 -0
  67. /package/dist/{chunk-BAWVMEXA.js.map → chunk-2HHQTXNM.js.map} +0 -0
  68. /package/dist/{chunk-HBGA62JG.js.map → chunk-2IEKHIBA.js.map} +0 -0
  69. /package/dist/{chunk-NMX7AYYB.js.map → chunk-3WCKPSX5.js.map} +0 -0
  70. /package/dist/{chunk-KMUOL3AL.js.map → chunk-5MSYZOYQ.js.map} +0 -0
  71. /package/dist/{chunk-YY67CP2U.js.map → chunk-5WNGNIEI.js.map} +0 -0
  72. /package/dist/{chunk-VRJAJUUR.js.map → chunk-6AG3OYAZ.js.map} +0 -0
  73. /package/dist/{chunk-D7X2AMEB.js.map → chunk-6JFY6VEF.js.map} +0 -0
  74. /package/dist/{chunk-JDUTA6FI.js.map → chunk-6MTWEBXE.js.map} +0 -0
  75. /package/dist/{chunk-75K4TN5H.js.map → chunk-7ZTPA3DA.js.map} +0 -0
  76. /package/dist/{chunk-LVE7MN2F.js.map → chunk-BE256P4K.js.map} +0 -0
  77. /package/dist/{chunk-C6SAPXUV.js.map → chunk-BZAE4CSC.js.map} +0 -0
  78. /package/dist/{chunk-EYZIMY6I.js.map → chunk-DP7MSK65.js.map} +0 -0
  79. /package/dist/{chunk-34UKF4FB.js.map → chunk-DQ3M2FOT.js.map} +0 -0
  80. /package/dist/{chunk-YLESXBB3.js.map → chunk-EP3DR54Z.js.map} +0 -0
  81. /package/dist/{chunk-EKS3ECXS.js.map → chunk-HC6PAAX6.js.map} +0 -0
  82. /package/dist/{chunk-SWUYPFXS.js.map → chunk-HSXKPBIL.js.map} +0 -0
  83. /package/dist/{chunk-7BMK5VEO.js.map → chunk-IM7N3F3Q.js.map} +0 -0
  84. /package/dist/{chunk-6HSDJ5H6.js.map → chunk-IORRDBLS.js.map} +0 -0
  85. /package/dist/{chunk-7Y7UFVQ5.js.map → chunk-IQ5HSF5T.js.map} +0 -0
  86. /package/dist/{chunk-BT6ONNFH.js.map → chunk-JRIXLD4P.js.map} +0 -0
  87. /package/dist/{chunk-BLY3DXM2.js.map → chunk-KFXGTYVY.js.map} +0 -0
  88. /package/dist/{chunk-ANTZOHQ6.js.map → chunk-KNSXXGQO.js.map} +0 -0
  89. /package/dist/{chunk-XCUO5YUJ.js.map → chunk-KQ57UMTL.js.map} +0 -0
  90. /package/dist/{chunk-TD6I5UHY.js.map → chunk-LZQNX52I.js.map} +0 -0
  91. /package/dist/{chunk-TI65NJOM.js.map → chunk-PBTWTF24.js.map} +0 -0
  92. /package/dist/{chunk-ARTRA6YC.js.map → chunk-QJ7DCRNA.js.map} +0 -0
  93. /package/dist/{chunk-O32DMSG5.js.map → chunk-RAIVRA2P.js.map} +0 -0
  94. /package/dist/{chunk-ESWY4Y7S.js.map → chunk-RQDAZHIO.js.map} +0 -0
  95. /package/dist/{chunk-B6DNL7LG.js.map → chunk-WD4PYSXP.js.map} +0 -0
  96. /package/dist/{chunk-RWI6YQXG.js.map → chunk-WSYJJRUG.js.map} +0 -0
  97. /package/dist/{chunk-5JRYCJ37.js.map → chunk-YWDM4NSG.js.map} +0 -0
  98. /package/dist/{cli-circuit-breaker-TJVDSJU5.js.map → cli-circuit-breaker-FTBP6VL7.js.map} +0 -0
  99. /package/dist/{composite-router-CIC4BU6A.js.map → composite-router-M4HWHAH2.js.map} +0 -0
  100. /package/dist/{consensus-vote-77UCSVGM.js.map → consensus-vote-FNKU6MOA.js.map} +0 -0
  101. /package/dist/{context-retriever-CP72SNYZ.js.map → context-retriever-RZ6ES6UT.js.map} +0 -0
  102. /package/dist/{doctor-deep-WI2ZC7Z3.js.map → doctor-deep-T6SANBEH.js.map} +0 -0
  103. /package/dist/{doctor-live-W2KY3OIA.js.map → doctor-live-7GJFIAZ3.js.map} +0 -0
  104. /package/dist/{expert-bridge-HGBVHVJI.js.map → expert-bridge-KXTXS4WO.js.map} +0 -0
  105. /package/dist/{factory-GEBBVQHZ.js.map → factory-ARF7IPRR.js.map} +0 -0
  106. /package/dist/{factory-LEYEWZ4Y.js.map → factory-RPJYETAX.js.map} +0 -0
  107. /package/dist/{improvement-review-XN2GZX3V.js.map → improvement-review-VXPGIWDO.js.map} +0 -0
  108. /package/dist/{init-opencode-UPA3R362.js.map → init-opencode-YEEJEZ6X.js.map} +0 -0
  109. /package/dist/{issue-triage-QAI2FNMN.js.map → issue-triage-JL6OR4GW.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-KRKXKZIA.js.map → pr-reviewer-helpers-UKY5W27A.js.map} +0 -0
  111. /package/dist/{registry-command-2SCTKLEO.js.map → registry-command-36ODRNON.js.map} +0 -0
  112. /package/dist/{repo-security-plan-NFYC64IS.js.map → repo-security-plan-4GYJGZNI.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-K5TX2WM3.js.map → research-helpers-synthesize-EOL5JFU5.js.map} +0 -0
  114. /package/dist/{routing-memory-JPDPHK7P.js.map → routing-memory-6CGLV4VC.js.map} +0 -0
  115. /package/dist/{session-memory-XIIEIJPT.js.map → session-memory-RW2IVSPA.js.map} +0 -0
  116. /package/dist/{setup-command-GEWL2HS4.js.map → setup-command-4WEZL6SC.js.map} +0 -0
  117. /package/dist/{setup-config-SUEPUZYL.js.map → setup-config-BVH2PQJI.js.map} +0 -0
  118. /package/dist/{setup-custom-api-5TTLIPV3.js.map → setup-custom-api-2KPTNTPJ.js.map} +0 -0
  119. /package/dist/{tool-memory-ACUOYCYG.js.map → tool-memory-IX552UIJ.js.map} +0 -0
  120. /package/dist/{unified-registry-P3PLOFBN.js.map → unified-registry-U25O2HBT.js.map} +0 -0
  121. /package/dist/{weather-report-464SS6FY.js.map → weather-report-GTMO64Y6.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-SNJNRDKZ.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-NH3O2D5O.js";
6
+ } from "./chunk-E55HKUGD.js";
7
7
  import "./chunk-2HUC6NZN.js";
8
8
  import "./chunk-OQLFRJCW.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -62,4 +62,4 @@ export {
62
62
  generateMcpConfig,
63
63
  getDefaultAllowedTools
64
64
  };
65
- //# sourceMappingURL=child-mcp-config-OBOA4PE2.js.map
65
+ //# sourceMappingURL=child-mcp-config-7EMSHBAR.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-7BMK5VEO.js";
3
+ } from "./chunk-IM7N3F3Q.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-NMX7AYYB.js";
7
+ } from "./chunk-3WCKPSX5.js";
8
8
  import {
9
9
  CLI_NAMES,
10
10
  CircularBuffer,
@@ -22,7 +22,7 @@ import {
22
22
  ok,
23
23
  recordRateLimitEvent,
24
24
  toRateLimitError
25
- } from "./chunk-NH3O2D5O.js";
25
+ } from "./chunk-E55HKUGD.js";
26
26
 
27
27
  // src/agents/collaboration/event-bus-helpers.ts
28
28
  import { randomUUID } from "crypto";
@@ -863,4 +863,4 @@ export {
863
863
  getGlobalRegistry,
864
864
  resetGlobalRegistry
865
865
  };
866
- //# sourceMappingURL=chunk-BAWVMEXA.js.map
866
+ //# sourceMappingURL=chunk-2HHQTXNM.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-NH3O2D5O.js";
5
+ } from "./chunk-E55HKUGD.js";
6
6
 
7
7
  // src/cli/doctor-deep.ts
8
8
  var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
@@ -106,4 +106,4 @@ export {
106
106
  runDeepDiagnostics,
107
107
  formatDeepDiagnostics
108
108
  };
109
- //# sourceMappingURL=chunk-HBGA62JG.js.map
109
+ //# sourceMappingURL=chunk-2IEKHIBA.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getTimeProvider,
9
9
  isRateLimitText,
10
10
  ok
11
- } from "./chunk-NH3O2D5O.js";
11
+ } from "./chunk-E55HKUGD.js";
12
12
 
13
13
  // src/cli-adapters/circuit-breaker-types.ts
14
14
  var CircuitErrorCode = {
@@ -540,4 +540,4 @@ export {
540
540
  CliCircuitBreakerIntegration,
541
541
  createCliCircuitBreakerIntegration
542
542
  };
543
- //# sourceMappingURL=chunk-NMX7AYYB.js.map
543
+ //# sourceMappingURL=chunk-3WCKPSX5.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-NH3O2D5O.js";
11
+ } from "./chunk-E55HKUGD.js";
12
12
 
13
13
  // src/cli/research-helpers-io.ts
14
14
  import * as fs2 from "fs/promises";
@@ -146,4 +146,4 @@ export {
146
146
  loadPapersRegistry,
147
147
  savePapersRegistry
148
148
  };
149
- //# sourceMappingURL=chunk-KMUOL3AL.js.map
149
+ //# sourceMappingURL=chunk-5MSYZOYQ.js.map
@@ -12,11 +12,11 @@ import {
12
12
  gateWithReputation,
13
13
  resolveReputationGatingMode,
14
14
  sanitizeInput
15
- } from "./chunk-XCUO5YUJ.js";
15
+ } from "./chunk-KQ57UMTL.js";
16
16
  import {
17
17
  createLogger,
18
18
  getTimeProvider
19
- } from "./chunk-NH3O2D5O.js";
19
+ } from "./chunk-E55HKUGD.js";
20
20
 
21
21
  // src/dogfooding/pr-reviewer-helpers.ts
22
22
  import { randomUUID } from "crypto";
@@ -291,4 +291,4 @@ export {
291
291
  formatReviewComment,
292
292
  createFailedReview
293
293
  };
294
- //# sourceMappingURL=chunk-YY67CP2U.js.map
294
+ //# sourceMappingURL=chunk-5WNGNIEI.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-TD6I5UHY.js";
3
+ } from "./chunk-LZQNX52I.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-NH3O2D5O.js";
8
+ } from "./chunk-E55HKUGD.js";
9
9
 
10
10
  // src/pipeline/expert-bridge.ts
11
11
  function resolveCliFromModelString(model) {
@@ -21,7 +21,7 @@ async function getMcpConfigPath() {
21
21
  if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
22
22
  mcpConfigInitPromise ??= (async () => {
23
23
  try {
24
- const { generateMcpConfig } = await import("./child-mcp-config-OBOA4PE2.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-7EMSHBAR.js");
25
25
  const config = await generateMcpConfig();
26
26
  cachedMcpConfigPath = config.configPath;
27
27
  cachedMcpConfigCleanup = config.cleanup;
@@ -93,8 +93,8 @@ var routerInitPromise = null;
93
93
  async function getRouter() {
94
94
  if (cachedRouter !== null) return cachedRouter;
95
95
  routerInitPromise ??= (async () => {
96
- const { createAllAdapters } = await import("./factory-GEBBVQHZ.js");
97
- const { createCompositeRouter } = await import("./composite-router-CIC4BU6A.js");
96
+ const { createAllAdapters } = await import("./factory-RPJYETAX.js");
97
+ const { createCompositeRouter } = await import("./composite-router-M4HWHAH2.js");
98
98
  const adapters = createAllAdapters();
99
99
  if (adapters.size === 0) {
100
100
  routerInitPromise = null;
@@ -102,7 +102,7 @@ async function getRouter() {
102
102
  }
103
103
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
104
104
  try {
105
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-TJVDSJU5.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-FTBP6VL7.js");
106
106
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
107
107
  } catch (error) {
108
108
  const msg = error instanceof Error ? error.message : String(error);
@@ -213,4 +213,4 @@ export {
213
213
  tokenSplitFromUsage,
214
214
  executeExpert
215
215
  };
216
- //# sourceMappingURL=chunk-VRJAJUUR.js.map
216
+ //# sourceMappingURL=chunk-6AG3OYAZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-NH3O2D5O.js";
7
+ } from "./chunk-E55HKUGD.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -352,4 +352,4 @@ export {
352
352
  SessionMemory,
353
353
  createSessionMemory
354
354
  };
355
- //# sourceMappingURL=chunk-D7X2AMEB.js.map
355
+ //# sourceMappingURL=chunk-6JFY6VEF.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  err,
5
5
  ok
6
- } from "./chunk-NH3O2D5O.js";
6
+ } from "./chunk-E55HKUGD.js";
7
7
 
8
8
  // src/adapters/sdk/types.ts
9
9
  var PROVIDER_ENV_KEYS = {
@@ -169,4 +169,4 @@ export {
169
169
  validateCustomApiBaseUrl,
170
170
  assertCustomApiHostResolvesPublic
171
171
  };
172
- //# sourceMappingURL=chunk-JDUTA6FI.js.map
172
+ //# sourceMappingURL=chunk-6MTWEBXE.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeCostDetail,
3
3
  priceBasisOf
4
- } from "./chunk-7Y7UFVQ5.js";
4
+ } from "./chunk-IQ5HSF5T.js";
5
5
  import {
6
6
  allOf
7
7
  } from "./chunk-OQB3XC5O.js";
@@ -22,20 +22,20 @@ import {
22
22
  toolSuccess,
23
23
  withProgressHeartbeat,
24
24
  wrapToolWithTimeout
25
- } from "./chunk-ARTRA6YC.js";
25
+ } from "./chunk-QJ7DCRNA.js";
26
26
  import {
27
27
  createEvent,
28
28
  getGlobalRegistry
29
- } from "./chunk-BAWVMEXA.js";
29
+ } from "./chunk-2HHQTXNM.js";
30
30
  import {
31
31
  getToolMemory
32
- } from "./chunk-B6DNL7LG.js";
32
+ } from "./chunk-WD4PYSXP.js";
33
33
  import {
34
34
  authRemediation,
35
35
  delay,
36
36
  getAvailableClis,
37
37
  withTimeout
38
- } from "./chunk-7BMK5VEO.js";
38
+ } from "./chunk-IM7N3F3Q.js";
39
39
  import {
40
40
  AgentError,
41
41
  CLI_NAMES,
@@ -64,7 +64,7 @@ import {
64
64
  resolveClassGuardMs,
65
65
  resolveModelIdentitySync,
66
66
  resolveVoteTimeout
67
- } from "./chunk-NH3O2D5O.js";
67
+ } from "./chunk-E55HKUGD.js";
68
68
  import {
69
69
  ensureLearningDir,
70
70
  getOutcomesFile
@@ -6162,7 +6162,7 @@ async function processVotesWithCascade(engineVotes, opts) {
6162
6162
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
6163
6163
  async function runContrarianCheck(proposal, log) {
6164
6164
  try {
6165
- const { executeExpert } = await import("./expert-bridge-HGBVHVJI.js");
6165
+ const { executeExpert } = await import("./expert-bridge-KXTXS4WO.js");
6166
6166
  const prompt = [
6167
6167
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
6168
6168
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -6728,4 +6728,4 @@ export {
6728
6728
  CONSENSUS_VOTE_TOOL_SCHEMA,
6729
6729
  registerConsensusVoteTool
6730
6730
  };
6731
- //# sourceMappingURL=chunk-75K4TN5H.js.map
6731
+ //# sourceMappingURL=chunk-7ZTPA3DA.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-6HSDJ5H6.js";
4
+ } from "./chunk-IORRDBLS.js";
5
5
  import {
6
6
  ROLE_DEFAULT_TRUST,
7
7
  ReputationCache,
@@ -11,20 +11,20 @@ import {
11
11
  gateWithReputation,
12
12
  resolveReputationGatingMode,
13
13
  sanitizeInput
14
- } from "./chunk-XCUO5YUJ.js";
14
+ } from "./chunk-KQ57UMTL.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-EYZIMY6I.js";
17
+ } from "./chunk-DP7MSK65.js";
18
18
  import {
19
19
  hasToken
20
- } from "./chunk-SWUYPFXS.js";
20
+ } from "./chunk-HSXKPBIL.js";
21
21
  import {
22
22
  CLI_SUBPROCESS_TIMEOUTS,
23
23
  createLogger,
24
24
  err,
25
25
  getTimeProvider,
26
26
  ok
27
- } from "./chunk-NH3O2D5O.js";
27
+ } from "./chunk-E55HKUGD.js";
28
28
 
29
29
  // src/security/trust-classifier.ts
30
30
  function mapAuthorAssociation(association) {
@@ -1247,4 +1247,4 @@ export {
1247
1247
  IssueTriage,
1248
1248
  createIssueTriage
1249
1249
  };
1250
- //# sourceMappingURL=chunk-LVE7MN2F.js.map
1250
+ //# sourceMappingURL=chunk-BE256P4K.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider
7
- } from "./chunk-NH3O2D5O.js";
7
+ } from "./chunk-E55HKUGD.js";
8
8
 
9
9
  // src/mcp/tools/scanner-registry-fetcher.ts
10
10
  import { z } from "zod";
@@ -721,4 +721,4 @@ export {
721
721
  generateSecurityPlan,
722
722
  buildPlanFromAnalysis
723
723
  };
724
- //# sourceMappingURL=chunk-C6SAPXUV.js.map
724
+ //# sourceMappingURL=chunk-BZAE4CSC.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-NH3O2D5O.js";
3
+ } from "./chunk-E55HKUGD.js";
4
4
 
5
5
  // src/security/audit-trail.ts
6
6
  var MAX_EVENTS = 1e4;
@@ -205,4 +205,4 @@ export {
205
205
  createGraphAuditBridge,
206
206
  createAuditTrail
207
207
  };
208
- //# sourceMappingURL=chunk-EYZIMY6I.js.map
208
+ //# sourceMappingURL=chunk-DP7MSK65.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-ARTRA6YC.js";
10
+ } from "./chunk-QJ7DCRNA.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -19,7 +19,7 @@ import {
19
19
  getPipelineEventBus,
20
20
  getTimeProvider,
21
21
  isDeclaredNeverDeprecate
22
- } from "./chunk-NH3O2D5O.js";
22
+ } from "./chunk-E55HKUGD.js";
23
23
  import {
24
24
  getNexusDataDir,
25
25
  nexusDataPath
@@ -2132,4 +2132,4 @@ export {
2132
2132
  runImprovementReview,
2133
2133
  registerImprovementReviewTool
2134
2134
  };
2135
- //# sourceMappingURL=chunk-34UKF4FB.js.map
2135
+ //# sourceMappingURL=chunk-DQ3M2FOT.js.map
@@ -2623,7 +2623,7 @@ function setDefaultRegistry(registry) {
2623
2623
  }
2624
2624
  async function reloadDefaultRegistry() {
2625
2625
  globalRegistry = buildDefaultRegistry();
2626
- const { resetGlobalRegistry } = await import("./unified-registry-P3PLOFBN.js");
2626
+ const { resetGlobalRegistry } = await import("./unified-registry-U25O2HBT.js");
2627
2627
  resetGlobalRegistry();
2628
2628
  return globalRegistry;
2629
2629
  }
@@ -10633,23 +10633,33 @@ function cliTaskToTask(cliTask) {
10633
10633
  context: {}
10634
10634
  };
10635
10635
  }
10636
- function applyBudgetFilter(task, candidates, budgetRouter, config) {
10637
- if (budgetRouter === void 0) return { eligible: candidates, withinBudget: true };
10638
- const rawConstraints = config.budgetConstraints;
10636
+ function toBudgetConstraint(raw) {
10639
10637
  const constraint = {};
10640
- if (rawConstraints?.maxTokens !== void 0) {
10641
- constraint.maxTokens = rawConstraints.maxTokens;
10638
+ if (raw?.maxTokens !== void 0) {
10639
+ constraint.maxTokens = raw.maxTokens;
10642
10640
  }
10643
- if (rawConstraints?.maxCostUsd !== void 0) {
10644
- constraint.maxCostUsd = rawConstraints.maxCostUsd;
10641
+ if (raw?.maxCostUsd !== void 0) {
10642
+ constraint.maxCostUsd = raw.maxCostUsd;
10645
10643
  }
10646
- if (rawConstraints?.maxLatencyMs !== void 0) {
10647
- constraint.maxLatencyMs = rawConstraints.maxLatencyMs;
10644
+ if (raw?.maxLatencyMs !== void 0) {
10645
+ constraint.maxLatencyMs = raw.maxLatencyMs;
10648
10646
  }
10647
+ return constraint;
10648
+ }
10649
+ function applyBudgetFilter(task, candidates, budgetRouter, config) {
10650
+ if (budgetRouter === void 0) return { eligible: candidates, withinBudget: true };
10651
+ const constraint = toBudgetConstraint(config.budgetConstraints);
10649
10652
  const result = budgetRouter.checkBudget(task, constraint);
10650
10653
  if (!result.withinBudget) return { eligible: [], withinBudget: false };
10651
- if (config.billingMode !== "api") return { eligible: candidates, withinBudget: true };
10652
- return { eligible: budgetRouter.filterByTaskClassCeiling(task, candidates), withinBudget: true };
10654
+ const maxCostUsd = constraint.maxCostUsd;
10655
+ const utilization = maxCostUsd !== void 0 && maxCostUsd > 0 ? { budgetUtilization: Math.min(1, result.estimatedCostUsd / maxCostUsd) } : {};
10656
+ if (config.billingMode !== "api")
10657
+ return { eligible: candidates, withinBudget: true, ...utilization };
10658
+ return {
10659
+ eligible: budgetRouter.filterByTaskClassCeiling(task, candidates),
10660
+ withinBudget: true,
10661
+ ...utilization
10662
+ };
10653
10663
  }
10654
10664
  var TOPSIS_TOLERANCE_BAND_PERCENT = 0.05;
10655
10665
  function selectTopsisRouter(router, billingMode, taskType, reasoningComplexity) {
@@ -13614,7 +13624,11 @@ function runBudgetStage(task, candidates, stagesExecuted, deps) {
13614
13624
  if (result.eligible.length === 0) {
13615
13625
  return err(new CompositeRoutingError("No CLIs within budget", "budget-filter"));
13616
13626
  }
13617
- return ok({ candidates: result.eligible, withinBudget: result.withinBudget });
13627
+ return ok({
13628
+ candidates: result.eligible,
13629
+ withinBudget: result.withinBudget,
13630
+ ...result.budgetUtilization === void 0 ? {} : { budgetUtilization: result.budgetUtilization }
13631
+ });
13618
13632
  }
13619
13633
  async function runCapacityStage(task, candidates, stagesExecuted, deps) {
13620
13634
  if (!deps.config.enableCapacityBalancing || deps.capacityFilterStage === void 0) {
@@ -13752,13 +13766,19 @@ async function runQualityConstraintStage(candidates, stagesExecuted, deps) {
13752
13766
  var DEFAULT_RESOURCE_RESULT = {
13753
13767
  scores: /* @__PURE__ */ new Map(),
13754
13768
  tier: "balanced",
13755
- resourceLevel: void 0
13769
+ resourceLevel: void 0,
13770
+ tierMeasured: false
13756
13771
  };
13757
- async function runResourceStrategyStage(task, candidates, stagesExecuted, deps) {
13772
+ async function runResourceStrategyStage(task, candidates, stagesExecuted, deps, budgetUtilization) {
13758
13773
  if (!deps.config.enableResourceStrategy || deps.resourceStrategyStage === void 0) {
13759
13774
  return DEFAULT_RESOURCE_RESULT;
13760
13775
  }
13761
- const ctx = createRoutingContext(task.content, armsToSlots(candidates));
13776
+ const resourceLevel = budgetUtilization === void 0 ? void 0 : Math.max(0, Math.min(1, 1 - budgetUtilization));
13777
+ const ctx = createRoutingContext(
13778
+ task.content,
13779
+ armsToSlots(candidates),
13780
+ resourceLevel === void 0 ? void 0 : { resourceLevel }
13781
+ );
13762
13782
  const result = await deps.resourceStrategyStage.route(ctx);
13763
13783
  stagesExecuted.push("resource-strategy");
13764
13784
  if (!result.ok) {
@@ -13767,8 +13787,19 @@ async function runResourceStrategyStage(task, candidates, stagesExecuted, deps)
13767
13787
  }
13768
13788
  const { signals, scores } = result.value.context;
13769
13789
  const tier = extractTierFromSignals(signals);
13770
- deps.logger.debug("Resource strategy completed", { tier, scoreCount: scores.size });
13771
- return { scores: new Map(scores), tier, resourceLevel: void 0 };
13790
+ const tierMeasured = signals.some((sig) => sig.startsWith("resource-strategy:tier="));
13791
+ deps.logger.debug("Resource strategy completed", {
13792
+ tier,
13793
+ tierMeasured,
13794
+ resourceLevel,
13795
+ scoreCount: scores.size
13796
+ });
13797
+ return {
13798
+ scores: new Map(scores),
13799
+ tier,
13800
+ resourceLevel: tierMeasured ? resourceLevel : void 0,
13801
+ tierMeasured
13802
+ };
13772
13803
  }
13773
13804
  async function runDistilledRuleStage(task, candidates, stagesExecuted, deps) {
13774
13805
  if (!deps.config.enableStrategyDistillation || deps.distilledRuleStage === void 0) {
@@ -13954,7 +13985,7 @@ function mergeScoreMaps(...maps) {
13954
13985
  }
13955
13986
  return merged;
13956
13987
  }
13957
- async function runScoringStages(task, candidates, stagesExecuted, deps) {
13988
+ async function runScoringStages(task, candidates, stagesExecuted, deps, budgetUtilization) {
13958
13989
  const cascadeResult = await runConfidenceCascadeStage(task, candidates, stagesExecuted, deps);
13959
13990
  const memoryResult = runRoutingMemoryStage(task, candidates, stagesExecuted, deps);
13960
13991
  const capResult = await runCapabilityMatchStage(task, candidates, stagesExecuted, deps);
@@ -13964,7 +13995,13 @@ async function runScoringStages(task, candidates, stagesExecuted, deps) {
13964
13995
  const distilledResult = await runDistilledRuleStage(task, filtered, stagesExecuted, deps);
13965
13996
  const prefResult = runPreferenceStage(task, filtered, stagesExecuted, deps);
13966
13997
  filtered = prefResult.preferredCandidates;
13967
- const resourceResult = await runResourceStrategyStage(task, filtered, stagesExecuted, deps);
13998
+ const resourceResult = await runResourceStrategyStage(
13999
+ task,
14000
+ filtered,
14001
+ stagesExecuted,
14002
+ deps,
14003
+ budgetUtilization
14004
+ );
13968
14005
  return {
13969
14006
  cascadeResult,
13970
14007
  memoryResult,
@@ -14075,7 +14112,13 @@ async function runPipeline(task, taskProfile, stagesExecuted, cliNames, deps) {
14075
14112
  const capacityResult = await runCapacityStage(task, candidates, stagesExecuted, deps);
14076
14113
  if (!capacityResult.ok) return capacityResult;
14077
14114
  candidates = capacityResult.value;
14078
- const scoring = await runScoringStages(task, candidates, stagesExecuted, deps);
14115
+ const scoring = await runScoringStages(
14116
+ task,
14117
+ candidates,
14118
+ stagesExecuted,
14119
+ deps,
14120
+ budgetResult.value.budgetUtilization
14121
+ );
14079
14122
  candidates = scoring.candidates;
14080
14123
  const constrained = await applyQualityConstraints(candidates, stagesExecuted, deps);
14081
14124
  if (!constrained.ok) return constrained;
@@ -14142,7 +14185,10 @@ function buildPipelineResult(p) {
14142
14185
  ...p.cascadeResult.complexity !== DEFAULT_COMPLEXITY ? { cascadeComplexity: p.cascadeResult.complexity } : {},
14143
14186
  ...p.capResult.taskType !== "general" ? { capabilityTaskType: p.capResult.taskType } : {},
14144
14187
  ...p.qualityResult.filtered.size > 0 ? { qualityFiltered: p.qualityResult.filtered } : {},
14145
- ...p.resourceResult.tier !== "balanced" ? { resourceTier: p.resourceResult.tier } : {},
14188
+ // Keyed on whether a tier was SELECTED, not on whether it differs from
14189
+ // the default — a measured 'balanced' is a decision and must be recorded
14190
+ // as one (#4866).
14191
+ ...p.resourceResult.tierMeasured ? { resourceTier: p.resourceResult.tier } : {},
14146
14192
  ...p.distilledResult.rulesApplied > 0 ? { distilledRulesApplied: p.distilledResult.rulesApplied } : {}
14147
14193
  };
14148
14194
  }
@@ -15022,7 +15068,7 @@ var CompositeRouter = class _CompositeRouter {
15022
15068
  */
15023
15069
  async consultUnifiedContext(task) {
15024
15070
  try {
15025
- const { getContextForTask, inferTaskCategory } = await import("./context-retriever-CP72SNYZ.js");
15071
+ const { getContextForTask, inferTaskCategory } = await import("./context-retriever-RZ6ES6UT.js");
15026
15072
  const ctx = await getContextForTask({
15027
15073
  task: task.content,
15028
15074
  category: inferTaskCategory(task.content),
@@ -16612,4 +16658,4 @@ export {
16612
16658
  AgentCapability,
16613
16659
  OrchestratorError
16614
16660
  };
16615
- //# sourceMappingURL=chunk-NH3O2D5O.js.map
16661
+ //# sourceMappingURL=chunk-E55HKUGD.js.map