@xopcai/xopc 0.0.466 → 0.0.468
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/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-CIV2R_El.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-Cl08_xtM.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DVXcGKP-.js → api-V4P8zfkJ.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-CncU5JvR.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/{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-sR61FFLn.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-_apIsCPT.js → automations-page-BNzj3R7A.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-WmcQUi9O.js → automations-workspace-BWpA-X_S.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-C7i5pqkO.js → binary-plugins-BjEE5sVq.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DAWXPErA.js → block-editor-B4Yqbxab.js} +1 -1
- 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-CBSMm_jo.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CFWTer_v.js → capabilities-EmBa4Blq.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-C2RB9fzC.js → capabilities-page-BQf7oyqc.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-hlByP8SE.js +8 -0
- package/dist/gateway/static/root/assets/{channels-DiDfjON8.js → channels-oyMymJDx.js} +1 -1
- 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-CS-cORJt.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-hcsqrv-7.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B4HoRIzf.js → chat-terminal-dock-D6LH3W5H.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-CxeXJKxg.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-Bsec3-eZ.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-C0ZCUtxF.js} +1 -1
- 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-diuSsk-H.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-DIeg1mg8.js → extension-authoritative-grants-CVQ7q0DU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-D8TAJgZ_.js → extension-debug-page-DrpE2lQ3.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CjfRKtQ4.js → extension-iframe-host-hr60GwXQ.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-aoF3x4-X.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DMuHBIHa.js → extension-page-BfM8zli6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-lqJ1zIkA.js → extension-provider-BcSgVeKW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D5IfKVff.js → extension-settings-page-Db5t2Mz0.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-B7B9qXm9.js → file-preview-surface-CeFFZo3a.js} +1 -1
- 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-Dgopm60U.js → home-page-DsS2UT08.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-DFa0pZhC.js +11 -0
- package/dist/gateway/static/root/assets/index-DHPaL7Ku.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-QkJMw_uW.js → install-connector-dialog-0_PeJJqO.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-wekatwet.js → local-app-workbench-page-OSinc6m6.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-D-bRvlZY.js → local-apps-page-yBqRl5Bi.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-CukseY3k.js → logs-page-BJxQ_Jd5.js} +1 -1
- 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-D9HGIYXx.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-C30KvTaE.js → markdown-view-CiGdWuN3.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-DlMEwcS8.js → media-plugins-C2lp7UmI.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-aRYHi2dh.js → models-hub-cache-CmdULYFt.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-yAPC_cZU.js → note-detail-panel-CVEG1JdF.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-WA8FiHsm.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-BXevQivV.js → notes-api-BQXOYFQ5.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CUMhjKKd.js → notes-page-Cc-c1Yhg.js} +1 -1
- 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-BW7zcXfb.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BaSooYGv.js → page-context-capture-button-Cw58-5P3.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-DwFwq_lI.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-BPQpvC34.js → personal-avatar-B-Oes3ef.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-DWPu-iwK.js +1 -0
- package/dist/gateway/static/root/assets/{personal-profile-settings-DwMdjQ6H.js → personal-profile-settings-CDrzvI35.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-DiNpP_g3.js → personal-settings-panel-CoZ3qWSr.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-UHVwbC3H.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-fS2IT-dK.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/{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/{product-automation-feedback-BlwtlUY7.js → product-automation-feedback-DrBclzH1.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-Dy6D5exJ.js → product-open-page-BMJ2x5m3.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-DEUPAilo.js → product-preview-content-lkkZPvMa.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-C4TV9RUd.js → product-preview-modal-DtUBJGs5.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-BjOzJyw1.js → project-detail-page-DGFUj6jS.js} +1 -1
- 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-Dua6taaG.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-C26HgxZY.js → providers-api-B6eZLEnh.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-BJkXktA-.js → recording-upload-DXxD6grq.js} +1 -1
- 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-Dy3-oGK1.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-DHHyicqQ.js → right-workspace-store-BzXnZDK5.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-8KCgPcjp.js +2 -0
- package/dist/gateway/static/root/assets/{routine-panel-DSNsdpy8.js → routine-panel-BALhliq6.js} +2 -2
- 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/{service-recommendation-list-_rFmwIwY.js → service-recommendation-list-CsU74h1b.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-Cby6Nkib.js +25 -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-u-U9D9qT.js → settings-page-ByFNIBfp.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-Bsn4Wa4p.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DXvYjIu3.js → setup-status-panel-CstjOb7g.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-BYPdlPIb.js → share-preview-page-9pOnypJv.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-CfFiW03g.js → shares-api-ChBHTPKN.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-B85XIDFv.js → shares-settings-CJdVDQqf.js} +1 -1
- 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-CkkHufmv.js} +1 -1
- 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-BPHt6S1V.js → task-detail-page-BjBkKeIf.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-C-zIBpzi.js → task-result-evidence-dtN1sSjU.js} +1 -1
- 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/{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-UhypPQH_.js → use-composer-attachments-BEYkb8cs.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BvEF3yHL.js → use-file-preview-expanded-CQeo2Ztn.js} +3 -3
- package/dist/gateway/static/root/assets/{use-personal-profile-BJgaheR4.js → use-personal-profile-CKm5FaTl.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-RQW5KnIN.js → use-realtime-voice-lRHVixh4.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-B6QFV5gR.js → use-workspace-tree-DrWnW1aA.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-hKnsTcMk.js → user-model-page-Bw1_PGdD.js} +1 -1
- package/dist/gateway/static/root/assets/video-generation-D08uZbsu.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-settings-BUrk4mwV.js → voice-settings-CssuMBjt.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Ddvqu02U.js → work-discovery-overlay-DcZS4OMj.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BdBpri6P.js → work-discovery-page-CZF9iWPT.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-CscTRODe.js → workspace-api-BfApIXLw.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-DwpWKogz.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BRQIf4sc.js → workspace-file-preview-dialog-BRhsCs1S.js} +1 -1
- 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-DNLnuHlf.js → workspace-preview-store-BrofEVle.js} +1 -1
- 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 +89 -90
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/music-generation.js +9 -0
- package/dist/src/agent/background-review/prompts.js +5 -1
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +1 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +5 -1
- package/dist/src/agent/prompt/sections/tooling.js +4 -0
- package/dist/src/agent/tools/factory.js +14 -1
- package/dist/src/agent/tools/music-generation-tool.d.ts +11 -0
- package/dist/src/agent/tools/music-generation-tool.js +70 -0
- package/dist/src/agent/tools/personal-memory-tool.js +12 -10
- package/dist/src/agent/tools/toolExposure.js +2 -0
- package/dist/src/agent/tools/video-draft-tool.d.ts +13 -0
- package/dist/src/agent/tools/video-draft-tool.js +79 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +9 -1
- package/dist/src/gateway/hono/routes/media.js +1 -20
- 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.d.ts +3 -0
- package/dist/src/gateway/hono/routes/music-generation.js +80 -0
- package/dist/src/gateway/hono/routes/video-generation.js +51 -26
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +4 -1
- package/dist/src/media-shared/http/byte-range.d.ts +6 -0
- package/dist/src/media-shared/http/byte-range.js +23 -0
- 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.d.ts +5 -0
- package/dist/src/music-generation/artifact.js +105 -0
- package/dist/src/music-generation/mureka.d.ts +3 -0
- package/dist/src/music-generation/mureka.js +96 -0
- package/dist/src/music-generation/provider.d.ts +34 -0
- package/dist/src/music-generation/provider.js +9 -0
- package/dist/src/music-generation/providers.d.ts +28 -0
- package/dist/src/music-generation/providers.js +68 -0
- package/dist/src/music-generation/repository.d.ts +52 -0
- package/dist/src/music-generation/repository.js +106 -0
- package/dist/src/music-generation/settings.d.ts +7 -0
- package/dist/src/music-generation/settings.js +24 -0
- 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.d.ts +8 -0
- package/dist/src/music-generation/worker.js +126 -0
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +3 -1
- package/dist/src/personal-agent/prompts.js +3 -1
- package/dist/src/session/store.js +9 -2
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +32 -0
- package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/transcript-repository.js +8 -1
- package/dist/src/storage/sqlite/upgrades/277_music_generation.sql +30 -0
- package/dist/src/storage/sqlite/upgrades/278_music_job_error_code.sql +6 -0
- 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/drafts.d.ts +18 -0
- package/dist/src/video-generation/drafts.js +91 -0
- package/dist/src/video-generation/repository.d.ts +5 -3
- package/dist/src/video-generation/repository.js +22 -7
- package/dist/src/video-generation/worker.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/api-CG-SjNfw.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DuQGhgAl.js +0 -8
- package/dist/gateway/static/root/assets/chat-page-BMZwIVXH.js +0 -71
- package/dist/gateway/static/root/assets/gateway-realtime-store-CJf-qaHZ.js +0 -1
- package/dist/gateway/static/root/assets/index-BE3XMuQI.js +0 -11
- package/dist/gateway/static/root/assets/index-CY5vdQcc.css +0 -1
- package/dist/gateway/static/root/assets/messages-BDBGlBKh.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-CxXu_Tkh.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-C2ydtnXa.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-POCG1_kK.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-DjYsRhY1.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/workspace-editor-agent-store-CyPjTDSx.js +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { TENCENT_MPS_MUSIC_PROVIDER } from "../../packages/gateway-contract/src/music-generation.js";
|
|
2
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { MusicRequestRejected } from "./provider.js";
|
|
4
|
+
import { createHash, createHmac } from "node:crypto";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/music-generation/tencent-mps.ts
|
|
7
|
+
init_src();
|
|
8
|
+
const host = "mps.tencentcloudapi.com";
|
|
9
|
+
const contentType = "application/json; charset=utf-8";
|
|
10
|
+
const algorithm = "TC3-HMAC-SHA256";
|
|
11
|
+
const signedHeaders = "content-type;host;x-tc-action";
|
|
12
|
+
const actionSchema = z.object({ Response: z.object({
|
|
13
|
+
Error: z.object({ Code: z.string() }).optional(),
|
|
14
|
+
TaskId: z.string().min(1).max(200).optional(),
|
|
15
|
+
Status: z.string().optional(),
|
|
16
|
+
AudioInfos: z.array(z.object({
|
|
17
|
+
Url: z.string().optional(),
|
|
18
|
+
Duration: z.number().nullish()
|
|
19
|
+
})).nullish()
|
|
20
|
+
}) });
|
|
21
|
+
const tencentMpsCredentialsSchema = z.strictObject({
|
|
22
|
+
secretId: z.string().trim().min(1).max(256).regex(/^[a-zA-Z0-9_-]+$/),
|
|
23
|
+
secretKey: z.string().trim().min(1).max(256).regex(/^[a-zA-Z0-9_+/=-]+$/)
|
|
24
|
+
});
|
|
25
|
+
function parseTencentMpsCredentials(stored) {
|
|
26
|
+
if (!stored) return void 0;
|
|
27
|
+
try {
|
|
28
|
+
return tencentMpsCredentialsSchema.safeParse(JSON.parse(stored)).data;
|
|
29
|
+
} catch {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function sha256(value) {
|
|
34
|
+
return createHash("sha256").update(value).digest("hex");
|
|
35
|
+
}
|
|
36
|
+
function hmac(key, value) {
|
|
37
|
+
return createHmac("sha256", key).update(value).digest();
|
|
38
|
+
}
|
|
39
|
+
async function callMps(key, action, input) {
|
|
40
|
+
const credentials = parseTencentMpsCredentials(key);
|
|
41
|
+
if (!credentials) throw new MusicRequestRejected("Tencent Cloud MPS credentials are invalid.", "provider_rejected");
|
|
42
|
+
const body = JSON.stringify(input);
|
|
43
|
+
const timestamp = Math.floor(Date.now() / 1e3);
|
|
44
|
+
const date = (/* @__PURE__ */ new Date(timestamp * 1e3)).toISOString().slice(0, 10);
|
|
45
|
+
const scope = `${date}/mps/tc3_request`;
|
|
46
|
+
const toSign = [
|
|
47
|
+
algorithm,
|
|
48
|
+
timestamp,
|
|
49
|
+
scope,
|
|
50
|
+
sha256([
|
|
51
|
+
"POST",
|
|
52
|
+
"/",
|
|
53
|
+
"",
|
|
54
|
+
`content-type:${contentType}\nhost:${host}\nx-tc-action:${action.toLowerCase()}\n`,
|
|
55
|
+
signedHeaders,
|
|
56
|
+
sha256(body)
|
|
57
|
+
].join("\n"))
|
|
58
|
+
].join("\n");
|
|
59
|
+
const signature = hmac(hmac(hmac(hmac(`TC3${credentials.secretKey}`, date), "mps"), "tc3_request"), toSign).toString("hex");
|
|
60
|
+
const response = await fetch(`https://${host}/`, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
Authorization: `${algorithm} Credential=${credentials.secretId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`,
|
|
64
|
+
"Content-Type": contentType,
|
|
65
|
+
"X-TC-Action": action,
|
|
66
|
+
"X-TC-Timestamp": String(timestamp),
|
|
67
|
+
"X-TC-Version": "2019-06-12"
|
|
68
|
+
},
|
|
69
|
+
body,
|
|
70
|
+
redirect: "error",
|
|
71
|
+
signal: AbortSignal.timeout(25e3)
|
|
72
|
+
});
|
|
73
|
+
const isSubmission = action === "CreateAigcAudioTask";
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
await response.body?.cancel().catch(() => void 0);
|
|
76
|
+
const message = `Tencent Cloud MPS returned HTTP ${response.status}.`;
|
|
77
|
+
if (isSubmission && [
|
|
78
|
+
400,
|
|
79
|
+
401,
|
|
80
|
+
402,
|
|
81
|
+
403,
|
|
82
|
+
404,
|
|
83
|
+
422,
|
|
84
|
+
429
|
|
85
|
+
].includes(response.status)) throw new MusicRequestRejected(message, response.status === 429 ? "provider_rate_limited" : "provider_rejected");
|
|
86
|
+
throw new Error(message);
|
|
87
|
+
}
|
|
88
|
+
const result = actionSchema.parse(await response.json()).Response;
|
|
89
|
+
if (result.Error) {
|
|
90
|
+
const code = result.Error.Code.split(".")[0];
|
|
91
|
+
if (isSubmission && (code === "RequestLimitExceeded" || code === "LimitExceeded")) throw new MusicRequestRejected(`Tencent Cloud MPS rejected the request (${code}).`, "provider_rate_limited");
|
|
92
|
+
if (isSubmission && /^(AuthFailure|UnauthorizedOperation|InvalidParameter(?:Value)?|MissingParameter|UnsupportedOperation|OperationDenied|ResourceUnavailable|AccountError|NoSuchVersion|InvalidAction)$/.test(code)) throw new MusicRequestRejected(`Tencent Cloud MPS rejected the request (${code}).`, "provider_rejected");
|
|
93
|
+
throw new Error("Tencent Cloud MPS did not return a task result.");
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
const tencentMpsProvider = {
|
|
98
|
+
id: TENCENT_MPS_MUSIC_PROVIDER,
|
|
99
|
+
name: "Tencent Cloud MPS",
|
|
100
|
+
models: { "minimax-music-3.0": {
|
|
101
|
+
name: "MiniMax Music 3.0",
|
|
102
|
+
modes: ["song", "instrumental"],
|
|
103
|
+
maxPromptCharacters: 2e3,
|
|
104
|
+
maxLyricsCharacters: 3500
|
|
105
|
+
} },
|
|
106
|
+
environmentKey() {
|
|
107
|
+
const credentials = tencentMpsCredentialsSchema.safeParse({
|
|
108
|
+
secretId: process.env.TENCENTCLOUD_SECRET_ID,
|
|
109
|
+
secretKey: process.env.TENCENTCLOUD_SECRET_KEY
|
|
110
|
+
});
|
|
111
|
+
return credentials.success ? JSON.stringify(credentials.data) : void 0;
|
|
112
|
+
},
|
|
113
|
+
allowsAudioHost: (hostname) => hostname.endsWith(".myqcloud.com") || hostname.endsWith(".vod-qcloud.com"),
|
|
114
|
+
async submit(key, _model, { mode, prompt, lyrics }) {
|
|
115
|
+
const result = await callMps(key, "CreateAigcAudioTask", {
|
|
116
|
+
ModelName: "MiniMaxMusic",
|
|
117
|
+
ModelVersion: "3.0",
|
|
118
|
+
SceneType: "music",
|
|
119
|
+
Prompt: prompt,
|
|
120
|
+
ExtraParameters: { OutputAudioFormat: "mp3" },
|
|
121
|
+
AdditionalParameters: JSON.stringify(mode === "song" ? { lyrics } : { is_instrumental: true })
|
|
122
|
+
});
|
|
123
|
+
if (!result.TaskId) throw new Error("Tencent Cloud MPS did not return a task ID.");
|
|
124
|
+
return result.TaskId;
|
|
125
|
+
},
|
|
126
|
+
async query(key, _mode, taskId) {
|
|
127
|
+
const result = await callMps(key, "DescribeAigcAudioTask", { TaskId: taskId });
|
|
128
|
+
switch (result.Status) {
|
|
129
|
+
case "WAIT": return { state: "submitted" };
|
|
130
|
+
case "RUN": return { state: "running" };
|
|
131
|
+
case "FAIL": return {
|
|
132
|
+
state: "failed",
|
|
133
|
+
reason: "Tencent Cloud MPS reported that music generation failed."
|
|
134
|
+
};
|
|
135
|
+
case "DONE": {
|
|
136
|
+
const audio = result.AudioInfos?.find((item) => item.Url);
|
|
137
|
+
if (!audio?.Url) break;
|
|
138
|
+
const duration = audio.Duration;
|
|
139
|
+
const durationMs = duration && duration > 0 ? Math.round(duration * 1e3) : null;
|
|
140
|
+
return {
|
|
141
|
+
state: "completed",
|
|
142
|
+
url: audio.Url,
|
|
143
|
+
durationMs
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
throw new Error("Tencent Cloud MPS returned an incomplete or unrecognized task status.");
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
export { parseTencentMpsCredentials, tencentMpsCredentialsSchema, tencentMpsProvider };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { MusicRequestRejected } from "./provider.js";
|
|
4
|
+
import { resolveMusicKey, resolveMusicModel } from "./providers.js";
|
|
5
|
+
import { claimMusicJob, getMusicJob, updateMusicJob } from "./repository.js";
|
|
6
|
+
import { deleteMusicArtifact, musicArtifactExists, saveMusicArtifact } from "./artifact.js";
|
|
7
|
+
//#region src/music-generation/worker.ts
|
|
8
|
+
init_logger();
|
|
9
|
+
const log = createLogger("MusicGeneration");
|
|
10
|
+
const pollMs = 8e3;
|
|
11
|
+
const retryMs = 2e4;
|
|
12
|
+
const lifetimeMs = 720 * 6e4;
|
|
13
|
+
var MusicGenerationWorker = class {
|
|
14
|
+
timer;
|
|
15
|
+
work;
|
|
16
|
+
start() {
|
|
17
|
+
if (this.timer) return;
|
|
18
|
+
this.timer = setInterval(() => this.tick(), 1e3);
|
|
19
|
+
this.timer.unref();
|
|
20
|
+
this.tick();
|
|
21
|
+
}
|
|
22
|
+
async stop() {
|
|
23
|
+
clearInterval(this.timer);
|
|
24
|
+
this.timer = void 0;
|
|
25
|
+
await this.work;
|
|
26
|
+
}
|
|
27
|
+
tick() {
|
|
28
|
+
if (this.work) return;
|
|
29
|
+
this.work = this.runNext().catch((err) => log.error({ err }, "Music worker iteration failed")).finally(() => {
|
|
30
|
+
this.work = void 0;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async runNext() {
|
|
34
|
+
const claimed = claimMusicJob();
|
|
35
|
+
if (!claimed) return;
|
|
36
|
+
const { row, token } = claimed;
|
|
37
|
+
const { id, mode } = row;
|
|
38
|
+
if (row.state === "saving" && await musicArtifactExists(id)) {
|
|
39
|
+
updateMusicJob(id, token, "completed");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (Date.now() - row.created_at >= lifetimeMs) {
|
|
43
|
+
updateMusicJob(id, token, "failed", {
|
|
44
|
+
error: "The music task or its download is no longer available.",
|
|
45
|
+
errorCode: "expired"
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const route = resolveMusicModel(row.model_ref);
|
|
50
|
+
const key = route && await resolveMusicKey(route.provider);
|
|
51
|
+
if (!route || !key) {
|
|
52
|
+
updateMusicJob(id, token, row.state, {
|
|
53
|
+
delayMs: retryMs,
|
|
54
|
+
error: "Restore the original music model credentials to resume.",
|
|
55
|
+
errorCode: "credentials_missing"
|
|
56
|
+
});
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const { provider, model } = route;
|
|
60
|
+
if (row.state === "queued") {
|
|
61
|
+
if (!updateMusicJob(id, token, "submitting", { keepLease: true })) return;
|
|
62
|
+
try {
|
|
63
|
+
updateMusicJob(id, token, "submitted", {
|
|
64
|
+
taskId: await provider.submit(key, model, {
|
|
65
|
+
mode,
|
|
66
|
+
prompt: row.prompt,
|
|
67
|
+
lyrics: row.lyrics
|
|
68
|
+
}),
|
|
69
|
+
delayMs: pollMs
|
|
70
|
+
});
|
|
71
|
+
} catch (err) {
|
|
72
|
+
if (err instanceof MusicRequestRejected) {
|
|
73
|
+
updateMusicJob(id, token, "failed", {
|
|
74
|
+
error: err.message,
|
|
75
|
+
errorCode: err.code
|
|
76
|
+
});
|
|
77
|
+
log.warn({
|
|
78
|
+
jobId: id,
|
|
79
|
+
modelRef: row.model_ref
|
|
80
|
+
}, err.message);
|
|
81
|
+
} else {
|
|
82
|
+
updateMusicJob(id, token, "submission_unknown", { error: "The provider may have accepted this request." });
|
|
83
|
+
log.warn({
|
|
84
|
+
jobId: id,
|
|
85
|
+
modelRef: row.model_ref
|
|
86
|
+
}, "Music submission could not be confirmed");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
let saving = row.state === "saving";
|
|
92
|
+
try {
|
|
93
|
+
if (!row.provider_task_id) throw new Error("Missing remote music task ID.");
|
|
94
|
+
const result = await provider.query(key, mode, row.provider_task_id);
|
|
95
|
+
switch (result.state) {
|
|
96
|
+
case "submitted":
|
|
97
|
+
case "running":
|
|
98
|
+
updateMusicJob(id, token, result.state, { delayMs: pollMs });
|
|
99
|
+
return;
|
|
100
|
+
case "failed":
|
|
101
|
+
updateMusicJob(id, token, "failed", {
|
|
102
|
+
error: result.reason,
|
|
103
|
+
errorCode: "provider_failed"
|
|
104
|
+
});
|
|
105
|
+
return;
|
|
106
|
+
case "completed":
|
|
107
|
+
if (!updateMusicJob(id, token, "saving", {
|
|
108
|
+
durationMs: result.durationMs,
|
|
109
|
+
keepLease: true
|
|
110
|
+
})) return;
|
|
111
|
+
saving = true;
|
|
112
|
+
await saveMusicArtifact(id, provider, result.url, () => updateMusicJob(id, token, "saving", { keepLease: true }));
|
|
113
|
+
if (await musicArtifactExists(id)) updateMusicJob(id, token, "completed");
|
|
114
|
+
if (!getMusicJob(row.conversation_id, id)) await deleteMusicArtifact(id);
|
|
115
|
+
}
|
|
116
|
+
} catch {
|
|
117
|
+
updateMusicJob(id, token, saving ? "saving" : row.state, {
|
|
118
|
+
delayMs: retryMs,
|
|
119
|
+
error: saving ? "Audio download failed. Retrying the same result." : "Status check failed. Retrying.",
|
|
120
|
+
errorCode: saving ? "audio_retrying" : "status_retrying"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
export { MusicGenerationWorker };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const PERSONAL_MAIN_TOOL_IDS: readonly ["personal_task", "personal_attention", "personal_capability", "personal_request", "session_recall", "read_media", "read_file", "session_search", "personal_read", "personal_result", "user_context_read", "knowledge_read", "personal_memory"];
|
|
1
|
+
export declare const PERSONAL_MAIN_TOOL_IDS: readonly ["personal_task", "personal_attention", "personal_capability", "personal_request", "session_recall", "read_media", "read_file", "session_search", "personal_read", "personal_result", "user_context_read", "knowledge_read", "personal_memory", "video_draft", "music_generation"];
|
|
2
2
|
export declare const PERSONAL_TOOL_DESCRIPTIONS: Readonly<Record<string, string>>;
|
|
3
3
|
export declare const PERSONAL_READ_TOOL_ALIASES: Readonly<Record<string, string>>;
|
|
@@ -12,7 +12,9 @@ const PERSONAL_MAIN_TOOL_IDS = [
|
|
|
12
12
|
"personal_result",
|
|
13
13
|
"user_context_read",
|
|
14
14
|
"knowledge_read",
|
|
15
|
-
"personal_memory"
|
|
15
|
+
"personal_memory",
|
|
16
|
+
"video_draft",
|
|
17
|
+
"music_generation"
|
|
16
18
|
];
|
|
17
19
|
const PERSONAL_TOOL_DESCRIPTIONS = {
|
|
18
20
|
session_recall: "Find exact facts in this conversation, including compacted history. Cannot access other chats.",
|
|
@@ -100,9 +100,11 @@ function projectPersonalInstructions(instructions, toolNames) {
|
|
|
100
100
|
if (group.requires.every((tool) => tools.has(tool))) continue;
|
|
101
101
|
for (const rule of group.rules) projected = omitInstructionBlock(projected, rule);
|
|
102
102
|
}
|
|
103
|
+
if (tools.has("music_generation")) projected += "\nUse music_generation for song or instrumental requests. Explicit requests can enqueue directly. If the user asks to review lyrics first, present them in chat and wait for their request to generate.";
|
|
104
|
+
if (tools.has("video_draft")) projected += "\nFor video generation in this chat, use video_draft directly to prepare or revise the draft and let the user confirm it in chat.";
|
|
103
105
|
return projected;
|
|
104
106
|
}
|
|
105
|
-
const PERSONAL_MEMORY_RULE = "A self-description or preference without a request to persist it is handled by background learning; adapt to it in the current reply, do not call personal_memory or claim it has already been saved. For an explicit request to remember, correct, forget, or limit saved memory, use personal_memory directly instead of delegating or promising background learning. Quote the current owner request in userEvidence. User identity
|
|
107
|
+
const PERSONAL_MEMORY_RULE = "A self-description or preference without a request to persist it is handled by background learning; adapt to it in the current reply, do not call personal_memory or claim it has already been saved. For an explicit request to remember, correct, forget, or limit saved memory, use personal_memory directly instead of delegating or promising background learning. Quote the current owner request in userEvidence. User identity, preferences and standing collaboration instructions (including tool choice) use target=user; project facts, decisions and lessons use target=knowledge. A clearly general long-term personal preference can be global even in a project chat. Keep tool instructions scoped to the current project when their cross-project applicability is unclear. \"All Slack reads\" defines the operation; \"in all projects\" defines the scope. Preserve the operation and any account limits in the preference text. Before changing an existing item read its id and version using the matching read tool. Resolve scope from what the user asks: global, current agent, workspace, project or session. Never broaden a local request. Missing current project is an error, not permission to fall back globally. Only say saved after status=saved with usable=true; pending means saved for review but not in use. A receipt records a past commit; available/usable describe current state on retries. Forgotten means future automatic recall stops, while originals and already running prompts may retain content. Keep acknowledgements short, name the actual scope, and offer correction only when useful. Memory cannot authorize external actions.";
|
|
106
108
|
const PERSONAL_ATTENTION_RULE = "Use personal_attention to save explicit requests to check again later and proactively tell the user about useful developments, including requests phrased without the word follow-up. The running Gateway checks saved attention automatically while the user is away and can post in this chat; do not ask the user to return or create a separate scheduler. Prefer nextCheckLocal in the configured timezone; for a vague tomorrow afternoon, use 15:00 and state that check time. A check is not a guaranteed notification or action authorization. Only claim follow-up saved after a successful tool result, and only claim memory written after a successful write; user_context_read is read-only. If a tool fails, explain the actual failure without inventing missing product capabilities. When there is no useful development, stay silent rather than posting no progress. Do not duplicate an existing scheduled automation or create attention from your own suggestions. For feedback, respect the smallest stated scope; silence is not rejection.";
|
|
107
109
|
const PERSONAL_ATTENTION_VERIFICATION_RULE = "For follow-up capability, use current system rules and tool descriptions, never prior assistant claims. When asked whether a follow-up is arranged or still active, query personal_attention(command=\"list\"); query command=\"settings\" when proactive settings are needed. Base status answers on current tool results. Do not substitute memory or notes for saved attention.";
|
|
108
110
|
const PERSONAL_GROWTH_RULE = "Topic feedback such as prepare fully next time changes only that attention thread: query personal_attention(list) to identify it, then feedback, never a global style change. If the topic is ambiguous, clarify. Use rollback only on an explicit undo request and the latest version ID. interests returns inferred, silent candidates with user evidence; do not treat confidence as confirmation or activate them without explicit follow-up. Keep growth state in the durable store, not personality files.";
|
|
@@ -20,11 +20,14 @@ import { ACCEPTANCE_REPAIR_READ_TOOLS, canResumeAfterModelFailure } from "../age
|
|
|
20
20
|
import { transcriptRowsToClientHistory } from "./client-history.js";
|
|
21
21
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
22
22
|
import { resolveCompactionPolicy } from "../agent/memory/compaction-policy.js";
|
|
23
|
+
import { listMusicJobIds } from "../music-generation/repository.js";
|
|
24
|
+
import { deleteVideoJobPlacements, listVideoJobIds } from "../video-generation/repository.js";
|
|
25
|
+
import { deleteVideoDraft } from "../video-generation/drafts.js";
|
|
23
26
|
import { IdleCompactionScheduler } from "../agent/memory/idle-compaction-scheduler.js";
|
|
24
27
|
import { readPostCompactionContext } from "../agent/reply/post-compaction-context.js";
|
|
25
28
|
import { promoteCompactionLedger } from "../agent/memory/compaction-promotion.js";
|
|
29
|
+
import { deleteMusicArtifact } from "../music-generation/artifact.js";
|
|
26
30
|
import { deleteVideoArtifact } from "../video-generation/artifact.js";
|
|
27
|
-
import { listVideoJobIds } from "../video-generation/repository.js";
|
|
28
31
|
import { SlidingWindow } from "../agent/memory/window.js";
|
|
29
32
|
import { isAppendOnlyLlmTranscriptMessage } from "./transcript-stats.js";
|
|
30
33
|
import { compactHistory } from "./compact-history.js";
|
|
@@ -338,6 +341,7 @@ var SessionStore = class {
|
|
|
338
341
|
requireXopcDatabase();
|
|
339
342
|
const task = resetSessionRecord(key, this.resolveWorkspaceCwd(key));
|
|
340
343
|
if (task) {
|
|
344
|
+
deleteVideoDraft(key);
|
|
341
345
|
this.clearCompactionCheckpoint(key);
|
|
342
346
|
log.info({
|
|
343
347
|
key,
|
|
@@ -352,9 +356,12 @@ var SessionStore = class {
|
|
|
352
356
|
return this.runStoreMutation(async () => {
|
|
353
357
|
requireXopcDatabase();
|
|
354
358
|
const videoJobs = listVideoJobIds(key);
|
|
359
|
+
const musicJobs = listMusicJobIds(key);
|
|
355
360
|
const ok = deleteSessionRecord(key);
|
|
356
361
|
if (ok) {
|
|
357
|
-
|
|
362
|
+
deleteVideoDraft(key);
|
|
363
|
+
deleteVideoJobPlacements(key);
|
|
364
|
+
await Promise.allSettled([...videoJobs.map(deleteVideoArtifact), ...musicJobs.map(deleteMusicArtifact)]);
|
|
358
365
|
this.clearCompactionCheckpoint(key);
|
|
359
366
|
log.info({ key }, "Session deleted");
|
|
360
367
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
2
|
export { SCHEMA_META_SCHEMA_VERSION_KEY, readSchemaVersionForTest, readSchemaVersion, setSchemaVersion, ensureSchemaMetaTable } from './schema-version.js';
|
|
3
|
-
export declare const XOPC_DB_SCHEMA_VERSION =
|
|
4
|
-
export declare const XOPC_DB_BASELINE_SCHEMA_VERSION =
|
|
3
|
+
export declare const XOPC_DB_SCHEMA_VERSION = 278;
|
|
4
|
+
export declare const XOPC_DB_BASELINE_SCHEMA_VERSION = 278;
|
|
5
5
|
export { XOPC_DB_MINIMUM_SCHEMA_VERSION } from './schema-upgrade.js';
|
|
6
6
|
/** Initialize fresh databases directly; upgrade supported installed databases transactionally. */
|
|
7
7
|
export declare function ensureXopcDatabaseSchema(db: DatabaseSync): void;
|
|
@@ -14,18 +14,18 @@ function ensureXopcDatabaseSchema(db) {
|
|
|
14
14
|
const hasMetadata = tables.some((row) => row.name === "schema_meta");
|
|
15
15
|
if (!hasMetadata && tables.length) throw new Error("An unversioned database cannot be initialized");
|
|
16
16
|
const version = hasMetadata ? readSchemaVersion(db) : 0;
|
|
17
|
-
if (version >
|
|
17
|
+
if (version > 278) throw new DatabaseSchemaTooNewError(version, 278);
|
|
18
18
|
if (version > 0 && version < 202) throw new DatabaseSchemaTooOldError(version, 202);
|
|
19
|
-
if (version >= 202 && version <
|
|
20
|
-
upgradeXopcDatabase(db, version,
|
|
19
|
+
if (version >= 202 && version < 278) {
|
|
20
|
+
upgradeXopcDatabase(db, version, 278);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
if (version ===
|
|
23
|
+
if (version === 278) return;
|
|
24
24
|
if (db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name != 'schema_meta' AND name NOT LIKE 'sqlite_%' LIMIT 1").get()) throw new Error("An unversioned database cannot be initialized");
|
|
25
25
|
db.exec("BEGIN IMMEDIATE");
|
|
26
26
|
try {
|
|
27
27
|
db.exec(readSqliteAsset("schema.sql"));
|
|
28
|
-
setSchemaVersion(db,
|
|
28
|
+
setSchemaVersion(db, 278);
|
|
29
29
|
db.exec("COMMIT");
|
|
30
30
|
} catch (error) {
|
|
31
31
|
db.exec("ROLLBACK");
|
|
@@ -40,8 +40,8 @@ var init_schema = __esmMin((() => {
|
|
|
40
40
|
init_schema_version();
|
|
41
41
|
init_schema_errors();
|
|
42
42
|
init_schema_upgrade();
|
|
43
|
-
XOPC_DB_SCHEMA_VERSION =
|
|
44
|
-
XOPC_DB_BASELINE_SCHEMA_VERSION =
|
|
43
|
+
XOPC_DB_SCHEMA_VERSION = 278;
|
|
44
|
+
XOPC_DB_BASELINE_SCHEMA_VERSION = 278;
|
|
45
45
|
}));
|
|
46
46
|
//#endregion
|
|
47
47
|
init_schema();
|
|
@@ -3738,3 +3738,35 @@ CREATE TABLE video_generation_provider_budget (
|
|
|
3738
3738
|
reserved_fen INTEGER NOT NULL,
|
|
3739
3739
|
PRIMARY KEY (provider, day)
|
|
3740
3740
|
);
|
|
3741
|
+
|
|
3742
|
+
CREATE TABLE music_generation_jobs (
|
|
3743
|
+
id TEXT PRIMARY KEY,
|
|
3744
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
3745
|
+
transcript_id TEXT NOT NULL,
|
|
3746
|
+
work_id TEXT NOT NULL,
|
|
3747
|
+
parent_id TEXT,
|
|
3748
|
+
version_number INTEGER NOT NULL,
|
|
3749
|
+
model_ref TEXT NOT NULL,
|
|
3750
|
+
request_hash TEXT NOT NULL,
|
|
3751
|
+
title TEXT NOT NULL,
|
|
3752
|
+
mode TEXT NOT NULL CHECK (mode IN ('song', 'instrumental')),
|
|
3753
|
+
prompt TEXT NOT NULL,
|
|
3754
|
+
lyrics TEXT,
|
|
3755
|
+
state TEXT NOT NULL CHECK (state IN ('queued', 'submitting', 'submitted', 'running', 'saving', 'completed', 'failed', 'submission_unknown')),
|
|
3756
|
+
provider_task_id TEXT,
|
|
3757
|
+
duration_ms INTEGER,
|
|
3758
|
+
error TEXT,
|
|
3759
|
+
next_attempt_at INTEGER NOT NULL,
|
|
3760
|
+
lease_token TEXT,
|
|
3761
|
+
lease_until INTEGER,
|
|
3762
|
+
created_at INTEGER NOT NULL,
|
|
3763
|
+
error_code TEXT,
|
|
3764
|
+
UNIQUE (work_id, version_number)
|
|
3765
|
+
);
|
|
3766
|
+
CREATE INDEX music_generation_due ON music_generation_jobs(next_attempt_at)
|
|
3767
|
+
WHERE state IN ('queued', 'submitting', 'submitted', 'running', 'saving');
|
|
3768
|
+
CREATE INDEX music_generation_transcript ON music_generation_jobs(conversation_id, transcript_id, created_at DESC);
|
|
3769
|
+
CREATE TABLE music_generation_daily_usage (
|
|
3770
|
+
day INTEGER PRIMARY KEY,
|
|
3771
|
+
count INTEGER NOT NULL
|
|
3772
|
+
);
|
|
@@ -38,6 +38,7 @@ export declare function searchSessionTranscript(conversationId: string, query: s
|
|
|
38
38
|
matchMode?: 'keyword' | 'phrase';
|
|
39
39
|
}): SessionTranscriptRecallMatch[];
|
|
40
40
|
export declare function loadTranscriptRowsForSession(conversationId: string): TranscriptStoredRow[];
|
|
41
|
+
export declare function loadRecentUserTranscriptRows(conversationId: string, limit: number): TranscriptStoredRow[];
|
|
41
42
|
export declare function loadTranscriptHistoryRowsForSession(conversationId: string): TranscriptStoredRow[];
|
|
42
43
|
export declare function loadTranscriptRows(transcriptId: string): TranscriptStoredRow[];
|
|
43
44
|
export declare function loadLlmMessagesForSession(conversationId: string): AgentMessage[];
|
|
@@ -254,6 +254,13 @@ function loadTranscriptRowsForSession(conversationId) {
|
|
|
254
254
|
if (!transcriptId) return [];
|
|
255
255
|
return loadTranscriptRows(transcriptId);
|
|
256
256
|
}
|
|
257
|
+
function loadRecentUserTranscriptRows(conversationId, limit) {
|
|
258
|
+
const transcriptId = getCurrentTranscriptId(conversationId);
|
|
259
|
+
if (!transcriptId) return [];
|
|
260
|
+
return getSqliteDatabase().prepare(`SELECT entry_id, transcript_id, seq, entry_kind, role, payload_json, created_at
|
|
261
|
+
FROM transcript_entries WHERE transcript_id = ? AND entry_kind = 'message' AND role = 'user'
|
|
262
|
+
ORDER BY seq DESC LIMIT ?`).all(transcriptId, limit).map(transcriptEntryRowToStoredRow);
|
|
263
|
+
}
|
|
257
264
|
function loadTranscriptHistoryRowsForSession(conversationId) {
|
|
258
265
|
if (!getCurrentTranscriptId(conversationId)) return [];
|
|
259
266
|
return getSqliteDatabase().prepare(`SELECT e.entry_id, e.transcript_id, e.seq, e.entry_kind, e.role, e.payload_json, e.created_at
|
|
@@ -492,4 +499,4 @@ function restoreBeforeCompactionBoundary(conversationId, compactionId) {
|
|
|
492
499
|
});
|
|
493
500
|
}
|
|
494
501
|
//#endregion
|
|
495
|
-
export { appendCompactionBoundaryIfUnchanged, appendMediaToAssistantTranscriptEntry, appendTranscriptEntry, archiveFailedModelAttempts, findLatestAssistantTranscriptEntryId, listCompactionBoundaries, loadCompactionSourceSnapshot, loadLlmMessagesForSession, loadTranscriptHistoryRowsForSession, loadTranscriptRows, loadTranscriptRowsForSession, paginateTranscriptMessages, replaceTranscriptRows, restoreBeforeCompactionBoundary, searchSessionTranscript };
|
|
502
|
+
export { appendCompactionBoundaryIfUnchanged, appendMediaToAssistantTranscriptEntry, appendTranscriptEntry, archiveFailedModelAttempts, findLatestAssistantTranscriptEntryId, listCompactionBoundaries, loadCompactionSourceSnapshot, loadLlmMessagesForSession, loadRecentUserTranscriptRows, loadTranscriptHistoryRowsForSession, loadTranscriptRows, loadTranscriptRowsForSession, paginateTranscriptMessages, replaceTranscriptRows, restoreBeforeCompactionBoundary, searchSessionTranscript };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
CREATE TABLE music_generation_jobs (
|
|
2
|
+
id TEXT PRIMARY KEY,
|
|
3
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
4
|
+
transcript_id TEXT NOT NULL,
|
|
5
|
+
work_id TEXT NOT NULL,
|
|
6
|
+
parent_id TEXT,
|
|
7
|
+
version_number INTEGER NOT NULL,
|
|
8
|
+
model_ref TEXT NOT NULL,
|
|
9
|
+
request_hash TEXT NOT NULL,
|
|
10
|
+
title TEXT NOT NULL,
|
|
11
|
+
mode TEXT NOT NULL CHECK (mode IN ('song', 'instrumental')),
|
|
12
|
+
prompt TEXT NOT NULL,
|
|
13
|
+
lyrics TEXT,
|
|
14
|
+
state TEXT NOT NULL CHECK (state IN ('queued', 'submitting', 'submitted', 'running', 'saving', 'completed', 'failed', 'submission_unknown')),
|
|
15
|
+
provider_task_id TEXT,
|
|
16
|
+
duration_ms INTEGER,
|
|
17
|
+
error TEXT,
|
|
18
|
+
next_attempt_at INTEGER NOT NULL,
|
|
19
|
+
lease_token TEXT,
|
|
20
|
+
lease_until INTEGER,
|
|
21
|
+
created_at INTEGER NOT NULL,
|
|
22
|
+
UNIQUE (work_id, version_number)
|
|
23
|
+
);
|
|
24
|
+
CREATE INDEX music_generation_due ON music_generation_jobs(next_attempt_at)
|
|
25
|
+
WHERE state IN ('queued', 'submitting', 'submitted', 'running', 'saving');
|
|
26
|
+
CREATE INDEX music_generation_transcript ON music_generation_jobs(conversation_id, transcript_id, created_at DESC);
|
|
27
|
+
CREATE TABLE music_generation_daily_usage (
|
|
28
|
+
day INTEGER PRIMARY KEY,
|
|
29
|
+
count INTEGER NOT NULL
|
|
30
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
ALTER TABLE music_generation_jobs ADD COLUMN error_code TEXT;
|
|
2
|
+
|
|
3
|
+
UPDATE music_generation_jobs
|
|
4
|
+
SET error_code = 'provider_rate_limited'
|
|
5
|
+
WHERE state = 'failed' AND model_ref IN ('mureka-cn/mureka-9.5', 'mureka-global/mureka-9.5')
|
|
6
|
+
AND error = 'Mureka returned HTTP 429.';
|
|
@@ -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 };
|