@xopcai/xopc 0.0.481 → 0.0.482
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/dingtalk/src/index.js +8 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/transport/client/install-sdk.js +1 -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 +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/media/data-url.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
- package/dist/gateway/server/chunks.bin +1537 -1541
- package/dist/gateway/server/chunks.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-zMwJQbPV.js → activity-store-BCPCuT-6.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-VUJHrVXo.js → agent-avatar-dicebear-Di9jxcH9.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-umdw-BQZ.js → agent-avatar-display-KbzBlJ8W.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-2JEkjXQB.js → agent-defaults-settings-panel-CYZzdU6C.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-Cz08StU4.js → agent-plugin-dialog-Bhkawcil.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BXVjWw0p.js → agents-B2RXJeIo.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-C1Ab97Mn.js → agents-admin-api-DpfkHNbc.js} +1 -1
- package/dist/gateway/static/root/assets/{api-B2QJSgN6.js → api-BtngCZrB.js} +1 -1
- package/dist/gateway/static/root/assets/{api-5GGJYrzC.js → api-CnOSHyKU.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-IaAONzFg.js → app-management-settings-panel-Dyc3I-ng.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BFo0Yk57.js → appearance-settings-CmdhL-0n.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-aVZLDS59.js → apps-page-BFqC9Knk.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BgX_1X6q.js → archive-plugin-DFP0MajV.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-DtFbVh6a.js → automation-api-Cc5X3Q1t.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-CBfGJb7v.js → automation-result-state-B7fHzLLf.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-C-nOpY2_.js → automation-run-list-DPTby29p.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-BgS9JQeL.js → automation-task-card-CjzArAJi.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-C6dw7Nqb.js → automations-page-BKbElVfF.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CKCsL5wQ.js → automations-workspace-_18qOoLm.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-DX9lDAWC.js → binary-plugins-DnE-iqaV.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DRNtaARK.js → block-editor-CYobheuw.js} +4 -4
- package/dist/gateway/static/root/assets/{browser-settings-page-Btf2a-_0.js → browser-settings-page-BLniK98R.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-BfTF_flC.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities-C5MLP2Rx.js → capabilities-oihQXc5J.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-B32XFJ59.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-7MsgsVvQ.js → capabilities-settings-panel-CWnHPY8j.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CLpOmzO5.js → channels-DEIqjf9M.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-JoSvbwve.js → chat-agents-api-BzuJyysa.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-D1XpCNA5.js → chat-chart-block-DurSfGy2.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-CK4aWVbI.js +74 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BDHq9kj3.js → chat-terminal-dock-UBaRUsXJ.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-C2IaBEe4.js → command-palette-api-3kNqE3U7.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-C5hjuJQc.js → composer-model-config-control-CrI-u8F_.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-BSboNnS6.js → composer-notifications-L6u0F2_8.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-D5CvsQWj.js → composer-payload-handoff-DdHGkHOq.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CwB7HgUb.js → computer-settings-page-BwvCOkbI.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-DPJ_E0_Y.js → connected-providers-grid-B8eiZl6Z.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-DWj6jcFA.js → connection-usage-guide-CydSRk3h.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DEnQE7bH.js → connector-service-page-CLBi6R-Z.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-BRGeDfyP.js → connectors-api-Bn2IbtcF.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page--3zYHSCM.js → connectors-page-ywk7W0s6.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-jqmqOuOL.js → date-picker-DsD7NIm2.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-B3n_gScw.js → date-time-picker-BhnBpBpj.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D8Tz4lEu.js → desktop-pet-eFR-zmP2.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-24N6UYdz.js → desktop-pet-settings-CfFTYstQ.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-DMaKk2H5.js → dev-view-store-D_uPX9_R.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CUMh0ui_.js → device-pairing-wizard-BeLkoDUp.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DqknuyWo.js → directory-picker-path-field-5wZa0JF3.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-authoritative-grants-Choc5BaY.js → extension-authoritative-grants-DaA0KXyO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-8tHOJM-0.js → extension-debug-page-CXe8jimk.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-crHrHgry.js → extension-iframe-host-BwMISzWU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-3vDR-EC4.js → extension-marketplace-api-DuWuae8G.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-CBdW5Mi0.js → extension-message-router-DzBfVl6h.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-page-ouZIIOwR.js → extension-page-DW18FOb8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CJJRG7Gq.js → extension-provider-CyYrgUw-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BO8VsTJF.js → extension-settings-page-ByGVQYDw.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-zEJDQWOT.js → file-preview-surface-Cw70pwph.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CNzw8MWj.js → gateway-config-swr-BYoBGl6i.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BCghEC3U.js → gateway-realtime-Dzq6_piH.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-B9CDQ8NO.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-DaKNDKV9.js → gateway-restart-CtqJpyNu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BxBJ1zGZ.js → gateway-settings-xzO7KDsu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CSY11ude.js → gateway-startup-retry-DCDOl6Oo.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-C0qPO4zT.js → global-defaults-api-DXFSI87T.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-DzSLTEJf.js → home-page-CztF0goW.js} +5 -5
- package/dist/gateway/static/root/assets/home-task-actions-DTXb7Gc7.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CD1tNChr.js → image-generation-api-Ck0rMJy3.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DHWKf1n3.js → imports-page-egn9yYfF.js} +1 -1
- package/dist/gateway/static/root/assets/index-dqkMYWTd.js +11 -0
- package/dist/gateway/static/root/assets/index-q78xsKF3.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-B3A7BKlp.js → install-connector-dialog-CMh8jhn1.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BZaTvMnH.js → keyboard-shortcuts-settings-BOiKmOwN.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DH1zWMav.js → local-app-workbench-page-ev6VTDX2.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CSnxRVm2.js → local-apps-page-CQBSa3cR.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CfgBHtlt.js → local-session-drafts-pAAFf-Ad.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CeEXxDaP.js → locale-store-BYdvIuPj.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-fF3rKMVM.js → logs-page-Z-4VNgnq.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-iUbR1cSS.js → management-api-D739TCBl.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BWJ-4D2j.js → management-settings-CZDWUPmg.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-BOJVaGPC.js +261 -0
- package/dist/gateway/static/root/assets/markdown-view-Czi3_WHu.css +1 -0
- package/dist/gateway/static/root/assets/marked.esm-8VXEA2AD.js +64 -0
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-CJdg6fgZ.js → mcp-conversation-setup-page-NcRvP7cK.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B_0Q_dY0.js → media-plugins-B9bQ3e1j.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-L7tv_OPK.js → messages-lc5BjBtX.js} +2 -2
- package/dist/gateway/static/root/assets/{model-selector-CMsLur91.js → model-selector-DugdMlvi.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-DI9vvuFx.js → models-hub-cache-DvDksW4g.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CEi6GNEA.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-DftbeSZR.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-Ck4Yvy_j.js → notes-api-auhtw3zM.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-qellAl3o.js → notes-page-DnI1iJ3g.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-3nGo5FdC.js → oauth-api-BXKG29Kg.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-wtw_Oup3.js → oauth-provider-connect-y6-vDWb-.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Bm8TI2e0.js → page-context-capture-button-BBVJZgU0.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-D7Wh_S2e.js → page-context-draft-B30xEPDh.js} +1 -1
- package/dist/gateway/static/root/assets/{page-header-store-hCKJckdJ.js → page-header-store-BGCCXOOf.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-avatar-CW6MOp9q.js → personal-avatar-w5Sekj02.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-YTJfXUqr.js → personal-page-BWzfp81f.js} +1 -1
- package/dist/gateway/static/root/assets/personal-profile-settings-BYmKk14v.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-DgGTnduT.js → personal-settings-panel-DYnTT7aB.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-CiLziQ8R.js → phone-dependencies-card-DJciwZ-7.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-DjQJIS33.js → phone-model-connection-C3jmc4ma.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-BaHl_-yf.js → phone-model-picker-MWC_Zh2a.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-DEvyfoAt.js → phone-settings-page-C1Yc6tP7.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-9hDVXN9z.js → phone-workspace-store-Cxk2PJZe.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BI--oe7J.js → plugin-details-dialog-CpKZE_nx.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-DAhA9Z56.js → preference-select-fields-ByihE_wl.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-runtime-DNxSgx2a.js → preview-runtime-iJuVSugF.js} +3 -3
- package/dist/gateway/static/root/assets/product-automation-feedback-ref9gqOW.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-KyiYh48g.js → product-open-page-B7kAAD7Q.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-BSj9eoc8.js → product-preview-content-CzNWh2h2.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-DhONFWvj.js → product-preview-modal-B1RKw3Z-.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-DA11E8Iz.js → project-detail-page-Zr1I56NG.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-DjOdtNHh.js → project-understanding-D0S9pFg7.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-3Y7Bj3vP.js → projects-page-DlwRbxAj.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-BKDzcCQr.js → providers-api-D_v_CJ3l.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-Bg_HBFTj.js → recording-upload-BSyxK34y.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-C91pIb6J.js → registry-api-DGi-X6j7.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DZjxntjM.js → remote-access-hub-D3EYRXQC.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-D8FrMGjx.js → resource-unavailable-52Jvhy-I.js} +1 -1
- package/dist/gateway/static/root/assets/{right-workspace-store-D3nQJkDG.js → right-workspace-store-DsGslCi-.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-D00yB6hp.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-sCpXMbMl.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-CbVocuF5.js → runtime-tools-api-D8Xtty0g.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BVcSYWWj.js → runtime-tools-settings-panel-r28zxrgP.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-DEIaJSOU.js → service-recommendation-list-Kw6pwI8U.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-M4P3knYu.js → session-api-eApyRHbI.js} +1 -1
- package/dist/gateway/static/root/assets/session-channel-icon-CJAPoVO-.js +1 -0
- package/dist/gateway/static/root/assets/session-identity-DRFdxntH.js +1 -0
- package/dist/gateway/static/root/assets/session-identity-label-CZf50vSj.js +1 -0
- package/dist/gateway/static/root/assets/session-manager-C-oe-9_N.js +28 -0
- package/dist/gateway/static/root/assets/sessions-page-BkNfjgXC.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-B82UPSQS.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-BRNFkPxE.js → settings-advanced-section-Dc9aztiW.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-va_oX_Q8.js → settings-mode-store-DcE2iR7e.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BVFv8SOp.js → settings-page-CXRPZxuB.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-Wx54i9EL.js → settings-page-header-CQueaD1Z.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DDTKMXIb.js → settings-page-layout-BlwyxcEq.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-CaHdjPKk.js → setup-interaction-page-BvL6C5ja.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-D1XJedVC.js → setup-status-panel-Dp5cY2P9.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C8bVavnr.js → share-link-dialog-CB3LkWw8.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-3QEwX9TP.js → share-preview-page-IG0fTWJO.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-Dp6g-bfj.js → shares-api-DgYOJV0T.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BbxnfBhc.js → shares-settings-YeLkRDki.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BTiymSB8.js → skill-api-DRCHLW2T.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-BM8u0Bs_.js → skill-list-api-CQUhEUOF.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-BP2ecrz2.js → skill-reload-api-BoEna1cx.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DTrONo3c.js → skills-page-CBAL83FE.js} +1 -1
- package/dist/gateway/static/root/assets/{space-api-Ix7mfZDi.js → space-api-d4Q4hkEY.js} +1 -1
- package/dist/gateway/static/root/assets/space-page-8BMb_g2p.js +2 -0
- package/dist/gateway/static/root/assets/{space-workbook-CxV64kNP.js → space-workbook-BDjeiRtr.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-C2BWOeNW.js → system-settings-panel-dt8k0K4V.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DFeKIcxT.js +3 -0
- package/dist/gateway/static/root/assets/{task-header-title-Di5TvRaj.js → task-header-title-ClyuCAFb.js} +1 -1
- package/dist/gateway/static/root/assets/task-run-issue-notice-XWlgvgEo.js +1 -0
- package/dist/gateway/static/root/assets/{tasks-BIehlq7k.js → tasks-CwyNaa-j.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-mDqqa0EW.js → terminal-panel-store-CNkRP4kf.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-kQ-dt8qP.js → theme-store-nXIuAiQZ.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-BYAYhuS8.js → tracing-settings-page-CoWcr2c0.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-XScou7Y8.js → tunnel-api-DgsELO9g.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-NVT8M3Rv.js → understanding-activity-store-BI_PbKCi.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-D5pgGLiW.js → understanding-refresh-store-DPHzCi1Q.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-CWMg8m0Q.js → usage-page-BVNBJa59.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Iy9pO3fa.js → use-autosave-BPDFVsgM.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-DfSh4D1i.js → use-composer-attachments-9nVD0sQ1.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BFw8CA51.js → use-file-preview-expanded-BhmEiOkv.js} +1 -1
- package/dist/gateway/static/root/assets/{use-generated-media-MuDDqdB3.js → use-generated-media-CLEV4wYC.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-profile-Csm85ZFS.js → use-personal-profile-CFaihmiJ.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-work-CVmHKsJn.js → use-personal-work-CIZMwOlm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-D1zQbDnk.js → use-realtime-voice-CvtX2HcA.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-B_do34-j.js → use-workspace-tree-BnvuxYD4.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-BlBvDtwt.js → user-model-page-D4yNFvW1.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-DRlguUPt.js → voice-api-key-field-NINoxB5r.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-B2AO_uL_.js → voice-config-api-7cvKLNoE.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-jLnl_86X.js → voice-input-shortcut-events-DaCuiqoi.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-player-store-C8BTMBVX.js → voice-player-store-DipmM7w1.js} +1 -1
- package/dist/gateway/static/root/assets/voice-settings-BTvMqF_9.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C0oaToAM.js → work-discovery-overlay-BKdumzyK.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-IEKvSp0W.js → work-discovery-page-uX1VIzJY.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-ppDpY-AP.js → working-directory-picker-modal-C9hWAPvW.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-_mQWmOZm.js +2 -0
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-BzuNTkZu.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-DGsFnZh-.js → workspace-file-preview-dialog-D4Nc7XkR.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-CGe_tu1_.js → workspace-open-location-menu-BZSS94es.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-L-HD-Zf7.js → xopc-cloud-account-card-xJr48TmR.js} +1 -1
- package/dist/gateway/static/root/index.html +123 -122
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/tasks.js +38 -2
- package/dist/src/activity/emitter.js +1 -1
- package/dist/src/activity/index.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +12 -11
- package/dist/src/agent/agent-scope.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -1
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/coding/workspace-revision.js +2 -2
- package/dist/src/agent/commands/command-registry.js +3 -3
- package/dist/src/agent/commands/commandMounts.js +1 -1
- package/dist/src/agent/context/workspace-seed.js +2 -2
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-output.js +4 -4
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +8 -2
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +1 -1
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +4 -4
- package/dist/src/agent/external-tools/composio-provider.js +4 -4
- package/dist/src/agent/external-tools/discovery.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/image/load-image-media.js +2 -2
- package/dist/src/agent/mcp/managed-discovery.js +2 -2
- package/dist/src/agent/mcp/native-mcp.js +1 -1
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/reply/post-compaction-context.js +1 -1
- package/dist/src/agent/reply/workspace-boundary-read.js +1 -1
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/sandbox/fileAccess.js +1 -1
- package/dist/src/agent/sandbox/native-command.js +1 -1
- package/dist/src/agent/sandbox/path-policy.js +2 -2
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.js +6 -5
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/skills/config.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-hash.js +2 -2
- package/dist/src/agent/skills/hub-pull.js +6 -6
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +2 -2
- package/dist/src/agent/starter-agents.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +4 -3
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/personal-memory-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.d.ts +1 -0
- package/dist/src/agent/tools/personal-request-tool.js +2 -1
- package/dist/src/agent/tools/personal-task-tool.js +44 -13
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/review-workspace.js +2 -2
- package/dist/src/agent/tools/scoped-workspace-tools.js +2 -2
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
- package/dist/src/agent/tools/tool-media.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +1 -0
- package/dist/src/agent/tools/xopc-use-tool.js +6 -6
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/agent-catalog/service.js +1 -1
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth/openai.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/automations/capabilities/write.js +1 -1
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/delivery/delivery-router.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/backup/archive.js +5 -5
- package/dist/src/browser/cache-dir-policy.js +1 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +7 -7
- package/dist/src/browser/providers/playwright-doctor.js +2 -2
- package/dist/src/browser/runtime/browser-runtime.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/catalog/channel-catalog-service.js +1 -1
- package/dist/src/channels/enterprise/setup.d.ts +4 -0
- package/dist/src/channels/enterprise/setup.js +3 -2
- package/dist/src/channels/pairing/allow-from-file.js +1 -1
- package/dist/src/channels/pairing/pairing-store.js +2 -2
- package/dist/src/channels/plugins/types.adapters.d.ts +4 -0
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +2 -2
- package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-create.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/extension-pack.js +3 -3
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/logs.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/config/config-file.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/paths-state.js +1 -1
- package/dist/src/config/workspace-path.js +1 -1
- package/dist/src/connectors/cli/assets.js +1 -1
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/installer.js +3 -3
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connection-recovery-service.d.ts +2 -1
- package/dist/src/connectors/connection-recovery-service.js +10 -7
- package/dist/src/connectors/content-enrichment.js +2 -2
- package/dist/src/connectors/plugin-connection.js +1 -1
- package/dist/src/daemon/constants.js +1 -1
- package/dist/src/daemon/install-plan.js +2 -2
- package/dist/src/daemon/launchd.js +3 -3
- package/dist/src/daemon/schtasks.js +2 -2
- package/dist/src/daemon/systemd.js +3 -3
- package/dist/src/discussions/action-tasks.js +1 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/recording.js +3 -3
- package/dist/src/discussions/repository.js +1 -1
- package/dist/src/discussions/sealer.js +2 -2
- package/dist/src/discussions/service.js +1 -1
- package/dist/src/endpoint-tools/bridge-host.js +1 -1
- package/dist/src/endpoint-tools/delegation.js +1 -1
- package/dist/src/endpoint-tools/provider-operation-journal.js +1 -1
- package/dist/src/endpoint-tools/runtime.js +1 -1
- package/dist/src/endpoint-tools/upload-service.js +2 -2
- package/dist/src/execution-environments/local-worktree-manager.js +3 -3
- package/dist/src/execution-environments/store.js +1 -1
- package/dist/src/execution-environments/worktree-safety.js +1 -1
- package/dist/src/extensions/agent-plugins/auth.js +2 -2
- package/dist/src/extensions/agent-plugins/branding.js +2 -2
- package/dist/src/extensions/agent-plugins/capability-access.js +1 -1
- package/dist/src/extensions/agent-plugins/cli-authorization.js +3 -3
- package/dist/src/extensions/agent-plugins/contained-path.js +1 -1
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/formats.js +1 -1
- package/dist/src/extensions/agent-plugins/inventory.js +1 -1
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +3 -3
- package/dist/src/extensions/agent-plugins/resources.js +2 -2
- package/dist/src/extensions/agent-plugins/setup.js +4 -4
- package/dist/src/extensions/agent-plugins/skill-catalog.js +2 -2
- package/dist/src/extensions/agent-plugins/source-catalog.js +3 -3
- package/dist/src/extensions/agent-plugins/sources.js +2 -2
- package/dist/src/extensions/agent-plugins/store.js +5 -5
- package/dist/src/extensions/agent-plugins/user-config.js +2 -2
- package/dist/src/extensions/agent-plugins/validation.js +2 -2
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/connector-dependencies.js +1 -1
- package/dist/src/extensions/install-transaction.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/update.js +2 -2
- package/dist/src/files/file-service.js +4 -4
- package/dist/src/files/file-versions.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/static-ui.js +2 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +2 -2
- package/dist/src/gateway/hono/routes/browser.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/extension-ui-assets.js +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/local-app-run-streams.js +1 -1
- package/dist/src/gateway/hono/routes/local-apps.js +2 -2
- package/dist/src/gateway/hono/routes/location-sharing.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +1 -1
- package/dist/src/gateway/hono/routes/mobile-capability-panels.js +27 -10
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +2 -2
- package/dist/src/gateway/hono/routes/phone-dependencies.js +1 -1
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/phone.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +5 -5
- package/dist/src/gateway/hono/routes/provider-setup.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +3 -3
- package/dist/src/gateway/hono/routes/task-retry.d.ts +3 -0
- package/dist/src/gateway/hono/routes/task-retry.js +20 -0
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/tui.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/hono/routes/video-generation.js +1 -1
- package/dist/src/gateway/lock.js +2 -2
- package/dist/src/gateway/media-access.js +2 -2
- package/dist/src/gateway/next-turn-suggestions/snapshot.js +1 -1
- package/dist/src/gateway/security/device-request-proof.js +1 -1
- package/dist/src/gateway/security/phone-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/session-input-coordinator.js +1 -1
- package/dist/src/gateway/service.d.ts +9 -0
- package/dist/src/gateway/service.js +25 -17
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/workspace-editor-path.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/follow-ups.js +1 -1
- package/dist/src/home-intelligence/host.js +1 -1
- package/dist/src/home-intelligence/repository.js +1 -1
- package/dist/src/home-intelligence/routines.js +1 -1
- package/dist/src/imports/files.js +3 -3
- package/dist/src/imports/importService.js +3 -3
- package/dist/src/imports/inventory.js +2 -2
- package/dist/src/imports/planner.js +2 -2
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/imports/scanner.js +2 -2
- package/dist/src/imports/sources.js +2 -2
- package/dist/src/infra/brew.js +1 -1
- package/dist/src/infra/package-runtime-check.js +2 -2
- package/dist/src/infra/path-env.js +2 -2
- package/dist/src/infra/process-diagnostics.js +1 -1
- package/dist/src/infra/restart.js +1 -1
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/infra/update-global.js +1 -1
- package/dist/src/infra/update-lock.js +1 -1
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/infra/write-file-atomic.js +2 -2
- package/dist/src/knowledge/local-folder-adapter.js +1 -1
- package/dist/src/local-apps/acceptance.js +1 -1
- package/dist/src/local-apps/artifact-files.js +2 -2
- package/dist/src/local-apps/automation-proposals.js +1 -1
- package/dist/src/local-apps/capabilities/projections.d.ts +1 -1
- package/dist/src/local-apps/execution-authority.js +2 -2
- package/dist/src/local-apps/p1-services.js +5 -5
- package/dist/src/local-apps/preview-fixtures.js +1 -1
- package/dist/src/local-apps/preview-sessions.js +2 -2
- package/dist/src/local-apps/preview-worker.js +3 -3
- package/dist/src/local-apps/public-assets.js +2 -2
- package/dist/src/local-apps/scaffold.js +1 -1
- package/dist/src/local-apps/service.js +8 -8
- package/dist/src/local-apps/snapshot-store.js +1 -1
- package/dist/src/local-apps/store.js +1 -1
- package/dist/src/media/session-references.js +1 -1
- package/dist/src/media/store.js +1 -1
- package/dist/src/memory-learning/source-learning.js +1 -1
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/migrations/runner.js +1 -1
- package/dist/src/music-generation/artifact.js +2 -2
- package/dist/src/notes/capabilities/write.js +1 -1
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +5 -5
- package/dist/src/notes/store.js +2 -2
- package/dist/src/notifications/harmony-push.js +1 -1
- package/dist/src/notifications/store.js +1 -1
- package/dist/src/observability/store.js +1 -1
- package/dist/src/personal-agent/capability-service.js +2 -2
- package/dist/src/personal-agent/proactivity/repository.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +2 -2
- package/dist/src/personal-agent/prompt-context.js +1 -1
- package/dist/src/personal-agent/prompts.js +2 -2
- package/dist/src/personal-agent/reply-composer.d.ts +2 -0
- package/dist/src/personal-agent/reply-composer.js +135 -85
- package/dist/src/personal-agent/reply-result.d.ts +11 -0
- package/dist/src/personal-agent/reply-result.js +60 -0
- package/dist/src/personal-agent/reply-style.d.ts +1 -1
- package/dist/src/personal-agent/reply-style.js +1 -1
- package/dist/src/personal-agent/request-access.js +1 -1
- package/dist/src/personal-agent/request-delivery.d.ts +1 -1
- package/dist/src/personal-agent/request-delivery.js +11 -10
- package/dist/src/personal-agent/request-service.d.ts +3 -1
- package/dist/src/personal-agent/request-service.js +76 -65
- package/dist/src/personal-agent/result-reader.js +3 -3
- package/dist/src/personal-agent/unread.js +1 -1
- package/dist/src/pets/factory.js +1 -1
- package/dist/src/pets/validator.js +1 -1
- package/dist/src/phone/adb-driver.js +3 -3
- package/dist/src/phone/assistance-service.js +1 -1
- package/dist/src/phone/assistance.js +1 -1
- package/dist/src/phone/cloud-adb-connection.js +1 -1
- package/dist/src/phone/execution-trace.js +1 -1
- package/dist/src/phone/hdc-driver.js +3 -3
- package/dist/src/phone/hdc-video-tools.js +2 -2
- package/dist/src/phone/location-baseline-store.js +1 -1
- package/dist/src/phone/location-environment.js +1 -1
- package/dist/src/phone/repository.js +1 -1
- package/dist/src/phone/ui-session.js +2 -2
- package/dist/src/project-trust/trust-store.js +2 -2
- package/dist/src/projects/capabilities/write.js +3 -3
- package/dist/src/projects/project-kind.js +1 -1
- package/dist/src/projects/project-service.js +2 -2
- package/dist/src/projects/project-skill-service.js +3 -3
- package/dist/src/projects/workspace-project.js +2 -2
- package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/xopc-cloud-credit-budget.js +1 -1
- package/dist/src/runtime-tools/archive.js +2 -2
- package/dist/src/runtime-tools/downloader.js +2 -2
- package/dist/src/runtime-tools/harmony-dependencies.js +6 -6
- package/dist/src/runtime-tools/hdc-files.js +1 -1
- package/dist/src/runtime-tools/manager.js +1 -1
- package/dist/src/runtime-tools/manifest-store.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.js +3 -3
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/share/hosted-note-publication.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/hosted-static-site-publication.js +2 -2
- package/dist/src/share/note-share-service.js +1 -1
- package/dist/src/share/session-share-service.js +2 -2
- package/dist/src/share/share-auto.js +2 -2
- package/dist/src/share/share-store.js +2 -2
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/share/site-static-serve.js +1 -1
- package/dist/src/space/budget-workbook.js +1 -1
- package/dist/src/space/ingest.js +1 -1
- package/dist/src/space/repository.js +3 -3
- package/dist/src/space/workbook-turn.js +1 -1
- package/dist/src/space/worker.js +1 -1
- package/dist/src/storage/sqlite/ai-usage-repository.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.js +2 -2
- package/dist/src/storage/sqlite/connection.js +3 -3
- package/dist/src/storage/sqlite/conversation-repository.js +2 -2
- package/dist/src/storage/sqlite/desktop-execution-repository.js +1 -1
- package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +1 -1
- package/dist/src/storage/sqlite/device-access-repository.js +1 -1
- package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
- package/dist/src/storage/sqlite/index.js +1 -1
- package/dist/src/storage/sqlite/offline-access.js +1 -1
- package/dist/src/storage/sqlite/schema-upgrade.js +3 -3
- package/dist/src/storage/sqlite/session-creation-repository.js +1 -1
- package/dist/src/storage/sqlite/session-input-control-repository.js +1 -1
- package/dist/src/storage/sqlite/session-repository.js +1 -1
- package/dist/src/storage/sqlite/sql-assets.js +1 -1
- package/dist/src/storage/sqlite/windows-database-owners.js +1 -1
- package/dist/src/tasks/capabilities/management.js +1 -1
- package/dist/src/tasks/capabilities/read.js +1 -1
- package/dist/src/tasks/capabilities/relations.js +2 -2
- package/dist/src/tasks/capabilities/write.d.ts +1 -1
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +5 -5
- package/dist/src/tasks/task-application-service.d.ts +8 -0
- package/dist/src/tasks/task-application-service.js +19 -8
- package/dist/src/tasks/task-context-assembler.js +4 -4
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-criterion-review-repository.js +1 -1
- package/dist/src/tasks/task-deliverables.js +1 -1
- package/dist/src/tasks/task-execution-capabilities.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +2 -2
- package/dist/src/tasks/task-handoff.js +10 -10
- package/dist/src/tasks/task-json-acceptance.js +2 -2
- package/dist/src/tasks/task-origin-repository.d.ts +2 -0
- package/dist/src/tasks/task-origin-repository.js +3 -2
- package/dist/src/tasks/task-read-model-projector.js +22 -8
- package/dist/src/tasks/task-research-repair.js +2 -2
- package/dist/src/tasks/task-research-result.js +3 -3
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +3 -3
- package/dist/src/tasks/task-retry-policy.d.ts +5 -0
- package/dist/src/tasks/task-retry-policy.js +48 -0
- package/dist/src/tasks/task-retry-service.d.ts +18 -0
- package/dist/src/tasks/task-retry-service.js +186 -0
- package/dist/src/tasks/task-run-coordinator.js +5 -5
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tasks/task-run-repository.d.ts +1 -1
- package/dist/src/tasks/task-run-repository.js +1 -1
- package/dist/src/tasks/task-signal-service.js +1 -1
- package/dist/src/tasks/task-workspace-verification.js +3 -3
- package/dist/src/tui/backends/embedded-backend.js +8 -8
- package/dist/src/tui/backends/embedded-drafts.js +2 -2
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/clipboard-image.js +3 -3
- package/dist/src/tui/theme-manager.js +1 -1
- package/dist/src/tui/tui-capabilities.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-keybindings-file.js +1 -1
- package/dist/src/tui/tui-scoped-models.js +1 -1
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +2 -2
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/tunnel/frpc-binary.js +2 -2
- package/dist/src/tunnel/frpc-config.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +2 -2
- package/dist/src/tunnel/tunnel-state.js +1 -1
- package/dist/src/user-context/access-policy.js +1 -1
- package/dist/src/user-model/repository.js +1 -1
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/logger/index.js +1 -1
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/video-generation/artifact.js +2 -2
- package/dist/src/video-generation/repository.js +1 -1
- package/dist/src/voice/audio/normalize.js +2 -2
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/dist/src/voice/tts/providers/edge-speech.js +2 -2
- package/dist/src/work-discovery/candidate-discovery.js +3 -3
- package/dist/src/work-discovery/probe.js +4 -4
- package/dist/src/work-discovery/service.js +2 -2
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/capabilities-SIty9Vcz.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BnTgeZB3.js +0 -2
- package/dist/gateway/static/root/assets/chat-page-sPNbEboB.js +0 -72
- package/dist/gateway/static/root/assets/diagnostics-Bo0Z42P_.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CQygYU9S.js +0 -1
- package/dist/gateway/static/root/assets/index-B9_yImuQ.css +0 -1
- package/dist/gateway/static/root/assets/index-BrXVoLVe.js +0 -11
- package/dist/gateway/static/root/assets/markdown-view-BQw7H2MV.js +0 -324
- package/dist/gateway/static/root/assets/markdown-view-DG8DDkEA.css +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-BhJM-EYy.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-y9OBo4Kv.js +0 -1
- package/dist/gateway/static/root/assets/personal-profile-settings-Qn6MR0gu.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-ChMWhk-X.js +0 -7
- package/dist/gateway/static/root/assets/route-preload-B_CMsS70.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-BTuii051.js +0 -2
- package/dist/gateway/static/root/assets/session-channel-icon-COynhpeK.js +0 -1
- package/dist/gateway/static/root/assets/session-identity-label-DCIZvqbN.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-DQ0fiEo9.js +0 -22
- package/dist/gateway/static/root/assets/sessions-page-UTEjz3V0.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cnkvm_q6.js +0 -1
- package/dist/gateway/static/root/assets/space-page-Dpy0BPbT.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-DqgGOX0M.js +0 -3
- package/dist/gateway/static/root/assets/task-run-issue-notice-FMMn1lE6.js +0 -1
- package/dist/gateway/static/root/assets/voice-settings-D8Snr-5R.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-C85sEgvX.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CNPlB8xY.js +0 -1
- package/dist/gateway/static/root/assets/workspace-preview-store-D8eGmciG.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
4
|
import { TASK_RESULT_DELIVERY_TYPE, TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
4
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
|
-
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
7
|
-
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
8
6
|
import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
|
|
9
7
|
import { archiveSpaceTaskDelivery } from "../space/ingest.js";
|
|
10
8
|
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
11
9
|
import { taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
|
|
10
|
+
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
11
|
+
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
12
12
|
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
13
13
|
import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
|
|
14
14
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
@@ -29,6 +29,7 @@ import { recordPersonalPerformance } from "./performance.js";
|
|
|
29
29
|
import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
|
|
30
30
|
import { PERSONAL_PERSONA_GUIDANCE } from "./persona.js";
|
|
31
31
|
import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
|
|
32
|
+
import { isLongPersonalReport, preparePersonalReplyResult, releasePersonalReplyResult } from "./reply-result.js";
|
|
32
33
|
import { randomUUID } from "node:crypto";
|
|
33
34
|
import { z } from "zod";
|
|
34
35
|
//#region src/personal-agent/reply-composer.ts
|
|
@@ -181,6 +182,7 @@ function buildPersonalReplyPrompt(packet, includeRecentConversation = true) {
|
|
|
181
182
|
"Task collaboration is the canonical record of subsequent requirements and answers. Interpret it in sequence and apply the latest direction when explaining the result. An ack proves receipt and interpretation, not verified completion. Disclose pending, stale, delivered-but-unconfirmed or unmet changes; do not claim that an earlier output satisfies a later requirement without supporting result evidence. Task review and verification status are authoritative; successful execution alone does not mean user acceptance.",
|
|
182
183
|
"Task phase review alone does not require another user decision. When the current receipt needsUser is false, deliver the result without asking whether to accept, close, or confirm the Task, unless the user explicitly requested such a decision. Do not invent an acceptance step or offer to mark the Task accepted. Keep concrete verification gaps visible without treating all unverified details as blockers.",
|
|
183
184
|
"Artifacts are already delivered independently: do not attach or repeat them, emit MEDIA directives, or create local/workspace file links. Only confirmed artifact cards provide file access. If preservedText is present, the host appends it exactly; compose the explanation only and do not repeat that content.",
|
|
185
|
+
...packet.fullReportAttached ? ["The full report will be attached to this reply. Open with what the user can use or decide now, followed by the key limitation or action they need to take. Keep the explanation short and leave supporting detail in the attachment."] : [],
|
|
184
186
|
"Return only the concise user-facing reply text, without a JSON wrapper or internal metadata. The host records sources and status. Structured research claims and criterion checks below are authoritative for support and coverage; do not promote unsupported or unreviewed statements to facts.",
|
|
185
187
|
"Lead with the answer or deliverable. Include only findings the user needs and any limitation that changes how they can use the result. Default to one short paragraph for a simple outcome; use a few bullets for distinct findings. Continue the existing exchange without repeating acknowledgements or earlier findings. If the conversation moved on, identify the earlier request in a few words and deliver its outcome. User requests for full detail or exact content take precedence.",
|
|
186
188
|
"Keep internal acceptance counts and criterion indices out of the reply unless the user explicitly asks for them. Explain only practical remaining limitations; do not infer counts from a narrative report.",
|
|
@@ -248,11 +250,58 @@ async function completeReply(packet, signal) {
|
|
|
248
250
|
}
|
|
249
251
|
throw new Error("Reply referred to an unrelated Task");
|
|
250
252
|
}
|
|
251
|
-
function
|
|
253
|
+
function withResultStatus(packet, reply) {
|
|
252
254
|
const status = packet.delivery.outcome.status;
|
|
253
|
-
if (status !== "partial" && status !== "failed") return
|
|
255
|
+
if (status !== "partial" && status !== "failed") return reply;
|
|
254
256
|
const zh = /[\u3400-\u9fff]/u.test(packet.objective);
|
|
255
|
-
return
|
|
257
|
+
return (status === "partial" ? zh ? "这次只完成了部分内容。" : "Only part of the request was completed." : zh ? "这次未能完成请求。" : "The request could not be completed.") + (/^(?:#{1,6}\s|[-*+]\s|\d+[.)]\s|[>|]|```|~~~)/u.test(reply.trimStart()) ? "\n\n" : zh ? "" : " ") + reply;
|
|
258
|
+
}
|
|
259
|
+
function selectedReplyText(packet) {
|
|
260
|
+
const text = packet.delivery.text;
|
|
261
|
+
return text && text === packet.delivery.outcome.research?.finalText ? text : void 0;
|
|
262
|
+
}
|
|
263
|
+
function preserveInlineResult(packet) {
|
|
264
|
+
if (packet.preservedText) return true;
|
|
265
|
+
const request = originalRequest(packet);
|
|
266
|
+
if (/逐字|原样|全文|完整(?:正文|列表|报告|代码)|列出全部|完整清单|(?:聊天|对话)(?:里|内|中)(?:直接)?(?:贴|发|输出|写|列)|verbatim|exact text|full (?:text|report|list|code)|list all|翻译|translate/iu.test(request)) return true;
|
|
267
|
+
return /^(?:```|~~~)/mu.test(packet.report) && !packet.delivery.outcome.deliverables.some((item) => item.availability === "available") && (/^(?:```|~~~)/u.test(packet.report.trimStart()) || /代码|脚本|\b(?:code|script|sql)\b/iu.test(request));
|
|
268
|
+
}
|
|
269
|
+
function fallbackReply(packet, result) {
|
|
270
|
+
const zh = /[\u3400-\u9fff]/u.test(packet.objective);
|
|
271
|
+
const report = sanitizePersonalResultFileLinks(packet.preservedText ?? packet.report);
|
|
272
|
+
if (!result) return report || (zh ? "暂时没有可读的结果。" : "No readable result is available yet.");
|
|
273
|
+
const shortLine = (value) => {
|
|
274
|
+
const line = value && sanitizePersonalResultFileLinks(value);
|
|
275
|
+
if (!line || line.includes("\n") || Array.from(line).length > 240) return void 0;
|
|
276
|
+
try {
|
|
277
|
+
return parsePersonalReplyDraft(line, packet);
|
|
278
|
+
} catch {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const finding = report.split("\n").find((line) => /^(?:#{1,6}\s+)?(?:\*\*)?(?:结论|Conclusion|Finding)\s*[::]/iu.test(line.trim()));
|
|
283
|
+
const receipt = new TaskRunRepository().getReceipt(packet.delivery.taskRunId);
|
|
284
|
+
const summary = shortLine(finding?.trim()) ?? shortLine(receipt?.summary);
|
|
285
|
+
const action = receipt?.needsUser ? shortLine(receipt.nextAction) : void 0;
|
|
286
|
+
const remaining = packet.delivery.outcome.status !== "succeeded" ? shortLine(receipt?.remainingWork[0]) : void 0;
|
|
287
|
+
const detail = action ?? remaining;
|
|
288
|
+
return [
|
|
289
|
+
summary,
|
|
290
|
+
detail && !summary?.includes(detail) ? `${action ? zh ? "下一步:" : "Next step: " : zh ? "还有一项没完成:" : "Still open: "}${detail}` : void 0,
|
|
291
|
+
zh ? "完整结果与限制见附件。" : "See the attachments for the full result and limitations."
|
|
292
|
+
].filter(Boolean).join("\n\n");
|
|
293
|
+
}
|
|
294
|
+
function replyDelivery(packet, text, result) {
|
|
295
|
+
return TaskResultDeliverySchema.parse({
|
|
296
|
+
...packet.delivery,
|
|
297
|
+
deliveryId: `reply:${packet.delivery.deliveryId}`,
|
|
298
|
+
text,
|
|
299
|
+
outcome: {
|
|
300
|
+
...packet.delivery.outcome,
|
|
301
|
+
deliverables: result?.attachment ? [result.attachment] : [],
|
|
302
|
+
summary: text.slice(0, 2e3)
|
|
303
|
+
}
|
|
304
|
+
});
|
|
256
305
|
}
|
|
257
306
|
var PersonalReplyComposer = class {
|
|
258
307
|
constructor(compose = completeReply, timeoutMs = TIMEOUT_MS) {
|
|
@@ -261,57 +310,62 @@ var PersonalReplyComposer = class {
|
|
|
261
310
|
}
|
|
262
311
|
async drain(notify, isAvailable = () => true) {
|
|
263
312
|
const db = getSqliteDatabase();
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
313
|
+
const overduePackets = db.prepare(`SELECT delivery_id, reply_payload_json FROM task_result_deliveries
|
|
314
|
+
WHERE status = 'delivered' AND reply_status IN ('pending','generating','ready')
|
|
315
|
+
AND reply_payload_json IS NOT NULL AND created_at <= ? ORDER BY created_at LIMIT 20`).all(Date.now() - 5e3).map((row) => ({
|
|
316
|
+
id: row.delivery_id,
|
|
317
|
+
packet: PacketSchema.parse(JSON.parse(row.reply_payload_json))
|
|
318
|
+
}));
|
|
319
|
+
const staged = await Promise.all(overduePackets.map(async ({ id, packet }) => ({
|
|
320
|
+
id,
|
|
321
|
+
packet,
|
|
322
|
+
result: valid(packet) && !selectedReplyText(packet) && !preserveInlineResult(packet) ? await preparePersonalReplyResult(packet) : void 0
|
|
323
|
+
})));
|
|
324
|
+
try {
|
|
325
|
+
runSqliteWriteTransaction(() => {
|
|
326
|
+
const eligible = db.prepare(`SELECT 1 FROM task_result_deliveries
|
|
327
|
+
WHERE delivery_id = ? AND status = 'delivered' AND reply_status IN ('pending','generating','ready')`);
|
|
328
|
+
for (const { id, packet, result } of staged) {
|
|
329
|
+
if (!eligible.get(id)) continue;
|
|
330
|
+
composingReplies.get(id)?.abort(/* @__PURE__ */ new Error("Durable final delivery superseded composition"));
|
|
331
|
+
if (!valid(packet)) {
|
|
332
|
+
db.prepare("UPDATE task_result_deliveries SET reply_status = 'stale', reply_lease_token = NULL, reply_lease_until = 0 WHERE delivery_id = ?").run(id);
|
|
333
|
+
continue;
|
|
284
334
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
335
|
+
const text = selectedReplyText(packet) ?? withResultStatus(packet, fallbackReply(packet, result));
|
|
336
|
+
const delivery = replyDelivery(packet, text, result);
|
|
337
|
+
const entry = appendTranscriptEntry(delivery.conversationId, {
|
|
338
|
+
role: "custom",
|
|
339
|
+
customType: TASK_RESULT_DELIVERY_TYPE,
|
|
340
|
+
content: text,
|
|
341
|
+
details: delivery,
|
|
342
|
+
display: true,
|
|
343
|
+
timestamp: Date.now()
|
|
344
|
+
});
|
|
345
|
+
db.prepare(`UPDATE task_result_deliveries SET reply_status = 'delivered', reply_message_entry_id = ?, reply_text = ?,
|
|
346
|
+
reply_lease_token = NULL, reply_lease_until = 0 WHERE delivery_id = ?`).run(entry.entry_id, text, id);
|
|
347
|
+
archiveSpaceTaskDelivery(db, {
|
|
348
|
+
...packet.delivery,
|
|
349
|
+
text: packet.delivery.text ?? (result ? sanitizePersonalResultFileLinks(packet.report) : text)
|
|
350
|
+
}, entry.entry_id);
|
|
351
|
+
if (packet.requestId) db.prepare("UPDATE personal_requests SET delivery_entry_id = ? WHERE request_id = ?").run(entry.entry_id, packet.requestId);
|
|
352
|
+
recordPersonalPerformance({
|
|
353
|
+
phase: "busy_fallback",
|
|
354
|
+
conversationId: delivery.conversationId,
|
|
355
|
+
taskId: delivery.taskId,
|
|
356
|
+
runId: delivery.taskRunId,
|
|
357
|
+
deliveryId: id,
|
|
358
|
+
resultRevision: delivery.resultRevision,
|
|
359
|
+
contractVersion: delivery.contractVersion,
|
|
360
|
+
instructionSequence: delivery.instructionSequence,
|
|
361
|
+
durationMs: Math.max(0, Date.now() - packet.delivery.createdAt),
|
|
362
|
+
status: "success"
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
} finally {
|
|
367
|
+
await Promise.all(staged.map(({ result }) => releasePersonalReplyResult(result)));
|
|
368
|
+
}
|
|
315
369
|
const deliveries = runSqliteWriteTransaction(() => {
|
|
316
370
|
const active = db.prepare("SELECT conversation_id FROM task_result_deliveries WHERE reply_status = 'generating' AND reply_lease_until > ?").all(Date.now());
|
|
317
371
|
const claimedConversations = new Set(active.map((row) => row.conversation_id));
|
|
@@ -339,6 +393,7 @@ var PersonalReplyComposer = class {
|
|
|
339
393
|
await Promise.all(deliveries.map(async (row) => {
|
|
340
394
|
const startedAt = Date.now();
|
|
341
395
|
const startedMonotonic = performance.now();
|
|
396
|
+
let result;
|
|
342
397
|
try {
|
|
343
398
|
const packet = PacketSchema.parse(JSON.parse(row.payload_json));
|
|
344
399
|
if (row.status !== "delivered") {
|
|
@@ -353,18 +408,26 @@ var PersonalReplyComposer = class {
|
|
|
353
408
|
}
|
|
354
409
|
const transcriptId = readCurrentTranscriptId(db, packet.delivery.conversationId);
|
|
355
410
|
let text = row.draft_transcript_id === transcriptId && row.context_revision === conversation.revision ? row.text : null;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
411
|
+
const selectedText = selectedReplyText(packet);
|
|
412
|
+
const preserve = !selectedText && preserveInlineResult(packet);
|
|
413
|
+
const optionalLongReport = !selectedText && !preserve && isLongPersonalReport(packet.report);
|
|
414
|
+
if (optionalLongReport) {
|
|
415
|
+
result = await preparePersonalReplyResult(packet);
|
|
416
|
+
if (!db.prepare("SELECT 1 FROM task_result_deliveries WHERE delivery_id = ? AND reply_lease_token = ?").get(row.delivery_id, row.lease_token)) return;
|
|
417
|
+
}
|
|
418
|
+
if (selectedText) text = selectedText;
|
|
419
|
+
else if (optionalLongReport && (!result || text?.endsWith(sanitizePersonalResultFileLinks(packet.report)))) text = withResultStatus(packet, fallbackReply(packet, result));
|
|
420
|
+
else if (!text) {
|
|
360
421
|
const controller = new AbortController();
|
|
361
422
|
composingReplies.set(row.delivery_id, controller);
|
|
362
423
|
const compositionStartedAt = performance.now();
|
|
363
424
|
let compositionFallback = false;
|
|
364
425
|
let timer;
|
|
365
|
-
const preserve = packet.preservedText || /逐字|原样|完整(?:正文|列表|报告|代码)|列出全部|完整清单|verbatim|exact text|full (?:text|report|list|code)|list all|翻译|translate/iu.test(originalRequest(packet)) || !packet.delivery.outcome.deliverables.some((item) => item.availability === "available") && (packet.report.length > 16e3 || packet.report.includes("```"));
|
|
366
426
|
try {
|
|
367
|
-
const promptPacket =
|
|
427
|
+
const promptPacket = result ? {
|
|
428
|
+
...packet,
|
|
429
|
+
fullReportAttached: true
|
|
430
|
+
} : preserve && !packet.preservedText ? {
|
|
368
431
|
...packet,
|
|
369
432
|
report: packet.report.slice(0, 2e3),
|
|
370
433
|
preservedText: packet.report
|
|
@@ -385,15 +448,7 @@ var PersonalReplyComposer = class {
|
|
|
385
448
|
if (preserve) text += `\n\n${sanitizePersonalResultFileLinks(packet.preservedText ?? packet.report)}`;
|
|
386
449
|
} catch (err) {
|
|
387
450
|
compositionFallback = true;
|
|
388
|
-
|
|
389
|
-
let finding = sanitizePersonalResultFileLinks(packet.report).split("\n").find((line) => /^(?:结论|Conclusion|Finding)\s*[::]/i.test(line.trim()) && line.length <= 400)?.trim();
|
|
390
|
-
try {
|
|
391
|
-
if (finding) validateAcceptanceCounts(finding, packet);
|
|
392
|
-
} catch {
|
|
393
|
-
finding = void 0;
|
|
394
|
-
}
|
|
395
|
-
text = available && !preserve ? /[\u3400-\u9fff]/u.test(packet.objective) ? finding ? `${finding}\n\n完整结果与限制请查看附件。` : `已提供 ${available} 份成果。简短说明暂时不可用,完整结果与限制请查看附件。` : finding ? `${finding}\n\nSee the attachments for the full result and limitations.` : `${available} artifacts are available. A brief explanation is unavailable; see the attachments for the full result and limitations.` : sanitizePersonalResultFileLinks([packet.report, packet.preservedText].filter(Boolean).join("\n\n"));
|
|
396
|
-
if (!text) text = packet.delivery.outcome.deliverables.some((item) => item.availability === "available") ? /[\u3400-\u9fff]/u.test(packet.objective) ? "文件已通过成果卡提供。" : "Files are available in the artifact cards." : /[\u3400-\u9fff]/u.test(packet.objective) ? "文件尚未发布,暂时无法提供下载。" : "The file has not been published for download.";
|
|
451
|
+
text = fallbackReply(packet, result);
|
|
397
452
|
log.warn({
|
|
398
453
|
err,
|
|
399
454
|
conversationId: packet.delivery.conversationId,
|
|
@@ -404,8 +459,7 @@ var PersonalReplyComposer = class {
|
|
|
404
459
|
if (composingReplies.get(row.delivery_id) === controller) composingReplies.delete(row.delivery_id);
|
|
405
460
|
controller.abort();
|
|
406
461
|
}
|
|
407
|
-
text =
|
|
408
|
-
db.prepare("UPDATE task_result_deliveries SET reply_text = ?, reply_draft_transcript_id = ?, reply_context_revision = ?, reply_status = 'ready' WHERE delivery_id = ? AND reply_lease_token = ?").run(text, transcriptId, conversation.revision, row.delivery_id, row.lease_token);
|
|
462
|
+
text = withResultStatus(packet, text);
|
|
409
463
|
log.info({
|
|
410
464
|
replyId: row.delivery_id,
|
|
411
465
|
conversationId: packet.delivery.conversationId,
|
|
@@ -416,6 +470,7 @@ var PersonalReplyComposer = class {
|
|
|
416
470
|
durationMs: performance.now() - startedMonotonic
|
|
417
471
|
}, "Personal reply prepared");
|
|
418
472
|
}
|
|
473
|
+
db.prepare("UPDATE task_result_deliveries SET reply_text = ?, reply_draft_transcript_id = ?, reply_context_revision = ?, reply_status = 'ready' WHERE delivery_id = ? AND reply_lease_token = ?").run(text, transcriptId, conversation.revision, row.delivery_id, row.lease_token);
|
|
419
474
|
if (!runSqliteWriteTransaction(() => {
|
|
420
475
|
const current = db.prepare("SELECT reply_status AS status, reply_lease_token AS lease_token FROM task_result_deliveries WHERE delivery_id = ?").get(row.delivery_id);
|
|
421
476
|
if (!current || current.status !== "ready" || current.lease_token !== row.lease_token) return false;
|
|
@@ -428,16 +483,7 @@ var PersonalReplyComposer = class {
|
|
|
428
483
|
db.prepare("UPDATE task_result_deliveries SET reply_status = 'pending', reply_text = NULL, reply_context_revision = NULL, reply_lease_until = 0 WHERE delivery_id = ?").run(row.delivery_id);
|
|
429
484
|
return false;
|
|
430
485
|
}
|
|
431
|
-
const delivery =
|
|
432
|
-
...packet.delivery,
|
|
433
|
-
deliveryId: `reply:${packet.delivery.deliveryId}`,
|
|
434
|
-
text,
|
|
435
|
-
outcome: {
|
|
436
|
-
...packet.delivery.outcome,
|
|
437
|
-
deliverables: [],
|
|
438
|
-
summary: text.slice(0, 2e3)
|
|
439
|
-
}
|
|
440
|
-
});
|
|
486
|
+
const delivery = replyDelivery(packet, text, result);
|
|
441
487
|
const entry = appendTranscriptEntry(delivery.conversationId, {
|
|
442
488
|
role: "custom",
|
|
443
489
|
customType: "task_result_delivery",
|
|
@@ -449,11 +495,12 @@ var PersonalReplyComposer = class {
|
|
|
449
495
|
db.prepare("UPDATE task_result_deliveries SET reply_status = 'delivered', reply_message_entry_id = ? WHERE delivery_id = ?").run(entry.entry_id, row.delivery_id);
|
|
450
496
|
archiveSpaceTaskDelivery(db, {
|
|
451
497
|
...packet.delivery,
|
|
452
|
-
text: packet.delivery.text ?? text
|
|
498
|
+
text: packet.delivery.text ?? (result ? sanitizePersonalResultFileLinks(packet.report) : text)
|
|
453
499
|
}, entry.entry_id);
|
|
454
500
|
if (packet.requestId) db.prepare("UPDATE personal_requests SET delivery_entry_id = ? WHERE request_id = ?").run(entry.entry_id, packet.requestId);
|
|
455
501
|
return true;
|
|
456
502
|
})) return;
|
|
503
|
+
result = void 0;
|
|
457
504
|
recordPersonalPerformance({
|
|
458
505
|
phase: "reply_persisted",
|
|
459
506
|
conversationId: packet.delivery.conversationId,
|
|
@@ -484,7 +531,8 @@ var PersonalReplyComposer = class {
|
|
|
484
531
|
clearInterval(notificationLease);
|
|
485
532
|
}
|
|
486
533
|
db.prepare("UPDATE task_result_deliveries SET reply_notified_at = ?, reply_lease_until = 0 WHERE delivery_id = ?").run(Date.now(), row.delivery_id);
|
|
487
|
-
if (packet.requestId) db.prepare(
|
|
534
|
+
if (packet.requestId) db.prepare(`UPDATE personal_requests SET notified_at = ? WHERE request_id = ?
|
|
535
|
+
AND (json_extract(parameters_json, '$.taskRunId') IS NULL OR json_extract(parameters_json, '$.taskRunId') = ?)`).run(Date.now(), packet.requestId, packet.delivery.taskRunId);
|
|
488
536
|
} catch (err) {
|
|
489
537
|
db.prepare(`UPDATE task_result_deliveries SET reply_attempts = reply_attempts + 1, reply_next_attempt_at = ?, reply_last_error = ?, reply_lease_until = 0
|
|
490
538
|
WHERE delivery_id = ? AND reply_lease_token = ?`).run(Date.now() + Math.min(6e4, 1e3 * 2 ** Math.min(row.attempts, 6)), (err instanceof Error ? err.message : String(err)).slice(0, 500), row.delivery_id, row.lease_token);
|
|
@@ -492,6 +540,8 @@ var PersonalReplyComposer = class {
|
|
|
492
540
|
err,
|
|
493
541
|
replyId: row.delivery_id
|
|
494
542
|
}, row.attempts === 7 ? "Personal reply delivery exhausted retries" : "Personal reply delivery will retry");
|
|
543
|
+
} finally {
|
|
544
|
+
await releasePersonalReplyResult(result);
|
|
495
545
|
}
|
|
496
546
|
}));
|
|
497
547
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TurnOutcomeDeliverable } from '@xopcai/gateway-contract';
|
|
2
|
+
import type { PersonalReplyPacket } from './reply-composer.js';
|
|
3
|
+
export interface PersonalReplyResult {
|
|
4
|
+
/** Absent when a file already delivered to the conversation contains the complete report. */
|
|
5
|
+
attachment?: TurnOutcomeDeliverable & {
|
|
6
|
+
uri: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare function isLongPersonalReport(report: string): boolean;
|
|
10
|
+
export declare function preparePersonalReplyResult(packet: PersonalReplyPacket): Promise<PersonalReplyResult | undefined>;
|
|
11
|
+
export declare function releasePersonalReplyResult(result: PersonalReplyResult | undefined): Promise<void>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { tryParseMediaUri } from "../media/uri.js";
|
|
4
|
+
import { MEDIA_ARTIFACT_MAX_BYTES, resolveMediaBufferPath, saveMediaBuffer } from "../media/store.js";
|
|
5
|
+
import { sanitizePersonalResultFileLinks } from "./result-file-links.js";
|
|
6
|
+
import { isAvailableDeliverable } from "../tasks/task-deliverables.js";
|
|
7
|
+
import { deleteMediaUris } from "../media/session-references.js";
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { lstat } from "node:fs/promises";
|
|
10
|
+
//#region src/personal-agent/reply-result.ts
|
|
11
|
+
init_logger();
|
|
12
|
+
const log = createLogger("PersonalReplyComposer");
|
|
13
|
+
const INLINE_REPORT_LIMIT = 600;
|
|
14
|
+
function isLongPersonalReport(report) {
|
|
15
|
+
return report.length > INLINE_REPORT_LIMIT && Array.from(report).length > INLINE_REPORT_LIMIT;
|
|
16
|
+
}
|
|
17
|
+
async function preparePersonalReplyResult(packet) {
|
|
18
|
+
if (!isLongPersonalReport(packet.report)) return void 0;
|
|
19
|
+
const bytes = Buffer.from(sanitizePersonalResultFileLinks(packet.report));
|
|
20
|
+
if (!bytes.length) return void 0;
|
|
21
|
+
const sha256 = createHash("sha256").update(bytes).digest("hex");
|
|
22
|
+
const existing = packet.delivery.outcome.deliverables.find((item) => item.sha256 === sha256 && item.uri?.startsWith("media://outbound/") && item.capabilities.includes("download") && isAvailableDeliverable(item, Date.now()));
|
|
23
|
+
const mediaRef = existing?.uri && tryParseMediaUri(existing.uri);
|
|
24
|
+
if (mediaRef && mediaRef.bucket === "outbound") {
|
|
25
|
+
const file = await lstat(resolveMediaBufferPath(mediaRef.id, mediaRef.bucket)).catch(() => void 0);
|
|
26
|
+
if (file?.isFile() && file.size === bytes.length) return {};
|
|
27
|
+
}
|
|
28
|
+
const zh = /[\u3400-\u9fff]/u.test(packet.objective);
|
|
29
|
+
try {
|
|
30
|
+
const media = await saveMediaBuffer(bytes, {
|
|
31
|
+
bucket: "outbound",
|
|
32
|
+
contentType: "text/markdown",
|
|
33
|
+
maxBytes: MEDIA_ARTIFACT_MAX_BYTES,
|
|
34
|
+
originalFilename: "full-result.md"
|
|
35
|
+
});
|
|
36
|
+
return { attachment: {
|
|
37
|
+
artifactId: media.id,
|
|
38
|
+
title: zh ? "完整结果.md" : "Full result.md",
|
|
39
|
+
kind: "document",
|
|
40
|
+
mimeType: media.contentType,
|
|
41
|
+
sizeBytes: media.size,
|
|
42
|
+
sha256,
|
|
43
|
+
availability: "available",
|
|
44
|
+
location: "artifact_store",
|
|
45
|
+
uri: media.uri,
|
|
46
|
+
capabilities: ["preview", "download"]
|
|
47
|
+
} };
|
|
48
|
+
} catch (err) {
|
|
49
|
+
log.warn({
|
|
50
|
+
err,
|
|
51
|
+
taskRunId: packet.delivery.taskRunId
|
|
52
|
+
}, "Could not attach the full task result");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async function releasePersonalReplyResult(result) {
|
|
57
|
+
if (result?.attachment) await deleteMediaUris([result.attachment.uri]);
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { isLongPersonalReport, preparePersonalReplyResult, releasePersonalReplyResult };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PERSONAL_REPLY_STYLE_RULES: readonly ["Distinguish a failed internal attempt from the user’s final outcome. Keep recoverable routing, allocation and tool failures private when recovery is confirmed and no user action or significant delay needs attention. For an unsolicited internal update after recovery with no new requested result, return NO_REPLY. Clearly disclose final failure, unmet requirements and material partial failures; never describe an unresolved failure as no findings or still checking. Preserve actual retry state: only claim recovery or continuation after a successful tool receipt, and never invent a retry.", "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.", "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.", "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.", "
|
|
1
|
+
export declare const PERSONAL_REPLY_STYLE_RULES: readonly ["Distinguish a failed internal attempt from the user’s final outcome. Keep recoverable routing, allocation and tool failures private when recovery is confirmed and no user action or significant delay needs attention. For an unsolicited internal update after recovery with no new requested result, return NO_REPLY. Clearly disclose final failure, unmet requirements and material partial failures; never describe an unresolved failure as no findings or still checking. Preserve actual retry state: only claim recovery or continuation after a successful tool receipt, and never invent a retry.", "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.", "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.", "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.", "Write the reply as a short message to one person. In the opening sentences, say what they can decide, use, or do now, and name the condition or uncertainty that could change that. For a decision, include the decisive trade-offs once. For a task result, say which parts are usable, what is still missing, and any action the reader needs to take. Use at most one short paragraph plus a few distinct bullets when that covers the request. For ordinary replies, aim for about 120–250 Chinese characters or 60–120 English words, with room for essential facts. Keep the figures, deadlines, and limits needed to act. Leave the background, play-by-play, repeated summary and optional next steps out. Honor a numerical length limit when the user sets one. Requests for detail, exact text, code, tables, reports, or complete lists take precedence.", "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; group routine newsletters and promotions briefly. Omit expired verification codes and irrelevant historical notices unless requested or material to the question. Do not turn every retrieved item into a finding or append the source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.", "Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.", "Use short paragraphs and useful structure. When the user accepts a settled plan with no new question, acknowledge briefly and end: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.", "Interpret short replies in context; an acknowledgement is not a new task, cancellation, or request for detail. Continue accepted offers and honor stop requests.", "Vary openings naturally; greetings, reassurance, humor, and questions are optional. Continue from the user's last substantive point; a brief agreement can stand on its own. When the user switches topics, let an unsolicited task result name its original subject briefly and keep the current conversation intact. Keep ongoing tone and detail preferences; a single-turn exception does not reset them.", "Keep requested content, limits, and partial failures visible. Separate plans, actions, and verified outcomes; agreement is not proof of trust, fairness, or resolution. Cite sources when requested or necessary.", "Use supplied facts in drafts and roleplay. Never invent a private disclosure, quote, action or reaction to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."];
|
|
2
2
|
export declare const PERSONAL_REPLY_EXAMPLES = "Examples; use evidence.\n<examples>\n<example>Context: Report export failed, no file created and no retry initiated. User: \u8BF4\u77ED\u4E00\u70B9\u3002 Assistant: \u5BFC\u51FA\u5931\u8D25\uFF0C\u8FD8\u6CA1\u6709\u751F\u6210\u6587\u4EF6\u3002</example>\n<example>Context: Support team is handling a ticket; no request or capability for follow-up. User: \u8C01\u5728\u5904\u7406\uFF0C\u73B0\u5728\u4EC0\u4E48\u8FDB\u5EA6\uFF1F Assistant: \u5BA2\u670D\u56E2\u961F\u6B63\u5728\u5904\u7406\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u5904\u7406\u7ED3\u679C\u3002</example>\n<example>Context: Lookup not started. User: \u67E5\u4E00\u4E0B\u8FD9\u4E2A\u95EE\u9898\u3002 Assistant: \u6211\u6765\u67E5\u4E00\u4E0B\u3002</example>\n<example>Context: The user asked to retry a search after an incomplete reply; continuation was accepted. User: \u518D\u67E5\u4E00\u904D\uFF0C\u7B80\u6D01\u4E00\u70B9\u3002 Assistant: \u6211\u518D\u67E5\u4E00\u904D\uFF0C\u5148\u628A\u6709\u4F9D\u636E\u7684\u539F\u56E0\u548C\u5173\u952E\u6D88\u606F\u8BF4\u6E05\u695A\u3002</example>\n<example>Context: Internal lookup confirmed running; no findings yet. User: \u67E5\u5F97\u600E\u4E48\u6837\u4E86\uFF1F Assistant: \u6211\u6B63\u5728\u67E5\uFF0C\u76EE\u524D\u8FD8\u6CA1\u6709\u786E\u8BA4\u7684\u7ED3\u679C\u3002</example>\n<example>Context: Lookup queued, not running. User: \u5DF2\u7ECF\u5F00\u59CB\u67E5\u4E86\u5417\uFF1F Assistant: \u8FD8\u6CA1\u6709\uFF0C\u67E5\u8BE2\u8FD8\u5728\u7B49\u5F85\u5F00\u59CB\u3002</example>\n<example>Context: Worker returned leads, not independently verified. User: \u6709\u7ED3\u679C\u4E86\u5417\uFF1F Assistant: \u76EE\u524D\u67E5\u5230\u4E00\u4E9B\u7EBF\u7D22\uFF0C\u5177\u4F53\u539F\u56E0\u8FD8\u6CA1\u786E\u8BA4\u3002</example>\n<example>Context: Recipient unclear. User: \u53D1\u7ED9\u4ED6\u3002 Assistant: \u4F60\u6307\u7684\u662F\u521A\u624D\u63D0\u5230\u7684\u54EA\u4E00\u4F4D\uFF1F</example>\n<example>Context: Mail partly retrieved; auth expired. Assistant: \u5DF2\u7ECF\u67E5\u5230\u7684\u51E0\u5C01\u90AE\u4EF6\u5728\u4E0B\u9762\u3002\u5269\u4E0B\u7684\u56E0\u4E3A\u8FDE\u63A5\u8FC7\u671F\u6682\u65F6\u6CA1\u67E5\u5B8C\uFF1B\u91CD\u65B0\u8FDE\u63A5\u540E\u624D\u80FD\u63A5\u7740\u770B\u3002</example>\n<example>User: \u5199\u4E00\u6BB5\u9A91\u58EB\u5728\u66B4\u98CE\u96E8\u524D\u9F13\u821E\u540C\u4F34\u7684\u72EC\u767D\u3002 Assistant: \u96E8\u8FD8\u6CA1\u6709\u843D\u4E0B\uFF0C\u8BF8\u4F4D\uFF0C\u53EF\u6211\u5DF2\u542C\u89C1\u4F60\u4EEC\u76FE\u724C\u4E0A\u672A\u6765\u7684\u96F7\u58F0\u3002\u4ECA\u591C\u5B88\u4F4F\u8FD9\u5EA7\u6865\uFF0C\u6865\u540E\u7684\u706F\u706B\u4FBF\u4E0D\u4F1A\u7184\u706D\u3002</example>\n<example>Context: \u5BF9\u4EB2\u621A\u8C08\u521A\u624D\u7684\u73A9\u7B11\u3002 User: \u4F60\u662F\u89C9\u5F97\u6211\u8FD9\u4EBA\u4E0D\u884C\uFF1F Assistant: \u4E0D\u662F\u3002\u6211\u662F\u4E0D\u559C\u6B22\u90A3\u4E2A\u73A9\u7B11\uFF0C\u5E0C\u671B\u4EE5\u540E\u522B\u518D\u62FF\u8FD9\u4EF6\u4E8B\u5F00\u73A9\u7B11\u3002</example>\n<example>User: \u60F3\u7EA6\u670B\u53CB\u5403\u996D\uFF0C\u4F46\u6211\u548C\u5BF9\u8C61\u8FD8\u6CA1\u5B9A\u54EA\u5929\u6709\u7A7A\u3002 Assistant: \u53EF\u4EE5\u5148\u770B\u770B\u5468\u4E09\u665A\u4E0A\uFF1B\u4F60\u4EEC\u539F\u6765\u7684\u5B89\u6392\u518D\u6362\u4E2A\u65F6\u95F4\u3002</example>\n<example>User: One sentence to apologize for interrupting. Assistant: \u201CI cut you off earlier. I'm sorry\u2014I'd like to hear the rest.\u201D</example>\n<example>Context: Plan accepted. User: \u597D\uFF0C\u90A3\u6211\u5468\u4E94\u628A\u6750\u6599\u53D1\u8FC7\u53BB\u3002 Assistant: \u597D\u3002</example>\n</examples>";
|
|
@@ -4,7 +4,7 @@ const PERSONAL_REPLY_STYLE_RULES = [
|
|
|
4
4
|
"Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.",
|
|
5
5
|
"Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.",
|
|
6
6
|
"Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.",
|
|
7
|
-
"
|
|
7
|
+
"Write the reply as a short message to one person. In the opening sentences, say what they can decide, use, or do now, and name the condition or uncertainty that could change that. For a decision, include the decisive trade-offs once. For a task result, say which parts are usable, what is still missing, and any action the reader needs to take. Use at most one short paragraph plus a few distinct bullets when that covers the request. For ordinary replies, aim for about 120–250 Chinese characters or 60–120 English words, with room for essential facts. Keep the figures, deadlines, and limits needed to act. Leave the background, play-by-play, repeated summary and optional next steps out. Honor a numerical length limit when the user sets one. Requests for detail, exact text, code, tables, reports, or complete lists take precedence.",
|
|
8
8
|
"For summaries, lead with the conclusion and select findings by relevance to the user’s request. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; group routine newsletters and promotions briefly. Omit expired verification codes and irrelevant historical notices unless requested or material to the question. Do not turn every retrieved item into a finding or append the source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.",
|
|
9
9
|
"Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.",
|
|
10
10
|
"Use short paragraphs and useful structure. When the user accepts a settled plan with no new question, acknowledge briefly and end: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.",
|
|
@@ -4,9 +4,9 @@ import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-r
|
|
|
4
4
|
import { getPersonalRequest, init_request_repository, personalRequestForExecution } from "./request-repository.js";
|
|
5
5
|
import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
|
|
6
6
|
import { getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../storage/sqlite/connector-repository.js";
|
|
7
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
8
7
|
import { canAccessConnectorAccount } from "../connectors/account-access.js";
|
|
9
8
|
import { connectorPrincipalForSession } from "../connectors/principal.js";
|
|
9
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
10
10
|
//#region src/personal-agent/request-access.ts
|
|
11
11
|
init_connector_account_repository();
|
|
12
12
|
init_connector_repository();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Closed authorization waits retain their feedback marker for restart-safe delivery. */
|
|
2
2
|
export declare function drainPersonalRequestContinuations(notify?: (conversationId: string, requestId: string) => void): void;
|
|
3
3
|
/** Stage Task-backed personal results in the shared delivery outbox. */
|
|
4
|
-
export declare function drainPersonalRequestResults(notify?: (conversationId: string, requestId: string) => void): void;
|
|
4
|
+
export declare function drainPersonalRequestResults(notify?: (conversationId: string, requestId: string, deliveryId?: string) => void): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
4
|
import { TASK_RESULT_DELIVERY_TYPE, TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
4
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
6
|
import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
|
|
7
7
|
import { init_task_instruction_sequence, taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
|
|
8
8
|
import { finalizedTaskResultId, init_task_result_versions } from "../tasks/task-result-versions.js";
|
|
@@ -11,8 +11,8 @@ import { getPersonalRequest, init_request_repository, updatePersonalRequest } fr
|
|
|
11
11
|
import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
|
|
12
12
|
import { getPersonalAgentByConversation } from "./repository.js";
|
|
13
13
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
14
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
15
14
|
import { warmPersonalResult } from "./result-reader.js";
|
|
15
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
16
16
|
import { PersonalRequestResultSchema, renderPersonalRequestResult } from "./request-result.js";
|
|
17
17
|
import { enqueuePersonalReply } from "./reply-composer.js";
|
|
18
18
|
//#region src/personal-agent/request-delivery.ts
|
|
@@ -77,11 +77,11 @@ function drainPersonalRequestResults(notify) {
|
|
|
77
77
|
const db = getSqliteDatabase();
|
|
78
78
|
const rows = db.prepare(`SELECT request_id, delivery_attempts FROM personal_requests request WHERE task_id IS NOT NULL
|
|
79
79
|
AND state != 'cancelled' AND notified_at IS NULL AND delivery_attempts < 8 AND delivery_next_attempt_at <= ? AND EXISTS
|
|
80
|
-
(SELECT 1 FROM task_runs run WHERE run.
|
|
80
|
+
(SELECT 1 FROM task_runs run WHERE run.run_id = (SELECT latest.run_id FROM task_runs latest
|
|
81
|
+
WHERE latest.task_id = request.task_id AND latest.parent_run_id IS NULL ORDER BY latest.queued_at DESC, latest.rowid DESC LIMIT 1)
|
|
81
82
|
AND run.status IN ('succeeded','failed','cancelled')
|
|
82
|
-
AND NOT EXISTS (SELECT 1 FROM
|
|
83
|
-
AND
|
|
84
|
-
AND NOT EXISTS (SELECT 1 FROM task_result_deliveries delivery WHERE json_extract(delivery.reply_payload_json, '$.requestId') = request.request_id)
|
|
83
|
+
AND NOT EXISTS (SELECT 1 FROM task_result_deliveries delivery WHERE delivery.task_run_id = run.run_id
|
|
84
|
+
AND json_extract(delivery.reply_payload_json, '$.requestId') = request.request_id))
|
|
85
85
|
ORDER BY created_at LIMIT 50`).all(Date.now());
|
|
86
86
|
for (const row of rows) try {
|
|
87
87
|
const request = getPersonalRequest(row.request_id);
|
|
@@ -91,6 +91,7 @@ function drainPersonalRequestResults(notify) {
|
|
|
91
91
|
"failed",
|
|
92
92
|
"cancelled"
|
|
93
93
|
].includes(run.status)) continue;
|
|
94
|
+
const deliveryId = `personal-request:${request.requestId}${run.retryOfRunId ? `:${run.id}` : ""}`;
|
|
94
95
|
const state = new TaskConversationRepository().getState(request.taskId);
|
|
95
96
|
const receipt = new TaskRunRepository().getReceipt(run.id);
|
|
96
97
|
runSqliteWriteTransaction(() => {
|
|
@@ -119,7 +120,7 @@ function drainPersonalRequestResults(notify) {
|
|
|
119
120
|
const now = Date.now();
|
|
120
121
|
const delivery = TaskResultDeliverySchema.parse({
|
|
121
122
|
version: 1,
|
|
122
|
-
deliveryId
|
|
123
|
+
deliveryId,
|
|
123
124
|
taskId: request.taskId,
|
|
124
125
|
taskRunId: run.id,
|
|
125
126
|
taskResultId: !outdated && !unverifiedDirections ? finalizedTaskResultId(run.id) : void 0,
|
|
@@ -132,9 +133,9 @@ function drainPersonalRequestResults(notify) {
|
|
|
132
133
|
instructionSequence: latestDirection,
|
|
133
134
|
outcome: {
|
|
134
135
|
version: 1,
|
|
135
|
-
outcomeId:
|
|
136
|
+
outcomeId: deliveryId,
|
|
136
137
|
runId: run.id,
|
|
137
|
-
turnId:
|
|
138
|
+
turnId: deliveryId,
|
|
138
139
|
status: failed ? "failed" : outdated || unverifiedDirections || parsed?.success && parsed.data.coverage?.partial ? "partial" : "succeeded",
|
|
139
140
|
summary: content.slice(0, 2e3),
|
|
140
141
|
deliverables: [],
|
|
@@ -168,7 +169,7 @@ function drainPersonalRequestResults(notify) {
|
|
|
168
169
|
const delivered = db.prepare("SELECT delivery_entry_id, notified_at FROM personal_requests WHERE request_id = ?").get(request.requestId);
|
|
169
170
|
if (delivered.delivery_entry_id && !delivered.notified_at) {
|
|
170
171
|
emitSessionTranscriptUpdate({ conversationId: request.conversationId });
|
|
171
|
-
notify?.(request.conversationId, request.requestId);
|
|
172
|
+
notify?.(request.conversationId, request.requestId, deliveryId);
|
|
172
173
|
db.prepare("UPDATE personal_requests SET notified_at = ? WHERE request_id = ?").run(Date.now(), request.requestId);
|
|
173
174
|
}
|
|
174
175
|
} catch (err) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConnectionWait } from '@xopcai/gateway-contract';
|
|
1
|
+
import { type ConnectionWait, type TaskRun } from '@xopcai/gateway-contract';
|
|
2
2
|
import { type PersonalRequest } from './request-repository.js';
|
|
3
3
|
export declare function assertPersonalRequestTimeRange(range: NonNullable<PersonalRequest['parameters']['timeRange']>): void;
|
|
4
4
|
export declare function submitPersonalRequest(input: {
|
|
@@ -19,6 +19,8 @@ export declare function submitPersonalRequest(input: {
|
|
|
19
19
|
export declare function resolvePersonalRequestConnection(wait: ConnectionWait, resolution: 'continued' | 'skipped'): PersonalRequest | undefined;
|
|
20
20
|
/** A worker can request access recovery without requiring a new main-chat turn. */
|
|
21
21
|
export declare function requirePersonalWorkerConnection(conversationId: string): PersonalRequest;
|
|
22
|
+
/** Caller owns the write transaction that binds the request and its run. */
|
|
23
|
+
export declare function waitForPersonalRequestConnection(request: PersonalRequest, run: TaskRun): PersonalRequest;
|
|
22
24
|
export declare function personalRequestSnapshot(request: PersonalRequest): PersonalRequest;
|
|
23
25
|
/** Dispatch only the request's bound execution; SDK acknowledgement must not block input. */
|
|
24
26
|
export declare function stopPersonalRequestExecution(request: PersonalRequest): {
|