nexus-agents 4.7.0 → 4.9.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-SZ7IYE3O.js → child-mcp-config-FOV6RGTI.js} +2 -2
  2. package/dist/{chunk-2ZO74IO7.js → chunk-3HMVU6YV.js} +2 -2
  3. package/dist/{chunk-FOBKXJMS.js → chunk-46B6QM7X.js} +4 -4
  4. package/dist/{chunk-YMGPOFK3.js → chunk-5LGDHKAF.js} +2 -2
  5. package/dist/{chunk-ND3KSSGU.js → chunk-6YKJNMJB.js} +2 -2
  6. package/dist/{chunk-M5QKVRNH.js → chunk-BCBUMYNN.js} +2 -2
  7. package/dist/{chunk-Y6C2VF2R.js → chunk-BYL4FWRW.js} +7 -7
  8. package/dist/{chunk-GRWQU4XB.js → chunk-C7H2ZMTI.js} +6 -6
  9. package/dist/{chunk-AOW5WVTT.js → chunk-CIYZLDFN.js} +2 -2
  10. package/dist/{chunk-ZTQ4CHPG.js → chunk-CRQMSTRD.js} +2 -2
  11. package/dist/{chunk-YAB5NYKM.js → chunk-DBQGDWPQ.js} +2 -2
  12. package/dist/{chunk-RQ3F7KRP.js → chunk-DC5I6ZUU.js} +2 -2
  13. package/dist/{chunk-7M566K5K.js → chunk-F4NZHKMX.js} +3 -3
  14. package/dist/{chunk-S2BYGZIM.js → chunk-G4CRSFQX.js} +2 -2
  15. package/dist/{chunk-GBIL6A6D.js → chunk-GBM7WDAN.js} +2 -2
  16. package/dist/{chunk-LPPAXDV6.js → chunk-GU5KSFJJ.js} +5 -5
  17. package/dist/{chunk-HCGUPBE3.js → chunk-GWTZWIVD.js} +3 -3
  18. package/dist/{chunk-I5377PAC.js → chunk-HDJFKJBN.js} +4 -4
  19. package/dist/{chunk-C2DQXCIZ.js → chunk-HICY7SWU.js} +89 -39
  20. package/dist/chunk-HICY7SWU.js.map +1 -0
  21. package/dist/{chunk-YNWIXCPW.js → chunk-HJA2IANK.js} +4 -4
  22. package/dist/{chunk-BYEBHNRS.js → chunk-HRJ3KFVF.js} +3 -3
  23. package/dist/{chunk-6KPEN5OE.js → chunk-IB3LXCCE.js} +2 -2
  24. package/dist/{chunk-HGN5BYOW.js → chunk-JHIEVCKM.js} +8 -8
  25. package/dist/{chunk-RHQNFMUW.js → chunk-LIXY6TA2.js} +3 -3
  26. package/dist/{chunk-SWRXPVUQ.js → chunk-MAAMUATD.js} +2 -2
  27. package/dist/{chunk-HHRASHK4.js → chunk-MQ4RXXO3.js} +2 -2
  28. package/dist/{chunk-2MIG56ZD.js → chunk-NMJ5PA5E.js} +2 -2
  29. package/dist/{chunk-RFXPWYM5.js → chunk-OO7T76X7.js} +5 -5
  30. package/dist/{chunk-3QC3IWRP.js → chunk-QT4NXLGN.js} +2 -2
  31. package/dist/{chunk-H44SVOTG.js → chunk-U6R2755D.js} +35 -35
  32. package/dist/{chunk-V7EMWUUM.js → chunk-WBPABR75.js} +2 -2
  33. package/dist/{chunk-PBSANZII.js → chunk-XMODQQP2.js} +8 -8
  34. package/dist/{chunk-7MPLZ73P.js → chunk-Y5LJCBXT.js} +5 -5
  35. package/dist/{chunk-7U5E7DJV.js → chunk-YM5CYOJD.js} +8 -8
  36. package/dist/{cli-circuit-breaker-SQHLH44A.js → cli-circuit-breaker-BLFC7FR3.js} +3 -3
  37. package/dist/cli.js +41 -41
  38. package/dist/{composite-router-WBT2V32V.js → composite-router-JMIGKGMD.js} +2 -2
  39. package/dist/{consensus-vote-H6EIMQ7M.js → consensus-vote-F2G6NU52.js} +16 -16
  40. package/dist/{context-retriever-MON4VAVO.js → context-retriever-3LW47AYF.js} +8 -8
  41. package/dist/{doctor-deep-YB52D552.js → doctor-deep-SDKFSOBX.js} +3 -3
  42. package/dist/{doctor-live-YCCSYF5X.js → doctor-live-KVH36QTN.js} +9 -9
  43. package/dist/{expert-bridge-MLP3CVUY.js → expert-bridge-PVLV7KO6.js} +4 -4
  44. package/dist/{factory-YRLWFERP.js → factory-4XLZ7TCO.js} +9 -9
  45. package/dist/{factory-BOSRE2JV.js → factory-VTOTK2GI.js} +5 -5
  46. package/dist/{improvement-review-LTOEMHMZ.js → improvement-review-T6K4NMEU.js} +5 -5
  47. package/dist/index.js +30 -30
  48. package/dist/{init-opencode-ITKHZXYC.js → init-opencode-Y55APFSM.js} +6 -6
  49. package/dist/issue-triage-3ZVKSWSN.js +17 -0
  50. package/dist/{pr-reviewer-helpers-ISHVOYNB.js → pr-reviewer-helpers-JOKC7ZPC.js} +4 -4
  51. package/dist/{registry-command-ULIA5J5H.js → registry-command-PLYCOXYB.js} +2 -2
  52. package/dist/{repo-security-plan-QIXZWXKR.js → repo-security-plan-M3FZMFDC.js} +3 -3
  53. package/dist/{research-helpers-synthesize-VKRSNV7Q.js → research-helpers-synthesize-5ZB7LHOS.js} +4 -4
  54. package/dist/{routing-memory-FVAEEVZ2.js → routing-memory-4DUW3JYV.js} +2 -2
  55. package/dist/{session-memory-4U2BILBO.js → session-memory-2ZNHHQMW.js} +3 -3
  56. package/dist/{setup-command-TYHB2JK4.js → setup-command-PSD252BC.js} +14 -14
  57. package/dist/{setup-config-U6BM7PJO.js → setup-config-ENGMSAGI.js} +3 -3
  58. package/dist/{setup-custom-api-WTUJWZK7.js → setup-custom-api-JW4DUALL.js} +4 -4
  59. package/dist/{tool-memory-7NB5XYL3.js → tool-memory-QZTOLSTC.js} +5 -5
  60. package/dist/{unified-registry-LLMK2K43.js → unified-registry-W7W3J2XB.js} +10 -10
  61. package/dist/{weather-report-5T7XP752.js → weather-report-KQ5AAWY3.js} +2 -2
  62. package/package.json +1 -1
  63. package/dist/chunk-C2DQXCIZ.js.map +0 -1
  64. package/dist/issue-triage-G7SWJLF2.js +0 -17
  65. /package/dist/{child-mcp-config-SZ7IYE3O.js.map → child-mcp-config-FOV6RGTI.js.map} +0 -0
  66. /package/dist/{chunk-2ZO74IO7.js.map → chunk-3HMVU6YV.js.map} +0 -0
  67. /package/dist/{chunk-FOBKXJMS.js.map → chunk-46B6QM7X.js.map} +0 -0
  68. /package/dist/{chunk-YMGPOFK3.js.map → chunk-5LGDHKAF.js.map} +0 -0
  69. /package/dist/{chunk-ND3KSSGU.js.map → chunk-6YKJNMJB.js.map} +0 -0
  70. /package/dist/{chunk-M5QKVRNH.js.map → chunk-BCBUMYNN.js.map} +0 -0
  71. /package/dist/{chunk-Y6C2VF2R.js.map → chunk-BYL4FWRW.js.map} +0 -0
  72. /package/dist/{chunk-GRWQU4XB.js.map → chunk-C7H2ZMTI.js.map} +0 -0
  73. /package/dist/{chunk-AOW5WVTT.js.map → chunk-CIYZLDFN.js.map} +0 -0
  74. /package/dist/{chunk-ZTQ4CHPG.js.map → chunk-CRQMSTRD.js.map} +0 -0
  75. /package/dist/{chunk-YAB5NYKM.js.map → chunk-DBQGDWPQ.js.map} +0 -0
  76. /package/dist/{chunk-RQ3F7KRP.js.map → chunk-DC5I6ZUU.js.map} +0 -0
  77. /package/dist/{chunk-7M566K5K.js.map → chunk-F4NZHKMX.js.map} +0 -0
  78. /package/dist/{chunk-S2BYGZIM.js.map → chunk-G4CRSFQX.js.map} +0 -0
  79. /package/dist/{chunk-GBIL6A6D.js.map → chunk-GBM7WDAN.js.map} +0 -0
  80. /package/dist/{chunk-LPPAXDV6.js.map → chunk-GU5KSFJJ.js.map} +0 -0
  81. /package/dist/{chunk-HCGUPBE3.js.map → chunk-GWTZWIVD.js.map} +0 -0
  82. /package/dist/{chunk-I5377PAC.js.map → chunk-HDJFKJBN.js.map} +0 -0
  83. /package/dist/{chunk-YNWIXCPW.js.map → chunk-HJA2IANK.js.map} +0 -0
  84. /package/dist/{chunk-BYEBHNRS.js.map → chunk-HRJ3KFVF.js.map} +0 -0
  85. /package/dist/{chunk-6KPEN5OE.js.map → chunk-IB3LXCCE.js.map} +0 -0
  86. /package/dist/{chunk-HGN5BYOW.js.map → chunk-JHIEVCKM.js.map} +0 -0
  87. /package/dist/{chunk-RHQNFMUW.js.map → chunk-LIXY6TA2.js.map} +0 -0
  88. /package/dist/{chunk-SWRXPVUQ.js.map → chunk-MAAMUATD.js.map} +0 -0
  89. /package/dist/{chunk-HHRASHK4.js.map → chunk-MQ4RXXO3.js.map} +0 -0
  90. /package/dist/{chunk-2MIG56ZD.js.map → chunk-NMJ5PA5E.js.map} +0 -0
  91. /package/dist/{chunk-RFXPWYM5.js.map → chunk-OO7T76X7.js.map} +0 -0
  92. /package/dist/{chunk-3QC3IWRP.js.map → chunk-QT4NXLGN.js.map} +0 -0
  93. /package/dist/{chunk-H44SVOTG.js.map → chunk-U6R2755D.js.map} +0 -0
  94. /package/dist/{chunk-V7EMWUUM.js.map → chunk-WBPABR75.js.map} +0 -0
  95. /package/dist/{chunk-PBSANZII.js.map → chunk-XMODQQP2.js.map} +0 -0
  96. /package/dist/{chunk-7MPLZ73P.js.map → chunk-Y5LJCBXT.js.map} +0 -0
  97. /package/dist/{chunk-7U5E7DJV.js.map → chunk-YM5CYOJD.js.map} +0 -0
  98. /package/dist/{cli-circuit-breaker-SQHLH44A.js.map → cli-circuit-breaker-BLFC7FR3.js.map} +0 -0
  99. /package/dist/{composite-router-WBT2V32V.js.map → composite-router-JMIGKGMD.js.map} +0 -0
  100. /package/dist/{consensus-vote-H6EIMQ7M.js.map → consensus-vote-F2G6NU52.js.map} +0 -0
  101. /package/dist/{context-retriever-MON4VAVO.js.map → context-retriever-3LW47AYF.js.map} +0 -0
  102. /package/dist/{doctor-deep-YB52D552.js.map → doctor-deep-SDKFSOBX.js.map} +0 -0
  103. /package/dist/{doctor-live-YCCSYF5X.js.map → doctor-live-KVH36QTN.js.map} +0 -0
  104. /package/dist/{expert-bridge-MLP3CVUY.js.map → expert-bridge-PVLV7KO6.js.map} +0 -0
  105. /package/dist/{factory-BOSRE2JV.js.map → factory-4XLZ7TCO.js.map} +0 -0
  106. /package/dist/{factory-YRLWFERP.js.map → factory-VTOTK2GI.js.map} +0 -0
  107. /package/dist/{improvement-review-LTOEMHMZ.js.map → improvement-review-T6K4NMEU.js.map} +0 -0
  108. /package/dist/{init-opencode-ITKHZXYC.js.map → init-opencode-Y55APFSM.js.map} +0 -0
  109. /package/dist/{issue-triage-G7SWJLF2.js.map → issue-triage-3ZVKSWSN.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-ISHVOYNB.js.map → pr-reviewer-helpers-JOKC7ZPC.js.map} +0 -0
  111. /package/dist/{registry-command-ULIA5J5H.js.map → registry-command-PLYCOXYB.js.map} +0 -0
  112. /package/dist/{repo-security-plan-QIXZWXKR.js.map → repo-security-plan-M3FZMFDC.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-VKRSNV7Q.js.map → research-helpers-synthesize-5ZB7LHOS.js.map} +0 -0
  114. /package/dist/{routing-memory-FVAEEVZ2.js.map → routing-memory-4DUW3JYV.js.map} +0 -0
  115. /package/dist/{session-memory-4U2BILBO.js.map → session-memory-2ZNHHQMW.js.map} +0 -0
  116. /package/dist/{setup-command-TYHB2JK4.js.map → setup-command-PSD252BC.js.map} +0 -0
  117. /package/dist/{setup-config-U6BM7PJO.js.map → setup-config-ENGMSAGI.js.map} +0 -0
  118. /package/dist/{setup-custom-api-WTUJWZK7.js.map → setup-custom-api-JW4DUALL.js.map} +0 -0
  119. /package/dist/{tool-memory-7NB5XYL3.js.map → tool-memory-QZTOLSTC.js.map} +0 -0
  120. /package/dist/{unified-registry-LLMK2K43.js.map → unified-registry-W7W3J2XB.js.map} +0 -0
  121. /package/dist/{weather-report-5T7XP752.js.map → weather-report-KQ5AAWY3.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-SNJNRDKZ.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-C2DQXCIZ.js";
6
+ } from "./chunk-HICY7SWU.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-SZ7IYE3O.js.map
65
+ //# sourceMappingURL=child-mcp-config-FOV6RGTI.js.map
@@ -13,7 +13,7 @@ import {
13
13
  lookupInTreeCapability,
14
14
  ok,
15
15
  resolveRetryAfterMs
16
- } from "./chunk-C2DQXCIZ.js";
16
+ } from "./chunk-HICY7SWU.js";
17
17
 
18
18
  // src/config/model-parameter-support.ts
19
19
  function parseClaudeMajorMinor(bareId) {
@@ -834,4 +834,4 @@ export {
834
834
  DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
835
835
  collectStream
836
836
  };
837
- //# sourceMappingURL=chunk-2ZO74IO7.js.map
837
+ //# sourceMappingURL=chunk-3HMVU6YV.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-7U5E7DJV.js";
3
+ } from "./chunk-YM5CYOJD.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-GBIL6A6D.js";
7
+ } from "./chunk-GBM7WDAN.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-C2DQXCIZ.js";
25
+ } from "./chunk-HICY7SWU.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-FOBKXJMS.js.map
866
+ //# sourceMappingURL=chunk-46B6QM7X.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-C2DQXCIZ.js";
5
+ } from "./chunk-HICY7SWU.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-YMGPOFK3.js.map
109
+ //# sourceMappingURL=chunk-5LGDHKAF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-C2DQXCIZ.js";
3
+ } from "./chunk-HICY7SWU.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-ND3KSSGU.js.map
80
+ //# sourceMappingURL=chunk-6YKJNMJB.js.map
@@ -11,7 +11,7 @@ import {
11
11
  createGetRetryConfig,
12
12
  createGetTimeout,
13
13
  createGetToolRateLimit
14
- } from "./chunk-C2DQXCIZ.js";
14
+ } from "./chunk-HICY7SWU.js";
15
15
 
16
16
  // src/config/defaults.ts
17
17
  var CUSTOM_API_DEFAULT_MODEL = "gpt-5.5";
@@ -230,4 +230,4 @@ export {
230
230
  CUSTOM_API_DEFAULT_MODEL,
231
231
  DEFAULTS
232
232
  };
233
- //# sourceMappingURL=chunk-M5QKVRNH.js.map
233
+ //# sourceMappingURL=chunk-BCBUMYNN.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-2MIG56ZD.js";
3
+ } from "./chunk-NMJ5PA5E.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-C2DQXCIZ.js";
8
+ } from "./chunk-HICY7SWU.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-SZ7IYE3O.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-FOV6RGTI.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-YRLWFERP.js");
97
- const { createCompositeRouter } = await import("./composite-router-WBT2V32V.js");
96
+ const { createAllAdapters } = await import("./factory-4XLZ7TCO.js");
97
+ const { createCompositeRouter } = await import("./composite-router-JMIGKGMD.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-SQHLH44A.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-BLFC7FR3.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-Y6C2VF2R.js.map
216
+ //# sourceMappingURL=chunk-BYL4FWRW.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-V7EMWUUM.js";
4
+ } from "./chunk-WBPABR75.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-6KPEN5OE.js";
14
+ } from "./chunk-IB3LXCCE.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-RQ3F7KRP.js";
17
+ } from "./chunk-DC5I6ZUU.js";
18
18
  import {
19
19
  hasToken
20
- } from "./chunk-ZTQ4CHPG.js";
20
+ } from "./chunk-CRQMSTRD.js";
21
21
  import {
22
22
  CLI_SUBPROCESS_TIMEOUTS,
23
23
  createLogger,
24
24
  err,
25
25
  getTimeProvider,
26
26
  ok
27
- } from "./chunk-C2DQXCIZ.js";
27
+ } from "./chunk-HICY7SWU.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-GRWQU4XB.js.map
1250
+ //# sourceMappingURL=chunk-C7H2ZMTI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDefaultRegistry
3
- } from "./chunk-C2DQXCIZ.js";
3
+ } from "./chunk-HICY7SWU.js";
4
4
  import {
5
5
  getNexusDataDir
6
6
  } from "./chunk-OQLFRJCW.js";
@@ -128,4 +128,4 @@ export {
128
128
  loadUsageEvents,
129
129
  rollupByModel
130
130
  };
131
- //# sourceMappingURL=chunk-AOW5WVTT.js.map
131
+ //# sourceMappingURL=chunk-CIYZLDFN.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-C2DQXCIZ.js";
5
+ } from "./chunk-HICY7SWU.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-ZTQ4CHPG.js.map
90
+ //# sourceMappingURL=chunk-CRQMSTRD.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-C2DQXCIZ.js";
11
+ } from "./chunk-HICY7SWU.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-YAB5NYKM.js.map
149
+ //# sourceMappingURL=chunk-DBQGDWPQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-C2DQXCIZ.js";
3
+ } from "./chunk-HICY7SWU.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-RQ3F7KRP.js.map
208
+ //# sourceMappingURL=chunk-DC5I6ZUU.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-RHQNFMUW.js";
10
+ } from "./chunk-LIXY6TA2.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-C2DQXCIZ.js";
22
+ } from "./chunk-HICY7SWU.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-7M566K5K.js.map
2135
+ //# sourceMappingURL=chunk-F4NZHKMX.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  err,
5
5
  ok
6
- } from "./chunk-C2DQXCIZ.js";
6
+ } from "./chunk-HICY7SWU.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-S2BYGZIM.js.map
172
+ //# sourceMappingURL=chunk-G4CRSFQX.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getTimeProvider,
9
9
  isRateLimitText,
10
10
  ok
11
- } from "./chunk-C2DQXCIZ.js";
11
+ } from "./chunk-HICY7SWU.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-GBIL6A6D.js.map
543
+ //# sourceMappingURL=chunk-GBM7WDAN.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runConfigInitSync
3
- } from "./chunk-ND3KSSGU.js";
3
+ } from "./chunk-6YKJNMJB.js";
4
4
  import {
5
5
  VERSION,
6
6
  checkApiKeys,
@@ -9,13 +9,13 @@ import {
9
9
  defaultConfig,
10
10
  initDataDirectories,
11
11
  loadConfig
12
- } from "./chunk-PBSANZII.js";
12
+ } from "./chunk-XMODQQP2.js";
13
13
  import {
14
14
  BUILT_IN_EXPERTS
15
15
  } from "./chunk-YPNQPT2F.js";
16
16
  import {
17
17
  probeAllClis
18
- } from "./chunk-7U5E7DJV.js";
18
+ } from "./chunk-YM5CYOJD.js";
19
19
  import {
20
20
  CLI_SUBPROCESS_TIMEOUTS,
21
21
  colors,
@@ -26,7 +26,7 @@ import {
26
26
  getErrorMessage,
27
27
  getTimeProvider,
28
28
  symbols
29
- } from "./chunk-C2DQXCIZ.js";
29
+ } from "./chunk-HICY7SWU.js";
30
30
  import {
31
31
  ensureGitignored,
32
32
  findRepoRoot
@@ -2001,4 +2001,4 @@ export {
2001
2001
  setupCommand,
2002
2002
  setupCommandAsync
2003
2003
  };
2004
- //# sourceMappingURL=chunk-LPPAXDV6.js.map
2004
+ //# sourceMappingURL=chunk-GU5KSFJJ.js.map
@@ -12,11 +12,11 @@ import {
12
12
  gateWithReputation,
13
13
  resolveReputationGatingMode,
14
14
  sanitizeInput
15
- } from "./chunk-6KPEN5OE.js";
15
+ } from "./chunk-IB3LXCCE.js";
16
16
  import {
17
17
  createLogger,
18
18
  getTimeProvider
19
- } from "./chunk-C2DQXCIZ.js";
19
+ } from "./chunk-HICY7SWU.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-HCGUPBE3.js.map
294
+ //# sourceMappingURL=chunk-GWTZWIVD.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-V7EMWUUM.js";
4
+ } from "./chunk-WBPABR75.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-ZTQ4CHPG.js";
7
+ } from "./chunk-CRQMSTRD.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-C2DQXCIZ.js";
11
+ } from "./chunk-HICY7SWU.js";
12
12
 
13
13
  // src/scm/factory.ts
14
14
  async function createScmProvider(config) {
@@ -41,4 +41,4 @@ export {
41
41
  createScmProvider,
42
42
  createGitHubProvider
43
43
  };
44
- //# sourceMappingURL=chunk-I5377PAC.js.map
44
+ //# sourceMappingURL=chunk-HDJFKJBN.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-LLMK2K43.js");
2626
+ const { resetGlobalRegistry } = await import("./unified-registry-W7W3J2XB.js");
2627
2627
  resetGlobalRegistry();
2628
2628
  return globalRegistry;
2629
2629
  }
@@ -8994,8 +8994,11 @@ var DistilledRuleStage = class {
8994
8994
  const updated2 = addTrace(ctx, this.name, elapsed2, "skip", "no active rules");
8995
8995
  return ok({ context: updated2, continuesPipeline: true });
8996
8996
  }
8997
- const category = this.extractCategory(ctx);
8997
+ const category = readTaskCategory(ctx);
8998
8998
  let updated = ctx;
8999
+ if (category === void 0) {
9000
+ updated = { ...updated, signals: [...updated.signals, "distilled-rule:category-unknown"] };
9001
+ }
8999
9002
  let applied = 0;
9000
9003
  for (const cli of candidates) {
9001
9004
  const matchingRules = this.findMatchingRules(activeRules, cli, category);
@@ -9030,18 +9033,11 @@ var DistilledRuleStage = class {
9030
9033
  const baseDelta = rule.action === "penalize" ? this.config.penaltyDelta : rule.action === "boost" ? this.config.boostDelta : this.config.avoidDelta;
9031
9034
  return baseDelta * rule.confidence;
9032
9035
  }
9033
- extractCategory(ctx) {
9034
- for (const signal of ctx.signals) {
9035
- if (signal.startsWith("task-category:")) {
9036
- return signal.slice("task-category:".length);
9037
- }
9038
- if (signal.startsWith("capability:type=")) {
9039
- return signal.slice("capability:type=".length);
9040
- }
9041
- }
9042
- return void 0;
9043
- }
9044
9036
  };
9037
+ function readTaskCategory(ctx) {
9038
+ const parsed = TaskCategorySchema.safeParse(ctx.metadata?.["taskCategory"]);
9039
+ return parsed.success ? parsed.data : void 0;
9040
+ }
9045
9041
 
9046
9042
  // src/cli-adapters/routing/stages/knn-routing-stage.ts
9047
9043
  var DEFAULT_K = 5;
@@ -10633,23 +10629,33 @@ function cliTaskToTask(cliTask) {
10633
10629
  context: {}
10634
10630
  };
10635
10631
  }
10636
- function applyBudgetFilter(task, candidates, budgetRouter, config) {
10637
- if (budgetRouter === void 0) return { eligible: candidates, withinBudget: true };
10638
- const rawConstraints = config.budgetConstraints;
10632
+ function toBudgetConstraint(raw) {
10639
10633
  const constraint = {};
10640
- if (rawConstraints?.maxTokens !== void 0) {
10641
- constraint.maxTokens = rawConstraints.maxTokens;
10634
+ if (raw?.maxTokens !== void 0) {
10635
+ constraint.maxTokens = raw.maxTokens;
10642
10636
  }
10643
- if (rawConstraints?.maxCostUsd !== void 0) {
10644
- constraint.maxCostUsd = rawConstraints.maxCostUsd;
10637
+ if (raw?.maxCostUsd !== void 0) {
10638
+ constraint.maxCostUsd = raw.maxCostUsd;
10645
10639
  }
10646
- if (rawConstraints?.maxLatencyMs !== void 0) {
10647
- constraint.maxLatencyMs = rawConstraints.maxLatencyMs;
10640
+ if (raw?.maxLatencyMs !== void 0) {
10641
+ constraint.maxLatencyMs = raw.maxLatencyMs;
10648
10642
  }
10643
+ return constraint;
10644
+ }
10645
+ function applyBudgetFilter(task, candidates, budgetRouter, config) {
10646
+ if (budgetRouter === void 0) return { eligible: candidates, withinBudget: true };
10647
+ const constraint = toBudgetConstraint(config.budgetConstraints);
10649
10648
  const result = budgetRouter.checkBudget(task, constraint);
10650
10649
  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 };
10650
+ const maxCostUsd = constraint.maxCostUsd;
10651
+ const utilization = maxCostUsd !== void 0 && maxCostUsd > 0 ? { budgetUtilization: Math.min(1, result.estimatedCostUsd / maxCostUsd) } : {};
10652
+ if (config.billingMode !== "api")
10653
+ return { eligible: candidates, withinBudget: true, ...utilization };
10654
+ return {
10655
+ eligible: budgetRouter.filterByTaskClassCeiling(task, candidates),
10656
+ withinBudget: true,
10657
+ ...utilization
10658
+ };
10653
10659
  }
10654
10660
  var TOPSIS_TOLERANCE_BAND_PERCENT = 0.05;
10655
10661
  function selectTopsisRouter(router, billingMode, taskType, reasoningComplexity) {
@@ -13614,7 +13620,11 @@ function runBudgetStage(task, candidates, stagesExecuted, deps) {
13614
13620
  if (result.eligible.length === 0) {
13615
13621
  return err(new CompositeRoutingError("No CLIs within budget", "budget-filter"));
13616
13622
  }
13617
- return ok({ candidates: result.eligible, withinBudget: result.withinBudget });
13623
+ return ok({
13624
+ candidates: result.eligible,
13625
+ withinBudget: result.withinBudget,
13626
+ ...result.budgetUtilization === void 0 ? {} : { budgetUtilization: result.budgetUtilization }
13627
+ });
13618
13628
  }
13619
13629
  async function runCapacityStage(task, candidates, stagesExecuted, deps) {
13620
13630
  if (!deps.config.enableCapacityBalancing || deps.capacityFilterStage === void 0) {
@@ -13752,13 +13762,19 @@ async function runQualityConstraintStage(candidates, stagesExecuted, deps) {
13752
13762
  var DEFAULT_RESOURCE_RESULT = {
13753
13763
  scores: /* @__PURE__ */ new Map(),
13754
13764
  tier: "balanced",
13755
- resourceLevel: void 0
13765
+ resourceLevel: void 0,
13766
+ tierMeasured: false
13756
13767
  };
13757
- async function runResourceStrategyStage(task, candidates, stagesExecuted, deps) {
13768
+ async function runResourceStrategyStage(task, candidates, stagesExecuted, deps, budgetUtilization) {
13758
13769
  if (!deps.config.enableResourceStrategy || deps.resourceStrategyStage === void 0) {
13759
13770
  return DEFAULT_RESOURCE_RESULT;
13760
13771
  }
13761
- const ctx = createRoutingContext(task.content, armsToSlots(candidates));
13772
+ const resourceLevel = budgetUtilization === void 0 ? void 0 : Math.max(0, Math.min(1, 1 - budgetUtilization));
13773
+ const ctx = createRoutingContext(
13774
+ task.content,
13775
+ armsToSlots(candidates),
13776
+ resourceLevel === void 0 ? void 0 : { resourceLevel }
13777
+ );
13762
13778
  const result = await deps.resourceStrategyStage.route(ctx);
13763
13779
  stagesExecuted.push("resource-strategy");
13764
13780
  if (!result.ok) {
@@ -13767,14 +13783,29 @@ async function runResourceStrategyStage(task, candidates, stagesExecuted, deps)
13767
13783
  }
13768
13784
  const { signals, scores } = result.value.context;
13769
13785
  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 };
13786
+ const tierMeasured = signals.some((sig) => sig.startsWith("resource-strategy:tier="));
13787
+ deps.logger.debug("Resource strategy completed", {
13788
+ tier,
13789
+ tierMeasured,
13790
+ resourceLevel,
13791
+ scoreCount: scores.size
13792
+ });
13793
+ return {
13794
+ scores: new Map(scores),
13795
+ tier,
13796
+ resourceLevel: tierMeasured ? resourceLevel : void 0,
13797
+ tierMeasured
13798
+ };
13772
13799
  }
13773
- async function runDistilledRuleStage(task, candidates, stagesExecuted, deps) {
13800
+ async function runDistilledRuleStage(task, candidates, stagesExecuted, deps, taskCategory) {
13774
13801
  if (!deps.config.enableStrategyDistillation || deps.distilledRuleStage === void 0) {
13775
13802
  return { scores: /* @__PURE__ */ new Map(), rulesApplied: 0 };
13776
13803
  }
13777
- const ctx = createRoutingContext(task.content, armsToSlots(candidates));
13804
+ const ctx = createRoutingContext(
13805
+ task.content,
13806
+ armsToSlots(candidates),
13807
+ taskCategory === void 0 ? void 0 : { taskCategory }
13808
+ );
13778
13809
  const result = await deps.distilledRuleStage.route(ctx);
13779
13810
  stagesExecuted.push("distilled-rule");
13780
13811
  if (!result.ok) {
@@ -13954,17 +13985,27 @@ function mergeScoreMaps(...maps) {
13954
13985
  }
13955
13986
  return merged;
13956
13987
  }
13957
- async function runScoringStages(task, candidates, stagesExecuted, deps) {
13988
+ function detectedCategory(task) {
13989
+ return detectTaskCategory(task.content)?.category;
13990
+ }
13991
+ async function runScoringStages(task, candidates, stagesExecuted, deps, budgetUtilization) {
13958
13992
  const cascadeResult = await runConfidenceCascadeStage(task, candidates, stagesExecuted, deps);
13959
13993
  const memoryResult = runRoutingMemoryStage(task, candidates, stagesExecuted, deps);
13960
13994
  const capResult = await runCapabilityMatchStage(task, candidates, stagesExecuted, deps);
13961
13995
  const knnResult = await runKnnRoutingStage(task, candidates, stagesExecuted, deps);
13962
13996
  const zeroResult = runZeroRouterStage(task, candidates, stagesExecuted, deps);
13963
13997
  let filtered = zeroResult.filteredCandidates;
13964
- const distilledResult = await runDistilledRuleStage(task, filtered, stagesExecuted, deps);
13998
+ const cat = detectedCategory(task);
13999
+ const distilledResult = await runDistilledRuleStage(task, filtered, stagesExecuted, deps, cat);
13965
14000
  const prefResult = runPreferenceStage(task, filtered, stagesExecuted, deps);
13966
14001
  filtered = prefResult.preferredCandidates;
13967
- const resourceResult = await runResourceStrategyStage(task, filtered, stagesExecuted, deps);
14002
+ const resourceResult = await runResourceStrategyStage(
14003
+ task,
14004
+ filtered,
14005
+ stagesExecuted,
14006
+ deps,
14007
+ budgetUtilization
14008
+ );
13968
14009
  return {
13969
14010
  cascadeResult,
13970
14011
  memoryResult,
@@ -14075,7 +14116,13 @@ async function runPipeline(task, taskProfile, stagesExecuted, cliNames, deps) {
14075
14116
  const capacityResult = await runCapacityStage(task, candidates, stagesExecuted, deps);
14076
14117
  if (!capacityResult.ok) return capacityResult;
14077
14118
  candidates = capacityResult.value;
14078
- const scoring = await runScoringStages(task, candidates, stagesExecuted, deps);
14119
+ const scoring = await runScoringStages(
14120
+ task,
14121
+ candidates,
14122
+ stagesExecuted,
14123
+ deps,
14124
+ budgetResult.value.budgetUtilization
14125
+ );
14079
14126
  candidates = scoring.candidates;
14080
14127
  const constrained = await applyQualityConstraints(candidates, stagesExecuted, deps);
14081
14128
  if (!constrained.ok) return constrained;
@@ -14142,7 +14189,10 @@ function buildPipelineResult(p) {
14142
14189
  ...p.cascadeResult.complexity !== DEFAULT_COMPLEXITY ? { cascadeComplexity: p.cascadeResult.complexity } : {},
14143
14190
  ...p.capResult.taskType !== "general" ? { capabilityTaskType: p.capResult.taskType } : {},
14144
14191
  ...p.qualityResult.filtered.size > 0 ? { qualityFiltered: p.qualityResult.filtered } : {},
14145
- ...p.resourceResult.tier !== "balanced" ? { resourceTier: p.resourceResult.tier } : {},
14192
+ // Keyed on whether a tier was SELECTED, not on whether it differs from
14193
+ // the default — a measured 'balanced' is a decision and must be recorded
14194
+ // as one (#4866).
14195
+ ...p.resourceResult.tierMeasured ? { resourceTier: p.resourceResult.tier } : {},
14146
14196
  ...p.distilledResult.rulesApplied > 0 ? { distilledRulesApplied: p.distilledResult.rulesApplied } : {}
14147
14197
  };
14148
14198
  }
@@ -15022,7 +15072,7 @@ var CompositeRouter = class _CompositeRouter {
15022
15072
  */
15023
15073
  async consultUnifiedContext(task) {
15024
15074
  try {
15025
- const { getContextForTask, inferTaskCategory } = await import("./context-retriever-MON4VAVO.js");
15075
+ const { getContextForTask, inferTaskCategory } = await import("./context-retriever-3LW47AYF.js");
15026
15076
  const ctx = await getContextForTask({
15027
15077
  task: task.content,
15028
15078
  category: inferTaskCategory(task.content),
@@ -16612,4 +16662,4 @@ export {
16612
16662
  AgentCapability,
16613
16663
  OrchestratorError
16614
16664
  };
16615
- //# sourceMappingURL=chunk-C2DQXCIZ.js.map
16665
+ //# sourceMappingURL=chunk-HICY7SWU.js.map