@xopcai/xopc 0.0.210 → 0.0.213
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-JLmEb1p0.js → activity-store-Xw-pOm9A.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CI1zQfzY.js → agent-avatar-dicebear-Ca1bciiK.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DD3TqNrC.js +68 -0
- package/dist/gateway/static/root/assets/{api-C6MmWfcb.js → api-CZK-lRew.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-Cd02GGpV.js → app-management-settings-panel-BLFIG09j.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Db-h2I3G.js → appearance-settings-BsTWUq1i.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-cJkDKn72.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-CMHzJT2a.js → archive-plugin-B9LsFfEx.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BzhI2LoH.js → attachment-load-CsWiFfmN.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-CbjU2e75.js +1 -0
- package/dist/gateway/static/root/assets/automations-workspace-C4xyo0c4.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DsUeHvZO.js → binary-plugins-DbqhT_JB.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CFfsIeZ4.js → block-editor-BGpHwxZ5.js} +4 -4
- package/dist/gateway/static/root/assets/browser-settings-page-CrhpQl-e.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BiWghvJ0.js → browser-workflow-inputs-BXlon_hL.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-DPLdT6Zn.js → browser-workflows-page-B3BBDM_r.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B9MoPW9u.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-CTxGFvsS.js → capability-presets-api-BqvMm6UW.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-BmwldV9R.js +3 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-BklVUOxC.js → channel-recipient-api-9uca5kDa.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-CwLqWcy_.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-DeBw3du9.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-0F4Jmma2.js → chat-terminal-dock-DJjYT3WX.js} +2 -2
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-BMhrPKJC.js → chunk-KS7C4IRE-BaASWQor.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-BvIZ51ty.js → connectors-api-XCLfuDrN.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CVkGtcMS.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-BHmwaMbO.js → cron-expression-DzQN7zBR.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-fj_pPCv5.js → date-picker-B-r5O5qd.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DsWvwOv-.js → dependency-picker-Ch2XBU2s.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-mjkF0Xxh.js → desktop-pet-BdjX8jde.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-ClwUpRYu.js → desktop-pet-settings-CzjjgMMn.js} +1 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-BCTgGTk4.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DC69wplH.js → extension-debug-page-6OGgOucD.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DCtk6zdJ.js → extension-page-Cf6MUfCF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Bkm4zzv-.js → extension-settings-page-pSY_ZvQZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-Dr_NQt7v.js → gateway-config-api-CFJMng9v.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CEfv8N1J.js → gateway-config-swr-DpiY6aub.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-aQYxNePf.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B8hebJ7s.js → gateway-startup-retry-BZ_6ChP4.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-CI33q9i1.js +1 -0
- package/dist/gateway/static/root/assets/home-page-CAIaWs6r.js +1 -0
- package/dist/gateway/static/root/assets/image-generation-api-DPndEWOU.js +1 -0
- package/dist/gateway/static/root/assets/index-BhstAl5i.js +108 -0
- package/dist/gateway/static/root/assets/index-DQzjgIkQ.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DCQvf05d.js → keyboard-shortcuts-settings-CbLJRGXR.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BqFnCaKT.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-B3Ugd0my.js → local-apps-page-Crf6c3SK.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-hDBVeG3G.js → locale-store-BYSRjM6g.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-nXdF3wOT.js → logs-page-BpfLQWex.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-C-S5Llq3.js → management-settings-mxyYWKgM.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-DuVq37Uh.js → markdown-split-kZaPrUTM.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-DD_PgVue.css +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-D8eO_6h3.js → markdown-view-DlsczsQ1.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-C1V6pkX3.js → media-plugins-Dk67jaG6.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DyM8OOVG.js +3 -0
- package/dist/gateway/static/root/assets/notes-api-DaeeQw8A.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-Dn71ZV8c.js → notes-page-CQDzw8fX.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-BYiROmRJ.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-B5a5aSoS.js → page-tabs-C4UkhX2U.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-5041AIBX.js → preview-open-alternatives-nzcjh6y0.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-7UkouFQU.js → product-open-page-3FvW5cHm.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-p45i1sMj.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Y9yXB4DX.js +1 -0
- package/dist/gateway/static/root/assets/registry-api-Bu6OGEY2.js +2 -0
- package/dist/gateway/static/root/assets/remote-access-hub-CNsGY0VS.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DvaXzHYS.js → runtime-tools-settings-panel-CVqPSfUb.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-Dlxl_5X0.js → schema-form-Dz6eZpqv.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BAtpgb1t.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-pgBQ21Oe.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-CSaiuuer.js → settings-form-section-BaWFAZv4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-H3mJwt3r.js → settings-loading-skeleton-BWmdZfNg.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Cs7zA4BS.js → settings-page-Btcb-Dc8.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BNllZUFP.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-Bdpw5m7M.js → share-preview-page-CGzY3S0N.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CncwbTHY.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CcW2dhSW.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-Bup3Lg1Z.js → skills-page-Bi2IWpU0.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-D22ORR21.js → skills-page.utils-BancvwN2.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-GmtWsfjB.js → system-settings-panel-CihjIzWx.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-SSNFtY-d.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-CtY8RwMX.js → theme-store-D1_t_31B.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-C2aOdlEA.js → typed-models-lib-C2LhiQq5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DOj5i8d_.js → use-autosave-tf_8rxAK.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-BnPTFEar.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-5WfurWYa.js → voice-api-key-field-DN-y7Zfe.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-bqqH4aZ9.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-bBA8LinI.js → workflow-run-setup-panel-2H33iXOB.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BnfxRf1q.js +5 -0
- package/dist/gateway/static/root/index.html +13 -11
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/image/generation/providers/xopc-cloud.js +2 -1
- package/dist/src/agent/image/tool-model-config.js +15 -9
- package/dist/src/agent/memory/builtin-provider.js +0 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +23 -7
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/capabilities/readiness/from-config.d.ts +10 -0
- package/dist/src/capabilities/readiness/from-config.js +128 -0
- package/dist/src/capabilities/readiness/index.d.ts +3 -0
- package/dist/src/capabilities/readiness/index.js +3 -0
- package/dist/src/capabilities/readiness/planner.d.ts +3 -0
- package/dist/src/capabilities/readiness/planner.js +56 -0
- package/dist/src/capabilities/readiness/types.d.ts +35 -0
- package/dist/src/capabilities/readiness/types.js +1 -0
- package/dist/src/cli/commands/agent.js +9 -0
- package/dist/src/cli/commands/auth.js +4 -3
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/models.js +2 -1
- package/dist/src/cli/commands/onboard/model.d.ts +3 -21
- package/dist/src/cli/commands/onboard/model.js +10 -86
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/cli/utils/oauth-login.d.ts +2 -0
- package/dist/src/cli/utils/oauth-login.js +9 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/paths-state.d.ts +2 -0
- package/dist/src/config/paths-state.js +5 -1
- package/dist/src/config/paths.d.ts +1 -1
- package/dist/src/config/paths.js +2 -2
- package/dist/src/config/schema.js +1 -1
- package/dist/src/connectors/composio-managed-client.d.ts +60 -0
- package/dist/src/connectors/composio-managed-client.js +135 -0
- package/dist/src/connectors/composio-managed-events.d.ts +41 -0
- package/dist/src/connectors/composio-managed-events.js +105 -0
- package/dist/src/connectors/composio-sessions.d.ts +3 -1
- package/dist/src/connectors/composio-sessions.js +15 -8
- package/dist/src/connectors/composio.js +10 -4
- package/dist/src/connectors/connected-source-cursor.d.ts +9 -0
- package/dist/src/connectors/connected-source-cursor.js +30 -0
- package/dist/src/connectors/connected-source-ingestion.js +128 -65
- package/dist/src/connectors/connected-source-normalizers.d.ts +1 -0
- package/dist/src/connectors/connected-source-normalizers.js +33 -2
- package/dist/src/connectors/connected-source-sanitization.d.ts +1 -0
- package/dist/src/connectors/connected-source-sanitization.js +21 -0
- package/dist/src/connectors/connector-identity.js +10 -2
- package/dist/src/connectors/content-enrichment.d.ts +29 -0
- package/dist/src/connectors/content-enrichment.js +273 -0
- package/dist/src/connectors/learning-coordinator.js +1 -2
- package/dist/src/connectors/learning-recipes.js +30 -33
- package/dist/src/connectors/runtime-adapter-registry.js +2 -2
- package/dist/src/discussions/live-worker.d.ts +1 -0
- package/dist/src/discussions/live-worker.js +7 -1
- package/dist/src/discussions/repository.js +11 -1
- package/dist/src/discussions/sealer.d.ts +1 -1
- package/dist/src/discussions/sealer.js +16 -7
- package/dist/src/discussions/service.js +6 -2
- package/dist/src/discussions/transcript.d.ts +2 -0
- package/dist/src/discussions/transcript.js +42 -3
- package/dist/src/discussions/types.d.ts +4 -0
- package/dist/src/extensions/install.d.ts +10 -0
- package/dist/src/extensions/install.js +111 -14
- package/dist/src/extensions/loader.js +22 -18
- package/dist/src/gateway/hono/app.js +8 -3
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.js +2 -2
- package/dist/src/gateway/hono/middleware/logger.js +1 -1
- package/dist/src/gateway/hono/middleware/strict-rate-limit.d.ts +4 -0
- package/dist/src/gateway/hono/middleware/strict-rate-limit.js +9 -2
- package/dist/src/gateway/hono/oauth-async.d.ts +11 -5
- package/dist/src/gateway/hono/oauth-async.js +29 -16
- package/dist/src/gateway/hono/oauth.d.ts +1 -3
- package/dist/src/gateway/hono/oauth.js +22 -22
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +10 -3
- package/dist/src/gateway/hono/routes/deps.d.ts +1 -0
- package/dist/src/gateway/hono/routes/discussions.js +2 -1
- package/dist/src/gateway/hono/routes/exposure.js +1 -1
- package/dist/src/gateway/hono/routes/home.d.ts +1 -1
- package/dist/src/gateway/hono/routes/home.js +2 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +2 -1
- package/dist/src/gateway/hono/routes/models.js +59 -5
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/tunnel.js +3 -3
- package/dist/src/gateway/hono/routes/understanding-sources.js +29 -0
- package/dist/src/gateway/hono/routes/voice.d.ts +1 -2
- package/dist/src/gateway/hono/routes/voice.js +16 -35
- package/dist/src/gateway/hono/routes/workflows.js +69 -0
- package/dist/src/gateway/index.js +2 -2
- package/dist/src/gateway/rate-limit/buckets.d.ts +3 -0
- package/dist/src/gateway/rate-limit/buckets.js +12 -0
- package/dist/src/gateway/runtime-config.js +2 -2
- package/dist/src/gateway/security/audit.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/session-input-coordinator.js +1 -2
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +37 -7
- package/dist/src/knowledge/connected-understanding-pipeline.d.ts +1 -1
- package/dist/src/knowledge/connected-understanding-pipeline.js +74 -25
- package/dist/src/knowledge/ingestion-service.js +33 -15
- package/dist/src/knowledge/types.d.ts +2 -0
- package/dist/src/media-understanding/audio-transcription-runner.d.ts +2 -0
- package/dist/src/media-understanding/audio-transcription-runner.js +3 -1
- package/dist/src/media-understanding/runner.js +3 -1
- package/dist/src/media-understanding/types.d.ts +2 -0
- package/dist/src/notes/note-attachment-sync.js +1 -1
- package/dist/src/notes/service.d.ts +1 -0
- package/dist/src/notes/service.js +2 -1
- package/dist/src/notes/types.d.ts +2 -0
- package/dist/src/providers/model-catalog-persistence.d.ts +9 -0
- package/dist/src/providers/model-catalog-persistence.js +172 -0
- package/dist/src/providers/model-catalog-ranking.d.ts +2 -0
- package/dist/src/providers/model-catalog-ranking.js +17 -0
- package/dist/src/providers/model-catalog-store.d.ts +9 -57
- package/dist/src/providers/model-catalog-store.js +24 -5
- package/dist/src/providers/model-catalog-sync-service.d.ts +3 -3
- package/dist/src/providers/model-catalog-sync-service.js +12 -7
- package/dist/src/providers/model-catalog-types.d.ts +60 -0
- package/dist/src/providers/model-catalog-types.js +1 -0
- package/dist/src/providers/provider-auth-service.d.ts +1 -0
- package/dist/src/providers/provider-auth-service.js +3 -0
- package/dist/src/providers/provider-disconnect-core.d.ts +11 -0
- package/dist/src/providers/provider-disconnect-core.js +35 -0
- package/dist/src/providers/provider-disconnect.d.ts +3 -0
- package/dist/src/providers/provider-disconnect.js +11 -0
- package/dist/src/providers/xopc-cloud-catalog-coordinator.d.ts +56 -0
- package/dist/src/providers/xopc-cloud-catalog-coordinator.js +182 -0
- package/dist/src/providers/xopc-cloud-model-source.d.ts +6 -10
- package/dist/src/providers/xopc-cloud-model-source.js +49 -27
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +4 -0
- package/dist/src/storage/sqlite/migrations/124_workflow_context_snapshots.sql +15 -0
- package/dist/src/storage/sqlite/migrations/125_project_workflow_presets.sql +12 -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/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/user-context-quality-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/user-context-quality-repository.js +21 -1
- package/dist/src/tasks/home-query-service.d.ts +12 -127
- package/dist/src/tasks/home-query-service.js +73 -271
- package/dist/src/tasks/index.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +11 -3
- package/dist/src/tui/tui-oauth-login.js +5 -0
- package/dist/src/tui/xopc-tui-keybindings.d.ts +2 -2
- package/dist/src/tunnel/index.js +2 -2
- package/dist/src/user-context/sources/activity-clustering.js +30 -117
- package/dist/src/user-context/sources/index.d.ts +1 -0
- package/dist/src/user-context/sources/index.js +2 -1
- package/dist/src/user-context/sources/signal-clustering.d.ts +18 -0
- package/dist/src/user-context/sources/signal-clustering.js +131 -0
- package/dist/src/voice/audio/normalize.d.ts +18 -0
- package/dist/src/voice/audio/normalize.js +175 -0
- package/dist/src/voice/language-profile.d.ts +1 -4
- package/dist/src/voice/language-profile.js +2 -25
- package/dist/src/voice/local/runtime-client.d.ts +2 -0
- package/dist/src/voice/local/runtime-client.js +20 -1
- package/dist/src/voice/local/runtime-worker.js +7 -13
- package/dist/src/voice/local/wav.d.ts +3 -0
- package/dist/src/voice/local/wav.js +11 -5
- package/dist/src/voice/stt/availability.d.ts +1 -4
- package/dist/src/voice/stt/availability.js +3 -15
- package/dist/src/voice/stt/config.js +1 -0
- package/dist/src/voice/stt/factory.js +23 -0
- package/dist/src/voice/stt/index.d.ts +1 -0
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/list-providers.js +1 -1
- package/dist/src/voice/stt/providers/local-transcription.js +7 -3
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +3 -1
- package/dist/src/voice/stt/transcribe-core.d.ts +5 -1
- package/dist/src/voice/stt/transcribe-core.js +13 -5
- package/dist/src/voice/stt/types.d.ts +2 -0
- package/dist/src/voice/tts/factory.d.ts +1 -1
- package/dist/src/voice/tts/factory.js +23 -1
- package/dist/src/voice/tts/merge-config.js +5 -3
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +3 -1
- package/dist/src/voice/tts/types.d.ts +2 -0
- package/dist/src/voice/tts/types.js +4 -2
- package/dist/src/work-discovery/evaluation.d.ts +23 -0
- package/dist/src/work-discovery/evaluation.js +18 -1
- package/dist/src/work-discovery/index.js +2 -2
- package/dist/src/work-discovery/service.js +6 -8
- package/dist/src/work-discovery/types.d.ts +2 -0
- package/dist/src/workflows/context/workflow-context-snapshot-repository.d.ts +21 -0
- package/dist/src/workflows/context/workflow-context-snapshot-repository.js +40 -0
- package/dist/src/workflows/context/workflow-context.d.ts +18 -0
- package/dist/src/workflows/context/workflow-context.js +159 -0
- package/dist/src/workflows/domain/run.d.ts +10 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +1 -0
- package/dist/src/workflows/engine/workflow-engine.js +2 -0
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.d.ts +20 -0
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.js +38 -0
- package/dist/src/workflows/service/workflow-run-service.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +107 -22
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +1 -0
- package/dist/src/workflows/service/workflow-writeback-service.d.ts +9 -0
- package/dist/src/workflows/service/workflow-writeback-service.js +106 -0
- package/package.json +9 -8
- package/dist/gateway/static/root/assets/agents-DqGMj3QJ.js +0 -68
- package/dist/gateway/static/root/assets/apps-page-BT7F4WBI.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-CwOXGV9z.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CyRLhCod.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-jRKcS7lZ.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-B3bKdtwU.js +0 -3
- package/dist/gateway/static/root/assets/channels-settings-yZBWH02s.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-C3zlimZd.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-OX4KvUkA.js +0 -2
- package/dist/gateway/static/root/assets/directory-picker-path-field-OkqRFyRL.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-V1XVxjHa.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-CWUBAQrE.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D57cYRd3.js +0 -1
- package/dist/gateway/static/root/assets/index-DJ7HSgKs.js +0 -85
- package/dist/gateway/static/root/assets/index-PNBFdxHb.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-BbAiMZE1.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-B12xeflb.css +0 -1
- package/dist/gateway/static/root/assets/messages-1qg_hOOd.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-BYPoZeRw.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-D27nOKbo.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CdB5cJJ-.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DFoZ3UNS.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C1cbIcJ7.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DnXRlQXS.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CwgMODfJ.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-hlUgIkrp.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DR31B_Gz.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-CTKDpxhf.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-keJJYpix.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-D5_MH3n3.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BcvBiebt.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Cz2VpWdj.js +0 -5
- package/dist/src/voice/local/runtime-dispatcher.d.ts +0 -9
- package/dist/src/voice/local/runtime-dispatcher.js +0 -20
|
@@ -17,6 +17,7 @@ import { getConnectorInstance, listConnectorInstances } from "../../../connector
|
|
|
17
17
|
import { installConnector, installConnectorDefinition, uninstallConnector, updateConnectorConfig } from "../../../connectors/install.js";
|
|
18
18
|
import { startConnectorAuthorization } from "../../../connectors/auth-provider-registry.js";
|
|
19
19
|
import { composioLogoResponse } from "../../../connectors/composio-logo.js";
|
|
20
|
+
import { inspectManagedComposioStatus } from "../../../connectors/composio-managed-client.js";
|
|
20
21
|
import { appendComposioTriggerEvent, listComposioTriggerEvents } from "../../../connectors/composio-triggers.js";
|
|
21
22
|
import { buildConnectedPeopleGraph } from "../../../knowledge/people-graph.js";
|
|
22
23
|
import "../../../knowledge/index.js";
|
|
@@ -592,10 +593,13 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
592
593
|
}
|
|
593
594
|
});
|
|
594
595
|
authenticated.get("/api/connectors/composio/setup-status", async (c) => {
|
|
595
|
-
const
|
|
596
|
+
const status = Boolean(await resolveComposioApiKey()) ? {
|
|
597
|
+
configured: true,
|
|
598
|
+
mode: "byok"
|
|
599
|
+
} : await inspectManagedComposioStatus();
|
|
596
600
|
return c.json({
|
|
597
601
|
ok: true,
|
|
598
|
-
payload:
|
|
602
|
+
payload: status
|
|
599
603
|
});
|
|
600
604
|
});
|
|
601
605
|
authenticated.post("/api/connectors/composio/setup", strictRateLimitMiddleware, async (c) => {
|
|
@@ -605,7 +609,10 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
605
609
|
await configureComposioApiKey(apiKey);
|
|
606
610
|
return c.json({
|
|
607
611
|
ok: true,
|
|
608
|
-
payload: {
|
|
612
|
+
payload: {
|
|
613
|
+
configured: true,
|
|
614
|
+
mode: "byok"
|
|
615
|
+
}
|
|
609
616
|
});
|
|
610
617
|
} catch (error) {
|
|
611
618
|
return c.json({
|
|
@@ -4,6 +4,7 @@ export interface AuthenticatedRouteDeps {
|
|
|
4
4
|
service: GatewayService;
|
|
5
5
|
strictRateLimitMiddleware: MiddlewareHandler;
|
|
6
6
|
chatRateLimitMiddleware: MiddlewareHandler;
|
|
7
|
+
mediaRateLimitMiddleware?: MiddlewareHandler;
|
|
7
8
|
taskRateLimitMiddleware?: MiddlewareHandler;
|
|
8
9
|
xopcCloudPollRateLimitMiddleware: MiddlewareHandler;
|
|
9
10
|
channelRateLimitMiddleware?: MiddlewareHandler;
|
|
@@ -22,6 +22,7 @@ async function multipart(c) {
|
|
|
22
22
|
}
|
|
23
23
|
function registerDiscussionRoutes(authenticated, deps) {
|
|
24
24
|
const { service, strictRateLimitMiddleware } = deps;
|
|
25
|
+
const mediaRateLimitMiddleware = deps.mediaRateLimitMiddleware ?? deps.chatRateLimitMiddleware ?? strictRateLimitMiddleware;
|
|
25
26
|
authenticated.get("/api/discussion-capture/settings", (c) => c.json(service.discussions.settings()));
|
|
26
27
|
authenticated.put("/api/discussion-capture/settings", strictRateLimitMiddleware, async (c) => {
|
|
27
28
|
const body = await c.req.json().catch(() => ({}));
|
|
@@ -76,7 +77,7 @@ function registerDiscussionRoutes(authenticated, deps) {
|
|
|
76
77
|
const transcript = service.discussions.transcript(c.req.param("id"));
|
|
77
78
|
return transcript ? c.json(transcript) : c.json({ error: "Discussion not found" }, 404);
|
|
78
79
|
});
|
|
79
|
-
authenticated.put("/api/discussions/:id/segments/:sequence",
|
|
80
|
+
authenticated.put("/api/discussions/:id/segments/:sequence", mediaRateLimitMiddleware, async (c) => {
|
|
80
81
|
const body = await multipart(c);
|
|
81
82
|
if (!body) return c.json({ error: "Invalid multipart body" }, 400);
|
|
82
83
|
const file = body.file;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { consumeTunnelMutationLimit } from "../../../tunnel/tunnel-rate-limit.js";
|
|
2
1
|
import { extractToken } from "../../auth.js";
|
|
3
2
|
import { getExposureManager } from "../../../remote-access/exposure-manager.js";
|
|
3
|
+
import { consumeTunnelMutationLimit } from "../../../tunnel/tunnel-rate-limit.js";
|
|
4
4
|
//#region src/gateway/hono/routes/exposure.ts
|
|
5
5
|
function requireGatewayToken(c) {
|
|
6
6
|
return extractToken({ authorization: c.req.header("authorization") ?? void 0 }) ?? null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
2
|
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
|
-
export {
|
|
3
|
+
export { buildHomeWorkbench, decisionFromTask } from '../../../tasks/home-query-service.js';
|
|
4
4
|
/** Register the unified work-home read model and its decision actions. */
|
|
5
5
|
export declare function registerHomeRoutes(authenticated: Hono, deps: AuthenticatedRouteDeps): void;
|
|
@@ -2,7 +2,7 @@ import { acknowledgeHomeAttention } from "../../../storage/sqlite/home-attention
|
|
|
2
2
|
import { decideConnectorApproval } from "../../../storage/sqlite/connector-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
4
|
import { listGatewayAgents } from "../../agents-admin.js";
|
|
5
|
-
import { HomeQueryService,
|
|
5
|
+
import { HomeQueryService, buildHomeWorkbench, decisionFromTask } from "../../../tasks/home-query-service.js";
|
|
6
6
|
//#region src/gateway/hono/routes/home.ts
|
|
7
7
|
/** Register the unified work-home read model and its decision actions. */
|
|
8
8
|
function registerHomeRoutes(authenticated, deps) {
|
|
@@ -90,4 +90,4 @@ function registerHomeRoutes(authenticated, deps) {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
export {
|
|
93
|
+
export { buildHomeWorkbench, decisionFromTask, registerHomeRoutes };
|
|
@@ -139,7 +139,8 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
139
139
|
match: (path) => startsWithAny(path, [
|
|
140
140
|
"/api/models",
|
|
141
141
|
"/api/models-json",
|
|
142
|
-
"/api/providers"
|
|
142
|
+
"/api/providers",
|
|
143
|
+
"/api/capabilities/readiness"
|
|
143
144
|
]),
|
|
144
145
|
load: async () => {
|
|
145
146
|
const { registerModelsRoutes } = await import("./models.js");
|
|
@@ -6,7 +6,9 @@ import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
|
6
6
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
7
7
|
import "../../../providers/constants.js";
|
|
8
8
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
9
|
-
import { PROVIDER_META, getAllModels, getAllProviders, getAvailableModels, getProviderAuthState, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
9
|
+
import { PROVIDER_META, getAllModels, getAllProviders, getAvailableModels, getProviderAuthState, init_providers, isProviderConfigured, isProviderConfiguredSync } from "../../../providers/index.js";
|
|
10
|
+
import { buildCapabilityPlansForConfig } from "../../../capabilities/readiness/from-config.js";
|
|
11
|
+
import "../../../capabilities/readiness/index.js";
|
|
10
12
|
import { getImageGenerationProvider, reloadImageGenerationProviders, resolveImageGenerationCredentialMode } from "../../../agent/image/generation/provider-registry.js";
|
|
11
13
|
import { SessionConfigStore } from "../../../session/config-store.js";
|
|
12
14
|
import { deleteCustomImageProvider, listCustomImageProviders, upsertCustomImageProvider } from "../../custom-image-providers.js";
|
|
@@ -14,6 +16,7 @@ import { getDomesticProviderPreset, getDomesticProviderPresetIds } from "../../.
|
|
|
14
16
|
import { getOnboardingFeaturedProviders, getProviderHint, getRecommendedModelsForProvider, isRecommendedModel, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
15
17
|
import { getAgentImageGenerationConfig, getImageGenerationCatalog, prepareImageGenerationSetup, verifyImageGenerationCredential } from "../../image-generation-setup.js";
|
|
16
18
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
19
|
+
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
17
20
|
import { respondStartupUnavailable } from "../lib/startup-unavailable.js";
|
|
18
21
|
import { auditModelReferences } from "../../../providers/model-reference-auditor.js";
|
|
19
22
|
import { XopcCloudAccountError, XopcCloudAccountService } from "../../../providers/xopc-cloud-account-service.js";
|
|
@@ -68,10 +71,61 @@ function registerModelsRoutes(authenticated, deps) {
|
|
|
68
71
|
const { service, strictRateLimitMiddleware } = deps;
|
|
69
72
|
const catalogSync = service.getModelCatalogSync();
|
|
70
73
|
const xopcCloudAccount = new XopcCloudAccountService();
|
|
71
|
-
authenticated.get("/api/models/catalog/status", (c) =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
authenticated.get("/api/models/catalog/status", (c) => {
|
|
75
|
+
const readiness = getXopcCloudCatalogCoordinator().snapshot();
|
|
76
|
+
return c.json({
|
|
77
|
+
ok: true,
|
|
78
|
+
payload: {
|
|
79
|
+
...catalogSync.getStatus(),
|
|
80
|
+
hydratedFromDisk: readiness.source === "disk",
|
|
81
|
+
stale: readiness.state === "stale",
|
|
82
|
+
fetchedAt: readiness.fetchedAt,
|
|
83
|
+
catalogVersion: readiness.catalogVersion,
|
|
84
|
+
lastRefreshError: readiness.error
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
authenticated.get("/api/capabilities/readiness", async (c) => {
|
|
89
|
+
const auth = await getProviderAuthState("xopc-cloud");
|
|
90
|
+
const catalog = getXopcCloudCatalogCoordinator().snapshot();
|
|
91
|
+
const authorized = auth.authStatus === "connected";
|
|
92
|
+
const capabilities = buildCapabilityPlansForConfig(service.currentConfig, { providerReady: (providerId) => providerId === "xopc-cloud" ? authorized : isProviderConfiguredSync(providerId) });
|
|
93
|
+
const issues = [
|
|
94
|
+
...auth.authStatus === "not_connected" ? [{
|
|
95
|
+
code: "oauth_not_connected",
|
|
96
|
+
capability: null
|
|
97
|
+
}] : [],
|
|
98
|
+
...auth.authStatus === "expired" ? [{
|
|
99
|
+
code: "oauth_expired_refresh_failed",
|
|
100
|
+
capability: null
|
|
101
|
+
}] : [],
|
|
102
|
+
...catalog.state === "unavailable" ? [{
|
|
103
|
+
code: "catalog_never_loaded",
|
|
104
|
+
capability: null
|
|
105
|
+
}] : [],
|
|
106
|
+
...catalog.state === "stale" ? [{
|
|
107
|
+
code: "catalog_stale",
|
|
108
|
+
capability: null
|
|
109
|
+
}] : [],
|
|
110
|
+
...Object.values(capabilities).filter((plan) => authorized && catalog.modelCount > 0 && plan.status === "unavailable").map((plan) => ({
|
|
111
|
+
code: "capability_not_published",
|
|
112
|
+
capability: plan.capability
|
|
113
|
+
}))
|
|
114
|
+
];
|
|
115
|
+
return c.json({
|
|
116
|
+
ok: true,
|
|
117
|
+
payload: {
|
|
118
|
+
provider: {
|
|
119
|
+
id: "xopc-cloud",
|
|
120
|
+
authorized,
|
|
121
|
+
authStatus: auth.authStatus,
|
|
122
|
+
catalog
|
|
123
|
+
},
|
|
124
|
+
capabilities,
|
|
125
|
+
issues
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
75
129
|
authenticated.get("/api/models/catalog", async (c) => {
|
|
76
130
|
const catalog = getModelCatalogStore().load();
|
|
77
131
|
const sessionConfigs = await new SessionConfigStore("").getAll();
|
|
@@ -8,8 +8,8 @@ import { resolveShareUrl, resolveSiteShareUrl } from "../../../share/share-url.j
|
|
|
8
8
|
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
9
9
|
import { audienceDefaults, cleanupStagedSite, decideShareKind, forgetStagedSite, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../../share/share-auto.js";
|
|
10
10
|
import { deleteThumbnail, placeholderSvg, readThumbnail, scheduleThumbnail, thumbnailContentType, thumbnailExists } from "../../../share/share-thumbnail.js";
|
|
11
|
-
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
12
11
|
import { extractToken } from "../../auth.js";
|
|
12
|
+
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
13
13
|
import { renderFolderLandingPage, renderShareExpiredPage, renderShareLandingPage } from "../../../share/share-landing.js";
|
|
14
14
|
import { consumeSharePublicLimit } from "../../../share/share-rate-limit.js";
|
|
15
15
|
import { createZipStream, planDirectoryFiles } from "../../../share/share-zip.js";
|
|
@@ -2,18 +2,18 @@ import { init_public_url, validatePublicUrl } from "../../../config/public-url.j
|
|
|
2
2
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
3
3
|
import { loadTunnelState } from "../../../tunnel/tunnel-state.js";
|
|
4
4
|
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
5
|
+
import { extractToken } from "../../auth.js";
|
|
5
6
|
import { TUNNEL_CONSENT_REQUIRED_CODE, TunnelConsentError, assertTunnelMayStart, getTunnelConsentState } from "../../../tunnel/consent.js";
|
|
6
7
|
import { getTunnelRegistrationSecretMeta, readTunnelRegistrationSecretFromConfigOnly, resolveTunnelBrokerUrl } from "../../../tunnel/env.js";
|
|
7
|
-
import { applyTunnelConsentToConfig, setTunnelEnabledInConfig } from "../../../tunnel/tunnel-config.js";
|
|
8
8
|
import { createPairingSecret, exchangePairingSecretOnce, getCachedPairingExchange } from "../../../tunnel/pairing.js";
|
|
9
9
|
import { logTunnelAudit } from "../../../tunnel/tunnel-audit.js";
|
|
10
10
|
import { getTunnelService, hashGatewayToken } from "../../../tunnel/tunnel-service.js";
|
|
11
11
|
import { configureTunnelFromGatewayConfig } from "../../../tunnel/gateway-lifecycle.js";
|
|
12
|
+
import { applyTunnelConsentToConfig, setTunnelEnabledInConfig } from "../../../tunnel/tunnel-config.js";
|
|
12
13
|
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
14
|
+
import { applyLanPairingGatewayPatch } from "../../../tunnel/enable-lan-pairing.js";
|
|
13
15
|
import { consumeTunnelMutationLimit } from "../../../tunnel/tunnel-rate-limit.js";
|
|
14
16
|
import "../../../tunnel/index.js";
|
|
15
|
-
import { extractToken } from "../../auth.js";
|
|
16
|
-
import { applyLanPairingGatewayPatch } from "../../../tunnel/enable-lan-pairing.js";
|
|
17
17
|
import { buildMobileConnectUrlOrder, resolveMobilePairLanUrl, validateMobilePairBaseUrl } from "../../../tunnel/pair-url.js";
|
|
18
18
|
import { buildMobilePairContext } from "../../../tunnel/pair-context.js";
|
|
19
19
|
import { consumePairingExchangeFailLimit } from "../../../tunnel/pairing-rate-limit.js";
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { deleteUnderstanding, listUnderstandingEvidence, listUnderstandings } from "../../../storage/sqlite/user-context-repository.js";
|
|
2
2
|
import { getConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
4
5
|
import { deleteUserFocus, getUnderstandingSourceGrant, listUnderstandingSourceGrants, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus } from "../../../user-context/sources/repository.js";
|
|
6
|
+
import { listConnectedContentCandidates, readConnectedContent } from "../../../connectors/content-enrichment.js";
|
|
5
7
|
import { getWorkDiscoveryService } from "./work-discovery.js";
|
|
6
8
|
import { listUnderstandingSourceDefinitions } from "../../../user-context/sources/catalog.js";
|
|
7
9
|
//#region src/gateway/hono/routes/understanding-sources.ts
|
|
10
|
+
init_agent_scope();
|
|
8
11
|
function stringField(body, field) {
|
|
9
12
|
if (!body || typeof body !== "object") return "";
|
|
10
13
|
const value = body[field];
|
|
@@ -39,6 +42,32 @@ function registerUnderstandingSourceRoutes(authenticated, deps) {
|
|
|
39
42
|
ok: true,
|
|
40
43
|
grants: listUnderstandingSourceGrants({ includeRevoked: c.req.query("includeRevoked") === "true" })
|
|
41
44
|
}));
|
|
45
|
+
authenticated.get("/api/understanding/sources/content-candidates", (c) => {
|
|
46
|
+
const agentId = resolveDefaultAgentId(deps.service.currentConfig);
|
|
47
|
+
return c.json({
|
|
48
|
+
ok: true,
|
|
49
|
+
candidates: listConnectedContentCandidates({ agentId })
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
authenticated.post("/api/understanding/sources/content-reads", limited, async (c) => {
|
|
53
|
+
const body = await c.req.json().catch(() => null);
|
|
54
|
+
const sourceItemIds = body && typeof body === "object" && Array.isArray(body.sourceItemIds) ? body.sourceItemIds.filter((value) => typeof value === "string") : [];
|
|
55
|
+
try {
|
|
56
|
+
const agentId = resolveDefaultAgentId(deps.service.currentConfig);
|
|
57
|
+
return c.json({
|
|
58
|
+
ok: true,
|
|
59
|
+
result: await readConnectedContent({
|
|
60
|
+
sourceItemIds,
|
|
61
|
+
agentId
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
} catch (error) {
|
|
65
|
+
return c.json({
|
|
66
|
+
ok: false,
|
|
67
|
+
error: error instanceof Error ? error.message : String(error)
|
|
68
|
+
}, 400);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
42
71
|
authenticated.delete("/api/understanding/sources/grants/:grantId", limited, (c) => {
|
|
43
72
|
const current = getUnderstandingSourceGrant(c.req.param("grantId"));
|
|
44
73
|
const accountId = typeof current?.config.accountId === "string" ? current.config.accountId : void 0;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voice routes — POST /api/voice/transcriptions (multipart)
|
|
3
|
-
* POST /api/voice/transcribe (JSON/base64).
|
|
2
|
+
* Voice routes — POST /api/voice/transcriptions (multipart).
|
|
4
3
|
*
|
|
5
4
|
* The endpoints share one execution path that:
|
|
6
5
|
* 1. Runs the configured STT provider and fallback chain
|
|
@@ -6,7 +6,7 @@ import { speak } from "../../../voice/tts/speak-core.js";
|
|
|
6
6
|
import { mergeTtsConfigFromAppConfig } from "../../../voice/tts/merge-config.js";
|
|
7
7
|
import { getLocalVoiceRuntimeClient } from "../../../voice/local/runtime-client.js";
|
|
8
8
|
import { resolveSttProviderConfigSlice } from "../../../voice/stt/config-slice.js";
|
|
9
|
-
import { transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
9
|
+
import { STTTranscriptionError, transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
10
10
|
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
11
11
|
import { mergeSttConfigFromAppConfig } from "../../../voice/stt/config.js";
|
|
12
12
|
import "../../../voice/stt/index.js";
|
|
@@ -497,6 +497,7 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
497
497
|
...detectedLanguage ? { language: detectedLanguage } : {},
|
|
498
498
|
provider: result.provider,
|
|
499
499
|
attempts: result.attempts,
|
|
500
|
+
...result.duration !== void 0 ? { durationSeconds: result.duration } : {},
|
|
500
501
|
latencyMs: Date.now() - startedAt
|
|
501
502
|
}
|
|
502
503
|
});
|
|
@@ -507,9 +508,22 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
507
508
|
mimeType: input.mimeType,
|
|
508
509
|
fileName: input.fileName
|
|
509
510
|
}, `Voice transcription failed: ${msg}`);
|
|
511
|
+
if (error instanceof STTTranscriptionError) {
|
|
512
|
+
const status = error.reasonCode === "unsupported_format" ? 415 : error.reasonCode === "timeout" ? 504 : 502;
|
|
513
|
+
return c.json({
|
|
514
|
+
ok: false,
|
|
515
|
+
error: {
|
|
516
|
+
code: error.reasonCode,
|
|
517
|
+
message: `Transcription failed: ${msg}`
|
|
518
|
+
}
|
|
519
|
+
}, status);
|
|
520
|
+
}
|
|
510
521
|
return c.json({
|
|
511
522
|
ok: false,
|
|
512
|
-
error: {
|
|
523
|
+
error: {
|
|
524
|
+
code: "provider_error",
|
|
525
|
+
message: `Transcription failed: ${msg}`
|
|
526
|
+
}
|
|
513
527
|
}, 502);
|
|
514
528
|
}
|
|
515
529
|
};
|
|
@@ -544,39 +558,6 @@ function registerVoiceRoutes(authenticated, deps) {
|
|
|
544
558
|
...language ? { language } : {}
|
|
545
559
|
});
|
|
546
560
|
});
|
|
547
|
-
/** Legacy JSON/base64 endpoint retained for mobile and external clients. */
|
|
548
|
-
authenticated.post("/api/voice/transcribe", strictRateLimitMiddleware, async (c) => {
|
|
549
|
-
let body = {};
|
|
550
|
-
try {
|
|
551
|
-
body = await c.req.json();
|
|
552
|
-
} catch {
|
|
553
|
-
return c.json({
|
|
554
|
-
ok: false,
|
|
555
|
-
error: { message: "Invalid JSON body" }
|
|
556
|
-
}, 400);
|
|
557
|
-
}
|
|
558
|
-
if (typeof body.audio !== "string" || !body.audio.trim()) return c.json({
|
|
559
|
-
ok: false,
|
|
560
|
-
error: { message: "Missing required field: audio (base64)" }
|
|
561
|
-
}, 400);
|
|
562
|
-
if (typeof body.mimeType !== "string" || !body.mimeType.trim()) return c.json({
|
|
563
|
-
ok: false,
|
|
564
|
-
error: { message: "Missing required field: mimeType" }
|
|
565
|
-
}, 400);
|
|
566
|
-
const encoded = body.audio.replace(/\s/g, "");
|
|
567
|
-
if (encoded.length % 4 === 1 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) return c.json({
|
|
568
|
-
ok: false,
|
|
569
|
-
error: { message: "Invalid base64 audio data" }
|
|
570
|
-
}, 400);
|
|
571
|
-
const language = typeof body.language === "string" && body.language.trim() ? body.language.trim() : void 0;
|
|
572
|
-
const fileName = typeof body.fileName === "string" && body.fileName.trim() ? body.fileName.trim() : `audio-${Date.now()}`;
|
|
573
|
-
return runTranscription(c, {
|
|
574
|
-
audioBuffer: Buffer.from(encoded, "base64"),
|
|
575
|
-
mimeType: body.mimeType.trim(),
|
|
576
|
-
fileName,
|
|
577
|
-
...language ? { language } : {}
|
|
578
|
-
});
|
|
579
|
-
});
|
|
580
561
|
}
|
|
581
562
|
//#endregion
|
|
582
563
|
export { registerVoiceRoutes };
|
|
@@ -10,10 +10,39 @@ import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-se
|
|
|
10
10
|
import { WorkflowDraftConflictError, WorkflowDraftStore } from "../../../workflows/authoring/workflow-draft-store.js";
|
|
11
11
|
import "../../../workflows/authoring/index.js";
|
|
12
12
|
import "../../../workflows/draft/index.js";
|
|
13
|
+
import { ProjectWorkflowPresetRepository } from "../../../workflows/project-presets/project-workflow-preset-repository.js";
|
|
13
14
|
import { basename, join } from "node:path";
|
|
14
15
|
import { readFile, stat } from "node:fs/promises";
|
|
15
16
|
//#region src/gateway/hono/routes/workflows.ts
|
|
16
17
|
init_agent_scope();
|
|
18
|
+
const WORKFLOW_CONTEXT_KINDS = new Set([
|
|
19
|
+
"project",
|
|
20
|
+
"task",
|
|
21
|
+
"note",
|
|
22
|
+
"session",
|
|
23
|
+
"attachment",
|
|
24
|
+
"memory"
|
|
25
|
+
]);
|
|
26
|
+
function parseWorkflowContextRefs(value) {
|
|
27
|
+
if (value === void 0) return void 0;
|
|
28
|
+
if (!Array.isArray(value) || value.length > 50) throw new Error("contextRefs must be an array with at most 50 items");
|
|
29
|
+
return value.map((candidate) => {
|
|
30
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) throw new Error("Invalid workflow context reference");
|
|
31
|
+
const ref = candidate;
|
|
32
|
+
const kind = typeof ref.kind === "string" ? ref.kind : "";
|
|
33
|
+
const id = typeof ref.id === "string" ? ref.id.trim() : "";
|
|
34
|
+
if (!WORKFLOW_CONTEXT_KINDS.has(kind) || !id || id.length > 512) throw new Error("Invalid workflow context reference");
|
|
35
|
+
const role = typeof ref.role === "string" ? ref.role.trim() : void 0;
|
|
36
|
+
const title = typeof ref.title === "string" ? ref.title.trim() : void 0;
|
|
37
|
+
if ((role?.length ?? 0) > 64 || (title?.length ?? 0) > 256) throw new Error("Invalid workflow context reference");
|
|
38
|
+
return {
|
|
39
|
+
kind,
|
|
40
|
+
id,
|
|
41
|
+
...role ? { role } : {},
|
|
42
|
+
...title ? { title } : {}
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
17
46
|
function registerWorkflowRoutes(authenticated, deps) {
|
|
18
47
|
const { service } = deps;
|
|
19
48
|
const workflowRunService = service.createWorkflowRunService();
|
|
@@ -38,6 +67,38 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
38
67
|
return c.json({ error: err instanceof Error ? err.message : "Workflow definition not found" }, 404);
|
|
39
68
|
}
|
|
40
69
|
});
|
|
70
|
+
authenticated.get("/api/workflows/project-presets", (c) => {
|
|
71
|
+
const projectId = c.req.query("projectId")?.trim();
|
|
72
|
+
if (!projectId) return c.json({ error: "projectId is required" }, 400);
|
|
73
|
+
if (!service.projects.get(projectId)) return c.json({ error: "Project not found" }, 404);
|
|
74
|
+
return c.json({ presets: new ProjectWorkflowPresetRepository().list(projectId) });
|
|
75
|
+
});
|
|
76
|
+
authenticated.put("/api/workflows/project-presets/:definitionId", async (c) => {
|
|
77
|
+
const definitionId = c.req.param("definitionId").trim();
|
|
78
|
+
const body = await readJsonBody(c.req.raw);
|
|
79
|
+
const projectId = body.projectId?.trim();
|
|
80
|
+
if (!projectId) return c.json({ error: "projectId is required" }, 400);
|
|
81
|
+
if (!service.projects.get(projectId)) return c.json({ error: "Project not found" }, 404);
|
|
82
|
+
try {
|
|
83
|
+
createWorkflowCatalog().load(definitionId);
|
|
84
|
+
const contextRefs = parseWorkflowContextRefs(body.contextRefs) ?? [];
|
|
85
|
+
if (contextRefs.some((ref) => ref.kind !== "task" && ref.kind !== "note")) return c.json({ error: "Project workflow presets support task and note context only" }, 400);
|
|
86
|
+
const preset = new ProjectWorkflowPresetRepository().save({
|
|
87
|
+
projectId,
|
|
88
|
+
definitionId,
|
|
89
|
+
contextRefs
|
|
90
|
+
});
|
|
91
|
+
return c.json({ preset });
|
|
92
|
+
} catch (cause) {
|
|
93
|
+
return c.json({ error: cause instanceof Error ? cause.message : "Could not save project workflow" }, 400);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
authenticated.delete("/api/workflows/project-presets/:definitionId", (c) => {
|
|
97
|
+
const projectId = c.req.query("projectId")?.trim();
|
|
98
|
+
if (!projectId) return c.json({ error: "projectId is required" }, 400);
|
|
99
|
+
const removed = new ProjectWorkflowPresetRepository().remove(projectId, c.req.param("definitionId"));
|
|
100
|
+
return c.json({ removed });
|
|
101
|
+
});
|
|
41
102
|
authenticated.post("/api/workflows/definitions/validate", async (c) => {
|
|
42
103
|
const body = await readJsonBody(c.req.raw);
|
|
43
104
|
const result = validateWorkflowDefinitionInput({
|
|
@@ -206,6 +267,7 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
206
267
|
const catalog = createWorkflowCatalog();
|
|
207
268
|
try {
|
|
208
269
|
if (!catalog.remove(id)) return c.json({ error: "User workflow not found or cannot delete built-in workflow" }, 404);
|
|
270
|
+
new ProjectWorkflowPresetRepository().removeDefinition(id);
|
|
209
271
|
const drafts = new WorkflowDraftStore().list(id);
|
|
210
272
|
for (const draft of drafts) new WorkflowDraftStore().remove(draft.id);
|
|
211
273
|
return c.json({ removed: true });
|
|
@@ -228,6 +290,12 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
228
290
|
const taskRunId = body.taskRunId?.trim();
|
|
229
291
|
const projectId = body.projectId?.trim();
|
|
230
292
|
if (projectId && !service.projects.get(projectId)) return c.json({ error: "Project not found" }, 404);
|
|
293
|
+
let contextRefs;
|
|
294
|
+
try {
|
|
295
|
+
contextRefs = parseWorkflowContextRefs(body.contextRefs);
|
|
296
|
+
} catch (cause) {
|
|
297
|
+
return c.json({ error: cause instanceof Error ? cause.message : "Invalid workflow context references" }, 400);
|
|
298
|
+
}
|
|
231
299
|
const explicitAgentId = body.agentId ?? c.req.query("agentId");
|
|
232
300
|
const agentId = projectId ? resolveProjectAgentId({
|
|
233
301
|
config: service.currentConfig,
|
|
@@ -240,6 +308,7 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
240
308
|
definitionId,
|
|
241
309
|
taskRunId,
|
|
242
310
|
projectId,
|
|
311
|
+
contextRefs,
|
|
243
312
|
input: body.inputEnvelope ? void 0 : body.input,
|
|
244
313
|
inputEnvelope: body.inputEnvelope,
|
|
245
314
|
goal: body.goal,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { buildDefaultCorsOrigins, isAllInterfacesHost, isLoopbackHost, resolveEffectiveGatewayPort, resolveGatewayServiceListenPort } from "./host.js";
|
|
2
2
|
import { defaultGatewayBindMode, isContainerEnvironment, resolveGatewayBindHost, resolveGatewayBindHostSync, resolveGatewayBindMode, resolveGatewayEffectiveHost } from "../config/gateway-bind.js";
|
|
3
|
+
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
4
|
+
import { resolveGatewayListenHost, resolveGatewayListenPlan } from "./listen.js";
|
|
3
5
|
import { buckets } from "./rate-limit/buckets.js";
|
|
4
6
|
import { isGatewayStrictSecurityEnabled } from "./rate-limit/env-flags.js";
|
|
5
7
|
import "./rate-limit/index.js";
|
|
6
|
-
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
7
|
-
import { resolveGatewayListenHost, resolveGatewayListenPlan } from "./listen.js";
|
|
8
8
|
import { assertGatewayRuntimeConfig } from "./runtime-config.js";
|
|
9
9
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
10
10
|
import { GatewayService } from "./service.js";
|
|
@@ -36,6 +36,7 @@ declare class BucketRegistry {
|
|
|
36
36
|
private authFailureSignature?;
|
|
37
37
|
private strictApiLimiter?;
|
|
38
38
|
private chatApiLimiter?;
|
|
39
|
+
private mediaApiLimiter?;
|
|
39
40
|
private taskApiLimiter?;
|
|
40
41
|
private xopcCloudPollLimiter?;
|
|
41
42
|
private channelApiLimiter?;
|
|
@@ -53,6 +54,8 @@ declare class BucketRegistry {
|
|
|
53
54
|
strictApi(): RateLimiter;
|
|
54
55
|
/** Interactive chat actions — 180 req / 60 s per client IP. */
|
|
55
56
|
chatApi(): RateLimiter;
|
|
57
|
+
/** Durable media chunk uploads — 300 req / 60 s per client IP. */
|
|
58
|
+
mediaApi(): RateLimiter;
|
|
56
59
|
/** Interactive task and board mutations — 300 req / 60 s per client IP. */
|
|
57
60
|
taskApi(): RateLimiter;
|
|
58
61
|
/** XOPC Cloud authorization polling — 60 req / 60 s per client IP. */
|
|
@@ -48,6 +48,7 @@ var BucketRegistry = class {
|
|
|
48
48
|
authFailureSignature;
|
|
49
49
|
strictApiLimiter;
|
|
50
50
|
chatApiLimiter;
|
|
51
|
+
mediaApiLimiter;
|
|
51
52
|
taskApiLimiter;
|
|
52
53
|
xopcCloudPollLimiter;
|
|
53
54
|
channelApiLimiter;
|
|
@@ -90,6 +91,14 @@ var BucketRegistry = class {
|
|
|
90
91
|
});
|
|
91
92
|
return this.chatApiLimiter;
|
|
92
93
|
}
|
|
94
|
+
/** Durable media chunk uploads — 300 req / 60 s per client IP. */
|
|
95
|
+
mediaApi() {
|
|
96
|
+
if (!this.mediaApiLimiter) this.mediaApiLimiter = new RateLimiter({
|
|
97
|
+
maxRequests: 300,
|
|
98
|
+
windowMs: 6e4
|
|
99
|
+
});
|
|
100
|
+
return this.mediaApiLimiter;
|
|
101
|
+
}
|
|
93
102
|
/** Interactive task and board mutations — 300 req / 60 s per client IP. */
|
|
94
103
|
taskApi() {
|
|
95
104
|
if (!this.taskApiLimiter) this.taskApiLimiter = new RateLimiter({
|
|
@@ -151,6 +160,7 @@ var BucketRegistry = class {
|
|
|
151
160
|
this.authFailureLimiter?.destroy();
|
|
152
161
|
this.strictApiLimiter?.destroy();
|
|
153
162
|
this.chatApiLimiter?.destroy();
|
|
163
|
+
this.mediaApiLimiter?.destroy();
|
|
154
164
|
this.taskApiLimiter?.destroy();
|
|
155
165
|
this.xopcCloudPollLimiter?.destroy();
|
|
156
166
|
this.channelApiLimiter?.destroy();
|
|
@@ -161,6 +171,7 @@ var BucketRegistry = class {
|
|
|
161
171
|
this.authFailureLimiter = void 0;
|
|
162
172
|
this.strictApiLimiter = void 0;
|
|
163
173
|
this.chatApiLimiter = void 0;
|
|
174
|
+
this.mediaApiLimiter = void 0;
|
|
164
175
|
this.taskApiLimiter = void 0;
|
|
165
176
|
this.xopcCloudPollLimiter = void 0;
|
|
166
177
|
this.channelApiLimiter = void 0;
|
|
@@ -175,6 +186,7 @@ var BucketRegistry = class {
|
|
|
175
186
|
this.authFailureLimiter?.resetForTests();
|
|
176
187
|
this.strictApiLimiter?.resetForTests();
|
|
177
188
|
this.chatApiLimiter?.resetForTests();
|
|
189
|
+
this.mediaApiLimiter?.resetForTests();
|
|
178
190
|
this.taskApiLimiter?.resetForTests();
|
|
179
191
|
this.xopcCloudPollLimiter?.resetForTests();
|
|
180
192
|
this.channelApiLimiter?.resetForTests();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isAllInterfacesHost, isLoopbackHost, resolveGatewayCorsOrigins } from "./host.js";
|
|
2
|
-
import { isAuthRateLimitGloballyDisabled, isGatewayStrictSecurityEnabled } from "./rate-limit/env-flags.js";
|
|
3
|
-
import "./rate-limit/index.js";
|
|
4
2
|
import { resolveGatewayListenPlan } from "./listen.js";
|
|
5
3
|
import { assertTailscaleExposureCompatible } from "./tailscale-lifecycle.js";
|
|
4
|
+
import { isAuthRateLimitGloballyDisabled, isGatewayStrictSecurityEnabled } from "./rate-limit/env-flags.js";
|
|
5
|
+
import "./rate-limit/index.js";
|
|
6
6
|
//#region src/gateway/runtime-config.ts
|
|
7
7
|
function hasSharedSecret(auth) {
|
|
8
8
|
if (auth.mode === "trusted-proxy") return true;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { isAuthRateLimitGloballyDisabled, isGatewayStrictSecurityEnabled } from "../rate-limit/env-flags.js";
|
|
4
|
-
import "../rate-limit/index.js";
|
|
5
3
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../auth.js";
|
|
6
4
|
import { resolveGatewayListenPlan } from "../listen.js";
|
|
7
5
|
import { collectExposureConflicts, isRemoteGatewayInsecure, isTailnetBindUnavailable } from "../../remote-access/exposure-guards.js";
|
|
6
|
+
import { isAuthRateLimitGloballyDisabled, isGatewayStrictSecurityEnabled } from "../rate-limit/env-flags.js";
|
|
7
|
+
import "../rate-limit/index.js";
|
|
8
8
|
import { assertGatewayRuntimeConfig } from "../runtime-config.js";
|
|
9
9
|
//#region src/gateway/security/audit.ts
|
|
10
10
|
init_logger();
|
|
@@ -4,12 +4,12 @@ import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
|
4
4
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
5
5
|
import { init_providers } from "../../providers/index.js";
|
|
6
6
|
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
|
-
import { sanitizeTunnelConfig } from "../../tunnel/tunnel-config.js";
|
|
8
7
|
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
9
8
|
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
10
9
|
import { ConfigHotReloader } from "../../config/reload.js";
|
|
11
10
|
import "../../config/index.js";
|
|
12
11
|
import { computeBundledExtensionExtensionsPatch } from "../../extensions/bundled-extension-activation.js";
|
|
12
|
+
import { sanitizeTunnelConfig } from "../../tunnel/tunnel-config.js";
|
|
13
13
|
//#region src/gateway/service/config-coordinator.ts
|
|
14
14
|
init_providers();
|
|
15
15
|
init_logger();
|
|
@@ -90,12 +90,11 @@ var SessionInputCoordinator = class {
|
|
|
90
90
|
remaining: [...result.remainingMessages, replacement]
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
const state = this.publish(sessionKey);
|
|
94
93
|
this.drain(sessionKey);
|
|
95
94
|
return {
|
|
96
95
|
ok: true,
|
|
97
96
|
effectiveDelivery: "next",
|
|
98
|
-
state
|
|
97
|
+
state: this.publish(sessionKey)
|
|
99
98
|
};
|
|
100
99
|
});
|
|
101
100
|
}
|
|
@@ -67,6 +67,7 @@ export declare class GatewayService {
|
|
|
67
67
|
private workflowRunServiceInstance;
|
|
68
68
|
private taskRunDispatcher;
|
|
69
69
|
private taskRunDispatchTimer;
|
|
70
|
+
private managedComposioEventPoller?;
|
|
70
71
|
private mobileNotifications;
|
|
71
72
|
private connectorSupervisor;
|
|
72
73
|
private connectorLearningCoordinator;
|