nexus-agents 4.12.2 → 4.13.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-KNFWHR5B.js → child-mcp-config-OULJI7VH.js} +2 -2
  2. package/dist/{chunk-OS6V6AUS.js → chunk-232RDSCM.js} +2 -2
  3. package/dist/{chunk-U34HVKOU.js → chunk-2OAOW7E2.js} +39 -37
  4. package/dist/chunk-2OAOW7E2.js.map +1 -0
  5. package/dist/{chunk-JDX7FSEE.js → chunk-4WVGF3SL.js} +4 -3
  6. package/dist/{chunk-JDX7FSEE.js.map → chunk-4WVGF3SL.js.map} +1 -1
  7. package/dist/{chunk-SIDH6NYX.js → chunk-56LJJOBN.js} +4 -4
  8. package/dist/{chunk-UUHVA3EP.js → chunk-5PCTGUMF.js} +3 -3
  9. package/dist/{chunk-AUFZGVPH.js → chunk-6454KSCM.js} +2 -2
  10. package/dist/{chunk-YBR5G3FR.js → chunk-7STKQ3IH.js} +2 -2
  11. package/dist/{chunk-Q6TVHHJS.js → chunk-ARTQO7XZ.js} +4 -4
  12. package/dist/{chunk-JEOQU5YQ.js → chunk-B6C3JCQB.js} +2 -2
  13. package/dist/{chunk-JBNA3RWX.js → chunk-C7EXWOXQ.js} +5 -5
  14. package/dist/{chunk-RTLSASIG.js → chunk-EHMMTCCS.js} +5 -5
  15. package/dist/{chunk-3JJ3QSJ6.js → chunk-F6MUN523.js} +2 -2
  16. package/dist/{chunk-WFZGUWWQ.js → chunk-F6SRPGDK.js} +28 -13
  17. package/dist/chunk-F6SRPGDK.js.map +1 -0
  18. package/dist/{chunk-PIOQ22BI.js → chunk-HBF7O6CN.js} +6 -6
  19. package/dist/{chunk-ADKJSLYH.js → chunk-I6JMAM4J.js} +2 -2
  20. package/dist/{chunk-UGXR3FGB.js → chunk-IZUT5OHH.js} +2 -2
  21. package/dist/{chunk-K6DDDK5U.js → chunk-J6JEW4QZ.js} +7 -7
  22. package/dist/{chunk-XUHVOLBI.js → chunk-KUGBMQAP.js} +3 -3
  23. package/dist/{chunk-7H6AIQFC.js → chunk-LUBCO6ZN.js} +2 -2
  24. package/dist/{chunk-D7NQCYON.js → chunk-NMNTYAV2.js} +2 -2
  25. package/dist/{chunk-3F7XUEXM.js → chunk-P45XNRHB.js} +2 -2
  26. package/dist/{chunk-QWKXEUR3.js → chunk-PWSW5Z4L.js} +2 -2
  27. package/dist/{chunk-WDICVPNC.js → chunk-TANMACVQ.js} +2 -2
  28. package/dist/{chunk-MWJLA3SK.js → chunk-V253VL7S.js} +3 -3
  29. package/dist/{chunk-R5HKFDMX.js → chunk-VENIFAMX.js} +4 -4
  30. package/dist/{chunk-VAKHNSKR.js → chunk-VPTDFOAK.js} +3 -3
  31. package/dist/{chunk-JYXU7XFQ.js → chunk-VZVGT4MN.js} +7 -5
  32. package/dist/chunk-VZVGT4MN.js.map +1 -0
  33. package/dist/{chunk-BQTQ5FSH.js → chunk-VZWNGPUH.js} +8 -8
  34. package/dist/{chunk-BDJ5H6BY.js → chunk-W6IZVEIM.js} +2 -2
  35. package/dist/{chunk-VXSEXHLF.js → chunk-WATNLQS7.js} +2 -2
  36. package/dist/{chunk-Z3XRX5G6.js → chunk-XGCYJLTP.js} +8 -8
  37. package/dist/{chunk-Z46NIT6Y.js → chunk-XWIFBBBH.js} +2 -2
  38. package/dist/{chunk-U3ULCRR5.js → chunk-YHY5AZL2.js} +2 -2
  39. package/dist/{cli-circuit-breaker-O3SRTC2D.js → cli-circuit-breaker-4AVWA333.js} +3 -3
  40. package/dist/cli.js +46 -51
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-FGCCXTW7.js → composite-router-7OTZN7NS.js} +2 -2
  43. package/dist/{consensus-vote-6XPXNECR.js → consensus-vote-KFLDRUJJ.js} +16 -16
  44. package/dist/{context-retriever-5ZTWDBOB.js → context-retriever-2NZWXF6Z.js} +8 -8
  45. package/dist/{doctor-deep-LMVPV2XK.js → doctor-deep-MC2FGSAF.js} +3 -3
  46. package/dist/{doctor-live-I5EMLG2W.js → doctor-live-25LRXKBO.js} +9 -9
  47. package/dist/{expert-bridge-XCOFEAAH.js → expert-bridge-2YLK3E6Q.js} +4 -4
  48. package/dist/{factory-UWBH5S4U.js → factory-G57M6CD4.js} +5 -5
  49. package/dist/{factory-RO6WFMAM.js → factory-T7KN4CKD.js} +9 -9
  50. package/dist/{improvement-review-4WOLRVMB.js → improvement-review-FFADRM4I.js} +5 -5
  51. package/dist/index.d.ts +17 -0
  52. package/dist/index.js +30 -30
  53. package/dist/{init-opencode-HDVB7A2E.js → init-opencode-OSZF74AL.js} +6 -6
  54. package/dist/issue-triage-KVYM5FQ5.js +17 -0
  55. package/dist/{pr-reviewer-helpers-7ER77ZQO.js → pr-reviewer-helpers-E3QXOVMT.js} +4 -4
  56. package/dist/{registry-command-DKJVYKGI.js → registry-command-ZMKZ5CRZ.js} +2 -2
  57. package/dist/{repo-security-plan-KTLCJNJ4.js → repo-security-plan-BPET6KTP.js} +3 -3
  58. package/dist/{research-helpers-synthesize-D4W5C27B.js → research-helpers-synthesize-M4SONOWL.js} +4 -4
  59. package/dist/{routing-memory-ZV5EBOKF.js → routing-memory-3UWP6NOX.js} +2 -2
  60. package/dist/{session-memory-VOPXMUVU.js → session-memory-N2ABITF7.js} +3 -3
  61. package/dist/{setup-command-TNHWMJIJ.js → setup-command-BXIJOFRP.js} +14 -14
  62. package/dist/{setup-config-JUJWPZW3.js → setup-config-PJNXP57G.js} +3 -3
  63. package/dist/{setup-custom-api-WCVFLOCN.js → setup-custom-api-PE2M5HWL.js} +4 -4
  64. package/dist/{tool-memory-FSBMC4MW.js → tool-memory-CARCDHTN.js} +5 -5
  65. package/dist/{unified-registry-QV2LXC45.js → unified-registry-HVALHHPY.js} +10 -10
  66. package/dist/{weather-report-J6LIGRJ7.js → weather-report-ZA7DBOC3.js} +2 -2
  67. package/package.json +1 -1
  68. package/dist/chunk-JYXU7XFQ.js.map +0 -1
  69. package/dist/chunk-U34HVKOU.js.map +0 -1
  70. package/dist/chunk-WFZGUWWQ.js.map +0 -1
  71. package/dist/issue-triage-HJQK7C6D.js +0 -17
  72. /package/dist/{child-mcp-config-KNFWHR5B.js.map → child-mcp-config-OULJI7VH.js.map} +0 -0
  73. /package/dist/{chunk-OS6V6AUS.js.map → chunk-232RDSCM.js.map} +0 -0
  74. /package/dist/{chunk-SIDH6NYX.js.map → chunk-56LJJOBN.js.map} +0 -0
  75. /package/dist/{chunk-UUHVA3EP.js.map → chunk-5PCTGUMF.js.map} +0 -0
  76. /package/dist/{chunk-AUFZGVPH.js.map → chunk-6454KSCM.js.map} +0 -0
  77. /package/dist/{chunk-YBR5G3FR.js.map → chunk-7STKQ3IH.js.map} +0 -0
  78. /package/dist/{chunk-Q6TVHHJS.js.map → chunk-ARTQO7XZ.js.map} +0 -0
  79. /package/dist/{chunk-JEOQU5YQ.js.map → chunk-B6C3JCQB.js.map} +0 -0
  80. /package/dist/{chunk-JBNA3RWX.js.map → chunk-C7EXWOXQ.js.map} +0 -0
  81. /package/dist/{chunk-RTLSASIG.js.map → chunk-EHMMTCCS.js.map} +0 -0
  82. /package/dist/{chunk-3JJ3QSJ6.js.map → chunk-F6MUN523.js.map} +0 -0
  83. /package/dist/{chunk-PIOQ22BI.js.map → chunk-HBF7O6CN.js.map} +0 -0
  84. /package/dist/{chunk-ADKJSLYH.js.map → chunk-I6JMAM4J.js.map} +0 -0
  85. /package/dist/{chunk-UGXR3FGB.js.map → chunk-IZUT5OHH.js.map} +0 -0
  86. /package/dist/{chunk-K6DDDK5U.js.map → chunk-J6JEW4QZ.js.map} +0 -0
  87. /package/dist/{chunk-XUHVOLBI.js.map → chunk-KUGBMQAP.js.map} +0 -0
  88. /package/dist/{chunk-7H6AIQFC.js.map → chunk-LUBCO6ZN.js.map} +0 -0
  89. /package/dist/{chunk-D7NQCYON.js.map → chunk-NMNTYAV2.js.map} +0 -0
  90. /package/dist/{chunk-3F7XUEXM.js.map → chunk-P45XNRHB.js.map} +0 -0
  91. /package/dist/{chunk-QWKXEUR3.js.map → chunk-PWSW5Z4L.js.map} +0 -0
  92. /package/dist/{chunk-WDICVPNC.js.map → chunk-TANMACVQ.js.map} +0 -0
  93. /package/dist/{chunk-MWJLA3SK.js.map → chunk-V253VL7S.js.map} +0 -0
  94. /package/dist/{chunk-R5HKFDMX.js.map → chunk-VENIFAMX.js.map} +0 -0
  95. /package/dist/{chunk-VAKHNSKR.js.map → chunk-VPTDFOAK.js.map} +0 -0
  96. /package/dist/{chunk-BQTQ5FSH.js.map → chunk-VZWNGPUH.js.map} +0 -0
  97. /package/dist/{chunk-BDJ5H6BY.js.map → chunk-W6IZVEIM.js.map} +0 -0
  98. /package/dist/{chunk-VXSEXHLF.js.map → chunk-WATNLQS7.js.map} +0 -0
  99. /package/dist/{chunk-Z3XRX5G6.js.map → chunk-XGCYJLTP.js.map} +0 -0
  100. /package/dist/{chunk-Z46NIT6Y.js.map → chunk-XWIFBBBH.js.map} +0 -0
  101. /package/dist/{chunk-U3ULCRR5.js.map → chunk-YHY5AZL2.js.map} +0 -0
  102. /package/dist/{cli-circuit-breaker-O3SRTC2D.js.map → cli-circuit-breaker-4AVWA333.js.map} +0 -0
  103. /package/dist/{composite-router-FGCCXTW7.js.map → composite-router-7OTZN7NS.js.map} +0 -0
  104. /package/dist/{consensus-vote-6XPXNECR.js.map → consensus-vote-KFLDRUJJ.js.map} +0 -0
  105. /package/dist/{context-retriever-5ZTWDBOB.js.map → context-retriever-2NZWXF6Z.js.map} +0 -0
  106. /package/dist/{doctor-deep-LMVPV2XK.js.map → doctor-deep-MC2FGSAF.js.map} +0 -0
  107. /package/dist/{doctor-live-I5EMLG2W.js.map → doctor-live-25LRXKBO.js.map} +0 -0
  108. /package/dist/{expert-bridge-XCOFEAAH.js.map → expert-bridge-2YLK3E6Q.js.map} +0 -0
  109. /package/dist/{factory-RO6WFMAM.js.map → factory-G57M6CD4.js.map} +0 -0
  110. /package/dist/{factory-UWBH5S4U.js.map → factory-T7KN4CKD.js.map} +0 -0
  111. /package/dist/{improvement-review-4WOLRVMB.js.map → improvement-review-FFADRM4I.js.map} +0 -0
  112. /package/dist/{init-opencode-HDVB7A2E.js.map → init-opencode-OSZF74AL.js.map} +0 -0
  113. /package/dist/{issue-triage-HJQK7C6D.js.map → issue-triage-KVYM5FQ5.js.map} +0 -0
  114. /package/dist/{pr-reviewer-helpers-7ER77ZQO.js.map → pr-reviewer-helpers-E3QXOVMT.js.map} +0 -0
  115. /package/dist/{registry-command-DKJVYKGI.js.map → registry-command-ZMKZ5CRZ.js.map} +0 -0
  116. /package/dist/{repo-security-plan-KTLCJNJ4.js.map → repo-security-plan-BPET6KTP.js.map} +0 -0
  117. /package/dist/{research-helpers-synthesize-D4W5C27B.js.map → research-helpers-synthesize-M4SONOWL.js.map} +0 -0
  118. /package/dist/{routing-memory-ZV5EBOKF.js.map → routing-memory-3UWP6NOX.js.map} +0 -0
  119. /package/dist/{session-memory-VOPXMUVU.js.map → session-memory-N2ABITF7.js.map} +0 -0
  120. /package/dist/{setup-command-TNHWMJIJ.js.map → setup-command-BXIJOFRP.js.map} +0 -0
  121. /package/dist/{setup-config-JUJWPZW3.js.map → setup-config-PJNXP57G.js.map} +0 -0
  122. /package/dist/{setup-custom-api-WCVFLOCN.js.map → setup-custom-api-PE2M5HWL.js.map} +0 -0
  123. /package/dist/{tool-memory-FSBMC4MW.js.map → tool-memory-CARCDHTN.js.map} +0 -0
  124. /package/dist/{unified-registry-QV2LXC45.js.map → unified-registry-HVALHHPY.js.map} +0 -0
  125. /package/dist/{weather-report-J6LIGRJ7.js.map → weather-report-ZA7DBOC3.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-WFZGUWWQ.js";
3
+ } from "./chunk-F6SRPGDK.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-UGXR3FGB.js";
7
+ } from "./chunk-IZUT5OHH.js";
8
8
  import {
9
9
  CLI_NAMES,
10
10
  CircularBuffer,
@@ -22,7 +22,7 @@ import {
22
22
  ok,
23
23
  recordRateLimitEvent,
24
24
  toRateLimitError
25
- } from "./chunk-JDX7FSEE.js";
25
+ } from "./chunk-4WVGF3SL.js";
26
26
 
27
27
  // src/agents/collaboration/event-bus-helpers.ts
28
28
  import { randomUUID } from "crypto";
@@ -863,4 +863,4 @@ export {
863
863
  getGlobalRegistry,
864
864
  resetGlobalRegistry
865
865
  };
866
- //# sourceMappingURL=chunk-SIDH6NYX.js.map
866
+ //# sourceMappingURL=chunk-56LJJOBN.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  loadPapersRegistry
3
- } from "./chunk-QWKXEUR3.js";
3
+ } from "./chunk-PWSW5Z4L.js";
4
4
  import {
5
5
  getErrorMessage
6
- } from "./chunk-JDX7FSEE.js";
6
+ } from "./chunk-4WVGF3SL.js";
7
7
 
8
8
  // src/cli/research-helpers-synthesize.ts
9
9
  import { z } from "zod";
@@ -876,4 +876,4 @@ export {
876
876
  AttributedInsightSchema,
877
877
  synthesizeResearch
878
878
  };
879
- //# sourceMappingURL=chunk-UUHVA3EP.js.map
879
+ //# sourceMappingURL=chunk-5PCTGUMF.js.map
@@ -13,7 +13,7 @@ import {
13
13
  lookupInTreeCapability,
14
14
  ok,
15
15
  resolveRetryAfterMs
16
- } from "./chunk-JDX7FSEE.js";
16
+ } from "./chunk-4WVGF3SL.js";
17
17
 
18
18
  // src/config/model-parameter-support.ts
19
19
  function parseClaudeMajorMinor(bareId) {
@@ -834,4 +834,4 @@ export {
834
834
  DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
835
835
  collectStream
836
836
  };
837
- //# sourceMappingURL=chunk-AUFZGVPH.js.map
837
+ //# sourceMappingURL=chunk-6454KSCM.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  err,
5
5
  ok
6
- } from "./chunk-JDX7FSEE.js";
6
+ } from "./chunk-4WVGF3SL.js";
7
7
 
8
8
  // src/adapters/sdk/types.ts
9
9
  var PROVIDER_ENV_KEYS = {
@@ -227,4 +227,4 @@ export {
227
227
  validateCustomApiBaseUrl,
228
228
  assertCustomApiHostResolvesPublic
229
229
  };
230
- //# sourceMappingURL=chunk-YBR5G3FR.js.map
230
+ //# sourceMappingURL=chunk-7STKQ3IH.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-WDICVPNC.js";
8
+ } from "./chunk-TANMACVQ.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-ADKJSLYH.js";
18
+ } from "./chunk-I6JMAM4J.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-JDX7FSEE.js";
31
+ } from "./chunk-4WVGF3SL.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-OQLFRJCW.js";
@@ -5550,4 +5550,4 @@ export {
5550
5550
  reinitializeMemoryBackends,
5551
5551
  ToolMemoryManager
5552
5552
  };
5553
- //# sourceMappingURL=chunk-Q6TVHHJS.js.map
5553
+ //# sourceMappingURL=chunk-ARTQO7XZ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  createGetRetryConfig,
12
12
  createGetTimeout,
13
13
  createGetToolRateLimit
14
- } from "./chunk-JDX7FSEE.js";
14
+ } from "./chunk-4WVGF3SL.js";
15
15
 
16
16
  // src/config/defaults.ts
17
17
  var CUSTOM_API_DEFAULT_MODEL = "gpt-5.5";
@@ -230,4 +230,4 @@ export {
230
230
  CUSTOM_API_DEFAULT_MODEL,
231
231
  DEFAULTS
232
232
  };
233
- //# sourceMappingURL=chunk-JEOQU5YQ.js.map
233
+ //# sourceMappingURL=chunk-B6C3JCQB.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-WPLXWTUK.js";
6
6
  import {
7
7
  runConfigInitSync
8
- } from "./chunk-OS6V6AUS.js";
8
+ } from "./chunk-232RDSCM.js";
9
9
  import {
10
10
  VERSION,
11
11
  checkApiKeys,
@@ -14,13 +14,13 @@ import {
14
14
  defaultConfig,
15
15
  initDataDirectories,
16
16
  loadConfig
17
- } from "./chunk-BQTQ5FSH.js";
17
+ } from "./chunk-VZWNGPUH.js";
18
18
  import {
19
19
  BUILT_IN_EXPERTS
20
20
  } from "./chunk-YPNQPT2F.js";
21
21
  import {
22
22
  probeAllClis
23
- } from "./chunk-WFZGUWWQ.js";
23
+ } from "./chunk-F6SRPGDK.js";
24
24
  import {
25
25
  CLI_SUBPROCESS_TIMEOUTS,
26
26
  colors,
@@ -31,7 +31,7 @@ import {
31
31
  getErrorMessage,
32
32
  getTimeProvider,
33
33
  symbols
34
- } from "./chunk-JDX7FSEE.js";
34
+ } from "./chunk-4WVGF3SL.js";
35
35
  import {
36
36
  ensureGitignored,
37
37
  findRepoRoot
@@ -1939,4 +1939,4 @@ export {
1939
1939
  setupCommand,
1940
1940
  setupCommandAsync
1941
1941
  };
1942
- //# sourceMappingURL=chunk-JBNA3RWX.js.map
1942
+ //# sourceMappingURL=chunk-C7EXWOXQ.js.map
@@ -4,16 +4,16 @@ import {
4
4
  loadPapersRegistry,
5
5
  loadTechniquesRegistry,
6
6
  savePapersRegistry
7
- } from "./chunk-QWKXEUR3.js";
7
+ } from "./chunk-PWSW5Z4L.js";
8
8
  import {
9
9
  resolveInsideRoot
10
10
  } from "./chunk-NUBSJGQZ.js";
11
11
  import {
12
12
  resolveToken
13
- } from "./chunk-3F7XUEXM.js";
13
+ } from "./chunk-P45XNRHB.js";
14
14
  import {
15
15
  getToolMemory
16
- } from "./chunk-Q6TVHHJS.js";
16
+ } from "./chunk-ARTQO7XZ.js";
17
17
  import {
18
18
  capitalizeWords,
19
19
  tokenizeFiltered,
@@ -39,7 +39,7 @@ import {
39
39
  getTimeProvider,
40
40
  ok,
41
41
  registerPersistentDistillerFactory
42
- } from "./chunk-JDX7FSEE.js";
42
+ } from "./chunk-4WVGF3SL.js";
43
43
  import {
44
44
  ensureLearningDir,
45
45
  getRulesFile
@@ -4129,4 +4129,4 @@ export {
4129
4129
  DEFAULT_CONTEXT_BUDGET_TOKENS,
4130
4130
  getContextPromptPrefix
4131
4131
  };
4132
- //# sourceMappingURL=chunk-RTLSASIG.js.map
4132
+ //# sourceMappingURL=chunk-EHMMTCCS.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CACHE_TIMEOUTS,
3
3
  createLogger,
4
4
  getTimeProvider
5
- } from "./chunk-JDX7FSEE.js";
5
+ } from "./chunk-4WVGF3SL.js";
6
6
 
7
7
  // src/security/trust-types.ts
8
8
  import { z } from "zod";
@@ -560,4 +560,4 @@ export {
560
560
  resolveReputationGatingMode,
561
561
  gateWithReputation
562
562
  };
563
- //# sourceMappingURL=chunk-3JJ3QSJ6.js.map
563
+ //# sourceMappingURL=chunk-F6MUN523.js.map
@@ -5,34 +5,34 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-AUFZGVPH.js";
8
+ } from "./chunk-6454KSCM.js";
9
9
  import {
10
10
  CUSTOM_API_DEFAULT_MODEL
11
- } from "./chunk-JEOQU5YQ.js";
11
+ } from "./chunk-B6C3JCQB.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-YBR5G3FR.js";
17
+ } from "./chunk-7STKQ3IH.js";
18
18
  import {
19
19
  nexusMkdtempSync
20
20
  } from "./chunk-SNJNRDKZ.js";
21
21
  import {
22
22
  getAvailabilityCache
23
- } from "./chunk-BDJ5H6BY.js";
23
+ } from "./chunk-W6IZVEIM.js";
24
24
  import {
25
25
  extractSystemPrompt
26
26
  } from "./chunk-QZUG667L.js";
27
27
  import {
28
28
  generateHyphenId
29
- } from "./chunk-ADKJSLYH.js";
29
+ } from "./chunk-I6JMAM4J.js";
30
30
  import {
31
31
  CliCircuitBreaker,
32
32
  DEFAULT_CIRCUIT_BREAKER_CONFIG,
33
33
  getCliCircuitBreakerSnapshot,
34
34
  getDefaultCliCircuitBreakerRegistry
35
- } from "./chunk-UGXR3FGB.js";
35
+ } from "./chunk-IZUT5OHH.js";
36
36
  import {
37
37
  CLI_SUBPROCESS_TIMEOUTS,
38
38
  CLI_TIMEOUTS,
@@ -72,7 +72,7 @@ import {
72
72
  resolveCliAlias,
73
73
  resolveRetryAfterMs,
74
74
  retryAfterMsFromContext
75
- } from "./chunk-JDX7FSEE.js";
75
+ } from "./chunk-4WVGF3SL.js";
76
76
 
77
77
  // src/cli-adapters/cli-to-model-adapter.ts
78
78
  var CliToModelAdapter = class {
@@ -748,7 +748,7 @@ function extractRequestSystemPrompt(request) {
748
748
  }
749
749
 
750
750
  // src/adapters/claude-adapter.ts
751
- var ClaudeAdapter = class extends BaseAdapter {
751
+ var ClaudeAdapter = class _ClaudeAdapter extends BaseAdapter {
752
752
  client;
753
753
  resolvedModelId;
754
754
  /**
@@ -932,6 +932,15 @@ var ClaudeAdapter = class extends BaseAdapter {
932
932
  ...dropped.length > 0 ? { warnings: dropped } : {}
933
933
  };
934
934
  }
935
+ /** Usage for a `message_start` chunk, omitted when the vendor sent none (#4835). */
936
+ static usageFrom(raw) {
937
+ const inputTokens = raw?.input_tokens;
938
+ if (typeof inputTokens !== "number") return {};
939
+ const outputTokens = typeof raw?.output_tokens === "number" ? raw.output_tokens : 0;
940
+ return {
941
+ usage: { inputTokens, outputTokens, totalTokens: inputTokens + outputTokens }
942
+ };
943
+ }
935
944
  /**
936
945
  * Maps Anthropic stream events to our StreamChunk format.
937
946
  */
@@ -940,7 +949,8 @@ var ClaudeAdapter = class extends BaseAdapter {
940
949
  case "message_start":
941
950
  return {
942
951
  type: "message_start",
943
- message: { model: event.message.model }
952
+ message: { model: event.message.model },
953
+ ..._ClaudeAdapter.usageFrom(event.message.usage)
944
954
  };
945
955
  case "content_block_start":
946
956
  return {
@@ -967,8 +977,11 @@ var ClaudeAdapter = class extends BaseAdapter {
967
977
  type: "message_delta",
968
978
  delta: { stop_reason: mapStopReason(event.delta.stop_reason ?? null) },
969
979
  usage: {
980
+ // Genuinely absent on this event; the real count was emitted on
981
+ // message_start above. Flagged so `totalTokens` reads as the
982
+ // lower bound it is rather than as a total (#4835).
970
983
  inputTokens: 0,
971
- // Not available in delta
984
+ inputTokensMeasured: false,
972
985
  outputTokens: event.usage.output_tokens,
973
986
  totalTokens: event.usage.output_tokens
974
987
  }
@@ -1377,8 +1390,10 @@ var SdkAdapter = class extends BaseAdapter {
1377
1390
  index++;
1378
1391
  yield {
1379
1392
  type: "message_delta",
1380
- delta: { stop_reason: "end_turn" },
1381
- usage: { inputTokens: 0, outputTokens: 0, totalTokens: 0 }
1393
+ delta: { stop_reason: "end_turn" }
1394
+ // #4835: no usage is reported on this path, so none is emitted —
1395
+ // zero-filling all three made an unmeasured stream indistinguishable
1396
+ // from one that consumed nothing. `usage` is optional on the chunk.
1382
1397
  };
1383
1398
  yield { type: "message_stop" };
1384
1399
  }
@@ -4870,4 +4885,4 @@ export {
4870
4885
  SdkAdapter,
4871
4886
  createAutoAdapter
4872
4887
  };
4873
- //# sourceMappingURL=chunk-WFZGUWWQ.js.map
4888
+ //# sourceMappingURL=chunk-F6SRPGDK.js.map