@xopcai/xopc 0.0.485 → 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 +1712 -1515
- 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/agent-run-error-parser-DsXmcKt-.js +1 -0
- 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-CGs641OT.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-CH9wENBj.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-uY_wmZY1.js → automations-page-BKfvaA41.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DyQq55Rh.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-abgigXV1.js → capabilities-CpwoMqtm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BaKHutgZ.js → capabilities-DcD15BrU.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-x_AS_XJ0.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BOwbZn9X.js → capabilities-settings-panel-DMgEXxkC.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-DlnXbcOj.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-3fVhP77N.js → chat-page-Bn44NcvF.js} +31 -31
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DE8j-K9d.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-DCGudJjU.js +1 -0
- 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-CApjiM_x.js +1 -0
- 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-BJm1jjct.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-D3X7SlzG.js → extension-debug-page-CKeIq8S2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CIAq7PSn.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-B2wbucV7.js → extension-message-router-GPlMiYyF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-qwY7r1_p.js → extension-page-DcP7IEMp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DFcRbTHI.js → extension-provider-DZ97b5uA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Cpnh9lcZ.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-BusNFHe-.js → home-page-VMzHth7Q.js} +4 -4
- package/dist/gateway/static/root/assets/{home-task-actions-C8Fi6GBq.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-DwdoCbAF.js +11 -0
- 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-B9uSL1Mi.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-DkZWV3Ds.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-BXSBeGms.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-cauym9hr.js → personal-page-DkDROUWV.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-TcI0Zfwr.js → personal-profile-settings-LAAXGLKs.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-BJ46T7ZO.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-C1U57WSM.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-NOZu0WO2.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-modal-ZKiIeKof.js +2 -0
- package/dist/gateway/static/root/assets/project-detail-page-BTgDajpj.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-4IyHVmus.js → project-understanding-BWpcOkWw.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BHQxQGTd.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-DkUojqyb.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-wJxaH-1V.js +2 -0
- 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-DvIGR4Sw.js +28 -0
- 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-Cd9WZ-Ac.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-Di5_ukH8.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-CirGM67m.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-CBSaZbyH.js +2 -0
- 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-copy-CtcqCQ78.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-BmWkL-KH.js +3 -0
- package/dist/gateway/static/root/assets/{task-header-title-qzNctGl5.js → task-header-title-CCaEJNV4.js} +1 -1
- package/dist/gateway/static/root/assets/task-result-presentation-DwEf7Xf7.js +1 -0
- package/dist/gateway/static/root/assets/task-run-issue-notice-COE7ppvl.js +1 -0
- package/dist/gateway/static/root/assets/tasks-CvOAtEHv.js +1 -0
- 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/turn-outcome-Dtw6OgwL.js +1 -0
- 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-DJsIzJ1c.js → use-composer-attachments-rUl5n4_a.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BFF2vXm5.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-D-Tgi4DZ.js +1 -0
- package/dist/gateway/static/root/assets/{use-realtime-voice-9OvLwHzk.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-LCIT1H-D.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-j8o-hGTm.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-B1JW3oZZ.js +2 -0
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-BbfHBVhA.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-DwVWTehC.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 +98 -96
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +3 -1
- package/dist/packages/gateway-contract/src/notifications.js +1 -8
- package/dist/packages/gateway-contract/src/task-display.js +9 -2
- package/dist/packages/gateway-contract/src/task-lifecycle.js +1 -0
- package/dist/packages/gateway-contract/src/task-research-result.js +2 -1
- package/dist/packages/gateway-contract/src/tasks.js +6 -1
- package/dist/packages/gateway-contract/src/user-message-text.js +64 -0
- 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 +36 -37
- 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 +19 -6
- 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/fallback/candidates.d.ts +1 -0
- package/dist/src/agent/fallback/candidates.js +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/provider-registry.js +3 -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/models/manager.d.ts +1 -1
- package/dist/src/agent/models/manager.js +2 -1
- package/dist/src/agent/models/turn-candidates.d.ts +16 -0
- package/dist/src/agent/models/turn-candidates.js +55 -0
- 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.d.ts +1 -0
- package/dist/src/agent/service.js +32 -20
- 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/installer.js +2 -2
- 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/credentials.js +3 -1
- package/dist/src/auth/oauth/index.d.ts +0 -1
- package/dist/src/auth/oauth/index.js +1 -4
- package/dist/src/auth/oauth/registry.js +0 -4
- package/dist/src/auth/oauth/xopc-cloud.js +2 -2
- 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/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/auth.js +4 -2
- 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 +14 -12
- 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 +3 -4
- 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.d.ts +1 -2
- package/dist/src/gateway/agent-reactions/reaction.js +13 -24
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/custom-image-providers.js +4 -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/oauth.js +3 -0
- 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-push.js +55 -15
- 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 +2 -2
- 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-mcp-setup.js +49 -29
- 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/notifications.js +12 -1
- 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 +4 -16
- 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/security/gateway-scopes.js +1 -0
- 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 +7 -18
- 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 +149 -102
- 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/host.js +5 -5
- 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/capabilities/projections.d.ts +5 -5
- 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/notifications/device-store.d.ts +3 -0
- package/dist/src/notifications/device-store.js +14 -1
- package/dist/src/notifications/platform-push.d.ts +17 -0
- package/dist/src/notifications/platform-push.js +58 -0
- package/dist/src/notifications/service.d.ts +2 -2
- package/dist/src/notifications/service.js +26 -12
- package/dist/src/notifications/store.d.ts +1 -1
- package/dist/src/notifications/store.js +3 -2
- 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/env-keys.js +0 -1
- package/dist/src/providers/index.js +1 -7
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-catalog-sync-service.js +3 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/model-registry.js +7 -3
- package/dist/src/providers/presentation.js +1 -2
- package/dist/src/providers/provider-policy.js +2 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/session/client-history.js +3 -3
- 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/session/user-message-display.js +3 -2
- 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/agent-reaction-repository.d.ts +2 -4
- package/dist/src/storage/sqlite/agent-reaction-repository.js +18 -13
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/device-access-repository.js +2 -1
- 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.d.ts +2 -0
- 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 +3 -2
- 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 +3 -2
- package/dist/src/tasks/task-conversation-summary.d.ts +1 -1
- package/dist/src/tasks/task-deliverables.js +19 -14
- package/dist/src/tasks/task-delivery-checks.d.ts +12 -0
- package/dist/src/tasks/task-delivery-checks.js +91 -0
- package/dist/src/tasks/task-execution-capabilities.js +1 -1
- package/dist/src/tasks/task-final-reply.d.ts +3 -1
- package/dist/src/tasks/task-final-reply.js +17 -4
- 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 +5 -3
- package/dist/src/tasks/task-origin-repository.d.ts +1 -1
- package/dist/src/tasks/task-read-model-projector.js +24 -7
- 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 +15 -30
- package/dist/src/tasks/task-result-delivery-repository.js +3 -2
- package/dist/src/tasks/task-result-delivery-service.js +4 -3
- package/dist/src/tasks/task-retry-service.js +3 -2
- package/dist/src/tasks/task-run-coordinator.js +22 -11
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -0
- package/dist/src/tasks/task-run-dispatcher.js +79 -49
- package/dist/src/tasks/task-run-repository.d.ts +2 -1
- package/dist/src/tasks/task-run-repository.js +10 -5
- 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/capabilities-page-WCl7Fdce.js +0 -2
- package/dist/gateway/static/root/assets/composer-payload-handoff-ClWsunJ2.js +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-MHCmEEUZ.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-BgW-ioIt.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CTWm23Qi.js +0 -1
- package/dist/gateway/static/root/assets/index-790PGhZb.js +0 -11
- 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-Bwm_aehq.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-GA_YPLkr.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-BOq3gtSJ.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-DIh_CsXp.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-D9WKZe3z.js +0 -7
- package/dist/gateway/static/root/assets/recording-upload-plrQDkLa.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-DF8LOfKW.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-Bfbiz0IN.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-DUWeBdeG.js +0 -28
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cq4HDQu2.js +0 -1
- package/dist/gateway/static/root/assets/space-page-DlJB7GT1.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-BFa0Px-B.js +0 -3
- package/dist/gateway/static/root/assets/task-run-issue-notice-CGrUMy0s.js +0 -1
- package/dist/gateway/static/root/assets/tasks-CwyNaa-j.js +0 -1
- package/dist/gateway/static/root/assets/turn-outcome-BSbEJx8h.js +0 -1
- package/dist/gateway/static/root/assets/use-personal-work-B1DWeBnm.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-api-BuNWyNvA.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CX8zX9eZ.js +0 -1
- package/dist/src/auth/oauth/google-antigravity.d.ts +0 -4
- package/dist/src/auth/oauth/google-antigravity.js +0 -9
- package/dist/src/auth/oauth/google-oauth/google-antigravity.d.ts +0 -25
- package/dist/src/auth/oauth/google-oauth/google-antigravity.js +0 -309
- package/dist/src/notifications/harmony-push.d.ts +0 -27
- package/dist/src/notifications/harmony-push.js +0 -96
|
@@ -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 };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { tryParseMediaUri } from "../media/uri.js";
|
|
1
|
+
import { init_uri, tryParseMediaUri } from "../media/uri.js";
|
|
2
2
|
import { resolveMediaBufferPath } from "../media/store.js";
|
|
3
|
-
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
4
3
|
import { resolveTaskLocale } from "./task-language.js";
|
|
4
|
+
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
5
5
|
import { assertTaskHandoffAccess } from "./task-handoff.js";
|
|
6
6
|
import { closeSync, constants, fstatSync, openSync, readSync } from "node:fs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/tasks/task-json-acceptance.ts
|
|
9
|
+
init_uri();
|
|
9
10
|
const MAX_JSON_BYTES = 1024 * 1024;
|
|
10
11
|
const FILE = "[A-Za-z0-9_-][A-Za-z0-9_.-]{0,79}\\.json";
|
|
11
12
|
const KEYS = "[A-Za-z_][A-Za-z0-9_]*(?:(?:, *(?:and +)?| +and +| *[、和] *)[A-Za-z_][A-Za-z0-9_]*)*";
|
|
@@ -16,7 +17,7 @@ const listChineseRequest = new RegExp(`^生成一个名为[ ]*(${FILE})[ ]*的[
|
|
|
16
17
|
function taskJsonAcceptance(task, handoff) {
|
|
17
18
|
const request = handoff?.originalRequest?.trim();
|
|
18
19
|
const contract = task.contract;
|
|
19
|
-
if (!handoff || !request || request.length > 512 || contract?.acceptancePolicy !== "verified_auto" || contract.resultPolicy !== "selected" || !isPersonalConversation(handoff.conversationId) || task.priority === "critical" || contract.constraints.length || contract.risks.length || contract.approvalRequired.length || contract.assumptions.length || contract.outputDestinations.length || handoff.attachments.length || handoff.sources.length || handoff.requestedSources?.length || handoff.completeness.unresolvedReferences.length || handoff.completeness.omitted.length || handoff.conversationExcerpts?.length || contract.brief?.trim() !== request) return void 0;
|
|
20
|
+
if (!handoff || handoff.kind === "workspace_files" || !request || request.length > 512 || contract?.acceptancePolicy !== "verified_auto" || contract.resultPolicy !== "selected" || !isPersonalConversation(handoff.conversationId) || task.priority === "critical" || contract.constraints.length || contract.risks.length || contract.approvalRequired.length || contract.assumptions.length || contract.outputDestinations.length || handoff.attachments.length || handoff.sources.length || handoff.requestedSources?.length || handoff.completeness.unresolvedReferences.length || handoff.completeness.omitted.length || handoff.conversationExcerpts?.length || contract.brief?.trim() !== request) return void 0;
|
|
20
21
|
try {
|
|
21
22
|
assertTaskHandoffAccess(handoff);
|
|
22
23
|
} catch {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
2
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
3
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
4
2
|
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
5
3
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
4
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
5
|
+
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
6
6
|
import { taskConversationSummary } from "./task-conversation-summary.js";
|
|
7
7
|
//#region src/tasks/task-main-update-decision-service.ts
|
|
8
8
|
init_providers();
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
4
4
|
import { init_request_repository, personalRequestForTask } from "../personal-agent/request-repository.js";
|
|
5
|
-
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
6
5
|
import { TaskAllocationRepository } from "./task-allocation-repository.js";
|
|
6
|
+
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
7
7
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
8
8
|
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
9
9
|
import { getTaskNotificationPreference } from "./task-notification-preference.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
4
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
5
4
|
import { getAssistantMessageErrorReason, isTransientProviderErrorMessage } from "../providers/model-response.js";
|
|
5
|
+
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
6
6
|
//#region src/tasks/task-model-call.ts
|
|
7
7
|
init_providers();
|
|
8
8
|
init_logger();
|
|
@@ -20,13 +20,15 @@ async function completeTaskModelCall(models, context, options, usage) {
|
|
|
20
20
|
return response;
|
|
21
21
|
} catch (error) {
|
|
22
22
|
options.signal?.throwIfAborted();
|
|
23
|
-
|
|
23
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
24
|
+
const missingCredential = /^No API key for provider:/i.test(message) && chain[index + 1] !== chain[index];
|
|
25
|
+
if (index === chain.length - 1 || !missingCredential && !isTransientProviderErrorMessage(message)) throw error;
|
|
24
26
|
log.warn({
|
|
25
27
|
modelRef: chain[index],
|
|
26
28
|
nextModelRef: chain[index + 1],
|
|
27
29
|
operation: usage.operation,
|
|
28
30
|
conversationId: usage.conversationId
|
|
29
|
-
}, "Task model request failed transiently; trying configured recovery model");
|
|
31
|
+
}, missingCredential ? "Task model credentials are missing; trying configured fallback model" : "Task model request failed transiently; trying configured recovery model");
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
throw new Error("No task model is configured");
|
|
@@ -50,7 +50,7 @@ export declare class TaskOriginRepository {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
attention: {
|
|
53
|
-
kind: "allocation_blocked" | "allocation_failed" | "input_required" | "approval_required" | "dependency_blocked" | "run_failed" | "run_decision_required" | "verification_failed" | "overdue" | "stale";
|
|
53
|
+
kind: "allocation_blocked" | "allocation_failed" | "input_required" | "approval_required" | "dependency_blocked" | "run_failed" | "run_decision_required" | "verification_failed" | "verification_unverified" | "overdue" | "stale";
|
|
54
54
|
summary: string;
|
|
55
55
|
sourceId?: string;
|
|
56
56
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { taskRunResultKind } from "../../packages/gateway-contract/src/tasks.js";
|
|
3
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
2
4
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
3
5
|
import { init_task_instruction_sequence, taskInstructionSequence } from "./task-instruction-sequence.js";
|
|
4
6
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
@@ -8,6 +10,7 @@ import { TaskAllocationRepository } from "./task-allocation-repository.js";
|
|
|
8
10
|
import { TaskCriterionReviewRepository } from "./task-criterion-review-repository.js";
|
|
9
11
|
import { isReadOnlyRetryDecision, isReadOnlyTaskRetry } from "./task-retry-policy.js";
|
|
10
12
|
//#region src/tasks/task-read-model-projector.ts
|
|
13
|
+
init_src();
|
|
11
14
|
init_transaction();
|
|
12
15
|
init_request_repository();
|
|
13
16
|
init_task_repository();
|
|
@@ -54,13 +57,26 @@ var TaskReadModelProjector = class {
|
|
|
54
57
|
sourceId: wait.id
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
|
-
if (
|
|
60
|
+
if (latestRun && latestRun.contractVersion === task.latestContractVersion && (latestRun.status === "failed" || latestRun.status === "succeeded" && task.phase === "review")) {
|
|
58
61
|
const receipt = this.#runs.getReceipt(latestRun.id);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
const zh = resolveTaskLocale(task) === "zh";
|
|
63
|
+
const resultKind = receipt ? taskRunResultKind(receipt) : "execution_failed";
|
|
64
|
+
if (resultKind === "execution_failed") {
|
|
65
|
+
const label = zh ? "执行失败" : "Execution failed";
|
|
66
|
+
const detail = receipt?.failure?.phase === "preflight" ? receipt.failure.recoveryAction : latestRun.terminalMessage ?? receipt?.summary;
|
|
67
|
+
attention.push({
|
|
68
|
+
kind: "run_failed",
|
|
69
|
+
summary: detail && !detail.trimStart().startsWith("{") ? `${label} · ${detail}` : label,
|
|
70
|
+
sourceId: latestRun.id
|
|
71
|
+
});
|
|
72
|
+
} else if (resultKind === "verification_failed" || resultKind === "verification_unverified") {
|
|
73
|
+
const summary = resultKind === "verification_failed" ? zh ? "验收未通过,查看未满足的验收项。" : "Acceptance failed. Review the unmet criteria." : zh ? "结果未验证,查看仍需核验的验收项。" : "Result unverified. Review the criteria that still need verification.";
|
|
74
|
+
attention.push({
|
|
75
|
+
kind: resultKind,
|
|
76
|
+
summary,
|
|
77
|
+
sourceId: latestRun.id
|
|
78
|
+
});
|
|
79
|
+
}
|
|
64
80
|
}
|
|
65
81
|
if (task.dueAt !== void 0 && task.phase !== "closed" && task.dueAt < now) attention.push({
|
|
66
82
|
kind: "overdue",
|
|
@@ -130,6 +146,7 @@ var TaskReadModelProjector = class {
|
|
|
130
146
|
waitId: pending.sourceId
|
|
131
147
|
}
|
|
132
148
|
};
|
|
149
|
+
const failure = attention.find((item) => item.kind === "run_failed" || item.kind === "verification_failed" || item.kind === "verification_unverified");
|
|
133
150
|
const decision = attention.find((item) => item.kind === "run_decision_required");
|
|
134
151
|
if (decision?.sourceId) {
|
|
135
152
|
const connected = Boolean(personalRequestForTask(task.id));
|
|
@@ -151,7 +168,6 @@ var TaskReadModelProjector = class {
|
|
|
151
168
|
};
|
|
152
169
|
}
|
|
153
170
|
if (state === "failed") {
|
|
154
|
-
const failure = attention.find((item) => item.kind === "run_failed" || item.kind === "verification_failed");
|
|
155
171
|
const canRetryExecutor = latestRun?.executorKind === "agent" && typeof latestRun.executorRef.agentId === "string";
|
|
156
172
|
if (failure?.sourceId) return {
|
|
157
173
|
status: "failed",
|
|
@@ -194,6 +210,7 @@ var TaskReadModelProjector = class {
|
|
|
194
210
|
};
|
|
195
211
|
return {
|
|
196
212
|
status: "review",
|
|
213
|
+
reason: failure?.summary,
|
|
197
214
|
primaryAction: acceptance.canSignOff ? {
|
|
198
215
|
type: "signoff",
|
|
199
216
|
resultId: acceptance.id
|
|
@@ -2,6 +2,7 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { currentOperationId, init_operation_context } from "../infra/operation-context.js";
|
|
3
3
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
4
4
|
import { init_resource_scope, resourceScopePredicate } from "../storage/sqlite/resource-scope.js";
|
|
5
|
+
import { delegatedRunText, init_delegated_run_result } from "./delegated-run-result.js";
|
|
5
6
|
import { randomUUID } from "node:crypto";
|
|
6
7
|
//#region src/tasks/task-repository.ts
|
|
7
8
|
function taskListFilter(input) {
|
|
@@ -85,6 +86,7 @@ var init_task_repository = __esmMin((() => {
|
|
|
85
86
|
init_operation_context();
|
|
86
87
|
init_transaction();
|
|
87
88
|
init_resource_scope();
|
|
89
|
+
init_delegated_run_result();
|
|
88
90
|
TaskRepository = class {
|
|
89
91
|
create(input) {
|
|
90
92
|
const title = input.title.trim();
|
|
@@ -286,6 +288,7 @@ var init_task_repository = __esmMin((() => {
|
|
|
286
288
|
db.prepare(`UPDATE home_followups SET status='paused',next_step='',waiting_for='Step history changed; review before resuming',revision=revision+1,updated_at=? WHERE id=(SELECT followup_id FROM home_followup_steps WHERE task_id=?)`).run(Date.now(), taskId);
|
|
287
289
|
const deleted = db.prepare("DELETE FROM tasks WHERE task_id = ?").run(taskId).changes > 0;
|
|
288
290
|
db.prepare(`DELETE FROM context_snapshots WHERE owner_kind = 'task' AND owner_id = ?`).run(taskId);
|
|
291
|
+
for (const runId of runIds) delegatedRunText.delete(runId);
|
|
289
292
|
if (runIds.length > 0) db.prepare(`DELETE FROM context_snapshots
|
|
290
293
|
WHERE owner_kind = 'task_run' AND owner_id IN (SELECT value FROM json_each(?))`).run(JSON.stringify(runIds));
|
|
291
294
|
const deletedAt = Date.now();
|