@xopcai/xopc 0.0.450 → 0.0.454
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-Tn5McYcg.js → activity-store-BKH-qNPt.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BX5HhrTI.js → agent-avatar-dicebear-DY6IWy0_.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-C7Dx9nt1.js → agent-avatar-display-tnAtQOAZ.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-AAJsxEjB.js → agent-defaults-settings-panel-BLQ2N_dY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BhtzU8qr.js → agent-plugin-dialog-Bfsm4GOs.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CbGYb9WI.js → agents-CDNiLv0W.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CShyoj9I.js → agents-admin-api-DGZsm8U4.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BET9vZ1l.js → api-Bbj5k-7e.js} +1 -1
- package/dist/gateway/static/root/assets/api-BhipC15e.js +1 -0
- package/dist/gateway/static/root/assets/{app-link-CdD448kS.js → app-link-CCZ-LmVT.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BxOShFPO.js → app-management-settings-panel-fwhXHKxt.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-L450QlMW.js → appearance-settings-BHkl-vFO.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-Bz6_fyMs.js → apps-page-DtCWwdsK.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BCXEOal7.js → archive-plugin-B9xaxa7V.js} +1 -1
- package/dist/gateway/static/root/assets/arrow-up-right-T72JbQ1Q.js +1 -0
- package/dist/gateway/static/root/assets/{automation-api-B3Jnoa2G.js → automation-api-BHMjSwcy.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-BHAKc5QI.js → automation-result-state-BgAjEoNV.js} +1 -1
- package/dist/gateway/static/root/assets/automation-run-list-D3Eon5C0.js +1 -0
- package/dist/gateway/static/root/assets/{automation-task-card-Clf0fe_n.js → automation-task-card-DJRg72t-.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BEG5xLew.js → automations-page-DdAzXb7s.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-Cfq1C6XB.js → automations-workspace-D0nNat6N.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-B7tuUWzS.js → binary-plugins-CgsjdprR.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-D-YHASZr.js → block-editor-r6vj6dZO.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-DdMMia7Y.js → browser-settings-page-APCGT8Yr.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-YfkMBZCb.js → capabilities-0gYkjdax.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Cxh3nYa6.js → capabilities-BgBwcqvY.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-B1x3TwdV.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CZ78ckHR.js +8 -0
- package/dist/gateway/static/root/assets/capability-navigation-QtHJxxW2.js +1 -0
- package/dist/gateway/static/root/assets/{channels-DdSEH-R2.js → channels-8Y08v4Q2.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-CgasFAm4.js → chat-agents-api-BRQDNNI5.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-Cgks7rH3.js → chat-chart-block-qMGhfeQZ.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-CSTyfO9c.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-aCu4X5Jo.js → chat-terminal-dock-0PJ9dURQ.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-Bku_h283.js → command-palette-api-C4U_-rDo.js} +1 -1
- package/dist/gateway/static/root/assets/composer-model-config-control-B9Q40ptH.js +1 -0
- package/dist/gateway/static/root/assets/composer-notifications-ByuA8h5Z.js +1 -0
- package/dist/gateway/static/root/assets/composer-payload-handoff-zr1JDn3p.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-zvWUPPAr.js → computer-settings-page-D2F1quZR.js} +1 -1
- package/dist/gateway/static/root/assets/{confirm-dialog-D7dQJytv.js → confirm-dialog-DrA5mTQp.js} +1 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-CgULhOBZ.js +1 -0
- package/dist/gateway/static/root/assets/{connection-usage-guide-DL2T6cSN.js → connection-usage-guide-DkDsHm_l.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-a0gQC-nc.js → connector-service-page-1AcvESmp.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DNVUmf9M.js → connectors-api-C1OML7OO.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CMIY0Zj_.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-E0cqnNlR.js → date-picker-D1eFhoMI.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-CrC_VKpw.js → date-time-picker-CqplKVk6.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D1MkNl5F.js → desktop-pet-UmrjWSq-.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BA6u5Md-.js → desktop-pet-settings-DRRDJMu6.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-DnqJb6NS.js → dev-view-store-CtKJMK52.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-Ba3d606o.js → device-pairing-wizard-C4aSCbqo.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-lcps-hsZ.js → directory-picker-path-field-D9U9yfnb.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-BmvCn1Xn.js → discussion-annotation-sync-D-eGt1_L.js} +1 -1
- package/dist/gateway/static/root/assets/dist-CY7CS_D3.js +1 -0
- package/dist/gateway/static/root/assets/extension-authoritative-grants-8ONVOjPW.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BOJbNj9D.js → extension-debug-page-BTLcC8-r.js} +1 -1
- package/dist/gateway/static/root/assets/extension-iframe-host-D0-OvFV2.js +1 -0
- package/dist/gateway/static/root/assets/{extension-marketplace-api-BrLsjJLA.js → extension-marketplace-api-DLRCNlej.js} +1 -1
- package/dist/gateway/static/root/assets/extension-message-router-DboLTCVp.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-CdpI-Plq.js +1 -0
- package/dist/gateway/static/root/assets/extension-provider-DUDaMvQg.js +1 -0
- package/dist/gateway/static/root/assets/{extension-settings-page-BuV-Vuvb.js → extension-settings-page-biWCnMGr.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-B3nLuoQO.js → file-preview-surface-CnBRiQo8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CtZy1Qw0.js → gateway-config-swr-BV5fpBSK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-CG65gHUY.js → gateway-realtime-CIqLQXlm.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-B6T1Xzag.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-Cr5xtfZU.js → gateway-restart-DBkfCzT5.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BwMwdwXh.js → gateway-settings-DTzXUm9f.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DztAHGru.js → gateway-startup-retry-B49N_Ngm.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-yHc-ZfjU.js → global-defaults-api-DVpxe45P.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-DvaxBrjG.js +3 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D5eo_stq.js → image-generation-api-CAKYslID.js} +1 -1
- package/dist/gateway/static/root/assets/imports-page-C2KmQJ2H.js +1 -0
- package/dist/gateway/static/root/assets/index-B49yIcMR.css +1 -0
- package/dist/gateway/static/root/assets/index-BpzvsoS1.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-B-v1FT3P.js → install-connector-dialog-CmNvZt8M.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BLBASsCP.js → keyboard-shortcuts-settings-syG2KRr2.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DGA4EHGm.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-CB-MZAaL.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Db93n4Zy.js → local-apps-page-I0O2ybpp.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-C6oPrCYY.js → local-session-drafts-DsPDloiq.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CQcW9_qA.js → locale-store-D3c8DIm-.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-u9FTZaTh.js +2 -0
- package/dist/gateway/static/root/assets/{management-api-Dh2r5GrQ.js → management-api-uxRxRX-6.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-Fj25fafb.js → management-settings-BCbDfM7f.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CkihBz06.js → markdown-view-ohhExTMC.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-jh3dwNfg.js → mcp-conversation-setup-page-382BGqQC.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BUapXtQZ.js → media-plugins-B5wtLz3Z.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DPLud9GK.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-DYxgKUju.js → model-selector-CoKcq0AZ.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-D2cdb8nZ.js → models-hub-cache-CtooMAQW.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-BMtKrv-J.js → note-detail-panel-DiGQtSD0.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-Ds4M9fJJ.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-BhRyWe3S.js → notes-api-Cvet94d8.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DcmRJJbt.js → notes-page-DwlmKweX.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-D5iBtOid.js → oauth-api-BHp5dVNh.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-CmHsHynu.js → oauth-provider-connect-cvxtmf3C.js} +1 -1
- package/dist/gateway/static/root/assets/{open-capability-settings-Cvb65hQB.js → open-capability-settings-DQsmJxI7.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CTHQWfG6.js → page-context-capture-button-BwsK2uDe.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-aApa5ApP.js → page-context-draft-ieK9IN3R.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-Xe8CP_4a.js +1 -0
- package/dist/gateway/static/root/assets/personal-avatar-BZSC0BLP.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-CbiD8Wn7.js +1 -0
- package/dist/gateway/static/root/assets/personal-profile-settings-KvdNnaNv.js +1 -0
- package/dist/gateway/static/root/assets/personal-settings-panel-_cxSzWsN.js +1 -0
- package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +1 -0
- package/dist/gateway/static/root/assets/{phone-dependencies-card-BBk6k0t0.js → phone-dependencies-card-C2OWtG2B.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-QJt8SAb7.js → phone-model-connection-CqmafRhr.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CRxUxJNZ.js → phone-model-picker-BwYQtl_5.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-Df64khPY.js → phone-settings-page-CPteZZWu.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-DAuPd2ie.js → phone-workspace-store-ReUEjG9m.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-Bcer4RC3.js → plugin-details-dialog-BlNVtbEU.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-DdV7q9Bd.js → preference-select-fields-BbA-g7Zq.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-uKndNxpU.js → product-automation-feedback-DcPY76PG.js} +1 -1
- package/dist/gateway/static/root/assets/{product-delivery-DRyD9_Xq.js → product-delivery-2Ks17_OH.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-A7lyoXVv.js → product-open-page-BBJ7glAm.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-BrdvkWOg.js → product-preview-content-UTOSc_ii.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-BxHKejcX.js → product-preview-modal-Q1RZqeMo.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-BlrtsEZK.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-BVhSoQHu.js → project-understanding-B35f5MkG.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-DSPoyFda.js → projects-page-CBH-sHOU.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-B47s6_9Q.js → providers-api-BSmKlQ8K.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-B-IHTsVC.js → recording-upload-P1WcsdEY.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bo8YiUE0.js → registry-api-DnVlwJ6M.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BRf9znLV.js → remote-access-hub-CVEj3p0J.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-CAljzZx8.js → resource-unavailable-B_S1dFze.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-DGmrxJSb.js +2 -0
- package/dist/gateway/static/root/assets/runtime-health-zDkHcOZO.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-C28pB9__.js → runtime-tools-api-970sp5zI.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-XYeadnhL.js → runtime-tools-settings-panel-au6vZ0sL.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CtRM41Re.js → schema-form-C9TYGa0_.js} +1 -1
- package/dist/gateway/static/root/assets/secret-input-DsjfQmDn.js +1 -0
- package/dist/gateway/static/root/assets/{service-recommendation-list-C6ydoBSU.js → service-recommendation-list-XeRFtJ-Z.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-D7FWdG43.js → session-api-CuT7EPI0.js} +1 -1
- package/dist/gateway/static/root/assets/session-channel-icon-BzkFo-Ci.js +1 -0
- package/dist/gateway/static/root/assets/{session-identity-label-BP7OIYth.js → session-identity-label-D5SAi0Uh.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-CyZHiuWY.js +25 -0
- package/dist/gateway/static/root/assets/{sessions-page-CyYkCsfy.js → sessions-page-BIxDwAIX.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cy7xeKmH.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-3HwfHbqz.js → settings-advanced-section-nbkGHQ_4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-BVvIXZlg.js → settings-mode-store-EQHfksdV.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C6ypo-jn.js → settings-page-D6RNHRHq.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-CheboxIM.js → settings-page-header-19GJ_a45.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CPFMZaLF.js → settings-page-layout-B2WCzSel.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-BbCzYq9S.js → setup-interaction-page-C5i7y_pM.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DUNgVqtz.js → setup-status-panel-Cwp8YKdT.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-0P9ghttc.js → share-link-dialog-DDsVTMZ-.js} +1 -1
- package/dist/gateway/static/root/assets/share-preview-page-C1S_gWGf.js +2 -0
- package/dist/gateway/static/root/assets/{shares-api-iiw4F-ra.js → shares-api-CepTFl1f.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BQ1qXAJn.js → shares-settings-Cv-tdcAN.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-CLtIjE8K.js → skill-api-CsT-iHnl.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-DY0rRlUk.js → skill-list-api-CMJTjvSo.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DJC8uWLu.js → skill-reload-api-S6B7P9ur.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-CQYf7s9f.js → skills-page-BKcsJtYx.js} +1 -1
- package/dist/gateway/static/root/assets/sliding-segmented-CgQ3BFdb.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DdBmyc93.js → system-settings-panel-DhHPM5qU.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-Bb1R4QsJ.js → task-detail-page-BHH2_Z9_.js} +3 -3
- package/dist/gateway/static/root/assets/{task-input-card-Xl4xFjCn.js → task-input-card-D_2rNF31.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-B1EVdx4L.js → terminal-panel-store-CcUWpqvC.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BTkYFJOE.js → theme-store-D9pquJiM.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-h-gbBAtl.js → tracing-settings-page-CjNrKILr.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-BDoegsWD.js → tunnel-api-GtLO40pc.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-DyFJDqHy.js → understanding-activity-store-BhB5wAbq.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-C0SRcgyd.js → understanding-refresh-store-BxtpXRfV.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-CbJsT3zT.js → usage-page-CZa_a6_7.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CB2B4NMO.js → use-autosave-BtOp6W9H.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-BTQZx8Nj.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-B7nscYS4.js +15 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-r0OuOlBJ.js → use-personal-profile-Cj7WGOfv.js} +1 -1
- package/dist/gateway/static/root/assets/use-realtime-voice-BS1rygyV.js +1 -0
- package/dist/gateway/static/root/assets/{use-workspace-tree-B9Bmg8LV.js → use-workspace-tree-DYosm4Gz.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-BudrJ73l.js → user-model-page-DmmJODQ4.js} +1 -1
- package/dist/gateway/static/root/assets/voice-CDlC6XMH.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C8wd8ijq.js → voice-api-key-field-8voN8dQG.js} +1 -1
- package/dist/gateway/static/root/assets/voice-call-context-BM2A4bLz.js +1 -0
- package/dist/gateway/static/root/assets/voice-config-api-CrZd2aqw.js +1 -0
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-TAmJNcsN.js → voice-input-shortcut-events-DcFp_fy4.js} +1 -1
- package/dist/gateway/static/root/assets/voice-settings-AckvhNnP.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DsyYo1p0.js → work-discovery-overlay-DAIk5csp.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BJ9VN5Zd.js → work-discovery-page-CJeixeWQ.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-CFj-ZOJE.js → working-directory-picker-modal-BW76VaD5.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-Cu2gzmVn.js +2 -0
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-pVOYuH7u.js +1 -0
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DyqI793w.js +1 -0
- package/dist/gateway/static/root/assets/workspace-open-location-menu-DTYkApy8.js +1 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-DN4DdOWZ.js → xopc-cloud-account-card-Rytp_NWV.js} +1 -1
- package/dist/gateway/static/root/index.html +106 -99
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -4
- package/dist/packages/gateway-contract/src/index.js +3 -1
- package/dist/packages/gateway-contract/src/local-app-delegation.js +22 -0
- package/dist/packages/gateway-contract/src/local-apps.js +35 -4
- package/dist/packages/realtime-protocol/src/voice.js +37 -3
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +11 -2
- package/dist/src/agent/background-review/prompts.js +2 -0
- package/dist/src/agent/background-review/run-background-review.js +13 -7
- package/dist/src/agent/context/execution-context.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +66 -9
- package/dist/src/agent/embedded/run-turn.js +35 -1
- package/dist/src/agent/embedded/runs.d.ts +1 -0
- package/dist/src/agent/embedded/runs.js +13 -0
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
- package/dist/src/agent/prompt/system-prompt.js +7 -6
- package/dist/src/agent/prompt/types.d.ts +2 -1
- package/dist/src/agent/prompt/voice-history.d.ts +9 -0
- package/dist/src/agent/prompt/voice-history.js +35 -0
- package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
- package/dist/src/agent/prompt/voice-presentation.js +1 -0
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +5 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +3 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/task-evidence.js +6 -15
- package/dist/src/agent/tools/task-result-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +6 -5
- package/dist/src/agent-config/schema.d.ts +45 -0
- package/dist/src/agent-config/schema.js +3 -1
- package/dist/src/capabilities/runtime/dispatcher.d.ts +11 -0
- package/dist/src/capabilities/runtime/dispatcher.js +22 -6
- package/dist/src/capabilities/runtime/product.js +2 -0
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/computer/evaluation-comparison.d.ts +4 -0
- package/dist/src/computer/evaluation-comparison.js +16 -1
- package/dist/src/computer/keyboard.js +1 -1
- package/dist/src/computer/model-adapter.js +18 -14
- package/dist/src/config/schema.d.ts +52 -2
- package/dist/src/config/schema.js +29 -5
- package/dist/src/gateway/hono/lib/safe-voice-config.d.ts +1 -0
- package/dist/src/gateway/hono/lib/safe-voice-config.js +10 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +107 -12
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +16 -5
- package/dist/src/gateway/hono/routes/local-app-development.d.ts +3 -0
- package/dist/src/gateway/hono/routes/local-app-development.js +13 -0
- package/dist/src/gateway/hono/routes/local-app-previews.d.ts +3 -0
- package/dist/src/gateway/hono/routes/local-app-previews.js +86 -0
- package/dist/src/gateway/hono/routes/local-apps.js +3 -2
- package/dist/src/gateway/hono/routes/models.js +4 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +9 -1
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +2 -2
- package/dist/src/gateway/hono/routes/voice.js +108 -14
- package/dist/src/gateway/security/gateway-scopes.js +1 -1
- package/dist/src/gateway/security/local-app-delegation-access.d.ts +5 -0
- package/dist/src/gateway/security/local-app-delegation-access.js +22 -0
- package/dist/src/gateway/service/config-coordinator.d.ts +11 -2
- package/dist/src/gateway/service/run-gateway-agent.js +7 -6
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/session-input-coordinator.js +6 -2
- package/dist/src/gateway/service.js +52 -19
- package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/inventory.js +11 -3
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/local-apps/access-audit.d.ts +17 -0
- package/dist/src/local-apps/access-audit.js +42 -0
- package/dist/src/local-apps/capabilities/contracts.js +2 -0
- package/dist/src/local-apps/capabilities/delegate.d.ts +3 -0
- package/dist/src/local-apps/capabilities/delegate.js +166 -0
- package/dist/src/local-apps/capabilities/projections.d.ts +265 -0
- package/dist/src/local-apps/capabilities/projections.js +53 -0
- package/dist/src/local-apps/capabilities/resource-policy.d.ts +3 -0
- package/dist/src/local-apps/capabilities/resource-policy.js +43 -0
- package/dist/src/local-apps/capabilities/runtime.d.ts +2 -1
- package/dist/src/local-apps/capabilities/runtime.js +108 -39
- package/dist/src/local-apps/fix-guidance.js +4 -1
- package/dist/src/local-apps/preview-fixtures.d.ts +20 -0
- package/dist/src/local-apps/preview-fixtures.js +52 -0
- package/dist/src/local-apps/preview-runtime-bridge.d.ts +1 -1
- package/dist/src/local-apps/preview-runtime-bridge.js +41 -18
- package/dist/src/local-apps/preview-sessions.d.ts +52 -0
- package/dist/src/local-apps/preview-sessions.js +316 -0
- package/dist/src/local-apps/preview-worker.d.ts +1 -0
- package/dist/src/local-apps/preview-worker.js +108 -0
- package/dist/src/local-apps/public-assets.d.ts +2 -0
- package/dist/src/local-apps/public-assets.js +42 -0
- package/dist/src/local-apps/scaffold.js +1 -1
- package/dist/src/local-apps/service.d.ts +48 -5
- package/dist/src/local-apps/service.js +136 -15
- package/dist/src/local-apps/store.d.ts +3 -0
- package/dist/src/local-apps/store.js +42 -16
- package/dist/src/local-apps/types.d.ts +2 -0
- package/dist/src/memory-learning/repository.js +3 -2
- package/dist/src/memory-learning/service.js +4 -13
- package/dist/src/memory-learning/transcript-source.d.ts +9 -0
- package/dist/src/memory-learning/transcript-source.js +31 -0
- package/dist/src/notes/capabilities/read.js +11 -2
- package/dist/src/notes/capabilities/write.js +10 -1
- package/dist/src/notes/types.d.ts +2 -0
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +3 -1
- package/dist/src/personal-agent/prompt-context.js +15 -23
- package/dist/src/personal-agent/prompts.js +3 -2
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/repository.d.ts +2 -3
- package/dist/src/personal-agent/request-access.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +1 -1
- package/dist/src/personal-agent/service.d.ts +3 -6
- package/dist/src/personal-agent/service.js +12 -1
- package/dist/src/phone/contracts.d.ts +1 -1
- package/dist/src/phone/model-adapter.d.ts +1 -1
- package/dist/src/phone/runtime.d.ts +1 -1
- package/dist/src/process/fork-worker.d.ts +2 -0
- package/dist/src/process/fork-worker.js +7 -0
- package/dist/src/providers/model-catalog-persistence.js +2 -2
- package/dist/src/providers/setup/voice.js +9 -4
- package/dist/src/providers/xopc-cloud-model-source.js +2 -2
- package/dist/src/realtime/broker.js +1 -1
- package/dist/src/session/client-history.js +12 -1
- package/dist/src/session/session-context-for-llm.js +10 -3
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/session/store.js +2 -1
- package/dist/src/session/stored-rows-to-file-entries.js +1 -1
- package/dist/src/session/transcript-outline.js +9 -0
- package/dist/src/session/voice-transcript.d.ts +14 -0
- package/dist/src/session/voice-transcript.js +19 -2
- package/dist/src/storage/sqlite/notes-repository.js +7 -0
- package/dist/src/storage/sqlite/resource-scope.d.ts +10 -0
- package/dist/src/storage/sqlite/resource-scope.js +31 -0
- package/dist/src/storage/sqlite/transcript-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/transcript-repository.js +43 -7
- package/dist/src/tasks/capabilities/read.js +21 -3
- package/dist/src/tasks/task-allocation-service.js +1 -1
- package/dist/src/tasks/task-application-service.js +3 -3
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-evidence-tools.d.ts +2 -0
- package/dist/src/tasks/task-evidence-tools.js +22 -0
- package/dist/src/tasks/task-main-update-delivery.js +2 -0
- package/dist/src/tasks/task-repository.d.ts +2 -0
- package/dist/src/tasks/task-repository.js +7 -0
- package/dist/src/tasks/task-research-result.js +8 -21
- package/dist/src/tasks/task-result-delivery-repository.d.ts +6 -0
- package/dist/src/tasks/task-result-delivery-repository.js +26 -0
- package/dist/src/tasks/task-result-delivery-service.js +3 -3
- package/dist/src/tasks/task-run-coordinator.js +1 -1
- package/dist/src/usage/scenario-registry.js +5 -0
- package/dist/src/user-model/index.js +3 -3
- package/dist/src/user-model/profile.d.ts +8 -0
- package/dist/src/user-model/profile.js +19 -1
- package/dist/src/voice/platform-settings.d.ts +5 -0
- package/dist/src/voice/platform-settings.js +16 -3
- package/dist/src/voice/platform-streams.d.ts +7 -3
- package/dist/src/voice/platform-streams.js +90 -18
- package/dist/src/voice/realtime/agentBroker.d.ts +12 -1
- package/dist/src/voice/realtime/agentBroker.js +22 -5
- package/dist/src/voice/realtime/agentEngine.js +104 -12
- package/dist/src/voice/realtime/chat-publication.d.ts +24 -0
- package/dist/src/voice/realtime/chat-publication.js +61 -0
- package/dist/src/voice/realtime/conversation-context.d.ts +7 -1
- package/dist/src/voice/realtime/conversation-context.js +54 -16
- package/dist/src/voice/realtime/engine.d.ts +2 -0
- package/dist/src/voice/realtime/identity-grounding.d.ts +8 -0
- package/dist/src/voice/realtime/identity-grounding.js +34 -0
- package/dist/src/voice/realtime/memory-context.js +48 -14
- package/dist/src/voice/realtime/naturalAgentTools.d.ts +90 -0
- package/dist/src/voice/realtime/naturalAgentTools.js +275 -0
- package/dist/src/voice/realtime/omniEngine.d.ts +9 -0
- package/dist/src/voice/realtime/omniEngine.js +425 -54
- package/dist/src/voice/realtime/omniRoute.d.ts +6 -2
- package/dist/src/voice/realtime/omniRoute.js +50 -5
- package/dist/src/voice/realtime/runtime.d.ts +1 -0
- package/dist/src/voice/realtime/runtime.js +155 -50
- package/dist/src/voice/realtime/runtime.types.d.ts +3 -1
- package/dist/src/voice/realtime/speakable-segmenter.d.ts +2 -1
- package/dist/src/voice/realtime/speakable-segmenter.js +7 -2
- package/dist/src/voice/realtime/turnPolicy.d.ts +1 -2
- package/dist/src/voice/realtime/turnPolicy.js +4 -6
- package/dist/src/voice/realtime/user-context.d.ts +14 -0
- package/dist/src/voice/realtime/user-context.js +63 -0
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +29 -23
- package/dist/src/voice/tts/speak-core.js +1 -0
- package/dist/src/voice/tts/speech-provider-types.d.ts +2 -0
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +2 -1
- package/skills/engineering/build-xopc-local-app/SKILL.md +5 -1
- package/skills/engineering/build-xopc-local-app/references/app-contract.md +43 -2
- package/dist/gateway/static/root/assets/api-B3M6ifoo.js +0 -1
- package/dist/gateway/static/root/assets/automation-run-list-De7gini_.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-CSBeVda0.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C56aelvp.js +0 -8
- package/dist/gateway/static/root/assets/chat-page-BKLyj4IP.js +0 -71
- package/dist/gateway/static/root/assets/clipboard-copy-DuJk5WD6.js +0 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-D1xUYD5M.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-w3htbAyh.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-D1VzTxON.js +0 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +0 -1
- package/dist/gateway/static/root/assets/extension-iframe-host-pbU7DAfE.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-BrX4Hy9P.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-DUzhV5_a.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Vl3uKAHV.js +0 -1
- package/dist/gateway/static/root/assets/home-page-DYkEc3Qb.js +0 -3
- package/dist/gateway/static/root/assets/imports-page-CLbpRE5i.js +0 -1
- package/dist/gateway/static/root/assets/index-CIeY0yyg.js +0 -11
- package/dist/gateway/static/root/assets/index-D1EDrkUo.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-3J9ABnCu.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-Ck6kACsY.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-Dtoheh2t.js +0 -2
- package/dist/gateway/static/root/assets/messages-orB1BMgI.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-C6aTUp-c.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-B2Ahfm0W.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-Dp5LHjk3.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CpKBzGIk.js +0 -1
- package/dist/gateway/static/root/assets/personal-proactivity-DaRnbB1f.js +0 -1
- package/dist/gateway/static/root/assets/personal-settings-panel-CtJL6qIN.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CobfHZo0.js +0 -7
- package/dist/gateway/static/root/assets/route-preload-C0oV8og1.js +0 -2
- package/dist/gateway/static/root/assets/runtime-health-D2TDFLLq.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-Dryrns2s.js +0 -1
- package/dist/gateway/static/root/assets/session-channel-icon-D1ktvt1P.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-C1T7WiP7.js +0 -25
- package/dist/gateway/static/root/assets/settings-advanced-gate-B3rOBkm_.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-BoLq3kSO.js +0 -2
- package/dist/gateway/static/root/assets/use-composer-attachments-BPMn8eY_.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-4SKLb9Fh.js +0 -15
- package/dist/gateway/static/root/assets/voice-call-context-CJ1ZiJWR.js +0 -1
- package/dist/gateway/static/root/assets/voice-config-api-yBcUSvvn.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-D4eyeSdG.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-DYFy9__S.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-2Lt7rQfw.js +0 -1
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DhqlVzSI.js +0 -1
- package/dist/gateway/static/root/assets/workspace-open-location-menu-C-ItyXwL.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VoiceProviderRoute } from '@xopcai/realtime-protocol/voice';
|
|
1
|
+
import { type HiggsVoice, type VoiceCallPreferences, type VoiceProviderRoute } from '@xopcai/realtime-protocol/voice';
|
|
2
2
|
import type { Config } from '../../config/schema.js';
|
|
3
3
|
export interface OmniRoute {
|
|
4
4
|
route: VoiceProviderRoute;
|
|
@@ -6,6 +6,10 @@ export interface OmniRoute {
|
|
|
6
6
|
apiKey: string;
|
|
7
7
|
voice: string;
|
|
8
8
|
instructions: string;
|
|
9
|
+
tools?: boolean;
|
|
9
10
|
maxSessionSeconds?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare function
|
|
12
|
+
export declare function legacyNaturalModel(config: Config): string | undefined;
|
|
13
|
+
export declare function selectedNaturalModel(config: Config, preferences?: VoiceCallPreferences): string | undefined;
|
|
14
|
+
export declare function resolveHiggsRoute(config: Config, voice?: HiggsVoice): Promise<OmniRoute>;
|
|
15
|
+
export declare function resolveOmniRoute(config: Config, model?: string, voice?: HiggsVoice): Promise<OmniRoute>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { voiceSupportsMode } from "../../../packages/realtime-protocol/src/voice-catalog.js";
|
|
2
2
|
import { init_voice } from "../../../packages/realtime-protocol/src/voice.js";
|
|
3
|
+
import { getCredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
4
|
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "../../providers/xopc-cloud-config.js";
|
|
4
5
|
import { getProviderAuthService, init_provider_auth_service } from "../../providers/provider-auth-service.js";
|
|
5
6
|
import { requirePlatformVoiceModel } from "../platform-catalog.js";
|
|
@@ -7,19 +8,62 @@ import { BAILIAN_PLAN_HOST } from "../token-plan.js";
|
|
|
7
8
|
//#region src/voice/realtime/omniRoute.ts
|
|
8
9
|
init_voice();
|
|
9
10
|
init_provider_auth_service();
|
|
11
|
+
init_credentials();
|
|
10
12
|
init_xopc_cloud_config();
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
function legacyNaturalModel(config) {
|
|
14
|
+
const model = config.voice?.realtime?.omni;
|
|
15
|
+
return model ? `${model.provider}/${model.model}` : void 0;
|
|
16
|
+
}
|
|
17
|
+
function selectedNaturalModel(config, preferences) {
|
|
18
|
+
return preferences?.naturalModel ?? (config.voice?.realtime?.boson?.defaultForNatural ? "boson/higgs-realtime" : legacyNaturalModel(config));
|
|
19
|
+
}
|
|
20
|
+
async function resolveHiggsRoute(config, voice) {
|
|
21
|
+
const apiKey = await getCredentialResolver().resolveApiKey("boson");
|
|
22
|
+
if (!apiKey) throw new Error("Boson API key is unavailable");
|
|
23
|
+
return {
|
|
24
|
+
route: {
|
|
25
|
+
provider: "boson",
|
|
26
|
+
model: "higgs-realtime",
|
|
27
|
+
managed: false
|
|
28
|
+
},
|
|
29
|
+
url: "wss://api.boson.ai/v1/realtime?model=higgs-realtime",
|
|
30
|
+
apiKey,
|
|
31
|
+
voice: voice ?? config.voice.realtime.boson?.voice ?? "default",
|
|
32
|
+
instructions: "You are Ada. Speak naturally in the user’s language. Start with the answer, skip greetings and filler, and use one brief sentence unless the user asks for detail.",
|
|
33
|
+
tools: true,
|
|
34
|
+
maxSessionSeconds: 3600
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async function resolveOmniRoute(config, model = selectedNaturalModel(config), voice) {
|
|
38
|
+
if (model === "boson/higgs-realtime") return resolveHiggsRoute(config, voice);
|
|
39
|
+
let slice = config.voice?.realtime?.omni;
|
|
40
|
+
if (model?.startsWith("xopc-cloud/")) {
|
|
41
|
+
const id = model.slice(11);
|
|
42
|
+
const published = requirePlatformVoiceModel(id, "conversation");
|
|
43
|
+
const voices = published.voice.voices.filter((item) => voiceSupportsMode(item, "conversation"));
|
|
44
|
+
const selected = slice?.provider === "xopc-cloud" && slice.model === id ? slice : void 0;
|
|
45
|
+
const selectedVoice = selected?.voice ?? voices.find((item) => item.id === published.voice.defaultVoice)?.id ?? voices[0]?.id;
|
|
46
|
+
if (!selectedVoice) throw new Error("Selected voice is unavailable");
|
|
47
|
+
slice = {
|
|
48
|
+
...selected,
|
|
49
|
+
provider: "xopc-cloud",
|
|
50
|
+
model: id,
|
|
51
|
+
voice: selectedVoice,
|
|
52
|
+
instructions: selected?.instructions ?? "Keep replies conversational and concise."
|
|
53
|
+
};
|
|
54
|
+
} else if (!slice || model !== legacyNaturalModel(config)) throw new Error("Selected natural voice model is unavailable");
|
|
14
55
|
let maxSessionSeconds;
|
|
15
56
|
let serviceVersion;
|
|
57
|
+
let tools = /^(?:qwen3\.[58]-omni-(?:flash|plus)-realtime)(?:-|$)/u.test(slice.model);
|
|
16
58
|
if (slice.provider === "xopc-cloud") {
|
|
17
59
|
const model = requirePlatformVoiceModel(slice.model, "conversation");
|
|
18
60
|
maxSessionSeconds = model.voice.limits.maxSessionSeconds;
|
|
19
61
|
serviceVersion = model.voice.serviceVersion;
|
|
62
|
+
tools = model.voice.tools;
|
|
20
63
|
if (!model.voice.voices.some((voice) => voice.id === slice.voice && voiceSupportsMode(voice, "conversation"))) throw new Error("Selected voice is unavailable");
|
|
21
64
|
}
|
|
22
65
|
const managed = slice.provider === "xopc-cloud";
|
|
66
|
+
const instructions = tools && ["Keep replies conversational and concise. You cannot execute tools.", "You are a friendly voice companion. Keep replies conversational and concise. You cannot execute tools or perform actions."].includes(slice.instructions) ? "Keep replies conversational and concise." : slice.instructions;
|
|
23
67
|
const url = new URL(managed ? `${resolveXopcModelRouterUrl(slice.baseUrl)}/audio/conversations/realtime` : slice.provider === "qwen-token-plan-cn" ? `${BAILIAN_PLAN_HOST.replace("https:", "wss:")}/api-ws/v1/realtime` : slice.baseUrl ?? "wss://dashscope.aliyuncs.com/api-ws/v1/realtime");
|
|
24
68
|
if (managed && url.protocol === "https:") url.protocol = "wss:";
|
|
25
69
|
if (url.protocol !== "wss:" || url.username || url.password || url.hash || url.port) throw new Error("Omni requires a secure WebSocket endpoint");
|
|
@@ -30,6 +74,7 @@ async function resolveOmniRoute(config) {
|
|
|
30
74
|
if (serviceVersion) url.searchParams.set("service_version", String(serviceVersion));
|
|
31
75
|
return {
|
|
32
76
|
maxSessionSeconds,
|
|
77
|
+
tools,
|
|
33
78
|
route: {
|
|
34
79
|
provider: slice.provider,
|
|
35
80
|
model: slice.model,
|
|
@@ -38,8 +83,8 @@ async function resolveOmniRoute(config) {
|
|
|
38
83
|
url: url.toString(),
|
|
39
84
|
apiKey,
|
|
40
85
|
voice: slice.voice,
|
|
41
|
-
instructions
|
|
86
|
+
instructions
|
|
42
87
|
};
|
|
43
88
|
}
|
|
44
89
|
//#endregion
|
|
45
|
-
export { resolveOmniRoute };
|
|
90
|
+
export { legacyNaturalModel, resolveHiggsRoute, resolveOmniRoute, selectedNaturalModel };
|
|
@@ -28,6 +28,7 @@ export declare class VoiceRealtimeRuntime {
|
|
|
28
28
|
handleUpgrade(req: IncomingMessage, socket: Socket, head: Buffer): boolean;
|
|
29
29
|
hasConversation(conversationId: string): boolean;
|
|
30
30
|
canPublishReply(conversationId: string): boolean;
|
|
31
|
+
refreshConversation(conversationId: string): void;
|
|
31
32
|
canOfferTaskUpdate(conversationId: string): boolean;
|
|
32
33
|
offerReply(input: {
|
|
33
34
|
conversationId: string;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_changes, onUserContextChange } from "../../user-context/changes.js";
|
|
4
|
-
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
5
4
|
import { decodeVoiceUplinkAudioFrame, encodeVoiceAudioFrame } from "../../../packages/realtime-protocol/src/voice-audio.js";
|
|
6
|
-
import { VOICE_REALTIME_HEARTBEAT_INTERVAL_MS, VOICE_REALTIME_MAX_BINARY_FRAME_BYTES, VOICE_REALTIME_START_TIMEOUT_MS, VOICE_REALTIME_WS_PATH, init_voice, parseVoiceClientJsonFrame, parseVoiceClientMessage } from "../../../packages/realtime-protocol/src/voice.js";
|
|
5
|
+
import { HIGGS_REALTIME_REF, VOICE_REALTIME_HEARTBEAT_INTERVAL_MS, VOICE_REALTIME_MAX_BINARY_FRAME_BYTES, VOICE_REALTIME_START_TIMEOUT_MS, VOICE_REALTIME_WS_PATH, init_voice, parseVoiceClientJsonFrame, parseVoiceClientMessage } from "../../../packages/realtime-protocol/src/voice.js";
|
|
6
|
+
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
7
7
|
import { getModelCatalogStore, init_model_catalog_store } from "../../providers/model-catalog-store.js";
|
|
8
8
|
import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
|
|
9
9
|
import { getMediaUnderstandingProvider } from "../../media-understanding/registry.js";
|
|
10
|
-
import { resolveSTTProviderChain } from "../stt/factory.js";
|
|
10
|
+
import { resolveSTTProviderChain, resolveSTTProviderConfig } from "../stt/factory.js";
|
|
11
11
|
import { mergeSttConfigFromAppConfig } from "../stt/config.js";
|
|
12
12
|
import { ALIBABA_REALTIME_TTS_MODEL } from "../tts/providers/alibaba-speech.js";
|
|
13
13
|
import { resolveSpeechProviderChain } from "../tts/factory.js";
|
|
14
14
|
import { mergeTtsConfigFromAppConfig } from "../tts/merge-config.js";
|
|
15
15
|
import { verifyDeviceConnectionProof } from "../../gateway/security/device-request-proof.js";
|
|
16
|
-
import { voiceConversationInstructions } from "./conversation-context.js";
|
|
16
|
+
import { buildVoiceResumeHistory, voiceConversationInstructions } from "./conversation-context.js";
|
|
17
17
|
import { createPreauthConnectionBudget } from "../../gateway/security/preauth-connection-budget.js";
|
|
18
18
|
import { claimOpeningGreeting, finishOpeningGreeting, openingGreetingText } from "./opening-greeting.js";
|
|
19
19
|
import { createAgentVoiceEngine } from "./agentEngine.js";
|
|
20
|
-
import { resolveOmniRoute } from "./omniRoute.js";
|
|
20
|
+
import { resolveOmniRoute, selectedNaturalModel } from "./omniRoute.js";
|
|
21
21
|
import { createOmniVoiceEngine } from "./omniEngine.js";
|
|
22
22
|
import { applyVoiceOutputGain } from "./pcm-output-gain.js";
|
|
23
23
|
import { createRequire } from "node:module";
|
|
@@ -52,14 +52,18 @@ function isStreamingProvider(provider) {
|
|
|
52
52
|
function resolveStreamingStt(config, language) {
|
|
53
53
|
const sttConfig = mergeSttConfigFromAppConfig(config.tools?.media?.audio, config.tools?.media);
|
|
54
54
|
const configured = config.voice?.realtime?.stt;
|
|
55
|
-
const
|
|
55
|
+
const selected = configured?.provider === "alibaba" ? resolveSTTProviderConfig(configured.provider, sttConfig) : void 0;
|
|
56
|
+
const chain = configured ? configured.provider === "xopc-cloud" ? [{
|
|
56
57
|
id: configured.provider,
|
|
57
58
|
model: configured.model
|
|
58
|
-
}] :
|
|
59
|
+
}] : selected ? [{
|
|
60
|
+
...selected,
|
|
61
|
+
model: configured.model
|
|
62
|
+
}] : [] : resolveSTTProviderChain(sttConfig);
|
|
59
63
|
for (const entry of chain) {
|
|
60
64
|
const plugin = getMediaUnderstandingProvider(entry.id);
|
|
61
65
|
if (!isStreamingProvider(plugin)) continue;
|
|
62
|
-
const model = plugin.id === "xopc-cloud" ?
|
|
66
|
+
const model = configured?.model ?? (plugin.id === "xopc-cloud" ? entry.model : void 0) ?? plugin.streamingAudio.defaultModel;
|
|
63
67
|
if (!plugin.streamingAudio.models.includes(model)) continue;
|
|
64
68
|
return {
|
|
65
69
|
plugin,
|
|
@@ -172,27 +176,39 @@ var VoiceRealtimeRuntime = class {
|
|
|
172
176
|
async prepareSession(request, now = Date.now()) {
|
|
173
177
|
const config = structuredClone(this.options.getConfig());
|
|
174
178
|
this.pruneTickets(now);
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
const testVoice = request.testHiggsVoice;
|
|
180
|
+
const personal = request.conversationId ? getPersonalAgentByConversation(request.conversationId) : null;
|
|
181
|
+
const preferences = personal?.voiceCallPreferences;
|
|
182
|
+
const preferred = preferences?.enginePreference ?? (config.voice?.realtime?.defaultEngine === "omni" ? "natural" : config.voice?.realtime?.defaultEngine === "agent" ? "assistant" : "auto");
|
|
183
|
+
const automatic = request.purpose === "conversation" && request.mode === void 0 && preferred === "auto";
|
|
184
|
+
const wantsNatural = request.purpose === "conversation" && (automatic || (request.mode ?? preferred) === "natural");
|
|
185
|
+
const model = wantsNatural ? testVoice || request.naturalBackend === "higgs" ? HIGGS_REALTIME_REF : selectedNaturalModel(config, preferences) : void 0;
|
|
181
186
|
let omni;
|
|
182
|
-
if (
|
|
183
|
-
omni = await resolveOmniRoute(config);
|
|
187
|
+
if (wantsNatural) try {
|
|
188
|
+
omni = await resolveOmniRoute(config, model, testVoice ?? preferences?.higgsVoice);
|
|
189
|
+
if (automatic && !omni.tools) omni = void 0;
|
|
190
|
+
if (testVoice && omni) omni = {
|
|
191
|
+
...omni,
|
|
192
|
+
tools: false,
|
|
193
|
+
instructions: `This standalone voice preview has no tools and cannot perform actions.\n\n${omni.instructions}`
|
|
194
|
+
};
|
|
184
195
|
} catch {
|
|
185
|
-
throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", "Natural conversation is unavailable. Check its model, endpoint and credentials.", 503);
|
|
196
|
+
if (!automatic) throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", "Natural conversation is unavailable. Check its model, endpoint and credentials.", 503);
|
|
186
197
|
}
|
|
187
|
-
if (
|
|
198
|
+
if (request.purpose === "conversation") request = {
|
|
199
|
+
...request,
|
|
200
|
+
mode: omni ? "natural" : "assistant"
|
|
201
|
+
};
|
|
202
|
+
if (!config.voice?.realtime?.enabled && !(omni && model === "boson/higgs-realtime")) throw new VoiceSessionCreationError("VOICE_DISABLED", "Realtime voice is disabled", 503);
|
|
203
|
+
if (omni && !testVoice && (!this.options.recordOmniTranscript || !this.options.getConversationContext)) throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", "Natural conversation storage is unavailable", 503);
|
|
188
204
|
const conversationSessionId = request.purpose === "conversation" && request.conversationId ? await this.options.getSessionIdentity?.(request.conversationId) : void 0;
|
|
189
|
-
if (request.purpose === "conversation" && !conversationSessionId) throw new VoiceSessionCreationError("SESSION_NOT_FOUND", "Conversation session was not found", 404);
|
|
205
|
+
if (request.purpose === "conversation" && !testVoice && !conversationSessionId) throw new VoiceSessionCreationError("SESSION_NOT_FOUND", "Conversation session was not found", 404);
|
|
190
206
|
const stt = omni ? void 0 : resolveStreamingStt(config, request.language);
|
|
191
207
|
if (!omni && !stt) throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", "No configured streaming speech-to-text provider is available", 503);
|
|
192
208
|
const inputMode = "server_vad";
|
|
193
209
|
if (stt && !stt.plugin.streamingAudio.turnDetection.includes(inputMode)) throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", `Streaming speech-to-text provider does not support ${inputMode}`, 503);
|
|
194
210
|
const baseTts = request.mode === "assistant" ? resolveStreamingTts(config) : void 0;
|
|
195
|
-
const personalVoice =
|
|
211
|
+
const personalVoice = personal?.voicePreference;
|
|
196
212
|
const tts = baseTts && personalVoice && baseTts.route.provider === personalVoice.provider && baseTts.route.model === personalVoice.model ? {
|
|
197
213
|
...baseTts,
|
|
198
214
|
config: {
|
|
@@ -206,9 +222,9 @@ var VoiceRealtimeRuntime = class {
|
|
|
206
222
|
}
|
|
207
223
|
}
|
|
208
224
|
} : baseTts;
|
|
209
|
-
if (request.purpose === "conversation") {
|
|
225
|
+
if (request.purpose === "conversation" && !testVoice) {
|
|
210
226
|
if (!request.conversationId || !await this.options.sessionExists(request.conversationId)) throw new VoiceSessionCreationError("SESSION_NOT_FOUND", "Conversation session was not found", 404);
|
|
211
|
-
if (request.mode === "natural" && this.options.sessionBusy(request.conversationId)) throw new VoiceSessionCreationError("SESSION_CONFLICT", "Conversation session already has an active response", 409);
|
|
227
|
+
if (request.mode === "natural" && this.options.sessionBusy(request.conversationId) && !this.options.agentBroker.restore) throw new VoiceSessionCreationError("SESSION_CONFLICT", "Conversation session already has an active response", 409);
|
|
212
228
|
if (this.conversationReservations.has(request.conversationId)) throw new VoiceSessionCreationError("SESSION_CONFLICT", "Conversation session already has a voice connection", 409);
|
|
213
229
|
if (!omni && !tts) throw new VoiceSessionCreationError("PROVIDER_UNAVAILABLE", "No configured PCM streaming text-to-speech provider is available", 503);
|
|
214
230
|
}
|
|
@@ -220,16 +236,16 @@ var VoiceRealtimeRuntime = class {
|
|
|
220
236
|
conversationSessionId,
|
|
221
237
|
stt,
|
|
222
238
|
tts,
|
|
223
|
-
inputMode
|
|
239
|
+
inputMode,
|
|
240
|
+
personal
|
|
224
241
|
};
|
|
225
242
|
}
|
|
226
243
|
async preflight(request) {
|
|
227
244
|
await this.prepareSession(request);
|
|
228
245
|
}
|
|
229
246
|
async createSession(request, principalId, now = Date.now()) {
|
|
230
|
-
const { request: resolvedRequest, config, omni, conversationSessionId, stt, tts, inputMode } = await this.prepareSession(request, now);
|
|
247
|
+
const { request: resolvedRequest, config, omni, conversationSessionId, stt, tts, inputMode, personal } = await this.prepareSession(request, now);
|
|
231
248
|
request = resolvedRequest;
|
|
232
|
-
const personal = request.conversationId ? getPersonalAgentByConversation(request.conversationId) : null;
|
|
233
249
|
const openingGreeting = request.openingGreeting && request.openingGreeting.initiation === "user" && request.purpose === "conversation" && request.mode === "assistant" && personal?.state === "ready" && personal.voiceCallPreferences.openingGreetingEnabled ? {
|
|
234
250
|
responseId: `greeting_${crypto.randomUUID()}`,
|
|
235
251
|
text: openingGreetingText(personal.userCallName, request.language ?? "zh")
|
|
@@ -237,7 +253,7 @@ var VoiceRealtimeRuntime = class {
|
|
|
237
253
|
const sessionId = crypto.randomUUID();
|
|
238
254
|
const ticket = crypto.randomBytes(32).toString("base64url");
|
|
239
255
|
const connectionEpoch = crypto.randomInt(1, 4294967296);
|
|
240
|
-
const maxSessionMs = request.purpose === "conversation" ? Math.min(config.voice.realtime.maxConversationMs, omni?.maxSessionSeconds ? omni.maxSessionSeconds * 1e3 : Number.MAX_SAFE_INTEGER) : config.voice.realtime.maxDictationMs;
|
|
256
|
+
const maxSessionMs = request.testHiggsVoice ? 6e4 : request.purpose === "conversation" ? Math.min(config.voice.realtime.maxConversationMs, omni?.maxSessionSeconds ? omni.maxSessionSeconds * 1e3 : Number.MAX_SAFE_INTEGER) : config.voice.realtime.maxDictationMs;
|
|
241
257
|
const claim = {
|
|
242
258
|
conversationSessionId,
|
|
243
259
|
openingGreeting,
|
|
@@ -273,7 +289,7 @@ var VoiceRealtimeRuntime = class {
|
|
|
273
289
|
purpose: request.purpose,
|
|
274
290
|
...request.purpose === "conversation" && request.mode ? { mode: request.mode } : {},
|
|
275
291
|
inputMode,
|
|
276
|
-
bargeIn: config.voice.realtime.bargeIn,
|
|
292
|
+
bargeIn: omni?.route.provider === "boson" || config.voice.realtime.bargeIn,
|
|
277
293
|
inputFormat: {
|
|
278
294
|
encoding: "pcm_s16le",
|
|
279
295
|
sampleRate: 16e3,
|
|
@@ -331,6 +347,10 @@ var VoiceRealtimeRuntime = class {
|
|
|
331
347
|
const sessionId = this.conversationReservations.get(conversationId);
|
|
332
348
|
return (sessionId ? this.activeSessions.get(sessionId) : void 0)?.engine?.isConversationIdle?.() === true;
|
|
333
349
|
}
|
|
350
|
+
refreshConversation(conversationId) {
|
|
351
|
+
const id = this.conversationReservations.get(conversationId);
|
|
352
|
+
if (id) this.activeSessions.get(id)?.refreshContext?.();
|
|
353
|
+
}
|
|
334
354
|
canOfferTaskUpdate(conversationId) {
|
|
335
355
|
const sessionId = this.conversationReservations.get(conversationId);
|
|
336
356
|
return (sessionId ? this.activeSessions.get(sessionId) : void 0)?.engine?.canOfferTaskUpdate?.() === true;
|
|
@@ -410,6 +430,8 @@ var VoiceRealtimeRuntime = class {
|
|
|
410
430
|
const abortController = new AbortController();
|
|
411
431
|
const seenMessageIds = /* @__PURE__ */ new Set();
|
|
412
432
|
let context;
|
|
433
|
+
let contextRefresh;
|
|
434
|
+
let contextRefreshPending = false;
|
|
413
435
|
let unsubscribeMemory;
|
|
414
436
|
let unsubscribeSession;
|
|
415
437
|
let openingTimer;
|
|
@@ -492,7 +514,8 @@ var VoiceRealtimeRuntime = class {
|
|
|
492
514
|
return;
|
|
493
515
|
}
|
|
494
516
|
if (context?.isCurrent && !context.isCurrent()) {
|
|
495
|
-
|
|
517
|
+
if (ready && engine?.updateContext) refreshContext();
|
|
518
|
+
else invalidateContext();
|
|
496
519
|
return;
|
|
497
520
|
}
|
|
498
521
|
if (context?.memory && !context.memory.isCurrent()) {
|
|
@@ -512,6 +535,50 @@ var VoiceRealtimeRuntime = class {
|
|
|
512
535
|
});
|
|
513
536
|
shutdown("context_changed", true);
|
|
514
537
|
};
|
|
538
|
+
const refreshContext = () => {
|
|
539
|
+
if (contextRefresh) {
|
|
540
|
+
contextRefreshPending = true;
|
|
541
|
+
return contextRefresh;
|
|
542
|
+
}
|
|
543
|
+
if (!ready || closed || !claim?.omni || !claim.request.conversationId || !engine?.updateContext) return Promise.resolve();
|
|
544
|
+
const current = claim;
|
|
545
|
+
contextRefresh = (async () => {
|
|
546
|
+
try {
|
|
547
|
+
if (await this.options.getSessionIdentity?.(current.request.conversationId) !== current.conversationSessionId || context?.memory?.isCurrent() === false) {
|
|
548
|
+
invalidateContext();
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const next = await this.options.getConversationContext(current.request.conversationId, current.conversationSessionId, current.omni.instructions, current.omni.tools === true);
|
|
552
|
+
if (closed) return;
|
|
553
|
+
if (next.isCurrent?.() === false || next.memory?.isCurrent() === false || context?.user && !next.user) {
|
|
554
|
+
invalidateContext();
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
if (next.sharedChat !== context?.sharedChat || context?.isCurrent?.() === false) {
|
|
558
|
+
if (!engine.updateContext(voiceConversationInstructions(current.omni.instructions, {
|
|
559
|
+
...next,
|
|
560
|
+
history: []
|
|
561
|
+
}), next.sharedChat ?? "")) return;
|
|
562
|
+
unsubscribeMemory?.();
|
|
563
|
+
unsubscribeMemory = next.memory?.subscribe(invalidateContext);
|
|
564
|
+
context = next;
|
|
565
|
+
}
|
|
566
|
+
} catch (err) {
|
|
567
|
+
log.warn({
|
|
568
|
+
err,
|
|
569
|
+
conversationId: current.request.conversationId
|
|
570
|
+
}, "Voice shared context refresh failed");
|
|
571
|
+
invalidateContext();
|
|
572
|
+
}
|
|
573
|
+
})().finally(() => {
|
|
574
|
+
contextRefresh = void 0;
|
|
575
|
+
if (contextRefreshPending) {
|
|
576
|
+
contextRefreshPending = false;
|
|
577
|
+
refreshContext();
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
return contextRefresh;
|
|
581
|
+
};
|
|
515
582
|
const authenticate = async (message) => {
|
|
516
583
|
const pendingClaim = this.tickets.get(ticketKey(message.payload.ticket));
|
|
517
584
|
if (pendingClaim && !verifyDeviceConnectionProof(pendingClaim.principalId, message.payload.ticket, new URL(request.url, "http://localhost").pathname + new URL(request.url, "http://localhost").search, typeof request.headers["x-xopc-proof"] === "string" ? request.headers["x-xopc-proof"] : void 0)) {
|
|
@@ -542,26 +609,39 @@ var VoiceRealtimeRuntime = class {
|
|
|
542
609
|
clearTimeout(startTimer);
|
|
543
610
|
let setupStage = "context";
|
|
544
611
|
try {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (closed)
|
|
551
|
-
|
|
612
|
+
const conversationId = consumed.request.conversationId;
|
|
613
|
+
const omni = consumed.omni;
|
|
614
|
+
let engineOmni = omni;
|
|
615
|
+
const restoreInstructions = omni && conversationId ? async () => {
|
|
616
|
+
const snapshot = await this.options.getConversationContext(conversationId, consumed.conversationSessionId, omni.instructions, omni.tools === true);
|
|
617
|
+
if (closed) throw new Error("Voice session closed while restoring context");
|
|
618
|
+
context = snapshot;
|
|
619
|
+
if (snapshot.memory) unsubscribeMemory = snapshot.memory.subscribe(invalidateContext);
|
|
620
|
+
if (snapshot.isCurrent?.() === false || snapshot.memory?.isCurrent() === false) {
|
|
552
621
|
invalidateContext();
|
|
553
|
-
|
|
622
|
+
throw new Error("Conversation context changed while dialing");
|
|
554
623
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
624
|
+
const instructions = voiceConversationInstructions(omni.instructions, {
|
|
625
|
+
...snapshot,
|
|
626
|
+
history: [],
|
|
627
|
+
actions: omni.tools === true
|
|
628
|
+
});
|
|
629
|
+
log.info({
|
|
630
|
+
conversationId,
|
|
631
|
+
sessionId: consumed.sessionId,
|
|
632
|
+
contextChars: instructions.length,
|
|
633
|
+
identityChars: snapshot.identity.length,
|
|
634
|
+
historyTurns: snapshot.history.length
|
|
635
|
+
}, "Voice conversation context prepared");
|
|
636
|
+
return instructions;
|
|
637
|
+
} : void 0;
|
|
638
|
+
if (restoreInstructions) {
|
|
639
|
+
unsubscribeSession = onUserContextChange((change) => {
|
|
640
|
+
if (change.kind === "session-reset" && change.id === conversationId) invalidateContext();
|
|
641
|
+
});
|
|
642
|
+
if (omni && omni.route.provider !== "boson") engineOmni = {
|
|
643
|
+
...omni,
|
|
644
|
+
instructions: await restoreInstructions()
|
|
565
645
|
};
|
|
566
646
|
}
|
|
567
647
|
setupStage = "engine";
|
|
@@ -583,15 +663,33 @@ var VoiceRealtimeRuntime = class {
|
|
|
583
663
|
outputMediaTimestampMs += 20;
|
|
584
664
|
}
|
|
585
665
|
};
|
|
586
|
-
engine =
|
|
666
|
+
engine = engineOmni ? createOmniVoiceEngine({
|
|
587
667
|
callId: consumed.sessionId,
|
|
588
|
-
route:
|
|
668
|
+
route: engineOmni,
|
|
589
669
|
silenceDurationMs: consumed.silenceDurationMs,
|
|
670
|
+
restoreInstructions: engineOmni.route.provider === "boson" ? restoreInstructions : void 0,
|
|
671
|
+
restoreHistory: () => {
|
|
672
|
+
const history = buildVoiceResumeHistory(context?.history ?? []);
|
|
673
|
+
log.info({
|
|
674
|
+
conversationId,
|
|
675
|
+
sessionId: consumed.sessionId,
|
|
676
|
+
historyChars: history.length
|
|
677
|
+
}, "Voice conversation history restored");
|
|
678
|
+
return history;
|
|
679
|
+
},
|
|
590
680
|
bargeIn: consumed.config.voice?.realtime?.bargeIn ?? true,
|
|
591
681
|
send,
|
|
592
682
|
sendAudio,
|
|
593
|
-
|
|
594
|
-
|
|
683
|
+
...conversationId && consumed.conversationSessionId && engineOmni.tools ? { agent: {
|
|
684
|
+
broker: this.options.agentBroker,
|
|
685
|
+
conversationId,
|
|
686
|
+
transcriptId: consumed.conversationSessionId,
|
|
687
|
+
publish: (publication) => this.options.publishConversationContent?.(conversationId, consumed.conversationSessionId, publication) ?? Promise.reject(/* @__PURE__ */ new Error("Chat publication is unavailable"))
|
|
688
|
+
} } : {},
|
|
689
|
+
onUserInput: conversationId ? () => this.options.onConversationInput?.(conversationId) : void 0,
|
|
690
|
+
record: async (entry) => {
|
|
691
|
+
if (conversationId) await this.options.recordOmniTranscript(conversationId, consumed.sessionId, entry, consumed.conversationSessionId);
|
|
692
|
+
},
|
|
595
693
|
onClose: shutdown
|
|
596
694
|
}) : createAgentVoiceEngine({
|
|
597
695
|
claim: consumed,
|
|
@@ -603,6 +701,10 @@ var VoiceRealtimeRuntime = class {
|
|
|
603
701
|
});
|
|
604
702
|
await Promise.all([engine.start(), consumed.openingGreeting ? engine.prepareOpeningGreeting?.(consumed.openingGreeting) : void 0]);
|
|
605
703
|
if (closed) return;
|
|
704
|
+
if (context?.isCurrent?.() === false || context?.memory?.isCurrent() === false) {
|
|
705
|
+
invalidateContext();
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
606
708
|
const active = this.activeSessions.get(consumed.sessionId);
|
|
607
709
|
if (active?.socket === socket) active.engine = engine;
|
|
608
710
|
ready = true;
|
|
@@ -641,6 +743,9 @@ var VoiceRealtimeRuntime = class {
|
|
|
641
743
|
},
|
|
642
744
|
heartbeatIntervalMs: VOICE_REALTIME_HEARTBEAT_INTERVAL_MS
|
|
643
745
|
});
|
|
746
|
+
const readySession = this.activeSessions.get(consumed.sessionId);
|
|
747
|
+
if (readySession) readySession.refreshContext = refreshContext;
|
|
748
|
+
engine.restoreTasks?.();
|
|
644
749
|
} catch (error) {
|
|
645
750
|
if (closed) return;
|
|
646
751
|
log.warn({
|
|
@@ -7,6 +7,7 @@ import type { VoiceConversationContext } from './conversation-context.js';
|
|
|
7
7
|
import type { OmniTranscript } from './omniEngine.js';
|
|
8
8
|
import type { OmniRoute } from './omniRoute.js';
|
|
9
9
|
import type { VoiceAgentBroker } from './agentBroker.js';
|
|
10
|
+
import type { VoiceChatPublication } from './chat-publication.js';
|
|
10
11
|
export interface ResolvedStreamingStt {
|
|
11
12
|
plugin: MediaUnderstandingProvider & Required<Pick<MediaUnderstandingProvider, 'openAudioStream' | 'streamingAudio'>>;
|
|
12
13
|
model: string;
|
|
@@ -45,11 +46,12 @@ export interface ResolvedStreamingTts {
|
|
|
45
46
|
route: VoiceProviderRoute;
|
|
46
47
|
}
|
|
47
48
|
export interface VoiceRealtimeRuntimeOptions {
|
|
49
|
+
publishConversationContent?: (conversationId: string, expectedTranscriptId: string, publication: VoiceChatPublication) => Promise<void>;
|
|
48
50
|
/** Confirmed non-echo speech invalidates background reply drafts before turn commit. */
|
|
49
51
|
onConversationInput?: (conversationId: string) => void;
|
|
50
52
|
isPrincipalActive?: (principalId: string) => boolean;
|
|
51
53
|
recordOmniTranscript?: (conversationId: string, callId: string, entry: OmniTranscript, expectedTranscriptId: string) => Promise<void>;
|
|
52
|
-
getConversationContext?: (conversationId: string, expectedTranscriptId: string) => Promise<VoiceConversationContext>;
|
|
54
|
+
getConversationContext?: (conversationId: string, expectedTranscriptId: string, baseInstructions: string, actions?: boolean) => Promise<VoiceConversationContext>;
|
|
53
55
|
getSessionIdentity?: (conversationId: string) => Promise<string | undefined>;
|
|
54
56
|
getConfig: () => Config;
|
|
55
57
|
sessionExists: (conversationId: string) => Promise<boolean>;
|
|
@@ -3,10 +3,11 @@ export declare class SpeakableSegmenter {
|
|
|
3
3
|
private readonly maxCharacters;
|
|
4
4
|
private readonly minCharacters;
|
|
5
5
|
private readonly firstMinCharacters;
|
|
6
|
+
private readonly firstClauseCharacters;
|
|
6
7
|
private pending;
|
|
7
8
|
private fence;
|
|
8
9
|
private emitted;
|
|
9
|
-
constructor(maxCharacters?: number, minCharacters?: number, firstMinCharacters?: number);
|
|
10
|
+
constructor(maxCharacters?: number, minCharacters?: number, firstMinCharacters?: number, firstClauseCharacters?: number);
|
|
10
11
|
push(delta: string): string[];
|
|
11
12
|
/** Releases only a complete short phrase; never cuts a word or Markdown construct. */
|
|
12
13
|
flushFirstPhrase(): string[];
|
|
@@ -6,10 +6,11 @@ var SpeakableSegmenter = class {
|
|
|
6
6
|
pending = "";
|
|
7
7
|
fence = null;
|
|
8
8
|
emitted = false;
|
|
9
|
-
constructor(maxCharacters = 120, minCharacters = 0, firstMinCharacters = minCharacters) {
|
|
9
|
+
constructor(maxCharacters = 120, minCharacters = 0, firstMinCharacters = minCharacters, firstClauseCharacters = 0) {
|
|
10
10
|
this.maxCharacters = maxCharacters;
|
|
11
11
|
this.minCharacters = minCharacters;
|
|
12
12
|
this.firstMinCharacters = firstMinCharacters;
|
|
13
|
+
this.firstClauseCharacters = firstClauseCharacters;
|
|
13
14
|
}
|
|
14
15
|
push(delta) {
|
|
15
16
|
this.pending += delta;
|
|
@@ -59,6 +60,10 @@ var SpeakableSegmenter = class {
|
|
|
59
60
|
if (char === ")") parentheses = Math.max(0, parentheses - 1);
|
|
60
61
|
if (inlineCode || brackets || parentheses || char === "]" && this.pending[index + 1] === "(") continue;
|
|
61
62
|
const minCharacters = this.emitted ? this.minCharacters : this.firstMinCharacters;
|
|
63
|
+
if (!this.emitted && this.firstClauseCharacters > 0 && index >= this.firstClauseCharacters - 1 && /[,、,]/u.test(char) && /\p{Script=Han}/u.test(this.pending.slice(0, index))) {
|
|
64
|
+
boundary = index + 1;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
62
67
|
if (SENTENCE_END.test(char) && index + 1 >= minCharacters) {
|
|
63
68
|
boundary = index + 1;
|
|
64
69
|
break;
|
|
@@ -100,7 +105,7 @@ var SpeakableSegmenter = class {
|
|
|
100
105
|
if (char === "(") parentheses += 1;
|
|
101
106
|
if (char === ")") parentheses = Math.max(0, parentheses - 1);
|
|
102
107
|
if (inlineCode || brackets || parentheses) continue;
|
|
103
|
-
if (index >= 11 && /[,、,\s]/u.test(char)) {
|
|
108
|
+
if (index >= 5 && /[,、,]/u.test(char) && /\p{Script=Han}/u.test(this.pending.slice(0, index)) || index >= 11 && /[,、,\s]/u.test(char)) {
|
|
104
109
|
const phrase = this.toSpeech(this.pending.slice(0, index + 1));
|
|
105
110
|
if (!phrase) continue;
|
|
106
111
|
this.pending = this.pending.slice(index + 1);
|
|
@@ -16,14 +16,13 @@ export declare function hasContinuationHint(text: string): boolean;
|
|
|
16
16
|
export declare const heuristicTurnPolicy: TurnPolicy;
|
|
17
17
|
/** Accumulates provider utterances and commits only after the selected policy settles. */
|
|
18
18
|
export declare class TurnCoordinator {
|
|
19
|
-
private readonly silenceDurationMs;
|
|
20
19
|
private readonly onCommit;
|
|
21
20
|
private readonly policy;
|
|
22
21
|
private readonly parts;
|
|
23
22
|
private timer;
|
|
24
23
|
private stoppedAt;
|
|
25
24
|
private decisionGeneration;
|
|
26
|
-
constructor(
|
|
25
|
+
constructor(onCommit: (text: string, decision: TurnDecision, turnId: string) => void, policy?: TurnPolicy);
|
|
27
26
|
start(id: string): void;
|
|
28
27
|
stop(id: string): void;
|
|
29
28
|
final(id: string, text: string): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/voice/realtime/turnPolicy.ts
|
|
2
|
-
const
|
|
3
|
-
const FINAL_SETTLE_MS = 350;
|
|
2
|
+
const FINAL_SETTLE_MS = 40;
|
|
4
3
|
const INCOMPLETE_HOLD_MS = 1800;
|
|
5
4
|
const DECISION_TIMEOUT_MS = 750;
|
|
6
5
|
const MAX_TRANSCRIPT_CHARACTERS = 32e3;
|
|
@@ -27,8 +26,7 @@ var TurnCoordinator = class {
|
|
|
27
26
|
timer;
|
|
28
27
|
stoppedAt = 0;
|
|
29
28
|
decisionGeneration = 0;
|
|
30
|
-
constructor(
|
|
31
|
-
this.silenceDurationMs = silenceDurationMs;
|
|
29
|
+
constructor(onCommit, policy = heuristicTurnPolicy) {
|
|
32
30
|
this.onCommit = onCommit;
|
|
33
31
|
this.policy = policy;
|
|
34
32
|
}
|
|
@@ -120,7 +118,7 @@ var TurnCoordinator = class {
|
|
|
120
118
|
}
|
|
121
119
|
schedule(text, decision, generation) {
|
|
122
120
|
if (generation !== this.decisionGeneration) return;
|
|
123
|
-
const holdMs = Math.max(FINAL_SETTLE_MS,
|
|
121
|
+
const holdMs = Math.max(FINAL_SETTLE_MS, Number.isFinite(decision.holdMs) ? Math.max(0, decision.holdMs) : 0);
|
|
124
122
|
this.timer = setTimeout(() => {
|
|
125
123
|
if (generation !== this.decisionGeneration) return;
|
|
126
124
|
const turnId = [...this.parts.keys()][0];
|
|
@@ -130,7 +128,7 @@ var TurnCoordinator = class {
|
|
|
130
128
|
}
|
|
131
129
|
this.reset();
|
|
132
130
|
if (decision.disposition !== "backchannel") this.onCommit(text, decision, turnId);
|
|
133
|
-
}, Math.max(FINAL_SETTLE_MS, this.stoppedAt + holdMs - Date.now()));
|
|
131
|
+
}, Math.max(decision.disposition === "wait" ? FINAL_SETTLE_MS : 0, this.stoppedAt + holdMs - Date.now()));
|
|
134
132
|
}
|
|
135
133
|
};
|
|
136
134
|
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Config } from '../../config/schema.js';
|
|
2
|
+
import type { AgentMessage } from '@earendil-works/pi-agent-core';
|
|
3
|
+
export interface VoiceUserSnapshot {
|
|
4
|
+
block: string;
|
|
5
|
+
preferredCallName?: string;
|
|
6
|
+
preferredCallNameObservedAt?: number;
|
|
7
|
+
isCurrent: () => boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Pinned owner profile, independent of query relevance, optional retrieval and chat-history clipping. */
|
|
10
|
+
export declare function buildVoiceUserContext(input: {
|
|
11
|
+
getConfig: () => Config;
|
|
12
|
+
conversationId: string;
|
|
13
|
+
history?: readonly AgentMessage[];
|
|
14
|
+
}): VoiceUserSnapshot | undefined;
|