@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
|
@@ -6,7 +6,7 @@ import { canUseKnowledge } from "../knowledge-memory/usage-policy.js";
|
|
|
6
6
|
import { getKnowledgeItem, listKnowledgeItems, transitionKnowledgeStatus, writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
7
7
|
import "../knowledge-memory/index.js";
|
|
8
8
|
import { forgottenHistoryEntries, projectUnadmittedForgottenFields } from "./forgotten-history.js";
|
|
9
|
-
import { isFullyOwnerAuthoredSpan } from "../user-model/capture/evidence-policy.js";
|
|
9
|
+
import { assessOwnerSupport, isFullyOwnerAuthoredSpan, ownerMemoryScope, standingToolScope } from "../user-model/capture/evidence-policy.js";
|
|
10
10
|
import { isPersonalWorkClaim } from "./work-capture.js";
|
|
11
11
|
import { retrievalLexicalSimilarity } from "../retrieval/textFeatures.js";
|
|
12
12
|
import { stripRuntimeContextFromUserMessage } from "../session/user-message-display.js";
|
|
@@ -70,6 +70,29 @@ function originalsFor(item, context, processingPolicy) {
|
|
|
70
70
|
}
|
|
71
71
|
return result;
|
|
72
72
|
}
|
|
73
|
+
/** Management only. Re-read the original before suggesting any scope change. */
|
|
74
|
+
function suggestWorkMemoryReview(item, context, policy) {
|
|
75
|
+
if (item.recordClass !== "memory" || item.originClass !== "agent" || item.sensitivity !== "normal" || !["decision", "note"].includes(item.kind) || item.scope.type === "global" || !item.sourceConversationId || item.sourceConversationId !== context.conversationId || ![
|
|
76
|
+
"active",
|
|
77
|
+
"candidate",
|
|
78
|
+
"needs_review"
|
|
79
|
+
].includes(item.status) || item.verification === "conflicted" || !canUseKnowledge({
|
|
80
|
+
...item,
|
|
81
|
+
status: "active",
|
|
82
|
+
verification: "supported"
|
|
83
|
+
}, context, policy)) return void 0;
|
|
84
|
+
const originals = originalsFor(item, context, "local_only");
|
|
85
|
+
const [source] = originals;
|
|
86
|
+
if (originals.length !== 1 || source.role !== "user") return void 0;
|
|
87
|
+
const quote = source.text.trim();
|
|
88
|
+
const support = assessOwnerSupport({
|
|
89
|
+
text: source.text,
|
|
90
|
+
quote,
|
|
91
|
+
kind: "preference"
|
|
92
|
+
});
|
|
93
|
+
if (!support.allowed || !support.direct || !standingToolScope(source.text, quote, Boolean(context.projectId))) return void 0;
|
|
94
|
+
return ownerMemoryScope(source.text, quote) === "global" ? "global_collaboration_rule" : "collaboration_rule";
|
|
95
|
+
}
|
|
73
96
|
function eligible(item, plan) {
|
|
74
97
|
return item.originClass === "agent" && item.source.extractor === "work-synthesis" && item.sourceConversationId === plan.context.conversationId && item.sourceAgentId === plan.context.agentId && item.recordClass === "memory" && canUseKnowledge(item, plan.context, plan.policy);
|
|
75
98
|
}
|
|
@@ -206,4 +229,4 @@ function applyWorkReviews(plan, operations, fresh, runId) {
|
|
|
206
229
|
});
|
|
207
230
|
}
|
|
208
231
|
//#endregion
|
|
209
|
-
export { WorkReviewSchema, applyWorkReviews, prepareWorkReview, workReviewPrompt, workReviewTrigger };
|
|
232
|
+
export { WorkReviewSchema, applyWorkReviews, prepareWorkReview, suggestWorkMemoryReview, workReviewPrompt, workReviewTrigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MusicProvider } from './provider.js';
|
|
2
|
+
export declare function musicArtifactExists(id: string): Promise<boolean>;
|
|
3
|
+
export declare function deleteMusicArtifact(id: string): Promise<void>;
|
|
4
|
+
export declare function saveMusicArtifact(id: string, provider: MusicProvider, source: string, canPublish: () => boolean): Promise<void>;
|
|
5
|
+
export declare function readMusicArtifact(id: string, rangeHeader?: string, download?: boolean): Promise<Response>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { resolveMediaBufferPath } from "../media/store.js";
|
|
2
|
+
import { assertSafeUrl } from "../media-shared/http/ssrf-guard.js";
|
|
3
|
+
import { parseByteRange } from "../media-shared/http/byte-range.js";
|
|
4
|
+
import { dirname } from "node:path";
|
|
5
|
+
import { createReadStream, createWriteStream } from "node:fs";
|
|
6
|
+
import { randomUUID } from "node:crypto";
|
|
7
|
+
import { link, mkdir, open, rm, stat } from "node:fs/promises";
|
|
8
|
+
import { pipeline } from "node:stream/promises";
|
|
9
|
+
import { Readable, Transform } from "node:stream";
|
|
10
|
+
//#region src/music-generation/artifact.ts
|
|
11
|
+
const MAX_AUDIO_BYTES = 24 * 1024 * 1024;
|
|
12
|
+
function artifactPath(id) {
|
|
13
|
+
return resolveMediaBufferPath(`music-${id}.mp3`, "outbound");
|
|
14
|
+
}
|
|
15
|
+
async function musicArtifactExists(id) {
|
|
16
|
+
const file = await stat(artifactPath(id)).catch(() => null);
|
|
17
|
+
return Boolean(file?.isFile() && file.size > 0 && file.size <= MAX_AUDIO_BYTES);
|
|
18
|
+
}
|
|
19
|
+
async function deleteMusicArtifact(id) {
|
|
20
|
+
await rm(artifactPath(id), { force: true });
|
|
21
|
+
}
|
|
22
|
+
async function saveMusicArtifact(id, provider, source, canPublish) {
|
|
23
|
+
const url = new URL(source);
|
|
24
|
+
if (url.protocol !== "https:" || url.username || url.password || url.port || !provider.allowsAudioHost(url.hostname)) throw new Error("Music provider returned an untrusted audio URL.");
|
|
25
|
+
await assertSafeUrl(url);
|
|
26
|
+
const path = artifactPath(id);
|
|
27
|
+
const temporary = `${path}.${randomUUID()}.part`;
|
|
28
|
+
await mkdir(dirname(path), {
|
|
29
|
+
recursive: true,
|
|
30
|
+
mode: 448
|
|
31
|
+
});
|
|
32
|
+
const response = await fetch(url, {
|
|
33
|
+
signal: AbortSignal.timeout(45e3),
|
|
34
|
+
redirect: "error"
|
|
35
|
+
});
|
|
36
|
+
if (!response.ok || !response.body || Number(response.headers.get("content-length")) > MAX_AUDIO_BYTES) {
|
|
37
|
+
await response.body?.cancel().catch(() => void 0);
|
|
38
|
+
throw new Error("Music download failed or exceeded the size limit.");
|
|
39
|
+
}
|
|
40
|
+
let size = 0;
|
|
41
|
+
const limit = new Transform({ transform(chunk, _encoding, callback) {
|
|
42
|
+
size += chunk.length;
|
|
43
|
+
if (size > MAX_AUDIO_BYTES) return callback(/* @__PURE__ */ new Error("Generated music exceeds the size limit."));
|
|
44
|
+
callback(null, chunk);
|
|
45
|
+
} });
|
|
46
|
+
try {
|
|
47
|
+
await pipeline(Readable.fromWeb(response.body), limit, createWriteStream(temporary, {
|
|
48
|
+
flags: "wx",
|
|
49
|
+
mode: 384
|
|
50
|
+
}));
|
|
51
|
+
const file = await open(temporary, "r");
|
|
52
|
+
try {
|
|
53
|
+
const header = Buffer.alloc(10);
|
|
54
|
+
const { bytesRead } = await file.read(header);
|
|
55
|
+
if (bytesRead !== header.length) throw new Error("Music provider returned incomplete MP3 audio.");
|
|
56
|
+
let frameOffset = 0;
|
|
57
|
+
if (header.subarray(0, 3).toString("ascii") === "ID3") {
|
|
58
|
+
const tagSize = header.subarray(6, 10);
|
|
59
|
+
if (tagSize.some((byte) => byte > 127)) throw new Error("Music provider returned an invalid ID3 tag.");
|
|
60
|
+
const footerSize = header[3] === 4 && (header[5] & 16) !== 0 ? 10 : 0;
|
|
61
|
+
frameOffset = tagSize.reduce((length, byte) => length << 7 | byte, 0) + 10 + footerSize;
|
|
62
|
+
}
|
|
63
|
+
const frame = Buffer.alloc(4);
|
|
64
|
+
if ((await file.read(frame, 0, frame.length, frameOffset)).bytesRead !== frame.length || size <= frameOffset + frame.length || frame[0] !== 255 || (frame[1] & 230) !== 226 || (frame[1] & 24) === 8 || (frame[2] & 240) === 240 || (frame[2] & 12) === 12) throw new Error("Music provider returned invalid MP3 audio.");
|
|
65
|
+
await file.sync();
|
|
66
|
+
} finally {
|
|
67
|
+
await file.close();
|
|
68
|
+
}
|
|
69
|
+
if (!canPublish()) return;
|
|
70
|
+
await link(temporary, path).catch((error) => {
|
|
71
|
+
if (error.code !== "EEXIST") throw error;
|
|
72
|
+
});
|
|
73
|
+
} finally {
|
|
74
|
+
await rm(temporary, { force: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async function readMusicArtifact(id, rangeHeader, download = false) {
|
|
78
|
+
const path = artifactPath(id);
|
|
79
|
+
const file = await stat(path).catch(() => null);
|
|
80
|
+
if (!file?.isFile() || !file.size || file.size > MAX_AUDIO_BYTES) return new Response(null, { status: 404 });
|
|
81
|
+
const headers = new Headers({
|
|
82
|
+
"Accept-Ranges": "bytes",
|
|
83
|
+
"Content-Type": "audio/mpeg",
|
|
84
|
+
"Cache-Control": "private, no-store",
|
|
85
|
+
"X-Content-Type-Options": "nosniff"
|
|
86
|
+
});
|
|
87
|
+
if (download) headers.set("Content-Disposition", "attachment; filename=\"music.mp3\"");
|
|
88
|
+
const range = parseByteRange(rangeHeader, file.size);
|
|
89
|
+
if (range === "invalid") {
|
|
90
|
+
headers.set("Content-Range", `bytes */${file.size}`);
|
|
91
|
+
return new Response(null, {
|
|
92
|
+
status: 416,
|
|
93
|
+
headers
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (range) headers.set("Content-Range", `bytes ${range.start}-${range.end}/${file.size}`);
|
|
97
|
+
headers.set("Content-Length", String(range ? range.end - range.start + 1 : file.size));
|
|
98
|
+
const stream = createReadStream(path, range ?? void 0);
|
|
99
|
+
return new Response(Readable.toWeb(stream), {
|
|
100
|
+
status: range ? 206 : 200,
|
|
101
|
+
headers
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { deleteMusicArtifact, musicArtifactExists, readMusicArtifact, saveMusicArtifact };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { MusicRequestRejected } from "./provider.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/music-generation/mureka.ts
|
|
4
|
+
const task = z.object({ id: z.string().min(1).max(200) });
|
|
5
|
+
const status = z.object({
|
|
6
|
+
status: z.string(),
|
|
7
|
+
choices: z.array(z.object({
|
|
8
|
+
url: z.string().optional(),
|
|
9
|
+
duration: z.unknown().optional()
|
|
10
|
+
})).optional()
|
|
11
|
+
});
|
|
12
|
+
async function request(apiOrigin, key, path, input) {
|
|
13
|
+
const response = await fetch(new URL(path, apiOrigin), {
|
|
14
|
+
method: input ? "POST" : "GET",
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${key}`,
|
|
17
|
+
...input ? { "Content-Type": "application/json" } : {}
|
|
18
|
+
},
|
|
19
|
+
body: input ? JSON.stringify(input) : void 0,
|
|
20
|
+
redirect: "error",
|
|
21
|
+
signal: AbortSignal.timeout(25e3)
|
|
22
|
+
});
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
await response.body?.cancel().catch(() => void 0);
|
|
25
|
+
const message = `Mureka returned HTTP ${response.status}.`;
|
|
26
|
+
if (input && [
|
|
27
|
+
400,
|
|
28
|
+
401,
|
|
29
|
+
402,
|
|
30
|
+
403,
|
|
31
|
+
404,
|
|
32
|
+
422,
|
|
33
|
+
429
|
|
34
|
+
].includes(response.status)) throw new MusicRequestRejected(message, response.status === 429 ? "provider_rate_limited" : "provider_rejected");
|
|
35
|
+
throw new Error(message);
|
|
36
|
+
}
|
|
37
|
+
return response.json();
|
|
38
|
+
}
|
|
39
|
+
function createMurekaProvider(id, apiOrigin) {
|
|
40
|
+
return {
|
|
41
|
+
id,
|
|
42
|
+
name: "Mureka",
|
|
43
|
+
models: { "mureka-9.5": {
|
|
44
|
+
modes: ["song", "instrumental"],
|
|
45
|
+
maxPromptCharacters: 1024,
|
|
46
|
+
maxLyricsCharacters: 5e3
|
|
47
|
+
} },
|
|
48
|
+
environmentKey: () => {
|
|
49
|
+
return (id === "mureka-cn" ? process.env.MUREKA_CN_API_KEY : process.env.MUREKA_GLOBAL_API_KEY)?.trim() || process.env.MUREKA_API_KEY?.trim() || void 0;
|
|
50
|
+
},
|
|
51
|
+
allowsAudioHost: (host) => host === "cdn.mureka.cn" || host === "cdn.mureka.ai" || (process.env.XOPC_MUREKA_AUDIO_HOSTS ?? "").split(",").some((value) => value.trim().toLowerCase() === host),
|
|
52
|
+
async submit(key, model, { mode, prompt, lyrics }) {
|
|
53
|
+
const result = await request(apiOrigin, key, `/v1/${mode === "song" ? "song" : "instrumental"}/generate`, {
|
|
54
|
+
model,
|
|
55
|
+
n: 1,
|
|
56
|
+
prompt,
|
|
57
|
+
...mode === "song" ? { lyrics } : {}
|
|
58
|
+
});
|
|
59
|
+
return task.parse(result).id;
|
|
60
|
+
},
|
|
61
|
+
async query(key, mode, taskId) {
|
|
62
|
+
const kind = mode === "song" ? "song" : "instrumental";
|
|
63
|
+
const result = status.parse(await request(apiOrigin, key, `/v1/${kind}/query/${encodeURIComponent(taskId)}`));
|
|
64
|
+
switch (result.status) {
|
|
65
|
+
case "preparing":
|
|
66
|
+
case "queued": return { state: "submitted" };
|
|
67
|
+
case "running":
|
|
68
|
+
case "streaming": return { state: "running" };
|
|
69
|
+
case "failed":
|
|
70
|
+
case "timeouted":
|
|
71
|
+
case "cancelled": return {
|
|
72
|
+
state: "failed",
|
|
73
|
+
reason: `Mureka task ended with status ${result.status}.`
|
|
74
|
+
};
|
|
75
|
+
case "succeeded": {
|
|
76
|
+
const choice = result.choices?.[0];
|
|
77
|
+
if (choice?.url) {
|
|
78
|
+
const duration = choice.duration;
|
|
79
|
+
const durationMs = typeof duration === "number" && Number.isSafeInteger(duration) && duration > 0 ? duration : null;
|
|
80
|
+
return {
|
|
81
|
+
state: "completed",
|
|
82
|
+
url: choice.url,
|
|
83
|
+
durationMs
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
throw new Error("Mureka returned an incomplete or unrecognized music task status.");
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const murekaProvider = createMurekaProvider("mureka-cn", "https://api.mureka.cn");
|
|
94
|
+
const murekaGlobalProvider = createMurekaProvider("mureka-global", "https://api.mureka.ai");
|
|
95
|
+
//#endregion
|
|
96
|
+
export { murekaGlobalProvider, murekaProvider };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { MusicJobErrorCode, MusicMode } from '@xopcai/gateway-contract';
|
|
2
|
+
export interface MusicInput {
|
|
3
|
+
mode: MusicMode;
|
|
4
|
+
prompt: string;
|
|
5
|
+
lyrics: string | null;
|
|
6
|
+
}
|
|
7
|
+
export type MusicProviderStatus = {
|
|
8
|
+
state: 'submitted' | 'running';
|
|
9
|
+
} | {
|
|
10
|
+
state: 'completed';
|
|
11
|
+
url: string;
|
|
12
|
+
durationMs: number | null;
|
|
13
|
+
} | {
|
|
14
|
+
state: 'failed';
|
|
15
|
+
reason: string;
|
|
16
|
+
};
|
|
17
|
+
export interface MusicProvider {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
models: Readonly<Record<string, {
|
|
21
|
+
name?: string;
|
|
22
|
+
modes: readonly MusicMode[];
|
|
23
|
+
maxPromptCharacters: number;
|
|
24
|
+
maxLyricsCharacters: number;
|
|
25
|
+
}>>;
|
|
26
|
+
environmentKey(): string | undefined;
|
|
27
|
+
submit(key: string, model: string, input: MusicInput): Promise<string>;
|
|
28
|
+
query(key: string, mode: MusicMode, taskId: string): Promise<MusicProviderStatus>;
|
|
29
|
+
allowsAudioHost(host: string): boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare class MusicRequestRejected extends Error {
|
|
32
|
+
readonly code: Extract<MusicJobErrorCode, 'provider_rate_limited' | 'provider_rejected'>;
|
|
33
|
+
constructor(message: string, code: Extract<MusicJobErrorCode, 'provider_rate_limited' | 'provider_rejected'>);
|
|
34
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type MusicModelSettings } from '@xopcai/gateway-contract';
|
|
2
|
+
import type { MusicProvider } from './provider.js';
|
|
3
|
+
export declare const DEFAULT_MUSIC_MODEL = "mureka-cn/mureka-9.5";
|
|
4
|
+
export declare function resolveMusicModel(ref: string): {
|
|
5
|
+
provider: MusicProvider;
|
|
6
|
+
model: string;
|
|
7
|
+
capabilities: {
|
|
8
|
+
name?: string;
|
|
9
|
+
modes: readonly import("@xopcai/gateway-contract").MusicMode[];
|
|
10
|
+
maxPromptCharacters: number;
|
|
11
|
+
maxLyricsCharacters: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function hasMusicProvider(id: string): boolean;
|
|
15
|
+
export declare function resolveMusicKey(provider: MusicProvider): Promise<string | undefined>;
|
|
16
|
+
export declare function configuredMusicModel(): Promise<{
|
|
17
|
+
ref: string;
|
|
18
|
+
defaults: import("@xopcai/gateway-contract").MusicGenerationDefaults;
|
|
19
|
+
provider: MusicProvider;
|
|
20
|
+
model: string;
|
|
21
|
+
capabilities: {
|
|
22
|
+
name?: string;
|
|
23
|
+
modes: readonly import("@xopcai/gateway-contract").MusicMode[];
|
|
24
|
+
maxPromptCharacters: number;
|
|
25
|
+
maxLyricsCharacters: number;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export declare function readMusicModelSettings(): Promise<MusicModelSettings>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import "../../packages/gateway-contract/src/music-generation.js";
|
|
2
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { murekaGlobalProvider, murekaProvider } from "./mureka.js";
|
|
4
|
+
import { getMusicDefaults, musicCredentials, storedMusicModel } from "./settings.js";
|
|
5
|
+
import { parseTencentMpsCredentials, tencentMpsProvider } from "./tencent-mps.js";
|
|
6
|
+
//#region src/music-generation/providers.ts
|
|
7
|
+
init_src();
|
|
8
|
+
const providers = new Map([
|
|
9
|
+
murekaProvider,
|
|
10
|
+
murekaGlobalProvider,
|
|
11
|
+
tencentMpsProvider
|
|
12
|
+
].map((provider) => [provider.id, provider]));
|
|
13
|
+
const DEFAULT_MUSIC_MODEL = "mureka-cn/mureka-9.5";
|
|
14
|
+
function resolveMusicModel(ref) {
|
|
15
|
+
const [providerId, model, extra] = ref.split("/");
|
|
16
|
+
const provider = providers.get(providerId);
|
|
17
|
+
if (!model || extra !== void 0 || !provider || !Object.hasOwn(provider.models, model)) return void 0;
|
|
18
|
+
return {
|
|
19
|
+
provider,
|
|
20
|
+
model,
|
|
21
|
+
capabilities: provider.models[model]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function selectedMusicModel() {
|
|
25
|
+
const ref = storedMusicModel() ?? process.env.XOPC_MUSIC_MODEL?.trim();
|
|
26
|
+
return ref && resolveMusicModel(ref) ? ref : DEFAULT_MUSIC_MODEL;
|
|
27
|
+
}
|
|
28
|
+
function hasMusicProvider(id) {
|
|
29
|
+
return providers.has(id);
|
|
30
|
+
}
|
|
31
|
+
async function resolveMusicKey(provider) {
|
|
32
|
+
return await readSavedMusicKey(provider.id) ?? provider.environmentKey();
|
|
33
|
+
}
|
|
34
|
+
async function readSavedMusicKey(providerId) {
|
|
35
|
+
const saved = await musicCredentials().revealGatewayStoredApiKey(providerId);
|
|
36
|
+
return providerId === "tencent-mps" && !parseTencentMpsCredentials(saved) ? null : saved;
|
|
37
|
+
}
|
|
38
|
+
async function configuredMusicModel() {
|
|
39
|
+
const ref = selectedMusicModel();
|
|
40
|
+
const route = resolveMusicModel(ref);
|
|
41
|
+
if (!route || !await resolveMusicKey(route.provider)) return void 0;
|
|
42
|
+
return {
|
|
43
|
+
...route,
|
|
44
|
+
ref,
|
|
45
|
+
defaults: getMusicDefaults(ref, route.capabilities.modes)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function readMusicModelSettings() {
|
|
49
|
+
const models = [...providers.values()].flatMap((provider) => Object.entries(provider.models).map(([name, definition]) => ({
|
|
50
|
+
ref: `${provider.id}/${name}`,
|
|
51
|
+
name: definition.name ?? name,
|
|
52
|
+
providerId: provider.id,
|
|
53
|
+
modes: definition.modes
|
|
54
|
+
})));
|
|
55
|
+
const credentials = Object.fromEntries(await Promise.all([...providers.values()].map(async (provider) => {
|
|
56
|
+
const saved = await readSavedMusicKey(provider.id);
|
|
57
|
+
return [provider.id, saved ? "saved" : provider.environmentKey() ? "environment" : "missing"];
|
|
58
|
+
})));
|
|
59
|
+
const modelRef = selectedMusicModel();
|
|
60
|
+
return {
|
|
61
|
+
modelRef,
|
|
62
|
+
models,
|
|
63
|
+
credentials,
|
|
64
|
+
defaults: getMusicDefaults(modelRef, models.find((model) => model.ref === modelRef)?.modes ?? [])
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { DEFAULT_MUSIC_MODEL, configuredMusicModel, hasMusicProvider, readMusicModelSettings, resolveMusicKey, resolveMusicModel };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MusicGenerationJob, MusicJobErrorCode, MusicJobState, MusicMode } from '@xopcai/gateway-contract';
|
|
2
|
+
export interface MusicJobRow {
|
|
3
|
+
id: string;
|
|
4
|
+
conversation_id: string;
|
|
5
|
+
transcript_id: string;
|
|
6
|
+
work_id: string;
|
|
7
|
+
parent_id: string | null;
|
|
8
|
+
version_number: number;
|
|
9
|
+
model_ref: string;
|
|
10
|
+
request_hash: string;
|
|
11
|
+
title: string;
|
|
12
|
+
mode: MusicMode;
|
|
13
|
+
prompt: string;
|
|
14
|
+
lyrics: string | null;
|
|
15
|
+
state: MusicJobState;
|
|
16
|
+
provider_task_id: string | null;
|
|
17
|
+
duration_ms: number | null;
|
|
18
|
+
error: string | null;
|
|
19
|
+
error_code: MusicJobErrorCode | null;
|
|
20
|
+
created_at: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function publicMusicJob(row: MusicJobRow): MusicGenerationJob;
|
|
23
|
+
export declare function listMusicJobs(conversationId: string, transcriptId: string): MusicGenerationJob[];
|
|
24
|
+
export declare function listMusicJobIds(conversationId: string): string[];
|
|
25
|
+
export declare function getMusicJob(conversationId: string, id: string): MusicJobRow | undefined;
|
|
26
|
+
type MusicRequest = {
|
|
27
|
+
parentId?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
mode?: MusicMode;
|
|
30
|
+
prompt?: string;
|
|
31
|
+
lyrics?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function enqueueMusicJob(conversationId: string, transcriptId: string, toolCallId: string, request: MusicRequest, signal?: AbortSignal): Promise<{
|
|
34
|
+
error: string;
|
|
35
|
+
job?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
job: MusicGenerationJob;
|
|
38
|
+
error?: undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function claimMusicJob(): {
|
|
41
|
+
row: MusicJobRow;
|
|
42
|
+
token: `${string}-${string}-${string}-${string}-${string}`;
|
|
43
|
+
};
|
|
44
|
+
export declare function updateMusicJob(id: string, token: string, state: MusicJobState, options?: {
|
|
45
|
+
taskId?: string;
|
|
46
|
+
durationMs?: number | null;
|
|
47
|
+
error?: string;
|
|
48
|
+
errorCode?: MusicJobErrorCode;
|
|
49
|
+
delayMs?: number;
|
|
50
|
+
keepLease?: boolean;
|
|
51
|
+
}): boolean;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { configuredMusicModel } from "./providers.js";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
+
//#region src/music-generation/repository.ts
|
|
5
|
+
init_transaction();
|
|
6
|
+
function publicMusicJob(row) {
|
|
7
|
+
return {
|
|
8
|
+
id: row.id,
|
|
9
|
+
workId: row.work_id,
|
|
10
|
+
parentId: row.parent_id,
|
|
11
|
+
versionNumber: row.version_number,
|
|
12
|
+
modelRef: row.model_ref,
|
|
13
|
+
title: row.title,
|
|
14
|
+
mode: row.mode,
|
|
15
|
+
prompt: row.prompt,
|
|
16
|
+
lyrics: row.lyrics,
|
|
17
|
+
state: row.state,
|
|
18
|
+
durationMs: row.duration_ms,
|
|
19
|
+
error: row.error,
|
|
20
|
+
errorCode: row.error_code,
|
|
21
|
+
createdAt: row.created_at
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function listMusicJobs(conversationId, transcriptId) {
|
|
25
|
+
return getSqliteDatabase().prepare(`SELECT * FROM music_generation_jobs WHERE conversation_id = ?
|
|
26
|
+
AND transcript_id = ? ORDER BY created_at DESC, rowid DESC LIMIT 100`).all(conversationId, transcriptId).map(publicMusicJob);
|
|
27
|
+
}
|
|
28
|
+
function listMusicJobIds(conversationId) {
|
|
29
|
+
return getSqliteDatabase().prepare("SELECT id FROM music_generation_jobs WHERE conversation_id = ?").all(conversationId).map((row) => String(row.id));
|
|
30
|
+
}
|
|
31
|
+
function getMusicJob(conversationId, id) {
|
|
32
|
+
return getSqliteDatabase().prepare("SELECT * FROM music_generation_jobs WHERE conversation_id = ? AND id = ?").get(conversationId, id);
|
|
33
|
+
}
|
|
34
|
+
async function enqueueMusicJob(conversationId, transcriptId, toolCallId, request, signal) {
|
|
35
|
+
const id = createHash("sha256").update(JSON.stringify([
|
|
36
|
+
conversationId,
|
|
37
|
+
transcriptId,
|
|
38
|
+
toolCallId
|
|
39
|
+
])).digest("hex");
|
|
40
|
+
const hash = createHash("sha256").update(JSON.stringify([
|
|
41
|
+
request.parentId,
|
|
42
|
+
request.title,
|
|
43
|
+
request.mode,
|
|
44
|
+
request.prompt,
|
|
45
|
+
request.lyrics
|
|
46
|
+
])).digest("hex");
|
|
47
|
+
const route = await configuredMusicModel();
|
|
48
|
+
signal?.throwIfAborted();
|
|
49
|
+
return runSqliteWriteTransaction((db) => {
|
|
50
|
+
if (db.prepare("SELECT active_transcript_id FROM sessions WHERE conversation_id = ?").get(conversationId)?.active_transcript_id !== transcriptId) return { error: "The chat was reset. Ask the user to send the request again." };
|
|
51
|
+
const previous = getMusicJob(conversationId, id);
|
|
52
|
+
if (previous) return previous.request_hash === hash ? { job: publicMusicJob(previous) } : { error: "This request has already been submitted with different input." };
|
|
53
|
+
const parent = request.parentId ? getMusicJob(conversationId, request.parentId) : void 0;
|
|
54
|
+
if (request.parentId && (parent?.transcript_id !== transcriptId || parent.state !== "completed")) return { error: "Select a completed version from the current chat." };
|
|
55
|
+
if (!route) return { error: "Music generation is unavailable. Configure the Gateway music model and its API key." };
|
|
56
|
+
const mode = request.mode ?? (request.lyrics ? "song" : parent?.mode ?? route.defaults.mode);
|
|
57
|
+
const title = (request.title ?? parent?.title)?.trim();
|
|
58
|
+
const prompt = (request.prompt ?? parent?.prompt)?.trim();
|
|
59
|
+
const lyrics = mode === "song" ? request.lyrics ?? parent?.lyrics ?? null : null;
|
|
60
|
+
if (mode === "song" && !lyrics?.trim()) return { error: "Song generation requires lyrics. Provide complete lyrics, or use instrumental mode." };
|
|
61
|
+
if (!route.capabilities.modes.includes(mode) || !title || !prompt || title.length > 100 || Array.from(prompt).length > route.capabilities.maxPromptCharacters || lyrics !== null && Array.from(lyrics).length > route.capabilities.maxLyricsCharacters || mode === "instrumental" && request.lyrics !== void 0) return { error: "Invalid music input. Check the selected mode, description and lyrics limits before submitting." };
|
|
62
|
+
const now = Date.now();
|
|
63
|
+
const active = db.prepare(`SELECT count(*) AS count FROM music_generation_jobs
|
|
64
|
+
WHERE state IN ('queued', 'submitting', 'submitted', 'running', 'saving')`).get();
|
|
65
|
+
if (Number(active?.count) >= 3) return { error: "The music queue is full. Wait for an active request to finish." };
|
|
66
|
+
const day = Math.floor(now / 864e5);
|
|
67
|
+
const configuredLimit = process.env.XOPC_MUSIC_DAILY_LIMIT?.trim();
|
|
68
|
+
const limit = configuredLimit ? Number(configuredLimit) : 20;
|
|
69
|
+
if (!Number.isSafeInteger(limit) || limit < 0) return { error: "Invalid Gateway music daily limit." };
|
|
70
|
+
if (Number(db.prepare("SELECT count AS used FROM music_generation_daily_usage WHERE day = ?").get(day)?.used ?? 0) >= limit) return { error: "The Gateway has reached its daily music generation limit." };
|
|
71
|
+
db.prepare(`INSERT INTO music_generation_daily_usage (day, count) VALUES (?, 1)
|
|
72
|
+
ON CONFLICT(day) DO UPDATE SET count = count + 1`).run(day);
|
|
73
|
+
const workId = parent?.work_id ?? id;
|
|
74
|
+
const version = Number(db.prepare("SELECT MAX(version_number) AS version FROM music_generation_jobs WHERE work_id = ?").get(workId)?.version ?? 0) + 1;
|
|
75
|
+
db.prepare(`INSERT INTO music_generation_jobs (id, conversation_id, transcript_id, work_id, parent_id, version_number, model_ref,
|
|
76
|
+
request_hash, title, mode, prompt, lyrics, state, next_attempt_at, created_at)
|
|
77
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'queued', ?, ?)`).run(id, conversationId, transcriptId, workId, parent?.id ?? null, version, route.ref, hash, title, mode, prompt, lyrics, now, now);
|
|
78
|
+
return { job: publicMusicJob(getMusicJob(conversationId, id)) };
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function claimMusicJob() {
|
|
82
|
+
return runSqliteWriteTransaction((db) => {
|
|
83
|
+
const now = Date.now();
|
|
84
|
+
db.prepare(`UPDATE music_generation_jobs SET state = 'submission_unknown', error = NULL, error_code = NULL,
|
|
85
|
+
lease_token = NULL, lease_until = NULL
|
|
86
|
+
WHERE state = 'submitting' AND lease_until <= ?`).run(now);
|
|
87
|
+
const row = db.prepare(`SELECT * FROM music_generation_jobs WHERE state IN ('queued', 'submitted', 'running', 'saving')
|
|
88
|
+
AND next_attempt_at <= ? AND (lease_until IS NULL OR lease_until <= ?) ORDER BY next_attempt_at, rowid LIMIT 1`).get(now, now);
|
|
89
|
+
if (!row) return void 0;
|
|
90
|
+
const token = randomUUID();
|
|
91
|
+
db.prepare("UPDATE music_generation_jobs SET lease_token = ?, lease_until = ? WHERE id = ?").run(token, now + 12e4, row.id);
|
|
92
|
+
return {
|
|
93
|
+
row,
|
|
94
|
+
token
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function updateMusicJob(id, token, state, options = {}) {
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
return getSqliteDatabase().prepare(`UPDATE music_generation_jobs SET state = ?, error = ?, error_code = ?,
|
|
101
|
+
provider_task_id = COALESCE(?, provider_task_id), duration_ms = COALESCE(?, duration_ms), next_attempt_at = ?,
|
|
102
|
+
lease_token = CASE WHEN ? THEN lease_token END, lease_until = CASE WHEN ? THEN lease_until END
|
|
103
|
+
WHERE id = ? AND lease_token = ? AND lease_until > ?`).run(state, options.error ?? null, options.errorCode ?? null, options.taskId ?? null, options.durationMs ?? null, now + (options.delayMs ?? 0), Number(options.keepLease ?? false), Number(options.keepLease ?? false), id, token, now).changes === 1;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { claimMusicJob, enqueueMusicJob, getMusicJob, listMusicJobIds, listMusicJobs, publicMusicJob, updateMusicJob };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MusicGenerationDefaults, MusicMode } from '@xopcai/gateway-contract';
|
|
2
|
+
import { CredentialResolver } from '../auth/credentials.js';
|
|
3
|
+
export declare function storedMusicModel(): string | undefined;
|
|
4
|
+
export declare function saveMusicModel(modelRef: string): void;
|
|
5
|
+
export declare function getMusicDefaults(modelRef: string, modes: readonly MusicMode[]): MusicGenerationDefaults;
|
|
6
|
+
export declare function saveMusicDefaults(modelRef: string, settings: MusicGenerationDefaults): void;
|
|
7
|
+
export declare function musicCredentials(): CredentialResolver;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
2
|
+
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
3
|
+
//#region src/music-generation/settings.ts
|
|
4
|
+
init_credentials();
|
|
5
|
+
const settings = new DurableState("music-generation");
|
|
6
|
+
const defaults = new DurableState("music-generation-defaults");
|
|
7
|
+
function storedMusicModel() {
|
|
8
|
+
return settings.get("model");
|
|
9
|
+
}
|
|
10
|
+
function saveMusicModel(modelRef) {
|
|
11
|
+
settings.set("model", modelRef);
|
|
12
|
+
}
|
|
13
|
+
function getMusicDefaults(modelRef, modes) {
|
|
14
|
+
const saved = defaults.get(modelRef);
|
|
15
|
+
return { mode: saved && modes.includes(saved.mode) ? saved.mode : modes[0] ?? "song" };
|
|
16
|
+
}
|
|
17
|
+
function saveMusicDefaults(modelRef, settings) {
|
|
18
|
+
defaults.set(modelRef, settings);
|
|
19
|
+
}
|
|
20
|
+
function musicCredentials() {
|
|
21
|
+
return new CredentialResolver();
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { getMusicDefaults, musicCredentials, saveMusicDefaults, saveMusicModel, storedMusicModel };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type MusicProvider } from './provider.js';
|
|
3
|
+
export declare const tencentMpsCredentialsSchema: z.ZodObject<{
|
|
4
|
+
secretId: z.ZodString;
|
|
5
|
+
secretKey: z.ZodString;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
export declare function parseTencentMpsCredentials(stored: string | null): {
|
|
8
|
+
secretId: string;
|
|
9
|
+
secretKey: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const tencentMpsProvider: MusicProvider;
|