@xopcai/xopc 0.0.388 → 0.0.390
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/_locales/en/messages.json +6 -1
- package/dist/browser-ext/_locales/zh_CN/messages.json +6 -1
- package/dist/browser-ext/dist/assets/{page-context-BeworyNB.js → page-context-A5RCibM_.js} +1 -1
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +98 -53
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +7 -5
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{activity-store-CB2X4Gmu.js → activity-store-DGMAYkw8.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-44LqtGte.js → agent-avatar-dicebear-B4AsZzJR.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-9NUY1sO3.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CNc6ntzP.js +1 -0
- package/dist/gateway/static/root/assets/agents-QNY9Vkrf.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-BkULgC6Q.js → agents-admin-api-DxdaiFWn.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-DHRfLkYD.js +1 -0
- package/dist/gateway/static/root/assets/{appearance-settings-CYofu-su.js → appearance-settings-DtKSapgb.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CHjWvDjk.js → apps-page-B9kuRt_z.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-De0ND0oA.js → archive-plugin-AgySTXp_.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BIF0skon.js → automations-page-D1o7ZtUW.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BJenz0P1.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Do535ZGW.js → binary-plugins-A1AXOsO6.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-C_RD603p.js → block-editor-DUNLkLKF.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-B9M1RYTm.js → browser-automation-inputs-BvUC6OiW.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-Dq2LlVMh.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BOZ-1g51.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-CW389yo6.js → capabilities-BkCutK0V.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BX1rCiVm.js → capabilities-D61uSJPy.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-BDP6gzlv.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D6PL3Mfl.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-Chuhscdb.js → capability-header-actions-D9uGs4Pw.js} +1 -1
- package/dist/gateway/static/root/assets/channels-xb7n8rwF.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-Dgn09YDs.js +36 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-Af00Kjc0.js → computer-settings-page-C66P4ifT.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-3W0_7-4L.js → connector-service-page-Dp35XdYf.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BHcRxYib.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-DBgZBmik.js → date-picker-CddHY982.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BDJ406kH.js → dependency-picker-Ob6BZTqv.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Do1XPn6U.js → desktop-pet-dmwCV-I4.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-LKeVh6OH.js → desktop-pet-settings-B-TBkZAZ.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-SWHwRgG3.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BMLHoL6g.js → directory-picker-path-field-6VZa4fT1.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-B0wTBCx4.js → extension-debug-page-C0_njMva.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-vR2r4uUB.js → extension-page-BeBLMFmW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CJZ5EVpQ.js → extension-provider-DWI0KAKT.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BiLUwoKx.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-D0tBjSgj.js → gateway-config-swr-CmYcOqhb.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BnHraJ3O.js → gateway-realtime-Ci1Jst5g.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BMUiUQMk.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CzWT_v09.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C1DQsIH3.js → gateway-startup-retry-C-BG5M7H.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BM__yiMn.js → highlighted-body-KQOG7T2V-CsA7lCVc.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BeXJfxsg.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-B_DqCwtV.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-oAvAF9QS.js +1 -0
- package/dist/gateway/static/root/assets/index-W9ls-0Yd.css +1 -0
- package/dist/gateway/static/root/assets/index-xTL-vb51.js +260 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DpyqH2cP.js → keyboard-shortcuts-settings--MjYe-Pb.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-B4hIoxV8.js → local-app-workbench-page-DL33dtd7.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-S7lUpENM.js → local-apps-page-DOa7mxjB.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-Be4BGM4Z.js → local-session-drafts-DAtLkTPg.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-uRu_DsWm.js → locale-store-DMy9W6IG.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C-GbTYsM.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-C0TzuD3-.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-CBjl-XEc.js → markdown-view-wyOHdXEg.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BombFqsX.js → media-plugins-Pb2zr_-L.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BxyGGa4D.js +1 -0
- package/dist/gateway/static/root/assets/messages-O0BEUKnx.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-DdH1MODX.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-BFpEqskQ.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-BlGP533W.js → notes-api-CYt2pGsm.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-h-qqFJ6Z.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-C2bSXVbz.js → page-context-capture-button-3uj5EcQC.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-BGyW6cdt.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Cn16lm5l.js → product-open-page-hI13tPS1.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CowgeuoG.js → product-preview-content-lT_in0-Q.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Baj7fQ7N.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-D7DyQFU3.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CYqA7bfl.js → registry-api-CgQrCqL6.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DU_d93Tm.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-zzoxjSuR.js → runtime-tools-api-D12qVKeC.js} +1 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DOSPOfCU.js +1 -0
- package/dist/gateway/static/root/assets/scenes-page-swyUIF5A.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-I6pzJJzg.js → schema-form-CwOFgsyh.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-C293-Hbx.js → send-session-input-nH8Cw0US.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CzVTrG8n.js → session-api-B9HrwF-c.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-aXqXuqDX.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-CI_PJmlX.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DCVaeBLW.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-Dy5oQDbx.js → settings-page-BN70wE6R.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CHzcVRi-.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-BKGI8Kr0.js → share-link-dialog-B1TDyhPt.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BF2WaO43.js → share-preview-page-Br-eAZaP.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-B0HlMAzi.js → shares-api-Bl1ZBh5S.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-jgCC_E4Y.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-RIjxQs-Y.js → skill-api-ClUw3SRC.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-CEJx5rPd.js → skill-reload-api--1BfIPzb.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-C9oRZSuL.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-C8aLy8T_.js → system-settings-panel-tWrqu7ai.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-o1O2IDVP.js → task-detail-page-BYRW7Rrr.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-C9ohICpw.js → task-expandable-content-D2t4ahzR.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BUfzeDvL.js → theme-store-BBLjE0fi.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-C2q5B3Kp.js → tracing-settings-page-5ATxQH5c.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-JkDu1wiC.js → tunnel-api-CF1Qh4wU.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-B8K6Y4ro.js → usage-page-CuEHzXil.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DgbCgsao.js → use-autosave-tY3keIbm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-rgW7h4sD.js → use-composer-attachments-CXsocZjt.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-DSKIxfz9.js → use-file-preview-expanded-CEsxnDnQ.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-Dvt5TIZ6.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-4AIkbm9R.js → voice-api-key-field-COTNLUU3.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Kw1pYlLN.js → voice-config-api-DrxBjSja.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-B47j0_xA.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BshsEDRO.js → work-discovery-overlay-PByMJrhV.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CRG3paWy.js → workflow-run-setup-panel-CSUkMo63.js} +2 -2
- package/dist/gateway/static/root/assets/{workflows-page-c-AoSVzm.js → workflows-page-BUDvFo3R.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-JWHOFos6.js → workspace-api-Bmx1O449.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-PDSIicr1.js → xopc-cloud-account-card-DVsAbvwP.js} +1 -1
- package/dist/gateway/static/root/index.html +28 -27
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/clarifications.js +79 -2
- package/dist/packages/gateway-contract/src/discussions.js +3 -2
- package/dist/packages/gateway-contract/src/index.js +4 -0
- package/dist/packages/gateway-contract/src/provider-setup.js +6 -0
- package/dist/packages/gateway-contract/src/recording-outcome.js +6 -0
- package/dist/packages/image-providers/src/catalog.js +10 -0
- package/dist/packages/image-providers/src/execute.js +5 -1
- package/dist/packages/image-providers/src/validation.js +19 -1
- package/dist/packages/realtime-protocol/src/voice.js +13 -2
- package/dist/src/agent/agent-manager.js +25 -21
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +5 -1
- package/dist/src/agent/background-review/run-background-review.d.ts +0 -1
- package/dist/src/agent/background-review/run-background-review.js +60 -14
- package/dist/src/agent/child-agent-factory.js +1 -1
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/execution-scope.js +1 -1
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +31 -8
- package/dist/src/agent/embedded/run-turn.js +26 -14
- package/dist/src/agent/embedded/session-runner.d.ts +4 -3
- package/dist/src/agent/embedded/session-runner.js +9 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/embedded/xopc-stream-bridge.js +3 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/gateway-tools.js +2 -2
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +13 -15
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/image/understanding/runtime.js +5 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
- package/dist/src/agent/inbound/inbound-loop.d.ts +1 -15
- package/dist/src/agent/inbound/inbound-loop.js +7 -2
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/mcp/connection-drafts.d.ts +50 -0
- package/dist/src/agent/mcp/connection-drafts.js +278 -0
- package/dist/src/agent/mcp/connection-errors.d.ts +3 -0
- package/dist/src/agent/mcp/connection-errors.js +32 -0
- package/dist/src/agent/mcp/connection-setup.d.ts +7 -2
- package/dist/src/agent/mcp/connection-setup.js +45 -23
- package/dist/src/agent/mcp/credential-store.d.ts +6 -0
- package/dist/src/agent/mcp/credential-store.js +24 -0
- package/dist/src/agent/mcp/native-mcp.d.ts +6 -1
- package/dist/src/agent/mcp/native-mcp.js +6 -0
- package/dist/src/agent/mcp/tool-catalog.d.ts +7 -2
- package/dist/src/agent/mcp/tool-catalog.js +25 -15
- package/dist/src/agent/memory/compaction.js +5 -1
- package/dist/src/agent/memory/context-budget.js +1 -1
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/idle-compaction-scheduler.js +3 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/models/manager.d.ts +1 -0
- package/dist/src/agent/models/manager.js +4 -2
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +1 -6
- package/dist/src/agent/orchestration/agent-orchestrator.js +5 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -3
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +4 -4
- package/dist/src/agent/service/process-direct-one-shot.js +5 -0
- package/dist/src/agent/service/process-direct-streaming.d.ts +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +23 -7
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +21 -21
- package/dist/src/agent/session/session-config-service.js +3 -3
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/source-context/index.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +7 -7
- package/dist/src/agent/tools/clarify-tool.d.ts +2 -3
- package/dist/src/agent/tools/clarify-tool.js +15 -9
- package/dist/src/agent/tools/cli-clarify.d.ts +0 -3
- package/dist/src/agent/tools/cli-clarify.js +18 -32
- package/dist/src/agent/tools/create-share-tool.js +3 -3
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +19 -19
- package/dist/src/agent/tools/image-generate-tool.js +8 -4
- package/dist/src/agent/tools/index.js +6 -6
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +2 -2
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +4 -4
- package/dist/src/agent/tools/personal-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +4 -4
- package/dist/src/agent/tools/personal-task-tool.js +6 -6
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/read.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +3 -3
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.js +4 -4
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent-config/resolver.js +5 -0
- package/dist/src/agent-config/schema.d.ts +26 -6
- package/dist/src/agent-config/schema.js +2 -0
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/ai-assist/text-assist.js +6 -17
- package/dist/src/auth/oauth/xopc-cloud.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +2 -2
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/domain/validation.d.ts +6 -6
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -2
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.js +3 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/capabilities/store-connector.js +2 -2
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +3 -3
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/builtins/config.js +4 -4
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/context.js +2 -2
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/extension.js +2 -2
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/cli/commands/models.js +3 -3
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard/model.d.ts +1 -1
- package/dist/src/cli/commands/onboard/model.js +21 -2
- package/dist/src/cli/commands/onboard.js +2 -2
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +4 -4
- package/dist/src/cli/extension-cli-register.js +6 -6
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/cli/utils/session.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/agent-model-intents.js +4 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +18 -6
- package/dist/src/config/schema.js +18 -8
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +4 -4
- package/dist/src/connectors/connected-source-understanding.js +4 -4
- package/dist/src/connectors/connection-recovery-service.js +4 -4
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +1 -1
- package/dist/src/discussions/analyzer.d.ts +2 -0
- package/dist/src/discussions/analyzer.js +38 -9
- package/dist/src/discussions/audio-clip.d.ts +3 -0
- package/dist/src/discussions/audio-clip.js +72 -0
- package/dist/src/discussions/live-worker.js +4 -2
- package/dist/src/discussions/long-review.d.ts +17 -0
- package/dist/src/discussions/long-review.js +278 -0
- package/dist/src/discussions/media-timeline.d.ts +21 -0
- package/dist/src/discussions/media-timeline.js +134 -0
- package/dist/src/discussions/organizer-worker.d.ts +4 -1
- package/dist/src/discussions/organizer-worker.js +17 -12
- package/dist/src/discussions/organizer.js +2 -0
- package/dist/src/discussions/processing.d.ts +43 -0
- package/dist/src/discussions/processing.js +125 -0
- package/dist/src/discussions/recording.js +202 -42
- package/dist/src/discussions/recordingJobs.js +2 -0
- package/dist/src/discussions/repository.js +4 -2
- package/dist/src/discussions/review.d.ts +8 -0
- package/dist/src/discussions/review.js +183 -0
- package/dist/src/discussions/sealer.d.ts +7 -1
- package/dist/src/discussions/sealer.js +164 -88
- package/dist/src/discussions/service.d.ts +7 -1
- package/dist/src/discussions/service.js +51 -15
- package/dist/src/discussions/types.d.ts +2 -1
- package/dist/src/endpoint-tools/index.js +1 -1
- package/dist/src/endpoint-tools/runtime.js +2 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/api.js +4 -4
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +3 -3
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +2 -2
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -3
- package/dist/src/gateway/clarify-runtime.d.ts +2 -0
- package/dist/src/gateway/clarify-runtime.js +4 -1
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/ephemeral-clarification-waiter.d.ts +2 -1
- package/dist/src/gateway/ephemeral-clarification-waiter.js +19 -6
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/global-defaults-admin.d.ts +3 -1
- package/dist/src/gateway/global-defaults-admin.js +15 -3
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.d.ts +12 -3
- package/dist/src/gateway/hono/lib/config-payload.js +6 -4
- package/dist/src/gateway/hono/lib/config-write-lock.d.ts +2 -0
- package/dist/src/gateway/hono/lib/config-write-lock.js +14 -0
- package/dist/src/gateway/hono/lib/voice-settings-revisions.d.ts +5 -0
- package/dist/src/gateway/hono/lib/voice-settings-revisions.js +23 -0
- package/dist/src/gateway/hono/routes/agent-stream.js +4 -9
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +12 -5
- package/dist/src/gateway/hono/routes/config.js +19 -5
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +2 -2
- package/dist/src/gateway/hono/routes/discussions.js +63 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +8 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +74 -7
- package/dist/src/gateway/hono/routes/memory-learning.js +3 -3
- package/dist/src/gateway/hono/routes/models.js +17 -9
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +3 -3
- package/dist/src/gateway/hono/routes/provider-setup.d.ts +3 -0
- package/dist/src/gateway/hono/routes/provider-setup.js +106 -0
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +5 -5
- package/dist/src/gateway/hono/routes/sessions.js +3 -3
- package/dist/src/gateway/hono/routes/shares.js +2 -2
- package/dist/src/gateway/hono/routes/side-chats.js +5 -4
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/status.js +2 -0
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +7 -7
- package/dist/src/gateway/hono/routes/voice.js +30 -17
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/provider-model-setup.d.ts +4 -0
- package/dist/src/gateway/provider-model-setup.js +56 -0
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +5 -4
- package/dist/src/gateway/service/agent-runner.js +35 -19
- package/dist/src/gateway/service/config-coordinator.d.ts +619 -1
- package/dist/src/gateway/service/config-coordinator.js +38 -26
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +4 -4
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service.d.ts +6 -3
- package/dist/src/gateway/service.js +52 -51
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/gateway/side-chat/run-service.d.ts +2 -1
- package/dist/src/gateway/side-chat/run-service.js +6 -3
- package/dist/src/gateway/side-chat/types.d.ts +3 -3
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +7 -4
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/compatibility.js +1 -1
- package/dist/src/imports/inventory.js +3 -3
- package/dist/src/imports/productImport.js +2 -2
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +9 -9
- package/dist/src/knowledge/connected-knowledge-pipeline.js +2 -2
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media-shared/http/provider-http.d.ts +0 -6
- package/dist/src/media-shared/http/provider-http.js +5 -4
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/media-understanding/runner.d.ts +0 -28
- package/dist/src/media-understanding/runner.js +4 -0
- package/dist/src/memory-learning/service.js +3 -2
- package/dist/src/memory-learning/source-learning.js +4 -4
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +3 -3
- package/dist/src/personal-agent/capability-service.js +2 -2
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +7 -7
- package/dist/src/personal-agent/prompt-context.js +7 -7
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +9 -9
- package/dist/src/personal-agent/request-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +6 -6
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/env-keys.js +3 -0
- package/dist/src/providers/extension-stream-bridge.js +3 -0
- package/dist/src/providers/index.js +15 -0
- package/dist/src/providers/model-call.d.ts +5 -2
- package/dist/src/providers/model-call.js +13 -2
- package/dist/src/providers/model-reference-auditor.js +2 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/model-response.js +1 -1
- package/dist/src/providers/model-usage.d.ts +15 -0
- package/dist/src/providers/model-usage.js +50 -0
- package/dist/src/providers/presentation.js +8 -0
- package/dist/src/providers/setup/engine.d.ts +37 -0
- package/dist/src/providers/setup/engine.js +177 -0
- package/dist/src/providers/setup/profiles.d.ts +4 -0
- package/dist/src/providers/setup/profiles.js +94 -0
- package/dist/src/providers/setup/voice.d.ts +23 -0
- package/dist/src/providers/setup/voice.js +234 -0
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/scenes/agentExecutor.d.ts +1 -0
- package/dist/src/scenes/agentExecutor.js +5 -0
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +2 -2
- package/dist/src/scenes/taskFollowUp/resources.js +2 -2
- package/dist/src/scenes/taskFollowUp/service.d.ts +5 -5
- package/dist/src/scenes/taskFollowUp/service.js +6 -6
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/store.js +5 -5
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +3 -5
- package/dist/src/storage/sqlite/clarification-wait-repository.js +48 -28
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/migrations/253_discussion_processing_recovery.sql +20 -0
- package/dist/src/storage/sqlite/migrations/254_discussion_annotations.sql +17 -0
- package/dist/src/storage/sqlite/migrations/255_discussion_chapter_progress.sql +10 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/capabilities/management.d.ts +2 -2
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/relations.d.ts +6 -6
- package/dist/src/tasks/capabilities/write.d.ts +6 -6
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +2 -2
- package/dist/src/tasks/index.js +4 -4
- package/dist/src/tasks/task-allocation-service.js +5 -5
- package/dist/src/tasks/task-application-service.js +6 -6
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +5 -5
- package/dist/src/tasks/task-main-update-decision-service.js +3 -3
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-research-result.js +4 -4
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +4 -4
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +13 -13
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +2 -2
- package/dist/src/tui/tui-agent-events.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -5
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +6 -6
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/usage/recorder.js +2 -1
- package/dist/src/usage/scenario-registry.js +128 -123
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-context/config.d.ts +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/capture/semantic.d.ts +8 -1
- package/dist/src/user-model/capture/semantic.js +26 -5
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/voice/dashscope/streaming-stt-session.js +3 -0
- package/dist/src/voice/dashscope/streaming-tts-stream.js +3 -0
- package/dist/src/voice/dictation.d.ts +12 -0
- package/dist/src/voice/dictation.js +22 -0
- package/dist/src/voice/metadata/builtin.js +54 -0
- package/dist/src/voice/platform-streams.js +3 -0
- package/dist/src/voice/realtime/agentEngine.js +4 -2
- package/dist/src/voice/realtime/memory-context.js +7 -7
- package/dist/src/voice/realtime/omniEngine.js +5 -2
- package/dist/src/voice/realtime/omniRoute.js +3 -2
- package/dist/src/voice/realtime/runtime.js +8 -6
- package/dist/src/voice/stt/factory.js +9 -3
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/bailian-plan-transcription.d.ts +2 -0
- package/dist/src/voice/stt/providers/bailian-plan-transcription.js +32 -0
- package/dist/src/voice/stt/providers/index.d.ts +1 -0
- package/dist/src/voice/stt/providers/index.js +2 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/token-plan.d.ts +8 -0
- package/dist/src/voice/token-plan.js +11 -0
- package/dist/src/voice/tts/factory.js +4 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/bailian-plan-speech.d.ts +2 -0
- package/dist/src/voice/tts/providers/bailian-plan-speech.js +84 -0
- package/dist/src/voice/tts/providers/index.d.ts +1 -0
- package/dist/src/voice/tts/providers/index.js +2 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/voice/tts/speak-core.js +11 -2
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- package/dist/src/workflows/context/workflow-context.js +1 -1
- package/dist/src/workflows/engine/workflow-engine.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +7 -7
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-2VA4eKPf.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DRhTOw_O.js +0 -1
- package/dist/gateway/static/root/assets/agents-BemUH_Yf.js +0 -77
- package/dist/gateway/static/root/assets/app-management-settings-panel-CR_cc7rj.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DOwtT4sS.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-B-Ezk_8l.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-BSmmTBn4.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-xZgTYYDn.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-oqkuOjcR.js +0 -8
- package/dist/gateway/static/root/assets/channels-Dq2C2k9M.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-srB_M-aQ.js +0 -36
- package/dist/gateway/static/root/assets/connectors-page-BZk-Gou5.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CvZpnSVw.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-1tbWe5xQ.js +0 -1
- package/dist/gateway/static/root/assets/fallback-models-CW6a1-GK.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BVriF6Zj.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-vQWTUx2c.js +0 -1
- package/dist/gateway/static/root/assets/home-page-hfWuVtcG.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-DodU6GNC.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-CuR6RSUM.js +0 -1
- package/dist/gateway/static/root/assets/index-CNH8vwcY.js +0 -260
- package/dist/gateway/static/root/assets/index-DBRwvWzm.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-CSlZT1-L.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BYCL5CwV.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-i9N5shss.js +0 -1
- package/dist/gateway/static/root/assets/messages-DTqbfje6.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-Ct6X5zmB.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CJ5Earr_.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CPGk8-n1.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-BjTt5R3s.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CyKx4PyN.js +0 -1
- package/dist/gateway/static/root/assets/projects-page--_hXxUMC.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Bq_eqQYf.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-BgCATci5.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-DxE3jRPR.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-COd9RECl.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-CQkGFnJM.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Dtlsvsci.js +0 -1
- package/dist/gateway/static/root/assets/settings-loading-skeleton-BTqvr_Fw.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CrAazq4r.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BNMhs-Vd.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-XVOxILQn.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-C1QX47VR.js +0 -2
|
@@ -1,113 +1,189 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import {
|
|
3
|
+
import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
4
|
+
import { DISCUSSION_MAX_SAVED_DURATION_MS } from "../../packages/gateway-contract/src/discussions.js";
|
|
5
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
|
+
import { init_model_usage, withModelUsageOrigin } from "../providers/model-usage.js";
|
|
4
7
|
import { transcribe } from "../voice/stt/transcribe-core.js";
|
|
8
|
+
import { isSTTAvailable } from "../voice/stt/availability.js";
|
|
5
9
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
6
10
|
import "../voice/stt/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import { assembleDiscussionTranscript } from "./transcript.js";
|
|
11
|
+
import { listDiscussionTranscriptSegments, updateDiscussionCapture } from "./repository.js";
|
|
12
|
+
import { appendTranscriptWithoutOverlap, assembleDiscussionTranscript } from "./transcript.js";
|
|
9
13
|
import { replaceTranscriptSegments, saveTranscriptRevision } from "./revisions.js";
|
|
14
|
+
import { assertProcessingRun, claimSealingCapture, ensureProcessingRun, failOrRetryProcessing, getProcessingRun, readCheckpoint, releaseSealingLease, renewSealingLease, resetProcessingRetry, saveCheckpoint, withProcessingDeadline } from "./processing.js";
|
|
10
15
|
import { missingAudioRanges, slicePcmWav } from "./audio-repair.js";
|
|
11
16
|
import { decodeWavToMonoFloat32 } from "../voice/audio/wav.js";
|
|
12
17
|
import { forEachNormalizedAudioSegment } from "../voice/audio/normalize.js";
|
|
13
18
|
import { getRecordingJob } from "./recordingJobs.js";
|
|
14
|
-
import {
|
|
19
|
+
import { createReadStream } from "node:fs";
|
|
20
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
15
21
|
//#region src/discussions/sealer.ts
|
|
22
|
+
init_src();
|
|
23
|
+
init_model_usage();
|
|
24
|
+
init_transaction();
|
|
16
25
|
init_logger();
|
|
17
26
|
const log = createLogger("DiscussionSealer");
|
|
18
27
|
const UPLOAD_GRACE_MS = 2 * 6e4;
|
|
19
28
|
var DiscussionSealer = class {
|
|
29
|
+
owner = randomUUID();
|
|
20
30
|
timer;
|
|
21
31
|
running = false;
|
|
32
|
+
recordingRunning = false;
|
|
33
|
+
stopping = false;
|
|
34
|
+
controller;
|
|
22
35
|
constructor(deps, intervalMs = 1e3) {
|
|
23
36
|
this.deps = deps;
|
|
24
37
|
this.intervalMs = intervalMs;
|
|
25
38
|
}
|
|
26
39
|
start() {
|
|
27
40
|
if (this.timer) return;
|
|
28
|
-
this.
|
|
41
|
+
this.stopping = false;
|
|
42
|
+
this.timer = setInterval(() => void this.tick().catch((error) => log.error({ err: error }, "Discussion processing tick failed")), this.intervalMs);
|
|
29
43
|
this.timer.unref();
|
|
30
|
-
this.tick();
|
|
44
|
+
this.tick().catch((error) => log.error({ err: error }, "Discussion processing tick failed"));
|
|
31
45
|
}
|
|
32
46
|
async stop() {
|
|
47
|
+
this.stopping = true;
|
|
33
48
|
if (this.timer) clearInterval(this.timer);
|
|
34
49
|
this.timer = void 0;
|
|
35
|
-
|
|
50
|
+
this.controller?.abort(/* @__PURE__ */ new Error("Discussion processing stopped"));
|
|
51
|
+
while (this.running || this.recordingRunning) await new Promise((resolve) => setTimeout(resolve, 10));
|
|
36
52
|
}
|
|
37
53
|
async tick(now = Date.now()) {
|
|
38
|
-
if (this.
|
|
54
|
+
if (this.stopping) return;
|
|
55
|
+
if (!this.recordingRunning) {
|
|
56
|
+
this.recordingRunning = true;
|
|
57
|
+
try {
|
|
58
|
+
await this.deps.processRecordingJob?.();
|
|
59
|
+
} finally {
|
|
60
|
+
this.recordingRunning = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (this.running || this.stopping) return;
|
|
39
64
|
this.running = true;
|
|
65
|
+
const controller = new AbortController();
|
|
66
|
+
this.controller = controller;
|
|
67
|
+
let capture = null;
|
|
68
|
+
let renewal;
|
|
40
69
|
try {
|
|
41
|
-
|
|
42
|
-
const capture = [...listDiscussionCaptures({
|
|
43
|
-
status: "sealing",
|
|
44
|
-
limit: 1
|
|
45
|
-
}).items, ...listDiscussionCaptures({
|
|
46
|
-
status: "stopping",
|
|
47
|
-
limit: 1
|
|
48
|
-
}).items][0];
|
|
70
|
+
capture = claimSealingCapture(this.owner, now);
|
|
49
71
|
if (!capture) return;
|
|
50
|
-
|
|
72
|
+
const id = capture.id;
|
|
73
|
+
renewal = setInterval(() => {
|
|
74
|
+
if (!renewSealingLease(id, this.owner)) controller.abort(/* @__PURE__ */ new Error("Transcription lease lost"));
|
|
75
|
+
}, 15e3);
|
|
76
|
+
renewal.unref();
|
|
77
|
+
await this.sealWhenReady(capture, now, controller.signal);
|
|
51
78
|
} finally {
|
|
79
|
+
if (renewal) clearInterval(renewal);
|
|
80
|
+
if (capture) releaseSealingLease(capture.id, this.owner);
|
|
81
|
+
this.controller = void 0;
|
|
52
82
|
this.running = false;
|
|
53
83
|
}
|
|
54
84
|
}
|
|
55
|
-
async sealWhenReady(capture, now) {
|
|
85
|
+
async sealWhenReady(capture, now, signal) {
|
|
56
86
|
const ageMs = now - (capture.recordingStoppedAt ?? now);
|
|
57
87
|
if (!capture.audioAttachmentId) {
|
|
58
88
|
const job = getRecordingJob(capture.id);
|
|
59
89
|
if (job && (job.state === "queued" || job.state === "running")) return;
|
|
60
|
-
if (ageMs >= UPLOAD_GRACE_MS)
|
|
90
|
+
if (ageMs >= UPLOAD_GRACE_MS) {
|
|
91
|
+
const updated = updateDiscussionCapture(capture.id, {
|
|
92
|
+
status: "needs_attention",
|
|
93
|
+
failureStage: "audio_upload",
|
|
94
|
+
failureCode: "recording_missing",
|
|
95
|
+
failureMessage: "Original recording was not uploaded"
|
|
96
|
+
}, ["stopping", "sealing"]);
|
|
97
|
+
if (updated) this.deps.onUpdated?.(updated);
|
|
98
|
+
}
|
|
99
|
+
if (ageMs < UPLOAD_GRACE_MS) updateDiscussionCapture(capture.id, { updatedAt: Date.now() }, [capture.status]);
|
|
61
100
|
return;
|
|
62
101
|
}
|
|
63
102
|
const segments = listDiscussionTranscriptSegments(capture.id);
|
|
64
103
|
const expected = capture.expectedLastSequence ?? -1;
|
|
65
|
-
const
|
|
66
|
-
const missing = Array.from({ length: expected + 1 }, (_, sequence) => sequence).filter((sequence) => !bySequence.has(sequence));
|
|
104
|
+
const missing = expected >= 0 && Array.from({ length: expected + 1 }, (_, sequence) => sequence).some((sequence) => !segments.some((segment) => segment.sequence === sequence));
|
|
67
105
|
const pending = segments.some((segment) => segment.status === "uploaded" || segment.status === "transcribing");
|
|
68
|
-
|
|
106
|
+
const run = ensureProcessingRun(capture);
|
|
107
|
+
if (!run.force_audio && (missing || pending) && ageMs < UPLOAD_GRACE_MS) {
|
|
108
|
+
updateDiscussionCapture(capture.id, { updatedAt: Date.now() }, [capture.status]);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
69
111
|
const sealing = capture.status === "sealing" ? capture : updateDiscussionCapture(capture.id, { status: "sealing" }, ["stopping"]);
|
|
70
112
|
if (!sealing) return;
|
|
71
113
|
try {
|
|
72
114
|
const confirmed = segments.filter((segment) => segment.status === "confirmed");
|
|
73
|
-
const result = expected >= 0 && missing
|
|
115
|
+
const result = !run.force_audio && expected >= 0 && !missing && !pending && confirmed.length === expected + 1 ? { text: assembleDiscussionTranscript(confirmed) } : await withModelUsageOrigin("interactive", () => this.transcribeFullRecording(sealing, run, signal));
|
|
74
116
|
const text = result.text.trim();
|
|
75
|
-
saveTranscriptRevision(capture.id);
|
|
76
117
|
if (!text) throw new Error("Discussion transcription produced no text");
|
|
77
|
-
const updated =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
118
|
+
const updated = runSqliteWriteTransaction(() => {
|
|
119
|
+
assertProcessingRun(run, this.owner, signal);
|
|
120
|
+
if (result.segments) replaceTranscriptSegments(capture.id, result.segments);
|
|
121
|
+
saveTranscriptRevision(capture.id);
|
|
122
|
+
resetProcessingRetry(capture.id);
|
|
123
|
+
return updateDiscussionCapture(capture.id, {
|
|
124
|
+
status: "organizing",
|
|
125
|
+
canonicalTranscript: text,
|
|
126
|
+
canonicalTranscriptSha256: createHash("sha256").update(text).digest("hex"),
|
|
127
|
+
transcriptLanguage: result.language,
|
|
128
|
+
failureStage: void 0,
|
|
129
|
+
failureCode: void 0,
|
|
130
|
+
failureMessage: void 0
|
|
131
|
+
}, ["sealing"]);
|
|
132
|
+
});
|
|
133
|
+
if (updated) this.deps.onUpdated?.(updated);
|
|
88
134
|
} catch (error) {
|
|
89
|
-
|
|
90
|
-
|
|
135
|
+
if (signal.aborted) return;
|
|
136
|
+
if (getProcessingRun(capture.id)?.run_id !== run.run_id || !renewSealingLease(capture.id, this.owner)) return;
|
|
137
|
+
const updated = failOrRetryProcessing(sealing, "transcript_sealing", error);
|
|
138
|
+
if (updated) this.deps.onUpdated?.(updated);
|
|
139
|
+
log.warn({
|
|
140
|
+
err: error,
|
|
141
|
+
discussionId: capture.id,
|
|
142
|
+
phase: "transcript_sealing"
|
|
143
|
+
}, "Discussion transcription failed; saved original retained");
|
|
91
144
|
}
|
|
92
145
|
}
|
|
93
|
-
async transcribeFullRecording(capture) {
|
|
146
|
+
async transcribeFullRecording(capture, run, signal) {
|
|
94
147
|
const attachment = await this.deps.notes.getAttachmentPath(capture.noteId, capture.audioAttachmentId);
|
|
95
148
|
if (!attachment) throw new Error("Discussion audio file is missing");
|
|
149
|
+
const assertCurrent = () => assertProcessingRun(run, this.owner, signal);
|
|
150
|
+
assertCurrent();
|
|
151
|
+
if (capture.audioSha256) {
|
|
152
|
+
const hash = createHash("sha256");
|
|
153
|
+
for await (const chunk of createReadStream(attachment.filePath)) {
|
|
154
|
+
signal.throwIfAborted();
|
|
155
|
+
hash.update(chunk);
|
|
156
|
+
}
|
|
157
|
+
if (hash.digest("hex") !== capture.audioSha256) throw new Error("Saved original audio checksum mismatch");
|
|
158
|
+
}
|
|
159
|
+
assertCurrent();
|
|
96
160
|
if (this.deps.transcribeRecording) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
161
|
+
if (listDiscussionTranscriptSegments(capture.id).some((segment) => segment.correctedByUser)) throw new Error("Segment transcription is required to preserve manual corrections");
|
|
162
|
+
const cached = readCheckpoint(run.run_id, 0, capture.durationMs ?? 1e3);
|
|
163
|
+
const result = cached ?? await withProcessingDeadline(async (requestSignal) => {
|
|
164
|
+
const response = await this.deps.transcribeRecording(attachment.filePath, capture, requestSignal);
|
|
165
|
+
return {
|
|
166
|
+
segments: [{
|
|
167
|
+
text: response.text,
|
|
168
|
+
startedAtMs: 0,
|
|
169
|
+
endedAtMs: capture.durationMs ?? 1e3
|
|
170
|
+
}],
|
|
171
|
+
language: response.language
|
|
172
|
+
};
|
|
173
|
+
}, signal, this.deps.requestTimeoutMs ?? 12e4);
|
|
174
|
+
assertCurrent();
|
|
175
|
+
if (!cached) saveCheckpoint(run.run_id, 0, capture.durationMs ?? 1e3, result);
|
|
176
|
+
return {
|
|
177
|
+
text: result.segments.map((segment) => segment.text).join("\n"),
|
|
178
|
+
language: result.language,
|
|
179
|
+
segments: result.segments
|
|
180
|
+
};
|
|
104
181
|
}
|
|
105
182
|
const config = this.deps.getConfig();
|
|
106
183
|
const sttConfig = mergeSttConfigFromAppConfig(config.tools?.media?.audio, config.tools?.media);
|
|
107
|
-
if (!isSTTAvailable(sttConfig)) throw new Error("STT is not configured");
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
const segments = confirmed.map((segment) => ({
|
|
184
|
+
if (!this.deps.transcribeSegment && !isSTTAvailable(sttConfig)) throw new Error("STT is not configured");
|
|
185
|
+
const confirmed = listDiscussionTranscriptSegments(capture.id).filter((segment) => segment.status === "confirmed" && (!run.force_audio || segment.correctedByUser));
|
|
186
|
+
const output = confirmed.map((segment) => ({
|
|
111
187
|
text: segment.displayText ?? segment.rawText ?? "",
|
|
112
188
|
rawText: segment.rawText,
|
|
113
189
|
startedAtMs: segment.startedAtMs,
|
|
@@ -115,61 +191,61 @@ var DiscussionSealer = class {
|
|
|
115
191
|
speakerLabel: segment.speakerLabel,
|
|
116
192
|
correctedByUser: segment.correctedByUser
|
|
117
193
|
}));
|
|
194
|
+
let offset = 0;
|
|
118
195
|
let language;
|
|
119
196
|
await forEachNormalizedAudioSegment({
|
|
120
197
|
filePath: attachment.filePath,
|
|
121
|
-
maxDurationSeconds:
|
|
198
|
+
maxDurationSeconds: DISCUSSION_MAX_SAVED_DURATION_MS / 1e3,
|
|
199
|
+
signal
|
|
122
200
|
}, async (buffer, index) => {
|
|
201
|
+
assertCurrent();
|
|
123
202
|
const decoded = decodeWavToMonoFloat32(buffer);
|
|
124
203
|
const durationMs = decoded.durationSeconds * 1e3;
|
|
125
204
|
const gaps = missingAudioRanges(offset, offset + durationMs, confirmed);
|
|
126
205
|
for (const [gapIndex, gap] of gaps.entries()) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
206
|
+
assertCurrent();
|
|
207
|
+
let checkpoint = readCheckpoint(run.run_id, gap.startedAtMs, gap.endedAtMs);
|
|
208
|
+
if (!checkpoint) {
|
|
209
|
+
const audio = gaps.length === 1 && gap.startedAtMs === offset && gap.endedAtMs === offset + durationMs ? buffer : slicePcmWav(decoded, gap.startedAtMs - offset, gap.endedAtMs - offset);
|
|
210
|
+
if (audio.length <= 44) continue;
|
|
211
|
+
const result = await withProcessingDeadline((requestSignal) => this.deps.transcribeSegment ? this.deps.transcribeSegment(audio, requestSignal) : transcribe(audio, sttConfig, {
|
|
212
|
+
mime: "audio/wav",
|
|
213
|
+
fileName: `discussion-recovery-${index}-${gapIndex}.wav`,
|
|
214
|
+
signal: requestSignal
|
|
215
|
+
}), signal, this.deps.requestTimeoutMs ?? 12e4);
|
|
216
|
+
const recovered = [];
|
|
217
|
+
if (result.segments?.length) for (const part of result.segments) {
|
|
218
|
+
if (!Number.isFinite(part.startMs) || !Number.isFinite(part.endMs) || part.startMs < 0 || part.endMs <= part.startMs || part.endMs > gap.endedAtMs - gap.startedAtMs + 100) throw new Error("Provider returned an invalid transcript time range");
|
|
219
|
+
recovered.push({
|
|
220
|
+
text: part.text,
|
|
221
|
+
startedAtMs: gap.startedAtMs + part.startMs,
|
|
222
|
+
endedAtMs: Math.min(gap.endedAtMs, gap.startedAtMs + part.endMs),
|
|
223
|
+
...part.speaker ? { speakerLabel: `${index + 1}:${gapIndex + 1}:${part.speaker}` } : {}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
else if (result.text.trim()) recovered.push({
|
|
227
|
+
text: result.text,
|
|
228
|
+
...gap
|
|
140
229
|
});
|
|
230
|
+
checkpoint = {
|
|
231
|
+
segments: recovered,
|
|
232
|
+
language: result.language
|
|
233
|
+
};
|
|
234
|
+
assertCurrent();
|
|
235
|
+
saveCheckpoint(run.run_id, gap.startedAtMs, gap.endedAtMs, checkpoint);
|
|
141
236
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
...gap
|
|
145
|
-
});
|
|
146
|
-
language ??= result.language;
|
|
237
|
+
output.push(...checkpoint.segments);
|
|
238
|
+
language ??= checkpoint.language;
|
|
147
239
|
}
|
|
148
240
|
offset += durationMs;
|
|
149
241
|
});
|
|
150
|
-
|
|
151
|
-
replaceTranscriptSegments(capture.id, segments);
|
|
242
|
+
output.sort((a, b) => a.startedAtMs - b.startedAtMs);
|
|
152
243
|
return {
|
|
153
|
-
text:
|
|
154
|
-
|
|
244
|
+
text: output.reduce((text, segment) => appendTranscriptWithoutOverlap(text, segment.text), ""),
|
|
245
|
+
language,
|
|
246
|
+
segments: output
|
|
155
247
|
};
|
|
156
248
|
}
|
|
157
|
-
fail(capture, stage, code, message) {
|
|
158
|
-
const current = getDiscussionCapture(capture.id);
|
|
159
|
-
if (!current || current.status !== "stopping" && current.status !== "sealing") return;
|
|
160
|
-
const updated = updateDiscussionCapture(capture.id, {
|
|
161
|
-
status: "needs_attention",
|
|
162
|
-
failureStage: stage,
|
|
163
|
-
failureCode: code,
|
|
164
|
-
failureMessage: message.slice(0, 1e3)
|
|
165
|
-
}, [current.status]);
|
|
166
|
-
if (updated) this.deps.onUpdated?.(updated);
|
|
167
|
-
log.warn({
|
|
168
|
-
discussionId: capture.id,
|
|
169
|
-
stage,
|
|
170
|
-
code
|
|
171
|
-
}, `Discussion sealing failed: ${message}`);
|
|
172
|
-
}
|
|
173
249
|
};
|
|
174
250
|
//#endregion
|
|
175
251
|
export { DiscussionSealer };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { longRecordingReview } from './long-review.js';
|
|
1
2
|
import { type DiscussionRecordingManifest } from '@xopcai/gateway-contract';
|
|
2
3
|
import type { NotesService } from '../notes/service.js';
|
|
3
4
|
import type { ProjectService } from '../projects/project-service.js';
|
|
@@ -15,6 +16,10 @@ export declare class DiscussionService {
|
|
|
15
16
|
private readonly recordingOwner;
|
|
16
17
|
private readonly recordingControllers;
|
|
17
18
|
constructor(notes: NotesService, projects: ProjectService, emit?: (type: string, payload: unknown) => void);
|
|
19
|
+
audioClip(id: string, start: number, end: number, signal: AbortSignal): Promise<Buffer<ArrayBufferLike>>;
|
|
20
|
+
annotations(id: string): Promise<import("@xopcai/gateway-contract").DiscussionResolvedAnnotation[]>;
|
|
21
|
+
saveAnnotation(id: string, input: import('@xopcai/gateway-contract').DiscussionAnnotationInput): import("@xopcai/gateway-contract").DiscussionAnnotation;
|
|
22
|
+
evidence(id: string, revision: number, ids: number[]): Promise<import("@xopcai/gateway-contract").DiscussionEvidence>;
|
|
18
23
|
settings(): DiscussionCaptureSettings;
|
|
19
24
|
acknowledgeConsent(policyVersion: number): DiscussionCaptureSettings;
|
|
20
25
|
create(input: CreateDiscussionInput): Promise<DiscussionDetail>;
|
|
@@ -44,10 +49,11 @@ export declare class DiscussionService {
|
|
|
44
49
|
sealRecording(id: string, input: DiscussionRecordingManifest): Promise<import("@xopcai/gateway-contract").DiscussionRecordingJob>;
|
|
45
50
|
/** Runs inside the existing sealer lifecycle; unfinished leases survive process restart. */
|
|
46
51
|
processRecordingJob(): Promise<void>;
|
|
47
|
-
retry(id: string): Promise<DiscussionDetail | null>;
|
|
52
|
+
retry(id: string, mode?: import('./types.js').DiscussionRetryMode): Promise<DiscussionDetail | null>;
|
|
48
53
|
cancel(id: string): Promise<DiscussionDetail | null>;
|
|
49
54
|
deleteAudio(id: string): Promise<DiscussionDetail | null>;
|
|
50
55
|
unlinkInferredProject(id: string): Promise<DiscussionDetail | null>;
|
|
56
|
+
review(id: string, options?: Parameters<typeof longRecordingReview>[2]): Promise<import("@xopcai/gateway-contract").DiscussionReview>;
|
|
51
57
|
private detail;
|
|
52
58
|
private enqueueMutation;
|
|
53
59
|
}
|
|
@@ -8,6 +8,10 @@ import { DiscussionServiceError } from "./errors.js";
|
|
|
8
8
|
import { acknowledgeDiscussionCaptureConsent, correctDiscussionTranscriptSegment, createDiscussionCapture, createDiscussionTranscriptSegment, deleteDiscussionSegmentAudio, getDiscussionCapture, getDiscussionCaptureByClientRequestId, getDiscussionCaptureByNoteId, getDiscussionCaptureSettings, getDiscussionMetrics, getDiscussionTranscriptSegment, getLatestDiscussionOrganization, listDiscussionCaptures, listDiscussionTranscriptSegments, updateDiscussionCapture } from "./repository.js";
|
|
9
9
|
import { assembleDiscussionTranscript } from "./transcript.js";
|
|
10
10
|
import { readTranscriptRevision, refreshCanonicalTranscript, saveTranscriptRevision } from "./revisions.js";
|
|
11
|
+
import { createProcessingRun, processingProgress, resetProcessingRetry } from "./processing.js";
|
|
12
|
+
import { evidenceFor, putAnnotation, resolvedAnnotations } from "./review.js";
|
|
13
|
+
import { longRecordingReview } from "./long-review.js";
|
|
14
|
+
import { discussionAudioClip } from "./audio-clip.js";
|
|
11
15
|
import { editMeeting } from "./edits.js";
|
|
12
16
|
import { completeRecording, listRecordingChunks, removeRecordingChunks, saveRecordingChunk, validateRecordingManifest } from "./recording.js";
|
|
13
17
|
import { cancelRecordingJob, claimRecordingJob, finishRecordingJob, getRecordingJob, getRecordingJobInput, renewRecordingJob, submitRecordingJob } from "./recordingJobs.js";
|
|
@@ -31,6 +35,18 @@ var DiscussionService = class {
|
|
|
31
35
|
this.projects = projects;
|
|
32
36
|
this.emit = emit;
|
|
33
37
|
}
|
|
38
|
+
audioClip(id, start, end, signal) {
|
|
39
|
+
return discussionAudioClip(id, start, end, this.notes, signal);
|
|
40
|
+
}
|
|
41
|
+
annotations(id) {
|
|
42
|
+
return resolvedAnnotations(id, this.notes);
|
|
43
|
+
}
|
|
44
|
+
saveAnnotation(id, input) {
|
|
45
|
+
return putAnnotation(id, input);
|
|
46
|
+
}
|
|
47
|
+
evidence(id, revision, ids) {
|
|
48
|
+
return evidenceFor(id, revision, ids, this.notes);
|
|
49
|
+
}
|
|
34
50
|
settings() {
|
|
35
51
|
return getDiscussionCaptureSettings();
|
|
36
52
|
}
|
|
@@ -238,6 +254,7 @@ var DiscussionService = class {
|
|
|
238
254
|
const capture = getDiscussionCapture(id);
|
|
239
255
|
if (!capture) throw new DiscussionServiceError("not_found", "Discussion not found");
|
|
240
256
|
if (!["completed", "needs_attention"].includes(capture.status) || !capture.canonicalTranscript) throw new DiscussionServiceError("conflict", "Transcript is not ready");
|
|
257
|
+
resetProcessingRetry(id);
|
|
241
258
|
const updated = updateDiscussionCapture(id, {
|
|
242
259
|
status: "organizing",
|
|
243
260
|
template,
|
|
@@ -338,24 +355,37 @@ var DiscussionService = class {
|
|
|
338
355
|
}
|
|
339
356
|
});
|
|
340
357
|
}
|
|
341
|
-
async retry(id) {
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
if (capture.status !== "needs_attention") throw new DiscussionServiceError("conflict", "Only discussions needing attention can be retried");
|
|
345
|
-
if (getRecordingJob(id)?.state === "failed") {
|
|
358
|
+
async retry(id, mode = "resume") {
|
|
359
|
+
if (mode !== "resume" && mode !== "from_audio") throw new DiscussionServiceError("invalid_input", "Invalid retry mode");
|
|
360
|
+
if (mode === "resume" && getRecordingJob(id)?.state === "failed") {
|
|
346
361
|
await this.sealRecording(id, getRecordingJobInput(id));
|
|
347
362
|
return this.get(id);
|
|
348
363
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
364
|
+
return this.enqueueMutation(id, async () => {
|
|
365
|
+
const capture = getDiscussionCapture(id);
|
|
366
|
+
if (!capture) return null;
|
|
367
|
+
if (mode === "from_audio") {
|
|
368
|
+
if (!["completed", "needs_attention"].includes(capture.status)) throw new DiscussionServiceError("conflict", "Wait for current processing to finish");
|
|
369
|
+
if (!capture.audioAttachmentId || capture.audioDeletedAt || !await this.notes.getAttachmentPath(capture.noteId, capture.audioAttachmentId)) throw new DiscussionServiceError("conflict", "Saved original audio is unavailable");
|
|
370
|
+
} else if (capture.status !== "needs_attention") throw new DiscussionServiceError("conflict", "Only discussions needing attention can be retried");
|
|
371
|
+
const updated = runSqliteWriteTransaction(() => {
|
|
372
|
+
if (mode === "from_audio") {
|
|
373
|
+
saveTranscriptRevision(id);
|
|
374
|
+
createProcessingRun(capture, true);
|
|
375
|
+
} else resetProcessingRetry(id);
|
|
376
|
+
const status = mode === "from_audio" || capture.failureStage === "transcript_sealing" ? "sealing" : capture.canonicalTranscript ? "organizing" : "stopping";
|
|
377
|
+
return updateDiscussionCapture(id, {
|
|
378
|
+
status,
|
|
379
|
+
...status === "stopping" ? { recordingStoppedAt: Date.now() } : {},
|
|
380
|
+
failureStage: void 0,
|
|
381
|
+
failureCode: void 0,
|
|
382
|
+
failureMessage: void 0
|
|
383
|
+
}, [capture.status]);
|
|
384
|
+
});
|
|
385
|
+
if (!updated) throw new DiscussionServiceError("conflict", "Discussion changed while retrying");
|
|
386
|
+
this.emit?.("discussion.updated", updated);
|
|
387
|
+
return this.detail(updated);
|
|
388
|
+
});
|
|
359
389
|
}
|
|
360
390
|
async cancel(id) {
|
|
361
391
|
const active = getDiscussionCapture(id);
|
|
@@ -389,6 +419,8 @@ var DiscussionService = class {
|
|
|
389
419
|
await removeRecordingChunks(capture);
|
|
390
420
|
cancelRecordingJob(id);
|
|
391
421
|
if (capture.audioAttachmentId) await this.notes.removeAttachment(capture.noteId, capture.audioAttachmentId);
|
|
422
|
+
const sourceNote = await this.notes.getNote(capture.noteId);
|
|
423
|
+
for (const attachment of sourceNote?.attachments ?? []) if (attachment.retainWithoutReference && (attachment.fileName.startsWith(`recording-part-${capture.id}-`) || attachment.fileName === `recording-sources-${capture.id}.json` || attachment.fileName === `recording-events-${capture.id}.json`)) await this.notes.removeAttachment(capture.noteId, attachment.id);
|
|
392
424
|
deleteDiscussionSegmentAudio(id);
|
|
393
425
|
const updated = updateDiscussionCapture(id, {
|
|
394
426
|
audioAttachmentId: void 0,
|
|
@@ -413,12 +445,16 @@ var DiscussionService = class {
|
|
|
413
445
|
this.emit?.("discussion.updated", updated);
|
|
414
446
|
return this.detail(updated);
|
|
415
447
|
}
|
|
448
|
+
review(id, options = {}) {
|
|
449
|
+
return longRecordingReview(id, this.notes, options);
|
|
450
|
+
}
|
|
416
451
|
async detail(capture) {
|
|
417
452
|
const note = await this.notes.getNote(capture.noteId);
|
|
418
453
|
if (!note) throw new DiscussionServiceError("not_found", "Discussion note not found");
|
|
419
454
|
const recordingJob = getRecordingJob(capture.id);
|
|
420
455
|
return {
|
|
421
456
|
discussion: capture,
|
|
457
|
+
processing: processingProgress(capture.id),
|
|
422
458
|
note,
|
|
423
459
|
transcript: this.transcript(capture.id),
|
|
424
460
|
...recordingJob ? { recordingJob } : {},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { DISCUSSION_STATUSES } from '@xopcai/gateway-contract';
|
|
2
|
-
export type { DiscussionStatus, DiscussionSource, DiscussionProjectInferenceSource, DiscussionFailureStage, DiscussionFact, DiscussionChapter, DiscussionTemplate, DiscussionActionItem, DiscussionOrganization, DiscussionCapture, DiscussionTranscriptSegmentStatus, DiscussionTranscriptSegment, DiscussionTranscriptStats, DiscussionTranscript, DiscussionOrganizationRecord, DiscussionCaptureSettings, CreateDiscussionInput, ListDiscussionsQuery, DiscussionListResult, DiscussionMetrics, } from '@xopcai/gateway-contract';
|
|
2
|
+
export type { DiscussionStatus, DiscussionSource, DiscussionProjectInferenceSource, DiscussionFailureStage, DiscussionFact, DiscussionChapter, DiscussionTemplate, DiscussionActionItem, DiscussionOrganization, DiscussionCapture, DiscussionTranscriptSegmentStatus, DiscussionTranscriptSegment, DiscussionTranscriptStats, DiscussionTranscript, DiscussionOrganizationRecord, DiscussionCaptureSettings, CreateDiscussionInput, ListDiscussionsQuery, DiscussionListResult, DiscussionMetrics, DiscussionProcessingProgress, DiscussionRetryMode, } from '@xopcai/gateway-contract';
|
|
3
3
|
import type { DiscussionCapture, DiscussionTranscript, DiscussionOrganizationRecord } from '@xopcai/gateway-contract';
|
|
4
4
|
export interface DiscussionDetail {
|
|
5
5
|
discussion: DiscussionCapture;
|
|
6
6
|
note: import('../notes/types.js').Note;
|
|
7
7
|
transcript: DiscussionTranscript;
|
|
8
8
|
organization?: DiscussionOrganizationRecord;
|
|
9
|
+
processing?: import('@xopcai/gateway-contract').DiscussionProcessingProgress;
|
|
9
10
|
recordingJob?: import('@xopcai/gateway-contract').DiscussionRecordingJob;
|
|
10
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EndpointBindingService } from "./binding-service.js";
|
|
2
1
|
import { EndpointToolPolicy, EndpointToolPolicyError } from "./policy.js";
|
|
3
2
|
import { EndpointInvocationService, EndpointToolExecutionError } from "./invocation-service.js";
|
|
3
|
+
import { EndpointBindingService } from "./binding-service.js";
|
|
4
4
|
import { EndpointRegistry, endpointToolRevision } from "./registry.js";
|
|
5
5
|
import { ENDPOINT_UPLOAD_MAX_BYTES, EndpointUploadError, EndpointUploadService } from "./upload-service.js";
|
|
6
6
|
import { EndpointToolRuntime } from "./runtime.js";
|
|
@@ -7,12 +7,12 @@ import { bindEndpointPrincipal, getEndpointPrincipal, touchEndpointPrincipal } f
|
|
|
7
7
|
import { finishEndpointToolInvocationAudit, startEndpointToolInvocationAudit } from "../storage/sqlite/endpoint-tool-invocation-repository.js";
|
|
8
8
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
9
9
|
import { init_paths } from "../config/paths.js";
|
|
10
|
+
import { EndpointToolPolicy } from "./policy.js";
|
|
11
|
+
import { EndpointInvocationService } from "./invocation-service.js";
|
|
10
12
|
import { EndpointAuthenticator } from "./auth.js";
|
|
11
13
|
import { EndpointBindingService } from "./binding-service.js";
|
|
12
14
|
import { DeviceGrantService } from "./grant-service.js";
|
|
13
15
|
import { recordDeviceGrantEvent } from "../storage/sqlite/device-grant-audit-repository.js";
|
|
14
|
-
import { EndpointToolPolicy } from "./policy.js";
|
|
15
|
-
import { EndpointInvocationService } from "./invocation-service.js";
|
|
16
16
|
import { EndpointRegistry } from "./registry.js";
|
|
17
17
|
import { EndpointUploadService } from "./upload-service.js";
|
|
18
18
|
import { join } from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
2
2
|
import { PROVIDER_ENV_MAP, init_env_keys } from "../providers/env-keys.js";
|
|
3
3
|
import { init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
4
|
-
import { collectTtsProviderConfigEntries } from "../voice/tts/config-slice.js";
|
|
5
|
-
import { isProviderConfigured } from "../voice/tts/factory.js";
|
|
6
|
-
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
7
4
|
import { collectSttProviderConfigEntries } from "../voice/stt/config-slice.js";
|
|
8
5
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
9
6
|
import "../voice/stt/index.js";
|
|
7
|
+
import { collectTtsProviderConfigEntries } from "../voice/tts/config-slice.js";
|
|
8
|
+
import { isProviderConfigured } from "../voice/tts/factory.js";
|
|
9
|
+
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
10
10
|
import { isSttProviderConfigured } from "../voice/stt/list-providers.js";
|
|
11
11
|
//#region src/extensions/activation-context.ts
|
|
12
12
|
init_providers();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
4
|
import { isDangerousHostEnvVarName } from "../../infra/host-env-security.js";
|
|
4
5
|
import { pluginName } from "./validation.js";
|
|
5
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
|
-
import { pluginName } from "./validation.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { pluginName } from "./validation.js";
|
|
4
4
|
import { pluginCredentialProviderPrefix } from "./auth.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { existsSync, rmSync } from "node:fs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { registerMarketplaceAdapter, unregisterMarketplaceAdapter } from "../agent/skills/marketplace/registry.js";
|
|
4
3
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
5
|
-
import {
|
|
6
|
-
import { registerSpeechProvider } from "../voice/tts/speech-registry.js";
|
|
4
|
+
import { registerMarketplaceAdapter, unregisterMarketplaceAdapter } from "../agent/skills/marketplace/registry.js";
|
|
7
5
|
import { registerMediaUnderstandingProvider } from "../media-understanding/registry.js";
|
|
8
|
-
import {
|
|
6
|
+
import { registerSpeechProvider } from "../voice/tts/speech-registry.js";
|
|
9
7
|
import { HOOK_EXECUTION_MODES } from "./types/hooks.js";
|
|
8
|
+
import { commandRegistry } from "../chat-commands/registry.js";
|
|
10
9
|
import { TypedEventBus } from "./typed-event-bus.js";
|
|
11
10
|
import { ExtensionRegistryImpl } from "./extension-registry-impl.js";
|
|
11
|
+
import { registerMigration } from "../migrations/registry.js";
|
|
12
12
|
import { isAbsolute, resolve } from "path";
|
|
13
13
|
import { EventEmitter } from "events";
|
|
14
14
|
//#region src/extensions/api.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeActivationContext } from "./activation-context.js";
|
|
2
1
|
import { ActivationPlanner } from "./activation-planner.js";
|
|
2
|
+
import { mergeActivationContext } from "./activation-context.js";
|
|
3
3
|
//#region src/extensions/bundled-extension-activation.ts
|
|
4
4
|
function asSurfaceConfig(config) {
|
|
5
5
|
return config;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { normalizeExtensionManifest } from "./normalize-manifest.js";
|
|
2
2
|
import { areExtensionsGloballyDisabled, discoverExtensionsFromDisk } from "./discover-extensions.js";
|
|
3
|
-
import { ManifestRegistry } from "./manifest-registry.js";
|
|
4
|
-
import { buildExtensionMetadataSnapshot, resolveExtensionLoaderOptionsFromConfig } from "./extension-metadata-snapshot.js";
|
|
5
|
-
import { collectConfiguredChannelIds, collectConfiguredProviderIds, mergeActivationContext } from "./activation-context.js";
|
|
6
3
|
import { HOOK_EXECUTION_MODES } from "./types/hooks.js";
|
|
7
4
|
import { BUILTIN_PROVIDERS } from "./types/providers.js";
|
|
8
5
|
import { ExtensionRegistryImpl } from "./extension-registry-impl.js";
|
|
9
6
|
import { ExtensionApiImpl, createExtensionLogger, createPathResolver } from "./api.js";
|
|
10
7
|
import { ActivationPlanner } from "./activation-planner.js";
|
|
8
|
+
import { collectConfiguredChannelIds, collectConfiguredProviderIds, mergeActivationContext } from "./activation-context.js";
|
|
9
|
+
import { ManifestRegistry } from "./manifest-registry.js";
|
|
11
10
|
import { ExtensionLoader, normalizeExtensionConfig, resolveExtensionPath } from "./loader.js";
|
|
12
11
|
import { listOnboardChannels, listOnboardProviders, resolveProviderForModel } from "./onboard-helpers.js";
|
|
12
|
+
import { buildExtensionMetadataSnapshot, resolveExtensionLoaderOptionsFromConfig } from "./extension-metadata-snapshot.js";
|
|
13
13
|
import { ExtensionHookRunner, createHookContext, isHookEvent } from "./hooks.js";
|
|
14
14
|
export { ActivationPlanner, BUILTIN_PROVIDERS, ExtensionApiImpl, ExtensionHookRunner, ExtensionLoader, ExtensionRegistryImpl, HOOK_EXECUTION_MODES, ManifestRegistry, areExtensionsGloballyDisabled, buildExtensionMetadataSnapshot, collectConfiguredChannelIds, collectConfiguredProviderIds, createExtensionLogger, createHookContext, createPathResolver, discoverExtensionsFromDisk, isHookEvent, listOnboardChannels, listOnboardProviders, mergeActivationContext, normalizeExtensionConfig, normalizeExtensionManifest, resolveExtensionLoaderOptionsFromConfig, resolveExtensionPath, resolveProviderForModel };
|
|
@@ -9,8 +9,8 @@ import { collectExtensionPackageDependencyIssues } from "./package-contract.js";
|
|
|
9
9
|
import { dirname, isAbsolute, join, resolve, sep } from "path";
|
|
10
10
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "fs";
|
|
11
11
|
import { execFileSync } from "node:child_process";
|
|
12
|
-
import AdmZip from "adm-zip";
|
|
13
12
|
import semver from "semver";
|
|
13
|
+
import AdmZip from "adm-zip";
|
|
14
14
|
import { tmpdir } from "os";
|
|
15
15
|
//#region src/extensions/install.ts
|
|
16
16
|
/**
|