@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-
|
|
1
|
+
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-pmT2B_By.js";import{n as s,t as c}from"./cloud-credits-BMYMiiNn.js";import{i as l}from"./vendor-swr-BIWyz7Rc.js";import{t as u}from"./button-aIC072nz.js";import{t as d}from"./skeleton-BI5TyibZ.js";import{Yo as f,xo as p}from"./index-DxydK_AA.js";var m=e(),h=t();function g(e){let t=(BigInt(e)+500n)/1000n*1000n;return s(String(t))}async function _(){let e=await i(o(`/api/models/xopc-cloud/account-summary`));return c.parse(e.payload)}function v(e){let t=(0,m.c)(148),{labels:i}=e,o=a(y)===`zh`?`zh-CN`:`en-US`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={refreshInterval:6e4,revalidateOnFocus:!0},t[0]=s):s=t[0];let{data:c,error:v,isLoading:b,isValidating:x,mutate:S}=l(`/api/models/xopc-cloud/account-summary`,_,s);if(b){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(d,{className:`h-40 w-full rounded-xl`}),t[1]=e):e=t[1],e}if(v||!c){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(p,{className:`mt-0.5 size-4 shrink-0 text-amber-500`,"aria-hidden":!0}),t[2]=e):e=t[2];let n;t[3]===i.title?n=t[4]:(n=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[3]=i.title,t[4]=n);let r;t[5]===i.unavailable?r=t[6]:(r=(0,h.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:i.unavailable}),t[5]=i.unavailable,t[6]=r);let a;t[7]!==n||t[8]!==r?(a=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[e,(0,h.jsxs)(`div`,{children:[n,r]})]}),t[7]=n,t[8]=r,t[9]=a):a=t[9];let o;t[10]===S?o=t[11]:(o=()=>void S(),t[10]=S,t[11]=o);let s=x?`size-4 animate-spin`:`size-4`,c;t[12]===s?c=t[13]:(c=(0,h.jsx)(f,{className:s,"aria-hidden":!0}),t[12]=s,t[13]=c);let l;t[14]!==x||t[15]!==i.retry||t[16]!==o||t[17]!==c?(l=(0,h.jsxs)(u,{type:`button`,variant:`secondary`,disabled:x,onClick:o,children:[c,i.retry]}),t[14]=x,t[15]=i.retry,t[16]=o,t[17]=c,t[18]=l):l=t[18];let d;return t[19]!==a||t[20]!==l?(d=(0,h.jsx)(`section`,{className:`rounded-xl bg-surface-hover/25 p-4`,children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[a,l]})}),t[19]=a,t[20]=l,t[21]=d):d=t[21],d}let C,w,T,E,D,O,k,A,j,M;if(t[22]!==c.balance.availableCreditMicro||t[23]!==c.balance.expiring[0]||t[24]!==c.balance.grantedCreditMicro||t[25]!==c.balance.purchasedCreditMicro||t[26]!==c.balance.refundReservedCreditMicro||t[27]!==c.balance.usageReservedCreditMicro||t[28]!==c.links.details||t[29]!==c.links.purchase||t[30]!==c.usage.chargedCreditMicro||t[31]!==c.usage.requests||t[32]!==c.usage.totalTokens||t[33]!==i.availableCredits||t[34]!==i.connected||t[35]!==i.details||t[36]!==i.expiring||t[37]!==i.granted||t[38]!==i.purchase||t[39]!==i.purchased||t[40]!==i.recentUsage||t[41]!==i.reserved||t[42]!==i.title||t[43]!==i.tokenUsage||t[44]!==i.usageSummary||t[45]!==i.zeroBalance||t[46]!==o){let e=new Intl.NumberFormat(o),a=i.usageSummary.replace(`{{credits}}`,g(c.usage.chargedCreditMicro)).replace(`{{requests}}`,e.format(c.usage.requests));C=`rounded-xl bg-surface-hover/40 p-4 sm:p-5`;let s;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(n,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),t[57]=s):s=t[57];let l;t[58]===i.title?l=t[59]:(l=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[58]=i.title,t[59]=l);let d;t[60]===i.connected?d=t[61]:(d=(0,h.jsx)(`span`,{className:`rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:text-emerald-300`,children:i.connected}),t[60]=i.connected,t[61]=d);let f;t[62]!==l||t[63]!==d?(f=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[s,l,d]}),t[62]=l,t[63]=d,t[64]=f):f=t[64];let p;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[65]=p):p=t[65];let m;t[66]!==c.links.purchase||t[67]!==i.purchase?(m=(0,h.jsx)(u,{asChild:!0,variant:`primary`,children:(0,h.jsxs)(`a`,{href:c.links.purchase,target:`_blank`,rel:`noreferrer`,children:[i.purchase,p]})}),t[66]=c.links.purchase,t[67]=i.purchase,t[68]=m):m=t[68];let _;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[69]=_):_=t[69];let v;t[70]!==c.links.details||t[71]!==i.details?(v=(0,h.jsx)(u,{asChild:!0,variant:`secondary`,children:(0,h.jsxs)(`a`,{href:c.links.details,target:`_blank`,rel:`noreferrer`,children:[i.details,_]})}),t[70]=c.links.details,t[71]=i.details,t[72]=v):v=t[72];let y;t[73]!==m||t[74]!==v?(y=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap gap-2`,children:[m,v]}),t[73]=m,t[74]=v,t[75]=y):y=t[75],t[76]!==f||t[77]!==y?(w=(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[f,y]}),t[76]=f,t[77]=y,t[78]=w):w=t[78],j=`mt-4 grid gap-4 rounded-lg bg-surface-base/45 p-3 sm:grid-cols-[minmax(12rem,0.7fr)_minmax(0,1.3fr)] sm:gap-6`;let b;t[79]===i.availableCredits?b=t[80]:(b=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.availableCredits}),t[79]=i.availableCredits,t[80]=b);let x;t[81]===c.balance.availableCreditMicro?x=t[82]:(x=g(c.balance.availableCreditMicro),t[81]=c.balance.availableCreditMicro,t[82]=x);let S;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`ml-2 text-sm font-medium text-fg-muted`,children:`Credits`}),t[83]=S):S=t[83];let N;t[84]===x?N=t[85]:(N=(0,h.jsxs)(`p`,{className:`mt-1 text-2xl font-semibold tracking-tight text-fg`,children:[x,S]}),t[84]=x,t[85]=N);let P;t[86]!==c.balance.availableCreditMicro||t[87]!==i.zeroBalance?(P=c.balance.availableCreditMicro===`0`?(0,h.jsx)(`p`,{className:`mt-1 text-sm font-medium text-danger`,children:i.zeroBalance}):null,t[86]=c.balance.availableCreditMicro,t[87]=i.zeroBalance,t[88]=P):P=t[88];let F=i.purchased,I;t[89]===c.balance.purchasedCreditMicro?I=t[90]:(I=g(c.balance.purchasedCreditMicro),t[89]=c.balance.purchasedCreditMicro,t[90]=I);let L;t[91]!==i.purchased||t[92]!==I?(L=(0,h.jsxs)(`div`,{children:[F,`: `,I,` Credits`]}),t[91]=i.purchased,t[92]=I,t[93]=L):L=t[93];let R=i.granted,z;t[94]===c.balance.grantedCreditMicro?z=t[95]:(z=g(c.balance.grantedCreditMicro),t[94]=c.balance.grantedCreditMicro,t[95]=z);let B;t[96]!==i.granted||t[97]!==z?(B=(0,h.jsxs)(`div`,{children:[R,`: `,z,` Credits`]}),t[96]=i.granted,t[97]=z,t[98]=B):B=t[98];let V=i.reserved,H=String(BigInt(c.balance.usageReservedCreditMicro)+BigInt(c.balance.refundReservedCreditMicro)),U;t[99]===H?U=t[100]:(U=g(H),t[99]=H,t[100]=U);let W;t[101]!==i.reserved||t[102]!==U?(W=(0,h.jsxs)(`div`,{children:[V,`: `,U,` Credits`]}),t[101]=i.reserved,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==L||t[105]!==B||t[106]!==W?(G=(0,h.jsxs)(`div`,{className:`mt-2 space-y-1 text-xs text-fg-muted`,children:[L,B,W]}),t[104]=L,t[105]=B,t[106]=W,t[107]=G):G=t[107];let K;t[108]!==c.balance.expiring[0]||t[109]!==i.expiring||t[110]!==o?(K=c.balance.expiring[0]?(0,h.jsx)(`p`,{className:`mt-2 text-xs text-amber-600 dark:text-amber-400`,children:i.expiring.replace(`{{credits}}`,g(c.balance.expiring[0].creditMicro)).replace(`{{date}}`,new Date(c.balance.expiring[0].expiresAt).toLocaleDateString(o))}):null,t[108]=c.balance.expiring[0],t[109]=i.expiring,t[110]=o,t[111]=K):K=t[111],t[112]!==b||t[113]!==N||t[114]!==P||t[115]!==G||t[116]!==K?(M=(0,h.jsxs)(`div`,{children:[b,N,P,G,K]}),t[112]=b,t[113]=N,t[114]=P,t[115]=G,t[116]=K,t[117]=M):M=t[117],t[118]===i.recentUsage?k=t[119]:(k=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.recentUsage}),t[118]=i.recentUsage,t[119]=k),A=(0,h.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:a}),D=`mt-2 text-xs text-fg-subtle`,t[120]===i.tokenUsage?O=t[121]:(O=(0,h.jsx)(`summary`,{className:`cursor-pointer`,children:i.tokenUsage}),t[120]=i.tokenUsage,t[121]=O),T=`mt-1`,E=e.format(c.usage.totalTokens),t[22]=c.balance.availableCreditMicro,t[23]=c.balance.expiring[0],t[24]=c.balance.grantedCreditMicro,t[25]=c.balance.purchasedCreditMicro,t[26]=c.balance.refundReservedCreditMicro,t[27]=c.balance.usageReservedCreditMicro,t[28]=c.links.details,t[29]=c.links.purchase,t[30]=c.usage.chargedCreditMicro,t[31]=c.usage.requests,t[32]=c.usage.totalTokens,t[33]=i.availableCredits,t[34]=i.connected,t[35]=i.details,t[36]=i.expiring,t[37]=i.granted,t[38]=i.purchase,t[39]=i.purchased,t[40]=i.recentUsage,t[41]=i.reserved,t[42]=i.title,t[43]=i.tokenUsage,t[44]=i.usageSummary,t[45]=i.zeroBalance,t[46]=o,t[47]=C,t[48]=w,t[49]=T,t[50]=E,t[51]=D,t[52]=O,t[53]=k,t[54]=A,t[55]=j,t[56]=M}else C=t[47],w=t[48],T=t[49],E=t[50],D=t[51],O=t[52],k=t[53],A=t[54],j=t[55],M=t[56];let N;t[122]!==T||t[123]!==E?(N=(0,h.jsxs)(`p`,{className:T,children:[E,` tokens`]}),t[122]=T,t[123]=E,t[124]=N):N=t[124];let P;t[125]!==N||t[126]!==D||t[127]!==O?(P=(0,h.jsxs)(`details`,{className:D,children:[O,N]}),t[125]=N,t[126]=D,t[127]=O,t[128]=P):P=t[128];let F;t[129]!==c.balance.updatedAt||t[130]!==i.updatedAt||t[131]!==o?(F=i.updatedAt.replace(`{{time}}`,new Date(c.balance.updatedAt).toLocaleString(o)),t[129]=c.balance.updatedAt,t[130]=i.updatedAt,t[131]=o,t[132]=F):F=t[132];let I;t[133]===F?I=t[134]:(I=(0,h.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:F}),t[133]=F,t[134]=I);let L;t[135]!==P||t[136]!==I||t[137]!==k||t[138]!==A?(L=(0,h.jsxs)(`div`,{children:[k,A,P,I]}),t[135]=P,t[136]=I,t[137]=k,t[138]=A,t[139]=L):L=t[139];let R;t[140]!==L||t[141]!==j||t[142]!==M?(R=(0,h.jsxs)(`div`,{className:j,children:[M,L]}),t[140]=L,t[141]=j,t[142]=M,t[143]=R):R=t[143];let z;return t[144]!==C||t[145]!==w||t[146]!==R?(z=(0,h.jsxs)(`section`,{className:C,children:[w,R]}),t[144]=C,t[145]=w,t[146]=R,t[147]=z):z=t[147],z}function y(e){return e.language}export{v as t};
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DxydK_AA.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/dist-CxGUk8J-.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/es2015-DBLcMg5B.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-Ib6DaUTo.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-pmT2B_By.js">
|
|
20
23
|
<link rel="modulepreload" crossorigin href="/assets/floating-ui.dom-B7uQOZZW.js">
|
|
21
24
|
<link rel="modulepreload" crossorigin href="/assets/dist-CI_fqRk-.js">
|
|
22
25
|
<link rel="modulepreload" crossorigin href="/assets/dist-BGTk37IG.js">
|
|
@@ -25,28 +28,29 @@
|
|
|
25
28
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
29
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
30
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/mermaid-render-604gISVe.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/xml-_d7dTN2Q.js">
|
|
31
33
|
<link rel="modulepreload" crossorigin href="/assets/schemas-CObaziC7.js">
|
|
32
34
|
<link rel="modulepreload" crossorigin href="/assets/local-apps-yys1VChX.js">
|
|
33
35
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BAks11S4.js">
|
|
34
36
|
<link rel="modulepreload" crossorigin href="/assets/app-link-4gpFbdsr.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/cn-0WouolD0.js">
|
|
35
39
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-CZlvyzow.js">
|
|
37
41
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
38
42
|
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/button-
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/copy-text-row-
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/button-aIC072nz.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/copy-text-row-C7egVuKr.js">
|
|
41
45
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
42
46
|
<link rel="modulepreload" crossorigin href="/assets/activity-YogQEteU.js">
|
|
43
47
|
<link rel="modulepreload" crossorigin href="/assets/bot-DjLkhyZL.js">
|
|
44
48
|
<link rel="modulepreload" crossorigin href="/assets/chevron-left-DqFhpbvK.js">
|
|
45
49
|
<link rel="modulepreload" crossorigin href="/assets/chevron-right-BweFrslA.js">
|
|
46
50
|
<link rel="modulepreload" crossorigin href="/assets/dist-C3DSFZCi.js">
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/skeleton-BI5TyibZ.js">
|
|
48
52
|
<link rel="modulepreload" crossorigin href="/assets/settings-shell-dialog-layer-BU3UuiJr.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-select-
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-select-DHC7J4lG.js">
|
|
50
54
|
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
51
55
|
<link rel="modulepreload" crossorigin href="/assets/circle-check-C23XjkUj.js">
|
|
52
56
|
<link rel="modulepreload" crossorigin href="/assets/circle-dashed-8qMD7gHf.js">
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
<link rel="modulepreload" crossorigin href="/assets/form-field-width-DJw_jULe.js">
|
|
62
66
|
<link rel="modulepreload" crossorigin href="/assets/interaction-BdhHBbYa.js">
|
|
63
67
|
<link rel="modulepreload" crossorigin href="/assets/is-masked-secret-DOkL5b_X.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="/assets/secret-input-
|
|
68
|
+
<link rel="modulepreload" crossorigin href="/assets/secret-input-BxWHx6J6.js">
|
|
65
69
|
<link rel="modulepreload" crossorigin href="/assets/folder-open-CyzJ19I9.js">
|
|
66
70
|
<link rel="modulepreload" crossorigin href="/assets/message-square-plus-XP0tGdlV.js">
|
|
67
71
|
<link rel="modulepreload" crossorigin href="/assets/minimize-2-DtOGrlpo.js">
|
|
@@ -69,54 +73,53 @@
|
|
|
69
73
|
<link rel="modulepreload" crossorigin href="/assets/rotate-cw-LIg3Am9S.js">
|
|
70
74
|
<link rel="modulepreload" crossorigin href="/assets/search-DA7gz22f.js">
|
|
71
75
|
<link rel="modulepreload" crossorigin href="/assets/index.module-Cd9ENXfk.js">
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/session-api-
|
|
76
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-90pvxKox.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="/assets/session-api-D2J6VacQ.js">
|
|
74
78
|
<link rel="modulepreload" crossorigin href="/assets/constants-Dy8Gw0sF.js">
|
|
75
79
|
<link rel="modulepreload" crossorigin href="/assets/app-chrome-BeB4KgOf.js">
|
|
76
80
|
<link rel="modulepreload" crossorigin href="/assets/attachment-utils-core-BIOUBrpT.js">
|
|
77
81
|
<link rel="modulepreload" crossorigin href="/assets/files-Bw4SBGdM.js">
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-api-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-api-C01xjDt2.js">
|
|
79
83
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
80
84
|
<link rel="modulepreload" crossorigin href="/assets/use-async-resource-GrnWNwMZ.js">
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-D2oKh5ik.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-tMUDUWVH.js">
|
|
83
87
|
<link rel="modulepreload" crossorigin href="/assets/mic-CuUb7zc-.js">
|
|
84
88
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-BnqkFFBZ.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-CrD74S6k.js">
|
|
87
91
|
<link rel="modulepreload" crossorigin href="/assets/tasks-DwKXgZ-I.js">
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-Bf6NYuvT.js">
|
|
89
93
|
<link rel="modulepreload" crossorigin href="/assets/skill-wire-pattern-BPpeIcCi.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/shares-api-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/shares-api-cGtd3rjc.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-BOJYAeEJ.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-hTgxke6e.js">
|
|
93
97
|
<link rel="modulepreload" crossorigin href="/assets/git-branch-Dh9uxTot.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/notes-api-
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/notes-api-D-VLGhjV.js">
|
|
95
99
|
<link rel="modulepreload" crossorigin href="/assets/message-square-fVE7Ghj1.js">
|
|
96
100
|
<link rel="modulepreload" crossorigin href="/assets/pause-DuPxgSxk.js">
|
|
97
101
|
<link rel="modulepreload" crossorigin href="/assets/play-kxZvpBg8.js">
|
|
98
102
|
<link rel="modulepreload" crossorigin href="/assets/rotate-ccw-JM1TBLpp.js">
|
|
99
103
|
<link rel="modulepreload" crossorigin href="/assets/settings-2-D-csvaET.js">
|
|
100
104
|
<link rel="modulepreload" crossorigin href="/assets/sparkles-DHlfQFAF.js">
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-BaE0shFY.js">
|
|
105
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-BYe-jWB1.js">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-BGhPOSfz.js">
|
|
104
107
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/session-manager-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/send-session-input-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-provider-
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-Bi4muyaZ.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-f-4qw3AG.js">
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-D-DNV0ms.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/session-manager-64DD1cxN.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/send-session-input-BtF5UWGp.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-D7m5Eng5.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/extension-provider-Dnz8j6Q_.js">
|
|
112
115
|
<link rel="modulepreload" crossorigin href="/assets/loopi-Djb8XU3l.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-3slk24cw.js">
|
|
114
117
|
<link rel="modulepreload" crossorigin href="/assets/skill-api-utils-C7V4JVXM.js">
|
|
115
118
|
<link rel="modulepreload" crossorigin href="/assets/date-formatters-CUZAyDEg.js">
|
|
116
119
|
<link rel="modulepreload" crossorigin href="/assets/settings-form-draft-Dy10ldo8.js">
|
|
117
|
-
<link rel="stylesheet" crossorigin href="/assets/markdown-view-
|
|
120
|
+
<link rel="stylesheet" crossorigin href="/assets/markdown-view-ByJbFign.css">
|
|
118
121
|
<link rel="stylesheet" crossorigin href="/assets/loopi-C09I2mNj.css">
|
|
119
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
122
|
+
<link rel="stylesheet" crossorigin href="/assets/index-_xgO2IDa.css">
|
|
120
123
|
</head>
|
|
121
124
|
<body>
|
|
122
125
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region packages/realtime-protocol/src/voice-catalog.ts
|
|
4
|
+
/** Older catalogs apply each voice to every mode published by its model. */
|
|
5
|
+
function voiceSupportsMode(voice, mode) {
|
|
6
|
+
return voice.modes === void 0 || voice.modes.includes(mode);
|
|
7
|
+
}
|
|
4
8
|
var voiceDisplayNamesSchema, voiceModeCapabilitySchema, voiceManifestSchema, voiceSelectionSchema;
|
|
5
9
|
var init_voice_catalog = __esmMin((() => {
|
|
6
10
|
voiceDisplayNamesSchema = z.strictObject({
|
|
@@ -40,7 +44,8 @@ var init_voice_catalog = __esmMin((() => {
|
|
|
40
44
|
languages: z.array(z.string()),
|
|
41
45
|
gender: z.enum(["female", "male"]).optional(),
|
|
42
46
|
style: z.string().optional(),
|
|
43
|
-
description: z.string().optional()
|
|
47
|
+
description: z.string().optional(),
|
|
48
|
+
modes: z.array(voiceModeCapabilitySchema).optional()
|
|
44
49
|
})),
|
|
45
50
|
defaultVoice: z.string().min(1).optional(),
|
|
46
51
|
limits: z.strictObject({
|
|
@@ -67,4 +72,4 @@ var init_voice_catalog = __esmMin((() => {
|
|
|
67
72
|
}));
|
|
68
73
|
//#endregion
|
|
69
74
|
init_voice_catalog();
|
|
70
|
-
export { init_voice_catalog, voiceManifestSchema, voiceModeCapabilitySchema, voiceSelectionSchema };
|
|
75
|
+
export { init_voice_catalog, voiceManifestSchema, voiceModeCapabilitySchema, voiceSelectionSchema, voiceSupportsMode };
|
|
@@ -285,6 +285,13 @@ async function runXopcEmbeddedTurn(params) {
|
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
287
|
async function runXopcEmbeddedTurnInner(params) {
|
|
288
|
+
const preparationStartedAt = performance.now();
|
|
289
|
+
let firstModelRequestAt;
|
|
290
|
+
let currentModelRequestAt;
|
|
291
|
+
let modelRequestNumber = 0;
|
|
292
|
+
let firstModelTextSeen = false;
|
|
293
|
+
let latencyModelRef;
|
|
294
|
+
let latencyReasoning;
|
|
288
295
|
const { conversationId, runId, userMessage, model, tools: rawTools, systemPrompt, thinkingLevel, workspaceDir, sessionStore, onEvent } = params;
|
|
289
296
|
const toolPolicyConversationId = params.toolPolicyConversationId ?? conversationId;
|
|
290
297
|
const executionToolPolicy = resolveExecutionToolPolicy(toolPolicyConversationId);
|
|
@@ -526,6 +533,24 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
526
533
|
tools: effectiveTools
|
|
527
534
|
} } : {}
|
|
528
535
|
}, "Sending messages to AI");
|
|
536
|
+
currentModelRequestAt = performance.now();
|
|
537
|
+
modelRequestNumber += 1;
|
|
538
|
+
latencyModelRef = `${streamModel.provider}/${streamModel.id}`;
|
|
539
|
+
latencyReasoning = options?.reasoning;
|
|
540
|
+
if (firstModelRequestAt === void 0) {
|
|
541
|
+
firstModelRequestAt = currentModelRequestAt;
|
|
542
|
+
log.info({
|
|
543
|
+
conversationId,
|
|
544
|
+
runId,
|
|
545
|
+
modelRef: latencyModelRef,
|
|
546
|
+
thinking: latencyReasoning ?? "off",
|
|
547
|
+
phase: "first_model_request",
|
|
548
|
+
preparationMs: firstModelRequestAt - preparationStartedAt,
|
|
549
|
+
messageCount: effectiveContext.messages.length,
|
|
550
|
+
systemPromptLength: effectiveSystemPrompt.length,
|
|
551
|
+
toolCount: effectiveTools.length
|
|
552
|
+
}, "Embedded first model request ready");
|
|
553
|
+
}
|
|
529
554
|
return trackAiUsageStream(streamModel, {
|
|
530
555
|
operation: continuesAfterTool(effectiveContext.messages) ? "agent.continue_after_tool" : "agent.answer",
|
|
531
556
|
conversationId,
|
|
@@ -641,6 +666,19 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
641
666
|
if (baseDecision && baseDecision.action === "continue") return { action: "continue" };
|
|
642
667
|
};
|
|
643
668
|
unsubscribe = subscribeEmbeddedSessionEvents(session, (event) => {
|
|
669
|
+
if (!firstModelTextSeen && firstModelRequestAt !== void 0 && currentModelRequestAt !== void 0 && event.type === "message_update" && event.assistantMessageEvent?.type === "text_delta" && event.assistantMessageEvent.delta.trim()) {
|
|
670
|
+
firstModelTextSeen = true;
|
|
671
|
+
log.info({
|
|
672
|
+
conversationId,
|
|
673
|
+
runId,
|
|
674
|
+
modelRef: latencyModelRef,
|
|
675
|
+
thinking: latencyReasoning ?? "off",
|
|
676
|
+
phase: "first_model_text",
|
|
677
|
+
modelFirstTextMs: performance.now() - currentModelRequestAt,
|
|
678
|
+
firstRequestToTextMs: performance.now() - firstModelRequestAt,
|
|
679
|
+
modelRequestNumber
|
|
680
|
+
}, "Embedded first response text ready");
|
|
681
|
+
}
|
|
644
682
|
if (event.type === "message_end" && event.message.role === "assistant") recordPromptCacheTouch(conversationId, resolvedModel, event.message.usage);
|
|
645
683
|
if (event.type === "tool_execution_end") {
|
|
646
684
|
markTurnToolResult(conversationId, runId, event.toolName);
|
|
@@ -136,7 +136,7 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
136
136
|
const existing = this.pool.get(params.runtimeId);
|
|
137
137
|
let entry;
|
|
138
138
|
let reused = false;
|
|
139
|
-
if (reuseEnabled && existing && existing.fingerprint === fingerprint) {
|
|
139
|
+
if (reuseEnabled && existing && !existing.invalidated && existing.fingerprint === fingerprint) {
|
|
140
140
|
this.clearIdleTimer(existing);
|
|
141
141
|
entry = existing;
|
|
142
142
|
entry.lastUsedAt = Date.now();
|
|
@@ -159,11 +159,21 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
159
159
|
policyRevision: executionToolPolicy.revision
|
|
160
160
|
}, "Created embedded session runner");
|
|
161
161
|
}
|
|
162
|
+
entry.activeLeases++;
|
|
163
|
+
let released = false;
|
|
162
164
|
return {
|
|
163
165
|
session: entry.session,
|
|
164
166
|
piSm: entry.piSm,
|
|
165
167
|
reused,
|
|
166
168
|
release: () => {
|
|
169
|
+
if (released || this.pool.get(params.runtimeId) !== entry) return;
|
|
170
|
+
released = true;
|
|
171
|
+
entry.activeLeases--;
|
|
172
|
+
if (entry.activeLeases > 0) return;
|
|
173
|
+
if (entry.invalidated) {
|
|
174
|
+
this.disposePooledRunner(params.runtimeId, entry, "external_tool_connection_changed");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
167
177
|
if (!this.isEnabledFn()) {
|
|
168
178
|
this.disposePooledRunner(params.runtimeId, entry, "runner_disabled");
|
|
169
179
|
return;
|
|
@@ -306,11 +316,19 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
306
316
|
baseStreamFn,
|
|
307
317
|
lastUsedAt: Date.now(),
|
|
308
318
|
idleTimer: null,
|
|
319
|
+
activeLeases: 0,
|
|
320
|
+
invalidated: false,
|
|
309
321
|
releaseInvalidations: tools.flatMap((tool) => {
|
|
310
322
|
const subscribe = getXopcToolMetadata(tool)?.subscribeInvalidation;
|
|
311
323
|
if (!subscribe) return [];
|
|
312
|
-
return [subscribe(() => {
|
|
313
|
-
|
|
324
|
+
return [subscribe((reason) => {
|
|
325
|
+
const current = this.pool.get(runtimeId);
|
|
326
|
+
if (current?.session !== session) return;
|
|
327
|
+
if (reason === "connection" && current.activeLeases > 0) {
|
|
328
|
+
current.invalidated = true;
|
|
329
|
+
log.info({ runtimeId }, "Device connection changed; runner will refresh after the active turn");
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
314
332
|
abortEmbeddedRun(runtimeId);
|
|
315
333
|
this.evict(runtimeId, "external_tool_catalog_changed");
|
|
316
334
|
})];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AgentTool, BeforeToolCallContext } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { ToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
3
|
+
export type ToolInvalidationReason = 'connection' | 'authorization';
|
|
3
4
|
export type XopcToolMetadata = Pick<ToolDefinition, 'exposure' | 'namespace' | 'annotations' | 'outputSchema'> & {
|
|
4
5
|
external?: {
|
|
5
6
|
toolRef: string;
|
|
6
7
|
revision: string;
|
|
7
8
|
readOnly: boolean;
|
|
8
9
|
};
|
|
9
|
-
subscribeInvalidation?: (listener: () => void) => () => void;
|
|
10
|
+
subscribeInvalidation?: (listener: (reason?: ToolInvalidationReason) => void) => () => void;
|
|
10
11
|
};
|
|
11
12
|
export declare function setXopcToolMetadata(tool: AgentTool, metadata: XopcToolMetadata): AgentTool;
|
|
12
13
|
export declare function getXopcToolMetadata(tool: AgentTool): XopcToolMetadata | undefined;
|
|
@@ -73,15 +73,18 @@ function createDefaultExternalToolGatewayTools(deps) {
|
|
|
73
73
|
registry.subscribeInvalidation = (conversationId, ref, listener) => {
|
|
74
74
|
const parsed = parseExternalToolRef(ref, "endpoint");
|
|
75
75
|
if (!parsed) return () => {};
|
|
76
|
-
const releaseEndpoint = endpoints.registry.onChange((id) => {
|
|
77
|
-
if (id === parsed?.namespace) listener();
|
|
76
|
+
const releaseEndpoint = endpoints.registry.onChange((id, reason) => {
|
|
77
|
+
if (id === parsed?.namespace) listener(reason ?? "connection");
|
|
78
78
|
});
|
|
79
|
+
const principalId = endpoints.registry.get(parsed.namespace)?.principalId;
|
|
80
|
+
const releasePrincipal = principalId ? endpoints.registry.onPrincipalRevoked(principalId, () => listener("authorization")) : () => {};
|
|
79
81
|
const releaseBinding = endpoints.bindings.onChange((id) => {
|
|
80
|
-
if (id === conversationId) listener();
|
|
82
|
+
if (id === conversationId) listener("authorization");
|
|
81
83
|
});
|
|
82
84
|
return () => {
|
|
83
85
|
releaseEndpoint();
|
|
84
86
|
releaseBinding();
|
|
87
|
+
releasePrincipal();
|
|
85
88
|
};
|
|
86
89
|
};
|
|
87
90
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { ExternalToolService } from './service.js';
|
|
3
3
|
import type { ExternalToolSource } from './types.js';
|
|
4
|
+
import type { ToolInvalidationReason } from '../embedded/tool-metadata.js';
|
|
4
5
|
import type { ToolExecutorConfig } from '../tools/executor.js';
|
|
5
6
|
export interface ExternalToolRegistry {
|
|
6
7
|
service: ExternalToolService;
|
|
7
8
|
nativeSources: readonly ExternalToolSource[];
|
|
8
9
|
execute: AgentTool['execute'];
|
|
9
10
|
executorConfig?: Partial<ToolExecutorConfig>;
|
|
10
|
-
subscribeInvalidation?: (conversationId: string, toolRef: string, listener: () => void) => () => void;
|
|
11
|
+
subscribeInvalidation?: (conversationId: string, toolRef: string, listener: (reason?: ToolInvalidationReason) => void) => () => void;
|
|
11
12
|
}
|
|
12
13
|
/** Keep the host executor available without exposing its registry in model declarations. */
|
|
13
14
|
export declare function bindExternalToolRegistry(tool: AgentTool, registry: ExternalToolRegistry): void;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
2
3
|
import { getSessionConfig } from "../../storage/sqlite/config-repository.js";
|
|
3
4
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
4
5
|
import { init_response_language, resolveResponseLanguage } from "../../i18n/response-language.js";
|
|
6
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
7
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
5
8
|
//#region src/agent/prompt/response-language.ts
|
|
6
9
|
init_response_language();
|
|
7
10
|
init_sqlite();
|
|
11
|
+
init_task_repository();
|
|
8
12
|
function resolveResponseLanguageForSession(config, conversationId) {
|
|
9
|
-
|
|
13
|
+
const language = resolveResponseLanguage(config?.userContext?.preferences?.responseLanguage ?? "auto", conversationId && isXopcDatabaseOpen() ? getSessionConfig(conversationId)?.responseLanguage : void 0);
|
|
14
|
+
if (language !== "auto" || !conversationId || !isXopcDatabaseOpen()) return language;
|
|
15
|
+
const taskId = new TaskConversationRepository().resolveActiveExecutionSession(conversationId)?.taskId;
|
|
16
|
+
const task = taskId ? new TaskRepository().get(taskId) : void 0;
|
|
17
|
+
return task ? resolveTaskLocale(task) === "zh" ? "zh-CN" : "en" : language;
|
|
10
18
|
}
|
|
11
19
|
//#endregion
|
|
12
20
|
export { resolveResponseLanguageForSession };
|
|
@@ -74,19 +74,6 @@ var SessionConfigService = class {
|
|
|
74
74
|
fixedModel: partial.fixedModel ?? existing?.fixedModel ?? false
|
|
75
75
|
});
|
|
76
76
|
this.opts.modelManager.restoreSessionModel(conversationId, modelRef, updated.fixedModel === true);
|
|
77
|
-
try {
|
|
78
|
-
if (this.opts.agentManager.getAgent(conversationId)) {
|
|
79
|
-
this.opts.agentManager.setModelForSession(conversationId, modelRef);
|
|
80
|
-
this.opts.agentManager.setThinkingLevel(conversationId, thinkingLevel);
|
|
81
|
-
}
|
|
82
|
-
} catch (err) {
|
|
83
|
-
this.opts.agentManager.removeAgent(conversationId);
|
|
84
|
-
log.warn({
|
|
85
|
-
err,
|
|
86
|
-
conversationId,
|
|
87
|
-
modelRef
|
|
88
|
-
}, "Saved model configuration; runtime will reload before the next turn");
|
|
89
|
-
}
|
|
90
77
|
}
|
|
91
78
|
}
|
|
92
79
|
const activityDetailLevel = partial.activityDetailLevel !== void 0 ? partial.activityDetailLevel : partial.reasoningLevel;
|
|
@@ -19,8 +19,8 @@ export interface TaskJudgeDecision {
|
|
|
19
19
|
nextAction?: string;
|
|
20
20
|
judgment: TaskJudgment;
|
|
21
21
|
}
|
|
22
|
-
export declare function parseTaskJudgeDecision(raw: string, criteriaCount: number): TaskJudgeDecision;
|
|
23
|
-
export declare function requestTaskJudgeDecision(complete: (attempt: number) => Promise<string>, criteriaCount: number): Promise<TaskJudgeDecision>;
|
|
22
|
+
export declare function parseTaskJudgeDecision(raw: string, criteriaCount: number, locale?: 'en' | 'zh'): TaskJudgeDecision;
|
|
23
|
+
export declare function requestTaskJudgeDecision(complete: (attempt: number) => Promise<string>, criteriaCount: number, locale?: 'en' | 'zh'): Promise<TaskJudgeDecision>;
|
|
24
24
|
export declare function codingCompletionEvidence(rows: readonly TranscriptStoredRow[]): {
|
|
25
25
|
allowed: boolean;
|
|
26
26
|
workspace?: string;
|
|
@@ -8,7 +8,10 @@ import { getApiKey, init_providers, resolveModel } from "../../providers/index.j
|
|
|
8
8
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
9
9
|
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
10
10
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
11
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
11
12
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
13
|
+
import { buildResponseLanguageSection } from "../prompt/sections/response-language.js";
|
|
14
|
+
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
12
15
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
13
16
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
17
|
init_schema();
|
|
@@ -22,7 +25,7 @@ function compactHistory(messages) {
|
|
|
22
25
|
const text = JSON.stringify(messages);
|
|
23
26
|
return text.length <= MAX_HISTORY_CHARS ? text : text.slice(-MAX_HISTORY_CHARS);
|
|
24
27
|
}
|
|
25
|
-
function parseTaskJudgeDecision(raw, criteriaCount) {
|
|
28
|
+
function parseTaskJudgeDecision(raw, criteriaCount, locale = "en") {
|
|
26
29
|
const text = stripCodeFences(raw);
|
|
27
30
|
const start = text.indexOf("{");
|
|
28
31
|
const end = text.lastIndexOf("}");
|
|
@@ -42,7 +45,7 @@ function parseTaskJudgeDecision(raw, criteriaCount) {
|
|
|
42
45
|
}] : [];
|
|
43
46
|
}).slice(0, 5) : [];
|
|
44
47
|
const nextAction = typeof decision.nextAction === "string" && decision.nextAction.trim() ? decision.nextAction.trim() : void 0;
|
|
45
|
-
const recommendation = typeof decision.recommendation === "string" && decision.recommendation.trim() ? decision.recommendation.trim() : nextAction ?? "Continue gathering verifiable evidence.";
|
|
48
|
+
const recommendation = typeof decision.recommendation === "string" && decision.recommendation.trim() ? decision.recommendation.trim() : nextAction ?? (locale === "zh" ? "继续收集可验证的证据。" : "Continue gathering verifiable evidence.");
|
|
46
49
|
const confidence = typeof decision.confidence === "number" && Number.isFinite(decision.confidence) ? Math.max(0, Math.min(1, decision.confidence)) : .5;
|
|
47
50
|
return {
|
|
48
51
|
completedCriteria,
|
|
@@ -50,19 +53,19 @@ function parseTaskJudgeDecision(raw, criteriaCount) {
|
|
|
50
53
|
...nextAction ? { nextAction } : {},
|
|
51
54
|
judgment: {
|
|
52
55
|
recommendation,
|
|
53
|
-
reasons: reasons.length > 0 ? reasons : ["No verified completion evidence was found."],
|
|
56
|
+
reasons: reasons.length > 0 ? reasons : [locale === "zh" ? "尚未找到已验证的完成证据。" : "No verified completion evidence was found."],
|
|
54
57
|
rejectedAlternatives,
|
|
55
58
|
...typeof decision.uncertainty === "string" && decision.uncertainty.trim() ? { uncertainty: decision.uncertainty.trim() } : {},
|
|
56
59
|
confidence
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
}
|
|
60
|
-
async function requestTaskJudgeDecision(complete, criteriaCount) {
|
|
63
|
+
async function requestTaskJudgeDecision(complete, criteriaCount, locale = "en") {
|
|
61
64
|
let parseError;
|
|
62
65
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
63
66
|
const raw = await complete(attempt);
|
|
64
67
|
try {
|
|
65
|
-
return parseTaskJudgeDecision(raw, criteriaCount);
|
|
68
|
+
return parseTaskJudgeDecision(raw, criteriaCount, locale);
|
|
66
69
|
} catch (error) {
|
|
67
70
|
parseError = error;
|
|
68
71
|
}
|
|
@@ -129,8 +132,12 @@ var TaskJudgeService = class {
|
|
|
129
132
|
const history = compactHistory(await this.options.sessionStore.loadMessages(payload.conversationId));
|
|
130
133
|
const proof = codingCompletionEvidence(await this.options.sessionStore.loadTranscriptRows(payload.conversationId));
|
|
131
134
|
const criteria = task.contract.acceptanceCriteria;
|
|
135
|
+
const responseLanguage = resolveResponseLanguageForSession(this.options.getConfig(), payload.conversationId);
|
|
136
|
+
const locale = responseLanguage === "auto" ? resolveTaskLocale(task) : responseLanguage === "zh-CN" ? "zh" : "en";
|
|
132
137
|
const prompt = [
|
|
133
138
|
"You are an independent task verifier. Be strict and evidence-driven.",
|
|
139
|
+
buildResponseLanguageSection(locale === "zh" ? "zh-CN" : "en"),
|
|
140
|
+
"The recommendation, nextAction, reasons, rejectedAlternatives and uncertainty are displayed directly to the user. Apply the response language to every prose value. Keep JSON keys, criterion indexes, identifiers and proper nouns unchanged.",
|
|
134
141
|
"Mark a criterion complete only when observed tool results or user-provided facts prove it. An assistant completion claim is not verification evidence.",
|
|
135
142
|
`Runtime coding evidence: ${JSON.stringify(proof)}`,
|
|
136
143
|
"needsUser is true only when a specific decision, permission, credential, or missing fact must come from the user.",
|
|
@@ -165,15 +172,15 @@ var TaskJudgeService = class {
|
|
|
165
172
|
const modelError = getAssistantMessageErrorReason(response);
|
|
166
173
|
if (modelError) throw new Error(modelError);
|
|
167
174
|
return extractAssistantText(response.content);
|
|
168
|
-
}, criteria.length);
|
|
175
|
+
}, criteria.length, locale);
|
|
169
176
|
if (!proof.allowed || proof.workspace && (!proof.revision || await readWorkspaceRevision(proof.workspace) !== proof.revision)) {
|
|
170
177
|
decision.completedCriteria = [];
|
|
171
|
-
decision.judgment.reasons.unshift("Current workspace verification is missing, failed or stale.");
|
|
178
|
+
decision.judgment.reasons.unshift(locale === "zh" ? "当前工作区验证缺失、失败或已过期。" : "Current workspace verification is missing, failed or stale.");
|
|
172
179
|
}
|
|
173
180
|
const now = Date.now();
|
|
174
181
|
const evidence = decision.completedCriteria.map((index) => ({
|
|
175
182
|
kind: "state",
|
|
176
|
-
title: `Independently verified: ${criteria[index]}`,
|
|
183
|
+
title: locale === "zh" ? `已独立验证:${criteria[index]}` : `Independently verified: ${criteria[index]}`,
|
|
177
184
|
summary: decision.judgment.reasons[0],
|
|
178
185
|
verifies: [criteria[index]],
|
|
179
186
|
provenance: "judge",
|
|
@@ -207,7 +214,7 @@ var TaskJudgeService = class {
|
|
|
207
214
|
expectedRunVersion: run.version,
|
|
208
215
|
receipt: {
|
|
209
216
|
status: "succeeded",
|
|
210
|
-
summary: payload.assistantPlainText || "Agent run completed",
|
|
217
|
+
summary: payload.assistantPlainText || (locale === "zh" ? "助手执行完成" : "Agent run completed"),
|
|
211
218
|
changes: [],
|
|
212
219
|
evidence,
|
|
213
220
|
verification: {
|
|
@@ -12,10 +12,12 @@ import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
|
12
12
|
import "../../activity/index.js";
|
|
13
13
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
14
14
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
15
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
15
16
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
16
17
|
import "../../capabilities/runtime/dispatcher.js";
|
|
17
18
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
18
19
|
import "../../projects/index.js";
|
|
20
|
+
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
19
21
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
20
22
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
21
23
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
@@ -1413,7 +1415,9 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1413
1415
|
ok: false,
|
|
1414
1416
|
error: "Invalid dependsOnTaskIds"
|
|
1415
1417
|
};
|
|
1416
|
-
const
|
|
1418
|
+
const responseLanguage = resolveResponseLanguageForSession(deps.getConfig?.(), deps.getCurrentConversationId?.());
|
|
1419
|
+
const taskLocale = locale ?? (responseLanguage === "auto" ? resolveTaskLocale({ title: objective }) : responseLanguage === "zh-CN" ? "zh" : "en");
|
|
1420
|
+
const baseContract = defineTaskContract(objective, taskLocale);
|
|
1417
1421
|
const contractFields = [
|
|
1418
1422
|
"expectedOutputs",
|
|
1419
1423
|
"acceptanceCriteria",
|
|
@@ -1470,7 +1474,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1470
1474
|
...projectId ? { projectId } : {},
|
|
1471
1475
|
delegateAgentId: agentId,
|
|
1472
1476
|
...originConversationId ? { originConversationId } : {},
|
|
1473
|
-
|
|
1477
|
+
locale: taskLocale,
|
|
1474
1478
|
contract: {
|
|
1475
1479
|
...contract,
|
|
1476
1480
|
acceptancePolicy: "verified_auto",
|
|
@@ -4,8 +4,8 @@ import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
|
4
4
|
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
5
|
import { createDevicePairingSetup, init_device_pairing_repository } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
6
|
import { loadConfig } from "../config/loader.js";
|
|
7
|
-
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
8
7
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
|
|
8
|
+
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
//#region src/browser/native-messaging-host.ts
|
|
11
11
|
init_src();
|
|
@@ -4,10 +4,10 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
5
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
6
|
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
7
|
-
import {
|
|
7
|
+
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
|
|
9
|
+
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
9
10
|
import "../native-messaging-host.js";
|
|
10
|
-
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
12
|
import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
package/dist/src/cli/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { version } from "../../package.js";
|
|
3
|
-
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
4
|
-
import "../infra/http-proxy-env.js";
|
|
5
3
|
import "./cli-log-level-preset.js";
|
|
4
|
+
import "../infra/http-proxy-env.js";
|
|
5
|
+
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
6
6
|
import { formatRootHelp } from "./command-manifest.js";
|
|
7
7
|
//#region src/cli/bin.ts
|
|
8
8
|
ensureXopcCliOnPath();
|