@xopcai/xopc 0.0.467 → 0.0.469
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/dist/sidepanel.js +5 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CdEua6PR.js → activity-store-DKP2sWTJ.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-l8GQ4I9J.js → agent-avatar-dicebear-BR85bT1W.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-BO1bqKlR.js → agent-avatar-display-CIsejg_E.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-Dj_H2kDD.js → agent-defaults-settings-panel-CxLUEl0V.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BQA2brAU.js → agent-plugin-dialog-Cvj04Ckm.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-C5C5l13A.js → agents-DZftplJc.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DZ1lLnrj.js → agents-admin-api-BL8lN8gP.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DDWYNF7I.js → api-BnS9d0p6.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DVXcGKP-.js → api-V4P8zfkJ.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-BkEO3eBe.js → app-link-CauYDM-y.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B5-7E03Z.js → app-management-settings-panel-CAEry5Vu.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-E_BcjEDM.js → appearance-settings-CphsmJgM.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BjB_mjXu.js → apps-page-CXKTWj1s.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-MvSiDvxK.js → archive-plugin-DS6JWBPZ.js} +1 -1
- package/dist/gateway/static/root/assets/arrow-down-to-line-C5D8Vt-L.js +1 -0
- package/dist/gateway/static/root/assets/{attachment-load-DrVGNxJm.js → attachment-load-C9iZLUHv.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-_6GhoCYk.js +12 -0
- package/dist/gateway/static/root/assets/attachment-utils-core-BPYdUI6y.js +1 -0
- package/dist/gateway/static/root/assets/{automation-api-24NjW7qG.js → automation-api-GcRQ9wM4.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-C94Q3OEL.js → automation-result-state-Dcp0JX0w.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-BShRirWV.js → automation-run-list-BLejrWpG.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-Bgq5Plux.js → automation-task-card-BNT3n0qu.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-3WGWLdiW.js → automations-page-DqrAOReO.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BYmFhO8E.js +9 -0
- package/dist/gateway/static/root/assets/binary-plugins-CnFVuJtL.js +2 -0
- package/dist/gateway/static/root/assets/{block-editor-DAWXPErA.js → block-editor-jy5CCmhH.js} +9 -9
- package/dist/gateway/static/root/assets/{browser-settings-page-DI2PYAPC.js → browser-settings-page-Dd2eTtvL.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Dyw8xW90.js → capabilities-CaJjMTli.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-YmBD7oK8.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-XgIRdqCb.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DfyND0IO.js +8 -0
- package/dist/gateway/static/root/assets/channels-DwUmMnA1.js +1 -0
- package/dist/gateway/static/root/assets/{chat-agents-api-BksS0CNy.js → chat-agents-api-Bim8--J9.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-aZIklMNN.js → chat-chart-block-B_c5sy7q.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-DfFXhDRv.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B4HoRIzf.js → chat-terminal-dock-Dn7Cm1O4.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-VhBEUFmw.js → command-palette-api-DPtCt8Je.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-BhRAbdPW.js → composer-model-config-control-BF9PPSiu.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-nT-U6jcc.js → composer-notifications-B0IZsy8x.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-xEFHDnLo.js → composer-payload-handoff-CRCz17sd.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DXlH96m6.js → computer-settings-page-CtfitoMZ.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-D8vBFsbY.js → connected-providers-grid-DUHMZjyV.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-C8jPm7QO.js → connection-usage-guide-CM5qgMcK.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-B42yWHxS.js → connector-service-page-DLbBblN2.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-so2a7xrD.js → connectors-api-BUdH4tZQ.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-yhOZIiUZ.js → connectors-page-HHGB3r3Q.js} +1 -1
- package/dist/gateway/static/root/assets/constants-D5Z-mUto.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-UEh3JM7r.js → date-picker-DRSq2kDz.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-Dci0LfAU.js → date-time-picker--LGC1D3b.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BAU_GuBe.js → desktop-pet-1oXlQvjH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CYE2eTTf.js → desktop-pet-settings-GdOjz7W9.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-C7v4CIlF.js → dev-view-store-DnQ2nBtV.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-7NDkYmiZ.js → device-pairing-wizard-eWeHH6Ru.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DmRZY8kg.js → directory-picker-path-field-DBe_paLy.js} +1 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-BqtUnmq-.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-D8TAJgZ_.js → extension-debug-page-DIAyDA-a.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CjfRKtQ4.js → extension-iframe-host-CCe4R7L7.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-V1oFBxVi.js → extension-marketplace-api-baFXdV56.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-DZahH1Hd.js → extension-message-router-BD0ZamBV.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DMuHBIHa.js → extension-page-C09dlV3J.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-lqJ1zIkA.js → extension-provider-BhluafoX.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D5IfKVff.js → extension-settings-page-CB8KLYoG.js} +1 -1
- package/dist/gateway/static/root/assets/file-CStvVK2S.js +1 -0
- package/dist/gateway/static/root/assets/{file-BqMS_3DT.js → file-code-corner-byQA1VfD.js} +1 -1
- package/dist/gateway/static/root/assets/file-icon-N6WjUhq_.js +1 -0
- package/dist/gateway/static/root/assets/{file-preview-surface-B7B9qXm9.js → file-preview-surface-CeFFZo3a.js} +1 -1
- package/dist/gateway/static/root/assets/file-tree-CYUkQR1t.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-Dk3FtNv1.js → gateway-config-swr-DVXDJNCI.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DMvo4pAc.js → gateway-realtime-BnwNxbyc.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BpnGXAhi.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-C2h5R1eP.js → gateway-restart-Bws2Shaz.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DGPaikv5.js → gateway-settings-BU5Cp4Bw.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-yZn7ShiP.js → gateway-startup-retry-2jU7zCyx.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-gsAa0Kj9.js → global-defaults-api-CNyJ0dGb.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-BBTtXpDD.js → home-page-8KwhWlYt.js} +3 -3
- package/dist/gateway/static/root/assets/{image-generation-api-DPn1SBMH.js → image-generation-api-CiqQSx5j.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-Cc48Uq20.js → imports-page-B9JMNXwt.js} +1 -1
- package/dist/gateway/static/root/assets/index-CZUfwwLp.css +1 -0
- package/dist/gateway/static/root/assets/index-D5hovYIw.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-QkJMw_uW.js → install-connector-dialog-BZjodnUC.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BZXqXuI4.js → keyboard-shortcuts-settings-A37hYJtR.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DmzgjJNj.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-D-bRvlZY.js → local-apps-page-Ct8z2B7R.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CZ19DRRK.js → local-session-drafts-CgAuYyKi.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DIBIYLnI.js → locale-store-Cit_aHqC.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CH9amuGc.js +2 -0
- package/dist/gateway/static/root/assets/{management-api-EG5duPec.js → management-api-DG-yZnHK.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-B7RWHrwo.js → management-settings-CUQd0FJ3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-C30KvTaE.js → markdown-view-Dm01GIXv.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-BZ1PDTYY.js → mcp-conversation-setup-page-YvPXchDz.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CW5UoTx6.js → media-plugins-jsWNdARw.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DQveK9sk.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-COGICRIG.js → model-selector-Cg2kTsE7.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-B2QcrY4n.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DeFb2HEC.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-DUzoWZEe.js +1 -0
- package/dist/gateway/static/root/assets/notes-api-BMSPkAm8.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-nvqpOeHp.js +8 -0
- package/dist/gateway/static/root/assets/{oauth-api-enDU_32p.js → oauth-api-Bz_PU9R_.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-C2pfvPOI.js → oauth-provider-connect-BexlZuZ4.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BaSooYGv.js → page-context-capture-button-Cn4zi3Mt.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-4-3RtO0q.js → page-context-draft-BjbX5zd7.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-1-lflHAx.js +1 -0
- package/dist/gateway/static/root/assets/personal-avatar-CM3vUGhL.js +1 -0
- package/dist/gateway/static/root/assets/personal-avatar-DsEp8QJ7.css +1 -0
- package/dist/gateway/static/root/assets/personal-page-HFjWZacf.js +1 -0
- package/dist/gateway/static/root/assets/{personal-profile-settings-DwMdjQ6H.js → personal-profile-settings-CNI5Eor6.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-DiNpP_g3.js → personal-settings-panel-BcrpYRn9.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DUT-qRLZ.js → phone-dependencies-card-CJ3ovsW1.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-pvOciDNo.js → phone-model-connection-DKvOEjWH.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CD97E6C5.js → phone-model-picker-CNTcpY1A.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-BUZ1dh7s.js → phone-settings-page-DvX6okzz.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BwilERgv.js → phone-workspace-store-CKOW55gy.js} +1 -1
- package/dist/gateway/static/root/assets/playback-coordinator-CWHIf0wr.js +1 -0
- package/dist/gateway/static/root/assets/{plugin-details-dialog-C_uOVmJv.js → plugin-details-dialog-BDoSffLO.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-BSUgcO7-.js → preference-select-fields-BKmzpfHq.js} +1 -1
- package/dist/gateway/static/root/assets/presentation-D-Ui_vVA.js +1 -0
- package/dist/gateway/static/root/assets/preview-runtime-RnBDP-Lq.js +15 -0
- package/dist/gateway/static/root/assets/product-automation-feedback-xAcXeJM2.js +7 -0
- package/dist/gateway/static/root/assets/product-delivery-4gEqUIsK.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dy6D5exJ.js → product-open-page-DXwOPgRP.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-DEUPAilo.js → product-preview-content-DiQbeaCK.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-C4TV9RUd.js → product-preview-modal-BU7Qojpq.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-Dr5_WPRB.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-lOJ5Tz2V.js → project-understanding-Dv26vu9S.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-B3aGdPHy.js → projects-page-DGATZB23.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-C26HgxZY.js → providers-api-BXa2Aheb.js} +1 -1
- package/dist/gateway/static/root/assets/recording-upload-CQdhrRq3.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-pQ0eInzG.js → registry-api-BEnvt9-6.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CjWrYzjf.js → remote-access-hub-_7tmWand.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-Y9WRHOnz.js → resource-unavailable-fk26VrOL.js} +1 -1
- package/dist/gateway/static/root/assets/right-workspace-store-NXMrEuwH.js +1 -0
- package/dist/gateway/static/root/assets/route-preload-D-pdVwIK.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-rjq-8nZ8.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-BoJQ3u5o.js → runtime-tools-api-CL6CG-qq.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DB7cfLrX.js → runtime-tools-settings-panel-CdvQRxCR.js} +1 -1
- package/dist/gateway/static/root/assets/scan-search-CSIGkseh.js +1 -0
- package/dist/gateway/static/root/assets/{service-recommendation-list-_rFmwIwY.js → service-recommendation-list-2UOjV0Mx.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-a6wb0_Gf.js → session-api-CkOliupg.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-BVS3zxRZ.js +22 -0
- package/dist/gateway/static/root/assets/{sessions-page-dEupc-3A.js → sessions-page-CN9ESZdY.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BYrXsPjK.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CnGJr2xp.js → settings-advanced-section-Zex2dJo7.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-DWRhupcY.js → settings-mode-store-Dk0bZQgo.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-D9A2DdJ_.js → settings-page-bCW4rave.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-wL2jvs-y.js → settings-page-header-B9Y_eGcH.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-BkUQVmyY.js → settings-page-layout-D1MgJ5zP.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-D238tuw-.js → setup-interaction-page-BYXDX0F2.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DXvYjIu3.js → setup-status-panel-Bhda3jS2.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-DFDJyl3N.js → share-link-dialog-BxFk4-4u.js} +1 -1
- package/dist/gateway/static/root/assets/share-preview-page-nzWjWhqF.js +2 -0
- package/dist/gateway/static/root/assets/{shares-api-CfFiW03g.js → shares-api-ChBHTPKN.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-LB3SYKFS.js +1 -0
- package/dist/gateway/static/root/assets/sheet-C2H8iR8Y.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CWRhFSkA.js → skill-api-TQAyWHGS.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-CmPp2czp.js → skill-list-api-D4eokPXx.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-BGsSq3dj.js → skill-reload-api-Bm-8vhsQ.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DqD0FPeH.js → skills-page-CfhEcU8L.js} +1 -1
- package/dist/gateway/static/root/assets/space-api-DaKpHc_7.js +1 -0
- package/dist/gateway/static/root/assets/space-page-BXyQdUvp.js +2 -0
- package/dist/gateway/static/root/assets/star-BuMAkjC9.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-aw9C86I8.js → system-settings-panel-CvL5G2w1.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-gffrDRvW.js +3 -0
- package/dist/gateway/static/root/assets/task-header-title-DwtjUOBg.js +1 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-C-zIBpzi.js → task-result-evidence-Bmgta9z9.js} +1 -1
- package/dist/gateway/static/root/assets/tasks-BIehlq7k.js +1 -0
- package/dist/gateway/static/root/assets/{terminal-panel-store-CgPqgrm7.js → terminal-panel-store-B1bAD5Xf.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DxF7S6I2.js → theme-store-C1MxmBg7.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-Dvlunx28.js → tracing-settings-page-CvXDgIJQ.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CIte6n0U.js → tunnel-api-BkhCBt38.js} +1 -1
- package/dist/gateway/static/root/assets/turn-outcome-BSbEJx8h.js +1 -0
- package/dist/gateway/static/root/assets/{understanding-activity-store-C2RHmRo8.js → understanding-activity-store-BYGCmCVb.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-CPeQIXS_.js → understanding-refresh-store-DaLVsdYS.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DPUjEj39.js → usage-page-C-NM6vtY.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-xX2KrbXw.js → use-autosave-CvjQMyY8.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-sszsCdh5.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-D4b4fDeu.js +1 -0
- package/dist/gateway/static/root/assets/use-personal-profile-CNPszzzT.js +1 -0
- package/dist/gateway/static/root/assets/use-personal-work-C-rw8XVO.js +1 -0
- package/dist/gateway/static/root/assets/{use-realtime-voice-RQW5KnIN.js → use-realtime-voice-cugjs8cK.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-B6QFV5gR.js → use-workspace-tree-Crfx5ctU.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-hKnsTcMk.js → user-model-page-BvnLbTYx.js} +1 -1
- package/dist/gateway/static/root/assets/video-generation-Cec49Jwg.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BeEF7Thh.js → voice-api-key-field-M7KB_Gl1.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-vbBoKnqd.js → voice-config-api-BLGbUq3v.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-CKn6X3qL.js → voice-input-shortcut-events-CxH3RDXi.js} +1 -1
- package/dist/gateway/static/root/assets/voice-player-store-DZGlzjva.js +1 -0
- package/dist/gateway/static/root/assets/voice-settings-BzfNK5Jm.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Ddvqu02U.js → work-discovery-overlay-DpEYgcG2.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BdBpri6P.js → work-discovery-page-DappIHQq.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-DStgfCzQ.js → working-directory-picker-modal-W2QiUVjN.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-g-wCKoQU.js +2 -0
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-DwpWKogz.js +1 -0
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DxaxVC3q.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-CBHFZ2iQ.js → workspace-open-location-menu-Dh0TvTkH.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-preview-store-DoIjn_2j.js +1 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Cm0Saa8B.js → xopc-cloud-account-card-DGAGXbGI.js} +1 -1
- package/dist/gateway/static/root/index.html +136 -123
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +7 -0
- package/dist/packages/gateway-contract/src/capabilities.js +1 -1
- package/dist/packages/gateway-contract/src/clarifications.js +20 -2
- package/dist/packages/gateway-contract/src/index.js +6 -4
- package/dist/packages/gateway-contract/src/music-generation.js +5 -2
- package/dist/packages/gateway-contract/src/space.js +23 -0
- package/dist/packages/gateway-contract/src/task-lifecycle.js +1 -0
- package/dist/packages/gateway-contract/src/task-result-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/task-runs.js +1 -0
- package/dist/packages/gateway-contract/src/tasks.js +118 -6
- package/dist/packages/gateway-contract/src/turn-outcome.js +16 -2
- package/dist/packages/gateway-contract/src/video-generation.js +29 -4
- package/dist/src/agent/agent-manager.js +2 -2
- package/dist/src/agent/background-review/prompts.js +5 -1
- package/dist/src/agent/embedded/agent-profile-context.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/orchestration/delegation-budget.d.ts +2 -2
- package/dist/src/agent/orchestration/turn-recovery.d.ts +12 -3
- package/dist/src/agent/orchestration/turn-recovery.js +25 -6
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service/webchat-tts.js +1 -1
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/apply-patch.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +1 -0
- package/dist/src/agent/tools/language-diagnostics.js +1 -1
- package/dist/src/agent/tools/personal-memory-tool.js +12 -10
- package/dist/src/agent/tools/personal-task-tool.d.ts +1 -0
- package/dist/src/agent/tools/personal-task-tool.js +12 -7
- package/dist/src/agent/tools/publish-artifacts.js +2 -1
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -0
- package/dist/src/agent/tools/tool-media.d.ts +3 -1
- package/dist/src/agent/tools/tool-media.js +2 -0
- package/dist/src/agent/tools/video-draft-tool.d.ts +1 -0
- package/dist/src/agent/tools/video-draft-tool.js +5 -1
- package/dist/src/agent/tools/xopc-use-tool.js +21 -4
- package/dist/src/agent-catalog/test-support.js +1 -1
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +30 -6
- package/dist/src/automations/capabilities/write.js +2 -2
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/domain/types.d.ts +6 -0
- package/dist/src/automations/domain/validation.d.ts +60 -12
- package/dist/src/automations/domain/validation.js +7 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +12 -3
- package/dist/src/automations/draft/automation-draft-validator.js +1 -0
- package/dist/src/automations/service/action-executor.js +14 -2
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +9 -9
- package/dist/src/computer/errors.d.ts +2 -2
- package/dist/src/computer/evaluation.d.ts +7 -7
- package/dist/src/computer/runtime.d.ts +4 -4
- package/dist/src/config/schema.d.ts +2 -2
- package/dist/src/discussions/action-tasks.d.ts +2 -2
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/inventory.d.ts +2 -2
- package/dist/src/extensions/agent-plugins/setup.d.ts +3 -3
- package/dist/src/gateway/hono/routes/commands-skills.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +2 -2
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/memory-learning.js +19 -3
- package/dist/src/gateway/hono/routes/models.js +7 -0
- package/dist/src/gateway/hono/routes/music-generation.js +26 -3
- package/dist/src/gateway/hono/routes/personal-agent.js +214 -5
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/space.d.ts +3 -0
- package/dist/src/gateway/hono/routes/space.js +105 -0
- package/dist/src/gateway/hono/routes/tasks.js +27 -28
- package/dist/src/gateway/hono/routes/video-generation.js +9 -6
- package/dist/src/gateway/html-preview-shell.d.ts +1 -1
- package/dist/src/gateway/html-preview-shell.js +3 -0
- package/dist/src/gateway/media-access.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +2 -0
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +10 -3
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +18 -1
- package/dist/src/home-intelligence/follow-ups.js +2 -1
- package/dist/src/home-intelligence/routines.js +1 -1
- package/dist/src/local-apps/automation-proposals.d.ts +54 -12
- package/dist/src/local-apps/capabilities/projections.d.ts +7 -7
- package/dist/src/local-apps/preview-fixtures.d.ts +1 -1
- package/dist/src/media/session-references.d.ts +4 -1
- package/dist/src/media/session-references.js +40 -8
- package/dist/src/memory-learning/work-capture.js +2 -1
- package/dist/src/memory-learning/work-review.d.ts +2 -0
- package/dist/src/memory-learning/work-review.js +25 -2
- package/dist/src/music-generation/artifact.js +3 -1
- package/dist/src/music-generation/mureka.js +1 -1
- package/dist/src/music-generation/provider.d.ts +4 -1
- package/dist/src/music-generation/provider.js +6 -1
- package/dist/src/music-generation/providers.d.ts +3 -1
- package/dist/src/music-generation/providers.js +39 -16
- package/dist/src/music-generation/repository.d.ts +3 -1
- package/dist/src/music-generation/repository.js +12 -3
- package/dist/src/music-generation/tencent-mps.d.ts +11 -0
- package/dist/src/music-generation/tencent-mps.js +151 -0
- package/dist/src/music-generation/worker.js +16 -5
- package/dist/src/music-generation/xopc-cloud.d.ts +2 -0
- package/dist/src/music-generation/xopc-cloud.js +38 -0
- package/dist/src/personal-agent/capability-service.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- 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.js +16 -7
- package/dist/src/personal-agent/repository.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +17 -7
- package/dist/src/personal-agent/request-service.js +6 -10
- package/dist/src/personal-agent/result-extraction.js +13 -13
- package/dist/src/personal-agent/schedules.d.ts +9 -0
- package/dist/src/personal-agent/schedules.js +44 -0
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +6 -1
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +2 -0
- package/dist/src/providers/xopc-cloud-media-manifest.d.ts +24 -0
- package/dist/src/providers/xopc-cloud-media-manifest.js +28 -0
- package/dist/src/providers/xopc-cloud-media.d.ts +28 -0
- package/dist/src/providers/xopc-cloud-media.js +67 -0
- package/dist/src/providers/xopc-cloud-model-source.js +4 -0
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/runtime-tools/manager.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.js +1 -1
- package/dist/src/session/client-history.d.ts +4 -1
- package/dist/src/session/client-history.js +18 -0
- package/dist/src/session/compact-history.js +30 -1
- package/dist/src/session/store.js +2 -1
- package/dist/src/session/turn-outcome-projector.js +1 -1
- package/dist/src/space/ingest.d.ts +36 -0
- package/dist/src/space/ingest.js +149 -0
- package/dist/src/space/repository.d.ts +39 -0
- package/dist/src/space/repository.js +325 -0
- package/dist/src/space/worker.d.ts +14 -0
- package/dist/src/space/worker.js +199 -0
- package/dist/src/storage/sqlite/clarification-wait-repository.js +7 -4
- package/dist/src/storage/sqlite/row-mappers.d.ts +1 -0
- package/dist/src/storage/sqlite/row-mappers.js +9 -2
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +8 -7
- package/dist/src/storage/sqlite/schema.sql +104 -0
- package/dist/src/storage/sqlite/transcript-repository.js +8 -0
- package/dist/src/storage/sqlite/upgrades/278_music_job_error_code.sql +6 -0
- package/dist/src/storage/sqlite/upgrades/279_task_model_cutover.sql +288 -0
- package/dist/src/storage/sqlite/upgrades/280_space.sql +61 -0
- package/dist/src/tasks/capabilities/management.d.ts +15 -2
- package/dist/src/tasks/capabilities/management.js +8 -2
- package/dist/src/tasks/capabilities/read.js +14 -2
- package/dist/src/tasks/capabilities/relations.d.ts +13 -7
- package/dist/src/tasks/capabilities/write.d.ts +118 -2
- package/dist/src/tasks/capabilities/write.js +2 -0
- package/dist/src/tasks/home-query-service.js +7 -9
- package/dist/src/tasks/task-allocation-service.js +2 -2
- package/dist/src/tasks/task-application-service.d.ts +8 -2
- package/dist/src/tasks/task-application-service.js +94 -27
- package/dist/src/tasks/task-collaboration-repository.js +12 -1
- package/dist/src/tasks/task-context-assembler.js +9 -3
- package/dist/src/tasks/task-contract-planner.js +1 -3
- package/dist/src/tasks/task-conversation-summary.d.ts +33 -2
- package/dist/src/tasks/task-conversation-summary.js +3 -1
- package/dist/src/tasks/task-criterion-review-repository.d.ts +31 -2
- package/dist/src/tasks/task-criterion-review-repository.js +70 -23
- package/dist/src/tasks/task-deliverables.d.ts +7 -0
- package/dist/src/tasks/task-deliverables.js +112 -0
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-instruction-sequence.js +10 -3
- package/dist/src/tasks/task-json-acceptance.js +3 -5
- package/dist/src/tasks/task-origin-repository.d.ts +99 -1
- package/dist/src/tasks/task-origin-repository.js +67 -5
- package/dist/src/tasks/task-read-model-projector.d.ts +4 -1
- package/dist/src/tasks/task-read-model-projector.js +123 -9
- package/dist/src/tasks/task-repository.d.ts +4 -1
- package/dist/src/tasks/task-repository.js +34 -11
- package/dist/src/tasks/task-research-repair.d.ts +2 -2
- package/dist/src/tasks/task-research-result.d.ts +1 -0
- package/dist/src/tasks/task-research-result.js +13 -3
- package/dist/src/tasks/task-result-delivery-repository.d.ts +4 -3
- package/dist/src/tasks/task-result-delivery-repository.js +35 -17
- package/dist/src/tasks/task-result-delivery-service.js +22 -7
- package/dist/src/tasks/task-result-versions.d.ts +11 -0
- package/dist/src/tasks/task-result-versions.js +34 -0
- package/dist/src/tasks/task-run-coordinator.js +28 -15
- package/dist/src/tasks/task-run-dispatcher.js +29 -4
- package/dist/src/tasks/task-run-repository.d.ts +2 -0
- package/dist/src/tasks/task-run-repository.js +62 -19
- package/dist/src/tasks/task-workspace-verification.d.ts +16 -0
- package/dist/src/tasks/task-workspace-verification.js +95 -0
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/user-model/action-rule-suggestions.js +4 -3
- package/dist/src/user-model/capture/evidence-policy.d.ts +7 -1
- package/dist/src/user-model/capture/evidence-policy.js +68 -2
- package/dist/src/user-model/capture/executor.js +62 -14
- package/dist/src/video-generation/artifact.js +3 -1
- package/dist/src/video-generation/drafts.d.ts +1 -0
- package/dist/src/video-generation/drafts.js +6 -0
- package/dist/src/video-generation/providers.d.ts +1 -0
- package/dist/src/video-generation/providers.js +37 -5
- package/dist/src/video-generation/repository.d.ts +5 -3
- package/dist/src/video-generation/repository.js +30 -8
- package/dist/src/video-generation/settings.d.ts +1 -0
- package/dist/src/video-generation/settings.js +10 -4
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-DdOEgexg.js +0 -12
- package/dist/gateway/static/root/assets/attachment-utils-core-BIOUBrpT.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CH9gYqIK.js +0 -9
- package/dist/gateway/static/root/assets/binary-plugins-MFVtTdvy.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-CFWTer_v.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-C2RB9fzC.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BjaLTd6i.js +0 -8
- package/dist/gateway/static/root/assets/channels-DiDfjON8.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-BtMkdtxJ.js +0 -71
- package/dist/gateway/static/root/assets/constants-Bg1wM2nv.js +0 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-DIeg1mg8.js +0 -1
- package/dist/gateway/static/root/assets/file-tree-CFlZnV3Y.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CJf-qaHZ.js +0 -1
- package/dist/gateway/static/root/assets/index-BJj-uZNl.js +0 -11
- package/dist/gateway/static/root/assets/index-DiWUK4sJ.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-wekatwet.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-DeqzkJiF.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-CukseY3k.js +0 -2
- package/dist/gateway/static/root/assets/messages-BDBGlBKh.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-aRYHi2dh.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-D5BtgBxy.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-CxXu_Tkh.js +0 -1
- package/dist/gateway/static/root/assets/notes-api-BXevQivV.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-DyM-3O_9.js +0 -8
- package/dist/gateway/static/root/assets/page-header-store-C2ydtnXa.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-BPQpvC34.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-BUCb7OiW.css +0 -1
- package/dist/gateway/static/root/assets/personal-page-BB4Sv68K.js +0 -1
- package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-BlwtlUY7.js +0 -7
- package/dist/gateway/static/root/assets/product-delivery-CnvCn9L-.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BG2nDt98.js +0 -7
- package/dist/gateway/static/root/assets/recording-upload-BJkXktA-.js +0 -1
- package/dist/gateway/static/root/assets/right-workspace-store-DHHyicqQ.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-BYqg1BYz.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-Coh2B0j7.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-D5g6LOU-.js +0 -25
- package/dist/gateway/static/root/assets/settings-advanced-gate-DjyibJZ1.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-CyCv69rh.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-B85XIDFv.js +0 -1
- package/dist/gateway/static/root/assets/star-CnYNmpLd.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DgsLOz6h.js +0 -3
- package/dist/gateway/static/root/assets/tasks-BTLabOMp.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-C9GpCJQR.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-Daf-LmiF.js +0 -15
- package/dist/gateway/static/root/assets/use-personal-profile-BJgaheR4.js +0 -1
- package/dist/gateway/static/root/assets/video-generation-D08uZbsu.js +0 -1
- package/dist/gateway/static/root/assets/voice-settings-BUrk4mwV.js +0 -1
- package/dist/gateway/static/root/assets/with-selector-xonYxPoM.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-CscTRODe.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CyPjTDSx.js +0 -1
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-JSGIA79T.js +0 -1
- package/dist/gateway/static/root/assets/workspace-preview-store-DNLnuHlf.js +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
3
|
+
import { TaskWorkspaceDestinationSchema } from "../../packages/gateway-contract/src/tasks.js";
|
|
4
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
|
+
import { isAbsolute, resolve } from "node:path";
|
|
7
|
+
import { lstatSync, realpathSync } from "node:fs";
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
//#region src/tasks/task-workspace-verification.ts
|
|
10
|
+
function workspaceRoot(task, destination) {
|
|
11
|
+
const db = getSqliteDatabase();
|
|
12
|
+
if (task.projectId && destination.workspaceId === `project:${task.projectId}`) return db.prepare("SELECT workspace_root FROM projects WHERE project_id = ?").get(task.projectId)?.workspace_root ?? void 0;
|
|
13
|
+
const origin = db.prepare("SELECT session.agent_id FROM task_origin_links origin JOIN sessions session USING (conversation_id) WHERE origin.task_id = ?").get(task.id)?.agent_id;
|
|
14
|
+
const agent = typeof origin === "string" ? origin : task.delegateAgentId;
|
|
15
|
+
if (agent && destination.workspaceId === `agent:${agent}` && db.prepare("SELECT 1 FROM agents WHERE id = ? AND deleted_at IS NULL").get(agent)) return resolveAgentWorkspaceDir(agent);
|
|
16
|
+
}
|
|
17
|
+
function inspectTaskWorkspace(task) {
|
|
18
|
+
return (task.contract?.outputDestinations ?? []).filter((destination) => destination.kind === "workspace_file" || destination.kind === "unresolved_workspace_file").map((destination) => {
|
|
19
|
+
const target = TaskWorkspaceDestinationSchema.safeParse(destination);
|
|
20
|
+
const key = {
|
|
21
|
+
workspaceId: String(destination.workspaceId ?? ""),
|
|
22
|
+
relativePath: String(destination.relativePath ?? "")
|
|
23
|
+
};
|
|
24
|
+
if (!target.success) return {
|
|
25
|
+
...key,
|
|
26
|
+
status: "unavailable"
|
|
27
|
+
};
|
|
28
|
+
const rootPath = workspaceRoot(task, target.data);
|
|
29
|
+
if (!rootPath || !isAbsolute(rootPath) || target.data.expectedRoot && resolve(rootPath) !== target.data.expectedRoot) return {
|
|
30
|
+
...key,
|
|
31
|
+
status: "unavailable"
|
|
32
|
+
};
|
|
33
|
+
let root;
|
|
34
|
+
try {
|
|
35
|
+
const canonical = realpathSync(rootPath);
|
|
36
|
+
if (!lstatSync(canonical).isDirectory()) return {
|
|
37
|
+
...key,
|
|
38
|
+
status: "unavailable"
|
|
39
|
+
};
|
|
40
|
+
root = createHash("sha256").update(canonical).digest("hex");
|
|
41
|
+
const candidate = resolve(canonical, target.data.relativePath);
|
|
42
|
+
if (realpathSync(candidate) !== candidate) return {
|
|
43
|
+
...key,
|
|
44
|
+
root,
|
|
45
|
+
status: "unavailable"
|
|
46
|
+
};
|
|
47
|
+
const info = lstatSync(candidate, { bigint: true });
|
|
48
|
+
if (!info.isFile()) return {
|
|
49
|
+
...key,
|
|
50
|
+
root,
|
|
51
|
+
status: "unavailable"
|
|
52
|
+
};
|
|
53
|
+
const fingerprint = [
|
|
54
|
+
info.dev,
|
|
55
|
+
info.ino,
|
|
56
|
+
info.size,
|
|
57
|
+
info.mtimeNs,
|
|
58
|
+
info.ctimeNs
|
|
59
|
+
].join(":");
|
|
60
|
+
return {
|
|
61
|
+
...key,
|
|
62
|
+
root,
|
|
63
|
+
fingerprint,
|
|
64
|
+
status: "present"
|
|
65
|
+
};
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
...key,
|
|
69
|
+
root,
|
|
70
|
+
status: root && error.code === "ENOENT" ? "missing" : "unavailable"
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function verifyTaskWorkspace(task, baseline) {
|
|
76
|
+
const previous = Array.isArray(baseline) ? baseline : [];
|
|
77
|
+
return inspectTaskWorkspace(task).map((current) => {
|
|
78
|
+
const before = previous.find((item) => item.workspaceId === current.workspaceId && item.relativePath === current.relativePath);
|
|
79
|
+
return {
|
|
80
|
+
...current,
|
|
81
|
+
verified: current.status === "present" && before !== void 0 && before.root === current.root && (before.status === "missing" || before.status === "present" && before.fingerprint !== current.fingerprint)
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function taskWorkspaceStillVerified(task, observed) {
|
|
86
|
+
return inspectTaskWorkspace(task).every((current) => current.status === "present" && observed.some((result) => result.verified && result.workspaceId === current.workspaceId && result.relativePath === current.relativePath && result.root === current.root && result.fingerprint === current.fingerprint));
|
|
87
|
+
}
|
|
88
|
+
var init_task_workspace_verification = __esmMin((() => {
|
|
89
|
+
init_src();
|
|
90
|
+
init_agent_scope();
|
|
91
|
+
init_transaction();
|
|
92
|
+
}));
|
|
93
|
+
//#endregion
|
|
94
|
+
init_task_workspace_verification();
|
|
95
|
+
export { init_task_workspace_verification, inspectTaskWorkspace, taskWorkspaceStillVerified, verifyTaskWorkspace };
|
|
@@ -7,12 +7,12 @@ import { normalizeClarificationSubmission } from "../../../packages/gateway-cont
|
|
|
7
7
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
8
8
|
import { cancelQueuedSessionInput, claimNextSessionInput, finishSessionInputRun, getSessionInputById, getSessionInputState, init_session_input_repository, setSessionInputStatus } from "../../storage/sqlite/session-input-repository.js";
|
|
9
9
|
import "../../session/types.js";
|
|
10
|
+
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
11
|
+
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
10
12
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
11
13
|
import { appendComposerInputHistory, listComposerInputHistory } from "../../storage/sqlite/composer-input-history-repository.js";
|
|
12
14
|
import { getSessionConfig } from "../../storage/sqlite/config-repository.js";
|
|
13
15
|
import "../../storage/sqlite/index.js";
|
|
14
|
-
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
15
|
-
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
16
16
|
import { init_paths } from "../../config/paths.js";
|
|
17
17
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
18
18
|
import { resolveEffectiveAgentProfile } from "../../config/agent-profile.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { listCollaborationRules } from "../storage/sqlite/collaboration-rule-repository.js";
|
|
2
|
-
import { listUserAssertions } from "./repository.js";
|
|
2
|
+
import { getAssertionSlot, listUserAssertions } from "./repository.js";
|
|
3
3
|
//#region src/user-model/action-rule-suggestions.ts
|
|
4
4
|
/** Suggestions are inert until the user explicitly creates a collaboration rule. */
|
|
5
5
|
function listActionRuleSuggestions() {
|
|
@@ -9,13 +9,14 @@ function listActionRuleSuggestions() {
|
|
|
9
9
|
limit: 1e3
|
|
10
10
|
}).filter((assertion) => assertion.authority === "user_explicit" && assertion.layer === "pattern" && assertion.sensitivity === "normal" && assertion.actionability >= .6 && assertion.allowedUses.includes("recommend") && !existingSources.has(assertion.id)).flatMap((assertion) => {
|
|
11
11
|
const category = assertion.kind === "preference" ? "communication" : assertion.kind === "routine" ? "routine" : void 0;
|
|
12
|
-
|
|
12
|
+
const scope = getAssertionSlot(assertion.slotId)?.scope;
|
|
13
|
+
if (!category || !scope || scope.type === "agent") return [];
|
|
13
14
|
return [{
|
|
14
15
|
id: `assertion:${assertion.id}`,
|
|
15
16
|
sourceAssertionId: assertion.id,
|
|
16
17
|
category,
|
|
17
18
|
statement: assertion.statement,
|
|
18
|
-
scope
|
|
19
|
+
scope,
|
|
19
20
|
conditions: {
|
|
20
21
|
sourceAssertionId: assertion.id,
|
|
21
22
|
enforcementLevel: "prompt",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssertionAuthority, AssertionKind, AssertionVolatility } from '../domain.js';
|
|
1
|
+
import type { AssertionAuthority, AssertionKind, AssertionVolatility, UserModelScopeType } from '../domain.js';
|
|
2
2
|
export interface OwnerSupport {
|
|
3
3
|
allowed: boolean;
|
|
4
4
|
direct: boolean;
|
|
@@ -7,6 +7,12 @@ export interface OwnerSupport {
|
|
|
7
7
|
}
|
|
8
8
|
/** Extraction can only name operations supported by the execution-context consumer. */
|
|
9
9
|
export declare function supportsResponseApplicability(applicability?: Record<string, unknown>): boolean;
|
|
10
|
+
/** Read scope qualifiers in the containing owner clause, including words outside the selected quote. */
|
|
11
|
+
export declare function ownerMemoryScope(text: string, quote: string): UserModelScopeType | undefined;
|
|
12
|
+
export declare function ownerExcludesGlobalScope(text: string, quote: string): boolean;
|
|
13
|
+
export declare function isStandingToolInstruction(text: string, quote: string): boolean;
|
|
14
|
+
/** A durable tool instruction can cover every matching operation in just one project. */
|
|
15
|
+
export declare function standingToolScope(text: string, quote: string, hasProject: boolean): UserModelScopeType | undefined;
|
|
10
16
|
/** Inspect the source clause, not merely the extractor's chosen substring or authority label. */
|
|
11
17
|
export declare function assessOwnerSupport(input: {
|
|
12
18
|
text: string;
|
|
@@ -5,7 +5,7 @@ function supportsResponseApplicability(applicability = {}) {
|
|
|
5
5
|
return operation === void 0 || operation === "response" || Array.isArray(operation) && operation.length > 0 && operation.every((value) => value === "response");
|
|
6
6
|
}
|
|
7
7
|
const SELF = /(?:我(?:自己|本人|平时|一般|通常|长期|一直|一贯|更|比较|还是|现在|最|特别|主要|也|其实|的|经常|习惯|倾向|偏好|喜欢|希望|需要|是|叫|住|会|用|选)|对我来说)|\b(?:i|my|me|mine)\b/iu;
|
|
8
|
-
const DIRECT_PREFERENCE = /我(?:自己|本人)?(?:一直|长期|一贯|平时|通常|一般|也|更|比较|最|特别)?(?:不|不太|并不|不再)?(?:喜欢|偏好|习惯|倾向|希望)|(?:我|我的).{0,12}(?:长期习惯|阅读习惯|沟通习惯|固定偏好)|以后|今后|从现在起|from now on|\bi (?:prefer|like|always|usually)\b|\b(?:works? (?:best|better) for me|my preference|keep (?:answers|responses) concise)\b/iu;
|
|
8
|
+
const DIRECT_PREFERENCE = /我(?:自己|本人)?(?:一直|长期|一贯|平时|通常|一般|也|更|比较|最|特别)?(?:不|不太|并不|不再)?(?:喜欢|偏好|习惯|倾向|希望)|(?:我|我的).{0,12}(?:长期习惯|阅读习惯|沟通习惯|固定偏好)|以后|今后|从现在起|from now on|\bi (?:prefer|like|always|usually)\b|\b(?:whenever you|always (?:use|start|lead|reply|answer)|works? (?:best|better) for me|my preference|keep (?:answers|responses) concise)\b/iu;
|
|
9
9
|
const FOREIGN = /客户|同事|别人|他人|朋友说|原话|原文|引用|引文|翻译|润色|改写|示例|台词|角色|假设|假如|虚构|不是我的|并非我的|\b(?:quote|quoted|translate|rewrite|example|fiction|hypothetical|suppose|customer|colleague)\b/iu;
|
|
10
10
|
const HYPOTHETICAL = /假设|假如|如果我|要是我|倘若|虚构|角色设定|(?:不是|并非).{0,8}(?:我|自述|事实)|\b(?:hypothetical|suppose|if i|fictional|role.?play)\b/iu;
|
|
11
11
|
const TEMPORARY = /这次|本次|今天|今晚|暂时|临时|现在先|目前先|这一轮|这周|本周|\b(?:this time|today|tonight|for now|just for|this week|this turn)\b/iu;
|
|
@@ -22,6 +22,72 @@ function maskNonOwnerSpans(raw) {
|
|
|
22
22
|
});
|
|
23
23
|
return result;
|
|
24
24
|
}
|
|
25
|
+
const SCOPE_CLAUSE = /[^。.;;!?!?\n]+/gu;
|
|
26
|
+
const LOCAL_SCOPE_PREFIX = "(?:在|只|仅|限于|用于|(?:只|仅)(?:限于?|在|用于|对)?)";
|
|
27
|
+
const LOCAL_SCOPE_CONTEXT = "(?:本|该|这个|当前)";
|
|
28
|
+
const LOCAL_SCOPE_PATTERNS = [
|
|
29
|
+
[
|
|
30
|
+
"session",
|
|
31
|
+
"(?:会话|对话)",
|
|
32
|
+
"(?:仅|只)在?这次对话",
|
|
33
|
+
"(?:conversation|session|chat)"
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"agent",
|
|
37
|
+
"(?:助手|智能体)",
|
|
38
|
+
"",
|
|
39
|
+
"(?:agent|assistant)"
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"project",
|
|
43
|
+
"项目",
|
|
44
|
+
`${LOCAL_SCOPE_CONTEXT}项目(?:里|中|内|的|以后|今后|统一|都)`,
|
|
45
|
+
"project"
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"workspace",
|
|
49
|
+
"工作区",
|
|
50
|
+
`${LOCAL_SCOPE_CONTEXT}工作区(?:里|中|内|的|以后|今后|统一|都)`,
|
|
51
|
+
"workspace"
|
|
52
|
+
]
|
|
53
|
+
].map(([type, noun, additional, english]) => ({
|
|
54
|
+
type,
|
|
55
|
+
pattern: new RegExp([
|
|
56
|
+
`${LOCAL_SCOPE_PREFIX}${LOCAL_SCOPE_CONTEXT}${noun}`,
|
|
57
|
+
`\\b(?:in|for|with) (?:this|(?:the |my )?current) ${english}\\b`,
|
|
58
|
+
`\\bonly.{0,20}(?:this|current) ${english}\\b`,
|
|
59
|
+
additional
|
|
60
|
+
].filter(Boolean).join("|"), "iu")
|
|
61
|
+
}));
|
|
62
|
+
const GLOBAL_SCOPE = /全局(?:范围|生效|适用|默认|记忆|偏好|协作规则)|(?:改成|改为|设为)全局|跨项目(?:使用|适用|生效|通用)|(?:所有|每个|任何)\s*(?:项目|工作区|助手|会话|协作)|\b(?:globally|global (?:scope|memory|preference|rule)|(?:make|set|change) .{1,30} global|across (?:all )?(?:projects|workspaces|assistants|conversations)|(?:in|for) (?:all|every|any) (?:projects?|workspaces?|assistants?|conversations?))\b/iu;
|
|
63
|
+
const NOT_GLOBAL = /(?:不要|禁止|不能|不必|不应|不)(?:再|要|得)?(?:设为|用于|适用于|在|跨)?\s*(?:全局|所有项目|跨项目)|\b(?:not|never|don't|do not)\s+(?:apply |use |share |save )?(?:it )?(?:globally|across (?:all )?projects|in (?:all|other) projects)\b/iu;
|
|
64
|
+
function ownerClauses(text, quote) {
|
|
65
|
+
const normalized = quote.normalize("NFKC").trim();
|
|
66
|
+
if (!normalized) return [];
|
|
67
|
+
const source = text.normalize("NFKC");
|
|
68
|
+
const at = source.indexOf(normalized);
|
|
69
|
+
if (at < 0) return [];
|
|
70
|
+
const end = at + normalized.length;
|
|
71
|
+
return [...maskNonOwnerSpans(source).matchAll(SCOPE_CLAUSE)].filter((match) => match.index < end && match.index + match[0].length > at).map((match) => match[0]);
|
|
72
|
+
}
|
|
73
|
+
/** Read scope qualifiers in the containing owner clause, including words outside the selected quote. */
|
|
74
|
+
function ownerMemoryScope(text, quote) {
|
|
75
|
+
const clauses = ownerClauses(text, quote);
|
|
76
|
+
const local = LOCAL_SCOPE_PATTERNS.find(({ pattern }) => clauses.some((clause) => pattern.test(clause)));
|
|
77
|
+
if (local) return local.type;
|
|
78
|
+
return !clauses.some((clause) => NOT_GLOBAL.test(clause)) && clauses.some((clause) => GLOBAL_SCOPE.test(clause)) ? "global" : void 0;
|
|
79
|
+
}
|
|
80
|
+
function ownerExcludesGlobalScope(text, quote) {
|
|
81
|
+
return ownerClauses(text, quote).some((clause) => NOT_GLOBAL.test(clause));
|
|
82
|
+
}
|
|
83
|
+
function isStandingToolInstruction(text, quote) {
|
|
84
|
+
return ownerClauses(text, quote).some((clause) => /记住|以后|今后|统一|一律|始终|\b(?:remember|whenever|always|from now on)\b/iu.test(clause) && /(?:查询|搜索|读取|检索|\b(?:search|query|read|look up|fetch)\b)/iu.test(clause) && /(?:统一走|用.{0,35}(?:工具|命令|浏览器|连接器|CLI|API)|\b(?:use|run)\b.{0,55}\b(?:tool|command|browser|connector|CLI|API)\b)/iu.test(clause));
|
|
85
|
+
}
|
|
86
|
+
/** A durable tool instruction can cover every matching operation in just one project. */
|
|
87
|
+
function standingToolScope(text, quote, hasProject) {
|
|
88
|
+
if (!isStandingToolInstruction(text, quote)) return void 0;
|
|
89
|
+
return ownerMemoryScope(text, quote) ?? (hasProject ? "project" : "workspace");
|
|
90
|
+
}
|
|
25
91
|
/** Inspect the source clause, not merely the extractor's chosen substring or authority label. */
|
|
26
92
|
function assessOwnerSupport(input) {
|
|
27
93
|
const source = input.text.normalize("NFKC");
|
|
@@ -147,4 +213,4 @@ function observedChoiceClauses(text) {
|
|
|
147
213
|
return result;
|
|
148
214
|
}
|
|
149
215
|
//#endregion
|
|
150
|
-
export { assessAssertionSupport, assessOwnerSupport, directPreferenceClauses, hasOwnerMemoryDirective, isFullyOwnerAuthoredSpan, isOwnerAuthoredSpan, observedChoiceClauses, supportsResponseApplicability };
|
|
216
|
+
export { assessAssertionSupport, assessOwnerSupport, directPreferenceClauses, hasOwnerMemoryDirective, isFullyOwnerAuthoredSpan, isOwnerAuthoredSpan, isStandingToolInstruction, observedChoiceClauses, ownerExcludesGlobalScope, ownerMemoryScope, standingToolScope, supportsResponseApplicability };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCollaborationRule, listCollaborationRules } from "../../storage/sqlite/collaboration-rule-repository.js";
|
|
2
2
|
import { createContextEvidence } from "../../storage/sqlite/context-evidence-repository.js";
|
|
3
3
|
import { observationCandidateIssue } from "../../memory-learning/evidence-repair.js";
|
|
4
|
-
import { assessAssertionSupport, assessOwnerSupport, hasOwnerMemoryDirective, supportsResponseApplicability } from "./evidence-policy.js";
|
|
4
|
+
import { assessAssertionSupport, assessOwnerSupport, hasOwnerMemoryDirective, ownerExcludesGlobalScope, ownerMemoryScope, standingToolScope, supportsResponseApplicability } from "./evidence-policy.js";
|
|
5
5
|
import { createUserGoal, listUserGoals } from "../goals.js";
|
|
6
6
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, linkAssertionEvidence, mergeAssertionObservation, reconcileAssertion, setAssertionStatus } from "../repository.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -18,15 +18,35 @@ function emptyUserModelCaptureResult() {
|
|
|
18
18
|
outputs: []
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
if (type === "global") return
|
|
23
|
-
return
|
|
21
|
+
function scopeId(type, context) {
|
|
22
|
+
if (type === "global") return void 0;
|
|
23
|
+
return {
|
|
24
24
|
agent: context.agentId,
|
|
25
25
|
workspace: context.workspaceId,
|
|
26
26
|
project: context.projectId,
|
|
27
27
|
session: context.conversationId
|
|
28
28
|
}[type];
|
|
29
29
|
}
|
|
30
|
+
function scopeAllowed(type, id, context) {
|
|
31
|
+
return (type === "global" || Boolean(id)) && id === scopeId(type, context);
|
|
32
|
+
}
|
|
33
|
+
function resolveToolScope(scope, sources, context) {
|
|
34
|
+
const types = new Set(sources.map((source) => standingToolScope(source.text, source.quote, Boolean(context.projectId))));
|
|
35
|
+
const type = types.size === 1 ? types.values().next().value : void 0;
|
|
36
|
+
if (!type || scope.type === type) return scope;
|
|
37
|
+
const id = scopeId(type, context);
|
|
38
|
+
if (type === "project" && !id && scope.type === "session") return scope;
|
|
39
|
+
return {
|
|
40
|
+
type,
|
|
41
|
+
...id ? { id } : {}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function scopeConflictsWithOwnerEvidence(scope, text, quote, context) {
|
|
45
|
+
const declared = ownerMemoryScope(text, quote);
|
|
46
|
+
if (declared && declared !== "global" && declared !== scope) return scope !== "session" || declared !== "project" || Boolean(context.projectId);
|
|
47
|
+
const toolScope = standingToolScope(text, quote, Boolean(context.projectId));
|
|
48
|
+
return scope === "global" && (toolScope !== void 0 && toolScope !== "global" || ownerExcludesGlobalScope(text, quote));
|
|
49
|
+
}
|
|
30
50
|
function candidateKey(predicate, scopeType, scopeId) {
|
|
31
51
|
return `${scopeType}:${scopeId ?? ""}:${predicate}`;
|
|
32
52
|
}
|
|
@@ -132,16 +152,17 @@ function executeUserModelInterpretation(input) {
|
|
|
132
152
|
});
|
|
133
153
|
continue;
|
|
134
154
|
}
|
|
155
|
+
const sources = original.evidenceRefs.flatMap((ref) => {
|
|
156
|
+
const evidence = evidenceByRef.get(ref);
|
|
157
|
+
if (!evidence) return [];
|
|
158
|
+
return [{
|
|
159
|
+
...evidence,
|
|
160
|
+
quote: original.evidenceQuotes?.find((claim) => claim.ref === ref)?.quote ?? evidence.text
|
|
161
|
+
}];
|
|
162
|
+
});
|
|
135
163
|
const support = assessAssertionSupport({
|
|
136
164
|
...original,
|
|
137
|
-
sources
|
|
138
|
-
const evidence = evidenceByRef.get(ref);
|
|
139
|
-
if (!evidence) return [];
|
|
140
|
-
return [{
|
|
141
|
-
...evidence,
|
|
142
|
-
quote: original.evidenceQuotes?.find((claim) => claim.ref === ref)?.quote ?? evidence.text
|
|
143
|
-
}];
|
|
144
|
-
})
|
|
165
|
+
sources
|
|
145
166
|
});
|
|
146
167
|
if (!support.allowed) {
|
|
147
168
|
result.proposed++;
|
|
@@ -153,13 +174,24 @@ function executeUserModelInterpretation(input) {
|
|
|
153
174
|
});
|
|
154
175
|
continue;
|
|
155
176
|
}
|
|
177
|
+
const scope = original.action === "create" && original.kind === "preference" && support.authority === "user_explicit" ? resolveToolScope(original.scope, sources, input.scopeContext) : original.scope;
|
|
156
178
|
const source = {
|
|
157
179
|
...original,
|
|
180
|
+
scope,
|
|
158
181
|
authority: support.authority,
|
|
159
182
|
confidence: ["user_observed", "system_inferred"].includes(support.authority) ? Math.min(.85, original.confidence) : original.confidence
|
|
160
183
|
};
|
|
161
184
|
result.proposed += 1;
|
|
162
185
|
const key = candidateKey(source.predicate, source.scope.type, source.scope.id);
|
|
186
|
+
if (sources.some((entry) => scopeConflictsWithOwnerEvidence(source.scope.type, entry.text, entry.quote, input.scopeContext)) || source.scope.type === "global" && ["preference", "routine"].includes(source.kind) && source.authority !== "user_explicit") {
|
|
187
|
+
result.rejected += 1;
|
|
188
|
+
result.outputs.push({
|
|
189
|
+
candidateKey: key,
|
|
190
|
+
outcome: "rejected",
|
|
191
|
+
reasonCode: "scope_not_supported"
|
|
192
|
+
});
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
163
195
|
const command = source.intent ?? input.interpretation.intent;
|
|
164
196
|
const sourceExplicitCommand = (command === "remember" || command === "correct") && source.evidenceRefs.some((ref) => hasOwnerMemoryDirective(evidenceByRef.get(ref)?.text ?? "", command));
|
|
165
197
|
const sensitive = source.sensitivity !== "normal";
|
|
@@ -334,10 +366,26 @@ function executeUserModelInterpretation(input) {
|
|
|
334
366
|
outcome: "created"
|
|
335
367
|
});
|
|
336
368
|
}
|
|
337
|
-
for (const
|
|
369
|
+
for (const original of collaborationRules) {
|
|
370
|
+
const sources = original.evidenceRefs.flatMap((ref) => {
|
|
371
|
+
const evidence = evidenceByRef.get(ref);
|
|
372
|
+
return evidence ? [{
|
|
373
|
+
text: evidence.text,
|
|
374
|
+
quote: original.evidenceQuotes?.find((claim) => claim.ref === ref)?.quote ?? evidence.text
|
|
375
|
+
}] : [];
|
|
376
|
+
});
|
|
377
|
+
const source = {
|
|
378
|
+
...original,
|
|
379
|
+
scope: resolveToolScope(original.scope, sources, input.scopeContext)
|
|
380
|
+
};
|
|
338
381
|
result.proposed += 1;
|
|
339
382
|
const key = candidateKey(`rule:${source.category}:${source.statement.toLocaleLowerCase()}`, source.scope.type, source.scope.id);
|
|
340
|
-
|
|
383
|
+
const scopeSupported = sources.every(({ text, quote }) => !scopeConflictsWithOwnerEvidence(source.scope.type, text, quote, input.scopeContext) && (source.scope.type !== "global" || assessOwnerSupport({
|
|
384
|
+
text,
|
|
385
|
+
quote,
|
|
386
|
+
kind: "preference"
|
|
387
|
+
}).direct));
|
|
388
|
+
if (input.policy.write === "deny" || !structuredSupported(source, "preference") || !scopeAllowed(source.scope.type, source.scope.id, input.scopeContext) || source.scope.type === "agent" || !scopeSupported) {
|
|
341
389
|
result.rejected += 1;
|
|
342
390
|
result.outputs.push({
|
|
343
391
|
candidateKey: key,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { buildMediaUri } from "../media/uri.js";
|
|
1
2
|
import { resolveMediaBufferPath } from "../media/store.js";
|
|
3
|
+
import { deleteMediaUris } from "../media/session-references.js";
|
|
2
4
|
import { dirname } from "node:path";
|
|
3
5
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
4
6
|
import { randomUUID } from "node:crypto";
|
|
@@ -11,7 +13,7 @@ function videoArtifactPath(jobId) {
|
|
|
11
13
|
return resolveMediaBufferPath(`wan-${jobId}.mp4`, "outbound");
|
|
12
14
|
}
|
|
13
15
|
async function deleteVideoArtifact(jobId) {
|
|
14
|
-
await
|
|
16
|
+
await deleteMediaUris([buildMediaUri("outbound", `wan-${jobId}.mp4`)], { strict: true });
|
|
15
17
|
}
|
|
16
18
|
async function videoArtifactExists(jobId) {
|
|
17
19
|
const info = await stat(videoArtifactPath(jobId)).catch(() => null);
|
|
@@ -9,6 +9,7 @@ export declare function videoDraftImages(conversationId: string): {
|
|
|
9
9
|
export declare function prepareVideoDraft(conversationId: string, input: {
|
|
10
10
|
action: 'create' | 'update' | 'revise';
|
|
11
11
|
prompt?: string;
|
|
12
|
+
summary?: string;
|
|
12
13
|
duration?: number;
|
|
13
14
|
ratio?: VideoRatio;
|
|
14
15
|
resolution?: VideoResolution;
|
|
@@ -4,6 +4,7 @@ import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
|
4
4
|
import { getCurrentTranscriptId, init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
5
5
|
import { loadRecentUserTranscriptRows } from "../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import { getActiveTranscriptUserMedia } from "../agent/inbound/attachment-pipeline.js";
|
|
7
|
+
import { getCloudMediaModels } from "../providers/xopc-cloud-media.js";
|
|
7
8
|
import { getVideoDefaults, getVideoModel } from "./settings.js";
|
|
8
9
|
import { getVideoJob } from "./repository.js";
|
|
9
10
|
import { randomUUID } from "node:crypto";
|
|
@@ -43,6 +44,7 @@ function prepareVideoDraft(conversationId, input) {
|
|
|
43
44
|
const defaults = getVideoDefaults(modelRef);
|
|
44
45
|
const prompt = (input.prompt ?? base?.prompt ?? "").trim();
|
|
45
46
|
if (!prompt || prompt.length > 1e3) throw new Error("Provide a video description of 1–1000 characters.");
|
|
47
|
+
const summary = input.summary?.trim() || (prompt === base?.prompt ? base.summary : void 0);
|
|
46
48
|
const inherited = base?.modelRef === modelRef ? base : void 0;
|
|
47
49
|
const duration = input.duration ?? inherited?.duration ?? defaults.duration;
|
|
48
50
|
const resolution = input.resolution ?? inherited?.resolution ?? defaults.resolution;
|
|
@@ -64,6 +66,8 @@ function prepareVideoDraft(conversationId, input) {
|
|
|
64
66
|
const inheritedRatio = inherited?.ratio;
|
|
65
67
|
const ratio = input.ratio ?? (imageUri ? inheritedRatio && model.imageRatios.includes(inheritedRatio) ? inheritedRatio : model.imageRatios[0] : inheritedRatio === "9:16" ? "9:16" : "16:9");
|
|
66
68
|
if (imageUri && !model.imageRatios.includes(ratio) || !imageUri && ratio === "adaptive") throw new Error(imageUri ? `${model.name} supports these first-frame ratios: ${model.imageRatios.join(", ")}.` : "Choose 16:9 or 9:16 for a text-only video.");
|
|
69
|
+
const price = getCloudMediaModels("video").find((item) => `xopc-cloud/${item.id}` === modelRef)?.prices[resolution];
|
|
70
|
+
const estimatedCreditMicro = price && price * (duration === -1 ? model.maxDuration : duration);
|
|
67
71
|
const updating = input.action === "update";
|
|
68
72
|
const draft = {
|
|
69
73
|
id: updating ? base.id : randomUUID(),
|
|
@@ -71,12 +75,14 @@ function prepareVideoDraft(conversationId, input) {
|
|
|
71
75
|
transcriptId,
|
|
72
76
|
modelRef,
|
|
73
77
|
prompt,
|
|
78
|
+
summary,
|
|
74
79
|
duration,
|
|
75
80
|
resolution,
|
|
76
81
|
ratio,
|
|
77
82
|
imageUri,
|
|
78
83
|
imageName,
|
|
79
84
|
estimatedCostFen: estimateVideoCostFen(modelRef, duration, resolution),
|
|
85
|
+
...estimatedCreditMicro ? { estimatedCreditMicro } : {},
|
|
80
86
|
createdAt: updating ? base.createdAt : Date.now()
|
|
81
87
|
};
|
|
82
88
|
return {
|
|
@@ -10,6 +10,7 @@ interface VideoProvider {
|
|
|
10
10
|
downloadHost: RegExp;
|
|
11
11
|
}
|
|
12
12
|
export declare function getVideoProvider(ref: VideoModelRef): VideoProvider;
|
|
13
|
+
export declare function getAvailableVideoModelRefs(): VideoModelRef[];
|
|
13
14
|
export declare function getConfiguredVideoProviders(): Promise<Record<ProviderId, boolean>>;
|
|
14
15
|
export declare function fetchProviderVideo(provider: VideoProvider, url: string): Promise<Response>;
|
|
15
16
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { VIDEO_MODELS } from "../../packages/gateway-contract/src/video-generation.js";
|
|
1
|
+
import { LOCAL_VIDEO_MODEL_REFS, VIDEO_MODELS, VIDEO_MODEL_REFS } from "../../packages/gateway-contract/src/video-generation.js";
|
|
2
2
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { assertSafeUrl } from "../media-shared/http/ssrf-guard.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CLOUD_MEDIA_PROVIDER, CloudMediaError, getCloudMediaModels, queryCloudMedia, resolveCloudMediaToken, submitCloudMedia } from "../providers/xopc-cloud-media.js";
|
|
5
|
+
import { VideoProviderError, safeVideoErrorCode } from "./provider-types.js";
|
|
5
6
|
import { querySeedanceVideo, resolveSeedanceKey, submitSeedanceVideo } from "./seedance.js";
|
|
6
7
|
import { queryWanVideo, resolveWanKey, submitWanVideo } from "./wan.js";
|
|
7
8
|
//#region src/video-generation/providers.ts
|
|
@@ -42,16 +43,47 @@ const providers = {
|
|
|
42
43
|
submit: submitSeedanceVideo,
|
|
43
44
|
query: querySeedanceVideo,
|
|
44
45
|
downloadHost: /^[a-z0-9.-]+\.tos-cn-[a-z0-9-]+\.volces\.com$/i
|
|
46
|
+
},
|
|
47
|
+
[CLOUD_MEDIA_PROVIDER]: {
|
|
48
|
+
name: "XOPC Cloud",
|
|
49
|
+
taskTtlMs: 7 * dayMs,
|
|
50
|
+
resolveKey: resolveCloudMediaToken,
|
|
51
|
+
downloadHost: /(?:^|\.)aliyuncs\.com$|^[a-z0-9.-]+\.tos-cn-[a-z0-9-]+\.volces\.com$/i,
|
|
52
|
+
async submit(token, job) {
|
|
53
|
+
try {
|
|
54
|
+
return await submitCloudMedia("videos", token, {
|
|
55
|
+
model: job.model_ref.split("/")[1],
|
|
56
|
+
prompt: job.prompt,
|
|
57
|
+
duration: job.duration,
|
|
58
|
+
ratio: job.ratio,
|
|
59
|
+
resolution: job.resolution,
|
|
60
|
+
...job.image_bytes ? { image: `data:${job.image_mime};base64,${Buffer.from(job.image_bytes).toString("base64")}` } : {}
|
|
61
|
+
});
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (error instanceof CloudMediaError) throw new VideoProviderError("XOPC Cloud", error.status);
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
query: (token, task) => queryCloudMedia("videos", token, task)
|
|
45
68
|
}
|
|
46
69
|
};
|
|
47
70
|
function getVideoProvider(ref) {
|
|
48
71
|
return providers[VIDEO_MODELS[ref].provider];
|
|
49
72
|
}
|
|
73
|
+
function getAvailableVideoModelRefs() {
|
|
74
|
+
const published = getCloudMediaModels("video");
|
|
75
|
+
return [...LOCAL_VIDEO_MODEL_REFS, ...VIDEO_MODEL_REFS.filter((ref) => published.some((model) => `${CLOUD_MEDIA_PROVIDER}/${model.id}` === ref))];
|
|
76
|
+
}
|
|
50
77
|
async function getConfiguredVideoProviders() {
|
|
51
|
-
const [wan, seedance] = await Promise.all([
|
|
78
|
+
const [wan, seedance, cloud] = await Promise.all([
|
|
79
|
+
resolveWanKey(),
|
|
80
|
+
resolveSeedanceKey(),
|
|
81
|
+
resolveCloudMediaToken()
|
|
82
|
+
].map((key) => key.catch(() => void 0)));
|
|
52
83
|
return {
|
|
53
84
|
"dashscope-cn": Boolean(wan),
|
|
54
|
-
"volcengine-ark": Boolean(seedance)
|
|
85
|
+
"volcengine-ark": Boolean(seedance),
|
|
86
|
+
[CLOUD_MEDIA_PROVIDER]: Boolean(cloud)
|
|
55
87
|
};
|
|
56
88
|
}
|
|
57
89
|
async function fetchProviderVideo(provider, url) {
|
|
@@ -69,4 +101,4 @@ async function fetchProviderVideo(provider, url) {
|
|
|
69
101
|
return response;
|
|
70
102
|
}
|
|
71
103
|
//#endregion
|
|
72
|
-
export { fetchProviderVideo, getConfiguredVideoProviders, getVideoProvider };
|
|
104
|
+
export { fetchProviderVideo, getAvailableVideoModelRefs, getConfiguredVideoProviders, getVideoProvider };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type VideoGenerationJob, type VideoGenerationState } from '@xopcai/gateway-contract';
|
|
1
|
+
import { type VideoGenerationDraft, type VideoGenerationJob, type VideoGenerationState } from '@xopcai/gateway-contract';
|
|
2
2
|
type VideoRequest = Pick<VideoGenerationJob, 'id' | 'transcriptId' | 'prompt' | 'duration' | 'ratio' | 'resolution' | 'imageName' | 'modelRef'>;
|
|
3
|
+
type VideoJobPlacement = Pick<VideoGenerationJob, 'draftCreatedAt' | 'summary'>;
|
|
3
4
|
interface JobRow {
|
|
4
5
|
id: string;
|
|
5
6
|
conversation_id: string;
|
|
@@ -18,14 +19,15 @@ interface JobRow {
|
|
|
18
19
|
error: string | null;
|
|
19
20
|
created_at: number;
|
|
20
21
|
}
|
|
21
|
-
export declare function publicVideoJob(row: JobRow): VideoGenerationJob;
|
|
22
|
+
export declare function publicVideoJob(row: JobRow, placement?: VideoJobPlacement): VideoGenerationJob;
|
|
22
23
|
export declare function listVideoJobs(conversationId: string): VideoGenerationJob[];
|
|
24
|
+
export declare function deleteVideoJobPlacements(conversationId: string): void;
|
|
23
25
|
export declare function listVideoJobIds(conversationId: string): string[];
|
|
24
26
|
export declare function getVideoJob(conversationId: string, id: string): JobRow | undefined;
|
|
25
27
|
export declare function enqueueVideoJob(conversationId: string, request: VideoRequest, requestHash: string, image?: {
|
|
26
28
|
bytes: Buffer;
|
|
27
29
|
mime: string;
|
|
28
|
-
}): {
|
|
30
|
+
}, draft?: Pick<VideoGenerationDraft, 'createdAt' | 'summary'>): {
|
|
29
31
|
readonly error: "conversation_changed";
|
|
30
32
|
job?: undefined;
|
|
31
33
|
} | {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { VIDEO_MODELS, estimateVideoCostFen } from "../../packages/gateway-contract/src/video-generation.js";
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
|
+
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
5
|
+
import { archiveSpaceGeneratedMedia } from "../space/ingest.js";
|
|
4
6
|
import { getVideoModel } from "./settings.js";
|
|
5
7
|
import { randomUUID } from "node:crypto";
|
|
6
8
|
//#region src/video-generation/repository.ts
|
|
7
9
|
init_src();
|
|
8
10
|
init_transaction();
|
|
9
|
-
|
|
11
|
+
const jobPlacements = new DurableState("video-generation-job-placement");
|
|
12
|
+
function publicVideoJob(row, placement) {
|
|
10
13
|
return {
|
|
11
14
|
id: row.id,
|
|
12
15
|
transcriptId: row.transcript_id,
|
|
@@ -18,13 +21,18 @@ function publicVideoJob(row) {
|
|
|
18
21
|
imageName: row.image_name,
|
|
19
22
|
state: row.state,
|
|
20
23
|
error: row.error,
|
|
21
|
-
createdAt: row.created_at
|
|
24
|
+
createdAt: row.created_at,
|
|
25
|
+
...placement
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
function listVideoJobs(conversationId) {
|
|
29
|
+
const placements = jobPlacements.get(conversationId);
|
|
25
30
|
return getSqliteDatabase().prepare(`SELECT id, transcript_id, model_ref, prompt, duration, ratio, resolution,
|
|
26
31
|
image_name, state, error, created_at FROM video_generation_jobs WHERE conversation_id = ?
|
|
27
|
-
ORDER BY created_at DESC, rowid DESC`).all(conversationId).map(publicVideoJob);
|
|
32
|
+
ORDER BY created_at DESC, rowid DESC`).all(conversationId).map((row) => publicVideoJob(row, placements?.[row.id]));
|
|
33
|
+
}
|
|
34
|
+
function deleteVideoJobPlacements(conversationId) {
|
|
35
|
+
jobPlacements.delete(conversationId);
|
|
28
36
|
}
|
|
29
37
|
function listVideoJobIds(conversationId) {
|
|
30
38
|
return getSqliteDatabase().prepare("SELECT id FROM video_generation_jobs WHERE conversation_id = ?").all(conversationId).map((row) => String(row.id));
|
|
@@ -32,11 +40,11 @@ function listVideoJobIds(conversationId) {
|
|
|
32
40
|
function getVideoJob(conversationId, id) {
|
|
33
41
|
return getSqliteDatabase().prepare("SELECT * FROM video_generation_jobs WHERE conversation_id = ? AND id = ?").get(conversationId, id);
|
|
34
42
|
}
|
|
35
|
-
function enqueueVideoJob(conversationId, request, requestHash, image) {
|
|
43
|
+
function enqueueVideoJob(conversationId, request, requestHash, image, draft) {
|
|
36
44
|
return runSqliteWriteTransaction((db) => {
|
|
37
45
|
if (db.prepare("SELECT active_transcript_id FROM sessions WHERE conversation_id = ?").get(conversationId)?.active_transcript_id !== request.transcriptId) return { error: "conversation_changed" };
|
|
38
46
|
const existing = db.prepare("SELECT * FROM video_generation_jobs WHERE id = ?").get(request.id);
|
|
39
|
-
if (existing) return existing.conversation_id === conversationId && existing.request_hash === requestHash && existing.model_ref === request.modelRef ? { job: publicVideoJob(existing) } : { error: "idempotency_conflict" };
|
|
47
|
+
if (existing) return existing.conversation_id === conversationId && existing.request_hash === requestHash && existing.model_ref === request.modelRef ? { job: publicVideoJob(existing, jobPlacements.get(conversationId)?.[existing.id]) } : { error: "idempotency_conflict" };
|
|
40
48
|
if (getVideoModel() !== request.modelRef) return { error: "model_changed" };
|
|
41
49
|
const active = db.prepare(`SELECT count(*) AS count FROM video_generation_jobs
|
|
42
50
|
WHERE state IN ('queued','submitting','submitted','running','saving')`).get();
|
|
@@ -54,7 +62,15 @@ function enqueueVideoJob(conversationId, request, requestHash, image) {
|
|
|
54
62
|
db.prepare(`INSERT INTO video_generation_jobs (id, conversation_id, transcript_id, request_hash, model_ref,
|
|
55
63
|
prompt, duration, ratio, resolution, image_name, image_mime, image_bytes, state, next_attempt_at, created_at)
|
|
56
64
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'queued', ?, ?)`).run(request.id, conversationId, request.transcriptId, requestHash, request.modelRef, request.prompt, request.duration, request.ratio, request.resolution, request.imageName, image?.mime ?? null, image?.bytes ?? null, now, now);
|
|
57
|
-
|
|
65
|
+
const placement = draft ? {
|
|
66
|
+
draftCreatedAt: draft.createdAt,
|
|
67
|
+
summary: draft.summary
|
|
68
|
+
} : void 0;
|
|
69
|
+
if (placement) jobPlacements.set(conversationId, {
|
|
70
|
+
...jobPlacements.get(conversationId),
|
|
71
|
+
[request.id]: placement
|
|
72
|
+
});
|
|
73
|
+
return { job: publicVideoJob(getVideoJob(conversationId, request.id), placement) };
|
|
58
74
|
});
|
|
59
75
|
}
|
|
60
76
|
function claimVideoJob(now = Date.now()) {
|
|
@@ -80,12 +96,18 @@ function beginVideoSubmission(id, token) {
|
|
|
80
96
|
}
|
|
81
97
|
function updateVideoJob(id, token, state, options = {}) {
|
|
82
98
|
const now = Date.now();
|
|
83
|
-
|
|
99
|
+
const update = (db) => db.prepare(`UPDATE video_generation_jobs SET state = ?, error = ?,
|
|
84
100
|
provider_task_id = COALESCE(?, provider_task_id), next_attempt_at = ?,
|
|
85
101
|
lease_token = CASE WHEN ? THEN lease_token ELSE NULL END,
|
|
86
102
|
lease_until = CASE WHEN ? THEN lease_until ELSE NULL END,
|
|
87
103
|
image_bytes = CASE WHEN ? = 'queued' THEN image_bytes ELSE NULL END
|
|
88
104
|
WHERE id = ? AND lease_token = ? AND lease_until > ?`).run(state, options.error ?? null, options.providerTaskId ?? null, now + (options.delayMs ?? 0), Number(options.keepLease ?? false), Number(options.keepLease ?? false), state, id, token, now).changes === 1;
|
|
105
|
+
if (state !== "completed") return update(getSqliteDatabase());
|
|
106
|
+
return runSqliteWriteTransaction((db) => {
|
|
107
|
+
const updated = update(db);
|
|
108
|
+
if (updated) archiveSpaceGeneratedMedia(db, "video", id);
|
|
109
|
+
return updated;
|
|
110
|
+
});
|
|
89
111
|
}
|
|
90
112
|
//#endregion
|
|
91
|
-
export { beginVideoSubmission, claimVideoJob, enqueueVideoJob, getVideoJob, listVideoJobIds, listVideoJobs, publicVideoJob, updateVideoJob };
|
|
113
|
+
export { beginVideoSubmission, claimVideoJob, deleteVideoJobPlacements, enqueueVideoJob, getVideoJob, listVideoJobIds, listVideoJobs, publicVideoJob, updateVideoJob };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VideoGenerationDefaults, type VideoModelRef } from '@xopcai/gateway-contract';
|
|
2
|
+
export declare function storedVideoModel(): VideoModelRef | undefined;
|
|
2
3
|
export declare function getVideoModel(): VideoModelRef;
|
|
3
4
|
export declare function setVideoModel(modelRef: VideoModelRef): void;
|
|
4
5
|
export declare function getVideoDefaults(modelRef: VideoModelRef): VideoGenerationDefaults;
|