nexus-agents 8.97.1 → 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.
- package/dist/{ast-rule-runner-YBAZFEUB.js → ast-rule-runner-V5HATZWS.js} +3 -3
- package/dist/{child-mcp-config-VUERRL3V.js → child-mcp-config-6BOVWAIX.js} +2 -2
- package/dist/{chunk-OCMF5DK6.js → chunk-3IOUGC4G.js} +2 -2
- package/dist/{chunk-JD4PKLC2.js → chunk-53ERK7XF.js} +2 -2
- package/dist/{chunk-YLZPEK2H.js → chunk-6G7P5S4C.js} +3 -3
- package/dist/{chunk-WXE4XKDF.js → chunk-6OQHDUFO.js} +213 -16
- package/dist/chunk-6OQHDUFO.js.map +1 -0
- package/dist/{chunk-VU4LLVHS.js → chunk-7JT6LJTH.js} +4 -4
- package/dist/{chunk-G6RDJRAV.js → chunk-7JYPJ257.js} +219 -13
- package/dist/chunk-7JYPJ257.js.map +1 -0
- package/dist/{chunk-NPXNHUIL.js → chunk-AB3L2Q54.js} +55 -38
- package/dist/chunk-AB3L2Q54.js.map +1 -0
- package/dist/{chunk-IX42AGSA.js → chunk-ANVMO7QG.js} +2 -2
- package/dist/{chunk-OUEHXYFU.js → chunk-AVE3EJEM.js} +2 -2
- package/dist/{chunk-R45O47CR.js → chunk-AYY2F4OS.js} +2 -2
- package/dist/{chunk-SJBEXKHC.js → chunk-D53WAFSJ.js} +5 -4
- package/dist/{chunk-Q5NXGSDC.js → chunk-D6BBLX7F.js} +2 -2
- package/dist/{chunk-663MAM24.js → chunk-DZ2N4WJX.js} +2 -2
- package/dist/{chunk-YFRCIJ5F.js → chunk-DZPFBU5F.js} +61 -8
- package/dist/chunk-DZPFBU5F.js.map +1 -0
- package/dist/{chunk-OTU374RO.js → chunk-E5ASUBAK.js} +2 -2
- package/dist/{chunk-64R6TZYA.js → chunk-EHLA6CZL.js} +3 -3
- package/dist/{chunk-7JV3YVMZ.js → chunk-ES7N5GFW.js} +5 -5
- package/dist/{chunk-T6CLFLGL.js → chunk-EZQARM7U.js} +2 -2
- package/dist/{chunk-V66T427F.js → chunk-GPPUFQPM.js} +2 -2
- package/dist/{chunk-EAB77S7U.js → chunk-HS2U5HJT.js} +7 -7
- package/dist/{chunk-DEKU3ACZ.js → chunk-INTQ65ET.js} +2 -2
- package/dist/{chunk-ZUUXVQI6.js → chunk-JBNCZ6EG.js} +2 -2
- package/dist/{chunk-YX2V2Y5Q.js → chunk-KWN3JJXP.js} +3 -3
- package/dist/{chunk-SDIMXZZD.js → chunk-NGLS6MJL.js} +10 -10
- package/dist/{chunk-NITPS7VD.js → chunk-OCK26TV3.js} +2 -2
- package/dist/{chunk-IXDWCPN3.js → chunk-RBVHQKKS.js} +39 -9
- package/dist/{chunk-IXDWCPN3.js.map → chunk-RBVHQKKS.js.map} +1 -1
- package/dist/{chunk-PE6RRU2B.js → chunk-RWE4365S.js} +3 -3
- package/dist/{chunk-62PINSC6.js → chunk-UL3TY3E7.js} +2 -2
- package/dist/{chunk-MDYMP54L.js → chunk-WNOWCX6C.js} +5 -5
- package/dist/{chunk-MK4KQJZV.js → chunk-WXI5KIMM.js} +2 -2
- package/dist/{chunk-LKAH6IYE.js → chunk-ZAE4CJWU.js} +2 -2
- package/dist/{chunk-GOQ6FHJD.js → chunk-ZS2NPA4V.js} +4 -4
- package/dist/{chunk-SRFWE23A.js → chunk-ZTAZQ4MK.js} +2 -2
- package/dist/{cli-circuit-breaker-BVQU6TSV.js → cli-circuit-breaker-WNN5DV6R.js} +3 -3
- package/dist/cli.d.ts +12 -2
- package/dist/cli.js +597 -54
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-JODIOJ3T.js → composite-router-TDQHSXV3.js} +2 -2
- package/dist/{consensus-vote-NYXZBC5R.js → consensus-vote-TEVVVNNG.js} +16 -16
- package/dist/{consensus-vote-types-BdptpuQK.d.ts → consensus-vote-types-CUlmEZWo.d.ts} +14 -1
- package/dist/{context-retriever-VENNHB6Q.js → context-retriever-26JNWR2T.js} +8 -8
- package/dist/{doctor-deep-T2BEMMBG.js → doctor-deep-PMUC2G4E.js} +3 -3
- package/dist/{doctor-live-MYBKNA3S.js → doctor-live-F32CUSMD.js} +10 -10
- package/dist/{expert-bridge-DAJAYNMQ.js → expert-bridge-EPTKCK73.js} +4 -4
- package/dist/{factory-O427FFK5.js → factory-UATPT43H.js} +9 -9
- package/dist/{factory-LGXPPPBX.js → factory-UHWIXHJL.js} +5 -5
- package/dist/{improvement-review-KXTJMAY6.js → improvement-review-NGHRZPF4.js} +5 -5
- package/dist/index.d.ts +14 -3
- package/dist/index.js +30 -30
- package/dist/{init-opencode-4QFPIFJM.js → init-opencode-MTEHG2HU.js} +5 -5
- package/dist/issue-triage-BKKKZQO7.js +16 -0
- package/dist/{pr-reviewer-helpers-SJN6OUY6.js → pr-reviewer-helpers-P2DL27LP.js} +4 -4
- package/dist/{registry-command-6U434CUU.js → registry-command-4VB2IPXL.js} +2 -2
- package/dist/{repo-security-plan-7GPJJ577.js → repo-security-plan-5CVDONMY.js} +3 -3
- package/dist/{research-helpers-synthesize-Z7JMKOOQ.js → research-helpers-synthesize-7YC2THJN.js} +4 -4
- package/dist/{routing-memory-S2MZCJBE.js → routing-memory-LPJBMFSM.js} +2 -2
- package/dist/{session-memory-VOFCMXU6.js → session-memory-AGT5EYLS.js} +3 -3
- package/dist/{setup-config-TWVGUC4Y.js → setup-config-DWAFLF56.js} +3 -3
- package/dist/{setup-custom-api-ONTEN2CU.js → setup-custom-api-ASJ3S35B.js} +4 -4
- package/dist/setup-data-dir-H3DVHRHD.js +32 -0
- package/dist/{tool-memory-7JNUN7Z7.js → tool-memory-TLLJEHIB.js} +5 -5
- package/dist/{unified-registry-VOA2IUPK.js → unified-registry-INS54O24.js} +10 -10
- package/dist/{weather-report-NEHXHTWK.js → weather-report-ZIETEDJ7.js} +2 -2
- package/package.json +2 -2
- package/dist/chunk-G6RDJRAV.js.map +0 -1
- package/dist/chunk-NPXNHUIL.js.map +0 -1
- package/dist/chunk-WXE4XKDF.js.map +0 -1
- package/dist/chunk-YFRCIJ5F.js.map +0 -1
- package/dist/issue-triage-BIPWKL66.js +0 -16
- package/dist/setup-data-dir-K3SGRXGO.js +0 -32
- /package/dist/{ast-rule-runner-YBAZFEUB.js.map → ast-rule-runner-V5HATZWS.js.map} +0 -0
- /package/dist/{child-mcp-config-VUERRL3V.js.map → child-mcp-config-6BOVWAIX.js.map} +0 -0
- /package/dist/{chunk-OCMF5DK6.js.map → chunk-3IOUGC4G.js.map} +0 -0
- /package/dist/{chunk-JD4PKLC2.js.map → chunk-53ERK7XF.js.map} +0 -0
- /package/dist/{chunk-YLZPEK2H.js.map → chunk-6G7P5S4C.js.map} +0 -0
- /package/dist/{chunk-VU4LLVHS.js.map → chunk-7JT6LJTH.js.map} +0 -0
- /package/dist/{chunk-IX42AGSA.js.map → chunk-ANVMO7QG.js.map} +0 -0
- /package/dist/{chunk-OUEHXYFU.js.map → chunk-AVE3EJEM.js.map} +0 -0
- /package/dist/{chunk-R45O47CR.js.map → chunk-AYY2F4OS.js.map} +0 -0
- /package/dist/{chunk-SJBEXKHC.js.map → chunk-D53WAFSJ.js.map} +0 -0
- /package/dist/{chunk-Q5NXGSDC.js.map → chunk-D6BBLX7F.js.map} +0 -0
- /package/dist/{chunk-663MAM24.js.map → chunk-DZ2N4WJX.js.map} +0 -0
- /package/dist/{chunk-OTU374RO.js.map → chunk-E5ASUBAK.js.map} +0 -0
- /package/dist/{chunk-64R6TZYA.js.map → chunk-EHLA6CZL.js.map} +0 -0
- /package/dist/{chunk-7JV3YVMZ.js.map → chunk-ES7N5GFW.js.map} +0 -0
- /package/dist/{chunk-T6CLFLGL.js.map → chunk-EZQARM7U.js.map} +0 -0
- /package/dist/{chunk-V66T427F.js.map → chunk-GPPUFQPM.js.map} +0 -0
- /package/dist/{chunk-EAB77S7U.js.map → chunk-HS2U5HJT.js.map} +0 -0
- /package/dist/{chunk-DEKU3ACZ.js.map → chunk-INTQ65ET.js.map} +0 -0
- /package/dist/{chunk-ZUUXVQI6.js.map → chunk-JBNCZ6EG.js.map} +0 -0
- /package/dist/{chunk-YX2V2Y5Q.js.map → chunk-KWN3JJXP.js.map} +0 -0
- /package/dist/{chunk-SDIMXZZD.js.map → chunk-NGLS6MJL.js.map} +0 -0
- /package/dist/{chunk-NITPS7VD.js.map → chunk-OCK26TV3.js.map} +0 -0
- /package/dist/{chunk-PE6RRU2B.js.map → chunk-RWE4365S.js.map} +0 -0
- /package/dist/{chunk-62PINSC6.js.map → chunk-UL3TY3E7.js.map} +0 -0
- /package/dist/{chunk-MDYMP54L.js.map → chunk-WNOWCX6C.js.map} +0 -0
- /package/dist/{chunk-MK4KQJZV.js.map → chunk-WXI5KIMM.js.map} +0 -0
- /package/dist/{chunk-LKAH6IYE.js.map → chunk-ZAE4CJWU.js.map} +0 -0
- /package/dist/{chunk-GOQ6FHJD.js.map → chunk-ZS2NPA4V.js.map} +0 -0
- /package/dist/{chunk-SRFWE23A.js.map → chunk-ZTAZQ4MK.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-BVQU6TSV.js.map → cli-circuit-breaker-WNN5DV6R.js.map} +0 -0
- /package/dist/{composite-router-JODIOJ3T.js.map → composite-router-TDQHSXV3.js.map} +0 -0
- /package/dist/{consensus-vote-NYXZBC5R.js.map → consensus-vote-TEVVVNNG.js.map} +0 -0
- /package/dist/{context-retriever-VENNHB6Q.js.map → context-retriever-26JNWR2T.js.map} +0 -0
- /package/dist/{doctor-deep-T2BEMMBG.js.map → doctor-deep-PMUC2G4E.js.map} +0 -0
- /package/dist/{doctor-live-MYBKNA3S.js.map → doctor-live-F32CUSMD.js.map} +0 -0
- /package/dist/{expert-bridge-DAJAYNMQ.js.map → expert-bridge-EPTKCK73.js.map} +0 -0
- /package/dist/{factory-LGXPPPBX.js.map → factory-UATPT43H.js.map} +0 -0
- /package/dist/{factory-O427FFK5.js.map → factory-UHWIXHJL.js.map} +0 -0
- /package/dist/{improvement-review-KXTJMAY6.js.map → improvement-review-NGHRZPF4.js.map} +0 -0
- /package/dist/{init-opencode-4QFPIFJM.js.map → init-opencode-MTEHG2HU.js.map} +0 -0
- /package/dist/{issue-triage-BIPWKL66.js.map → issue-triage-BKKKZQO7.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-SJN6OUY6.js.map → pr-reviewer-helpers-P2DL27LP.js.map} +0 -0
- /package/dist/{registry-command-6U434CUU.js.map → registry-command-4VB2IPXL.js.map} +0 -0
- /package/dist/{repo-security-plan-7GPJJ577.js.map → repo-security-plan-5CVDONMY.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-Z7JMKOOQ.js.map → research-helpers-synthesize-7YC2THJN.js.map} +0 -0
- /package/dist/{routing-memory-S2MZCJBE.js.map → routing-memory-LPJBMFSM.js.map} +0 -0
- /package/dist/{session-memory-VOFCMXU6.js.map → session-memory-AGT5EYLS.js.map} +0 -0
- /package/dist/{setup-config-TWVGUC4Y.js.map → setup-config-DWAFLF56.js.map} +0 -0
- /package/dist/{setup-custom-api-ONTEN2CU.js.map → setup-custom-api-ASJ3S35B.js.map} +0 -0
- /package/dist/{setup-data-dir-K3SGRXGO.js.map → setup-data-dir-H3DVHRHD.js.map} +0 -0
- /package/dist/{tool-memory-7JNUN7Z7.js.map → tool-memory-TLLJEHIB.js.map} +0 -0
- /package/dist/{unified-registry-VOA2IUPK.js.map → unified-registry-INS54O24.js.map} +0 -0
- /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-
|
|
13
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
59
|
+
//# sourceMappingURL=child-mcp-config-6BOVWAIX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveClassGuardMs
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
93
|
+
//# sourceMappingURL=chunk-3IOUGC4G.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createLogger,
|
|
3
3
|
err,
|
|
4
4
|
ok
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
90
|
+
//# sourceMappingURL=chunk-53ERK7XF.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
2287
|
+
//# sourceMappingURL=chunk-6G7P5S4C.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGatewayModelAdapter
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
28
|
+
} from "./chunk-RWE4365S.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
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-
|
|
39
|
+
} from "./chunk-D53WAFSJ.js";
|
|
39
40
|
import {
|
|
40
41
|
getToolMemory
|
|
41
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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";
|
|
@@ -2151,6 +2251,66 @@ function resolvePanelWorkspace(workspace) {
|
|
|
2151
2251
|
return workspace ?? process.cwd();
|
|
2152
2252
|
}
|
|
2153
2253
|
|
|
2254
|
+
// src/adapters/gateway-rediscovery.ts
|
|
2255
|
+
var GATEWAY_REDISCOVERY_INTERVAL_MS = 6e4;
|
|
2256
|
+
var GatewayRediscovery = class {
|
|
2257
|
+
constructor(options) {
|
|
2258
|
+
this.options = options;
|
|
2259
|
+
this.minIntervalMs = options.minIntervalMs ?? GATEWAY_REDISCOVERY_INTERVAL_MS;
|
|
2260
|
+
this.lastAttemptAt = options.lastAttemptAt ?? getTimeProvider().now();
|
|
2261
|
+
}
|
|
2262
|
+
options;
|
|
2263
|
+
minIntervalMs;
|
|
2264
|
+
lastAttemptAt;
|
|
2265
|
+
inFlight;
|
|
2266
|
+
/**
|
|
2267
|
+
* Re-run discovery if the gateway is still missing and the backoff allows.
|
|
2268
|
+
* Never rejects: a failed attempt is logged and the caller proceeds on
|
|
2269
|
+
* whatever the list holds (empty means the CLI path, as at boot).
|
|
2270
|
+
*/
|
|
2271
|
+
ensure() {
|
|
2272
|
+
if (this.options.target.length > 0) return Promise.resolve();
|
|
2273
|
+
if (this.inFlight !== void 0) return this.inFlight;
|
|
2274
|
+
const now = getTimeProvider().now();
|
|
2275
|
+
if (now - this.lastAttemptAt < this.minIntervalMs) return Promise.resolve();
|
|
2276
|
+
this.lastAttemptAt = now;
|
|
2277
|
+
this.inFlight = this.attempt().finally(() => {
|
|
2278
|
+
this.inFlight = void 0;
|
|
2279
|
+
});
|
|
2280
|
+
return this.inFlight;
|
|
2281
|
+
}
|
|
2282
|
+
async attempt() {
|
|
2283
|
+
const { logger: logger11, target } = this.options;
|
|
2284
|
+
let found;
|
|
2285
|
+
try {
|
|
2286
|
+
found = await this.options.discover();
|
|
2287
|
+
} catch (error) {
|
|
2288
|
+
logger11.warn("Gateway re-discovery threw; calls stay on CLI subprocesses", {
|
|
2289
|
+
error: getErrorMessage(error)
|
|
2290
|
+
});
|
|
2291
|
+
return;
|
|
2292
|
+
}
|
|
2293
|
+
if (found === void 0 || found.length === 0) {
|
|
2294
|
+
logger11.warn(
|
|
2295
|
+
`Gateway re-discovery found no usable gateway; calls stay on CLI subprocesses. Next attempt no sooner than ${String(Math.round(this.minIntervalMs / 1e3))} s, on the next gateway call.`
|
|
2296
|
+
);
|
|
2297
|
+
return;
|
|
2298
|
+
}
|
|
2299
|
+
target.push(...found);
|
|
2300
|
+
logger11.info("OpenAI-compatible gateway re-discovered; gateway calls now go in-process", {
|
|
2301
|
+
modelCount: found.length
|
|
2302
|
+
});
|
|
2303
|
+
this.options.onDiscovered?.(found);
|
|
2304
|
+
}
|
|
2305
|
+
};
|
|
2306
|
+
var active;
|
|
2307
|
+
function setGatewayRediscovery(rediscovery) {
|
|
2308
|
+
active = rediscovery;
|
|
2309
|
+
}
|
|
2310
|
+
async function ensureGatewayDiscovered() {
|
|
2311
|
+
await active?.ensure();
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2154
2314
|
// src/cli/voter-agents.ts
|
|
2155
2315
|
function computeOverallConsensusDeadlineMs(timeoutMs, maxRetries, roleCount, interDelayMs) {
|
|
2156
2316
|
const perVoteBudget = timeoutMs * (maxRetries + 1);
|
|
@@ -2280,10 +2440,13 @@ function resolveGatewayRoleAdapters(roles, gatewayAdapters, fallbackAdapter, log
|
|
|
2280
2440
|
return assignUniformAdapter(roles, gatewayAdapters[0] ?? fallbackAdapter);
|
|
2281
2441
|
}
|
|
2282
2442
|
const overrides = resolveVoterModelOverrides(roles, gatewayAdapters, logger11);
|
|
2283
|
-
const
|
|
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
|
+
});
|
|
2284
2447
|
const assigned = assignRoundRobinAdapters(
|
|
2285
|
-
|
|
2286
|
-
|
|
2448
|
+
dealtRoles,
|
|
2449
|
+
dealt.map((a) => ({ label: a.modelId, adapter: a })),
|
|
2287
2450
|
logger11,
|
|
2288
2451
|
"gateway"
|
|
2289
2452
|
);
|
|
@@ -2295,6 +2458,7 @@ function resolveGatewayRoleAdapters(roles, gatewayAdapters, fallbackAdapter, log
|
|
|
2295
2458
|
{ model: assignedModels[0], roleCount: roles.length }
|
|
2296
2459
|
);
|
|
2297
2460
|
}
|
|
2461
|
+
warnIfSingleFamily(roles.length, assignedModels, logger11);
|
|
2298
2462
|
return assigned;
|
|
2299
2463
|
}
|
|
2300
2464
|
async function resolveDiverseAdapters(roles, logger11, fallbackAdapter, gatewayAdapters) {
|
|
@@ -2353,6 +2517,7 @@ async function collectRealVotes(options) {
|
|
|
2353
2517
|
logger11.info("Using simulation mode (explicitly requested)");
|
|
2354
2518
|
return createSimulatedVotes(roles, proposal);
|
|
2355
2519
|
}
|
|
2520
|
+
await ensureGatewayDiscovered();
|
|
2356
2521
|
const adapterResult = resolveAdapterOrFail(options, logger11, allowSimulation === true);
|
|
2357
2522
|
if ("simulated" in adapterResult)
|
|
2358
2523
|
return createSimulatedVotes(roles, proposal, "No adapter available");
|
|
@@ -5362,12 +5527,12 @@ var CorrelationModelPartitions = class {
|
|
|
5362
5527
|
for (const [role, newModel] of modelPins) this.setCurrentPin(role, newModel);
|
|
5363
5528
|
}
|
|
5364
5529
|
getActiveHistory() {
|
|
5365
|
-
const
|
|
5530
|
+
const active2 = /* @__PURE__ */ new Map();
|
|
5366
5531
|
for (const [pairKey, partitions] of this.histories) {
|
|
5367
5532
|
const history = partitions.get(this.activePartitionKey(pairKey));
|
|
5368
|
-
if (history !== void 0)
|
|
5533
|
+
if (history !== void 0) active2.set(pairKey, history);
|
|
5369
5534
|
}
|
|
5370
|
-
return
|
|
5535
|
+
return active2;
|
|
5371
5536
|
}
|
|
5372
5537
|
getOrCreate(pairKey, create) {
|
|
5373
5538
|
let partitions = this.histories.get(pairKey);
|
|
@@ -6021,8 +6186,12 @@ function seatFallbacks(votes) {
|
|
|
6021
6186
|
}
|
|
6022
6187
|
function panelDiversityOf(votes) {
|
|
6023
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");
|
|
6024
6191
|
return {
|
|
6025
6192
|
distinctModels: countDistinctModels(models),
|
|
6193
|
+
distinctFamilies: new Set(classified).size,
|
|
6194
|
+
unclassifiedSeats: families.length - classified.length,
|
|
6026
6195
|
fallbacks: seatFallbacks(votes).length
|
|
6027
6196
|
};
|
|
6028
6197
|
}
|
|
@@ -6038,6 +6207,16 @@ function singleModelPanelWarning(votes) {
|
|
|
6038
6207
|
const missing = silent > 0 ? ` (${String(silent)} did not answer)` : "";
|
|
6039
6208
|
return `All ${String(answered.length)} seats answered on ${model}${missing}; independence is weaker than assigned.`;
|
|
6040
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
|
+
}
|
|
6041
6220
|
|
|
6042
6221
|
// src/mcp/tools/consensus-vote-option-detection.ts
|
|
6043
6222
|
var UNDECLARED_OPTION_PATTERNS = Object.freeze([
|
|
@@ -6224,7 +6403,17 @@ function toAgentVoteSummary(result) {
|
|
|
6224
6403
|
// #6115: and for a seat that answered elsewhere.
|
|
6225
6404
|
...result.fallback !== void 0 ? { fallback: result.fallback } : {},
|
|
6226
6405
|
// #6246: and for what a recovered seat was retried from.
|
|
6227
|
-
...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`
|
|
6228
6417
|
};
|
|
6229
6418
|
}
|
|
6230
6419
|
function panelDegradationWarning(errorCount, total) {
|
|
@@ -6335,6 +6524,7 @@ function applyOptionalResponseFields(response, input, result, errorCount, costSu
|
|
|
6335
6524
|
unverifiableSeatsWarning(response.voteCounts.unverifiable, result.votes.length)
|
|
6336
6525
|
);
|
|
6337
6526
|
appendPanelWarning(response, singleModelPanelWarning(result.votes));
|
|
6527
|
+
appendPanelWarning(response, singleFamilyPanelWarning(result.votes));
|
|
6338
6528
|
const engaged = result.votes.length - errorCount;
|
|
6339
6529
|
const undeclared = checkUndeclaredOptions(
|
|
6340
6530
|
input.proposal,
|
|
@@ -6444,7 +6634,7 @@ function logPartialProposal(bounded, log) {
|
|
|
6444
6634
|
}
|
|
6445
6635
|
async function runContrarianCheck(proposal, log, opts) {
|
|
6446
6636
|
try {
|
|
6447
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
6637
|
+
const { executeExpert } = await import("./expert-bridge-EPTKCK73.js");
|
|
6448
6638
|
const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
|
|
6449
6639
|
logPartialProposal(bounded, log);
|
|
6450
6640
|
const result = await executeExpert("architecture", buildContrarianPrompt(bounded, opts), {
|
|
@@ -9552,6 +9742,10 @@ var CONSENSUS_VOTE_OUTPUT_SCHEMA = {
|
|
|
9552
9742
|
// because the async `pending` envelope shares this schema.
|
|
9553
9743
|
panelDiversity: z16.object({
|
|
9554
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(),
|
|
9555
9749
|
fallbacks: z16.number().int().nonnegative()
|
|
9556
9750
|
}).optional(),
|
|
9557
9751
|
// #3855: per-decision cost rollup. Same omission as panelWarning (#4032) — it
|
|
@@ -9647,6 +9841,9 @@ export {
|
|
|
9647
9841
|
isAbsentSeat,
|
|
9648
9842
|
NoAdapterError,
|
|
9649
9843
|
resolveAdapter,
|
|
9844
|
+
GatewayRediscovery,
|
|
9845
|
+
setGatewayRediscovery,
|
|
9846
|
+
ensureGatewayDiscovered,
|
|
9650
9847
|
assignPanelSeats,
|
|
9651
9848
|
collectRealVotes,
|
|
9652
9849
|
VoterProjectInputSchema,
|
|
@@ -9718,4 +9915,4 @@ export {
|
|
|
9718
9915
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
9719
9916
|
registerConsensusVoteTool
|
|
9720
9917
|
};
|
|
9721
|
-
//# sourceMappingURL=chunk-
|
|
9918
|
+
//# sourceMappingURL=chunk-6OQHDUFO.js.map
|