nexus-agents 2.164.0 → 2.165.1

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-Q3XDLAVG.js → child-mcp-config-LQ4IKFSN.js} +2 -2
  2. package/dist/{chunk-NSZVUPZH.js → chunk-2255SARF.js} +2 -2
  3. package/dist/{chunk-SOWWAZ5C.js → chunk-2UMMVKUW.js} +3 -3
  4. package/dist/{chunk-4WZWUONK.js → chunk-33X5V4PL.js} +2 -2
  5. package/dist/{chunk-VGOPIPDV.js → chunk-3GYRM7D6.js} +5 -5
  6. package/dist/{chunk-2O4TMKUN.js → chunk-3HVF4BG4.js} +2 -2
  7. package/dist/{chunk-FTYO3F2S.js → chunk-3SMFRAX5.js} +3 -3
  8. package/dist/{chunk-GATA7PDR.js → chunk-55NRU7SV.js} +8 -8
  9. package/dist/{chunk-RYUMBYYR.js → chunk-6PYVTJZF.js} +2 -2
  10. package/dist/{chunk-M5LNQ6DM.js → chunk-CVLVWHXG.js} +5 -5
  11. package/dist/{chunk-UGNUHVZP.js → chunk-DPV7TCNP.js} +34 -34
  12. package/dist/{chunk-UFWFHXDP.js → chunk-DUUMMELV.js} +3 -3
  13. package/dist/{chunk-A57TGFAC.js → chunk-FFPFN4W2.js} +5 -5
  14. package/dist/{chunk-BOE7RCND.js → chunk-FKOWIKR4.js} +3 -3
  15. package/dist/{chunk-IH7A6MNH.js → chunk-IXZXG2MY.js} +7 -7
  16. package/dist/{chunk-FQNXEOL3.js → chunk-JBZMUKT4.js} +2 -2
  17. package/dist/{chunk-JAGAZMUT.js → chunk-JV64QX3Y.js} +2 -2
  18. package/dist/{chunk-KWYMR424.js → chunk-LKSG75LC.js} +4 -4
  19. package/dist/{chunk-XYA7W5IQ.js → chunk-LQ2ABFLI.js} +2 -2
  20. package/dist/{chunk-YLA7NOSK.js → chunk-LUP26FMZ.js} +4 -4
  21. package/dist/{chunk-M2BRITA3.js → chunk-MQUSJVER.js} +4 -4
  22. package/dist/{chunk-GMLPL5P2.js → chunk-MYNI3CYT.js} +4 -4
  23. package/dist/{chunk-V2PFGYOM.js → chunk-NBPA4PQD.js} +2 -2
  24. package/dist/{chunk-K54QBTB6.js → chunk-NXJJZEUO.js} +2 -2
  25. package/dist/{chunk-N6WRMZYA.js → chunk-PZ3BB3PO.js} +137 -38
  26. package/dist/chunk-PZ3BB3PO.js.map +1 -0
  27. package/dist/{chunk-NWIN6KOK.js → chunk-RBN4WXOA.js} +2 -2
  28. package/dist/{chunk-5HLHFSTH.js → chunk-RXI5ONP7.js} +2 -2
  29. package/dist/{chunk-6RIGFUZF.js → chunk-S6QSNP67.js} +7 -7
  30. package/dist/{chunk-KCVJPSZF.js → chunk-SF2AK3JB.js} +2 -2
  31. package/dist/{chunk-K6II2MEP.js → chunk-TFYQRAWT.js} +3 -3
  32. package/dist/{chunk-WEIYBIV3.js → chunk-TZNJCTNQ.js} +2 -2
  33. package/dist/{chunk-HLP36YBZ.js → chunk-U43BUJSN.js} +7 -7
  34. package/dist/{chunk-P2BP7MJS.js → chunk-YOFRUVPJ.js} +2 -2
  35. package/dist/{chunk-P67JWFPG.js → chunk-YPPYRLDF.js} +2 -2
  36. package/dist/{chunk-BE7MNC7B.js → chunk-ZNY7MM2J.js} +3 -3
  37. package/dist/{cli-circuit-breaker-G2P42V3H.js → cli-circuit-breaker-5IGBBD7R.js} +4 -4
  38. package/dist/cli.js +105 -85
  39. package/dist/cli.js.map +1 -1
  40. package/dist/{composite-router-NZPVPGSN.js → composite-router-62KI56W6.js} +2 -2
  41. package/dist/{consensus-vote-BTN37MRV.js → consensus-vote-M4ZELBV4.js} +15 -15
  42. package/dist/{context-retriever-4SWGSINU.js → context-retriever-5UJC5KDZ.js} +8 -8
  43. package/dist/{doctor-deep-SYEDHAPX.js → doctor-deep-7OR5MYMI.js} +3 -3
  44. package/dist/{expert-bridge-6I34TGL7.js → expert-bridge-BNMCDENK.js} +4 -4
  45. package/dist/{factory-KKRPWZ2A.js → factory-77GX5DG4.js} +8 -8
  46. package/dist/{factory-2BGHWTMC.js → factory-QLW773DP.js} +5 -5
  47. package/dist/{improvement-review-4RX6YUVD.js → improvement-review-KDM6OL25.js} +5 -5
  48. package/dist/index.js +30 -30
  49. package/dist/{init-opencode-CXUIMAUP.js → init-opencode-FXKABSGS.js} +6 -6
  50. package/dist/{issue-triage-4VXHABBD.js → issue-triage-OVX4VSUN.js} +6 -6
  51. package/dist/{pr-reviewer-helpers-5BOB2KK4.js → pr-reviewer-helpers-VGIBNZBX.js} +4 -4
  52. package/dist/{registry-command-4PDAF4XP.js → registry-command-CGMRLZQ2.js} +2 -2
  53. package/dist/{repo-security-plan-UMNW5FP6.js → repo-security-plan-TBCMGL5Z.js} +3 -3
  54. package/dist/{research-helpers-synthesize-WYFSSCKX.js → research-helpers-synthesize-76ZZYWJ5.js} +4 -4
  55. package/dist/{routing-memory-IMJPZUKI.js → routing-memory-PZ4LTLXJ.js} +2 -2
  56. package/dist/{session-memory-XKJFKI6R.js → session-memory-C55R7LGY.js} +3 -3
  57. package/dist/{setup-command-BPNKRJB2.js → setup-command-3SVR247D.js} +11 -11
  58. package/dist/{setup-config-DHGAMWSI.js → setup-config-SMRMMT6Z.js} +3 -3
  59. package/dist/{setup-custom-api-ESPG7XTX.js → setup-custom-api-42JXTJHU.js} +3 -3
  60. package/dist/{tool-memory-VGEHRRGE.js → tool-memory-LCDNVPFI.js} +5 -5
  61. package/dist/{unified-registry-GLVZZGSC.js → unified-registry-XEXWGKV5.js} +9 -9
  62. package/dist/{weather-report-ITGCNNPJ.js → weather-report-DPADAXFN.js} +2 -2
  63. package/package.json +1 -1
  64. package/dist/chunk-N6WRMZYA.js.map +0 -1
  65. /package/dist/{child-mcp-config-Q3XDLAVG.js.map → child-mcp-config-LQ4IKFSN.js.map} +0 -0
  66. /package/dist/{chunk-NSZVUPZH.js.map → chunk-2255SARF.js.map} +0 -0
  67. /package/dist/{chunk-SOWWAZ5C.js.map → chunk-2UMMVKUW.js.map} +0 -0
  68. /package/dist/{chunk-4WZWUONK.js.map → chunk-33X5V4PL.js.map} +0 -0
  69. /package/dist/{chunk-VGOPIPDV.js.map → chunk-3GYRM7D6.js.map} +0 -0
  70. /package/dist/{chunk-2O4TMKUN.js.map → chunk-3HVF4BG4.js.map} +0 -0
  71. /package/dist/{chunk-FTYO3F2S.js.map → chunk-3SMFRAX5.js.map} +0 -0
  72. /package/dist/{chunk-GATA7PDR.js.map → chunk-55NRU7SV.js.map} +0 -0
  73. /package/dist/{chunk-RYUMBYYR.js.map → chunk-6PYVTJZF.js.map} +0 -0
  74. /package/dist/{chunk-M5LNQ6DM.js.map → chunk-CVLVWHXG.js.map} +0 -0
  75. /package/dist/{chunk-UGNUHVZP.js.map → chunk-DPV7TCNP.js.map} +0 -0
  76. /package/dist/{chunk-UFWFHXDP.js.map → chunk-DUUMMELV.js.map} +0 -0
  77. /package/dist/{chunk-A57TGFAC.js.map → chunk-FFPFN4W2.js.map} +0 -0
  78. /package/dist/{chunk-BOE7RCND.js.map → chunk-FKOWIKR4.js.map} +0 -0
  79. /package/dist/{chunk-IH7A6MNH.js.map → chunk-IXZXG2MY.js.map} +0 -0
  80. /package/dist/{chunk-FQNXEOL3.js.map → chunk-JBZMUKT4.js.map} +0 -0
  81. /package/dist/{chunk-JAGAZMUT.js.map → chunk-JV64QX3Y.js.map} +0 -0
  82. /package/dist/{chunk-KWYMR424.js.map → chunk-LKSG75LC.js.map} +0 -0
  83. /package/dist/{chunk-XYA7W5IQ.js.map → chunk-LQ2ABFLI.js.map} +0 -0
  84. /package/dist/{chunk-YLA7NOSK.js.map → chunk-LUP26FMZ.js.map} +0 -0
  85. /package/dist/{chunk-M2BRITA3.js.map → chunk-MQUSJVER.js.map} +0 -0
  86. /package/dist/{chunk-GMLPL5P2.js.map → chunk-MYNI3CYT.js.map} +0 -0
  87. /package/dist/{chunk-V2PFGYOM.js.map → chunk-NBPA4PQD.js.map} +0 -0
  88. /package/dist/{chunk-K54QBTB6.js.map → chunk-NXJJZEUO.js.map} +0 -0
  89. /package/dist/{chunk-NWIN6KOK.js.map → chunk-RBN4WXOA.js.map} +0 -0
  90. /package/dist/{chunk-5HLHFSTH.js.map → chunk-RXI5ONP7.js.map} +0 -0
  91. /package/dist/{chunk-6RIGFUZF.js.map → chunk-S6QSNP67.js.map} +0 -0
  92. /package/dist/{chunk-KCVJPSZF.js.map → chunk-SF2AK3JB.js.map} +0 -0
  93. /package/dist/{chunk-K6II2MEP.js.map → chunk-TFYQRAWT.js.map} +0 -0
  94. /package/dist/{chunk-WEIYBIV3.js.map → chunk-TZNJCTNQ.js.map} +0 -0
  95. /package/dist/{chunk-HLP36YBZ.js.map → chunk-U43BUJSN.js.map} +0 -0
  96. /package/dist/{chunk-P2BP7MJS.js.map → chunk-YOFRUVPJ.js.map} +0 -0
  97. /package/dist/{chunk-P67JWFPG.js.map → chunk-YPPYRLDF.js.map} +0 -0
  98. /package/dist/{chunk-BE7MNC7B.js.map → chunk-ZNY7MM2J.js.map} +0 -0
  99. /package/dist/{cli-circuit-breaker-G2P42V3H.js.map → cli-circuit-breaker-5IGBBD7R.js.map} +0 -0
  100. /package/dist/{composite-router-NZPVPGSN.js.map → composite-router-62KI56W6.js.map} +0 -0
  101. /package/dist/{consensus-vote-BTN37MRV.js.map → consensus-vote-M4ZELBV4.js.map} +0 -0
  102. /package/dist/{context-retriever-4SWGSINU.js.map → context-retriever-5UJC5KDZ.js.map} +0 -0
  103. /package/dist/{doctor-deep-SYEDHAPX.js.map → doctor-deep-7OR5MYMI.js.map} +0 -0
  104. /package/dist/{expert-bridge-6I34TGL7.js.map → expert-bridge-BNMCDENK.js.map} +0 -0
  105. /package/dist/{factory-2BGHWTMC.js.map → factory-77GX5DG4.js.map} +0 -0
  106. /package/dist/{factory-KKRPWZ2A.js.map → factory-QLW773DP.js.map} +0 -0
  107. /package/dist/{improvement-review-4RX6YUVD.js.map → improvement-review-KDM6OL25.js.map} +0 -0
  108. /package/dist/{init-opencode-CXUIMAUP.js.map → init-opencode-FXKABSGS.js.map} +0 -0
  109. /package/dist/{issue-triage-4VXHABBD.js.map → issue-triage-OVX4VSUN.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-5BOB2KK4.js.map → pr-reviewer-helpers-VGIBNZBX.js.map} +0 -0
  111. /package/dist/{registry-command-4PDAF4XP.js.map → registry-command-CGMRLZQ2.js.map} +0 -0
  112. /package/dist/{repo-security-plan-UMNW5FP6.js.map → repo-security-plan-TBCMGL5Z.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-WYFSSCKX.js.map → research-helpers-synthesize-76ZZYWJ5.js.map} +0 -0
  114. /package/dist/{routing-memory-IMJPZUKI.js.map → routing-memory-PZ4LTLXJ.js.map} +0 -0
  115. /package/dist/{session-memory-XKJFKI6R.js.map → session-memory-C55R7LGY.js.map} +0 -0
  116. /package/dist/{setup-command-BPNKRJB2.js.map → setup-command-3SVR247D.js.map} +0 -0
  117. /package/dist/{setup-config-DHGAMWSI.js.map → setup-config-SMRMMT6Z.js.map} +0 -0
  118. /package/dist/{setup-custom-api-ESPG7XTX.js.map → setup-custom-api-42JXTJHU.js.map} +0 -0
  119. /package/dist/{tool-memory-VGEHRRGE.js.map → tool-memory-LCDNVPFI.js.map} +0 -0
  120. /package/dist/{unified-registry-GLVZZGSC.js.map → unified-registry-XEXWGKV5.js.map} +0 -0
  121. /package/dist/{weather-report-ITGCNNPJ.js.map → weather-report-DPADAXFN.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  OpenAIAdapter
3
- } from "./chunk-SOWWAZ5C.js";
3
+ } from "./chunk-2UMMVKUW.js";
4
4
  import {
5
5
  computeCostDetail,
6
6
  recordUsageEvent
7
- } from "./chunk-FQNXEOL3.js";
7
+ } from "./chunk-JBZMUKT4.js";
8
8
  import {
9
9
  ConfigError,
10
10
  createLogger,
@@ -12,7 +12,7 @@ import {
12
12
  getErrorMessage,
13
13
  getTimeProvider,
14
14
  ok
15
- } from "./chunk-N6WRMZYA.js";
15
+ } from "./chunk-PZ3BB3PO.js";
16
16
 
17
17
  // src/config/opencode-bridge.ts
18
18
  import { readFileSync } from "fs";
@@ -194,4 +194,4 @@ export {
194
194
  discoverModels,
195
195
  buildOpenAICompatAdapters
196
196
  };
197
- //# sourceMappingURL=chunk-KWYMR424.js.map
197
+ //# sourceMappingURL=chunk-LKSG75LC.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-N6WRMZYA.js";
7
+ } from "./chunk-PZ3BB3PO.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-XYA7W5IQ.js.map
355
+ //# sourceMappingURL=chunk-LQ2ABFLI.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-NWIN6KOK.js";
4
+ } from "./chunk-RBN4WXOA.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-JAGAZMUT.js";
7
+ } from "./chunk-JV64QX3Y.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-N6WRMZYA.js";
11
+ } from "./chunk-PZ3BB3PO.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-YLA7NOSK.js.map
44
+ //# sourceMappingURL=chunk-LUP26FMZ.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-XYA7W5IQ.js";
8
+ } from "./chunk-LQ2ABFLI.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KSQSWEFH.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-4WZWUONK.js";
18
+ } from "./chunk-33X5V4PL.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -28,7 +28,7 @@ import {
28
28
  getTimeProvider,
29
29
  ok,
30
30
  setSharedMobiMemDbPathResolver
31
- } from "./chunk-N6WRMZYA.js";
31
+ } from "./chunk-PZ3BB3PO.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-DHVMSIT5.js";
@@ -5552,4 +5552,4 @@ export {
5552
5552
  reinitializeMemoryBackends,
5553
5553
  ToolMemoryManager
5554
5554
  };
5555
- //# sourceMappingURL=chunk-M2BRITA3.js.map
5555
+ //# sourceMappingURL=chunk-MQUSJVER.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-IH7A6MNH.js";
3
+ } from "./chunk-IXZXG2MY.js";
4
4
  import {
5
5
  mapModelErrorToCategory
6
- } from "./chunk-5HLHFSTH.js";
6
+ } from "./chunk-RXI5ONP7.js";
7
7
  import {
8
8
  CLI_NAMES,
9
9
  CircularBuffer,
@@ -24,7 +24,7 @@ import {
24
24
  ok,
25
25
  recordRateLimitEvent,
26
26
  toRateLimitError
27
- } from "./chunk-N6WRMZYA.js";
27
+ } from "./chunk-PZ3BB3PO.js";
28
28
 
29
29
  // src/agents/collaboration/event-bus-helpers.ts
30
30
  import { randomUUID } from "crypto";
@@ -1041,4 +1041,4 @@ export {
1041
1041
  getGlobalRegistry,
1042
1042
  resetGlobalRegistry
1043
1043
  };
1044
- //# sourceMappingURL=chunk-GMLPL5P2.js.map
1044
+ //# sourceMappingURL=chunk-MYNI3CYT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-N6WRMZYA.js";
3
+ } from "./chunk-PZ3BB3PO.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-V2PFGYOM.js.map
208
+ //# sourceMappingURL=chunk-NBPA4PQD.js.map
@@ -11,7 +11,7 @@ import {
11
11
  isRateLimitLikeError,
12
12
  lookupInTreeCapability,
13
13
  ok
14
- } from "./chunk-N6WRMZYA.js";
14
+ } from "./chunk-PZ3BB3PO.js";
15
15
 
16
16
  // src/config/model-parameter-support.ts
17
17
  function parseClaudeMajorMinor(bareId) {
@@ -828,4 +828,4 @@ export {
828
828
  DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
829
829
  collectStream
830
830
  };
831
- //# sourceMappingURL=chunk-K54QBTB6.js.map
831
+ //# sourceMappingURL=chunk-NXJJZEUO.js.map
@@ -2619,7 +2619,7 @@ function setDefaultRegistry(registry) {
2619
2619
  }
2620
2620
  async function reloadDefaultRegistry() {
2621
2621
  globalRegistry = buildDefaultRegistry();
2622
- const { resetGlobalRegistry } = await import("./unified-registry-GLVZZGSC.js");
2622
+ const { resetGlobalRegistry } = await import("./unified-registry-XEXWGKV5.js");
2623
2623
  resetGlobalRegistry();
2624
2624
  return globalRegistry;
2625
2625
  }
@@ -7143,6 +7143,133 @@ function createPreferenceRouter(config, dataStore) {
7143
7143
 
7144
7144
  // src/cli-adapters/zero-router-types.ts
7145
7145
  import { z as z7 } from "zod";
7146
+
7147
+ // src/cli-adapters/derive-tier-tables.ts
7148
+ var CLI_ORDER = CLI_NAMES;
7149
+ var EXPENSIVE_SENTINEL = Number.MAX_SAFE_INTEGER;
7150
+ var RANK_MAX = 3;
7151
+ var RANK_MIN = 1;
7152
+ function compositeQuality(reasoning, codeGeneration) {
7153
+ return (reasoning + codeGeneration) / 2;
7154
+ }
7155
+ function normalizeBlendedPrice(blended) {
7156
+ return blended > 0 ? blended : EXPENSIVE_SENTINEL;
7157
+ }
7158
+ function readCliModelData() {
7159
+ const byId = new Map(buildInTreeEntries().map((e) => [e.id, e]));
7160
+ const out = {};
7161
+ for (const cli of CLI_ORDER) {
7162
+ const entry = byId.get(DEFAULT_MODEL_PER_CLI[cli]);
7163
+ const q = entry?.qualityScores;
7164
+ const pricing = entry?.pricing;
7165
+ const blended = pricing !== void 0 ? pricing.inputPer1M + pricing.outputPer1M : STATIC_CLI_COST_PER_1M[cli].input + STATIC_CLI_COST_PER_1M[cli].output;
7166
+ out[cli] = {
7167
+ quality: q !== void 0 ? compositeQuality(q.reasoning, q.codeGeneration) : void 0,
7168
+ price: normalizeBlendedPrice(blended),
7169
+ speed: q?.speed
7170
+ };
7171
+ }
7172
+ return out;
7173
+ }
7174
+ function scaleRank(value, min, max, invert) {
7175
+ if (max === min) return RANK_MAX;
7176
+ const t = (value - min) / (max - min);
7177
+ const norm = invert ? 1 - t : t;
7178
+ return RANK_MIN + norm * (RANK_MAX - RANK_MIN);
7179
+ }
7180
+ function buildQualityRank(data2) {
7181
+ const scored = CLI_ORDER.map((c) => data2[c].quality).filter((q) => q !== void 0);
7182
+ const min = scored.length > 0 ? Math.min(...scored) : 0;
7183
+ const max = scored.length > 0 ? Math.max(...scored) : 0;
7184
+ const out = {};
7185
+ for (const cli of CLI_ORDER) {
7186
+ const q = data2[cli].quality;
7187
+ out[cli] = q === void 0 ? 0 : scaleRank(q, min, max, false);
7188
+ }
7189
+ return out;
7190
+ }
7191
+ function buildCostRank(data2) {
7192
+ const prices = CLI_ORDER.map((c) => data2[c].price);
7193
+ const min = Math.min(...prices);
7194
+ const max = Math.max(...prices);
7195
+ const out = {};
7196
+ for (const cli of CLI_ORDER) {
7197
+ out[cli] = scaleRank(data2[cli].price, min, max, true);
7198
+ }
7199
+ return out;
7200
+ }
7201
+ function byDescThen(primary, secondary) {
7202
+ return (a, b) => {
7203
+ const p = primary(b) - primary(a);
7204
+ if (p !== 0) return p;
7205
+ const s = secondary(b) - secondary(a);
7206
+ if (s !== 0) return s;
7207
+ return CLI_ORDER.indexOf(a) - CLI_ORDER.indexOf(b);
7208
+ };
7209
+ }
7210
+ function buildTierToClis(data2) {
7211
+ const quality = buildQualityRank(data2);
7212
+ const cost = buildCostRank(data2);
7213
+ const speed = (c) => data2[c].speed ?? 0;
7214
+ const powerful = CLI_ORDER.filter((c) => data2[c].quality !== void 0).sort(
7215
+ byDescThen(
7216
+ (c) => quality[c],
7217
+ (c) => data2[c].price
7218
+ )
7219
+ );
7220
+ const fast = [...CLI_ORDER].sort(byDescThen(speed, (c) => cost[c]));
7221
+ const balanced = [...CLI_ORDER].sort(
7222
+ byDescThen(
7223
+ (c) => (quality[c] + cost[c]) / 2,
7224
+ (c) => cost[c]
7225
+ )
7226
+ );
7227
+ return { powerful, balanced, fast };
7228
+ }
7229
+ function buildConfidenceProfiles(data2) {
7230
+ const out = {};
7231
+ for (const cli of CLI_ORDER) {
7232
+ const datum = data2[cli];
7233
+ out[cli] = {
7234
+ simpleScore: (datum.speed ?? 0) / 10,
7235
+ complexScore: (datum.quality ?? 0) / 10
7236
+ };
7237
+ }
7238
+ return out;
7239
+ }
7240
+ function buildPremiumClis(data2) {
7241
+ const eligible = CLI_ORDER.filter(
7242
+ (c) => data2[c].quality !== void 0 && data2[c].price !== EXPENSIVE_SENTINEL
7243
+ );
7244
+ if (eligible.length === 0) return [];
7245
+ const maxPrice = Math.max(...eligible.map((c) => data2[c].price));
7246
+ return eligible.filter((c) => data2[c].price === maxPrice);
7247
+ }
7248
+ var cachedData;
7249
+ function data() {
7250
+ return cachedData ??= readCliModelData();
7251
+ }
7252
+ function deriveCliQualityRank() {
7253
+ return buildQualityRank(data());
7254
+ }
7255
+ function deriveCliCostRank() {
7256
+ return buildCostRank(data());
7257
+ }
7258
+ function deriveTierToClis() {
7259
+ return buildTierToClis(data());
7260
+ }
7261
+ function deriveCliConfidenceProfiles() {
7262
+ return buildConfidenceProfiles(data());
7263
+ }
7264
+ function deriveStrongClis() {
7265
+ return buildPremiumClis(data());
7266
+ }
7267
+ function deriveWeakClis() {
7268
+ const strong = new Set(deriveStrongClis());
7269
+ return CLI_ORDER.filter((c) => !strong.has(c));
7270
+ }
7271
+
7272
+ // src/cli-adapters/zero-router-types.ts
7146
7273
  var DifficultyDimensionSchema = z7.enum([
7147
7274
  "reasoning",
7148
7275
  "knowledge",
@@ -7178,11 +7305,7 @@ var DEFAULT_DIFFICULTY_TO_TIER = {
7178
7305
  medium: "balanced",
7179
7306
  hard: "powerful"
7180
7307
  };
7181
- var DEFAULT_TIER_TO_CLIS = {
7182
- fast: ["gemini", "codex", "opencode", "claude"],
7183
- balanced: ["codex", "opencode", "gemini", "claude"],
7184
- powerful: ["claude", "codex", "opencode", "gemini"]
7185
- };
7308
+ var DEFAULT_TIER_TO_CLIS = deriveTierToClis();
7186
7309
  var DifficultyWeightsSchema = z7.object({
7187
7310
  reasoning: z7.number().min(0).max(1),
7188
7311
  knowledge: z7.number().min(0).max(1),
@@ -8057,16 +8180,7 @@ var SIMPLE_TASK_INDICATORS = [
8057
8180
  ];
8058
8181
 
8059
8182
  // src/cli-adapters/routing/stages/confidence-cascade-stage.ts
8060
- var CLI_CONFIDENCE_PROFILES = {
8061
- claude: { simpleScore: 0.7, complexScore: 1 },
8062
- // Best for complex reasoning
8063
- gemini: { simpleScore: 1, complexScore: 0.6 },
8064
- // Fast for simple tasks
8065
- codex: { simpleScore: 0.8, complexScore: 0.9 },
8066
- // Good for code tasks
8067
- opencode: { simpleScore: 0.8, complexScore: 0.7 }
8068
- // Multi-provider proxy
8069
- };
8183
+ var CLI_CONFIDENCE_PROFILES = deriveCliConfidenceProfiles();
8070
8184
  var DEFAULT_CONFIG = {
8071
8185
  escalationThreshold: 0.7,
8072
8186
  complexityWeight: 0.3,
@@ -8554,18 +8668,8 @@ var DEFAULT_CONFIG4 = {
8554
8668
  conservativeBoost: 5,
8555
8669
  criticalBoost: 8
8556
8670
  };
8557
- var CLI_QUALITY_RANK = {
8558
- claude: 3,
8559
- codex: 2,
8560
- opencode: 1.5,
8561
- gemini: 1
8562
- };
8563
- var CLI_COST_RANK = {
8564
- gemini: 3,
8565
- codex: 2,
8566
- opencode: 2,
8567
- claude: 1
8568
- };
8671
+ var CLI_QUALITY_RANK = deriveCliQualityRank();
8672
+ var CLI_COST_RANK = deriveCliCostRank();
8569
8673
  function computeResourceTier(resourceLevel, config = DEFAULT_CONFIG4) {
8570
8674
  if (resourceLevel >= config.aggressiveThreshold) return "aggressive";
8571
8675
  if (resourceLevel >= config.balancedThreshold) return "balanced";
@@ -10114,8 +10218,8 @@ function buildReason(options) {
10114
10218
  return parts.join(", ");
10115
10219
  }
10116
10220
  function filterByPreferenceTier(candidates, tier) {
10117
- const strongModels = ["claude"];
10118
- const weakModels = ["gemini", "codex"];
10221
+ const strongModels = deriveStrongClis();
10222
+ const weakModels = deriveWeakClis();
10119
10223
  const preferred = tier === "strong" ? strongModels : weakModels;
10120
10224
  const filtered = candidates.filter((c) => preferred.includes(routingArmDisplaySlot(c)));
10121
10225
  return filtered.length > 0 ? filtered : candidates;
@@ -10239,12 +10343,7 @@ function defaultZeroRouterStageResult(candidates) {
10239
10343
  };
10240
10344
  }
10241
10345
  function filterByDifficultyTier(candidates, tier) {
10242
- const tierPreferences = {
10243
- fast: ["gemini", "codex", "claude"],
10244
- balanced: ["codex", "gemini", "claude"],
10245
- powerful: ["claude", "codex", "gemini"]
10246
- };
10247
- const preferred = tierPreferences[tier];
10346
+ const preferred = deriveTierToClis()[tier];
10248
10347
  const sortedCandidates = [...candidates].sort((a, b) => {
10249
10348
  const aIndex = preferred.indexOf(routingArmDisplaySlot(a));
10250
10349
  const bIndex = preferred.indexOf(routingArmDisplaySlot(b));
@@ -14258,7 +14357,7 @@ var CompositeRouter = class _CompositeRouter {
14258
14357
  */
14259
14358
  async consultUnifiedContext(task) {
14260
14359
  try {
14261
- const { getContextForTask, inferTaskCategory } = await import("./context-retriever-4SWGSINU.js");
14360
+ const { getContextForTask, inferTaskCategory } = await import("./context-retriever-5UJC5KDZ.js");
14262
14361
  const ctx = await getContextForTask({
14263
14362
  task: task.content,
14264
14363
  category: inferTaskCategory(task.content),
@@ -15847,4 +15946,4 @@ export {
15847
15946
  AgentCapability,
15848
15947
  OrchestratorError
15849
15948
  };
15850
- //# sourceMappingURL=chunk-N6WRMZYA.js.map
15949
+ //# sourceMappingURL=chunk-PZ3BB3PO.js.map