@xopcai/xopc 0.0.486 → 0.0.488

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 (426) 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/telegram/src/update-offset-store.js +2 -1
  11. package/dist/extensions/telegram/xopc.extension.json +1 -1
  12. package/dist/extensions/weixin/src/messaging/quote-cache.js +3 -1
  13. package/dist/extensions/weixin/src/storage/sync-buf.js +2 -1
  14. package/dist/gateway/server/chunks.bin +1733 -1553
  15. package/dist/gateway/server/chunks.json +1 -1
  16. package/dist/gateway/server/dependency-records.json +42 -0
  17. package/dist/gateway/static/root/assets/{activity-store-hSe5Nbgk.js → activity-store-DyHjQrpP.js} +1 -1
  18. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BY2wRiwY.js → agent-avatar-dicebear-gADhOk89.js} +1 -1
  19. package/dist/gateway/static/root/assets/{agent-avatar-display-D_UDgOr9.js → agent-avatar-display-Dyyk4GdM.js} +2 -2
  20. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BrcyLG9M.js → agent-defaults-settings-panel-DD5mU7h6.js} +1 -1
  21. package/dist/gateway/static/root/assets/{agent-plugin-dialog-CSJC1yud.js → agent-plugin-dialog-RZpnW9HG.js} +1 -1
  22. package/dist/gateway/static/root/assets/{agents-DX-t3X7K.js → agents-Ckt9wMj7.js} +3 -3
  23. package/dist/gateway/static/root/assets/{agents-admin-api-DSr-PWuW.js → agents-admin-api-BW3Mzst8.js} +1 -1
  24. package/dist/gateway/static/root/assets/{api-CGrHK9ij.js → api-Cd5TqEwc.js} +1 -1
  25. package/dist/gateway/static/root/assets/{api-B3T06TLl.js → api-DVQaJzrB.js} +1 -1
  26. package/dist/gateway/static/root/assets/{app-management-settings-panel-D6ZoYKaA.js → app-management-settings-panel-Cim6ZmGT.js} +1 -1
  27. package/dist/gateway/static/root/assets/{appearance-settings-BRb6kZT8.js → appearance-settings-BVMDvmUO.js} +1 -1
  28. package/dist/gateway/static/root/assets/{apps-page-6xeWvMpF.js → apps-page-B7T55D7Y.js} +1 -1
  29. package/dist/gateway/static/root/assets/{archive-plugin-CQ5UXgZk.js → archive-plugin-DVoAuR_a.js} +1 -1
  30. package/dist/gateway/static/root/assets/{automation-api-D-gn6x5E.js → automation-api-B6YcuEsE.js} +1 -1
  31. package/dist/gateway/static/root/assets/{automation-result-state-B7hq0XOL.js → automation-result-state-BycWqFXM.js} +1 -1
  32. package/dist/gateway/static/root/assets/{automation-run-list-CM59-qm5.js → automation-run-list-DDDHtKq0.js} +1 -1
  33. package/dist/gateway/static/root/assets/{automation-task-card-C453Q-Wa.js → automation-task-card-BBEA23Zb.js} +1 -1
  34. package/dist/gateway/static/root/assets/{automations-page-BLFBqaPX.js → automations-page-DelDZorh.js} +1 -1
  35. package/dist/gateway/static/root/assets/{automations-workspace-DiO3Iyuj.js → automations-workspace-leY4yCvw.js} +2 -2
  36. package/dist/gateway/static/root/assets/{binary-plugins-D_zw0TgG.js → binary-plugins-o-jwYyMd.js} +1 -1
  37. package/dist/gateway/static/root/assets/block-editor-BFDeQtYs.css +1 -0
  38. package/dist/gateway/static/root/assets/{block-editor-Cesz2DqP.js → block-editor-Bp6TLleA.js} +46 -46
  39. package/dist/gateway/static/root/assets/{browser-settings-page-BHElJSFt.js → browser-settings-page-CtPARtRA.js} +1 -1
  40. package/dist/gateway/static/root/assets/{capabilities-CW-vdkz6.js → capabilities-B5gHYD8r.js} +1 -1
  41. package/dist/gateway/static/root/assets/{capabilities-DZrjA95P.js → capabilities-G2ZaAAs2.js} +1 -1
  42. package/dist/gateway/static/root/assets/{capabilities-page-DQrfkrBA.js → capabilities-page-C6KCaaHR.js} +2 -2
  43. package/dist/gateway/static/root/assets/{capabilities-settings-panel-DIT2dvtc.js → capabilities-settings-panel-CVwdxuL4.js} +1 -1
  44. package/dist/gateway/static/root/assets/{channels-Dcr5dgqw.js → channels-Bh2bHLni.js} +1 -1
  45. package/dist/gateway/static/root/assets/{chat-agents-api-CyvBfBbp.js → chat-agents-api-DRKlkcuv.js} +1 -1
  46. package/dist/gateway/static/root/assets/{chat-chart-block-B83s8HE9.js → chat-chart-block-DxTCx__V.js} +1 -1
  47. package/dist/gateway/static/root/assets/{chat-page-DWZCzxY7.js → chat-page-XqG9aYBd.js} +31 -31
  48. package/dist/gateway/static/root/assets/{chat-terminal-dock-DCUuwiTt.js → chat-terminal-dock-Ch74AWYF.js} +1 -1
  49. package/dist/gateway/static/root/assets/{command-palette-api-UrqPvWR1.js → command-palette-api-CAKoTF_-.js} +1 -1
  50. package/dist/gateway/static/root/assets/{composer-model-config-control-C2Bku39S.js → composer-model-config-control-Bas1wFVW.js} +1 -1
  51. package/dist/gateway/static/root/assets/{composer-notifications-MGKffwC7.js → composer-notifications-CpBgWAE4.js} +1 -1
  52. package/dist/gateway/static/root/assets/{composer-payload-handoff-a0quQ25p.js → composer-payload-handoff-uT_hvvap.js} +1 -1
  53. package/dist/gateway/static/root/assets/{computer-settings-page-DUzQe6Bz.js → computer-settings-page-x8YUBBuX.js} +1 -1
  54. package/dist/gateway/static/root/assets/confirm-dialog-yhRKgG72.js +1 -0
  55. package/dist/gateway/static/root/assets/{connected-providers-grid-BJKEp0SE.js → connected-providers-grid-DS21-u3Q.js} +1 -1
  56. package/dist/gateway/static/root/assets/{connection-usage-guide-B9hoSOnN.js → connection-usage-guide-DNNFESD9.js} +1 -1
  57. package/dist/gateway/static/root/assets/{connector-service-page-e67KylnM.js → connector-service-page-BS7IJ6oc.js} +1 -1
  58. package/dist/gateway/static/root/assets/{connectors-api-CRGq-TSw.js → connectors-api-B27sJ651.js} +1 -1
  59. package/dist/gateway/static/root/assets/{connectors-page-BteRI1XM.js → connectors-page-DM6TppXV.js} +1 -1
  60. package/dist/gateway/static/root/assets/{date-picker-DwITf4I2.js → date-picker-D3N2BGVY.js} +1 -1
  61. package/dist/gateway/static/root/assets/{date-time-picker-ChG1CqR1.js → date-time-picker-BNw099Is.js} +1 -1
  62. package/dist/gateway/static/root/assets/{desktop-pet-BHoFymL4.js → desktop-pet-BtY6aGrh.js} +1 -1
  63. package/dist/gateway/static/root/assets/{desktop-pet-settings-BYeBN4jj.js → desktop-pet-settings-DVXfAMaU.js} +1 -1
  64. package/dist/gateway/static/root/assets/{dev-view-store-DsjH8x76.js → dev-view-store-D4EyUkRI.js} +1 -1
  65. package/dist/gateway/static/root/assets/{device-connections-panel-DE01vyK_.js → device-connections-panel-DYK_DQzO.js} +1 -1
  66. package/dist/gateway/static/root/assets/{device-pairing-action-w1enAo76.js → device-pairing-action-DXo8MWy2.js} +1 -1
  67. package/dist/gateway/static/root/assets/{device-pairing-wizard-Dt737tSq.js → device-pairing-wizard-NddAztJ2.js} +1 -1
  68. package/dist/gateway/static/root/assets/{directory-picker-path-field-B-eUnbng.js → directory-picker-path-field-Bbq7ZyGn.js} +1 -1
  69. package/dist/gateway/static/root/assets/{extension-authoritative-grants-DYp2nNol.js → extension-authoritative-grants-qpYvHriJ.js} +1 -1
  70. package/dist/gateway/static/root/assets/{extension-debug-page-4jJ1uVQJ.js → extension-debug-page-BOb-6rpq.js} +1 -1
  71. package/dist/gateway/static/root/assets/{extension-iframe-host-CJV5JETm.js → extension-iframe-host-DpgIPfJe.js} +1 -1
  72. package/dist/gateway/static/root/assets/{extension-marketplace-api-DGV5FC-v.js → extension-marketplace-api-BhGNQYHl.js} +1 -1
  73. package/dist/gateway/static/root/assets/{extension-message-router-B4I-Y6qs.js → extension-message-router-QjbtEYyu.js} +1 -1
  74. package/dist/gateway/static/root/assets/{extension-page-lc7a84nG.js → extension-page-BOp7wU9Y.js} +1 -1
  75. package/dist/gateway/static/root/assets/{extension-provider-D8_mIBI0.js → extension-provider-CFPicsnW.js} +1 -1
  76. package/dist/gateway/static/root/assets/{extension-settings-page-Uw2lfWRh.js → extension-settings-page-cXjBvPwg.js} +1 -1
  77. package/dist/gateway/static/root/assets/{gateway-config-swr-BD-ams0X.js → gateway-config-swr-DxelrRtx.js} +1 -1
  78. package/dist/gateway/static/root/assets/gateway-realtime-D2B_nv2b.js +1 -0
  79. package/dist/gateway/static/root/assets/gateway-realtime-store-DrVbjYfI.js +1 -0
  80. package/dist/gateway/static/root/assets/{gateway-restart-Dos1Pp84.js → gateway-restart-Ce6rCCAr.js} +1 -1
  81. package/dist/gateway/static/root/assets/{gateway-settings-DUC1iOVK.js → gateway-settings-BTr0Gwdo.js} +1 -1
  82. package/dist/gateway/static/root/assets/{gateway-startup-retry-DgmvR-hb.js → gateway-startup-retry-Dm0dK8BT.js} +1 -1
  83. package/dist/gateway/static/root/assets/{global-defaults-api-B7suATYU.js → global-defaults-api-BZnu44eA.js} +1 -1
  84. package/dist/gateway/static/root/assets/{home-page-mSRCU81k.js → home-page-Bxr3V5lc.js} +3 -3
  85. package/dist/gateway/static/root/assets/{home-task-actions-_ZAc57Y7.js → home-task-actions-GAO06s1_.js} +1 -1
  86. package/dist/gateway/static/root/assets/{image-generation-api-Baz4xdZ4.js → image-generation-api-DrZPmWFt.js} +1 -1
  87. package/dist/gateway/static/root/assets/{imports-page-DR0eLPgB.js → imports-page-D-x5kijk.js} +1 -1
  88. package/dist/gateway/static/root/assets/index-BjU5H5hz.js +11 -0
  89. package/dist/gateway/static/root/assets/index-CREeN6C_.css +1 -0
  90. package/dist/gateway/static/root/assets/{install-connector-dialog-CntHi8Rh.js → install-connector-dialog-st2O1bez.js} +1 -1
  91. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-DnKkQoqR.js +1 -0
  92. package/dist/gateway/static/root/assets/{local-app-workbench-page-C3Lqi8E1.js → local-app-workbench-page-CKHJa4K8.js} +1 -1
  93. package/dist/gateway/static/root/assets/{local-apps-page-BoCtITdL.js → local-apps-page-D28d-sO0.js} +1 -1
  94. package/dist/gateway/static/root/assets/{local-session-drafts-CGSV1RQg.js → local-session-drafts-KkAOxXk5.js} +2 -2
  95. package/dist/gateway/static/root/assets/{locale-store-CHjsq5NR.js → locale-store-Dy0B0XDJ.js} +1 -1
  96. package/dist/gateway/static/root/assets/{logs-page-0hkRbcUR.js → logs-page-BPuHO-iA.js} +1 -1
  97. package/dist/gateway/static/root/assets/{management-api-FVu7eYXD.js → management-api-BtTRehT0.js} +1 -1
  98. package/dist/gateway/static/root/assets/{management-settings-QQB1r71U.js → management-settings-B2R43Itv.js} +1 -1
  99. package/dist/gateway/static/root/assets/{markdown-view-ihzUc4ud.js → markdown-view-ByuzuGRb.js} +1 -1
  100. package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-DffQKrjd.js → mcp-conversation-setup-page-D_6XeyXG.js} +1 -1
  101. package/dist/gateway/static/root/assets/{media-plugins-C78NkHfB.js → media-plugins-B9Q7WvNF.js} +1 -1
  102. package/dist/gateway/static/root/assets/messages-Bj6DCoic.js +3 -0
  103. package/dist/gateway/static/root/assets/{model-selector-QFZY5XNN.js → model-selector-8FTrQQ2N.js} +1 -1
  104. package/dist/gateway/static/root/assets/{models-hub-cache-BrD6r5Qs.js → models-hub-cache-DMBOw544.js} +1 -1
  105. package/dist/gateway/static/root/assets/{new-session-preferences-gb411vZP.js → new-session-preferences-CxCn2Jxk.js} +1 -1
  106. package/dist/gateway/static/root/assets/note-detail-panel-BTNX68oO.js +7 -0
  107. package/dist/gateway/static/root/assets/note-image-lightbox-D20oZuOM.js +1 -0
  108. package/dist/gateway/static/root/assets/{notes-api-D5SvfybU.js → notes-api-M1FuRZbW.js} +1 -1
  109. package/dist/gateway/static/root/assets/{notes-page-RPfvHnl6.js → notes-page-FocipOyc.js} +2 -2
  110. package/dist/gateway/static/root/assets/{oauth-api-DnMpUoyx.js → oauth-api-Dza1tHcr.js} +1 -1
  111. package/dist/gateway/static/root/assets/{oauth-provider-connect-DGYky6ut.js → oauth-provider-connect-BPNIEiMv.js} +1 -1
  112. package/dist/gateway/static/root/assets/{page-context-capture-button-CVHz9b6c.js → page-context-capture-button-DpGnxSrD.js} +1 -1
  113. package/dist/gateway/static/root/assets/{page-context-draft-Bk7jVvAG.js → page-context-draft-CHAS3BY3.js} +1 -1
  114. package/dist/gateway/static/root/assets/{page-header-store-NP7MCIaP.js → page-header-store-BXED3zhV.js} +1 -1
  115. package/dist/gateway/static/root/assets/{personal-avatar-1TVnHakL.js → personal-avatar-BCk4KoeZ.js} +1 -1
  116. package/dist/gateway/static/root/assets/{personal-page-Dt1d3tQT.js → personal-page-CSc2n5UD.js} +1 -1
  117. package/dist/gateway/static/root/assets/{personal-profile-settings-XiT1MgTK.js → personal-profile-settings-C86FBPOH.js} +1 -1
  118. package/dist/gateway/static/root/assets/{personal-settings-panel-bcw04REt.js → personal-settings-panel-BlPLE0Ip.js} +1 -1
  119. package/dist/gateway/static/root/assets/{phone-dependencies-card-B4QsgIEF.js → phone-dependencies-card-BCob98OY.js} +1 -1
  120. package/dist/gateway/static/root/assets/{phone-model-connection-Dk5kE1Ll.js → phone-model-connection-D-CcYcch.js} +1 -1
  121. package/dist/gateway/static/root/assets/{phone-model-picker-CFoxQiws.js → phone-model-picker-eMe7fmZu.js} +1 -1
  122. package/dist/gateway/static/root/assets/{phone-settings-page-Bv1xm8sh.js → phone-settings-page-D7yXeGmR.js} +1 -1
  123. package/dist/gateway/static/root/assets/{phone-workspace-store-DGaibcsi.js → phone-workspace-store-CcA_vo-t.js} +1 -1
  124. package/dist/gateway/static/root/assets/{plugin-details-dialog-FcOJaeP0.js → plugin-details-dialog-BAmodjSZ.js} +1 -1
  125. package/dist/gateway/static/root/assets/{preference-select-fields-B-yK91If.js → preference-select-fields-BBd5CWkM.js} +1 -1
  126. package/dist/gateway/static/root/assets/{preview-runtime-FtWOW5i4.js → preview-runtime-DUJ7XhMP.js} +3 -3
  127. package/dist/gateway/static/root/assets/product-automation-feedback-BDFpFrSs.js +1 -0
  128. package/dist/gateway/static/root/assets/{product-open-page-C09VEZjY.js → product-open-page-t3hsoYql.js} +1 -1
  129. package/dist/gateway/static/root/assets/{product-preview-content-B3mzl6-f.js → product-preview-content-BM0pjf0F.js} +1 -1
  130. package/dist/gateway/static/root/assets/{product-preview-modal-5kTp_7Qk.js → product-preview-modal-CLQcCVjI.js} +2 -2
  131. package/dist/gateway/static/root/assets/project-detail-page-CK_EN6Jq.js +7 -0
  132. package/dist/gateway/static/root/assets/{project-understanding-4IyHVmus.js → project-understanding-CwtdVbMP.js} +1 -1
  133. package/dist/gateway/static/root/assets/{projects-page-C-9x23LR.js → projects-page-ESAmJ4I_.js} +1 -1
  134. package/dist/gateway/static/root/assets/{providers-api-D9NuB7w3.js → providers-api-CR7FJzt-.js} +1 -1
  135. package/dist/gateway/static/root/assets/recording-upload-DrgujKBt.js +1 -0
  136. package/dist/gateway/static/root/assets/{registry-api-CDpUAb2R.js → registry-api-CaBz9f4g.js} +1 -1
  137. package/dist/gateway/static/root/assets/{remote-access-hub-DVTs8pwO.js → remote-access-hub-CB-Js5gd.js} +1 -1
  138. package/dist/gateway/static/root/assets/{resource-unavailable-CZlqZYk-.js → resource-unavailable-DiPPmZsR.js} +1 -1
  139. package/dist/gateway/static/root/assets/right-workspace-store-CcRApllu.js +1 -0
  140. package/dist/gateway/static/root/assets/{route-preload-CzorjVc9.js → route-preload-Ab7Zw-df.js} +2 -2
  141. package/dist/gateway/static/root/assets/{routine-panel-n4IstC8Y.js → routine-panel-DzdJGicv.js} +2 -2
  142. package/dist/gateway/static/root/assets/{runtime-tools-api-BhS0RWf2.js → runtime-tools-api-utBemmh4.js} +1 -1
  143. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-jTbGPGeA.js → runtime-tools-settings-panel-ChXrIluB.js} +1 -1
  144. package/dist/gateway/static/root/assets/{service-recommendation-list-wfd0Mjtu.js → service-recommendation-list-Dm5GcMRy.js} +1 -1
  145. package/dist/gateway/static/root/assets/{session-api-CR3NLqvs.js → session-api-vEn4BzjV.js} +1 -1
  146. package/dist/gateway/static/root/assets/{session-manager-C2MCS4C5.js → session-manager-7nbjJYyy.js} +2 -2
  147. package/dist/gateway/static/root/assets/{sessions-page-9ibCNP9o.js → sessions-page-B__ftjgG.js} +1 -1
  148. package/dist/gateway/static/root/assets/settings-advanced-gate-DV-_ZdXD.js +1 -0
  149. package/dist/gateway/static/root/assets/{settings-advanced-section-CTLdGPvx.js → settings-advanced-section-DhKzGl03.js} +1 -1
  150. package/dist/gateway/static/root/assets/{settings-mode-store-CCQVvItG.js → settings-mode-store-CQofc337.js} +1 -1
  151. package/dist/gateway/static/root/assets/{settings-page-DsM_f07M.js → settings-page-CzW5GM5r.js} +1 -1
  152. package/dist/gateway/static/root/assets/{settings-page-header-C21Iw2rD.js → settings-page-header-CiS6x6sn.js} +1 -1
  153. package/dist/gateway/static/root/assets/{settings-page-layout-BXcLlp6p.js → settings-page-layout-B-rj_rso.js} +1 -1
  154. package/dist/gateway/static/root/assets/{setup-interaction-page-W2F5ZaR_.js → setup-interaction-page-DTgwtj55.js} +1 -1
  155. package/dist/gateway/static/root/assets/{setup-status-panel-BFNwZuhp.js → setup-status-panel-BhKPMIds.js} +1 -1
  156. package/dist/gateway/static/root/assets/{share-link-dialog-2JjvWs0q.js → share-link-dialog-WR7Op1vL.js} +1 -1
  157. package/dist/gateway/static/root/assets/{share-preview-page-C32Mq-BY.js → share-preview-page-DonmTI11.js} +1 -1
  158. package/dist/gateway/static/root/assets/{shares-api-BhWvN3LS.js → shares-api-CoRLwDnw.js} +1 -1
  159. package/dist/gateway/static/root/assets/{shares-settings-BDGbs8wz.js → shares-settings-UA91fiMV.js} +1 -1
  160. package/dist/gateway/static/root/assets/{skill-api-BG9A1WF0.js → skill-api-BE-iPtTQ.js} +1 -1
  161. package/dist/gateway/static/root/assets/{skill-list-api-B26hHnXq.js → skill-list-api-Dsfjdtuu.js} +1 -1
  162. package/dist/gateway/static/root/assets/{skill-reload-api-B9Eu5Yk_.js → skill-reload-api-BIZJWow-.js} +1 -1
  163. package/dist/gateway/static/root/assets/{skills-page-kL8E5zgi.js → skills-page-1wvItQag.js} +1 -1
  164. package/dist/gateway/static/root/assets/{space-api-_uKFiASp.js → space-api-E8VbAaEl.js} +1 -1
  165. package/dist/gateway/static/root/assets/space-page-BCzDsNJd.js +2 -0
  166. package/dist/gateway/static/root/assets/{space-workbook-BAwHwK6O.js → space-workbook-CwltZeHG.js} +1 -1
  167. package/dist/gateway/static/root/assets/{system-settings-panel-0e2zfQLt.js → system-settings-panel-03a25GEc.js} +1 -1
  168. package/dist/gateway/static/root/assets/{task-detail-page-DdCpNW8K.js → task-detail-page-B_YXsT9W.js} +1 -1
  169. package/dist/gateway/static/root/assets/{task-header-title-CLt_lmjb.js → task-header-title-bZVPIbyR.js} +1 -1
  170. package/dist/gateway/static/root/assets/{task-result-presentation-CgvcqEMD.js → task-result-presentation-_VWkiekf.js} +1 -1
  171. package/dist/gateway/static/root/assets/{task-run-issue-notice-8FX876PP.js → task-run-issue-notice-BXOES2t9.js} +1 -1
  172. package/dist/gateway/static/root/assets/{tasks-CvOAtEHv.js → tasks-D8bnpu0N.js} +1 -1
  173. package/dist/gateway/static/root/assets/{terminal-panel-store-Cy90Ix5U.js → terminal-panel-store-BOHv5O2x.js} +1 -1
  174. package/dist/gateway/static/root/assets/{theme-store-CvG266p8.js → theme-store-XNsFzxSj.js} +1 -1
  175. package/dist/gateway/static/root/assets/{tracing-settings-page-Cx_fOH70.js → tracing-settings-page-Y9z2HoGj.js} +1 -1
  176. package/dist/gateway/static/root/assets/{tunnel-api-Cph-ZBBy.js → tunnel-api-XHGjcUi9.js} +1 -1
  177. package/dist/gateway/static/root/assets/turn-outcome-Bf3N3Bmj.js +1 -0
  178. package/dist/gateway/static/root/assets/{understanding-activity-store-CN4JzOIO.js → understanding-activity-store-BDBAkksk.js} +1 -1
  179. package/dist/gateway/static/root/assets/{understanding-refresh-store-BuZZ1_VH.js → understanding-refresh-store-D7gBfD26.js} +1 -1
  180. package/dist/gateway/static/root/assets/{usage-page-Du42x0ej.js → usage-page-DxESTMwa.js} +1 -1
  181. package/dist/gateway/static/root/assets/{use-autosave-B_WH_LBE.js → use-autosave-D7zZrcsj.js} +1 -1
  182. package/dist/gateway/static/root/assets/{use-composer-attachments-BEuyorVm.js → use-composer-attachments-DWiIdMIi.js} +1 -1
  183. package/dist/gateway/static/root/assets/{use-file-preview-expanded-Cehu0745.js → use-file-preview-expanded-CA9vFUTT.js} +1 -1
  184. package/dist/gateway/static/root/assets/{use-generated-media-CzRbgtcv.js → use-generated-media-DX4_ne7C.js} +1 -1
  185. package/dist/gateway/static/root/assets/{use-personal-profile-D4gLM6Wi.js → use-personal-profile-CaCORKeL.js} +1 -1
  186. package/dist/gateway/static/root/assets/{use-personal-work-B25WRGHj.js → use-personal-work-D0tMU1bP.js} +1 -1
  187. package/dist/gateway/static/root/assets/{use-realtime-voice-CV3GIt_T.js → use-realtime-voice-D9k997EW.js} +1 -1
  188. package/dist/gateway/static/root/assets/{use-share-link-WKZLlEqr.js → use-share-link-CqV3o-VZ.js} +1 -1
  189. package/dist/gateway/static/root/assets/{use-workspace-tree-C0C861cb.js → use-workspace-tree-nnrez9-d.js} +1 -1
  190. package/dist/gateway/static/root/assets/{user-model-page-AK2U8vGc.js → user-model-page-CpVdbSxS.js} +1 -1
  191. package/dist/gateway/static/root/assets/{voice-api-key-field-BqXQj51r.js → voice-api-key-field-CVi3dBKx.js} +1 -1
  192. package/dist/gateway/static/root/assets/{voice-config-api-sXEIG6lz.js → voice-config-api-DZbcg7qD.js} +1 -1
  193. package/dist/gateway/static/root/assets/voice-input-shortcut-events-CwKpIInD.js +1 -0
  194. package/dist/gateway/static/root/assets/{voice-player-store-CTbnOdeM.js → voice-player-store-DT0f9GPa.js} +1 -1
  195. package/dist/gateway/static/root/assets/{voice-settings-JpPo3BvX.js → voice-settings-CJdWnHas.js} +1 -1
  196. package/dist/gateway/static/root/assets/{work-discovery-overlay-BjfTRFX8.js → work-discovery-overlay-qEN1Ikir.js} +1 -1
  197. package/dist/gateway/static/root/assets/{work-discovery-page-CSRkFiXc.js → work-discovery-page-JjCyt1Kw.js} +1 -1
  198. package/dist/gateway/static/root/assets/{working-directory-picker-modal-DgM21YVT.js → working-directory-picker-modal-DX6bRmkQ.js} +1 -1
  199. package/dist/gateway/static/root/assets/{workspace-api-CQOuWbVv.js → workspace-api-CD_6YyPI.js} +2 -2
  200. package/dist/gateway/static/root/assets/workspace-editor-agent-store-BuYdf4CO.js +1 -0
  201. package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-CmMueTmW.js → workspace-file-preview-dialog-DPHnm_7A.js} +1 -1
  202. package/dist/gateway/static/root/assets/{workspace-open-location-menu-BAbIGS01.js → workspace-open-location-menu-BdXn5F2i.js} +1 -1
  203. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-e8HJFnTs.js → xopc-cloud-account-card-CLM7hfkN.js} +1 -1
  204. package/dist/gateway/static/root/index.html +97 -97
  205. package/dist/package.js +1 -1
  206. package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
  207. package/dist/packages/gateway-contract/src/task-display.js +1 -1
  208. package/dist/packages/gateway-contract/src/task-research-result.js +5 -0
  209. package/dist/packages/realtime-client/src/index.js +6 -1
  210. package/dist/packages/realtime-protocol/src/browser-preview.js +111 -0
  211. package/dist/packages/realtime-protocol/src/index.js +5 -1
  212. package/dist/src/agent/agent-manager.d.ts +2 -2
  213. package/dist/src/agent/agent-manager.js +6 -3
  214. package/dist/src/agent/commands/command-registry.js +2 -1
  215. package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
  216. package/dist/src/agent/embedded/execution-tool-policy.js +7 -3
  217. package/dist/src/agent/embedded/run-turn.js +9 -3
  218. package/dist/src/agent/mcp/continuation-guard.js +2 -1
  219. package/dist/src/agent/mcp/conversation-setup.js +2 -1
  220. package/dist/src/agent/mcp/discovery.js +2 -1
  221. package/dist/src/agent/orchestration/child-run-monitor.js +2 -1
  222. package/dist/src/agent/session/interaction-policy-state.js +2 -1
  223. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +24 -16
  224. package/dist/src/agent/tools/browser/tool/schemas.d.ts +1 -0
  225. package/dist/src/agent/tools/browser/tool/schemas.js +6 -1
  226. package/dist/src/agent/tools/clarify-tool.js +1 -1
  227. package/dist/src/agent/tools/factory.js +9 -1
  228. package/dist/src/agent/tools/personal-task-tool.js +79 -16
  229. package/dist/src/agent/tools/session-recall-tool.js +10 -2
  230. package/dist/src/agent/tools/skill-install-tool.js +2 -1
  231. package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
  232. package/dist/src/agent/tools/task-result-tool.js +10 -9
  233. package/dist/src/agent/tools/web.js +5 -3
  234. package/dist/src/agent/tools/xopc-use-tool.js +11 -5
  235. package/dist/src/automations/capabilities/write.js +2 -1
  236. package/dist/src/automations/mcp-source.js +2 -1
  237. package/dist/src/browser/drivers/browser-driver.d.ts +1 -0
  238. package/dist/src/browser/drivers/extension-driver.d.ts +2 -0
  239. package/dist/src/browser/drivers/extension-driver.js +11 -1
  240. package/dist/src/browser/runtime/browser-runtime.d.ts +6 -0
  241. package/dist/src/browser/runtime/browser-runtime.js +13 -1
  242. package/dist/src/capabilities/runtime/dispatcher.d.ts +6 -0
  243. package/dist/src/capabilities/runtime/dispatcher.js +47 -12
  244. package/dist/src/channels/attachments/inbound-persist.js +1 -0
  245. package/dist/src/channels/attachments/outbound-tts-persist.js +1 -0
  246. package/dist/src/channels/message-journal.js +2 -1
  247. package/dist/src/cli/cli-log-level-preset.js +5 -1
  248. package/dist/src/cli/commands/mcp.js +44 -5
  249. package/dist/src/cli/index.js +9 -1
  250. package/dist/src/computer/flows.js +2 -1
  251. package/dist/src/config/schema.d.ts +18 -0
  252. package/dist/src/config/schema.js +6 -0
  253. package/dist/src/connectors/composio-triggers.js +2 -1
  254. package/dist/src/endpoint-tools/delegation.js +2 -1
  255. package/dist/src/endpoint-tools/device-capability-grants.js +2 -1
  256. package/dist/src/endpoint-tools/execution-actor.js +2 -1
  257. package/dist/src/endpoint-tools/folder-connections.js +2 -1
  258. package/dist/src/endpoint-tools/invocation-service.js +2 -1
  259. package/dist/src/endpoint-tools/provider-catalog.js +2 -1
  260. package/dist/src/endpoint-tools/provider-operation-status.js +2 -1
  261. package/dist/src/endpoint-tools/runtime.js +2 -1
  262. package/dist/src/execution-environments/session-environment-service.js +1 -1
  263. package/dist/src/files/workspace-file-spaces.d.ts +4 -0
  264. package/dist/src/files/workspace-file-spaces.js +14 -0
  265. package/dist/src/gateway/file-space-service.d.ts +1 -1
  266. package/dist/src/gateway/file-space-service.js +2 -8
  267. package/dist/src/gateway/hono/app.js +29 -8
  268. package/dist/src/gateway/hono/lib/extension-store.js +2 -1
  269. package/dist/src/gateway/hono/lib/mcp-dispatcher.d.ts +2 -0
  270. package/dist/src/gateway/hono/lib/mcp-dispatcher.js +19 -0
  271. package/dist/src/gateway/hono/routes/browser.js +38 -0
  272. package/dist/src/gateway/hono/routes/capability-operations.d.ts +1 -0
  273. package/dist/src/gateway/hono/routes/capability-operations.js +6 -3
  274. package/dist/src/gateway/hono/routes/device-push.js +7 -2
  275. package/dist/src/gateway/hono/routes/execution-environments.js +4 -0
  276. package/dist/src/gateway/hono/routes/lazy-bundles.js +19 -0
  277. package/dist/src/gateway/hono/routes/mcp-bridge.d.ts +3 -0
  278. package/dist/src/gateway/hono/routes/mcp-bridge.js +87 -0
  279. package/dist/src/gateway/hono/routes/mcp-remote.d.ts +3 -0
  280. package/dist/src/gateway/hono/routes/mcp-remote.js +169 -0
  281. package/dist/src/gateway/hono/routes/notifications.js +11 -7
  282. package/dist/src/gateway/hono/routes/personal-agent.js +2 -1
  283. package/dist/src/gateway/hono/routes/projects.js +2 -3
  284. package/dist/src/gateway/hono/routes/session-command-handler.js +2 -1
  285. package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -0
  286. package/dist/src/gateway/security/gateway-scopes.js +2 -0
  287. package/dist/src/gateway/service/agent-runner.js +9 -4
  288. package/dist/src/gateway/service/config-coordinator.d.ts +9 -0
  289. package/dist/src/gateway/service/session-command-service.js +4 -2
  290. package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
  291. package/dist/src/gateway/service/session-input-coordinator.js +30 -2
  292. package/dist/src/gateway/service/session-preparation-worker.js +6 -2
  293. package/dist/src/gateway/service.d.ts +6 -0
  294. package/dist/src/gateway/service.js +44 -3
  295. package/dist/src/local-apps/access-audit.js +2 -1
  296. package/dist/src/local-apps/automation-proposals.js +2 -1
  297. package/dist/src/local-apps/capabilities/automation-policy.js +2 -1
  298. package/dist/src/local-apps/capabilities/delegate.js +2 -1
  299. package/dist/src/local-apps/execution-authority.js +2 -1
  300. package/dist/src/local-apps/p1-services.js +2 -1
  301. package/dist/src/local-apps/public-assets.js +2 -1
  302. package/dist/src/local-apps/service.js +2 -1
  303. package/dist/src/local-apps/store.js +2 -1
  304. package/dist/src/mcp/callback-config.d.ts +5 -0
  305. package/dist/src/mcp/callback-config.js +16 -0
  306. package/dist/src/mcp/capability-server.d.ts +1 -2
  307. package/dist/src/mcp/capability-server.js +34 -79
  308. package/dist/src/mcp/connection-grants.d.ts +15 -0
  309. package/dist/src/mcp/connection-grants.js +73 -0
  310. package/dist/src/mcp/delegation.d.ts +329 -0
  311. package/dist/src/mcp/delegation.js +610 -0
  312. package/dist/src/mcp/gateway-http-client.d.ts +2 -2
  313. package/dist/src/mcp/gateway-http-client.js +4 -4
  314. package/dist/src/mcp/product-tools.d.ts +7 -0
  315. package/dist/src/mcp/product-tools.js +292 -0
  316. package/dist/src/mcp/remote-auth.d.ts +8 -0
  317. package/dist/src/mcp/remote-auth.js +51 -0
  318. package/dist/src/mcp/remote-config.d.ts +11 -0
  319. package/dist/src/mcp/remote-config.js +31 -0
  320. package/dist/src/mcp/remote-grants.d.ts +20 -0
  321. package/dist/src/mcp/remote-grants.js +60 -0
  322. package/dist/src/mcp/run-callback-subscriptions.d.ts +13 -0
  323. package/dist/src/mcp/run-callback-subscriptions.js +17 -0
  324. package/dist/src/mcp/run-callbacks.d.ts +6 -0
  325. package/dist/src/mcp/run-callbacks.js +125 -0
  326. package/dist/src/mcp/tool-contract.d.ts +30 -0
  327. package/dist/src/mcp/tool-contract.js +81 -0
  328. package/dist/src/mcp/workspace-search.d.ts +16 -0
  329. package/dist/src/mcp/workspace-search.js +68 -0
  330. package/dist/src/media/index.js +4 -1
  331. package/dist/src/media/media-reference.js +2 -1
  332. package/dist/src/media/session-references.js +4 -2
  333. package/dist/src/media/store.js +2 -1
  334. package/dist/src/media/uri.js +17 -12
  335. package/dist/src/music-generation/artifact.js +2 -1
  336. package/dist/src/music-generation/settings.js +2 -1
  337. package/dist/src/notes/capabilities/write.js +2 -1
  338. package/dist/src/notifications/device-store.js +1 -1
  339. package/dist/src/notifications/platform-push.d.ts +2 -1
  340. package/dist/src/notifications/platform-push.js +4 -3
  341. package/dist/src/notifications/service.js +4 -4
  342. package/dist/src/personal-agent/proactivity/repository.js +2 -1
  343. package/dist/src/personal-agent/proactivity/service.js +2 -1
  344. package/dist/src/personal-agent/reply-result.js +4 -2
  345. package/dist/src/personal-agent/result-reader.d.ts +2 -0
  346. package/dist/src/personal-agent/result-reader.js +12 -1
  347. package/dist/src/personal-agent/specialist-capabilities.js +3 -2
  348. package/dist/src/phone/assistance.js +2 -1
  349. package/dist/src/phone/location-environment.js +2 -1
  350. package/dist/src/phone/repository.js +2 -1
  351. package/dist/src/phone/setup/service.js +2 -1
  352. package/dist/src/projects/index.js +2 -2
  353. package/dist/src/projects/project-kind.d.ts +0 -7
  354. package/dist/src/projects/project-kind.js +1 -6
  355. package/dist/src/projects/project-service.js +1 -9
  356. package/dist/src/realtime/browser-preview-ice.d.ts +2 -0
  357. package/dist/src/realtime/browser-preview-ice.js +42 -0
  358. package/dist/src/realtime/browser-preview.d.ts +45 -0
  359. package/dist/src/realtime/browser-preview.js +191 -0
  360. package/dist/src/realtime/runtime.d.ts +4 -1
  361. package/dist/src/realtime/runtime.js +53 -2
  362. package/dist/src/session/store.js +2 -1
  363. package/dist/src/share/hosted-session-share.js +2 -1
  364. package/dist/src/share/note-share-revocation.js +2 -1
  365. package/dist/src/share/share-store.js +2 -1
  366. package/dist/src/share/site-share-store.js +2 -1
  367. package/dist/src/space/ingest.js +2 -1
  368. package/dist/src/space/workbook-proposals.js +2 -1
  369. package/dist/src/space/workbook-turn.js +2 -1
  370. package/dist/src/space/worker.js +2 -1
  371. package/dist/src/storage/sqlite/durable-state.js +43 -39
  372. package/dist/src/storage/sqlite/session-creation-repository.d.ts +2 -0
  373. package/dist/src/storage/sqlite/session-creation-repository.js +24 -5
  374. package/dist/src/storage/sqlite/session-input-control-repository.js +2 -1
  375. package/dist/src/storage/sqlite/session-input-repository.js +9 -6
  376. package/dist/src/tasks/capabilities/read.js +2 -1
  377. package/dist/src/tasks/capabilities/runs.d.ts +101 -0
  378. package/dist/src/tasks/capabilities/runs.js +41 -34
  379. package/dist/src/tasks/capabilities/write.js +2 -1
  380. package/dist/src/tasks/delegated-run-result.d.ts +16 -0
  381. package/dist/src/tasks/delegated-run-result.js +47 -0
  382. package/dist/src/tasks/index.js +2 -2
  383. package/dist/src/tasks/task-application-service.d.ts +6 -0
  384. package/dist/src/tasks/task-application-service.js +20 -5
  385. package/dist/src/tasks/task-context-assembler.js +10 -6
  386. package/dist/src/tasks/task-contract-planner.js +1 -0
  387. package/dist/src/tasks/task-deliverables.js +19 -14
  388. package/dist/src/tasks/task-handoff.d.ts +20 -3
  389. package/dist/src/tasks/task-handoff.js +207 -146
  390. package/dist/src/tasks/task-json-acceptance.js +3 -2
  391. package/dist/src/tasks/task-main-update-decision-service.js +1 -0
  392. package/dist/src/tasks/task-main-update-delivery.js +4 -2
  393. package/dist/src/tasks/task-origin-repository.d.ts +2 -0
  394. package/dist/src/tasks/task-origin-repository.js +17 -0
  395. package/dist/src/tasks/task-repository.js +3 -0
  396. package/dist/src/tasks/task-research-repair.js +4 -1
  397. package/dist/src/tasks/task-research-result.d.ts +7 -0
  398. package/dist/src/tasks/task-research-result.js +132 -30
  399. package/dist/src/tasks/task-result-delivery-service.js +2 -1
  400. package/dist/src/tasks/task-run-coordinator.js +3 -2
  401. package/dist/src/tasks/task-run-repository.d.ts +2 -1
  402. package/dist/src/tasks/task-run-repository.js +9 -4
  403. package/dist/src/video-generation/artifact.js +2 -1
  404. package/dist/src/video-generation/drafts.js +2 -1
  405. package/dist/src/video-generation/repository.js +2 -1
  406. package/dist/src/video-generation/settings.js +2 -1
  407. package/package.json +3 -1
  408. package/dist/gateway/static/root/assets/block-editor-Cvy3D_4T.css +0 -1
  409. package/dist/gateway/static/root/assets/confirm-dialog-MHCmEEUZ.js +0 -1
  410. package/dist/gateway/static/root/assets/gateway-realtime-CoIFB3im.js +0 -1
  411. package/dist/gateway/static/root/assets/gateway-realtime-store-CTWm23Qi.js +0 -1
  412. package/dist/gateway/static/root/assets/index-B_TGvH_k.css +0 -1
  413. package/dist/gateway/static/root/assets/index-CJAEAcZV.js +0 -11
  414. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-DlGDLJI2.js +0 -1
  415. package/dist/gateway/static/root/assets/messages-C7QSnTdg.js +0 -3
  416. package/dist/gateway/static/root/assets/note-detail-panel-uc-5k3a2.js +0 -7
  417. package/dist/gateway/static/root/assets/note-image-lightbox-Bvjumefe.js +0 -1
  418. package/dist/gateway/static/root/assets/product-automation-feedback-DdFoCDzG.js +0 -1
  419. package/dist/gateway/static/root/assets/project-detail-page-DGPfKx5M.js +0 -7
  420. package/dist/gateway/static/root/assets/recording-upload-plrQDkLa.js +0 -1
  421. package/dist/gateway/static/root/assets/right-workspace-store-Cehybf-G.js +0 -1
  422. package/dist/gateway/static/root/assets/settings-advanced-gate-Cq4HDQu2.js +0 -1
  423. package/dist/gateway/static/root/assets/space-page-DwyuUvI3.js +0 -2
  424. package/dist/gateway/static/root/assets/turn-outcome-Dtw6OgwL.js +0 -1
  425. package/dist/gateway/static/root/assets/voice-input-shortcut-events-DN-_rY5a.js +0 -1
  426. package/dist/gateway/static/root/assets/workspace-editor-agent-store-CX8zX9eZ.js +0 -1
@@ -10,7 +10,7 @@ import { isPersonalConversation } from "../../personal-agent/repository.js";
10
10
  import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
11
11
  import { getAvailablePersonalAgentTools, personalAgentModelAvailability } from "../../personal-agent/specialist-capabilities.js";
12
12
  import { assessSpecialist, matchSpecialists } from "../../agent-matching/service.js";
13
- import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
13
+ import { parseTaskHandoffReferences, pinTaskHandoffReference } from "../../tasks/task-handoff.js";
14
14
  import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
15
15
  import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
16
16
  import { TaskResultDeliveryRepository } from "../../tasks/task-result-delivery-repository.js";
@@ -315,7 +315,7 @@ function createPersonalTaskTool(deps) {
315
315
  return {
316
316
  name: "personal_task",
317
317
  label: "Personal Task",
318
- description: "Coordinate ordinary Tasks and connected-app requests. For get, retry, instruct, cancel, answer, collaboration, entry or notifications, use the known taskId or requestId. Connected-app requests awaiting authorization have only a requestId. Use timeRange on instruct for a changed absolute query range. Always include command. When the user asks to retry after reauthorization or failure, locate the original request or Task (list by a distinctive title phrase, using the original date if needed), then call retry with its exact ID. Ask which one only if multiple plausible targets remain. Report the returned status; queued means accepted for execution, waiting_connection means the original request is preserved and may still need action in the connection panel. Do not submit a duplicate. New ordinary goal: submit objective plus useOriginalRequest=true for a self-contained active user message; the host preserves the complete original text. Otherwise supply a concise complete description. Include sourceRefs for required inputs without pre-reading files or planning the execution. Use requirements.requestedAgentId only for an explicitly named executor; preserve explicitly requested requiredSkills. The background Router chooses the executor. After successful persistence, give one short confirmation and finish; updates arrive automatically.\nRUNNING work: send instruct with the known ID and instruction for new direction, or answer with the known ID, questionId and instruction for an exact worker question. Reuse the SAME Task, without a baseline lookup. Never revise running work.\nCOMPLETED ordinary work only: get(section=\"revision\"), then revise with instruction and exact returned revisionBaseline.resultId, baselineVersion and expectedVersion. If revisionBaseline is absent, use instruct/answer; never invent placeholders. This saves a revision and queues background allocation atomically. Reuse idempotencyKey for uncertain retries. supersedesEntryIds names only earlier instruction/answer entries to replace; all other requirements remain. Independent goals use submit with pinned old-result sources; connected-app side effects require a newly authorized Request.\nsourceRefs: workspace input {kind:\"file\",sourceId:\"path\"}; prior result {kind:\"result\",resultId:\"exact result ID\",sourceId:\"exact artifact ID or unique file title\"}, omitting sourceId only for retained body; other prior inputs use stable sourceId and optional expectedVersion. The host authorizes and pins exact versions; workspace inputs are not executor cwd. Do not invent composite IDs.\nUse notifications with the known ID and notificationPreference to change an existing Task only when the user asks. Use get(section=\"status\") for a brief current status; list locates a Task or a request awaiting authorization and get(section,limit,offset) reads details. collaboration(afterSequence) returns previews; entry(entryId,bodyOffset) reads full bodies through nextBodyOffset. Read complete questions before answering. cancel only on explicit user instruction; report executionStopConfirmed accurately. retry_allocation retries selection, not arbitrary execution. Saved, delivered, executor-confirmed and verified completion are distinct; report only confirmed states.",
318
+ description: "Coordinate ordinary Tasks and connected-app requests. For get, retry, instruct, cancel, answer, collaboration, entry or notifications, use the known taskId or requestId. Connected-app requests awaiting authorization have only a requestId. Use timeRange on instruct for a changed absolute query range. Always include command. When the user asks to retry after reauthorization or failure, locate the original request or Task (list by a distinctive title phrase, using the original date if needed), then call retry with its exact ID. Ask which one only if multiple plausible targets remain. Report the returned status; queued means accepted for execution, waiting_connection means the original request is preserved and may still need action in the connection panel. Do not submit a duplicate. New ordinary goal: submit objective plus useOriginalRequest=true for a self-contained active user message; the host preserves the complete original text. Otherwise supply a concise complete description. Include sourceRefs for required inputs without pre-reading files or planning the execution. Use requirements.requestedAgentId only for an explicitly named executor; preserve explicitly requested requiredSkills. The background Router chooses the executor. After successful persistence, give one short confirmation and finish; updates arrive automatically.\nRUNNING work: send instruct with the known ID and instruction for new direction, or answer with the known ID, questionId and instruction for an exact worker question. Reuse the SAME Task, without a baseline lookup. Never revise running work.\nCOMPLETED ordinary work only: get(section=\"revision\"), then revise with instruction and exact returned revisionBaseline.resultId, baselineVersion and expectedVersion. If revisionBaseline is absent, use instruct/answer; never invent placeholders. This saves a revision and queues background allocation atomically. Reuse idempotencyKey for uncertain retries. supersedesEntryIds names only earlier instruction/answer entries to replace; all other requirements remain. Independent goals use submit with pinned old-result sources; connected-app side effects require a newly authorized Request.\nFor a follow-up depending on a delivered result, use personal_result list/get to identify the exact result and pass it as a pinned source. Saying that the original is in chat does not give the worker access. If a required input is missing, resolve it before submitting.\nsourceRefs: workspace input {kind:\"file\",sourceId:\"path\"}; prior result {kind:\"result\",resultId:\"exact result ID\",sourceId:\"exact artifact ID or unique file title\"}, omitting sourceId only for retained body; other prior inputs use stable sourceId and optional expectedVersion. The host authorizes and pins exact versions; workspace inputs are not executor cwd. Do not invent composite IDs.\nUse notifications with the known ID and notificationPreference to change an existing Task only when the user asks. Use get(section=\"status\") for a brief current status; list locates a Task or a request awaiting authorization and get(section,limit,offset) reads details. collaboration(afterSequence) returns previews; entry(entryId,bodyOffset) reads full bodies through nextBodyOffset. Read complete questions before answering. cancel only on explicit user instruction; report executionStopConfirmed accurately. retry_allocation retries selection. For source_reference_unavailable on an unstarted task, supply complete replacement sourceRefs for its unresolved inputs. Reuse the existing task. Do not retry unchanged inputs from a background task update. Saved, delivered, executor-confirmed and verified completion are distinct; report only confirmed states.",
319
319
  parameters: PersonalTaskModelSchema,
320
320
  mutatesWorkspace: true,
321
321
  mutationScope: "external",
@@ -328,7 +328,11 @@ function createPersonalTaskTool(deps) {
328
328
  if (input.notificationPreference !== void 0 && (!isTaskNotificationPreference(input.notificationPreference) || !["submit", "notifications"].includes(input.command))) throw new Error("Invalid Task notification preference");
329
329
  if (input.dueAt !== void 0 && input.command !== "submit") throw new Error("dueAt is supported only by submit");
330
330
  if (input.taskReference !== void 0 && input.command !== "instruct") throw new Error("taskReference is supported only by instruct");
331
- if (modelInput.sourceRefs?.length && !["submit", "revise"].includes(input.command)) throw new Error("sourceRefs is supported only by submit/revise; it cannot be silently ignored by a coordination command");
331
+ if (modelInput.sourceRefs?.length && ![
332
+ "submit",
333
+ "revise",
334
+ "retry_allocation"
335
+ ].includes(input.command)) throw new Error("sourceRefs requires submit, revise, or recovery of a blocked allocation");
332
336
  const conversationId = deps.getCurrentConversationId?.();
333
337
  const ownAgentId = deps.getCurrentAgentId?.();
334
338
  if (!conversationId || !ownAgentId || !isPersonalConversation(conversationId)) throw new Error("Personal conversation context is unavailable");
@@ -461,6 +465,9 @@ function createPersonalTaskTool(deps) {
461
465
  details: {}
462
466
  };
463
467
  }
468
+ const refs = parseTaskHandoffReferences(modelInput.sourceRefs);
469
+ if (!refs) throw new Error("Invalid Task sourceRefs");
470
+ const sourceRefs = modelInput.sourceRefs && refs.map((ref) => pinTaskHandoffReference(conversationId, ref));
464
471
  let selectedProductTool = productTool;
465
472
  let pendingSelection;
466
473
  let command = input.command;
@@ -468,7 +475,9 @@ function createPersonalTaskTool(deps) {
468
475
  if (command === "submit") {
469
476
  const objective = input.objective?.trim();
470
477
  const inputId = getSessionInputState(conversationId).activeInputId;
471
- const original = input.useOriginalRequest && inputId ? getSessionInputById(conversationId, inputId) : void 0;
478
+ const activeInput = inputId ? getSessionInputById(conversationId, inputId) : void 0;
479
+ if (activeInput?.origin.type === "system" && activeInput.origin.source === "task_update") throw new Error("A Task update cannot authorize a new Task. Handle the existing Task or leave it waiting for the user.");
480
+ const original = input.useOriginalRequest ? activeInput : void 0;
472
481
  if (input.useOriginalRequest && (!original || original.kind !== "message" || !original.content.trim())) throw new Error("The active original user request is unavailable; submit a complete description instead");
473
482
  const description = [original?.content, input.description?.trim()].filter(Boolean).join("\n\n");
474
483
  if (!objective || !description) throw new Error("objective and a complete description or active original request are required");
@@ -482,7 +491,7 @@ function createPersonalTaskTool(deps) {
482
491
  sourceInput: inputId ?? toolCallId,
483
492
  brief,
484
493
  requirements,
485
- sourceRefs: modelInput.sourceRefs,
494
+ sourceRefs,
486
495
  conversationExcerpts: modelInput.conversationExcerpts,
487
496
  expectedOutputs: input.expectedOutputs,
488
497
  acceptanceCriteria: input.acceptanceCriteria,
@@ -499,7 +508,7 @@ function createPersonalTaskTool(deps) {
499
508
  requirements,
500
509
  dueAt: input.dueAt,
501
510
  notificationPreference: input.notificationPreference,
502
- sourceRefs: modelInput.sourceRefs,
511
+ sourceRefs,
503
512
  conversationExcerpts: modelInput.conversationExcerpts,
504
513
  includeConversationContext: false,
505
514
  expectedOutputs: input.expectedOutputs,
@@ -605,15 +614,16 @@ function createPersonalTaskTool(deps) {
605
614
  if (activeInput?.kind === "message" && !workerUpdate) {
606
615
  const directory = new TaskOriginRepository();
607
616
  const reference = input.taskReference?.trim();
617
+ const anchored = directory.recentResultTask(conversationId, activeInput.id, activeInput.createdAtMs) === taskId;
608
618
  if (!reference) {
609
- if (directory.list(conversationId, 1, { excludeClosed: true }).total > 1) throw new Error("Several tasks are still open. Provide taskReference quoted from the latest user message, or ask which task they mean.");
619
+ if (!anchored && directory.list(conversationId, 1, { excludeClosed: true }).total > 1) throw new Error("Several tasks are still open. Provide taskReference quoted from the latest user message, or ask which task they mean.");
610
620
  } else {
611
621
  if (!activeInput.content.toLowerCase().includes(reference.toLowerCase())) throw new Error("Provide taskReference quoted from the latest user message, or omit it for an implicit follow-up to the only open task.");
612
622
  let matches = directory.list(conversationId, 1, { query: reference });
613
623
  const shortReference = reference.replace(/(?:[这那][份个项条](?:任务)?|(?:的)?任务|\s+task)$/iu, "").trimEnd();
614
624
  if (!matches.total && shortReference && shortReference !== reference) matches = directory.list(conversationId, 1, { query: shortReference });
615
625
  if (matches.total > 1) throw new Error("The taskReference does not identify this task uniquely. Ask which task the user means without retrying this reference.");
616
- if (matches.items[0]?.id !== taskId) throw new Error("The taskReference does not identify the selected task. Use a distinctive quote from the user’s message that matches its title or objective, or ask which task they mean.");
626
+ if (matches.items[0]?.id !== taskId && !(anchored && matches.total === 0)) throw new Error("The taskReference does not identify the selected task. Use a distinctive quote from the user’s message that matches its title or objective, or ask which task they mean.");
617
627
  }
618
628
  }
619
629
  }
@@ -645,9 +655,23 @@ function createPersonalTaskTool(deps) {
645
655
  details: {}
646
656
  };
647
657
  }
648
- if (command === "get" && input.section === "revision") {
658
+ if (command === "get" && input.section === "revision" || command === "instruct") {
649
659
  const model = new TaskReadModelProjector().get(taskId);
650
- return {
660
+ if (command === "instruct" && model.revisionBaseline && model.allowedCommands.includes("revise")) return {
661
+ content: [{
662
+ type: "text",
663
+ text: JSON.stringify({
664
+ ok: false,
665
+ reason: "revision_required",
666
+ taskId,
667
+ revisionBaseline: model.revisionBaseline,
668
+ expectedVersion: model.task.version,
669
+ recovery: "Call revise on this same Task with the instruction and the returned baseline and expectedVersion."
670
+ })
671
+ }],
672
+ details: {}
673
+ };
674
+ if (command === "get") return {
651
675
  content: [{
652
676
  type: "text",
653
677
  text: JSON.stringify({
@@ -666,8 +690,6 @@ function createPersonalTaskTool(deps) {
666
690
  }
667
691
  if (command === "revise") {
668
692
  if (!input.instruction || !input.baselineResultId || !input.baselineVersion || !input.expectedVersion) throw new Error("Revision requires instruction, baseline result/version, and expected task version");
669
- const refs = parseTaskHandoffReferences(modelInput.sourceRefs);
670
- if (!refs) throw new Error("Invalid revision sourceRefs");
671
693
  const result = new TaskApplicationService().reviseCompleted({
672
694
  taskId,
673
695
  conversationId,
@@ -675,7 +697,7 @@ function createPersonalTaskTool(deps) {
675
697
  baselineResultId: input.baselineResultId,
676
698
  baselineVersion: input.baselineVersion,
677
699
  expectedVersion: input.expectedVersion,
678
- sourceRefs: refs,
700
+ sourceRefs,
679
701
  supersedesEntryIds: input.supersedesEntryIds,
680
702
  idempotencyKey: input.idempotencyKey ?? `personal-revise:${conversationId}:${toolCallId}`
681
703
  });
@@ -762,11 +784,51 @@ function createPersonalTaskTool(deps) {
762
784
  };
763
785
  }
764
786
  if (command === "retry_allocation") {
787
+ const activeInputId = getSessionInputState(conversationId).activeInputId;
788
+ const activeInput = activeInputId ? getSessionInputById(conversationId, activeInputId) : void 0;
789
+ if (!sourceRefs?.length && activeInput?.origin.type === "system" && activeInput.origin.source === "task_update") throw new Error("An unchanged allocation cannot be retried from a background Task update");
790
+ const expectedVersion = new TaskRepository().require(taskId).version;
791
+ if (sourceRefs?.length) {
792
+ const mutation = {
793
+ taskId,
794
+ type: "retry_allocation",
795
+ expectedVersion,
796
+ sourceRefs
797
+ };
798
+ if (deps.authorizeCapability && !await deps.authorizeCapability("xopc.tasks.command", mutation)) throw new Error("Task access denied");
799
+ const result = new TaskApplicationService().execute({
800
+ taskId,
801
+ expectedVersion,
802
+ idempotencyKey: input.idempotencyKey ?? `allocation-sources:${taskId}:${toolCallId}`,
803
+ command: { type: "retry_allocation" },
804
+ allocationSources: sourceRefs,
805
+ actor: {
806
+ kind: "agent",
807
+ id: ownAgentId
808
+ }
809
+ });
810
+ if (result.ok) deps.dispatchTaskRuns?.();
811
+ const response = result.ok === false ? {
812
+ ok: false,
813
+ reason: result.reason
814
+ } : {
815
+ ok: true,
816
+ taskId,
817
+ allocation: result.model.allocation
818
+ };
819
+ return {
820
+ content: [{
821
+ type: "text",
822
+ text: JSON.stringify(response)
823
+ }],
824
+ details: {}
825
+ };
826
+ }
765
827
  command = "command";
766
828
  args = {
767
829
  taskId,
768
830
  type: "retry_allocation",
769
- expectedVersion: new TaskRepository().require(taskId).version
831
+ expectedVersion
770
832
  };
771
833
  } else if (command === "instruct" || command === "answer") {
772
834
  const body = input.instruction?.trim();
@@ -794,9 +856,10 @@ function createPersonalTaskTool(deps) {
794
856
  command,
795
857
  args
796
858
  }, signal, void 0);
797
- if ((input.command === "answer" || input.command === "instruct") && input.taskId && result.details.result && result.details.result.ok !== false) {
859
+ if (input.command === "answer" && input.taskId && result.details.result && result.details.result.ok !== false) {
798
860
  const allocation = new TaskAllocationRepository().get(input.taskId);
799
- if (allocation && ["blocked", "failed"].includes(allocation.status)) {
861
+ const question = input.questionId ? new TaskCollaborationRepository().get(input.questionId) : void 0;
862
+ if (allocation?.status === "blocked" && allocation.reason_code === "needs_input" && question?.taskId === input.taskId && question.authorKind === "system" && question.authorId === "task-router" && question.createdAt >= allocation.updated_at) {
800
863
  new TaskApplicationService().execute({
801
864
  taskId: input.taskId,
802
865
  expectedVersion: new TaskRepository().require(input.taskId).version,
@@ -7,6 +7,7 @@ const SessionRecallSchema = Type.Object({
7
7
  maxLength: 500,
8
8
  description: "Keywords, an exact phrase, path, URL, ID, date, or name to find in this session."
9
9
  }),
10
+ matchMode: Type.Optional(Type.Union([Type.Literal("keyword"), Type.Literal("phrase")], { description: "Use keyword for multiple search terms, or phrase for exact wording. Defaults to exact phrase first with a keyword fallback." })),
10
11
  limit: Type.Optional(Type.Integer({
11
12
  minimum: 1,
12
13
  maximum: 20,
@@ -51,10 +52,17 @@ function createSessionRecallTool(deps) {
51
52
  const query = input.query.trim();
52
53
  const limit = Math.min(20, Math.max(1, input.limit ?? 8));
53
54
  const maxChars = Math.min(2e4, Math.max(500, input.maxCharsPerResult ?? 6e3));
54
- const matches = deps.getSessionStore().recallSession(conversationId, query, {
55
+ const store = deps.getSessionStore();
56
+ const options = {
55
57
  limit,
56
58
  ...input.beforeSeq ? { beforeSeq: input.beforeSeq } : {},
57
- ...deps.maxOutputChars ? { orderBySeq: true } : {}
59
+ ...deps.maxOutputChars ? { orderBySeq: true } : {},
60
+ ...input.matchMode ? { matchMode: input.matchMode } : {}
61
+ };
62
+ let matches = store.recallSession(conversationId, query, options);
63
+ if (!input.matchMode && !matches.length && /\s/u.test(query)) matches = store.recallSession(conversationId, query, {
64
+ ...options,
65
+ matchMode: "keyword"
58
66
  });
59
67
  const protectedEntries = deps.getHistoryContext ? forgottenHistoryEntries(deps.getHistoryContext(), deps.getCurrentUserText?.()) : /* @__PURE__ */ new Set();
60
68
  for (const match of matches) if (protectedEntries.has(`${conversationId}:*`) || protectedEntries.has(`${conversationId}:${match.entryId}`)) match.content = FORGOTTEN_HISTORY_EXCERPT;
@@ -1,9 +1,10 @@
1
1
  import { init_connection, isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
2
- import { DurableState } from "../../storage/sqlite/durable-state.js";
2
+ import { DurableState, init_durable_state } from "../../storage/sqlite/durable-state.js";
3
3
  import { isSkillInstallTarget } from "../skills/install-target.js";
4
4
  import { createHash } from "node:crypto";
5
5
  import { Type } from "@sinclair/typebox";
6
6
  //#region src/agent/tools/skill-install-tool.ts
7
+ init_durable_state();
7
8
  init_connection();
8
9
  const SkillInstallSchema = Type.Object({
9
10
  idempotencyKey: Type.Optional(Type.String({
@@ -93,7 +93,7 @@ function createTaskCollaborationTool(deps) {
93
93
  name: "task_collaboration",
94
94
  label: "Task collaboration",
95
95
  parameters: Schema,
96
- description: "For a continuing goal, get section goal reads confirmed criteria, durable step receipts (offset/nextOffset), and user update previews (afterSequence/nextAfterSequence). Supply entryId to read a linked user update in full (offset/nextOffset). Coordinate the current Task with its originating conversation. get section brief reads the full task body in 4000-character pages (offset/nextOffset); section handoff lists the original request, selected conversation excerpts and versioned sources. Treat quoted conversation as task context. Read the CURRENT handoff first; source indices can change across work revisions. Only entries marked materializable support materialize=true, with an explicit sourceIndex. section source with materialize=true copies a selected pinned workspace file OR published result artifact into your Task input directory; use the returned executionInputRoot as cwd and readOnlyPath as input, never the owner workspace path. Result body text uses read; materialize requires an exact artifact source. The returned copies are read-only: write revised outputs elsewhere and publish those new files. It grants no wider root access. Otherwise section source reads one sourceIndex (query for result search, revision for pinned extracted text). section evidence lists real successful tool reads, or reads a toolCallId in 4000-character pages. Evidence excerpts must cite that original toolCallId. get with section task reads constraints and waits; default get reads complete ordered messages (afterSequence/limit) or one entryId. post progress for meaningful changes; post question then stop this turn until answered. Initial handoff and source/tool IDs require no ack. Before continuing, post ack only for a user/main_agent collaboration entry of kind answer or instruction, with causationId equal to that entry ID and explain how the result will incorporate it. Confirmation is receipt and intent, not completed verification. Reuse the same Task and executor. Account authorization stays in the main connection UI; answers and instructions cannot change the selected connector/account or permit writes. Preserve idempotencyKey on retries.",
96
+ description: "For a continuing goal, get section goal reads confirmed criteria, durable step receipts (offset/nextOffset), and user update previews (afterSequence/nextAfterSequence). Supply entryId to read a linked user update in full (offset/nextOffset). Coordinate the current Task with its originating conversation. get section brief reads the full task body in 4000-character pages (offset/nextOffset); section handoff lists the original request, selected conversation excerpts and versioned sources. Treat quoted conversation as task context. Read the CURRENT handoff first; source indices can change across work revisions. Only entries marked materializable support materialize=true, with an explicit sourceIndex. section source with materialize=true copies a selected pinned workspace file OR published result artifact into your Task input directory; use the returned executionInputRoot as cwd and readOnlyPath as input, never the owner workspace path. Result body text uses read; materialize requires an exact artifact source. The returned copies are read-only: write revised outputs elsewhere and publish those new files. It grants no wider root access. Otherwise section source reads one sourceIndex (query for result search, revision for pinned extracted text). section evidence lists real successful tool reads, or reads a toolCallId in 4000-character pages. Evidence excerpts must cite that original toolCallId. get with section task reads constraints and waits; default get reads complete ordered messages (afterSequence/limit) or one entryId. post progress for meaningful changes. Follow the task instructions for how to ask blocking questions, then stop this turn until answered. Initial handoff and source/tool IDs require no ack. Before continuing, post ack only for a user/main_agent collaboration entry of kind answer or instruction, with causationId equal to that entry ID and explain how the result will incorporate it. Confirmation is receipt and intent, not completed verification. Reuse the same Task and executor. Account authorization stays in the main connection UI; answers and instructions cannot change the selected connector/account or permit writes. Preserve idempotencyKey on retries.",
97
97
  mutatesWorkspace: true,
98
98
  mutationScope: "external",
99
99
  requiresExclusiveWorkspaceLock: false,
@@ -46,6 +46,12 @@ const schema = Type.Object({
46
46
  maxItems: 50,
47
47
  uniqueItems: true
48
48
  })),
49
+ replacementArtifactIds: Type.Optional(Type.Array(Type.String({ minLength: 1 }), {
50
+ minItems: 1,
51
+ maxItems: 50,
52
+ uniqueItems: true,
53
+ description: "With explicit mode=amend and no finalArtifactIds, supply only the new receipts. Use sources: [] and claims: [] when the existing evidence is unchanged."
54
+ })),
49
55
  mode: Type.Optional(Type.Union([Type.Literal("replace"), Type.Literal("amend")])),
50
56
  retireClaimIds: Type.Optional(Type.Array(id, { maxItems: 40 })),
51
57
  sources: Type.Array(Type.Object({
@@ -69,10 +75,7 @@ const schema = Type.Object({
69
75
  required: ["toolCallId", "excerptRange"],
70
76
  not: { required: ["excerpt"] }
71
77
  }]
72
- }), {
73
- minItems: 1,
74
- maxItems: 40
75
- }),
78
+ }), { maxItems: 40 }),
76
79
  claims: Type.Array(Type.Object({
77
80
  id,
78
81
  statement: Type.String({
@@ -88,17 +91,14 @@ const schema = Type.Object({
88
91
  minItems: 1,
89
92
  maxItems: 8
90
93
  })
91
- }, { additionalProperties: false }), {
92
- minItems: 1,
93
- maxItems: 40
94
- })
94
+ }, { additionalProperties: false }), { maxItems: 40 })
95
95
  }, { additionalProperties: false });
96
96
  function createTaskResultTool(getConversationId) {
97
97
  return {
98
98
  name: "publish_task_result",
99
99
  label: "Publish research conclusions",
100
100
  parameters: schema,
101
- description: "For sources prefer toolCallId plus excerptRange {start,end} copied from evidence receipts, and OMIT excerpt. Ranges use Unicode character offsets, at most 1000 characters; the host extracts the original successful read exactly so code escapes and commands cannot corrupt quotes. Supply exactly one of excerptRange or a short exact excerpt. Never include the input command as output. When this execution published files, finalArtifactIds is required: explicitly select the exact artifact IDs from publication receipts for the final delivery. Exclude intermediate, failed, obsolete and unrelated files. [] explicitly selects a text-only final result. New submissions replace this final selection; no historical union. Submit Task research evidence for per-criterion review; publish required files first. Initial submission creates the ledger; subsequent submissions default to amend so earlier evidence is retained. Use explicit replace only for a complete replacement ledger. During repair retain stable source/claim IDs, update targeted claims and retire obsolete/wrong claim IDs with retireClaimIds. All retained claims are reviewed again. Reviewer support/note/checks fields are read-only; never send them back in sources or claims. Never drop valid calculation/input evidence merely to fix a file. Negative assertions such as \"never reran a script\" need an observable, scoped execution record; do not invent proof of absence or add an unnecessary absolute negative claim. Keep prohibitions as constraints, and retire unsupported optional claims while retaining required verified findings. Sources require short contiguous exact excerpts from successful read_file/read_media/image/web/exec/session_status results or publication receipts (including image_generate) in this TaskRun. Use image observations for visual criteria; generation/publication alone does not verify appearance or confirm delivery to the originating chat. Never concatenate passages, invent call IDs, or cite an earlier review as factual evidence. Use task_collaboration get section evidence to list/read original toolCallIds. Use finalText to submit the exact chat deliverable for content checks. It is not a source for external factual claims. On source_quote_mismatch follow the recovery instruction; never repeat unchanged sources. Prefer original inputs; the host reads published reports/scripts. URL is optional; actual web metadata is preserved. Claims reference source IDs and distinguish fact/inference/recommendation. Publication receipts prove availability, not prices. This binds provenance and runs model review, not independent fact certification. Resubmit changed evidence or adopted directions; do not endlessly repeat unchanged data when review is unavailable. Do not use outside a Task.",
101
+ description: "For sources prefer toolCallId plus excerptRange {start,end} copied from evidence receipts, and OMIT excerpt. Ranges use Unicode character offsets, at most 1000 characters; the host extracts the original successful read exactly so code escapes and commands cannot corrupt quotes. Supply exactly one of excerptRange or a short exact excerpt. Never include the input command as output. When this execution published files, use finalArtifactIds to select the exact receipts for the initial or changed set of outputs. For republication of files already selected under the current requirements, use mode=amend and replacementArtifactIds with just the replacement receipts. Exclude intermediate, failed, obsolete and unrelated files. [] explicitly selects a text-only final result. New submissions replace this final selection; no historical union. Submit Task research evidence for per-criterion review; publish required files first. Initial submission creates the ledger; subsequent submissions default to amend so earlier evidence is retained. Use explicit replace only for a complete replacement ledger. During repair retain stable source/claim IDs, update targeted claims and retire obsolete/wrong claim IDs with retireClaimIds. All retained claims are reviewed again. Reviewer support/note/checks fields are read-only; never send them back in sources or claims. Never drop valid calculation/input evidence merely to fix a file. Negative assertions such as \"never reran a script\" need an observable, scoped execution record; do not invent proof of absence or add an unnecessary absolute negative claim. Keep prohibitions as constraints, and retire unsupported optional claims while retaining required verified findings. Sources require short contiguous exact excerpts from successful read_file/read_media/image/web/exec/session_status results or publication receipts (including image_generate) in this TaskRun. Use image observations for visual criteria; generation/publication alone does not verify appearance or confirm delivery to the originating chat. Never concatenate passages, invent call IDs, or cite an earlier review as factual evidence. Use task_collaboration get section evidence to list/read original toolCallIds. Use finalText to submit the exact chat deliverable for content checks. It is not a source for external factual claims. On source_quote_mismatch follow the recovery instruction; never repeat unchanged sources. Prefer original inputs; the host reads published reports/scripts. URL is optional; actual web metadata is preserved. Claims reference source IDs and distinguish fact/inference/recommendation. Publication receipts prove availability, not prices. This binds provenance and runs model review, not independent fact certification. Resubmit changed evidence or adopted directions; do not endlessly repeat unchanged data when review is unavailable. Do not use outside a Task.",
102
102
  supportsParallel: false,
103
103
  mutationScope: "none",
104
104
  idempotent: false,
@@ -115,6 +115,7 @@ function createTaskResultTool(getConversationId) {
115
115
  readyForCompletion,
116
116
  ...readyForCompletion ? {} : { nextAction: "The saved ledger is not fully verified. Before finishing, amend evidence for required unsupported findings; retire optional unsupported claims with retireClaimIds while preserving valid required evidence. Do not replay completed or uncertain operations just to change the ledger. If a required finding cannot be verified safely, retain an honest partial result." },
117
117
  review: research.review,
118
+ finalArtifactIds: research.finalArtifactIds,
118
119
  claims: research.claims,
119
120
  checks: research.checks,
120
121
  instructionChecks: research.instructionChecks
@@ -38,7 +38,7 @@ function searchToolResult(query, count, response) {
38
38
  }
39
39
  };
40
40
  }
41
- function searchToolError(error, signal) {
41
+ function searchToolError(query, count, error, signal) {
42
42
  const failure = classifySearchError(error, signal);
43
43
  return {
44
44
  content: [{
@@ -46,6 +46,8 @@ function searchToolError(error, signal) {
46
46
  text: `Search error (${failure.kind}): ${failure.message}`
47
47
  }],
48
48
  details: {
49
+ query,
50
+ count,
49
51
  results: [],
50
52
  error: failure.message,
51
53
  failure: searchFailureInfo(failure),
@@ -75,7 +77,7 @@ function createWebSearchTool(getConfig) {
75
77
  }
76
78
  };
77
79
  } catch (error) {
78
- const result = searchToolError(error, signal);
80
+ const result = searchToolError(params.query, count, error, signal);
79
81
  return {
80
82
  ...result,
81
83
  details: {
@@ -96,7 +98,7 @@ function createWebSearchTool(getConfig) {
96
98
  return {
97
99
  sourceRequests: registry.sourceRequests,
98
100
  items: responses.map((item) => {
99
- const result = item.response ? searchToolResult(item.query, item.count, item.response) : searchToolError(new SearchError(item.error), signal);
101
+ const result = item.response ? searchToolResult(item.query, item.count, item.response) : searchToolError(item.query, item.count, new SearchError(item.error), signal);
100
102
  return {
101
103
  id: item.id,
102
104
  result: {
@@ -7,7 +7,7 @@ import { TaskCommandSchema, TaskContextInputSchema, TaskWorkspaceDestinationSche
7
7
  import { AutomationCancelOutputSchema, AutomationDeleteOutputSchema, AutomationMutationOutputSchema, AutomationReadAllInputSchema, AutomationReadAllOutputSchema, AutomationReadOutputSchema, AutomationRecoveryOutputSchema, AutomationRunMutationOutputSchema, CapabilityCallSchema, CapabilityResourceInputSchema, NoteDeleteOutputSchema, NoteGetOutputSchema, ProjectCreateInputSchema, ProjectDeleteInputSchema, ProjectDeleteOutputSchema, ProjectEditInputSchema, ProjectMilestoneCreateInputSchema, ProjectMilestoneDeleteInputSchema, ProjectMilestoneDeleteOutputSchema, ProjectMilestoneOutputSchema, ProjectMilestoneUpdateInputSchema, ProjectMutationOutputSchema, ProjectResolveWorkspaceInputSchema, ProjectResolveWorkspaceOutputSchema, ProjectSetPinnedInputSchema, ProjectUpdateCreateInputSchema, ProjectUpdateOutputSchema, TaskRunCancelInputSchema, TaskRunCancelOutputSchema, TaskRunFeedbackInputSchema, TaskRunFeedbackOutputSchema } from "../../../packages/gateway-contract/src/capabilities.js";
8
8
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
9
9
  import { TaskRepository } from "../../tasks/task-repository.js";
10
- import { TaskRunRepository } from "../../tasks/task-run-repository.js";
10
+ import { TaskRunRepository, mcpDelegatedRunPrincipal } from "../../tasks/task-run-repository.js";
11
11
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
12
12
  import "../../storage/sqlite/index.js";
13
13
  import "../../activity/index.js";
@@ -1265,10 +1265,16 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
1265
1265
  ok: false,
1266
1266
  error: "Task is closed"
1267
1267
  };
1268
- if (worker && kind === "question" && !["running", "verifying"].includes(runs.getActiveRoot(taskId)?.status ?? "")) return {
1269
- ok: false,
1270
- error: "An active TaskRun is required before asking the owner"
1271
- };
1268
+ if (worker && kind === "question") {
1269
+ if (mcpDelegatedRunPrincipal(active?.runId ? runs.get(active.runId) : runs.getActiveRoot(taskId))) return {
1270
+ ok: false,
1271
+ error: "Use clarify to ask the MCP requester and pause this run."
1272
+ };
1273
+ if (!["running", "verifying"].includes(runs.getActiveRoot(taskId)?.status ?? "")) return {
1274
+ ok: false,
1275
+ error: "An active TaskRun is required before asking the owner"
1276
+ };
1277
+ }
1272
1278
  const causationId = trimString(args.causationId);
1273
1279
  if ((kind === "ack" || kind === "answer") && !causationId) return {
1274
1280
  ok: false,
@@ -1,6 +1,6 @@
1
1
  import { AutomationCancelOutputSchema, AutomationDeleteInputSchema, AutomationDeleteOutputSchema, AutomationMutationOutputSchema, AutomationReadAllInputSchema, AutomationReadAllOutputSchema, AutomationReadOutputSchema, AutomationRecoveryOutputSchema, AutomationReplayEventInputSchema, AutomationRetryDeliveryInputSchema, AutomationRunMutationOutputSchema, AutomationSetEnabledInputSchema, CapabilityResourceInputSchema } from "../../../packages/gateway-contract/src/capabilities.js";
2
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
- import { DurableState } from "../../storage/sqlite/durable-state.js";
3
+ import { DurableState, init_durable_state } from "../../storage/sqlite/durable-state.js";
4
4
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
5
5
  import { init_session_repository } from "../../storage/sqlite/session-repository.js";
6
6
  import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
@@ -19,6 +19,7 @@ import { personalScheduleInput } from "../../personal-agent/schedules.js";
19
19
  import { z } from "zod";
20
20
  //#region src/automations/capabilities/write.ts
21
21
  init_src();
22
+ init_durable_state();
22
23
  init_session_repository();
23
24
  const triggerRequest = z.union([AutomationTriggerSchema, z.object({
24
25
  kind: z.literal("schedule"),
@@ -1,4 +1,4 @@
1
- import { DurableState } from "../storage/sqlite/durable-state.js";
1
+ import { DurableState, init_durable_state } from "../storage/sqlite/durable-state.js";
2
2
  import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
3
3
  import { init_session_repository } from "../storage/sqlite/session-repository.js";
4
4
  import { connectorPrincipalForSession } from "../connectors/principal.js";
@@ -8,6 +8,7 @@ import { mcpConfigRevision } from "../agent/mcp/connection-drafts.js";
8
8
  import { createHash } from "node:crypto";
9
9
  import { z } from "zod";
10
10
  //#region src/automations/mcp-source.ts
11
+ init_durable_state();
11
12
  init_session_repository();
12
13
  const AutomationMcpSourceInput = z.object({
13
14
  serverId: z.string().min(1).max(64),
@@ -7,6 +7,7 @@ export type BrowserPrimitiveInput = Exclude<BrowserActionInput, BrowserNavigateI
7
7
  export interface BrowserDriver {
8
8
  readonly kind: 'playwright' | 'extension' | 'desktop';
9
9
  readonly abortClosesSession?: boolean;
10
+ previewEndpoint?(sessionId: string): string | undefined;
10
11
  connect(): Promise<void>;
11
12
  disconnect(): Promise<void>;
12
13
  createSession(sessionId: string): Promise<void>;
@@ -11,6 +11,7 @@ export declare class ExtensionDriver implements BrowserDriver {
11
11
  private readonly visualFallback;
12
12
  private readonly release;
13
13
  readonly kind: "extension";
14
+ private readonly previewEndpoints;
14
15
  constructor(provider: ExtensionProvider, timeoutMs: number, visualFallback: boolean, release: () => Promise<void>);
15
16
  connect(): Promise<void>;
16
17
  disconnect(): Promise<void>;
@@ -20,6 +21,7 @@ export declare class ExtensionDriver implements BrowserDriver {
20
21
  observe(sessionId: string, input: BrowserObserveInput, signal?: AbortSignal): Promise<BrowserObservation>;
21
22
  perform(sessionId: string, input: BrowserPrimitiveInput, signal?: AbortSignal): Promise<BrowserControlResult>;
22
23
  tabs(sessionId: string, input: BrowserTabsInput, signal?: AbortSignal): Promise<BrowserControlResult>;
24
+ previewEndpoint(sessionId: string): string | undefined;
23
25
  private send;
24
26
  }
25
27
  export {};
@@ -1,6 +1,7 @@
1
1
  //#region src/browser/drivers/extension-driver.ts
2
2
  var ExtensionDriver = class {
3
3
  kind = "extension";
4
+ previewEndpoints = /* @__PURE__ */ new Map();
4
5
  constructor(provider, timeoutMs, visualFallback, release) {
5
6
  this.provider = provider;
6
7
  this.timeoutMs = timeoutMs;
@@ -12,6 +13,7 @@ var ExtensionDriver = class {
12
13
  await this.provider.waitForConnection();
13
14
  }
14
15
  async disconnect() {
16
+ this.previewEndpoints.clear();
15
17
  await this.release();
16
18
  }
17
19
  async createSession(_sessionId) {
@@ -54,8 +56,16 @@ var ExtensionDriver = class {
54
56
  sessionId
55
57
  }, signal);
56
58
  }
59
+ previewEndpoint(sessionId) {
60
+ return this.previewEndpoints.get(sessionId);
61
+ }
57
62
  async send(input, signal) {
58
- return (await this.provider.send(input, this.timeoutMs, this.visualFallback, signal)).result;
63
+ const response = await this.provider.send(input, this.timeoutMs, this.visualFallback, signal);
64
+ if (input.sessionId) {
65
+ if (input.action === "close" || input.target?.kind === "attached_tab") this.previewEndpoints.delete(input.sessionId);
66
+ else if (response.result.ok && response.result.receipt.observation) this.previewEndpoints.set(input.sessionId, response.connectionId);
67
+ }
68
+ return response.result;
59
69
  }
60
70
  };
61
71
  //#endregion
@@ -8,6 +8,12 @@ export interface BrowserRuntimeOptions {
8
8
  canRestoreSetupSession?: (taskKey: string, sessionId: string) => boolean;
9
9
  isTrustedSetupUrl?: (taskKey: string, url: string) => boolean;
10
10
  emit?: (type: string, payload: unknown) => void;
11
+ publishPreview?: (taskKey: string, source?: {
12
+ endpointId: string;
13
+ browserSessionId: string;
14
+ tabId: number;
15
+ origin: string;
16
+ }) => void;
11
17
  resolveTarget?: (taskKey: string) => BrowserTarget | undefined;
12
18
  retainSessionsUntilStopped?: boolean;
13
19
  }
@@ -30,6 +30,7 @@ var BrowserRuntime = class {
30
30
  return failure("DRIVER_UNAVAILABLE", error instanceof Error ? error.message : String(error));
31
31
  }
32
32
  session.lastUsedAt = Date.now();
33
+ if (["navigate", "close"].includes(input.action) || input.action === "tabs" && input.operation !== "list" || effectiveInput.target?.kind === "attached_tab") this.options.publishPreview?.(taskKey);
33
34
  this.options.emit?.("browser.action.started", {
34
35
  sessionId: session.id,
35
36
  action: input.action
@@ -42,7 +43,18 @@ var BrowserRuntime = class {
42
43
  result = failure("DRIVER_UNAVAILABLE", error instanceof Error ? error.message : String(error));
43
44
  }
44
45
  if (result.ok) {
45
- if (result.receipt.observation) session.observation = result.receipt.observation;
46
+ if (result.receipt.observation) {
47
+ session.observation = result.receipt.observation;
48
+ const endpointId = driver.previewEndpoint?.(session.id);
49
+ const tabId = Number(session.observation.tabId);
50
+ const page = URL.parse(session.observation.url);
51
+ if (endpointId && effectiveInput.target?.kind !== "attached_tab" && Number.isSafeInteger(tabId) && tabId >= 0 && page && (page.protocol === "http:" || page.protocol === "https:")) this.options.publishPreview?.(taskKey, {
52
+ endpointId,
53
+ browserSessionId: session.id,
54
+ tabId,
55
+ origin: page.origin
56
+ });
57
+ }
46
58
  this.options.emit?.("browser.action.completed", {
47
59
  sessionId: session.id,
48
60
  receipt: withoutVisual(result.receipt)
@@ -64,11 +64,17 @@ export interface ExternalCapability<I extends z.ZodType = z.ZodType, O extends z
64
64
  }
65
65
  export declare function defineExternalCapability<I extends z.ZodType, O extends z.ZodType>(definition: ExternalCapability<I, O>): ExternalCapability<I, O>;
66
66
  type CapabilityDefinition<I extends z.ZodType = z.ZodType, O extends z.ZodType = z.ZodType> = ReadCapability<I, O> | AtomicCapability<I, O> | ExternalCapability<I, O>;
67
+ type McpProjection = {
68
+ input?: z.ZodType;
69
+ output: z.ZodType;
70
+ description?: string;
71
+ };
67
72
  /** Stable JSON encoding for contract digests; rejects non-JSON values. */
68
73
  export declare function canonicalCapabilityJson(value: unknown): string;
69
74
  export declare class CapabilityDispatcher {
70
75
  private readonly entries;
71
76
  register<I extends z.ZodType, O extends z.ZodType>(definition: CapabilityDefinition<I, O>): void;
77
+ exposeToMcp(id: string, projection: McpProjection): void;
72
78
  private buildDescriptors;
73
79
  private readDescriptor;
74
80
  private visible;