nexus-agents 8.104.10 → 8.105.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-WM3JBMKG.js → ast-rule-runner-SGQI3VOF.js} +3 -3
- package/dist/{child-mcp-config-HSI62LUC.js → child-mcp-config-6J647CLV.js} +2 -2
- package/dist/{chunk-4W55HTNL.js → chunk-3NONAKKZ.js} +2 -2
- package/dist/{chunk-GSX3XMWS.js → chunk-5MHIYVCE.js} +21 -4
- package/dist/chunk-5MHIYVCE.js.map +1 -0
- package/dist/{chunk-IREZQ6MM.js → chunk-5NKP4DVA.js} +4 -4
- package/dist/{chunk-MPLUQANO.js → chunk-75XDI2LH.js} +2 -2
- package/dist/{chunk-C6RUIBEM.js → chunk-ACE5NI5A.js} +19 -14
- package/dist/chunk-ACE5NI5A.js.map +1 -0
- package/dist/{chunk-ISUTO5IH.js → chunk-C7DGP6G7.js} +5 -5
- package/dist/{chunk-27FYQ5FU.js → chunk-CWWJUQY6.js} +2 -2
- package/dist/{chunk-HNYGJKIC.js → chunk-DXXPCVFN.js} +2 -2
- package/dist/{chunk-I4CAKXMZ.js → chunk-E4OCHK7E.js} +5 -5
- package/dist/{chunk-CNSXOFAJ.js → chunk-E7IXV4NF.js} +4 -4
- package/dist/{chunk-L2XNMJVX.js → chunk-EK6J5SHZ.js} +2 -2
- package/dist/{chunk-JMRRPGC6.js → chunk-G2GXD2Z2.js} +8 -8
- package/dist/{chunk-M5NBOFOD.js → chunk-GGP3F7FG.js} +2 -2
- package/dist/{chunk-QPYQ5UQF.js → chunk-GRHDTIAB.js} +44 -44
- package/dist/{chunk-QPYQ5UQF.js.map → chunk-GRHDTIAB.js.map} +1 -1
- package/dist/{chunk-VCRYRGNO.js → chunk-INNBAGGQ.js} +3 -3
- package/dist/{chunk-PLLTNSLJ.js → chunk-JYDTFMQ7.js} +4 -4
- package/dist/{chunk-VA3DHG3F.js → chunk-KG625C53.js} +2 -2
- package/dist/{chunk-O2B3QYLP.js → chunk-KRY5VIQW.js} +49 -14
- package/dist/chunk-KRY5VIQW.js.map +1 -0
- package/dist/{chunk-D5JXVM3K.js → chunk-ME44FKOB.js} +2 -2
- package/dist/{chunk-GWGDJU43.js → chunk-RPOGHHN7.js} +188 -137
- package/dist/chunk-RPOGHHN7.js.map +1 -0
- package/dist/{chunk-4B7WU4VG.js → chunk-SCYQZCHJ.js} +3 -3
- package/dist/{chunk-CS3VQ2F3.js → chunk-SDUKS5RF.js} +2 -2
- package/dist/{chunk-CS3VQ2F3.js.map → chunk-SDUKS5RF.js.map} +1 -1
- package/dist/{chunk-AGSSPX26.js → chunk-SK32DF4A.js} +3 -3
- package/dist/{chunk-GEAMUEZK.js → chunk-SV45NVN2.js} +2 -2
- package/dist/{chunk-JCSBFFNK.js → chunk-TDELDKWG.js} +118 -134
- package/dist/chunk-TDELDKWG.js.map +1 -0
- package/dist/{chunk-PIOFIZ3X.js → chunk-TWIVLQIJ.js} +2 -2
- package/dist/{chunk-GLXOWEI3.js → chunk-U7D2NZXS.js} +2 -2
- package/dist/{chunk-RMKPXCGY.js → chunk-UEIQZUPN.js} +5 -5
- package/dist/{chunk-IDYKSHNZ.js → chunk-UMKRODKL.js} +2 -2
- package/dist/{chunk-Y5EBZJRZ.js → chunk-VUVFGITX.js} +11 -11
- package/dist/{chunk-NIG44TRT.js → chunk-W62UJDZE.js} +2 -2
- package/dist/{chunk-NB45LF4Z.js → chunk-WD5KUEX3.js} +2 -2
- package/dist/{chunk-VR3M66RC.js → chunk-XCA2YZZZ.js} +2 -2
- package/dist/{chunk-QZSJAVHN.js → chunk-YLUCWOR6.js} +3 -3
- package/dist/{chunk-PSZ7TE63.js → chunk-ZKWGNNKP.js} +2 -2
- package/dist/{cli-circuit-breaker-X5T5VGR3.js → cli-circuit-breaker-NHNQX2ZB.js} +3 -3
- package/dist/cli.js +44 -44
- package/dist/{composite-router-AT2ER26N.js → composite-router-VFEUI72D.js} +2 -2
- package/dist/{consensus-vote-X3AV4YMB.js → consensus-vote-IPJFQXIK.js} +17 -17
- package/dist/{context-retriever-QLQN4KMM.js → context-retriever-5WQ2YWNE.js} +8 -8
- package/dist/{doctor-deep-PKWGB3FP.js → doctor-deep-FNBDBTBM.js} +3 -3
- package/dist/{doctor-gateway-report-PPEQGSJR.js → doctor-gateway-report-WHI5WQ4N.js} +6 -6
- package/dist/{doctor-live-RUYUE6OI.js → doctor-live-MMGCD6PM.js} +26 -12
- package/dist/doctor-live-MMGCD6PM.js.map +1 -0
- package/dist/{expert-bridge-LCXONJM4.js → expert-bridge-BDO4LV26.js} +5 -5
- package/dist/{factory-KATBUMXX.js → factory-QUENHU3I.js} +5 -5
- package/dist/{factory-GSGQG4QJ.js → factory-SBAHD6WP.js} +9 -9
- package/dist/{improvement-review-CZK2EO7H.js → improvement-review-BK2GLXBS.js} +5 -5
- package/dist/index.d.ts +8 -7
- package/dist/index.js +32 -32
- package/dist/{init-opencode-CEI3QZ6Q.js → init-opencode-KOPBB643.js} +5 -5
- package/dist/issue-triage-AZQRUQOH.js +16 -0
- package/dist/{openai-compat-adapter-G2OQCZBQ.js → openai-compat-adapter-4S32VPGP.js} +5 -5
- package/dist/{pr-reviewer-helpers-36C5VPCO.js → pr-reviewer-helpers-MGBA4VLQ.js} +4 -4
- package/dist/{registry-command-FG5EXO3N.js → registry-command-6FQFIA7D.js} +2 -2
- package/dist/{repo-security-plan-AI3OXRW6.js → repo-security-plan-X5NNMNEZ.js} +3 -3
- package/dist/{research-helpers-synthesize-DJH54YEZ.js → research-helpers-synthesize-VIAXHYD5.js} +4 -4
- package/dist/{routing-memory-C3P4I2U2.js → routing-memory-RHEUT6CE.js} +2 -2
- package/dist/{session-memory-TEYTHSB5.js → session-memory-C6VTHVNC.js} +3 -3
- package/dist/{setup-config-5ZRSVBIF.js → setup-config-BOKVRB67.js} +3 -3
- package/dist/{setup-custom-api-L5MHD4VT.js → setup-custom-api-EVXBKE7I.js} +4 -4
- package/dist/setup-data-dir-3WHFLPS4.js +34 -0
- package/dist/{tool-memory-TINBXRNZ.js → tool-memory-IYXG7RHF.js} +5 -5
- package/dist/{unified-registry-BN7OIL26.js → unified-registry-YJSEL7AJ.js} +11 -11
- package/dist/{weather-report-56FGGFJH.js → weather-report-H7GRKDDA.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-C6RUIBEM.js.map +0 -1
- package/dist/chunk-GSX3XMWS.js.map +0 -1
- package/dist/chunk-GWGDJU43.js.map +0 -1
- package/dist/chunk-JCSBFFNK.js.map +0 -1
- package/dist/chunk-O2B3QYLP.js.map +0 -1
- package/dist/doctor-live-RUYUE6OI.js.map +0 -1
- package/dist/issue-triage-V2B4IBDT.js +0 -16
- package/dist/setup-data-dir-43YOAPZJ.js +0 -34
- /package/dist/{ast-rule-runner-WM3JBMKG.js.map → ast-rule-runner-SGQI3VOF.js.map} +0 -0
- /package/dist/{child-mcp-config-HSI62LUC.js.map → child-mcp-config-6J647CLV.js.map} +0 -0
- /package/dist/{chunk-4W55HTNL.js.map → chunk-3NONAKKZ.js.map} +0 -0
- /package/dist/{chunk-IREZQ6MM.js.map → chunk-5NKP4DVA.js.map} +0 -0
- /package/dist/{chunk-MPLUQANO.js.map → chunk-75XDI2LH.js.map} +0 -0
- /package/dist/{chunk-ISUTO5IH.js.map → chunk-C7DGP6G7.js.map} +0 -0
- /package/dist/{chunk-27FYQ5FU.js.map → chunk-CWWJUQY6.js.map} +0 -0
- /package/dist/{chunk-HNYGJKIC.js.map → chunk-DXXPCVFN.js.map} +0 -0
- /package/dist/{chunk-I4CAKXMZ.js.map → chunk-E4OCHK7E.js.map} +0 -0
- /package/dist/{chunk-CNSXOFAJ.js.map → chunk-E7IXV4NF.js.map} +0 -0
- /package/dist/{chunk-L2XNMJVX.js.map → chunk-EK6J5SHZ.js.map} +0 -0
- /package/dist/{chunk-JMRRPGC6.js.map → chunk-G2GXD2Z2.js.map} +0 -0
- /package/dist/{chunk-M5NBOFOD.js.map → chunk-GGP3F7FG.js.map} +0 -0
- /package/dist/{chunk-VCRYRGNO.js.map → chunk-INNBAGGQ.js.map} +0 -0
- /package/dist/{chunk-PLLTNSLJ.js.map → chunk-JYDTFMQ7.js.map} +0 -0
- /package/dist/{chunk-VA3DHG3F.js.map → chunk-KG625C53.js.map} +0 -0
- /package/dist/{chunk-D5JXVM3K.js.map → chunk-ME44FKOB.js.map} +0 -0
- /package/dist/{chunk-4B7WU4VG.js.map → chunk-SCYQZCHJ.js.map} +0 -0
- /package/dist/{chunk-AGSSPX26.js.map → chunk-SK32DF4A.js.map} +0 -0
- /package/dist/{chunk-GEAMUEZK.js.map → chunk-SV45NVN2.js.map} +0 -0
- /package/dist/{chunk-PIOFIZ3X.js.map → chunk-TWIVLQIJ.js.map} +0 -0
- /package/dist/{chunk-GLXOWEI3.js.map → chunk-U7D2NZXS.js.map} +0 -0
- /package/dist/{chunk-RMKPXCGY.js.map → chunk-UEIQZUPN.js.map} +0 -0
- /package/dist/{chunk-IDYKSHNZ.js.map → chunk-UMKRODKL.js.map} +0 -0
- /package/dist/{chunk-Y5EBZJRZ.js.map → chunk-VUVFGITX.js.map} +0 -0
- /package/dist/{chunk-NIG44TRT.js.map → chunk-W62UJDZE.js.map} +0 -0
- /package/dist/{chunk-NB45LF4Z.js.map → chunk-WD5KUEX3.js.map} +0 -0
- /package/dist/{chunk-VR3M66RC.js.map → chunk-XCA2YZZZ.js.map} +0 -0
- /package/dist/{chunk-QZSJAVHN.js.map → chunk-YLUCWOR6.js.map} +0 -0
- /package/dist/{chunk-PSZ7TE63.js.map → chunk-ZKWGNNKP.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-X5T5VGR3.js.map → cli-circuit-breaker-NHNQX2ZB.js.map} +0 -0
- /package/dist/{composite-router-AT2ER26N.js.map → composite-router-VFEUI72D.js.map} +0 -0
- /package/dist/{consensus-vote-X3AV4YMB.js.map → consensus-vote-IPJFQXIK.js.map} +0 -0
- /package/dist/{context-retriever-QLQN4KMM.js.map → context-retriever-5WQ2YWNE.js.map} +0 -0
- /package/dist/{doctor-deep-PKWGB3FP.js.map → doctor-deep-FNBDBTBM.js.map} +0 -0
- /package/dist/{doctor-gateway-report-PPEQGSJR.js.map → doctor-gateway-report-WHI5WQ4N.js.map} +0 -0
- /package/dist/{expert-bridge-LCXONJM4.js.map → expert-bridge-BDO4LV26.js.map} +0 -0
- /package/dist/{factory-GSGQG4QJ.js.map → factory-QUENHU3I.js.map} +0 -0
- /package/dist/{factory-KATBUMXX.js.map → factory-SBAHD6WP.js.map} +0 -0
- /package/dist/{improvement-review-CZK2EO7H.js.map → improvement-review-BK2GLXBS.js.map} +0 -0
- /package/dist/{init-opencode-CEI3QZ6Q.js.map → init-opencode-KOPBB643.js.map} +0 -0
- /package/dist/{issue-triage-V2B4IBDT.js.map → issue-triage-AZQRUQOH.js.map} +0 -0
- /package/dist/{openai-compat-adapter-G2OQCZBQ.js.map → openai-compat-adapter-4S32VPGP.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-36C5VPCO.js.map → pr-reviewer-helpers-MGBA4VLQ.js.map} +0 -0
- /package/dist/{registry-command-FG5EXO3N.js.map → registry-command-6FQFIA7D.js.map} +0 -0
- /package/dist/{repo-security-plan-AI3OXRW6.js.map → repo-security-plan-X5NNMNEZ.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-DJH54YEZ.js.map → research-helpers-synthesize-VIAXHYD5.js.map} +0 -0
- /package/dist/{routing-memory-C3P4I2U2.js.map → routing-memory-RHEUT6CE.js.map} +0 -0
- /package/dist/{session-memory-TEYTHSB5.js.map → session-memory-C6VTHVNC.js.map} +0 -0
- /package/dist/{setup-config-5ZRSVBIF.js.map → setup-config-BOKVRB67.js.map} +0 -0
- /package/dist/{setup-custom-api-L5MHD4VT.js.map → setup-custom-api-EVXBKE7I.js.map} +0 -0
- /package/dist/{setup-data-dir-43YOAPZJ.js.map → setup-data-dir-3WHFLPS4.js.map} +0 -0
- /package/dist/{tool-memory-TINBXRNZ.js.map → tool-memory-IYXG7RHF.js.map} +0 -0
- /package/dist/{unified-registry-BN7OIL26.js.map → unified-registry-YJSEL7AJ.js.map} +0 -0
- /package/dist/{weather-report-56FGGFJH.js.map → weather-report-H7GRKDDA.js.map} +0 -0
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
getBuiltInAstRulesPath,
|
|
10
10
|
loadRules,
|
|
11
11
|
runAstQaRules
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CWWJUQY6.js";
|
|
13
13
|
import "./chunk-XEPZSDN5.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-RPOGHHN7.js";
|
|
15
15
|
import "./chunk-UE7A2XHM.js";
|
|
16
16
|
import "./chunk-LWOX65CP.js";
|
|
17
17
|
import "./chunk-PX6F3LHL.js";
|
|
@@ -27,4 +27,4 @@ export {
|
|
|
27
27
|
loadRules,
|
|
28
28
|
runAstQaRules
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=ast-rule-runner-
|
|
30
|
+
//# sourceMappingURL=ast-rule-runner-SGQI3VOF.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-RPOGHHN7.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-6J647CLV.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createLogger,
|
|
3
3
|
err,
|
|
4
4
|
ok
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RPOGHHN7.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-3NONAKKZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveClassGuardMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RPOGHHN7.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/cli-readiness.ts
|
|
6
6
|
var READINESS_LEVELS = ["installed", "authenticated", "serves"];
|
|
@@ -16,6 +16,23 @@ function buildReadiness(cli, levels) {
|
|
|
16
16
|
const reached = highestVerified(levels);
|
|
17
17
|
return { cli, levels, ...reached !== void 0 ? { reached } : {} };
|
|
18
18
|
}
|
|
19
|
+
function buildGatewayReadiness(cli, gateway, serves) {
|
|
20
|
+
const notRun = {
|
|
21
|
+
status: "not-attempted",
|
|
22
|
+
reason: `the CLI is not run: gateway model ${gateway.gatewayModel} serves this slot`
|
|
23
|
+
};
|
|
24
|
+
const levels = { installed: notRun, authenticated: notRun, serves };
|
|
25
|
+
return { cli, levels, gateway, ...serves.status === "verified" ? { reached: "serves" } : {} };
|
|
26
|
+
}
|
|
27
|
+
function readinessSummary(readiness) {
|
|
28
|
+
const g = readiness.gateway;
|
|
29
|
+
if (g !== void 0) {
|
|
30
|
+
const why = g.cliState === "disabled" ? "CLI disabled by NEXUS_DISABLED_CLIS" : "CLI not available";
|
|
31
|
+
const verdict = readiness.reached === "serves" ? "serves" : "not ready";
|
|
32
|
+
return `served by gateway model ${g.gatewayModel} (${why}) \u2014 ${verdict}`;
|
|
33
|
+
}
|
|
34
|
+
return readiness.reached === void 0 ? "not ready" : `ready through "${readiness.reached}"`;
|
|
35
|
+
}
|
|
19
36
|
function formatReadiness(readiness) {
|
|
20
37
|
const icon = (o) => {
|
|
21
38
|
switch (o.status) {
|
|
@@ -36,8 +53,7 @@ function formatReadiness(readiness) {
|
|
|
36
53
|
const detail = outcome.status === "verified" ? "" : ` \u2014 ${outcome.reason}`;
|
|
37
54
|
return ` ${icon(outcome)} ${level}${detail}`;
|
|
38
55
|
});
|
|
39
|
-
|
|
40
|
-
return [` ${readiness.cli}: ${summary}`, ...lines].join("\n");
|
|
56
|
+
return [` ${readiness.cli}: ${readinessSummary(readiness)}`, ...lines].join("\n");
|
|
41
57
|
}
|
|
42
58
|
var SERVES_PROBE_PROMPT = "Reply with the single word: ok";
|
|
43
59
|
async function probeServes(adapter, timeoutMs = resolveClassGuardMs("interactive")) {
|
|
@@ -86,8 +102,9 @@ async function withDeadline(work, timeoutMs) {
|
|
|
86
102
|
|
|
87
103
|
export {
|
|
88
104
|
buildReadiness,
|
|
105
|
+
buildGatewayReadiness,
|
|
89
106
|
formatReadiness,
|
|
90
107
|
SERVES_PROBE_PROMPT,
|
|
91
108
|
probeServes
|
|
92
109
|
};
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
110
|
+
//# sourceMappingURL=chunk-5MHIYVCE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/cli-readiness.ts"],"sourcesContent":["/**\n * Readiness levels for a CLI adapter (#4376, #4351 criterion 7).\n *\n * Nothing in the tree could confirm that an adapter which *looks* healthy can\n * actually serve a completion. `healthCheck()` proves the binary exists at an\n * acceptable version; `cli-auth-probe` proves credentials are present and\n * unexpired, and says so explicitly — \"No live API calls.\" Neither proves the\n * adapter serves anything.\n *\n * That is the state #4351 reported: every voter returned `stop_sequence` with\n * zero tokens while every available check said healthy. The checks were not\n * wrong; they were answering a narrower question than the caller assumed.\n *\n * ## Levels, and what each one actually proves\n *\n * | level | proves | costs |\n * | --------------- | ----------------------------------------- | ----- |\n * | `installed` | the binary exists at a supported version | none |\n * | `authenticated` | credentials are present and unexpired | none |\n * | `serves` | a real completion came back with content | quota |\n *\n * `serves` is the only level that can catch #4351, and the only one that\n * spends the resource it is measuring. It therefore runs **only when\n * explicitly invoked** (`doctor --live`). Decided by a 7-voter `higher_order`\n * panel on #4376 (5 of 6 approvers): the rejected alternative cached a probe\n * result behind a TTL on the default path, which is a stale measurement\n * presented as current readiness — the same defect this module exists to fix.\n *\n * ## Not-attempted is not a failure\n *\n * The load-bearing distinction. A level that was never run reports\n * `not-attempted`, never `failed`. A reader must be able to tell \"we checked\n * and it does not serve\" from \"we did not check\", because the second is the\n * default state of every run that does not pass `--live`, and reporting it as\n * either healthy or broken would be a claim nobody measured.\n *\n * @module cli/cli-readiness\n * (Source: Issue #4376)\n */\n\nimport { resolveClassGuardMs } from '../config/timeouts.js';\nimport type { CliName } from '../cli-adapters/types.js';\n\n/** Ordered weakest to strongest. Each level subsumes the ones before it. */\nexport const READINESS_LEVELS = ['installed', 'authenticated', 'serves'] as const;\n\nexport type ReadinessLevel = (typeof READINESS_LEVELS)[number];\n\n/** What a single level's check concluded. */\nexport type LevelOutcome =\n | { readonly status: 'verified' }\n | { readonly status: 'failed'; readonly reason: string }\n /** Not run. Carries why, so the report can distinguish opt-out from error. */\n | { readonly status: 'not-attempted'; readonly reason: string };\n\n/**\n * The slot is served by a gateway model, not the CLI (#6720). Its CLI levels\n * are not measured — the CLI is disabled or not available, and is not run —\n * so only `serves` says anything, and it says it about the gateway model.\n */\ninterface GatewayServedReadiness {\n readonly gatewayModel: string;\n /** Why the CLI does not serve the slot. */\n readonly cliState: 'disabled' | 'not-available';\n}\n\nexport interface CliReadiness {\n readonly cli: CliName;\n readonly levels: Readonly<Record<ReadinessLevel, LevelOutcome>>;\n /** Present when a gateway model serves the slot; the levels then describe it. */\n readonly gateway?: GatewayServedReadiness;\n /**\n * The strongest level actually VERIFIED, or undefined when even `installed`\n * failed. Never inferred from a level that was not attempted.\n */\n readonly reached?: ReadinessLevel;\n}\n\n/** Human-readable statement of what a level does and does not prove. */\nexport const LEVEL_MEANING: Readonly<Record<ReadinessLevel, string>> = {\n installed: 'binary present at a supported version — proves nothing about auth or serving',\n authenticated: 'credentials present and unexpired, read locally — no API call was made',\n serves: 'a real completion returned content — the only level that proves the adapter works',\n};\n\n/**\n * The strongest verified level, stopping at the first gap.\n *\n * Stops rather than scanning for any verified level, because the ladder is\n * cumulative: a `serves` verification below a failed `authenticated` would\n * mean the two checks disagree, and reporting the higher one would paper over\n * that. A `not-attempted` level stops the ladder exactly like a failure —\n * absence of a check is not a pass.\n */\nexport function highestVerified(\n levels: Readonly<Record<ReadinessLevel, LevelOutcome>>\n): ReadinessLevel | undefined {\n let reached: ReadinessLevel | undefined;\n for (const level of READINESS_LEVELS) {\n if (levels[level].status !== 'verified') break;\n reached = level;\n }\n return reached;\n}\n\n/** Assemble a readiness result, deriving `reached` from the outcomes. */\nexport function buildReadiness(\n cli: CliName,\n levels: Readonly<Record<ReadinessLevel, LevelOutcome>>\n): CliReadiness {\n const reached = highestVerified(levels);\n return { cli, levels, ...(reached !== undefined ? { reached } : {}) };\n}\n\n/**\n * Readiness of a slot a gateway model serves (#6720). `installed` and\n * `authenticated` are the CLI's rungs and were not run — the CLI is not what\n * serves — so they are `not-attempted` with that reason, and `reached` is\n * `serves` exactly when the gateway model's completion came back.\n */\nexport function buildGatewayReadiness(\n cli: CliName,\n gateway: GatewayServedReadiness,\n serves: LevelOutcome\n): CliReadiness {\n const notRun: LevelOutcome = {\n status: 'not-attempted',\n reason: `the CLI is not run: gateway model ${gateway.gatewayModel} serves this slot`,\n };\n const levels = { installed: notRun, authenticated: notRun, serves };\n return { cli, levels, gateway, ...(serves.status === 'verified' ? { reached: 'serves' } : {}) };\n}\n\n/** The header of one readiness entry. */\nfunction readinessSummary(readiness: CliReadiness): string {\n const g = readiness.gateway;\n if (g !== undefined) {\n const why =\n g.cliState === 'disabled' ? 'CLI disabled by NEXUS_DISABLED_CLIS' : 'CLI not available';\n const verdict = readiness.reached === 'serves' ? 'serves' : 'not ready';\n return `served by gateway model ${g.gatewayModel} (${why}) — ${verdict}`;\n }\n return readiness.reached === undefined ? 'not ready' : `ready through \"${readiness.reached}\"`;\n}\n\n/**\n * Render one CLI's ladder, naming every level's state.\n *\n * Every level is printed, including the ones that did not run. A report that\n * silently omitted `serves` would read as a clean bill of health from a run\n * that never tested serving — which is precisely how #4351 went unnoticed.\n */\nexport function formatReadiness(readiness: CliReadiness): string {\n // Exhaustive rather than a ternary chain (#4563): a new LevelOutcome status\n // would otherwise fall into the '·' arm and render as \"not attempted\",\n // quietly misreporting whatever the new state actually means.\n const icon = (o: LevelOutcome): string => {\n switch (o.status) {\n case 'verified':\n return '✓';\n case 'failed':\n return '✗';\n case 'not-attempted':\n return '·';\n default: {\n const exhaustive: never = o;\n throw new Error(`Unhandled level outcome: ${JSON.stringify(exhaustive)}`);\n }\n }\n };\n\n const lines = READINESS_LEVELS.map((level) => {\n const outcome = readiness.levels[level];\n const detail = outcome.status === 'verified' ? '' : ` — ${outcome.reason}`;\n return ` ${icon(outcome)} ${level}${detail}`;\n });\n\n return [` ${readiness.cli}: ${readinessSummary(readiness)}`, ...lines].join('\\n');\n}\n\n/** The minimal adapter surface the `serves` probe needs. */\nexport interface ServesProbeTarget {\n execute(task: {\n content: string;\n maxTokens?: number;\n }): Promise<{ ok: true; value: { text: string } } | { ok: false; error: { message: string } }>;\n}\n\n/**\n * The smallest prompt that still proves generation happened.\n *\n * Short on purpose — this level spends real quota, so it asks for the least\n * that can distinguish \"served content\" from \"returned nothing\".\n */\nexport const SERVES_PROBE_PROMPT = 'Reply with the single word: ok';\n\n/**\n * Probe whether an adapter actually serves a completion.\n *\n * The check that matters is **non-empty content**, not a successful exit.\n * #4351's signature was every voter returning `stop_sequence` with zero\n * tokens: the call succeeded and produced nothing. An adapter that returns\n * `ok` with empty text has not served, and saying otherwise would reproduce\n * the exact reading that made the incident invisible.\n *\n * Bounded by the `interactive` operation-class guard. Found by running it: an\n * unbounded ladder over four adapters hung past two minutes with no output,\n * and a readiness check that never returns is worse than one that reports a\n * failure — the operator learns nothing either way, but waits for it. A\n * timeout is itself a legitimate not-ready result, not an error.\n *\n * @param adapter - The adapter to probe.\n * @param timeoutMs - Per-adapter ceiling; defaults to the interactive guard.\n */\nexport async function probeServes(\n adapter: ServesProbeTarget,\n timeoutMs: number = resolveClassGuardMs('interactive')\n): Promise<LevelOutcome> {\n let result: Awaited<ReturnType<ServesProbeTarget['execute']>>;\n try {\n result = await withDeadline(\n adapter.execute({ content: SERVES_PROBE_PROMPT, maxTokens: 16 }),\n timeoutMs\n );\n } catch (caught: unknown) {\n if (caught instanceof ProbeTimeout) {\n return {\n status: 'failed',\n reason: `no response within ${String(Math.round(timeoutMs / 1000))}s`,\n };\n }\n const message = caught instanceof Error ? caught.message : String(caught);\n return { status: 'failed', reason: `probe threw: ${message}` };\n }\n\n if (!result.ok) {\n return { status: 'failed', reason: result.error.message };\n }\n if (result.value.text.trim() === '') {\n return {\n status: 'failed',\n reason: 'call succeeded but returned no content — the #4351 signature',\n };\n }\n return { status: 'verified' };\n}\n\n/** Raised when a probe outlives its ceiling. */\nclass ProbeTimeout extends Error {}\n\n/**\n * Race a promise against a deadline.\n *\n * The underlying call is not cancelled — a CLI subprocess keeps running until\n * its own guard reaps it. What this bounds is how long the OPERATOR waits,\n * which is the thing that made an unbounded ladder unusable.\n */\nasync function withDeadline<T>(work: Promise<T>, timeoutMs: number): Promise<T> {\n let timer: NodeJS.Timeout | undefined;\n const deadline = new Promise<never>((_resolve, reject) => {\n timer = setTimeout(() => {\n reject(new ProbeTimeout());\n }, timeoutMs);\n // Deliberately NOT unref'd. An unref'd timer does not hold the event loop\n // open, so if the probed call never settles and nothing else is pending,\n // Node can exit at the await before the deadline fires — the guarantee\n // voiding itself in precisely the case it exists for. `clearTimeout` in\n // the finally is what stops it outliving a call that did settle.\n });\n\n try {\n return await Promise.race([work, deadline]);\n } finally {\n if (timer !== undefined) clearTimeout(timer);\n }\n}\n"],"m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,WAAW,MAAM;AACvB,aAAO,IAAI,aAAa,CAAC;AAAA,IAC3B,GAAG,SAAS;AAAA,EAMd,CAAC;AAED,MAAI;AACF,WAAO,MAAM,QAAQ,KAAK,CAAC,MAAM,QAAQ,CAAC;AAAA,EAC5C,UAAE;AACA,QAAI,UAAU,OAAW,cAAa,KAAK;AAAA,EAC7C;AACF;","names":[]}
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
readGatewayTransport,
|
|
8
8
|
requireApiKey,
|
|
9
9
|
validateApiKeyPresence
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SV45NVN2.js";
|
|
11
11
|
import {
|
|
12
12
|
assertCustomApiHostResolvesPublic,
|
|
13
13
|
hostnameOf,
|
|
14
14
|
redactApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GGP3F7FG.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeErrorDetails
|
|
18
18
|
} from "./chunk-2NDA4DHW.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
readModelAllowlist,
|
|
41
41
|
recordUsageEvent,
|
|
42
42
|
refineGatewayCatalog
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-RPOGHHN7.js";
|
|
44
44
|
|
|
45
45
|
// src/adapters/openai-compat-adapter.ts
|
|
46
46
|
import OpenAI2 from "openai";
|
|
@@ -1038,4 +1038,4 @@ export {
|
|
|
1038
1038
|
createOpenAICompatAdapter,
|
|
1039
1039
|
buildOpenAICompatAdapters
|
|
1040
1040
|
};
|
|
1041
|
-
//# sourceMappingURL=chunk-
|
|
1041
|
+
//# sourceMappingURL=chunk-5NKP4DVA.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
err,
|
|
9
9
|
getErrorMessage,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RPOGHHN7.js";
|
|
12
12
|
import {
|
|
13
13
|
findRepoRoot,
|
|
14
14
|
getActiveWorkspaceRoot,
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
loadPapersRegistry,
|
|
214
214
|
savePapersRegistry
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-75XDI2LH.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SERVES_PROBE_PROMPT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5MHIYVCE.js";
|
|
4
4
|
import {
|
|
5
5
|
checkGatewayHealth,
|
|
6
6
|
cliFailsVerdict,
|
|
7
7
|
formatGatewaySlotWarnings,
|
|
8
8
|
gatewayVerdict,
|
|
9
9
|
printVoterTransportCheck
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KRY5VIQW.js";
|
|
11
11
|
import {
|
|
12
12
|
NODE_ENGINE_RANGE,
|
|
13
13
|
VERSION,
|
|
14
14
|
isNodeVersionSupported
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SDUKS5RF.js";
|
|
16
16
|
import {
|
|
17
17
|
allOf
|
|
18
18
|
} from "./chunk-EZNIYU5T.js";
|
|
19
19
|
import {
|
|
20
20
|
readOpenAICompatEndpoint,
|
|
21
21
|
readOpenAICompatEnv
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5NKP4DVA.js";
|
|
23
23
|
import {
|
|
24
24
|
claimGlobalRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-E4OCHK7E.js";
|
|
26
26
|
import {
|
|
27
27
|
capitalize
|
|
28
28
|
} from "./chunk-SX5DB6UR.js";
|
|
@@ -32,12 +32,12 @@ import {
|
|
|
32
32
|
IN_FAMILY_FALLBACK_OPTION,
|
|
33
33
|
codexMcpServerAvailable,
|
|
34
34
|
createAllAdapters,
|
|
35
|
-
|
|
35
|
+
isCliAdmitted,
|
|
36
36
|
probeCli
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TDELDKWG.js";
|
|
38
38
|
import {
|
|
39
39
|
resolveGatewayEnv
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-GGP3F7FG.js";
|
|
41
41
|
import {
|
|
42
42
|
getNexusTmpDir
|
|
43
43
|
} from "./chunk-OITVVSWO.js";
|
|
@@ -55,13 +55,14 @@ import {
|
|
|
55
55
|
getErrorMessage,
|
|
56
56
|
getInTreeCapabilitiesMatrix,
|
|
57
57
|
getTimeProvider,
|
|
58
|
+
isCliDisabled,
|
|
58
59
|
isDurableCapacityText,
|
|
59
60
|
ok,
|
|
60
61
|
resolveClassGuardMs,
|
|
61
62
|
resolveGatewayCostDeclaration,
|
|
62
63
|
symbols,
|
|
63
64
|
writeLine
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-RPOGHHN7.js";
|
|
65
66
|
import {
|
|
66
67
|
getLearningDir,
|
|
67
68
|
getOutcomesFile,
|
|
@@ -980,6 +981,7 @@ function createNotFoundResult(name, errorMsg) {
|
|
|
980
981
|
// a determination nobody made; the auth line is not printed for an
|
|
981
982
|
// uninstalled CLI anyway (#4661).
|
|
982
983
|
authState: "unverified",
|
|
984
|
+
routerAdmits: false,
|
|
983
985
|
installed: false,
|
|
984
986
|
version: "N/A",
|
|
985
987
|
versionStatus: "unsupported",
|
|
@@ -1012,6 +1014,7 @@ function createHealthyResult(name, health, authProbe, capacity) {
|
|
|
1012
1014
|
versionStatus: health.versionStatus,
|
|
1013
1015
|
authenticated,
|
|
1014
1016
|
authState,
|
|
1017
|
+
routerAdmits: isCliAdmitted(health, authProbe),
|
|
1015
1018
|
...authenticated && { authMethod: detectAuthMethod(name) },
|
|
1016
1019
|
...capacity !== void 0 && { capacity }
|
|
1017
1020
|
};
|
|
@@ -1368,8 +1371,10 @@ async function doctorCommand(options = {}) {
|
|
|
1368
1371
|
const result = await runDoctor({ gatewayProbe: options.probe === true });
|
|
1369
1372
|
printDoctorResults(result);
|
|
1370
1373
|
if (options.gateway === true || options.probe === true) {
|
|
1371
|
-
const { formatGatewayReport } = await import("./doctor-gateway-report-
|
|
1372
|
-
for (const line of formatGatewayReport(result.gateway))
|
|
1374
|
+
const { formatGatewayReport } = await import("./doctor-gateway-report-WHI5WQ4N.js");
|
|
1375
|
+
for (const line of formatGatewayReport(result.gateway, result.clis)) {
|
|
1376
|
+
process.stdout.write(line + "\n");
|
|
1377
|
+
}
|
|
1373
1378
|
}
|
|
1374
1379
|
if (options.fix === true) {
|
|
1375
1380
|
await runDoctorFix(result);
|
|
@@ -1385,13 +1390,13 @@ async function runDoctorFix(result) {
|
|
|
1385
1390
|
writeLine2("\u2500".repeat(40));
|
|
1386
1391
|
let fixCount = 0;
|
|
1387
1392
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1388
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1393
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-3WHFLPS4.js");
|
|
1389
1394
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1390
1395
|
writeLine2(outcome.line);
|
|
1391
1396
|
if (outcome.counted) fixCount++;
|
|
1392
1397
|
}
|
|
1393
1398
|
if (!result.configFile.found) {
|
|
1394
|
-
const { runConfigInitSync } = await import("./setup-config-
|
|
1399
|
+
const { runConfigInitSync } = await import("./setup-config-BOKVRB67.js");
|
|
1395
1400
|
const configResult = runConfigInitSync(process.cwd(), false, false);
|
|
1396
1401
|
if (configResult.success && configResult.created) {
|
|
1397
1402
|
writeLine2(`\u2713 Generated config: ${configResult.path}`);
|
|
@@ -1487,4 +1492,4 @@ export {
|
|
|
1487
1492
|
startStdioServer,
|
|
1488
1493
|
closeServer
|
|
1489
1494
|
};
|
|
1490
|
-
//# sourceMappingURL=chunk-
|
|
1495
|
+
//# sourceMappingURL=chunk-ACE5NI5A.js.map
|