@xopcai/xopc 0.0.242 → 0.0.244
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-MU5XrVv8.js → activity-store-CAah-_8h.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B_Wc0wuL.js → agent-avatar-dicebear-BhXGsupm.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Blzn2H6t.js +1 -0
- package/dist/gateway/static/root/assets/agents-Cmp-z8Y_.js +1 -0
- package/dist/gateway/static/root/assets/{api-DLyc8BQp.js → api-B2tKxbcz.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-CezjAP1K.js +1 -0
- package/dist/gateway/static/root/assets/{appearance-settings-DB5gEQhN.js → appearance-settings-C-CfS05x.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-7Y13_bqZ.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BOx0EJZs.js → archive-plugin-BmSx7wzY.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CYnYIyLr.js → attachment-load-DI4CoIga.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-ChTflpmA.js → automations-page-D04Xceck.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-wEO1OWk0.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BjbLfNwG.js → binary-plugins-BJQe8TRu.js} +1 -1
- package/dist/gateway/static/root/assets/block-editor-BSzGjJC6.js +185 -0
- package/dist/gateway/static/root/assets/browser-settings-page-DjAZ_LF2.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-DGQxD0vD.js → browser-workflow-inputs-CRnkgZHI.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-B9gfdd7L.js → browser-workflows-page-CwbxA3B7.js} +2 -2
- package/dist/gateway/static/root/assets/{button-CSEbl4zT.js → button-CtTvuElV.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-jt9bqUMK.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-Cz_TWY3a.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-TkU42f-W.js → channels-status-swr-DuY4MGxe.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CWMPcnoN.js → chat-terminal-dock-D3gj2D3U.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-Shs5vbzx.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-3h3rR0cf.js → cron-expression-DgWHw0jX.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Bz1sLBEx.js → date-picker-CKg-RPbs.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-p9DWR8uU.js → dependency-picker-CVYkw-NN.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D1TDB_gR.js → desktop-pet-Bf46oXTY.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DWPZpoB7.js → desktop-pet-settings-BJO_klc7.js} +1 -1
- package/dist/gateway/static/root/assets/dist-CpzYSoz7.js +1 -0
- package/dist/gateway/static/root/assets/{dist-DaxPZj9e.js → dist-DBS3OB8K.js} +1 -1
- package/dist/gateway/static/root/assets/dist-DLmwHyAh.js +1 -0
- package/dist/gateway/static/root/assets/es2015-BvLh9GaE.js +41 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BrRbK2rJ.js → extension-debug-page-T2PmFFOW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CD65czfS.js → extension-page-2wAE2RCe.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BRDDKhpi.js → extension-settings-page-Y9ZiCJ21.js} +1 -1
- package/dist/gateway/static/root/assets/{files-DQjhZjr2.js → files-D6vf3S30.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CjbBsr5M.js → gateway-config-api-DaYY1Gkn.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-HT7sLeO9.js → gateway-config-swr-BC3pgb_P.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BQjmfYD4.js → gateway-settings-eO3IzW_J.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-iBCtaAuT.js → gateway-startup-retry-uMcSfLru.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-BzZxLgrw.js → heartbeat-settings-BAgrkyHc.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-GTjKH7LK.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-dj9TNEn2.js → image-generation-api-D1qlQA-A.js} +1 -1
- package/dist/gateway/static/root/assets/index-DUz0O54y.js +71 -0
- package/dist/gateway/static/root/assets/index-Dbh5SXyV.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BEnuEPD3.js → keyboard-shortcuts-settings-CWGqL6o5.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DKJ-rks0.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DXQtppWq.js → local-apps-page-Bfidv29d.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DVzTJSj2.js → locale-store-CMZljTJx.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DwAHrPbF.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DIpBMWrA.js → management-settings-BG7j1I9f.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BFHyGwNF.js → markdown-split-AnmmpLs6.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DR3yVwtV.js → markdown-view-PPCLt7fu.js} +3 -3
- package/dist/gateway/static/root/assets/{media-plugins-BjjMxC5_.js → media-plugins-CGS-05cE.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CTSgFlE4.js +3 -0
- package/dist/gateway/static/root/assets/mobile-pairing-wizard-DoKK5GfV.js +1 -0
- package/dist/gateway/static/root/assets/models-hub-cache-ZrbGRiGY.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-BbvtelJa.js → notes-page-Lr8rsFAR.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-ISWnKLxO.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-BB-VYJ5j.js → oauth-api-4VeMbkTJ.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-C-Hj-nXR.js +1 -0
- package/dist/gateway/static/root/assets/{product-delivery-dUJgmBQZ.js → product-delivery-CV4pDOtG.js} +1 -1
- package/dist/gateway/static/root/assets/product-open-page-BU0HiZtv.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-BZqr4yam.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Dau8733A.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DXsR8oGN.js → registry-api-CWOtPFrE.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DdChlvGP.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DoEfLjPB.js → runtime-tools-settings-panel-CmZTNv1W.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-BsqpbBDv.js → schema-form-XlVPyiVQ.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-zIBW3wiV.js → schemas-BHS7bo06.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-C3kADsd4.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CSYy6SUa.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-CE7ZcCTK.js → settings-page-DblUeM3V.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CGlne9i0.js → setup-status-panel-bDfRfSnq.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Bn0qMX8V.js → share-preview-page-DBMWFMN-.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Bu6lIStj.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BNMc4l04.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-dRkeYh5P.js → skills-page-CSOseeQe.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page.utils-CniRGhkJ.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-C0ZCuCM4.js → system-settings-panel-D0GqNpKy.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BRCq-nR7.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-Cth-eChE.js → theme-store-uxUwr10D.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-BtjS2nrM.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-PSV89QuQ.js → use-autosave-TwuAycG8.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-CbqPu8xZ.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DXWdJ8cR.js → voice-api-key-field-CzwG5plu.js} +1 -1
- package/dist/gateway/static/root/assets/voice-config-api-MqyI6cgq.js +1 -0
- package/dist/gateway/static/root/assets/work-discovery-overlay-DS15FzQA.js +1 -0
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-C_boCemi.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-CaI2ruyy.js +5 -0
- package/dist/gateway/static/root/index.html +21 -22
- package/dist/package.js +1 -1
- package/dist/packages/realtime-protocol/src/voice-audio.js +20 -0
- package/dist/packages/realtime-protocol/src/voice.js +208 -0
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +1 -0
- package/dist/src/agent/embedded/run-for-session.js +3 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +2 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/prompt/voice-presentation.d.ts +2 -0
- package/dist/src/agent/prompt/voice-presentation.js +12 -0
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +1 -0
- package/dist/src/agent/service/process-direct-streaming.d.ts +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +2 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-config-service.js +4 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +8 -8
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +60 -0
- package/dist/src/config/schema.js +31 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/files/file-service.d.ts +1 -0
- package/dist/src/files/file-service.js +4 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/thinking-delta-coalescer.js +8 -3
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -11
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/lib/safe-voice-config.d.ts +14 -0
- package/dist/src/gateway/hono/lib/safe-voice-config.js +29 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +23 -23
- package/dist/src/gateway/hono/routes/files.js +7 -0
- package/dist/src/gateway/hono/routes/lazy-fallback.js +18 -4
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +14 -0
- package/dist/src/gateway/hono/routes/sessions.js +3 -0
- package/dist/src/gateway/hono/routes/voice.js +139 -2
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/server.js +1 -0
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +1 -6
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +19 -1
- package/dist/src/gateway/service.d.ts +2 -0
- package/dist/src/gateway/service.js +78 -5
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/media-understanding/types.d.ts +61 -0
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/client-history.js +12 -0
- package/dist/src/session/manager.d.ts +1 -0
- package/dist/src/session/session-context-for-llm.js +8 -0
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/session/store.js +1 -0
- package/dist/src/session/stored-rows-to-file-entries.js +5 -1
- package/dist/src/session/voice-transcript.d.ts +9 -0
- package/dist/src/session/voice-transcript.js +45 -0
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/storage/sqlite/config-repository.js +9 -0
- package/dist/src/storage/sqlite/remote-context-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/remote-context-repository.js +40 -0
- package/dist/src/storage/sqlite/session-repository.js +13 -0
- package/dist/src/storage/sqlite/user-context-repository.d.ts +3 -1
- package/dist/src/storage/sqlite/user-context-repository.js +50 -4
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +3 -2
- package/dist/src/user-context/automatic-context.d.ts +17 -0
- package/dist/src/user-context/automatic-context.js +85 -0
- package/dist/src/user-context/changes.d.ts +7 -0
- package/dist/src/user-context/changes.js +28 -0
- package/dist/src/user-context/planner.js +1 -24
- package/dist/src/user-context/retriever.js +10 -11
- package/dist/src/user-context/selection-policy.d.ts +20 -0
- package/dist/src/user-context/selection-policy.js +33 -0
- package/dist/src/user-context/sources/index.js +2 -2
- package/dist/src/user-context/sources/repository.d.ts +2 -1
- package/dist/src/user-context/sources/repository.js +26 -5
- package/dist/src/voice/dashscope/streaming-stt-session.d.ts +2 -0
- package/dist/src/voice/dashscope/streaming-stt-session.js +249 -0
- package/dist/src/voice/dashscope/streaming-tts-stream.d.ts +12 -0
- package/dist/src/voice/dashscope/streaming-tts-stream.js +153 -0
- package/dist/src/voice/realtime/agentEngine.d.ts +10 -0
- package/dist/src/voice/realtime/agentEngine.js +403 -0
- package/dist/src/voice/realtime/audio-playback-window.d.ts +9 -0
- package/dist/src/voice/realtime/audio-playback-window.js +49 -0
- package/dist/src/voice/realtime/conversation-context.d.ts +11 -0
- package/dist/src/voice/realtime/conversation-context.js +76 -0
- package/dist/src/voice/realtime/engine.d.ts +13 -0
- package/dist/src/voice/realtime/engine.js +1 -0
- package/dist/src/voice/realtime/memory-context.d.ts +17 -0
- package/dist/src/voice/realtime/memory-context.js +100 -0
- package/dist/src/voice/realtime/omniEngine.d.ts +18 -0
- package/dist/src/voice/realtime/omniEngine.js +443 -0
- package/dist/src/voice/realtime/omniRoute.d.ts +10 -0
- package/dist/src/voice/realtime/omniRoute.js +31 -0
- package/dist/src/voice/realtime/runtime.d.ts +99 -0
- package/dist/src/voice/realtime/runtime.js +622 -0
- package/dist/src/voice/realtime/speakable-segmenter.d.ts +10 -0
- package/dist/src/voice/realtime/speakable-segmenter.js +87 -0
- package/dist/src/voice/stt/list-providers.js +2 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +13 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +23 -0
- package/dist/src/voice/tts/factory.js +1 -0
- package/dist/src/voice/tts/openai-compatible-speech.js +3 -1
- package/dist/src/voice/tts/providers/alibaba-speech.d.ts +1 -5
- package/dist/src/voice/tts/providers/alibaba-speech.js +25 -8
- package/dist/src/voice/tts/providers/edge-speech.js +21 -22
- package/dist/src/voice/tts/providers/minimax-speech.js +6 -3
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +26 -1
- package/dist/src/voice/tts/speak-core.d.ts +6 -2
- package/dist/src/voice/tts/speak-core.js +46 -34
- package/dist/src/voice/tts/speech-provider-types.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +7 -7
- package/dist/gateway/static/root/assets/Combination-14nmIgxH.js +0 -41
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Cf7U2aUi.js +0 -1
- package/dist/gateway/static/root/assets/agents-Ce9oOnwE.js +0 -1
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-CACOOS-a.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BaTFOCmR.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DK6EreCr.js +0 -6
- package/dist/gateway/static/root/assets/block-editor-DgAs5aJc.js +0 -184
- package/dist/gateway/static/root/assets/browser-settings-page-CHStw5UW.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-JGH6Kfkr.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-YkUaaWkY.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BI0FG3gA.js +0 -2
- package/dist/gateway/static/root/assets/dist-BPoKqzeH.js +0 -1
- package/dist/gateway/static/root/assets/dist-DqPZM2MH.js +0 -1
- package/dist/gateway/static/root/assets/home-page--9fKq0mL.js +0 -1
- package/dist/gateway/static/root/assets/index-D499B1qS.css +0 -2
- package/dist/gateway/static/root/assets/index-J3FsIvTs.js +0 -70
- package/dist/gateway/static/root/assets/local-app-workbench-page-FqG00zS1.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-c6CfZ8PA.js +0 -2
- package/dist/gateway/static/root/assets/messages-_tYhRAHD.js +0 -3
- package/dist/gateway/static/root/assets/mobile-pairing-wizard-CHnXZTwb.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-DiXjKuuY.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-DIR37b-K.js +0 -4
- package/dist/gateway/static/root/assets/popover-select-DrILF6mR.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-CRm9Q66h.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DHiLTiRW.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-God7NCcI.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-YpF0-mx2.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CP8O1TxR.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DzdbK3j9.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-B7NeVl4g.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DDTmi4a7.js +0 -1
- package/dist/gateway/static/root/assets/skills-page.utils--q8p7MAn.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-yiMzii2b.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-CC3jOB4n.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Vtwg7fQc.js +0 -1
- package/dist/gateway/static/root/assets/voice-config-api-BDoeXgww.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-BV_Jj5iD.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-DNHbWGPq.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-BkFIbMrz.js +0 -5
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
6
|
-
import { formatExamples, register } from "../registry.js";
|
|
7
6
|
import "../../config/index.js";
|
|
7
|
+
import { formatExamples, register } from "../registry.js";
|
|
8
8
|
import { ensureFrpcBinary } from "../../tunnel/frpc-binary.js";
|
|
9
9
|
import { resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "../../tunnel/env.js";
|
|
10
10
|
import { getTunnelService } from "../../tunnel/tunnel-service.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import "../../config/index.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
6
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
7
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
@@ -4,9 +4,9 @@ import { ExtensionLoader } from "../extensions/loader.js";
|
|
|
4
4
|
import "../extensions/index.js";
|
|
5
5
|
import { MessageBus } from "../infra/bus/queue.js";
|
|
6
6
|
import "../infra/bus/index.js";
|
|
7
|
-
import { createDefaultContext } from "./registry.js";
|
|
8
7
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
9
8
|
import "../config/index.js";
|
|
9
|
+
import { createDefaultContext } from "./registry.js";
|
|
10
10
|
import { registerExtensionCliProgram } from "../extensions/sdk/channel-helpers.js";
|
|
11
11
|
import { join } from "path";
|
|
12
12
|
//#region src/cli/extension-cli-register.ts
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,21 +2,21 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
8
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
9
10
|
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
10
|
-
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
11
11
|
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
|
+
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
|
+
import { diffConfigPaths } from "./diff.js";
|
|
16
17
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
17
18
|
import { listAgentProfileMarkdownDirs, listAgentWorkspaceDirs } from "./workspace-dirs.js";
|
|
18
19
|
import { ProfileManager, createProfile, deleteProfile, getCurrentProfile, getProfileManager, getProfileNameFromDir, getSwitchCommand, listProfiles, resolveProfileStateDir } from "./profile.js";
|
|
19
|
-
import { diffConfigPaths } from "./diff.js";
|
|
20
20
|
import { BASE_RELOAD_RULES, buildReloadPlan, matchReloadRule } from "./rules.js";
|
|
21
21
|
import { ConfigHotReloader } from "./reload.js";
|
|
22
22
|
//#region src/config/index.ts
|
|
@@ -2,8 +2,8 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
5
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
7
|
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
8
8
|
import { dirname } from "path";
|
|
9
9
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
@@ -29,11 +29,11 @@ export declare const OpenAICompletionsCompatSchema: z.ZodObject<{
|
|
|
29
29
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
32
|
-
zai: "zai";
|
|
33
32
|
"ant-ling": "ant-ling";
|
|
34
33
|
openai: "openai";
|
|
35
34
|
deepseek: "deepseek";
|
|
36
35
|
openrouter: "openrouter";
|
|
36
|
+
zai: "zai";
|
|
37
37
|
together: "together";
|
|
38
38
|
baseten: "baseten";
|
|
39
39
|
dashscope: "dashscope";
|
|
@@ -67,11 +67,11 @@ export declare const OpenAICompatSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
67
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
68
68
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
69
69
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
zai: "zai";
|
|
71
70
|
"ant-ling": "ant-ling";
|
|
72
71
|
openai: "openai";
|
|
73
72
|
deepseek: "deepseek";
|
|
74
73
|
openrouter: "openrouter";
|
|
74
|
+
zai: "zai";
|
|
75
75
|
together: "together";
|
|
76
76
|
baseten: "baseten";
|
|
77
77
|
dashscope: "dashscope";
|
|
@@ -312,11 +312,11 @@ export declare const CustomModelSchema: z.ZodObject<{
|
|
|
312
312
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
313
313
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
314
314
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
315
|
-
zai: "zai";
|
|
316
315
|
"ant-ling": "ant-ling";
|
|
317
316
|
openai: "openai";
|
|
318
317
|
deepseek: "deepseek";
|
|
319
318
|
openrouter: "openrouter";
|
|
319
|
+
zai: "zai";
|
|
320
320
|
together: "together";
|
|
321
321
|
baseten: "baseten";
|
|
322
322
|
dashscope: "dashscope";
|
|
@@ -375,11 +375,11 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
375
375
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
376
376
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
377
377
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
378
|
-
zai: "zai";
|
|
379
378
|
"ant-ling": "ant-ling";
|
|
380
379
|
openai: "openai";
|
|
381
380
|
deepseek: "deepseek";
|
|
382
381
|
openrouter: "openrouter";
|
|
382
|
+
zai: "zai";
|
|
383
383
|
together: "together";
|
|
384
384
|
baseten: "baseten";
|
|
385
385
|
dashscope: "dashscope";
|
|
@@ -466,11 +466,11 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
466
466
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
467
467
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
468
468
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
469
|
-
zai: "zai";
|
|
470
469
|
"ant-ling": "ant-ling";
|
|
471
470
|
openai: "openai";
|
|
472
471
|
deepseek: "deepseek";
|
|
473
472
|
openrouter: "openrouter";
|
|
473
|
+
zai: "zai";
|
|
474
474
|
together: "together";
|
|
475
475
|
baseten: "baseten";
|
|
476
476
|
dashscope: "dashscope";
|
|
@@ -529,11 +529,11 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
529
529
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
530
530
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
531
531
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
532
|
-
zai: "zai";
|
|
533
532
|
"ant-ling": "ant-ling";
|
|
534
533
|
openai: "openai";
|
|
535
534
|
deepseek: "deepseek";
|
|
536
535
|
openrouter: "openrouter";
|
|
536
|
+
zai: "zai";
|
|
537
537
|
together: "together";
|
|
538
538
|
baseten: "baseten";
|
|
539
539
|
dashscope: "dashscope";
|
|
@@ -701,11 +701,11 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
701
701
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
702
702
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
703
703
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
704
|
-
zai: "zai";
|
|
705
704
|
"ant-ling": "ant-ling";
|
|
706
705
|
openai: "openai";
|
|
707
706
|
deepseek: "deepseek";
|
|
708
707
|
openrouter: "openrouter";
|
|
708
|
+
zai: "zai";
|
|
709
709
|
together: "together";
|
|
710
710
|
baseten: "baseten";
|
|
711
711
|
dashscope: "dashscope";
|
|
@@ -764,11 +764,11 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
764
764
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
765
765
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
766
766
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
767
|
-
zai: "zai";
|
|
768
767
|
"ant-ling": "ant-ling";
|
|
769
768
|
openai: "openai";
|
|
770
769
|
deepseek: "deepseek";
|
|
771
770
|
openrouter: "openrouter";
|
|
771
|
+
zai: "zai";
|
|
772
772
|
together: "together";
|
|
773
773
|
baseten: "baseten";
|
|
774
774
|
dashscope: "dashscope";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
2
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
4
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
@@ -1071,6 +1071,36 @@ export declare const VoiceConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1071
1071
|
customInstruction: z.ZodOptional<z.ZodString>;
|
|
1072
1072
|
}, z.core.$strict>>;
|
|
1073
1073
|
}, z.core.$strict>>;
|
|
1074
|
+
realtime: z.ZodDefault<z.ZodObject<{
|
|
1075
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1076
|
+
defaultEngine: z.ZodDefault<z.ZodEnum<{
|
|
1077
|
+
agent: "agent";
|
|
1078
|
+
omni: "omni";
|
|
1079
|
+
}>>;
|
|
1080
|
+
silenceDurationMs: z.ZodDefault<z.ZodNumber>;
|
|
1081
|
+
idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1082
|
+
maxDictationMs: z.ZodDefault<z.ZodNumber>;
|
|
1083
|
+
maxConversationMs: z.ZodDefault<z.ZodNumber>;
|
|
1084
|
+
bargeIn: z.ZodDefault<z.ZodBoolean>;
|
|
1085
|
+
tts: z.ZodOptional<z.ZodObject<{
|
|
1086
|
+
provider: z.ZodEnum<{
|
|
1087
|
+
alibaba: "alibaba";
|
|
1088
|
+
"xopc-cloud": "xopc-cloud";
|
|
1089
|
+
}>;
|
|
1090
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
1091
|
+
}, z.core.$strict>>;
|
|
1092
|
+
omni: z.ZodOptional<z.ZodObject<{
|
|
1093
|
+
provider: z.ZodEnum<{
|
|
1094
|
+
alibaba: "alibaba";
|
|
1095
|
+
"xopc-cloud": "xopc-cloud";
|
|
1096
|
+
}>;
|
|
1097
|
+
model: z.ZodString;
|
|
1098
|
+
voice: z.ZodString;
|
|
1099
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
instructions: z.ZodDefault<z.ZodString>;
|
|
1102
|
+
}, z.core.$strict>>;
|
|
1103
|
+
}, z.core.$strict>>;
|
|
1074
1104
|
}, z.core.$strict>>;
|
|
1075
1105
|
export declare const MessagesConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
1076
1106
|
tts: z.ZodOptional<z.ZodObject<{
|
|
@@ -2183,6 +2213,36 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2183
2213
|
customInstruction: z.ZodOptional<z.ZodString>;
|
|
2184
2214
|
}, z.core.$strict>>;
|
|
2185
2215
|
}, z.core.$strict>>;
|
|
2216
|
+
realtime: z.ZodDefault<z.ZodObject<{
|
|
2217
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2218
|
+
defaultEngine: z.ZodDefault<z.ZodEnum<{
|
|
2219
|
+
agent: "agent";
|
|
2220
|
+
omni: "omni";
|
|
2221
|
+
}>>;
|
|
2222
|
+
silenceDurationMs: z.ZodDefault<z.ZodNumber>;
|
|
2223
|
+
idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
2224
|
+
maxDictationMs: z.ZodDefault<z.ZodNumber>;
|
|
2225
|
+
maxConversationMs: z.ZodDefault<z.ZodNumber>;
|
|
2226
|
+
bargeIn: z.ZodDefault<z.ZodBoolean>;
|
|
2227
|
+
tts: z.ZodOptional<z.ZodObject<{
|
|
2228
|
+
provider: z.ZodEnum<{
|
|
2229
|
+
alibaba: "alibaba";
|
|
2230
|
+
"xopc-cloud": "xopc-cloud";
|
|
2231
|
+
}>;
|
|
2232
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
2233
|
+
}, z.core.$strict>>;
|
|
2234
|
+
omni: z.ZodOptional<z.ZodObject<{
|
|
2235
|
+
provider: z.ZodEnum<{
|
|
2236
|
+
alibaba: "alibaba";
|
|
2237
|
+
"xopc-cloud": "xopc-cloud";
|
|
2238
|
+
}>;
|
|
2239
|
+
model: z.ZodString;
|
|
2240
|
+
voice: z.ZodString;
|
|
2241
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
2242
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
2243
|
+
instructions: z.ZodDefault<z.ZodString>;
|
|
2244
|
+
}, z.core.$strict>>;
|
|
2245
|
+
}, z.core.$strict>>;
|
|
2186
2246
|
}, z.core.$strict>>;
|
|
2187
2247
|
update: z.ZodOptional<z.ZodObject<{
|
|
2188
2248
|
checkOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -800,7 +800,37 @@ activityDetailDefault: z.enum([
|
|
|
800
800
|
VoiceConfigSchema = z.object({
|
|
801
801
|
languageMode: z.enum(["auto", "manual"]).optional(),
|
|
802
802
|
language: z.enum(["en", "zh"]).optional(),
|
|
803
|
-
input: z.object({ refinement: VoiceRefinementConfigSchema.optional() }).strict().optional()
|
|
803
|
+
input: z.object({ refinement: VoiceRefinementConfigSchema.optional() }).strict().optional(),
|
|
804
|
+
realtime: z.object({
|
|
805
|
+
enabled: z.boolean().default(false),
|
|
806
|
+
defaultEngine: z.enum(["agent", "omni"]).default("agent"),
|
|
807
|
+
silenceDurationMs: z.number().int().min(300).max(2e3).default(700),
|
|
808
|
+
idleTimeoutMs: z.number().int().min(1e4).max(3e5).default(6e4),
|
|
809
|
+
maxDictationMs: z.number().int().min(1e4).max(36e5).default(6e5),
|
|
810
|
+
maxConversationMs: z.number().int().min(1e4).max(72e5).default(36e5),
|
|
811
|
+
bargeIn: z.boolean().default(true),
|
|
812
|
+
/** Conversation output selection; credentials stay in the provider configuration. */
|
|
813
|
+
tts: z.object({
|
|
814
|
+
provider: z.enum(["alibaba", "xopc-cloud"]),
|
|
815
|
+
voice: z.string().trim().min(1).max(200).optional()
|
|
816
|
+
}).strict().optional(),
|
|
817
|
+
omni: z.object({
|
|
818
|
+
provider: z.enum(["alibaba", "xopc-cloud"]),
|
|
819
|
+
model: z.string().min(1).max(200),
|
|
820
|
+
voice: z.string().min(1).max(100),
|
|
821
|
+
baseUrl: z.string().url().optional(),
|
|
822
|
+
apiKey: z.string().min(1).optional(),
|
|
823
|
+
instructions: z.string().max(8e3).default("You are a friendly voice companion. Keep replies conversational and concise. You cannot execute tools or perform actions.")
|
|
824
|
+
}).strict().optional()
|
|
825
|
+
}).strict().default({
|
|
826
|
+
enabled: false,
|
|
827
|
+
defaultEngine: "agent",
|
|
828
|
+
silenceDurationMs: 700,
|
|
829
|
+
idleTimeoutMs: 6e4,
|
|
830
|
+
maxDictationMs: 6e5,
|
|
831
|
+
maxConversationMs: 36e5,
|
|
832
|
+
bargeIn: true
|
|
833
|
+
})
|
|
804
834
|
}).strict().optional();
|
|
805
835
|
MessagesConfigSchema = z.object({
|
|
806
836
|
/** Voice (text-to-speech) output configuration. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
3
|
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -289,6 +289,10 @@ var FileSpaceService = class {
|
|
|
289
289
|
absolutePath
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
+
async rootResource(spaceId) {
|
|
293
|
+
const space = await this.get(spaceId);
|
|
294
|
+
return fileResourceFromPath(space, await resolveFilePath(space.root, ""));
|
|
295
|
+
}
|
|
292
296
|
async children(spaceId, path = "") {
|
|
293
297
|
const space = await this.get(spaceId);
|
|
294
298
|
const directory = await resolveFilePath(space.root, path);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
2
|
-
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
2
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
3
|
+
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
6
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
@@ -35,7 +35,12 @@ async function* coalesceThinkingDeltas(source, options = {}) {
|
|
|
35
35
|
if (!Number.isFinite(windowMs) || windowMs <= 0) throw new Error("thinking delta coalescer windowMs must be greater than zero");
|
|
36
36
|
if (!Number.isInteger(maxChars) || maxChars <= 0) throw new Error("thinking delta coalescer maxChars must be a positive integer");
|
|
37
37
|
const iterator = source[Symbol.asyncIterator]();
|
|
38
|
-
|
|
38
|
+
const readNext = () => {
|
|
39
|
+
const result = iterator.next();
|
|
40
|
+
result.catch(() => {});
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
let next = readNext();
|
|
39
44
|
let pending;
|
|
40
45
|
let deadlineAt = 0;
|
|
41
46
|
try {
|
|
@@ -43,7 +48,7 @@ async function* coalesceThinkingDeltas(source, options = {}) {
|
|
|
43
48
|
if (!pending) {
|
|
44
49
|
const result = await next;
|
|
45
50
|
if (result.done) break;
|
|
46
|
-
next =
|
|
51
|
+
next = readNext();
|
|
47
52
|
if (!isThinkingDelta(result.value)) {
|
|
48
53
|
yield result.value;
|
|
49
54
|
continue;
|
|
@@ -68,7 +73,7 @@ async function* coalesceThinkingDeltas(source, options = {}) {
|
|
|
68
73
|
pending = void 0;
|
|
69
74
|
break;
|
|
70
75
|
}
|
|
71
|
-
next =
|
|
76
|
+
next = readNext();
|
|
72
77
|
const event = result.value;
|
|
73
78
|
if (!isThinkingDelta(event) || !belongsToSameThinkingStream(pending, event)) {
|
|
74
79
|
yield pending;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
3
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
4
|
+
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { shouldSilence, stripHeartbeatToken } from "../../heartbeat/tokens.js";
|
|
4
|
+
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
4
5
|
import { isWithinActiveHours } from "../../heartbeat/active-hours.js";
|
|
5
6
|
import { isHeartbeatContentEmpty } from "../../heartbeat/content-check.js";
|
|
6
|
-
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
7
7
|
import { createHeartbeatWake } from "../../heartbeat/wake.js";
|
|
8
8
|
import { resolveHeartbeatMdPath } from "../workspace-heartbeat-path.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
@@ -274,17 +274,7 @@ export declare function buildSafeWebConfigPayload(service: GatewayService, optio
|
|
|
274
274
|
};
|
|
275
275
|
stt: unknown;
|
|
276
276
|
tts: unknown;
|
|
277
|
-
voice:
|
|
278
|
-
languageMode?: "manual" | "auto";
|
|
279
|
-
language?: "en" | "zh";
|
|
280
|
-
input?: {
|
|
281
|
-
refinement?: {
|
|
282
|
-
mode: "off" | "custom" | "punctuation" | "light";
|
|
283
|
-
model?: string;
|
|
284
|
-
customInstruction?: string;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
};
|
|
277
|
+
voice: unknown;
|
|
288
278
|
tools: {
|
|
289
279
|
web: {
|
|
290
280
|
region: "cn" | "global" | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextCompactionPolicySchema, UserContextDreamingSchema, UserContextPrivacySchema, init_config } from "../../../user-context/config.js";
|
|
2
2
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
3
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
4
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
4
5
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
5
6
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
8
8
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
9
9
|
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
@@ -13,7 +13,7 @@ import { GENERIC_MASKED_SECRET, maskSecretLength } from "./mask-secret-length.js
|
|
|
13
13
|
import { safeToolsWebForGet } from "../../config-tools-web.js";
|
|
14
14
|
import { maskTunnelSecretForWeb } from "../../../tunnel/env.js";
|
|
15
15
|
import { buildSafeProvidersConfigForWeb } from "./safe-providers-config.js";
|
|
16
|
-
import { maskSttConfigForWeb, maskTtsConfigForWeb } from "./safe-voice-config.js";
|
|
16
|
+
import { maskRealtimeVoiceConfigForWeb, maskSttConfigForWeb, maskTtsConfigForWeb } from "./safe-voice-config.js";
|
|
17
17
|
//#region src/gateway/hono/lib/config-payload.ts
|
|
18
18
|
init_agent_scope();
|
|
19
19
|
init_channel_catalog_service();
|
|
@@ -195,7 +195,7 @@ async function buildSafeWebConfigPayload(service, options = {}) {
|
|
|
195
195
|
update: { ...resolveUpdateConfigForWeb(config) },
|
|
196
196
|
stt: maskSttConfigForWeb(config.tools?.media?.audio),
|
|
197
197
|
tts: maskTtsConfigForWeb(config.messages?.tts),
|
|
198
|
-
voice: config.voice,
|
|
198
|
+
voice: maskRealtimeVoiceConfigForWeb(config.voice),
|
|
199
199
|
tools: safeToolsWebForGet(config),
|
|
200
200
|
bindings: Array.isArray(config.bindings) ? config.bindings : [],
|
|
201
201
|
mcp: buildSafeMcpConfigForWeb(config)
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export declare function maskRealtimeVoiceConfigForWeb(voice: {
|
|
2
|
+
realtime?: {
|
|
3
|
+
omni?: {
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
} | undefined): unknown;
|
|
8
|
+
export declare function mergeRealtimeVoiceConfigPatch(previous: {
|
|
9
|
+
realtime?: {
|
|
10
|
+
omni?: {
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | undefined, incoming: unknown): unknown;
|
|
1
15
|
/** Mask STT api keys for GET `/api/config`. */
|
|
2
16
|
export declare function maskSttConfigForWeb(stt: unknown): unknown;
|
|
3
17
|
/** Mask TTS api keys for GET `/api/config`. */
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
import { maskSecretLength } from "./mask-secret-length.js";
|
|
2
2
|
import { isMaskedApiKey } from "../../config-tools-web.js";
|
|
3
3
|
//#region src/gateway/hono/lib/safe-voice-config.ts
|
|
4
|
+
function maskRealtimeVoiceConfigForWeb(voice) {
|
|
5
|
+
if (!voice?.realtime?.omni) return voice;
|
|
6
|
+
return {
|
|
7
|
+
...voice,
|
|
8
|
+
realtime: {
|
|
9
|
+
...voice.realtime,
|
|
10
|
+
omni: maskProviderSlice(voice.realtime.omni)
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function mergeRealtimeVoiceConfigPatch(previous, incoming) {
|
|
15
|
+
if (!incoming || typeof incoming !== "object" || Array.isArray(incoming)) return incoming;
|
|
16
|
+
const patch = incoming;
|
|
17
|
+
const realtime = patch.realtime;
|
|
18
|
+
const omni = realtime?.omni;
|
|
19
|
+
if (!omni || typeof omni !== "object" || Array.isArray(omni)) return incoming;
|
|
20
|
+
const apiKey = omni.apiKey === "" ? void 0 : mergeApiKeyField(omni.apiKey, previous?.realtime?.omni?.apiKey);
|
|
21
|
+
return {
|
|
22
|
+
...patch,
|
|
23
|
+
realtime: {
|
|
24
|
+
...realtime,
|
|
25
|
+
omni: {
|
|
26
|
+
...omni,
|
|
27
|
+
...omni.apiKey !== void 0 ? { apiKey } : {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
4
32
|
function maskProviderSlice(slice) {
|
|
5
33
|
const next = { ...slice };
|
|
6
34
|
if (typeof next.apiKey === "string" && next.apiKey.trim()) next.apiKey = maskSecretLength(next.apiKey);
|
|
@@ -64,4 +92,4 @@ function mergeTtsConfigPatch(previous, incoming) {
|
|
|
64
92
|
return mergeVoiceConfigPatch(previous, incoming);
|
|
65
93
|
}
|
|
66
94
|
//#endregion
|
|
67
|
-
export { maskSttConfigForWeb, maskTtsConfigForWeb, mergeSttConfigPatch, mergeTtsConfigPatch };
|
|
95
|
+
export { maskRealtimeVoiceConfigForWeb, maskSttConfigForWeb, maskTtsConfigForWeb, mergeRealtimeVoiceConfigPatch, mergeSttConfigPatch, mergeTtsConfigPatch };
|
|
@@ -9,7 +9,7 @@ import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
|
9
9
|
import { applyToolsWebPatch } from "../../../config-tools-web.js";
|
|
10
10
|
import { mergeTunnelConfigPatch } from "../../../../tunnel/tunnel-config.js";
|
|
11
11
|
import { assertGatewayRuntimeConfig } from "../../../runtime-config.js";
|
|
12
|
-
import { mergeSttConfigPatch, mergeTtsConfigPatch } from "../../lib/safe-voice-config.js";
|
|
12
|
+
import { mergeRealtimeVoiceConfigPatch, mergeSttConfigPatch, mergeTtsConfigPatch } from "../../lib/safe-voice-config.js";
|
|
13
13
|
import { PATCH_OK, patchError } from "./result.js";
|
|
14
14
|
//#region src/gateway/hono/routes/config-patch/misc.ts
|
|
15
15
|
init_schema();
|
|
@@ -137,7 +137,7 @@ async function applyMiscPatch(config, body) {
|
|
|
137
137
|
config.messages.tts = mergeTtsConfigPatch(config.messages.tts, body.tts);
|
|
138
138
|
}
|
|
139
139
|
if (body.voice !== void 0) {
|
|
140
|
-
const parsed = VoiceConfigSchema.safeParse(body.voice);
|
|
140
|
+
const parsed = VoiceConfigSchema.safeParse(mergeRealtimeVoiceConfigPatch(config.voice, body.voice));
|
|
141
141
|
if (!parsed.success) return patchError(parsed.error.issues.map((i) => i.message).join("; "));
|
|
142
142
|
config.voice = parsed.data;
|
|
143
143
|
}
|
|
@@ -463,6 +463,29 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
463
463
|
}, 400);
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
|
+
authenticated.get("/api/connectors/approvals", (c) => {
|
|
467
|
+
const status = c.req.query("status");
|
|
468
|
+
if (status && !new Set([
|
|
469
|
+
"pending",
|
|
470
|
+
"approved",
|
|
471
|
+
"denied",
|
|
472
|
+
"expired",
|
|
473
|
+
"consumed"
|
|
474
|
+
]).has(status)) return c.json({
|
|
475
|
+
ok: false,
|
|
476
|
+
error: "Invalid approval status."
|
|
477
|
+
}, 400);
|
|
478
|
+
const approvals = listConnectorApprovals({
|
|
479
|
+
principalId: c.req.query("principalId")?.trim() || "local-owner",
|
|
480
|
+
sessionKey: c.req.query("sessionKey")?.trim() || void 0,
|
|
481
|
+
status,
|
|
482
|
+
limit: Number(c.req.query("limit") ?? "100")
|
|
483
|
+
});
|
|
484
|
+
return c.json({
|
|
485
|
+
ok: true,
|
|
486
|
+
payload: { approvals }
|
|
487
|
+
});
|
|
488
|
+
});
|
|
466
489
|
authenticated.get("/api/connectors/:id", (c) => {
|
|
467
490
|
const connectorId = c.req.param("id");
|
|
468
491
|
const connector = getConnectorDefinition(connectorId);
|
|
@@ -558,29 +581,6 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
558
581
|
}, 400);
|
|
559
582
|
}
|
|
560
583
|
});
|
|
561
|
-
authenticated.get("/api/connectors/approvals", (c) => {
|
|
562
|
-
const status = c.req.query("status");
|
|
563
|
-
if (status && !new Set([
|
|
564
|
-
"pending",
|
|
565
|
-
"approved",
|
|
566
|
-
"denied",
|
|
567
|
-
"expired",
|
|
568
|
-
"consumed"
|
|
569
|
-
]).has(status)) return c.json({
|
|
570
|
-
ok: false,
|
|
571
|
-
error: "Invalid approval status."
|
|
572
|
-
}, 400);
|
|
573
|
-
const approvals = listConnectorApprovals({
|
|
574
|
-
principalId: c.req.query("principalId")?.trim() || "local-owner",
|
|
575
|
-
sessionKey: c.req.query("sessionKey")?.trim() || void 0,
|
|
576
|
-
status,
|
|
577
|
-
limit: Number(c.req.query("limit") ?? "100")
|
|
578
|
-
});
|
|
579
|
-
return c.json({
|
|
580
|
-
ok: true,
|
|
581
|
-
payload: { approvals }
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
584
|
authenticated.post("/api/connectors/approvals/respond", strictRateLimitMiddleware, async (c) => {
|
|
585
585
|
const body = await c.req.json().catch(() => ({}));
|
|
586
586
|
const record = body && typeof body === "object" && !Array.isArray(body) ? body : {};
|
|
@@ -86,6 +86,13 @@ function registerFilesRoutes(authenticated, deps) {
|
|
|
86
86
|
return errorResponse(c, error);
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
+
authenticated.get("/api/files/spaces/:id/root", async (c) => {
|
|
90
|
+
try {
|
|
91
|
+
return c.json({ resource: await files.rootResource(c.req.param("id")) });
|
|
92
|
+
} catch (error) {
|
|
93
|
+
return errorResponse(c, error);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
89
96
|
authenticated.get("/api/files/recent", async (c) => {
|
|
90
97
|
try {
|
|
91
98
|
const limit = Math.min(100, Math.max(1, Number(c.req.query("limit")) || 50));
|