xkzoom 1.5.1 → 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 (228) hide show
  1. package/README.md +125 -55
  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/gateway-core/README.md +6 -0
  216. package/package.json +5 -2
  217. package/dist/{chunk-UNZ3D3B3.mjs → chunk-3OXBG4OP.mjs} +5 -5
  218. package/dist/{chunk-NRJWLPTI.mjs → chunk-6AY6OPO5.mjs} +3 -3
  219. package/dist/{chunk-JA65ZG3H.mjs → chunk-6ZWKLMY3.mjs} +4 -4
  220. package/dist/{chunk-T23H5D4O.mjs → chunk-AINHKBJW.mjs} +3 -3
  221. package/dist/{chunk-2BGXTBZX.mjs → chunk-D3N7EHB2.mjs} +8 -8
  222. package/dist/{chunk-JIY7IOQ5.mjs → chunk-DRY7AJMM.mjs} +3 -3
  223. package/dist/{chunk-QM7MTC5Q.mjs → chunk-H6LMX5G5.mjs} +3 -3
  224. package/dist/{chunk-2TBXT3PD.mjs → chunk-J74WVZGF.mjs} +6 -6
  225. package/dist/{chunk-WPLDZLAL.mjs → chunk-L7PMYQN5.mjs} +3 -3
  226. package/dist/{chunk-CORUFGMR.mjs → chunk-N3YQ5IL6.mjs} +7 -7
  227. package/dist/{chunk-5LUTMHVL.mjs → chunk-NXKHSX4M.mjs} +3 -3
  228. package/dist/{chunk-MGWYJD5Q.mjs → chunk-QCSNRVL2.mjs} +8 -8
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getGroupFloorState
3
- } from "./chunk-LFZAVCVW.mjs";
3
+ } from "./chunk-AJNXWGX2.mjs";
4
4
  import {
5
5
  enqueuePostCloseDebrief,
6
6
  hasPendingDeptPostCloseDebrief
7
- } from "./chunk-A5DUSLHF.mjs";
7
+ } from "./chunk-ED4H2DM7.mjs";
8
8
  import {
9
9
  defineTool
10
10
  } from "./chunk-DFJFMZX6.mjs";
@@ -19,11 +19,11 @@ import {
19
19
  getOrgProjectByTeamId,
20
20
  restartOrgProjectPipeline,
21
21
  submitCeoDecisionRouted
22
- } from "./chunk-UNZ3D3B3.mjs";
22
+ } from "./chunk-3OXBG4OP.mjs";
23
23
  import {
24
24
  isOrgPipelineCharter,
25
25
  resolvePeerIsCeoAgent
26
- } from "./chunk-TAQQSDJN.mjs";
26
+ } from "./chunk-6SYECCCG.mjs";
27
27
  import {
28
28
  loadTeamCharter
29
29
  } from "./chunk-KDZWHGGN.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  executeCompactOwnedTool
3
- } from "./chunk-J5HTLG3V.mjs";
3
+ } from "./chunk-3LR4CLDE.mjs";
4
4
  import {
5
5
  COMPACT_OWNED_TOOLS
6
- } from "./chunk-M52HZV6R.mjs";
6
+ } from "./chunk-5VR6UOGC.mjs";
7
7
 
8
8
  // src/owned-tools/compact/gateway-tool-factory.ts
9
9
  function jsonToolResult(payload) {
@@ -5,16 +5,13 @@ import {
5
5
  import {
6
6
  buildMvpAnthropicToolSchemas,
7
7
  executeAnthropicToolUse
8
- } from "./chunk-QUXUHJZW.mjs";
8
+ } from "./chunk-SQHTVHQ7.mjs";
9
9
  import {
10
10
  diagnoseToolUseInputReadiness,
11
11
  formatToolInputDiagLine,
12
12
  isExecutableToolUseInput,
13
13
  resolveToolUseInput
14
- } from "./chunk-BSQF7NF4.mjs";
15
- import {
16
- AnthropicIncrementalDeliverer
17
- } from "./chunk-CDLS44GZ.mjs";
14
+ } from "./chunk-W7OJPFTN.mjs";
18
15
  import {
19
16
  selectAnthropicAdapter
20
17
  } from "./chunk-UQLGVSQH.mjs";
@@ -24,17 +21,26 @@ import {
24
21
  import {
25
22
  readAnthropicSseEventStream
26
23
  } from "./chunk-SPO74LMZ.mjs";
27
- import {
28
- AnthropicStreamAssembler,
29
- interpretAnthropicStreamEvent
30
- } from "./chunk-LJ5OPMYI.mjs";
31
24
  import {
32
25
  assistantTurnTranscriptMessage,
33
26
  toolResultsTranscriptMessage
34
27
  } from "./chunk-6ZVXCJTG.mjs";
28
+ import {
29
+ AnthropicIncrementalDeliverer
30
+ } from "./chunk-3TTLV2GM.mjs";
31
+ import {
32
+ applyConfiguredMaxTokens,
33
+ fetchNativeProviderWithRetry,
34
+ formatRequestShape,
35
+ stringifyJsonRequestBody
36
+ } from "./chunk-E5LABIPO.mjs";
35
37
  import {
36
38
  applyAnthropicProviderAccelerationToRequestBody
37
39
  } from "./chunk-JHQIGDVB.mjs";
40
+ import {
41
+ AnthropicStreamAssembler,
42
+ interpretAnthropicStreamEvent
43
+ } from "./chunk-LJ5OPMYI.mjs";
38
44
 
39
45
  // src/mobile/anthropic-messages-turn-runner.ts
40
46
  var DEFAULT_MAX_ITERATIONS = 48;
@@ -630,15 +636,37 @@ function createFetchAnthropicTurnStreamFn(cfg, log, providerAccelerationPlan, pr
630
636
  toolChoiceLog = `skipped(${policy.kind}:adapter-undefined)`;
631
637
  }
632
638
  }
639
+ applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
640
+ const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
633
641
  log(
634
- `[XKZOOM][native-reply][anthropic-turn] POST ${url} adapter=${adapter.id} provider=${cfg.providerId} model=${cfg.model} iteration=${req.iteration} tools=${Array.isArray(req.tools) ? req.tools.length : 0} tool_choice=${toolChoiceLog}` + (requestBody.thinking !== void 0 && requestBody.thinking !== null ? ` thinking=${requestBody.thinking.type ?? "1"}` : " thinking=0")
642
+ `[XKZOOM][native-reply][anthropic-turn] POST ${url} adapter=${adapter.id} provider=${cfg.providerId} model=${cfg.model} iteration=${req.iteration} tools=${Array.isArray(req.tools) ? req.tools.length : 0} tool_choice=${toolChoiceLog}` + (requestBody.thinking !== void 0 && requestBody.thinking !== null ? ` thinking=${requestBody.thinking.type ?? "1"}` : " thinking=0") + ` ${formatRequestShape({
643
+ bodyBytes,
644
+ messages: req.messages,
645
+ tools: req.tools,
646
+ maxTokens: requestBody.max_tokens
647
+ })}`
648
+ );
649
+ const res = await fetchNativeProviderWithRetry(
650
+ url,
651
+ {
652
+ method: "POST",
653
+ headers,
654
+ body: bodyText,
655
+ signal
656
+ },
657
+ {
658
+ label: "anthropic-turn",
659
+ providerId: cfg.providerId,
660
+ model: cfg.model,
661
+ adapter: adapter.id,
662
+ iteration: req.iteration,
663
+ bodyBytes,
664
+ messages: req.messages,
665
+ tools: req.tools,
666
+ maxTokens: requestBody.max_tokens,
667
+ log
668
+ }
635
669
  );
636
- const res = await fetch(url, {
637
- method: "POST",
638
- headers,
639
- body: JSON.stringify(requestBody),
640
- signal
641
- });
642
670
  if (!res.ok) {
643
671
  const t = await res.text();
644
672
  throw new Error(`native anthropic-turn HTTP ${res.status}: ${t.slice(0, 500)}`);
@@ -1,6 +1,10 @@
1
+ import {
2
+ applySummarizerInputBudget,
3
+ estimateSummarizerPromptChars
4
+ } from "./chunk-6S7LAZFT.mjs";
1
5
  import {
2
6
  callCompactSummarizerLlm
3
- } from "./chunk-JG3EPJ32.mjs";
7
+ } from "./chunk-54GVKP6B.mjs";
4
8
  import {
5
9
  buildCompactSummarizerSystemPrompt,
6
10
  buildCompactSummarizerUserPrompt
@@ -12,10 +16,6 @@ import {
12
16
  import {
13
17
  finalizeCompactSummaryArtifact
14
18
  } from "./chunk-NHI2FACI.mjs";
15
- import {
16
- applySummarizerInputBudget,
17
- estimateSummarizerPromptChars
18
- } from "./chunk-6S7LAZFT.mjs";
19
19
  import {
20
20
  resolveCompactSummarizerInputBudgetChars,
21
21
  resolveCompactSummarizerMaxAttempts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  callCompactSummarizerRouteLlm,
3
3
  resolveConductorLlmRouteAsync
4
- } from "./chunk-JG3EPJ32.mjs";
4
+ } from "./chunk-54GVKP6B.mjs";
5
5
  import {
6
6
  resolveConductorModelOverride
7
7
  } from "./chunk-HJCKITZG.mjs";
8
8
  import {
9
9
  parseConductorPlanVerdict
10
- } from "./chunk-24GJWXMG.mjs";
10
+ } from "./chunk-7MOQ462O.mjs";
11
11
 
12
12
  // src/mobile/group/conductor-plan-llm.ts
13
13
  async function callConductorPlanLlm(params) {
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-GR7LH34J.mjs";
4
4
  import {
5
5
  resolveAnthropicMessagesBodyExtras
6
- } from "./chunk-H5DIQHEQ.mjs";
7
- import {
8
- resolveOpenAiCompletionsBodyExtras
9
- } from "./chunk-YAD4VG2K.mjs";
6
+ } from "./chunk-FZ7NLBVP.mjs";
10
7
  import {
11
8
  isMinimaxM3Model,
12
9
  resolveMinimaxM3AnthropicThinking
13
10
  } from "./chunk-E7BFLHLM.mjs";
11
+ import {
12
+ resolveOpenAiCompletionsBodyExtras
13
+ } from "./chunk-BHT6B2TV.mjs";
14
14
 
15
15
  // src/mobile/context-compact/compact-summarizer-llm-request.ts
16
16
  var OPENAI_REASONING_KEYS = [
@@ -11,11 +11,11 @@ import {
11
11
  import {
12
12
  confirmCeoProjectRequirements,
13
13
  getOrgProjectByTeamId
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";
@@ -13,40 +13,40 @@ import {
13
13
  import {
14
14
  isJsonlBlobHygieneCompact,
15
15
  resolveContextBudgetSignalSource
16
- } from "./chunk-HJN232FK.mjs";
16
+ } from "./chunk-FLVJABFP.mjs";
17
17
  import {
18
18
  executeSummarizeNativeStore
19
19
  } from "./chunk-IMJV6WJP.mjs";
20
- import {
21
- buildCompactResumePrefetchedContext
22
- } from "./chunk-ZTKJR7OC.mjs";
23
- import {
24
- buildEngineCompactSummaryArtifact
25
- } from "./chunk-GBG4AJON.mjs";
26
20
  import {
27
21
  pickArtifactEnrichTail,
28
22
  pickTranscriptRehydrateTail,
29
23
  prepareSummarizerMessageSets
30
24
  } from "./chunk-7NIZD2CT.mjs";
25
+ import {
26
+ buildCompactResumePrefetchedContext
27
+ } from "./chunk-OWIXULFQ.mjs";
28
+ import {
29
+ buildEngineCompactSummaryArtifact
30
+ } from "./chunk-6EI5MFLD.mjs";
31
31
  import {
32
32
  buildConversationTailContextBlock,
33
33
  enrichCompactArtifactFromConversationTail
34
- } from "./chunk-URF75O5Z.mjs";
34
+ } from "./chunk-DBYEZK64.mjs";
35
35
  import {
36
36
  runCompactSummarizerWithRetry
37
- } from "./chunk-H5TJYSTV.mjs";
38
- import {
39
- buildActionStepsBlock
40
- } from "./chunk-AAVCVONC.mjs";
37
+ } from "./chunk-QSUD6TNR.mjs";
41
38
  import {
42
39
  applySummarizerInputBudget
43
40
  } from "./chunk-6S7LAZFT.mjs";
41
+ import {
42
+ buildActionStepsBlock
43
+ } from "./chunk-AAVCVONC.mjs";
44
44
  import {
45
45
  writeCompactArtifactsAtomic
46
- } from "./chunk-CFZVBILR.mjs";
46
+ } from "./chunk-MIXYB6BH.mjs";
47
47
  import {
48
48
  ensureCompactArtifactsEngineFallback
49
- } from "./chunk-VIZQURO5.mjs";
49
+ } from "./chunk-IGJFAE72.mjs";
50
50
  import {
51
51
  buildCompactOrchestratorSystemPrompt,
52
52
  buildCompactResumeSystemPrompt
@@ -57,15 +57,20 @@ import {
57
57
  runMemoryIndexSync,
58
58
  seedCompactNoteSkeleton,
59
59
  verifyCompactWriteArtifacts
60
- } from "./chunk-WPLDZLAL.mjs";
60
+ } from "./chunk-L7PMYQN5.mjs";
61
+ import {
62
+ engineSeededNoteHasMinimalContinuity,
63
+ isEngineSeededCompactNote,
64
+ validateCompactNoteStructure
65
+ } from "./chunk-NDHB4EIS.mjs";
61
66
  import {
62
67
  enqueueCompactMemoryDistill
63
- } from "./chunk-QM7MTC5Q.mjs";
68
+ } from "./chunk-H6LMX5G5.mjs";
64
69
  import {
65
70
  collectMessagesForCompactionWithTranscriptFallback,
66
71
  findRelatedDiaryNotes,
67
72
  loadPreviousRunningSummary
68
- } from "./chunk-5LUTMHVL.mjs";
73
+ } from "./chunk-NXKHSX4M.mjs";
69
74
  import {
70
75
  isCompactAbortOnSummarizerFail,
71
76
  isCompactAllowEngineFallback,
@@ -80,11 +85,6 @@ import {
80
85
  resolveSessionStatePath,
81
86
  writeSessionStateSnapshot
82
87
  } from "./chunk-ME6MMQWE.mjs";
83
- import {
84
- engineSeededNoteHasMinimalContinuity,
85
- isEngineSeededCompactNote,
86
- validateCompactNoteStructure
87
- } from "./chunk-NDHB4EIS.mjs";
88
88
  import {
89
89
  executeSummarizeTranscript,
90
90
  resolveGatewayTranscriptPath,
@@ -2,7 +2,7 @@ import {
2
2
  PostCloseSkillEvolutionError,
3
3
  mergeStackLessonSkill,
4
4
  recordPostCloseDebriefStatus
5
- } from "./chunk-A5DUSLHF.mjs";
5
+ } from "./chunk-ED4H2DM7.mjs";
6
6
  import {
7
7
  defineTool
8
8
  } from "./chunk-DFJFMZX6.mjs";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-IKQPTA2J.mjs";
16
16
  import {
17
17
  getOrgProjectByTeamId
18
- } from "./chunk-UNZ3D3B3.mjs";
18
+ } from "./chunk-3OXBG4OP.mjs";
19
19
 
20
20
  // src/owned-tools/commit-stack-lesson.ts
21
21
  init_workspace_fs();
@@ -5,24 +5,24 @@ import {
5
5
  import {
6
6
  init_register_owned_providers,
7
7
  registerDefaultOwnedProviders
8
- } from "./chunk-2BGXTBZX.mjs";
8
+ } from "./chunk-D3N7EHB2.mjs";
9
9
  import {
10
10
  diagnoseToolUseInputReadiness,
11
11
  finalizeToolUseInputForExecution
12
- } from "./chunk-BSQF7NF4.mjs";
12
+ } from "./chunk-W7OJPFTN.mjs";
13
13
  import {
14
14
  augmentOwnedToolEnvelopeWithRoot,
15
15
  buildOwnedToolErrorEnvelope,
16
16
  classifyToolExecutionErrorMessage,
17
17
  formatOwnedToolResultEnvelope,
18
18
  normalizeOwnedToolExecuteOutcome
19
- } from "./chunk-ZM23SMRO.mjs";
19
+ } from "./chunk-T5ZCLYLJ.mjs";
20
20
  import {
21
21
  isMemoryWorkspacePath
22
- } from "./chunk-IXYH42YO.mjs";
22
+ } from "./chunk-C5VQPAOA.mjs";
23
23
  import {
24
24
  validatePlannedToolAction
25
- } from "./chunk-BV76CMVR.mjs";
25
+ } from "./chunk-BN273XTH.mjs";
26
26
  import {
27
27
  formatToolValidationError
28
28
  } from "./chunk-KWQEFCOY.mjs";
@@ -31,10 +31,10 @@ import {
31
31
  OWNED_TURN_TOOL_NAMES,
32
32
  buildOwnedTurnToolSchemas,
33
33
  isOwnedTurnToolName
34
- } from "./chunk-RTANSWHW.mjs";
34
+ } from "./chunk-THN36GA5.mjs";
35
35
  import {
36
36
  evaluateGroupToolCallGate
37
- } from "./chunk-OCQUSYRP.mjs";
37
+ } from "./chunk-3EV63LAA.mjs";
38
38
  import {
39
39
  beginToolSideEffect,
40
40
  completeToolSideEffect,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sanitizeOwnedToolVisiblePayload
3
- } from "./chunk-IXYH42YO.mjs";
3
+ } from "./chunk-C5VQPAOA.mjs";
4
4
  import {
5
5
  ownedToolPayloadIndicatesFailure
6
6
  } from "./chunk-GYZ4IXUD.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseBatonHandoffFromText
3
- } from "./chunk-BHMWYAVS.mjs";
3
+ } from "./chunk-DXPZNBSQ.mjs";
4
4
  import {
5
5
  buildGroupMemberAliases
6
6
  } from "./chunk-MXXTDG5V.mjs";
@@ -10,15 +10,18 @@ import {
10
10
  import {
11
11
  notesSearchTool
12
12
  } from "./chunk-77HWNHNA.mjs";
13
+ import {
14
+ webSearchTool
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
  writeTool
18
21
  } from "./chunk-PINXXWFJ.mjs";
19
22
  import {
20
23
  ttsTool
21
- } from "./chunk-JIY7IOQ5.mjs";
24
+ } from "./chunk-DRY7AJMM.mjs";
22
25
  import {
23
26
  videoGenerateTool
24
27
  } from "./chunk-ZW24EQKD.mjs";
@@ -28,9 +31,6 @@ import {
28
31
  import {
29
32
  voiceDesignTool
30
33
  } from "./chunk-DS3VLDJA.mjs";
31
- import {
32
- webSearchTool
33
- } from "./chunk-I23YODIQ.mjs";
34
34
  import {
35
35
  sessionsSendTool
36
36
  } from "./chunk-WXELBVXY.mjs";
@@ -40,6 +40,9 @@ import {
40
40
  import {
41
41
  sessionStatusTool
42
42
  } from "./chunk-5ZMY6RTR.mjs";
43
+ import {
44
+ musicGenerateTool
45
+ } from "./chunk-634RMCSZ.mjs";
43
46
  import {
44
47
  pdfTool
45
48
  } from "./chunk-MJ6DSJJF.mjs";
@@ -51,22 +54,22 @@ import {
51
54
  } from "./chunk-CTKIQWTE.mjs";
52
55
  import {
53
56
  memoryControlTool
54
- } from "./chunk-S7FQBXOO.mjs";
57
+ } from "./chunk-WGLYR2YT.mjs";
55
58
  import {
56
59
  memoryGetTool
57
60
  } from "./chunk-N2CMVW47.mjs";
58
61
  import {
59
62
  memoryRuntimeEvalTool
60
- } from "./chunk-HR43WO4Q.mjs";
63
+ } from "./chunk-M6VHS3HQ.mjs";
61
64
  import {
62
65
  messageTool
63
66
  } from "./chunk-VWAUDB4X.mjs";
64
67
  import {
65
68
  modelsListTool
66
- } from "./chunk-NRJWLPTI.mjs";
69
+ } from "./chunk-6AY6OPO5.mjs";
67
70
  import {
68
- musicGenerateTool
69
- } from "./chunk-634RMCSZ.mjs";
71
+ handoffTool
72
+ } from "./chunk-ESYRDWFO.mjs";
70
73
  import {
71
74
  imageGenerateTool
72
75
  } from "./chunk-F4QXCGDQ.mjs";
@@ -76,6 +79,9 @@ import {
76
79
  import {
77
80
  lyricsGenerateTool
78
81
  } from "./chunk-LT2FPTFV.mjs";
82
+ import {
83
+ editTool
84
+ } from "./chunk-IT2GAHAL.mjs";
79
85
  import {
80
86
  execTool
81
87
  } from "./chunk-T6XDJ2QQ.mjs";
@@ -89,44 +95,38 @@ import {
89
95
  sessionsListTool
90
96
  } from "./chunk-VA7SUI2L.mjs";
91
97
  import {
92
- handoffTool
93
- } from "./chunk-T4LPE43H.mjs";
98
+ browserTool
99
+ } from "./chunk-2IZUNNW7.mjs";
100
+ import {
101
+ webFetchTool
102
+ } from "./chunk-UPNUSBKT.mjs";
94
103
  import {
95
104
  ceoConfirmRequirementsTool
96
- } from "./chunk-CNHOCDRM.mjs";
105
+ } from "./chunk-RYSPXH7G.mjs";
97
106
  import {
98
107
  ceoDecisionTool
99
- } from "./chunk-5JGUBBXN.mjs";
108
+ } from "./chunk-PBBRBETA.mjs";
100
109
  import {
101
110
  ceoOpsBriefTool
102
- } from "./chunk-LTBQWMAJ.mjs";
111
+ } from "./chunk-GSIZ5FR6.mjs";
103
112
  import {
104
113
  ceoRedirectTool
105
- } from "./chunk-7FLALKSN.mjs";
114
+ } from "./chunk-WRRJFJ2N.mjs";
106
115
  import {
107
116
  commitStackLessonTool
108
- } from "./chunk-GGWUDW5W.mjs";
117
+ } from "./chunk-S5ROBD7X.mjs";
109
118
  import {
110
119
  contextCompactTool
111
- } from "./chunk-K4RHLREV.mjs";
120
+ } from "./chunk-MVKCMXBY.mjs";
112
121
  import {
113
122
  memorySearchTool
114
123
  } from "./chunk-QWFX5VEN.mjs";
115
124
  import {
116
125
  devToolkitTool
117
126
  } from "./chunk-KJR74IUO.mjs";
118
- import {
119
- editTool
120
- } from "./chunk-IT2GAHAL.mjs";
121
127
  import {
122
128
  agentsListTool
123
129
  } from "./chunk-LBZCBBHU.mjs";
124
- import {
125
- browserTool
126
- } from "./chunk-2IZUNNW7.mjs";
127
- import {
128
- webFetchTool
129
- } from "./chunk-UPNUSBKT.mjs";
130
130
  import {
131
131
  sessionsSpawnTool,
132
132
  subagentsTool
@@ -175,6 +175,9 @@ function createInterruptedTurnSnapshot(params) {
175
175
  ...clipText(errMessage, MAX_PREVIEW_CHARS) ? { errorMessage: clipText(errMessage, MAX_PREVIEW_CHARS) } : {}
176
176
  };
177
177
  }
178
+ function hasInterruptedTurnRecoveryEvidence(snapshot) {
179
+ return snapshot.visibleTextLength > 0 || Boolean(snapshot.assistantPartialText?.trim()) || Boolean(snapshot.toolCallSummaries?.length);
180
+ }
178
181
  function findLatestInterruptedTurnSnapshot(messages) {
179
182
  for (let i = messages.length - 1; i >= 0; i -= 1) {
180
183
  const message = messages[i];
@@ -287,6 +290,7 @@ export {
287
290
  extractLastToolNameFromError,
288
291
  formatTurnTimeoutKindForUser,
289
292
  createInterruptedTurnSnapshot,
293
+ hasInterruptedTurnRecoveryEvidence,
290
294
  findLatestInterruptedTurnSnapshot,
291
295
  isInterruptedTurnResumeRequest,
292
296
  findActiveInterruptedTurnSnapshotBefore,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  callCompactSummarizerRouteLlm,
3
3
  resolveConductorLlmRouteAsync
4
- } from "./chunk-JG3EPJ32.mjs";
4
+ } from "./chunk-54GVKP6B.mjs";
5
5
  import {
6
6
  parsePostAgentIntentJson
7
7
  } from "./chunk-XEGXKEIR.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isToolUseInputComplete
3
- } from "./chunk-ZM23SMRO.mjs";
3
+ } from "./chunk-T5ZCLYLJ.mjs";
4
4
  import {
5
5
  OWNED_TURN_TOOL_BY_NAME
6
- } from "./chunk-RTANSWHW.mjs";
6
+ } from "./chunk-THN36GA5.mjs";
7
7
  import {
8
8
  parseToolUseInput,
9
9
  salvagePartialToolUseInput
@@ -3,7 +3,7 @@ import {
3
3
  memory_evidence,
4
4
  memory_policy,
5
5
  memory_portability
6
- } from "./chunk-XHO73X2N.mjs";
6
+ } from "./chunk-FKCGJ3BF.mjs";
7
7
  import {
8
8
  defineTool
9
9
  } from "./chunk-DFJFMZX6.mjs";
@@ -2,31 +2,31 @@ import {
2
2
  createGroupChatSession,
3
3
  updateGroupMembers,
4
4
  updateGroupSettings
5
- } from "./chunk-ASIBETCT.mjs";
5
+ } from "./chunk-X7P6B2LK.mjs";
6
6
  import {
7
7
  tryKickPipelineCeoRequirementConfirmation
8
- } from "./chunk-OCQUSYRP.mjs";
8
+ } from "./chunk-3EV63LAA.mjs";
9
9
  import {
10
10
  floorStateToEventPayload
11
- } from "./chunk-BHMWYAVS.mjs";
11
+ } from "./chunk-DXPZNBSQ.mjs";
12
12
  import {
13
13
  LEGACY_GROUP_CHAT_DISABLED_CODE,
14
14
  isLegacyGroupChatEnabled
15
15
  } from "./chunk-AZVEPDT6.mjs";
16
16
  import {
17
17
  getGroupFloorState
18
- } from "./chunk-LFZAVCVW.mjs";
18
+ } from "./chunk-AJNXWGX2.mjs";
19
19
  import {
20
20
  getTeamTaskBoard,
21
21
  patchTeamTaskBoard
22
22
  } from "./chunk-BHA3SMKH.mjs";
23
+ import {
24
+ getOrgProjectByTeamId
25
+ } from "./chunk-3OXBG4OP.mjs";
23
26
  import {
24
27
  buildBossRelationPanel,
25
28
  neutralizeRelationPair
26
29
  } from "./chunk-OJYZLNSD.mjs";
27
- import {
28
- getOrgProjectByTeamId
29
- } from "./chunk-UNZ3D3B3.mjs";
30
30
  import {
31
31
  ORG_PIPELINE_TEMPLATE_ID
32
32
  } from "./chunk-LREFRIQQ.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  forceStopGroupFloorState,
3
3
  tryRedirectPipelineFloor
4
- } from "./chunk-OCQUSYRP.mjs";
4
+ } from "./chunk-3EV63LAA.mjs";
5
5
  import {
6
6
  defineTool
7
7
  } from "./chunk-DFJFMZX6.mjs";
@@ -15,21 +15,21 @@ import {
15
15
  import {
16
16
  getOrgProjectByTeamId,
17
17
  registerCeoRedirect
18
- } from "./chunk-UNZ3D3B3.mjs";
18
+ } from "./chunk-3OXBG4OP.mjs";
19
19
  import {
20
20
  isOrgPipelineCharter,
21
21
  resolvePeerIsCeoAgent
22
- } from "./chunk-TAQQSDJN.mjs";
22
+ } from "./chunk-6SYECCCG.mjs";
23
23
  import {
24
24
  deptLabelFromCharter
25
- } from "./chunk-JA65ZG3H.mjs";
25
+ } from "./chunk-6ZWKLMY3.mjs";
26
+ import {
27
+ loadPipelineCharter
28
+ } from "./chunk-KHQZ35IL.mjs";
26
29
  import {
27
30
  ORG_PIPELINE_DEPT_LABELS,
28
31
  isPipelineDepartmentId
29
32
  } from "./chunk-LREFRIQQ.mjs";
30
- import {
31
- loadPipelineCharter
32
- } from "./chunk-KHQZ35IL.mjs";
33
33
  import {
34
34
  loadTeamCharter
35
35
  } from "./chunk-KDZWHGGN.mjs";