nexus-agents 2.102.7 → 2.103.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 (118) hide show
  1. package/dist/{child-mcp-config-NBELOYYZ.js → child-mcp-config-IPPKT47T.js} +2 -2
  2. package/dist/{chunk-FRAMV5DJ.js → chunk-3TOHOAB2.js} +360 -212
  3. package/dist/chunk-3TOHOAB2.js.map +1 -0
  4. package/dist/{chunk-SBYFWB6J.js → chunk-3VSLKTD6.js} +4 -4
  5. package/dist/{chunk-QYE6GEPY.js → chunk-4FIY62UC.js} +3 -3
  6. package/dist/{chunk-FLUC27DF.js → chunk-6XWIR6JJ.js} +2 -2
  7. package/dist/{chunk-VJR46M7L.js → chunk-ANHBUWOI.js} +3 -3
  8. package/dist/{chunk-FVWKAEYH.js → chunk-AO2SCUPO.js} +2 -2
  9. package/dist/{chunk-FZCB2P3F.js → chunk-BUZ62ZOK.js} +2 -2
  10. package/dist/{chunk-4RW6OONY.js → chunk-CNQZ6BJE.js} +2 -2
  11. package/dist/{chunk-PWDIIS7L.js → chunk-F6X6UH6D.js} +7 -7
  12. package/dist/{chunk-SXWJ7IUF.js → chunk-FESEHMBN.js} +21 -2
  13. package/dist/{chunk-SXWJ7IUF.js.map → chunk-FESEHMBN.js.map} +1 -1
  14. package/dist/{chunk-6CIEBFDV.js → chunk-FPY53SSC.js} +7 -7
  15. package/dist/{chunk-LXBWH5XP.js → chunk-FSXN5GGJ.js} +3 -3
  16. package/dist/{chunk-E47LOV6Y.js → chunk-H6QEJT56.js} +2 -2
  17. package/dist/{chunk-4L7FH53H.js → chunk-IEFH53RH.js} +2 -2
  18. package/dist/{chunk-3GF52QPA.js → chunk-K4H5LCSU.js} +77 -30
  19. package/dist/chunk-K4H5LCSU.js.map +1 -0
  20. package/dist/{chunk-LVGYWJDX.js → chunk-M6QD4H7S.js} +2 -2
  21. package/dist/{chunk-GDY23NDK.js → chunk-NO66DOR2.js} +2 -2
  22. package/dist/{chunk-NAKDVIXS.js → chunk-Q5DDXJWJ.js} +3 -3
  23. package/dist/{chunk-KLYBJUTK.js → chunk-Q732LOXE.js} +325 -64
  24. package/dist/{chunk-KLYBJUTK.js.map → chunk-Q732LOXE.js.map} +1 -1
  25. package/dist/{chunk-ECZLYZCI.js → chunk-QA5IABQ4.js} +5 -5
  26. package/dist/{chunk-MNFEZIRI.js → chunk-QSTVUC2C.js} +2 -2
  27. package/dist/{chunk-ABGRFLJ6.js → chunk-RJ2FCK5T.js} +4 -4
  28. package/dist/{chunk-TDXLS2TY.js → chunk-S5LL7Y77.js} +4 -4
  29. package/dist/{chunk-Z7IQUUTZ.js → chunk-STLETCQJ.js} +2 -2
  30. package/dist/{chunk-MNWYIYEZ.js → chunk-TJVGB4OE.js} +2 -2
  31. package/dist/{chunk-W65C5VVJ.js → chunk-TNX3SEBY.js} +2 -2
  32. package/dist/{chunk-EKO6XAAZ.js → chunk-TQLSHKPJ.js} +3 -3
  33. package/dist/{chunk-T32MGJMA.js → chunk-TY2M7UQD.js} +10 -12
  34. package/dist/{chunk-T32MGJMA.js.map → chunk-TY2M7UQD.js.map} +1 -1
  35. package/dist/{chunk-3QFQG5QT.js → chunk-VOGIG42V.js} +2 -2
  36. package/dist/{chunk-5PZIMHNA.js → chunk-VU252OUC.js} +3 -3
  37. package/dist/{chunk-S7R72HUB.js → chunk-YMBG7LCM.js} +2 -2
  38. package/dist/{cli-circuit-breaker-L647V6BR.js → cli-circuit-breaker-KSNJ2KWP.js} +4 -4
  39. package/dist/cli.js +40 -39
  40. package/dist/cli.js.map +1 -1
  41. package/dist/{composite-router-NOTUOXFI.js → composite-router-5BO2RU4R.js} +2 -2
  42. package/dist/{consensus-vote-7CE4JOMK.js → consensus-vote-4W2MOXL2.js} +12 -13
  43. package/dist/{context-retriever-SHT7J6BT.js → context-retriever-EFEWHU3Z.js} +6 -6
  44. package/dist/{doctor-deep-REMLGFXP.js → doctor-deep-AWSHPMB3.js} +3 -3
  45. package/dist/{expert-bridge-2TYPRNEE.js → expert-bridge-P4NWKKOI.js} +4 -4
  46. package/dist/{factory-PPAK3TVG.js → factory-BSWATZK3.js} +5 -5
  47. package/dist/{factory-CYUNYEMU.js → factory-OHAMFHSF.js} +5 -5
  48. package/dist/{improvement-review-YFQ5T7I3.js → improvement-review-5ZWAZUB6.js} +4 -4
  49. package/dist/index.d.ts +15 -4
  50. package/dist/index.js +30 -32
  51. package/dist/index.js.map +1 -1
  52. package/dist/{init-opencode-WXY4DUFU.js → init-opencode-7O6XN2QB.js} +5 -5
  53. package/dist/{issue-triage-4YJQU3HW.js → issue-triage-MBNGFPVS.js} +5 -5
  54. package/dist/{pr-reviewer-helpers-2YJG6XJM.js → pr-reviewer-helpers-L5KOZXJO.js} +4 -4
  55. package/dist/{registry-command-ZFOGLBKF.js → registry-command-F565N7EI.js} +2 -2
  56. package/dist/{repo-security-plan-L47DDTAU.js → repo-security-plan-JRL6NQKO.js} +3 -3
  57. package/dist/{research-helpers-synthesize-IABO7LB4.js → research-helpers-synthesize-KJ7H75QA.js} +3 -3
  58. package/dist/{routing-memory-2YWEWRMQ.js → routing-memory-YECWDSDV.js} +2 -2
  59. package/dist/{session-memory-YWOMPCLZ.js → session-memory-AG4IM3JY.js} +3 -3
  60. package/dist/{setup-command-G3Q3UKI5.js → setup-command-WAUXPMOU.js} +10 -11
  61. package/dist/{setup-config-PYFK2GIC.js → setup-config-2GDDU5CV.js} +3 -3
  62. package/dist/{setup-custom-api-A4IZQ2Q4.js → setup-custom-api-6N2BTUGY.js} +4 -4
  63. package/dist/{tool-memory-ABPSCFIH.js → tool-memory-3ZWQVJX3.js} +5 -5
  64. package/dist/{weather-report-GXD6KGDS.js → weather-report-WAOVQRGI.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunk-3GF52QPA.js.map +0 -1
  67. package/dist/chunk-FRAMV5DJ.js.map +0 -1
  68. package/dist/chunk-L2NPJRZZ.js +0 -153
  69. package/dist/chunk-L2NPJRZZ.js.map +0 -1
  70. /package/dist/{child-mcp-config-NBELOYYZ.js.map → child-mcp-config-IPPKT47T.js.map} +0 -0
  71. /package/dist/{chunk-SBYFWB6J.js.map → chunk-3VSLKTD6.js.map} +0 -0
  72. /package/dist/{chunk-QYE6GEPY.js.map → chunk-4FIY62UC.js.map} +0 -0
  73. /package/dist/{chunk-FLUC27DF.js.map → chunk-6XWIR6JJ.js.map} +0 -0
  74. /package/dist/{chunk-VJR46M7L.js.map → chunk-ANHBUWOI.js.map} +0 -0
  75. /package/dist/{chunk-FVWKAEYH.js.map → chunk-AO2SCUPO.js.map} +0 -0
  76. /package/dist/{chunk-FZCB2P3F.js.map → chunk-BUZ62ZOK.js.map} +0 -0
  77. /package/dist/{chunk-4RW6OONY.js.map → chunk-CNQZ6BJE.js.map} +0 -0
  78. /package/dist/{chunk-PWDIIS7L.js.map → chunk-F6X6UH6D.js.map} +0 -0
  79. /package/dist/{chunk-6CIEBFDV.js.map → chunk-FPY53SSC.js.map} +0 -0
  80. /package/dist/{chunk-LXBWH5XP.js.map → chunk-FSXN5GGJ.js.map} +0 -0
  81. /package/dist/{chunk-E47LOV6Y.js.map → chunk-H6QEJT56.js.map} +0 -0
  82. /package/dist/{chunk-4L7FH53H.js.map → chunk-IEFH53RH.js.map} +0 -0
  83. /package/dist/{chunk-LVGYWJDX.js.map → chunk-M6QD4H7S.js.map} +0 -0
  84. /package/dist/{chunk-GDY23NDK.js.map → chunk-NO66DOR2.js.map} +0 -0
  85. /package/dist/{chunk-NAKDVIXS.js.map → chunk-Q5DDXJWJ.js.map} +0 -0
  86. /package/dist/{chunk-ECZLYZCI.js.map → chunk-QA5IABQ4.js.map} +0 -0
  87. /package/dist/{chunk-MNFEZIRI.js.map → chunk-QSTVUC2C.js.map} +0 -0
  88. /package/dist/{chunk-ABGRFLJ6.js.map → chunk-RJ2FCK5T.js.map} +0 -0
  89. /package/dist/{chunk-TDXLS2TY.js.map → chunk-S5LL7Y77.js.map} +0 -0
  90. /package/dist/{chunk-Z7IQUUTZ.js.map → chunk-STLETCQJ.js.map} +0 -0
  91. /package/dist/{chunk-MNWYIYEZ.js.map → chunk-TJVGB4OE.js.map} +0 -0
  92. /package/dist/{chunk-W65C5VVJ.js.map → chunk-TNX3SEBY.js.map} +0 -0
  93. /package/dist/{chunk-EKO6XAAZ.js.map → chunk-TQLSHKPJ.js.map} +0 -0
  94. /package/dist/{chunk-3QFQG5QT.js.map → chunk-VOGIG42V.js.map} +0 -0
  95. /package/dist/{chunk-5PZIMHNA.js.map → chunk-VU252OUC.js.map} +0 -0
  96. /package/dist/{chunk-S7R72HUB.js.map → chunk-YMBG7LCM.js.map} +0 -0
  97. /package/dist/{cli-circuit-breaker-L647V6BR.js.map → cli-circuit-breaker-KSNJ2KWP.js.map} +0 -0
  98. /package/dist/{composite-router-NOTUOXFI.js.map → composite-router-5BO2RU4R.js.map} +0 -0
  99. /package/dist/{consensus-vote-7CE4JOMK.js.map → consensus-vote-4W2MOXL2.js.map} +0 -0
  100. /package/dist/{context-retriever-SHT7J6BT.js.map → context-retriever-EFEWHU3Z.js.map} +0 -0
  101. /package/dist/{doctor-deep-REMLGFXP.js.map → doctor-deep-AWSHPMB3.js.map} +0 -0
  102. /package/dist/{expert-bridge-2TYPRNEE.js.map → expert-bridge-P4NWKKOI.js.map} +0 -0
  103. /package/dist/{factory-CYUNYEMU.js.map → factory-BSWATZK3.js.map} +0 -0
  104. /package/dist/{factory-PPAK3TVG.js.map → factory-OHAMFHSF.js.map} +0 -0
  105. /package/dist/{improvement-review-YFQ5T7I3.js.map → improvement-review-5ZWAZUB6.js.map} +0 -0
  106. /package/dist/{init-opencode-WXY4DUFU.js.map → init-opencode-7O6XN2QB.js.map} +0 -0
  107. /package/dist/{issue-triage-4YJQU3HW.js.map → issue-triage-MBNGFPVS.js.map} +0 -0
  108. /package/dist/{pr-reviewer-helpers-2YJG6XJM.js.map → pr-reviewer-helpers-L5KOZXJO.js.map} +0 -0
  109. /package/dist/{registry-command-ZFOGLBKF.js.map → registry-command-F565N7EI.js.map} +0 -0
  110. /package/dist/{repo-security-plan-L47DDTAU.js.map → repo-security-plan-JRL6NQKO.js.map} +0 -0
  111. /package/dist/{research-helpers-synthesize-IABO7LB4.js.map → research-helpers-synthesize-KJ7H75QA.js.map} +0 -0
  112. /package/dist/{routing-memory-2YWEWRMQ.js.map → routing-memory-YECWDSDV.js.map} +0 -0
  113. /package/dist/{session-memory-YWOMPCLZ.js.map → session-memory-AG4IM3JY.js.map} +0 -0
  114. /package/dist/{setup-command-G3Q3UKI5.js.map → setup-command-WAUXPMOU.js.map} +0 -0
  115. /package/dist/{setup-config-PYFK2GIC.js.map → setup-config-2GDDU5CV.js.map} +0 -0
  116. /package/dist/{setup-custom-api-A4IZQ2Q4.js.map → setup-custom-api-6N2BTUGY.js.map} +0 -0
  117. /package/dist/{tool-memory-ABPSCFIH.js.map → tool-memory-3ZWQVJX3.js.map} +0 -0
  118. /package/dist/{weather-report-GXD6KGDS.js.map → weather-report-WAOVQRGI.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULTS
3
- } from "./chunk-LVGYWJDX.js";
3
+ } from "./chunk-M6QD4H7S.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-3GF52QPA.js";
13
+ } from "./chunk-K4H5LCSU.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-KLYBJUTK.js";
29
+ } from "./chunk-Q732LOXE.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.102.7" : "dev";
43
+ var VERSION = true ? "2.103.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-G3Q3UKI5.js");
2099
+ const { runSetup } = await import("./setup-command-WAUXPMOU.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-PYFK2GIC.js");
2113
+ const { runConfigInitSync } = await import("./setup-config-2GDDU5CV.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-6CIEBFDV.js.map
2211
+ //# sourceMappingURL=chunk-FPY53SSC.js.map
@@ -9,11 +9,11 @@ import {
9
9
  gateWithReputation,
10
10
  resolveReputationGatingMode,
11
11
  sanitizeInput
12
- } from "./chunk-GDY23NDK.js";
12
+ } from "./chunk-NO66DOR2.js";
13
13
  import {
14
14
  createLogger,
15
15
  getTimeProvider
16
- } from "./chunk-KLYBJUTK.js";
16
+ } from "./chunk-Q732LOXE.js";
17
17
 
18
18
  // src/dogfooding/pr-reviewer-helpers.ts
19
19
  import { randomUUID } from "crypto";
@@ -288,4 +288,4 @@ export {
288
288
  formatReviewComment,
289
289
  createFailedReview
290
290
  };
291
- //# sourceMappingURL=chunk-LXBWH5XP.js.map
291
+ //# sourceMappingURL=chunk-FSXN5GGJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-KLYBJUTK.js";
5
+ } from "./chunk-Q732LOXE.js";
6
6
 
7
7
  // src/cli/doctor-deep.ts
8
8
  var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
@@ -106,4 +106,4 @@ export {
106
106
  runDeepDiagnostics,
107
107
  formatDeepDiagnostics
108
108
  };
109
- //# sourceMappingURL=chunk-E47LOV6Y.js.map
109
+ //# sourceMappingURL=chunk-H6QEJT56.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-KLYBJUTK.js";
3
+ } from "./chunk-Q732LOXE.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-4L7FH53H.js.map
80
+ //# sourceMappingURL=chunk-IEFH53RH.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CliCircuitBreaker,
3
3
  DEFAULT_CIRCUIT_BREAKER_CONFIG
4
- } from "./chunk-4RW6OONY.js";
4
+ } from "./chunk-CNQZ6BJE.js";
5
5
  import {
6
6
  generateHyphenId
7
- } from "./chunk-3QFQG5QT.js";
7
+ } from "./chunk-VOGIG42V.js";
8
8
  import {
9
9
  CLI_SUBPROCESS_TIMEOUTS,
10
10
  CLI_TIMEOUTS,
@@ -26,8 +26,9 @@ import {
26
26
  getRandomProvider,
27
27
  getTimeProvider,
28
28
  isRateLimitText,
29
+ loadModelsDevSnapshot,
29
30
  ok
30
- } from "./chunk-KLYBJUTK.js";
31
+ } from "./chunk-Q732LOXE.js";
31
32
 
32
33
  // src/cli-adapters/subprocess-adapter.ts
33
34
  import { spawn } from "child_process";
@@ -382,8 +383,8 @@ var BaseCliAdapter = class {
382
383
  initialized = false;
383
384
  lastHealthCheck;
384
385
  cachedVersion;
385
- constructor(logger5) {
386
- this.logger = logger5 ?? createLogger({ component: "cli-adapter" });
386
+ constructor(logger6) {
387
+ this.logger = logger6 ?? createLogger({ component: "cli-adapter" });
387
388
  }
388
389
  /**
389
390
  * Initializes the capacity tracker.
@@ -1403,6 +1404,36 @@ var ClaudeResponseParser = class {
1403
1404
  }
1404
1405
  };
1405
1406
 
1407
+ // src/config/models-dev-by-vendor.ts
1408
+ var logger2 = createLogger({ component: "models-dev-by-vendor" });
1409
+ var CLI_TO_MODELSDEV_VENDOR = {
1410
+ claude: "anthropic",
1411
+ codex: "openai",
1412
+ gemini: "google"
1413
+ };
1414
+ var cached = null;
1415
+ function loadEntries() {
1416
+ if (cached !== null) return cached;
1417
+ try {
1418
+ const { entries } = loadModelsDevSnapshot();
1419
+ cached = entries.map((e) => ({ id: e.id, vendor: e.vendor }));
1420
+ } catch (error) {
1421
+ logger2.debug("models.dev snapshot load failed; enumeration empty", {
1422
+ error: error instanceof Error ? error.message : String(error)
1423
+ });
1424
+ cached = [];
1425
+ }
1426
+ return cached;
1427
+ }
1428
+ function listModelsByVendor(vendor) {
1429
+ return loadEntries().filter((e) => e.vendor === vendor).map((e) => ({ id: e.id }));
1430
+ }
1431
+ function listModelsForCli(cliName) {
1432
+ const vendor = CLI_TO_MODELSDEV_VENDOR[cliName];
1433
+ if (vendor === void 0) return [];
1434
+ return listModelsByVendor(vendor).map((m) => ({ id: m.id, provider: vendor }));
1435
+ }
1436
+
1406
1437
  // src/cli-adapters/adapters/claude-adapter.ts
1407
1438
  var MODEL_TO_CLI_ALIAS = buildClaudeAliasMap();
1408
1439
  function buildClaudeAliasMap() {
@@ -1428,6 +1459,14 @@ var ClaudeCliAdapter = class extends SubprocessCliAdapter {
1428
1459
  super(options?.logger);
1429
1460
  this.model = options?.model ?? getCliModelName(getDefaultModelForCli("claude"));
1430
1461
  }
1462
+ /**
1463
+ * Key-free model enumeration (#3405): the claude CLI has no list-models
1464
+ * command and its OAuth token can't call /v1/models, so we enumerate the
1465
+ * vendor's models from the models.dev snapshot. Existence only.
1466
+ */
1467
+ listModels() {
1468
+ return Promise.resolve(listModelsForCli(this.name));
1469
+ }
1431
1470
  /**
1432
1471
  * Gets Claude model information.
1433
1472
  * `buildModelInfo` matches `cliModelName`, `cliAlias`, and `aliases[]` —
@@ -1502,10 +1541,10 @@ function aggregateModelTokens(models) {
1502
1541
  if (tokens === null) continue;
1503
1542
  const input = extractNumberField(tokens, "input");
1504
1543
  const candidates = extractNumberField(tokens, "candidates");
1505
- const cached = extractNumberField(tokens, "cached");
1544
+ const cached2 = extractNumberField(tokens, "cached");
1506
1545
  if (input !== null) totalInput += input;
1507
1546
  if (candidates !== null) totalOutput += candidates;
1508
- if (cached !== null) totalCached += cached;
1547
+ if (cached2 !== null) totalCached += cached2;
1509
1548
  }
1510
1549
  return { input: totalInput, output: totalOutput, cached: totalCached };
1511
1550
  }
@@ -1797,6 +1836,10 @@ var GeminiCliAdapter = class extends SubprocessCliAdapter {
1797
1836
  this.circuitBreaker = null;
1798
1837
  }
1799
1838
  }
1839
+ /** Key-free model enumeration via the models.dev snapshot (#3405). */
1840
+ listModels() {
1841
+ return Promise.resolve(listModelsForCli(this.name));
1842
+ }
1800
1843
  /**
1801
1844
  * Gets Gemini model information.
1802
1845
  * Resolves from canonical registry when possible, falls back to legacy lookup.
@@ -1933,7 +1976,7 @@ import { tmpdir as tmpdir2 } from "os";
1933
1976
  import { join as join2 } from "path";
1934
1977
 
1935
1978
  // src/cli-adapters/parsers/codex-parser.ts
1936
- var logger2 = createLogger({ component: "codex-parser" });
1979
+ var logger3 = createLogger({ component: "codex-parser" });
1937
1980
  var CodexResponseParser = class {
1938
1981
  name = "codex-parser";
1939
1982
  supportedVersionRange = ">=0.70.0 <1.0.0";
@@ -1985,7 +2028,7 @@ var CodexResponseParser = class {
1985
2028
  if (usage !== null) setUsage(usage);
1986
2029
  }
1987
2030
  } catch {
1988
- logger2.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
2031
+ logger3.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
1989
2032
  }
1990
2033
  }
1991
2034
  /**
@@ -2014,7 +2057,7 @@ var CodexResponseParser = class {
2014
2057
  return this.extractUsageFromEvent(record);
2015
2058
  }
2016
2059
  } catch {
2017
- logger2.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
2060
+ logger3.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
2018
2061
  continue;
2019
2062
  }
2020
2063
  }
@@ -2038,7 +2081,7 @@ var CodexResponseParser = class {
2038
2081
  }
2039
2082
  }
2040
2083
  } catch {
2041
- logger2.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
2084
+ logger3.debug("Skipped malformed NDJSON line", { snippet: line.slice(0, 100) });
2042
2085
  continue;
2043
2086
  }
2044
2087
  }
@@ -2112,6 +2155,10 @@ var CodexCliAdapter = class extends SubprocessCliAdapter {
2112
2155
  super(options?.logger);
2113
2156
  this.model = options?.model ?? getCliModelName(getDefaultModelForCli("codex"));
2114
2157
  }
2158
+ /** Key-free model enumeration via the models.dev snapshot (#3405). */
2159
+ listModels() {
2160
+ return Promise.resolve(listModelsForCli(this.name));
2161
+ }
2115
2162
  /**
2116
2163
  * Gets Codex model information.
2117
2164
  * Resolves from canonical registry when possible, falls back to legacy lookup.
@@ -2365,7 +2412,7 @@ var CodexMcpAdapter = class extends BaseCliAdapter {
2365
2412
  import { execFile } from "child_process";
2366
2413
 
2367
2414
  // src/cli-adapters/parsers/opencode-parser.ts
2368
- var logger3 = createLogger({ component: "opencode-parser" });
2415
+ var logger4 = createLogger({ component: "opencode-parser" });
2369
2416
  var PLAINTEXT_MIN_LENGTH = 10;
2370
2417
  function looksLikeNdjson(text) {
2371
2418
  const lines = text.split("\n").filter((l) => l.trim() !== "");
@@ -2435,7 +2482,7 @@ var OpenCodeResponseParser = class {
2435
2482
  state.usage
2436
2483
  );
2437
2484
  }
2438
- logger3.debug("No NDJSON content extracted, trying JSON fallback", {
2485
+ logger4.debug("No NDJSON content extracted, trying JSON fallback", {
2439
2486
  rawLength: raw.length,
2440
2487
  lineCount,
2441
2488
  hasStepEvents: state.hasStepEvents,
@@ -2458,7 +2505,7 @@ var OpenCodeResponseParser = class {
2458
2505
  extractResponse(raw) {
2459
2506
  const parsed = this.parse(raw);
2460
2507
  if (parsed === null || parsed.content === "") {
2461
- logger3.debug("extractResponse returned null", {
2508
+ logger4.debug("extractResponse returned null", {
2462
2509
  rawLength: raw.length,
2463
2510
  snippet: raw.slice(0, 100),
2464
2511
  parsedNull: parsed === null
@@ -2532,7 +2579,7 @@ var OpenCodeResponseParser = class {
2532
2579
  this.processLegacyEvent(record, collectors.contentParts, setSessionId, setUsage);
2533
2580
  return false;
2534
2581
  } catch {
2535
- logger3.debug("Skipped malformed NDJSON line", {
2582
+ logger4.debug("Skipped malformed NDJSON line", {
2536
2583
  lineNumber: lineIndex + 1,
2537
2584
  snippet: line.slice(0, 100)
2538
2585
  });
@@ -2573,7 +2620,7 @@ var OpenCodeResponseParser = class {
2573
2620
  if (errorObj === null) return;
2574
2621
  const data = asRecord(errorObj.data);
2575
2622
  const message = data !== null && typeof data.message === "string" ? data.message : typeof errorObj.name === "string" ? errorObj.name : "Unknown error";
2576
- logger3.warn("OpenCode returned error event", { message });
2623
+ logger4.warn("OpenCode returned error event", { message });
2577
2624
  errorMessages.push(message);
2578
2625
  }
2579
2626
  /** Processes legacy assumed event types. */
@@ -2685,17 +2732,17 @@ var OpenCodeResponseParser = class {
2685
2732
  parsePlaintext(raw, hasAnyRecognizedEvent) {
2686
2733
  const trimmed = raw.trim();
2687
2734
  if (trimmed.length < PLAINTEXT_MIN_LENGTH) {
2688
- logger3.debug("Plaintext fallback rejected: too short", { length: trimmed.length });
2735
+ logger4.debug("Plaintext fallback rejected: too short", { length: trimmed.length });
2689
2736
  return null;
2690
2737
  }
2691
2738
  if (looksLikeNdjson(trimmed)) {
2692
2739
  if (hasAnyRecognizedEvent) {
2693
- logger3.debug("Plaintext fallback rejected: recognized NDJSON with no content", {
2740
+ logger4.debug("Plaintext fallback rejected: recognized NDJSON with no content", {
2694
2741
  length: trimmed.length
2695
2742
  });
2696
2743
  return null;
2697
2744
  }
2698
- logger3.debug("Plaintext fallback: accepting malformed NDJSON as text", {
2745
+ logger4.debug("Plaintext fallback: accepting malformed NDJSON as text", {
2699
2746
  length: trimmed.length
2700
2747
  });
2701
2748
  }
@@ -2719,7 +2766,7 @@ var OpenCodeResponseParser = class {
2719
2766
  };
2720
2767
 
2721
2768
  // src/cli-adapters/adapters/opencode-adapter.ts
2722
- var logger4 = createLogger({ component: "opencode-adapter" });
2769
+ var logger5 = createLogger({ component: "opencode-adapter" });
2723
2770
  var ALLOWED_VARIANTS = ["high", "max", "minimal"];
2724
2771
  var MODEL_TO_CLI_NAME = buildOpenCodeAliasMap();
2725
2772
  function buildOpenCodeAliasMap() {
@@ -2746,7 +2793,7 @@ function probeAvailableModels() {
2746
2793
  probePromise = new Promise((resolve) => {
2747
2794
  execFile("opencode", ["models"], { timeout: PROBE_TIMEOUT_MS }, (error, stdout) => {
2748
2795
  if (error !== null || stdout.trim() === "") {
2749
- logger4.debug("Failed to probe OpenCode models, will omit --model flag", {
2796
+ logger5.debug("Failed to probe OpenCode models, will omit --model flag", {
2750
2797
  error: error?.message
2751
2798
  });
2752
2799
  cachedModels = /* @__PURE__ */ new Set();
@@ -2756,7 +2803,7 @@ function probeAvailableModels() {
2756
2803
  const models = new Set(
2757
2804
  stdout.trim().split("\n").map((l) => l.trim()).filter((l) => l.length > 0)
2758
2805
  );
2759
- logger4.debug("Probed OpenCode models", { count: models.size });
2806
+ logger5.debug("Probed OpenCode models", { count: models.size });
2760
2807
  cachedModels = models;
2761
2808
  resolve(cachedModels);
2762
2809
  });
@@ -2771,7 +2818,7 @@ function warnIfAnthropicProvider(models) {
2771
2818
  (m) => ANTHROPIC_MODEL_PATTERNS.some((p) => m.toLowerCase().includes(p))
2772
2819
  );
2773
2820
  if (anthropicModels.length > 0) {
2774
- logger4.warn(
2821
+ logger5.warn(
2775
2822
  "OpenCode has Anthropic/Claude models configured. Ensure these use a SEPARATE API key from console.anthropic.com, NOT a Claude Code subscription key (which is restricted to Claude Code only).",
2776
2823
  { detectedModels: anthropicModels }
2777
2824
  );
@@ -2824,7 +2871,7 @@ var OpenCodeCliAdapter = class extends SubprocessCliAdapter {
2824
2871
  if (this.isModelAvailable(cliModel)) {
2825
2872
  args.push("--model", cliModel);
2826
2873
  } else {
2827
- logger4.debug("Model not available, using OpenCode default", {
2874
+ logger5.debug("Model not available, using OpenCode default", {
2828
2875
  requested: cliModel,
2829
2876
  available: this.availableModels?.size ?? 0
2830
2877
  });
@@ -3229,9 +3276,9 @@ function createCodexAdapter(transport, options) {
3229
3276
  }
3230
3277
  return new CodexMcpAdapter(options);
3231
3278
  }
3232
- function createAllAdapters(logger5, codexTransport = "mcp") {
3279
+ function createAllAdapters(logger6, codexTransport = "mcp") {
3233
3280
  const adapters = /* @__PURE__ */ new Map();
3234
- const options = logger5 !== void 0 ? { logger: logger5 } : void 0;
3281
+ const options = logger6 !== void 0 ? { logger: logger6 } : void 0;
3235
3282
  adapters.set("claude", new ClaudeCliAdapter(options));
3236
3283
  adapters.set("gemini", new GeminiCliAdapter(options));
3237
3284
  adapters.set("codex", createCodexAdapter(codexTransport, options ?? {}));
@@ -3240,9 +3287,9 @@ function createAllAdapters(logger5, codexTransport = "mcp") {
3240
3287
  }
3241
3288
  async function isCliAvailable(cli, cache) {
3242
3289
  if (cache !== void 0) {
3243
- const cached = cache.get(cli);
3244
- if (cached !== void 0) {
3245
- return cached.healthy;
3290
+ const cached2 = cache.get(cli);
3291
+ if (cached2 !== void 0) {
3292
+ return cached2.healthy;
3246
3293
  }
3247
3294
  }
3248
3295
  try {
@@ -3327,4 +3374,4 @@ export {
3327
3374
  isCliAvailable,
3328
3375
  getAvailableClis
3329
3376
  };
3330
- //# sourceMappingURL=chunk-3GF52QPA.js.map
3377
+ //# sourceMappingURL=chunk-K4H5LCSU.js.map