@xopcai/xopc 0.0.285 → 0.0.291

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 (1223) hide show
  1. package/README.md +16 -0
  2. package/README.zh-CN.md +16 -0
  3. package/dist/browser-ext/dist/assets/{auth-DB30ywek.js → auth-B2CDTr_F.js} +3 -2
  4. package/dist/browser-ext/dist/background.js +2 -2
  5. package/dist/browser-ext/dist/sidepanel.html +1 -1
  6. package/dist/browser-ext/dist/sidepanel.js +171 -145
  7. package/dist/browser-ext/manifest.json +1 -1
  8. package/dist/extensions/feishu/src/adapters/gateway-setup.js +14 -14
  9. package/dist/extensions/feishu/src/state/message-bindings.d.ts +1 -1
  10. package/dist/extensions/feishu/src/state/thread-bindings.d.ts +4 -4
  11. package/dist/extensions/feishu/src/state/thread-bindings.js +6 -6
  12. package/dist/extensions/feishu/src/subagent-hooks.d.ts +1 -1
  13. package/dist/extensions/feishu/src/subagent-hooks.js +5 -5
  14. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +9 -9
  15. package/dist/extensions/feishu/src/transport/webhook/monitor.js +4 -4
  16. package/dist/extensions/feishu/src/workflow-progress.d.ts +1 -1
  17. package/dist/extensions/feishu/src/workflow-progress.js +8 -7
  18. package/dist/extensions/telegram/src/approval-store.d.ts +2 -2
  19. package/dist/extensions/telegram/src/approval-store.js +1 -1
  20. package/dist/extensions/telegram/src/command-handler.d.ts +2 -2
  21. package/dist/extensions/telegram/src/command-handler.js +8 -8
  22. package/dist/extensions/telegram/src/delivery-chat-id.d.ts +1 -1
  23. package/dist/extensions/telegram/src/delivery-chat-id.js +7 -3
  24. package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
  25. package/dist/extensions/telegram/src/focus-handler.d.ts +2 -2
  26. package/dist/extensions/telegram/src/focus-handler.js +10 -10
  27. package/dist/extensions/telegram/src/inbound-processor.d.ts +3 -3
  28. package/dist/extensions/telegram/src/inbound-processor.js +11 -11
  29. package/dist/extensions/telegram/src/plugin.js +5 -5
  30. package/dist/extensions/telegram/src/routing-integration.d.ts +1 -1
  31. package/dist/extensions/telegram/src/routing-integration.js +19 -21
  32. package/dist/extensions/telegram/src/thread-bindings.d.ts +1 -1
  33. package/dist/extensions/telegram/src/workflow-progress.js +8 -7
  34. package/dist/extensions/telegram/xopc.extension.json +1 -1
  35. package/dist/extensions/weixin/src/auth/login-qr.d.ts +4 -4
  36. package/dist/extensions/weixin/src/auth/login-qr.js +21 -21
  37. package/dist/extensions/weixin/src/auth/weixin-account-id.d.ts +1 -1
  38. package/dist/extensions/weixin/src/auth/weixin-account-id.js +1 -1
  39. package/dist/extensions/weixin/src/cli/gateway-qr-login.d.ts +2 -2
  40. package/dist/extensions/weixin/src/cli/gateway-qr-login.js +13 -13
  41. package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
  42. package/dist/extensions/weixin/src/delivery-to.js +6 -2
  43. package/dist/extensions/weixin/src/messaging/inbound.d.ts +1 -1
  44. package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
  45. package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
  46. package/dist/extensions/weixin/src/plugin.js +5 -5
  47. package/dist/extensions/weixin/src/routing-integration.d.ts +1 -1
  48. package/dist/extensions/weixin/src/routing-integration.js +3 -3
  49. package/dist/extensions/weixin/src/workflow-progress.d.ts +1 -1
  50. package/dist/extensions/weixin/src/workflow-progress.js +7 -6
  51. package/dist/gateway/static/root/assets/{activity-store-B0BTIk9j.js → activity-store-6lmzUBEr.js} +1 -1
  52. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Dc-0QZTQ.js → agent-avatar-dicebear-BCtrkF15.js} +1 -1
  53. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D2eYNelh.js +1 -0
  54. package/dist/gateway/static/root/assets/agents-BedA5XwI.js +1 -0
  55. package/dist/gateway/static/root/assets/{api-Coly9ab6.js → api-D6yepxBp.js} +1 -1
  56. package/dist/gateway/static/root/assets/api-Dnfnl1Gd.js +1 -0
  57. package/dist/gateway/static/root/assets/{app-management-settings-panel-TWBO-msg.js → app-management-settings-panel-Md562Fo-.js} +1 -1
  58. package/dist/gateway/static/root/assets/{appearance-settings-CpTZ2KuT.js → appearance-settings-BiBFI4BM.js} +1 -1
  59. package/dist/gateway/static/root/assets/apps-page-Corla83b.js +1 -0
  60. package/dist/gateway/static/root/assets/{archive-plugin-z_u6alob.js → archive-plugin-A_Unp751.js} +1 -1
  61. package/dist/gateway/static/root/assets/{attachment-load-C2nS04TC.js → attachment-load-D6idSUyP.js} +1 -1
  62. package/dist/gateway/static/root/assets/{automations-page-aIBsw9zR.js → automations-page-C6j71Lgs.js} +1 -1
  63. package/dist/gateway/static/root/assets/automations-workspace-DjZdhLQ5.js +6 -0
  64. package/dist/gateway/static/root/assets/{binary-plugins-CGmXoZnl.js → binary-plugins-BkKYh-8v.js} +1 -1
  65. package/dist/gateway/static/root/assets/{block-editor-CtvzCZhC.js → block-editor-CDcMvaku.js} +3 -3
  66. package/dist/gateway/static/root/assets/{browser-automation-inputs-BOTU1isH.js → browser-automation-inputs-Cq4sIJt2.js} +1 -1
  67. package/dist/gateway/static/root/assets/{browser-automations-page-BwU5V8J0.js → browser-automations-page-C64k4TBH.js} +2 -2
  68. package/dist/gateway/static/root/assets/browser-settings-page-1k5rj_qR.js +8 -0
  69. package/dist/gateway/static/root/assets/button-CGlRPNzi.js +1 -0
  70. package/dist/gateway/static/root/assets/capabilities-settings-panel-B2NvoTYb.js +8 -0
  71. package/dist/gateway/static/root/assets/channels-settings-DExixzp4.js +1 -0
  72. package/dist/gateway/static/root/assets/{channels-status-swr-Dfi0Desh.js → channels-status-swr-CVzEYBpX.js} +1 -1
  73. package/dist/gateway/static/root/assets/{chat-terminal-dock-B0MvcO6j.js → chat-terminal-dock-B9eKFkbg.js} +2 -2
  74. package/dist/gateway/static/root/assets/computer-model-settings-DW6j2lsn.js +1 -0
  75. package/dist/gateway/static/root/assets/computer-settings-page-C2Qyw63Q.js +1 -0
  76. package/dist/gateway/static/root/assets/connectors-page-C3ubZz7K.js +2 -0
  77. package/dist/gateway/static/root/assets/{cron-expression-CjrWuy2m.js → cron-expression-GDPX4NxC.js} +1 -1
  78. package/dist/gateway/static/root/assets/{date-picker-DXOvbHCr.js → date-picker-BdxjXVKL.js} +1 -1
  79. package/dist/gateway/static/root/assets/{dependency-picker-BEnC-eS0.js → dependency-picker-CXOa4uh4.js} +1 -1
  80. package/dist/gateway/static/root/assets/desktop-pet-CBWiAaSv.js +1 -0
  81. package/dist/gateway/static/root/assets/{desktop-pet-settings-CYyjcSn6.js → desktop-pet-settings-BX1aILDK.js} +1 -1
  82. package/dist/gateway/static/root/assets/{device-pairing-wizard-BPMGvAKE.js → device-pairing-wizard-bqm_Yf4i.js} +1 -1
  83. package/dist/gateway/static/root/assets/{extension-debug-page-H_aPMGXW.js → extension-debug-page-B4MMerja.js} +1 -1
  84. package/dist/gateway/static/root/assets/{extension-page-C1JnpeMt.js → extension-page-B3ZtINak.js} +1 -1
  85. package/dist/gateway/static/root/assets/extension-settings-page-8BkQVh0z.js +1 -0
  86. package/dist/gateway/static/root/assets/{gateway-config-swr-G2lQt7Ak.js → gateway-config-swr-BBovMBQ1.js} +1 -1
  87. package/dist/gateway/static/root/assets/gateway-settings-ZyhacQX5.js +1 -0
  88. package/dist/gateway/static/root/assets/{gateway-startup-retry-GP31PUrG.js → gateway-startup-retry-NXDtzZED.js} +1 -1
  89. package/dist/gateway/static/root/assets/heartbeat-settings-Bllcxm2A.js +1 -0
  90. package/dist/gateway/static/root/assets/home-page-Cv2e8XBR.js +1 -0
  91. package/dist/gateway/static/root/assets/{image-generation-api-CKFhfHSw.js → image-generation-api-D01ieqGC.js} +1 -1
  92. package/dist/gateway/static/root/assets/{imports-page-GROumhj8.js → imports-page-DJG1BJzd.js} +1 -1
  93. package/dist/gateway/static/root/assets/index-B7EieIE4.js +75 -0
  94. package/dist/gateway/static/root/assets/index-BD5uNzie.css +2 -0
  95. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-zcI822m_.js → keyboard-shortcuts-settings-6A6JOHTI.js} +1 -1
  96. package/dist/gateway/static/root/assets/local-app-workbench-page-Cipj52Zq.js +2 -0
  97. package/dist/gateway/static/root/assets/{local-apps-page-BtgDJ92Q.js → local-apps-page-bD-m7YHJ.js} +1 -1
  98. package/dist/gateway/static/root/assets/locale-store-eliqUnBr.js +1 -0
  99. package/dist/gateway/static/root/assets/logs-page-D5feO2yw.js +2 -0
  100. package/dist/gateway/static/root/assets/{management-settings-DasZxCyD.js → management-settings-B7mz0_44.js} +1 -1
  101. package/dist/gateway/static/root/assets/{markdown-view-6oYdBahT.js → markdown-view-BIg7cei7.js} +1 -1
  102. package/dist/gateway/static/root/assets/{media-plugins-CxthbBvk.js → media-plugins-DQ2HfMeG.js} +1 -1
  103. package/dist/gateway/static/root/assets/messages-NYDOR8-j.js +3 -0
  104. package/dist/gateway/static/root/assets/note-detail-panel-DhYJigb3.js +5 -0
  105. package/dist/gateway/static/root/assets/notes-page-Bg5NPUdf.js +8 -0
  106. package/dist/gateway/static/root/assets/page-tabs-DmG_Qjl8.js +1 -0
  107. package/dist/gateway/static/root/assets/popover-select-DldSX8GX.js +1 -0
  108. package/dist/gateway/static/root/assets/{preview-open-alternatives-Bevpbq9f.js → preview-open-alternatives-Y9J1kjKC.js} +1 -1
  109. package/dist/gateway/static/root/assets/proactive-page-Duc_NQ8l.js +1 -0
  110. package/dist/gateway/static/root/assets/{product-open-page-Bi1seZpM.js → product-open-page-DtgWUAwT.js} +1 -1
  111. package/dist/gateway/static/root/assets/project-detail-page-DVOiucVA.js +1 -0
  112. package/dist/gateway/static/root/assets/projects-page-Dr_kDoCJ.js +1 -0
  113. package/dist/gateway/static/root/assets/{registry-api-D0ddwBFj.js → registry-api-Dpm3N2h0.js} +1 -1
  114. package/dist/gateway/static/root/assets/remote-access-hub-hyJ2KKKK.js +1 -0
  115. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Wkru8_My.js → runtime-tools-settings-panel-DB7J9opJ.js} +2 -2
  116. package/dist/gateway/static/root/assets/{schema-form-CSMRzj9Y.js → schema-form-CMYuPOlE.js} +1 -1
  117. package/dist/gateway/static/root/assets/sessions-page-DGsnYcoh.js +1 -0
  118. package/dist/gateway/static/root/assets/settings-advanced-gate-DuzZqQMn.js +1 -0
  119. package/dist/gateway/static/root/assets/settings-form-section-BayJP08a.js +1 -0
  120. package/dist/gateway/static/root/assets/{settings-page-BcQGAnCs.js → settings-page-CWBqZtt6.js} +1 -1
  121. package/dist/gateway/static/root/assets/settings-page-layout-CsUQKRq0.js +1 -0
  122. package/dist/gateway/static/root/assets/setup-status-panel-C97S5g5c.js +1 -0
  123. package/dist/gateway/static/root/assets/{share-preview-page-DQocUl-1.js → share-preview-page-Wn5bQA-5.js} +1 -1
  124. package/dist/gateway/static/root/assets/shares-settings-pfVzP8F7.js +1 -0
  125. package/dist/gateway/static/root/assets/skill-reload-api-DDJ0ZKx3.js +1 -0
  126. package/dist/gateway/static/root/assets/skills-page-DbDpLjDW.js +2 -0
  127. package/dist/gateway/static/root/assets/{skills-page.utils-DtlfCgJp.js → skills-page.utils-DCHY_kou.js} +1 -1
  128. package/dist/gateway/static/root/assets/{system-settings-panel-Ct698Nf-.js → system-settings-panel-DhgITgId.js} +1 -1
  129. package/dist/gateway/static/root/assets/task-detail-page-UqwtiHYu.js +1 -0
  130. package/dist/gateway/static/root/assets/{theme-store-ng8KJsAT.js → theme-store-DUHPzKzv.js} +1 -1
  131. package/dist/gateway/static/root/assets/tunnel-api-DJ3gz2tM.js +1 -0
  132. package/dist/gateway/static/root/assets/{use-autosave-BSyxRHt2.js → use-autosave-htvgT192.js} +1 -1
  133. package/dist/gateway/static/root/assets/user-model-page-xOsXY_2W.js +2 -0
  134. package/dist/gateway/static/root/assets/{voice-api-key-field-SE3OQI1s.js → voice-api-key-field-BviJF3Oa.js} +1 -1
  135. package/dist/gateway/static/root/assets/{voice-config-api-VNuCmdFe.js → voice-config-api-Bjy8EFqi.js} +1 -1
  136. package/dist/gateway/static/root/assets/{work-discovery-overlay-Dn1vy2oq.js → work-discovery-overlay-BOBVNEYZ.js} +1 -1
  137. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BJEfGY-k.js → workflow-run-setup-panel-D1N9uUyM.js} +2 -2
  138. package/dist/gateway/static/root/assets/workflows-page-2ylzlgkG.js +6 -0
  139. package/dist/gateway/static/root/index.html +12 -12
  140. package/dist/package.js +1 -1
  141. package/dist/packages/computer-control-contract/src/index.js +178 -0
  142. package/dist/packages/endpoint-tools-protocol/src/index.js +312 -305
  143. package/dist/packages/gateway-contract/src/agent-stream.js +6 -0
  144. package/dist/packages/gateway-contract/src/automations.js +215 -0
  145. package/dist/packages/gateway-contract/src/browser-page-context.js +48 -39
  146. package/dist/packages/gateway-contract/src/browser-tab-binding.js +30 -25
  147. package/dist/packages/gateway-contract/src/clarifications.js +6 -0
  148. package/dist/packages/gateway-contract/src/connection-waits.js +6 -0
  149. package/dist/packages/gateway-contract/src/conversation-identity.js +17 -0
  150. package/dist/packages/gateway-contract/src/device-pairing.js +84 -78
  151. package/dist/packages/gateway-contract/src/discussions.js +19 -15
  152. package/dist/packages/gateway-contract/src/files.js +55 -0
  153. package/dist/packages/gateway-contract/src/home.js +188 -0
  154. package/dist/packages/gateway-contract/src/index.js +65 -0
  155. package/dist/packages/gateway-contract/src/mobile-privacy.js +26 -0
  156. package/dist/packages/gateway-contract/src/model-selection.js +4 -1
  157. package/dist/packages/gateway-contract/src/new-session.js +5 -1
  158. package/dist/packages/gateway-contract/src/notifications.js +64 -59
  159. package/dist/packages/gateway-contract/src/proactive.js +133 -128
  160. package/dist/packages/gateway-contract/src/product-delivery.js +56 -50
  161. package/dist/packages/gateway-contract/src/project-monitoring.js +33 -28
  162. package/dist/packages/gateway-contract/src/project-operating.js +100 -0
  163. package/dist/packages/gateway-contract/src/session-identity.js +38 -34
  164. package/dist/packages/gateway-contract/src/session-input-reliability.js +6 -0
  165. package/dist/packages/gateway-contract/src/sessions.js +145 -0
  166. package/dist/packages/gateway-contract/src/task-lifecycle.js +69 -64
  167. package/dist/packages/gateway-contract/src/task-runs.js +80 -75
  168. package/dist/packages/gateway-contract/src/tasks.js +445 -438
  169. package/dist/packages/gateway-contract/src/tool-activity.js +154 -149
  170. package/dist/packages/gateway-contract/src/turn-outcome.js +118 -112
  171. package/dist/packages/gateway-contract/src/user-message-display.js +13 -8
  172. package/dist/packages/gateway-contract/src/welcome-suggestions.js +6 -0
  173. package/dist/packages/realtime-client/src/index.js +1 -1
  174. package/dist/packages/realtime-protocol/src/index.js +4 -2
  175. package/dist/packages/realtime-protocol/src/voice-audio.js +15 -10
  176. package/dist/packages/realtime-protocol/src/voice-catalog.js +61 -0
  177. package/dist/packages/realtime-protocol/src/voice.js +257 -248
  178. package/dist/src/activity/types.d.ts +1 -1
  179. package/dist/src/agent/agent-instance-gateway.d.ts +18 -18
  180. package/dist/src/agent/agent-manager.d.ts +28 -27
  181. package/dist/src/agent/agent-manager.js +184 -182
  182. package/dist/src/agent/background-review/coordinator.d.ts +3 -3
  183. package/dist/src/agent/background-review/coordinator.js +10 -10
  184. package/dist/src/agent/background-review/run-background-review.d.ts +1 -1
  185. package/dist/src/agent/background-review/run-background-review.js +15 -15
  186. package/dist/src/agent/bootstrap/bootstrap-cache.d.ts +4 -4
  187. package/dist/src/agent/bootstrap/bootstrap-cache.js +9 -9
  188. package/dist/src/agent/bootstrap/bootstrap-files.d.ts +4 -4
  189. package/dist/src/agent/bootstrap/bootstrap-files.js +9 -9
  190. package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +1 -1
  191. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +3 -3
  192. package/dist/src/agent/child-agent-factory.d.ts +3 -3
  193. package/dist/src/agent/child-agent-factory.js +5 -5
  194. package/dist/src/agent/coding/workspace-revision.js +1 -1
  195. package/dist/src/agent/commands/command-registry.js +2 -1
  196. package/dist/src/agent/context/audit.d.ts +2 -2
  197. package/dist/src/agent/context/audit.js +5 -4
  198. package/dist/src/agent/context/coordinator.d.ts +6 -6
  199. package/dist/src/agent/context/coordinator.js +13 -13
  200. package/dist/src/agent/context/execution-context.js +4 -3
  201. package/dist/src/agent/context/execution-scope.d.ts +3 -3
  202. package/dist/src/agent/context/execution-scope.js +13 -13
  203. package/dist/src/agent/context/project-context.d.ts +1 -1
  204. package/dist/src/agent/context/project-context.js +4 -4
  205. package/dist/src/agent/embedded/execution-context.d.ts +1 -1
  206. package/dist/src/agent/embedded/execution-context.js +3 -3
  207. package/dist/src/agent/embedded/index.d.ts +1 -1
  208. package/dist/src/agent/embedded/index.js +2 -2
  209. package/dist/src/agent/embedded/model-runtime.js +1 -1
  210. package/dist/src/agent/embedded/run-for-session.d.ts +1 -1
  211. package/dist/src/agent/embedded/run-for-session.js +79 -105
  212. package/dist/src/agent/embedded/run-turn.js +86 -34
  213. package/dist/src/agent/embedded/runs.d.ts +11 -11
  214. package/dist/src/agent/embedded/runs.js +22 -22
  215. package/dist/src/agent/embedded/session-runner.d.ts +2 -2
  216. package/dist/src/agent/embedded/session-runner.js +5 -5
  217. package/dist/src/agent/embedded/session-tool-result-guard.d.ts +2 -2
  218. package/dist/src/agent/embedded/session-tool-result-guard.js +8 -8
  219. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.d.ts +2 -2
  220. package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +4 -4
  221. package/dist/src/agent/embedded/transcript-runtime.d.ts +4 -3
  222. package/dist/src/agent/embedded/transcript-runtime.js +33 -20
  223. package/dist/src/agent/embedded/types.d.ts +2 -1
  224. package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
  225. package/dist/src/agent/external-tools/composio-provider.js +12 -11
  226. package/dist/src/agent/external-tools/endpoint-provider.js +5 -3
  227. package/dist/src/agent/external-tools/extension-provider.d.ts +1 -1
  228. package/dist/src/agent/external-tools/extension-provider.js +1 -1
  229. package/dist/src/agent/external-tools/gateway-tools.js +9 -8
  230. package/dist/src/agent/external-tools/index.js +3 -3
  231. package/dist/src/agent/external-tools/mcp-provider.d.ts +2 -2
  232. package/dist/src/agent/external-tools/mcp-provider.js +8 -8
  233. package/dist/src/agent/external-tools/memory-provider.d.ts +1 -1
  234. package/dist/src/agent/external-tools/memory-provider.js +1 -1
  235. package/dist/src/agent/external-tools/types.d.ts +1 -1
  236. package/dist/src/agent/image/tool-model-config.js +1 -1
  237. package/dist/src/agent/inbound/attachment-pipeline.d.ts +7 -7
  238. package/dist/src/agent/inbound/attachment-pipeline.js +22 -21
  239. package/dist/src/agent/inbound/inbound-loop.d.ts +6 -6
  240. package/dist/src/agent/inbound/inbound-loop.js +23 -23
  241. package/dist/src/agent/inbound/turn-dispatcher.d.ts +14 -14
  242. package/dist/src/agent/inbound/turn-dispatcher.js +16 -16
  243. package/dist/src/agent/ipc/bus.d.ts +1 -1
  244. package/dist/src/agent/ipc/types.d.ts +3 -3
  245. package/dist/src/agent/ipc/types.js +1 -1
  246. package/dist/src/agent/lifecycle/hook-handler.d.ts +2 -2
  247. package/dist/src/agent/lifecycle/hook-handler.js +6 -6
  248. package/dist/src/agent/lifecycle/manager.d.ts +1 -1
  249. package/dist/src/agent/lifecycle/manager.js +4 -4
  250. package/dist/src/agent/lifecycle/types.d.ts +1 -1
  251. package/dist/src/agent/mcp/bundle-mcp-runtime.d.ts +4 -4
  252. package/dist/src/agent/mcp/bundle-mcp-runtime.js +21 -20
  253. package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +1 -1
  254. package/dist/src/agent/mcp/bundle-mcp-tools.js +2 -2
  255. package/dist/src/agent/mcp/bundle-mcp-types.d.ts +4 -4
  256. package/dist/src/agent/mcp/index.js +2 -2
  257. package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +9 -8
  258. package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
  259. package/dist/src/agent/memory/compaction-ledger.js +9 -2
  260. package/dist/src/agent/memory/compaction-promotion.d.ts +2 -2
  261. package/dist/src/agent/memory/compaction-promotion.js +6 -6
  262. package/dist/src/agent/memory/compaction-source-planner.d.ts +2 -0
  263. package/dist/src/agent/memory/compaction-source-planner.js +9 -1
  264. package/dist/src/agent/memory/compaction.d.ts +6 -1
  265. package/dist/src/agent/memory/compaction.js +22 -11
  266. package/dist/src/agent/memory/context-recovery.d.ts +44 -0
  267. package/dist/src/agent/memory/context-recovery.js +96 -0
  268. package/dist/src/agent/memory/manager.js +11 -11
  269. package/dist/src/agent/memory/turn-provenance.d.ts +5 -5
  270. package/dist/src/agent/memory/turn-provenance.js +21 -17
  271. package/dist/src/agent/memory/types.d.ts +2 -2
  272. package/dist/src/agent/messaging/command-handler.d.ts +11 -11
  273. package/dist/src/agent/messaging/command-handler.js +7 -7
  274. package/dist/src/agent/messaging/message-router.d.ts +1 -1
  275. package/dist/src/agent/messaging/message-router.js +4 -4
  276. package/dist/src/agent/messaging/outbound-coordinator.d.ts +2 -2
  277. package/dist/src/agent/messaging/outbound-coordinator.js +4 -4
  278. package/dist/src/agent/middleware/context.d.ts +1 -2
  279. package/dist/src/agent/middleware/context.js +2 -5
  280. package/dist/src/agent/models/manager.d.ts +10 -10
  281. package/dist/src/agent/models/manager.js +34 -34
  282. package/dist/src/agent/orchestration/agent-event-handler.js +14 -14
  283. package/dist/src/agent/orchestration/agent-orchestrator.d.ts +7 -7
  284. package/dist/src/agent/orchestration/agent-orchestrator.js +29 -29
  285. package/dist/src/agent/orchestration/context-overflow.js +2 -0
  286. package/dist/src/agent/orchestration/llm-turn-retry.d.ts +1 -1
  287. package/dist/src/agent/orchestration/llm-turn-retry.js +2 -2
  288. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -1
  289. package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +2 -2
  290. package/dist/src/agent/prompt/response-language.d.ts +1 -1
  291. package/dist/src/agent/prompt/response-language.js +2 -2
  292. package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -2
  293. package/dist/src/agent/prompt/service-prompt-builder.js +4 -4
  294. package/dist/src/agent/prompt/subagent-context.d.ts +4 -4
  295. package/dist/src/agent/prompt/subagent-context.js +1 -1
  296. package/dist/src/agent/prompt/system-prompt-params.d.ts +4 -4
  297. package/dist/src/agent/prompt/system-prompt-params.js +13 -12
  298. package/dist/src/agent/reply/apply-turn-user-enrichment.d.ts +1 -1
  299. package/dist/src/agent/reply/apply-turn-user-enrichment.js +3 -3
  300. package/dist/src/agent/reply/post-compaction-context.d.ts +1 -1
  301. package/dist/src/agent/reply/post-compaction-context.js +2 -2
  302. package/dist/src/agent/service/btw-query.d.ts +1 -1
  303. package/dist/src/agent/service/btw-query.js +4 -4
  304. package/dist/src/agent/service/build-direct-message-content.d.ts +1 -1
  305. package/dist/src/agent/service/build-direct-message-content.js +2 -2
  306. package/dist/src/agent/service/direct-turn-helpers.d.ts +6 -6
  307. package/dist/src/agent/service/direct-turn-helpers.js +17 -16
  308. package/dist/src/agent/service/parse-outbound-session-key.d.ts +1 -1
  309. package/dist/src/agent/service/parse-outbound-session-key.js +8 -9
  310. package/dist/src/agent/service/process-direct-one-shot.d.ts +11 -11
  311. package/dist/src/agent/service/process-direct-one-shot.js +16 -16
  312. package/dist/src/agent/service/process-direct-streaming.d.ts +18 -18
  313. package/dist/src/agent/service/process-direct-streaming.js +45 -40
  314. package/dist/src/agent/service/session-context-report.d.ts +1 -1
  315. package/dist/src/agent/service/session-context-report.js +3 -3
  316. package/dist/src/agent/service/webchat-tts.d.ts +3 -3
  317. package/dist/src/agent/service/webchat-tts.js +7 -7
  318. package/dist/src/agent/service.d.ts +23 -23
  319. package/dist/src/agent/service.js +113 -110
  320. package/dist/src/agent/service.types.d.ts +3 -3
  321. package/dist/src/agent/session/session-config-service.d.ts +5 -5
  322. package/dist/src/agent/session/session-config-service.js +53 -66
  323. package/dist/src/agent/session/session-context.d.ts +2 -2
  324. package/dist/src/agent/session/session-context.js +2 -2
  325. package/dist/src/agent/session/session-hydrator.d.ts +3 -3
  326. package/dist/src/agent/session/session-hydrator.js +19 -19
  327. package/dist/src/agent/session/session-inspector.d.ts +7 -7
  328. package/dist/src/agent/session/session-inspector.js +46 -46
  329. package/dist/src/agent/session/session-lifecycle.d.ts +2 -2
  330. package/dist/src/agent/session/session-lifecycle.js +17 -17
  331. package/dist/src/agent/session/session-state-bag.d.ts +18 -18
  332. package/dist/src/agent/session/session-state-bag.js +46 -46
  333. package/dist/src/agent/session/tracker.d.ts +7 -7
  334. package/dist/src/agent/session/tracker.js +27 -27
  335. package/dist/src/agent/skills/hub-lock.js +1 -1
  336. package/dist/src/agent/skills/index.js +25 -15
  337. package/dist/src/agent/skills/parse-skill-metadata.d.ts +5 -1
  338. package/dist/src/agent/skills/parse-skill-metadata.js +21 -1
  339. package/dist/src/agent/skills/types.d.ts +7 -0
  340. package/dist/src/agent/source-context/types.d.ts +1 -1
  341. package/dist/src/agent/tasks/task-judge-service.d.ts +1 -1
  342. package/dist/src/agent/tasks/task-judge-service.js +14 -13
  343. package/dist/src/agent/tool-manuals/computer.d.ts +1 -0
  344. package/dist/src/agent/tool-manuals/computer.js +19 -0
  345. package/dist/src/agent/tool-manuals/index.js +7 -0
  346. package/dist/src/agent/tools/automation-tool.js +2 -0
  347. package/dist/src/agent/tools/chain-tracker.d.ts +10 -10
  348. package/dist/src/agent/tools/chain-tracker.js +31 -31
  349. package/dist/src/agent/tools/clarify-tool.d.ts +1 -1
  350. package/dist/src/agent/tools/computer-use-tool.d.ts +11 -0
  351. package/dist/src/agent/tools/computer-use-tool.js +86 -0
  352. package/dist/src/agent/tools/create-share-tool.js +2 -0
  353. package/dist/src/agent/tools/delegate-tool.d.ts +1 -1
  354. package/dist/src/agent/tools/delegate-tool.js +4 -4
  355. package/dist/src/agent/tools/exec-command.d.ts +1 -1
  356. package/dist/src/agent/tools/exec-command.js +1 -1
  357. package/dist/src/agent/tools/factory.d.ts +5 -3
  358. package/dist/src/agent/tools/factory.js +66 -36
  359. package/dist/src/agent/tools/knowledge-memory-tool.js +2 -2
  360. package/dist/src/agent/tools/managed-job-tool.d.ts +1 -1
  361. package/dist/src/agent/tools/managed-job-tool.js +2 -2
  362. package/dist/src/agent/tools/publish-artifacts.js +2 -0
  363. package/dist/src/agent/tools/send-media.js +2 -0
  364. package/dist/src/agent/tools/session-recall-tool.d.ts +1 -1
  365. package/dist/src/agent/tools/session-recall-tool.js +3 -3
  366. package/dist/src/agent/tools/session-search-tool.d.ts +1 -1
  367. package/dist/src/agent/tools/session-search-tool.js +6 -6
  368. package/dist/src/agent/tools/skill-install-tool.d.ts +3 -3
  369. package/dist/src/agent/tools/skill-install-tool.js +3 -3
  370. package/dist/src/agent/tools/todo-tool.d.ts +3 -3
  371. package/dist/src/agent/tools/todo-tool.js +4 -4
  372. package/dist/src/agent/tools/workflow-tool.d.ts +1 -1
  373. package/dist/src/agent/tools/workflow-tool.js +15 -13
  374. package/dist/src/agent/tools/write.js +2 -0
  375. package/dist/src/agent/tools/xopc-use-tool.d.ts +1 -1
  376. package/dist/src/agent/tools/xopc-use-tool.js +16 -13
  377. package/dist/src/agent/types.d.ts +1 -1
  378. package/dist/src/agent/workflow/catalog.js +4 -2
  379. package/dist/src/agent/workflow/channel-capability.d.ts +2 -2
  380. package/dist/src/agent/workflow/progress-broker.d.ts +4 -4
  381. package/dist/src/agent/workflow/progress-broker.js +17 -17
  382. package/dist/src/agent/workflow/subagent-runner.js +10 -10
  383. package/dist/src/agent/workflow/types.d.ts +2 -2
  384. package/dist/src/agent/workflow/workflow-child-tools.js +1 -1
  385. package/dist/src/agent/workspace-runtime/registry.js +1 -1
  386. package/dist/src/agent-config/index.js +2 -2
  387. package/dist/src/agent-config/resolver.js +5 -0
  388. package/dist/src/agent-config/schema.d.ts +32 -0
  389. package/dist/src/agent-config/schema.js +5 -2
  390. package/dist/src/ai-assist/text-assist.js +1 -1
  391. package/dist/src/auth/credentials.js +2 -2
  392. package/dist/src/auth/oauth/xopc-cloud.js +1 -1
  393. package/dist/src/auth/profiles/store.js +1 -1
  394. package/dist/src/auth/sync-provider-auth.js +2 -2
  395. package/dist/src/automations/domain/types.d.ts +7 -7
  396. package/dist/src/automations/domain/validation.js +2 -0
  397. package/dist/src/automations/service/action-executor.js +15 -15
  398. package/dist/src/automations/service/automation-service.js +4 -3
  399. package/dist/src/automations/storage/automation-repository.js +2 -1
  400. package/dist/src/automations/storage/automation-run-repository.js +9 -8
  401. package/dist/src/browser/native-messaging-host.js +4 -1
  402. package/dist/src/browser/policy/approval-store.d.ts +4 -4
  403. package/dist/src/browser/policy/approval-store.js +8 -8
  404. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  405. package/dist/src/browser/providers/extension.js +6 -6
  406. package/dist/src/browser/providers/realtime-extension.js +2 -2
  407. package/dist/src/browser/runtime/browser-runtime.js +3 -3
  408. package/dist/src/capabilities/readiness/from-config.js +14 -2
  409. package/dist/src/capabilities/readiness/planner.js +3 -2
  410. package/dist/src/capabilities/readiness/types.d.ts +1 -1
  411. package/dist/src/channels/exec-approval-runtime.d.ts +1 -1
  412. package/dist/src/channels/manager.js +1 -1
  413. package/dist/src/channels/pipeline.js +2 -2
  414. package/dist/src/channels/plugin-types.d.ts +2 -2
  415. package/dist/src/channels/plugins/types.adapters.d.ts +1 -1
  416. package/dist/src/channels/telegram/index.d.ts +1 -1
  417. package/dist/src/channels/telegram/index.js +2 -2
  418. package/dist/src/chat-commands/agent-edit.js +2 -2
  419. package/dist/src/chat-commands/builtins/review.js +4 -4
  420. package/dist/src/chat-commands/builtins/session.js +1 -1
  421. package/dist/src/chat-commands/builtins/system.js +2 -2
  422. package/dist/src/chat-commands/builtins/thinking.js +7 -7
  423. package/dist/src/chat-commands/builtins/understanding.js +4 -4
  424. package/dist/src/chat-commands/builtins/workflow.js +8 -8
  425. package/dist/src/chat-commands/context.d.ts +9 -9
  426. package/dist/src/chat-commands/context.js +35 -35
  427. package/dist/src/chat-commands/index.d.ts +1 -1
  428. package/dist/src/chat-commands/index.js +2 -2
  429. package/dist/src/chat-commands/processor.js +2 -2
  430. package/dist/src/chat-commands/registry.js +1 -1
  431. package/dist/src/chat-commands/session-key.d.ts +3 -3
  432. package/dist/src/chat-commands/session-key.js +20 -24
  433. package/dist/src/chat-commands/types.d.ts +3 -3
  434. package/dist/src/cli/command-manifest.js +1 -1
  435. package/dist/src/cli/commands/agent/interactive.d.ts +1 -1
  436. package/dist/src/cli/commands/agent/interactive.js +8 -8
  437. package/dist/src/cli/commands/agent/stream-renderer.d.ts +1 -1
  438. package/dist/src/cli/commands/agent/stream-renderer.js +2 -2
  439. package/dist/src/cli/commands/agent.js +10 -6
  440. package/dist/src/cli/commands/doctor/checks/database-schema.js +3 -2
  441. package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
  442. package/dist/src/cli/commands/doctor/checks/session-integrity.js +9 -9
  443. package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
  444. package/dist/src/cli/commands/gateway/run-foreground.js +2 -1
  445. package/dist/src/cli/commands/import.js +2 -1
  446. package/dist/src/cli/commands/logs.js +3 -3
  447. package/dist/src/cli/commands/models.js +1 -1
  448. package/dist/src/cli/commands/project.js +5 -5
  449. package/dist/src/cli/commands/resume.js +4 -4
  450. package/dist/src/cli/commands/tunnel.js +2 -1
  451. package/dist/src/computer/broker.d.ts +97 -0
  452. package/dist/src/computer/broker.js +337 -0
  453. package/dist/src/computer/config.d.ts +9 -0
  454. package/dist/src/computer/config.js +16 -0
  455. package/dist/src/computer/control-guard.d.ts +4 -0
  456. package/dist/src/computer/control-guard.js +17 -0
  457. package/dist/src/computer/errors.d.ts +7 -0
  458. package/dist/src/computer/errors.js +30 -0
  459. package/dist/src/computer/model-adapter.d.ts +44 -0
  460. package/dist/src/computer/model-adapter.js +273 -0
  461. package/dist/src/computer/model-config.d.ts +3 -0
  462. package/dist/src/computer/model-config.js +27 -0
  463. package/dist/src/computer/model-policy.d.ts +3 -0
  464. package/dist/src/computer/model-policy.js +20 -0
  465. package/dist/src/computer/runtime.d.ts +128 -0
  466. package/dist/src/computer/runtime.js +388 -0
  467. package/dist/src/config/agent-profile.d.ts +3 -3
  468. package/dist/src/config/agent-profile.js +12 -12
  469. package/dist/src/config/index.js +4 -4
  470. package/dist/src/config/loader.js +2 -2
  471. package/dist/src/config/models-json.d.ts +42 -6
  472. package/dist/src/config/models-json.js +15 -1
  473. package/dist/src/config/schema.d.ts +38 -1
  474. package/dist/src/config/schema.js +11 -2
  475. package/dist/src/config/voice.js +2 -2
  476. package/dist/src/connectors/catalog.js +2 -1
  477. package/dist/src/connectors/composio-sessions.d.ts +1 -1
  478. package/dist/src/connectors/composio-sessions.js +3 -3
  479. package/dist/src/connectors/connection-recovery-service.d.ts +4 -4
  480. package/dist/src/connectors/connection-recovery-service.js +41 -37
  481. package/dist/src/connectors/principal.d.ts +1 -1
  482. package/dist/src/connectors/principal.js +4 -3
  483. package/dist/src/connectors/types.d.ts +2 -2
  484. package/dist/src/discussions/action-tasks.js +5 -2
  485. package/dist/src/discussions/analyzer.js +2 -1
  486. package/dist/src/discussions/edits.js +4 -2
  487. package/dist/src/discussions/index.js +1 -1
  488. package/dist/src/discussions/organizer.js +3 -2
  489. package/dist/src/discussions/recording.js +5 -2
  490. package/dist/src/discussions/recordingJobs.js +2 -1
  491. package/dist/src/discussions/repository.js +2 -1
  492. package/dist/src/discussions/revisions.js +2 -1
  493. package/dist/src/discussions/sealer.js +1 -1
  494. package/dist/src/discussions/service.js +6 -3
  495. package/dist/src/discussions/types.js +4 -0
  496. package/dist/src/endpoint-tools/auth.js +2 -1
  497. package/dist/src/endpoint-tools/binding-service.d.ts +8 -8
  498. package/dist/src/endpoint-tools/binding-service.js +14 -14
  499. package/dist/src/endpoint-tools/invocation-service.d.ts +1 -0
  500. package/dist/src/endpoint-tools/invocation-service.js +7 -3
  501. package/dist/src/endpoint-tools/policy.js +9 -1
  502. package/dist/src/endpoint-tools/registry.js +2 -1
  503. package/dist/src/endpoint-tools/runtime.js +1 -0
  504. package/dist/src/endpoint-tools/upload-service.d.ts +13 -1
  505. package/dist/src/endpoint-tools/upload-service.js +75 -9
  506. package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -1
  507. package/dist/src/execution-environments/local-worktree-manager.js +2 -2
  508. package/dist/src/execution-environments/session-environment-service.d.ts +3 -3
  509. package/dist/src/execution-environments/session-environment-service.js +10 -10
  510. package/dist/src/execution-environments/store.d.ts +2 -2
  511. package/dist/src/execution-environments/store.js +15 -14
  512. package/dist/src/execution-environments/subject.d.ts +1 -1
  513. package/dist/src/execution-environments/subject.js +2 -2
  514. package/dist/src/execution-environments/types.d.ts +2 -2
  515. package/dist/src/extensions/api.js +1 -1
  516. package/dist/src/extensions/install.js +1 -1
  517. package/dist/src/extensions/loader.d.ts +1 -1
  518. package/dist/src/extensions/lockfile.js +1 -1
  519. package/dist/src/extensions/types/core.d.ts +2 -2
  520. package/dist/src/extensions/types/hooks.d.ts +12 -12
  521. package/dist/src/extensions/types/tools.d.ts +3 -3
  522. package/dist/src/extensions/types/tui.d.ts +3 -3
  523. package/dist/src/files/file-service.d.ts +3 -3
  524. package/dist/src/files/file-service.js +3 -3
  525. package/dist/src/gateway/agent-builtin-tools.d.ts +7 -1
  526. package/dist/src/gateway/agent-builtin-tools.js +7 -0
  527. package/dist/src/gateway/agents-admin.js +1 -1
  528. package/dist/src/gateway/automation-agent-session.js +5 -5
  529. package/dist/src/gateway/chat-stream/mapper.d.ts +1 -1
  530. package/dist/src/gateway/chat-stream/mapper.js +4 -2
  531. package/dist/src/gateway/chat-stream/protocol.d.ts +1 -1
  532. package/dist/src/gateway/chat-stream/thinking-delta-coalescer.js +1 -1
  533. package/dist/src/gateway/clarify-runtime.d.ts +2 -2
  534. package/dist/src/gateway/clarify-runtime.js +2 -2
  535. package/dist/src/gateway/file-path-classifier.d.ts +2 -2
  536. package/dist/src/gateway/file-path-classifier.js +5 -5
  537. package/dist/src/gateway/file-reference-registry.d.ts +2 -2
  538. package/dist/src/gateway/file-reference-registry.js +1 -1
  539. package/dist/src/gateway/file-space-service.js +3 -3
  540. package/dist/src/gateway/gateway-workflow-host.types.d.ts +1 -1
  541. package/dist/src/gateway/global-defaults-admin.js +16 -0
  542. package/dist/src/gateway/heartbeat/check-store.js +2 -1
  543. package/dist/src/gateway/heartbeat/service.js +23 -9
  544. package/dist/src/gateway/hono/lib/config-payload.d.ts +15 -0
  545. package/dist/src/gateway/hono/lib/config-payload.js +2 -1
  546. package/dist/src/gateway/hono/middleware/log-context.d.ts +1 -1
  547. package/dist/src/gateway/hono/middleware/log-context.js +3 -3
  548. package/dist/src/gateway/hono/routes/agent-stream.js +20 -20
  549. package/dist/src/gateway/hono/routes/browser-session.js +2 -2
  550. package/dist/src/gateway/hono/routes/browser.js +22 -20
  551. package/dist/src/gateway/hono/routes/chat-model-config.d.ts +1 -1
  552. package/dist/src/gateway/hono/routes/chat-model-config.js +6 -6
  553. package/dist/src/gateway/hono/routes/commands-skills.js +13 -13
  554. package/dist/src/gateway/hono/routes/config-patch/misc.js +13 -2
  555. package/dist/src/gateway/hono/routes/connection-waits.js +5 -5
  556. package/dist/src/gateway/hono/routes/connectors.js +5 -5
  557. package/dist/src/gateway/hono/routes/context-sources.js +2 -1
  558. package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -0
  559. package/dist/src/gateway/hono/routes/devices.js +2 -0
  560. package/dist/src/gateway/hono/routes/discussions.js +2 -2
  561. package/dist/src/gateway/hono/routes/endpoint-tools.js +11 -9
  562. package/dist/src/gateway/hono/routes/execution-environments.js +11 -11
  563. package/dist/src/gateway/hono/routes/file-references.js +5 -5
  564. package/dist/src/gateway/hono/routes/home.js +1 -1
  565. package/dist/src/gateway/hono/routes/interaction-state.js +6 -6
  566. package/dist/src/gateway/hono/routes/logs.js +2 -2
  567. package/dist/src/gateway/hono/routes/media.js +3 -3
  568. package/dist/src/gateway/hono/routes/models.js +6 -3
  569. package/dist/src/gateway/hono/routes/notes.js +11 -11
  570. package/dist/src/gateway/hono/routes/projects.js +26 -26
  571. package/dist/src/gateway/hono/routes/public-gateway.js +3 -3
  572. package/dist/src/gateway/hono/routes/session-input-handler.d.ts +10 -10
  573. package/dist/src/gateway/hono/routes/session-input-handler.js +20 -17
  574. package/dist/src/gateway/hono/routes/sessions.js +79 -50
  575. package/dist/src/gateway/hono/routes/shares.js +38 -38
  576. package/dist/src/gateway/hono/routes/side-chats.js +4 -2
  577. package/dist/src/gateway/hono/routes/site-shares.js +6 -6
  578. package/dist/src/gateway/hono/routes/tasks.js +18 -13
  579. package/dist/src/gateway/hono/routes/tui.js +2 -2
  580. package/dist/src/gateway/hono/routes/user-model.js +1 -1
  581. package/dist/src/gateway/hono/routes/voice.js +56 -2
  582. package/dist/src/gateway/hono/routes/workflows.js +7 -7
  583. package/dist/src/gateway/media-access.d.ts +1 -1
  584. package/dist/src/gateway/media-access.js +3 -3
  585. package/dist/src/gateway/resolve-webchat-session-key.d.ts +5 -5
  586. package/dist/src/gateway/resolve-webchat-session-key.js +5 -5
  587. package/dist/src/gateway/security/gateway-scopes.d.ts +1 -1
  588. package/dist/src/gateway/security/gateway-scopes.js +3 -0
  589. package/dist/src/gateway/service/agent-runner.d.ts +15 -15
  590. package/dist/src/gateway/service/agent-runner.js +63 -62
  591. package/dist/src/gateway/service/config-coordinator.js +4 -1
  592. package/dist/src/gateway/service/marketplace-service.d.ts +3 -3
  593. package/dist/src/gateway/service/marketplace-service.js +6 -6
  594. package/dist/src/gateway/service/run-gateway-agent.js +51 -49
  595. package/dist/src/gateway/service/session-input-coordinator.d.ts +11 -11
  596. package/dist/src/gateway/service/session-input-coordinator.js +76 -74
  597. package/dist/src/gateway/service/sessions-api.d.ts +19 -20
  598. package/dist/src/gateway/service/sessions-api.js +30 -38
  599. package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -2
  600. package/dist/src/gateway/service/task-conversation-query-service.js +3 -3
  601. package/dist/src/gateway/service.d.ts +4 -4
  602. package/dist/src/gateway/service.js +76 -70
  603. package/dist/src/gateway/session-context-summary.d.ts +1 -1
  604. package/dist/src/gateway/session-context-summary.js +13 -11
  605. package/dist/src/gateway/session-reset-service.d.ts +4 -4
  606. package/dist/src/gateway/session-reset-service.js +12 -12
  607. package/dist/src/gateway/side-chat/context-snapshot.d.ts +2 -2
  608. package/dist/src/gateway/side-chat/context-snapshot.js +2 -2
  609. package/dist/src/gateway/side-chat/manager.d.ts +4 -4
  610. package/dist/src/gateway/side-chat/manager.js +13 -13
  611. package/dist/src/gateway/side-chat/run-service.js +8 -8
  612. package/dist/src/gateway/side-chat/types.d.ts +4 -4
  613. package/dist/src/heartbeat/index.js +1 -1
  614. package/dist/src/heartbeat/wake.d.ts +1 -1
  615. package/dist/src/history/ctx/exporter.js +11 -11
  616. package/dist/src/history/ctx/format.d.ts +1 -1
  617. package/dist/src/history/ctx/format.js +7 -7
  618. package/dist/src/imports/contextImport.js +2 -1
  619. package/dist/src/imports/productImport.js +2 -1
  620. package/dist/src/infra/node-sqlite.js +9 -3
  621. package/dist/src/infra/process-diagnostics.js +9 -5
  622. package/dist/src/infra/sqlite-errors.js +25 -20
  623. package/dist/src/infra/unhandled-rejections.js +15 -7
  624. package/dist/src/infra/update-restart.js +1 -1
  625. package/dist/src/infra/warning-filter.js +9 -3
  626. package/dist/src/knowledge-memory/domain.d.ts +2 -2
  627. package/dist/src/knowledge-memory/repository.d.ts +1 -1
  628. package/dist/src/knowledge-memory/repository.js +10 -8
  629. package/dist/src/mcp/channel-bridge.d.ts +3 -3
  630. package/dist/src/mcp/channel-bridge.js +7 -7
  631. package/dist/src/mcp/channel-shared.d.ts +4 -4
  632. package/dist/src/mcp/channel-shared.js +3 -3
  633. package/dist/src/mcp/channel-tools.js +19 -19
  634. package/dist/src/media/session-references.js +2 -2
  635. package/dist/src/memory-maintenance/service.js +2 -1
  636. package/dist/src/migrations/conversation-routing-config.d.ts +2 -0
  637. package/dist/src/migrations/conversation-routing-config.js +42 -0
  638. package/dist/src/migrations/runner.js +6 -5
  639. package/dist/src/notes/service.d.ts +2 -2
  640. package/dist/src/notes/service.js +6 -6
  641. package/dist/src/notes/store.js +2 -1
  642. package/dist/src/notes/types.d.ts +3 -3
  643. package/dist/src/notifications/device-store.js +2 -1
  644. package/dist/src/notifications/planner.js +5 -3
  645. package/dist/src/notifications/proactive-channel.js +4 -1
  646. package/dist/src/notifications/proactive-policy.js +2 -1
  647. package/dist/src/notifications/service.d.ts +4 -4
  648. package/dist/src/notifications/service.js +4 -1
  649. package/dist/src/notifications/store.js +4 -1
  650. package/dist/src/notifications/web-push.js +4 -1
  651. package/dist/src/platform/contracts.d.ts +3 -3
  652. package/dist/src/proactive/actions/service.js +2 -1
  653. package/dist/src/proactive/events/product-event-bridge.js +1 -1
  654. package/dist/src/proactive/events/repository.js +2 -1
  655. package/dist/src/proactive/execution/authorization.js +2 -1
  656. package/dist/src/proactive/execution/context.js +2 -1
  657. package/dist/src/proactive/execution/insight.js +2 -0
  658. package/dist/src/proactive/execution/repository.js +2 -1
  659. package/dist/src/proactive/execution/worker.js +3 -2
  660. package/dist/src/proactive/experience.d.ts +1 -1
  661. package/dist/src/proactive/experience.js +4 -3
  662. package/dist/src/proactive/follow-ups.d.ts +7 -7
  663. package/dist/src/proactive/follow-ups.js +5 -4
  664. package/dist/src/proactive/inbox/cards.js +5 -2
  665. package/dist/src/proactive/inbox/delivery.js +2 -1
  666. package/dist/src/proactive/inbox/digest.js +2 -1
  667. package/dist/src/proactive/inbox/lifecycle.js +2 -1
  668. package/dist/src/proactive/inbox/repository.js +2 -1
  669. package/dist/src/proactive/inbox/service.js +2 -1
  670. package/dist/src/proactive/mail-thread.js +2 -1
  671. package/dist/src/proactive/maintenance.js +2 -1
  672. package/dist/src/proactive/metrics.js +2 -1
  673. package/dist/src/proactive/policy/presence.js +2 -1
  674. package/dist/src/proactive/policy/service.js +4 -1
  675. package/dist/src/proactive/routing/batch-repository.js +2 -1
  676. package/dist/src/proactive/scenarios/control.js +4 -1
  677. package/dist/src/proactive/scenarios/repository.js +2 -1
  678. package/dist/src/proactive/service.js +2 -1
  679. package/dist/src/proactive/source-freshness.js +2 -1
  680. package/dist/src/proactive/status.js +2 -1
  681. package/dist/src/proactive/temporal/schedule.js +2 -1
  682. package/dist/src/projects/automation-bind.js +2 -1
  683. package/dist/src/projects/index.js +2 -2
  684. package/dist/src/projects/knowledge-bind.js +2 -1
  685. package/dist/src/projects/project-agent.js +4 -1
  686. package/dist/src/projects/project-service.d.ts +4 -4
  687. package/dist/src/projects/project-service.js +11 -10
  688. package/dist/src/projects/project-store.js +11 -9
  689. package/dist/src/projects/session-bind.d.ts +5 -5
  690. package/dist/src/projects/session-bind.js +18 -17
  691. package/dist/src/projects/types.d.ts +1 -1
  692. package/dist/src/projects/workflow-bind.js +2 -1
  693. package/dist/src/projects/workspace.d.ts +3 -3
  694. package/dist/src/projects/workspace.js +6 -6
  695. package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
  696. package/dist/src/providers/index.js +2 -2
  697. package/dist/src/providers/model-catalog-persistence.js +11 -2
  698. package/dist/src/providers/model-catalog-store.js +1 -0
  699. package/dist/src/providers/model-catalog-types.d.ts +7 -2
  700. package/dist/src/providers/model-reference-auditor.js +7 -4
  701. package/dist/src/providers/model-registry.js +4 -1
  702. package/dist/src/providers/model-supplements.js +18 -2
  703. package/dist/src/providers/presentation.js +4 -2
  704. package/dist/src/providers/prompt-cache-lifecycle.d.ts +2 -2
  705. package/dist/src/providers/prompt-cache-lifecycle.js +6 -6
  706. package/dist/src/providers/register-runtime-providers.js +1 -1
  707. package/dist/src/providers/xopc-cloud-model-source.js +10 -4
  708. package/dist/src/realtime/broker.js +3 -3
  709. package/dist/src/realtime/runtime.js +1 -1
  710. package/dist/src/retrieval/queryProfile.d.ts +1 -1
  711. package/dist/src/routing/agent-session-key.d.ts +12 -41
  712. package/dist/src/routing/agent-session-key.js +39 -120
  713. package/dist/src/routing/conversation-route.d.ts +28 -0
  714. package/dist/src/routing/conversation-route.js +50 -0
  715. package/dist/src/routing/index.d.ts +2 -2
  716. package/dist/src/routing/index.js +5 -5
  717. package/dist/src/routing/resolve-route.d.ts +4 -9
  718. package/dist/src/routing/resolve-route.js +20 -60
  719. package/dist/src/routing/resolve-tui-session-key.d.ts +5 -13
  720. package/dist/src/routing/resolve-tui-session-key.js +11 -36
  721. package/dist/src/routing/session-key.d.ts +6 -39
  722. package/dist/src/routing/session-key.js +13 -161
  723. package/dist/src/session/client-history.js +2 -0
  724. package/dist/src/session/compaction-types.js +18 -13
  725. package/dist/src/session/config-store.d.ts +8 -8
  726. package/dist/src/session/config-store.js +19 -19
  727. package/dist/src/session/index.d.ts +2 -2
  728. package/dist/src/session/index.js +9 -5
  729. package/dist/src/session/init-session-turn.d.ts +7 -7
  730. package/dist/src/session/init-session-turn.js +18 -18
  731. package/dist/src/session/manager.d.ts +7 -7
  732. package/dist/src/session/manager.js +6 -6
  733. package/dist/src/session/model-config-lock.d.ts +1 -1
  734. package/dist/src/session/model-config-lock.js +4 -4
  735. package/dist/src/session/resolve-session.d.ts +10 -10
  736. package/dist/src/session/resolve-session.js +20 -20
  737. package/dist/src/session/session-context-for-llm.js +17 -10
  738. package/dist/src/session/session-title.d.ts +5 -5
  739. package/dist/src/session/session-title.js +28 -28
  740. package/dist/src/session/session-workspace.d.ts +1 -1
  741. package/dist/src/session/session-workspace.js +3 -3
  742. package/dist/src/session/store.d.ts +14 -14
  743. package/dist/src/session/store.js +70 -50
  744. package/dist/src/session/stored-rows-to-file-entries.d.ts +1 -1
  745. package/dist/src/session/stored-rows-to-file-entries.js +5 -3
  746. package/dist/src/session/thinking-resolve.d.ts +2 -2
  747. package/dist/src/session/thinking-resolve.js +4 -4
  748. package/dist/src/session/transcript-events.d.ts +1 -1
  749. package/dist/src/session/transcript-events.js +3 -3
  750. package/dist/src/session/transcript-outline.js +2 -1
  751. package/dist/src/session/turn-outcome-projector.js +2 -0
  752. package/dist/src/session/types.d.ts +5 -4
  753. package/dist/src/session/types.js +13 -9
  754. package/dist/src/session/user-message-display.js +2 -0
  755. package/dist/src/session/user-round-delete.js +2 -1
  756. package/dist/src/session/voice-transcript.js +8 -3
  757. package/dist/src/share/hosted-session-share.d.ts +6 -6
  758. package/dist/src/share/hosted-session-share.js +13 -11
  759. package/dist/src/share/hosted-static-site-publish.d.ts +1 -1
  760. package/dist/src/share/hosted-static-site-publish.js +1 -1
  761. package/dist/src/share/session-share-service.d.ts +9 -9
  762. package/dist/src/share/session-share-service.js +19 -19
  763. package/dist/src/share/share-store.d.ts +2 -2
  764. package/dist/src/share/share-store.js +9 -7
  765. package/dist/src/share/share-types.d.ts +2 -2
  766. package/dist/src/share/site-share-router.d.ts +2 -2
  767. package/dist/src/share/site-share-store.js +4 -2
  768. package/dist/src/share/site-share-types.d.ts +1 -1
  769. package/dist/src/storage/sqlite/activity-repository.js +2 -1
  770. package/dist/src/storage/sqlite/browser-session-repository.js +2 -1
  771. package/dist/src/storage/sqlite/browser-tab-binding-repository.d.ts +2 -2
  772. package/dist/src/storage/sqlite/browser-tab-binding-repository.js +10 -9
  773. package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +7 -7
  774. package/dist/src/storage/sqlite/clarification-wait-repository.js +58 -53
  775. package/dist/src/storage/sqlite/collaboration-rule-repository.js +2 -1
  776. package/dist/src/storage/sqlite/composer-input-history-repository.js +2 -1
  777. package/dist/src/storage/sqlite/config-repository.d.ts +6 -6
  778. package/dist/src/storage/sqlite/config-repository.js +29 -25
  779. package/dist/src/storage/sqlite/connection-wait-repository.d.ts +11 -11
  780. package/dist/src/storage/sqlite/connection-wait-repository.js +61 -51
  781. package/dist/src/storage/sqlite/connection.js +28 -18
  782. package/dist/src/storage/sqlite/connector-account-repository.js +2 -1
  783. package/dist/src/storage/sqlite/connector-learning-repository.js +2 -1
  784. package/dist/src/storage/sqlite/connector-repository.d.ts +1 -1
  785. package/dist/src/storage/sqlite/connector-repository.js +11 -10
  786. package/dist/src/storage/sqlite/connector-sync-policy-repository.js +2 -1
  787. package/dist/src/storage/sqlite/context-evidence-repository.d.ts +1 -1
  788. package/dist/src/storage/sqlite/context-evidence-repository.js +7 -6
  789. package/dist/src/storage/sqlite/context-extraction-repository.js +2 -1
  790. package/dist/src/storage/sqlite/context-relation-repository.js +2 -1
  791. package/dist/src/storage/sqlite/conversation-repository.d.ts +12 -0
  792. package/dist/src/storage/sqlite/conversation-repository.js +76 -0
  793. package/dist/src/storage/sqlite/device-access-repository.js +4 -1
  794. package/dist/src/storage/sqlite/device-pairing-approval.js +4 -1
  795. package/dist/src/storage/sqlite/device-pairing-repository.js +2 -1
  796. package/dist/src/storage/sqlite/durable-queue.js +4 -2
  797. package/dist/src/storage/sqlite/durable-state.js +4 -2
  798. package/dist/src/storage/sqlite/endpoint-principal-repository.js +2 -1
  799. package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +3 -3
  800. package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +12 -11
  801. package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +2 -1
  802. package/dist/src/storage/sqlite/fts.js +39 -34
  803. package/dist/src/storage/sqlite/gateway-identity-repository.js +2 -1
  804. package/dist/src/storage/sqlite/home-attention-repository.js +2 -1
  805. package/dist/src/storage/sqlite/import-repository.js +2 -1
  806. package/dist/src/storage/sqlite/import-selection-repository.js +2 -1
  807. package/dist/src/storage/sqlite/index.d.ts +2 -2
  808. package/dist/src/storage/sqlite/index.js +25 -11
  809. package/dist/src/storage/sqlite/interaction-state-repository.d.ts +4 -4
  810. package/dist/src/storage/sqlite/interaction-state-repository.js +12 -11
  811. package/dist/src/storage/sqlite/knowledge-repository.js +2 -1
  812. package/dist/src/storage/sqlite/migrations/178_conversation_uuid.sql +2 -0
  813. package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +11 -0
  814. package/dist/src/storage/sqlite/migrations/conversation-backup.js +98 -0
  815. package/dist/src/storage/sqlite/migrations/conversation-key-decoder.d.ts +8 -0
  816. package/dist/src/storage/sqlite/migrations/conversation-key-decoder.js +87 -0
  817. package/dist/src/storage/sqlite/migrations/conversation-uuid.d.ts +8 -0
  818. package/dist/src/storage/sqlite/migrations/conversation-uuid.js +366 -0
  819. package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +1 -0
  820. package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +95 -0
  821. package/dist/src/storage/sqlite/migrations/discover.js +9 -5
  822. package/dist/src/storage/sqlite/migrations/errors.d.ts +5 -0
  823. package/dist/src/storage/sqlite/migrations/errors.js +38 -23
  824. package/dist/src/storage/sqlite/migrations/runner.d.ts +2 -2
  825. package/dist/src/storage/sqlite/migrations/runner.js +44 -14
  826. package/dist/src/storage/sqlite/migrations/types.d.ts +1 -1
  827. package/dist/src/storage/sqlite/note-agent-context-repository.js +2 -1
  828. package/dist/src/storage/sqlite/notes-repository.js +4 -2
  829. package/dist/src/storage/sqlite/paths.js +6 -2
  830. package/dist/src/storage/sqlite/relationship-settings-repository.js +2 -1
  831. package/dist/src/storage/sqlite/row-mappers.d.ts +10 -10
  832. package/dist/src/storage/sqlite/row-mappers.js +22 -15
  833. package/dist/src/storage/sqlite/schema-version.js +7 -2
  834. package/dist/src/storage/sqlite/schema.js +16 -8
  835. package/dist/src/storage/sqlite/schema.sql +2641 -526
  836. package/dist/src/storage/sqlite/session-identity-sql.js +12 -5
  837. package/dist/src/storage/sqlite/session-input-repository.d.ts +14 -14
  838. package/dist/src/storage/sqlite/session-input-repository.js +69 -61
  839. package/dist/src/storage/sqlite/session-instance-repository.d.ts +1 -1
  840. package/dist/src/storage/sqlite/session-instance-repository.js +6 -3
  841. package/dist/src/storage/sqlite/session-metadata.d.ts +2 -2
  842. package/dist/src/storage/sqlite/session-metadata.js +7 -3
  843. package/dist/src/storage/sqlite/session-repository.d.ts +15 -15
  844. package/dist/src/storage/sqlite/session-repository.js +126 -102
  845. package/dist/src/storage/sqlite/session-task-plan-repository.d.ts +3 -3
  846. package/dist/src/storage/sqlite/session-task-plan-repository.js +21 -19
  847. package/dist/src/storage/sqlite/session-turn-replace-repository.d.ts +2 -2
  848. package/dist/src/storage/sqlite/session-turn-replace-repository.js +26 -22
  849. package/dist/src/storage/sqlite/transaction.js +12 -6
  850. package/dist/src/storage/sqlite/transcript-repository.d.ts +14 -14
  851. package/dist/src/storage/sqlite/transcript-repository.js +107 -102
  852. package/dist/src/storage/sqlite/user-people-repository.js +2 -1
  853. package/dist/src/storage/sqlite/user-trust-repository.js +2 -1
  854. package/dist/src/support/collect-support-report.js +7 -7
  855. package/dist/src/support/types.d.ts +2 -2
  856. package/dist/src/support/types.js +1 -1
  857. package/dist/src/tasks/execution-context.d.ts +2 -2
  858. package/dist/src/tasks/execution-context.js +3 -3
  859. package/dist/src/tasks/home-query-service.d.ts +2 -2
  860. package/dist/src/tasks/home-query-service.js +6 -6
  861. package/dist/src/tasks/index.js +6 -2
  862. package/dist/src/tasks/project-monitoring-service.js +2 -1
  863. package/dist/src/tasks/project-operating-view-service.js +2 -1
  864. package/dist/src/tasks/task-application-service.js +9 -4
  865. package/dist/src/tasks/task-change-events.js +7 -2
  866. package/dist/src/tasks/task-context-assembler.d.ts +2 -2
  867. package/dist/src/tasks/task-context-assembler.js +12 -9
  868. package/dist/src/tasks/task-context-repository.d.ts +1 -1
  869. package/dist/src/tasks/task-context-repository.js +4 -3
  870. package/dist/src/tasks/task-conversation-repository.d.ts +7 -7
  871. package/dist/src/tasks/task-conversation-repository.js +27 -26
  872. package/dist/src/tasks/task-deletion-service.js +2 -1
  873. package/dist/src/tasks/task-dependency-service.js +2 -1
  874. package/dist/src/tasks/task-handoff-service.d.ts +2 -2
  875. package/dist/src/tasks/task-handoff-service.js +16 -15
  876. package/dist/src/tasks/task-outbox-dispatcher.js +2 -1
  877. package/dist/src/tasks/task-read-model-projector.js +4 -2
  878. package/dist/src/tasks/task-repository.js +2 -1
  879. package/dist/src/tasks/task-run-coordinator.js +6 -5
  880. package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
  881. package/dist/src/tasks/task-run-dispatcher.js +4 -3
  882. package/dist/src/tasks/task-run-repository.d.ts +2 -2
  883. package/dist/src/tasks/task-run-repository.js +219 -212
  884. package/dist/src/tasks/task-signal-service.js +6 -2
  885. package/dist/src/tasks/task-workflow-coordinator.js +2 -1
  886. package/dist/src/tui/backends/embedded-backend.d.ts +33 -32
  887. package/dist/src/tui/backends/embedded-backend.js +95 -83
  888. package/dist/src/tui/backends/gateway-realtime-backend.d.ts +34 -33
  889. package/dist/src/tui/backends/gateway-realtime-backend.js +95 -78
  890. package/dist/src/tui/components/branch-summary.js +3 -3
  891. package/dist/src/tui/components/session-selector.d.ts +5 -5
  892. package/dist/src/tui/components/session-selector.js +7 -7
  893. package/dist/src/tui/components/tui-bottom-bar.js +1 -1
  894. package/dist/src/tui/components/tui-header.d.ts +1 -1
  895. package/dist/src/tui/components/tui-header.js +2 -2
  896. package/dist/src/tui/extension-host/autocomplete.d.ts +2 -2
  897. package/dist/src/tui/extension-host/autocomplete.js +4 -4
  898. package/dist/src/tui/extension-host/host.d.ts +1 -1
  899. package/dist/src/tui/extension-host/runtime-context.d.ts +1 -1
  900. package/dist/src/tui/extension-host/runtime-context.js +2 -2
  901. package/dist/src/tui/extension-host/runtime.d.ts +1 -1
  902. package/dist/src/tui/extension-host/runtime.js +6 -6
  903. package/dist/src/tui/tui-backend.d.ts +43 -39
  904. package/dist/src/tui/tui-command-formatters.d.ts +2 -2
  905. package/dist/src/tui/tui-command-formatters.js +10 -18
  906. package/dist/src/tui/tui-commands.d.ts +3 -3
  907. package/dist/src/tui/tui-commands.js +31 -33
  908. package/dist/src/tui/tui-empty-session-cleanup.d.ts +2 -3
  909. package/dist/src/tui/tui-empty-session-cleanup.js +7 -15
  910. package/dist/src/tui/tui-file-autocomplete.d.ts +1 -1
  911. package/dist/src/tui/tui-file-autocomplete.js +2 -2
  912. package/dist/src/tui/tui-new-session-preferences.js +2 -0
  913. package/dist/src/tui/tui-picker-overlay.d.ts +1 -1
  914. package/dist/src/tui/tui-picker-overlay.js +41 -53
  915. package/dist/src/tui/tui-picker-services.d.ts +3 -3
  916. package/dist/src/tui/tui-session-actions.d.ts +1 -1
  917. package/dist/src/tui/tui-session-actions.js +8 -17
  918. package/dist/src/tui/tui-session-format.js +4 -1
  919. package/dist/src/tui/tui-session-snapshot.d.ts +2 -2
  920. package/dist/src/tui/tui-session-snapshot.js +4 -4
  921. package/dist/src/tui/tui-settings.js +2 -0
  922. package/dist/src/tui/tui-startup-resources.d.ts +1 -1
  923. package/dist/src/tui/tui-startup-resources.js +4 -4
  924. package/dist/src/tui/tui-startup-text.js +1 -1
  925. package/dist/src/tui/tui-transcript-tree-picker.d.ts +1 -1
  926. package/dist/src/tui/tui-transcript-tree-picker.js +2 -2
  927. package/dist/src/tui/tui-types.d.ts +4 -2
  928. package/dist/src/tui/tui-types.js +2 -2
  929. package/dist/src/tui/tui.js +116 -114
  930. package/dist/src/user-context/access-policy.d.ts +1 -1
  931. package/dist/src/user-context/access-policy.js +6 -5
  932. package/dist/src/user-context/changes.js +9 -4
  933. package/dist/src/user-context/domain.d.ts +1 -1
  934. package/dist/src/user-context/relationship-continuity.d.ts +1 -1
  935. package/dist/src/user-context/relationship-continuity.js +1 -1
  936. package/dist/src/user-context/sources/repository.js +4 -2
  937. package/dist/src/user-model/capture/executor.d.ts +1 -1
  938. package/dist/src/user-model/capture/executor.js +3 -3
  939. package/dist/src/user-model/goals.js +2 -1
  940. package/dist/src/user-model/repository.js +2 -1
  941. package/dist/src/utils/global-singleton.js +4 -1
  942. package/dist/src/utils/logger/context.d.ts +1 -1
  943. package/dist/src/utils/logger/context.js +2 -2
  944. package/dist/src/utils/logger/log-store.js +2 -2
  945. package/dist/src/utils/logger/pino-record.js +6 -6
  946. package/dist/src/utils/logger/types.d.ts +6 -6
  947. package/dist/src/voice/platform-catalog.d.ts +81 -0
  948. package/dist/src/voice/platform-catalog.js +16 -0
  949. package/dist/src/voice/platform-settings.d.ts +4 -0
  950. package/dist/src/voice/platform-settings.js +120 -0
  951. package/dist/src/voice/platform-streams.d.ts +12 -0
  952. package/dist/src/voice/platform-streams.js +250 -0
  953. package/dist/src/voice/realtime/agentBroker.d.ts +6 -6
  954. package/dist/src/voice/realtime/agentBroker.js +6 -6
  955. package/dist/src/voice/realtime/agentEngine.js +6 -6
  956. package/dist/src/voice/realtime/memory-context.d.ts +2 -2
  957. package/dist/src/voice/realtime/memory-context.js +15 -15
  958. package/dist/src/voice/realtime/omniEngine.js +8 -5
  959. package/dist/src/voice/realtime/omniRoute.d.ts +1 -0
  960. package/dist/src/voice/realtime/omniRoute.js +11 -1
  961. package/dist/src/voice/realtime/persona-context.d.ts +1 -1
  962. package/dist/src/voice/realtime/persona-context.js +6 -6
  963. package/dist/src/voice/realtime/runtime.d.ts +1 -1
  964. package/dist/src/voice/realtime/runtime.js +28 -19
  965. package/dist/src/voice/realtime/runtime.types.d.ts +6 -6
  966. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +15 -8
  967. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +12 -19
  968. package/dist/src/work-discovery/investigation-repository.js +4 -2
  969. package/dist/src/work-discovery/probe.js +1 -1
  970. package/dist/src/work-discovery/repository.js +7 -5
  971. package/dist/src/work-discovery/service.js +35 -31
  972. package/dist/src/work-discovery/types.d.ts +1 -1
  973. package/dist/src/workflows/context/workflow-context-snapshot-repository.js +2 -1
  974. package/dist/src/workflows/domain/event.d.ts +1 -1
  975. package/dist/src/workflows/domain/run.d.ts +5 -5
  976. package/dist/src/workflows/engine/projector.js +1 -1
  977. package/dist/src/workflows/engine/workflow-engine.d.ts +2 -2
  978. package/dist/src/workflows/engine/workflow-engine.js +15 -18
  979. package/dist/src/workflows/index.js +3 -3
  980. package/dist/src/workflows/project-presets/project-workflow-preset-repository.js +2 -1
  981. package/dist/src/workflows/service/run-view-to-snapshot.js +1 -1
  982. package/dist/src/workflows/service/workflow-run-service.d.ts +2 -2
  983. package/dist/src/workflows/service/workflow-run-service.js +53 -42
  984. package/dist/src/workflows/service/workflow-run-service.types.d.ts +2 -2
  985. package/dist/src/workflows/service/workflow-session-bridge.d.ts +2 -2
  986. package/dist/src/workflows/service/workflow-session-bridge.js +31 -31
  987. package/dist/src/workflows/service/workflow-session-key.d.ts +1 -1
  988. package/dist/src/workflows/service/workflow-session-key.js +4 -4
  989. package/dist/src/workflows/service/workflow-writeback-service.js +2 -1
  990. package/dist/src/workflows/store/event-store.js +4 -2
  991. package/dist/src/workflows/store/run-index-store.js +9 -8
  992. package/package.json +6 -3
  993. package/skills/creative/algorithmic-art/SKILL.md +7 -0
  994. package/skills/creative/frontend-design/SKILL.md +8 -0
  995. package/skills/creative/hatch-pet/SKILL.md +7 -0
  996. package/skills/creative/theme-factory/SKILL.md +8 -0
  997. package/skills/documents/doc-coauthoring/SKILL.md +7 -0
  998. package/skills/documents/docx/SKILL.md +7 -0
  999. package/skills/documents/pdf/SKILL.md +7 -0
  1000. package/skills/documents/pptx/SKILL.md +7 -0
  1001. package/skills/documents/xlsx/SKILL.md +9 -1
  1002. package/skills/engineering/build-xopc-local-app/SKILL.md +7 -0
  1003. package/skills/engineering/define-task/SKILL.md +7 -0
  1004. package/skills/engineering/diagnose/SKILL.md +8 -0
  1005. package/skills/engineering/tdd/SKILL.md +8 -0
  1006. package/skills/tools/find-skills/SKILL.md +8 -0
  1007. package/skills/tools/github/SKILL.md +7 -0
  1008. package/skills/tools/summarize/SKILL.md +8 -0
  1009. package/skills/tools/webapp-testing/SKILL.md +8 -1
  1010. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CcmqK1Sc.js +0 -1
  1011. package/dist/gateway/static/root/assets/agents-B_7PVt7S.js +0 -1
  1012. package/dist/gateway/static/root/assets/api-COG_Tzpv.js +0 -1
  1013. package/dist/gateway/static/root/assets/apps-page-6qxxKFsK.js +0 -1
  1014. package/dist/gateway/static/root/assets/automations-workspace-BRQlU4qk.js +0 -6
  1015. package/dist/gateway/static/root/assets/browser-settings-page-DDjbDeHQ.js +0 -8
  1016. package/dist/gateway/static/root/assets/button-BA45yciM.js +0 -1
  1017. package/dist/gateway/static/root/assets/capabilities-settings-panel-DM1Bcf1x.js +0 -8
  1018. package/dist/gateway/static/root/assets/channels-settings-Bq36CUxL.js +0 -1
  1019. package/dist/gateway/static/root/assets/connectors-page-L8JehrxF.js +0 -2
  1020. package/dist/gateway/static/root/assets/desktop-pet-DtPNvznL.js +0 -1
  1021. package/dist/gateway/static/root/assets/extension-settings-page-C75kCOqe.js +0 -1
  1022. package/dist/gateway/static/root/assets/gateway-settings-BCF732TU.js +0 -1
  1023. package/dist/gateway/static/root/assets/heartbeat-settings-C7fjiowt.js +0 -1
  1024. package/dist/gateway/static/root/assets/home-page-DZXeXdUL.js +0 -1
  1025. package/dist/gateway/static/root/assets/index-ChIrvv3t.js +0 -74
  1026. package/dist/gateway/static/root/assets/index-R1VNlHjj.css +0 -2
  1027. package/dist/gateway/static/root/assets/local-app-workbench-page-CAEKGTAg.js +0 -2
  1028. package/dist/gateway/static/root/assets/locale-store-DlOv7896.js +0 -1
  1029. package/dist/gateway/static/root/assets/logs-page-DHZ4BEkG.js +0 -2
  1030. package/dist/gateway/static/root/assets/messages-Ls1Aaiqd.js +0 -3
  1031. package/dist/gateway/static/root/assets/note-detail-panel-BcWq3ddw.js +0 -5
  1032. package/dist/gateway/static/root/assets/notes-page-DfZ8QWyv.js +0 -8
  1033. package/dist/gateway/static/root/assets/page-tabs-BG39KidE.js +0 -1
  1034. package/dist/gateway/static/root/assets/popover-select-DGmMQt4t.js +0 -1
  1035. package/dist/gateway/static/root/assets/proactive-page-D2U_xQaS.js +0 -1
  1036. package/dist/gateway/static/root/assets/project-detail-page-CzlGTW4F.js +0 -1
  1037. package/dist/gateway/static/root/assets/projects-page-mQsM-TsP.js +0 -1
  1038. package/dist/gateway/static/root/assets/remote-access-hub-Cb56JcO1.js +0 -1
  1039. package/dist/gateway/static/root/assets/sessions-page-Hj9uFcIO.js +0 -1
  1040. package/dist/gateway/static/root/assets/settings-advanced-gate-CV4-_EVA.js +0 -1
  1041. package/dist/gateway/static/root/assets/settings-form-section-wcAdCkK8.js +0 -1
  1042. package/dist/gateway/static/root/assets/settings-page-layout-DYelDcMV.js +0 -1
  1043. package/dist/gateway/static/root/assets/setup-status-panel-DzxmsaQG.js +0 -1
  1044. package/dist/gateway/static/root/assets/shares-settings-xlJh1ccG.js +0 -1
  1045. package/dist/gateway/static/root/assets/skill-reload-api-wSXJRSxX.js +0 -1
  1046. package/dist/gateway/static/root/assets/skills-page-AmqtBJo7.js +0 -2
  1047. package/dist/gateway/static/root/assets/task-detail-page-sQpwq5-c.js +0 -1
  1048. package/dist/gateway/static/root/assets/tunnel-api-Boajol0M.js +0 -1
  1049. package/dist/gateway/static/root/assets/user-model-page-DIEHnAER.js +0 -2
  1050. package/dist/gateway/static/root/assets/workflows-page-DgRNIyr7.js +0 -6
  1051. package/dist/src/routing/session-key-utils.d.ts +0 -23
  1052. package/dist/src/routing/session-key-utils.js +0 -85
  1053. package/dist/src/session/session-id.d.ts +0 -3
  1054. package/dist/src/session/session-id.js +0 -10
  1055. package/dist/src/storage/sqlite/migrations/002_add_flush_columns.sql +0 -3
  1056. package/dist/src/storage/sqlite/migrations/003_add_note_markdown_meta.sql +0 -4
  1057. package/dist/src/storage/sqlite/migrations/004_add_session_type_metadata.sql +0 -15
  1058. package/dist/src/storage/sqlite/migrations/005_add_note_agent_contexts.sql +0 -10
  1059. package/dist/src/storage/sqlite/migrations/006_add_goals.sql +0 -108
  1060. package/dist/src/storage/sqlite/migrations/007_goal_run_judge_schema.sql +0 -4
  1061. package/dist/src/storage/sqlite/migrations/008_goal_queue_workflow_runs.sql +0 -53
  1062. package/dist/src/storage/sqlite/migrations/009_cron_jobs.sql +0 -24
  1063. package/dist/src/storage/sqlite/migrations/010_session_id_identity.sql +0 -30
  1064. package/dist/src/storage/sqlite/migrations/011_goal_context_messages.sql +0 -8
  1065. package/dist/src/storage/sqlite/migrations/012_memory_records.sql +0 -63
  1066. package/dist/src/storage/sqlite/migrations/013_memory_trace_events.sql +0 -21
  1067. package/dist/src/storage/sqlite/migrations/014_memory_record_governance.sql +0 -10
  1068. package/dist/src/storage/sqlite/migrations/015_memory_trace_feedback.sql +0 -4
  1069. package/dist/src/storage/sqlite/migrations/016_automations.sql +0 -47
  1070. package/dist/src/storage/sqlite/migrations/017_automation_run_events.sql +0 -14
  1071. package/dist/src/storage/sqlite/migrations/018_automation_safety.sql +0 -1
  1072. package/dist/src/storage/sqlite/migrations/019_projects.sql +0 -40
  1073. package/dist/src/storage/sqlite/migrations/020_project_default_agent.sql +0 -1
  1074. package/dist/src/storage/sqlite/migrations/021_projects_fts.sql +0 -21
  1075. package/dist/src/storage/sqlite/migrations/022_work_items.sql +0 -61
  1076. package/dist/src/storage/sqlite/migrations/023_work_item_attachments.sql +0 -15
  1077. package/dist/src/storage/sqlite/migrations/024_activity_events.sql +0 -62
  1078. package/dist/src/storage/sqlite/migrations/025_project_pinned_at.sql +0 -5
  1079. package/dist/src/storage/sqlite/migrations/026_goal_contracts.sql +0 -10
  1080. package/dist/src/storage/sqlite/migrations/027_mobile_notifications.sql +0 -43
  1081. package/dist/src/storage/sqlite/migrations/028_goal_evidence_requirements.sql +0 -47
  1082. package/dist/src/storage/sqlite/migrations/029_user_understanding.sql +0 -133
  1083. package/dist/src/storage/sqlite/migrations/030_connectors.sql +0 -94
  1084. package/dist/src/storage/sqlite/migrations/031_connector_approvals.sql +0 -24
  1085. package/dist/src/storage/sqlite/migrations/032_connector_webhook_deliveries.sql +0 -15
  1086. package/dist/src/storage/sqlite/migrations/033_user_trust_policies.sql +0 -6
  1087. package/dist/src/storage/sqlite/migrations/034_allow_global_auto_trust.sql +0 -14
  1088. package/dist/src/storage/sqlite/migrations/035_user_profile_prompt_state.sql +0 -7
  1089. package/dist/src/storage/sqlite/migrations/036_goal_outcome_metric.sql +0 -12
  1090. package/dist/src/storage/sqlite/migrations/037_connected_knowledge_pipeline.sql +0 -47
  1091. package/dist/src/storage/sqlite/migrations/038_user_owned_memory.sql +0 -68
  1092. package/dist/src/storage/sqlite/migrations/039_memory_reference_consents.sql +0 -19
  1093. package/dist/src/storage/sqlite/migrations/040_local_apps.sql +0 -32
  1094. package/dist/src/storage/sqlite/migrations/041_local_app_release_lifecycle.sql +0 -17
  1095. package/dist/src/storage/sqlite/migrations/042_work_discovery.sql +0 -41
  1096. package/dist/src/storage/sqlite/migrations/043_local_app_acceptance_runs.sql +0 -16
  1097. package/dist/src/storage/sqlite/migrations/044_repair_work_discovery_foreign_keys.sql +0 -75
  1098. package/dist/src/storage/sqlite/migrations/045_extension_ui_grants.sql +0 -13
  1099. package/dist/src/storage/sqlite/migrations/046_work_discovery_feedback.sql +0 -13
  1100. package/dist/src/storage/sqlite/migrations/047_work_discovery_sources.sql +0 -16
  1101. package/dist/src/storage/sqlite/migrations/048_work_understanding_investigations.sql +0 -40
  1102. package/dist/src/storage/sqlite/migrations/049_work_understanding_threads.sql +0 -52
  1103. package/dist/src/storage/sqlite/migrations/050_work_discovery_source_refreshes.sql +0 -15
  1104. package/dist/src/storage/sqlite/migrations/051_focus_watches.sql +0 -26
  1105. package/dist/src/storage/sqlite/migrations/052_proactive_insights.sql +0 -25
  1106. package/dist/src/storage/sqlite/migrations/053_browser_recipes.sql +0 -45
  1107. package/dist/src/storage/sqlite/migrations/054_task_outcomes.sql +0 -24
  1108. package/dist/src/storage/sqlite/migrations/055_relationship_settings.sql +0 -14
  1109. package/dist/src/storage/sqlite/migrations/056_task_verification.sql +0 -6
  1110. package/dist/src/storage/sqlite/migrations/057_interaction_states.sql +0 -11
  1111. package/dist/src/storage/sqlite/migrations/058_proactive_value.sql +0 -3
  1112. package/dist/src/storage/sqlite/migrations/059_composer_input_history.sql +0 -8
  1113. package/dist/src/storage/sqlite/migrations/060_remove_runtime_transcript_messages.sql +0 -45
  1114. package/dist/src/storage/sqlite/migrations/061_drop_compaction_checkpoints.sql +0 -2
  1115. package/dist/src/storage/sqlite/migrations/062_connector_learning_jobs.sql +0 -27
  1116. package/dist/src/storage/sqlite/migrations/063_knowledge_collection_scopes.sql +0 -14
  1117. package/dist/src/storage/sqlite/migrations/064_user_claims.sql +0 -60
  1118. package/dist/src/storage/sqlite/migrations/065_knowledge_item_scope_identity.sql +0 -116
  1119. package/dist/src/storage/sqlite/migrations/066_first_class_focuses.sql +0 -126
  1120. package/dist/src/storage/sqlite/migrations/067_home_attention_acknowledgements.sql +0 -9
  1121. package/dist/src/storage/sqlite/migrations/068_proactive_event_spine.sql +0 -71
  1122. package/dist/src/storage/sqlite/migrations/069_proactive_scenario_control.sql +0 -69
  1123. package/dist/src/storage/sqlite/migrations/070_proactive_execution.sql +0 -55
  1124. package/dist/src/storage/sqlite/migrations/071_proactive_inbox.sql +0 -45
  1125. package/dist/src/storage/sqlite/migrations/072_proactive_judgments.sql +0 -14
  1126. package/dist/src/storage/sqlite/migrations/073_enable_default_proactive_scenarios.sql +0 -13
  1127. package/dist/src/storage/sqlite/migrations/074_deduplicate_blocked_work_routing.sql +0 -5
  1128. package/dist/src/storage/sqlite/migrations/075_connector_sync_policies.sql +0 -13
  1129. package/dist/src/storage/sqlite/migrations/076_meeting_preparation_scenario.sql +0 -29
  1130. package/dist/src/storage/sqlite/migrations/077_proactive_insight_fingerprints.sql +0 -4
  1131. package/dist/src/storage/sqlite/migrations/078_discussion_captures.sql +0 -64
  1132. package/dist/src/storage/sqlite/migrations/079_discussion_follow_up_scenario.sql +0 -29
  1133. package/dist/src/storage/sqlite/migrations/080_task_outcome_context.sql +0 -15
  1134. package/dist/src/storage/sqlite/migrations/081_project_monitoring_policies.sql +0 -10
  1135. package/dist/src/storage/sqlite/migrations/082_one_click_live_discussions.sql +0 -100
  1136. package/dist/src/storage/sqlite/migrations/083_session_task_plans.sql +0 -9
  1137. package/dist/src/storage/sqlite/migrations/084_work_intake_lifecycle.sql +0 -26
  1138. package/dist/src/storage/sqlite/migrations/085_task_outcome_projection.sql +0 -19
  1139. package/dist/src/storage/sqlite/migrations/086_outcome_aggregates.sql +0 -168
  1140. package/dist/src/storage/sqlite/migrations/087_context_snapshots.sql +0 -21
  1141. package/dist/src/storage/sqlite/migrations/088_automation_execution_deadlines.sql +0 -5
  1142. package/dist/src/storage/sqlite/migrations/089_automation_run_leases.sql +0 -8
  1143. package/dist/src/storage/sqlite/migrations/090_outcome_contract_judgment.sql +0 -2
  1144. package/dist/src/storage/sqlite/migrations/091_context_allocation.sql +0 -1
  1145. package/dist/src/storage/sqlite/migrations/092_outcome_execution_runtime.sql +0 -88
  1146. package/dist/src/storage/sqlite/migrations/093_remove_legacy_goals.sql +0 -174
  1147. package/dist/src/storage/sqlite/migrations/094_outcome_judgment_and_authority.sql +0 -3
  1148. package/dist/src/storage/sqlite/migrations/095_session_input_queue.sql +0 -35
  1149. package/dist/src/storage/sqlite/migrations/096_drop_work_intakes.sql +0 -6
  1150. package/dist/src/storage/sqlite/migrations/097_work_item_lifecycle.sql +0 -194
  1151. package/dist/src/storage/sqlite/migrations/098_discussion_note_documents.sql +0 -99
  1152. package/dist/src/storage/sqlite/migrations/099_task_model.sql +0 -500
  1153. package/dist/src/storage/sqlite/migrations/100_project_task_taskrun.sql +0 -763
  1154. package/dist/src/storage/sqlite/migrations/101_session_response_language.sql +0 -1
  1155. package/dist/src/storage/sqlite/migrations/102_session_user_context_mode.sql +0 -2
  1156. package/dist/src/storage/sqlite/migrations/103_finalize_structured_memory.sql +0 -3
  1157. package/dist/src/storage/sqlite/migrations/104_turn_memory_feedback.sql +0 -77
  1158. package/dist/src/storage/sqlite/migrations/105_dreaming_ledger.sql +0 -34
  1159. package/dist/src/storage/sqlite/migrations/106_dreaming_run_reproducibility.sql +0 -2
  1160. package/dist/src/storage/sqlite/migrations/107_connector_accounts.sql +0 -146
  1161. package/dist/src/storage/sqlite/migrations/108_repair_user_memory_provider.sql +0 -18
  1162. package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +0 -14
  1163. package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +0 -43
  1164. package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +0 -18
  1165. package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +0 -8
  1166. package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +0 -76
  1167. package/dist/src/storage/sqlite/migrations/114_user_context_domain.sql +0 -193
  1168. package/dist/src/storage/sqlite/migrations/115_remove_legacy_user_context.sql +0 -6
  1169. package/dist/src/storage/sqlite/migrations/116_structured_context_consolidation.sql +0 -38
  1170. package/dist/src/storage/sqlite/migrations/117_unified_understanding_sources.sql +0 -110
  1171. package/dist/src/storage/sqlite/migrations/118_task_board_rank.sql +0 -6
  1172. package/dist/src/storage/sqlite/migrations/119_proactive_disposition.sql +0 -13
  1173. package/dist/src/storage/sqlite/migrations/120_task_conversation.sql +0 -112
  1174. package/dist/src/storage/sqlite/migrations/121_automation_inbox.sql +0 -24
  1175. package/dist/src/storage/sqlite/migrations/122_automation_session_projects.sql +0 -18
  1176. package/dist/src/storage/sqlite/migrations/123_remove_v2_compaction_boundaries.sql +0 -25
  1177. package/dist/src/storage/sqlite/migrations/124_workflow_context_snapshots.sql +0 -15
  1178. package/dist/src/storage/sqlite/migrations/125_project_workflow_presets.sql +0 -12
  1179. package/dist/src/storage/sqlite/migrations/126_focus_context_governance.sql +0 -72
  1180. package/dist/src/storage/sqlite/migrations/127_context_object_origin.sql +0 -36
  1181. package/dist/src/storage/sqlite/migrations/128_context_extraction.sql +0 -73
  1182. package/dist/src/storage/sqlite/migrations/129_focus_versions.sql +0 -51
  1183. package/dist/src/storage/sqlite/migrations/130_context_evidence_provenance.sql +0 -18
  1184. package/dist/src/storage/sqlite/migrations/131_session_input_contexts.sql +0 -2
  1185. package/dist/src/storage/sqlite/migrations/132_transcript_source_context_metadata.sql +0 -34
  1186. package/dist/src/storage/sqlite/migrations/133_archive_legacy_work_discovery_profile_facts.sql +0 -11
  1187. package/dist/src/storage/sqlite/migrations/134_memory_provenance.sql +0 -18
  1188. package/dist/src/storage/sqlite/migrations/135_user_people.sql +0 -59
  1189. package/dist/src/storage/sqlite/migrations/136_product_notifications.sql +0 -79
  1190. package/dist/src/storage/sqlite/migrations/137_understanding_status_audit.sql +0 -71
  1191. package/dist/src/storage/sqlite/migrations/138_device_access.sql +0 -96
  1192. package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +0 -231
  1193. package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +0 -8
  1194. package/dist/src/storage/sqlite/migrations/141_device_pairing_approval.sql +0 -17
  1195. package/dist/src/storage/sqlite/migrations/142_session_input_instance.sql +0 -1
  1196. package/dist/src/storage/sqlite/migrations/143_fixed_session_model.sql +0 -1
  1197. package/dist/src/storage/sqlite/migrations/144_execution_environments.sql +0 -59
  1198. package/dist/src/storage/sqlite/migrations/145_project_execution_mode.sql +0 -5
  1199. package/dist/src/storage/sqlite/migrations/146_understanding_focus_exclusions.sql +0 -9
  1200. package/dist/src/storage/sqlite/migrations/147_durable_application_state.sql +0 -39
  1201. package/dist/src/storage/sqlite/migrations/148_user_model_foundation.sql +0 -554
  1202. package/dist/src/storage/sqlite/migrations/149_separate_source_index_from_memory.sql +0 -18
  1203. package/dist/src/storage/sqlite/migrations/150_session_connection_waits.sql +0 -47
  1204. package/dist/src/storage/sqlite/migrations/151_proactive_scope_cleanup.sql +0 -6
  1205. package/dist/src/storage/sqlite/migrations/152_proactive_scenario_contract.sql +0 -140
  1206. package/dist/src/storage/sqlite/migrations/153_browser_control_v2.sql +0 -45
  1207. package/dist/src/storage/sqlite/migrations/154_session_clarification_waits.sql +0 -60
  1208. package/dist/src/storage/sqlite/migrations/155_browser_extension.sql +0 -120
  1209. package/dist/src/storage/sqlite/migrations/156_browser_tab_bindings.sql +0 -14
  1210. package/dist/src/storage/sqlite/migrations/157_browser_endpoint_principals.sql +0 -50
  1211. package/dist/src/storage/sqlite/migrations/158_browser_native_enrollment.sql +0 -4
  1212. package/dist/src/storage/sqlite/migrations/159_proactive_controls.sql +0 -68
  1213. package/dist/src/storage/sqlite/migrations/160_proactive_web_push.sql +0 -27
  1214. package/dist/src/storage/sqlite/migrations/161_proactive_delivery_and_lifecycle.sql +0 -51
  1215. package/dist/src/storage/sqlite/migrations/162_proactive_product.sql +0 -7
  1216. package/dist/src/storage/sqlite/migrations/163_proactive_follow_ups.sql +0 -29
  1217. package/dist/src/storage/sqlite/migrations/164_browser_sessions.sql +0 -8
  1218. package/dist/src/storage/sqlite/migrations/165_device_pairing_target.sql +0 -40
  1219. package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +0 -20
  1220. package/dist/src/storage/sqlite/migrations/discover.ts +0 -52
  1221. package/dist/src/storage/sqlite/migrations/errors.ts +0 -32
  1222. package/dist/src/storage/sqlite/migrations/runner.ts +0 -194
  1223. package/dist/src/storage/sqlite/migrations/types.ts +0 -15
@@ -1,10 +1,9 @@
1
1
  import { closeXopcDatabase, isXopcDatabaseOpen, openXopcDatabase } from "../storage/sqlite/connection.js";
2
- import { parseAgentSessionKey } from "../routing/session-key-utils.js";
3
- import { init_agent_session_key, isValidAgentId, normalizeAgentId } from "../routing/agent-session-key.js";
4
2
  import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
5
3
  import "../storage/sqlite/index.js";
6
4
  import { resolveConfigPath } from "../config/paths.js";
7
5
  import { loadConfig } from "../config/loader.js";
6
+ import { init_agent_session_key, isValidAgentId, normalizeAgentId } from "../routing/agent-session-key.js";
8
7
  import { init_providers, providerSupportsOAuth } from "../providers/index.js";
9
8
  import { TaskRepository } from "../tasks/task-repository.js";
10
9
  import { ProjectService } from "../projects/project-service.js";
@@ -35,7 +34,7 @@ function getSlashCommands(_isLocal, keybindings) {
35
34
  const abortKey = keyLabel(keybindings, "app.interrupt", "Escape");
36
35
  const toolsKey = keyLabel(keybindings, "app.tools.expand", "Ctrl+O");
37
36
  const thinkingKey = keyLabel(keybindings, "app.thinking.toggle", "Ctrl+T");
38
- const sessionKey = keyLabel(keybindings, "app.session.resume", "Ctrl+Shift+P");
37
+ const conversationId = keyLabel(keybindings, "app.session.resume", "Ctrl+Shift+P");
39
38
  const modelCycleKey = keyLabel(keybindings, "app.model.cycleForward", "Ctrl+P");
40
39
  return [
41
40
  {
@@ -124,7 +123,7 @@ function getSlashCommands(_isLocal, keybindings) {
124
123
  },
125
124
  {
126
125
  name: "new",
127
- description: "Start a new isolated TUI session (tui-{uuid})"
126
+ description: "Start a new isolated TUI conversation"
128
127
  },
129
128
  {
130
129
  name: "fork",
@@ -156,7 +155,7 @@ function getSlashCommands(_isLocal, keybindings) {
156
155
  },
157
156
  {
158
157
  name: "resume",
159
- description: `Open session picker (or ${sessionKey})`
158
+ description: `Open session picker (or ${conversationId})`
160
159
  },
161
160
  {
162
161
  name: "tree",
@@ -433,9 +432,9 @@ function formatAgentsList(agents, currentAgentId) {
433
432
  ].join("\n");
434
433
  }
435
434
  function formatCurrentAgent(state) {
436
- const parsed = parseAgentSessionKey(state.currentSessionKey);
437
- if (!parsed) return `Current session is not an agent session.\nSession: ${state.currentSessionKey}`;
438
- const lines = [`Current agent: ${parsed.agentId}`, `Session: ${state.currentSessionKey}`];
435
+ const parsed = state.sessionInfo;
436
+ if (!parsed) return `Current session is not an agent session.\nSession: ${state.currentConversationId}`;
437
+ const lines = [`Current agent: ${parsed.agentId}`, `Session: ${state.currentConversationId}`];
439
438
  const workspace = state.sessionInfo.effectiveWorkspacePath?.trim();
440
439
  if (workspace) lines.push(`Workspace: ${workspace}`);
441
440
  const provider = state.sessionInfo.modelProvider?.trim();
@@ -550,8 +549,8 @@ function runTuiProjectCommand(state, args) {
550
549
  const subcommand = parts[0]?.toLowerCase();
551
550
  return withTuiProjects((projects) => {
552
551
  if (!subcommand || subcommand === "status") {
553
- const projectId = getSessionMetadata(state.currentSessionKey)?.projectId;
554
- if (!projectId) return `No project selected.\nSession: ${state.currentSessionKey}`;
552
+ const projectId = getSessionMetadata(state.currentConversationId)?.projectId;
553
+ if (!projectId) return `No project selected.\nSession: ${state.currentConversationId}`;
555
554
  const project = projects.getWithDetails(projectId);
556
555
  return project ? formatTuiProject(project) : `Current project not found: ${projectId}`;
557
556
  }
@@ -583,7 +582,7 @@ function runTuiProjectCommand(state, args) {
583
582
  ...defaultAgentId ? { defaultAgentId } : {},
584
583
  ...parsed.projectKind ? { projectKind: parsed.projectKind } : {}
585
584
  });
586
- projects.attachSession(state.currentSessionKey, project.id);
585
+ projects.attachSession(state.currentConversationId, project.id);
587
586
  state.sessionInfo.projectId = project.id;
588
587
  return `Created and attached project:\n${formatTuiProject(project)}`;
589
588
  }
@@ -592,12 +591,12 @@ function runTuiProjectCommand(state, args) {
592
591
  if (!ref) return `Usage: /project ${subcommand} <id-or-slug>`;
593
592
  const project = resolveTuiProject(projects, ref);
594
593
  if (!project) return `Project not found: ${ref}`;
595
- projects.attachSession(state.currentSessionKey, project.id);
594
+ projects.attachSession(state.currentConversationId, project.id);
596
595
  state.sessionInfo.projectId = project.id;
597
596
  return `Attached current session to project: ${project.name}`;
598
597
  }
599
598
  if (subcommand === "detach") {
600
- projects.detachSession(state.currentSessionKey);
599
+ projects.detachSession(state.currentConversationId);
601
600
  state.sessionInfo.projectId = void 0;
602
601
  return "Detached current session from project.";
603
602
  }
@@ -612,29 +611,29 @@ function runTuiProjectCommand(state, args) {
612
611
  if (subcommand === "set-agent") {
613
612
  const agentId = normalizeProjectAgentId(parts[1]);
614
613
  if (!agentId) return "Usage: /project set-agent <agent-id>";
615
- const currentProjectId = getSessionMetadata(state.currentSessionKey)?.projectId;
614
+ const currentProjectId = getSessionMetadata(state.currentConversationId)?.projectId;
616
615
  if (!currentProjectId) return "No current project.";
617
616
  if (!isValidProjectAgentId(loadConfig(resolveConfigPath()), agentId)) return `Agent not found: ${parts[1]}`;
618
617
  return `Project default agent set to ${projects.update(currentProjectId, { defaultAgentId: agentId }).defaultAgentId}.`;
619
618
  }
620
619
  if (subcommand === "clear-agent") {
621
- const currentProjectId = getSessionMetadata(state.currentSessionKey)?.projectId;
620
+ const currentProjectId = getSessionMetadata(state.currentConversationId)?.projectId;
622
621
  if (!currentProjectId) return "No current project.";
623
622
  projects.update(currentProjectId, { defaultAgentId: null });
624
623
  return "Project default agent cleared.";
625
624
  }
626
625
  if (subcommand === "sessions") {
627
626
  const ref = parts[1];
628
- const currentProjectId = getSessionMetadata(state.currentSessionKey)?.projectId;
627
+ const currentProjectId = getSessionMetadata(state.currentConversationId)?.projectId;
629
628
  const project = ref ? resolveTuiProject(projects, ref) : currentProjectId ? projects.get(currentProjectId) : null;
630
629
  if (!project) return ref ? `Project not found: ${ref}` : "No current project.";
631
- const keys = projects.listSessionKeys(project.id, 20);
630
+ const keys = projects.listConversationIds(project.id, 20);
632
631
  if (!keys.length) return `No sessions in ${project.name}.`;
633
632
  return [`Sessions in ${project.name}:`, ...keys.map((key) => `- ${key}`)].join("\n");
634
633
  }
635
634
  if (subcommand === "tasks") {
636
635
  const ref = parts[1];
637
- const currentProjectId = getSessionMetadata(state.currentSessionKey)?.projectId;
636
+ const currentProjectId = getSessionMetadata(state.currentConversationId)?.projectId;
638
637
  const project = ref ? resolveTuiProject(projects, ref) : currentProjectId ? projects.get(currentProjectId) : null;
639
638
  if (!project) return ref ? `Project not found: ${ref}` : "No current project.";
640
639
  const tasks = new TaskRepository().listByProject(project.id, 20);
@@ -663,7 +662,7 @@ function createTuiCommandHandler(deps) {
663
662
  await abortActive();
664
663
  if (resetSession) {
665
664
  await resetSession();
666
- chatLog.addSystem(`session ${state.currentSessionKey} reset`);
665
+ chatLog.addSystem(`session ${state.currentConversationId} reset`);
667
666
  } else {
668
667
  chatLog.clearAll();
669
668
  chatLog.addSystem("Session cleared (reset not available in this mode).");
@@ -727,7 +726,7 @@ function createTuiCommandHandler(deps) {
727
726
  return;
728
727
  }
729
728
  Promise.resolve(deps.listAgents?.() ?? []).then((agents) => {
730
- const current = parseAgentSessionKey(state.currentSessionKey)?.agentId;
729
+ const current = state.sessionInfo?.agentId;
731
730
  chatLog.addSystem(formatAgentsList(agents, current));
732
731
  tui.requestRender();
733
732
  }).catch((err) => {
@@ -744,8 +743,7 @@ function createTuiCommandHandler(deps) {
744
743
  return;
745
744
  }
746
745
  (async () => {
747
- const parsedCurrent = parseAgentSessionKey(state.currentSessionKey);
748
- if (!parsedCurrent) {
746
+ if (!state.sessionInfo.agentId) {
749
747
  chatLog.addSystem("Cannot switch agent: current session is not an agent session.");
750
748
  tui.requestRender();
751
749
  return;
@@ -766,8 +764,8 @@ function createTuiCommandHandler(deps) {
766
764
  tui.requestRender();
767
765
  return;
768
766
  }
769
- const targetSessionKey = `agent:${targetAgentId}:${parsedCurrent.rest}`;
770
- if (targetSessionKey === state.currentSessionKey) {
767
+ const targetConversationId = randomUUID();
768
+ if (targetAgentId === state.sessionInfo.agentId) {
771
769
  chatLog.addSystem(`Already using agent: ${targetAgentId}`);
772
770
  tui.requestRender();
773
771
  return;
@@ -777,8 +775,8 @@ function createTuiCommandHandler(deps) {
777
775
  tui.requestRender();
778
776
  return;
779
777
  }
780
- await deps.switchAgentSession(targetSessionKey, targetAgentId);
781
- chatLog.addSystem(`Switched to agent: ${targetAgentId}\nSession: ${targetSessionKey}`);
778
+ await deps.switchAgentSession(targetConversationId, targetAgentId);
779
+ chatLog.addSystem(`Switched to agent: ${targetAgentId}\nSession: ${targetConversationId}`);
782
780
  tui.requestRender();
783
781
  })().catch((err) => {
784
782
  const errorMessage = err instanceof Error ? err.message : String(err);
@@ -795,7 +793,7 @@ function createTuiCommandHandler(deps) {
795
793
  "Usage: /tui-default-agent <agent-id>",
796
794
  "This changes new TUI sessions only; the current session is unchanged.",
797
795
  "",
798
- formatAgentsList(agents, parseAgentSessionKey(state.currentSessionKey)?.agentId)
796
+ formatAgentsList(agents, state.sessionInfo?.agentId)
799
797
  ].join("\n"));
800
798
  tui.requestRender();
801
799
  }).catch((err) => {
@@ -965,7 +963,7 @@ function createTuiCommandHandler(deps) {
965
963
  return;
966
964
  case "list":
967
965
  Promise.resolve(deps.listSessions?.() ?? []).then((sessions) => {
968
- chatLog.addSystem(formatTuiSessionListInfo(sessions, { currentSessionKey: state.currentSessionKey }));
966
+ chatLog.addSystem(formatTuiSessionListInfo(sessions, { currentConversationId: state.currentConversationId }));
969
967
  tui.requestRender();
970
968
  });
971
969
  return;
@@ -984,7 +982,7 @@ function createTuiCommandHandler(deps) {
984
982
  uiOverlays?.openSessionTree();
985
983
  if (uiOverlays) return;
986
984
  Promise.resolve(deps.listSessions?.() ?? []).then((sessions) => {
987
- chatLog.addSystem(formatTuiSessionTreeInfo(sessions, { currentSessionKey: state.currentSessionKey }));
985
+ chatLog.addSystem(formatTuiSessionTreeInfo(sessions, { currentConversationId: state.currentConversationId }));
988
986
  tui.requestRender();
989
987
  });
990
988
  return;
@@ -1265,10 +1263,10 @@ function createTuiCommandHandler(deps) {
1265
1263
  await abortActive();
1266
1264
  if (deps.newSession) {
1267
1265
  await deps.newSession();
1268
- chatLog.addSystem(`new session: ${state.currentSessionKey}`);
1266
+ chatLog.addSystem(`new session: ${state.currentConversationId}`);
1269
1267
  } else if (setSession) {
1270
- await setSession(`tui-${randomUUID()}`);
1271
- chatLog.addSystem(`new session: ${state.currentSessionKey}`);
1268
+ await setSession(randomUUID());
1269
+ chatLog.addSystem(`new session: ${state.currentConversationId}`);
1272
1270
  } else {
1273
1271
  chatLog.clearAll();
1274
1272
  chatLog.addSystem("New session requires gateway or local session support.");
@@ -1335,7 +1333,7 @@ function createTuiCommandHandler(deps) {
1335
1333
  definitionId: workflowName,
1336
1334
  goal: commandArgs.trim() || void 0
1337
1335
  })).then((result) => {
1338
- chatLog.addSystem(`Workflow started: ${result.definitionId}\nrunId: ${result.runId}\nsessionKey: ${result.sessionKey}`);
1336
+ chatLog.addSystem(`Workflow started: ${result.definitionId}\nrunId: ${result.runId}\nconversationId: ${result.conversationId}`);
1339
1337
  tui.requestRender();
1340
1338
  }).catch((err) => {
1341
1339
  const errorMessage = err instanceof Error ? err.message : String(err);
@@ -5,6 +5,5 @@ export declare const GENERATED_TUI_SESSION_SHELL_PATCH: {
5
5
  readonly genericNewChatShell: true;
6
6
  };
7
7
  };
8
- export declare function isGeneratedTuiSessionKey(sessionKey: string): boolean;
9
- export declare function deleteGeneratedTuiSessionIfEmpty(client: Pick<TuiBackend, 'getSessionStats' | 'deleteSession'>, sessionKey: string): Promise<boolean>;
10
- export declare function cleanupAbandonedTuiSessions(client: Pick<TuiBackend, 'listSessions' | 'getSessionStats' | 'deleteSession'>, currentSessionKey: string, nowMs?: number): Promise<string[]>;
8
+ export declare function deleteGeneratedTuiSessionIfEmpty(client: Pick<TuiBackend, 'getSessionInfo' | 'getSessionStats' | 'deleteSession'>, conversationId: string): Promise<boolean>;
9
+ export declare function cleanupAbandonedTuiSessions(client: Pick<TuiBackend, 'listSessions' | 'getSessionInfo' | 'getSessionStats' | 'deleteSession'>, currentConversationId: string, nowMs?: number): Promise<string[]>;
@@ -1,27 +1,19 @@
1
- import { parseAgentSessionKey } from "../routing/session-key-utils.js";
2
- import { init_agent_session_key } from "../routing/agent-session-key.js";
3
1
  //#region src/tui/tui-empty-session-cleanup.ts
4
- init_agent_session_key();
5
- const GENERATED_TUI_SUFFIX_RE = /^tui-[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
6
2
  const ABANDONED_SESSION_AGE_MS = 60 * 6e4;
7
3
  const GENERATED_TUI_SESSION_SHELL_PATCH = {
8
4
  hiddenFromSessionList: true,
9
5
  customData: { genericNewChatShell: true }
10
6
  };
11
- function isGeneratedTuiSessionKey(sessionKey) {
12
- const parsed = parseAgentSessionKey(sessionKey);
13
- return parsed ? GENERATED_TUI_SUFFIX_RE.test(parsed.rest) : false;
7
+ async function deleteGeneratedTuiSessionIfEmpty(client, conversationId) {
8
+ if (!(await client.getSessionInfo(conversationId)).generatedShell) return false;
9
+ if ((await client.getSessionStats(conversationId)).totalMessages > 0) return false;
10
+ return (await client.deleteSession(conversationId)).ok;
14
11
  }
15
- async function deleteGeneratedTuiSessionIfEmpty(client, sessionKey) {
16
- if (!isGeneratedTuiSessionKey(sessionKey)) return false;
17
- if ((await client.getSessionStats(sessionKey)).totalMessages > 0) return false;
18
- return (await client.deleteSession(sessionKey)).ok;
19
- }
20
- async function cleanupAbandonedTuiSessions(client, currentSessionKey, nowMs = Date.now()) {
21
- const candidates = (await client.listSessions()).filter((session) => session.key !== currentSessionKey && session.messageCount === 0 && typeof session.updatedAt === "number" && session.updatedAt <= nowMs - ABANDONED_SESSION_AGE_MS && isGeneratedTuiSessionKey(session.key));
12
+ async function cleanupAbandonedTuiSessions(client, currentConversationId, nowMs = Date.now()) {
13
+ const candidates = (await client.listSessions()).filter((session) => session.key !== currentConversationId && session.messageCount === 0 && typeof session.updatedAt === "number" && session.updatedAt <= nowMs - ABANDONED_SESSION_AGE_MS && session.generatedShell === true);
22
14
  const deleted = [];
23
15
  for (const session of candidates) if (await deleteGeneratedTuiSessionIfEmpty(client, session.key)) deleted.push(session.key);
24
16
  return deleted;
25
17
  }
26
18
  //#endregion
27
- export { GENERATED_TUI_SESSION_SHELL_PATCH, cleanupAbandonedTuiSessions, deleteGeneratedTuiSessionIfEmpty, isGeneratedTuiSessionKey };
19
+ export { GENERATED_TUI_SESSION_SHELL_PATCH, cleanupAbandonedTuiSessions, deleteGeneratedTuiSessionIfEmpty };
@@ -1,5 +1,5 @@
1
1
  import type { TuiAutocompleteProvider } from '../extensions/types/tui.js';
2
2
  import type { TuiWorkspaceFileSearchEntry } from './tui-backend.js';
3
- export declare function createTuiFileAutocompleteProvider(searchWorkspaceFiles: (sessionKey: string, query: string, options?: {
3
+ export declare function createTuiFileAutocompleteProvider(searchWorkspaceFiles: (conversationId: string, query: string, options?: {
4
4
  limit?: number;
5
5
  }) => Promise<TuiWorkspaceFileSearchEntry[]>): TuiAutocompleteProvider;
@@ -6,10 +6,10 @@ function formatFilePathForWire(path) {
6
6
  return `"${path.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
7
7
  }
8
8
  function createTuiFileAutocompleteProvider(searchWorkspaceFiles) {
9
- return async (query, { sessionKey }) => {
9
+ return async (query, { conversationId }) => {
10
10
  const trimmed = query.trim();
11
11
  if (/^(skill|doc|url|symbol):/i.test(trimmed)) return [];
12
- return (await searchWorkspaceFiles(sessionKey, trimmed.replace(/^file:/i, ""), { limit: 15 })).map((entry) => {
12
+ return (await searchWorkspaceFiles(conversationId, trimmed.replace(/^file:/i, ""), { limit: 15 })).map((entry) => {
13
13
  const path = entry.isDirectory && !entry.path.endsWith("/") ? `${entry.path}/` : entry.path;
14
14
  return {
15
15
  name: path,
@@ -1,5 +1,7 @@
1
1
  import { createDefaultNewSessionPreferences, modelPreferenceForAgent, withAgentModelPreference, withLastChatScope, withSelectedAgent } from "../../packages/gateway-contract/src/new-session.js";
2
+ import { init_src } from "../../packages/gateway-contract/src/index.js";
2
3
  //#region src/tui/tui-new-session-preferences.ts
4
+ init_src();
3
5
  function tuiGatewayPreferenceKey(url) {
4
6
  return url?.trim() || "local";
5
7
  }
@@ -16,7 +16,7 @@ export declare function formatReviewPickerOpenedHint(keybindings: KeybindingsMan
16
16
  export declare function formatAgentPickerOpenedHint(keybindings: KeybindingsManager): string;
17
17
  export declare function formatSessionTreeOpenedHint(keybindings: KeybindingsManager): string;
18
18
  export declare function openTimelineOverlay(svc: PickerServices, initialQuery?: string): Promise<void>;
19
- export declare function sessionTreeSelectItems(sessions: TuiSessionItem[], currentSessionKey?: string): SelectItem[];
19
+ export declare function sessionTreeSelectItems(sessions: TuiSessionItem[], currentConversationId?: string): SelectItem[];
20
20
  export declare function openAgentPickerOverlay(svc: PickerServices): Promise<void>;
21
21
  export declare function openReviewLauncherOverlay(svc: PickerServices): Promise<void>;
22
22
  export interface SessionPickerOverlayOptions {
@@ -1,5 +1,3 @@
1
- import { parseAgentSessionKey } from "../routing/session-key-utils.js";
2
- import { init_agent_session_key } from "../routing/agent-session-key.js";
3
1
  import { getProjectTrustOptions, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
4
2
  import { listThinkingLevels, normalizeThinkLevel } from "../agent/transcript/thinking-types.js";
5
3
  import { searchableSelectListTheme, theme } from "./theme.js";
@@ -14,8 +12,8 @@ import { SessionSelector } from "./components/session-selector.js";
14
12
  import { ThinkingSelector } from "./components/thinking-selector.js";
15
13
  import { TimelineSelectList, formatTimelineOpenedHint } from "./tui-timeline-picker.js";
16
14
  import { TranscriptTreeSelectList, defaultTranscriptForkKey, formatTranscriptTreeFilterHint, formatUserMessageForkOpenedHint, userMessageForkSelectItems } from "./tui-transcript-tree-picker.js";
15
+ import { randomUUID } from "node:crypto";
17
16
  //#region src/tui/tui-picker-overlay.ts
18
- init_agent_session_key();
19
17
  function formatSelectNavigationHint(keybindings) {
20
18
  return `${formatKeyIds(keybindings, "tui.select.up", { capitalize: true })}/${formatKeyIds(keybindings, "tui.select.down", { capitalize: true })}`;
21
19
  }
@@ -64,7 +62,7 @@ function formatSessionTreeOpenedHint(keybindings) {
64
62
  return `Session tree (${formatSelectNavigationHint(keybindings)} · type to filter · ${formatKeyIds(keybindings, "tui.select.confirm", { capitalize: true })} resume · ${formatKeyIds(keybindings, "tui.select.cancel", { capitalize: true })} close)`;
65
63
  }
66
64
  async function openTimelineOverlay(svc, initialQuery) {
67
- const turns = buildTuiTimelineTurns(await svc.client.loadTimeline(svc.state.currentSessionKey));
65
+ const turns = buildTuiTimelineTurns(await svc.client.loadTimeline(svc.state.currentConversationId));
68
66
  if (turns.length === 0) {
69
67
  svc.chatLog.addSystem("No timeline turns found.");
70
68
  svc.tui.requestRender();
@@ -96,10 +94,10 @@ async function openTimelineOverlay(svc, initialQuery) {
96
94
  svc.chatLog.addSystem(theme.dim(formatTimelineOpenedHint(svc.keybindings)));
97
95
  svc.tui.requestRender();
98
96
  }
99
- function resumeSession(svc, sessionKey) {
100
- svc.setSessionKey(sessionKey);
97
+ function resumeSession(svc, conversationId) {
98
+ svc.setConversationId(conversationId);
101
99
  svc.clearChatForSessionSwitch();
102
- svc.chatLog.addSystem(`Session: ${sessionKey}`);
100
+ svc.chatLog.addSystem(`Session: ${conversationId}`);
103
101
  svc.refreshSessionInfo().then(() => svc.loadSessionHistory()).then(() => {
104
102
  svc.updateHeader();
105
103
  svc.tui.requestRender();
@@ -107,23 +105,13 @@ function resumeSession(svc, sessionKey) {
107
105
  svc.tui.requestRender();
108
106
  }
109
107
  function sessionTreeGroup(session) {
110
- const raw = session.key.trim();
111
- const parts = raw.split(":").filter(Boolean);
112
- if (parts.length >= 3 && parts[0] === "agent") {
113
- const rest = parts.slice(2);
114
- return {
115
- agentId: parts[1] ?? "main",
116
- root: rest[0] ?? raw,
117
- leaf: rest.length > 1 ? rest.slice(1).join(":") : rest.join(":") || raw
118
- };
119
- }
120
108
  return {
121
- agentId: "legacy",
122
- root: raw || "session",
123
- leaf: raw || "session"
109
+ agentId: session.agentId ?? "unknown",
110
+ root: session.sourceChannel ?? "chat",
111
+ leaf: session.displayName ?? session.key
124
112
  };
125
113
  }
126
- function sessionTreeSelectItems(sessions, currentSessionKey) {
114
+ function sessionTreeSelectItems(sessions, currentConversationId) {
127
115
  const byKey = new Map(sessions.map((session) => [session.key, session]));
128
116
  return [...sessions].sort((a, b) => {
129
117
  const ga = sessionTreeGroup(a);
@@ -133,9 +121,9 @@ function sessionTreeSelectItems(sessions, currentSessionKey) {
133
121
  return (b.updatedAt ?? 0) - (a.updatedAt ?? 0);
134
122
  }).map((session) => {
135
123
  const group = sessionTreeGroup(session);
136
- const current = session.key === currentSessionKey ? "* " : " ";
124
+ const current = session.key === currentConversationId ? "* " : " ";
137
125
  const label = session.displayName?.trim() || group.leaf;
138
- const parent = session.forkedFromSessionKey ? byKey.get(session.forkedFromSessionKey)?.displayName?.trim() ?? session.forkedFromSessionKey : null;
126
+ const parent = session.forkedFromConversationId ? byKey.get(session.forkedFromConversationId)?.displayName?.trim() ?? session.forkedFromConversationId : null;
139
127
  const description = [
140
128
  `${group.agentId}/${group.root}`,
141
129
  formatSessionPickerDescription(session, { showKey: Boolean(session.displayName) }),
@@ -150,8 +138,8 @@ function sessionTreeSelectItems(sessions, currentSessionKey) {
150
138
  });
151
139
  }
152
140
  async function openAgentPickerOverlay(svc) {
153
- const parsed = parseAgentSessionKey(svc.state.currentSessionKey);
154
- if (!parsed) {
141
+ const parsed = svc.state.sessionInfo;
142
+ if (!parsed.agentId) {
155
143
  svc.chatLog.addSystem("Cannot switch agent: current session is not an agent session.");
156
144
  svc.tui.requestRender();
157
145
  return;
@@ -183,9 +171,9 @@ async function openAgentPickerOverlay(svc) {
183
171
  svc.tui.requestRender();
184
172
  return;
185
173
  }
186
- const targetSessionKey = `agent:${targetAgentId}:${parsed.rest}`;
187
- Promise.resolve(svc.switchAgentSession?.(targetSessionKey, targetAgentId)).then(() => {
188
- svc.chatLog.addSystem(`Switched to agent: ${targetAgentId}\nSession: ${targetSessionKey}`);
174
+ const targetConversationId = randomUUID();
175
+ Promise.resolve(svc.switchAgentSession?.(targetConversationId, targetAgentId)).then(() => {
176
+ svc.chatLog.addSystem(`Switched to agent: ${targetAgentId}\nSession: ${targetConversationId}`);
189
177
  }).catch((err) => {
190
178
  const errorMessage = err instanceof Error ? err.message : String(err);
191
179
  svc.chatLog.addSystem(`Agent switch failed: ${errorMessage}`);
@@ -335,7 +323,7 @@ async function openReviewLauncherOverlay(svc) {
335
323
  }
336
324
  let context;
337
325
  try {
338
- context = await svc.client.getReviewContext(svc.state.currentSessionKey);
326
+ context = await svc.client.getReviewContext(svc.state.currentConversationId);
339
327
  } catch (err) {
340
328
  const errorMessage = err instanceof Error ? err.message : String(err);
341
329
  svc.chatLog.addSystem(`Review picker failed: ${errorMessage}`);
@@ -354,24 +342,24 @@ async function openSessionPickerOverlay(svc, options = {}) {
354
342
  return;
355
343
  }
356
344
  const selector = new SessionSelector(sessions, {
357
- onResume: (sessionKey) => {
345
+ onResume: (conversationId) => {
358
346
  svc.closeOverlay();
359
347
  svc.tui.setFocus(svc.editor);
360
- resumeSession(svc, sessionKey);
348
+ resumeSession(svc, conversationId);
361
349
  options.onResume?.();
362
350
  },
363
- onRename: async (sessionKey, name) => {
364
- return (await svc.client.renameSession(sessionKey, name)).ok ? { ok: true } : {
351
+ onRename: async (conversationId, name) => {
352
+ return (await svc.client.renameSession(conversationId, name)).ok ? { ok: true } : {
365
353
  ok: false,
366
354
  error: "Rename failed"
367
355
  };
368
356
  },
369
- onDelete: async (sessionKey) => {
370
- if (sessionKey === svc.state.currentSessionKey) return {
357
+ onDelete: async (conversationId) => {
358
+ if (conversationId === svc.state.currentConversationId) return {
371
359
  ok: false,
372
360
  error: "Switch away before deleting the active session"
373
361
  };
374
- return (await svc.client.deleteSession(sessionKey)).ok ? { ok: true } : {
362
+ return (await svc.client.deleteSession(conversationId)).ok ? { ok: true } : {
375
363
  ok: false,
376
364
  error: "Delete failed"
377
365
  };
@@ -383,7 +371,7 @@ async function openSessionPickerOverlay(svc, options = {}) {
383
371
  options.onCancel?.();
384
372
  },
385
373
  requestRender: () => svc.tui.requestRender()
386
- }, svc.keybindings, sessions.find((s) => s.key === svc.state.currentSessionKey)?.cwd ?? process.cwd(), svc.state.currentSessionKey);
374
+ }, svc.keybindings, sessions.find((s) => s.key === svc.state.currentConversationId)?.cwd ?? process.cwd(), svc.state.currentConversationId);
387
375
  svc.openOverlay(selector);
388
376
  svc.chatLog.addSystem(theme.dim("Session picker"));
389
377
  svc.tui.requestRender();
@@ -396,7 +384,7 @@ async function openSessionTreeOverlay(svc) {
396
384
  svc.tui.requestRender();
397
385
  return;
398
386
  }
399
- const items = sessionTreeSelectItems(sessions, svc.state.currentSessionKey);
387
+ const items = sessionTreeSelectItems(sessions, svc.state.currentConversationId);
400
388
  const list = new SearchableSelectList(items, Math.min(14, items.length), searchableSelectListTheme);
401
389
  list.onSelect = (item) => {
402
390
  svc.closeOverlay();
@@ -414,7 +402,7 @@ async function openSessionTreeOverlay(svc) {
414
402
  }
415
403
  /** Searchable current-transcript tree overlay. */
416
404
  async function openTranscriptTreeOverlay(svc) {
417
- const entries = await svc.client.loadTranscriptTree(svc.state.currentSessionKey);
405
+ const entries = await svc.client.loadTranscriptTree(svc.state.currentConversationId);
418
406
  const filterMode = svc.getTuiSettings().treeFilterMode;
419
407
  const visibleEntries = filterTuiTranscriptTreeEntries(entries, filterMode);
420
408
  if (visibleEntries.length === 0) {
@@ -432,14 +420,14 @@ async function openTranscriptTreeOverlay(svc) {
432
420
  svc.tui.requestRender();
433
421
  return;
434
422
  }
435
- const targetKey = defaultTranscriptForkKey(svc.state.currentSessionKey, entry.id);
436
- const sourceSessionKey = svc.state.currentSessionKey;
423
+ const targetKey = defaultTranscriptForkKey(svc.state.currentConversationId, entry.id);
424
+ const sourceConversationId = svc.state.currentConversationId;
437
425
  svc.chatLog.addSystem(theme.dim(`Forking transcript at ${entry.id}...`));
438
- svc.client.forkSessionAt(sourceSessionKey, targetKey, entry.id).then((result) => {
439
- resumeSession(svc, result.sessionKey);
426
+ svc.client.forkSessionAt(sourceConversationId, targetKey, entry.id).then((result) => {
427
+ resumeSession(svc, result.conversationId);
440
428
  svc.chatLog.addBranchSummary({
441
- sourceSessionKey,
442
- targetSessionKey: result.sessionKey,
429
+ sourceConversationId,
430
+ targetConversationId: result.conversationId,
443
431
  rowCount: result.rowCount,
444
432
  entryId: entry.id
445
433
  });
@@ -460,7 +448,7 @@ async function openTranscriptTreeOverlay(svc) {
460
448
  svc.tui.requestRender();
461
449
  };
462
450
  list.onLabelSubmit = (entry, label) => {
463
- svc.client.setTranscriptLabel(svc.state.currentSessionKey, entry.id, label).then(() => {
451
+ svc.client.setTranscriptLabel(svc.state.currentConversationId, entry.id, label).then(() => {
464
452
  list.updateEntryLabel(entry.id, label);
465
453
  svc.chatLog.addSystem(theme.dim(label?.trim() ? `Labeled ${entry.id}: ${label.trim()}` : `Cleared label for ${entry.id}`));
466
454
  svc.tui.requestRender();
@@ -476,7 +464,7 @@ async function openTranscriptTreeOverlay(svc) {
476
464
  }
477
465
  /** Pi-style `/fork` overlay: select a previous user message and branch there. */
478
466
  async function openUserMessageForkOverlay(svc) {
479
- const entries = await svc.client.loadTranscriptTree(svc.state.currentSessionKey);
467
+ const entries = await svc.client.loadTranscriptTree(svc.state.currentConversationId);
480
468
  const byId = new Map(entries.map((entry) => [entry.id, entry]));
481
469
  const items = userMessageForkSelectItems(entries);
482
470
  if (items.length === 0) {
@@ -490,15 +478,15 @@ async function openUserMessageForkOverlay(svc) {
490
478
  svc.closeOverlay();
491
479
  svc.tui.setFocus(svc.editor);
492
480
  const entry = byId.get(item.value);
493
- const targetKey = defaultTranscriptForkKey(svc.state.currentSessionKey, item.value);
494
- const sourceSessionKey = svc.state.currentSessionKey;
481
+ const targetKey = defaultTranscriptForkKey(svc.state.currentConversationId, item.value);
482
+ const sourceConversationId = svc.state.currentConversationId;
495
483
  svc.chatLog.addSystem(theme.dim(`Forking from ${item.value}...`));
496
- svc.client.forkSessionAt(sourceSessionKey, targetKey, item.value).then((result) => {
497
- resumeSession(svc, result.sessionKey);
484
+ svc.client.forkSessionAt(sourceConversationId, targetKey, item.value).then((result) => {
485
+ resumeSession(svc, result.conversationId);
498
486
  if (entry?.contentText) svc.setEditorText(entry.contentText);
499
487
  svc.chatLog.addBranchSummary({
500
- sourceSessionKey,
501
- targetSessionKey: result.sessionKey,
488
+ sourceConversationId,
489
+ targetConversationId: result.conversationId,
502
490
  rowCount: result.rowCount,
503
491
  entryId: item.value,
504
492
  restoredText: entry?.contentText
@@ -27,9 +27,9 @@ export type PickerServices = {
27
27
  openEditorSelector: (component: Component, focus?: Component) => () => void;
28
28
  refreshSessionInfo: () => Promise<void>;
29
29
  updateHeader: () => void;
30
- state: Pick<TuiState, 'currentSessionKey' | 'sessionInfo' | 'activeRunId'>;
31
- setSessionKey: (key: string) => void;
32
- switchAgentSession?: (sessionKey: string, agentId: string) => void | Promise<void>;
30
+ state: Pick<TuiState, 'currentConversationId' | 'sessionInfo' | 'activeRunId'>;
31
+ setConversationId: (key: string) => void;
32
+ switchAgentSession?: (conversationId: string, agentId: string) => void | Promise<void>;
33
33
  clearChatForSessionSwitch: () => void;
34
34
  loadSessionHistory: () => Promise<void>;
35
35
  loadHistoryWindow: (opts: {
@@ -8,7 +8,7 @@ export type SessionActionsContext = {
8
8
  chatLog: ChatLog;
9
9
  tui: TUI;
10
10
  state: TuiState;
11
- resolveSessionKey: (raw?: string) => string;
11
+ resolveConversationId: (raw?: string) => string;
12
12
  updateHeader: () => void;
13
13
  updateFooter: () => void;
14
14
  setActivityStatus: (status: string) => void;
@@ -1,22 +1,15 @@
1
- import { parseAgentSessionKey } from "../routing/session-key-utils.js";
2
- import { init_agent_session_key } from "../routing/agent-session-key.js";
3
1
  import { appendHistoryToChatLog, historyKeysHaveAppendOnlyPrefix, historyMessageKey } from "./chat-history.js";
4
2
  import { markRunAborting, markRunIdleAfterAbort, resetRunStatus } from "./tui-run-state.js";
5
3
  import { clearSeenStreamEvents } from "./tui-agent-events.js";
6
4
  //#region src/tui/tui-session-actions.ts
7
- init_agent_session_key();
8
5
  function createSessionActions(context) {
9
- const { client, chatLog, tui, state, resolveSessionKey, updateHeader, updateFooter, setActivityStatus, historyLimit = 200, onAgentIdChange, sessionSnapshot, onSessionInfoChange } = context;
6
+ const { client, chatLog, tui, state, resolveConversationId, updateHeader, updateFooter, setActivityStatus, historyLimit = 200, onAgentIdChange, sessionSnapshot, onSessionInfoChange } = context;
10
7
  let refreshSessionInfoPromise = Promise.resolve();
11
8
  let lastHistoryKeys = [];
12
- const updateAgentFromSessionKey = (key) => {
13
- const parsed = parseAgentSessionKey(key);
14
- if (!parsed?.agentId) return;
15
- onAgentIdChange?.(parsed.agentId);
16
- };
17
9
  const runRefreshSessionInfo = async () => {
18
10
  try {
19
- state.sessionInfo = await client.getSessionInfo(state.currentSessionKey);
11
+ state.sessionInfo = await client.getSessionInfo(state.currentConversationId);
12
+ if (state.sessionInfo.agentId) onAgentIdChange?.(state.sessionInfo.agentId);
20
13
  onSessionInfoChange?.();
21
14
  updateFooter();
22
15
  tui.requestRender();
@@ -37,7 +30,7 @@ function createSessionActions(context) {
37
30
  const loadHistory = async (opts) => {
38
31
  try {
39
32
  const { messages } = await client.loadHistory({
40
- sessionKey: state.currentSessionKey,
33
+ conversationId: state.currentConversationId,
41
34
  limit: historyLimit
42
35
  });
43
36
  sessionSnapshot?.replaceFromHistory(messages);
@@ -58,7 +51,7 @@ function createSessionActions(context) {
58
51
  if (!client.loadHistoryWindow) return false;
59
52
  try {
60
53
  const { messages } = await client.loadHistoryWindow({
61
- sessionKey: state.currentSessionKey,
54
+ conversationId: state.currentConversationId,
62
55
  rowNumber: opts.rowNumber,
63
56
  before: opts.before,
64
57
  after: opts.after
@@ -78,9 +71,7 @@ function createSessionActions(context) {
78
71
  }
79
72
  };
80
73
  const setSession = async (rawKey) => {
81
- const nextKey = resolveSessionKey(rawKey);
82
- updateAgentFromSessionKey(nextKey);
83
- state.currentSessionKey = nextKey;
74
+ state.currentConversationId = resolveConversationId(rawKey);
84
75
  state.activeRunId = null;
85
76
  setActivityStatus("idle");
86
77
  clearChatForSessionSwitch();
@@ -98,12 +89,12 @@ function createSessionActions(context) {
98
89
  markRunIdleAfterAbort(state);
99
90
  tui.requestRender();
100
91
  await client.abortChat({
101
- sessionKey: state.currentSessionKey,
92
+ conversationId: state.currentConversationId,
102
93
  runId
103
94
  }).catch(() => {});
104
95
  };
105
96
  const resetCurrentSession = async () => {
106
- await client.resetSession(state.currentSessionKey);
97
+ await client.resetSession(state.currentConversationId);
107
98
  clearChatForSessionSwitch();
108
99
  await loadHistory();
109
100
  };
@@ -27,12 +27,15 @@ function sessionMetadataToTuiItem(meta) {
27
27
  const modelRef = typeof cd?.model === "string" ? cd.model : typeof cd?.modelRef === "string" ? cd.modelRef : null;
28
28
  return {
29
29
  key: meta.key,
30
+ agentId: meta.agentId,
31
+ sourceChannel: meta.sourceChannel,
32
+ generatedShell: meta.customData?.genericNewChatShell === true,
30
33
  displayName: meta.name,
31
34
  updatedAt: Date.parse(meta.updatedAt),
32
35
  totalTokens: meta.estimatedTokens ?? null,
33
36
  messageCount: meta.messageCount,
34
37
  model: modelRef,
35
- forkedFromSessionKey: typeof cd?.forkedFromSessionKey === "string" ? cd.forkedFromSessionKey : void 0,
38
+ forkedFromConversationId: typeof cd?.forkedFromConversationId === "string" ? cd.forkedFromConversationId : void 0,
36
39
  cwd: meta.cwd
37
40
  };
38
41
  }