nexus-agents 2.93.0 → 2.95.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/{child-mcp-config-WNISXFYD.js → child-mcp-config-NW7JMSDK.js} +2 -2
- package/dist/{chunk-XVY3I7JT.js → chunk-2X24T4ZD.js} +9 -12
- package/dist/chunk-2X24T4ZD.js.map +1 -0
- package/dist/{chunk-BHA6V7GK.js → chunk-3H6Q3RZM.js} +4 -4
- package/dist/{chunk-T73G67GT.js → chunk-3HXWI34V.js} +3 -3
- package/dist/{chunk-RTUZSR4R.js → chunk-47Z3YPOK.js} +2 -2
- package/dist/{chunk-G5IDRWWI.js → chunk-4NVYN2MB.js} +4 -4
- package/dist/{chunk-5BTRDVWC.js → chunk-55G7KQ7F.js} +5 -5
- package/dist/{chunk-WU3SUA35.js → chunk-5HBDXW44.js} +2 -2
- package/dist/{chunk-JCETWDU7.js → chunk-6IWPN5UB.js} +2 -2
- package/dist/{chunk-4A4WPM75.js → chunk-7GUP6KQQ.js} +8 -10
- package/dist/{chunk-4A4WPM75.js.map → chunk-7GUP6KQQ.js.map} +1 -1
- package/dist/{chunk-ULBKFMVO.js → chunk-BSHDI4BH.js} +2 -2
- package/dist/{chunk-JEBWSHSU.js → chunk-D3JSXVX3.js} +2 -2
- package/dist/{chunk-HKISF2E7.js → chunk-ECBH5INZ.js} +259 -8
- package/dist/chunk-ECBH5INZ.js.map +1 -0
- package/dist/{chunk-ZOAU7RE4.js → chunk-ECZW5FXN.js} +4 -6
- package/dist/{chunk-ZOAU7RE4.js.map → chunk-ECZW5FXN.js.map} +1 -1
- package/dist/{chunk-ZYHHDPFW.js → chunk-FTDVA33Z.js} +4 -4
- package/dist/{chunk-2T4NV6QT.js → chunk-FXVJLJUF.js} +2 -2
- package/dist/{chunk-IJ2AZZVH.js → chunk-FYGZ4MEQ.js} +141 -28
- package/dist/chunk-FYGZ4MEQ.js.map +1 -0
- package/dist/{chunk-SORBJPRA.js → chunk-G42N55ZR.js} +2 -2
- package/dist/{chunk-SHSKW5ML.js → chunk-GC5FH2IA.js} +7 -7
- package/dist/{chunk-FTCU55O6.js → chunk-KHZGMF2W.js} +4 -4
- package/dist/{chunk-2IBJC2EP.js → chunk-LXROEQAO.js} +2 -2
- package/dist/{chunk-CPH6LKXO.js → chunk-LZOTH2GI.js} +2 -2
- package/dist/{chunk-DTFMYM3V.js → chunk-O4LVC4MQ.js} +2 -2
- package/dist/{chunk-AZP66FIA.js → chunk-PFOY5ML6.js} +3 -3
- package/dist/{chunk-SMGH2B3A.js → chunk-QUPPV6UO.js} +20 -3
- package/dist/chunk-QUPPV6UO.js.map +1 -0
- package/dist/{chunk-K7VGX37L.js → chunk-TEKWQNQ2.js} +3 -3
- package/dist/{chunk-LJMO5P6O.js → chunk-VTMQND6B.js} +23 -13
- package/dist/chunk-VTMQND6B.js.map +1 -0
- package/dist/{chunk-BNHBZRU7.js → chunk-WGA4VGIR.js} +3 -3
- package/dist/{chunk-57OH2O2U.js → chunk-Y3OOHHKQ.js} +2 -2
- package/dist/{chunk-VSG6RSE6.js → chunk-YYXJ6RTO.js} +3 -3
- package/dist/{chunk-E3QWWP67.js → chunk-ZICVVBDW.js} +2 -2
- package/dist/{cli-circuit-breaker-6E4E2IU7.js → cli-circuit-breaker-LNU5DQSB.js} +4 -4
- package/dist/cli.js +131 -54
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-MQOPXLVV.js → composite-router-DJ54ND5X.js} +2 -2
- package/dist/{consensus-vote-ZRADOLXH.js → consensus-vote-XLEQFVE7.js} +12 -13
- package/dist/{context-retriever-TZGIETJO.js → context-retriever-6O6TREXH.js} +6 -6
- package/dist/{doctor-deep-OU2WC55V.js → doctor-deep-PSNJPELP.js} +3 -3
- package/dist/{expert-bridge-WP5ZWXFY.js → expert-bridge-Q3OWPD4L.js} +4 -4
- package/dist/{factory-RJTRVII5.js → factory-43RVPRT5.js} +5 -5
- package/dist/{factory-2TN2VZTR.js → factory-PSMTMC7V.js} +5 -5
- package/dist/index.d.ts +215 -207
- package/dist/index.js +26 -27
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-AYMNMWU7.js → init-opencode-25AUARJH.js} +5 -5
- package/dist/{issue-triage-QIVZN3PJ.js → issue-triage-KZTENUDH.js} +5 -5
- package/dist/{pr-reviewer-helpers-P24OBKVM.js → pr-reviewer-helpers-XENJ4E2T.js} +4 -4
- package/dist/{registry-command-KWWOKJ5C.js → registry-command-X3O34FAK.js} +2 -2
- package/dist/{repo-security-plan-KZNEXDCI.js → repo-security-plan-XCX7EFJR.js} +3 -3
- package/dist/{research-helpers-synthesize-DH5PPX7A.js → research-helpers-synthesize-CGVR6M4S.js} +3 -4
- package/dist/{routing-memory-AGHJQTRH.js → routing-memory-YZRYGXQC.js} +2 -2
- package/dist/{session-memory-O24IVZAW.js → session-memory-SXQAA2EN.js} +3 -3
- package/dist/{setup-command-NBXZ4NGV.js → setup-command-VG7JZI6O.js} +11 -12
- package/dist/{setup-config-Y4JA5QWO.js → setup-config-VJAK6AA2.js} +3 -3
- package/dist/{setup-custom-api-UNX4OJEX.js → setup-custom-api-KSF2JMTS.js} +4 -5
- package/dist/{setup-custom-api-UNX4OJEX.js.map → setup-custom-api-KSF2JMTS.js.map} +1 -1
- package/dist/{tool-memory-UEQNXIGC.js → tool-memory-L7SDFSF5.js} +5 -5
- package/dist/{weather-report-S5YXRY7G.js → weather-report-D6HFOK7S.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-HKISF2E7.js.map +0 -1
- package/dist/chunk-IJ2AZZVH.js.map +0 -1
- package/dist/chunk-LJMO5P6O.js.map +0 -1
- package/dist/chunk-NESW2TTD.js +0 -134
- package/dist/chunk-NESW2TTD.js.map +0 -1
- package/dist/chunk-SMGH2B3A.js.map +0 -1
- package/dist/chunk-XVY3I7JT.js.map +0 -1
- /package/dist/{child-mcp-config-WNISXFYD.js.map → child-mcp-config-NW7JMSDK.js.map} +0 -0
- /package/dist/{chunk-BHA6V7GK.js.map → chunk-3H6Q3RZM.js.map} +0 -0
- /package/dist/{chunk-T73G67GT.js.map → chunk-3HXWI34V.js.map} +0 -0
- /package/dist/{chunk-RTUZSR4R.js.map → chunk-47Z3YPOK.js.map} +0 -0
- /package/dist/{chunk-G5IDRWWI.js.map → chunk-4NVYN2MB.js.map} +0 -0
- /package/dist/{chunk-5BTRDVWC.js.map → chunk-55G7KQ7F.js.map} +0 -0
- /package/dist/{chunk-WU3SUA35.js.map → chunk-5HBDXW44.js.map} +0 -0
- /package/dist/{chunk-JCETWDU7.js.map → chunk-6IWPN5UB.js.map} +0 -0
- /package/dist/{chunk-ULBKFMVO.js.map → chunk-BSHDI4BH.js.map} +0 -0
- /package/dist/{chunk-JEBWSHSU.js.map → chunk-D3JSXVX3.js.map} +0 -0
- /package/dist/{chunk-ZYHHDPFW.js.map → chunk-FTDVA33Z.js.map} +0 -0
- /package/dist/{chunk-2T4NV6QT.js.map → chunk-FXVJLJUF.js.map} +0 -0
- /package/dist/{chunk-SORBJPRA.js.map → chunk-G42N55ZR.js.map} +0 -0
- /package/dist/{chunk-SHSKW5ML.js.map → chunk-GC5FH2IA.js.map} +0 -0
- /package/dist/{chunk-FTCU55O6.js.map → chunk-KHZGMF2W.js.map} +0 -0
- /package/dist/{chunk-2IBJC2EP.js.map → chunk-LXROEQAO.js.map} +0 -0
- /package/dist/{chunk-CPH6LKXO.js.map → chunk-LZOTH2GI.js.map} +0 -0
- /package/dist/{chunk-DTFMYM3V.js.map → chunk-O4LVC4MQ.js.map} +0 -0
- /package/dist/{chunk-AZP66FIA.js.map → chunk-PFOY5ML6.js.map} +0 -0
- /package/dist/{chunk-K7VGX37L.js.map → chunk-TEKWQNQ2.js.map} +0 -0
- /package/dist/{chunk-BNHBZRU7.js.map → chunk-WGA4VGIR.js.map} +0 -0
- /package/dist/{chunk-57OH2O2U.js.map → chunk-Y3OOHHKQ.js.map} +0 -0
- /package/dist/{chunk-VSG6RSE6.js.map → chunk-YYXJ6RTO.js.map} +0 -0
- /package/dist/{chunk-E3QWWP67.js.map → chunk-ZICVVBDW.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-6E4E2IU7.js.map → cli-circuit-breaker-LNU5DQSB.js.map} +0 -0
- /package/dist/{composite-router-MQOPXLVV.js.map → composite-router-DJ54ND5X.js.map} +0 -0
- /package/dist/{consensus-vote-ZRADOLXH.js.map → consensus-vote-XLEQFVE7.js.map} +0 -0
- /package/dist/{context-retriever-TZGIETJO.js.map → context-retriever-6O6TREXH.js.map} +0 -0
- /package/dist/{doctor-deep-OU2WC55V.js.map → doctor-deep-PSNJPELP.js.map} +0 -0
- /package/dist/{expert-bridge-WP5ZWXFY.js.map → expert-bridge-Q3OWPD4L.js.map} +0 -0
- /package/dist/{factory-2TN2VZTR.js.map → factory-43RVPRT5.js.map} +0 -0
- /package/dist/{factory-RJTRVII5.js.map → factory-PSMTMC7V.js.map} +0 -0
- /package/dist/{init-opencode-AYMNMWU7.js.map → init-opencode-25AUARJH.js.map} +0 -0
- /package/dist/{issue-triage-QIVZN3PJ.js.map → issue-triage-KZTENUDH.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-P24OBKVM.js.map → pr-reviewer-helpers-XENJ4E2T.js.map} +0 -0
- /package/dist/{registry-command-KWWOKJ5C.js.map → registry-command-X3O34FAK.js.map} +0 -0
- /package/dist/{repo-security-plan-KZNEXDCI.js.map → repo-security-plan-XCX7EFJR.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-DH5PPX7A.js.map → research-helpers-synthesize-CGVR6M4S.js.map} +0 -0
- /package/dist/{routing-memory-AGHJQTRH.js.map → routing-memory-YZRYGXQC.js.map} +0 -0
- /package/dist/{session-memory-O24IVZAW.js.map → session-memory-SXQAA2EN.js.map} +0 -0
- /package/dist/{setup-command-NBXZ4NGV.js.map → setup-command-VG7JZI6O.js.map} +0 -0
- /package/dist/{setup-config-Y4JA5QWO.js.map → setup-config-VJAK6AA2.js.map} +0 -0
- /package/dist/{tool-memory-UEQNXIGC.js.map → tool-memory-L7SDFSF5.js.map} +0 -0
- /package/dist/{weather-report-S5YXRY7G.js.map → weather-report-D6HFOK7S.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRandomProvider,
|
|
3
3
|
getTimeProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ECBH5INZ.js";
|
|
5
5
|
|
|
6
6
|
// src/utils/id-utils.ts
|
|
7
7
|
import { randomUUID } from "crypto";
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
generateHyphenId,
|
|
25
25
|
generateUUID
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-G42N55ZR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULTS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7GUP6KQQ.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveInsideRoot
|
|
6
6
|
} from "./chunk-NUBSJGQZ.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
createAllAdapters,
|
|
12
12
|
probeCli
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3H6Q3RZM.js";
|
|
14
14
|
import {
|
|
15
15
|
CliNameSchema,
|
|
16
16
|
DEFAULT_CAPABILITIES,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
ok,
|
|
27
27
|
symbols,
|
|
28
28
|
writeLine
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ECBH5INZ.js";
|
|
30
30
|
import {
|
|
31
31
|
detectSandbox,
|
|
32
32
|
getLearningDir,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./chunk-CH7QIDHQ.js";
|
|
41
41
|
|
|
42
42
|
// src/version.ts
|
|
43
|
-
var VERSION = true ? "2.
|
|
43
|
+
var VERSION = true ? "2.95.0" : "dev";
|
|
44
44
|
|
|
45
45
|
// src/config/schemas-core.ts
|
|
46
46
|
import { z } from "zod";
|
|
@@ -2096,7 +2096,7 @@ async function runDoctorFix(result) {
|
|
|
2096
2096
|
writeLine2("\u2500".repeat(40));
|
|
2097
2097
|
let fixCount = 0;
|
|
2098
2098
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2099
|
-
const { runSetup } = await import("./setup-command-
|
|
2099
|
+
const { runSetup } = await import("./setup-command-VG7JZI6O.js");
|
|
2100
2100
|
const setupResult = runSetup({
|
|
2101
2101
|
skipMcp: true,
|
|
2102
2102
|
skipRules: true,
|
|
@@ -2110,7 +2110,7 @@ async function runDoctorFix(result) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
if (!result.configFile.found) {
|
|
2113
|
-
const { runConfigInitSync } = await import("./setup-config-
|
|
2113
|
+
const { runConfigInitSync } = await import("./setup-config-VJAK6AA2.js");
|
|
2114
2114
|
const configResult = runConfigInitSync(process.cwd(), false, false);
|
|
2115
2115
|
if (configResult.success && configResult.created) {
|
|
2116
2116
|
writeLine2(`\u2713 Generated config: ${configResult.path}`);
|
|
@@ -2208,4 +2208,4 @@ export {
|
|
|
2208
2208
|
startStdioServer,
|
|
2209
2209
|
closeServer
|
|
2210
2210
|
};
|
|
2211
|
-
//# sourceMappingURL=chunk-
|
|
2211
|
+
//# sourceMappingURL=chunk-GC5FH2IA.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-6T3EPABN.js";
|
|
6
6
|
import {
|
|
7
7
|
generateId
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G42N55ZR.js";
|
|
9
9
|
import {
|
|
10
10
|
getMemoryRegistry
|
|
11
11
|
} from "./chunk-PQHVC4BD.js";
|
|
12
12
|
import {
|
|
13
13
|
SessionMemory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6IWPN5UB.js";
|
|
15
15
|
import {
|
|
16
16
|
ErrorCode,
|
|
17
17
|
NexusError,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
getTimeProvider,
|
|
25
25
|
ok,
|
|
26
26
|
setSharedMobiMemDbPathResolver
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ECBH5INZ.js";
|
|
28
28
|
import {
|
|
29
29
|
nexusDataPath
|
|
30
30
|
} from "./chunk-CH7QIDHQ.js";
|
|
@@ -5612,4 +5612,4 @@ export {
|
|
|
5612
5612
|
reinitializeMemoryBackends,
|
|
5613
5613
|
ToolMemoryManager
|
|
5614
5614
|
};
|
|
5615
|
-
//# sourceMappingURL=chunk-
|
|
5615
|
+
//# sourceMappingURL=chunk-KHZGMF2W.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ConfigError,
|
|
3
3
|
err,
|
|
4
4
|
ok
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ECBH5INZ.js";
|
|
6
6
|
|
|
7
7
|
// src/adapters/sdk/types.ts
|
|
8
8
|
var PROVIDER_ENV_KEYS = {
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
CUSTOM_API_ALLOW_PRIVATE_ENV,
|
|
118
118
|
validateCustomApiBaseUrl
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-LXROEQAO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
err,
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
ok
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ECBH5INZ.js";
|
|
7
7
|
|
|
8
8
|
// src/scm/types.ts
|
|
9
9
|
var ScmError = class extends Error {
|
|
@@ -258,4 +258,4 @@ export {
|
|
|
258
258
|
ScmError,
|
|
259
259
|
GitHubProvider
|
|
260
260
|
};
|
|
261
|
-
//# sourceMappingURL=chunk-
|
|
261
|
+
//# sourceMappingURL=chunk-LZOTH2GI.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CACHE_TIMEOUTS,
|
|
3
3
|
createLogger,
|
|
4
4
|
getTimeProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ECBH5INZ.js";
|
|
6
6
|
|
|
7
7
|
// src/security/trust-types.ts
|
|
8
8
|
import { z } from "zod";
|
|
@@ -560,4 +560,4 @@ export {
|
|
|
560
560
|
resolveReputationGatingMode,
|
|
561
561
|
gateWithReputation
|
|
562
562
|
};
|
|
563
|
-
//# sourceMappingURL=chunk-
|
|
563
|
+
//# sourceMappingURL=chunk-O4LVC4MQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAIAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WGA4VGIR.js";
|
|
4
4
|
import {
|
|
5
5
|
ConfigError,
|
|
6
6
|
createLogger,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getTimeProvider,
|
|
10
10
|
lookupInTreeCapability,
|
|
11
11
|
ok
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ECBH5INZ.js";
|
|
13
13
|
import {
|
|
14
14
|
getNexusDataDir
|
|
15
15
|
} from "./chunk-CH7QIDHQ.js";
|
|
@@ -307,4 +307,4 @@ export {
|
|
|
307
307
|
discoverModels,
|
|
308
308
|
buildOpenAICompatAdapters
|
|
309
309
|
};
|
|
310
|
-
//# sourceMappingURL=chunk-
|
|
310
|
+
//# sourceMappingURL=chunk-PFOY5ML6.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_MODEL_PER_CLI,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
MODEL_IDS,
|
|
4
|
+
getTimeProvider,
|
|
5
|
+
resolveModelIdentitySync
|
|
6
|
+
} from "./chunk-ECBH5INZ.js";
|
|
5
7
|
|
|
6
8
|
// src/config/model-availability.ts
|
|
7
9
|
var DEFAULT_TTL_MS = 6e4;
|
|
@@ -103,6 +105,20 @@ function getCliForModelId(modelId) {
|
|
|
103
105
|
}
|
|
104
106
|
return void 0;
|
|
105
107
|
}
|
|
108
|
+
var VENDOR_TO_CLI_SLOT = {
|
|
109
|
+
anthropic: "claude",
|
|
110
|
+
google: "gemini",
|
|
111
|
+
openai: "codex"
|
|
112
|
+
};
|
|
113
|
+
function resolveCliSlot(model) {
|
|
114
|
+
if (model === void 0 || model === "") return void 0;
|
|
115
|
+
if (MODEL_IDS.includes(model)) {
|
|
116
|
+
const exact = getCliForModelId(model);
|
|
117
|
+
if (exact !== void 0) return exact;
|
|
118
|
+
}
|
|
119
|
+
const { vendor } = resolveModelIdentitySync(model);
|
|
120
|
+
return VENDOR_TO_CLI_SLOT[vendor] ?? "opencode";
|
|
121
|
+
}
|
|
106
122
|
var globalCache;
|
|
107
123
|
function getAvailabilityCache() {
|
|
108
124
|
globalCache ??= new AvailabilityCache();
|
|
@@ -129,8 +145,9 @@ export {
|
|
|
129
145
|
resolveFallback,
|
|
130
146
|
getFallbackChain,
|
|
131
147
|
getCliForModelId,
|
|
148
|
+
resolveCliSlot,
|
|
132
149
|
getAvailabilityCache,
|
|
133
150
|
resetAvailabilityCache,
|
|
134
151
|
filterAvailableModels
|
|
135
152
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-QUPPV6UO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/model-availability.ts"],"sourcesContent":["/**\n * nexus-agents/config - Model Availability Probes & Fallback Chains\n *\n * Runtime availability tracking for model APIs. Maintains a bounded\n * TTL cache of probe results and provides fallback chain resolution\n * when a model is unavailable.\n *\n * @module config/model-availability\n * (Source: Issue #869)\n */\n\nimport { getTimeProvider } from '../core/index.js';\nimport type { ModelId, CliNameLiteral } from './model-capabilities-types.js';\nimport { MODEL_IDS } from './model-capabilities-types.js';\nimport { DEFAULT_MODEL_PER_CLI } from './in-tree-data.js';\nimport { resolveModelIdentitySync, type ModelVendor } from './model-identity.js';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Status of a model probe. */\nexport interface ProbeResult {\n readonly modelId: ModelId;\n readonly available: boolean;\n readonly latencyMs: number;\n readonly checkedAt: number;\n readonly error?: string;\n}\n\n/** Configuration for the availability cache. */\nexport interface AvailabilityCacheConfig {\n /** Time-to-live in ms for probe results. Default: 60_000 (1 min). */\n readonly ttlMs?: number;\n /** Maximum entries in the cache. Default: 50. */\n readonly maxEntries?: number;\n}\n\n/** A function that probes whether a model is reachable. */\nexport type ProbeFn = (modelId: ModelId) => Promise<ProbeResult>;\n\n/** Fallback chain entry with model and reason for fallback. */\nexport interface FallbackEntry {\n readonly modelId: ModelId;\n readonly reason: string;\n}\n\n// ---------------------------------------------------------------------------\n// Availability Cache\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_TTL_MS = 60_000;\nconst DEFAULT_MAX_ENTRIES = 50;\n\n/**\n * Bounded TTL cache for model availability probe results.\n * Thread-safe for single-threaded Node.js; no locks needed.\n */\nexport class AvailabilityCache {\n private readonly cache = new Map<ModelId, ProbeResult>();\n private readonly ttlMs: number;\n private readonly maxEntries: number;\n\n constructor(config: AvailabilityCacheConfig = {}) {\n this.ttlMs = config.ttlMs ?? DEFAULT_TTL_MS;\n this.maxEntries = config.maxEntries ?? DEFAULT_MAX_ENTRIES;\n }\n\n /** Get a cached probe result, or undefined if expired/missing. */\n get(modelId: ModelId): ProbeResult | undefined {\n const entry = this.cache.get(modelId);\n if (entry === undefined) return undefined;\n if (getTimeProvider().now() - entry.checkedAt > this.ttlMs) {\n this.cache.delete(modelId);\n return undefined;\n }\n return entry;\n }\n\n /** Store a probe result, evicting oldest if at capacity. */\n set(result: ProbeResult): void {\n if (this.cache.size >= this.maxEntries && !this.cache.has(result.modelId)) {\n const oldest = this.cache.keys().next();\n if (oldest.done !== true) {\n this.cache.delete(oldest.value);\n }\n }\n this.cache.set(result.modelId, result);\n }\n\n /** Mark a model as unavailable without a full probe. */\n markUnavailable(modelId: ModelId, error: string): void {\n this.set({\n modelId,\n available: false,\n latencyMs: 0,\n checkedAt: getTimeProvider().now(),\n error,\n });\n }\n\n /** Mark a model as available. */\n markAvailable(modelId: ModelId, latencyMs: number): void {\n this.set({\n modelId,\n available: true,\n latencyMs,\n checkedAt: getTimeProvider().now(),\n });\n }\n\n /** Check if a model is known-unavailable (cached and not expired). */\n isKnownUnavailable(modelId: ModelId): boolean {\n const entry = this.get(modelId);\n return entry !== undefined && !entry.available;\n }\n\n /** Get all cached entries (for diagnostics). */\n entries(): ReadonlyArray<ProbeResult> {\n return [...this.cache.values()];\n }\n\n /** Number of cached entries. */\n get size(): number {\n return this.cache.size;\n }\n\n /** Clear all cached entries. */\n clear(): void {\n this.cache.clear();\n }\n}\n\n// ---------------------------------------------------------------------------\n// Fallback Chain Resolution\n// ---------------------------------------------------------------------------\n\n/** Default fallback order per CLI (strongest → weakest). */\nconst FALLBACK_CHAINS: Readonly<Record<CliNameLiteral, readonly ModelId[]>> = {\n claude: ['claude-opus', 'claude-sonnet', 'claude-haiku'],\n gemini: ['gemini-3-pro', 'gemini-pro', 'gemini-3-flash', 'gemini-flash'],\n codex: ['codex-5.3', 'codex-5.2', 'codex-5.1-mini'],\n opencode: ['opencode-custom-opus', 'opencode-custom-sonnet', 'opencode-default'],\n};\n\n/**\n * Resolves a fallback chain for a given model.\n * Returns the first available model in the chain, skipping known-unavailable ones.\n */\nexport function resolveFallback(modelId: ModelId, cache: AvailabilityCache): FallbackEntry | null {\n const cli = getCliForModelId(modelId);\n if (cli === undefined) return null;\n\n const chain = FALLBACK_CHAINS[cli];\n for (const candidate of chain) {\n if (candidate === modelId) continue;\n if (!cache.isKnownUnavailable(candidate)) {\n return {\n modelId: candidate,\n reason: `Fallback from ${modelId} (unavailable) to ${candidate}`,\n };\n }\n }\n return null;\n}\n\n/**\n * Get the fallback chain for a CLI tool.\n */\nexport function getFallbackChain(cli: CliNameLiteral): readonly ModelId[] {\n return FALLBACK_CHAINS[cli];\n}\n\n/**\n * Get the CLI name for a model ID.\n */\nexport function getCliForModelId(modelId: ModelId): CliNameLiteral | undefined {\n for (const [cli, defaultModel] of Object.entries(DEFAULT_MODEL_PER_CLI)) {\n const chain = FALLBACK_CHAINS[cli as CliNameLiteral];\n if (chain.includes(modelId)) return cli as CliNameLiteral;\n if (defaultModel === modelId) return cli as CliNameLiteral;\n }\n return undefined;\n}\n\n/**\n * Vendor → canonical `CliName` slot, for models NOT in the curated registry\n * (brand-new releases, or API/openrouter models). Keeps the routing/outcome/\n * tune pipeline keyed on a real slot instead of dropping the outcome (#3317 /\n * #3293). `opencode` is the multi-model catch-all slot for non-big-3 vendors.\n */\nconst VENDOR_TO_CLI_SLOT: Partial<Record<ModelVendor, CliNameLiteral>> = {\n anthropic: 'claude',\n google: 'gemini',\n openai: 'codex',\n};\n\n/**\n * Resolve a model string to a canonical `CliName` slot for routing/outcome\n * recording. Known models resolve to their exact curated slot; **unknown**\n * models (new releases, API/openrouter models not yet in the registry) fall\n * back to the vendor-derived slot — so the routing/outcome/tune pipeline still\n * records and learns instead of silently dropping the outcome with an\n * undefined cli (#3317 / #3293). Returns undefined only for an absent model\n * (no execution happened).\n */\nexport function resolveCliSlot(model: string | undefined): CliNameLiteral | undefined {\n if (model === undefined || model === '') return undefined;\n if ((MODEL_IDS as readonly string[]).includes(model)) {\n const exact = getCliForModelId(model as ModelId);\n if (exact !== undefined) return exact;\n }\n const { vendor } = resolveModelIdentitySync(model);\n return VENDOR_TO_CLI_SLOT[vendor] ?? 'opencode';\n}\n\n// ---------------------------------------------------------------------------\n// Singleton Cache (shared across the process)\n// ---------------------------------------------------------------------------\n\nlet globalCache: AvailabilityCache | undefined;\n\n/** Get the shared availability cache (lazy-init). */\nexport function getAvailabilityCache(): AvailabilityCache {\n globalCache ??= new AvailabilityCache();\n return globalCache;\n}\n\n/** Reset the global cache (for testing). */\nexport function resetAvailabilityCache(): void {\n globalCache = undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Filter Integration\n// ---------------------------------------------------------------------------\n\n/**\n * Filters out known-unavailable models from a set of model IDs.\n * Returns the filtered set, or null if no models were removed.\n * Used by scoreAllModels() to skip unavailable models.\n */\nexport function filterAvailableModels(\n modelIds: readonly string[],\n cache: AvailabilityCache\n): { available: string[]; removed: string[] } {\n const available: string[] = [];\n const removed: string[] = [];\n for (const id of modelIds) {\n if (cache.isKnownUnavailable(id as ModelId)) {\n removed.push(id);\n } else {\n available.push(id);\n }\n }\n return { available, removed };\n}\n"],"mappings":";;;;;;;;AAmDA,IAAM,iBAAiB;AACvB,IAAM,sBAAsB;AAMrB,IAAM,oBAAN,MAAwB;AAAA,EACZ,QAAQ,oBAAI,IAA0B;AAAA,EACtC;AAAA,EACA;AAAA,EAEjB,YAAY,SAAkC,CAAC,GAAG;AAChD,SAAK,QAAQ,OAAO,SAAS;AAC7B,SAAK,aAAa,OAAO,cAAc;AAAA,EACzC;AAAA;AAAA,EAGA,IAAI,SAA2C;AAC7C,UAAM,QAAQ,KAAK,MAAM,IAAI,OAAO;AACpC,QAAI,UAAU,OAAW,QAAO;AAChC,QAAI,gBAAgB,EAAE,IAAI,IAAI,MAAM,YAAY,KAAK,OAAO;AAC1D,WAAK,MAAM,OAAO,OAAO;AACzB,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,QAA2B;AAC7B,QAAI,KAAK,MAAM,QAAQ,KAAK,cAAc,CAAC,KAAK,MAAM,IAAI,OAAO,OAAO,GAAG;AACzE,YAAM,SAAS,KAAK,MAAM,KAAK,EAAE,KAAK;AACtC,UAAI,OAAO,SAAS,MAAM;AACxB,aAAK,MAAM,OAAO,OAAO,KAAK;AAAA,MAChC;AAAA,IACF;AACA,SAAK,MA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|
import {
|
|
5
5
|
CLI_NAMES,
|
|
6
6
|
StrategyDistiller,
|
|
7
7
|
createLogger,
|
|
8
8
|
getOutcomeStore,
|
|
9
9
|
registerPersistentDistillerFactory
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ECBH5INZ.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureLearningDir,
|
|
13
13
|
getRulesFile
|
|
@@ -273,4 +273,4 @@ export {
|
|
|
273
273
|
inferTaskCategory,
|
|
274
274
|
summarizeContextForPrompt
|
|
275
275
|
};
|
|
276
|
-
//# sourceMappingURL=chunk-
|
|
276
|
+
//# sourceMappingURL=chunk-TEKWQNQ2.js.map
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
createStream,
|
|
5
5
|
requireApiKey,
|
|
6
6
|
validateApiKeyPresence
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D3JSXVX3.js";
|
|
8
8
|
import {
|
|
9
9
|
CUSTOM_API_BASE_URL_ENV,
|
|
10
10
|
PROVIDER_ENV_KEYS,
|
|
11
11
|
validateCustomApiBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LXROEQAO.js";
|
|
13
13
|
import {
|
|
14
14
|
getToolMemory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KHZGMF2W.js";
|
|
16
16
|
import {
|
|
17
17
|
getDefaultAvailableModelsCache
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Y3OOHHKQ.js";
|
|
19
19
|
import {
|
|
20
20
|
CUSTOM_API_DEFAULT_MODEL
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7GUP6KQQ.js";
|
|
22
22
|
import {
|
|
23
23
|
createCliAdapter,
|
|
24
24
|
createCliDetectionCache,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
isCliAvailable,
|
|
28
28
|
sanitizeOutput,
|
|
29
29
|
withTimeout
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3H6Q3RZM.js";
|
|
31
31
|
import {
|
|
32
32
|
AgentError,
|
|
33
33
|
CACHE_TIMEOUTS,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
resolveCliAlias,
|
|
73
73
|
resolveVoteTimeout,
|
|
74
74
|
toRateLimitError
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-ECBH5INZ.js";
|
|
76
76
|
import {
|
|
77
77
|
ensureLearningDir,
|
|
78
78
|
getNexusDataDir,
|
|
@@ -1904,7 +1904,8 @@ var CliToModelAdapter = class {
|
|
|
1904
1904
|
*/
|
|
1905
1905
|
async complete(request) {
|
|
1906
1906
|
const task = this.toCliTask(request);
|
|
1907
|
-
const
|
|
1907
|
+
const effectiveTimeoutMs = request.timeoutMs ?? this.defaultTimeoutMs;
|
|
1908
|
+
const opts = effectiveTimeoutMs !== void 0 ? { timeoutMs: effectiveTimeoutMs } : void 0;
|
|
1908
1909
|
const result = await this.cliAdapter.execute(task, opts);
|
|
1909
1910
|
if (!result.ok) {
|
|
1910
1911
|
return err(this.toModelError(result.error));
|
|
@@ -4277,8 +4278,17 @@ async function executeSingleVoteAttempt(role, proposal, adapter, timeoutMs) {
|
|
|
4277
4278
|
// findings block routinely exceed 500 tokens. Bumped to 2000 (#2245);
|
|
4278
4279
|
// refine per use case if needed.
|
|
4279
4280
|
maxTokens: 2e3,
|
|
4280
|
-
temperature: 0.3
|
|
4281
|
+
temperature: 0.3,
|
|
4281
4282
|
// Low temperature for consistent evaluations
|
|
4283
|
+
// Thread the vote's budget into the adapter so its shorter standard CLI
|
|
4284
|
+
// timeout doesn't fire first and surface as an MCP -32001 on slow voters
|
|
4285
|
+
// (e.g. the Security role on complex proposals) (#3304).
|
|
4286
|
+
timeoutMs,
|
|
4287
|
+
// CLI adapters honor `timeoutMs`; API adapters honor `signal` (#3036). Pass
|
|
4288
|
+
// both so the slow voter is cancelled cleanly at the vote budget regardless
|
|
4289
|
+
// of backing (CLI subprocess SIGTERM'd via #3026, API SDK call aborted) —
|
|
4290
|
+
// CLI-vs-API parity for the vote timeout (#3304).
|
|
4291
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
4282
4292
|
};
|
|
4283
4293
|
const timeoutResult = await withTimeout(
|
|
4284
4294
|
adapter.complete(request),
|
|
@@ -7791,7 +7801,7 @@ var ErrorPolicySchema = z9.enum(["reduce_denominator", "count_as_abstain", "fail
|
|
|
7791
7801
|
var VoteThresholdSchema = z9.enum(["majority", "supermajority", "unanimous"]);
|
|
7792
7802
|
var ERROR_FLOOR_FRACTION = 0.5;
|
|
7793
7803
|
function getDefaultErrorPolicy(strategy) {
|
|
7794
|
-
if (strategy === "unanimous"
|
|
7804
|
+
if (strategy === "unanimous") {
|
|
7795
7805
|
return "fail_closed";
|
|
7796
7806
|
}
|
|
7797
7807
|
return "reduce_denominator";
|
|
@@ -7805,7 +7815,7 @@ var ConsensusVoteInputSchema = z9.object({
|
|
|
7805
7815
|
"Voting strategy: simple_majority (default), supermajority, unanimous, proof_of_learning, or higher_order (Bayesian-optimal)"
|
|
7806
7816
|
),
|
|
7807
7817
|
errorPolicy: ErrorPolicySchema.optional().describe(
|
|
7808
|
-
"How to treat voters that errored or timed out (#2630). Default: fail_closed for unanimous
|
|
7818
|
+
"How to treat voters that errored or timed out (#2630). Default: fail_closed for unanimous only; reduce_denominator for all other strategies incl. higher_order/opinion_wise (#3138 \u2014 a single infra timeout should not void an otherwise-unanimous vote). Regardless of policy, errors > 50% always fails."
|
|
7809
7819
|
),
|
|
7810
7820
|
quickMode: z9.boolean().optional().default(false).describe("Use 3 agents instead of 5 for faster execution"),
|
|
7811
7821
|
simulateVotes: z9.boolean().optional().default(false).describe(
|
|
@@ -9033,7 +9043,7 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
9033
9043
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
9034
9044
|
async function runContrarianCheck(proposal, log) {
|
|
9035
9045
|
try {
|
|
9036
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
9046
|
+
const { executeExpert } = await import("./expert-bridge-Q3OWPD4L.js");
|
|
9037
9047
|
const prompt = [
|
|
9038
9048
|
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
9039
9049
|
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
@@ -9556,4 +9566,4 @@ export {
|
|
|
9556
9566
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
9557
9567
|
registerConsensusVoteTool
|
|
9558
9568
|
};
|
|
9559
|
-
//# sourceMappingURL=chunk-
|
|
9569
|
+
//# sourceMappingURL=chunk-VTMQND6B.js.map
|