@xopcai/xopc 0.0.378 → 0.0.381
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-Xnu0H9yx.js → activity-store-D2oKh5ik.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-sKMpwYNC.js → agent-avatar-dicebear-BnMiU8HX.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Ddv61pUQ.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CxZeGEuL.js → agent-plugin-dialog-C7z3r3Z3.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BstMN5nH.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-DFBVz3bV.js → agents-admin-api-D-DNV0ms.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CWqbEntC.js → app-management-settings-panel-D2boumUX.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-QznCLnam.js → appearance-settings-Cwf53Rqo.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-wbVq-6PP.js → apps-page-CwWCU5Ib.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BclI5H7-.js → archive-plugin-DivP9LfK.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CTKIwPAS.js → automations-page-DztgYZdC.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-SVRa19EF.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-D9FwadCs.js → binary-plugins-f-JnMRA1.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Dqqtybdf.js → block-editor-CEnzVIbk.js} +39 -39
- package/dist/gateway/static/root/assets/{browser-automation-inputs-FGALoJY8.js → browser-automation-inputs-DD-SUHmv.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-hQbQFWl-.js → browser-automations-page-m-9ETOOE.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-settings-page-DQvfXaeq.js → browser-settings-page-DN37CRLL.js} +2 -2
- package/dist/gateway/static/root/assets/{cn-JdwAhgNB.js → bundle-mjs-rHxsej31.js} +1 -1
- package/dist/gateway/static/root/assets/{button-CS04eWY9.js → button-aIC072nz.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CQuaJBPv.js → capabilities-BOJYAeEJ.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-ClI4hof_.js → capabilities-Bf6NYuvT.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-D1MJHORS.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DmwDOIlV.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-XMz78V4c.js → capability-header-actions-DG-feQV0.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-icon-BYm2-nS-.js → capability-icon-DVoZxEgW.js} +1 -1
- package/dist/gateway/static/root/assets/channels-Bl6g4Dg9.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dr3rujcs.js → chat-terminal-dock-CE3tIjLW.js} +2 -2
- package/dist/gateway/static/root/assets/cn-0WouolD0.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-G2lMB7CR.js → computer-settings-page-UMzIyZN5.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Cne5MBuz.js → connector-service-page-P6yEnQ6H.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DXhBTvqp.js +1 -0
- package/dist/gateway/static/root/assets/{copy-text-row-C1gaJwlZ.js → copy-text-row-C7egVuKr.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-yGmnkoC5.js → date-picker-eg-Uf9Wx.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-CdKC_TNa.js → dependency-picker-BEn7eZXu.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C4d305Me.js → desktop-pet-DPAFil05.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-hCS9Mddt.js → desktop-pet-settings-DK38Nevi.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-sprite-DTqXSpqf.js → desktop-pet-sprite-BP6iMVw1.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-C6qeCyfO.js → device-pairing-wizard-DaRk9VLg.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-kYdBIm8m.js → directory-picker-path-field-Dm7jp0Y9.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-odpIjn1q.js → extension-debug-page-DJ1wFpMs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C6Jn5baO.js → extension-page-tPkDLwrG.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DB4M3dc8.js → extension-provider-Dnz8j6Q_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Clx81lZy.js → extension-settings-page-Vp9FPajP.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-pBVU4PxA.js → fallback-models-DirZnl7x.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-ArYo4YFd.js → gateway-config-swr-f-4qw3AG.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BaE0shFY.js → gateway-realtime-BGhPOSfz.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BYe-jWB1.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CRbb12ar.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BRCCiCBH.js → gateway-startup-retry-90pvxKox.js} +1 -1
- package/dist/gateway/static/root/assets/highlight-code-BH65IIbJ.js +1 -0
- package/dist/gateway/static/root/assets/highlighted-body-KQOG7T2V-DdDvTjik.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BeIZyioN.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-B5FwRmo9.js → image-generation-api-CtDjTXwX.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-7s8jzc2G.js → imports-page-KIeykeaL.js} +1 -1
- package/dist/gateway/static/root/assets/index-DxydK_AA.js +255 -0
- package/dist/gateway/static/root/assets/index-_xgO2IDa.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CyFSxteg.js → keyboard-shortcuts-settings-5Df9Rng_.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-B-hYeH8P.js → local-app-workbench-page-BSuq_SAr.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CFt8G-ae.js → local-apps-page-D5-69OHu.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CLR702g5.js → local-session-drafts-CrD74S6k.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CeoW7A5a.js → locale-store-pmT2B_By.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BQ9AzAj9.js → logs-page-DHYqPwJ3.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-BDuuXJ5t.js → management-settings-uIgzZZ_J.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DSjfHfaW.css → markdown-view-ByJbFign.css} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-CZlvyzow.js +66 -0
- package/dist/gateway/static/root/assets/{media-plugins-hqKbHVyi.js → media-plugins-BtFqN13D.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DOTWm1iy.js +1 -0
- package/dist/gateway/static/root/assets/mermaid-render-604gISVe.js +134 -0
- package/dist/gateway/static/root/assets/{messages-BpEhZm54.js → messages-Ib6DaUTo.js} +2 -2
- package/dist/gateway/static/root/assets/models-hub-cache-3slk24cw.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-G_6LpTik.js → note-detail-panel-sujG9ZmW.js} +3 -3
- package/dist/gateway/static/root/assets/{note-image-lightbox-1qg2v-9j.js → note-image-lightbox-BYNLO2pt.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-api-B0QQSN4M.js → notes-api-D-VLGhjV.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-C_4Ib15d.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Dp1RoS6x.js → page-context-capture-button-DErqGBBe.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-D2xpUV26.js → page-tabs-BLGO2VIm.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CC3W2EZ0.js +1 -0
- package/dist/gateway/static/root/assets/{popover-select-BgSdSbCL.js → popover-select-DHC7J4lG.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Dvey7GwU.js → preview-open-alternatives-BJU2fmPn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DZyCQVVW.js → product-open-page-B3qxtYyi.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CrfIfrVJ.js → product-preview-content-NOhtxfkq.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-7BFqLZj4.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-DZ98gcjB.js → projects-page-qhnc7oNj.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Dzl61MkW.js → registry-api-Bi4muyaZ.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CS-zmmtV.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Cg9dqJon.js → runtime-tools-api-9bk1payF.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-oEdBs0He.js → runtime-tools-settings-panel-B55OozGG.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-CVlz-PiN.js → scenes-page-BJZqRz8a.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DIC8IlM1.js → schema-form-BND8Hs4C.js} +1 -1
- package/dist/gateway/static/root/assets/{secret-input-D93UrW4C.js → secret-input-BxWHx6J6.js} +1 -1
- package/dist/gateway/static/root/assets/send-session-input-BtF5UWGp.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-CVHFZq_A.js → session-api-D2J6VacQ.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-64DD1cxN.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-U5k3iucx.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-D8dOvd8T.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-exRhP9xn.js → settings-form-section-num14vSv.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CAmWMaOT.js → settings-loading-skeleton-BTqvr_Fw.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CN0_Np6E.js → settings-page-DOMl-bv4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-X1x-2Cp9.js → settings-page-layout-Dx5S-Msc.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Dgpd7bk0.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-C0gKFt8r.js → share-link-dialog-BnqkFFBZ.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DxQ6yfYv.js → share-preview-page-aGjIkYmH.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-tR66Fdly.js → shares-api-cGtd3rjc.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-C_ZOqMjz.js → shares-settings-DmFLUeqg.js} +1 -1
- package/dist/gateway/static/root/assets/{skeleton-BwbyijEw.js → skeleton-BI5TyibZ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BFhU0NNu.js → skill-api-C9AYuE_b.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-D_04Mpcb.js → skill-reload-api-VT8F0enn.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-4-d-lfhq.js → skills-page-CJIhQfG2.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DHhaFWty.js → system-settings-panel-Cg0qUX2j.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CHBEI5uz.js → task-detail-page-C-VbndI4.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-AGJtkFIu.js → task-expandable-content-UI-0Elqy.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DezB9Sal.js → theme-store-D7m5Eng5.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-BEHmd2wL.js → tracing-settings-page-CawYzT24.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-Bbb_6pV4.js → tunnel-api-B8bvJesa.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BEiWznDq.js → usage-page-DdA0F-qo.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BtTE5X_M.js → use-autosave-jrZBPSWn.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-BBHrVqB7.js → use-composer-attachments-hTgxke6e.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CQmLEkdj.js → use-file-preview-expanded-tMUDUWVH.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-Bs6hUk15.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-tQsUdQnu.js → voice-api-key-field-Bp8brswu.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-69Yqf0QM.js → voice-config-api-415pyWx8.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Cvf8u31v.js → work-discovery-overlay-CcIDsZWn.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CqYp6zjF.js → workflow-run-setup-panel-YP4TJpWE.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CYqVuquq.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-Bu6Csrxf.js → workspace-api-C01xjDt2.js} +2 -2
- package/dist/gateway/static/root/assets/xml-_d7dTN2Q.js +3 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-D3Cyk8pp.js → xopc-cloud-account-card-Cspd770Z.js} +1 -1
- package/dist/gateway/static/root/index.html +38 -35
- package/dist/package.js +1 -1
- package/dist/packages/realtime-protocol/src/voice-catalog.js +7 -2
- package/dist/src/agent/embedded/run-turn.js +38 -0
- package/dist/src/agent/embedded/session-runner.js +21 -3
- package/dist/src/agent/embedded/tool-metadata.d.ts +2 -1
- package/dist/src/agent/external-tools/index.js +6 -3
- package/dist/src/agent/external-tools/tool-registry.d.ts +2 -1
- package/dist/src/agent/prompt/response-language.js +9 -1
- package/dist/src/agent/session/session-config-service.js +0 -13
- package/dist/src/agent/tasks/task-judge-service.d.ts +2 -2
- package/dist/src/agent/tasks/task-judge-service.js +16 -9
- package/dist/src/agent/tools/xopc-use-tool.js +6 -2
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +2 -2
- package/dist/src/cli/bin.js +2 -2
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/gateway-ssh-tunnel.js +1 -1
- package/dist/src/cli/commands/import.js +1 -1
- package/dist/src/cli/commands/mcp.js +2 -2
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/platform.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 +1 -1
- package/dist/src/endpoint-tools/registry.d.ts +4 -1
- package/dist/src/endpoint-tools/registry.js +14 -0
- package/dist/src/gateway/chat-stream/mapper.d.ts +2 -0
- package/dist/src/gateway/chat-stream/mapper.js +4 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +4 -1
- package/dist/src/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/routes/browser-install.js +1 -1
- package/dist/src/gateway/hono/routes/chat-model-config.d.ts +0 -4
- package/dist/src/gateway/hono/routes/chat-model-config.js +0 -6
- package/dist/src/gateway/hono/routes/devices.js +1 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +4 -2
- package/dist/src/gateway/hono/routes/voice.js +12 -4
- package/dist/src/gateway/rate-limit/buckets.d.ts +1 -1
- package/dist/src/gateway/rate-limit/buckets.js +2 -2
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +8 -3
- package/dist/src/gateway/side-chat/manager.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +4 -3
- package/dist/src/personal-agent/prompts.d.ts +1 -0
- package/dist/src/personal-agent/prompts.js +29 -5
- package/dist/src/personal-agent/reply-composer.js +19 -4
- package/dist/src/personal-agent/reply-style.d.ts +4 -2
- package/dist/src/personal-agent/reply-style.js +57 -5
- package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
- package/dist/src/tasks/capabilities/write.js +10 -1
- package/dist/src/tasks/task-application-service.js +5 -4
- package/dist/src/tasks/task-context-assembler.js +1 -0
- package/dist/src/tasks/task-contract-definition.d.ts +1 -1
- package/dist/src/tasks/task-contract-definition.js +2 -2
- package/dist/src/tasks/task-contract-planner.d.ts +1 -0
- package/dist/src/tasks/task-contract-planner.js +2 -1
- package/dist/src/tasks/task-language.d.ts +7 -0
- package/dist/src/tasks/task-language.js +15 -0
- package/dist/src/tasks/task-read-model-projector.js +3 -2
- package/dist/src/tasks/task-result-delivery-service.js +2 -1
- package/dist/src/tasks/task-run-coordinator.js +22 -8
- package/dist/src/tasks/task-run-dispatcher.js +8 -6
- package/dist/src/voice/platform-catalog.d.ts +1 -0
- package/dist/src/voice/platform-settings.d.ts +1 -1
- package/dist/src/voice/platform-settings.js +6 -2
- package/dist/src/voice/platform-streams.js +4 -1
- package/dist/src/voice/realtime/agentEngine.js +51 -2
- package/dist/src/voice/realtime/engine.d.ts +4 -0
- package/dist/src/voice/realtime/omniRoute.d.ts +1 -1
- package/dist/src/voice/realtime/omniRoute.js +4 -1
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +6 -2
- package/dist/src/voice/tts/speech-provider-types.d.ts +1 -0
- package/package.json +6 -6
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DLrGOiCS.js +0 -1
- package/dist/gateway/static/root/assets/agents-CUnG8q3J.js +0 -66
- package/dist/gateway/static/root/assets/automations-workspace-BblZP4ft.js +0 -6
- package/dist/gateway/static/root/assets/capabilities-page-CbPvaNJF.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CjApEiV4.js +0 -8
- package/dist/gateway/static/root/assets/channels-CJUz97Cw.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CbxL6ENI.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CHAa_VNb.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BcSr6MzW.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CKeRXki2.js +0 -2
- package/dist/gateway/static/root/assets/index-B3BVcMQj.js +0 -106
- package/dist/gateway/static/root/assets/index-BU0KqtLI.css +0 -1
- package/dist/gateway/static/root/assets/markdown-view-CdqdeQqI.js +0 -201
- package/dist/gateway/static/root/assets/models-hub-cache-D0yA-nf6.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-kBo3rUvj.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-Bf07rfSd.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-C3wJ8U07.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BvhaF5Pi.js +0 -1
- package/dist/gateway/static/root/assets/send-session-input-C449pdoe.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-CKFTwYtq.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DtB119_G.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-2ciK8mPP.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-VtNv07PN.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-B4Gwo5T7.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DMzGl3CE.js +0 -6
|
@@ -11,10 +11,10 @@ import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
|
11
11
|
import "../../infra/bus/index.js";
|
|
12
12
|
import { AgentService } from "../../agent/service.js";
|
|
13
13
|
import "../../agent/index.js";
|
|
14
|
-
import "../../config/index.js";
|
|
15
|
-
import { getXopcCloudCatalogCoordinator } from "../../providers/xopc-cloud-catalog-coordinator.js";
|
|
16
14
|
import { formatExamples, register } from "../registry.js";
|
|
17
15
|
import { getContextWithOpts } from "../context.js";
|
|
16
|
+
import "../../config/index.js";
|
|
17
|
+
import { getXopcCloudCatalogCoordinator } from "../../providers/xopc-cloud-catalog-coordinator.js";
|
|
18
18
|
import { listSessions } from "./agent/sessions.js";
|
|
19
19
|
import { renderStreamToTerminal } from "./agent/stream-renderer.js";
|
|
20
20
|
import { startInteractiveChat } from "./agent/interactive.js";
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
4
|
import { getAllProviders, init_providers } from "../../providers/index.js";
|
|
5
|
-
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
6
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
|
+
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
7
7
|
import { colorizeStatus, colors } from "../utils/colors.js";
|
|
8
8
|
import { listAllProfiles, listProfilesForProvider, removeAuthProfile, upsertAuthProfile } from "../../auth/profiles/profiles.js";
|
|
9
9
|
import "../../auth/profiles/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { isAgentPluginArchive, withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
4
3
|
import { getContextWithOpts } from "../context.js";
|
|
4
|
+
import { isAgentPluginArchive, withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
5
5
|
import { removePluginCredentials } from "../../extensions/agent-plugins/credentials.js";
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
@@ -5,10 +5,10 @@ import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../confi
|
|
|
5
5
|
import { normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
|
|
6
6
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
7
7
|
import { loadConfig } from "../../config/loader.js";
|
|
8
|
+
import { getContextWithOpts } from "../context.js";
|
|
8
9
|
import { GatewayServer } from "../../gateway/server.js";
|
|
9
10
|
import { runGatewayLoop } from "../../gateway/run-loop.js";
|
|
10
11
|
import "../../gateway/index.js";
|
|
11
|
-
import { getContextWithOpts } from "../context.js";
|
|
12
12
|
import { colors } from "../utils/colors.js";
|
|
13
13
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
14
14
|
import { join, resolve } from "node:path";
|
|
@@ -3,11 +3,11 @@ import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolv
|
|
|
3
3
|
import { computeExtensionDirectoryIntegrity, getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
4
4
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
5
5
|
import { loadConfig } from "../../config/loader.js";
|
|
6
|
+
import { getContextWithOpts } from "../context.js";
|
|
6
7
|
import { peekExtensionManifestFromStoreZip } from "../../extensions/install.js";
|
|
7
8
|
import { commitStagedExtensionInstall, finalizeStagedExtensionInstall, rollbackStagedExtensionInstall, stageExtensionLocal, stageExtensionNpm, stageExtensionStoreZip } from "../../extensions/install-transaction.js";
|
|
8
9
|
import { fetchRegistry, findExtension, getExtensionMarketplaceStoreBaseUrl, listExtensions, searchExtensions } from "../../extensions/marketplace.js";
|
|
9
10
|
import { isAgentPluginArchive } from "../../extensions/agent-plugins/sources.js";
|
|
10
|
-
import { getContextWithOpts } from "../context.js";
|
|
11
11
|
import { colors } from "../utils/colors.js";
|
|
12
12
|
import { installAgentPluginFromCli, isAgentPluginSource } from "./extension-agent-plugin.js";
|
|
13
13
|
import { validateExtensionPackageDirectory } from "./extension-pack.js";
|
|
@@ -7,10 +7,10 @@ import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
|
7
7
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
8
8
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
9
9
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
10
|
+
import { getContextWithOpts } from "../context.js";
|
|
10
11
|
import { checkAllExtensionsHealth, getExtensionHealthChecker } from "../../extensions/health.js";
|
|
11
12
|
import { collectExtensionPackageDependencyIssues } from "../../extensions/package-contract.js";
|
|
12
13
|
import { withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
13
|
-
import { getContextWithOpts } from "../context.js";
|
|
14
14
|
import { colors } from "../utils/colors.js";
|
|
15
15
|
import { addAgentPluginLifecycleCommands, isAgentPluginSource } from "./extension-agent-plugin.js";
|
|
16
16
|
import { createExtensionCreateCommand } from "./extension-create.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
|
-
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
4
3
|
import "../../../config/index.js";
|
|
4
|
+
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
5
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { startSshPortForward } from "../../infra/ssh-tunnel.js";
|
|
2
1
|
import { formatExamples } from "../registry.js";
|
|
2
|
+
import { startSshPortForward } from "../../infra/ssh-tunnel.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
//#region src/cli/commands/gateway-ssh-tunnel.ts
|
|
5
5
|
function registerGatewaySshTunnelCommand(parent, ctx) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { closeXopcDatabase, init_connection, isXopcDatabaseOpen, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { register } from "../registry.js";
|
|
2
3
|
import { isImportSource } from "../../imports/sources.js";
|
|
3
4
|
import { scanProduct } from "../../imports/inventory.js";
|
|
4
5
|
import { importSelection, listImportSources } from "../../imports/productImport.js";
|
|
5
6
|
import { createRuntimeImportService, recoverCapabilityImports } from "../../imports/runtime.js";
|
|
6
|
-
import { register } from "../registry.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
//#region src/cli/commands/import.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { getNativePiAgentDir, prepareNativeMcpConfig } from "../../agent/mcp/native-mcp.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
+
import { register } from "../registry.js";
|
|
3
4
|
import { createGatewayHttpClientFromConfig } from "../../mcp/gateway-http-client.js";
|
|
4
5
|
import { createCapabilityMcpServer } from "../../mcp/capability-server.js";
|
|
5
|
-
import { register } from "../registry.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { chmodSync, existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { main } from "@earendil-works/pi-coding-agent";
|
|
9
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
9
|
import { Command } from "commander";
|
|
10
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
11
11
|
//#region src/cli/commands/mcp.ts
|
|
12
12
|
function createMcpCommand(ctx) {
|
|
13
13
|
const command = new Command("mcp").description("Manage native pi MCP servers and expose Gateway capabilities");
|
|
@@ -9,11 +9,11 @@ import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
10
10
|
import "../../../packages/image-providers/src/index.js";
|
|
11
11
|
import { loadConfig } from "../../config/loader.js";
|
|
12
|
+
import { formatExamples, register } from "../registry.js";
|
|
13
|
+
import { getContextWithOpts } from "../context.js";
|
|
12
14
|
import "../../config/index.js";
|
|
13
15
|
import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin.js";
|
|
14
16
|
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
15
|
-
import { formatExamples, register } from "../registry.js";
|
|
16
|
-
import { getContextWithOpts } from "../context.js";
|
|
17
17
|
import { colors } from "../utils/colors.js";
|
|
18
18
|
import { runCliOAuthLogin } from "../utils/oauth-login.js";
|
|
19
19
|
import { input } from "@inquirer/prompts";
|
|
@@ -10,12 +10,12 @@ import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
13
|
+
import { getDomesticProviderBaseUrl, getDomesticProviderPreset, getDomesticProviderPresetIds, providerConfigFromDomesticPreset } from "../../../providers/domestic-presets.js";
|
|
14
|
+
import { getProviderHint, getRecommendedModelsForProvider, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
13
15
|
import { colors } from "../../utils/colors.js";
|
|
14
16
|
import { listProfilesForProvider } from "../../../auth/profiles/profiles.js";
|
|
15
17
|
import "../../../auth/profiles/index.js";
|
|
16
18
|
import { getOAuthProvider } from "../../utils/oauth-providers.js";
|
|
17
|
-
import { getDomesticProviderBaseUrl, getDomesticProviderPreset, getDomesticProviderPresetIds, providerConfigFromDomesticPreset } from "../../../providers/domestic-presets.js";
|
|
18
|
-
import { getProviderHint, getRecommendedModelsForProvider, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
19
19
|
import { runCliOAuthLogin } from "../../utils/oauth-login.js";
|
|
20
20
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
21
21
|
//#region src/cli/commands/onboard/model.ts
|
|
@@ -3,8 +3,8 @@ import { AgentCatalogRepository, init_repository } from "../../agent-catalog/rep
|
|
|
3
3
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { saveConfig } from "../../config/loader.js";
|
|
6
|
-
import "../../config/index.js";
|
|
7
6
|
import { formatExamples, register } from "../registry.js";
|
|
7
|
+
import "../../config/index.js";
|
|
8
8
|
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
9
9
|
import { colors } from "../utils/colors.js";
|
|
10
10
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
|
+
import { formatExamples, register } from "../registry.js";
|
|
2
3
|
import "../../config/index.js";
|
|
3
4
|
import { PLATFORM_RUNTIME_PROFILE, PLATFORM_RUNTIME_PROVIDER, PlatformRuntimeClient, discoverPlatform } from "../../platform/client.js";
|
|
4
5
|
import "../../platform/index.js";
|
|
5
|
-
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { getProfile, upsertAuthProfile } from "../../auth/profiles/profiles.js";
|
|
7
7
|
import "../../auth/profiles/index.js";
|
|
8
8
|
import { Command } from "commander";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { createProfile, deleteProfile, getCurrentProfile, getSwitchCommand, listProfiles, resolveProfileStateDir } from "../../config/profile.js";
|
|
4
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
|
+
import { createProfile, deleteProfile, getCurrentProfile, getSwitchCommand, listProfiles, resolveProfileStateDir } from "../../config/profile.js";
|
|
5
5
|
import { colors } from "../utils/colors.js";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import Table from "cli-table3";
|
|
@@ -7,13 +7,13 @@ import { resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "../../t
|
|
|
7
7
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
8
8
|
import { getTunnelService } from "../../tunnel/tunnel-service.js";
|
|
9
9
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
10
|
+
import { formatExamples, register } from "../registry.js";
|
|
10
11
|
import "../../config/index.js";
|
|
11
12
|
import { resolveGatewayAuth } from "../../gateway/auth.js";
|
|
12
13
|
import { requireTunnelGatewayToken } from "../../tunnel/auth-policy.js";
|
|
13
14
|
import { TUNNEL_RISK_SUMMARY_LINES, TunnelConsentError, assertTunnelMayStart, hasValidTunnelConsent } from "../../tunnel/consent.js";
|
|
14
15
|
import { resolveFrpSubdomainHost } from "../../tunnel/frp-subdomain-host.js";
|
|
15
16
|
import { applyTunnelConsentToConfig, mergeTunnelConfigPatch, setTunnelEnabledInConfig } from "../../tunnel/tunnel-config.js";
|
|
16
|
-
import { formatExamples, register } from "../registry.js";
|
|
17
17
|
import "../../tunnel/index.js";
|
|
18
18
|
import { Command } from "commander";
|
|
19
19
|
//#region src/cli/commands/tunnel.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
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";
|
|
3
4
|
import "../../config/index.js";
|
|
4
5
|
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
5
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
6
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
7
8
|
import { formatUpdateApiResult, resolveUpdateInstallSurface, runGatewayUpdateWithPostSteps } from "../../infra/update-runner.js";
|
|
8
|
-
import { formatExamples, register } from "../registry.js";
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
//#region src/cli/commands/update.ts
|
|
11
11
|
init_package_version();
|
|
@@ -6,8 +6,8 @@ import { loadConfig } from "../config/loader.js";
|
|
|
6
6
|
import { MessageBus } from "../infra/bus/queue.js";
|
|
7
7
|
import "../infra/bus/index.js";
|
|
8
8
|
import { bootstrapApplicationStateSync } from "../bootstrap/application-state.js";
|
|
9
|
-
import "../config/index.js";
|
|
10
9
|
import { createDefaultContext } from "./registry.js";
|
|
10
|
+
import "../config/index.js";
|
|
11
11
|
import { registerExtensionCliProgram } from "../extensions/sdk/channel-helpers.js";
|
|
12
12
|
import { join } from "path";
|
|
13
13
|
//#region src/cli/extension-cli-register.ts
|
package/dist/src/config/index.js
CHANGED
|
@@ -14,9 +14,9 @@ import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConf
|
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, normalizeConfiguredMcpServers } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
16
|
import { assertConfigRewriteSafeForRunningGateway, loadConfig, saveConfig } from "./loader.js";
|
|
17
|
-
import { diffConfigPaths } from "./diff.js";
|
|
18
17
|
import { listAgentProfileMarkdownDirs, listAgentWorkspaceDirs } from "./workspace-dirs.js";
|
|
19
18
|
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
|
|
@@ -30,7 +30,10 @@ export declare class EndpointRegistry {
|
|
|
30
30
|
private readonly policy;
|
|
31
31
|
private readonly connectionByEndpointId;
|
|
32
32
|
private readonly changeListeners;
|
|
33
|
-
onChange(listener: (endpointId: string) => void): () => void;
|
|
33
|
+
onChange(listener: (endpointId: string, reason?: 'connection' | 'authorization') => void): () => void;
|
|
34
|
+
private readonly principalRevocationListeners;
|
|
35
|
+
onPrincipalRevoked(principalId: string, listener: () => void): () => void;
|
|
36
|
+
revokePrincipal(principalId: string): void;
|
|
34
37
|
constructor(policy?: EndpointToolPolicy);
|
|
35
38
|
register(hello: EndpointHelloPayload, connectionId: string, transport: EndpointTransport, now?: number): EndpointRegistration;
|
|
36
39
|
remove(endpointId: string, connectionId: string): boolean;
|
|
@@ -29,6 +29,19 @@ var EndpointRegistry = class {
|
|
|
29
29
|
this.changeListeners.delete(listener);
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
principalRevocationListeners = /* @__PURE__ */ new Map();
|
|
33
|
+
onPrincipalRevoked(principalId, listener) {
|
|
34
|
+
const listeners = this.principalRevocationListeners.get(principalId) ?? /* @__PURE__ */ new Set();
|
|
35
|
+
listeners.add(listener);
|
|
36
|
+
this.principalRevocationListeners.set(principalId, listeners);
|
|
37
|
+
return () => {
|
|
38
|
+
listeners.delete(listener);
|
|
39
|
+
if (!listeners.size) this.principalRevocationListeners.delete(principalId);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
revokePrincipal(principalId) {
|
|
43
|
+
for (const listener of [...this.principalRevocationListeners.get(principalId) ?? []]) listener();
|
|
44
|
+
}
|
|
32
45
|
constructor(policy = new EndpointToolPolicy()) {
|
|
33
46
|
this.policy = policy;
|
|
34
47
|
}
|
|
@@ -114,6 +127,7 @@ var EndpointRegistry = class {
|
|
|
114
127
|
disconnect(endpointId, code = 4003, reason = "Endpoint disconnected") {
|
|
115
128
|
const connection = this.connectionByEndpointId.get(endpointId);
|
|
116
129
|
if (!connection) return false;
|
|
130
|
+
for (const listener of this.changeListeners) listener(endpointId, "authorization");
|
|
117
131
|
connection.transport.close(code, reason);
|
|
118
132
|
return true;
|
|
119
133
|
}
|
|
@@ -11,6 +11,8 @@ export interface ChatStreamMapperOptions {
|
|
|
11
11
|
channel: string;
|
|
12
12
|
startsNewBubble?: boolean;
|
|
13
13
|
taskTrigger?: TaskUpdateTrigger;
|
|
14
|
+
/** Public text is visible immediately, independently of tool-call classification. */
|
|
15
|
+
textSurface?: 'conversation';
|
|
14
16
|
}
|
|
15
17
|
export declare class ChatStreamMapper {
|
|
16
18
|
private readonly opts;
|
|
@@ -429,7 +429,10 @@ var ChatStreamMapper = class {
|
|
|
429
429
|
runId: this.opts.runId,
|
|
430
430
|
conversationId: this.opts.conversationId,
|
|
431
431
|
timestamp: Date.now(),
|
|
432
|
-
payload
|
|
432
|
+
payload: this.opts.textSurface && (type === "run_start" || type === "assistant_message_start" || type === "assistant_delta") ? {
|
|
433
|
+
...payload,
|
|
434
|
+
textSurface: this.opts.textSurface
|
|
435
|
+
} : payload
|
|
433
436
|
};
|
|
434
437
|
}
|
|
435
438
|
recordPatchDiff(details) {
|
|
@@ -34,6 +34,7 @@ export type RunStartEvent = ChatStreamEnvelope<'run_start', {
|
|
|
34
34
|
channel: string;
|
|
35
35
|
startsNewBubble?: boolean;
|
|
36
36
|
taskTrigger?: TaskUpdateTrigger;
|
|
37
|
+
textSurface?: 'conversation';
|
|
37
38
|
}>;
|
|
38
39
|
export type UserMessageEvent = ChatStreamEnvelope<'user_message', {
|
|
39
40
|
message: unknown;
|
|
@@ -44,10 +45,12 @@ export type UserTranscriptEvent = ChatStreamEnvelope<'user_transcript', {
|
|
|
44
45
|
}>;
|
|
45
46
|
export type AssistantMessageStartEvent = ChatStreamEnvelope<'assistant_message_start', {
|
|
46
47
|
messageId: string;
|
|
48
|
+
textSurface?: 'conversation';
|
|
47
49
|
}>;
|
|
48
50
|
export type AssistantDeltaEvent = ChatStreamEnvelope<'assistant_delta', {
|
|
49
51
|
messageId: string;
|
|
50
|
-
delta: string;
|
|
52
|
+
delta: string;
|
|
53
|
+
textSurface?: 'conversation'; /** UTF-16 offset before this delta. */
|
|
51
54
|
offset?: number;
|
|
52
55
|
}>;
|
|
53
56
|
export type ThinkingDeltaEvent = ChatStreamEnvelope<'thinking_delta', {
|
|
@@ -7,10 +7,10 @@ import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
|
7
7
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
8
8
|
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
9
9
|
import { maxSessionInputRequestBodyBytes } from "../chat-limits.js";
|
|
10
|
-
import { BROWSER_EXTENSION_ID } from "../../browser/extension-identity.js";
|
|
11
10
|
import { isLoopbackIpAddress, isTrustedProxyAddress } from "../client-ip.js";
|
|
12
11
|
import { buildGatewayConsoleCspHeader } from "../security/csp.js";
|
|
13
12
|
import { checkBrowserOrigin, isChromeExtensionOrigin } from "../security/origin-check.js";
|
|
13
|
+
import { BROWSER_EXTENSION_ID } from "../../browser/extension-identity.js";
|
|
14
14
|
import { auth } from "./middleware/auth.js";
|
|
15
15
|
import { gatewayScopes } from "./middleware/scopes.js";
|
|
16
16
|
import { createChannelRateLimitMiddleware, createChatRateLimitMiddleware, createMediaRateLimitMiddleware, createStrictRateLimitMiddleware, createTaskRateLimitMiddleware, createXopcCloudPollRateLimitMiddleware } from "./middleware/strict-rate-limit.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { acquireBrowserInstallLock, cancelBrowserInstall } from "../../../browser/install-lock.js";
|
|
2
1
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
2
|
+
import { acquireBrowserInstallLock, cancelBrowserInstall } from "../../../browser/install-lock.js";
|
|
3
3
|
import { runPlaywrightChromiumInstallWithProgress } from "../../../browser/providers/playwright-install.js";
|
|
4
4
|
import { streamSSE } from "hono/streaming";
|
|
5
5
|
//#region src/gateway/hono/routes/browser-install.ts
|
|
@@ -3,10 +3,6 @@ import type { AuthenticatedRouteDeps } from './deps.js';
|
|
|
3
3
|
export declare function patchChatModelConfig(c: Context, service: AuthenticatedRouteDeps['service'], conversationId: string, body: Record<string, unknown>): Promise<(Response & import("hono").TypedResponse<{
|
|
4
4
|
ok: false;
|
|
5
5
|
error: string;
|
|
6
|
-
code: string;
|
|
7
|
-
}, 409, "json">) | (Response & import("hono").TypedResponse<{
|
|
8
|
-
ok: false;
|
|
9
|
-
error: string;
|
|
10
6
|
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
11
7
|
ok: false;
|
|
12
8
|
error: string;
|
|
@@ -4,12 +4,6 @@ async function patchChatModelConfig(c, service, conversationId, body) {
|
|
|
4
4
|
return withModelConfigLock(conversationId, async () => {
|
|
5
5
|
const changesModel = body.model !== void 0 || body.thinkingLevel !== void 0;
|
|
6
6
|
if (changesModel) {
|
|
7
|
-
const state = service.getSessionInputState(conversationId);
|
|
8
|
-
if (service.sessions.getActiveRun(conversationId).active || state.activeRunId || state.inputs.length > 0) return c.json({
|
|
9
|
-
ok: false,
|
|
10
|
-
error: "Wait for the current reply and pending inputs to finish",
|
|
11
|
-
code: "SESSION_BUSY"
|
|
12
|
-
}, 409);
|
|
13
7
|
if (body.thinkingLevel !== void 0 && typeof body.thinkingLevel !== "string") return c.json({
|
|
14
8
|
ok: false,
|
|
15
9
|
error: "Invalid thinking level"
|
|
@@ -231,6 +231,7 @@ function registerDeviceRoutes(authenticated, deps) {
|
|
|
231
231
|
}, 403);
|
|
232
232
|
const revoked = revokeDevice(principal.deviceId);
|
|
233
233
|
if (revoked) {
|
|
234
|
+
deps.service.endpointTools.registry.revokePrincipal(principal.deviceId);
|
|
234
235
|
deps.service.realtime.disconnectPrincipal(principal.deviceId);
|
|
235
236
|
deps.service.voiceRealtime.disconnectPrincipal(principal.deviceId);
|
|
236
237
|
}
|
|
@@ -103,6 +103,7 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
103
103
|
const principal = getEndpointPrincipal(id);
|
|
104
104
|
const accessRevoked = Boolean(access && access.revokedAt === void 0 && revokeDevice(id));
|
|
105
105
|
const principalRevoked = Boolean(principal && principal.revokedAt === void 0 && revokeEndpointPrincipal(id));
|
|
106
|
+
if (accessRevoked || principalRevoked) deps.service.endpointTools.registry.revokePrincipal(id);
|
|
106
107
|
if (accessRevoked) {
|
|
107
108
|
deps.service.realtime.disconnectPrincipal(id);
|
|
108
109
|
deps.service.voiceRealtime.disconnectPrincipal(id);
|
|
@@ -316,7 +316,8 @@ function registerPersonalAgentRoutes(authenticated, deps) {
|
|
|
316
316
|
}, 400);
|
|
317
317
|
if (!(await route.provider.plugin.listVoices({
|
|
318
318
|
cfg: deps.service.currentConfig,
|
|
319
|
-
providerConfig: route.provider.providerConfig
|
|
319
|
+
providerConfig: route.provider.providerConfig,
|
|
320
|
+
mode: "speech.stream"
|
|
320
321
|
})).some((voice) => voice.id === selected.voice)) return c.json({
|
|
321
322
|
ok: false,
|
|
322
323
|
error: "Selected voice is unavailable"
|
|
@@ -359,7 +360,8 @@ function registerPersonalAgentRoutes(authenticated, deps) {
|
|
|
359
360
|
}, 400);
|
|
360
361
|
if (!(await route.provider.plugin.listVoices({
|
|
361
362
|
cfg: deps.service.currentConfig,
|
|
362
|
-
providerConfig: route.provider.providerConfig
|
|
363
|
+
providerConfig: route.provider.providerConfig,
|
|
364
|
+
mode: "speech.stream"
|
|
363
365
|
})).some((voice) => voice.id === voicePreference.voice)) return c.json({
|
|
364
366
|
ok: false,
|
|
365
367
|
error: "Selected voice is unavailable"
|
|
@@ -3,6 +3,7 @@ import { VOICE_TIMING_METRICS, createVoiceSessionRequestSchema, init_voice } fro
|
|
|
3
3
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../../providers/index.js";
|
|
4
4
|
import { completeWithResolvedCredentials } from "../../../providers/model-call.js";
|
|
5
5
|
import { isPersonalConversation } from "../../../personal-agent/repository.js";
|
|
6
|
+
import { PlatformVoiceError } from "../../../voice/platform-streams.js";
|
|
6
7
|
import { resolveSttProviderConfigSlice } from "../../../voice/stt/config-slice.js";
|
|
7
8
|
import { STTTranscriptionError, transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
8
9
|
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
@@ -219,7 +220,8 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
219
220
|
}, 400);
|
|
220
221
|
if (!(await route.provider.plugin.listVoices({
|
|
221
222
|
cfg: config,
|
|
222
|
-
providerConfig: route.provider.providerConfig
|
|
223
|
+
providerConfig: route.provider.providerConfig,
|
|
224
|
+
mode: "speech.stream"
|
|
223
225
|
})).some((voice) => voice.id === selectedVoice)) return c.json({
|
|
224
226
|
ok: false,
|
|
225
227
|
error: { message: "Voice is unavailable" }
|
|
@@ -273,11 +275,16 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
273
275
|
} catch (error) {
|
|
274
276
|
log.warn({
|
|
275
277
|
err: error,
|
|
276
|
-
provider: route.route.provider
|
|
278
|
+
provider: route.route.provider,
|
|
279
|
+
modelId: route.route.model,
|
|
280
|
+
voice: selectedVoice || route.provider.providerConfig.voice
|
|
277
281
|
}, "Realtime voice preview failed");
|
|
278
282
|
return c.json({
|
|
279
283
|
ok: false,
|
|
280
|
-
error: {
|
|
284
|
+
error: {
|
|
285
|
+
code: error instanceof PlatformVoiceError ? error.code ?? "CLOUD_VOICE_UNAVAILABLE" : "VOICE_PREVIEW_FAILED",
|
|
286
|
+
message: error instanceof PlatformVoiceError ? error.clientMessage : "Voice preview failed. Try again or check the voice service settings."
|
|
287
|
+
}
|
|
281
288
|
}, 502);
|
|
282
289
|
} finally {
|
|
283
290
|
controller.abort();
|
|
@@ -425,7 +432,8 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
425
432
|
try {
|
|
426
433
|
const voices = await resolved.plugin.listVoices({
|
|
427
434
|
cfg: config,
|
|
428
|
-
providerConfig: resolved.providerConfig
|
|
435
|
+
providerConfig: resolved.providerConfig,
|
|
436
|
+
mode: c.req.query("purpose") === "realtime" ? "speech.stream" : "speech"
|
|
429
437
|
});
|
|
430
438
|
return c.json({
|
|
431
439
|
ok: true,
|
|
@@ -59,7 +59,7 @@ declare class BucketRegistry {
|
|
|
59
59
|
deviceRefresh(): RateLimiter;
|
|
60
60
|
/** Global pre-authentication signing budget; independent of authenticated traffic. */
|
|
61
61
|
identityChallenge(): RateLimiter;
|
|
62
|
-
/** Authenticated admin / mutation endpoints —
|
|
62
|
+
/** Authenticated admin / mutation endpoints — 600 req / 60 s per client IP. */
|
|
63
63
|
strictApi(): RateLimiter;
|
|
64
64
|
/** Interactive chat actions — 180 req / 60 s per client IP. */
|
|
65
65
|
chatApi(): RateLimiter;
|
|
@@ -93,10 +93,10 @@ var init_buckets = __esmMin((() => {
|
|
|
93
93
|
windowMs: 6e4
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
/** Authenticated admin / mutation endpoints —
|
|
96
|
+
/** Authenticated admin / mutation endpoints — 600 req / 60 s per client IP. */
|
|
97
97
|
strictApi() {
|
|
98
98
|
if (!this.strictApiLimiter) this.strictApiLimiter = new RateLimiter({
|
|
99
|
-
maxRequests:
|
|
99
|
+
maxRequests: 600,
|
|
100
100
|
windowMs: 6e4
|
|
101
101
|
});
|
|
102
102
|
return this.strictApiLimiter;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { acquireGatewayLock } from "./lock.js";
|
|
2
2
|
import { loadConfig } from "../config/loader.js";
|
|
3
3
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
4
|
-
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
5
4
|
import "../config/index.js";
|
|
5
|
+
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
6
6
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
7
7
|
import { consumeGatewayRestartIntentSync, consumeGatewaySigusr1RestartAuthorization, isGatewaySigusr1RestartExternallyAllowed, resetGatewayRestartStateForInProcessRestart, scheduleGatewaySigusr1Restart, setGatewaySigusr1RestartPolicy } from "../infra/restart.js";
|
|
8
8
|
//#region src/gateway/run-loop.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveGatewayBindHost, resolveGatewayListenHosts } from "../config/gateway-bind.js";
|
|
2
|
-
import { resolveGatewayListenPlan } from "./listen.js";
|
|
3
2
|
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
3
|
+
import { resolveGatewayListenPlan } from "./listen.js";
|
|
4
4
|
import { GatewayService } from "./service.js";
|
|
5
5
|
import { handleSiteShareUpgrade } from "../share/site-share-router.js";
|
|
6
6
|
import { createHonoApp } from "./hono/app.js";
|
|
@@ -10,6 +10,7 @@ import { getConnectionResumeInput, init_connection_wait_repository, isConnection
|
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
11
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
12
12
|
import { init_session_key } from "../../routing/session-key.js";
|
|
13
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
13
14
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
14
15
|
import { TaskRunCoordinator } from "../../tasks/task-run-coordinator.js";
|
|
15
16
|
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
@@ -36,6 +37,7 @@ const log = createLogger("Gateway:Service");
|
|
|
36
37
|
*/
|
|
37
38
|
async function* runGatewayAgent(deps, message, channel, chatId, origin, attachments, thinking, runOptions) {
|
|
38
39
|
const runStartedAtMs = Date.now();
|
|
40
|
+
const runStartedMonotonic = performance.now();
|
|
39
41
|
const inputReceivedAtMs = runOptions?.inputReceivedAtMs ?? runStartedAtMs;
|
|
40
42
|
let firstTextSeen = false;
|
|
41
43
|
const cappedAttachments = attachments && attachments.length > 10 ? attachments.slice(0, 10) : attachments;
|
|
@@ -94,6 +96,7 @@ async function* runGatewayAgent(deps, message, channel, chatId, origin, attachme
|
|
|
94
96
|
runId,
|
|
95
97
|
conversationId: streamConversationId,
|
|
96
98
|
channel,
|
|
99
|
+
...isPersonalConversation(streamConversationId) ? { textSurface: "conversation" } : {},
|
|
97
100
|
startsNewBubble: origin.type === "system" && origin.source === "task_update",
|
|
98
101
|
...origin.type === "system" && origin.source === "task_update" && webchatConversationId ? { taskTrigger: listTaskUpdateTriggers(webchatConversationId).get(runId) } : {}
|
|
99
102
|
});
|
|
@@ -123,14 +126,16 @@ async function* runGatewayAgent(deps, message, channel, chatId, origin, attachme
|
|
|
123
126
|
for (const event of events) {
|
|
124
127
|
if (!firstTextSeen && event.type === "assistant_delta" && event.payload.delta.trim()) {
|
|
125
128
|
firstTextSeen = true;
|
|
129
|
+
const latencyMs = performance.now() - runStartedMonotonic;
|
|
130
|
+
const queueMs = Math.max(0, runStartedAtMs - inputReceivedAtMs);
|
|
126
131
|
log.info({
|
|
127
132
|
conversationId: streamConversationId,
|
|
128
133
|
runId,
|
|
129
134
|
channel,
|
|
130
135
|
phase: "first_response_text",
|
|
131
|
-
latencyMs
|
|
132
|
-
inputToTextMs:
|
|
133
|
-
queueMs
|
|
136
|
+
latencyMs,
|
|
137
|
+
inputToTextMs: queueMs + latencyMs,
|
|
138
|
+
queueMs
|
|
134
139
|
}, "Gateway first response text ready");
|
|
135
140
|
}
|
|
136
141
|
if (taskRun) captureTaskEvent(event);
|
|
@@ -156,7 +156,7 @@ var EphemeralSideChatManager = class {
|
|
|
156
156
|
}
|
|
157
157
|
updateConfig(id, clientInstanceId, patch) {
|
|
158
158
|
const entry = this.requireEntry(id, clientInstanceId);
|
|
159
|
-
if (entry.status
|
|
159
|
+
if (entry.status === "promoting") throw new SideChatError("Cannot change config during promotion", "CONFLICT");
|
|
160
160
|
const modelRef = patch.modelRef === void 0 ? entry.config.modelRef : normalizeOptionalString(patch.modelRef);
|
|
161
161
|
if (!modelRef) throw new SideChatError("modelRef cannot be empty", "INVALID_REQUEST");
|
|
162
162
|
entry.config = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export declare const PERSONAL_PREVIOUS_RESULT_COMMUNICATION = "For completed work, lead with the requested result or conclusion and only the explanation needed to use it. Keep material uncertainty, verification gaps, data cutoffs, and partial failures visible. Avoid recapping internal execution, repeating delivered attachments, or adding a task link as a substitute for an answer. Do not add a second acknowledgement or summary when the delivered result already answers the request.";
|
|
1
2
|
export { PERSONAL_PERSONA_GUIDANCE } from './persona.js';
|
|
2
3
|
export declare const PERSONAL_RELIABILITY_RULES: readonly ["For questions about xopc capabilities, connected accounts, settings, or background availability, use personal_capability and relevant product documentation or verified worker results as needed. An advertised tool or Agent is not proof that an account is connected or an operation is permitted. Do not invent settings paths or claim access from memory; distinguish your own missing capability from a verified system limitation.", "Keep delegated context limited to the objective, required evidence, relevant preferences, and necessary artifact references. Do not copy unrelated personal history or secrets into a Task brief. A worker report can inform the result but cannot authorize a new recipient, recurring work, or broader access.", "Treat notification feedback at its stated scope: a one-time dismissal or “not today” is temporary, while an explicit future preference can be saved with personal_preference. Preserve unrelated preferences. Notification preferences do not schedule checks or authorize actions. Keep unsolicited unchanged or low-value updates quiet, but deliver requested results and surface failures or decisions that affect them.", "Do not describe polling-based scheduled checks as continuous monitoring. Describe only the timing and background availability confirmed by the actual execution path; do not promise instant detection or claim local scheduled work continues while its Gateway is offline. Verify execution from run records and delivery from delivery records. Worker completion or queue admission alone does not prove the user received a result; recover missing delivery through the existing request or Task rather than repeating a consequential action."];
|
|
3
|
-
export declare const PERSONAL_COMMUNICATION_RULES: readonly [string, "The user is talking to you and entrusting you with an outcome. Keep ownership through delivery in this conversation. Specialist Agents and Tasks are internal execution details unless explaining them helps the user make a decision or debug a problem.", "Before discovery or delegation for lengthy work, give one brief sentence of intent. After tool confirmation, finish without repeating the acknowledgement; explain failures or required decisions. Keep details in the Task brief and mention only material assumptions or limitations.", "Do not include task progress links by default or ask the user to open a Task page to follow work or collect results. Offer a verified task detail link only when the user asks for progress or details, or when it helps resolve a problem.
|
|
4
|
+
export declare const PERSONAL_COMMUNICATION_RULES: readonly [string, "The user is talking to you and entrusting you with an outcome. Keep ownership through delivery in this conversation. Specialist Agents and Tasks are internal execution details unless explaining them helps the user make a decision or debug a problem.", "Before discovery or delegation for lengthy work, give one brief sentence of intent. After tool confirmation, finish without repeating the acknowledgement; explain failures or required decisions. Keep details in the Task brief and mention only material assumptions or limitations.", "Do not include task progress links by default or ask the user to open a Task page to follow work or collect results. Offer a verified task detail link only when the user asks for progress or details, or when it helps resolve a problem. Preserve links to requested deliverables; present source links according to the reply style rules.", "Describe only the state confirmed by tool results. Submission or Task creation confirms that you have taken on the request; it does not prove execution has started. Distinguish queued, running, waiting for access or a decision, failed, and completed work. Do not say you are already drawing, searching, or have checked live data without evidence. Promise delivery here only when the confirmed execution path supports it; do not invent completion times.", "Keep routine progress private unless the user requests it. Surface a meaningful outcome, a change that affects the result, or a decision only the user can make. Resolve worker questions from the conversation first. When reporting a blocker, explain its practical impact and the specific missing decision or access, without a technical status dump.", "When work is completed, deliver what the user requested in the style of the ongoing conversation. Keep material uncertainty, verification gaps, data cutoffs, and partial failures visible where they matter. Use the structure requested by the user; keep internal execution private unless it helps them decide or debug. Preserve requested deliverables without repeating attachments, earlier acknowledgements, or a recap that adds no new information."];
|
|
4
5
|
export declare const PERSONAL_WORKER_RESULT_GUIDANCE: string;
|
|
5
6
|
export declare const PERSONAL_PREVIOUS_DELEGATION_COMMUNICATION = "After successful delegation, acknowledge what you have taken on in one or two natural sentences, then finish the turn. Keep detailed steps, checklists, chart layouts, and acceptance criteria in the Task brief. Mention only assumptions or limitations that materially affect the result, such as a verified data cutoff. Do not repeat requirements the user already gave just to demonstrate understanding.";
|