xkzoom 1.5.2 → 1.5.3

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 (227) hide show
  1. package/README.md +57 -43
  2. package/dist/{chunk-VPRVZWF3.mjs → chunk-37LYF6K2.mjs} +1 -1
  3. package/dist/{chunk-OCQUSYRP.mjs → chunk-3EV63LAA.mjs} +12 -12
  4. package/dist/{chunk-W4MKSQGZ.mjs → chunk-3FF266OG.mjs} +1 -1
  5. package/dist/{chunk-J5HTLG3V.mjs → chunk-3LR4CLDE.mjs} +1 -1
  6. package/dist/{chunk-CDLS44GZ.mjs → chunk-3TTLV2GM.mjs} +1 -1
  7. package/dist/{chunk-JG3EPJ32.mjs → chunk-54GVKP6B.mjs} +6 -6
  8. package/dist/{chunk-M52HZV6R.mjs → chunk-5VR6UOGC.mjs} +1 -1
  9. package/dist/{chunk-GBG4AJON.mjs → chunk-6EI5MFLD.mjs} +4 -4
  10. package/dist/{chunk-A23OTVH2.mjs → chunk-6LKZYMIW.mjs} +30 -30
  11. package/dist/{chunk-TAQQSDJN.mjs → chunk-6SYECCCG.mjs} +6 -6
  12. package/dist/{chunk-24GJWXMG.mjs → chunk-7MOQ462O.mjs} +1 -1
  13. package/dist/{chunk-LFZAVCVW.mjs → chunk-AJNXWGX2.mjs} +1 -1
  14. package/dist/{chunk-5DMSAPS2.mjs → chunk-APQRVOZQ.mjs} +5 -5
  15. package/dist/{chunk-YAD4VG2K.mjs → chunk-BHT6B2TV.mjs} +36 -6
  16. package/dist/{chunk-BV76CMVR.mjs → chunk-BN273XTH.mjs} +1 -1
  17. package/dist/{chunk-IXYH42YO.mjs → chunk-C5VQPAOA.mjs} +1 -1
  18. package/dist/{chunk-PY7W2X6W.mjs → chunk-CQAQRU4P.mjs} +114 -107
  19. package/dist/{chunk-Q4XUEIOE.mjs → chunk-CVIZMDMZ.mjs} +1 -1
  20. package/dist/{chunk-SIIEMWE3.mjs → chunk-DB4XTPJF.mjs} +7 -7
  21. package/dist/{chunk-URF75O5Z.mjs → chunk-DBYEZK64.mjs} +1 -1
  22. package/dist/{chunk-GIAML5K5.mjs → chunk-DQ7J7RST.mjs} +1 -1
  23. package/dist/{chunk-BHMWYAVS.mjs → chunk-DXPZNBSQ.mjs} +3 -3
  24. package/dist/chunk-E5LABIPO.mjs +201 -0
  25. package/dist/{chunk-A5DUSLHF.mjs → chunk-ED4H2DM7.mjs} +1 -1
  26. package/dist/{chunk-KYTJH3R3.mjs → chunk-EE3NRJLQ.mjs} +1 -1
  27. package/dist/{chunk-T4LPE43H.mjs → chunk-ESYRDWFO.mjs} +11 -11
  28. package/dist/{chunk-CQUISJWG.mjs → chunk-EYK3W2NV.mjs} +1 -1
  29. package/dist/{chunk-Z7GTU7KF.mjs → chunk-FAJHYXNU.mjs} +5 -5
  30. package/dist/{chunk-XHO73X2N.mjs → chunk-FKCGJ3BF.mjs} +2 -2
  31. package/dist/{chunk-HJN232FK.mjs → chunk-FLVJABFP.mjs} +1 -1
  32. package/dist/{chunk-H5DIQHEQ.mjs → chunk-FZ7NLBVP.mjs} +45 -16
  33. package/dist/{chunk-HTU5W436.mjs → chunk-G5LQ2PQ6.mjs} +2 -2
  34. package/dist/{chunk-LTBQWMAJ.mjs → chunk-GSIZ5FR6.mjs} +2 -2
  35. package/dist/{chunk-UANVP2AV.mjs → chunk-H4BNL7XG.mjs} +1 -1
  36. package/dist/{chunk-Q6XX6X24.mjs → chunk-I4LMW3IM.mjs} +1 -1
  37. package/dist/{chunk-VIZQURO5.mjs → chunk-IGJFAE72.mjs} +9 -9
  38. package/dist/{chunk-7AZVQS2H.mjs → chunk-IVR74IXK.mjs} +7 -7
  39. package/dist/{chunk-YILSXMZI.mjs → chunk-KI7AMK7P.mjs} +3 -3
  40. package/dist/{chunk-EQNHKW6L.mjs → chunk-LJF6JSJB.mjs} +1 -1
  41. package/dist/{chunk-JD5NPIMO.mjs → chunk-LSQ47CLM.mjs} +27 -27
  42. package/dist/{chunk-IPIV4NGB.mjs → chunk-LXEKUNXI.mjs} +6 -6
  43. package/dist/{chunk-HR43WO4Q.mjs → chunk-M6VHS3HQ.mjs} +2 -2
  44. package/dist/{chunk-4DYFM3EC.mjs → chunk-MI6GFOCU.mjs} +4 -4
  45. package/dist/{chunk-CFZVBILR.mjs → chunk-MIXYB6BH.mjs} +1 -1
  46. package/dist/{chunk-K4RHLREV.mjs → chunk-MVKCMXBY.mjs} +1 -1
  47. package/dist/{chunk-JG3K4N5B.mjs → chunk-NIV5GVCE.mjs} +1 -1
  48. package/dist/{chunk-ZTKJR7OC.mjs → chunk-OWIXULFQ.mjs} +1 -1
  49. package/dist/{chunk-Y6SJUTY6.mjs → chunk-P262PAGZ.mjs} +15 -2
  50. package/dist/{chunk-5JGUBBXN.mjs → chunk-PBBRBETA.mjs} +4 -4
  51. package/dist/{chunk-EGWLJJY7.mjs → chunk-QSHIFD37.mjs} +2 -2
  52. package/dist/{chunk-WJIY3BIA.mjs → chunk-QSQ274C6.mjs} +44 -16
  53. package/dist/{chunk-H5TJYSTV.mjs → chunk-QSUD6TNR.mjs} +5 -5
  54. package/dist/{chunk-YPAQRMUI.mjs → chunk-QYXYVBTO.mjs} +2 -2
  55. package/dist/{chunk-OB4JJLDC.mjs → chunk-RVW5XO4A.mjs} +4 -4
  56. package/dist/{chunk-CNHOCDRM.mjs → chunk-RYSPXH7G.mjs} +2 -2
  57. package/dist/{chunk-CCCPWU2O.mjs → chunk-RZW4EEPW.mjs} +22 -22
  58. package/dist/{chunk-GGWUDW5W.mjs → chunk-S5ROBD7X.mjs} +2 -2
  59. package/dist/{chunk-QUXUHJZW.mjs → chunk-SQHTVHQ7.mjs} +7 -7
  60. package/dist/{chunk-ZM23SMRO.mjs → chunk-T5ZCLYLJ.mjs} +1 -1
  61. package/dist/{chunk-NYG3IUXK.mjs → chunk-TER7DFHP.mjs} +1 -1
  62. package/dist/{chunk-RTANSWHW.mjs → chunk-THN36GA5.mjs} +27 -27
  63. package/dist/{chunk-GUADF3KN.mjs → chunk-ULXTQSV6.mjs} +4 -0
  64. package/dist/{chunk-PG5CHH66.mjs → chunk-VHRFLCMY.mjs} +1 -1
  65. package/dist/{chunk-BSQF7NF4.mjs → chunk-W7OJPFTN.mjs} +2 -2
  66. package/dist/{chunk-S7FQBXOO.mjs → chunk-WGLYR2YT.mjs} +1 -1
  67. package/dist/{chunk-G5ZU7562.mjs → chunk-WNI5ZPQY.mjs} +7 -7
  68. package/dist/{chunk-7FLALKSN.mjs → chunk-WRRJFJ2N.mjs} +7 -7
  69. package/dist/{chunk-ILROJZBI.mjs → chunk-WV6OKJ4J.mjs} +37 -9
  70. package/dist/{chunk-ASIBETCT.mjs → chunk-X7P6B2LK.mjs} +10 -10
  71. package/dist/{chunk-MWRQORKQ.mjs → chunk-XF4EURDX.mjs} +1 -1
  72. package/dist/{chunk-ETD5LGJY.mjs → chunk-Z3COATFF.mjs} +1 -1
  73. package/dist/index.js +336 -31
  74. package/dist/index.mjs +169 -168
  75. package/dist/mobile/action-planner.js +21 -1
  76. package/dist/mobile/action-planner.mjs +95 -94
  77. package/dist/mobile/agent-capabilities.js +21 -1
  78. package/dist/mobile/agent-capabilities.mjs +96 -95
  79. package/dist/mobile/agent-shop/handlers.mjs +3 -3
  80. package/dist/mobile/anthropic-incremental-deliver.js +19 -0
  81. package/dist/mobile/anthropic-incremental-deliver.mjs +3 -2
  82. package/dist/mobile/anthropic-messages-turn-runner.js +224 -8
  83. package/dist/mobile/anthropic-messages-turn-runner.mjs +104 -103
  84. package/dist/mobile/anthropic-owned-tool-executor.js +21 -1
  85. package/dist/mobile/anthropic-owned-tool-executor.mjs +103 -102
  86. package/dist/mobile/api.mjs +49 -49
  87. package/dist/mobile/context-compact/compact-artifact-enrich.js +19 -0
  88. package/dist/mobile/context-compact/compact-artifact-enrich.mjs +16 -15
  89. package/dist/mobile/context-compact/compact-artifact-writer.mjs +4 -4
  90. package/dist/mobile/context-compact/compact-engine-artifacts.mjs +5 -5
  91. package/dist/mobile/context-compact/compact-memory-distill-job.mjs +3 -3
  92. package/dist/mobile/context-compact/compact-message-collector.mjs +2 -2
  93. package/dist/mobile/context-compact/compact-orchestrator.js +21 -1
  94. package/dist/mobile/context-compact/compact-orchestrator.mjs +34 -33
  95. package/dist/mobile/context-compact/compact-resume-prefetch.mjs +4 -4
  96. package/dist/mobile/context-compact/compact-summarizer-engine-artifact.js +19 -0
  97. package/dist/mobile/context-compact/compact-summarizer-engine-artifact.mjs +18 -17
  98. package/dist/mobile/context-compact/compact-summarizer-llm-request.js +19 -0
  99. package/dist/mobile/context-compact/compact-summarizer-llm-request.mjs +10 -9
  100. package/dist/mobile/context-compact/compact-summarizer-llm.js +19 -0
  101. package/dist/mobile/context-compact/compact-summarizer-llm.mjs +11 -10
  102. package/dist/mobile/context-compact/compact-summarizer.js +19 -0
  103. package/dist/mobile/context-compact/compact-summarizer.mjs +15 -14
  104. package/dist/mobile/context-compact/compact-write-verifier.mjs +2 -2
  105. package/dist/mobile/context-compact/context-budget-gate.js +14 -2
  106. package/dist/mobile/context-compact/context-budget-gate.mjs +2 -2
  107. package/dist/mobile/context-compact/runtime-compact-hook.js +33 -2
  108. package/dist/mobile/context-compact/runtime-compact-hook.mjs +99 -98
  109. package/dist/mobile/group/conductor-llm.js +19 -0
  110. package/dist/mobile/group/conductor-llm.mjs +13 -12
  111. package/dist/mobile/group/conductor-plan-llm.js +19 -0
  112. package/dist/mobile/group/conductor-plan-llm.mjs +19 -18
  113. package/dist/mobile/group/delivery-verification.mjs +4 -4
  114. package/dist/mobile/group/direct-chat-group-context.mjs +1 -1
  115. package/dist/mobile/group/execution-plan.mjs +5 -5
  116. package/dist/mobile/group/floor-scheduler.mjs +7 -7
  117. package/dist/mobile/group/floor-state-store.mjs +6 -6
  118. package/dist/mobile/group/group-api-handlers.mjs +38 -38
  119. package/dist/mobile/group/group-peer-private-context.mjs +1 -1
  120. package/dist/mobile/group/group-session.mjs +19 -19
  121. package/dist/mobile/group/index.mjs +32 -32
  122. package/dist/mobile/group/memory-supplement.mjs +10 -10
  123. package/dist/mobile/group/orchestrator.mjs +30 -30
  124. package/dist/mobile/group/pipeline-ceo-dept-mention-parse.mjs +3 -3
  125. package/dist/mobile/group/pipeline-handoff-verification.mjs +3 -3
  126. package/dist/mobile/group/pipeline-turn-outcome.mjs +2 -2
  127. package/dist/mobile/group/plan-runtime.mjs +18 -18
  128. package/dist/mobile/group/relation-distill.mjs +8 -8
  129. package/dist/mobile/group/runtime-integration.mjs +36 -36
  130. package/dist/mobile/index.js +336 -31
  131. package/dist/mobile/index.mjs +164 -163
  132. package/dist/mobile/interrupted-turn.js +5 -0
  133. package/dist/mobile/interrupted-turn.mjs +3 -1
  134. package/dist/mobile/memory-contract-r1-prefetch.mjs +11 -11
  135. package/dist/mobile/memory-contract-r5-empty-result.mjs +12 -12
  136. package/dist/mobile/memory-runtime-v2/eval-runner.mjs +4 -4
  137. package/dist/mobile/memory-runtime-v2/evidence-plan.mjs +5 -5
  138. package/dist/mobile/memory-runtime-v2/index.mjs +15 -15
  139. package/dist/mobile/memory-runtime-v2/memory-control-plane.mjs +5 -5
  140. package/dist/mobile/memory-runtime-v2/memory-readiness.mjs +5 -5
  141. package/dist/mobile/memory-runtime-v2/orchestrator.mjs +3 -3
  142. package/dist/mobile/memory-runtime-v2/public-api.mjs +6 -6
  143. package/dist/mobile/model-context-window-budget.js +16 -2
  144. package/dist/mobile/model-context-window-budget.mjs +3 -1
  145. package/dist/mobile/native-anthropic-messages-stream.js +223 -7
  146. package/dist/mobile/native-anthropic-messages-stream.mjs +11 -10
  147. package/dist/mobile/native-anthropic-turn-errors.mjs +2 -2
  148. package/dist/mobile/native-openai-text-stream.js +223 -6
  149. package/dist/mobile/native-openai-text-stream.mjs +2 -1
  150. package/dist/mobile/native-reply-route.js +19 -0
  151. package/dist/mobile/native-reply-route.mjs +10 -9
  152. package/dist/mobile/native-reply-system-prompt-layers.js +21 -1
  153. package/dist/mobile/native-reply-system-prompt-layers.mjs +96 -95
  154. package/dist/mobile/native-request-diagnostics.js +230 -0
  155. package/dist/mobile/native-request-diagnostics.mjs +17 -0
  156. package/dist/mobile/native-stream-block-emit.js +19 -0
  157. package/dist/mobile/native-stream-block-emit.mjs +2 -1
  158. package/dist/mobile/openai-completions-turn-runner.js +224 -8
  159. package/dist/mobile/openai-completions-turn-runner.mjs +104 -103
  160. package/dist/mobile/reply-dispatch-warmup.mjs +2 -2
  161. package/dist/mobile/runtime.js +336 -31
  162. package/dist/mobile/runtime.mjs +161 -160
  163. package/dist/mobile/stream-inbound/mobile-text-stream-pipeline.mjs +3 -3
  164. package/dist/mobile/tool-use-input-normalize.js +21 -1
  165. package/dist/mobile/tool-use-input-normalize.mjs +98 -97
  166. package/dist/mobile/tools/mobile-compact-tool-bridge.js +21 -1
  167. package/dist/mobile/tools/mobile-compact-tool-bridge.mjs +98 -97
  168. package/dist/org/dept-context.mjs +4 -4
  169. package/dist/org/index.mjs +14 -14
  170. package/dist/owned-tools/ceo-confirm-requirements.mjs +12 -12
  171. package/dist/owned-tools/ceo-decision.mjs +18 -18
  172. package/dist/owned-tools/ceo-ops-brief.mjs +12 -12
  173. package/dist/owned-tools/ceo-redirect.mjs +37 -37
  174. package/dist/owned-tools/commit-stack-lesson.mjs +13 -13
  175. package/dist/owned-tools/compact/execute.js +21 -1
  176. package/dist/owned-tools/compact/execute.mjs +96 -95
  177. package/dist/owned-tools/compact/gateway-tool-factory.js +21 -1
  178. package/dist/owned-tools/compact/gateway-tool-factory.mjs +97 -96
  179. package/dist/owned-tools/compact/registry.js +21 -1
  180. package/dist/owned-tools/compact/registry.mjs +95 -94
  181. package/dist/owned-tools/context-compact.js +21 -1
  182. package/dist/owned-tools/context-compact.mjs +42 -41
  183. package/dist/owned-tools/groups-history.mjs +1 -1
  184. package/dist/owned-tools/handoff.mjs +17 -17
  185. package/dist/owned-tools/memory-control.mjs +7 -7
  186. package/dist/owned-tools/memory-runtime-eval.mjs +6 -6
  187. package/dist/owned-tools/message.mjs +2 -2
  188. package/dist/owned-tools/models-list.mjs +2 -2
  189. package/dist/owned-tools/register-owned-providers.mjs +5 -5
  190. package/dist/owned-tools/registry.js +21 -1
  191. package/dist/owned-tools/registry.mjs +94 -93
  192. package/dist/owned-tools/router.js +21 -1
  193. package/dist/owned-tools/router.mjs +95 -94
  194. package/dist/owned-tools/runtime-bridge.js +21 -1
  195. package/dist/owned-tools/runtime-bridge.mjs +96 -95
  196. package/dist/owned-tools/session-status.mjs +1 -1
  197. package/dist/owned-tools/sessions-history-resolver.mjs +2 -2
  198. package/dist/owned-tools/sessions-history.mjs +1 -1
  199. package/dist/owned-tools/sessions-send.mjs +1 -1
  200. package/dist/owned-tools/subagents.mjs +1 -1
  201. package/dist/owned-tools/tool-contract-prompt.js +21 -1
  202. package/dist/owned-tools/tool-contract-prompt.mjs +95 -94
  203. package/dist/owned-tools/tool-result-envelope.js +21 -1
  204. package/dist/owned-tools/tool-result-envelope.mjs +97 -96
  205. package/dist/owned-tools/tool-usage-guide.js +21 -1
  206. package/dist/owned-tools/tool-usage-guide.mjs +94 -93
  207. package/dist/owned-tools/tts.mjs +4 -4
  208. package/dist/owned-tools/web-smoke.mjs +6 -6
  209. package/dist/project/file-tool-scope-default.mjs +6 -6
  210. package/dist/project-pipeline/handlers.mjs +37 -37
  211. package/dist/project-pipeline/index.mjs +40 -40
  212. package/dist/project-pipeline/pipeline-routing.mjs +2 -2
  213. package/dist/project-pipeline/post-close-skill-evolution.mjs +5 -5
  214. package/dist/project-pipeline/project-store.mjs +5 -5
  215. package/package.json +2 -2
  216. package/dist/{chunk-UNZ3D3B3.mjs → chunk-3OXBG4OP.mjs} +5 -5
  217. package/dist/{chunk-NRJWLPTI.mjs → chunk-6AY6OPO5.mjs} +3 -3
  218. package/dist/{chunk-JA65ZG3H.mjs → chunk-6ZWKLMY3.mjs} +4 -4
  219. package/dist/{chunk-T23H5D4O.mjs → chunk-AINHKBJW.mjs} +3 -3
  220. package/dist/{chunk-2BGXTBZX.mjs → chunk-D3N7EHB2.mjs} +8 -8
  221. package/dist/{chunk-JIY7IOQ5.mjs → chunk-DRY7AJMM.mjs} +3 -3
  222. package/dist/{chunk-QM7MTC5Q.mjs → chunk-H6LMX5G5.mjs} +3 -3
  223. package/dist/{chunk-2TBXT3PD.mjs → chunk-J74WVZGF.mjs} +6 -6
  224. package/dist/{chunk-WPLDZLAL.mjs → chunk-L7PMYQN5.mjs} +3 -3
  225. package/dist/{chunk-CORUFGMR.mjs → chunk-N3YQ5IL6.mjs} +7 -7
  226. package/dist/{chunk-5LUTMHVL.mjs → chunk-NXKHSX4M.mjs} +3 -3
  227. package/dist/{chunk-MGWYJD5Q.mjs → chunk-QCSNRVL2.mjs} +8 -8
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-6SZCPHCL.mjs";
5
5
  import {
6
6
  getGroupFloorState
7
- } from "./chunk-LFZAVCVW.mjs";
7
+ } from "./chunk-AJNXWGX2.mjs";
8
8
  import {
9
9
  defineTool
10
10
  } from "./chunk-DFJFMZX6.mjs";
@@ -27,18 +27,25 @@ import {
27
27
  registerDynamicDeptHandoff,
28
28
  resolveOrgProjectRootByTeamId,
29
29
  submitAuditVerdict
30
- } from "./chunk-UNZ3D3B3.mjs";
30
+ } from "./chunk-3OXBG4OP.mjs";
31
31
  import {
32
32
  isOrgPipelineCharter,
33
33
  resolvePeerDynamicDeptSlug,
34
34
  resolvePeerIsCeoAgent,
35
35
  resolvePeerPipelineRole,
36
36
  resolvePipelineDeptLeadBySlug
37
- } from "./chunk-TAQQSDJN.mjs";
37
+ } from "./chunk-6SYECCCG.mjs";
38
38
  import {
39
39
  deptLabelFromCharter,
40
40
  workspaceSubdirForDept
41
- } from "./chunk-JA65ZG3H.mjs";
41
+ } from "./chunk-6ZWKLMY3.mjs";
42
+ import {
43
+ loadPipelineCharter
44
+ } from "./chunk-KHQZ35IL.mjs";
45
+ import {
46
+ catalogSupportsVerdict,
47
+ resolveCatalogContract
48
+ } from "./chunk-HQLCDNMN.mjs";
42
49
  import {
43
50
  ORG_PIPELINE_ARTIFACT_KIND,
44
51
  ORG_PIPELINE_DEPT_LABELS,
@@ -47,13 +54,6 @@ import {
47
54
  activeDepartmentForPhase,
48
55
  isPipelineDepartmentId
49
56
  } from "./chunk-LREFRIQQ.mjs";
50
- import {
51
- loadPipelineCharter
52
- } from "./chunk-KHQZ35IL.mjs";
53
- import {
54
- catalogSupportsVerdict,
55
- resolveCatalogContract
56
- } from "./chunk-HQLCDNMN.mjs";
57
57
  import {
58
58
  loadTeamCharter
59
59
  } from "./chunk-KDZWHGGN.mjs";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-IKQPTA2J.mjs";
18
18
  import {
19
19
  registerUserSmokeReport
20
- } from "./chunk-UNZ3D3B3.mjs";
20
+ } from "./chunk-3OXBG4OP.mjs";
21
21
 
22
22
  // src/owned-tools/web-smoke.ts
23
23
  import { createHash } from "crypto";
@@ -1,16 +1,16 @@
1
+ import {
2
+ TOOLBOX_UI_META,
3
+ fallbackToolboxUiMeta
4
+ } from "./chunk-F2KFLTBF.mjs";
1
5
  import {
2
6
  OWNED_TURN_TOOL_CATALOG,
3
7
  resolveEnabledOwnedTurnTools
4
- } from "./chunk-RTANSWHW.mjs";
8
+ } from "./chunk-THN36GA5.mjs";
5
9
  import {
6
10
  gatewayAgentWantsFullToolLoop,
7
11
  init_native_gateway_config,
8
12
  resolveGatewayAgentToolsProfile
9
13
  } from "./chunk-LR5GC3NZ.mjs";
10
- import {
11
- TOOLBOX_UI_META,
12
- fallbackToolboxUiMeta
13
- } from "./chunk-F2KFLTBF.mjs";
14
14
  import {
15
15
  init_path
16
16
  } from "./chunk-PC5T3S3D.mjs";
@@ -13,7 +13,7 @@ import {
13
13
  handleMemoryProductControlPlaneRoute,
14
14
  readLastMemoryReadinessGate,
15
15
  readLastMemoryReadinessReport
16
- } from "./chunk-Q6XX6X24.mjs";
16
+ } from "./chunk-I4LMW3IM.mjs";
17
17
  import {
18
18
  buildMemorySoakEvidenceSummary,
19
19
  completeMemorySoakSession,
@@ -45,7 +45,7 @@ import {
45
45
  } from "./chunk-6SJTUWEO.mjs";
46
46
  import {
47
47
  buildContextPackForTurn
48
- } from "./chunk-CORUFGMR.mjs";
48
+ } from "./chunk-N3YQ5IL6.mjs";
49
49
  import {
50
50
  generateSkillEvolutionSuggestions
51
51
  } from "./chunk-J72V5GVI.mjs";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-4ELPLFOH.mjs";
12
12
  import {
13
13
  resolveTranscriptBudgetBytesForContextWindow
14
- } from "./chunk-Y6SJUTY6.mjs";
14
+ } from "./chunk-P262PAGZ.mjs";
15
15
 
16
16
  // src/mobile/context-compact/context-budget-gate.ts
17
17
  function resolveContextBudgetSignalSource() {
@@ -1,6 +1,18 @@
1
+ import {
2
+ selectAnthropicAdapterByBaseUrl
3
+ } from "./chunk-UQLGVSQH.mjs";
4
+ import {
5
+ readAnthropicSseEventStream
6
+ } from "./chunk-SPO74LMZ.mjs";
1
7
  import {
2
8
  AnthropicIncrementalDeliverer
3
- } from "./chunk-CDLS44GZ.mjs";
9
+ } from "./chunk-3TTLV2GM.mjs";
10
+ import {
11
+ applyConfiguredMaxTokens,
12
+ fetchNativeProviderWithRetry,
13
+ formatRequestShape,
14
+ stringifyJsonRequestBody
15
+ } from "./chunk-E5LABIPO.mjs";
4
16
  import {
5
17
  init_native_provider_api_key,
6
18
  resolveNativeProviderApiKeySync
@@ -13,17 +25,11 @@ import {
13
25
  resolveProviderSliceFromGatewayConfig
14
26
  } from "./chunk-LR5GC3NZ.mjs";
15
27
  import {
16
- selectAnthropicAdapterByBaseUrl
17
- } from "./chunk-UQLGVSQH.mjs";
18
- import {
19
- readAnthropicSseEventStream
20
- } from "./chunk-SPO74LMZ.mjs";
28
+ applyAnthropicProviderAccelerationToRequestBody
29
+ } from "./chunk-JHQIGDVB.mjs";
21
30
  import {
22
31
  interpretAnthropicStreamEvent
23
32
  } from "./chunk-LJ5OPMYI.mjs";
24
- import {
25
- applyAnthropicProviderAccelerationToRequestBody
26
- } from "./chunk-JHQIGDVB.mjs";
27
33
 
28
34
  // src/mobile/native-anthropic-messages-stream.ts
29
35
  init_native_gateway_config();
@@ -138,7 +144,8 @@ async function runNativeAnthropicMessagesStreamToDispatcher(params) {
138
144
  if (params.providerAccelerationPlan || providerAcceleration.application.applied || providerAcceleration.application.warnings.length > 0) {
139
145
  params.log(formatProviderAccelerationApplication(providerAcceleration.application));
140
146
  }
141
- const thinkingForBody = selectAnthropicAdapterByBaseUrl(cfg.baseUrl).resolveThinkingForBody({
147
+ const adapter = selectAnthropicAdapterByBaseUrl(cfg.baseUrl);
148
+ const thinkingForBody = adapter.resolveThinkingForBody({
142
149
  reasoningMode: params.reasoningMode,
143
150
  model: cfg.model,
144
151
  configuredThinking: requestBody.thinking
@@ -146,12 +153,34 @@ async function runNativeAnthropicMessagesStreamToDispatcher(params) {
146
153
  if (thinkingForBody !== void 0) {
147
154
  requestBody.thinking = thinkingForBody;
148
155
  }
149
- const res = await fetch(url, {
150
- method: "POST",
151
- headers: buildNativeAnthropicRequestHeaders(cfg),
152
- body: JSON.stringify(requestBody),
153
- signal: params.signal
154
- });
156
+ applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
157
+ const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
158
+ params.log(
159
+ `[XKZOOM][native-reply][anthropic-messages] request_shape ${formatRequestShape({
160
+ bodyBytes,
161
+ messages: transcriptMessages,
162
+ maxTokens: requestBody.max_tokens
163
+ })}`
164
+ );
165
+ const res = await fetchNativeProviderWithRetry(
166
+ url,
167
+ {
168
+ method: "POST",
169
+ headers: buildNativeAnthropicRequestHeaders(cfg),
170
+ body: bodyText,
171
+ signal: params.signal
172
+ },
173
+ {
174
+ label: "anthropic-messages",
175
+ providerId: cfg.providerId,
176
+ model: cfg.model,
177
+ adapter: adapter.id,
178
+ bodyBytes,
179
+ messages: transcriptMessages,
180
+ maxTokens: requestBody.max_tokens,
181
+ log: params.log
182
+ }
183
+ );
155
184
  if (!res.ok) {
156
185
  const t = await res.text();
157
186
  throw new Error(`native anthropic-messages HTTP ${res.status}: ${t.slice(0, 500)}`);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveNativeAnthropicMessagesConfigFromGatewayConfig
3
- } from "./chunk-H5DIQHEQ.mjs";
3
+ } from "./chunk-FZ7NLBVP.mjs";
4
4
  import {
5
5
  resolveNativeOpenAiChatConfigFromGatewayConfig
6
- } from "./chunk-YAD4VG2K.mjs";
6
+ } from "./chunk-BHT6B2TV.mjs";
7
7
  import {
8
8
  diagnoseNativeReplyRouteMiss,
9
9
  init_native_provider_api_key
@@ -11,11 +11,11 @@ import {
11
11
  import {
12
12
  getOrgProjectByTeamId,
13
13
  saveCeoOpsBrief
14
- } from "./chunk-UNZ3D3B3.mjs";
14
+ } from "./chunk-3OXBG4OP.mjs";
15
15
  import {
16
16
  isOrgPipelineCharter,
17
17
  resolvePeerIsCeoAgent
18
- } from "./chunk-TAQQSDJN.mjs";
18
+ } from "./chunk-6SYECCCG.mjs";
19
19
  import {
20
20
  loadTeamCharter
21
21
  } from "./chunk-KDZWHGGN.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatMemoryRetrievedBlock
3
- } from "./chunk-Q4XUEIOE.mjs";
3
+ } from "./chunk-CVIZMDMZ.mjs";
4
4
  import {
5
5
  getGatewayMemorySearchManager
6
6
  } from "./chunk-X7ZWYPCN.mjs";
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  readLastMemoryRuntimeEvalReport,
37
37
  runMemoryRuntimeV2SelfEval
38
- } from "./chunk-7AZVQS2H.mjs";
38
+ } from "./chunk-IVR74IXK.mjs";
39
39
  import {
40
40
  buildSkillRegistryReport,
41
41
  readLastSkillRegistryReport
@@ -1,19 +1,19 @@
1
+ import {
2
+ buildCompactArchiveDigest,
3
+ buildEngineFallbackActionSteps,
4
+ buildRelatedFilesMarkdown,
5
+ inferOpenLoopsFromSnapshot
6
+ } from "./chunk-UHHTLW2Z.mjs";
1
7
  import {
2
8
  resolveCompactNotePathForTarget,
3
9
  resolveMemoryMdPath
4
- } from "./chunk-WPLDZLAL.mjs";
5
- import {
6
- extractKeyFactsMarkdownFromTranscript
7
- } from "./chunk-E4GA33KE.mjs";
10
+ } from "./chunk-L7PMYQN5.mjs";
8
11
  import {
9
12
  buildEngineFallbackCompactNoteSections
10
13
  } from "./chunk-OIMCXCOZ.mjs";
11
14
  import {
12
- buildCompactArchiveDigest,
13
- buildEngineFallbackActionSteps,
14
- buildRelatedFilesMarkdown,
15
- inferOpenLoopsFromSnapshot
16
- } from "./chunk-UHHTLW2Z.mjs";
15
+ extractKeyFactsMarkdownFromTranscript
16
+ } from "./chunk-E4GA33KE.mjs";
17
17
  import {
18
18
  resolveRecoveryContextBudget,
19
19
  truncateMiddle
@@ -4,10 +4,7 @@ import {
4
4
  } from "./chunk-UAQDS6V2.mjs";
5
5
  import {
6
6
  buildContextPackForTurn
7
- } from "./chunk-CORUFGMR.mjs";
8
- import {
9
- retrieveMemoryEvidence
10
- } from "./chunk-VS2URZFN.mjs";
7
+ } from "./chunk-N3YQ5IL6.mjs";
11
8
  import {
12
9
  buildSkillRegistryReport,
13
10
  buildSkillRegistryView,
@@ -21,6 +18,9 @@ import {
21
18
  proposeSkillVersion,
22
19
  readSkillLifecycle
23
20
  } from "./chunk-2AHSYECT.mjs";
21
+ import {
22
+ retrieveMemoryEvidence
23
+ } from "./chunk-VS2URZFN.mjs";
24
24
  import {
25
25
  traceMemoryEvidence
26
26
  } from "./chunk-LWCO2YNI.mjs";
@@ -38,9 +38,6 @@ import {
38
38
  buildContextPackCostReport,
39
39
  recommendContextBudgetClass
40
40
  } from "./chunk-5Z5IS4XG.mjs";
41
- import {
42
- buildContextPackTelemetryRecord
43
- } from "./chunk-73SN5UQC.mjs";
44
41
  import {
45
42
  applyContextPackBudget
46
43
  } from "./chunk-DUB3FBYX.mjs";
@@ -54,6 +51,9 @@ import {
54
51
  readRunLedgerEvents,
55
52
  updateRunLedger
56
53
  } from "./chunk-4WWT6OC2.mjs";
54
+ import {
55
+ buildContextPackTelemetryRecord
56
+ } from "./chunk-73SN5UQC.mjs";
57
57
  import {
58
58
  recordGroupConvergenceTeamMemory
59
59
  } from "./chunk-Q7NYATKS.mjs";
@@ -10,7 +10,7 @@ import {
10
10
  countBatonPlanNodes,
11
11
  filterAgentBatonRelayTargets,
12
12
  resolveBatonIntentFromText
13
- } from "./chunk-BHMWYAVS.mjs";
13
+ } from "./chunk-DXPZNBSQ.mjs";
14
14
  import {
15
15
  buildGroupMemberAliases,
16
16
  stripSelfMention,
@@ -29,7 +29,7 @@ import {
29
29
  registerInFlightRun,
30
30
  setExecutionPlan,
31
31
  setGroupFloorState
32
- } from "./chunk-LFZAVCVW.mjs";
32
+ } from "./chunk-AJNXWGX2.mjs";
33
33
  import {
34
34
  assessNodeCompletion,
35
35
  buildExecutionPlan,
@@ -43,7 +43,7 @@ import {
43
43
  resolvePlanNodeTimeoutMs,
44
44
  skipUnreachableNodes,
45
45
  toExecutionPlanSnapshot
46
- } from "./chunk-24GJWXMG.mjs";
46
+ } from "./chunk-7MOQ462O.mjs";
47
47
  import {
48
48
  getMobileChatStore
49
49
  } from "./chunk-CVXJ45WI.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NATIVE_TURN_TOOL_CONTRACT_PROMPT,
3
3
  buildRuntimeAvailableToolsBlock
4
- } from "./chunk-W4MKSQGZ.mjs";
4
+ } from "./chunk-3FF266OG.mjs";
5
5
  import {
6
6
  OWNED_REPLY_CHILD_EXTRA_PROMPT,
7
7
  OWNED_REPLY_ORCHESTRATION_TOOL_DENY
@@ -9,19 +9,19 @@ import {
9
9
  import {
10
10
  OWNED_TURN_TOOL_NAMES,
11
11
  resolveOwnedToolNamesByTier
12
- } from "./chunk-RTANSWHW.mjs";
12
+ } from "./chunk-THN36GA5.mjs";
13
+ import {
14
+ buildOwnedWebSearchPayload
15
+ } from "./chunk-I23YODIQ.mjs";
13
16
  import {
14
17
  webSmokeTool
15
- } from "./chunk-CQUISJWG.mjs";
18
+ } from "./chunk-EYK3W2NV.mjs";
16
19
  import {
17
20
  writeOwnedFile
18
21
  } from "./chunk-PINXXWFJ.mjs";
19
22
  import {
20
23
  videoGenerateTool
21
24
  } from "./chunk-ZW24EQKD.mjs";
22
- import {
23
- buildOwnedWebSearchPayload
24
- } from "./chunk-I23YODIQ.mjs";
25
25
  import {
26
26
  buildOwnedSessionsSendPayload,
27
27
  buildOwnedSessionsSpawnPayload,
@@ -34,6 +34,9 @@ import {
34
34
  buildOwnedSessionStatus,
35
35
  readOwnedSessionStatusParams
36
36
  } from "./chunk-5ZMY6RTR.mjs";
37
+ import {
38
+ musicGenerateTool
39
+ } from "./chunk-634RMCSZ.mjs";
37
40
  import {
38
41
  listOwnedProcesses,
39
42
  logOwnedProcess,
@@ -44,28 +47,31 @@ import {
44
47
  } from "./chunk-CTKIQWTE.mjs";
45
48
  import {
46
49
  memoryControlTool
47
- } from "./chunk-S7FQBXOO.mjs";
50
+ } from "./chunk-WGLYR2YT.mjs";
48
51
  import {
49
52
  readOwnedMemoryFile
50
53
  } from "./chunk-N2CMVW47.mjs";
51
54
  import {
52
55
  memoryRuntimeEvalTool
53
- } from "./chunk-HR43WO4Q.mjs";
56
+ } from "./chunk-M6VHS3HQ.mjs";
54
57
  import {
55
58
  buildOwnedMessagePayload
56
59
  } from "./chunk-VWAUDB4X.mjs";
57
60
  import {
58
61
  buildOwnedModelsList
59
- } from "./chunk-NRJWLPTI.mjs";
62
+ } from "./chunk-6AY6OPO5.mjs";
60
63
  import {
61
- musicGenerateTool
62
- } from "./chunk-634RMCSZ.mjs";
64
+ handoffTool
65
+ } from "./chunk-ESYRDWFO.mjs";
63
66
  import {
64
67
  buildOwnedImageGeneratePayload
65
68
  } from "./chunk-F4QXCGDQ.mjs";
66
69
  import {
67
70
  buildOwnedImagePayload
68
71
  } from "./chunk-PUND56EY.mjs";
72
+ import {
73
+ applyOwnedEdit
74
+ } from "./chunk-IT2GAHAL.mjs";
69
75
  import {
70
76
  runOwnedExec
71
77
  } from "./chunk-T6XDJ2QQ.mjs";
@@ -79,44 +85,38 @@ import {
79
85
  listOwnedSessions
80
86
  } from "./chunk-VA7SUI2L.mjs";
81
87
  import {
82
- handoffTool
83
- } from "./chunk-T4LPE43H.mjs";
88
+ browserTool
89
+ } from "./chunk-2IZUNNW7.mjs";
90
+ import {
91
+ buildOwnedWebFetchPayload
92
+ } from "./chunk-UPNUSBKT.mjs";
84
93
  import {
85
94
  ceoConfirmRequirementsTool
86
- } from "./chunk-CNHOCDRM.mjs";
95
+ } from "./chunk-RYSPXH7G.mjs";
87
96
  import {
88
97
  ceoDecisionTool
89
- } from "./chunk-5JGUBBXN.mjs";
98
+ } from "./chunk-PBBRBETA.mjs";
90
99
  import {
91
100
  ceoOpsBriefTool
92
- } from "./chunk-LTBQWMAJ.mjs";
101
+ } from "./chunk-GSIZ5FR6.mjs";
93
102
  import {
94
103
  ceoRedirectTool
95
- } from "./chunk-7FLALKSN.mjs";
104
+ } from "./chunk-WRRJFJ2N.mjs";
96
105
  import {
97
106
  commitStackLessonTool
98
- } from "./chunk-GGWUDW5W.mjs";
107
+ } from "./chunk-S5ROBD7X.mjs";
99
108
  import {
100
109
  contextCompactTool
101
- } from "./chunk-K4RHLREV.mjs";
110
+ } from "./chunk-MVKCMXBY.mjs";
102
111
  import {
103
112
  searchOwnedMemory
104
113
  } from "./chunk-QWFX5VEN.mjs";
105
114
  import {
106
115
  devToolkitTool
107
116
  } from "./chunk-KJR74IUO.mjs";
108
- import {
109
- applyOwnedEdit
110
- } from "./chunk-IT2GAHAL.mjs";
111
117
  import {
112
118
  listOwnedAgents
113
119
  } from "./chunk-LBZCBBHU.mjs";
114
- import {
115
- browserTool
116
- } from "./chunk-2IZUNNW7.mjs";
117
- import {
118
- buildOwnedWebFetchPayload
119
- } from "./chunk-UPNUSBKT.mjs";
120
120
 
121
121
  // src/owned-tools/router.ts
122
122
  var T1_OWNED_TOOL_NAMES = resolveOwnedToolNamesByTier("T1");
@@ -9,13 +9,13 @@ import {
9
9
  tryKickPipelinePostCloseRound,
10
10
  tryRedirectPipelineFloor,
11
11
  tryStopPipelineAfterTerminalDecision
12
- } from "./chunk-OCQUSYRP.mjs";
12
+ } from "./chunk-3EV63LAA.mjs";
13
13
  import {
14
14
  isOrgProjectPipelineEnabled
15
15
  } from "./chunk-AZVEPDT6.mjs";
16
16
  import {
17
17
  enqueuePostCloseDebrief
18
- } from "./chunk-A5DUSLHF.mjs";
18
+ } from "./chunk-ED4H2DM7.mjs";
19
19
  import {
20
20
  acceptHandoff,
21
21
  confirmCeoProjectRequirements,
@@ -33,15 +33,15 @@ import {
33
33
  submitAuditVerdict,
34
34
  submitCeoDecisionRouted,
35
35
  submitProjectBrief
36
- } from "./chunk-UNZ3D3B3.mjs";
37
- import {
38
- isPipelineDepartmentId
39
- } from "./chunk-LREFRIQQ.mjs";
36
+ } from "./chunk-3OXBG4OP.mjs";
40
37
  import {
41
38
  loadPipelineCharter,
42
39
  resolveDeptLeadAgentId,
43
40
  resolveDeptMemberAgentIds
44
41
  } from "./chunk-KHQZ35IL.mjs";
42
+ import {
43
+ isPipelineDepartmentId
44
+ } from "./chunk-LREFRIQQ.mjs";
45
45
  import {
46
46
  loadTeamCharter
47
47
  } from "./chunk-KDZWHGGN.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  buildMemoryReadinessReport,
4
4
  readLastMemoryReadinessGate,
5
5
  readLastMemoryReadinessReport
6
- } from "./chunk-Q6XX6X24.mjs";
6
+ } from "./chunk-I4LMW3IM.mjs";
7
7
  import {
8
8
  buildMemorySoakEvidenceSummary,
9
9
  completeMemorySoakSession,
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  readLastMemoryRuntimeEvalReport,
24
24
  runMemoryRuntimeV2SelfEval
25
- } from "./chunk-7AZVQS2H.mjs";
25
+ } from "./chunk-IVR74IXK.mjs";
26
26
  import {
27
27
  buildSkillRegistryReport,
28
28
  formatSkillRegistryBlock,
@@ -8,10 +8,10 @@ import {
8
8
  handleSaveTeamHandover,
9
9
  handleUpdateGroupMembers,
10
10
  handleUpdateGroupSettings
11
- } from "./chunk-G5ZU7562.mjs";
11
+ } from "./chunk-WNI5ZPQY.mjs";
12
12
  import {
13
13
  tryHandleAgentShopRoute
14
- } from "./chunk-MGWYJD5Q.mjs";
14
+ } from "./chunk-QCSNRVL2.mjs";
15
15
  import {
16
16
  handleAcceptHandoff,
17
17
  handleCeoDecision,
@@ -25,7 +25,7 @@ import {
25
25
  handleRestartOrgProject,
26
26
  handleSubmitAuditVerdict,
27
27
  handleSubmitProjectBrief
28
- } from "./chunk-IPIV4NGB.mjs";
28
+ } from "./chunk-LXEKUNXI.mjs";
29
29
  import {
30
30
  listMediaAssetLibrary
31
31
  } from "./chunk-QVEQRCOD.mjs";
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-4POYX4AW.mjs";
51
51
  import {
52
52
  handleMemoryProductControlPlaneRoute
53
- } from "./chunk-Q6XX6X24.mjs";
53
+ } from "./chunk-I4LMW3IM.mjs";
54
54
  import {
55
55
  SessionIdAgentConflictError
56
56
  } from "./chunk-KPJOJH6H.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  resolveCompactNotePathForTarget,
3
3
  resolveMemoryMdPath,
4
4
  writeAtomicUtf8
5
- } from "./chunk-WPLDZLAL.mjs";
5
+ } from "./chunk-L7PMYQN5.mjs";
6
6
  import {
7
7
  writeSessionStateSnapshot
8
8
  } from "./chunk-ME6MMQWE.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-X3BY5KPX.mjs";
5
5
  import {
6
6
  runCompactPipeline
7
- } from "./chunk-CCCPWU2O.mjs";
7
+ } from "./chunk-RZW4EEPW.mjs";
8
8
  import {
9
9
  registerContextCompactExecutor
10
10
  } from "./chunk-UH6VXWMV.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getOrgProjectByTeamId
3
- } from "./chunk-UNZ3D3B3.mjs";
3
+ } from "./chunk-3OXBG4OP.mjs";
4
4
  import {
5
5
  detectProjectIntentInUserText
6
6
  } from "./chunk-FXJGKIYT.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  resolveCompactNotePathForTarget,
3
3
  resolveMemoryMdPath,
4
4
  resolveTeamCompactWorkspace
5
- } from "./chunk-WPLDZLAL.mjs";
5
+ } from "./chunk-L7PMYQN5.mjs";
6
6
  import {
7
7
  readSessionStateSnapshot
8
8
  } from "./chunk-ME6MMQWE.mjs";
@@ -2,13 +2,25 @@
2
2
  var TRANSCRIPT_BUDGET_BYTES_PER_TOKEN = 4;
3
3
  var TRANSCRIPT_CONTEXT_WINDOW_RATIO = 0.35;
4
4
  var MIN_TRANSCRIPT_BUDGET_BYTES = 64 * 1024;
5
- var MAX_TRANSCRIPT_BUDGET_BYTES = 4 * 1024 * 1024;
5
+ var DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES = 128 * 1024;
6
+ var HARD_MAX_TRANSCRIPT_BUDGET_BYTES = 4 * 1024 * 1024;
6
7
  function positiveInteger(value) {
7
8
  if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
8
9
  return void 0;
9
10
  }
10
11
  return Math.trunc(value);
11
12
  }
13
+ function readMaxTranscriptBudgetBytes(env = process.env) {
14
+ const raw = env.XKZOOM_NATIVE_TRANSCRIPT_MAX_REQUEST_BYTES?.trim();
15
+ if (!raw) {
16
+ return DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES;
17
+ }
18
+ const parsed = Number.parseInt(raw, 10);
19
+ if (!Number.isFinite(parsed) || parsed <= 0) {
20
+ return DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES;
21
+ }
22
+ return Math.min(HARD_MAX_TRANSCRIPT_BUDGET_BYTES, Math.max(MIN_TRANSCRIPT_BUDGET_BYTES, parsed));
23
+ }
12
24
  function resolveTranscriptBudgetBytesForContextWindow(contextWindowTokens) {
13
25
  const tokens = positiveInteger(contextWindowTokens);
14
26
  if (tokens === void 0) {
@@ -18,7 +30,7 @@ function resolveTranscriptBudgetBytesForContextWindow(contextWindowTokens) {
18
30
  tokens * TRANSCRIPT_CONTEXT_WINDOW_RATIO * TRANSCRIPT_BUDGET_BYTES_PER_TOKEN
19
31
  );
20
32
  return Math.min(
21
- MAX_TRANSCRIPT_BUDGET_BYTES,
33
+ readMaxTranscriptBudgetBytes(),
22
34
  Math.max(MIN_TRANSCRIPT_BUDGET_BYTES, estimated)
23
35
  );
24
36
  }
@@ -28,6 +40,7 @@ function buildNativeTranscriptBudgetForContextWindow(contextWindowTokens) {
28
40
  }
29
41
 
30
42
  export {
43
+ DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES,
31
44
  resolveTranscriptBudgetBytesForContextWindow,
32
45
  buildNativeTranscriptBudgetForContextWindow
33
46
  };