nexus-agents 2.176.2 → 2.177.1

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 (122) hide show
  1. package/dist/{child-mcp-config-HPWYQFLG.js → child-mcp-config-2NY3IO7I.js} +2 -2
  2. package/dist/{chunk-ECBV4JNL.js → chunk-24OVHAMU.js} +2 -2
  3. package/dist/{chunk-7TXEBDRM.js → chunk-AJKGJM5O.js} +2 -2
  4. package/dist/{chunk-WMV2CXBB.js → chunk-B7SSHUWQ.js} +2 -2
  5. package/dist/{chunk-ZOOSSM7D.js → chunk-BH6M6DMT.js} +5 -5
  6. package/dist/{chunk-JGL5HYZL.js → chunk-BJ2Z2XBW.js} +3 -3
  7. package/dist/{chunk-QI5U2YUL.js → chunk-C37G7YLN.js} +2 -2
  8. package/dist/{chunk-YU2JCUM7.js → chunk-CGLVSYSZ.js} +2 -2
  9. package/dist/{chunk-5LTRHNOI.js → chunk-D3NRM4TE.js} +3 -3
  10. package/dist/{chunk-CGD63GSC.js → chunk-DTGMWK7P.js} +5 -5
  11. package/dist/{chunk-G5URP3V7.js → chunk-EA7T6C5F.js} +7 -7
  12. package/dist/{chunk-QQ3CUUBU.js → chunk-GOYPDUD2.js} +4 -4
  13. package/dist/{chunk-JRKF4FYO.js → chunk-HHPW44FI.js} +2 -2
  14. package/dist/{chunk-J4BGV5VE.js → chunk-HK5NM5NS.js} +2 -2
  15. package/dist/{chunk-LGBCHTC6.js → chunk-HPMZX4EA.js} +8 -8
  16. package/dist/{chunk-5YXHHEAG.js → chunk-J7E7HJFP.js} +5 -5
  17. package/dist/{chunk-4OPEUDHY.js → chunk-LUKYSB7V.js} +8 -8
  18. package/dist/{chunk-G42V4A5Q.js → chunk-M6PKLT5H.js} +2 -2
  19. package/dist/{chunk-XZJU6WLL.js → chunk-N5ZOCMEK.js} +4 -4
  20. package/dist/{chunk-CNHPSIHY.js → chunk-QWA5PQMD.js} +6 -6
  21. package/dist/chunk-QWA5PQMD.js.map +1 -0
  22. package/dist/{chunk-XES5DPHV.js → chunk-QWDF7V2E.js} +3 -3
  23. package/dist/{chunk-46XEDJRB.js → chunk-RAIB4I6R.js} +2 -2
  24. package/dist/{chunk-U5CV76ZW.js → chunk-RKEKAX35.js} +2 -2
  25. package/dist/{chunk-XAWRBQB7.js → chunk-SSG6OBML.js} +3 -3
  26. package/dist/{chunk-NQU4LNN7.js → chunk-SXHG5CV3.js} +4 -4
  27. package/dist/{chunk-J55NMZ7R.js → chunk-TQ7PVJPM.js} +2 -2
  28. package/dist/{chunk-5ALUADB6.js → chunk-UGI7KJMY.js} +2 -2
  29. package/dist/{chunk-YB4QE7MD.js → chunk-UGJVQPV4.js} +2 -2
  30. package/dist/{chunk-N3XDPW64.js → chunk-V7JUMHM5.js} +18 -54
  31. package/dist/chunk-V7JUMHM5.js.map +1 -0
  32. package/dist/{chunk-4S6S6S2S.js → chunk-WOXLLMGZ.js} +2 -2
  33. package/dist/{chunk-Z55WHIRU.js → chunk-XQVGHRC3.js} +2 -2
  34. package/dist/{chunk-6HBMN6GZ.js → chunk-Y55CT2MJ.js} +35 -35
  35. package/dist/{chunk-WT4BJODZ.js → chunk-YPL45FXE.js} +5 -5
  36. package/dist/{chunk-2DE5L734.js → chunk-ZACQ3LNP.js} +2 -2
  37. package/dist/{cli-circuit-breaker-PJOQTGFZ.js → cli-circuit-breaker-3YGAGGQS.js} +3 -3
  38. package/dist/cli.d.ts +1 -1
  39. package/dist/cli.js +40 -40
  40. package/dist/{composite-router-IRXFQSB6.js → composite-router-7KMRFNML.js} +2 -2
  41. package/dist/{consensus-vote-O6Q266QE.js → consensus-vote-UZPXZYDV.js} +16 -16
  42. package/dist/{consensus-vote-types-BlbNhK1n.d.ts → consensus-vote-types-D2s0fTVg.d.ts} +4 -4
  43. package/dist/{context-retriever-GO6ET3MF.js → context-retriever-E2ODPG63.js} +8 -8
  44. package/dist/{doctor-deep-6HCHHMRP.js → doctor-deep-JR4233A2.js} +3 -3
  45. package/dist/{expert-bridge-6OLG6THF.js → expert-bridge-57MAWJI5.js} +4 -4
  46. package/dist/{factory-7OM526WB.js → factory-DVQHPLLB.js} +9 -9
  47. package/dist/{factory-MJFGYMNE.js → factory-HU42NWNS.js} +5 -5
  48. package/dist/{improvement-review-PALAAG7V.js → improvement-review-OE4IWSM7.js} +5 -5
  49. package/dist/index.d.ts +11 -3
  50. package/dist/index.js +30 -30
  51. package/dist/{init-opencode-NUMHNVIF.js → init-opencode-XPRV3ACM.js} +6 -6
  52. package/dist/{issue-triage-N7GFXNPY.js → issue-triage-K4SKQZXN.js} +6 -6
  53. package/dist/{pr-reviewer-helpers-6EIUJPXS.js → pr-reviewer-helpers-JK6CQHLB.js} +4 -4
  54. package/dist/{registry-command-SVTX7FKB.js → registry-command-PYGS32IQ.js} +2 -2
  55. package/dist/{repo-security-plan-AT7LOXLG.js → repo-security-plan-ZN7OAQXM.js} +3 -3
  56. package/dist/{research-helpers-synthesize-R722YWRS.js → research-helpers-synthesize-HW2WCZW2.js} +4 -4
  57. package/dist/{routing-memory-4FXQT5H6.js → routing-memory-PVWEIQKB.js} +2 -2
  58. package/dist/{session-memory-ZQJ6AUSQ.js → session-memory-BW7CXWYZ.js} +3 -3
  59. package/dist/{setup-command-IYBRT734.js → setup-command-7HZJ6MIC.js} +14 -14
  60. package/dist/{setup-config-MYLZ2UHR.js → setup-config-DLPAGDHV.js} +3 -3
  61. package/dist/{setup-custom-api-WZPLTGRQ.js → setup-custom-api-2W5OCVOB.js} +4 -4
  62. package/dist/{tool-memory-5REJXBCB.js → tool-memory-CMC5JJSS.js} +5 -5
  63. package/dist/{unified-registry-FM3QB2VN.js → unified-registry-EUB7DSZW.js} +10 -10
  64. package/dist/{weather-report-Y2GYJA6I.js → weather-report-EFIVYPZD.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunk-CNHPSIHY.js.map +0 -1
  67. package/dist/chunk-N3XDPW64.js.map +0 -1
  68. /package/dist/{child-mcp-config-HPWYQFLG.js.map → child-mcp-config-2NY3IO7I.js.map} +0 -0
  69. /package/dist/{chunk-ECBV4JNL.js.map → chunk-24OVHAMU.js.map} +0 -0
  70. /package/dist/{chunk-7TXEBDRM.js.map → chunk-AJKGJM5O.js.map} +0 -0
  71. /package/dist/{chunk-WMV2CXBB.js.map → chunk-B7SSHUWQ.js.map} +0 -0
  72. /package/dist/{chunk-ZOOSSM7D.js.map → chunk-BH6M6DMT.js.map} +0 -0
  73. /package/dist/{chunk-JGL5HYZL.js.map → chunk-BJ2Z2XBW.js.map} +0 -0
  74. /package/dist/{chunk-QI5U2YUL.js.map → chunk-C37G7YLN.js.map} +0 -0
  75. /package/dist/{chunk-YU2JCUM7.js.map → chunk-CGLVSYSZ.js.map} +0 -0
  76. /package/dist/{chunk-5LTRHNOI.js.map → chunk-D3NRM4TE.js.map} +0 -0
  77. /package/dist/{chunk-CGD63GSC.js.map → chunk-DTGMWK7P.js.map} +0 -0
  78. /package/dist/{chunk-G5URP3V7.js.map → chunk-EA7T6C5F.js.map} +0 -0
  79. /package/dist/{chunk-QQ3CUUBU.js.map → chunk-GOYPDUD2.js.map} +0 -0
  80. /package/dist/{chunk-JRKF4FYO.js.map → chunk-HHPW44FI.js.map} +0 -0
  81. /package/dist/{chunk-J4BGV5VE.js.map → chunk-HK5NM5NS.js.map} +0 -0
  82. /package/dist/{chunk-LGBCHTC6.js.map → chunk-HPMZX4EA.js.map} +0 -0
  83. /package/dist/{chunk-5YXHHEAG.js.map → chunk-J7E7HJFP.js.map} +0 -0
  84. /package/dist/{chunk-4OPEUDHY.js.map → chunk-LUKYSB7V.js.map} +0 -0
  85. /package/dist/{chunk-G42V4A5Q.js.map → chunk-M6PKLT5H.js.map} +0 -0
  86. /package/dist/{chunk-XZJU6WLL.js.map → chunk-N5ZOCMEK.js.map} +0 -0
  87. /package/dist/{chunk-XES5DPHV.js.map → chunk-QWDF7V2E.js.map} +0 -0
  88. /package/dist/{chunk-46XEDJRB.js.map → chunk-RAIB4I6R.js.map} +0 -0
  89. /package/dist/{chunk-U5CV76ZW.js.map → chunk-RKEKAX35.js.map} +0 -0
  90. /package/dist/{chunk-XAWRBQB7.js.map → chunk-SSG6OBML.js.map} +0 -0
  91. /package/dist/{chunk-NQU4LNN7.js.map → chunk-SXHG5CV3.js.map} +0 -0
  92. /package/dist/{chunk-J55NMZ7R.js.map → chunk-TQ7PVJPM.js.map} +0 -0
  93. /package/dist/{chunk-5ALUADB6.js.map → chunk-UGI7KJMY.js.map} +0 -0
  94. /package/dist/{chunk-YB4QE7MD.js.map → chunk-UGJVQPV4.js.map} +0 -0
  95. /package/dist/{chunk-4S6S6S2S.js.map → chunk-WOXLLMGZ.js.map} +0 -0
  96. /package/dist/{chunk-Z55WHIRU.js.map → chunk-XQVGHRC3.js.map} +0 -0
  97. /package/dist/{chunk-6HBMN6GZ.js.map → chunk-Y55CT2MJ.js.map} +0 -0
  98. /package/dist/{chunk-WT4BJODZ.js.map → chunk-YPL45FXE.js.map} +0 -0
  99. /package/dist/{chunk-2DE5L734.js.map → chunk-ZACQ3LNP.js.map} +0 -0
  100. /package/dist/{cli-circuit-breaker-PJOQTGFZ.js.map → cli-circuit-breaker-3YGAGGQS.js.map} +0 -0
  101. /package/dist/{composite-router-IRXFQSB6.js.map → composite-router-7KMRFNML.js.map} +0 -0
  102. /package/dist/{consensus-vote-O6Q266QE.js.map → consensus-vote-UZPXZYDV.js.map} +0 -0
  103. /package/dist/{context-retriever-GO6ET3MF.js.map → context-retriever-E2ODPG63.js.map} +0 -0
  104. /package/dist/{doctor-deep-6HCHHMRP.js.map → doctor-deep-JR4233A2.js.map} +0 -0
  105. /package/dist/{expert-bridge-6OLG6THF.js.map → expert-bridge-57MAWJI5.js.map} +0 -0
  106. /package/dist/{factory-7OM526WB.js.map → factory-DVQHPLLB.js.map} +0 -0
  107. /package/dist/{factory-MJFGYMNE.js.map → factory-HU42NWNS.js.map} +0 -0
  108. /package/dist/{improvement-review-PALAAG7V.js.map → improvement-review-OE4IWSM7.js.map} +0 -0
  109. /package/dist/{init-opencode-NUMHNVIF.js.map → init-opencode-XPRV3ACM.js.map} +0 -0
  110. /package/dist/{issue-triage-N7GFXNPY.js.map → issue-triage-K4SKQZXN.js.map} +0 -0
  111. /package/dist/{pr-reviewer-helpers-6EIUJPXS.js.map → pr-reviewer-helpers-JK6CQHLB.js.map} +0 -0
  112. /package/dist/{registry-command-SVTX7FKB.js.map → registry-command-PYGS32IQ.js.map} +0 -0
  113. /package/dist/{repo-security-plan-AT7LOXLG.js.map → repo-security-plan-ZN7OAQXM.js.map} +0 -0
  114. /package/dist/{research-helpers-synthesize-R722YWRS.js.map → research-helpers-synthesize-HW2WCZW2.js.map} +0 -0
  115. /package/dist/{routing-memory-4FXQT5H6.js.map → routing-memory-PVWEIQKB.js.map} +0 -0
  116. /package/dist/{session-memory-ZQJ6AUSQ.js.map → session-memory-BW7CXWYZ.js.map} +0 -0
  117. /package/dist/{setup-command-IYBRT734.js.map → setup-command-7HZJ6MIC.js.map} +0 -0
  118. /package/dist/{setup-config-MYLZ2UHR.js.map → setup-config-DLPAGDHV.js.map} +0 -0
  119. /package/dist/{setup-custom-api-WZPLTGRQ.js.map → setup-custom-api-2W5OCVOB.js.map} +0 -0
  120. /package/dist/{tool-memory-5REJXBCB.js.map → tool-memory-CMC5JJSS.js.map} +0 -0
  121. /package/dist/{unified-registry-FM3QB2VN.js.map → unified-registry-EUB7DSZW.js.map} +0 -0
  122. /package/dist/{weather-report-Y2GYJA6I.js.map → weather-report-EFIVYPZD.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-XAWRBQB7.js";
10
+ } from "./chunk-SSG6OBML.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -19,7 +19,7 @@ import {
19
19
  getPipelineEventBus,
20
20
  getTimeProvider,
21
21
  isDeclaredNeverDeprecate
22
- } from "./chunk-CNHPSIHY.js";
22
+ } from "./chunk-QWA5PQMD.js";
23
23
  import {
24
24
  getNexusDataDir,
25
25
  nexusDataPath
@@ -2132,4 +2132,4 @@ export {
2132
2132
  runImprovementReview,
2133
2133
  registerImprovementReviewTool
2134
2134
  };
2135
- //# sourceMappingURL=chunk-XES5DPHV.js.map
2135
+ //# sourceMappingURL=chunk-QWDF7V2E.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-CNHPSIHY.js";
11
+ } from "./chunk-QWA5PQMD.js";
12
12
 
13
13
  // src/cli/research-helpers-io.ts
14
14
  import * as fs2 from "fs/promises";
@@ -146,4 +146,4 @@ export {
146
146
  loadPapersRegistry,
147
147
  savePapersRegistry
148
148
  };
149
- //# sourceMappingURL=chunk-46XEDJRB.js.map
149
+ //# sourceMappingURL=chunk-RAIB4I6R.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-CNHPSIHY.js";
7
+ } from "./chunk-QWA5PQMD.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -352,4 +352,4 @@ export {
352
352
  SessionMemory,
353
353
  createSessionMemory
354
354
  };
355
- //# sourceMappingURL=chunk-U5CV76ZW.js.map
355
+ //# sourceMappingURL=chunk-RKEKAX35.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  emitClawGuardViolation
3
- } from "./chunk-G42V4A5Q.js";
3
+ } from "./chunk-M6PKLT5H.js";
4
4
  import {
5
5
  CACHE_TIMEOUTS,
6
6
  MCP_TIMEOUTS,
@@ -16,7 +16,7 @@ import {
16
16
  getTimeProvider,
17
17
  ok,
18
18
  resolveToolClassGuardMs
19
- } from "./chunk-CNHPSIHY.js";
19
+ } from "./chunk-QWA5PQMD.js";
20
20
  import {
21
21
  getNexusDataDir
22
22
  } from "./chunk-OQLFRJCW.js";
@@ -2023,4 +2023,4 @@ export {
2023
2023
  VOTING_THRESHOLDS,
2024
2024
  ConsensusMetricsSchema
2025
2025
  };
2026
- //# sourceMappingURL=chunk-XAWRBQB7.js.map
2026
+ //# sourceMappingURL=chunk-SSG6OBML.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-U5CV76ZW.js";
8
+ } from "./chunk-RKEKAX35.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KSQSWEFH.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-YB4QE7MD.js";
18
+ } from "./chunk-UGJVQPV4.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -28,7 +28,7 @@ import {
28
28
  getTimeProvider,
29
29
  ok,
30
30
  setSharedMobiMemDbPathResolver
31
- } from "./chunk-CNHPSIHY.js";
31
+ } from "./chunk-QWA5PQMD.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-OQLFRJCW.js";
@@ -5552,4 +5552,4 @@ export {
5552
5552
  reinitializeMemoryBackends,
5553
5553
  ToolMemoryManager
5554
5554
  };
5555
- //# sourceMappingURL=chunk-NQU4LNN7.js.map
5555
+ //# sourceMappingURL=chunk-SXHG5CV3.js.map
@@ -3,7 +3,7 @@ import {
3
3
  MODEL_IDS,
4
4
  getTimeProvider,
5
5
  resolveModelIdentitySync
6
- } from "./chunk-CNHPSIHY.js";
6
+ } from "./chunk-QWA5PQMD.js";
7
7
 
8
8
  // src/config/model-availability.ts
9
9
  var DEFAULT_TTL_MS = 6e4;
@@ -150,4 +150,4 @@ export {
150
150
  resetAvailabilityCache,
151
151
  filterAvailableModels
152
152
  };
153
- //# sourceMappingURL=chunk-J55NMZ7R.js.map
153
+ //# sourceMappingURL=chunk-TQ7PVJPM.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getTimeProvider,
9
9
  isRateLimitText,
10
10
  ok
11
- } from "./chunk-CNHPSIHY.js";
11
+ } from "./chunk-QWA5PQMD.js";
12
12
 
13
13
  // src/cli-adapters/circuit-breaker-types.ts
14
14
  var CircuitErrorCode = {
@@ -540,4 +540,4 @@ export {
540
540
  CliCircuitBreakerIntegration,
541
541
  createCliCircuitBreakerIntegration
542
542
  };
543
- //# sourceMappingURL=chunk-5ALUADB6.js.map
543
+ //# sourceMappingURL=chunk-UGI7KJMY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-CNHPSIHY.js";
4
+ } from "./chunk-QWA5PQMD.js";
5
5
 
6
6
  // src/utils/id-utils.ts
7
7
  import { randomUUID } from "crypto";
@@ -24,4 +24,4 @@ export {
24
24
  generateHyphenId,
25
25
  generateUUID
26
26
  };
27
- //# sourceMappingURL=chunk-YB4QE7MD.js.map
27
+ //# sourceMappingURL=chunk-UGJVQPV4.js.map
@@ -5,34 +5,34 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-QI5U2YUL.js";
8
+ } from "./chunk-C37G7YLN.js";
9
9
  import {
10
10
  CUSTOM_API_DEFAULT_MODEL
11
- } from "./chunk-WMV2CXBB.js";
11
+ } from "./chunk-B7SSHUWQ.js";
12
12
  import {
13
13
  CUSTOM_API_BASE_URL_ENV,
14
14
  PROVIDER_ENV_KEYS,
15
15
  assertCustomApiHostResolvesPublic,
16
16
  validateCustomApiBaseUrl
17
- } from "./chunk-ECBV4JNL.js";
17
+ } from "./chunk-24OVHAMU.js";
18
18
  import {
19
19
  nexusMkdtempSync
20
20
  } from "./chunk-YAF73ZMR.js";
21
21
  import {
22
22
  getAvailabilityCache
23
- } from "./chunk-J55NMZ7R.js";
23
+ } from "./chunk-TQ7PVJPM.js";
24
24
  import {
25
25
  extractSystemPrompt
26
26
  } from "./chunk-QZUG667L.js";
27
27
  import {
28
28
  generateHyphenId
29
- } from "./chunk-YB4QE7MD.js";
29
+ } from "./chunk-UGJVQPV4.js";
30
30
  import {
31
31
  CliCircuitBreaker,
32
32
  DEFAULT_CIRCUIT_BREAKER_CONFIG,
33
33
  getCliCircuitBreakerSnapshot,
34
34
  getDefaultCliCircuitBreakerRegistry
35
- } from "./chunk-5ALUADB6.js";
35
+ } from "./chunk-UGI7KJMY.js";
36
36
  import {
37
37
  CLI_SUBPROCESS_TIMEOUTS,
38
38
  CLI_TIMEOUTS,
@@ -69,7 +69,7 @@ import {
69
69
  ok,
70
70
  parseRetryAfterMs,
71
71
  resolveCliAlias
72
- } from "./chunk-CNHPSIHY.js";
72
+ } from "./chunk-QWA5PQMD.js";
73
73
 
74
74
  // src/cli-adapters/cli-to-model-adapter.ts
75
75
  var CliToModelAdapter = class {
@@ -2894,11 +2894,19 @@ var ClaudeResponseParser = class {
2894
2894
  return null;
2895
2895
  }
2896
2896
  const cachedInputTokens = extractNumberField(usageRecord, "cache_read_input_tokens");
2897
+ const cacheCreationInputTokens = extractNumberField(
2898
+ usageRecord,
2899
+ "cache_creation_input_tokens"
2900
+ );
2897
2901
  return {
2898
2902
  inputTokens,
2899
2903
  outputTokens,
2904
+ // NOTE: still uncached input + output. Folding the cache figures in
2905
+ // here is a semantics change for every consumer of totalTokens and
2906
+ // belongs with the threading increment on #4435, not this extraction.
2900
2907
  totalTokens: inputTokens + outputTokens,
2901
- ...cachedInputTokens !== null && { cachedInputTokens }
2908
+ ...cachedInputTokens !== null && { cachedInputTokens },
2909
+ ...cacheCreationInputTokens !== null && { cacheCreationInputTokens }
2902
2910
  };
2903
2911
  } catch {
2904
2912
  logger.debug("Skipped malformed output line", { snippet: raw.slice(0, 100) });
@@ -4198,39 +4206,6 @@ var OpenCodeResponseParser = class {
4198
4206
  }
4199
4207
  };
4200
4208
 
4201
- // src/config/resolve-live-model.ts
4202
- function splitTier(id) {
4203
- const colon = id.indexOf(":");
4204
- return colon >= 0 ? { base: id.slice(0, colon), tier: id.slice(colon) } : { base: id, tier: "" };
4205
- }
4206
- function isTokenBoundaryPrefix(prefix, full) {
4207
- if (prefix.length > full.length || !full.startsWith(prefix)) return false;
4208
- if (full.length === prefix.length) return true;
4209
- const next = full[prefix.length];
4210
- return next === "-" || next === "/";
4211
- }
4212
- function resolveLiveModelId(configured, available) {
4213
- const set = available instanceof Set ? available : new Set(available);
4214
- if (set.size === 0 || set.has(configured)) return configured;
4215
- const slash = configured.indexOf("/");
4216
- const providerPrefix = slash > 0 ? configured.slice(0, slash + 1) : "";
4217
- const cfg = splitTier(configured);
4218
- const candidates = [...set].filter((c) => providerPrefix === "" || c.startsWith(providerPrefix)).map((c) => splitTier(c)).filter((cand) => isTokenBoundaryPrefix(cand.base, cfg.base)).map((cand) => ({
4219
- id: cand.base + cand.tier,
4220
- baseLen: cand.base.length,
4221
- tierMatch: cand.tier === cfg.tier
4222
- }));
4223
- if (candidates.length === 0) return configured;
4224
- candidates.sort(
4225
- (a, b) => b.baseLen - a.baseLen || // most-specific simplification (closest to configured)
4226
- Number(b.tierMatch) - Number(a.tierMatch) || // matching :free / paid tier
4227
- a.id.length - b.id.length || // shorter overall
4228
- (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)
4229
- // lexicographic — fully deterministic
4230
- );
4231
- return candidates[0]?.id ?? configured;
4232
- }
4233
-
4234
4209
  // src/cli-adapters/adapters/opencode-adapter.ts
4235
4210
  var logger5 = createLogger({ component: "opencode-adapter" });
4236
4211
  var ALLOWED_VARIANTS = ["high", "max", "minimal"];
@@ -4342,18 +4317,7 @@ var OpenCodeCliAdapter = class extends SubprocessCliAdapter {
4342
4317
  /** Appends --model if the resolved model is usable (#1402, #3407, #3408). */
4343
4318
  appendModelArg(args, task) {
4344
4319
  const internalModel = task.model ?? this.model;
4345
- let cliModel = resolveOpenCodeModel(internalModel);
4346
- if (!this.isModelUsable(cliModel) && isDynamicModelsEnabled() && this.availableModels !== void 0) {
4347
- const usable = new Set([...this.availableModels].filter((m) => !this.isCooled(m)));
4348
- const resolved = resolveLiveModelId(cliModel, usable);
4349
- if (resolved !== cliModel) {
4350
- logger5.debug("Resolved to live/non-cooled model (#3407/#3408)", {
4351
- from: cliModel,
4352
- to: resolved
4353
- });
4354
- cliModel = resolved;
4355
- }
4356
- }
4320
+ const cliModel = resolveOpenCodeModel(internalModel);
4357
4321
  if (this.isModelUsable(cliModel)) {
4358
4322
  args.push("--model", cliModel);
4359
4323
  } else {
@@ -4741,4 +4705,4 @@ export {
4741
4705
  SdkAdapter,
4742
4706
  createAutoAdapter
4743
4707
  };
4744
- //# sourceMappingURL=chunk-N3XDPW64.js.map
4708
+ //# sourceMappingURL=chunk-V7JUMHM5.js.map