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
package/README.md CHANGED
@@ -38,6 +38,20 @@ entries, or VPS deployment scripts.
38
38
 
39
39
  ## Release Notes
40
40
 
41
+ ### 1.5.3
42
+
43
+ - Hardens native provider calls against transient upstream connection failures:
44
+ OpenAI-compatible and Anthropic-compatible request paths now retry retryable
45
+ network/connect failures once before surfacing a failed assistant turn.
46
+ - Adds shared retry diagnostics for native provider fetches, including attempt
47
+ counts, retry decisions, request shape, and cause-chain error codes without
48
+ logging prompts or API keys.
49
+ - Applies the retry path to the owned turn runners used by Desktop/App replies
50
+ and to the legacy text-stream helpers, keeping HTTP errors, aborts, and empty
51
+ stream failures honest.
52
+ - Adds regression coverage for `UND_ERR_CONNECT_TIMEOUT` recovery on both
53
+ OpenAI-compatible and Anthropic-compatible native turn paths.
54
+
41
55
  ### 1.5.2
42
56
 
43
57
  - Publishes the 1.5.x owned gateway runtime with complete npm package metadata
@@ -66,46 +80,46 @@ entries, or VPS deployment scripts.
66
80
  ## Runtime
67
81
 
68
82
  - Start the gateway with `pnpm run gateway:run` or the `xkzoom` bin.
69
- - The default state root is `~/.xkzoom`.
70
- - Set `XKZOOM_STATE_DIR` to use an explicit state root.
71
- - `gateway-core/runtime/gateway/owned-gateway-entry.cjs` owns the gateway CLI
72
- entry.
73
- - `gateway-core/runtime/reply/load-owned-reply-runtime.cjs` owns reply runtime
74
- loading.
75
- - `gateway-core/runtime/mobile-relay` owns relay and connector processes.
76
-
77
- ## Product Surface
78
-
79
- - Skills are read from agent workspaces and XKZOOM global skills.
80
- - The API does not return retired bundled skills by default.
81
- - Agent creation uses the native XKZOOM skeleton writer.
82
- - Mobile REST and `/mobile/ws` are part of the owned gateway path.
83
- - Third-party chat software integrations, web control UI, tunnel, and TUN are
84
- disabled product surfaces.
85
-
86
- ## Verification
87
-
88
- Run the core checks before publishing or handing off:
89
-
90
- ```bash
91
- pnpm run build
92
- pnpm run typecheck:test
93
- pnpm run verify:release-artifact:shape
94
- pnpm run verify:zero-legacy-source
95
- ```
96
-
97
- Useful focused checks:
98
-
99
- ```bash
100
- pnpm run test:mobile:regression
101
- pnpm run test:dev-tools
102
- pnpm run verify:mobile:runtime
103
- ```
104
-
105
- ## Documentation
106
-
107
- - [Gateway Core](docs/gateway-core.md)
108
- - [State Root](docs/state-root.md)
109
- - [Skills And Agents](docs/skills-and-agents.md)
110
- - [Mobile Relay Connector](docs/mobile-relay-connector.md)
111
- - [Release Verification](docs/release-verification.md)
83
+ - The default state root is `~/.xkzoom`.
84
+ - Set `XKZOOM_STATE_DIR` to use an explicit state root.
85
+ - `gateway-core/runtime/gateway/owned-gateway-entry.cjs` owns the gateway CLI
86
+ entry.
87
+ - `gateway-core/runtime/reply/load-owned-reply-runtime.cjs` owns reply runtime
88
+ loading.
89
+ - `gateway-core/runtime/mobile-relay` owns relay and connector processes.
90
+
91
+ ## Product Surface
92
+
93
+ - Skills are read from agent workspaces and XKZOOM global skills.
94
+ - The API does not return retired bundled skills by default.
95
+ - Agent creation uses the native XKZOOM skeleton writer.
96
+ - Mobile REST and `/mobile/ws` are part of the owned gateway path.
97
+ - Third-party chat software integrations, web control UI, tunnel, and TUN are
98
+ disabled product surfaces.
99
+
100
+ ## Verification
101
+
102
+ Run the core checks before publishing or handing off:
103
+
104
+ ```bash
105
+ pnpm run build
106
+ pnpm run typecheck:test
107
+ pnpm run verify:release-artifact:shape
108
+ pnpm run verify:zero-legacy-source
109
+ ```
110
+
111
+ Useful focused checks:
112
+
113
+ ```bash
114
+ pnpm run test:mobile:regression
115
+ pnpm run test:dev-tools
116
+ pnpm run verify:mobile:runtime
117
+ ```
118
+
119
+ ## Documentation
120
+
121
+ - [Gateway Core](docs/gateway-core.md)
122
+ - [State Root](docs/state-root.md)
123
+ - [Skills And Agents](docs/skills-and-agents.md)
124
+ - [Mobile Relay Connector](docs/mobile-relay-connector.md)
125
+ - [Release Verification](docs/release-verification.md)
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  executeCompactOwnedTool
3
- } from "./chunk-J5HTLG3V.mjs";
3
+ } from "./chunk-3LR4CLDE.mjs";
4
4
 
5
5
  // src/mobile/tools/mobile-compact-tool-bridge.ts
6
6
  async function executeMobileCompactTool(params) {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BSG6WLML.mjs";
7
7
  import {
8
8
  GroupFloorOrchestrator
9
- } from "./chunk-A23OTVH2.mjs";
9
+ } from "./chunk-6LKZYMIW.mjs";
10
10
  import {
11
11
  buildPostAgentIntentPrompt
12
12
  } from "./chunk-XEGXKEIR.mjs";
@@ -22,13 +22,6 @@ import {
22
22
  isGroupConductorRouteEnabled,
23
23
  isGroupPlanRuntimeAdvanceEnabled
24
24
  } from "./chunk-AZVEPDT6.mjs";
25
- import {
26
- hydrateOrgEngineFromDisk,
27
- persistOrgEngineToDisk
28
- } from "./chunk-S4AIBE4O.mjs";
29
- import {
30
- evaluateToolCallGate
31
- } from "./chunk-QRMV5CAE.mjs";
32
25
  import {
33
26
  cancelRunningOwnedSubagentsForAgent
34
27
  } from "./chunk-RZOILUDC.mjs";
@@ -38,19 +31,26 @@ import {
38
31
  } from "./chunk-4POYX4AW.mjs";
39
32
  import {
40
33
  getGroupFloorState
41
- } from "./chunk-LFZAVCVW.mjs";
34
+ } from "./chunk-AJNXWGX2.mjs";
42
35
  import {
43
36
  resolvePlanMaxAppendNodes
44
- } from "./chunk-24GJWXMG.mjs";
37
+ } from "./chunk-7MOQ462O.mjs";
45
38
  import {
46
39
  getMobileChatStore
47
40
  } from "./chunk-CVXJ45WI.mjs";
48
41
  import {
49
42
  buildGroupCollaborationMemorySupplement
50
- } from "./chunk-5DMSAPS2.mjs";
43
+ } from "./chunk-APQRVOZQ.mjs";
44
+ import {
45
+ hydrateOrgEngineFromDisk,
46
+ persistOrgEngineToDisk
47
+ } from "./chunk-S4AIBE4O.mjs";
48
+ import {
49
+ evaluateToolCallGate
50
+ } from "./chunk-QRMV5CAE.mjs";
51
51
  import {
52
52
  isOrgPipelineCharter
53
- } from "./chunk-TAQQSDJN.mjs";
53
+ } from "./chunk-6SYECCCG.mjs";
54
54
  import {
55
55
  loadTeamCharter
56
56
  } from "./chunk-KDZWHGGN.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveEnabledOwnedTurnTools
3
- } from "./chunk-RTANSWHW.mjs";
3
+ } from "./chunk-THN36GA5.mjs";
4
4
  import {
5
5
  buildAgentMediaToolContractBlock
6
6
  } from "./chunk-AFD4DOFH.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isCompactOwnedToolName
3
- } from "./chunk-M52HZV6R.mjs";
3
+ } from "./chunk-5VR6UOGC.mjs";
4
4
  import {
5
5
  handleDiarySearchTool,
6
6
  handleNotesGetTool,
@@ -6,7 +6,7 @@ import {
6
6
  readNativeStreamReasoningEmitIntervalMs,
7
7
  readNativeStreamReasoningMinChars,
8
8
  shouldEmitNativeStreamBlock
9
- } from "./chunk-YAD4VG2K.mjs";
9
+ } from "./chunk-BHT6B2TV.mjs";
10
10
 
11
11
  // src/mobile/anthropic-incremental-deliver.ts
12
12
  var NATIVE_ANTHROPIC_STREAM_BLOCK_MIN_CHARS = readNativeStreamBlockMinChars();
@@ -2,25 +2,25 @@ import {
2
2
  buildCompactSummarizerAnthropicRequestBody,
3
3
  buildCompactSummarizerOpenAiRequestBody,
4
4
  summarizeCompactSummarizerRequestForLog
5
- } from "./chunk-OB4JJLDC.mjs";
5
+ } from "./chunk-RVW5XO4A.mjs";
6
6
  import {
7
7
  resolveCompactSummarizerModelOverride,
8
8
  resolveCompactSummarizerTimeoutMs
9
9
  } from "./chunk-GR7LH34J.mjs";
10
+ import {
11
+ resolveNativeProviderApiKeyViaGatewayAuth
12
+ } from "./chunk-44L5RQKZ.mjs";
10
13
  import {
11
14
  buildNativeAnthropicRequestHeaders,
12
15
  resolveAnthropicMessagesBodyExtras,
13
16
  resolveNativeAnthropicMessagesConfigFromGatewayConfig,
14
17
  resolveNativeAnthropicMessagesUrl
15
- } from "./chunk-H5DIQHEQ.mjs";
16
- import {
17
- resolveNativeProviderApiKeyViaGatewayAuth
18
- } from "./chunk-44L5RQKZ.mjs";
18
+ } from "./chunk-FZ7NLBVP.mjs";
19
19
  import {
20
20
  resolveNativeOpenAiChatCompletionsUrl,
21
21
  resolveNativeOpenAiChatConfigFromGatewayConfig,
22
22
  resolveOpenAiCompletionsBodyExtras
23
- } from "./chunk-YAD4VG2K.mjs";
23
+ } from "./chunk-BHT6B2TV.mjs";
24
24
  import {
25
25
  init_native_provider_api_key,
26
26
  resolveNativeProviderApiKeySync
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OWNED_INTERNAL_TOOL_CATALOG
3
- } from "./chunk-RTANSWHW.mjs";
3
+ } from "./chunk-THN36GA5.mjs";
4
4
 
5
5
  // src/owned-tools/compact/registry.ts
6
6
  var COMPACT_OWNED_TOOLS = OWNED_INTERNAL_TOOL_CATALOG.map((entry) => entry.tool).filter((tool) => ["diary_search", "notes_search", "notes_get", "summarize"].includes(tool.name));
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  mergeRunningSummary
3
- } from "./chunk-H5TJYSTV.mjs";
3
+ } from "./chunk-QSUD6TNR.mjs";
4
4
  import {
5
5
  assembleCompactNoteMarkdown
6
6
  } from "./chunk-HICPBFBW.mjs";
7
- import {
8
- extractKeyFactsMarkdownFromTranscript
9
- } from "./chunk-E4GA33KE.mjs";
10
7
  import {
11
8
  buildCompactArchiveDigest,
12
9
  buildEngineFallbackActionSteps,
13
10
  inferOpenLoopsFromSnapshot
14
11
  } from "./chunk-UHHTLW2Z.mjs";
12
+ import {
13
+ extractKeyFactsMarkdownFromTranscript
14
+ } from "./chunk-E4GA33KE.mjs";
15
15
  import {
16
16
  sanitizeTranscriptTextForArchive
17
17
  } from "./chunk-DPNXFDFK.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildPairwiseRelationImpression
3
- } from "./chunk-NYG3IUXK.mjs";
3
+ } from "./chunk-TER7DFHP.mjs";
4
4
  import {
5
5
  formatNormalGroupRouteReceipt
6
6
  } from "./chunk-A5OB3QEO.mjs";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-L4Z7ND7Z.mjs";
22
22
  import {
23
23
  runPlanRuntime
24
- } from "./chunk-YILSXMZI.mjs";
24
+ } from "./chunk-KI7AMK7P.mjs";
25
25
  import {
26
26
  applyUserContinue,
27
27
  applyUserNewTopic,
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-C3CZKA3E.mjs";
44
44
  import {
45
45
  parseCeoMultiDeptLeadMentions
46
- } from "./chunk-GIAML5K5.mjs";
46
+ } from "./chunk-DQ7J7RST.mjs";
47
47
  import {
48
48
  markPipelineCeoRollupLeadDone,
49
49
  startPipelineCeoRollup
@@ -69,7 +69,7 @@ import {
69
69
  selectNextSpeaker,
70
70
  shouldConverge,
71
71
  shouldConvergeNaturally
72
- } from "./chunk-BHMWYAVS.mjs";
72
+ } from "./chunk-DXPZNBSQ.mjs";
73
73
  import {
74
74
  buildGroupMemberAliases,
75
75
  collectMentionedMembers,
@@ -110,20 +110,14 @@ import {
110
110
  import {
111
111
  isGroupWorkLaneEnabled
112
112
  } from "./chunk-AZVEPDT6.mjs";
113
- import {
114
- writeTeamMinutes
115
- } from "./chunk-S4AIBE4O.mjs";
116
- import {
117
- buildMinutesDraftFromConvergence
118
- } from "./chunk-Z7C7KX3U.mjs";
119
- import {
120
- createRemarkResolver
121
- } from "./chunk-4POYX4AW.mjs";
122
113
  import {
123
114
  clearPipelineDeptRollup,
124
115
  markPipelineDeptRollupMemberDone,
125
116
  startPipelineDeptRollup
126
117
  } from "./chunk-6SZCPHCL.mjs";
118
+ import {
119
+ createRemarkResolver
120
+ } from "./chunk-4POYX4AW.mjs";
127
121
  import {
128
122
  clearAllInFlightRuns,
129
123
  clearInFlightRun,
@@ -132,7 +126,7 @@ import {
132
126
  registerInFlightRun,
133
127
  setExecutionPlan,
134
128
  setGroupFloorState
135
- } from "./chunk-LFZAVCVW.mjs";
129
+ } from "./chunk-AJNXWGX2.mjs";
136
130
  import {
137
131
  GROUP_FLOOR_PLAN_SCHEDULING_REASON
138
132
  } from "./chunk-INHFVKZY.mjs";
@@ -141,13 +135,13 @@ import {
141
135
  buildExecutionPlan,
142
136
  markPlanSkipped,
143
137
  toExecutionPlanSnapshot
144
- } from "./chunk-24GJWXMG.mjs";
138
+ } from "./chunk-7MOQ462O.mjs";
145
139
  import {
146
140
  assessDeliveryVerification
147
- } from "./chunk-ETD5LGJY.mjs";
141
+ } from "./chunk-Z3COATFF.mjs";
148
142
  import {
149
143
  shouldTreatPipelineHandoffAsUnverified
150
- } from "./chunk-MWRQORKQ.mjs";
144
+ } from "./chunk-XF4EURDX.mjs";
151
145
  import {
152
146
  assessPipelineCeoDecisionFromToolCalls,
153
147
  assessPipelineHandoffFromToolCalls,
@@ -158,7 +152,7 @@ import {
158
152
  isPipelineAwaitingCeoPhase,
159
153
  isPipelineCeoActionablePhase,
160
154
  isPipelineCeoDispatchPhase
161
- } from "./chunk-T23H5D4O.mjs";
155
+ } from "./chunk-AINHKBJW.mjs";
162
156
  import {
163
157
  getActiveTaskOwner,
164
158
  patchTeamTaskBoard
@@ -168,36 +162,41 @@ import {
168
162
  hasPendingDeptPostCloseDebrief,
169
163
  resolveNextPostCloseDebriefAgentId,
170
164
  resolvePostCloseDebriefAgentOrder
171
- } from "./chunk-A5DUSLHF.mjs";
165
+ } from "./chunk-ED4H2DM7.mjs";
172
166
  import {
173
167
  recordGroupConvergenceTeamMemory
174
168
  } from "./chunk-Q7NYATKS.mjs";
175
169
  import {
176
170
  getMobileChatStore
177
171
  } from "./chunk-CVXJ45WI.mjs";
172
+ import {
173
+ getOrgProjectByTeamId
174
+ } from "./chunk-3OXBG4OP.mjs";
175
+ import {
176
+ sanitizeAssistantTextForStore
177
+ } from "./chunk-IXY2XMGE.mjs";
178
+ import {
179
+ writeTeamMinutes
180
+ } from "./chunk-S4AIBE4O.mjs";
178
181
  import {
179
182
  accumulateNegAndShouldFuse,
180
183
  neutralizeRelationPair,
181
184
  writePeerRelationNote
182
185
  } from "./chunk-OJYZLNSD.mjs";
183
186
  import {
184
- getOrgProjectByTeamId
185
- } from "./chunk-UNZ3D3B3.mjs";
187
+ buildMinutesDraftFromConvergence
188
+ } from "./chunk-Z7C7KX3U.mjs";
186
189
  import {
187
190
  isOrgPipelineCharter,
188
191
  resolvePeerIsCeoAgent,
189
192
  resolvePeerPipelineRole,
190
193
  resolvePipelineDeptLead,
191
194
  resolvePipelineDeptMembers
192
- } from "./chunk-TAQQSDJN.mjs";
195
+ } from "./chunk-6SYECCCG.mjs";
193
196
  import {
194
197
  resolveActivePipelineLead,
195
198
  resolveDynamicDeptLead
196
- } from "./chunk-JA65ZG3H.mjs";
197
- import {
198
- ORG_PIPELINE_DEPT_LABELS,
199
- activeDepartmentForPhase
200
- } from "./chunk-LREFRIQQ.mjs";
199
+ } from "./chunk-6ZWKLMY3.mjs";
201
200
  import {
202
201
  listPipelineDeptMentionOptions,
203
202
  loadPipelineCharter,
@@ -206,12 +205,13 @@ import {
206
205
  import {
207
206
  parseDynamicDeptSlugFromPhase
208
207
  } from "./chunk-6XBAYBWZ.mjs";
208
+ import {
209
+ ORG_PIPELINE_DEPT_LABELS,
210
+ activeDepartmentForPhase
211
+ } from "./chunk-LREFRIQQ.mjs";
209
212
  import {
210
213
  loadTeamCharter
211
214
  } from "./chunk-KDZWHGGN.mjs";
212
- import {
213
- sanitizeAssistantTextForStore
214
- } from "./chunk-IXY2XMGE.mjs";
215
215
 
216
216
  // src/mobile/group/orchestrator.ts
217
217
  import { randomUUID } from "crypto";
@@ -8,12 +8,7 @@ import {
8
8
  resolveDynamicDeptLead,
9
9
  resolvePeerDeptSlug,
10
10
  workspaceSubdirForDept
11
- } from "./chunk-JA65ZG3H.mjs";
12
- import {
13
- ORG_PIPELINE_USER_README,
14
- ORG_PIPELINE_ZONE_DIRS,
15
- activeDepartmentForPhase
16
- } from "./chunk-LREFRIQQ.mjs";
11
+ } from "./chunk-6ZWKLMY3.mjs";
17
12
  import {
18
13
  resolveSlugFromMemberRole
19
14
  } from "./chunk-KHQZ35IL.mjs";
@@ -24,6 +19,11 @@ import {
24
19
  parseDynamicDeptSlugFromPhase,
25
20
  sortDepartments
26
21
  } from "./chunk-6XBAYBWZ.mjs";
22
+ import {
23
+ ORG_PIPELINE_USER_README,
24
+ ORG_PIPELINE_ZONE_DIRS,
25
+ activeDepartmentForPhase
26
+ } from "./chunk-LREFRIQQ.mjs";
27
27
  import {
28
28
  formatHandoverSupplementBlock,
29
29
  loadPendingHandoverForTeam
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assessDeliveryVerification
3
- } from "./chunk-ETD5LGJY.mjs";
3
+ } from "./chunk-Z3COATFF.mjs";
4
4
  import {
5
5
  patchTeamTaskBoard
6
6
  } from "./chunk-BHA3SMKH.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-INHFVKZY.mjs";
5
5
  import {
6
6
  LEGACY_INFLIGHT_NODE_ID
7
- } from "./chunk-24GJWXMG.mjs";
7
+ } from "./chunk-7MOQ462O.mjs";
8
8
  import {
9
9
  init_state_dir,
10
10
  resolveXkzoomStateDirForProcess
@@ -4,21 +4,21 @@ import {
4
4
  MAX_GROUP_RELATION_LINES,
5
5
  applyGroupPromptBudget
6
6
  } from "./chunk-LDBMLTV2.mjs";
7
- import {
8
- readPeerRelationNote
9
- } from "./chunk-OJYZLNSD.mjs";
10
7
  import {
11
8
  ensureProjectPipelineSkeleton
12
9
  } from "./chunk-F23B3GJV.mjs";
13
10
  import {
14
11
  getOrgProjectByTeamId,
15
12
  resolveOrgProjectRootByTeamId
16
- } from "./chunk-UNZ3D3B3.mjs";
13
+ } from "./chunk-3OXBG4OP.mjs";
14
+ import {
15
+ readPeerRelationNote
16
+ } from "./chunk-OJYZLNSD.mjs";
17
17
  import {
18
18
  buildCeoContextBlock,
19
19
  buildDepartmentContextBlock,
20
20
  isOrgPipelineCharter
21
- } from "./chunk-TAQQSDJN.mjs";
21
+ } from "./chunk-6SYECCCG.mjs";
22
22
  import {
23
23
  formatHandoverSupplementBlock,
24
24
  loadPendingHandoverForTeam
@@ -1,3 +1,9 @@
1
+ import {
2
+ applyConfiguredMaxTokens,
3
+ fetchNativeProviderWithRetry,
4
+ formatRequestShape,
5
+ stringifyJsonRequestBody
6
+ } from "./chunk-E5LABIPO.mjs";
1
7
  import {
2
8
  parseOpenAiCompletionsSseDataLine
3
9
  } from "./chunk-C36JYBG7.mjs";
@@ -357,12 +363,36 @@ async function runNativeOpenAiTextStreamToDispatcher(params) {
357
363
  if (params.providerAccelerationPlan || providerAcceleration.application.applied || providerAcceleration.application.warnings.length > 0) {
358
364
  params.log(formatProviderAccelerationApplication(providerAcceleration.application));
359
365
  }
360
- const res = await fetch(url, {
361
- method: "POST",
362
- headers: buildBearerOpenAiHeaders(cfg),
363
- body: JSON.stringify(requestBody),
364
- signal: params.signal
365
- });
366
+ applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
367
+ const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
368
+ params.log(
369
+ `[XKZOOM][native-reply][openai-completions] request_shape ${formatRequestShape({
370
+ bodyBytes,
371
+ messages: chatMessages,
372
+ tools: toolsForRequest,
373
+ maxTokens: requestBody.max_tokens
374
+ })}`
375
+ );
376
+ const res = await fetchNativeProviderWithRetry(
377
+ url,
378
+ {
379
+ method: "POST",
380
+ headers: buildBearerOpenAiHeaders(cfg),
381
+ body: bodyText,
382
+ signal: params.signal
383
+ },
384
+ {
385
+ label: "openai-completions",
386
+ providerId: cfg.providerId,
387
+ model: cfg.model,
388
+ adapter: "openai-completions",
389
+ bodyBytes,
390
+ messages: chatMessages,
391
+ tools: toolsForRequest,
392
+ maxTokens: requestBody.max_tokens,
393
+ log: params.log
394
+ }
395
+ );
366
396
  if (!res.ok) {
367
397
  const t = await res.text();
368
398
  throw new Error(`native OpenAI HTTP ${res.status}: ${t.slice(0, 500)}`);
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-KWQEFCOY.mjs";
5
5
  import {
6
6
  OWNED_TURN_TOOL_BY_NAME
7
- } from "./chunk-RTANSWHW.mjs";
7
+ } from "./chunk-THN36GA5.mjs";
8
8
 
9
9
  // src/mobile/action-planner.ts
10
10
  function validatePlannedToolAction(action) {
@@ -3,7 +3,7 @@ import {
3
3
  isOwnedRoutableToolName,
4
4
  resolveOwnedToolMode,
5
5
  routeOwnedToolCall
6
- } from "./chunk-JD5NPIMO.mjs";
6
+ } from "./chunk-LSQ47CLM.mjs";
7
7
  import {
8
8
  resolveOwnedSessionsHistory
9
9
  } from "./chunk-KLQSTA6K.mjs";