@xopcai/xopc 0.0.486 → 0.0.487
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.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/transport/reliability/message-ingress.js +2 -2
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +3 -3
- package/dist/extensions/telegram/src/polling-session.js +1 -1
- package/dist/extensions/telegram/src/update-offset-store.js +2 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/extensions/weixin/src/messaging/process-message.js +2 -2
- package/dist/extensions/weixin/src/messaging/quote-cache.js +3 -1
- package/dist/extensions/weixin/src/storage/sync-buf.js +2 -1
- package/dist/gateway/server/chunks.bin +1568 -1404
- package/dist/gateway/server/chunks.json +1 -1
- package/dist/gateway/server/dependency-records.json +42 -0
- package/dist/gateway/static/root/assets/{activity-store-hSe5Nbgk.js → activity-store-CWGtissf.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BY2wRiwY.js → agent-avatar-dicebear-D4YSq8A9.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-D_UDgOr9.js → agent-avatar-display-DWv7biOS.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BrcyLG9M.js → agent-defaults-settings-panel-3xdD9dR1.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CSJC1yud.js → agent-plugin-dialog-BNvw2z1Y.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DX-t3X7K.js → agents-DcENLHHW.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DSr-PWuW.js → agents-admin-api-BzpxMKwk.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CGrHK9ij.js → api-D70-LnNE.js} +1 -1
- package/dist/gateway/static/root/assets/{api-B3T06TLl.js → api-SIYalfjE.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D6ZoYKaA.js → app-management-settings-panel-CEveRIMe.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BRb6kZT8.js → appearance-settings-CT2NLLuY.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-6xeWvMpF.js → apps-page-pEqr4fAK.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CQ5UXgZk.js → archive-plugin-xnggGfUN.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-D-gn6x5E.js → automation-api-CaBLskwk.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-B7hq0XOL.js → automation-result-state-CeGtOXK0.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-CM59-qm5.js → automation-run-list-DUpezxj4.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-C453Q-Wa.js → automation-task-card-CLayJo0S.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BLFBqaPX.js → automations-page-BKfvaA41.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DiO3Iyuj.js → automations-workspace-BRcJzgLA.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-D_zw0TgG.js → binary-plugins-DtD3acS4.js} +1 -1
- package/dist/gateway/static/root/assets/block-editor-BFDeQtYs.css +1 -0
- package/dist/gateway/static/root/assets/{block-editor-Cesz2DqP.js → block-editor-DXjBAN8L.js} +46 -46
- package/dist/gateway/static/root/assets/{browser-settings-page-BHElJSFt.js → browser-settings-page-Cgxtr2eR.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CW-vdkz6.js → capabilities-CpwoMqtm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DZrjA95P.js → capabilities-DcD15BrU.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-DQrfkrBA.js → capabilities-page-x_AS_XJ0.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-DIT2dvtc.js → capabilities-settings-panel-DMgEXxkC.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-Dcr5dgqw.js → channels-565FQAGr.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-CyvBfBbp.js → chat-agents-api-BfsNH-ht.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-B83s8HE9.js → chat-chart-block-Dpolmx0-.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-page-DWZCzxY7.js → chat-page-Bn44NcvF.js} +6 -6
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DCUuwiTt.js → chat-terminal-dock-D6fuI2tI.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-UrqPvWR1.js → command-palette-api-H3lCPfK8.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-C2Bku39S.js → composer-model-config-control-BcWrGT5D.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-MGKffwC7.js → composer-notifications-0fMBrXZD.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-a0quQ25p.js → composer-payload-handoff-DCGudJjU.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DUzQe6Bz.js → computer-settings-page-kvYzJ_j2.js} +1 -1
- package/dist/gateway/static/root/assets/confirm-dialog-yhRKgG72.js +1 -0
- package/dist/gateway/static/root/assets/{connected-providers-grid-BJKEp0SE.js → connected-providers-grid-CApjiM_x.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-B9hoSOnN.js → connection-usage-guide-C2qOP6Nx.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-e67KylnM.js → connector-service-page-DKihi3WL.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-CRGq-TSw.js → connectors-api-Dj9RbG9p.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BteRI1XM.js → connectors-page-CR6a3Mne.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DwITf4I2.js → date-picker-BX5tr0IG.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-ChG1CqR1.js → date-time-picker-CdPsuK2A.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BHoFymL4.js → desktop-pet-DRfOb9ZT.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BYeBN4jj.js → desktop-pet-settings-D6qCAFLe.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-DsjH8x76.js → dev-view-store-DrRxtile.js} +1 -1
- package/dist/gateway/static/root/assets/{device-connections-panel-DE01vyK_.js → device-connections-panel-Drbw9eRH.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-action-w1enAo76.js → device-pairing-action-Dd2YtIhH.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-Dt737tSq.js → device-pairing-wizard-wtsyHEO3.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B-eUnbng.js → directory-picker-path-field-B3YBba3x.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-authoritative-grants-DYp2nNol.js → extension-authoritative-grants-WXYRv5nA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-4jJ1uVQJ.js → extension-debug-page-CKeIq8S2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CJV5JETm.js → extension-iframe-host-Cv4PCSVv.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DGV5FC-v.js → extension-marketplace-api-e0e9OxOT.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-B4I-Y6qs.js → extension-message-router-GPlMiYyF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-lc7a84nG.js → extension-page-DcP7IEMp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-D8_mIBI0.js → extension-provider-DZ97b5uA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Uw2lfWRh.js → extension-settings-page-DIYoawnA.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BD-ams0X.js → gateway-config-swr-aAsaoOK1.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-CoIFB3im.js → gateway-realtime-egUNyhxi.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-5YcWzAfG.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-Dos1Pp84.js → gateway-restart-BY6zJgTe.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DUC1iOVK.js → gateway-settings-4TvJ0_i0.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DgmvR-hb.js → gateway-startup-retry-D0dDJJQ4.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-B7suATYU.js → global-defaults-api-9iooq81U.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-mSRCU81k.js → home-page-VMzHth7Q.js} +3 -3
- package/dist/gateway/static/root/assets/{home-task-actions-_ZAc57Y7.js → home-task-actions-iUYzLb18.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-Baz4xdZ4.js → image-generation-api-Dv4fjHaE.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DR0eLPgB.js → imports-page-WENCxW7P.js} +1 -1
- package/dist/gateway/static/root/assets/index-CaUUC83j.css +1 -0
- package/dist/gateway/static/root/assets/{index-CJAEAcZV.js → index-DwdoCbAF.js} +6 -6
- package/dist/gateway/static/root/assets/{install-connector-dialog-CntHi8Rh.js → install-connector-dialog-DNY-rpBC.js} +1 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-DHWEGna7.js +1 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-C3Lqi8E1.js → local-app-workbench-page-Dnug0YtC.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BoCtITdL.js → local-apps-page-Bjr4rrgT.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CGSV1RQg.js → local-session-drafts-Z3PoR-8i.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CHjsq5NR.js → locale-store-DgbX5Azb.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-0hkRbcUR.js → logs-page-BIZvtqSJ.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-FVu7eYXD.js → management-api-CJb5Vclf.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-QQB1r71U.js → management-settings-BjtIRkgJ.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-ihzUc4ud.js → markdown-view-lnMk_L03.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-DffQKrjd.js → mcp-conversation-setup-page-kq0dZ2Nc.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-C78NkHfB.js → media-plugins-RU49QGcW.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Clfka2Sx.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-QFZY5XNN.js → model-selector-BolKz5sx.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-BrD6r5Qs.js → models-hub-cache-CjdnTF5z.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-Qm1Et_f8.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-BVcE6TAF.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-D5SvfybU.js → notes-api-FjHO1h6b.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-RPfvHnl6.js → notes-page-B_atfwwi.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-DnMpUoyx.js → oauth-api-B1lbdI3v.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-DGYky6ut.js → oauth-provider-connect-Cy1Yy8aX.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CVHz9b6c.js → page-context-capture-button-Phh-SyES.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-Bk7jVvAG.js → page-context-draft-M04A73Ul.js} +1 -1
- package/dist/gateway/static/root/assets/{page-header-store-NP7MCIaP.js → page-header-store-CYA4Isnf.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-avatar-1TVnHakL.js → personal-avatar-DF3Frmnt.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-Dt1d3tQT.js → personal-page-DkDROUWV.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-XiT1MgTK.js → personal-profile-settings-LAAXGLKs.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-bcw04REt.js → personal-settings-panel-B6G-4av9.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-B4QsgIEF.js → phone-dependencies-card-DeBlKu7M.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-Dk5kE1Ll.js → phone-model-connection-TStZicIQ.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CFoxQiws.js → phone-model-picker-C3xcbacO.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-Bv1xm8sh.js → phone-settings-page-CllfdPFi.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-DGaibcsi.js → phone-workspace-store-CeP3GXUk.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-FcOJaeP0.js → plugin-details-dialog-Ck1dirgu.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-B-yK91If.js → preference-select-fields-DMClbggY.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-runtime-FtWOW5i4.js → preview-runtime-Cl-SoLXg.js} +3 -3
- package/dist/gateway/static/root/assets/product-automation-feedback-Bb_lbw1l.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-C09VEZjY.js → product-open-page-BWH54iuf.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-B3mzl6-f.js → product-preview-content-NOZu0WO2.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-5kTp_7Qk.js → product-preview-modal-ZKiIeKof.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-DGPfKx5M.js → project-detail-page-BTgDajpj.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-4IyHVmus.js → project-understanding-BWpcOkWw.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-C-9x23LR.js → projects-page-Dnx2AcQX.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-D9NuB7w3.js → providers-api-BRAMBKCK.js} +1 -1
- package/dist/gateway/static/root/assets/recording-upload-C0d2YjJV.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CDpUAb2R.js → registry-api-Dz4umdY3.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DVTs8pwO.js → remote-access-hub-BEIzBYdj.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-CZlqZYk-.js → resource-unavailable-82byHwG_.js} +1 -1
- package/dist/gateway/static/root/assets/{right-workspace-store-Cehybf-G.js → right-workspace-store-B8ooYVOe.js} +1 -1
- package/dist/gateway/static/root/assets/{route-preload-CzorjVc9.js → route-preload-DkUojqyb.js} +2 -2
- package/dist/gateway/static/root/assets/{routine-panel-n4IstC8Y.js → routine-panel-wJxaH-1V.js} +2 -2
- package/dist/gateway/static/root/assets/{runtime-tools-api-BhS0RWf2.js → runtime-tools-api-CQ7fTX-H.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-jTbGPGeA.js → runtime-tools-settings-panel-DZD-cEXM.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-wfd0Mjtu.js → service-recommendation-list-CFJ8WBzq.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CR3NLqvs.js → session-api-Dxhtjzoa.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-C2MCS4C5.js → session-manager-DvIGR4Sw.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-9ibCNP9o.js → sessions-page-BDPieIpD.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CaALReQD.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CTLdGPvx.js → settings-advanced-section-1R7xRVEG.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-CCQVvItG.js → settings-mode-store-D4-i8uQI.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DsM_f07M.js → settings-page-DXo8rZFt.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-C21Iw2rD.js → settings-page-header-BooYRGUH.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-BXcLlp6p.js → settings-page-layout-BeHnqGAN.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-W2F5ZaR_.js → setup-interaction-page-DqmPSRNo.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BFNwZuhp.js → setup-status-panel-c4yDTYiK.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-2JjvWs0q.js → share-link-dialog-Cvma1jxB.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C32Mq-BY.js → share-preview-page-BL6FwL4u.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-BhWvN3LS.js → shares-api-BqIBNEtd.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BDGbs8wz.js → shares-settings-BoBOd-eB.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BG9A1WF0.js → skill-api-oDg0Zlyb.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-B26hHnXq.js → skill-list-api-BvfKctht.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-B9Eu5Yk_.js → skill-reload-api-CnchMEV8.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-kL8E5zgi.js → skills-page-CFZk_0nE.js} +1 -1
- package/dist/gateway/static/root/assets/{space-api-_uKFiASp.js → space-api-C_GoZOc_.js} +1 -1
- package/dist/gateway/static/root/assets/{space-page-DwyuUvI3.js → space-page-CBSaZbyH.js} +2 -2
- package/dist/gateway/static/root/assets/{space-workbook-BAwHwK6O.js → space-workbook-B8JGuyIf.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-0e2zfQLt.js → system-settings-panel-DzNDyMOH.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DdCpNW8K.js → task-detail-page-BmWkL-KH.js} +1 -1
- package/dist/gateway/static/root/assets/{task-header-title-CLt_lmjb.js → task-header-title-CCaEJNV4.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-presentation-CgvcqEMD.js → task-result-presentation-DwEf7Xf7.js} +1 -1
- package/dist/gateway/static/root/assets/{task-run-issue-notice-8FX876PP.js → task-run-issue-notice-COE7ppvl.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-Cy90Ix5U.js → terminal-panel-store-CHQ2xJtk.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-CvG266p8.js → theme-store-Bij94a-6.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-Cx_fOH70.js → tracing-settings-page-CKH4dKSl.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-Cph-ZBBy.js → tunnel-api-ChjCCCGL.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-CN4JzOIO.js → understanding-activity-store-BD1OXjlI.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BuZZ1_VH.js → understanding-refresh-store-BSVLFuVh.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Du42x0ej.js → usage-page-v5c3aC-p.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-B_WH_LBE.js → use-autosave-teDzNJW4.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-BEuyorVm.js → use-composer-attachments-rUl5n4_a.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-Cehu0745.js → use-file-preview-expanded-BRjXpRde.js} +1 -1
- package/dist/gateway/static/root/assets/{use-generated-media-CzRbgtcv.js → use-generated-media-Bx6BscUT.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-profile-D4gLM6Wi.js → use-personal-profile-Dz3wWaGt.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-work-B25WRGHj.js → use-personal-work-D-Tgi4DZ.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-CV3GIt_T.js → use-realtime-voice-Bp81D6PV.js} +1 -1
- package/dist/gateway/static/root/assets/{use-share-link-WKZLlEqr.js → use-share-link-D5HNXEIt.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-C0C861cb.js → use-workspace-tree-DXKhfc1T.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-AK2U8vGc.js → user-model-page-B0tEc4rh.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BqXQj51r.js → voice-api-key-field-odum3GZx.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-sXEIG6lz.js → voice-config-api-CiA2cr3s.js} +1 -1
- package/dist/gateway/static/root/assets/voice-input-shortcut-events-JsEfJGJz.js +1 -0
- package/dist/gateway/static/root/assets/{voice-player-store-CTbnOdeM.js → voice-player-store-CUV5cpmX.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-JpPo3BvX.js → voice-settings-FOeRWVH4.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BjfTRFX8.js → work-discovery-overlay-CJxXUdeq.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CSRkFiXc.js → work-discovery-page-Dm0XTxsk.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-DgM21YVT.js → working-directory-picker-modal-DfyyBJpb.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-CQOuWbVv.js → workspace-api-B1JW3oZZ.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-BbfHBVhA.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-CmMueTmW.js → workspace-file-preview-dialog-kGa6o4bV.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BAbIGS01.js → workspace-open-location-menu-Dl4QsZL3.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-e8HJFnTs.js → xopc-cloud-account-card-fiyk59YU.js} +1 -1
- package/dist/gateway/static/root/index.html +94 -94
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +18 -18
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +2 -2
- package/dist/src/agent/background-review/run-background-review.js +14 -14
- package/dist/src/agent/child-agent-factory.js +4 -4
- package/dist/src/agent/commands/command-registry.js +2 -1
- package/dist/src/agent/context/coordinator.js +3 -3
- package/dist/src/agent/context/deep-recall.js +5 -5
- package/dist/src/agent/context/execution-context.js +3 -3
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +8 -4
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +10 -10
- package/dist/src/agent/embedded/run-turn.js +19 -19
- package/dist/src/agent/embedded/runs.js +1 -1
- package/dist/src/agent/embedded/session-runner.js +5 -5
- package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +5 -5
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +9 -9
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +3 -3
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +3 -3
- package/dist/src/agent/independent-execution.js +1 -1
- package/dist/src/agent/index.js +1 -1
- package/dist/src/agent/mcp/connection-drafts.js +1 -1
- package/dist/src/agent/mcp/connection-setup.js +2 -2
- package/dist/src/agent/mcp/continuation-guard.js +2 -1
- package/dist/src/agent/mcp/conversation-setup.js +2 -1
- package/dist/src/agent/mcp/discovery.js +3 -2
- package/dist/src/agent/mcp/managed-discovery.js +1 -1
- package/dist/src/agent/mcp/tool-catalog.js +1 -1
- package/dist/src/agent/mcp/transport.js +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/orchestration/child-run-monitor.js +2 -1
- package/dist/src/agent/orchestration/child-run-resume.js +3 -3
- package/dist/src/agent/orchestration/llm-turn-retry.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -3
- package/dist/src/agent/prompt/system-prompt-params.js +1 -1
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +4 -4
- package/dist/src/agent/service/process-direct-streaming.js +7 -7
- package/dist/src/agent/service/webchat-tts.js +3 -3
- package/dist/src/agent/service.js +21 -21
- package/dist/src/agent/session/interaction-policy-state.js +2 -1
- package/dist/src/agent/session/session-config-service.js +2 -2
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +7 -7
- package/dist/src/agent/tools/clarify-tool.js +1 -1
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +20 -20
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +2 -2
- package/dist/src/agent/tools/index.js +4 -4
- package/dist/src/agent/tools/knowledge-memory-tool.js +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +2 -2
- package/dist/src/agent/tools/personal-memory-tool.js +7 -7
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +2 -2
- package/dist/src/agent/tools/personal-request-tool.js +2 -2
- package/dist/src/agent/tools/personal-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +5 -5
- package/dist/src/agent/tools/session-search-tool.js +2 -2
- package/dist/src/agent/tools/skill-install-tool.js +2 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +2 -2
- package/dist/src/agent/tools/web.js +1 -1
- package/dist/src/agent/tools/workbook-tools.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +19 -13
- package/dist/src/agent-catalog/capabilities.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/write.js +3 -2
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/mcp-source.js +2 -1
- package/dist/src/automations/service/action-executor.js +2 -2
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/capabilities/capability-catalog.js +4 -4
- package/dist/src/capabilities/runtime/dispatcher.d.ts +6 -0
- package/dist/src/capabilities/runtime/dispatcher.js +48 -13
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/inbound-persist.js +1 -0
- package/dist/src/channels/attachments/outbound-tts-persist.js +1 -0
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/message-journal.js +2 -1
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/cli-log-level-preset.js +5 -1
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/mcp.js +45 -6
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/commands/tunnel.js +4 -4
- package/dist/src/cli/extension-cli-register.js +5 -5
- package/dist/src/cli/index.js +9 -1
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/flows.js +2 -1
- package/dist/src/computer/model-adapter.js +1 -1
- package/dist/src/computer/runtime.js +11 -11
- package/dist/src/config/config-file.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/schema.d.ts +18 -0
- package/dist/src/config/schema.js +6 -0
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/composio-triggers.js +2 -1
- package/dist/src/connectors/connected-source-ingestion.js +2 -2
- package/dist/src/connectors/connected-source-understanding.js +5 -5
- package/dist/src/connectors/connection-recovery-service.js +4 -4
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/endpoint-tools/delegation.js +2 -1
- package/dist/src/endpoint-tools/device-capability-grants.js +2 -1
- package/dist/src/endpoint-tools/execution-actor.js +2 -1
- package/dist/src/endpoint-tools/folder-connections.js +2 -1
- package/dist/src/endpoint-tools/invocation-service.js +4 -3
- package/dist/src/endpoint-tools/provider-catalog.js +2 -1
- package/dist/src/endpoint-tools/provider-operation-status.js +2 -1
- package/dist/src/endpoint-tools/runtime.js +2 -1
- package/dist/src/endpoint-tools/target-resolver.js +1 -1
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/cli-authorization.js +1 -1
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +3 -3
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/agent-plugins/user-config.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/api.js +2 -2
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/files/workspace-file-spaces.d.ts +4 -0
- package/dist/src/files/workspace-file-spaces.js +14 -0
- package/dist/src/gateway/agent-reactions/reaction.js +3 -3
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/file-space-service.d.ts +1 -1
- package/dist/src/gateway/file-space-service.js +2 -8
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +31 -10
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/lib/extension-store.js +2 -1
- package/dist/src/gateway/hono/lib/mcp-dispatcher.d.ts +2 -0
- package/dist/src/gateway/hono/lib/mcp-dispatcher.js +19 -0
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +6 -6
- package/dist/src/gateway/hono/routes/capability-operations.d.ts +1 -0
- package/dist/src/gateway/hono/routes/capability-operations.js +6 -3
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/device-connections.js +2 -2
- package/dist/src/gateway/hono/routes/device-targets.js +1 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +19 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +1 -1
- package/dist/src/gateway/hono/routes/location-sharing.js +1 -1
- package/dist/src/gateway/hono/routes/mcp-bridge.d.ts +3 -0
- package/dist/src/gateway/hono/routes/mcp-bridge.js +87 -0
- package/dist/src/gateway/hono/routes/mcp-remote.d.ts +3 -0
- package/dist/src/gateway/hono/routes/mcp-remote.js +169 -0
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +3 -3
- package/dist/src/gateway/hono/routes/mobile-capability-actions.js +5 -5
- package/dist/src/gateway/hono/routes/mobile-capability-panels.js +13 -13
- package/dist/src/gateway/hono/routes/mobile-model-settings.js +3 -3
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/music-generation.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/personal-agent.js +3 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +4 -4
- package/dist/src/gateway/hono/routes/phone.js +3 -3
- package/dist/src/gateway/hono/routes/projects.js +5 -5
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +3 -3
- package/dist/src/gateway/hono/routes/sessions.js +3 -3
- package/dist/src/gateway/hono/routes/shares.js +2 -2
- package/dist/src/gateway/hono/routes/side-chats.js +1 -1
- package/dist/src/gateway/hono/routes/tui.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +7 -7
- package/dist/src/gateway/hono/routes/video-generation.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +6 -6
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +2 -2
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +11 -6
- package/dist/src/gateway/service/config-coordinator.d.ts +9 -0
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +5 -5
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/session-input-coordinator.js +31 -3
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.d.ts +4 -0
- package/dist/src/gateway/service.js +65 -38
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
- package/dist/src/home-intelligence/follow-ups.js +1 -1
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/observation.js +1 -1
- package/dist/src/home-intelligence/routines.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/imports/inventory.js +2 -2
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/infra/bus/queue.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +9 -9
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/knowledge-memory/usage-policy.js +1 -1
- package/dist/src/local-apps/access-audit.js +2 -1
- package/dist/src/local-apps/automation-proposals.js +2 -1
- package/dist/src/local-apps/capabilities/automation-policy.js +2 -1
- package/dist/src/local-apps/capabilities/delegate.js +3 -2
- package/dist/src/local-apps/execution-authority.js +4 -3
- package/dist/src/local-apps/p1-services.js +4 -3
- package/dist/src/local-apps/public-assets.js +2 -1
- package/dist/src/local-apps/service.js +3 -2
- package/dist/src/local-apps/store.js +2 -1
- package/dist/src/mcp/callback-config.d.ts +5 -0
- package/dist/src/mcp/callback-config.js +16 -0
- package/dist/src/mcp/capability-server.d.ts +1 -2
- package/dist/src/mcp/capability-server.js +34 -79
- package/dist/src/mcp/connection-grants.d.ts +15 -0
- package/dist/src/mcp/connection-grants.js +73 -0
- package/dist/src/mcp/delegation.d.ts +329 -0
- package/dist/src/mcp/delegation.js +610 -0
- package/dist/src/mcp/gateway-http-client.d.ts +2 -2
- package/dist/src/mcp/gateway-http-client.js +5 -5
- package/dist/src/mcp/product-tools.d.ts +7 -0
- package/dist/src/mcp/product-tools.js +292 -0
- package/dist/src/mcp/remote-auth.d.ts +8 -0
- package/dist/src/mcp/remote-auth.js +51 -0
- package/dist/src/mcp/remote-config.d.ts +11 -0
- package/dist/src/mcp/remote-config.js +31 -0
- package/dist/src/mcp/remote-grants.d.ts +20 -0
- package/dist/src/mcp/remote-grants.js +60 -0
- package/dist/src/mcp/run-callbacks.d.ts +9 -0
- package/dist/src/mcp/run-callbacks.js +138 -0
- package/dist/src/mcp/tool-contract.d.ts +30 -0
- package/dist/src/mcp/tool-contract.js +81 -0
- package/dist/src/mcp/workspace-search.d.ts +16 -0
- package/dist/src/mcp/workspace-search.js +68 -0
- package/dist/src/media/index.js +4 -1
- package/dist/src/media/media-reference.js +2 -1
- package/dist/src/media/session-references.js +4 -2
- package/dist/src/media/store.js +2 -1
- package/dist/src/media/uri.js +17 -12
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/memory-learning/choice-observations.js +7 -7
- package/dist/src/memory-learning/source-learning.js +5 -5
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/memory-learning/work-capture.js +1 -1
- package/dist/src/memory-learning/work-review.js +3 -3
- package/dist/src/music-generation/artifact.js +3 -2
- package/dist/src/music-generation/settings.js +2 -1
- package/dist/src/music-generation/worker.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/capabilities/write.js +2 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/personal-agent/capability-service.js +1 -1
- package/dist/src/personal-agent/proactivity/repository.js +2 -1
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +7 -6
- package/dist/src/personal-agent/prompt-context.js +4 -4
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +9 -9
- package/dist/src/personal-agent/reply-result.js +4 -2
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +4 -4
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +2 -2
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/adb-driver.js +1 -1
- package/dist/src/phone/assistance.js +2 -1
- package/dist/src/phone/cloud-adb-connection.js +1 -1
- package/dist/src/phone/location-environment.js +2 -1
- package/dist/src/phone/model-adapter.js +1 -1
- package/dist/src/phone/repository.js +2 -1
- package/dist/src/phone/runtime.js +4 -4
- package/dist/src/phone/setup/service.js +2 -1
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/project-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/session/history-recall-policy.js +2 -2
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +10 -9
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -1
- package/dist/src/share/note-share-revocation.js +2 -1
- package/dist/src/share/share-store.js +2 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/share/site-share-store.js +2 -1
- package/dist/src/space/ingest.js +2 -1
- package/dist/src/space/repository.js +1 -1
- package/dist/src/space/workbook-proposals.js +2 -1
- package/dist/src/space/workbook-turn.js +2 -1
- package/dist/src/space/worker.js +2 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/durable-state.js +43 -39
- package/dist/src/storage/sqlite/session-input-control-repository.js +2 -1
- package/dist/src/storage/sqlite/session-input-repository.js +7 -5
- package/dist/src/tasks/capabilities/read.js +4 -3
- package/dist/src/tasks/capabilities/relations.js +1 -1
- package/dist/src/tasks/capabilities/runs.d.ts +101 -0
- package/dist/src/tasks/capabilities/runs.js +42 -35
- package/dist/src/tasks/capabilities/write.js +5 -4
- package/dist/src/tasks/delegated-run-result.d.ts +16 -0
- package/dist/src/tasks/delegated-run-result.js +47 -0
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +6 -6
- package/dist/src/tasks/task-allocation-service.js +6 -6
- package/dist/src/tasks/task-application-service.d.ts +5 -0
- package/dist/src/tasks/task-application-service.js +8 -4
- package/dist/src/tasks/task-context-assembler.js +8 -5
- package/dist/src/tasks/task-contract-planner.js +2 -2
- package/dist/src/tasks/task-deliverables.js +19 -14
- package/dist/src/tasks/task-delivery-checks.js +1 -1
- package/dist/src/tasks/task-execution-capabilities.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.d.ts +16 -3
- package/dist/src/tasks/task-handoff.js +165 -145
- package/dist/src/tasks/task-json-acceptance.js +4 -3
- package/dist/src/tasks/task-main-update-decision-service.js +2 -2
- package/dist/src/tasks/task-main-update-delivery.js +1 -1
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-repository.js +3 -0
- package/dist/src/tasks/task-research-repair.js +2 -1
- package/dist/src/tasks/task-research-result.js +3 -3
- package/dist/src/tasks/task-result-delivery-service.js +4 -3
- package/dist/src/tasks/task-retry-service.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +8 -7
- package/dist/src/tasks/task-run-dispatcher.js +2 -2
- package/dist/src/tasks/task-run-repository.d.ts +2 -1
- package/dist/src/tasks/task-run-repository.js +9 -4
- package/dist/src/tui/backend-services.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +13 -13
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-capabilities.js +2 -2
- package/dist/src/tui/tui-commands.js +3 -3
- package/dist/src/tui/tui-management.js +8 -8
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +6 -6
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +2 -2
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/user-model/usage-policy.js +1 -1
- package/dist/src/video-generation/artifact.js +3 -2
- package/dist/src/video-generation/drafts.js +2 -1
- package/dist/src/video-generation/repository.js +2 -1
- package/dist/src/video-generation/settings.js +2 -1
- package/dist/src/video-generation/worker.js +1 -1
- package/dist/src/voice/realtime/conversation-context.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +4 -4
- package/dist/src/voice/realtime/omniRoute.js +1 -1
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/dist/src/voice/realtime/user-context.js +1 -1
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/bailian-plan-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/bailian-plan-speech.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/voice/tts/speak-core.js +2 -2
- package/dist/src/work-discovery/service.js +6 -6
- package/package.json +3 -1
- package/dist/gateway/static/root/assets/block-editor-Cvy3D_4T.css +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-MHCmEEUZ.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CTWm23Qi.js +0 -1
- package/dist/gateway/static/root/assets/index-B_TGvH_k.css +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-DlGDLJI2.js +0 -1
- package/dist/gateway/static/root/assets/messages-C7QSnTdg.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-uc-5k3a2.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-Bvjumefe.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-DdFoCDzG.js +0 -1
- package/dist/gateway/static/root/assets/recording-upload-plrQDkLa.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cq4HDQu2.js +0 -1
- package/dist/gateway/static/root/assets/voice-input-shortcut-events-DN-_rY5a.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CX8zX9eZ.js +0 -1
|
@@ -4,7 +4,7 @@ import { verifiedTaskCriteria } from "../../packages/gateway-contract/src/tasks.
|
|
|
4
4
|
import { PERSONAL_WORKER_RESULT_GUIDANCE } from "../../packages/gateway-contract/src/task-display.js";
|
|
5
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
6
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
7
|
-
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
7
|
+
import { TaskRunRepository, init_task_run_repository, mcpDelegatedRunPrincipal } from "./task-run-repository.js";
|
|
8
8
|
import { init_request_repository, personalRequestForTask } from "../personal-agent/request-repository.js";
|
|
9
9
|
import "../storage/sqlite/index.js";
|
|
10
10
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
@@ -123,11 +123,13 @@ function assembleTaskContext(conversationId, userQuery) {
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
function buildTaskExecutionDirective(conversationId) {
|
|
126
|
-
const
|
|
127
|
-
const
|
|
126
|
+
const conversations = new TaskConversationRepository();
|
|
127
|
+
const active = isXopcDatabaseOpen() ? conversations.resolveActiveExecutionSession(conversationId) : void 0;
|
|
128
|
+
const brief = active ? getTaskExecutionBrief(active.taskId) : void 0;
|
|
128
129
|
if (!brief) return "";
|
|
129
130
|
const { task, remainingCriteria } = brief;
|
|
130
|
-
const
|
|
131
|
+
const mcpDelegation = active?.runId && mcpDelegatedRunPrincipal(new TaskRunRepository().get(active.runId));
|
|
132
|
+
const handoff = conversations.getLatestHandoff(task.id);
|
|
131
133
|
const handoffPayload = handoff?.toConversationId === conversationId ? JSON.stringify(handoff.payload).slice(0, 12e3) : "";
|
|
132
134
|
const contract = task.contract;
|
|
133
135
|
const contextEdges = new TaskContextRepository().list(task.id);
|
|
@@ -172,7 +174,8 @@ function buildTaskExecutionDirective(conversationId) {
|
|
|
172
174
|
handoffPayload ? `Handoff snapshot: ${handoffPayload}` : "",
|
|
173
175
|
collaboration.length ? `Recent task collaboration:\n${collaboration.map((entry) => `- ${entry.sequence} id=${entry.id} ${entry.authorKind} ${entry.kind} superseded=${superseded.has(entry.id)} delivery=${entry.deliveryStatus ?? "none"}${entry.causationId ? ` replyTo=${entry.causationId}` : ""}: ${JSON.stringify(entry.body)}`).join("\n")}` : "",
|
|
174
176
|
`Initial handoff snapshots, source references and toolCallIds are not collaboration entries and require no ack. Before continuing, acknowledge only delivered user/main_agent collaboration entries of kind answer or instruction with ${postTool}, kind ack, causationId equal to its entry ID. Explain your interpretation and how the final output will incorporate it. Acknowledgement records receipt and intent, not proof of completion. Do not act on or acknowledge superseded directions. Apply all remaining applicable user directions on this same Task; report its actual adoption and any unmet requirements in the final result.`,
|
|
175
|
-
`Report meaningful progress with ${postTool}
|
|
177
|
+
`Report meaningful progress with ${postTool}.`,
|
|
178
|
+
mcpDelegation ? "If blocked by a missing decision, ask the MCP requester with clarify and stop this execution turn until answered." : "If blocked, post a question and stop this execution turn until answered.",
|
|
176
179
|
(contract.brief?.length ?? 0) > 12e3 ? "Task details above are an excerpt. Read every page with task_collaboration(command=\"get\", section=\"brief\", offset=0) and nextOffset before execution." : "",
|
|
177
180
|
connected ? `Connected request ${connected.requestId}: retain connector ${connected.connectorId} and account ${connected.accountId}. Text answers and instructions do not authorize account changes or writes. Use personal_request_connection for expired access; only the main connection UI can authorize recovery. Publish the latest adopted result with personal_request_result after all answers/instructions, then call publish_task_result using exact evidence from successful xopc_tool_execute reads to verify the saved summary, structured items and coverage. Correct and resave the connected result before resubmitting evidence. Do not use unavailable artifact tools.` : "",
|
|
178
181
|
connected ? "Connected results and structured items return to the originating conversation automatically after this Task completes." : "For user-facing files, publish completed outputs with publish_artifacts before finishing. image_generate already publishes its images. Return structured artifact references rather than only local file paths. Published final outcomes are delivered automatically to the originating chat. Keep the final summary short and distinguish generated outputs from verified or accepted results.",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { getAgentDefaultChatModelConfig, init_schema } from "../config/schema.js";
|
|
4
3
|
import { hasUnlocalizedTaskText, resolveTaskLocale } from "./task-language.js";
|
|
4
|
+
import { getAgentDefaultChatModelConfig, init_schema } from "../config/schema.js";
|
|
5
5
|
import { EXECUTION_CAPABILITIES } from "./task-execution-capabilities.js";
|
|
6
6
|
import { finalReplyCharacterLimit, isChatReplyOutput } from "./task-final-reply.js";
|
|
7
|
-
import { defineTaskContract } from "./task-contract-definition.js";
|
|
8
7
|
import { completeTaskModelCall } from "./task-model-call.js";
|
|
8
|
+
import { defineTaskContract } from "./task-contract-definition.js";
|
|
9
9
|
//#region src/tasks/task-contract-planner.ts
|
|
10
10
|
init_schema();
|
|
11
11
|
init_logger();
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
3
|
import { parseProductDeliveryEnvelope } from "../../packages/gateway-contract/src/product-delivery.js";
|
|
3
4
|
import { parseFileResourceArtifactUri, parseTurnOutcome } from "../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
5
|
import { TASK_RESULT_DELIVERY_TYPE, parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
5
6
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
7
|
//#region src/tasks/task-deliverables.ts
|
|
7
|
-
init_src();
|
|
8
|
-
init_transaction();
|
|
9
|
-
const transcriptDeliverable = `(
|
|
10
|
-
(json_extract(e.payload_json, '$.type') = 'custom' AND json_extract(e.payload_json, '$.customType') = 'turn_outcome'
|
|
11
|
-
AND json_array_length(e.payload_json, '$.data.deliverables') > 0)
|
|
12
|
-
OR (e.role = 'custom' AND json_extract(e.payload_json, '$.customType') = '${TASK_RESULT_DELIVERY_TYPE}'
|
|
13
|
-
AND json_array_length(e.payload_json, '$.details.outcome.deliverables') > 0)
|
|
14
|
-
OR (e.role = 'assistant' AND json_array_length(e.payload_json, '$.metadata.turnOutcome.deliverables') > 0
|
|
15
|
-
AND COALESCE(json_extract(e.payload_json, '$.metadata.hiddenFromClient'), 0) = 0
|
|
16
|
-
AND COALESCE(json_extract(e.payload_json, '$.metadata.voiceConversation'), 0) = 0)
|
|
17
|
-
OR (e.role IN ('toolResult', 'tool') AND json_extract(e.payload_json, '$.details.delivery.primary.kind')
|
|
18
|
-
IN ('note', 'chat_preview', 'local_app') AND json_extract(e.payload_json, '$.details.delivery.operation') IN ('created', 'updated'))
|
|
19
|
-
)`;
|
|
20
8
|
function isAvailableDeliverable(item, now) {
|
|
21
9
|
return item.availability === "available" && Boolean(item.uri || item.shareUrl || item.workspaceRelativePath) && (!item.expiresAt || Date.parse(item.expiresAt) > now);
|
|
22
10
|
}
|
|
@@ -143,5 +131,22 @@ function publishedDeliverables(row, now) {
|
|
|
143
131
|
});
|
|
144
132
|
return candidates;
|
|
145
133
|
}
|
|
134
|
+
var transcriptDeliverable;
|
|
135
|
+
var init_task_deliverables = __esmMin((() => {
|
|
136
|
+
init_src();
|
|
137
|
+
init_transaction();
|
|
138
|
+
transcriptDeliverable = `(
|
|
139
|
+
(json_extract(e.payload_json, '$.type') = 'custom' AND json_extract(e.payload_json, '$.customType') = 'turn_outcome'
|
|
140
|
+
AND json_array_length(e.payload_json, '$.data.deliverables') > 0)
|
|
141
|
+
OR (e.role = 'custom' AND json_extract(e.payload_json, '$.customType') = '${TASK_RESULT_DELIVERY_TYPE}'
|
|
142
|
+
AND json_array_length(e.payload_json, '$.details.outcome.deliverables') > 0)
|
|
143
|
+
OR (e.role = 'assistant' AND json_array_length(e.payload_json, '$.metadata.turnOutcome.deliverables') > 0
|
|
144
|
+
AND COALESCE(json_extract(e.payload_json, '$.metadata.hiddenFromClient'), 0) = 0
|
|
145
|
+
AND COALESCE(json_extract(e.payload_json, '$.metadata.voiceConversation'), 0) = 0)
|
|
146
|
+
OR (e.role IN ('toolResult', 'tool') AND json_extract(e.payload_json, '$.details.delivery.primary.kind')
|
|
147
|
+
IN ('note', 'chat_preview', 'local_app') AND json_extract(e.payload_json, '$.details.delivery.operation') IN ('created', 'updated'))
|
|
148
|
+
)`;
|
|
149
|
+
}));
|
|
146
150
|
//#endregion
|
|
147
|
-
|
|
151
|
+
init_task_deliverables();
|
|
152
|
+
export { init_task_deliverables, isAvailableDeliverable, listDeliverables };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { finalReplyCharacterLimit, isReplyLengthCriterion } from "./task-final-reply.js";
|
|
2
|
-
import { parseHTML } from "linkedom";
|
|
3
2
|
import MarkdownIt from "markdown-it";
|
|
3
|
+
import { parseHTML } from "linkedom";
|
|
4
4
|
//#region src/tasks/task-delivery-checks.ts
|
|
5
5
|
const markdown = new MarkdownIt({ html: true });
|
|
6
6
|
const plainChat = /^(?:(?:最终)?(?:回复|答复)为纯文本(?:聊天内容)?|(?:use |deliver )(?:a )?plain[- ]text chat (?:reply|response)|(?:the )?(?:final )?(?:chat )?(?:reply|response) (?:is|must be) plain[- ]text)(?:[,,]\s*(?:未生成任何文件|不生成(?:任何)?文件|without (?:any )?(?:files|attachments)))?$/iu;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
3
|
+
import { TaskContextRepository } from "./task-context-repository.js";
|
|
3
4
|
import { assessSpecialist } from "../agent-matching/service.js";
|
|
4
5
|
import { personalCapabilities } from "../personal-agent/capability-service.js";
|
|
5
|
-
import { TaskContextRepository } from "./task-context-repository.js";
|
|
6
6
|
import { assertTaskHandoffExecutorAccess } from "./task-handoff.js";
|
|
7
7
|
//#region src/tasks/task-execution-capabilities.ts
|
|
8
8
|
init_transaction();
|
|
@@ -4,8 +4,8 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
4
4
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
5
5
|
import { init_agent_scope, listAgentEntries } from "../agent/agent-scope.js";
|
|
6
6
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
7
|
-
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
8
7
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
8
|
+
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
9
9
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
10
10
|
//#region src/tasks/task-handoff-service.ts
|
|
11
11
|
init_agent_scope();
|
|
@@ -7,10 +7,8 @@ interface ConversationExcerpt {
|
|
|
7
7
|
length: number;
|
|
8
8
|
contentHash: string;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
interface TaskHandoffContent {
|
|
11
11
|
version: 1;
|
|
12
|
-
conversationId: string;
|
|
13
|
-
transcriptId: string;
|
|
14
12
|
inputId?: string;
|
|
15
13
|
originalRequest?: string;
|
|
16
14
|
conversationExcerpts?: ConversationExcerpt[];
|
|
@@ -39,6 +37,21 @@ export interface TaskHandoff {
|
|
|
39
37
|
unresolvedReferences: string[];
|
|
40
38
|
};
|
|
41
39
|
}
|
|
40
|
+
export type TaskHandoff = TaskHandoffContent & ({
|
|
41
|
+
kind?: 'conversation';
|
|
42
|
+
conversationId: string;
|
|
43
|
+
transcriptId: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'workspace_files';
|
|
46
|
+
conversationId?: never;
|
|
47
|
+
transcriptId?: never;
|
|
48
|
+
});
|
|
49
|
+
export type WorkspaceFileInput = {
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
version: string;
|
|
53
|
+
};
|
|
54
|
+
export declare function captureWorkspaceFileHandoff(taskId: string, prompt: string, files: readonly WorkspaceFileInput[]): void;
|
|
42
55
|
/** Normalize model-facing references without fetching any source on the submission path. */
|
|
43
56
|
export declare function parseTaskHandoffReferences(raw: unknown): TurnContextRef[] | null;
|
|
44
57
|
/** Pin an exact, visible passage without copying the rest of its message into the Task. */
|
|
@@ -11,19 +11,20 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
11
11
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
12
12
|
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
13
13
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
14
|
-
import {
|
|
15
|
-
import { stripRuntimeContextFromUserMessage } from "../session/user-message-display.js";
|
|
16
|
-
import { canRecallHistoryEntry } from "../session/history-recall-policy.js";
|
|
17
|
-
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
18
|
-
import { getProjectForSession } from "../projects/workspace.js";
|
|
14
|
+
import { TaskContextRepository } from "./task-context-repository.js";
|
|
19
15
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
20
16
|
import { assertPersonalResultDelegateAccess, readPersonalResult, resolvePersonalResultReference } from "../personal-agent/result-reader.js";
|
|
21
17
|
import { buildResultAgentContext } from "../agent/source-context/result-context.js";
|
|
22
18
|
import { buildTaskAgentContext } from "../agent/source-context/task-context.js";
|
|
23
19
|
import { buildUserAssertionAgentContext } from "../agent/source-context/user-assertion-context.js";
|
|
20
|
+
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
21
|
+
import { getProjectForSession } from "../projects/workspace.js";
|
|
24
22
|
import { fileSpaceId, parseFileResourceId } from "../files/file-service.js";
|
|
23
|
+
import { createWorkspaceFileSpaceService } from "../files/workspace-file-spaces.js";
|
|
25
24
|
import { NotesStore } from "../notes/store.js";
|
|
26
|
-
import {
|
|
25
|
+
import { forgottenHistoryEntries, projectUnadmittedForgottenFields } from "../memory-learning/forgotten-history.js";
|
|
26
|
+
import { canRecallHistoryEntry } from "../session/history-recall-policy.js";
|
|
27
|
+
import { stripRuntimeContextFromUserMessage } from "../session/user-message-display.js";
|
|
27
28
|
import { basename, isAbsolute, relative, resolve, sep } from "node:path";
|
|
28
29
|
import { constants } from "node:fs";
|
|
29
30
|
import { createHash } from "node:crypto";
|
|
@@ -39,6 +40,81 @@ init_session_input_repository();
|
|
|
39
40
|
init_session_instance_repository();
|
|
40
41
|
init_transaction();
|
|
41
42
|
const hash = (text) => createHash("sha256").update(text).digest("hex");
|
|
43
|
+
function handoffBaseline(taskId) {
|
|
44
|
+
const db = getSqliteDatabase();
|
|
45
|
+
return {
|
|
46
|
+
contractVersion: new TaskRepository().require(taskId).latestContractVersion,
|
|
47
|
+
assignmentEpoch: Number(db.prepare("SELECT assignment_epoch FROM task_conversation_state WHERE task_id = ?").get(taskId)?.assignment_epoch ?? 0),
|
|
48
|
+
instructionSequence: Number(db.prepare("SELECT COALESCE(MAX(sequence),0) AS n FROM task_collaboration_entries WHERE task_id = ? AND author_kind IN ('main_agent','user') AND kind IN ('instruction','answer')").get(taskId)?.n ?? 0)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function captureWorkspaceFileHandoff(taskId, prompt, files) {
|
|
52
|
+
const text = "Selected workspace file; use section source to materialize the pinned revision.";
|
|
53
|
+
persistHandoff(taskId, {
|
|
54
|
+
kind: "workspace_files",
|
|
55
|
+
version: 1,
|
|
56
|
+
originalRequest: prompt,
|
|
57
|
+
interpretation: prompt,
|
|
58
|
+
baseline: handoffBaseline(taskId),
|
|
59
|
+
sources: files.map((file) => ({
|
|
60
|
+
kind: "file",
|
|
61
|
+
sourceId: file.id,
|
|
62
|
+
version: file.version,
|
|
63
|
+
title: file.title,
|
|
64
|
+
text,
|
|
65
|
+
truncated: true,
|
|
66
|
+
representation: "metadata",
|
|
67
|
+
purpose: "Selected task input; grants no access to the rest of the workspace",
|
|
68
|
+
contentHash: hash(text)
|
|
69
|
+
})),
|
|
70
|
+
attachments: [],
|
|
71
|
+
completeness: {
|
|
72
|
+
originalInput: "captured",
|
|
73
|
+
omitted: [],
|
|
74
|
+
unresolvedReferences: []
|
|
75
|
+
}
|
|
76
|
+
}, "Task handoff");
|
|
77
|
+
}
|
|
78
|
+
function persistHandoff(taskId, handoff, title) {
|
|
79
|
+
const context = new TaskContextRepository();
|
|
80
|
+
const kind = handoff.kind === "workspace_files" ? "workspace_file_handoff" : "personal_task_handoff";
|
|
81
|
+
const snapshot = context.captureSnapshot({
|
|
82
|
+
ownerKind: "task",
|
|
83
|
+
ownerId: taskId,
|
|
84
|
+
conversationId: handoff.conversationId,
|
|
85
|
+
query: handoff.originalRequest ?? handoff.interpretation,
|
|
86
|
+
selectedItems: [handoff],
|
|
87
|
+
contentHash: hash(JSON.stringify(handoff)),
|
|
88
|
+
relationshipPolicy: {
|
|
89
|
+
kind,
|
|
90
|
+
version: 1,
|
|
91
|
+
fullConversationIncluded: false
|
|
92
|
+
},
|
|
93
|
+
authorizationSnapshot: {
|
|
94
|
+
conversationId: handoff.conversationId,
|
|
95
|
+
transcriptId: handoff.transcriptId,
|
|
96
|
+
scope: "selected_inputs_only",
|
|
97
|
+
grantsAuthority: false
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
context.add({
|
|
101
|
+
taskId,
|
|
102
|
+
targetKind: "source",
|
|
103
|
+
targetId: snapshot.id,
|
|
104
|
+
role: "input",
|
|
105
|
+
pinned: true,
|
|
106
|
+
title,
|
|
107
|
+
metadata: {
|
|
108
|
+
kind,
|
|
109
|
+
version: 1
|
|
110
|
+
},
|
|
111
|
+
retrievalPolicy: {
|
|
112
|
+
scope: "selected_inputs_only",
|
|
113
|
+
currentAuthorizationRequired: true
|
|
114
|
+
},
|
|
115
|
+
createdBy: { kind: "system" }
|
|
116
|
+
});
|
|
117
|
+
}
|
|
42
118
|
/** Normalize model-facing references without fetching any source on the submission path. */
|
|
43
119
|
function parseTaskHandoffReferences(raw) {
|
|
44
120
|
if (raw === void 0) return [];
|
|
@@ -114,8 +190,10 @@ function parseTaskConversationExcerpts(conversationId, raw, config) {
|
|
|
114
190
|
}
|
|
115
191
|
function readTaskConversationExcerpts(handoff, config) {
|
|
116
192
|
assertTaskHandoffAccess(handoff);
|
|
193
|
+
const { conversationId } = handoff;
|
|
194
|
+
if (!conversationId) return [];
|
|
117
195
|
return (handoff.conversationExcerpts ?? []).map((excerpt) => {
|
|
118
|
-
const source = conversationExcerptSource(
|
|
196
|
+
const source = conversationExcerptSource(conversationId, excerpt.entryId, config);
|
|
119
197
|
const text = source?.content.slice(excerpt.start, excerpt.start + excerpt.length);
|
|
120
198
|
return source && text && hash(text) === excerpt.contentHash ? {
|
|
121
199
|
entryId: excerpt.entryId,
|
|
@@ -129,8 +207,7 @@ function readTaskConversationExcerpts(handoff, config) {
|
|
|
129
207
|
}
|
|
130
208
|
/** Called inside task.create's transaction; no discovery, parsing or remote IO. */
|
|
131
209
|
function captureTaskHandoff(taskId, conversationId, interpretation, references) {
|
|
132
|
-
const
|
|
133
|
-
const origin = db.prepare("SELECT origin_transcript_id, request_input_id FROM task_origin_links WHERE task_id = ?").get(taskId);
|
|
210
|
+
const origin = getSqliteDatabase().prepare("SELECT origin_transcript_id, request_input_id FROM task_origin_links WHERE task_id = ?").get(taskId);
|
|
134
211
|
const input = origin.request_input_id ? getSessionInputById(conversationId, origin.request_input_id) : void 0;
|
|
135
212
|
const omitted = [];
|
|
136
213
|
const sources = [];
|
|
@@ -162,7 +239,7 @@ function captureTaskHandoff(taskId, conversationId, interpretation, references)
|
|
|
162
239
|
}
|
|
163
240
|
const requestedSources = references ?? new TaskContextRepository().list(taskId).filter((edge) => edge.metadata.kind === "task_reference_request").flatMap((edge) => parseTurnContextRefs([edge.metadata.ref]) ?? []);
|
|
164
241
|
const conversationExcerpts = new TaskContextRepository().list(taskId).filter((edge) => edge.metadata.kind === "task_conversation_excerpt").slice(0, 3).map((edge) => edge.metadata.excerpt).filter((excerpt) => Boolean(excerpt && typeof excerpt.entryId === "string" && Number.isSafeInteger(excerpt.start) && excerpt.start >= 0 && Number.isSafeInteger(excerpt.length) && excerpt.length > 0 && excerpt.length <= 800 && /^[a-f0-9]{64}$/.test(excerpt.contentHash ?? "")));
|
|
165
|
-
|
|
242
|
+
persistHandoff(taskId, {
|
|
166
243
|
version: 1,
|
|
167
244
|
conversationId,
|
|
168
245
|
transcriptId: origin.origin_transcript_id,
|
|
@@ -172,65 +249,48 @@ function captureTaskHandoff(taskId, conversationId, interpretation, references)
|
|
|
172
249
|
sources,
|
|
173
250
|
requestedSources,
|
|
174
251
|
...conversationExcerpts.length ? { conversationExcerpts } : {},
|
|
175
|
-
baseline:
|
|
176
|
-
contractVersion: new TaskRepository().require(taskId).latestContractVersion,
|
|
177
|
-
assignmentEpoch: Number(db.prepare("SELECT assignment_epoch FROM task_conversation_state WHERE task_id = ?").get(taskId)?.assignment_epoch ?? 0),
|
|
178
|
-
instructionSequence: Number(db.prepare("SELECT COALESCE(MAX(sequence),0) AS n FROM task_collaboration_entries WHERE task_id = ? AND author_kind IN ('main_agent','user') AND kind IN ('instruction','answer')").get(taskId)?.n ?? 0)
|
|
179
|
-
},
|
|
252
|
+
baseline: handoffBaseline(taskId),
|
|
180
253
|
attachments: input?.attachments ?? [],
|
|
181
254
|
completeness: {
|
|
182
255
|
originalInput: input ? "captured" : "unavailable",
|
|
183
256
|
omitted,
|
|
184
257
|
unresolvedReferences: [...(input?.contextRefs ?? []).filter((ref) => !sources.some((source) => source.kind === ref.kind && source.sourceId === ref.sourceId)).map((ref) => `${ref.kind}:${ref.sourceId}`), ...requestedSources.map((ref) => `${ref.kind}:${ref.sourceId}`)]
|
|
185
258
|
}
|
|
186
|
-
};
|
|
187
|
-
const context = new TaskContextRepository();
|
|
188
|
-
const snapshot = context.captureSnapshot({
|
|
189
|
-
ownerKind: "task",
|
|
190
|
-
ownerId: taskId,
|
|
191
|
-
conversationId,
|
|
192
|
-
query: input?.content ?? interpretation,
|
|
193
|
-
selectedItems: [handoff],
|
|
194
|
-
contentHash: hash(JSON.stringify(handoff)),
|
|
195
|
-
relationshipPolicy: {
|
|
196
|
-
kind: "personal_task_handoff",
|
|
197
|
-
version: 1,
|
|
198
|
-
fullConversationIncluded: false
|
|
199
|
-
},
|
|
200
|
-
authorizationSnapshot: {
|
|
201
|
-
conversationId,
|
|
202
|
-
transcriptId: handoff.transcriptId,
|
|
203
|
-
scope: "selected_inputs_only",
|
|
204
|
-
grantsAuthority: false
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
context.add({
|
|
208
|
-
taskId,
|
|
209
|
-
targetKind: "source",
|
|
210
|
-
targetId: snapshot.id,
|
|
211
|
-
role: "input",
|
|
212
|
-
pinned: true,
|
|
213
|
-
title: "Task handoff",
|
|
214
|
-
metadata: {
|
|
215
|
-
kind: "personal_task_handoff",
|
|
216
|
-
version: 1
|
|
217
|
-
},
|
|
218
|
-
retrievalPolicy: {
|
|
219
|
-
scope: "selected_inputs_only",
|
|
220
|
-
currentAuthorizationRequired: true
|
|
221
|
-
},
|
|
222
|
-
createdBy: { kind: "system" }
|
|
223
|
-
});
|
|
259
|
+
}, "Task handoff");
|
|
224
260
|
}
|
|
225
261
|
function getTaskHandoff(taskId) {
|
|
226
262
|
const row = getSqliteDatabase().prepare(`SELECT selected_items_json FROM context_snapshots
|
|
227
|
-
WHERE owner_kind = 'task' AND owner_id = ? AND json_extract(relationship_policy_json, '$.kind')
|
|
263
|
+
WHERE owner_kind = 'task' AND owner_id = ? AND json_extract(relationship_policy_json, '$.kind') IN ('personal_task_handoff', 'workspace_file_handoff')
|
|
228
264
|
ORDER BY created_at DESC, rowid DESC LIMIT 1`).get(taskId);
|
|
229
265
|
return row ? JSON.parse(row.selected_items_json)[0] : void 0;
|
|
230
266
|
}
|
|
231
267
|
function assertTaskHandoffAccess(handoff) {
|
|
268
|
+
if (handoff.kind === "workspace_files") return;
|
|
232
269
|
if (readCurrentTranscriptId(getSqliteDatabase(), handoff.conversationId) !== handoff.transcriptId || handoff.inputId && !getSessionInputById(handoff.conversationId, handoff.inputId)) throw new Error("Task source input is no longer available");
|
|
233
270
|
}
|
|
271
|
+
function within(base, path) {
|
|
272
|
+
const rel = relative(base, path);
|
|
273
|
+
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
274
|
+
}
|
|
275
|
+
async function resolveHandoffFile(handoff, sourceId, config) {
|
|
276
|
+
const locator = parseFileResourceId(sourceId);
|
|
277
|
+
if (handoff.kind === "workspace_files") {
|
|
278
|
+
if (locator.spaceId.startsWith("host-")) throw new Error("Selected file is outside the workspace");
|
|
279
|
+
const { absolutePath, resource } = await createWorkspaceFileSpaceService(() => config).resource(sourceId);
|
|
280
|
+
if (resource.kind !== "file") throw new Error("Selected workspace file is unavailable");
|
|
281
|
+
return {
|
|
282
|
+
path: absolutePath,
|
|
283
|
+
relativePath: `workspace/${locator.spaceId}/${locator.relativePath}`
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
const root = await realpath(effectiveWorkspacePathForSession(config, handoff.conversationId, getSessionConfig(handoff.conversationId), getProjectForSession(handoff.conversationId)));
|
|
287
|
+
const path = await realpath(resolve(root, locator.relativePath));
|
|
288
|
+
if (locator.spaceId !== fileSpaceId(root) || !within(root, path)) return void 0;
|
|
289
|
+
return {
|
|
290
|
+
path,
|
|
291
|
+
relativePath: locator.relativePath
|
|
292
|
+
};
|
|
293
|
+
}
|
|
234
294
|
/** Selected result pointers delegate only the pinned source, never the owner's result directory. */
|
|
235
295
|
async function readTaskHandoffSource(taskId, sourceIndex, input, config) {
|
|
236
296
|
const handoff = getTaskHandoff(taskId);
|
|
@@ -238,7 +298,7 @@ async function readTaskHandoffSource(taskId, sourceIndex, input, config) {
|
|
|
238
298
|
assertTaskHandoffAccess(handoff);
|
|
239
299
|
const source = handoff.sources[sourceIndex];
|
|
240
300
|
if (!source) throw new Error("Source is not selected for this Task");
|
|
241
|
-
if (source.kind === "result") {
|
|
301
|
+
if (source.kind === "result" && handoff.kind !== "workspace_files") {
|
|
242
302
|
const ref = parseResultReferenceId(source.sourceId);
|
|
243
303
|
if (!ref) throw new Error("Invalid result reference");
|
|
244
304
|
if (resultReferenceVersion(resolvePersonalResultReference(handoff.conversationId, ref.resultId)) !== source.version) throw new Error("Selected result version changed");
|
|
@@ -277,54 +337,51 @@ async function readTaskHandoffSource(taskId, sourceIndex, input, config) {
|
|
|
277
337
|
} else if (source.kind === "session") {
|
|
278
338
|
const session = getSessionMetadata(source.sourceId);
|
|
279
339
|
available = Boolean(session && session.updatedAt === source.version);
|
|
280
|
-
} else if (source.kind === "user_assertion") available = Boolean(buildUserAssertionAgentContext(source.sourceId, source.version, getSessionMetadata(handoff.conversationId)?.agentId));
|
|
340
|
+
} else if (source.kind === "user_assertion" && handoff.kind !== "workspace_files") available = Boolean(buildUserAssertionAgentContext(source.sourceId, source.version, getSessionMetadata(handoff.conversationId)?.agentId));
|
|
281
341
|
else if (source.kind === "browser_tab") {
|
|
282
342
|
const binding = getBrowserTabBindingById(source.sourceId);
|
|
283
343
|
available = Boolean(binding && binding.expiresAt > Date.now() && binding.conversationId === handoff.conversationId && binding.documentId === source.version);
|
|
284
344
|
} else if (source.kind === "file" && config) {
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
const path =
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
345
|
+
const file = await resolveHandoffFile(handoff, source.sourceId, config);
|
|
346
|
+
if (!file) throw new Error("Selected source is unavailable, revoked or changed; ask the owner to select it again");
|
|
347
|
+
const { path } = file;
|
|
348
|
+
const info = await stat(path, { bigint: true });
|
|
349
|
+
available = `${info.mtimeNs}:${info.ctimeNs}:${info.ino}:${info.size}` === source.version;
|
|
350
|
+
if (available && source.truncated && info.isFile()) {
|
|
351
|
+
if (!/\.(?:md|txt|csv|tsv|json|jsonl|log|[mc]?js|tsx?|jsx|py|sh|ya?ml|xml|html|css)$/i.test(path)) return {
|
|
352
|
+
status: "unsupported",
|
|
353
|
+
sourceId: source.sourceId,
|
|
354
|
+
version: source.version,
|
|
355
|
+
...handoff.kind === "workspace_files" ? {} : { readOnlyPath: path },
|
|
356
|
+
reason: "This selected file requires a binary parser. Use an authorized execution tool; metadata is not file content."
|
|
357
|
+
};
|
|
358
|
+
const handle = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
359
|
+
try {
|
|
360
|
+
const revision = (value) => `${value.mtimeNs}:${value.ctimeNs}:${value.ino}:${value.size}`;
|
|
361
|
+
if (revision(await handle.stat({ bigint: true })) !== source.version) throw new Error("Selected file changed");
|
|
362
|
+
const offset = Math.max(0, input.offset ?? 0);
|
|
363
|
+
const bytes = Buffer.alloc(Math.min(4e3, Math.max(0, Number(info.size) - offset)));
|
|
364
|
+
const { bytesRead } = await handle.read(bytes, 0, bytes.length, offset);
|
|
365
|
+
const content = new TextDecoder("utf-8", {
|
|
366
|
+
fatal: true,
|
|
367
|
+
ignoreBOM: true
|
|
368
|
+
}).decode(bytes.subarray(0, bytesRead), { stream: offset + bytesRead < Number(info.size) });
|
|
369
|
+
if (revision(await handle.stat({ bigint: true })) !== source.version) throw new Error("Selected file changed during read");
|
|
370
|
+
const next = offset + Buffer.byteLength(content);
|
|
371
|
+
return {
|
|
372
|
+
kind: source.kind,
|
|
295
373
|
sourceId: source.sourceId,
|
|
296
374
|
version: source.version,
|
|
297
|
-
|
|
298
|
-
|
|
375
|
+
text: content,
|
|
376
|
+
offset,
|
|
377
|
+
offsetUnit: "utf8_bytes",
|
|
378
|
+
totalBytes: Number(info.size),
|
|
379
|
+
contentHash: hash(content),
|
|
380
|
+
complete: next >= Number(info.size),
|
|
381
|
+
...next < Number(info.size) ? { nextOffset: next } : {}
|
|
299
382
|
};
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const revision = (value) => `${value.mtimeNs}:${value.ctimeNs}:${value.ino}:${value.size}`;
|
|
303
|
-
if (revision(await handle.stat({ bigint: true })) !== source.version) throw new Error("Selected file changed");
|
|
304
|
-
const offset = Math.max(0, input.offset ?? 0);
|
|
305
|
-
const bytes = Buffer.alloc(Math.min(4e3, Math.max(0, Number(info.size) - offset)));
|
|
306
|
-
const { bytesRead } = await handle.read(bytes, 0, bytes.length, offset);
|
|
307
|
-
const content = new TextDecoder("utf-8", {
|
|
308
|
-
fatal: true,
|
|
309
|
-
ignoreBOM: true
|
|
310
|
-
}).decode(bytes.subarray(0, bytesRead), { stream: offset + bytesRead < Number(info.size) });
|
|
311
|
-
if (revision(await handle.stat({ bigint: true })) !== source.version) throw new Error("Selected file changed during read");
|
|
312
|
-
const next = offset + Buffer.byteLength(content);
|
|
313
|
-
return {
|
|
314
|
-
kind: source.kind,
|
|
315
|
-
sourceId: source.sourceId,
|
|
316
|
-
version: source.version,
|
|
317
|
-
text: content,
|
|
318
|
-
offset,
|
|
319
|
-
offsetUnit: "utf8_bytes",
|
|
320
|
-
totalBytes: Number(info.size),
|
|
321
|
-
contentHash: hash(content),
|
|
322
|
-
complete: next >= Number(info.size),
|
|
323
|
-
...next < Number(info.size) ? { nextOffset: next } : {}
|
|
324
|
-
};
|
|
325
|
-
} finally {
|
|
326
|
-
await handle.close();
|
|
327
|
-
}
|
|
383
|
+
} finally {
|
|
384
|
+
await handle.close();
|
|
328
385
|
}
|
|
329
386
|
}
|
|
330
387
|
}
|
|
@@ -346,7 +403,7 @@ async function readTaskHandoffSource(taskId, sourceIndex, input, config) {
|
|
|
346
403
|
/** Resolve the main Agent's selected history pointers only after the foreground commit. */
|
|
347
404
|
async function resolveTaskHandoffReferences(taskId, config) {
|
|
348
405
|
const handoff = getTaskHandoff(taskId);
|
|
349
|
-
if (!handoff?.requestedSources?.length) return handoff;
|
|
406
|
+
if (!handoff?.requestedSources?.length || handoff.kind === "workspace_files") return handoff;
|
|
350
407
|
assertTaskHandoffAccess(handoff);
|
|
351
408
|
const sources = [...handoff.sources];
|
|
352
409
|
for (const ref of handoff.requestedSources) {
|
|
@@ -421,40 +478,7 @@ async function resolveTaskHandoffReferences(taskId, config) {
|
|
|
421
478
|
unresolvedReferences: handoff.completeness.unresolvedReferences.filter((id) => !handoff.requestedSources.some((ref) => id === `${ref.kind}:${ref.sourceId}`) && !sources.some((source) => id === `${source.kind}:${source.sourceId}`))
|
|
422
479
|
}
|
|
423
480
|
};
|
|
424
|
-
|
|
425
|
-
const snapshot = context.captureSnapshot({
|
|
426
|
-
ownerKind: "task",
|
|
427
|
-
ownerId: taskId,
|
|
428
|
-
conversationId: handoff.conversationId,
|
|
429
|
-
query: handoff.originalRequest ?? handoff.interpretation,
|
|
430
|
-
selectedItems: [resolved],
|
|
431
|
-
contentHash: hash(JSON.stringify(resolved)),
|
|
432
|
-
relationshipPolicy: {
|
|
433
|
-
kind: "personal_task_handoff",
|
|
434
|
-
version: 1,
|
|
435
|
-
fullConversationIncluded: false
|
|
436
|
-
},
|
|
437
|
-
authorizationSnapshot: {
|
|
438
|
-
conversationId: handoff.conversationId,
|
|
439
|
-
transcriptId: handoff.transcriptId,
|
|
440
|
-
scope: "selected_inputs_only",
|
|
441
|
-
grantsAuthority: false
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
context.add({
|
|
445
|
-
taskId,
|
|
446
|
-
targetKind: "source",
|
|
447
|
-
targetId: snapshot.id,
|
|
448
|
-
role: "input",
|
|
449
|
-
pinned: true,
|
|
450
|
-
title: "Resolved task handoff",
|
|
451
|
-
metadata: {
|
|
452
|
-
kind: "personal_task_handoff",
|
|
453
|
-
version: 1
|
|
454
|
-
},
|
|
455
|
-
retrievalPolicy: { currentAuthorizationRequired: true },
|
|
456
|
-
createdBy: { kind: "system" }
|
|
457
|
-
});
|
|
481
|
+
persistHandoff(taskId, resolved, "Resolved task handoff");
|
|
458
482
|
return resolved;
|
|
459
483
|
}
|
|
460
484
|
/** Copy only the selected pinned input into this executor's workspace, without granting access to the owner's root. */
|
|
@@ -464,15 +488,11 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
464
488
|
assertTaskHandoffAccess(handoff);
|
|
465
489
|
const source = handoff.sources[sourceIndex];
|
|
466
490
|
if (!source || !["file", "result"].includes(source.kind)) throw new Error("Materialization requires a selected file or published result artifact; use read for result body text");
|
|
467
|
-
const within = (base, path) => {
|
|
468
|
-
const rel = relative(base, path);
|
|
469
|
-
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
470
|
-
};
|
|
471
491
|
let inputPath;
|
|
472
492
|
let relativePath;
|
|
473
493
|
let expectedFileVersion;
|
|
474
494
|
let expectedSha256;
|
|
475
|
-
if (source.kind === "result") {
|
|
495
|
+
if (source.kind === "result" && handoff.kind !== "workspace_files") {
|
|
476
496
|
const ref = parseResultReferenceId(source.sourceId);
|
|
477
497
|
if (!ref || ref.sourceId === "body") throw new Error("Result body is text; use source read. Select an exact published artifact to materialize bytes");
|
|
478
498
|
const delivery = resolvePersonalResultReference(handoff.conversationId, ref.resultId);
|
|
@@ -485,11 +505,10 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
485
505
|
expectedFileVersion = `${info.mtimeNs}:${info.ctimeNs}:${info.ino}:${info.size}`;
|
|
486
506
|
expectedSha256 = artifact.sha256;
|
|
487
507
|
} else {
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
inputPath =
|
|
491
|
-
|
|
492
|
-
relativePath = locator.relativePath;
|
|
508
|
+
const file = await resolveHandoffFile(handoff, source.sourceId, config);
|
|
509
|
+
if (!file) throw new Error("Selected file is outside the originating workspace");
|
|
510
|
+
inputPath = file.path;
|
|
511
|
+
relativePath = file.relativePath;
|
|
493
512
|
expectedFileVersion = source.version;
|
|
494
513
|
}
|
|
495
514
|
const executionRoot = await realpath(workspace);
|
|
@@ -505,7 +524,7 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
505
524
|
});
|
|
506
525
|
if (!within(executionRoot, await realpath(directory))) throw new Error("Task input directory escapes the executor workspace");
|
|
507
526
|
}
|
|
508
|
-
const input = await open(inputPath, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
527
|
+
const input = await open(inputPath, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
509
528
|
let output;
|
|
510
529
|
let created = false;
|
|
511
530
|
let verified = false;
|
|
@@ -534,7 +553,7 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
534
553
|
if (expectedSha256 && expectedSha256 !== sha256) throw new Error("Published artifact content differs from its immutable revision");
|
|
535
554
|
if (output) await output.chmod(292);
|
|
536
555
|
else {
|
|
537
|
-
const existing = await open(destination, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
556
|
+
const existing = await open(destination, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
538
557
|
try {
|
|
539
558
|
const info = await existing.stat();
|
|
540
559
|
if (!info.isFile() || info.size !== offset) throw new Error("Existing Task input differs; refusing to overwrite it");
|
|
@@ -552,6 +571,7 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
552
571
|
}
|
|
553
572
|
}
|
|
554
573
|
assertTaskHandoffAccess(handoff);
|
|
574
|
+
if (handoff.kind === "workspace_files" && !new TaskRepository().get(taskId)) throw new Error("Task is no longer available");
|
|
555
575
|
verified = true;
|
|
556
576
|
return {
|
|
557
577
|
materialized: true,
|
|
@@ -571,7 +591,7 @@ async function materializeTaskHandoffFile(taskId, sourceIndex, workspace, config
|
|
|
571
591
|
}
|
|
572
592
|
function assertTaskHandoffExecutorAccess(taskId, agentId) {
|
|
573
593
|
const handoff = getTaskHandoff(taskId);
|
|
574
|
-
if (!handoff) return;
|
|
594
|
+
if (!handoff || handoff.kind === "workspace_files") return;
|
|
575
595
|
assertTaskHandoffAccess(handoff);
|
|
576
596
|
for (const source of handoff.sources) {
|
|
577
597
|
if (source.kind !== "result") continue;
|
|
@@ -582,4 +602,4 @@ function assertTaskHandoffExecutorAccess(taskId, agentId) {
|
|
|
582
602
|
}
|
|
583
603
|
}
|
|
584
604
|
//#endregion
|
|
585
|
-
export { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, captureTaskHandoff, getTaskHandoff, materializeTaskHandoffFile, parseTaskConversationExcerpts, parseTaskHandoffReferences, readTaskConversationExcerpts, readTaskHandoffSource, resolveTaskHandoffReferences };
|
|
605
|
+
export { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, captureTaskHandoff, captureWorkspaceFileHandoff, getTaskHandoff, materializeTaskHandoffFile, parseTaskConversationExcerpts, parseTaskHandoffReferences, readTaskConversationExcerpts, readTaskHandoffSource, resolveTaskHandoffReferences };
|