nexus-agents 8.98.0 → 8.99.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 (129) hide show
  1. package/dist/{ast-rule-runner-YBAZFEUB.js → ast-rule-runner-V5HATZWS.js} +3 -3
  2. package/dist/{child-mcp-config-VUERRL3V.js → child-mcp-config-6BOVWAIX.js} +2 -2
  3. package/dist/{chunk-OCMF5DK6.js → chunk-3IOUGC4G.js} +2 -2
  4. package/dist/{chunk-JD4PKLC2.js → chunk-53ERK7XF.js} +2 -2
  5. package/dist/{chunk-3EIK7A4M.js → chunk-6G7P5S4C.js} +3 -3
  6. package/dist/{chunk-Y2ESO2BO.js → chunk-6OQHDUFO.js} +146 -13
  7. package/dist/chunk-6OQHDUFO.js.map +1 -0
  8. package/dist/{chunk-VU4LLVHS.js → chunk-7JT6LJTH.js} +4 -4
  9. package/dist/{chunk-PHN4KDGD.js → chunk-7JYPJ257.js} +10 -6
  10. package/dist/{chunk-PHN4KDGD.js.map → chunk-7JYPJ257.js.map} +1 -1
  11. package/dist/{chunk-FJS4ASFA.js → chunk-AB3L2Q54.js} +38 -38
  12. package/dist/{chunk-L3YQNS32.js → chunk-ANVMO7QG.js} +2 -2
  13. package/dist/{chunk-OUEHXYFU.js → chunk-AVE3EJEM.js} +2 -2
  14. package/dist/{chunk-R45O47CR.js → chunk-AYY2F4OS.js} +2 -2
  15. package/dist/{chunk-SJBEXKHC.js → chunk-D53WAFSJ.js} +5 -4
  16. package/dist/{chunk-Q5NXGSDC.js → chunk-D6BBLX7F.js} +2 -2
  17. package/dist/{chunk-663MAM24.js → chunk-DZ2N4WJX.js} +2 -2
  18. package/dist/{chunk-YFRCIJ5F.js → chunk-DZPFBU5F.js} +61 -8
  19. package/dist/chunk-DZPFBU5F.js.map +1 -0
  20. package/dist/{chunk-OTU374RO.js → chunk-E5ASUBAK.js} +2 -2
  21. package/dist/{chunk-64R6TZYA.js → chunk-EHLA6CZL.js} +3 -3
  22. package/dist/{chunk-7JV3YVMZ.js → chunk-ES7N5GFW.js} +5 -5
  23. package/dist/{chunk-T6CLFLGL.js → chunk-EZQARM7U.js} +2 -2
  24. package/dist/{chunk-V66T427F.js → chunk-GPPUFQPM.js} +2 -2
  25. package/dist/{chunk-EAB77S7U.js → chunk-HS2U5HJT.js} +7 -7
  26. package/dist/{chunk-DEKU3ACZ.js → chunk-INTQ65ET.js} +2 -2
  27. package/dist/{chunk-ZUUXVQI6.js → chunk-JBNCZ6EG.js} +2 -2
  28. package/dist/{chunk-YX2V2Y5Q.js → chunk-KWN3JJXP.js} +3 -3
  29. package/dist/{chunk-JORUH2K3.js → chunk-NGLS6MJL.js} +10 -10
  30. package/dist/{chunk-NITPS7VD.js → chunk-OCK26TV3.js} +2 -2
  31. package/dist/{chunk-IXDWCPN3.js → chunk-RBVHQKKS.js} +39 -9
  32. package/dist/{chunk-IXDWCPN3.js.map → chunk-RBVHQKKS.js.map} +1 -1
  33. package/dist/{chunk-JGL3IKNA.js → chunk-RWE4365S.js} +3 -3
  34. package/dist/{chunk-62PINSC6.js → chunk-UL3TY3E7.js} +2 -2
  35. package/dist/{chunk-MDYMP54L.js → chunk-WNOWCX6C.js} +5 -5
  36. package/dist/{chunk-MK4KQJZV.js → chunk-WXI5KIMM.js} +2 -2
  37. package/dist/{chunk-LKAH6IYE.js → chunk-ZAE4CJWU.js} +2 -2
  38. package/dist/{chunk-GOQ6FHJD.js → chunk-ZS2NPA4V.js} +4 -4
  39. package/dist/{chunk-SRFWE23A.js → chunk-ZTAZQ4MK.js} +2 -2
  40. package/dist/{cli-circuit-breaker-BVQU6TSV.js → cli-circuit-breaker-WNN5DV6R.js} +3 -3
  41. package/dist/cli.d.ts +12 -2
  42. package/dist/cli.js +548 -45
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-JODIOJ3T.js → composite-router-TDQHSXV3.js} +2 -2
  45. package/dist/{consensus-vote-PJ5LS36B.js → consensus-vote-TEVVVNNG.js} +16 -16
  46. package/dist/{consensus-vote-types-BdptpuQK.d.ts → consensus-vote-types-CUlmEZWo.d.ts} +14 -1
  47. package/dist/{context-retriever-VENNHB6Q.js → context-retriever-26JNWR2T.js} +8 -8
  48. package/dist/{doctor-deep-T2BEMMBG.js → doctor-deep-PMUC2G4E.js} +3 -3
  49. package/dist/{doctor-live-MYBKNA3S.js → doctor-live-F32CUSMD.js} +10 -10
  50. package/dist/{expert-bridge-DAJAYNMQ.js → expert-bridge-EPTKCK73.js} +4 -4
  51. package/dist/{factory-O427FFK5.js → factory-UATPT43H.js} +9 -9
  52. package/dist/{factory-LGXPPPBX.js → factory-UHWIXHJL.js} +5 -5
  53. package/dist/{improvement-review-6F3E26ER.js → improvement-review-NGHRZPF4.js} +5 -5
  54. package/dist/index.d.ts +3 -3
  55. package/dist/index.js +30 -30
  56. package/dist/{init-opencode-BKEKVAAW.js → init-opencode-MTEHG2HU.js} +5 -5
  57. package/dist/issue-triage-BKKKZQO7.js +16 -0
  58. package/dist/{pr-reviewer-helpers-SJN6OUY6.js → pr-reviewer-helpers-P2DL27LP.js} +4 -4
  59. package/dist/{registry-command-6U434CUU.js → registry-command-4VB2IPXL.js} +2 -2
  60. package/dist/{repo-security-plan-7GPJJ577.js → repo-security-plan-5CVDONMY.js} +3 -3
  61. package/dist/{research-helpers-synthesize-Z7JMKOOQ.js → research-helpers-synthesize-7YC2THJN.js} +4 -4
  62. package/dist/{routing-memory-S2MZCJBE.js → routing-memory-LPJBMFSM.js} +2 -2
  63. package/dist/{session-memory-VOFCMXU6.js → session-memory-AGT5EYLS.js} +3 -3
  64. package/dist/{setup-config-TWVGUC4Y.js → setup-config-DWAFLF56.js} +3 -3
  65. package/dist/{setup-custom-api-ONTEN2CU.js → setup-custom-api-ASJ3S35B.js} +4 -4
  66. package/dist/setup-data-dir-H3DVHRHD.js +32 -0
  67. package/dist/{tool-memory-7JNUN7Z7.js → tool-memory-TLLJEHIB.js} +5 -5
  68. package/dist/{unified-registry-VOA2IUPK.js → unified-registry-INS54O24.js} +10 -10
  69. package/dist/{weather-report-NEHXHTWK.js → weather-report-ZIETEDJ7.js} +2 -2
  70. package/package.json +1 -1
  71. package/dist/chunk-Y2ESO2BO.js.map +0 -1
  72. package/dist/chunk-YFRCIJ5F.js.map +0 -1
  73. package/dist/issue-triage-BIPWKL66.js +0 -16
  74. package/dist/setup-data-dir-VWXVP5IJ.js +0 -32
  75. /package/dist/{ast-rule-runner-YBAZFEUB.js.map → ast-rule-runner-V5HATZWS.js.map} +0 -0
  76. /package/dist/{child-mcp-config-VUERRL3V.js.map → child-mcp-config-6BOVWAIX.js.map} +0 -0
  77. /package/dist/{chunk-OCMF5DK6.js.map → chunk-3IOUGC4G.js.map} +0 -0
  78. /package/dist/{chunk-JD4PKLC2.js.map → chunk-53ERK7XF.js.map} +0 -0
  79. /package/dist/{chunk-3EIK7A4M.js.map → chunk-6G7P5S4C.js.map} +0 -0
  80. /package/dist/{chunk-VU4LLVHS.js.map → chunk-7JT6LJTH.js.map} +0 -0
  81. /package/dist/{chunk-FJS4ASFA.js.map → chunk-AB3L2Q54.js.map} +0 -0
  82. /package/dist/{chunk-L3YQNS32.js.map → chunk-ANVMO7QG.js.map} +0 -0
  83. /package/dist/{chunk-OUEHXYFU.js.map → chunk-AVE3EJEM.js.map} +0 -0
  84. /package/dist/{chunk-R45O47CR.js.map → chunk-AYY2F4OS.js.map} +0 -0
  85. /package/dist/{chunk-SJBEXKHC.js.map → chunk-D53WAFSJ.js.map} +0 -0
  86. /package/dist/{chunk-Q5NXGSDC.js.map → chunk-D6BBLX7F.js.map} +0 -0
  87. /package/dist/{chunk-663MAM24.js.map → chunk-DZ2N4WJX.js.map} +0 -0
  88. /package/dist/{chunk-OTU374RO.js.map → chunk-E5ASUBAK.js.map} +0 -0
  89. /package/dist/{chunk-64R6TZYA.js.map → chunk-EHLA6CZL.js.map} +0 -0
  90. /package/dist/{chunk-7JV3YVMZ.js.map → chunk-ES7N5GFW.js.map} +0 -0
  91. /package/dist/{chunk-T6CLFLGL.js.map → chunk-EZQARM7U.js.map} +0 -0
  92. /package/dist/{chunk-V66T427F.js.map → chunk-GPPUFQPM.js.map} +0 -0
  93. /package/dist/{chunk-EAB77S7U.js.map → chunk-HS2U5HJT.js.map} +0 -0
  94. /package/dist/{chunk-DEKU3ACZ.js.map → chunk-INTQ65ET.js.map} +0 -0
  95. /package/dist/{chunk-ZUUXVQI6.js.map → chunk-JBNCZ6EG.js.map} +0 -0
  96. /package/dist/{chunk-YX2V2Y5Q.js.map → chunk-KWN3JJXP.js.map} +0 -0
  97. /package/dist/{chunk-JORUH2K3.js.map → chunk-NGLS6MJL.js.map} +0 -0
  98. /package/dist/{chunk-NITPS7VD.js.map → chunk-OCK26TV3.js.map} +0 -0
  99. /package/dist/{chunk-JGL3IKNA.js.map → chunk-RWE4365S.js.map} +0 -0
  100. /package/dist/{chunk-62PINSC6.js.map → chunk-UL3TY3E7.js.map} +0 -0
  101. /package/dist/{chunk-MDYMP54L.js.map → chunk-WNOWCX6C.js.map} +0 -0
  102. /package/dist/{chunk-MK4KQJZV.js.map → chunk-WXI5KIMM.js.map} +0 -0
  103. /package/dist/{chunk-LKAH6IYE.js.map → chunk-ZAE4CJWU.js.map} +0 -0
  104. /package/dist/{chunk-GOQ6FHJD.js.map → chunk-ZS2NPA4V.js.map} +0 -0
  105. /package/dist/{chunk-SRFWE23A.js.map → chunk-ZTAZQ4MK.js.map} +0 -0
  106. /package/dist/{cli-circuit-breaker-BVQU6TSV.js.map → cli-circuit-breaker-WNN5DV6R.js.map} +0 -0
  107. /package/dist/{composite-router-JODIOJ3T.js.map → composite-router-TDQHSXV3.js.map} +0 -0
  108. /package/dist/{consensus-vote-PJ5LS36B.js.map → consensus-vote-TEVVVNNG.js.map} +0 -0
  109. /package/dist/{context-retriever-VENNHB6Q.js.map → context-retriever-26JNWR2T.js.map} +0 -0
  110. /package/dist/{doctor-deep-T2BEMMBG.js.map → doctor-deep-PMUC2G4E.js.map} +0 -0
  111. /package/dist/{doctor-live-MYBKNA3S.js.map → doctor-live-F32CUSMD.js.map} +0 -0
  112. /package/dist/{expert-bridge-DAJAYNMQ.js.map → expert-bridge-EPTKCK73.js.map} +0 -0
  113. /package/dist/{factory-LGXPPPBX.js.map → factory-UATPT43H.js.map} +0 -0
  114. /package/dist/{factory-O427FFK5.js.map → factory-UHWIXHJL.js.map} +0 -0
  115. /package/dist/{improvement-review-6F3E26ER.js.map → improvement-review-NGHRZPF4.js.map} +0 -0
  116. /package/dist/{init-opencode-BKEKVAAW.js.map → init-opencode-MTEHG2HU.js.map} +0 -0
  117. /package/dist/{issue-triage-BIPWKL66.js.map → issue-triage-BKKKZQO7.js.map} +0 -0
  118. /package/dist/{pr-reviewer-helpers-SJN6OUY6.js.map → pr-reviewer-helpers-P2DL27LP.js.map} +0 -0
  119. /package/dist/{registry-command-6U434CUU.js.map → registry-command-4VB2IPXL.js.map} +0 -0
  120. /package/dist/{repo-security-plan-7GPJJ577.js.map → repo-security-plan-5CVDONMY.js.map} +0 -0
  121. /package/dist/{research-helpers-synthesize-Z7JMKOOQ.js.map → research-helpers-synthesize-7YC2THJN.js.map} +0 -0
  122. /package/dist/{routing-memory-S2MZCJBE.js.map → routing-memory-LPJBMFSM.js.map} +0 -0
  123. /package/dist/{session-memory-VOFCMXU6.js.map → session-memory-AGT5EYLS.js.map} +0 -0
  124. /package/dist/{setup-config-TWVGUC4Y.js.map → setup-config-DWAFLF56.js.map} +0 -0
  125. /package/dist/{setup-custom-api-ONTEN2CU.js.map → setup-custom-api-ASJ3S35B.js.map} +0 -0
  126. /package/dist/{setup-data-dir-VWXVP5IJ.js.map → setup-data-dir-H3DVHRHD.js.map} +0 -0
  127. /package/dist/{tool-memory-7JNUN7Z7.js.map → tool-memory-TLLJEHIB.js.map} +0 -0
  128. /package/dist/{unified-registry-VOA2IUPK.js.map → unified-registry-INS54O24.js.map} +0 -0
  129. /package/dist/{weather-report-NEHXHTWK.js.map → weather-report-ZIETEDJ7.js.map} +0 -0
@@ -9,8 +9,8 @@ import {
9
9
  getBuiltInAstRulesPath,
10
10
  loadRules,
11
11
  runAstQaRules
12
- } from "./chunk-NITPS7VD.js";
13
- import "./chunk-IXDWCPN3.js";
12
+ } from "./chunk-OCK26TV3.js";
13
+ import "./chunk-RBVHQKKS.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-YBAZFEUB.js.map
29
+ //# sourceMappingURL=ast-rule-runner-V5HATZWS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-OITVVSWO.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-IXDWCPN3.js";
6
+ } from "./chunk-RBVHQKKS.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-VUERRL3V.js.map
59
+ //# sourceMappingURL=child-mcp-config-6BOVWAIX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveClassGuardMs
3
- } from "./chunk-IXDWCPN3.js";
3
+ } from "./chunk-RBVHQKKS.js";
4
4
 
5
5
  // src/cli/cli-readiness.ts
6
6
  var READINESS_LEVELS = ["installed", "authenticated", "serves"];
@@ -90,4 +90,4 @@ export {
90
90
  SERVES_PROBE_PROMPT,
91
91
  probeServes
92
92
  };
93
- //# sourceMappingURL=chunk-OCMF5DK6.js.map
93
+ //# sourceMappingURL=chunk-3IOUGC4G.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-IXDWCPN3.js";
5
+ } from "./chunk-RBVHQKKS.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "node:child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-JD4PKLC2.js.map
90
+ //# sourceMappingURL=chunk-53ERK7XF.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-JGL3IKNA.js";
10
+ } from "./chunk-RWE4365S.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-IXDWCPN3.js";
24
+ } from "./chunk-RBVHQKKS.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-3EIK7A4M.js.map
2287
+ //# sourceMappingURL=chunk-6G7P5S4C.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isGatewayModelAdapter
3
- } from "./chunk-PHN4KDGD.js";
3
+ } from "./chunk-7JYPJ257.js";
4
4
  import {
5
5
  allOf
6
6
  } from "./chunk-EZNIYU5T.js";
@@ -25,20 +25,21 @@ import {
25
25
  toolSuccessStructured,
26
26
  withProgressHeartbeat,
27
27
  wrapToolWithTimeout
28
- } from "./chunk-JGL3IKNA.js";
28
+ } from "./chunk-RWE4365S.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-L3YQNS32.js";
31
+ } from "./chunk-ANVMO7QG.js";
32
32
  import {
33
33
  UNRESOLVED_MODEL_ID,
34
34
  assessPanelIndependence,
35
+ canonicalModelKey,
35
36
  countDistinctModels,
36
37
  createEvent,
37
38
  getGlobalRegistry
38
- } from "./chunk-SJBEXKHC.js";
39
+ } from "./chunk-D53WAFSJ.js";
39
40
  import {
40
41
  getToolMemory
41
- } from "./chunk-VU4LLVHS.js";
42
+ } from "./chunk-7JT6LJTH.js";
42
43
  import {
43
44
  authRemediation,
44
45
  classifyExtractedError,
@@ -48,7 +49,7 @@ import {
48
49
  isTimeoutText,
49
50
  sleep,
50
51
  withTimeout
51
- } from "./chunk-YFRCIJ5F.js";
52
+ } from "./chunk-DZPFBU5F.js";
52
53
  import {
53
54
  sanitizeErrorDetails,
54
55
  sanitizeOutput
@@ -86,9 +87,10 @@ import {
86
87
  priceBasisOf,
87
88
  registerPersistentOutcomeStoreFactory,
88
89
  resolveClassGuardMs,
90
+ resolveModelIdentitySync,
89
91
  resolveVoteTimeout,
90
92
  stepBus
91
- } from "./chunk-IXDWCPN3.js";
93
+ } from "./chunk-RBVHQKKS.js";
92
94
  import {
93
95
  ensureLearningDir,
94
96
  getOutcomesFile
@@ -292,6 +294,104 @@ function reportPanelModelIndependence(modelIds, roleCount, phase, logger11) {
292
294
  );
293
295
  }
294
296
 
297
+ // src/cli/voter-family-dealing.ts
298
+ function vendorFamilyOf(modelId) {
299
+ return resolveModelIdentitySync(modelId).vendor;
300
+ }
301
+ var FAMILY_PRIORITY = ["anthropic", "openai", "google"];
302
+ function compareFamilies(a, b) {
303
+ const rank = (f) => {
304
+ if (f === "unknown") return Number.MAX_SAFE_INTEGER;
305
+ const i = FAMILY_PRIORITY.indexOf(f);
306
+ return i === -1 ? FAMILY_PRIORITY.length : i;
307
+ };
308
+ return rank(a) - rank(b) || a.localeCompare(b);
309
+ }
310
+ function lexicalOrder(modelIds) {
311
+ return [...modelIds].sort();
312
+ }
313
+ function identityKey(modelId) {
314
+ return canonicalModelKey(modelId) ?? `raw:${modelId}`;
315
+ }
316
+ function increment(counts, key) {
317
+ counts.set(key, (counts.get(key) ?? 0) + 1);
318
+ }
319
+ function groupByFamily(candidates, rank) {
320
+ const byFamily = /* @__PURE__ */ new Map();
321
+ for (const c of candidates) {
322
+ const family = vendorFamilyOf(c.modelId);
323
+ const list = byFamily.get(family) ?? [];
324
+ list.push(c);
325
+ byFamily.set(family, list);
326
+ }
327
+ for (const [family, list] of byFamily) {
328
+ const order = rank(list.map((c) => c.modelId));
329
+ const position = (c) => {
330
+ const i = order.indexOf(c.modelId);
331
+ return i === -1 ? order.length : i;
332
+ };
333
+ byFamily.set(
334
+ family,
335
+ [...list].sort((a, b) => position(a) - position(b) || a.modelId.localeCompare(b.modelId))
336
+ );
337
+ }
338
+ return byFamily;
339
+ }
340
+ function leastSeatedFamily(families, seats) {
341
+ let best = families[0];
342
+ for (const f of families.slice(1)) {
343
+ const diff = (seats.get(f) ?? 0) - (seats.get(best) ?? 0);
344
+ if (diff < 0 || diff === 0 && compareFamilies(f, best) < 0) best = f;
345
+ }
346
+ return best;
347
+ }
348
+ function leastSeatedModel(ranked, identitySeats, idSeats) {
349
+ let best = ranked[0];
350
+ const score = (c) => [
351
+ identitySeats.get(identityKey(c.modelId)) ?? 0,
352
+ idSeats.get(c.modelId) ?? 0
353
+ ];
354
+ for (const c of ranked.slice(1)) {
355
+ const [ci, cm] = score(c);
356
+ const [bi, bm] = score(best);
357
+ if (ci < bi || ci === bi && cm < bm) best = c;
358
+ }
359
+ return best;
360
+ }
361
+ function dealSeatsAcrossFamilies(seatCount, candidates, options = {}) {
362
+ if (seatCount <= 0 || candidates.length === 0) return [];
363
+ const byFamily = groupByFamily(candidates, options.rankWithinFamily ?? lexicalOrder);
364
+ const families = [...byFamily.keys()].sort(compareFamilies);
365
+ const familySeats = /* @__PURE__ */ new Map();
366
+ const identitySeats = /* @__PURE__ */ new Map();
367
+ const idSeats = /* @__PURE__ */ new Map();
368
+ const seat = (modelId) => {
369
+ increment(familySeats, vendorFamilyOf(modelId));
370
+ increment(identitySeats, identityKey(modelId));
371
+ increment(idSeats, modelId);
372
+ };
373
+ for (const pinned of options.seated ?? []) seat(pinned);
374
+ const dealt = [];
375
+ for (let i = 0; i < seatCount; i++) {
376
+ const family = leastSeatedFamily(families, familySeats);
377
+ const chosen = leastSeatedModel(byFamily.get(family) ?? [], identitySeats, idSeats);
378
+ dealt.push(chosen);
379
+ seat(chosen.modelId);
380
+ }
381
+ return dealt;
382
+ }
383
+ function warnIfSingleFamily(roleCount, assignedModels, logger11) {
384
+ const families = new Set(assignedModels.map(vendorFamilyOf));
385
+ const [family] = families;
386
+ if (roleCount > 1 && families.size === 1 && family !== void 0 && family !== "unknown") {
387
+ logger11.warn("Consensus panel collapsed to a single model family \u2014 votes may correlate", {
388
+ family,
389
+ distinctModels: countDistinctModels(assignedModels),
390
+ roleCount
391
+ });
392
+ }
393
+ }
394
+
295
395
  // src/audit/vote-record.ts
296
396
  import * as crypto2 from "node:crypto";
297
397
  import { z as z4 } from "zod";
@@ -2340,10 +2440,13 @@ function resolveGatewayRoleAdapters(roles, gatewayAdapters, fallbackAdapter, log
2340
2440
  return assignUniformAdapter(roles, gatewayAdapters[0] ?? fallbackAdapter);
2341
2441
  }
2342
2442
  const overrides = resolveVoterModelOverrides(roles, gatewayAdapters, logger11);
2343
- const roundRobinRoles = roles.filter((r) => !overrides.has(r));
2443
+ const dealtRoles = roles.filter((r) => !overrides.has(r));
2444
+ const dealt = dealSeatsAcrossFamilies(dealtRoles.length, gatewayAdapters, {
2445
+ seated: [...overrides.values()].map((a) => a.modelId)
2446
+ });
2344
2447
  const assigned = assignRoundRobinAdapters(
2345
- roundRobinRoles,
2346
- gatewayAdapters.map((a) => ({ label: a.modelId, adapter: a })),
2448
+ dealtRoles,
2449
+ dealt.map((a) => ({ label: a.modelId, adapter: a })),
2347
2450
  logger11,
2348
2451
  "gateway"
2349
2452
  );
@@ -2355,6 +2458,7 @@ function resolveGatewayRoleAdapters(roles, gatewayAdapters, fallbackAdapter, log
2355
2458
  { model: assignedModels[0], roleCount: roles.length }
2356
2459
  );
2357
2460
  }
2461
+ warnIfSingleFamily(roles.length, assignedModels, logger11);
2358
2462
  return assigned;
2359
2463
  }
2360
2464
  async function resolveDiverseAdapters(roles, logger11, fallbackAdapter, gatewayAdapters) {
@@ -6082,8 +6186,12 @@ function seatFallbacks(votes) {
6082
6186
  }
6083
6187
  function panelDiversityOf(votes) {
6084
6188
  const models = answeringSeats(votes).map(resolvedModel).filter((m) => m !== void 0);
6189
+ const families = models.map(vendorFamilyOf);
6190
+ const classified = families.filter((f) => f !== "unknown");
6085
6191
  return {
6086
6192
  distinctModels: countDistinctModels(models),
6193
+ distinctFamilies: new Set(classified).size,
6194
+ unclassifiedSeats: families.length - classified.length,
6087
6195
  fallbacks: seatFallbacks(votes).length
6088
6196
  };
6089
6197
  }
@@ -6099,6 +6207,16 @@ function singleModelPanelWarning(votes) {
6099
6207
  const missing = silent > 0 ? ` (${String(silent)} did not answer)` : "";
6100
6208
  return `All ${String(answered.length)} seats answered on ${model}${missing}; independence is weaker than assigned.`;
6101
6209
  }
6210
+ function singleFamilyPanelWarning(votes) {
6211
+ if (votes.length < MIN_PANEL_FOR_DIVERSITY_WARNING) return void 0;
6212
+ const answered = answeringSeats(votes);
6213
+ const models = answered.map(resolvedModel);
6214
+ const model = models[0];
6215
+ if (model === void 0 || models.includes(void 0)) return void 0;
6216
+ const { distinctModels, distinctFamilies, unclassifiedSeats } = panelDiversityOf(votes);
6217
+ if (distinctFamilies !== 1 || unclassifiedSeats > 0 || distinctModels < 2) return void 0;
6218
+ return `All ${String(answered.length)} answering seats ran ${vendorFamilyOf(model)} models (${String(distinctModels)} distinct); independence is weaker than assigned.`;
6219
+ }
6102
6220
 
6103
6221
  // src/mcp/tools/consensus-vote-option-detection.ts
6104
6222
  var UNDECLARED_OPTION_PATTERNS = Object.freeze([
@@ -6285,7 +6403,17 @@ function toAgentVoteSummary(result) {
6285
6403
  // #6115: and for a seat that answered elsewhere.
6286
6404
  ...result.fallback !== void 0 ? { fallback: result.fallback } : {},
6287
6405
  // #6246: and for what a recovered seat was retried from.
6288
- ...result.retriedFrom !== void 0 ? { retriedFrom: result.retriedFrom } : {}
6406
+ ...result.retriedFrom !== void 0 ? { retriedFrom: result.retriedFrom } : {},
6407
+ // #6606: the per-seat model was only in `costSummary.perVoter`.
6408
+ ...modelUsedOf(result)
6409
+ };
6410
+ }
6411
+ var MODEL_USED_MAX_CHARS = 100;
6412
+ function modelUsedOf(result) {
6413
+ const model = result.model;
6414
+ if (model === void 0 || model === "" || model === UNRESOLVED_MODEL_ID) return {};
6415
+ return {
6416
+ modelUsed: model.length <= MODEL_USED_MAX_CHARS ? model : `${model.slice(0, MODEL_USED_MAX_CHARS - 1)}\u2026`
6289
6417
  };
6290
6418
  }
6291
6419
  function panelDegradationWarning(errorCount, total) {
@@ -6396,6 +6524,7 @@ function applyOptionalResponseFields(response, input, result, errorCount, costSu
6396
6524
  unverifiableSeatsWarning(response.voteCounts.unverifiable, result.votes.length)
6397
6525
  );
6398
6526
  appendPanelWarning(response, singleModelPanelWarning(result.votes));
6527
+ appendPanelWarning(response, singleFamilyPanelWarning(result.votes));
6399
6528
  const engaged = result.votes.length - errorCount;
6400
6529
  const undeclared = checkUndeclaredOptions(
6401
6530
  input.proposal,
@@ -6505,7 +6634,7 @@ function logPartialProposal(bounded, log) {
6505
6634
  }
6506
6635
  async function runContrarianCheck(proposal, log, opts) {
6507
6636
  try {
6508
- const { executeExpert } = await import("./expert-bridge-DAJAYNMQ.js");
6637
+ const { executeExpert } = await import("./expert-bridge-EPTKCK73.js");
6509
6638
  const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
6510
6639
  logPartialProposal(bounded, log);
6511
6640
  const result = await executeExpert("architecture", buildContrarianPrompt(bounded, opts), {
@@ -9613,6 +9742,10 @@ var CONSENSUS_VOTE_OUTPUT_SCHEMA = {
9613
9742
  // because the async `pending` envelope shares this schema.
9614
9743
  panelDiversity: z16.object({
9615
9744
  distinctModels: z16.number().int().nonnegative(),
9745
+ // #6606: distinct vendor families among the answering seats, and the
9746
+ // answering seats whose model names no recognised vendor.
9747
+ distinctFamilies: z16.number().int().nonnegative(),
9748
+ unclassifiedSeats: z16.number().int().nonnegative(),
9616
9749
  fallbacks: z16.number().int().nonnegative()
9617
9750
  }).optional(),
9618
9751
  // #3855: per-decision cost rollup. Same omission as panelWarning (#4032) — it
@@ -9782,4 +9915,4 @@ export {
9782
9915
  CONSENSUS_VOTE_TOOL_SCHEMA,
9783
9916
  registerConsensusVoteTool
9784
9917
  };
9785
- //# sourceMappingURL=chunk-Y2ESO2BO.js.map
9918
+ //# sourceMappingURL=chunk-6OQHDUFO.js.map