nexus-agents 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/{child-mcp-config-TXGCJ52M.js → child-mcp-config-SG5D6EHE.js} +2 -2
  2. package/dist/{chunk-5AYHIDVQ.js → chunk-2FKHVC6A.js} +3 -3
  3. package/dist/{chunk-H7C3YEVA.js → chunk-4BHQDCIT.js} +2 -2
  4. package/dist/{chunk-D62GTDJR.js → chunk-4KMXUSDA.js} +3 -3
  5. package/dist/{chunk-OBNQCC5R.js → chunk-5CN5DWZL.js} +35 -35
  6. package/dist/{chunk-OIMKKI76.js → chunk-5ML6GHQX.js} +8 -8
  7. package/dist/{chunk-US3LB5AL.js → chunk-6YPUY4DX.js} +2 -2
  8. package/dist/{chunk-YQAHWAVA.js → chunk-7LDOGIIK.js} +2 -2
  9. package/dist/{chunk-4A47PQKV.js → chunk-7ZCZDRTJ.js} +3 -3
  10. package/dist/{chunk-HYE3V7VA.js → chunk-ACYC2MQ6.js} +3 -3
  11. package/dist/{chunk-46EQSU7N.js → chunk-CUSNJVQP.js} +2 -2
  12. package/dist/{chunk-DG6P3UC5.js → chunk-EAF3SUOQ.js} +7 -7
  13. package/dist/{chunk-JRRUY4BL.js → chunk-FR5WCGPG.js} +2 -2
  14. package/dist/{chunk-W64J4UNG.js → chunk-GCBJOTZL.js} +2 -2
  15. package/dist/{chunk-NBKJ7L2S.js → chunk-HG2SQFVP.js} +2 -2
  16. package/dist/{chunk-TSEVXDKU.js → chunk-J2ZVAPGA.js} +2 -2
  17. package/dist/{chunk-ZLSHDEFS.js → chunk-KE3VSAM2.js} +2 -2
  18. package/dist/{chunk-SFKJXZMV.js → chunk-L47G4NGG.js} +2 -2
  19. package/dist/{chunk-TWWWWWSG.js → chunk-M5BG7NYZ.js} +2 -2
  20. package/dist/{chunk-IGKDZXNU.js → chunk-M6V7RJ4F.js} +8 -8
  21. package/dist/{chunk-2DOULPPA.js → chunk-NMQSNJPT.js} +4 -4
  22. package/dist/{chunk-BQWXGMZP.js → chunk-OAVU4XW2.js} +6 -6
  23. package/dist/{chunk-MN34HTJP.js → chunk-QAX4II24.js} +2 -2
  24. package/dist/{chunk-A2FENIHB.js → chunk-QDYDMKNY.js} +8 -8
  25. package/dist/{chunk-2A664K4J.js → chunk-RGCNKORY.js} +2 -2
  26. package/dist/{chunk-YSBADPHN.js → chunk-SIJBJRHO.js} +3 -3
  27. package/dist/{chunk-4576IZUB.js → chunk-SOZLET5T.js} +4 -4
  28. package/dist/{chunk-GRIOFYSO.js → chunk-SZB4YAPS.js} +4 -4
  29. package/dist/{chunk-LUL3Q5BT.js → chunk-U3PXZWHJ.js} +2 -2
  30. package/dist/{chunk-XOTWDMK3.js → chunk-VCEDQOKA.js} +5 -5
  31. package/dist/{chunk-RSNG6RDI.js → chunk-VNPF3XDJ.js} +2 -2
  32. package/dist/{chunk-7ZYXZWAM.js → chunk-WJZ2BV5H.js} +41 -19
  33. package/dist/chunk-WJZ2BV5H.js.map +1 -0
  34. package/dist/chunk-WPLXWTUK.js +69 -0
  35. package/dist/chunk-WPLXWTUK.js.map +1 -0
  36. package/dist/{chunk-PDAD3S2X.js → chunk-WTZZ6TS4.js} +14 -76
  37. package/dist/chunk-WTZZ6TS4.js.map +1 -0
  38. package/dist/{chunk-IW3G6WVW.js → chunk-XQES4XMS.js} +2 -2
  39. package/dist/{cli-circuit-breaker-462DQCFX.js → cli-circuit-breaker-46QD5K4X.js} +3 -3
  40. package/dist/cli.js +42 -41
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-5PY2BSX6.js → composite-router-6UDWNWSG.js} +2 -2
  43. package/dist/{consensus-vote-4W5A6X7A.js → consensus-vote-BJTJBSAC.js} +16 -16
  44. package/dist/{context-retriever-P4WJDXNR.js → context-retriever-AF32AUWP.js} +8 -8
  45. package/dist/{doctor-deep-B5KM6DDQ.js → doctor-deep-HDG27DON.js} +3 -3
  46. package/dist/{doctor-live-2WD3BRLP.js → doctor-live-J4NKCAIC.js} +22 -11
  47. package/dist/{doctor-live-2WD3BRLP.js.map → doctor-live-J4NKCAIC.js.map} +1 -1
  48. package/dist/{expert-bridge-UP75M6M7.js → expert-bridge-YL4XVDGZ.js} +4 -4
  49. package/dist/{factory-QD4SDWNF.js → factory-HUZJENBV.js} +5 -5
  50. package/dist/{factory-6W6FGGOC.js → factory-QHMJXPI7.js} +9 -9
  51. package/dist/{improvement-review-GU6I62HS.js → improvement-review-6TPXS3VW.js} +5 -5
  52. package/dist/index.js +30 -30
  53. package/dist/{init-opencode-RYCLBR3L.js → init-opencode-GVYBHTUJ.js} +6 -6
  54. package/dist/issue-triage-XHS65H3P.js +17 -0
  55. package/dist/{pr-reviewer-helpers-D6JW3343.js → pr-reviewer-helpers-FAVURSBY.js} +4 -4
  56. package/dist/{registry-command-634EYXX6.js → registry-command-MZF4QA7H.js} +2 -2
  57. package/dist/{repo-security-plan-AMRKVESS.js → repo-security-plan-BROJ243L.js} +3 -3
  58. package/dist/{research-helpers-synthesize-HQVI46LI.js → research-helpers-synthesize-VIUVR626.js} +4 -4
  59. package/dist/{routing-memory-CF6UFICB.js → routing-memory-TKRPQIOL.js} +2 -2
  60. package/dist/{session-memory-ZEM6EBBA.js → session-memory-EFWXUVUY.js} +3 -3
  61. package/dist/{setup-command-FVA3PYJQ.js → setup-command-DOQYI3SG.js} +15 -14
  62. package/dist/{setup-config-K5DG3KPR.js → setup-config-WL5FOPUX.js} +3 -3
  63. package/dist/{setup-custom-api-WCQTHVAW.js → setup-custom-api-OP5BHA7S.js} +4 -4
  64. package/dist/{tool-memory-TZE5ND7A.js → tool-memory-AQMUNZUN.js} +5 -5
  65. package/dist/{unified-registry-KXI3EMFF.js → unified-registry-UQBZMGUH.js} +10 -10
  66. package/dist/{weather-report-OBNLOQQX.js → weather-report-5USEJKDB.js} +2 -2
  67. package/package.json +1 -1
  68. package/dist/chunk-7ZYXZWAM.js.map +0 -1
  69. package/dist/chunk-PDAD3S2X.js.map +0 -1
  70. package/dist/issue-triage-CMR6TQ6V.js +0 -17
  71. /package/dist/{child-mcp-config-TXGCJ52M.js.map → child-mcp-config-SG5D6EHE.js.map} +0 -0
  72. /package/dist/{chunk-5AYHIDVQ.js.map → chunk-2FKHVC6A.js.map} +0 -0
  73. /package/dist/{chunk-H7C3YEVA.js.map → chunk-4BHQDCIT.js.map} +0 -0
  74. /package/dist/{chunk-D62GTDJR.js.map → chunk-4KMXUSDA.js.map} +0 -0
  75. /package/dist/{chunk-OBNQCC5R.js.map → chunk-5CN5DWZL.js.map} +0 -0
  76. /package/dist/{chunk-OIMKKI76.js.map → chunk-5ML6GHQX.js.map} +0 -0
  77. /package/dist/{chunk-US3LB5AL.js.map → chunk-6YPUY4DX.js.map} +0 -0
  78. /package/dist/{chunk-YQAHWAVA.js.map → chunk-7LDOGIIK.js.map} +0 -0
  79. /package/dist/{chunk-4A47PQKV.js.map → chunk-7ZCZDRTJ.js.map} +0 -0
  80. /package/dist/{chunk-HYE3V7VA.js.map → chunk-ACYC2MQ6.js.map} +0 -0
  81. /package/dist/{chunk-46EQSU7N.js.map → chunk-CUSNJVQP.js.map} +0 -0
  82. /package/dist/{chunk-DG6P3UC5.js.map → chunk-EAF3SUOQ.js.map} +0 -0
  83. /package/dist/{chunk-JRRUY4BL.js.map → chunk-FR5WCGPG.js.map} +0 -0
  84. /package/dist/{chunk-W64J4UNG.js.map → chunk-GCBJOTZL.js.map} +0 -0
  85. /package/dist/{chunk-NBKJ7L2S.js.map → chunk-HG2SQFVP.js.map} +0 -0
  86. /package/dist/{chunk-TSEVXDKU.js.map → chunk-J2ZVAPGA.js.map} +0 -0
  87. /package/dist/{chunk-ZLSHDEFS.js.map → chunk-KE3VSAM2.js.map} +0 -0
  88. /package/dist/{chunk-SFKJXZMV.js.map → chunk-L47G4NGG.js.map} +0 -0
  89. /package/dist/{chunk-TWWWWWSG.js.map → chunk-M5BG7NYZ.js.map} +0 -0
  90. /package/dist/{chunk-IGKDZXNU.js.map → chunk-M6V7RJ4F.js.map} +0 -0
  91. /package/dist/{chunk-2DOULPPA.js.map → chunk-NMQSNJPT.js.map} +0 -0
  92. /package/dist/{chunk-BQWXGMZP.js.map → chunk-OAVU4XW2.js.map} +0 -0
  93. /package/dist/{chunk-MN34HTJP.js.map → chunk-QAX4II24.js.map} +0 -0
  94. /package/dist/{chunk-A2FENIHB.js.map → chunk-QDYDMKNY.js.map} +0 -0
  95. /package/dist/{chunk-2A664K4J.js.map → chunk-RGCNKORY.js.map} +0 -0
  96. /package/dist/{chunk-YSBADPHN.js.map → chunk-SIJBJRHO.js.map} +0 -0
  97. /package/dist/{chunk-4576IZUB.js.map → chunk-SOZLET5T.js.map} +0 -0
  98. /package/dist/{chunk-GRIOFYSO.js.map → chunk-SZB4YAPS.js.map} +0 -0
  99. /package/dist/{chunk-LUL3Q5BT.js.map → chunk-U3PXZWHJ.js.map} +0 -0
  100. /package/dist/{chunk-XOTWDMK3.js.map → chunk-VCEDQOKA.js.map} +0 -0
  101. /package/dist/{chunk-RSNG6RDI.js.map → chunk-VNPF3XDJ.js.map} +0 -0
  102. /package/dist/{chunk-IW3G6WVW.js.map → chunk-XQES4XMS.js.map} +0 -0
  103. /package/dist/{cli-circuit-breaker-462DQCFX.js.map → cli-circuit-breaker-46QD5K4X.js.map} +0 -0
  104. /package/dist/{composite-router-5PY2BSX6.js.map → composite-router-6UDWNWSG.js.map} +0 -0
  105. /package/dist/{consensus-vote-4W5A6X7A.js.map → consensus-vote-BJTJBSAC.js.map} +0 -0
  106. /package/dist/{context-retriever-P4WJDXNR.js.map → context-retriever-AF32AUWP.js.map} +0 -0
  107. /package/dist/{doctor-deep-B5KM6DDQ.js.map → doctor-deep-HDG27DON.js.map} +0 -0
  108. /package/dist/{expert-bridge-UP75M6M7.js.map → expert-bridge-YL4XVDGZ.js.map} +0 -0
  109. /package/dist/{factory-6W6FGGOC.js.map → factory-HUZJENBV.js.map} +0 -0
  110. /package/dist/{factory-QD4SDWNF.js.map → factory-QHMJXPI7.js.map} +0 -0
  111. /package/dist/{improvement-review-GU6I62HS.js.map → improvement-review-6TPXS3VW.js.map} +0 -0
  112. /package/dist/{init-opencode-RYCLBR3L.js.map → init-opencode-GVYBHTUJ.js.map} +0 -0
  113. /package/dist/{issue-triage-CMR6TQ6V.js.map → issue-triage-XHS65H3P.js.map} +0 -0
  114. /package/dist/{pr-reviewer-helpers-D6JW3343.js.map → pr-reviewer-helpers-FAVURSBY.js.map} +0 -0
  115. /package/dist/{registry-command-634EYXX6.js.map → registry-command-MZF4QA7H.js.map} +0 -0
  116. /package/dist/{repo-security-plan-AMRKVESS.js.map → repo-security-plan-BROJ243L.js.map} +0 -0
  117. /package/dist/{research-helpers-synthesize-HQVI46LI.js.map → research-helpers-synthesize-VIUVR626.js.map} +0 -0
  118. /package/dist/{routing-memory-CF6UFICB.js.map → routing-memory-TKRPQIOL.js.map} +0 -0
  119. /package/dist/{session-memory-ZEM6EBBA.js.map → session-memory-EFWXUVUY.js.map} +0 -0
  120. /package/dist/{setup-command-FVA3PYJQ.js.map → setup-command-DOQYI3SG.js.map} +0 -0
  121. /package/dist/{setup-config-K5DG3KPR.js.map → setup-config-WL5FOPUX.js.map} +0 -0
  122. /package/dist/{setup-custom-api-WCQTHVAW.js.map → setup-custom-api-OP5BHA7S.js.map} +0 -0
  123. /package/dist/{tool-memory-TZE5ND7A.js.map → tool-memory-AQMUNZUN.js.map} +0 -0
  124. /package/dist/{unified-registry-KXI3EMFF.js.map → unified-registry-UQBZMGUH.js.map} +0 -0
  125. /package/dist/{weather-report-OBNLOQQX.js.map → weather-report-5USEJKDB.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  CompositeRoutingError,
5
5
  DEFAULT_COMPOSITE_CONFIG,
6
6
  createCompositeRouter
7
- } from "./chunk-D62GTDJR.js";
7
+ } from "./chunk-4KMXUSDA.js";
8
8
  import "./chunk-2HUC6NZN.js";
9
9
  import "./chunk-OQLFRJCW.js";
10
10
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  DEFAULT_COMPOSITE_CONFIG,
16
16
  createCompositeRouter
17
17
  };
18
- //# sourceMappingURL=composite-router-5PY2BSX6.js.map
18
+ //# sourceMappingURL=composite-router-6UDWNWSG.js.map
@@ -11,27 +11,27 @@ import {
11
11
  resetCorrelationTracker,
12
12
  runConsensusForGoal,
13
13
  unwrapVoteOrThrow
14
- } from "./chunk-A2FENIHB.js";
15
- import "./chunk-SFKJXZMV.js";
14
+ } from "./chunk-QDYDMKNY.js";
15
+ import "./chunk-L47G4NGG.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
- import "./chunk-4A47PQKV.js";
18
- import "./chunk-46EQSU7N.js";
19
- import "./chunk-2DOULPPA.js";
20
- import "./chunk-GRIOFYSO.js";
17
+ import "./chunk-7ZCZDRTJ.js";
18
+ import "./chunk-CUSNJVQP.js";
19
+ import "./chunk-NMQSNJPT.js";
20
+ import "./chunk-SZB4YAPS.js";
21
21
  import "./chunk-6T3EPABN.js";
22
- import "./chunk-W64J4UNG.js";
22
+ import "./chunk-GCBJOTZL.js";
23
23
  import "./chunk-XIIUIBSX.js";
24
24
  import "./chunk-KSQSWEFH.js";
25
- import "./chunk-OIMKKI76.js";
26
- import "./chunk-MN34HTJP.js";
27
- import "./chunk-JRRUY4BL.js";
28
- import "./chunk-ZLSHDEFS.js";
25
+ import "./chunk-5ML6GHQX.js";
26
+ import "./chunk-QAX4II24.js";
27
+ import "./chunk-FR5WCGPG.js";
28
+ import "./chunk-KE3VSAM2.js";
29
29
  import "./chunk-SNJNRDKZ.js";
30
- import "./chunk-TSEVXDKU.js";
30
+ import "./chunk-J2ZVAPGA.js";
31
31
  import "./chunk-QZUG667L.js";
32
- import "./chunk-LUL3Q5BT.js";
33
- import "./chunk-TWWWWWSG.js";
34
- import "./chunk-D62GTDJR.js";
32
+ import "./chunk-U3PXZWHJ.js";
33
+ import "./chunk-M5BG7NYZ.js";
34
+ import "./chunk-4KMXUSDA.js";
35
35
  import "./chunk-2HUC6NZN.js";
36
36
  import "./chunk-OQLFRJCW.js";
37
37
  import "./chunk-ZPWHCABL.js";
@@ -49,4 +49,4 @@ export {
49
49
  runConsensusForGoal,
50
50
  unwrapVoteOrThrow
51
51
  };
52
- //# sourceMappingURL=consensus-vote-4W5A6X7A.js.map
52
+ //# sourceMappingURL=consensus-vote-BJTJBSAC.js.map
@@ -6,18 +6,18 @@ import {
6
6
  inferTaskCategory,
7
7
  selectRelevantResearch,
8
8
  summarizeContextForPrompt
9
- } from "./chunk-7ZYXZWAM.js";
10
- import "./chunk-NBKJ7L2S.js";
9
+ } from "./chunk-WJZ2BV5H.js";
10
+ import "./chunk-HG2SQFVP.js";
11
11
  import "./chunk-NUBSJGQZ.js";
12
- import "./chunk-RSNG6RDI.js";
13
- import "./chunk-GRIOFYSO.js";
12
+ import "./chunk-VNPF3XDJ.js";
13
+ import "./chunk-SZB4YAPS.js";
14
14
  import "./chunk-6T3EPABN.js";
15
- import "./chunk-W64J4UNG.js";
15
+ import "./chunk-GCBJOTZL.js";
16
16
  import "./chunk-XIIUIBSX.js";
17
17
  import "./chunk-KSQSWEFH.js";
18
18
  import "./chunk-QZUG667L.js";
19
- import "./chunk-LUL3Q5BT.js";
20
- import "./chunk-D62GTDJR.js";
19
+ import "./chunk-U3PXZWHJ.js";
20
+ import "./chunk-4KMXUSDA.js";
21
21
  import "./chunk-2HUC6NZN.js";
22
22
  import "./chunk-OQLFRJCW.js";
23
23
  import "./chunk-ZPWHCABL.js";
@@ -30,4 +30,4 @@ export {
30
30
  selectRelevantResearch,
31
31
  summarizeContextForPrompt
32
32
  };
33
- //# sourceMappingURL=context-retriever-P4WJDXNR.js.map
33
+ //# sourceMappingURL=context-retriever-AF32AUWP.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  formatDeepDiagnostics,
3
3
  runDeepDiagnostics
4
- } from "./chunk-H7C3YEVA.js";
5
- import "./chunk-D62GTDJR.js";
4
+ } from "./chunk-4BHQDCIT.js";
5
+ import "./chunk-4KMXUSDA.js";
6
6
  import "./chunk-2HUC6NZN.js";
7
7
  import "./chunk-OQLFRJCW.js";
8
8
  import "./chunk-ZPWHCABL.js";
@@ -10,4 +10,4 @@ export {
10
10
  formatDeepDiagnostics,
11
11
  runDeepDiagnostics
12
12
  };
13
- //# sourceMappingURL=doctor-deep-B5KM6DDQ.js.map
13
+ //# sourceMappingURL=doctor-deep-HDG27DON.js.map
@@ -1,18 +1,21 @@
1
+ import {
2
+ detectCliBinary
3
+ } from "./chunk-WPLXWTUK.js";
1
4
  import {
2
5
  createAllAdapters,
3
6
  probeAllClis
4
- } from "./chunk-OIMKKI76.js";
5
- import "./chunk-MN34HTJP.js";
6
- import "./chunk-JRRUY4BL.js";
7
- import "./chunk-ZLSHDEFS.js";
7
+ } from "./chunk-5ML6GHQX.js";
8
+ import "./chunk-QAX4II24.js";
9
+ import "./chunk-FR5WCGPG.js";
10
+ import "./chunk-KE3VSAM2.js";
8
11
  import "./chunk-SNJNRDKZ.js";
9
- import "./chunk-TSEVXDKU.js";
12
+ import "./chunk-J2ZVAPGA.js";
10
13
  import "./chunk-QZUG667L.js";
11
- import "./chunk-LUL3Q5BT.js";
12
- import "./chunk-TWWWWWSG.js";
14
+ import "./chunk-U3PXZWHJ.js";
15
+ import "./chunk-M5BG7NYZ.js";
13
16
  import {
14
17
  resolveClassGuardMs
15
- } from "./chunk-D62GTDJR.js";
18
+ } from "./chunk-4KMXUSDA.js";
16
19
  import "./chunk-2HUC6NZN.js";
17
20
  import "./chunk-OQLFRJCW.js";
18
21
  import "./chunk-ZPWHCABL.js";
@@ -104,13 +107,21 @@ var NOT_REACHED = "earlier level did not pass, so this was not attempted";
104
107
  async function runLiveReadiness(deps = {}) {
105
108
  const adapters = deps.adapters ?? createAllAdapters();
106
109
  const authStates = deps.authStates ?? await readAuthStates();
110
+ const isInstalled = deps.isInstalled ?? ((cli) => detectCliBinary(cli).installed);
107
111
  const results = [];
108
112
  for (const [cli, adapter] of adapters) {
109
- results.push(await ladderFor(cli, adapter, authStates.get(cli)));
113
+ results.push(await ladderFor(cli, adapter, authStates.get(cli), isInstalled(cli)));
110
114
  }
111
115
  return results;
112
116
  }
113
- async function ladderFor(cli, adapter, auth) {
117
+ async function ladderFor(cli, adapter, auth, binaryPresent) {
118
+ if (!binaryPresent) {
119
+ return buildReadiness(cli, {
120
+ installed: { status: "failed", reason: "binary not found on PATH" },
121
+ authenticated: { status: "not-attempted", reason: NOT_REACHED },
122
+ serves: { status: "not-attempted", reason: NOT_REACHED }
123
+ });
124
+ }
114
125
  const installed = { status: "verified" };
115
126
  const authenticated = auth === "not-ok" ? { status: "failed", reason: "no usable credentials found" } : { status: "verified" };
116
127
  if (authenticated.status !== "verified") {
@@ -146,4 +157,4 @@ export {
146
157
  formatLiveReadiness,
147
158
  runLiveReadiness
148
159
  };
149
- //# sourceMappingURL=doctor-live-2WD3BRLP.js.map
160
+ //# sourceMappingURL=doctor-live-J4NKCAIC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli/cli-readiness.ts","../src/cli/doctor-live.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\nexport interface CliReadiness {\n readonly cli: CliName;\n readonly levels: Readonly<Record<ReadinessLevel, LevelOutcome>>;\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 * 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 const summary =\n readiness.reached === undefined ? 'not ready' : `ready through \"${readiness.reached}\"`;\n\n return [` ${readiness.cli}: ${summary}`, ...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","/**\n * The `serves` readiness level for `nexus-agents doctor --live` (#4376).\n *\n * Runs a real completion against every configured adapter and reports whether\n * content actually came back. This is the only level that can catch #4351 —\n * every voter returning `stop_sequence` with zero tokens while `healthCheck()`\n * and the auth probe both reported healthy — and the only one that spends the\n * resource it measures, which is why it is opt-in.\n *\n * @module cli/doctor-live\n * (Source: Issue #4376)\n */\n\nimport { createAllAdapters } from '../cli-adapters/factory.js';\nimport type { CliName } from '../cli-adapters/types.js';\nimport { probeAllClis } from './cli-auth-probe.js';\nimport {\n buildReadiness,\n formatReadiness,\n probeServes,\n type CliReadiness,\n type LevelOutcome,\n type ServesProbeTarget,\n} from './cli-readiness.js';\n\n/** Reason recorded when a level is skipped because an earlier one failed. */\nconst NOT_REACHED = 'earlier level did not pass, so this was not attempted';\n\n/**\n * Run the full ladder for every adapter.\n *\n * The ladder short-circuits: a CLI that is not installed is not probed for\n * auth, and one that is not authenticated is not billed for a completion. The\n * skipped levels report `not-attempted`, never `failed` — nothing was learned\n * about them, and saying otherwise would invent a measurement.\n */\nexport async function runLiveReadiness(\n deps: {\n readonly adapters?: Map<CliName, ServesProbeTarget>;\n readonly authStates?: ReadonlyMap<CliName, 'authenticated' | 'unknown' | 'not-ok'>;\n } = {}\n): Promise<readonly CliReadiness[]> {\n const adapters =\n deps.adapters ?? (createAllAdapters() as unknown as Map<CliName, ServesProbeTarget>);\n const authStates = deps.authStates ?? (await readAuthStates());\n\n const results: CliReadiness[] = [];\n for (const [cli, adapter] of adapters) {\n results.push(await ladderFor(cli, adapter, authStates.get(cli)));\n }\n return results;\n}\n\nasync function ladderFor(\n cli: CliName,\n adapter: ServesProbeTarget,\n auth: 'authenticated' | 'unknown' | 'not-ok' | undefined\n): Promise<CliReadiness> {\n const installed: LevelOutcome = { status: 'verified' };\n\n // `unknown` (#4391: a CLI exposing no readable auth signal) is admitted\n // optimistically at this level, exactly as the auth probe requires — but it\n // is the live probe below that then actually settles the question.\n const authenticated: LevelOutcome =\n auth === 'not-ok'\n ? { status: 'failed', reason: 'no usable credentials found' }\n : { status: 'verified' };\n\n if (authenticated.status !== 'verified') {\n return buildReadiness(cli, {\n installed,\n authenticated,\n serves: { status: 'not-attempted', reason: NOT_REACHED },\n });\n }\n\n return buildReadiness(cli, { installed, authenticated, serves: await probeServes(adapter) });\n}\n\n/** Collapse the auth probe's states into what the ladder needs. */\nasync function readAuthStates(): Promise<\n ReadonlyMap<CliName, 'authenticated' | 'unknown' | 'not-ok'>\n> {\n const probes = await probeAllClis();\n const states = new Map<CliName, 'authenticated' | 'unknown' | 'not-ok'>();\n for (const probe of probes) {\n if (probe.state === 'authenticated') states.set(probe.cli, 'authenticated');\n else if (probe.state === 'unknown') states.set(probe.cli, 'unknown');\n else states.set(probe.cli, 'not-ok');\n }\n return states;\n}\n\n/** Render the live report, with a heading that says what was and was not proven. */\nexport function formatLiveReadiness(report: readonly CliReadiness[]): string {\n if (report.length === 0) {\n return '\\nLive readiness: no adapters configured — nothing was probed.';\n }\n return [\n '',\n 'Live readiness (--live: a real completion per adapter)',\n ...report.map(formatReadiness),\n ].join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4CO,IAAM,mBAAmB,CAAC,aAAa,iBAAiB,QAAQ;AAqChE,SAAS,gBACd,QAC4B;AAC5B,MAAI;AACJ,aAAW,SAAS,kBAAkB;AACpC,QAAI,OAAO,KAAK,EAAE,WAAW,WAAY;AACzC,cAAU;AAAA,EACZ;AACA,SAAO;AACT;AAGO,SAAS,eACd,KACA,QACc;AACd,QAAM,UAAU,gBAAgB,MAAM;AACtC,SAAO,EAAE,KAAK,QAAQ,GAAI,YA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AAA,IACzD,CAAC;AAAA,EACH;AAEA,SAAO,eAAe,KAAK,EAAE,WAAW,eAAe,QAAQ,MAAM,YAAY,OAAO,EAAE,CAAC;AAC7F;AAGA,eAAe,iBAEb;AACA,QAAM,SAAS,MAAM,aAAa;AAClC,QAAM,SAAS,oBAAI,IAAqD;AACxE,aAAW,SAAS,QAAQ;AAC1B,QAAI,MAAM,UAAU,gBAAiB,QAAO,IAAI,MAAM,KAAK,eAAe;AAAA,aACjE,MAAM,UAAU,UAAW,QAAO,IAAI,MAAM,KAAK,SAAS;AAAA,QAC9D,QAAO,IAAI,MAAM,KAAK,QAAQ;AAAA,EACrC;AACA,SAAO;AACT;AAGO,SAAS,oBAAoB,QAAyC;AAC3E,MAAI,OAAO,WAAW,GAAG;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,GAAG,OAAO,IAAI,eAAe;AAAA,EAC/B,EAAE,KAAK,IAAI;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/cli/cli-readiness.ts","../src/cli/doctor-live.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\nexport interface CliReadiness {\n readonly cli: CliName;\n readonly levels: Readonly<Record<ReadinessLevel, LevelOutcome>>;\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 * 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 const summary =\n readiness.reached === undefined ? 'not ready' : `ready through \"${readiness.reached}\"`;\n\n return [` ${readiness.cli}: ${summary}`, ...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","/**\n * The `serves` readiness level for `nexus-agents doctor --live` (#4376).\n *\n * Runs a real completion against every configured adapter and reports whether\n * content actually came back. This is the only level that can catch #4351 —\n * every voter returning `stop_sequence` with zero tokens while `healthCheck()`\n * and the auth probe both reported healthy — and the only one that spends the\n * resource it measures, which is why it is opt-in.\n *\n * @module cli/doctor-live\n * (Source: Issue #4376)\n */\n\nimport { createAllAdapters } from '../cli-adapters/factory.js';\nimport type { CliName } from '../cli-adapters/types.js';\nimport { probeAllClis } from './cli-auth-probe.js';\nimport { detectCliBinary } from './setup-cli-detection.js';\nimport {\n buildReadiness,\n formatReadiness,\n probeServes,\n type CliReadiness,\n type LevelOutcome,\n type ServesProbeTarget,\n} from './cli-readiness.js';\n\n/** Reason recorded when a level is skipped because an earlier one failed. */\nconst NOT_REACHED = 'earlier level did not pass, so this was not attempted';\n\n/**\n * Run the full ladder for every adapter.\n *\n * The ladder short-circuits: a CLI that is not installed is not probed for\n * auth, and one that is not authenticated is not billed for a completion. The\n * skipped levels report `not-attempted`, never `failed` — nothing was learned\n * about them, and saying otherwise would invent a measurement.\n */\nexport async function runLiveReadiness(\n deps: {\n readonly adapters?: Map<CliName, ServesProbeTarget>;\n readonly authStates?: ReadonlyMap<CliName, 'authenticated' | 'unknown' | 'not-ok'>;\n /**\n * Whether a CLI's binary is on PATH. Defaults to a real `which` +\n * `--version` probe (#4840); overridable so the ladder can be exercised\n * without the host's actual toolchain.\n */\n readonly isInstalled?: (cli: CliName) => boolean;\n } = {}\n): Promise<readonly CliReadiness[]> {\n const adapters =\n deps.adapters ?? (createAllAdapters() as unknown as Map<CliName, ServesProbeTarget>);\n const authStates = deps.authStates ?? (await readAuthStates());\n const isInstalled = deps.isInstalled ?? ((cli: CliName) => detectCliBinary(cli).installed);\n\n const results: CliReadiness[] = [];\n for (const [cli, adapter] of adapters) {\n results.push(await ladderFor(cli, adapter, authStates.get(cli), isInstalled(cli)));\n }\n return results;\n}\n\nasync function ladderFor(\n cli: CliName,\n adapter: ServesProbeTarget,\n auth: 'authenticated' | 'unknown' | 'not-ok' | undefined,\n binaryPresent: boolean\n): Promise<CliReadiness> {\n // Was the literal `{ status: 'verified' }` — the first rung of a readiness\n // ladder asserting itself (#4840). It also made the auth rung report \"no\n // usable credentials found\" for a CLI that simply is not installed.\n if (!binaryPresent) {\n return buildReadiness(cli, {\n installed: { status: 'failed', reason: 'binary not found on PATH' },\n authenticated: { status: 'not-attempted', reason: NOT_REACHED },\n serves: { status: 'not-attempted', reason: NOT_REACHED },\n });\n }\n const installed: LevelOutcome = { status: 'verified' };\n\n // `unknown` (#4391: a CLI exposing no readable auth signal) is admitted\n // optimistically at this level, exactly as the auth probe requires — but it\n // is the live probe below that then actually settles the question.\n const authenticated: LevelOutcome =\n auth === 'not-ok'\n ? { status: 'failed', reason: 'no usable credentials found' }\n : { status: 'verified' };\n\n if (authenticated.status !== 'verified') {\n return buildReadiness(cli, {\n installed,\n authenticated,\n serves: { status: 'not-attempted', reason: NOT_REACHED },\n });\n }\n\n return buildReadiness(cli, { installed, authenticated, serves: await probeServes(adapter) });\n}\n\n/** Collapse the auth probe's states into what the ladder needs. */\nasync function readAuthStates(): Promise<\n ReadonlyMap<CliName, 'authenticated' | 'unknown' | 'not-ok'>\n> {\n const probes = await probeAllClis();\n const states = new Map<CliName, 'authenticated' | 'unknown' | 'not-ok'>();\n for (const probe of probes) {\n if (probe.state === 'authenticated') states.set(probe.cli, 'authenticated');\n else if (probe.state === 'unknown') states.set(probe.cli, 'unknown');\n else states.set(probe.cli, 'not-ok');\n }\n return states;\n}\n\n/** Render the live report, with a heading that says what was and was not proven. */\nexport function formatLiveReadiness(report: readonly CliReadiness[]): string {\n if (report.length === 0) {\n return '\\nLive readiness: no adapters configured — nothing was probed.';\n }\n return [\n '',\n 'Live readiness (--live: a real completion per adapter)',\n ...report.map(formatReadiness),\n ].join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4CO,IAAM,mBAAmB,CAAC,aAAa,iBAAiB,QAAQ;AAqChE,SAAS,gBACd,QAC4B;AAC5B,MAAI;AACJ,aAAW,SAAS,kBAAkB;AACpC,QAAI,OAAO,KAAK,EAAE,WAAW,WAAY;AACzC,cAAU;AAAA,EACZ;AACA,SAAO;AACT;AAGO,SAAS,eACd,KACA,QACc;AACd,QAAM,UAAU,gBAAgB,MAAM;AACtC,SAAO,EAAE,KAAK,QAAQ,GAAI,YAAY,SAAY,EAAE,QAAQ,IAAI,CAAC,EAAG;AACtE;AASO,SAAS,gBAAgB,WAAiC;AAI/D,QAAM,OAAO,CAAC,MAA4B;AACxC,YAAQ,EAAE,QAAQ;AAAA,MAChB,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,SAAS;AACP,cAAM,aAAoB;AAC1B,cAAM,IAAI,MAAM,4BAA4B,KAAK,UAAU,UAAU,CAAC,EAAE;AAAA,MAC1E;AAAA,IACF;AAAA,EACF;AAEA,QAAM,QAAQ,iBAAiB,IAAI,CAAC,UAAU;AAC5C,UAAM,UAAU,UAAU,OAAO,KAAK;AACtC,UAAM,SAAS,QAAQ,WAAW,aAAa,KAAK,WAAM,QAAQ,MAAM;AACxE,WAAO,SAAS,KAAK,OAAO,CAAC,IAAI,KAAK,GAAG,MAAM;AAAA,EACjD,CAAC;AAED,QAAM,UACJ,UAAU,YAAY,SAAY,cAAc,kBAAkB,UAAU,OAAO;AAErF,SAAO,CAAC,KAAK,UAAU,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,EAAE,KAAK,IAAI;AAC/D;AAgBO,IAAM,sBAAsB;AAoBnC,eAAsB,YACpB,SACA,YAAoB,oBAAoB,a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WAAW,GAAG;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,GAAG,OAAO,IAAI,eAAe;AAAA,EAC/B,EAAE,KAAK,IAAI;AACb;","names":[]}
@@ -3,9 +3,9 @@ import {
3
3
  shutdownExpertBridge,
4
4
  tokenSplitFromUsage,
5
5
  totalTokensFromUsage
6
- } from "./chunk-DG6P3UC5.js";
7
- import "./chunk-TSEVXDKU.js";
8
- import "./chunk-D62GTDJR.js";
6
+ } from "./chunk-EAF3SUOQ.js";
7
+ import "./chunk-J2ZVAPGA.js";
8
+ import "./chunk-4KMXUSDA.js";
9
9
  import "./chunk-2HUC6NZN.js";
10
10
  import "./chunk-OQLFRJCW.js";
11
11
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  tokenSplitFromUsage,
16
16
  totalTokensFromUsage
17
17
  };
18
- //# sourceMappingURL=expert-bridge-UP75M6M7.js.map
18
+ //# sourceMappingURL=expert-bridge-YL4XVDGZ.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createGitHubProvider,
3
3
  createScmProvider
4
- } from "./chunk-4576IZUB.js";
5
- import "./chunk-YQAHWAVA.js";
6
- import "./chunk-RSNG6RDI.js";
7
- import "./chunk-D62GTDJR.js";
4
+ } from "./chunk-SOZLET5T.js";
5
+ import "./chunk-7LDOGIIK.js";
6
+ import "./chunk-VNPF3XDJ.js";
7
+ import "./chunk-4KMXUSDA.js";
8
8
  import "./chunk-2HUC6NZN.js";
9
9
  import "./chunk-OQLFRJCW.js";
10
10
  import "./chunk-ZPWHCABL.js";
@@ -12,4 +12,4 @@ export {
12
12
  createGitHubProvider,
13
13
  createScmProvider
14
14
  };
15
- //# sourceMappingURL=factory-QD4SDWNF.js.map
15
+ //# sourceMappingURL=factory-HUZJENBV.js.map
@@ -3,16 +3,16 @@ import {
3
3
  createCliAdapter,
4
4
  getAvailableClis,
5
5
  isCliAvailable
6
- } from "./chunk-OIMKKI76.js";
7
- import "./chunk-MN34HTJP.js";
8
- import "./chunk-JRRUY4BL.js";
9
- import "./chunk-ZLSHDEFS.js";
6
+ } from "./chunk-5ML6GHQX.js";
7
+ import "./chunk-QAX4II24.js";
8
+ import "./chunk-FR5WCGPG.js";
9
+ import "./chunk-KE3VSAM2.js";
10
10
  import "./chunk-SNJNRDKZ.js";
11
- import "./chunk-TSEVXDKU.js";
11
+ import "./chunk-J2ZVAPGA.js";
12
12
  import "./chunk-QZUG667L.js";
13
- import "./chunk-LUL3Q5BT.js";
14
- import "./chunk-TWWWWWSG.js";
15
- import "./chunk-D62GTDJR.js";
13
+ import "./chunk-U3PXZWHJ.js";
14
+ import "./chunk-M5BG7NYZ.js";
15
+ import "./chunk-4KMXUSDA.js";
16
16
  import "./chunk-2HUC6NZN.js";
17
17
  import "./chunk-OQLFRJCW.js";
18
18
  import "./chunk-ZPWHCABL.js";
@@ -22,4 +22,4 @@ export {
22
22
  getAvailableClis,
23
23
  isCliAvailable
24
24
  };
25
- //# sourceMappingURL=factory-6W6FGGOC.js.map
25
+ //# sourceMappingURL=factory-QHMJXPI7.js.map
@@ -11,10 +11,10 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-YSBADPHN.js";
15
- import "./chunk-4A47PQKV.js";
16
- import "./chunk-46EQSU7N.js";
17
- import "./chunk-D62GTDJR.js";
14
+ } from "./chunk-SIJBJRHO.js";
15
+ import "./chunk-7ZCZDRTJ.js";
16
+ import "./chunk-CUSNJVQP.js";
17
+ import "./chunk-4KMXUSDA.js";
18
18
  import "./chunk-2HUC6NZN.js";
19
19
  import "./chunk-OQLFRJCW.js";
20
20
  import "./chunk-ZPWHCABL.js";
@@ -32,4 +32,4 @@ export {
32
32
  registerImprovementReviewTool,
33
33
  runImprovementReview
34
34
  };
35
- //# sourceMappingURL=improvement-review-GU6I62HS.js.map
35
+ //# sourceMappingURL=improvement-review-6TPXS3VW.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createGitHubProvider,
3
3
  createScmProvider
4
- } from "./chunk-4576IZUB.js";
4
+ } from "./chunk-SOZLET5T.js";
5
5
  import {
6
6
  ALLOWED_COMMANDS,
7
7
  ARTIFACT_TYPES,
@@ -541,7 +541,7 @@ import {
541
541
  withLogging,
542
542
  withRetry,
543
543
  withRetryWrapper
544
- } from "./chunk-OBNQCC5R.js";
544
+ } from "./chunk-5CN5DWZL.js";
545
545
  import {
546
546
  FALLBACK_SCANNER_DATA,
547
547
  buildPlanFromAnalysis,
@@ -549,7 +549,7 @@ import {
549
549
  generateSecurityPlan,
550
550
  getRegistryManifest,
551
551
  resolveScannerData
552
- } from "./chunk-2A664K4J.js";
552
+ } from "./chunk-RGCNKORY.js";
553
553
  import {
554
554
  analyzeGitHubRepo,
555
555
  analyzeRepo,
@@ -575,16 +575,16 @@ import {
575
575
  getKnownNexusVarNames,
576
576
  startStdioServer,
577
577
  validateNexusEnv
578
- } from "./chunk-IGKDZXNU.js";
578
+ } from "./chunk-M6V7RJ4F.js";
579
579
  import {
580
580
  OPENAI_MODELS,
581
581
  OPENAI_MODEL_ALIASES,
582
582
  OpenAIAdapter,
583
583
  createOpenAIAdapter
584
- } from "./chunk-XOTWDMK3.js";
584
+ } from "./chunk-VCEDQOKA.js";
585
585
  import {
586
586
  executeExpert
587
- } from "./chunk-DG6P3UC5.js";
587
+ } from "./chunk-EAF3SUOQ.js";
588
588
  import {
589
589
  AgentFindingSchema,
590
590
  ConsensusEngine,
@@ -633,12 +633,12 @@ import {
633
633
  generateProposalId,
634
634
  parseAgentPairKey,
635
635
  registerConsensusVoteTool
636
- } from "./chunk-A2FENIHB.js";
637
- import "./chunk-SFKJXZMV.js";
636
+ } from "./chunk-QDYDMKNY.js";
637
+ import "./chunk-L47G4NGG.js";
638
638
  import {
639
639
  allOf
640
640
  } from "./chunk-OQB3XC5O.js";
641
- import "./chunk-HYE3V7VA.js";
641
+ import "./chunk-ACYC2MQ6.js";
642
642
  import {
643
643
  AgentActionSchema,
644
644
  GitHubReviewer,
@@ -661,11 +661,11 @@ import {
661
661
  requiresHumanApproval,
662
662
  validateAgentAction,
663
663
  validateCorroboration
664
- } from "./chunk-BQWXGMZP.js";
664
+ } from "./chunk-OAVU4XW2.js";
665
665
  import {
666
666
  GitHubProvider,
667
667
  ScmError
668
- } from "./chunk-YQAHWAVA.js";
668
+ } from "./chunk-7LDOGIIK.js";
669
669
  import {
670
670
  GitHubUserRoleSchema,
671
671
  InjectionFlagSchema,
@@ -680,11 +680,11 @@ import {
680
680
  assessReputation,
681
681
  reconcileTrustTier,
682
682
  sanitizeInput
683
- } from "./chunk-US3LB5AL.js";
683
+ } from "./chunk-6YPUY4DX.js";
684
684
  import {
685
685
  ImprovementReviewInputSchema,
686
686
  registerImprovementReviewTool
687
- } from "./chunk-YSBADPHN.js";
687
+ } from "./chunk-SIJBJRHO.js";
688
688
  import {
689
689
  AgentPerformanceSchema,
690
690
  ConsensusAlgorithmSchema,
@@ -720,7 +720,7 @@ import {
720
720
  toolSuccess,
721
721
  toolSuccessStructured,
722
722
  validateToolInput
723
- } from "./chunk-4A47PQKV.js";
723
+ } from "./chunk-7ZCZDRTJ.js";
724
724
  import {
725
725
  AuditTrail,
726
726
  MAX_STRIPPED_ELEMENTS_PER_EVENT,
@@ -732,13 +732,13 @@ import {
732
732
  emitReputationEvent,
733
733
  emitSanitizationEvent,
734
734
  emitTrustEvent
735
- } from "./chunk-46EQSU7N.js";
735
+ } from "./chunk-CUSNJVQP.js";
736
736
  import {
737
737
  UnifiedAdapterRegistry,
738
738
  createUnifiedRegistry,
739
739
  getGlobalRegistry,
740
740
  resetGlobalRegistry
741
- } from "./chunk-2DOULPPA.js";
741
+ } from "./chunk-NMQSNJPT.js";
742
742
  import {
743
743
  PersistentStrategyDistiller,
744
744
  RulesSnapshotSchema,
@@ -746,19 +746,19 @@ import {
746
746
  TokenCounter,
747
747
  TokenCounterProvider,
748
748
  createTokenCounter
749
- } from "./chunk-7ZYXZWAM.js";
750
- import "./chunk-NBKJ7L2S.js";
749
+ } from "./chunk-WJZ2BV5H.js";
750
+ import "./chunk-HG2SQFVP.js";
751
751
  import "./chunk-NUBSJGQZ.js";
752
752
  import {
753
753
  getTokenEnvVars,
754
754
  hasToken,
755
755
  resolveToken
756
- } from "./chunk-RSNG6RDI.js";
756
+ } from "./chunk-VNPF3XDJ.js";
757
757
  import {
758
758
  MemoryError
759
- } from "./chunk-GRIOFYSO.js";
759
+ } from "./chunk-SZB4YAPS.js";
760
760
  import "./chunk-6T3EPABN.js";
761
- import "./chunk-W64J4UNG.js";
761
+ import "./chunk-GCBJOTZL.js";
762
762
  import {
763
763
  BUILT_IN_EXPERTS,
764
764
  BuiltInExpertTypeSchema,
@@ -803,7 +803,7 @@ import {
803
803
  isCliAvailable,
804
804
  isRetryableError,
805
805
  sleep
806
- } from "./chunk-OIMKKI76.js";
806
+ } from "./chunk-5ML6GHQX.js";
807
807
  import {
808
808
  AdapterModelError,
809
809
  BaseAdapter,
@@ -825,11 +825,11 @@ import {
825
825
  tapStream,
826
826
  transformStream,
827
827
  withTimeout
828
- } from "./chunk-MN34HTJP.js";
829
- import "./chunk-JRRUY4BL.js";
828
+ } from "./chunk-QAX4II24.js";
829
+ import "./chunk-FR5WCGPG.js";
830
830
  import {
831
831
  PROVIDER_ENV_KEYS
832
- } from "./chunk-ZLSHDEFS.js";
832
+ } from "./chunk-KE3VSAM2.js";
833
833
  import "./chunk-SNJNRDKZ.js";
834
834
  import {
835
835
  AvailabilityCache,
@@ -839,13 +839,13 @@ import {
839
839
  getFallbackChain,
840
840
  resetAvailabilityCache,
841
841
  resolveFallback
842
- } from "./chunk-TSEVXDKU.js";
842
+ } from "./chunk-J2ZVAPGA.js";
843
843
  import "./chunk-QZUG667L.js";
844
- import "./chunk-LUL3Q5BT.js";
844
+ import "./chunk-U3PXZWHJ.js";
845
845
  import {
846
846
  CliCircuitBreakerIntegration,
847
847
  createCliCircuitBreakerIntegration
848
- } from "./chunk-TWWWWWSG.js";
848
+ } from "./chunk-M5BG7NYZ.js";
849
849
  import {
850
850
  AgentCapability,
851
851
  AgentError,
@@ -919,7 +919,7 @@ import {
919
919
  toError,
920
920
  unwrap,
921
921
  unwrapOr
922
- } from "./chunk-D62GTDJR.js";
922
+ } from "./chunk-4KMXUSDA.js";
923
923
  import "./chunk-2HUC6NZN.js";
924
924
  import "./chunk-OQLFRJCW.js";
925
925
  import "./chunk-ZPWHCABL.js";
@@ -4728,7 +4728,7 @@ function buildVotingInput(plan, config) {
4728
4728
  }
4729
4729
  async function executeSingleVote(plan, config, log) {
4730
4730
  try {
4731
- const { executeVoting } = await import("./consensus-vote-4W5A6X7A.js");
4731
+ const { executeVoting } = await import("./consensus-vote-BJTJBSAC.js");
4732
4732
  const input = buildVotingInput(plan, config);
4733
4733
  const result = await executeVoting(input, log);
4734
4734
  return parseVotingResult(result);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  discoverModels,
3
3
  readOpencodeGateway
4
- } from "./chunk-XOTWDMK3.js";
5
- import "./chunk-SFKJXZMV.js";
6
- import "./chunk-MN34HTJP.js";
7
- import "./chunk-ZLSHDEFS.js";
4
+ } from "./chunk-VCEDQOKA.js";
5
+ import "./chunk-L47G4NGG.js";
6
+ import "./chunk-QAX4II24.js";
7
+ import "./chunk-KE3VSAM2.js";
8
8
  import {
9
9
  createLogger
10
- } from "./chunk-D62GTDJR.js";
10
+ } from "./chunk-4KMXUSDA.js";
11
11
  import "./chunk-2HUC6NZN.js";
12
12
  import "./chunk-OQLFRJCW.js";
13
13
  import "./chunk-ZPWHCABL.js";
@@ -176,4 +176,4 @@ export {
176
176
  runInitOpencode,
177
177
  runOpencodeValidate
178
178
  };
179
- //# sourceMappingURL=init-opencode-RYCLBR3L.js.map
179
+ //# sourceMappingURL=init-opencode-GVYBHTUJ.js.map
@@ -0,0 +1,17 @@
1
+ import {
2
+ IssueTriage,
3
+ createIssueTriage
4
+ } from "./chunk-OAVU4XW2.js";
5
+ import "./chunk-7LDOGIIK.js";
6
+ import "./chunk-6YPUY4DX.js";
7
+ import "./chunk-CUSNJVQP.js";
8
+ import "./chunk-VNPF3XDJ.js";
9
+ import "./chunk-4KMXUSDA.js";
10
+ import "./chunk-2HUC6NZN.js";
11
+ import "./chunk-OQLFRJCW.js";
12
+ import "./chunk-ZPWHCABL.js";
13
+ export {
14
+ IssueTriage,
15
+ createIssueTriage
16
+ };
17
+ //# sourceMappingURL=issue-triage-XHS65H3P.js.map
@@ -17,11 +17,11 @@ import {
17
17
  parseFindings,
18
18
  parseSeverity,
19
19
  sumFindings
20
- } from "./chunk-5AYHIDVQ.js";
20
+ } from "./chunk-2FKHVC6A.js";
21
21
  import "./chunk-CQ77TF4Y.js";
22
22
  import "./chunk-OQB3XC5O.js";
23
- import "./chunk-US3LB5AL.js";
24
- import "./chunk-D62GTDJR.js";
23
+ import "./chunk-6YPUY4DX.js";
24
+ import "./chunk-4KMXUSDA.js";
25
25
  import "./chunk-2HUC6NZN.js";
26
26
  import "./chunk-OQLFRJCW.js";
27
27
  import "./chunk-ZPWHCABL.js";
@@ -45,4 +45,4 @@ export {
45
45
  parseSeverity,
46
46
  sumFindings
47
47
  };
48
- //# sourceMappingURL=pr-reviewer-helpers-D6JW3343.js.map
48
+ //# sourceMappingURL=pr-reviewer-helpers-FAVURSBY.js.map
@@ -7,7 +7,7 @@ import {
7
7
  loadGeneratedRegistryEntries,
8
8
  loadUserManifestOverlay,
9
9
  reloadDefaultRegistry
10
- } from "./chunk-D62GTDJR.js";
10
+ } from "./chunk-4KMXUSDA.js";
11
11
  import "./chunk-2HUC6NZN.js";
12
12
  import {
13
13
  nexusDataPath
@@ -249,4 +249,4 @@ export {
249
249
  isValidRegistrySubcommand,
250
250
  registryCommand
251
251
  };
252
- //# sourceMappingURL=registry-command-634EYXX6.js.map
252
+ //# sourceMappingURL=registry-command-MZF4QA7H.js.map
@@ -3,9 +3,9 @@ import {
3
3
  buildPlanFromAnalysis,
4
4
  generateSecurityPlan,
5
5
  resolveScannerData
6
- } from "./chunk-2A664K4J.js";
6
+ } from "./chunk-RGCNKORY.js";
7
7
  import "./chunk-HFOQKCD2.js";
8
- import "./chunk-D62GTDJR.js";
8
+ import "./chunk-4KMXUSDA.js";
9
9
  import "./chunk-2HUC6NZN.js";
10
10
  import "./chunk-OQLFRJCW.js";
11
11
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  generateSecurityPlan,
16
16
  resolveScannerData
17
17
  };
18
- //# sourceMappingURL=repo-security-plan-AMRKVESS.js.map
18
+ //# sourceMappingURL=repo-security-plan-BROJ243L.js.map