@xopcai/xopc 0.0.378 → 0.0.380
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-OKK1A-IR.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-By5OXUfL.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CxZeGEuL.js → agent-plugin-dialog-b24CxjaT.js} +1 -1
- 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/agents-tJxKA9VH.js +66 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CWqbEntC.js → app-management-settings-panel-DxKh06hG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-QznCLnam.js → appearance-settings-C8CeHpdR.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-wbVq-6PP.js → apps-page-CZSTLErb.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BclI5H7-.js → archive-plugin-aoEF5gna.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CTKIwPAS.js → automations-page-CSWWUZse.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-D2RJ-Lzn.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-D9FwadCs.js → binary-plugins-BM3Lr1BP.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Dqqtybdf.js → block-editor-DMZ3_pPz.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-FGALoJY8.js → browser-automation-inputs-BcBLdyVd.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-BLSr6du1.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BlDHSstc.js +3 -0
- 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-CbPvaNJF.js → capabilities-page-DHT4cB-Y.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-NZZNtjwZ.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-XMz78V4c.js → capability-header-actions-V7TdNf7i.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CJUz97Cw.js → channels-sgWMfPkw.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dr3rujcs.js → chat-terminal-dock-B4HNp59x.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-G2lMB7CR.js → computer-settings-page-B2iwtbBu.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Cne5MBuz.js → connector-service-page-DTn3Z-MT.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BJii6NMu.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-yGmnkoC5.js → date-picker-DrUc4ivy.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-CdKC_TNa.js → dependency-picker-Bs16sgfD.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C4d305Me.js → desktop-pet-Dg0Cp16O.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-hCS9Mddt.js → desktop-pet-settings-BeJg3R-X.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DPqFaLVI.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-kYdBIm8m.js → directory-picker-path-field-BZkjdejC.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-odpIjn1q.js → extension-debug-page-CFnlTs2-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C6Jn5baO.js → extension-page-BH25rxhA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DB4M3dc8.js → extension-provider-CmaIRIVP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Clx81lZy.js → extension-settings-page-D0af0S3r.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-pBVU4PxA.js → fallback-models-BD_9_8lg.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-BcSr6MzW.js → gateway-settings-Bzrm6DMQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BRCCiCBH.js → gateway-startup-retry-90pvxKox.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-oHguULk0.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-CjFNSzDN.js} +1 -1
- package/dist/gateway/static/root/assets/index-_xgO2IDa.css +1 -0
- package/dist/gateway/static/root/assets/index-hn5CBddI.js +106 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CyFSxteg.js → keyboard-shortcuts-settings-DKdWZ7pq.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-B-hYeH8P.js → local-app-workbench-page-CXJQpTS9.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CFt8G-ae.js → local-apps-page-9dyoG2s0.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-pMgnuu0O.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-BDuuXJ5t.js → management-settings-CxElPS5j.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CdqdeQqI.js → markdown-view-B_7--qVD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-hqKbHVyi.js → media-plugins-C6tT2oPH.js} +1 -1
- 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-4GI5kfs2.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-B0QQSN4M.js → notes-api-ChO4X97y.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-DaMnzWfF.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Dp1RoS6x.js → page-context-capture-button-3bLWMSqt.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-BeAW5QQd.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-DZyCQVVW.js → product-open-page-BiGwWy9s.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CrfIfrVJ.js → product-preview-content-Dvy5ieTo.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BNgCsfeE.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-DZ98gcjB.js → projects-page-CATt0m8t.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-5o06KAdu.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-BnRVbeGi.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-CVlz-PiN.js → scenes-page-BVjQ4A9S.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DIC8IlM1.js → schema-form-C0QHo3do.js} +1 -1
- package/dist/gateway/static/root/assets/send-session-input-BhWG0d-Z.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-D2xce33J.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-BHYhAsHC.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DO148Ocl.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-CN0_Np6E.js → settings-page-BT6dQ5nv.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-B9EqOzrI.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-C0gKFt8r.js → share-link-dialog-Cu1miKUo.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DxQ6yfYv.js → share-preview-page-CWH4BdnM.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-B3Z6sQEA.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-BFhU0NNu.js → skill-api-pzPKld3K.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-Busjd4VD.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DHhaFWty.js → system-settings-panel-CDuqpAIG.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CHBEI5uz.js → task-detail-page-CNt-P3Kl.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-AGJtkFIu.js → task-expandable-content-Dgk9lYGd.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-B90frz6c.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-Bbb_6pV4.js → tunnel-api-BJ2UEjeF.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BEiWznDq.js → usage-page-DrV2qcKO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BtTE5X_M.js → use-autosave-Ct1x4pqI.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-BBHrVqB7.js → use-composer-attachments-CyWRo1B1.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CQmLEkdj.js → use-file-preview-expanded-JIgp5qPT.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-CQReU8e2.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-tQsUdQnu.js → voice-api-key-field-CSG8Hx8V.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-Dp107FXF.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CqYp6zjF.js → workflow-run-setup-panel-CZKJ6leF.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-2HuveBs_.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-Bu6Csrxf.js → workspace-api-DO_TWsiS.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-D3Cyk8pp.js → xopc-cloud-account-card-CBjtpPiL.js} +1 -1
- package/dist/gateway/static/root/index.html +27 -27
- package/dist/package.js +1 -1
- package/dist/packages/realtime-protocol/src/voice-catalog.js +7 -2
- package/dist/src/agent/agent-manager.js +3 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +38 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/prompt/response-language.js +9 -1
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-config-service.js +0 -13
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- 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/factory.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +8 -4
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/bin.js +2 -2
- package/dist/src/cli/commands/agent.js +3 -3
- package/dist/src/cli/commands/agents.js +1 -1
- 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 +3 -3
- package/dist/src/cli/commands/onboard/model.js +3 -3
- 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/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- 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/lib/config-payload.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/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/personal-agent.js +4 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +12 -4
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +1 -1
- 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/service.js +2 -2
- package/dist/src/gateway/side-chat/manager.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/local-apps/service.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/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompt-context.js +3 -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/personal-agent/service.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- 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-handoff-service.js +1 -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/tui/backends/embedded-backend.js +2 -2
- 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 +3 -1
- package/dist/src/voice/realtime/omniRoute.d.ts +1 -1
- package/dist/src/voice/realtime/omniRoute.js +4 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- 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 +4 -4
- 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/browser-automations-page-hQbQFWl-.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-DQvfXaeq.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CjApEiV4.js +0 -8
- package/dist/gateway/static/root/assets/connectors-page-CbxL6ENI.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C6qeCyfO.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CHAa_VNb.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/logs-page-BQ9AzAj9.js +0 -2
- package/dist/gateway/static/root/assets/models-hub-cache-D0yA-nf6.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-G_6LpTik.js +0 -5
- 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/shares-settings-C_ZOqMjz.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,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
|
|
3
|
-
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
6
6
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
7
7
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_account_id, normalizeAccountId } from "./account-id.js";
|
|
3
|
+
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
4
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
4
5
|
import { init_agent_session_key, resolveAgentPeerConversationId } from "./agent-session-key.js";
|
|
5
6
|
import { init_session_key, resolveConversationId } from "./session-key.js";
|
|
6
|
-
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
7
7
|
import { init_bindings, parseBindingRules, resolveRoute as resolveRoute$1 } from "./bindings.js";
|
|
8
8
|
//#region src/routing/resolve-route.ts
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { validateConversationId } from "../../packages/gateway-contract/src/conversation-identity.js";
|
|
2
2
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { init_agent_session_key, normalizeAgentId } from "./agent-session-key.js";
|
|
4
3
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
4
|
import { init_agent_scope, listAgentEntries, resolveAgentIdByWorkspacePath, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
|
+
import { init_agent_session_key, normalizeAgentId } from "./agent-session-key.js";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
//#region src/routing/resolve-tui-session-key.ts
|
|
8
8
|
init_src();
|
|
@@ -2,10 +2,10 @@ import { ProductReadContracts } from "../../../packages/gateway-contract/src/cap
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../task-run-repository.js";
|
|
5
|
-
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
6
|
-
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
7
5
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
6
|
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
7
|
+
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
8
|
+
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
9
9
|
import { TaskContextRepository } from "../task-context-repository.js";
|
|
10
10
|
import { TaskDependencyService } from "../task-dependency-service.js";
|
|
11
11
|
import { TaskCriterionReviewRepository } from "../task-criterion-review-repository.js";
|
|
@@ -4,7 +4,9 @@ import { TaskRepository, init_task_repository } from "../task-repository.js";
|
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../task-run-repository.js";
|
|
5
5
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
6
6
|
import { defineAtomicCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
7
|
+
import { resolveTaskLocale } from "../task-language.js";
|
|
7
8
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
9
|
+
import { resolveResponseLanguageForSession } from "../../agent/prompt/response-language.js";
|
|
8
10
|
import { TaskApplicationService } from "../task-application-service.js";
|
|
9
11
|
import { TaskSignalService } from "../task-signal-service.js";
|
|
10
12
|
import { z } from "zod";
|
|
@@ -61,9 +63,16 @@ function registerTaskWriteCapabilities(dispatcher, deps) {
|
|
|
61
63
|
}
|
|
62
64
|
} : input.activation;
|
|
63
65
|
if (context.surface === "agent" && input.originConversationId && input.originConversationId !== context.conversationId) throw new CapabilityError("FORBIDDEN", "Task origin must be the active conversation");
|
|
66
|
+
const originConversationId = context.surface === "agent" ? context.conversationId : input.originConversationId;
|
|
67
|
+
const language = resolveResponseLanguageForSession(config, originConversationId);
|
|
68
|
+
const locale = input.locale ?? (language === "auto" ? resolveTaskLocale({
|
|
69
|
+
title: input.title,
|
|
70
|
+
contract: input.contract
|
|
71
|
+
}) : language === "zh-CN" ? "zh" : "en");
|
|
64
72
|
return new TaskApplicationService().create({
|
|
65
73
|
...input,
|
|
66
|
-
|
|
74
|
+
locale,
|
|
75
|
+
originConversationId,
|
|
67
76
|
delegateAgentId: agentId,
|
|
68
77
|
activation,
|
|
69
78
|
idempotencyKey: context.idempotencyKey
|
|
@@ -5,6 +5,7 @@ import { enqueueTaskAttentionRequiredEvent, enqueueTaskChangedEvent, init_task_c
|
|
|
5
5
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
6
6
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
7
7
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
8
|
+
import { resolveTaskLocale } from "./task-language.js";
|
|
8
9
|
import { TaskReadModelProjector } from "./task-read-model-projector.js";
|
|
9
10
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
10
11
|
import { TaskDependencyService } from "./task-dependency-service.js";
|
|
@@ -307,7 +308,7 @@ var TaskApplicationService = class {
|
|
|
307
308
|
if (!this.#runs.listActiveWaits(task.id).some((item) => item.kind === "paused")) this.#runs.createWait({
|
|
308
309
|
taskId: task.id,
|
|
309
310
|
kind: "paused",
|
|
310
|
-
reason: "Approval declined by user",
|
|
311
|
+
reason: resolveTaskLocale(task) === "zh" ? "用户已拒绝授权" : "Approval declined by user",
|
|
311
312
|
condition: { approvalWaitId: wait.id }
|
|
312
313
|
});
|
|
313
314
|
const active = this.#runs.getActiveRoot(task.id);
|
|
@@ -494,7 +495,7 @@ var TaskApplicationService = class {
|
|
|
494
495
|
authorKind: "system",
|
|
495
496
|
authorId: "task-run",
|
|
496
497
|
kind: input.receipt.status === "succeeded" ? "result" : "failure",
|
|
497
|
-
body: input.receipt.summary || (input.receipt.status === "succeeded" ? "TaskRun completed" : "TaskRun failed"),
|
|
498
|
+
body: input.receipt.summary || (resolveTaskLocale(task) === "zh" ? input.receipt.status === "succeeded" ? "任务执行完成" : "任务执行失败" : input.receipt.status === "succeeded" ? "TaskRun completed" : "TaskRun failed"),
|
|
498
499
|
idempotencyKey: `task-run-receipt:${run.id}`
|
|
499
500
|
});
|
|
500
501
|
if (input.receipt.status === "succeeded" || input.receipt.status === "failed") new TaskResultDeliveryRepository().enqueue(run.id, input.receipt.summary, input.receipt.status, input.resultText);
|
|
@@ -595,7 +596,7 @@ var TaskApplicationService = class {
|
|
|
595
596
|
this.#runs.createWait({
|
|
596
597
|
taskId,
|
|
597
598
|
kind: "dependency",
|
|
598
|
-
reason: `Waiting for ${dependency.title}`,
|
|
599
|
+
reason: resolveTaskLocale(task) === "zh" ? `等待:${dependency.title}` : `Waiting for ${dependency.title}`,
|
|
599
600
|
condition: {
|
|
600
601
|
dependsOnTaskId: dependency.id,
|
|
601
602
|
executor
|
|
@@ -614,7 +615,7 @@ var TaskApplicationService = class {
|
|
|
614
615
|
for (const capability of missing) this.#runs.createWait({
|
|
615
616
|
taskId,
|
|
616
617
|
kind: "approval",
|
|
617
|
-
reason: `Approval required: ${capability}`,
|
|
618
|
+
reason: resolveTaskLocale(task) === "zh" ? `需要授权:${capability}` : `Approval required: ${capability}`,
|
|
618
619
|
condition: {
|
|
619
620
|
capability,
|
|
620
621
|
executor
|
|
@@ -132,6 +132,7 @@ function buildTaskExecutionDirective(conversationId) {
|
|
|
132
132
|
return [
|
|
133
133
|
"<xopc_task_execution>",
|
|
134
134
|
"This conversation is executing a durable task.",
|
|
135
|
+
"Apply the response language to all user-facing task content, including collaboration posts, wait reasons, questions, choices, approval explanations, receipt summaries, evidence descriptions, and recovery instructions. Keep schema keys, enum values, identifiers, and exact acceptance criterion references unchanged. Language in attached context or earlier worker output does not set the response language.",
|
|
135
136
|
`Task: ${contract.objective}`,
|
|
136
137
|
task.body?.trim() ? `Task details: ${task.body.trim().slice(0, 12e3)}` : "",
|
|
137
138
|
`Expected outputs: ${contract.expectedOutputs.join("; ")}`,
|
|
@@ -7,4 +7,4 @@ export interface TaskContractDefinition {
|
|
|
7
7
|
assumptions: string[];
|
|
8
8
|
risks: string[];
|
|
9
9
|
}
|
|
10
|
-
export declare function defineTaskContract(objectiveInput: string): TaskContractDefinition;
|
|
10
|
+
export declare function defineTaskContract(objectiveInput: string, locale?: 'en' | 'zh'): TaskContractDefinition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
//#region src/tasks/task-contract-definition.ts
|
|
2
|
-
function defineTaskContract(objectiveInput) {
|
|
2
|
+
function defineTaskContract(objectiveInput, locale) {
|
|
3
3
|
const objective = objectiveInput.trim();
|
|
4
4
|
if (!objective) throw new Error("Objective is required");
|
|
5
|
-
const chinese = /[\u3400-\u9fff]/u.test(objective);
|
|
5
|
+
const chinese = locale ? locale === "zh" : /[\u3400-\u9fff]/u.test(objective);
|
|
6
6
|
return {
|
|
7
7
|
objective,
|
|
8
8
|
expectedOutputs: [objective],
|
|
@@ -47,7 +47,7 @@ function parseTaskContractResponse(raw) {
|
|
|
47
47
|
}
|
|
48
48
|
var ModelTaskContractPlanner = class {
|
|
49
49
|
async plan(input) {
|
|
50
|
-
const fallback = defineTaskContract(input.objective);
|
|
50
|
+
const fallback = defineTaskContract(input.objective, input.locale);
|
|
51
51
|
try {
|
|
52
52
|
const model = resolveModel(getAgentDefaultModelRef());
|
|
53
53
|
const planned = parseTaskContractResponse(extractText((await completeWithResolvedCredentials(model, { messages: [{
|
|
@@ -58,6 +58,7 @@ var ModelTaskContractPlanner = class {
|
|
|
58
58
|
"Acceptance criteria must describe externally checkable finished states, not activities.",
|
|
59
59
|
"List assumptions explicitly. Put only irreversible, external, financial, privacy, or permission decisions in approvalRequired.",
|
|
60
60
|
"Return one JSON object only with keys: objective, expectedOutputs, acceptanceCriteria, constraints, approvalRequired, assumptions, risks.",
|
|
61
|
+
input.locale ? `Write all user-facing JSON values in ${input.locale === "zh" ? "Simplified Chinese" : "English"}. Preserve schema keys, identifiers, paths, and proper nouns.` : "Write all user-facing JSON values in the language of the user request, regardless of the language of project or attached context. Preserve schema keys and identifiers.",
|
|
61
62
|
"",
|
|
62
63
|
`User request:\n${input.objective.trim()}`,
|
|
63
64
|
input.taskContext ? `\nUser-provided task context:\n${input.taskContext.slice(0, 16e3)}` : "",
|
|
@@ -2,9 +2,9 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
5
|
-
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
6
5
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
7
6
|
import { init_agent_scope, listAgentEntries } from "../agent/agent-scope.js";
|
|
7
|
+
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
8
8
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
9
9
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
10
10
|
//#region src/tasks/task-handoff-service.ts
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TaskAggregate, TaskUiLocale } from './task-repository.js';
|
|
2
|
+
/** Background tasks have no current user message from which to infer a language. */
|
|
3
|
+
export declare function resolveTaskLocale(task: Pick<TaskAggregate, 'locale' | 'title'> & {
|
|
4
|
+
contract?: {
|
|
5
|
+
objective: string;
|
|
6
|
+
};
|
|
7
|
+
}): TaskUiLocale;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
|
+
import { getUserProfileSnapshot } from "../user-model/profile.js";
|
|
4
|
+
//#region src/tasks/task-language.ts
|
|
5
|
+
init_sqlite();
|
|
6
|
+
/** Background tasks have no current user message from which to infer a language. */
|
|
7
|
+
function resolveTaskLocale(task) {
|
|
8
|
+
if (task.locale) return task.locale;
|
|
9
|
+
const locale = isXopcDatabaseOpen() ? getUserProfileSnapshot().locale?.toLowerCase() : void 0;
|
|
10
|
+
if (locale === "zh" || locale?.startsWith("zh-")) return "zh";
|
|
11
|
+
if (locale === "en" || locale?.startsWith("en-")) return "en";
|
|
12
|
+
return /[\u3400-\u9fff]/u.test(task.contract?.objective ?? task.title) ? "zh" : "en";
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { resolveTaskLocale };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
3
3
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
4
|
+
import { resolveTaskLocale } from "./task-language.js";
|
|
4
5
|
//#region src/tasks/task-read-model-projector.ts
|
|
5
6
|
init_transaction();
|
|
6
7
|
init_task_repository();
|
|
@@ -35,13 +36,13 @@ var TaskReadModelProjector = class {
|
|
|
35
36
|
const receipt = this.#runs.getReceipt(latestRun.id);
|
|
36
37
|
attention.push({
|
|
37
38
|
kind: receipt?.verification.status === "failed" ? "verification_failed" : "run_failed",
|
|
38
|
-
summary: latestRun.terminalMessage ?? receipt?.summary ?? "The latest run failed",
|
|
39
|
+
summary: latestRun.terminalMessage ?? receipt?.summary ?? (resolveTaskLocale(task) === "zh" ? "最近一次执行失败" : "The latest run failed"),
|
|
39
40
|
sourceId: latestRun.id
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
if (task.dueAt !== void 0 && task.phase !== "closed" && task.dueAt < now) attention.push({
|
|
43
44
|
kind: "overdue",
|
|
44
|
-
summary: "Task is overdue"
|
|
45
|
+
summary: resolveTaskLocale(task) === "zh" ? "任务已逾期" : "Task is overdue"
|
|
45
46
|
});
|
|
46
47
|
return {
|
|
47
48
|
task,
|
|
@@ -9,6 +9,7 @@ import { init_request_repository, personalRequestForTask } from "../personal-age
|
|
|
9
9
|
import { appendTranscriptEntry, init_transcript_repository } from "../storage/sqlite/transcript-repository.js";
|
|
10
10
|
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
11
11
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
12
|
+
import { resolveTaskLocale } from "./task-language.js";
|
|
12
13
|
import { tryParseMediaUri } from "../media/uri.js";
|
|
13
14
|
import { resolveMediaBufferPath } from "../media/store.js";
|
|
14
15
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
@@ -91,7 +92,7 @@ var TaskResultDeliveryService = class {
|
|
|
91
92
|
deliverables,
|
|
92
93
|
status: deliverables.length > 0 && available === 0 ? "failed" : available < deliverables.length ? "partial" : delivery.outcome.status
|
|
93
94
|
};
|
|
94
|
-
const statusText =
|
|
95
|
+
const statusText = resolveTaskLocale(new TaskRepository().require(delivery.taskId)) === "zh" ? `${delivery.taskTitle}:${available === deliverables.length ? "成果已生成" : available > 0 ? "部分成果已生成" : "成果暂不可用"}。` : `${delivery.taskTitle}: ${available === deliverables.length ? "Results ready" : available > 0 ? "Partial results ready" : "Results unavailable"}.`;
|
|
95
96
|
const personal = getPersonalAgentByConversation(delivery.conversationId);
|
|
96
97
|
if (personal && !personalRequestForTask(delivery.taskId)) enqueuePersonalReply({
|
|
97
98
|
delivery: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
3
|
+
import { resolveTaskLocale } from "./task-language.js";
|
|
3
4
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
4
5
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
5
6
|
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
@@ -12,8 +13,11 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
12
13
|
#application = new TaskApplicationService();
|
|
13
14
|
#runs = new TaskRunRepository();
|
|
14
15
|
#hasDeliverables = false;
|
|
16
|
+
#zh;
|
|
15
17
|
constructor(runId) {
|
|
16
18
|
this.runId = runId;
|
|
19
|
+
const run = this.#runs.require(runId);
|
|
20
|
+
this.#zh = resolveTaskLocale(new TaskRepository().require(run.taskId)) === "zh";
|
|
17
21
|
}
|
|
18
22
|
static start(input) {
|
|
19
23
|
if (!input.context.taskId) return void 0;
|
|
@@ -74,8 +78,8 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
74
78
|
if (item.status !== "completed") continue;
|
|
75
79
|
this.addEvidence({
|
|
76
80
|
kind: "state",
|
|
77
|
-
title: `Plan item completed: ${item.title}`,
|
|
78
|
-
summary: "The agent completed this plan item.",
|
|
81
|
+
title: this.#zh ? `计划项已完成:${item.title}` : `Plan item completed: ${item.title}`,
|
|
82
|
+
summary: this.#zh ? "助手已完成此计划项。" : "The agent completed this plan item.",
|
|
79
83
|
provenance: "tool",
|
|
80
84
|
strength: "observed",
|
|
81
85
|
observedAt: Date.now()
|
|
@@ -90,7 +94,11 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
90
94
|
this.addEvidence({
|
|
91
95
|
kind: "test",
|
|
92
96
|
title: item.label,
|
|
93
|
-
summary:
|
|
97
|
+
summary: this.#zh ? `最终工作区检查:${{
|
|
98
|
+
passed: "通过",
|
|
99
|
+
failed: "失败",
|
|
100
|
+
warning: "警告"
|
|
101
|
+
}[item.status]}` : `Final workspace check: ${item.status}`,
|
|
94
102
|
provenance: "tool",
|
|
95
103
|
strength: item.status === "passed" ? "verified" : "observed",
|
|
96
104
|
observedAt: Date.now()
|
|
@@ -100,8 +108,8 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
100
108
|
capturePatch(added, removed) {
|
|
101
109
|
this.addEvidence({
|
|
102
110
|
kind: "state",
|
|
103
|
-
title: "Changes applied",
|
|
104
|
-
summary: `${added} additions and ${removed} removals`,
|
|
111
|
+
title: this.#zh ? "已应用变更" : "Changes applied",
|
|
112
|
+
summary: this.#zh ? `新增 ${added} 处,删除 ${removed} 处` : `${added} additions and ${removed} removals`,
|
|
105
113
|
provenance: "tool",
|
|
106
114
|
strength: "observed",
|
|
107
115
|
observedAt: Date.now()
|
|
@@ -118,8 +126,14 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
118
126
|
const hasAssistantResult = Boolean(input.assistantText?.trim() && input.assistantText.trim() !== "NO_REPLY");
|
|
119
127
|
const hasBoardResult = new TaskCollaborationRepository().recent(run.taskId, void 0, 20).some((entry) => entry.taskRunId === run.id && entry.kind === "result");
|
|
120
128
|
const emptySuccess = input.status === "succeeded" && !hasAssistantResult && !hasBoardResult && !this.#hasDeliverables && this.#evidence.length === 0;
|
|
129
|
+
const task = new TaskRepository().require(run.taskId);
|
|
130
|
+
const zh = resolveTaskLocale(task) === "zh";
|
|
121
131
|
const status = emptySuccess ? "failed" : input.status;
|
|
122
|
-
const summary = emptySuccess ? "Agent run returned no result or evidence" :
|
|
132
|
+
const summary = emptySuccess ? zh ? "助手执行未返回结果或证据" : "Agent run returned no result or evidence" : zh ? {
|
|
133
|
+
"Message processed": "消息已处理",
|
|
134
|
+
Interrupted: "执行已中断",
|
|
135
|
+
"Agent run ended unexpectedly": "助手执行意外结束"
|
|
136
|
+
}[input.summary] ?? input.summary : input.summary;
|
|
123
137
|
this.#application.completeRun({
|
|
124
138
|
runId: run.id,
|
|
125
139
|
expectedRunVersion: run.version,
|
|
@@ -133,13 +147,13 @@ var TaskRunCoordinator = class TaskRunCoordinator {
|
|
|
133
147
|
status: "unverified",
|
|
134
148
|
checks: []
|
|
135
149
|
},
|
|
136
|
-
remainingWork: emptySuccess ? [
|
|
150
|
+
remainingWork: emptySuccess ? [task.contract?.objective ?? (zh ? "完成任务" : "Complete the task")] : [],
|
|
137
151
|
needsUser: false,
|
|
138
152
|
completionVerdict: status === "succeeded" ? "partial" : "not_achieved",
|
|
139
153
|
...status === "failed" ? { failure: {
|
|
140
154
|
code: emptySuccess ? "empty_agent_run" : "agent_run_failed",
|
|
141
155
|
phase: "execution",
|
|
142
|
-
recoveryAction: "Retry the task run with another available Agent or model"
|
|
156
|
+
recoveryAction: zh ? "使用其他可用助手或模型重试任务" : "Retry the task run with another available Agent or model"
|
|
143
157
|
} } : {}
|
|
144
158
|
}
|
|
145
159
|
});
|
|
@@ -2,6 +2,7 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
5
|
+
import { resolveTaskLocale } from "./task-language.js";
|
|
5
6
|
import { TaskApplicationService } from "./task-application-service.js";
|
|
6
7
|
//#region src/tasks/task-run-dispatcher.ts
|
|
7
8
|
init_logger();
|
|
@@ -42,27 +43,28 @@ var TaskRunDispatcher = class {
|
|
|
42
43
|
for (const run of this.#runs.listExpiredLeasedRunning()) {
|
|
43
44
|
if (this.#activeRunIds.has(run.id)) continue;
|
|
44
45
|
try {
|
|
46
|
+
const zh = resolveTaskLocale(this.#tasks.require(run.taskId)) === "zh";
|
|
45
47
|
this.#application.completeRun({
|
|
46
48
|
runId: run.id,
|
|
47
49
|
expectedRunVersion: run.version,
|
|
48
50
|
terminalCode: "execution_interrupted",
|
|
49
|
-
terminalMessage: "Task execution stopped before its result could be confirmed",
|
|
51
|
+
terminalMessage: zh ? "任务执行已停止,结果尚未确认" : "Task execution stopped before its result could be confirmed",
|
|
50
52
|
receipt: {
|
|
51
53
|
status: "failed",
|
|
52
|
-
summary: "Execution interrupted; verify external effects before retrying",
|
|
54
|
+
summary: zh ? "执行已中断;重试前请检查外部操作的影响" : "Execution interrupted; verify external effects before retrying",
|
|
53
55
|
changes: [],
|
|
54
56
|
evidence: [],
|
|
55
57
|
verification: {
|
|
56
58
|
status: "unverified",
|
|
57
59
|
checks: []
|
|
58
60
|
},
|
|
59
|
-
remainingWork: ["Verify whether the previous execution made external changes"],
|
|
61
|
+
remainingWork: [zh ? "检查上次执行是否已产生外部变更" : "Verify whether the previous execution made external changes"],
|
|
60
62
|
needsUser: true,
|
|
61
63
|
completionVerdict: "not_achieved",
|
|
62
64
|
failure: {
|
|
63
65
|
code: "execution_interrupted",
|
|
64
66
|
phase: "execution",
|
|
65
|
-
recoveryAction: "Inspect effects before retrying"
|
|
67
|
+
recoveryAction: zh ? "重试前检查执行影响" : "Inspect effects before retrying"
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
});
|
|
@@ -136,7 +138,7 @@ var TaskRunDispatcher = class {
|
|
|
136
138
|
terminalMessage: error instanceof Error ? error.message : String(error),
|
|
137
139
|
receipt: {
|
|
138
140
|
status: "failed",
|
|
139
|
-
summary: "TaskRun dispatch failed",
|
|
141
|
+
summary: resolveTaskLocale(task) === "zh" ? "任务执行调度失败" : "TaskRun dispatch failed",
|
|
140
142
|
changes: [],
|
|
141
143
|
evidence: [],
|
|
142
144
|
verification: {
|
|
@@ -149,7 +151,7 @@ var TaskRunDispatcher = class {
|
|
|
149
151
|
failure: {
|
|
150
152
|
code: "dispatch_failed",
|
|
151
153
|
phase: "dispatch",
|
|
152
|
-
recoveryAction: "Retry the task run"
|
|
154
|
+
recoveryAction: resolveTaskLocale(task) === "zh" ? "重试任务执行" : "Retry the task run"
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
});
|
|
@@ -8,9 +8,10 @@ import { cancelQueuedSessionInput, claimNextSessionInput, finishSessionInputRun,
|
|
|
8
8
|
import { appendComposerInputHistory, listComposerInputHistory } from "../../storage/sqlite/composer-input-history-repository.js";
|
|
9
9
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
|
-
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
12
11
|
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
13
12
|
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
13
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
14
|
+
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
14
15
|
import { resolveEffectiveAgentProfile } from "../../config/agent-profile.js";
|
|
15
16
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
16
17
|
import { init_paths } from "../../config/paths.js";
|
|
@@ -23,7 +24,6 @@ import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
|
23
24
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
24
25
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
25
26
|
import { evictEmbeddedSessionRunner } from "../../agent/embedded/session-runner.js";
|
|
26
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
27
27
|
import { SessionIndex } from "../../session/manager.js";
|
|
28
28
|
import "../../session/index.js";
|
|
29
29
|
import { parseModelRef } from "../../agent/models/selection.js";
|
|
@@ -31,6 +31,7 @@ export declare function requirePlatformVoiceModel(id: string, mode: VoiceModeCap
|
|
|
31
31
|
gender?: "female" | "male";
|
|
32
32
|
style?: string;
|
|
33
33
|
description?: string;
|
|
34
|
+
modes?: ("conversation" | "transcription" | "speech" | "transcription.stream" | "speech.stream")[];
|
|
34
35
|
}[];
|
|
35
36
|
limits: {
|
|
36
37
|
maxFrameBytes: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type VoiceSelection, type VoiceSettingsCatalog } from '@xopcai/realtime-protocol/voice';
|
|
2
2
|
import { type Config } from '../config/schema.js';
|
|
3
3
|
export declare function voiceSettingsCatalog(config: Config): VoiceSettingsCatalog;
|
|
4
4
|
export declare function selectPlatformVoice(config: Config, selection: VoiceSelection): Config;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ConfigSchema, init_schema } from "../config/schema.js";
|
|
2
|
+
import { voiceSupportsMode } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
3
|
+
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
2
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
|
|
3
5
|
import { requirePlatformVoiceModel } from "./platform-catalog.js";
|
|
4
6
|
import { createHash } from "node:crypto";
|
|
5
7
|
//#region src/voice/platform-settings.ts
|
|
8
|
+
init_voice();
|
|
6
9
|
init_schema();
|
|
7
10
|
init_model_catalog_store();
|
|
8
11
|
function voiceSettingsCatalog(config) {
|
|
@@ -47,8 +50,9 @@ function voiceSettingsCatalog(config) {
|
|
|
47
50
|
function selectPlatformVoice(config, selection) {
|
|
48
51
|
const model = requirePlatformVoiceModel(selection.model, selection.mode);
|
|
49
52
|
const output = selection.mode === "speech" || selection.mode === "speech.stream" || selection.mode === "conversation";
|
|
50
|
-
const
|
|
51
|
-
|
|
53
|
+
const voices = model.voice.voices.filter((item) => voiceSupportsMode(item, selection.mode));
|
|
54
|
+
const voice = selection.voice ?? voices.find((item) => item.id === model.voice.defaultVoice)?.id ?? voices[0]?.id;
|
|
55
|
+
if (output && (!voice || !voices.some((item) => item.id === voice))) throw new Error("Choose an available model voice");
|
|
52
56
|
const next = structuredClone(config);
|
|
53
57
|
const selected = {
|
|
54
58
|
provider: "xopc-cloud",
|
|
@@ -10,6 +10,8 @@ var PlatformVoiceError = class extends Error {
|
|
|
10
10
|
this.name = "PlatformVoiceError";
|
|
11
11
|
}
|
|
12
12
|
get clientMessage() {
|
|
13
|
+
if (this.code === "unsupported_voice") return "The selected voice is unavailable. Refresh the voice catalog or choose another voice.";
|
|
14
|
+
if (this.status === 409) return "The voice model publication changed. Refresh the voice catalog and try again.";
|
|
13
15
|
if (this.code === "realtime_quota_session_limit") return "The funded transcription duration has been reached. Start a new voice session to continue.";
|
|
14
16
|
if (this.code === "realtime_quota_workspace_budget") return "XOPC Cloud voice workspace budget is exhausted. Increase the workspace budget or choose another voice provider.";
|
|
15
17
|
if (this.status === 402 || this.code === "realtime_quota_user_credits") return "XOPC Cloud voice has insufficient Credit or quota. Check your Cloud balance and workspace budget, or choose another voice provider.";
|
|
@@ -81,7 +83,7 @@ function connect(url, token, signal, onEvent, onFailure) {
|
|
|
81
83
|
response.once("aborted", reject);
|
|
82
84
|
});
|
|
83
85
|
socket.on("error", fail);
|
|
84
|
-
socket.on("close", (code, reason) => fail(new PlatformVoiceError(`Platform voice disconnected before completion (close ${code}${reason.length ? `: ${reason.toString("utf8").slice(0, 256)}` : ""})`, void 0, "provider_disconnected")));
|
|
86
|
+
socket.on("close", (code, reason) => fail(new PlatformVoiceError(`Platform voice disconnected before completion (close ${code}${reason.length ? `: ${reason.toString("utf8").slice(0, 256)}` : ""})`, void 0, code === 4400 && reason.toString("utf8") === "Unsupported voice" ? "unsupported_voice" : "provider_disconnected")));
|
|
85
87
|
return {
|
|
86
88
|
socket,
|
|
87
89
|
close,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { voiceSupportsMode } from "../../../packages/realtime-protocol/src/voice-catalog.js";
|
|
2
|
+
import { init_voice } from "../../../packages/realtime-protocol/src/voice.js";
|
|
1
3
|
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "../../providers/xopc-cloud-config.js";
|
|
2
4
|
import { getProviderAuthService, init_provider_auth_service } from "../../providers/provider-auth-service.js";
|
|
3
5
|
import { requirePlatformVoiceModel } from "../platform-catalog.js";
|
|
4
6
|
//#region src/voice/realtime/omniRoute.ts
|
|
7
|
+
init_voice();
|
|
5
8
|
init_provider_auth_service();
|
|
6
9
|
init_xopc_cloud_config();
|
|
7
10
|
async function resolveOmniRoute(config) {
|
|
@@ -13,7 +16,7 @@ async function resolveOmniRoute(config) {
|
|
|
13
16
|
const model = requirePlatformVoiceModel(slice.model, "conversation");
|
|
14
17
|
maxSessionSeconds = model.voice.limits.maxSessionSeconds;
|
|
15
18
|
serviceVersion = model.voice.serviceVersion;
|
|
16
|
-
if (!model.voice.voices.some((voice) => voice.id === slice.voice)) throw new Error("Selected voice is unavailable");
|
|
19
|
+
if (!model.voice.voices.some((voice) => voice.id === slice.voice && voiceSupportsMode(voice, "conversation"))) throw new Error("Selected voice is unavailable");
|
|
17
20
|
}
|
|
18
21
|
const managed = slice.provider === "xopc-cloud";
|
|
19
22
|
const url = new URL(managed ? `${resolveXopcModelRouterUrl(slice.baseUrl)}/audio/conversations/realtime` : slice.baseUrl ?? "wss://dashscope.aliyuncs.com/api-ws/v1/realtime");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentProfileDir } from "../../agent/agent-scope.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
3
2
|
import { DEFAULT_SOUL_FILENAME } from "../../agent/context/workspace.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
4
|
import { loadProfileBootstrapFiles } from "../../agent/bootstrap/load-bootstrap-files.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { statSync } from "node:fs";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { voiceSupportsMode } from "../../../../packages/realtime-protocol/src/voice-catalog.js";
|
|
2
|
+
import { init_voice } from "../../../../packages/realtime-protocol/src/voice.js";
|
|
1
3
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
2
4
|
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "../../../providers/xopc-cloud-config.js";
|
|
3
5
|
import { getProviderAuthService, init_provider_auth_service } from "../../../providers/provider-auth-service.js";
|
|
@@ -10,6 +12,7 @@ import { requirePlatformVoiceModel } from "../../platform-catalog.js";
|
|
|
10
12
|
import { registerSpeechProvider } from "../speech-registry.js";
|
|
11
13
|
//#region src/voice/tts/providers/xopc-cloud-speech.ts
|
|
12
14
|
init_model_catalog_store();
|
|
15
|
+
init_voice();
|
|
13
16
|
init_provider_auth_service();
|
|
14
17
|
init_xopc_cloud_config();
|
|
15
18
|
function availableModels() {
|
|
@@ -55,10 +58,10 @@ const xopcCloudSpeechProvider = {
|
|
|
55
58
|
const config = readConfig(providerConfig);
|
|
56
59
|
return Boolean(config.model && config.voice && availableModels().some((model) => model.id === config.model));
|
|
57
60
|
},
|
|
58
|
-
listVoices: async ({ providerConfig }) => {
|
|
61
|
+
listVoices: async ({ providerConfig, mode = "speech" }) => {
|
|
59
62
|
const config = readConfig(providerConfig ?? {});
|
|
60
63
|
if (!config.model) return [];
|
|
61
|
-
return availableModels().find((model) => model.id === config.model)?.voice?.voices.map(({ id, name, displayNames }) => ({
|
|
64
|
+
return availableModels().find((model) => model.id === config.model)?.voice?.voices.filter((voice) => voiceSupportsMode(voice, mode)).map(({ id, name, displayNames }) => ({
|
|
62
65
|
id,
|
|
63
66
|
name,
|
|
64
67
|
...displayNames ? { displayNames } : {}
|
|
@@ -127,6 +130,7 @@ const xopcCloudSpeechProvider = {
|
|
|
127
130
|
relayUrl.protocol = relayUrl.protocol === "https:" ? "wss:" : "ws:";
|
|
128
131
|
relayUrl.searchParams.set("model", model);
|
|
129
132
|
relayUrl.searchParams.set("service_version", String(catalogModel.voice.serviceVersion));
|
|
133
|
+
relayUrl.searchParams.set("voice", voice);
|
|
130
134
|
const instructions = typeof request.providerOverrides?.instructions === "string" ? request.providerOverrides.instructions.trim() : config.instructions;
|
|
131
135
|
return openPlatformTts({
|
|
132
136
|
apiKey: token,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.380",
|
|
4
4
|
"description": "Local-first personal AI with Ada, task delegation, files, projects, workflows, and automations. Use cloud or local models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -165,12 +165,12 @@
|
|
|
165
165
|
"vitepress": "^1.6.4",
|
|
166
166
|
"vitest": "4.1.5",
|
|
167
167
|
"vue": "^3.5.35",
|
|
168
|
+
"@xopcai/browser-control-contract": "0.1.0",
|
|
168
169
|
"@xopcai/computer-control-contract": "0.1.0",
|
|
169
170
|
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
170
|
-
"@xopcai/browser-control-contract": "0.1.0",
|
|
171
|
-
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
172
|
-
"@xopcai/image-providers": "0.1.0",
|
|
173
171
|
"@xopcai/gateway-contract": "0.0.0",
|
|
172
|
+
"@xopcai/image-providers": "0.1.0",
|
|
173
|
+
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
174
174
|
"@xopcai/realtime-client": "0.0.0",
|
|
175
175
|
"@xopcai/realtime-protocol": "0.0.0"
|
|
176
176
|
},
|