@xopcai/xopc 0.0.487 → 0.0.489

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 (838) hide show
  1. package/README.md +9 -3
  2. package/README.zh-CN.md +9 -3
  3. package/dist/browser-ext/_locales/en/messages.json +1 -1
  4. package/dist/browser-ext/_locales/zh_CN/messages.json +1 -1
  5. package/dist/browser-ext/dist/assets/{auth-8EjgHa-n.js → page-context-DCkQH5LX.js} +237 -172
  6. package/dist/browser-ext/dist/background.js +650 -108
  7. package/dist/browser-ext/dist/sidepanel.html +1 -1
  8. package/dist/browser-ext/dist/sidepanel.js +22 -4
  9. package/dist/browser-ext/manifest.json +2 -1
  10. package/dist/extensions/dingtalk/src/index.js +54 -10
  11. package/dist/extensions/discord/src/index.js +39 -6
  12. package/dist/extensions/feishu/src/adapters/cli-login.js +1 -1
  13. package/dist/extensions/feishu/src/adapters/gateway-setup.js +1 -1
  14. package/dist/extensions/feishu/src/outbound/media-load.d.ts +1 -0
  15. package/dist/extensions/feishu/src/outbound/media-load.js +2 -2
  16. package/dist/extensions/feishu/src/outbound/outbound-adapter.js +2 -1
  17. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js +1 -1
  18. package/dist/extensions/feishu/src/plugin.js +1 -1
  19. package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -1
  20. package/dist/extensions/feishu/src/transport/client/install-sdk.js +2 -2
  21. package/dist/extensions/feishu/src/transport/reliability/message-ingress.js +3 -3
  22. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +1 -1
  23. package/dist/extensions/slack/src/index.js +51 -1
  24. package/dist/extensions/slack/src/manifest.js +1 -0
  25. package/dist/extensions/telegram/src/adapters/outbound-adapter.js +6 -1
  26. package/dist/extensions/telegram/src/adapters/streaming-adapter.js +3 -3
  27. package/dist/extensions/telegram/src/doctor.js +2 -2
  28. package/dist/extensions/telegram/src/draft-stream.js +1 -1
  29. package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
  30. package/dist/extensions/telegram/src/focus-handler.js +1 -1
  31. package/dist/extensions/telegram/src/inbound-processor.js +6 -6
  32. package/dist/extensions/telegram/src/outbound-sender.js +7 -6
  33. package/dist/extensions/telegram/src/plugin.js +22 -22
  34. package/dist/extensions/telegram/src/polling-session.js +1 -1
  35. package/dist/extensions/telegram/xopc.extension.json +1 -1
  36. package/dist/extensions/wecom/src/index.js +82 -6
  37. package/dist/extensions/weixin/src/api/api.js +3 -3
  38. package/dist/extensions/weixin/src/auth/accounts.js +14 -14
  39. package/dist/extensions/weixin/src/auth/pairing.js +1 -1
  40. package/dist/extensions/weixin/src/cdn/upload.js +1 -1
  41. package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
  42. package/dist/extensions/weixin/src/cli/qr-login.js +2 -2
  43. package/dist/extensions/weixin/src/media/data-url.d.ts +1 -0
  44. package/dist/extensions/weixin/src/media/data-url.js +5 -2
  45. package/dist/extensions/weixin/src/messaging/debug-mode.js +6 -6
  46. package/dist/extensions/weixin/src/messaging/inbound.js +13 -13
  47. package/dist/extensions/weixin/src/messaging/process-message.js +4 -4
  48. package/dist/extensions/weixin/src/messaging/quote-cache.js +1 -1
  49. package/dist/extensions/weixin/src/messaging/send.js +1 -1
  50. package/dist/extensions/weixin/src/monitor/monitor.js +2 -2
  51. package/dist/extensions/weixin/src/outbound-send.js +18 -6
  52. package/dist/extensions/weixin/src/plugin.js +3 -3
  53. package/dist/gateway/server/chunks.bin +1767 -1712
  54. package/dist/gateway/server/chunks.json +1 -1
  55. package/dist/gateway/static/root/assets/{activity-store-CWGtissf.js → activity-store-DyHjQrpP.js} +1 -1
  56. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D4YSq8A9.js → agent-avatar-dicebear-gADhOk89.js} +1 -1
  57. package/dist/gateway/static/root/assets/{agent-avatar-display-DWv7biOS.js → agent-avatar-display-Dyyk4GdM.js} +2 -2
  58. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-3xdD9dR1.js → agent-defaults-settings-panel-DD5mU7h6.js} +1 -1
  59. package/dist/gateway/static/root/assets/{agent-plugin-dialog-BNvw2z1Y.js → agent-plugin-dialog-RZpnW9HG.js} +1 -1
  60. package/dist/gateway/static/root/assets/{agents-DcENLHHW.js → agents-Ckt9wMj7.js} +3 -3
  61. package/dist/gateway/static/root/assets/{agents-admin-api-BzpxMKwk.js → agents-admin-api-BW3Mzst8.js} +1 -1
  62. package/dist/gateway/static/root/assets/{api-D70-LnNE.js → api-Cd5TqEwc.js} +1 -1
  63. package/dist/gateway/static/root/assets/{api-SIYalfjE.js → api-DVQaJzrB.js} +1 -1
  64. package/dist/gateway/static/root/assets/{app-management-settings-panel-CEveRIMe.js → app-management-settings-panel-Cim6ZmGT.js} +1 -1
  65. package/dist/gateway/static/root/assets/{appearance-settings-CT2NLLuY.js → appearance-settings-BVMDvmUO.js} +1 -1
  66. package/dist/gateway/static/root/assets/{apps-page-pEqr4fAK.js → apps-page-B7T55D7Y.js} +1 -1
  67. package/dist/gateway/static/root/assets/{archive-plugin-xnggGfUN.js → archive-plugin-DVoAuR_a.js} +1 -1
  68. package/dist/gateway/static/root/assets/{automation-api-CaBLskwk.js → automation-api-B6YcuEsE.js} +1 -1
  69. package/dist/gateway/static/root/assets/{automation-result-state-CeGtOXK0.js → automation-result-state-BycWqFXM.js} +1 -1
  70. package/dist/gateway/static/root/assets/{automation-run-list-DUpezxj4.js → automation-run-list-DDDHtKq0.js} +1 -1
  71. package/dist/gateway/static/root/assets/{automation-task-card-CLayJo0S.js → automation-task-card-BBEA23Zb.js} +1 -1
  72. package/dist/gateway/static/root/assets/{automations-page-BKfvaA41.js → automations-page-B3i5x1Lc.js} +1 -1
  73. package/dist/gateway/static/root/assets/{automations-workspace-BRcJzgLA.js → automations-workspace-D6-Kk33X.js} +2 -2
  74. package/dist/gateway/static/root/assets/{binary-plugins-DtD3acS4.js → binary-plugins-o-jwYyMd.js} +1 -1
  75. package/dist/gateway/static/root/assets/{block-editor-DXjBAN8L.js → block-editor-Bp6TLleA.js} +1 -1
  76. package/dist/gateway/static/root/assets/{browser-settings-page-Cgxtr2eR.js → browser-settings-page-CtPARtRA.js} +1 -1
  77. package/dist/gateway/static/root/assets/{capabilities-CpwoMqtm.js → capabilities-B5gHYD8r.js} +1 -1
  78. package/dist/gateway/static/root/assets/{capabilities-DcD15BrU.js → capabilities-G2ZaAAs2.js} +1 -1
  79. package/dist/gateway/static/root/assets/{capabilities-page-x_AS_XJ0.js → capabilities-page-C6KCaaHR.js} +2 -2
  80. package/dist/gateway/static/root/assets/{capabilities-settings-panel-DMgEXxkC.js → capabilities-settings-panel-CVwdxuL4.js} +1 -1
  81. package/dist/gateway/static/root/assets/{channels-565FQAGr.js → channels-Bh2bHLni.js} +1 -1
  82. package/dist/gateway/static/root/assets/{chat-agents-api-BfsNH-ht.js → chat-agents-api-DRKlkcuv.js} +1 -1
  83. package/dist/gateway/static/root/assets/{chat-chart-block-Dpolmx0-.js → chat-chart-block-DxTCx__V.js} +1 -1
  84. package/dist/gateway/static/root/assets/{chat-page-Bn44NcvF.js → chat-page-oy4EGdO1.js} +31 -31
  85. package/dist/gateway/static/root/assets/{chat-terminal-dock-D6fuI2tI.js → chat-terminal-dock-Ch74AWYF.js} +1 -1
  86. package/dist/gateway/static/root/assets/{command-palette-api-H3lCPfK8.js → command-palette-api-CAKoTF_-.js} +1 -1
  87. package/dist/gateway/static/root/assets/{composer-model-config-control-BcWrGT5D.js → composer-model-config-control-Bas1wFVW.js} +1 -1
  88. package/dist/gateway/static/root/assets/{composer-notifications-0fMBrXZD.js → composer-notifications-CpBgWAE4.js} +1 -1
  89. package/dist/gateway/static/root/assets/{composer-payload-handoff-DCGudJjU.js → composer-payload-handoff-uT_hvvap.js} +1 -1
  90. package/dist/gateway/static/root/assets/{computer-settings-page-kvYzJ_j2.js → computer-settings-page-x8YUBBuX.js} +1 -1
  91. package/dist/gateway/static/root/assets/{connected-providers-grid-CApjiM_x.js → connected-providers-grid-DS21-u3Q.js} +1 -1
  92. package/dist/gateway/static/root/assets/{connection-usage-guide-C2qOP6Nx.js → connection-usage-guide-DNNFESD9.js} +1 -1
  93. package/dist/gateway/static/root/assets/{connector-service-page-DKihi3WL.js → connector-service-page-BS7IJ6oc.js} +1 -1
  94. package/dist/gateway/static/root/assets/{connectors-api-Dj9RbG9p.js → connectors-api-B27sJ651.js} +1 -1
  95. package/dist/gateway/static/root/assets/{connectors-page-CR6a3Mne.js → connectors-page-DM6TppXV.js} +1 -1
  96. package/dist/gateway/static/root/assets/{date-picker-BX5tr0IG.js → date-picker-D3N2BGVY.js} +1 -1
  97. package/dist/gateway/static/root/assets/{date-time-picker-CdPsuK2A.js → date-time-picker-BNw099Is.js} +1 -1
  98. package/dist/gateway/static/root/assets/{desktop-pet-DRfOb9ZT.js → desktop-pet-BtY6aGrh.js} +1 -1
  99. package/dist/gateway/static/root/assets/{desktop-pet-settings-D6qCAFLe.js → desktop-pet-settings-DVXfAMaU.js} +1 -1
  100. package/dist/gateway/static/root/assets/{dev-view-store-DrRxtile.js → dev-view-store-D4EyUkRI.js} +1 -1
  101. package/dist/gateway/static/root/assets/{device-connections-panel-Drbw9eRH.js → device-connections-panel-DYK_DQzO.js} +1 -1
  102. package/dist/gateway/static/root/assets/{device-pairing-action-Dd2YtIhH.js → device-pairing-action-DXo8MWy2.js} +1 -1
  103. package/dist/gateway/static/root/assets/{device-pairing-wizard-wtsyHEO3.js → device-pairing-wizard-NddAztJ2.js} +1 -1
  104. package/dist/gateway/static/root/assets/{directory-picker-path-field-B3YBba3x.js → directory-picker-path-field-Bbq7ZyGn.js} +1 -1
  105. package/dist/gateway/static/root/assets/{extension-authoritative-grants-WXYRv5nA.js → extension-authoritative-grants-qpYvHriJ.js} +1 -1
  106. package/dist/gateway/static/root/assets/{extension-debug-page-CKeIq8S2.js → extension-debug-page-BOb-6rpq.js} +1 -1
  107. package/dist/gateway/static/root/assets/{extension-iframe-host-Cv4PCSVv.js → extension-iframe-host-DpgIPfJe.js} +1 -1
  108. package/dist/gateway/static/root/assets/{extension-marketplace-api-e0e9OxOT.js → extension-marketplace-api-BhGNQYHl.js} +1 -1
  109. package/dist/gateway/static/root/assets/{extension-message-router-GPlMiYyF.js → extension-message-router-QjbtEYyu.js} +1 -1
  110. package/dist/gateway/static/root/assets/{extension-page-DcP7IEMp.js → extension-page-BOp7wU9Y.js} +1 -1
  111. package/dist/gateway/static/root/assets/{extension-provider-DZ97b5uA.js → extension-provider-CFPicsnW.js} +1 -1
  112. package/dist/gateway/static/root/assets/{extension-settings-page-DIYoawnA.js → extension-settings-page-cXjBvPwg.js} +1 -1
  113. package/dist/gateway/static/root/assets/{gateway-config-swr-aAsaoOK1.js → gateway-config-swr-DxelrRtx.js} +1 -1
  114. package/dist/gateway/static/root/assets/gateway-realtime-D2B_nv2b.js +1 -0
  115. package/dist/gateway/static/root/assets/gateway-realtime-store-DrVbjYfI.js +1 -0
  116. package/dist/gateway/static/root/assets/{gateway-restart-BY6zJgTe.js → gateway-restart-Ce6rCCAr.js} +1 -1
  117. package/dist/gateway/static/root/assets/{gateway-settings-4TvJ0_i0.js → gateway-settings-BTr0Gwdo.js} +1 -1
  118. package/dist/gateway/static/root/assets/{gateway-startup-retry-D0dDJJQ4.js → gateway-startup-retry-Dm0dK8BT.js} +1 -1
  119. package/dist/gateway/static/root/assets/{global-defaults-api-9iooq81U.js → global-defaults-api-BZnu44eA.js} +1 -1
  120. package/dist/gateway/static/root/assets/{home-page-VMzHth7Q.js → home-page-BmoT_EN4.js} +3 -3
  121. package/dist/gateway/static/root/assets/{home-task-actions-iUYzLb18.js → home-task-actions-Ck0AhcYe.js} +1 -1
  122. package/dist/gateway/static/root/assets/{image-generation-api-Dv4fjHaE.js → image-generation-api-DrZPmWFt.js} +1 -1
  123. package/dist/gateway/static/root/assets/{imports-page-WENCxW7P.js → imports-page-D-x5kijk.js} +1 -1
  124. package/dist/gateway/static/root/assets/index-BiQP7-5r.js +11 -0
  125. package/dist/gateway/static/root/assets/index-CREeN6C_.css +1 -0
  126. package/dist/gateway/static/root/assets/{install-connector-dialog-DNY-rpBC.js → install-connector-dialog-st2O1bez.js} +1 -1
  127. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DHWEGna7.js → keyboard-shortcuts-settings-DnKkQoqR.js} +1 -1
  128. package/dist/gateway/static/root/assets/{local-app-workbench-page-Dnug0YtC.js → local-app-workbench-page-CKHJa4K8.js} +1 -1
  129. package/dist/gateway/static/root/assets/{local-apps-page-Bjr4rrgT.js → local-apps-page-D28d-sO0.js} +1 -1
  130. package/dist/gateway/static/root/assets/{local-session-drafts-Z3PoR-8i.js → local-session-drafts-KkAOxXk5.js} +2 -2
  131. package/dist/gateway/static/root/assets/{locale-store-DgbX5Azb.js → locale-store-Dy0B0XDJ.js} +1 -1
  132. package/dist/gateway/static/root/assets/{logs-page-BIZvtqSJ.js → logs-page-BPuHO-iA.js} +1 -1
  133. package/dist/gateway/static/root/assets/{management-api-CJb5Vclf.js → management-api-BtTRehT0.js} +1 -1
  134. package/dist/gateway/static/root/assets/{management-settings-BjtIRkgJ.js → management-settings-B2R43Itv.js} +1 -1
  135. package/dist/gateway/static/root/assets/{markdown-view-lnMk_L03.js → markdown-view-ByuzuGRb.js} +1 -1
  136. package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-kq0dZ2Nc.js → mcp-conversation-setup-page-D_6XeyXG.js} +1 -1
  137. package/dist/gateway/static/root/assets/{media-plugins-RU49QGcW.js → media-plugins-B9Q7WvNF.js} +1 -1
  138. package/dist/gateway/static/root/assets/messages-Bj6DCoic.js +3 -0
  139. package/dist/gateway/static/root/assets/{model-selector-BolKz5sx.js → model-selector-8FTrQQ2N.js} +1 -1
  140. package/dist/gateway/static/root/assets/{models-hub-cache-CjdnTF5z.js → models-hub-cache-DMBOw544.js} +1 -1
  141. package/dist/gateway/static/root/assets/{new-session-preferences-gb411vZP.js → new-session-preferences-CxCn2Jxk.js} +1 -1
  142. package/dist/gateway/static/root/assets/{note-detail-panel-Qm1Et_f8.js → note-detail-panel-CYNPJVVE.js} +3 -3
  143. package/dist/gateway/static/root/assets/note-image-lightbox-D20oZuOM.js +1 -0
  144. package/dist/gateway/static/root/assets/{notes-api-FjHO1h6b.js → notes-api-M1FuRZbW.js} +1 -1
  145. package/dist/gateway/static/root/assets/{notes-page-B_atfwwi.js → notes-page-Dpd98vQp.js} +1 -1
  146. package/dist/gateway/static/root/assets/{oauth-api-B1lbdI3v.js → oauth-api-Dza1tHcr.js} +1 -1
  147. package/dist/gateway/static/root/assets/{oauth-provider-connect-Cy1Yy8aX.js → oauth-provider-connect-BPNIEiMv.js} +1 -1
  148. package/dist/gateway/static/root/assets/{page-context-capture-button-Phh-SyES.js → page-context-capture-button-DpGnxSrD.js} +1 -1
  149. package/dist/gateway/static/root/assets/{page-context-draft-M04A73Ul.js → page-context-draft-CHAS3BY3.js} +1 -1
  150. package/dist/gateway/static/root/assets/{page-header-store-CYA4Isnf.js → page-header-store-BXED3zhV.js} +1 -1
  151. package/dist/gateway/static/root/assets/{personal-avatar-DF3Frmnt.js → personal-avatar-BCk4KoeZ.js} +1 -1
  152. package/dist/gateway/static/root/assets/{personal-page-DkDROUWV.js → personal-page-BfljqOp5.js} +1 -1
  153. package/dist/gateway/static/root/assets/{personal-profile-settings-LAAXGLKs.js → personal-profile-settings-C86FBPOH.js} +1 -1
  154. package/dist/gateway/static/root/assets/{personal-settings-panel-B6G-4av9.js → personal-settings-panel-BlPLE0Ip.js} +1 -1
  155. package/dist/gateway/static/root/assets/{phone-dependencies-card-DeBlKu7M.js → phone-dependencies-card-BCob98OY.js} +1 -1
  156. package/dist/gateway/static/root/assets/{phone-model-connection-TStZicIQ.js → phone-model-connection-D-CcYcch.js} +1 -1
  157. package/dist/gateway/static/root/assets/{phone-model-picker-C3xcbacO.js → phone-model-picker-eMe7fmZu.js} +1 -1
  158. package/dist/gateway/static/root/assets/{phone-settings-page-CllfdPFi.js → phone-settings-page-D7yXeGmR.js} +1 -1
  159. package/dist/gateway/static/root/assets/{phone-workspace-store-CeP3GXUk.js → phone-workspace-store-CcA_vo-t.js} +1 -1
  160. package/dist/gateway/static/root/assets/{plugin-details-dialog-Ck1dirgu.js → plugin-details-dialog-BAmodjSZ.js} +1 -1
  161. package/dist/gateway/static/root/assets/{preference-select-fields-DMClbggY.js → preference-select-fields-BBd5CWkM.js} +1 -1
  162. package/dist/gateway/static/root/assets/{preview-runtime-Cl-SoLXg.js → preview-runtime-DUJ7XhMP.js} +3 -3
  163. package/dist/gateway/static/root/assets/{product-automation-feedback-Bb_lbw1l.js → product-automation-feedback-BDFpFrSs.js} +1 -1
  164. package/dist/gateway/static/root/assets/{product-open-page-BWH54iuf.js → product-open-page-t3hsoYql.js} +1 -1
  165. package/dist/gateway/static/root/assets/{product-preview-content-NOZu0WO2.js → product-preview-content-BM0pjf0F.js} +1 -1
  166. package/dist/gateway/static/root/assets/{product-preview-modal-ZKiIeKof.js → product-preview-modal-CLQcCVjI.js} +2 -2
  167. package/dist/gateway/static/root/assets/project-detail-page-CcnOT_aq.js +7 -0
  168. package/dist/gateway/static/root/assets/{project-understanding-BWpcOkWw.js → project-understanding-CwtdVbMP.js} +1 -1
  169. package/dist/gateway/static/root/assets/{projects-page-Dnx2AcQX.js → projects-page-ESAmJ4I_.js} +1 -1
  170. package/dist/gateway/static/root/assets/{providers-api-BRAMBKCK.js → providers-api-CR7FJzt-.js} +1 -1
  171. package/dist/gateway/static/root/assets/{recording-upload-C0d2YjJV.js → recording-upload-DrgujKBt.js} +1 -1
  172. package/dist/gateway/static/root/assets/{registry-api-Dz4umdY3.js → registry-api-CaBz9f4g.js} +1 -1
  173. package/dist/gateway/static/root/assets/{remote-access-hub-BEIzBYdj.js → remote-access-hub-CB-Js5gd.js} +1 -1
  174. package/dist/gateway/static/root/assets/{resource-unavailable-82byHwG_.js → resource-unavailable-DiPPmZsR.js} +1 -1
  175. package/dist/gateway/static/root/assets/right-workspace-store-DsVm6C0V.js +1 -0
  176. package/dist/gateway/static/root/assets/{route-preload-DkUojqyb.js → route-preload-CsBdFJHO.js} +2 -2
  177. package/dist/gateway/static/root/assets/{routine-panel-wJxaH-1V.js → routine-panel-pVuJtctD.js} +2 -2
  178. package/dist/gateway/static/root/assets/{runtime-tools-api-CQ7fTX-H.js → runtime-tools-api-utBemmh4.js} +1 -1
  179. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DZD-cEXM.js → runtime-tools-settings-panel-ChXrIluB.js} +1 -1
  180. package/dist/gateway/static/root/assets/{service-recommendation-list-CFJ8WBzq.js → service-recommendation-list-Dm5GcMRy.js} +1 -1
  181. package/dist/gateway/static/root/assets/{session-api-Dxhtjzoa.js → session-api-vEn4BzjV.js} +1 -1
  182. package/dist/gateway/static/root/assets/{session-manager-DvIGR4Sw.js → session-manager-7nbjJYyy.js} +2 -2
  183. package/dist/gateway/static/root/assets/{sessions-page-BDPieIpD.js → sessions-page-B__ftjgG.js} +1 -1
  184. package/dist/gateway/static/root/assets/settings-advanced-gate-DV-_ZdXD.js +1 -0
  185. package/dist/gateway/static/root/assets/{settings-advanced-section-1R7xRVEG.js → settings-advanced-section-DhKzGl03.js} +1 -1
  186. package/dist/gateway/static/root/assets/{settings-mode-store-D4-i8uQI.js → settings-mode-store-CQofc337.js} +1 -1
  187. package/dist/gateway/static/root/assets/{settings-page-DXo8rZFt.js → settings-page-BRAijVXZ.js} +1 -1
  188. package/dist/gateway/static/root/assets/{settings-page-header-BooYRGUH.js → settings-page-header-CiS6x6sn.js} +1 -1
  189. package/dist/gateway/static/root/assets/{settings-page-layout-BeHnqGAN.js → settings-page-layout-B-rj_rso.js} +1 -1
  190. package/dist/gateway/static/root/assets/{setup-interaction-page-DqmPSRNo.js → setup-interaction-page-DTgwtj55.js} +1 -1
  191. package/dist/gateway/static/root/assets/{setup-status-panel-c4yDTYiK.js → setup-status-panel-BhKPMIds.js} +1 -1
  192. package/dist/gateway/static/root/assets/{share-link-dialog-Cvma1jxB.js → share-link-dialog-WR7Op1vL.js} +1 -1
  193. package/dist/gateway/static/root/assets/{share-preview-page-BL6FwL4u.js → share-preview-page-DonmTI11.js} +1 -1
  194. package/dist/gateway/static/root/assets/{shares-api-BqIBNEtd.js → shares-api-CoRLwDnw.js} +1 -1
  195. package/dist/gateway/static/root/assets/{shares-settings-BoBOd-eB.js → shares-settings-UA91fiMV.js} +1 -1
  196. package/dist/gateway/static/root/assets/{skill-api-oDg0Zlyb.js → skill-api-BE-iPtTQ.js} +1 -1
  197. package/dist/gateway/static/root/assets/{skill-list-api-BvfKctht.js → skill-list-api-Dsfjdtuu.js} +1 -1
  198. package/dist/gateway/static/root/assets/{skill-reload-api-CnchMEV8.js → skill-reload-api-BIZJWow-.js} +1 -1
  199. package/dist/gateway/static/root/assets/{skills-page-CFZk_0nE.js → skills-page-1wvItQag.js} +1 -1
  200. package/dist/gateway/static/root/assets/{space-api-C_GoZOc_.js → space-api-E8VbAaEl.js} +1 -1
  201. package/dist/gateway/static/root/assets/space-page-CUwakPrj.js +2 -0
  202. package/dist/gateway/static/root/assets/{space-workbook-B8JGuyIf.js → space-workbook-CwltZeHG.js} +1 -1
  203. package/dist/gateway/static/root/assets/{system-settings-panel-DzNDyMOH.js → system-settings-panel-03a25GEc.js} +1 -1
  204. package/dist/gateway/static/root/assets/{task-detail-page-BmWkL-KH.js → task-detail-page-Cvx-XtFO.js} +1 -1
  205. package/dist/gateway/static/root/assets/{task-header-title-CCaEJNV4.js → task-header-title-DHb7z-hq.js} +1 -1
  206. package/dist/gateway/static/root/assets/{task-result-presentation-DwEf7Xf7.js → task-result-presentation-_VWkiekf.js} +1 -1
  207. package/dist/gateway/static/root/assets/{task-run-issue-notice-COE7ppvl.js → task-run-issue-notice-CqjS8_gi.js} +1 -1
  208. package/dist/gateway/static/root/assets/{tasks-CvOAtEHv.js → tasks-D8bnpu0N.js} +1 -1
  209. package/dist/gateway/static/root/assets/{terminal-panel-store-CHQ2xJtk.js → terminal-panel-store-BOHv5O2x.js} +1 -1
  210. package/dist/gateway/static/root/assets/{theme-store-Bij94a-6.js → theme-store-XNsFzxSj.js} +1 -1
  211. package/dist/gateway/static/root/assets/{tracing-settings-page-CKH4dKSl.js → tracing-settings-page-Y9z2HoGj.js} +1 -1
  212. package/dist/gateway/static/root/assets/{tunnel-api-ChjCCCGL.js → tunnel-api-XHGjcUi9.js} +1 -1
  213. package/dist/gateway/static/root/assets/turn-outcome-Bf3N3Bmj.js +1 -0
  214. package/dist/gateway/static/root/assets/{understanding-activity-store-BD1OXjlI.js → understanding-activity-store-BDBAkksk.js} +1 -1
  215. package/dist/gateway/static/root/assets/{understanding-refresh-store-BSVLFuVh.js → understanding-refresh-store-D7gBfD26.js} +1 -1
  216. package/dist/gateway/static/root/assets/{usage-page-v5c3aC-p.js → usage-page-DxESTMwa.js} +1 -1
  217. package/dist/gateway/static/root/assets/{use-autosave-teDzNJW4.js → use-autosave-D7zZrcsj.js} +1 -1
  218. package/dist/gateway/static/root/assets/{use-composer-attachments-rUl5n4_a.js → use-composer-attachments-CQwCTKAp.js} +1 -1
  219. package/dist/gateway/static/root/assets/{use-file-preview-expanded-BRjXpRde.js → use-file-preview-expanded-CA9vFUTT.js} +1 -1
  220. package/dist/gateway/static/root/assets/{use-generated-media-Bx6BscUT.js → use-generated-media-DX4_ne7C.js} +1 -1
  221. package/dist/gateway/static/root/assets/{use-personal-profile-Dz3wWaGt.js → use-personal-profile-CaCORKeL.js} +1 -1
  222. package/dist/gateway/static/root/assets/{use-personal-work-D-Tgi4DZ.js → use-personal-work-fvvZDK_7.js} +1 -1
  223. package/dist/gateway/static/root/assets/{use-realtime-voice-Bp81D6PV.js → use-realtime-voice-D9k997EW.js} +1 -1
  224. package/dist/gateway/static/root/assets/{use-share-link-D5HNXEIt.js → use-share-link-CqV3o-VZ.js} +1 -1
  225. package/dist/gateway/static/root/assets/{use-workspace-tree-DXKhfc1T.js → use-workspace-tree-nnrez9-d.js} +1 -1
  226. package/dist/gateway/static/root/assets/{user-model-page-B0tEc4rh.js → user-model-page-CpVdbSxS.js} +1 -1
  227. package/dist/gateway/static/root/assets/{voice-api-key-field-odum3GZx.js → voice-api-key-field-CVi3dBKx.js} +1 -1
  228. package/dist/gateway/static/root/assets/{voice-config-api-CiA2cr3s.js → voice-config-api-DZbcg7qD.js} +1 -1
  229. package/dist/gateway/static/root/assets/{voice-input-shortcut-events-JsEfJGJz.js → voice-input-shortcut-events-CwKpIInD.js} +1 -1
  230. package/dist/gateway/static/root/assets/{voice-player-store-CUV5cpmX.js → voice-player-store-DT0f9GPa.js} +1 -1
  231. package/dist/gateway/static/root/assets/{voice-settings-FOeRWVH4.js → voice-settings-CJdWnHas.js} +1 -1
  232. package/dist/gateway/static/root/assets/{work-discovery-overlay-CJxXUdeq.js → work-discovery-overlay-qEN1Ikir.js} +1 -1
  233. package/dist/gateway/static/root/assets/{work-discovery-page-Dm0XTxsk.js → work-discovery-page-JjCyt1Kw.js} +1 -1
  234. package/dist/gateway/static/root/assets/{working-directory-picker-modal-DfyyBJpb.js → working-directory-picker-modal-DX6bRmkQ.js} +1 -1
  235. package/dist/gateway/static/root/assets/{workspace-api-B1JW3oZZ.js → workspace-api-CD_6YyPI.js} +2 -2
  236. package/dist/gateway/static/root/assets/workspace-editor-agent-store-BuYdf4CO.js +1 -0
  237. package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-kGa6o4bV.js → workspace-file-preview-dialog-DdVyIRKm.js} +1 -1
  238. package/dist/gateway/static/root/assets/{workspace-open-location-menu-Dl4QsZL3.js → workspace-open-location-menu-BdXn5F2i.js} +1 -1
  239. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-fiyk59YU.js → xopc-cloud-account-card-CLM7hfkN.js} +1 -1
  240. package/dist/gateway/static/root/index.html +96 -96
  241. package/dist/package.js +1 -1
  242. package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
  243. package/dist/packages/gateway-contract/src/task-display.js +1 -1
  244. package/dist/packages/gateway-contract/src/task-research-result.js +5 -0
  245. package/dist/packages/realtime-client/src/index.js +6 -1
  246. package/dist/packages/realtime-protocol/src/browser-preview.js +111 -0
  247. package/dist/packages/realtime-protocol/src/index.js +5 -1
  248. package/dist/src/activity/emitter.js +1 -1
  249. package/dist/src/agent/agent-manager.d.ts +2 -2
  250. package/dist/src/agent/agent-manager.js +26 -23
  251. package/dist/src/agent/agent-scope.js +2 -2
  252. package/dist/src/agent/background-review/prompts.js +1 -1
  253. package/dist/src/agent/background-review/run-background-review.js +12 -12
  254. package/dist/src/agent/child-agent-factory.js +4 -4
  255. package/dist/src/agent/coding/repository-instructions.js +1 -1
  256. package/dist/src/agent/coding/workspace-revision.js +1 -1
  257. package/dist/src/agent/commands/command-isolation.js +1 -1
  258. package/dist/src/agent/commands/command-registry.js +1 -1
  259. package/dist/src/agent/context/coordinator.js +3 -3
  260. package/dist/src/agent/context/deep-recall.js +5 -5
  261. package/dist/src/agent/context/execution-context.js +1 -1
  262. package/dist/src/agent/context/project-context.js +4 -4
  263. package/dist/src/agent/context/workspace-seed.js +1 -1
  264. package/dist/src/agent/data-acquisition/git.js +1 -1
  265. package/dist/src/agent/data-acquisition/service.js +2 -2
  266. package/dist/src/agent/embedded/codemode-extension.js +1 -1
  267. package/dist/src/agent/embedded/codemode-output.js +2 -2
  268. package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
  269. package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
  270. package/dist/src/agent/embedded/index.js +1 -1
  271. package/dist/src/agent/embedded/model-runtime.js +1 -1
  272. package/dist/src/agent/embedded/run-for-session.js +14 -14
  273. package/dist/src/agent/embedded/run-turn.js +100 -35
  274. package/dist/src/agent/embedded/session-runner.js +7 -6
  275. package/dist/src/agent/embedded/types.d.ts +1 -1
  276. package/dist/src/agent/embedded/xopc-stream-bridge.js +3 -3
  277. package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
  278. package/dist/src/agent/external-tools/cliProvider.js +5 -5
  279. package/dist/src/agent/external-tools/composio-provider.js +3 -3
  280. package/dist/src/agent/external-tools/endpoint-provider.js +9 -9
  281. package/dist/src/agent/external-tools/extension-provider.js +1 -1
  282. package/dist/src/agent/external-tools/gateway-tools.js +3 -3
  283. package/dist/src/agent/external-tools/index.js +1 -1
  284. package/dist/src/agent/external-tools/memory-provider.js +1 -1
  285. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  286. package/dist/src/agent/image/generation/providers/xopc-cloud.js +2 -2
  287. package/dist/src/agent/image/generation/runtime.js +1 -1
  288. package/dist/src/agent/image/index.js +1 -1
  289. package/dist/src/agent/image/load-image-media.js +2 -2
  290. package/dist/src/agent/image/tool-model-config.js +1 -1
  291. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  292. package/dist/src/agent/inbound/inbound-loop.js +9 -4
  293. package/dist/src/agent/independent-execution.js +3 -3
  294. package/dist/src/agent/index.js +1 -1
  295. package/dist/src/agent/mcp/connection-drafts.js +2 -2
  296. package/dist/src/agent/mcp/connection-setup.js +1 -1
  297. package/dist/src/agent/mcp/conversation-setup.js +1 -1
  298. package/dist/src/agent/mcp/discovery.js +2 -2
  299. package/dist/src/agent/mcp/managed-discovery.js +1 -1
  300. package/dist/src/agent/mcp/tool-catalog.js +1 -1
  301. package/dist/src/agent/mcp/weixin-setup-scope.js +2 -2
  302. package/dist/src/agent/memory/index.js +1 -1
  303. package/dist/src/agent/messaging/command-handler.js +1 -1
  304. package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
  305. package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
  306. package/dist/src/agent/orchestration/child-run-resume.js +3 -3
  307. package/dist/src/agent/orchestration/llm-turn-retry.js +1 -1
  308. package/dist/src/agent/prompt/response-language.js +1 -1
  309. package/dist/src/agent/prompt/sections/tooling.d.ts +1 -0
  310. package/dist/src/agent/prompt/sections/tooling.js +7 -2
  311. package/dist/src/agent/prompt/service-prompt-builder.js +3 -3
  312. package/dist/src/agent/prompt/system-prompt.js +1 -0
  313. package/dist/src/agent/sandbox/exec-policy.js +2 -2
  314. package/dist/src/agent/sandbox/native-command.js +1 -1
  315. package/dist/src/agent/sandbox/path-policy.js +1 -1
  316. package/dist/src/agent/service/direct-turn-helpers.js +3 -3
  317. package/dist/src/agent/service/process-direct-streaming.js +7 -7
  318. package/dist/src/agent/service/webchat-tts.js +3 -3
  319. package/dist/src/agent/service.js +23 -21
  320. package/dist/src/agent/session/session-config-service.js +2 -2
  321. package/dist/src/agent/session/session-hydrator.js +1 -1
  322. package/dist/src/agent/session/session-inspector.js +1 -1
  323. package/dist/src/agent/skills/hub-hash.js +1 -1
  324. package/dist/src/agent/skills/hub-lock.js +1 -1
  325. package/dist/src/agent/skills/hub-pull.js +3 -3
  326. package/dist/src/agent/skills/index.js +1 -1
  327. package/dist/src/agent/skills/managed-store.js +1 -1
  328. package/dist/src/agent/skills/skill-manage-ops.js +1 -1
  329. package/dist/src/agent/skills/skill-manager.js +1 -1
  330. package/dist/src/agent/skills/skill-sources.js +2 -2
  331. package/dist/src/agent/tasks/task-judge-service.js +7 -7
  332. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +71 -17
  333. package/dist/src/agent/tools/browser/tool/schemas.d.ts +3 -1
  334. package/dist/src/agent/tools/browser/tool/schemas.js +12 -1
  335. package/dist/src/agent/tools/communication.d.ts +1 -0
  336. package/dist/src/agent/tools/communication.js +10 -3
  337. package/dist/src/agent/tools/create-share-tool.js +1 -1
  338. package/dist/src/agent/tools/delegate-tool.js +4 -4
  339. package/dist/src/agent/tools/exec-command.js +1 -1
  340. package/dist/src/agent/tools/factory.js +38 -21
  341. package/dist/src/agent/tools/image-generate-tool.d.ts +7 -0
  342. package/dist/src/agent/tools/image-generate-tool.js +23 -3
  343. package/dist/src/agent/tools/index.js +4 -4
  344. package/dist/src/agent/tools/knowledge-memory-tool.js +1 -1
  345. package/dist/src/agent/tools/managed-job-tool.js +1 -1
  346. package/dist/src/agent/tools/personal-attention-tool.js +1 -1
  347. package/dist/src/agent/tools/personal-memory-tool.js +4 -4
  348. package/dist/src/agent/tools/personal-read-tool.js +1 -1
  349. package/dist/src/agent/tools/personal-request-result-tool.js +2 -2
  350. package/dist/src/agent/tools/personal-request-tool.js +2 -2
  351. package/dist/src/agent/tools/personal-result-tool.js +1 -1
  352. package/dist/src/agent/tools/personal-task-tool.js +84 -21
  353. package/dist/src/agent/tools/publish-artifacts.js +1 -1
  354. package/dist/src/agent/tools/read.js +1 -1
  355. package/dist/src/agent/tools/review-workspace.js +2 -2
  356. package/dist/src/agent/tools/scoped-workspace-tools.js +1 -1
  357. package/dist/src/agent/tools/send-media.d.ts +1 -0
  358. package/dist/src/agent/tools/send-media.js +7 -4
  359. package/dist/src/agent/tools/session-recall-tool.js +10 -2
  360. package/dist/src/agent/tools/session-search-tool.js +2 -2
  361. package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
  362. package/dist/src/agent/tools/task-result-tool.js +10 -9
  363. package/dist/src/agent/tools/tool-media.d.ts +1 -0
  364. package/dist/src/agent/tools/tool-media.js +14 -1
  365. package/dist/src/agent/tools/tts-tool.js +1 -1
  366. package/dist/src/agent/tools/user-context-tool.js +1 -1
  367. package/dist/src/agent/tools/web-extract.js +1 -1
  368. package/dist/src/agent/tools/web.js +6 -4
  369. package/dist/src/agent/tools/workbook-tools.js +1 -1
  370. package/dist/src/agent/tools/write.js +1 -1
  371. package/dist/src/agent/tools/xopc-use-tool.js +11 -11
  372. package/dist/src/agent-catalog/capabilities.js +1 -1
  373. package/dist/src/agent-catalog/repository.js +1 -1
  374. package/dist/src/ai-assist/text-assist.js +1 -1
  375. package/dist/src/auth/credentials.js +1 -1
  376. package/dist/src/auth/oauth/openai.js +1 -1
  377. package/dist/src/auth/oauth/xopc-cloud.js +1 -1
  378. package/dist/src/auth/oauth-provider-lock.js +1 -1
  379. package/dist/src/auth/profiles/store.js +1 -1
  380. package/dist/src/auth/sync-provider-auth.js +1 -1
  381. package/dist/src/automations/capabilities/write.js +1 -1
  382. package/dist/src/automations/delivery/delivery-router.js +1 -1
  383. package/dist/src/automations/domain/index.js +1 -1
  384. package/dist/src/automations/draft/automation-draft-service.js +1 -1
  385. package/dist/src/automations/index.js +2 -2
  386. package/dist/src/automations/service/action-executor.js +1 -1
  387. package/dist/src/automations/service/automation-service.js +3 -3
  388. package/dist/src/backup/archive.js +4 -4
  389. package/dist/src/bootstrap/application-state.js +1 -1
  390. package/dist/src/browser/assistance.d.ts +34 -0
  391. package/dist/src/browser/assistance.js +243 -0
  392. package/dist/src/browser/cache-dir-policy.js +1 -1
  393. package/dist/src/browser/drivers/browser-driver.d.ts +45 -0
  394. package/dist/src/browser/drivers/extension-driver.d.ts +2 -0
  395. package/dist/src/browser/drivers/extension-driver.js +11 -1
  396. package/dist/src/browser/drivers/playwright-driver.d.ts +2 -1
  397. package/dist/src/browser/drivers/playwright-driver.js +161 -0
  398. package/dist/src/browser/managed-live-runtime.d.ts +79 -0
  399. package/dist/src/browser/managed-live-runtime.js +313 -0
  400. package/dist/src/browser/native-messaging-host.js +2 -2
  401. package/dist/src/browser/providers/browser-ext-install.js +4 -4
  402. package/dist/src/browser/runtime/browser-runtime.d.ts +24 -1
  403. package/dist/src/browser/runtime/browser-runtime.js +68 -5
  404. package/dist/src/capabilities/capability-catalog.js +3 -3
  405. package/dist/src/capabilities/readiness/from-config.js +2 -2
  406. package/dist/src/capabilities/runtime/dispatcher.js +1 -1
  407. package/dist/src/channels/channel-domain.d.ts +1 -0
  408. package/dist/src/channels/enterprise/media.d.ts +14 -0
  409. package/dist/src/channels/enterprise/media.js +208 -0
  410. package/dist/src/channels/enterprise/plugin.d.ts +4 -0
  411. package/dist/src/channels/enterprise/plugin.js +40 -12
  412. package/dist/src/channels/format.js +1 -1
  413. package/dist/src/channels/index.js +2 -2
  414. package/dist/src/channels/internal-outbound.d.ts +2 -0
  415. package/dist/src/channels/internal-outbound.js +17 -1
  416. package/dist/src/channels/lifecycle-supervisor.js +1 -1
  417. package/dist/src/channels/outbound-sender.js +1 -1
  418. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  419. package/dist/src/channels/pairing/pairing-service.js +1 -1
  420. package/dist/src/channels/pairing/pairing-store.js +6 -6
  421. package/dist/src/chat-commands/agent-edit.js +1 -1
  422. package/dist/src/chat-commands/builtins/config.js +4 -4
  423. package/dist/src/chat-commands/builtins/review.js +1 -1
  424. package/dist/src/chat-commands/builtins/tts.js +1 -1
  425. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  426. package/dist/src/chat-commands/context.js +2 -2
  427. package/dist/src/chat-commands/index.js +2 -2
  428. package/dist/src/cli/commands/agent.js +7 -7
  429. package/dist/src/cli/commands/browser-cli-helpers.js +1 -1
  430. package/dist/src/cli/commands/config.js +1 -1
  431. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  432. package/dist/src/cli/commands/doctor/checks/image-providers.js +1 -1
  433. package/dist/src/cli/commands/doctor/checks/provider-auth.js +2 -2
  434. package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
  435. package/dist/src/cli/commands/extension-agent-plugin.js +3 -3
  436. package/dist/src/cli/commands/extension-dev.js +1 -1
  437. package/dist/src/cli/commands/extension-marketplace.js +3 -3
  438. package/dist/src/cli/commands/extension-pack.js +1 -1
  439. package/dist/src/cli/commands/extension.js +2 -2
  440. package/dist/src/cli/commands/image.js +1 -1
  441. package/dist/src/cli/commands/init.js +1 -1
  442. package/dist/src/cli/commands/mcp.js +2 -2
  443. package/dist/src/cli/commands/models.js +5 -5
  444. package/dist/src/cli/commands/onboard/model.js +2 -2
  445. package/dist/src/cli/commands/onboard.js +1 -1
  446. package/dist/src/cli/commands/project.js +2 -2
  447. package/dist/src/cli/commands/runtime.js +1 -1
  448. package/dist/src/cli/commands/skills.js +2 -2
  449. package/dist/src/cli/commands/tunnel.js +3 -3
  450. package/dist/src/cli/extension-cli-register.js +5 -5
  451. package/dist/src/cli/utils/gateway-client.js +1 -1
  452. package/dist/src/cli/utils/init-workspace-core.js +3 -3
  453. package/dist/src/computer/broker.js +1 -1
  454. package/dist/src/computer/model-adapter.js +1 -1
  455. package/dist/src/computer/runtime.js +12 -12
  456. package/dist/src/config/config-file.js +1 -1
  457. package/dist/src/config/index.js +6 -6
  458. package/dist/src/config/loader.js +2 -2
  459. package/dist/src/config/models-json.js +1 -1
  460. package/dist/src/config/paths-state.js +1 -1
  461. package/dist/src/config/schema.js +2 -2
  462. package/dist/src/config/workspace-path.js +1 -1
  463. package/dist/src/connectors/cli/authorization.js +1 -1
  464. package/dist/src/connectors/cli/installer.js +1 -1
  465. package/dist/src/connectors/connected-source-ingestion.js +2 -2
  466. package/dist/src/connectors/connected-source-understanding.js +4 -4
  467. package/dist/src/connectors/connection-recovery-service.js +4 -4
  468. package/dist/src/connectors/content-enrichment.js +2 -2
  469. package/dist/src/connectors/health.js +1 -1
  470. package/dist/src/daemon/constants.js +1 -1
  471. package/dist/src/daemon/install-plan.js +1 -1
  472. package/dist/src/daemon/launchd.js +1 -1
  473. package/dist/src/daemon/schtasks.js +1 -1
  474. package/dist/src/daemon/systemd.js +1 -1
  475. package/dist/src/discussions/action-tasks.js +1 -1
  476. package/dist/src/discussions/live-worker.js +1 -1
  477. package/dist/src/discussions/recording.js +2 -2
  478. package/dist/src/discussions/repository.js +1 -1
  479. package/dist/src/discussions/sealer.js +2 -2
  480. package/dist/src/discussions/service.js +1 -1
  481. package/dist/src/endpoint-tools/delegation.js +1 -1
  482. package/dist/src/endpoint-tools/invocation-service.js +2 -2
  483. package/dist/src/endpoint-tools/target-resolver.js +1 -1
  484. package/dist/src/endpoint-tools/upload-service.js +1 -1
  485. package/dist/src/execution-environments/local-worktree-manager.js +1 -1
  486. package/dist/src/execution-environments/session-environment-service.js +1 -1
  487. package/dist/src/execution-environments/worktree-safety.js +1 -1
  488. package/dist/src/extensions/activation-context.js +4 -4
  489. package/dist/src/extensions/agent-plugins/auth.js +2 -2
  490. package/dist/src/extensions/agent-plugins/branding.js +1 -1
  491. package/dist/src/extensions/agent-plugins/cli-authorization.js +2 -2
  492. package/dist/src/extensions/agent-plugins/mcp-adapter.js +2 -2
  493. package/dist/src/extensions/agent-plugins/resources.js +1 -1
  494. package/dist/src/extensions/agent-plugins/setup.js +2 -2
  495. package/dist/src/extensions/agent-plugins/skill-catalog.js +2 -2
  496. package/dist/src/extensions/agent-plugins/source-catalog.js +2 -2
  497. package/dist/src/extensions/agent-plugins/sources.js +1 -1
  498. package/dist/src/extensions/agent-plugins/store.js +2 -2
  499. package/dist/src/extensions/agent-plugins/user-config.js +1 -1
  500. package/dist/src/extensions/agent-plugins/validation.js +2 -2
  501. package/dist/src/extensions/api.js +2 -2
  502. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  503. package/dist/src/extensions/index.js +1 -1
  504. package/dist/src/extensions/loader.js +3 -3
  505. package/dist/src/extensions/lockfile.js +1 -1
  506. package/dist/src/extensions/sdk/index.js +1 -1
  507. package/dist/src/extensions/sdk/media.js +1 -1
  508. package/dist/src/extensions/update.js +2 -2
  509. package/dist/src/files/file-service.js +1 -1
  510. package/dist/src/files/workspace-file-spaces.js +1 -1
  511. package/dist/src/gateway/agent-reactions/reaction.js +2 -2
  512. package/dist/src/gateway/agents-admin.js +1 -1
  513. package/dist/src/gateway/device-routes.js +1 -1
  514. package/dist/src/gateway/file-path-classifier.js +2 -2
  515. package/dist/src/gateway/global-defaults-admin.js +1 -1
  516. package/dist/src/gateway/hono/app.js +2 -2
  517. package/dist/src/gateway/hono/lib/config-payload.js +5 -5
  518. package/dist/src/gateway/hono/lib/static-ui.js +1 -1
  519. package/dist/src/gateway/hono/oauth-async.js +1 -1
  520. package/dist/src/gateway/hono/routes/agent-plugins.js +2 -2
  521. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +7 -7
  522. package/dist/src/gateway/hono/routes/browser.js +297 -1
  523. package/dist/src/gateway/hono/routes/channels.js +1 -1
  524. package/dist/src/gateway/hono/routes/commands-skills.js +5 -5
  525. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  526. package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
  527. package/dist/src/gateway/hono/routes/connectors.js +1 -1
  528. package/dist/src/gateway/hono/routes/device-connections.js +3 -3
  529. package/dist/src/gateway/hono/routes/device-push.js +7 -2
  530. package/dist/src/gateway/hono/routes/device-targets.js +1 -1
  531. package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
  532. package/dist/src/gateway/hono/routes/execution-environments.js +4 -0
  533. package/dist/src/gateway/hono/routes/files.js +1 -1
  534. package/dist/src/gateway/hono/routes/home.js +1 -1
  535. package/dist/src/gateway/hono/routes/host-fs.js +1 -1
  536. package/dist/src/gateway/hono/routes/local-app-capabilities.js +1 -1
  537. package/dist/src/gateway/hono/routes/local-apps.js +1 -1
  538. package/dist/src/gateway/hono/routes/location-sharing.js +1 -1
  539. package/dist/src/gateway/hono/routes/mcp.js +1 -1
  540. package/dist/src/gateway/hono/routes/memory-learning.js +2 -2
  541. package/dist/src/gateway/hono/routes/mobile-capability-actions.js +5 -5
  542. package/dist/src/gateway/hono/routes/mobile-capability-panels.js +13 -13
  543. package/dist/src/gateway/hono/routes/mobile-model-settings.js +16 -8
  544. package/dist/src/gateway/hono/routes/models.js +10 -10
  545. package/dist/src/gateway/hono/routes/music-generation.js +1 -1
  546. package/dist/src/gateway/hono/routes/notes.js +3 -3
  547. package/dist/src/gateway/hono/routes/notifications.js +11 -7
  548. package/dist/src/gateway/hono/routes/observability.js +1 -1
  549. package/dist/src/gateway/hono/routes/personal-agent.js +2 -2
  550. package/dist/src/gateway/hono/routes/phone-setup.js +4 -4
  551. package/dist/src/gateway/hono/routes/phone.js +2 -2
  552. package/dist/src/gateway/hono/routes/projects.js +7 -8
  553. package/dist/src/gateway/hono/routes/session-command-handler.js +3 -2
  554. package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -0
  555. package/dist/src/gateway/hono/routes/session-input-handler.js +3 -3
  556. package/dist/src/gateway/hono/routes/sessions.js +3 -3
  557. package/dist/src/gateway/hono/routes/shares.js +3 -3
  558. package/dist/src/gateway/hono/routes/side-chats.js +1 -1
  559. package/dist/src/gateway/hono/routes/status.js +1 -1
  560. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  561. package/dist/src/gateway/hono/routes/tui.js +1 -1
  562. package/dist/src/gateway/hono/routes/user-model.js +6 -6
  563. package/dist/src/gateway/hono/routes/video-generation.js +2 -2
  564. package/dist/src/gateway/hono/routes/voice.js +8 -8
  565. package/dist/src/gateway/image-generation-setup.js +2 -2
  566. package/dist/src/gateway/lock.js +11 -11
  567. package/dist/src/gateway/media-access.js +2 -2
  568. package/dist/src/gateway/mobile-privacy.js +2 -2
  569. package/dist/src/gateway/next-turn-suggestions/snapshot.js +1 -1
  570. package/dist/src/gateway/ports.js +7 -7
  571. package/dist/src/gateway/provider-model-setup.js +2 -2
  572. package/dist/src/gateway/security/device-request-proof.js +1 -1
  573. package/dist/src/gateway/security/gateway-scopes.js +4 -0
  574. package/dist/src/gateway/server.js +1 -1
  575. package/dist/src/gateway/service/agent-runner.js +3 -3
  576. package/dist/src/gateway/service/config-coordinator.js +4 -4
  577. package/dist/src/gateway/service/marketplace-service.js +2 -2
  578. package/dist/src/gateway/service/run-gateway-agent.js +9 -7
  579. package/dist/src/gateway/service/session-command-service.js +6 -4
  580. package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
  581. package/dist/src/gateway/service/session-input-coordinator.js +14 -4
  582. package/dist/src/gateway/service/session-preparation-worker.js +6 -2
  583. package/dist/src/gateway/service/sessions-api.js +1 -1
  584. package/dist/src/gateway/service.d.ts +6 -0
  585. package/dist/src/gateway/service.js +86 -47
  586. package/dist/src/gateway/session-context-summary.js +1 -1
  587. package/dist/src/gateway/workspace-editor-path.js +2 -2
  588. package/dist/src/gateway/xopc-cloud-capability-setup.js +4 -4
  589. package/dist/src/home-intelligence/follow-ups.js +2 -2
  590. package/dist/src/home-intelligence/generator.js +2 -2
  591. package/dist/src/home-intelligence/host.js +1 -1
  592. package/dist/src/home-intelligence/observation.js +1 -1
  593. package/dist/src/home-intelligence/repository.js +1 -1
  594. package/dist/src/home-intelligence/routines.js +3 -3
  595. package/dist/src/imports/files.js +1 -1
  596. package/dist/src/imports/importService.js +1 -1
  597. package/dist/src/imports/inventory.js +3 -3
  598. package/dist/src/imports/planner.js +1 -1
  599. package/dist/src/imports/scanner.js +1 -1
  600. package/dist/src/imports/sources.js +1 -1
  601. package/dist/src/infra/brew.js +1 -1
  602. package/dist/src/infra/gateway-processes.js +2 -2
  603. package/dist/src/infra/package-runtime-check.js +1 -1
  604. package/dist/src/infra/path-env.js +4 -4
  605. package/dist/src/infra/ports.js +1 -1
  606. package/dist/src/infra/process-diagnostics.js +1 -1
  607. package/dist/src/infra/ssh-tunnel.js +1 -1
  608. package/dist/src/infra/update-global.js +9 -9
  609. package/dist/src/infra/update-startup.js +1 -1
  610. package/dist/src/infra/write-file-atomic.js +1 -1
  611. package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
  612. package/dist/src/knowledge/index.js +1 -1
  613. package/dist/src/local-apps/artifact-files.js +1 -1
  614. package/dist/src/local-apps/capabilities/delegate.js +1 -1
  615. package/dist/src/local-apps/execution-authority.js +2 -2
  616. package/dist/src/local-apps/p1-services.js +3 -3
  617. package/dist/src/local-apps/preview-sessions.js +1 -1
  618. package/dist/src/local-apps/preview-worker.js +1 -1
  619. package/dist/src/local-apps/public-assets.js +1 -1
  620. package/dist/src/local-apps/service.js +4 -4
  621. package/dist/src/local-apps/store.js +1 -1
  622. package/dist/src/markdown/index.js +1 -1
  623. package/dist/src/mcp/connection-grants.js +1 -1
  624. package/dist/src/mcp/delegation.js +5 -5
  625. package/dist/src/mcp/run-callback-subscriptions.d.ts +13 -0
  626. package/dist/src/mcp/run-callback-subscriptions.js +17 -0
  627. package/dist/src/mcp/run-callbacks.d.ts +1 -4
  628. package/dist/src/mcp/run-callbacks.js +9 -22
  629. package/dist/src/media/session-references.js +1 -1
  630. package/dist/src/media-shared/http/provider-http.js +1 -1
  631. package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
  632. package/dist/src/media-understanding/runner.js +1 -1
  633. package/dist/src/memory-learning/choice-observations.js +6 -6
  634. package/dist/src/memory-learning/source-learning.js +4 -4
  635. package/dist/src/memory-learning/task-receipts.js +1 -1
  636. package/dist/src/memory-learning/work-capture.js +1 -1
  637. package/dist/src/memory-learning/work-review.js +3 -3
  638. package/dist/src/music-generation/artifact.js +3 -3
  639. package/dist/src/music-generation/worker.js +1 -1
  640. package/dist/src/notes/agent-context.js +3 -3
  641. package/dist/src/notes/service.js +2 -2
  642. package/dist/src/notes/store.js +1 -1
  643. package/dist/src/notifications/device-store.js +1 -1
  644. package/dist/src/notifications/platform-push.d.ts +2 -1
  645. package/dist/src/notifications/platform-push.js +4 -3
  646. package/dist/src/notifications/service.js +4 -4
  647. package/dist/src/notifications/store.js +1 -1
  648. package/dist/src/observability/runtime.js +1 -1
  649. package/dist/src/personal-agent/capability-service.js +1 -1
  650. package/dist/src/personal-agent/proactivity/repository.js +1 -1
  651. package/dist/src/personal-agent/proactivity/service.js +6 -6
  652. package/dist/src/personal-agent/prompt-context.js +4 -4
  653. package/dist/src/personal-agent/prompts.js +1 -1
  654. package/dist/src/personal-agent/reply-composer.js +12 -12
  655. package/dist/src/personal-agent/reply-style.d.ts +2 -2
  656. package/dist/src/personal-agent/reply-style.js +8 -7
  657. package/dist/src/personal-agent/request-delivery.js +2 -2
  658. package/dist/src/personal-agent/request-service.js +5 -5
  659. package/dist/src/personal-agent/result-reader.d.ts +2 -0
  660. package/dist/src/personal-agent/result-reader.js +16 -5
  661. package/dist/src/personal-agent/service.js +3 -3
  662. package/dist/src/personal-agent/specialist-capabilities.js +3 -2
  663. package/dist/src/personal-agent/task-cancel.js +1 -1
  664. package/dist/src/personal-agent/unread.js +1 -1
  665. package/dist/src/phone/adb-driver.js +3 -3
  666. package/dist/src/phone/cloud-adb-connection.js +2 -2
  667. package/dist/src/phone/execution-trace.js +1 -1
  668. package/dist/src/phone/hdc-driver.js +2 -2
  669. package/dist/src/phone/hdc-video-tools.js +1 -1
  670. package/dist/src/phone/model-adapter.js +2 -2
  671. package/dist/src/phone/runtime.js +4 -4
  672. package/dist/src/phone/ui-session.js +1 -1
  673. package/dist/src/platform/index.js +1 -1
  674. package/dist/src/project-trust/trust-store.js +1 -1
  675. package/dist/src/projects/index.js +4 -4
  676. package/dist/src/projects/project-kind.d.ts +0 -7
  677. package/dist/src/projects/project-kind.js +1 -6
  678. package/dist/src/projects/project-service.js +3 -11
  679. package/dist/src/projects/workspace-project.js +1 -1
  680. package/dist/src/projects/workspace.js +1 -1
  681. package/dist/src/providers/extension-stream-bridge.js +2 -2
  682. package/dist/src/providers/index.js +4 -4
  683. package/dist/src/providers/model-call.js +3 -3
  684. package/dist/src/providers/model-catalog-persistence.js +1 -1
  685. package/dist/src/providers/model-reference-auditor.js +1 -1
  686. package/dist/src/providers/model-registry.js +3 -3
  687. package/dist/src/providers/provider-disconnect-core.js +1 -1
  688. package/dist/src/providers/register-runtime-providers.js +1 -1
  689. package/dist/src/providers/setup/voice.js +1 -1
  690. package/dist/src/providers/xopc-cloud-catalog-coordinator.js +1 -1
  691. package/dist/src/providers/xopc-cloud-credit-budget.js +1 -1
  692. package/dist/src/providers/xopc-cloud-model-source.js +1 -1
  693. package/dist/src/realtime/browser-preview-ice.d.ts +2 -0
  694. package/dist/src/realtime/browser-preview-ice.js +42 -0
  695. package/dist/src/realtime/browser-preview.d.ts +45 -0
  696. package/dist/src/realtime/browser-preview.js +191 -0
  697. package/dist/src/realtime/runtime.d.ts +4 -1
  698. package/dist/src/realtime/runtime.js +53 -2
  699. package/dist/src/remote-access/exposure-manager.js +1 -1
  700. package/dist/src/review/review-git.js +1 -1
  701. package/dist/src/runtime-tools/downloader.js +1 -1
  702. package/dist/src/runtime-tools/harmony-dependencies.js +1 -1
  703. package/dist/src/runtime-tools/manager.js +2 -2
  704. package/dist/src/runtime-tools/phone-dependencies.js +1 -1
  705. package/dist/src/session/history-recall-policy.js +1 -1
  706. package/dist/src/session/index.js +2 -2
  707. package/dist/src/session/init-session-turn.js +1 -1
  708. package/dist/src/session/resolve-session.js +1 -1
  709. package/dist/src/session/session-title.js +1 -1
  710. package/dist/src/session/store.js +8 -8
  711. package/dist/src/session/thinking-resolve.js +1 -1
  712. package/dist/src/share/hosted-note-publication.js +1 -1
  713. package/dist/src/share/hosted-session-share.js +1 -1
  714. package/dist/src/share/hosted-static-site-publication.js +1 -1
  715. package/dist/src/share/session-share-service.js +1 -1
  716. package/dist/src/share/share-auto.js +1 -1
  717. package/dist/src/share/share-thumbnail.js +1 -1
  718. package/dist/src/share/share-zip.js +1 -1
  719. package/dist/src/share/site-proxy.js +2 -2
  720. package/dist/src/space/budget-workbook.js +1 -1
  721. package/dist/src/space/ingest.js +1 -1
  722. package/dist/src/space/repository.js +3 -3
  723. package/dist/src/space/workbook-turn.js +1 -1
  724. package/dist/src/space/worker.js +1 -1
  725. package/dist/src/storage/sqlite/ai-usage-repository.js +1 -1
  726. package/dist/src/storage/sqlite/clarification-wait-repository.js +2 -2
  727. package/dist/src/storage/sqlite/connection.js +11 -11
  728. package/dist/src/storage/sqlite/conversation-repository.js +2 -2
  729. package/dist/src/storage/sqlite/desktop-execution-repository.js +1 -1
  730. package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +1 -1
  731. package/dist/src/storage/sqlite/device-access-repository.js +1 -1
  732. package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
  733. package/dist/src/storage/sqlite/index.js +1 -1
  734. package/dist/src/storage/sqlite/schema-upgrade.js +3 -3
  735. package/dist/src/storage/sqlite/session-creation-repository.d.ts +2 -0
  736. package/dist/src/storage/sqlite/session-creation-repository.js +25 -6
  737. package/dist/src/storage/sqlite/session-input-control-repository.js +1 -1
  738. package/dist/src/storage/sqlite/session-input-repository.js +2 -1
  739. package/dist/src/storage/sqlite/session-repository.js +1 -1
  740. package/dist/src/support/collect-support-report.js +1 -1
  741. package/dist/src/tasks/capabilities/management.js +1 -1
  742. package/dist/src/tasks/capabilities/read.js +2 -2
  743. package/dist/src/tasks/capabilities/relations.js +2 -2
  744. package/dist/src/tasks/capabilities/runs.js +1 -1
  745. package/dist/src/tasks/capabilities/write.js +3 -3
  746. package/dist/src/tasks/delegated-run-result.js +1 -1
  747. package/dist/src/tasks/home-query-service.js +1 -1
  748. package/dist/src/tasks/index.js +4 -4
  749. package/dist/src/tasks/task-allocation-service.js +8 -8
  750. package/dist/src/tasks/task-application-service.d.ts +1 -0
  751. package/dist/src/tasks/task-application-service.js +18 -7
  752. package/dist/src/tasks/task-context-assembler.js +4 -3
  753. package/dist/src/tasks/task-contract-planner.js +3 -2
  754. package/dist/src/tasks/task-criterion-review-repository.js +1 -1
  755. package/dist/src/tasks/task-deliverables.js +1 -1
  756. package/dist/src/tasks/task-execution-capabilities.js +1 -1
  757. package/dist/src/tasks/task-handoff-service.js +2 -2
  758. package/dist/src/tasks/task-handoff.d.ts +4 -0
  759. package/dist/src/tasks/task-handoff.js +58 -17
  760. package/dist/src/tasks/task-json-acceptance.js +2 -2
  761. package/dist/src/tasks/task-main-update-decision-service.js +4 -3
  762. package/dist/src/tasks/task-main-update-delivery.js +5 -3
  763. package/dist/src/tasks/task-model-call.js +1 -1
  764. package/dist/src/tasks/task-origin-repository.d.ts +2 -0
  765. package/dist/src/tasks/task-origin-repository.js +17 -0
  766. package/dist/src/tasks/task-read-model-projector.js +1 -1
  767. package/dist/src/tasks/task-research-repair.js +4 -2
  768. package/dist/src/tasks/task-research-result.d.ts +7 -0
  769. package/dist/src/tasks/task-research-result.js +137 -35
  770. package/dist/src/tasks/task-result-delivery-repository.js +1 -1
  771. package/dist/src/tasks/task-result-delivery-service.js +4 -4
  772. package/dist/src/tasks/task-retry-service.js +1 -1
  773. package/dist/src/tasks/task-run-coordinator.js +7 -7
  774. package/dist/src/tasks/task-run-dispatcher.js +2 -2
  775. package/dist/src/tasks/task-run-repository.js +1 -1
  776. package/dist/src/tasks/task-signal-service.js +1 -1
  777. package/dist/src/tasks/task-workspace-verification.js +2 -2
  778. package/dist/src/tui/backend-services.js +1 -1
  779. package/dist/src/tui/backends/embedded-backend.js +16 -16
  780. package/dist/src/tui/backends/embedded-drafts.js +1 -1
  781. package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
  782. package/dist/src/tui/clipboard-image.js +2 -2
  783. package/dist/src/tui/extension-host/load-extensions.js +2 -2
  784. package/dist/src/tui/tui-capabilities.js +2 -2
  785. package/dist/src/tui/tui-commands.js +4 -4
  786. package/dist/src/tui/tui-management.js +8 -8
  787. package/dist/src/tui/tui-picker-overlay.js +1 -1
  788. package/dist/src/tui/tui-skills-autocomplete.js +2 -2
  789. package/dist/src/tui/tui-startup-resources.js +3 -3
  790. package/dist/src/tui/tui.js +9 -9
  791. package/dist/src/tunnel/frpc-binary.js +2 -2
  792. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  793. package/dist/src/usage/cloud-capability.js +1 -1
  794. package/dist/src/usage/recorder.js +2 -2
  795. package/dist/src/user-model/capture/executor.js +1 -1
  796. package/dist/src/user-model/index.js +2 -2
  797. package/dist/src/utils/index.js +1 -1
  798. package/dist/src/utils/logger/index.js +2 -2
  799. package/dist/src/utils/logger.js +1 -1
  800. package/dist/src/video-generation/artifact.js +3 -3
  801. package/dist/src/video-generation/repository.js +1 -1
  802. package/dist/src/video-generation/worker.js +1 -1
  803. package/dist/src/voice/audio/normalize.js +1 -1
  804. package/dist/src/voice/platform-settings.js +1 -1
  805. package/dist/src/voice/realtime/conversation-context.js +1 -1
  806. package/dist/src/voice/realtime/memory-context.js +3 -3
  807. package/dist/src/voice/realtime/omniRoute.js +1 -1
  808. package/dist/src/voice/realtime/runtime.js +5 -5
  809. package/dist/src/voice/stt/factory.js +1 -1
  810. package/dist/src/voice/stt/index.js +1 -1
  811. package/dist/src/voice/stt/preflight.js +1 -1
  812. package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
  813. package/dist/src/voice/stt/providers/bailian-plan-transcription.js +3 -3
  814. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +3 -3
  815. package/dist/src/voice/tts/factory.js +1 -1
  816. package/dist/src/voice/tts/index.js +3 -3
  817. package/dist/src/voice/tts/merge-config.js +1 -1
  818. package/dist/src/voice/tts/payload.js +1 -1
  819. package/dist/src/voice/tts/providers/bailian-plan-speech.js +3 -3
  820. package/dist/src/voice/tts/providers/edge-speech.js +1 -1
  821. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +3 -3
  822. package/dist/src/voice/tts/speak-core.js +2 -2
  823. package/dist/src/work-discovery/candidate-discovery.js +2 -2
  824. package/dist/src/work-discovery/probe.js +2 -2
  825. package/dist/src/work-discovery/service.js +7 -7
  826. package/package.json +1 -1
  827. package/dist/gateway/static/root/assets/gateway-realtime-egUNyhxi.js +0 -1
  828. package/dist/gateway/static/root/assets/gateway-realtime-store-5YcWzAfG.js +0 -1
  829. package/dist/gateway/static/root/assets/index-CaUUC83j.css +0 -1
  830. package/dist/gateway/static/root/assets/index-DwdoCbAF.js +0 -11
  831. package/dist/gateway/static/root/assets/messages-Clfka2Sx.js +0 -3
  832. package/dist/gateway/static/root/assets/note-image-lightbox-BVcE6TAF.js +0 -1
  833. package/dist/gateway/static/root/assets/project-detail-page-BTgDajpj.js +0 -7
  834. package/dist/gateway/static/root/assets/right-workspace-store-B8ooYVOe.js +0 -1
  835. package/dist/gateway/static/root/assets/settings-advanced-gate-CaALReQD.js +0 -1
  836. package/dist/gateway/static/root/assets/space-page-CBSaZbyH.js +0 -2
  837. package/dist/gateway/static/root/assets/turn-outcome-Dtw6OgwL.js +0 -1
  838. package/dist/gateway/static/root/assets/workspace-editor-agent-store-BbfHBVhA.js +0 -1
@@ -1,16 +1,16 @@
1
- import { currentOperationId, init_operation_context } from "../infra/operation-context.js";
2
1
  import { createLogger } from "../utils/logger/index.js";
3
2
  import { init_logger } from "../utils/logger.js";
3
+ import { currentOperationId, init_operation_context } from "../infra/operation-context.js";
4
4
  import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
5
5
  import { buildNoteAttachmentRef } from "./attachment-ref.js";
6
6
  import { parseNoteMarkdown } from "./note-markdown.js";
7
7
  import { listNoteProjectSummaries } from "../storage/sqlite/notes-repository.js";
8
8
  import { changedFieldsFromPatch, emitActivity, previewText, systemActivityActor, systemActivitySource } from "../activity/emitter.js";
9
9
  import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
10
+ import { completeWithResolvedCredentials } from "../providers/model-call.js";
10
11
  import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
11
12
  import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
12
13
  import { NotesStore } from "./store.js";
13
- import { completeWithResolvedCredentials } from "../providers/model-call.js";
14
14
  import { partitionAttachmentsByReference } from "./note-attachment-sync.js";
15
15
  import { buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
16
16
  import { createHash, randomUUID } from "node:crypto";
@@ -10,8 +10,8 @@ import "../storage/sqlite/index.js";
10
10
  import { canRemoveRevokedNoteShareArtifact } from "../share/note-share-revocation.js";
11
11
  import { resolveNoteMediaDir } from "./paths.js";
12
12
  import { basename, join } from "node:path";
13
- import { rmSync } from "node:fs";
14
13
  import { randomUUID } from "node:crypto";
14
+ import { rmSync } from "node:fs";
15
15
  import { copyFile, mkdir, rm, stat, writeFile } from "node:fs/promises";
16
16
  //#region src/notes/store.ts
17
17
  init_transaction();
@@ -74,7 +74,7 @@ function getNotificationDevice(deviceId) {
74
74
  }
75
75
  function listDeliverableNotificationDevices(now = Date.now()) {
76
76
  return getSqliteDatabase().prepare(`SELECT * FROM device_push_endpoints
77
- WHERE enabled = 1 AND permissions = 'granted' AND platform = 'harmonyos' AND lease_expires_at > ?
77
+ WHERE enabled = 1 AND permissions = 'granted' AND lease_expires_at > ?
78
78
  ORDER BY updated_at DESC`).all(now).map(deviceFromRow);
79
79
  }
80
80
  function updateNotificationDevicePreferences(deviceId, patch) {
@@ -1,11 +1,12 @@
1
1
  import type { NotificationTarget } from '@xopcai/gateway-contract';
2
+ import type { NotificationDevicePlatform } from './types.js';
2
3
  export declare class PlatformPushError extends Error {
3
4
  readonly status: number;
4
5
  readonly code: string;
5
6
  constructor(status: number, code: string);
6
7
  }
7
8
  export declare function platformPushEndpoint(value: string): string | undefined;
8
- export declare function registerPlatformPushDevice(gatewayId: string, deviceId: string, pushToken: string): Promise<string>;
9
+ export declare function registerPlatformPushDevice(gatewayId: string, deviceId: string, pushToken: string, platform?: NotificationDevicePlatform, environment?: 'sandbox' | 'production'): Promise<string>;
9
10
  export declare function removePlatformPushDevice(reference: string): Promise<void>;
10
11
  export type PlatformPushDelivery = {
11
12
  endpointId: string;
@@ -35,12 +35,13 @@ async function request(path, method, body, fetchImpl = fetch) {
35
35
  if (response.status === 503 && error?.error?.code === "push_provider_unavailable") throw new PlatformPushError(503, "PUSH_PLATFORM_UNAVAILABLE");
36
36
  throw new PlatformPushError(response.status, "PUSH_PLATFORM_REQUEST_FAILED");
37
37
  }
38
- async function registerPlatformPushDevice(gatewayId, deviceId, pushToken) {
38
+ async function registerPlatformPushDevice(gatewayId, deviceId, pushToken, platform = "harmonyos", environment) {
39
39
  const response = await request("/endpoints", "PUT", {
40
40
  gatewayId,
41
41
  deviceId,
42
- platform: "harmonyos",
43
- pushToken
42
+ platform,
43
+ pushToken,
44
+ environment
44
45
  });
45
46
  const result = endpointResponse.safeParse(await response.json().catch(() => null));
46
47
  if (!result.success) throw new PlatformPushError(502, "PUSH_PLATFORM_INVALID_RESPONSE");
@@ -138,10 +138,6 @@ var NotificationService = class {
138
138
  }
139
139
  const fetchImpl = this.options.fetch ?? fetch;
140
140
  try {
141
- if (delivery.platform !== "harmonyos") {
142
- markNotificationDeliveryDead(delivery.event.id, delivery.deviceId, "Native push provider is not configured");
143
- return;
144
- }
145
141
  const expiresAt = Math.min(delivery.event.createdAt + 1440 * 60 * 1e3, delivery.event.type === "chat.needs_input" && typeof delivery.event.payload.expiresAt === "number" ? delivery.event.payload.expiresAt : Number.POSITIVE_INFINITY);
146
142
  if (expiresAt <= Date.now()) {
147
143
  cancelNotificationDelivery(delivery.event.id, delivery.deviceId);
@@ -149,6 +145,10 @@ var NotificationService = class {
149
145
  }
150
146
  let endpointId = platformPushEndpoint(delivery.pushToken);
151
147
  if (!endpointId && !this.options.sendPush) {
148
+ if (delivery.platform !== "harmonyos") {
149
+ markNotificationDeliveryDead(delivery.event.id, delivery.deviceId, "Cloud push registration required");
150
+ return;
151
+ }
152
152
  const reference = await registerPlatformPushDevice(getOrCreateGatewayIdentity().id, delivery.deviceId, delivery.pushToken);
153
153
  if (!replaceNotificationPushReference(delivery.deviceId, delivery.pushToken, reference)) {
154
154
  if (getNotificationDevice(delivery.deviceId)?.pushToken !== reference) await removePlatformPushDevice(reference);
@@ -1,6 +1,6 @@
1
- import { getSqliteDatabase, init_transaction, runSqliteSavepoint, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
2
1
  import { ProductNotificationSchema } from "../../packages/gateway-contract/src/notifications.js";
3
2
  import { init_src } from "../../packages/gateway-contract/src/index.js";
3
+ import { getSqliteDatabase, init_transaction, runSqliteSavepoint, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
4
  import { randomUUID } from "node:crypto";
5
5
  //#region src/notifications/store.ts
6
6
  init_src();
@@ -1,8 +1,8 @@
1
1
  import { init_context, runWithLogContext } from "../utils/logger/context.js";
2
2
  import { createLogger } from "../utils/logger/index.js";
3
3
  import { init_logger } from "../utils/logger.js";
4
- import { TracingConfigSchema, defaultTracingConfig, init_config } from "./config.js";
5
4
  import { CredentialResolver, init_credentials } from "../auth/credentials.js";
5
+ import { TracingConfigSchema, defaultTracingConfig, init_config } from "./config.js";
6
6
  import { LangfuseTarget } from "./langfuse.js";
7
7
  import { boundedJson, redactString } from "./sanitize.js";
8
8
  import { LocalTraceStore } from "./store.js";
@@ -1,10 +1,10 @@
1
1
  import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
2
2
  import { getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
3
+ import { isPersonalConversation } from "./repository.js";
3
4
  import { assessSpecialist } from "../agent-matching/service.js";
4
5
  import { canAccessConnectorAccount, currentAccountConnections } from "../connectors/account-access.js";
5
6
  import { connectionCandidates, resolveConnectionCandidate } from "../connectors/connection-candidates.js";
6
7
  import { connectorPrincipalForSession } from "../connectors/principal.js";
7
- import { isPersonalConversation } from "./repository.js";
8
8
  //#region src/personal-agent/capability-service.ts
9
9
  init_repository();
10
10
  init_connector_repository();
@@ -1,6 +1,6 @@
1
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
1
  import { PersonalFeedbackSchema, PersonalProactivitySettingsSchema, PersonalStrategyRollbackSchema } from "../../../packages/gateway-contract/src/personal-proactivity.js";
3
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
4
4
  import { createContextEvidence } from "../../storage/sqlite/context-evidence-repository.js";
5
5
  import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
6
6
  import { DurableState, init_durable_state } from "../../storage/sqlite/durable-state.js";
@@ -1,21 +1,21 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
4
3
  import { PersonalProactiveMessageSchema } from "../../../packages/gateway-contract/src/personal-proactivity.js";
5
4
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
6
+ import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
6
7
  import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
7
8
  import { DurableState, init_durable_state } from "../../storage/sqlite/durable-state.js";
8
- import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
9
9
  import { appendTranscriptEntry } from "../../storage/sqlite/transcript-repository.js";
10
- import { emitSessionTranscriptUpdate } from "../../session/transcript-events.js";
11
- import { init_providers, resolveModel } from "../../providers/index.js";
12
10
  import { getPersonalAgent } from "../repository.js";
13
11
  import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
14
- import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
12
+ import { init_providers, resolveModel } from "../../providers/index.js";
15
13
  import { completeWithResolvedCredentials } from "../../providers/model-call.js";
14
+ import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
15
+ import { emitSessionTranscriptUpdate } from "../../session/transcript-events.js";
16
+ import { enqueueDue, enqueueWakeup, getAttention, getAttentionSources, getProactivitySettings, isQuiet, listAttention, localDay, preparationStrategy, recordFeedback, reserveModelCall, saveAttention, sourceFingerprint, userText } from "./repository.js";
16
17
  import { personalConversationState } from "../conversation-state.js";
17
18
  import { PERSONAL_PERSONA_GUIDANCE } from "../persona.js";
18
- import { enqueueDue, enqueueWakeup, getAttention, getAttentionSources, getProactivitySettings, isQuiet, listAttention, localDay, preparationStrategy, recordFeedback, reserveModelCall, saveAttention, sourceFingerprint, userText } from "./repository.js";
19
19
  import { randomUUID } from "node:crypto";
20
20
  import { z } from "zod";
21
21
  //#region src/personal-agent/proactivity/service.ts
@@ -3,13 +3,13 @@ import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js
3
3
  import "../storage/sqlite/index.js";
4
4
  import { USER_PROFILE_IDENTITY_RULE, getUserProfileContext } from "../user-model/profile.js";
5
5
  import { isPersonalConversation } from "./repository.js";
6
- import { listPersonalResults } from "./result-reader.js";
7
- import { getProjectForSession } from "../projects/workspace.js";
8
6
  import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
9
- import { TaskResultDeliveryRepository } from "../tasks/task-result-delivery-repository.js";
10
- import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
11
7
  import { isKnowledgeCurrent, knowledgeItemAllowed, listKnowledgeItems } from "../knowledge-memory/repository.js";
12
8
  import "../knowledge-memory/index.js";
9
+ import { getProjectForSession } from "../projects/workspace.js";
10
+ import { listPersonalResults } from "./result-reader.js";
11
+ import { TaskResultDeliveryRepository } from "../tasks/task-result-delivery-repository.js";
12
+ import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
13
13
  //#region src/personal-agent/prompt-context.ts
14
14
  const clip = (value, limit) => value && (value.length > limit ? `${value.slice(0, limit - 1)}…` : value);
15
15
  /** Keep complete JSON records and identifiers, even when the snapshot is incomplete. */
@@ -1,7 +1,7 @@
1
1
  import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
2
- import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
3
2
  import { PERSONAL_EMOTIONAL_STYLE_RULE, PERSONAL_IDENTITY_CONTINUITY_RULE } from "./persona.js";
4
3
  import { PERSONAL_COMMUNICATION_RULES, PERSONAL_FILE_DELIVERY_RULE, PERSONAL_RELIABILITY_RULES } from "./communication.js";
4
+ import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
5
5
  //#region src/personal-agent/prompts.ts
6
6
  const DELEGATION_RULES = [
7
7
  "Answer directly when your capabilities suffice. For ordinary work that needs a specialist, call personal_task(command=\"submit\") with a short objective. For a self-contained current request send {command:\"submit\", objective:\"short outcome\", useOriginalRequest:true}; command is required. With this mode, the host copies its entire stored text, including exact constraints. Preserve sourceRefs and explicitly requested Agent/Skills. Use a concise complete description instead when earlier conversation must be synthesized. When exact earlier wording materially affects execution, optionally attach up to three relevant conversationExcerpts using the entry IDs and exact passages from session_recall in this chat. Never attach secrets, unrelated history, or passages the user restricted to this chat. The worker can read the selected passages in its handoff. Submit before opening files or other task materials. The background Task Router selects and starts the executor. After the tool succeeds, reply only with a short first-person acknowledgement such as \"I will handle this.\" in the conversation language, then finish. Keep internal dispatch private; do not claim execution is running merely because submission succeeded, and promise an update only when the confirmed delivery path supports it. Do not restate any task details, files, requirements or acceptance criteria, and do not wait for the worker. Remain available for conversation. On an explicit request for only results or meaningful updates, pass notificationPreference on submit or use notifications on the existing Task. Use final_only, updates, or default when the user asks to reset. Do not change preferences based on silence or a one-time status question. Preserve an explicit deadline in dueAt.",
@@ -1,34 +1,34 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TASK_RESULT_DELIVERY_TYPE, TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
+ import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
7
+ import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
6
8
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
9
  import { archiveSpaceTaskDelivery } from "../space/ingest.js";
8
10
  import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
9
11
  import { taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
10
- import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
11
- import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
12
12
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
13
13
  import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
14
14
  import { getSessionConfig } from "../storage/sqlite/config-repository.js";
15
+ import { getPersonalAgentByConversation } from "./repository.js";
16
+ import { init_providers, resolveModel } from "../providers/index.js";
17
+ import { completeWithResolvedCredentials } from "../providers/model-call.js";
18
+ import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
15
19
  import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
16
20
  import { TaskCriterionReviewRepository } from "../tasks/task-criterion-review-repository.js";
17
- import { init_providers, resolveModel } from "../providers/index.js";
18
- import { getPersonalAgentByConversation } from "./repository.js";
19
21
  import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
20
22
  import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
21
23
  import { hasPersonalResultFileLinks, sanitizePersonalResultFileLinks } from "./result-file-links.js";
22
- import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
23
- import { completeWithResolvedCredentials } from "../providers/model-call.js";
24
- import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
25
- import { recordPersonalPerformance } from "./performance.js";
26
- import { taskConversationSummary } from "../tasks/task-conversation-summary.js";
24
+ import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
27
25
  import "../tasks/task-research-result.js";
28
- import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
29
26
  import { personalConversationState } from "./conversation-state.js";
27
+ import { taskConversationSummary } from "../tasks/task-conversation-summary.js";
28
+ import { recordPersonalPerformance } from "./performance.js";
29
+ import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
30
30
  import { PERSONAL_PERSONA_GUIDANCE } from "./persona.js";
31
- import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
31
+ import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
32
32
  import { isLongPersonalReport, preparePersonalReplyResult, releasePersonalReplyResult } from "./reply-result.js";
33
33
  import { randomUUID } from "node:crypto";
34
34
  import { z } from "zod";
@@ -1,2 +1,2 @@
1
- export declare const PERSONAL_REPLY_STYLE_RULES: readonly ["Distinguish a failed internal attempt from the user’s final outcome. Keep recoverable routing, allocation and tool failures private when recovery is confirmed and no user action or significant delay needs attention. For an unsolicited internal update after recovery with no new requested result, return NO_REPLY. Clearly disclose final failure, unmet requirements and material partial failures; never describe an unresolved failure as no findings or still checking. Preserve actual retry state: only claim recovery or continuation after a successful tool receipt, and never invent a retry.", "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.", "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.", "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.", "Write the reply as a short message to one person. In the opening sentences, say what they can decide, use, or do now, and name the condition or uncertainty that could change that. For a decision, include the decisive trade-offs once. For a task result, say which parts are usable, what is still missing, and any action the reader needs to take. Use at most one short paragraph plus a few distinct bullets when that covers the request. For ordinary replies, aim for about 120–250 Chinese characters or 60–120 English words, with room for essential facts. Keep the figures, deadlines, and limits needed to act. Leave the background, play-by-play, repeated summary and optional next steps out. Honor a numerical length limit when the user sets one. Requests for detail, exact text, code, tables, reports, or complete lists take precedence.", "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; group routine newsletters and promotions briefly. Omit expired verification codes and irrelevant historical notices unless requested or material to the question. Do not turn every retrieved item into a finding or append the source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.", "Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.", "Use short paragraphs and useful structure. When the user accepts a settled plan with no new question, acknowledge briefly and end: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.", "Interpret short replies in context; an acknowledgement is not a new task, cancellation, or request for detail. Continue accepted offers and honor stop requests.", "Vary openings naturally; greetings, reassurance, humor, and questions are optional. Continue from the user's last substantive point; a brief agreement can stand on its own. When the user switches topics, let an unsolicited task result name its original subject briefly and keep the current conversation intact. Keep ongoing tone and detail preferences; a single-turn exception does not reset them.", "Keep requested content, limits, and partial failures visible. Separate plans, actions, and verified outcomes; agreement is not proof of trust, fairness, or resolution. Cite sources when requested or necessary.", "Use supplied facts in drafts and roleplay. Never invent a private disclosure, quote, action or reaction to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."];
2
- export declare const PERSONAL_REPLY_EXAMPLES = "Examples; use evidence.\n<examples>\n<example>Context: Report export failed, no file created and no retry initiated. User: \u8BF4\u77ED\u4E00\u70B9\u3002 Assistant: \u5BFC\u51FA\u5931\u8D25\uFF0C\u8FD8\u6CA1\u6709\u751F\u6210\u6587\u4EF6\u3002</example>\n<example>Context: Support team is handling a ticket; no request or capability for follow-up. User: \u8C01\u5728\u5904\u7406\uFF0C\u73B0\u5728\u4EC0\u4E48\u8FDB\u5EA6\uFF1F Assistant: \u5BA2\u670D\u56E2\u961F\u6B63\u5728\u5904\u7406\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u5904\u7406\u7ED3\u679C\u3002</example>\n<example>Context: Lookup not started. User: \u67E5\u4E00\u4E0B\u8FD9\u4E2A\u95EE\u9898\u3002 Assistant: \u6211\u6765\u67E5\u4E00\u4E0B\u3002</example>\n<example>Context: The user asked to retry a search after an incomplete reply; continuation was accepted. User: \u518D\u67E5\u4E00\u904D\uFF0C\u7B80\u6D01\u4E00\u70B9\u3002 Assistant: \u6211\u518D\u67E5\u4E00\u904D\uFF0C\u5148\u628A\u6709\u4F9D\u636E\u7684\u539F\u56E0\u548C\u5173\u952E\u6D88\u606F\u8BF4\u6E05\u695A\u3002</example>\n<example>Context: Internal lookup confirmed running; no findings yet. User: \u67E5\u5F97\u600E\u4E48\u6837\u4E86\uFF1F Assistant: \u6211\u6B63\u5728\u67E5\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u786E\u8BA4\u7684\u7ED3\u679C\u3002</example>\n<example>Context: Lookup queued, not running. User: \u5DF2\u7ECF\u5F00\u59CB\u67E5\u4E86\u5417\uFF1F Assistant: \u8FD8\u6CA1\u6709\uFF0C\u67E5\u8BE2\u8FD8\u5728\u7B49\u5F85\u5F00\u59CB\u3002</example>\n<example>Context: Worker returned leads, not independently verified. User: \u6709\u7ED3\u679C\u4E86\u5417\uFF1F Assistant: \u76EE\u524D\u67E5\u5230\u4E00\u4E9B\u7EBF\u7D22\uFF0C\u5177\u4F53\u539F\u56E0\u8FD8\u6CA1\u786E\u8BA4\u3002</example>\n<example>Context: Recipient unclear. User: \u53D1\u7ED9\u4ED6\u3002 Assistant: \u4F60\u6307\u7684\u662F\u521A\u624D\u63D0\u5230\u7684\u54EA\u4E00\u4F4D\uFF1F</example>\n<example>Context: Mail partly retrieved; auth expired. Assistant: \u5DF2\u7ECF\u67E5\u5230\u7684\u51E0\u5C01\u90AE\u4EF6\u5728\u4E0B\u9762\u3002\u5269\u4E0B\u7684\u56E0\u4E3A\u8FDE\u63A5\u8FC7\u671F\u6682\u65F6\u6CA1\u67E5\u5B8C\uFF1B\u91CD\u65B0\u8FDE\u63A5\u540E\u624D\u80FD\u63A5\u7740\u770B\u3002</example>\n<example>User: \u5199\u4E00\u6BB5\u9A91\u58EB\u5728\u66B4\u98CE\u96E8\u524D\u9F13\u821E\u540C\u4F34\u7684\u72EC\u767D\u3002 Assistant: \u96E8\u8FD8\u6CA1\u6709\u843D\u4E0B\uFF0C\u8BF8\u4F4D\uFF0C\u53EF\u6211\u5DF2\u542C\u89C1\u4F60\u4EEC\u76FE\u724C\u4E0A\u672A\u6765\u7684\u96F7\u58F0\u3002\u4ECA\u591C\u5B88\u4F4F\u8FD9\u5EA7\u6865\uFF0C\u6865\u540E\u7684\u706F\u706B\u4FBF\u4E0D\u4F1A\u7184\u706D\u3002</example>\n<example>Context: \u5BF9\u4EB2\u621A\u8C08\u521A\u624D\u7684\u73A9\u7B11\u3002 User: \u4F60\u662F\u89C9\u5F97\u6211\u8FD9\u4EBA\u4E0D\u884C\uFF1F Assistant: \u4E0D\u662F\u3002\u6211\u662F\u4E0D\u559C\u6B22\u90A3\u4E2A\u73A9\u7B11\uFF0C\u5E0C\u671B\u4EE5\u540E\u522B\u518D\u62FF\u8FD9\u4EF6\u4E8B\u5F00\u73A9\u7B11\u3002</example>\n<example>User: \u60F3\u7EA6\u670B\u53CB\u5403\u996D\uFF0C\u4F46\u6211\u548C\u5BF9\u8C61\u8FD8\u6CA1\u5B9A\u54EA\u5929\u6709\u7A7A\u3002 Assistant: \u53EF\u4EE5\u5148\u770B\u770B\u5468\u4E09\u665A\u4E0A\uFF1B\u4F60\u4EEC\u539F\u6765\u7684\u5B89\u6392\u518D\u6362\u4E2A\u65F6\u95F4\u3002</example>\n<example>User: One sentence to apologize for interrupting. Assistant: \u201CI cut you off earlier. I'm sorry\u2014I'd like to hear the rest.\u201D</example>\n<example>Context: Plan accepted. User: \u597D\uFF0C\u90A3\u6211\u5468\u4E94\u628A\u6750\u6599\u53D1\u8FC7\u53BB\u3002 Assistant: \u597D\u3002</example>\n</examples>";
1
+ export declare const PERSONAL_REPLY_STYLE_RULES: readonly ["Distinguish a failed internal attempt from the user’s final outcome. Keep recoverable routing, allocation and tool failures private when recovery is confirmed and no user action or significant delay needs attention. For an unsolicited internal update after recovery with no new requested result, return NO_REPLY. Clearly disclose final failure, unmet requirements and material partial failures; never describe an unresolved failure as no findings or still checking. Preserve actual retry state: only claim recovery or continuation after a successful tool receipt, and never invent a retry.", "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.", "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.", "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.", "Write the reply as a natural message from one real person to another, in plain idiomatic language with comfortable rhythm. In the opening sentence, give the direct answer, core distinction, or clear recommendation, and place any condition that changes it right alongside rather than in a trailing lecture. For everyday chat, casual explanations, light advice, and narrow follow-ups, default to one or two short plain-prose paragraphs: do not scatter **bold** emphasis inside ordinary sentences, and do not force headings, numbered frameworks, or bullet lists when smooth prose reads better. Reserve a few crisp bullets or a compact table only for multi-item summaries, explicit comparisons, or multi-part technical answers where structure genuinely helps scanning. For ordinary replies, aim for about 80–220 Chinese characters or 50–120 English words, with room for essential facts, figures, and deadlines. Leave out background padding, repeated summaries, unrequested lifestyle/safety tips, random trivia, canned slogans, and unnecessary capability disclaimers (such as saying you cannot send a message when the user only asked you to draft it). Honor explicit length limits. Requests for detail, exact text, code, tables, reports, or complete lists take precedence—cover every requested point thoroughly and cleanly, without inflating into a textbook with redundant ASCII diagrams, repeated recap sections, or tangential sub-topics.", "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Put items inside the requested timeframe first; if another item right outside that window has an imminent deadline or real penalty (such as tomorrow morning or noon), flag it briefly in a separate closing line so it is not missed, instead of either dropping it or lumping it into today's list. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; omit expired verification codes, routine ads, and irrelevant historical notices unless requested or material. Do not turn every retrieved item into a finding or append a source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.", "Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.", "Keep paragraphs short and easy to scan. On narrow follow-ups, answer only the newly asked angle without re-explaining previous turns or repeating already-stated consequences. When the user vents or chats casually without asking for advice, respond with brief, genuine human phrasing—skip therapist-style reframing (such as 'X does not mean Y, it is normal to feel Z'), formulaic empathy, or unsolicited coaching. When the user accepts a settled plan or wraps up with no new question, close simply and naturally like a real person: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.", "Interpret short replies in context; an acknowledgement is not a new task, cancellation, or request for detail. Continue accepted offers and honor stop requests.", "Vary openings naturally; greetings, reassurance, humor, and questions are optional. Continue from the user's last substantive point; a brief agreement can stand on its own. When the user switches topics, let an unsolicited task result name its original subject briefly and keep the current conversation intact. Keep ongoing tone and detail preferences; a single-turn exception does not reset them.", "Keep requested content, limits, and partial failures visible. Separate plans, actions, and verified outcomes; agreement is not proof of trust, fairness, or resolution. Cite sources when requested or necessary.", "Use supplied facts in drafts and roleplay, and match the real relationship and medium (a WeChat message to a close friend should sound like a real friend, not a formal memo). Distinguish asking how to explain something (answer in your own voice, with sample wording if helpful) from asking for copy-ready text or only the message body (output the plain text directly without quotation marks, framing lead-ins, or explanations). When asked to delete pleasantries or a phrase, remove it completely instead of rewording it. Never invent a private disclosure, quote, action, excuse, or commitment to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings immediately. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."];
2
+ export declare const PERSONAL_REPLY_EXAMPLES = "Examples; use evidence and plain human phrasing.\n<examples>\n<example>Context: Report export failed, no file created and no retry initiated. User: \u8BF4\u77ED\u4E00\u70B9\u3002 Assistant: \u5BFC\u51FA\u5931\u8D25\uFF0C\u8FD8\u6CA1\u6709\u751F\u6210\u6587\u4EF6\u3002</example>\n<example>Context: Support team is handling a ticket; no request or capability for follow-up. User: \u8C01\u5728\u5904\u7406\uFF0C\u73B0\u5728\u4EC0\u4E48\u8FDB\u5EA6\uFF1F Assistant: \u5BA2\u670D\u56E2\u961F\u6B63\u5728\u5904\u7406\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u5904\u7406\u7ED3\u679C\u3002</example>\n<example>Context: Lookup not started. User: \u67E5\u4E00\u4E0B\u8FD9\u4E2A\u95EE\u9898\u3002 Assistant: \u6211\u6765\u67E5\u4E00\u4E0B\u3002</example>\n<example>Context: The user asked to retry a search after an incomplete reply; continuation was accepted. User: \u518D\u67E5\u4E00\u904D\uFF0C\u7B80\u6D01\u4E00\u70B9\u3002 Assistant: \u6211\u518D\u67E5\u4E00\u904D\uFF0C\u5148\u628A\u6709\u4F9D\u636E\u7684\u539F\u56E0\u548C\u5173\u952E\u6D88\u606F\u8BF4\u6E05\u695A\u3002</example>\n<example>Context: Internal lookup confirmed running; no findings yet. User: \u67E5\u5F97\u600E\u4E48\u6837\u4E86\uFF1F Assistant: \u6211\u6B63\u5728\u67E5\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u786E\u8BA4\u7684\u7ED3\u679C\u3002</example>\n<example>Context: Lookup queued, not running. User: \u5DF2\u7ECF\u5F00\u59CB\u67E5\u4E86\u5417\uFF1F Assistant: \u8FD8\u6CA1\u6709\uFF0C\u67E5\u8BE2\u8FD8\u5728\u7B49\u5F85\u5F00\u59CB\u3002</example>\n<example>Context: Worker returned leads, not independently verified. User: \u6709\u7ED3\u679C\u4E86\u5417\uFF1F Assistant: \u76EE\u524D\u67E5\u5230\u4E00\u4E9B\u7EBF\u7D22\uFF0C\u5177\u4F53\u539F\u56E0\u8FD8\u6CA1\u786E\u8BA4\u3002</example>\n<example>Context: Recipient unclear. User: \u53D1\u7ED9\u4ED6\u3002 Assistant: \u4F60\u6307\u7684\u662F\u521A\u624D\u63D0\u5230\u7684\u54EA\u4E00\u4F4D\uFF1F</example>\n<example>Context: Mail partly retrieved; auth expired. Assistant: \u5DF2\u7ECF\u67E5\u5230\u7684\u51E0\u5C01\u90AE\u4EF6\u5728\u4E0B\u9762\u3002\u5269\u4E0B\u7684\u56E0\u4E3A\u8FDE\u63A5\u8FC7\u671F\u6682\u65F6\u6CA1\u67E5\u5B8C\uFF1B\u91CD\u65B0\u8FDE\u63A5\u540E\u624D\u80FD\u63A5\u7740\u770B\u3002</example>\n<example>User: \u4E3A\u4EC0\u4E48\u521A\u6D17\u5B8C\u6FA1\u51FA\u6765\u955C\u5B50\u5168\u662F\u96FE\uFF1F Assistant: \u70ED\u6C34\u8BA9\u6D74\u5BA4\u91CC\u6C34\u6C7D\u5F88\u91CD\uFF0C\u955C\u5B50\u8868\u9762\u6E29\u5EA6\u4F4E\uFF0C\u70ED\u817E\u817E\u7684\u6C34\u84B8\u6C14\u78B0\u4E0A\u53BB\u5C31\u4F1A\u51DD\u6210\u4E00\u5C42\u7EC6\u5BC6\u7684\u5C0F\u6C34\u73E0\uFF0C\u770B\u7740\u5C31\u662F\u4E00\u7247\u96FE\u3002</example>\n<example>User: \u5E2E\u6211\u5199\u4E00\u53E5\u53D1\u7ED9\u670B\u53CB\u501F\u4F1E\u7684\u5FAE\u4FE1\uFF0C\u53EA\u8981\u6B63\u6587\u3002 Assistant: \u4F60\u90A3\u628A\u4F1E\u65B9\u4FBF\u501F\u6211\u7528\u4E00\u4E0B\u5417\uFF1F</example>\n<example>User: \u5199\u4E00\u6BB5\u9A91\u58EB\u5728\u66B4\u98CE\u96E8\u524D\u9F13\u821E\u540C\u4F34\u7684\u72EC\u767D\u3002 Assistant: \u96E8\u8FD8\u6CA1\u6709\u843D\u4E0B\uFF0C\u8BF8\u4F4D\uFF0C\u53EF\u6211\u5DF2\u542C\u89C1\u4F60\u4EEC\u76FE\u724C\u4E0A\u672A\u6765\u7684\u96F7\u58F0\u3002\u4ECA\u591C\u5B88\u4F4F\u8FD9\u5EA7\u6865\uFF0C\u6865\u540E\u7684\u706F\u706B\u4FBF\u4E0D\u4F1A\u7184\u706D\u3002</example>\n<example>Context: \u5BF9\u4EB2\u621A\u8C08\u521A\u624D\u7684\u73A9\u7B11\u3002 User: \u4F60\u662F\u89C9\u5F97\u6211\u8FD9\u4EBA\u4E0D\u884C\uFF1F Assistant: \u4E0D\u662F\u3002\u6211\u662F\u4E0D\u559C\u6B22\u90A3\u4E2A\u73A9\u7B11\uFF0C\u5E0C\u671B\u4EE5\u540E\u522B\u518D\u62FF\u8FD9\u4EF6\u4E8B\u5F00\u73A9\u7B11\u3002</example>\n<example>User: One sentence to apologize for interrupting, body only. Assistant: I cut you off earlier. I'm sorry\u2014I'd like to hear the rest.</example>\n<example>Context: Plan accepted. User: \u597D\uFF0C\u90A3\u6211\u5468\u4E94\u628A\u6750\u6599\u53D1\u8FC7\u53BB\u3002 Assistant: \u597D\u3002</example>\n</examples>";
@@ -4,16 +4,16 @@ const PERSONAL_REPLY_STYLE_RULES = [
4
4
  "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.",
5
5
  "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.",
6
6
  "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.",
7
- "Write the reply as a short message to one person. In the opening sentences, say what they can decide, use, or do now, and name the condition or uncertainty that could change that. For a decision, include the decisive trade-offs once. For a task result, say which parts are usable, what is still missing, and any action the reader needs to take. Use at most one short paragraph plus a few distinct bullets when that covers the request. For ordinary replies, aim for about 120–250 Chinese characters or 60–120 English words, with room for essential facts. Keep the figures, deadlines, and limits needed to act. Leave the background, play-by-play, repeated summary and optional next steps out. Honor a numerical length limit when the user sets one. Requests for detail, exact text, code, tables, reports, or complete lists take precedence.",
8
- "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; group routine newsletters and promotions briefly. Omit expired verification codes and irrelevant historical notices unless requested or material to the question. Do not turn every retrieved item into a finding or append the source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.",
7
+ "Write the reply as a natural message from one real person to another, in plain idiomatic language with comfortable rhythm. In the opening sentence, give the direct answer, core distinction, or clear recommendation, and place any condition that changes it right alongside rather than in a trailing lecture. For everyday chat, casual explanations, light advice, and narrow follow-ups, default to one or two short plain-prose paragraphs: do not scatter **bold** emphasis inside ordinary sentences, and do not force headings, numbered frameworks, or bullet lists when smooth prose reads better. Reserve a few crisp bullets or a compact table only for multi-item summaries, explicit comparisons, or multi-part technical answers where structure genuinely helps scanning. For ordinary replies, aim for about 80–220 Chinese characters or 50–120 English words, with room for essential facts, figures, and deadlines. Leave out background padding, repeated summaries, unrequested lifestyle/safety tips, random trivia, canned slogans, and unnecessary capability disclaimers (such as saying you cannot send a message when the user only asked you to draft it). Honor explicit length limits. Requests for detail, exact text, code, tables, reports, or complete lists take precedence—cover every requested point thoroughly and cleanly, without inflating into a textbook with redundant ASCII diagrams, repeated recap sections, or tangential sub-topics.",
8
+ "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Put items inside the requested timeframe first; if another item right outside that window has an imminent deadline or real penalty (such as tomorrow morning or noon), flag it briefly in a separate closing line so it is not missed, instead of either dropping it or lumping it into today's list. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; omit expired verification codes, routine ads, and irrelevant historical notices unless requested or material. Do not turn every retrieved item into a finding or append a source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.",
9
9
  "Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.",
10
- "Use short paragraphs and useful structure. When the user accepts a settled plan with no new question, acknowledge briefly and end: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.",
10
+ "Keep paragraphs short and easy to scan. On narrow follow-ups, answer only the newly asked angle without re-explaining previous turns or repeating already-stated consequences. When the user vents or chats casually without asking for advice, respond with brief, genuine human phrasing—skip therapist-style reframing (such as 'X does not mean Y, it is normal to feel Z'), formulaic empathy, or unsolicited coaching. When the user accepts a settled plan or wraps up with no new question, close simply and naturally like a real person: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.",
11
11
  "Interpret short replies in context; an acknowledgement is not a new task, cancellation, or request for detail. Continue accepted offers and honor stop requests.",
12
12
  "Vary openings naturally; greetings, reassurance, humor, and questions are optional. Continue from the user's last substantive point; a brief agreement can stand on its own. When the user switches topics, let an unsolicited task result name its original subject briefly and keep the current conversation intact. Keep ongoing tone and detail preferences; a single-turn exception does not reset them.",
13
13
  "Keep requested content, limits, and partial failures visible. Separate plans, actions, and verified outcomes; agreement is not proof of trust, fairness, or resolution. Cite sources when requested or necessary.",
14
- "Use supplied facts in drafts and roleplay. Never invent a private disclosure, quote, action or reaction to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."
14
+ "Use supplied facts in drafts and roleplay, and match the real relationship and medium (a WeChat message to a close friend should sound like a real friend, not a formal memo). Distinguish asking how to explain something (answer in your own voice, with sample wording if helpful) from asking for copy-ready text or only the message body (output the plain text directly without quotation marks, framing lead-ins, or explanations). When asked to delete pleasantries or a phrase, remove it completely instead of rewording it. Never invent a private disclosure, quote, action, excuse, or commitment to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings immediately. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."
15
15
  ];
16
- const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence.
16
+ const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence and plain human phrasing.
17
17
  <examples>
18
18
  <example>Context: Report export failed, no file created and no retry initiated. User: 说短一点。 Assistant: 导出失败,还没有生成文件。</example>
19
19
  <example>Context: Support team is handling a ticket; no request or capability for follow-up. User: 谁在处理,现在什么进度? Assistant: 客服团队正在处理,目前还没有处理结果。</example>
@@ -24,10 +24,11 @@ const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence.
24
24
  <example>Context: Worker returned leads, not independently verified. User: 有结果了吗? Assistant: 目前查到一些线索,具体原因还没确认。</example>
25
25
  <example>Context: Recipient unclear. User: 发给他。 Assistant: 你指的是刚才提到的哪一位?</example>
26
26
  <example>Context: Mail partly retrieved; auth expired. Assistant: 已经查到的几封邮件在下面。剩下的因为连接过期暂时没查完;重新连接后才能接着看。</example>
27
+ <example>User: 为什么刚洗完澡出来镜子全是雾? Assistant: 热水让浴室里水汽很重,镜子表面温度低,热腾腾的水蒸气碰上去就会凝成一层细密的小水珠,看着就是一片雾。</example>
28
+ <example>User: 帮我写一句发给朋友借伞的微信,只要正文。 Assistant: 你那把伞方便借我用一下吗?</example>
27
29
  <example>User: 写一段骑士在暴风雨前鼓舞同伴的独白。 Assistant: 雨还没有落下,诸位,可我已听见你们盾牌上未来的雷声。今夜守住这座桥,桥后的灯火便不会熄灭。</example>
28
30
  <example>Context: 对亲戚谈刚才的玩笑。 User: 你是觉得我这人不行? Assistant: 不是。我是不喜欢那个玩笑,希望以后别再拿这件事开玩笑。</example>
29
- <example>User: 想约朋友吃饭,但我和对象还没定哪天有空。 Assistant: 可以先看看周三晚上;你们原来的安排再换个时间。</example>
30
- <example>User: One sentence to apologize for interrupting. Assistant: “I cut you off earlier. I'm sorry—I'd like to hear the rest.”</example>
31
+ <example>User: One sentence to apologize for interrupting, body only. Assistant: I cut you off earlier. I'm sorry—I'd like to hear the rest.</example>
31
32
  <example>Context: Plan accepted. User: 好,那我周五把材料发过去。 Assistant: 好。</example>
32
33
  </examples>`;
33
34
  //#endregion
@@ -1,16 +1,16 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TASK_RESULT_DELIVERY_TYPE, TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { init_task_instruction_sequence, taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
8
8
  import { finalizedTaskResultId, init_task_result_versions } from "../tasks/task-result-versions.js";
9
9
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
10
10
  import { getPersonalRequest, init_request_repository, updatePersonalRequest } from "./request-repository.js";
11
11
  import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
12
- import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
13
12
  import { getPersonalAgentByConversation } from "./repository.js";
13
+ import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
14
14
  import { warmPersonalResult } from "./result-reader.js";
15
15
  import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
16
16
  import { PersonalRequestResultSchema, renderPersonalRequestResult } from "./request-result.js";
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TaskCreateRequestSchema } from "../../packages/gateway-contract/src/tasks.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { getSessionInputById, getSessionInputState, init_session_input_repository } from "../storage/sqlite/session-input-repository.js";
8
8
  import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
@@ -12,20 +12,20 @@ import { getConnectorAccount, init_connector_account_repository } from "../stora
12
12
  import { getConnectorConnection, getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
13
13
  import { cancelConnectionObjective, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../storage/sqlite/connection-wait-repository.js";
14
14
  import { getUserProfileSnapshot } from "../user-model/profile.js";
15
+ import { isPersonalConversation } from "./repository.js";
15
16
  import { resolveTaskLocale } from "../tasks/task-language.js";
16
17
  import { assessSpecialist } from "../agent-matching/service.js";
17
18
  import { canAccessConnectorAccount } from "../connectors/account-access.js";
18
19
  import { resolveConnectionCandidate } from "../connectors/connection-candidates.js";
19
20
  import { connectorPrincipalForSession } from "../connectors/principal.js";
20
- import { isPersonalConversation } from "./repository.js";
21
21
  import { personalCapabilities } from "./capability-service.js";
22
22
  import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
23
+ import { abortEmbeddedRun } from "../agent/embedded/runs.js";
23
24
  import { TaskApplicationService } from "../tasks/task-application-service.js";
25
+ import { resolveResponseLanguageForSession } from "../agent/prompt/response-language.js";
26
+ import { defineTaskContract } from "../tasks/task-contract-definition.js";
24
27
  import { AgentSelectionRepository, selectionRequestHash } from "../agent-matching/selection-repository.js";
25
28
  import { assertSpecialistEligible } from "../agent-matching/delegation-service.js";
26
- import { defineTaskContract } from "../tasks/task-contract-definition.js";
27
- import { resolveResponseLanguageForSession } from "../agent/prompt/response-language.js";
28
- import { abortEmbeddedRun } from "../agent/embedded/runs.js";
29
29
  import { createHash, randomUUID } from "node:crypto";
30
30
  //#region src/personal-agent/request-service.ts
31
31
  init_src();
@@ -14,6 +14,8 @@ export interface PersonalResultInput {
14
14
  /** A delegated reader must retain the source account's current Agent access restrictions. */
15
15
  export declare function assertPersonalResultDelegateAccess(conversationId: string, delivery: TaskResultDelivery, agentId: string): void;
16
16
  export declare function resolvePersonalResultReference(conversationId: string, resultId: string): TaskResultDelivery;
17
+ /** Resolve an exact result, or the sole delivered result for an owned Task in this transcript. */
18
+ export declare function resolvePersonalHandoffResult(conversationId: string, reference: string): TaskResultDelivery;
17
19
  /** Retry only an exhausted delivery outbox; never reopen execution, parsing, or a historical revision. */
18
20
  export declare function retryPersonalResultDelivery(conversationId: string, resultId: string): Record<string, unknown>;
19
21
  /** Metadata-only directory; no extraction, model calls or file IO on the prompt path. */
@@ -1,20 +1,20 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { init_request_repository, personalRequestForTask } from "./request-repository.js";
8
8
  import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
9
9
  import { getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../storage/sqlite/connector-repository.js";
10
- import { canAccessConnectorAccount } from "../connectors/account-access.js";
11
- import { connectorPrincipalForSession } from "../connectors/principal.js";
12
10
  import { isPersonalConversation } from "./repository.js";
13
11
  import { resolveMediaReference } from "../media/media-reference.js";
12
+ import { canAccessConnectorAccount } from "../connectors/account-access.js";
13
+ import { connectorPrincipalForSession } from "../connectors/principal.js";
14
14
  import { createRequire } from "node:module";
15
+ import { createHash, randomUUID } from "node:crypto";
15
16
  import { existsSync } from "node:fs";
16
17
  import { fileURLToPath } from "node:url";
17
- import { createHash, randomUUID } from "node:crypto";
18
18
  import { lstat } from "node:fs/promises";
19
19
  import { Worker } from "node:worker_threads";
20
20
  //#region src/personal-agent/result-reader.ts
@@ -71,6 +71,17 @@ function assertPersonalResultDelegateAccess(conversationId, delivery, agentId) {
71
71
  function resolvePersonalResultReference(conversationId, resultId) {
72
72
  return resolve(conversationId, resultId).delivery;
73
73
  }
74
+ /** Resolve an exact result, or the sole delivered result for an owned Task in this transcript. */
75
+ function resolvePersonalHandoffResult(conversationId, reference) {
76
+ const db = getSqliteDatabase();
77
+ if (db.prepare("SELECT 1 FROM task_result_deliveries WHERE conversation_id = ? AND delivery_id = ?").get(conversationId, reference)) return resolvePersonalResultReference(conversationId, reference);
78
+ const rows = db.prepare(`SELECT delivery.delivery_id, delivery.status FROM task_runs run
79
+ JOIN task_result_deliveries delivery ON delivery.task_run_id = run.run_id
80
+ WHERE run.task_id = ? AND delivery.conversation_id = ?
81
+ AND json_extract(delivery.payload_json, '$.originTranscriptId') = ? LIMIT 2`).all(reference, conversationId, readCurrentTranscriptId(db, conversationId) ?? "");
82
+ if (rows.length === 1 && rows[0]?.status === "delivered") return resolvePersonalResultReference(conversationId, rows[0].delivery_id);
83
+ throw new Error("Select a result from personal_result(command=\"list\", taskId) and use its exact resultId. The source is unavailable or has multiple delivered versions.");
84
+ }
74
85
  /** Retry only an exhausted delivery outbox; never reopen execution, parsing, or a historical revision. */
75
86
  function retryPersonalResultDelivery(conversationId, resultId) {
76
87
  const { delivery } = resolve(conversationId, resultId);
@@ -458,4 +469,4 @@ async function readPersonalResult(conversationId, raw) {
458
469
  };
459
470
  }
460
471
  //#endregion
461
- export { assertPersonalResultDelegateAccess, listPersonalResults, readPersonalResult, resolvePersonalResultReference, retryPersonalResultDelivery, stopPersonalResultPreparations, warmPersonalResult };
472
+ export { assertPersonalResultDelegateAccess, listPersonalResults, readPersonalResult, resolvePersonalHandoffResult, resolvePersonalResultReference, retryPersonalResultDelivery, stopPersonalResultPreparations, warmPersonalResult };
@@ -3,12 +3,12 @@ import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js
3
3
  import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
4
4
  import { setSessionConfig } from "../storage/sqlite/config-repository.js";
5
5
  import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
6
- import { getAvailableModels, init_providers } from "../providers/index.js";
7
6
  import { getPersonalAgent, personalAgentId } from "./repository.js";
8
- import { AgentCatalogService } from "../agent-catalog/service.js";
7
+ import { getAvailableModels, init_providers } from "../providers/index.js";
9
8
  import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
10
- import { getModelThinking } from "../providers/model-thinking.js";
9
+ import { AgentCatalogService } from "../agent-catalog/service.js";
11
10
  import { personalInstructions } from "./prompts.js";
11
+ import { getModelThinking } from "../providers/model-thinking.js";
12
12
  import { completePersonalOnboarding } from "./onboarding.js";
13
13
  import { z } from "zod";
14
14
  //#region src/personal-agent/service.ts
@@ -36,12 +36,13 @@ function getAvailablePersonalAgentTools(config, deps) {
36
36
  return (allowlist ? [...new Set([...DISCOVERY_TOOLS, ...allowlist])] : DISCOVERY_TOOLS).filter((name) => (name !== "browser_use" || deps.getConfig?.()?.browser?.enabled !== false) && allowsPersonalAgentTool(config, name));
37
37
  }
38
38
  function personalAgentModelAvailability(config) {
39
- for (const ref of [config.models.chat.primary, ...config.models.chat.fallbacks]) try {
39
+ const models = config.models.background ?? config.models.chat;
40
+ for (const ref of [models.primary, ...models.fallbacks]) try {
40
41
  if (isProviderConfiguredSync(resolveModel(ref).provider)) return { available: true };
41
42
  } catch {}
42
43
  return {
43
44
  available: false,
44
- reason: "No configured chat model resolves to an available provider"
45
+ reason: "No configured task model resolves to an available provider"
45
46
  };
46
47
  }
47
48
  //#endregion
@@ -6,8 +6,8 @@ import { TaskRepository, init_task_repository } from "../tasks/task-repository.j
6
6
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
7
7
  import { TaskAllocationRepository } from "../tasks/task-allocation-repository.js";
8
8
  import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
9
- import { TaskApplicationService } from "../tasks/task-application-service.js";
10
9
  import { abortEmbeddedRun, getEmbeddedRunByConversationId } from "../agent/embedded/runs.js";
10
+ import { TaskApplicationService } from "../tasks/task-application-service.js";
11
11
  //#region src/personal-agent/task-cancel.ts
12
12
  init_transaction();
13
13
  init_task_repository();
@@ -1,6 +1,6 @@
1
- import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
2
1
  import { TASK_RESULT_DELIVERY_TYPE } from "../../packages/gateway-contract/src/task-result-delivery.js";
3
2
  import { init_src } from "../../packages/gateway-contract/src/index.js";
3
+ import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
4
4
  //#region src/personal-agent/unread.ts
5
5
  init_src();
6
6
  init_transaction();
@@ -1,18 +1,18 @@
1
1
  import { PhoneError, init_contracts } from "./contracts.js";
2
2
  import { measurePhonePhase } from "./execution-trace.js";
3
- import { canDispatchPhoneAction } from "./reliability.js";
4
3
  import { runPhoneCommandText } from "../process/phone-process.js";
5
4
  import { runAdb } from "./adb-command.js";
6
5
  import { PhoneUiSession, openLocalPhoneUi } from "./ui-session.js";
6
+ import { canDispatchPhoneAction } from "./reliability.js";
7
7
  import { PhoneTextSession } from "./text-session.js";
8
8
  import { managedPhoneAdbPath } from "../runtime-tools/phone-dependency-catalog.js";
9
9
  import { parsePhoneApplications, phoneApplicationsCommand } from "./applications.js";
10
10
  import { readScrcpyServer, scrcpyServerPath } from "./scrcpy-assets.js";
11
11
  import { readPhoneForeground } from "./foreground.js";
12
- import { homedir } from "node:os";
13
12
  import { delimiter, join } from "node:path";
14
- import { existsSync } from "node:fs";
15
13
  import { randomUUID } from "node:crypto";
14
+ import { homedir } from "node:os";
15
+ import { existsSync } from "node:fs";
16
16
  import { setTimeout } from "node:timers/promises";
17
17
  //#region src/phone/adb-driver.ts
18
18
  init_contracts();
@@ -1,5 +1,5 @@
1
- import { PhoneError, init_contracts } from "./contracts.js";
2
1
  import { init_paths, resolveCredentialsDir } from "../config/paths.js";
2
+ import { PhoneError, init_contracts } from "./contracts.js";
3
3
  import { measurePhonePhase } from "./execution-trace.js";
4
4
  import { PHONE_UI_DEX } from "./ui-dump-binary.js";
5
5
  import { PhoneUiSession, closePhoneUiProcess } from "./ui-session.js";
@@ -8,8 +8,8 @@ import { readScrcpyServer } from "./scrcpy-assets.js";
8
8
  import { protectPhoneCredential } from "./cloud-key-permissions.js";
9
9
  import { join } from "node:path";
10
10
  import { createHash, createPrivateKey, randomUUID } from "node:crypto";
11
- import { lstat, mkdir, readFile, rm, writeFile } from "node:fs/promises";
12
11
  import { connect } from "node:net";
12
+ import { lstat, mkdir, readFile, rm, writeFile } from "node:fs/promises";
13
13
  //#region src/phone/cloud-adb-connection.ts
14
14
  init_paths();
15
15
  init_contracts();
@@ -1,5 +1,5 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
1
  import { randomUUID } from "node:crypto";
2
+ import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { performance } from "node:perf_hooks";
4
4
  //#region src/phone/execution-trace.ts
5
5
  const context = new AsyncLocalStorage();