@xopcai/xopc 0.0.231 → 0.0.233
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/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/schema/config-schema.d.ts +3 -3
- package/dist/extensions/telegram/src/config-schema.d.ts +4 -4
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/config-schema.d.ts +3 -3
- package/dist/gateway/static/root/assets/{activity-store-M0nAY5XB.js → activity-store-DQ5L3PTi.js} +1 -1
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-Bps8fvBp.js +1 -0
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-JrK80PvP.js +1 -0
- package/dist/gateway/static/root/assets/agents-CJYEnz94.js +1 -0
- package/dist/gateway/static/root/assets/api-DE6tZKG0.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DP7YVRPn.js → app-management-settings-panel-BryzDVod.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CVQ5n7y6.js → appearance-settings-BoweLBDm.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Bt8_sWtU.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-7_DXaMTP.js → archive-plugin-DyujzZNu.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-mmr_mHRr.js → attachment-load-DmXGUWve.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-BDTD8YUe.js +12 -0
- package/dist/gateway/static/root/assets/{automations-page-DfY-T6Ga.js → automations-page-DrTVSK7o.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-86UTesz3.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CO9QMEh2.js → binary-plugins-mFyeC74W.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-CE14CVOy.js → block-editor-D5yMFrgH.js} +4 -4
- package/dist/gateway/static/root/assets/browser-settings-page-DfMU7yXv.js +8 -0
- package/dist/gateway/static/root/assets/browser-workflow-inputs-B6rLBtua.js +1 -0
- package/dist/gateway/static/root/assets/{browser-workflows-page-1wgXyoSO.js → browser-workflows-page-C74sg50f.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-lsHRuBlX.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CxR_clkO.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-C5ABr73b.js → channels-status-swr-DowVNjNw.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CdRW6Euc.js → chat-terminal-dock-BO6_BgjE.js} +2 -2
- package/dist/gateway/static/root/assets/{code-editor-dFzqyDXS.js → code-editor-D4_k-6QN.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CpNLyKB4.js +2 -0
- package/dist/gateway/static/root/assets/cron-expression-CYMXfk4M.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-DIM_OkQP.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-Cp8I6rsL.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-MmOR4A3u.js → desktop-pet-settings-NjPiz3M_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CMO-J3cG.js → desktop-pet-wzSzZ6S8.js} +1 -1
- package/dist/gateway/static/root/assets/dist-DqPZM2MH2.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DdH0dG2_.js → extension-debug-page-CoMl13ET.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Clg-KktN.js → extension-page-CXc1Lc8x.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CfEWpgjl.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-DEHnF4Wm.js → gateway-config-api-yH4KAEkK.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-YyZJKvFf.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-DKkEXXj9.js → gateway-settings-BmjJIiKh.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B_zrtccP.js → gateway-startup-retry-Dnrl91pU.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DGq9q4b6.js +1 -0
- package/dist/gateway/static/root/assets/home-page-Dj4B1wb3.js +1 -0
- package/dist/gateway/static/root/assets/html-workspace-editor-C3DKAkMc.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-YKP2me5Z.js → image-generation-api-BNzAAw4Y.js} +1 -1
- package/dist/gateway/static/root/assets/index-BGf-TiZj.js +70 -0
- package/dist/gateway/static/root/assets/index-BTUuTnc9.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BvpEeHnm.js → keyboard-shortcuts-settings-CfNV1ysF.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-IJg75WaN.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Bzvn99eH.js → local-apps-page-MPd4Fl_l.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-D_dq_0LV.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-NsfoazgK.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-DeIjN4e0.js +1 -0
- package/dist/gateway/static/root/assets/markdown-editor-nDLmA_LF.js +2 -0
- package/dist/gateway/static/root/assets/markdown-split-BUAVv6Gu.js +1 -0
- package/dist/gateway/static/root/assets/markdown-view-CPkBOY3h.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-D8I7OGnT.js → media-plugins-DFsVnOY-.js} +1 -1
- package/dist/gateway/static/root/assets/messages-D4qOHT4D.js +3 -0
- package/dist/gateway/static/root/assets/mobile-device-api-D9JevyCE.js +1 -0
- package/dist/gateway/static/root/assets/models-hub-cache-C5y2gzMU.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-EpgG-OQc.js → notes-api-BWSfTP1w.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CCvjGMhN.js → notes-page-CV8UJj7g.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DrjMVgEI.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-BwNLwbI8.js → oauth-api-DnanEBsf.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-3E24E65N.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-MmMswmOU.js → product-open-page-zNg1KOy2.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-tfcGYL-O.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BkjnXLdJ.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-BFZrVYfy.js → registry-api-BeVzfRvs.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BXn-3n2d.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Dx6o7sLu.js → runtime-tools-settings-panel-BxoioSvT.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-Cdd9c4vt.js → schema-form-vzbmscrE.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-MLNjrOkw.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-ByNLBY2q.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D0YxMnhm.js → settings-form-section-x9k7MWD3.js} +1 -1
- package/dist/gateway/static/root/assets/settings-loading-skeleton-BLFOD9h9.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-CwgTooar.js +1 -0
- package/dist/gateway/static/root/assets/settings-shell-layer-context-DCp6ykjQ.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-bnueBZg8.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DiqBn-oE.js → share-preview-page-COTrPAd-.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-D-v_psqL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DJICr4wh.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CZwhWiRl.js → skills-page-D9wM6_Jn.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-kBGr8opZ.js → skills-page.utils-PtlQLM5a.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CPBs6lWi.js → system-settings-panel-BR74mNEK.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-B-rmeE8t.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-Qgvo0Ga7.js → theme-store-Bud54q9e.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C4YcEiP9.js → use-autosave-DH47MH7s.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-B6eyxxOT.js +1 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror-DRr7hFaD.js → vendor-codemirror--gTq3YAI.js} +16 -16
- package/dist/gateway/static/root/assets/voice-api-key-field-B59GaqRa.js +1 -0
- package/dist/gateway/static/root/assets/voice-config-api-C0ahrZ0e.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CKIdPEen.js → work-discovery-overlay-DTn4RCcx.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BK44Vm5W.js → workflow-run-setup-panel-yDFoEX06.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BOwSbfWm.js +5 -0
- package/dist/gateway/static/root/index.html +16 -16
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +162 -2
- package/dist/packages/gateway-contract/src/product-delivery.js +6 -2
- package/dist/packages/gateway-contract/src/turn-outcome.js +77 -1
- package/dist/src/agent/agent-manager.d.ts +1 -2
- package/dist/src/agent/agent-manager.js +29 -44
- package/dist/src/agent/background-review/run-background-review.js +10 -15
- package/dist/src/agent/capabilities/definitions.d.ts +1 -1
- package/dist/src/agent/capabilities/definitions.js +2 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +5 -1
- package/dist/src/agent/external-tools/mcp-provider.js +3 -13
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +13 -14
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +0 -9
- package/dist/src/agent/mcp/bundle-mcp-policy.js +1 -13
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/media-generation/runtime-shared.d.ts +1 -1
- package/dist/src/agent/media-generation/runtime-shared.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent/memory/manager.d.ts +1 -1
- package/dist/src/{agent-runtime/memory-runtime.d.ts → agent/memory/runtime.d.ts} +1 -1
- package/dist/src/{agent-runtime/memory-runtime.js → agent/memory/runtime.js} +2 -3
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +0 -3
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -3
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +2 -2
- package/dist/src/agent/prompt/sections/tooling.js +5 -0
- package/dist/src/agent/service.js +0 -1
- package/dist/src/agent/starter-agents.js +1 -8
- package/dist/src/agent/tools/create-share-tool.js +2 -1
- package/dist/src/agent/tools/exec-command.js +2 -1
- package/dist/src/agent/tools/executor.d.ts +1 -1
- package/dist/src/agent/tools/factory.js +2 -0
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/publish-artifacts.d.ts +2 -0
- package/dist/src/agent/tools/publish-artifacts.js +82 -0
- package/dist/src/agent/tools/send-media.js +2 -1
- package/dist/src/agent/tools/workflow-tool.js +1 -5
- package/dist/src/agent-config/index.d.ts +2 -0
- package/dist/src/agent-config/index.js +11 -0
- package/dist/src/agent-config/resolver.d.ts +11 -0
- package/dist/src/agent-config/resolver.js +113 -0
- package/dist/src/agent-config/schema.d.ts +491 -0
- package/dist/src/agent-config/schema.js +172 -0
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- package/dist/src/cli/command-catalog.js +4 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/agents.js +2 -1
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +12 -4
- package/dist/src/cli/commands/image.js +3 -4
- package/dist/src/cli/commands/models.js +9 -3
- package/dist/src/cli/commands/onboard/model.js +13 -12
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/providers.js +1 -1
- package/dist/src/cli/commands/support.d.ts +1 -0
- package/dist/src/cli/commands/support.js +51 -0
- package/dist/src/cli/commands/tunnel.js +3 -18
- package/dist/src/cli/utils/init-workspace-core.d.ts +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/commands/agents.config.d.ts +1 -3
- package/dist/src/commands/agents.config.js +9 -26
- package/dist/src/config/agent-model-intents.d.ts +10 -0
- package/dist/src/config/agent-model-intents.js +39 -0
- package/dist/src/config/agent-profile.d.ts +7 -9
- package/dist/src/config/agent-profile.js +30 -28
- package/dist/src/config/default-model.d.ts +1 -11
- package/dist/src/config/default-model.js +3 -11
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/integration.d.ts +1 -1
- package/dist/src/config/reload.js +1 -1
- package/dist/src/config/rules.js +3 -3
- package/dist/src/config/schema.d.ts +187 -452
- package/dist/src/config/schema.js +53 -131
- package/dist/src/endpoint-tools/binding-service.d.ts +22 -0
- package/dist/src/endpoint-tools/binding-service.js +45 -0
- package/dist/src/endpoint-tools/index.d.ts +1 -0
- package/dist/src/endpoint-tools/index.js +2 -1
- package/dist/src/endpoint-tools/invocation-service.d.ts +1 -0
- package/dist/src/endpoint-tools/invocation-service.js +8 -0
- package/dist/src/endpoint-tools/policy.d.ts +4 -1
- package/dist/src/endpoint-tools/policy.js +68 -5
- package/dist/src/endpoint-tools/registry.js +1 -1
- package/dist/src/endpoint-tools/runtime.d.ts +2 -0
- package/dist/src/endpoint-tools/runtime.js +8 -0
- package/dist/src/extensions/activation-context.js +7 -11
- package/dist/src/files/file-service.js +14 -5
- package/dist/src/gateway/agent-builtin-tools.d.ts +250 -6
- package/dist/src/gateway/agent-builtin-tools.js +284 -46
- package/dist/src/gateway/agents-admin.d.ts +20 -62
- package/dist/src/gateway/agents-admin.js +36 -228
- package/dist/src/gateway/chat-stream/turn-outcome-collector.js +41 -6
- package/dist/src/gateway/device-routes.d.ts +3 -0
- package/dist/src/gateway/device-routes.js +47 -0
- package/dist/src/gateway/global-defaults-admin.d.ts +6 -20
- package/dist/src/gateway/global-defaults-admin.js +20 -120
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +4 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +54 -137
- package/dist/src/gateway/hono/lib/config-payload.js +2 -4
- package/dist/src/gateway/hono/middleware/auth.js +36 -3
- package/dist/src/gateway/hono/middleware/scopes.d.ts +2 -12
- package/dist/src/gateway/hono/middleware/scopes.js +9 -18
- package/dist/src/gateway/hono/routes/agents.js +64 -100
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/device-push.d.ts +2 -0
- package/dist/src/gateway/hono/routes/{mobile.js → device-push.js} +40 -18
- package/dist/src/gateway/hono/routes/devices.d.ts +4 -0
- package/dist/src/gateway/hono/routes/devices.js +214 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +68 -1
- package/dist/src/gateway/hono/routes/files.js +12 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +5 -9
- package/dist/src/gateway/hono/routes/index.js +4 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +12 -20
- package/dist/src/gateway/hono/routes/media.js +46 -2
- package/dist/src/gateway/hono/routes/models.js +2 -2
- package/dist/src/gateway/hono/routes/realtime.js +8 -1
- package/dist/src/gateway/hono/routes/status.js +9 -16
- package/dist/src/gateway/hono/routes/support.d.ts +3 -0
- package/dist/src/gateway/hono/routes/support.js +28 -0
- package/dist/src/gateway/hono/routes/tunnel.d.ts +0 -2
- package/dist/src/gateway/hono/routes/tunnel.js +10 -199
- package/dist/src/gateway/hono/routes/you.js +24 -0
- package/dist/src/gateway/image-generation-setup.d.ts +2 -2
- package/dist/src/gateway/image-generation-setup.js +8 -7
- package/dist/src/gateway/public-url.d.ts +1 -1
- package/dist/src/gateway/security/gateway-principal.d.ts +11 -0
- package/dist/src/gateway/security/gateway-principal.js +12 -0
- package/dist/src/gateway/security/gateway-scopes.d.ts +7 -0
- package/dist/src/gateway/security/gateway-scopes.js +66 -0
- package/dist/src/gateway/security/index.d.ts +2 -1
- package/dist/src/gateway/security/index.js +3 -2
- package/dist/src/gateway/service.js +7 -7
- package/dist/src/gateway/xopc-cloud-capability-setup.js +19 -21
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/media/store.js +9 -0
- package/dist/src/migrations/index.d.ts +0 -1
- package/dist/src/migrations/index.js +1 -2
- package/dist/src/migrations/runner.js +1 -2
- package/dist/src/notifications/device-store.d.ts +1 -1
- package/dist/src/notifications/device-store.js +11 -11
- package/dist/src/notifications/store.js +3 -3
- package/dist/src/providers/index.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +14 -9
- package/dist/src/realtime/runtime.d.ts +2 -0
- package/dist/src/realtime/runtime.js +27 -3
- package/dist/src/realtime/tickets.d.ts +6 -1
- package/dist/src/realtime/tickets.js +2 -1
- package/dist/src/remote-access/exposure-manager.js +3 -3
- package/dist/src/share/share-url.js +2 -2
- package/dist/src/storage/sqlite/device-access-repository.d.ts +54 -0
- package/dist/src/storage/sqlite/device-access-repository.js +194 -0
- package/dist/src/storage/sqlite/device-pairing-repository.d.ts +22 -0
- package/dist/src/storage/sqlite/device-pairing-repository.js +86 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +32 -0
- package/dist/src/storage/sqlite/gateway-identity-repository.d.ts +10 -0
- package/dist/src/storage/sqlite/gateway-identity-repository.js +50 -0
- package/dist/src/storage/sqlite/index.d.ts +4 -0
- package/dist/src/storage/sqlite/index.js +5 -1
- package/dist/src/storage/sqlite/migrations/138_device_access.sql +96 -0
- package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +231 -0
- package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +8 -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/support/build-support-investigation-prompt.d.ts +2 -0
- package/dist/src/support/build-support-investigation-prompt.js +29 -0
- package/dist/src/support/collect-support-report.d.ts +16 -0
- package/dist/src/support/collect-support-report.js +216 -0
- package/dist/src/support/redact-support-report.d.ts +16 -0
- package/dist/src/support/redact-support-report.js +89 -0
- package/dist/src/support/types.d.ts +76 -0
- package/dist/src/support/types.js +18 -0
- package/dist/src/tunnel/consent.d.ts +1 -1
- package/dist/src/tunnel/consent.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/tunnel/index.d.ts +1 -4
- package/dist/src/tunnel/index.js +3 -5
- package/dist/src/tunnel/tunnel-audit.d.ts +1 -1
- package/dist/src/tunnel/tunnel-config.js +1 -1
- package/dist/src/tunnel/tunnel-service.d.ts +2 -3
- package/dist/src/tunnel/tunnel-service.js +1 -20
- package/dist/src/tunnel/tunnel-types.d.ts +0 -6
- package/dist/src/user-context/user-avatar.d.ts +17 -0
- package/dist/src/user-context/user-avatar.js +116 -0
- package/dist/src/workflows/draft/workflow-draft-service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +3 -3
- package/package.json +4 -4
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-CBqUnlvL.js +0 -1
- package/dist/gateway/static/root/assets/agents-7YO6znTT.js +0 -68
- package/dist/gateway/static/root/assets/api-BywYxpaS.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-DSCia0DT.js +0 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-Cmo-5BP5.js +0 -11
- package/dist/gateway/static/root/assets/automations-workspace-BpvD54D6.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CeESA4Oj.js +0 -8
- package/dist/gateway/static/root/assets/browser-workflow-inputs-8NC2qDRF.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B_OXTojB.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-o0y9WgAI.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D5nZecxV.js +0 -3
- package/dist/gateway/static/root/assets/channels-settings-BzmnWx6X.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-38FsOnR0.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DX6OkwFQ.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-DYSMZsms.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-DGCfX4tK.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-DHDa4ht1.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-B9qoxDcn.js +0 -1
- package/dist/gateway/static/root/assets/dist-J_ySZvz0.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-eP3fJ2M6.js +0 -1
- package/dist/gateway/static/root/assets/file-code-corner-byQA1VfD.js +0 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-BWGjnmDl.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DlBPNubY.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BnOrLRfs.js +0 -1
- package/dist/gateway/static/root/assets/html-workspace-editor-bXK5tq64.js +0 -1
- package/dist/gateway/static/root/assets/index-0xQO5B_Q.js +0 -70
- package/dist/gateway/static/root/assets/index-CCyIdGuQ.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-Ch1rdUo8.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-CXhjfe4q.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-zxx2ExlY.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BQaeyOYm.js +0 -1
- package/dist/gateway/static/root/assets/markdown-editor-TWGaF7Xa.js +0 -2
- package/dist/gateway/static/root/assets/markdown-split-D9tmIiEm.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-RxNHwlNo.js +0 -201
- package/dist/gateway/static/root/assets/messages-BMdD0LWk.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-0RjEwafI.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-9cgh77VH.js +0 -4
- package/dist/gateway/static/root/assets/popover-select-CccGri5Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-hf6pmH4p.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-By2U-Wdh.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CUcpp7CQ.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-ByI82xS1.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BCoI5IJ8.js +0 -1
- package/dist/gateway/static/root/assets/settings-loading-skeleton-y53gEKsF.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BoE_tToG.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BQmyb5KC.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bf3VpZ-R.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CXHlbuGS.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-Bo0KSZ2v.js +0 -1
- package/dist/gateway/static/root/assets/typed-models-lib-q5-Vfqd8.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Cnj7gMX2.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-BML8zCwZ.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-CB98MTwG.js +0 -5
- package/dist/src/agent-manifest/index.d.ts +0 -5
- package/dist/src/agent-manifest/index.js +0 -10
- package/dist/src/agent-manifest/preset-chain.d.ts +0 -10
- package/dist/src/agent-manifest/preset-chain.js +0 -30
- package/dist/src/agent-manifest/prompt.d.ts +0 -2
- package/dist/src/agent-manifest/prompt.js +0 -49
- package/dist/src/agent-manifest/resolver.d.ts +0 -32
- package/dist/src/agent-manifest/resolver.js +0 -114
- package/dist/src/agent-manifest/schema.d.ts +0 -695
- package/dist/src/agent-manifest/schema.js +0 -226
- package/dist/src/agent-manifest/validator.d.ts +0 -25
- package/dist/src/agent-manifest/validator.js +0 -74
- package/dist/src/agent-runtime/boundary-guard.d.ts +0 -12
- package/dist/src/agent-runtime/boundary-guard.js +0 -21
- package/dist/src/agent-runtime/index.d.ts +0 -7
- package/dist/src/agent-runtime/index.js +0 -8
- package/dist/src/agent-runtime/model-router.d.ts +0 -11
- package/dist/src/agent-runtime/model-router.js +0 -14
- package/dist/src/agent-runtime/run-trace.d.ts +0 -27
- package/dist/src/agent-runtime/run-trace.js +0 -51
- package/dist/src/agent-runtime/runtime-profile.d.ts +0 -26
- package/dist/src/agent-runtime/runtime-profile.js +0 -42
- package/dist/src/agent-runtime/tool-registry.d.ts +0 -28
- package/dist/src/agent-runtime/tool-registry.js +0 -50
- package/dist/src/agent-runtime/workflow-runtime.d.ts +0 -31
- package/dist/src/agent-runtime/workflow-runtime.js +0 -32
- package/dist/src/config/agent-typed-models.d.ts +0 -13
- package/dist/src/config/agent-typed-models.js +0 -48
- package/dist/src/gateway/capability-presets-admin.d.ts +0 -88
- package/dist/src/gateway/capability-presets-admin.js +0 -303
- package/dist/src/gateway/hono/lib/agent-model.d.ts +0 -35
- package/dist/src/gateway/hono/lib/agent-model.js +0 -97
- package/dist/src/gateway/hono/routes/capability-presets.d.ts +0 -3
- package/dist/src/gateway/hono/routes/capability-presets.js +0 -187
- package/dist/src/gateway/hono/routes/mobile.d.ts +0 -3
- package/dist/src/gateway/security/operator-scopes.d.ts +0 -37
- package/dist/src/gateway/security/operator-scopes.js +0 -147
- package/dist/src/migrations/config/default-capability-preset.d.ts +0 -10
- package/dist/src/migrations/config/default-capability-preset.js +0 -133
- package/dist/src/tunnel/enable-lan-pairing.d.ts +0 -8
- package/dist/src/tunnel/enable-lan-pairing.js +0 -41
- package/dist/src/tunnel/pair-context.d.ts +0 -36
- package/dist/src/tunnel/pair-context.js +0 -77
- package/dist/src/tunnel/pair-url.d.ts +0 -43
- package/dist/src/tunnel/pair-url.js +0 -117
- package/dist/src/tunnel/pairing-rate-limit.d.ts +0 -12
- package/dist/src/tunnel/pairing-rate-limit.js +0 -28
- package/dist/src/tunnel/pairing.d.ts +0 -21
- package/dist/src/tunnel/pairing.js +0 -103
- package/dist/src/tunnel/tunnel-qr.d.ts +0 -9
- package/dist/src/tunnel/tunnel-qr.js +0 -29
|
@@ -35,6 +35,10 @@ function errorResponse(c, error) {
|
|
|
35
35
|
if (error instanceof FileServiceError) return c.json({ error: { message: error.message } }, error.status);
|
|
36
36
|
throw error;
|
|
37
37
|
}
|
|
38
|
+
function contentDisposition(disposition, fileName) {
|
|
39
|
+
const sanitized = fileName.replace(/[\u0000-\u001f\u007f]/g, "_");
|
|
40
|
+
return `${disposition}; filename="${sanitized.replace(/[^\x20-\x7e]/g, "_").replace(/["\\]/g, "_")}"; filename*=UTF-8''${encodeURIComponent(sanitized).replace(/['()*]/g, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`)}`;
|
|
41
|
+
}
|
|
38
42
|
async function collectFiles(files, spaceId, query, max) {
|
|
39
43
|
const output = [];
|
|
40
44
|
const directories = [""];
|
|
@@ -115,6 +119,13 @@ function registerFilesRoutes(authenticated, deps) {
|
|
|
115
119
|
return errorResponse(c, error);
|
|
116
120
|
}
|
|
117
121
|
});
|
|
122
|
+
authenticated.get("/api/files/:id/host-path", async (c) => {
|
|
123
|
+
try {
|
|
124
|
+
return c.json({ absolutePath: (await files.resource(c.req.param("id"))).absolutePath });
|
|
125
|
+
} catch (error) {
|
|
126
|
+
return errorResponse(c, error);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
118
129
|
authenticated.get("/api/files/:id/content", async (c) => {
|
|
119
130
|
try {
|
|
120
131
|
const { resource, absolutePath } = await files.resource(c.req.param("id"));
|
|
@@ -122,7 +133,7 @@ function registerFilesRoutes(authenticated, deps) {
|
|
|
122
133
|
if (c.req.header("if-none-match") === resource.revision) return c.body(null, 304);
|
|
123
134
|
c.header("Content-Type", resource.mimeType);
|
|
124
135
|
c.header("ETag", resource.revision);
|
|
125
|
-
c.header("Content-Disposition",
|
|
136
|
+
c.header("Content-Disposition", contentDisposition("inline", resource.name));
|
|
126
137
|
return c.body(await readFile(absolutePath));
|
|
127
138
|
} catch (error) {
|
|
128
139
|
return errorResponse(c, error);
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentDefaultsSchema } from "../../../agent-config/schema.js";
|
|
2
|
+
import { init_agent_config } from "../../../agent-config/index.js";
|
|
2
3
|
import { listGlobalDefaults, prepareUpdateGlobalDefaults } from "../../global-defaults-admin.js";
|
|
3
4
|
//#region src/gateway/hono/routes/global-defaults.ts
|
|
4
|
-
|
|
5
|
+
init_agent_config();
|
|
5
6
|
function parsePatchBody(raw) {
|
|
6
7
|
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return { error: "body must be an object" };
|
|
7
8
|
const body = raw;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const parsed = CapabilityPresetSchema.pick({ models: true }).safeParse({ models: body.models });
|
|
11
|
-
if (!parsed.success) return { error: `models ${parsed.error.issues[0]?.message ?? "is invalid"}` };
|
|
12
|
-
out.models = parsed.data.models;
|
|
13
|
-
}
|
|
14
|
-
return out;
|
|
9
|
+
const parsed = AgentDefaultsSchema.safeParse(body.defaults);
|
|
10
|
+
return parsed.success ? { defaults: parsed.data } : { error: `defaults ${parsed.error.issues[0]?.message ?? "is invalid"}` };
|
|
15
11
|
}
|
|
16
12
|
function isParseError(value) {
|
|
17
13
|
return typeof value === "object" && value !== null && "error" in value && typeof value.error === "string";
|
|
@@ -7,12 +7,13 @@ import { registerStatusRoutes } from "./status.js";
|
|
|
7
7
|
import { registerProjectsRoutes } from "./projects.js";
|
|
8
8
|
import { registerProjectSkillRoutes } from "./project-skills.js";
|
|
9
9
|
import { registerSearchRoutes } from "./search.js";
|
|
10
|
-
import {
|
|
10
|
+
import { registerDevicePushRoutes } from "./device-push.js";
|
|
11
11
|
import { registerNotificationRoutes } from "./notifications.js";
|
|
12
12
|
import { registerInteractionStateRoutes } from "./interaction-state.js";
|
|
13
13
|
import { registerComposerHistoryRoutes } from "./composer-history.js";
|
|
14
14
|
import { registerEndpointToolRoutes } from "./endpoint-tools.js";
|
|
15
15
|
import { registerRealtimeRoutes } from "./realtime.js";
|
|
16
|
+
import { registerDeviceRoutes } from "./devices.js";
|
|
16
17
|
import { registerLocalAppsRoutes } from "./local-apps.js";
|
|
17
18
|
import { registerWorkDiscoveryRoutes } from "./work-discovery.js";
|
|
18
19
|
import { registerUnderstandingSourceRoutes } from "./understanding-sources.js";
|
|
@@ -35,12 +36,13 @@ function registerCoreAuthenticatedRoutes(authenticated, deps) {
|
|
|
35
36
|
registerTaskRoutes(authenticated, deps);
|
|
36
37
|
registerProactiveRoutes(authenticated, deps);
|
|
37
38
|
registerSearchRoutes(authenticated, deps);
|
|
38
|
-
|
|
39
|
+
registerDevicePushRoutes(authenticated);
|
|
39
40
|
registerNotificationRoutes(authenticated, deps);
|
|
40
41
|
registerInteractionStateRoutes(authenticated, deps);
|
|
41
42
|
registerComposerHistoryRoutes(authenticated, deps);
|
|
42
43
|
registerEndpointToolRoutes(authenticated, deps);
|
|
43
44
|
registerRealtimeRoutes(authenticated, deps);
|
|
45
|
+
registerDeviceRoutes(authenticated, deps);
|
|
44
46
|
}
|
|
45
47
|
function registerAuthenticatedRoutes(app, authenticated, deps) {
|
|
46
48
|
registerCoreAuthenticatedRoutes(authenticated, deps);
|
|
@@ -100,6 +100,14 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
100
100
|
} };
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
id: "support",
|
|
105
|
+
match: (path) => startsWithAny(path, ["/api/support"]),
|
|
106
|
+
load: async () => {
|
|
107
|
+
const { registerSupportRoutes } = await import("./support.js");
|
|
108
|
+
return { register: registerSupportRoutes };
|
|
109
|
+
}
|
|
110
|
+
},
|
|
103
111
|
{
|
|
104
112
|
id: "image-generation",
|
|
105
113
|
match: (path) => startsWithAny(path, ["/api/image-generation"]) || /^\/api\/agents\/[^/]+\/image-generation(?:\/setup)?$/.test(path),
|
|
@@ -117,15 +125,11 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
117
125
|
}
|
|
118
126
|
},
|
|
119
127
|
{
|
|
120
|
-
id: "
|
|
121
|
-
match: (path) => startsWithAny(path, ["/api/
|
|
128
|
+
id: "global-defaults",
|
|
129
|
+
match: (path) => startsWithAny(path, ["/api/global-defaults"]),
|
|
122
130
|
load: async () => {
|
|
123
|
-
const { registerCapabilityPresetsRoutes } = await import("./capability-presets.js");
|
|
124
131
|
const { registerGlobalDefaultsRoutes } = await import("./global-defaults.js");
|
|
125
|
-
return { register:
|
|
126
|
-
registerCapabilityPresetsRoutes(authenticated, deps);
|
|
127
|
-
registerGlobalDefaultsRoutes(authenticated, deps);
|
|
128
|
-
} };
|
|
132
|
+
return { register: registerGlobalDefaultsRoutes };
|
|
129
133
|
}
|
|
130
134
|
},
|
|
131
135
|
{
|
|
@@ -220,7 +224,7 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
220
224
|
},
|
|
221
225
|
{
|
|
222
226
|
id: "shares",
|
|
223
|
-
match: (path) => startsWithAny(path, ["/api/shares"]),
|
|
227
|
+
match: (path) => startsWithAny(path, ["/api/shares"]) || /^\/api\/sessions\/[^/]+\/(?:share-preview|shares|hosted-shares)(?:\/.*)?$/.test(path),
|
|
224
228
|
load: async () => {
|
|
225
229
|
const { registerShareRoutes } = await import("./shares.js");
|
|
226
230
|
return { register: registerShareRoutes };
|
|
@@ -323,18 +327,6 @@ const APP_LAZY_ROUTE_BUNDLES = [{
|
|
|
323
327
|
const { registerSharePublicRoutes } = await import("./shares.js");
|
|
324
328
|
return { registerOnApp: registerSharePublicRoutes };
|
|
325
329
|
}
|
|
326
|
-
}, {
|
|
327
|
-
id: "tunnel-public",
|
|
328
|
-
prefixes: [
|
|
329
|
-
"/api/tunnel/pair/ping",
|
|
330
|
-
"/api/tunnel/pair/validate-url",
|
|
331
|
-
"/api/tunnel/exchange-token"
|
|
332
|
-
],
|
|
333
|
-
match: (path) => path === "/api/tunnel/exchange-token" || path === "/api/tunnel/pair/ping" || path === "/api/tunnel/pair/validate-url",
|
|
334
|
-
load: async () => {
|
|
335
|
-
const { registerTunnelPublicRoutes } = await import("./tunnel.js");
|
|
336
|
-
return { registerOnApp: registerTunnelPublicRoutes };
|
|
337
|
-
}
|
|
338
330
|
}];
|
|
339
331
|
function findAuthenticatedLazyRouteBundle(path) {
|
|
340
332
|
return AUTHENTICATED_LAZY_ROUTE_BUNDLES.find((bundle) => bundle.match(path));
|
|
@@ -9,6 +9,26 @@ import { messagesReferenceMediaUri } from "../../../media/session-references.js"
|
|
|
9
9
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
10
10
|
//#region src/gateway/hono/routes/media.ts
|
|
11
11
|
const log = createGatewayRouteLogger("Media");
|
|
12
|
+
function parseByteRange(header, size) {
|
|
13
|
+
if (!header) return null;
|
|
14
|
+
const match = /^bytes=(\d*)-(\d*)$/i.exec(header.trim());
|
|
15
|
+
if (!match || !match[1] && !match[2] || size <= 0) return "invalid";
|
|
16
|
+
if (!match[1]) {
|
|
17
|
+
const suffixLength = Number(match[2]);
|
|
18
|
+
if (!Number.isSafeInteger(suffixLength) || suffixLength <= 0) return "invalid";
|
|
19
|
+
return {
|
|
20
|
+
start: Math.max(0, size - suffixLength),
|
|
21
|
+
end: size - 1
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const start = Number(match[1]);
|
|
25
|
+
const requestedEnd = match[2] ? Number(match[2]) : size - 1;
|
|
26
|
+
if (!Number.isSafeInteger(start) || !Number.isSafeInteger(requestedEnd) || start < 0 || start >= size || requestedEnd < start) return "invalid";
|
|
27
|
+
return {
|
|
28
|
+
start,
|
|
29
|
+
end: Math.min(requestedEnd, size - 1)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
12
32
|
function registerMediaRoutes(authenticated, deps) {
|
|
13
33
|
const tasks = new TaskRepository();
|
|
14
34
|
authenticated.post("/api/media", deps.strictRateLimitMiddleware, async (c) => {
|
|
@@ -64,9 +84,33 @@ function registerMediaRoutes(authenticated, deps) {
|
|
|
64
84
|
}, 404);
|
|
65
85
|
const { buffer, path } = await readMediaReference(parsed.uri);
|
|
66
86
|
const contentType = mimeTypeFromMediaPath(path);
|
|
87
|
+
const range = parseByteRange(c.req.header("Range"), buffer.byteLength);
|
|
88
|
+
const commonHeaders = {
|
|
89
|
+
"Accept-Ranges": "bytes",
|
|
90
|
+
"Cache-Control": "private, max-age=3600",
|
|
91
|
+
"Content-Type": contentType
|
|
92
|
+
};
|
|
93
|
+
if (range === "invalid") return new Response(null, {
|
|
94
|
+
status: 416,
|
|
95
|
+
headers: {
|
|
96
|
+
...commonHeaders,
|
|
97
|
+
"Content-Range": `bytes */${buffer.byteLength}`
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
if (range) {
|
|
101
|
+
const body = buffer.subarray(range.start, range.end + 1);
|
|
102
|
+
return new Response(body, {
|
|
103
|
+
status: 206,
|
|
104
|
+
headers: {
|
|
105
|
+
...commonHeaders,
|
|
106
|
+
"Content-Length": String(body.byteLength),
|
|
107
|
+
"Content-Range": `bytes ${range.start}-${range.end}/${buffer.byteLength}`
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
67
111
|
return new Response(buffer, { headers: {
|
|
68
|
-
|
|
69
|
-
"
|
|
112
|
+
...commonHeaders,
|
|
113
|
+
"Content-Length": String(buffer.byteLength)
|
|
70
114
|
} });
|
|
71
115
|
} catch (err) {
|
|
72
116
|
const em = err instanceof Error ? err.message : String(err);
|
|
@@ -12,13 +12,13 @@ import "../../../capabilities/readiness/index.js";
|
|
|
12
12
|
import { getImageGenerationProvider, reloadImageGenerationProviders, resolveImageGenerationCredentialMode } from "../../../agent/image/generation/provider-registry.js";
|
|
13
13
|
import { SessionConfigStore } from "../../../session/config-store.js";
|
|
14
14
|
import { deleteCustomImageProvider, listCustomImageProviders, upsertCustomImageProvider } from "../../custom-image-providers.js";
|
|
15
|
-
import { getDomesticProviderPreset, getDomesticProviderPresetIds } from "../../../providers/domestic-presets.js";
|
|
16
|
-
import { getOnboardingFeaturedProviders, getProviderHint, getRecommendedModelsForProvider, isRecommendedModel, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
17
15
|
import { getAgentImageGenerationConfig, getImageGenerationCatalog, prepareImageGenerationSetup, verifyImageGenerationCredential } from "../../image-generation-setup.js";
|
|
18
16
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
19
17
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
20
18
|
import { respondStartupUnavailable } from "../lib/startup-unavailable.js";
|
|
19
|
+
import { getDomesticProviderPreset, getDomesticProviderPresetIds } from "../../../providers/domestic-presets.js";
|
|
21
20
|
import { auditModelReferences } from "../../../providers/model-reference-auditor.js";
|
|
21
|
+
import { getOnboardingFeaturedProviders, getProviderHint, getRecommendedModelsForProvider, isRecommendedModel, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
22
22
|
import { XopcCloudAccountError, XopcCloudAccountService } from "../../../providers/xopc-cloud-account-service.js";
|
|
23
23
|
//#region src/gateway/hono/routes/models.ts
|
|
24
24
|
init_models_json();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { realtimeClientKindSchema } from "../../../../packages/realtime-protocol/src/index.js";
|
|
2
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region src/gateway/hono/routes/realtime.ts
|
|
4
5
|
const ticketRequestSchema = z.strictObject({
|
|
@@ -16,9 +17,15 @@ function registerRealtimeRoutes(authenticated, deps) {
|
|
|
16
17
|
}
|
|
17
18
|
}, 400);
|
|
18
19
|
try {
|
|
20
|
+
const principal = getGatewayPrincipal(c);
|
|
19
21
|
return c.json({
|
|
20
22
|
ok: true,
|
|
21
|
-
payload: deps.service.realtime.tickets.issue(parsed.data.clientId, parsed.data.clientKind
|
|
23
|
+
payload: deps.service.realtime.tickets.issue(parsed.data.clientId, parsed.data.clientKind, {
|
|
24
|
+
principalId: principal.principalId,
|
|
25
|
+
...principal.deviceId ? { deviceId: principal.deviceId } : {},
|
|
26
|
+
...principal.accessSessionId ? { accessSessionId: principal.accessSessionId } : {},
|
|
27
|
+
scopes: principal.scopes
|
|
28
|
+
})
|
|
22
29
|
});
|
|
23
30
|
} catch (error) {
|
|
24
31
|
return c.json({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../../providers/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getGatewayAgentEffectiveConfig } from "../../agents-admin.js";
|
|
3
3
|
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
4
4
|
import { mergeSttConfigFromAppConfig } from "../../../voice/stt/config.js";
|
|
5
5
|
import "../../../voice/stt/index.js";
|
|
@@ -14,9 +14,6 @@ function stableValue(value) {
|
|
|
14
14
|
function contentHash(value) {
|
|
15
15
|
return createHash("sha256").update(JSON.stringify(stableValue(value))).digest("hex");
|
|
16
16
|
}
|
|
17
|
-
function asRecord(value) {
|
|
18
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
19
|
-
}
|
|
20
17
|
function buildEvalRuntimeIdentity(service, agentId) {
|
|
21
18
|
const config = service.currentConfig;
|
|
22
19
|
if (!config) return {
|
|
@@ -24,16 +21,13 @@ function buildEvalRuntimeIdentity(service, agentId) {
|
|
|
24
21
|
error: "Gateway configuration is unavailable",
|
|
25
22
|
status: 503
|
|
26
23
|
};
|
|
27
|
-
const effective =
|
|
24
|
+
const effective = getGatewayAgentEffectiveConfig(config, agentId);
|
|
28
25
|
if ("error" in effective) return {
|
|
29
26
|
ok: false,
|
|
30
27
|
error: effective.error,
|
|
31
28
|
status: effective.status ?? 400
|
|
32
29
|
};
|
|
33
|
-
const
|
|
34
|
-
const models = asRecord(manifest.models);
|
|
35
|
-
const tools = asRecord(manifest.tools);
|
|
36
|
-
const skills = manifest.skills ?? [];
|
|
30
|
+
const agentConfig = effective.data.config;
|
|
37
31
|
return {
|
|
38
32
|
ok: true,
|
|
39
33
|
payload: {
|
|
@@ -41,13 +35,12 @@ function buildEvalRuntimeIdentity(service, agentId) {
|
|
|
41
35
|
version: service.getHealth().version,
|
|
42
36
|
buildCommit: process.env.XOPC_BUILD_COMMIT?.trim() || process.env.GITHUB_SHA?.trim() || null,
|
|
43
37
|
agentId,
|
|
44
|
-
modelRef: models.primary
|
|
45
|
-
thinkingLevel:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
presetChain: effective.data.sources
|
|
38
|
+
modelRef: agentConfig.models.chat.primary,
|
|
39
|
+
thinkingLevel: null,
|
|
40
|
+
configHash: contentHash(agentConfig),
|
|
41
|
+
toolPolicyHash: contentHash(agentConfig.tools),
|
|
42
|
+
skillPolicyHash: contentHash(agentConfig.skills),
|
|
43
|
+
sources: effective.data.sources
|
|
51
44
|
}
|
|
52
45
|
};
|
|
53
46
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { buildSupportInvestigationPrompt } from "../../../support/build-support-investigation-prompt.js";
|
|
2
|
+
import { collectSupportReport } from "../../../support/collect-support-report.js";
|
|
3
|
+
import { SupportReportInputSchema } from "../../../support/types.js";
|
|
4
|
+
//#region src/gateway/hono/routes/support.ts
|
|
5
|
+
function registerSupportRoutes(authenticated, deps) {
|
|
6
|
+
authenticated.post("/api/support/report", deps.strictRateLimitMiddleware, async (c) => {
|
|
7
|
+
const parsed = SupportReportInputSchema.safeParse(await c.req.json().catch(() => null));
|
|
8
|
+
if (!parsed.success) return c.json({
|
|
9
|
+
ok: false,
|
|
10
|
+
error: "Invalid support report input"
|
|
11
|
+
}, 400);
|
|
12
|
+
const health = deps.service.getHealth();
|
|
13
|
+
const channels = Object.fromEntries(deps.service.getChannelsStatus().map((channel) => [channel.name, !channel.enabled ? "disabled" : channel.connected ? "connected" : "disconnected"]));
|
|
14
|
+
const report = await collectSupportReport(parsed.data, { runtime: {
|
|
15
|
+
gatewayStatus: health.status,
|
|
16
|
+
gatewayVersion: health.version,
|
|
17
|
+
gatewayUptimeMs: health.uptime,
|
|
18
|
+
channels
|
|
19
|
+
} });
|
|
20
|
+
return c.json({
|
|
21
|
+
ok: true,
|
|
22
|
+
report,
|
|
23
|
+
investigationPrompt: buildSupportInvestigationPrompt(report)
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { registerSupportRoutes };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
2
|
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
|
-
import type { GatewayService } from '../../service.js';
|
|
4
|
-
export declare function registerTunnelPublicRoutes(app: Hono, service: GatewayService): void;
|
|
5
3
|
export declare function registerTunnelRoutes(authenticated: Hono, deps: AuthenticatedRouteDeps): void;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { init_public_url, validatePublicUrl } from "../../../config/public-url.js";
|
|
2
|
-
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
3
|
-
import { loadTunnelState } from "../../../tunnel/tunnel-state.js";
|
|
4
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
5
2
|
import { extractToken } from "../../auth.js";
|
|
6
|
-
import { TUNNEL_CONSENT_REQUIRED_CODE, TunnelConsentError, assertTunnelMayStart, getTunnelConsentState } from "../../../tunnel/consent.js";
|
|
7
3
|
import { TUNNEL_REGISTRATION_SECRET_REQUIRED_CODE, TunnelRegistrationSecretError, getTunnelRegistrationSecretMeta, readTunnelRegistrationSecretFromConfigOnly, resolveTunnelBrokerUrl } from "../../../tunnel/env.js";
|
|
8
|
-
import { createPairingSecret, exchangePairingSecretOnce, getCachedPairingExchange } from "../../../tunnel/pairing.js";
|
|
9
4
|
import { logTunnelAudit } from "../../../tunnel/tunnel-audit.js";
|
|
10
5
|
import { getTunnelService, hashGatewayToken } from "../../../tunnel/tunnel-service.js";
|
|
6
|
+
import { TUNNEL_CONSENT_REQUIRED_CODE, TunnelConsentError, assertTunnelMayStart, getTunnelConsentState } from "../../../tunnel/consent.js";
|
|
11
7
|
import { configureTunnelFromGatewayConfig } from "../../../tunnel/gateway-lifecycle.js";
|
|
12
8
|
import { applyTunnelConsentToConfig, mergeTunnelConfigPatch, setTunnelEnabledInConfig } from "../../../tunnel/tunnel-config.js";
|
|
13
|
-
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
14
|
-
import { applyLanPairingGatewayPatch } from "../../../tunnel/enable-lan-pairing.js";
|
|
15
9
|
import { consumeTunnelMutationLimit } from "../../../tunnel/tunnel-rate-limit.js";
|
|
16
10
|
import "../../../tunnel/index.js";
|
|
17
|
-
import { buildMobileConnectUrlOrder, resolveMobilePairLanUrl, validateMobilePairBaseUrl } from "../../../tunnel/pair-url.js";
|
|
18
|
-
import { buildMobilePairContext } from "../../../tunnel/pair-context.js";
|
|
19
|
-
import { consumePairingExchangeFailLimit } from "../../../tunnel/pairing-rate-limit.js";
|
|
20
11
|
import { provisionTunnelRegistrationKey } from "../../../tunnel/xopc-cloud-registration.js";
|
|
21
12
|
//#region src/gateway/hono/routes/tunnel.ts
|
|
22
13
|
init_public_url();
|
|
@@ -64,188 +55,17 @@ function createTunnelMutationRateLimitMiddleware() {
|
|
|
64
55
|
await next();
|
|
65
56
|
};
|
|
66
57
|
}
|
|
67
|
-
function registerTunnelPublicRoutes(app, service) {
|
|
68
|
-
app.get("/api/tunnel/pair/ping", async (c) => {
|
|
69
|
-
const config = service.currentConfig;
|
|
70
|
-
const status = getTunnelService().getStatus();
|
|
71
|
-
const context = buildMobilePairContext({
|
|
72
|
-
config,
|
|
73
|
-
tunnelPublicUrl: status.publicUrl,
|
|
74
|
-
tunnelConnected: status.state === "connected",
|
|
75
|
-
reverseProxyPublicUrl: resolveReverseProxyPublicUrl(config)
|
|
76
|
-
});
|
|
77
|
-
return c.json({
|
|
78
|
-
ok: true,
|
|
79
|
-
service: "xopc-gateway",
|
|
80
|
-
mobilePairing: true,
|
|
81
|
-
port: context.port,
|
|
82
|
-
bindMode: context.bindMode,
|
|
83
|
-
listenHost: context.listenHost,
|
|
84
|
-
pairingReady: context.pairingReady,
|
|
85
|
-
blockReason: context.blockReason ?? null,
|
|
86
|
-
tunnelConnected: status.state === "connected",
|
|
87
|
-
reverseProxyConfigured: Boolean(resolveReverseProxyPublicUrl(config)),
|
|
88
|
-
connectUrls: context.connectUrls
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
app.post("/api/tunnel/pair/validate-url", async (c) => {
|
|
92
|
-
let body;
|
|
93
|
-
try {
|
|
94
|
-
body = await c.req.json();
|
|
95
|
-
} catch {
|
|
96
|
-
return c.json({ error: "Invalid JSON body" }, 400);
|
|
97
|
-
}
|
|
98
|
-
const result = validateMobilePairBaseUrl(typeof body.baseUrl === "string" ? body.baseUrl : "");
|
|
99
|
-
if (result.ok === false) return c.json({
|
|
100
|
-
ok: false,
|
|
101
|
-
code: result.code,
|
|
102
|
-
message: result.message
|
|
103
|
-
});
|
|
104
|
-
return c.json({
|
|
105
|
-
ok: true,
|
|
106
|
-
url: result.url,
|
|
107
|
-
loopback: false,
|
|
108
|
-
probePath: "/api/tunnel/pair/ping"
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
app.post("/api/tunnel/exchange-token", async (c) => {
|
|
112
|
-
const clientIp = getClientIpFromHeaders({ get: (name) => c.req.header(name) ?? void 0 }) ?? "unknown";
|
|
113
|
-
let body;
|
|
114
|
-
try {
|
|
115
|
-
body = await c.req.json();
|
|
116
|
-
} catch {
|
|
117
|
-
return c.json({ error: "Invalid JSON body" }, 400);
|
|
118
|
-
}
|
|
119
|
-
const pairingSecret = typeof body.pairingSecret === "string" ? body.pairingSecret.trim() : "";
|
|
120
|
-
if (!pairingSecret) return c.json({ error: "pairingSecret required" }, 400);
|
|
121
|
-
const cached = getCachedPairingExchange(pairingSecret);
|
|
122
|
-
if (cached) {
|
|
123
|
-
logTunnelAudit("tunnel.exchange_token", {
|
|
124
|
-
ok: true,
|
|
125
|
-
clientIp,
|
|
126
|
-
phase: "pairing_exchange",
|
|
127
|
-
replay: true
|
|
128
|
-
}, "Pairing secret replayed (duplicate mobile exchange)");
|
|
129
|
-
return c.json(cached);
|
|
130
|
-
}
|
|
131
|
-
const token = service.getAuthToken();
|
|
132
|
-
if (!token) return c.json({ error: "Gateway token not configured" }, 500);
|
|
133
|
-
const persisted = loadTunnelState();
|
|
134
|
-
const config = service.currentConfig;
|
|
135
|
-
const tunnelUrl = persisted?.publicUrl?.trim() || null;
|
|
136
|
-
const reverseProxyUrl = resolveReverseProxyPublicUrl(config);
|
|
137
|
-
const lanUrl = resolveMobilePairLanUrl(config);
|
|
138
|
-
const connectUrls = buildMobileConnectUrlOrder({
|
|
139
|
-
reverseProxyUrl,
|
|
140
|
-
baseUrl: reverseProxyUrl ?? tunnelUrl,
|
|
141
|
-
lanUrl,
|
|
142
|
-
tunnelUrl
|
|
143
|
-
});
|
|
144
|
-
const advertisedBaseUrl = reverseProxyUrl ?? tunnelUrl;
|
|
145
|
-
const payload = await exchangePairingSecretOnce(pairingSecret, () => ({
|
|
146
|
-
token,
|
|
147
|
-
baseUrl: advertisedBaseUrl,
|
|
148
|
-
lanUrl,
|
|
149
|
-
connectUrls
|
|
150
|
-
}));
|
|
151
|
-
if (!payload) {
|
|
152
|
-
const limited = consumePairingExchangeFailLimit(clientIp);
|
|
153
|
-
if (!limited.allowed) c.header("Retry-After", String(Math.ceil(limited.retryAfterMs / 1e3)));
|
|
154
|
-
logTunnelAudit("tunnel.exchange_token", {
|
|
155
|
-
ok: false,
|
|
156
|
-
clientIp,
|
|
157
|
-
phase: "pairing_exchange"
|
|
158
|
-
}, "Pairing exchange denied: invalid or expired secret");
|
|
159
|
-
return c.json({
|
|
160
|
-
error: "Invalid or expired pairing secret",
|
|
161
|
-
code: "PAIRING_INVALID"
|
|
162
|
-
}, 401);
|
|
163
|
-
}
|
|
164
|
-
logTunnelAudit("tunnel.exchange_token", {
|
|
165
|
-
ok: true,
|
|
166
|
-
clientIp,
|
|
167
|
-
subdomain: persisted?.subdomain ?? null,
|
|
168
|
-
phase: "pairing_exchange"
|
|
169
|
-
}, "Pairing secret exchanged for gateway token");
|
|
170
|
-
return c.json(payload);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
58
|
function registerTunnelRoutes(authenticated, deps) {
|
|
174
59
|
const { strictRateLimitMiddleware } = deps;
|
|
175
60
|
const tunnel = getTunnelService();
|
|
176
61
|
const tunnelMutationLimit = createTunnelMutationRateLimitMiddleware();
|
|
177
|
-
authenticated.get("/api/tunnel/pair/context", async (c) => {
|
|
178
|
-
const config = deps.service.currentConfig;
|
|
179
|
-
const status = tunnel.getStatus();
|
|
180
|
-
const context = buildMobilePairContext({
|
|
181
|
-
config,
|
|
182
|
-
tunnelPublicUrl: status.publicUrl,
|
|
183
|
-
tunnelConnected: status.state === "connected",
|
|
184
|
-
reverseProxyPublicUrl: resolveReverseProxyPublicUrl(config)
|
|
185
|
-
});
|
|
186
|
-
return c.json(context);
|
|
187
|
-
});
|
|
188
|
-
authenticated.post("/api/tunnel/pair/enable-lan", tunnelMutationLimit, async (c) => {
|
|
189
|
-
const token = requireGatewayToken(c);
|
|
190
|
-
if (!token) return c.json({ error: "Gateway token required" }, 401);
|
|
191
|
-
const config = deps.service.currentConfig;
|
|
192
|
-
const patchResult = applyLanPairingGatewayPatch(config);
|
|
193
|
-
if (patchResult.ok === false) return c.json({
|
|
194
|
-
ok: false,
|
|
195
|
-
error: {
|
|
196
|
-
message: patchResult.message,
|
|
197
|
-
code: "LAN_PAIRING_CONFIG"
|
|
198
|
-
}
|
|
199
|
-
}, 400);
|
|
200
|
-
if (patchResult.changed) {
|
|
201
|
-
const saveResult = await deps.service.saveConfig(config);
|
|
202
|
-
if (!saveResult.saved) return c.json({
|
|
203
|
-
ok: false,
|
|
204
|
-
error: {
|
|
205
|
-
message: saveResult.error ?? "Failed to save config",
|
|
206
|
-
code: "SAVE_FAILED"
|
|
207
|
-
}
|
|
208
|
-
}, 500);
|
|
209
|
-
logTunnelAudit("tunnel.enable_lan_pairing", { gatewayTokenHash: hashGatewayToken(token).slice(0, 12) }, "Gateway bind switched to LAN for mobile pairing");
|
|
210
|
-
}
|
|
211
|
-
const status = tunnel.getStatus();
|
|
212
|
-
let context = buildMobilePairContext({
|
|
213
|
-
config: deps.service.currentConfig,
|
|
214
|
-
tunnelPublicUrl: status.publicUrl,
|
|
215
|
-
tunnelConnected: status.state === "connected",
|
|
216
|
-
reverseProxyPublicUrl: resolveReverseProxyPublicUrl(deps.service.currentConfig)
|
|
217
|
-
});
|
|
218
|
-
if (patchResult.changed) context = {
|
|
219
|
-
...context,
|
|
220
|
-
pairingReady: false,
|
|
221
|
-
blockReason: "GATEWAY_LOOPBACK_ONLY"
|
|
222
|
-
};
|
|
223
|
-
return c.json({
|
|
224
|
-
ok: true,
|
|
225
|
-
requiresRestart: patchResult.changed,
|
|
226
|
-
context
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
authenticated.post("/api/tunnel/pair", tunnelMutationLimit, async (c) => {
|
|
230
|
-
const token = requireGatewayToken(c);
|
|
231
|
-
if (!token) return c.json({ error: "Gateway token required" }, 401);
|
|
232
|
-
const { secret, expiresAt } = createPairingSecret();
|
|
233
|
-
logTunnelAudit("tunnel.pair", {
|
|
234
|
-
expiresAt: expiresAt.toISOString(),
|
|
235
|
-
gatewayTokenHash: hashGatewayToken(token).slice(0, 12)
|
|
236
|
-
}, "Mobile pairing session created");
|
|
237
|
-
return c.json({
|
|
238
|
-
pairingSecret: secret,
|
|
239
|
-
expiresAt: expiresAt.toISOString()
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
62
|
/**
|
|
243
63
|
* Probe a candidate reverse-proxy URL before persisting it. The check round-trips
|
|
244
|
-
* a `GET /api/
|
|
64
|
+
* a `GET /api/health` and validates the response identifies as
|
|
245
65
|
* `service: 'xopc-gateway'`. Surface-area errors are mapped to stable codes so
|
|
246
66
|
* the UI can render targeted hints (TLS / DNS / wrong service / blocked path).
|
|
247
67
|
*/
|
|
248
|
-
authenticated.post("/api/tunnel/
|
|
68
|
+
authenticated.post("/api/tunnel/probe-public", tunnelMutationLimit, async (c) => {
|
|
249
69
|
if (!requireGatewayToken(c)) return c.json({ error: "Gateway token required" }, 401);
|
|
250
70
|
let body;
|
|
251
71
|
try {
|
|
@@ -263,7 +83,7 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
263
83
|
code: validation.code,
|
|
264
84
|
message: validation.message
|
|
265
85
|
});
|
|
266
|
-
const pingUrl = `${validation.url}/api/
|
|
86
|
+
const pingUrl = `${validation.url}/api/health`;
|
|
267
87
|
const startedAt = Date.now();
|
|
268
88
|
let response;
|
|
269
89
|
try {
|
|
@@ -305,7 +125,7 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
305
125
|
message: "Response was not JSON"
|
|
306
126
|
});
|
|
307
127
|
}
|
|
308
|
-
if (!parsed || parsed.
|
|
128
|
+
if (!parsed || parsed.status !== "ok" && parsed.status !== "starting") return c.json({
|
|
309
129
|
ok: false,
|
|
310
130
|
code: "NOT_XOPC_GATEWAY",
|
|
311
131
|
message: "Endpoint did not identify as an xopc gateway"
|
|
@@ -314,7 +134,7 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
314
134
|
ok: true,
|
|
315
135
|
url: validation.url,
|
|
316
136
|
latencyMs: Date.now() - startedAt,
|
|
317
|
-
|
|
137
|
+
gatewayReady: true
|
|
318
138
|
});
|
|
319
139
|
});
|
|
320
140
|
authenticated.get("/api/tunnel/status", async (c) => {
|
|
@@ -391,7 +211,7 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
391
211
|
}
|
|
392
212
|
const port = config.gateway.port ?? 18790;
|
|
393
213
|
try {
|
|
394
|
-
|
|
214
|
+
await tunnel.start(port, token);
|
|
395
215
|
setTunnelEnabledInConfig(config, true);
|
|
396
216
|
const saved = await deps.service.saveConfig(config);
|
|
397
217
|
if (!saved.saved) {
|
|
@@ -401,10 +221,8 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
401
221
|
}
|
|
402
222
|
const status = tunnel.getStatus();
|
|
403
223
|
return c.json({
|
|
404
|
-
publicUrl:
|
|
405
|
-
subdomain: status.subdomain
|
|
406
|
-
qrPayload: qr.qrPayload,
|
|
407
|
-
lanUrl: qr.lanUrl
|
|
224
|
+
publicUrl: status.publicUrl,
|
|
225
|
+
subdomain: status.subdomain
|
|
408
226
|
});
|
|
409
227
|
} catch (err) {
|
|
410
228
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -436,13 +254,6 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
436
254
|
released
|
|
437
255
|
});
|
|
438
256
|
});
|
|
439
|
-
authenticated.get("/api/tunnel/qr", async (c) => {
|
|
440
|
-
const port = deps.service.currentConfig.gateway.port ?? 18790;
|
|
441
|
-
const host = resolveGatewayEffectiveHost(deps.service.currentConfig);
|
|
442
|
-
if (!requireGatewayToken(c)) return c.json({ error: "Gateway token required" }, 401);
|
|
443
|
-
const qr = await tunnel.buildQr(port, host);
|
|
444
|
-
return c.json(qr);
|
|
445
|
-
});
|
|
446
257
|
authenticated.get("/api/tunnel/transport-status", async (c) => {
|
|
447
258
|
return c.json({ transport: { tls: "broker_terminated" } });
|
|
448
259
|
});
|
|
@@ -462,4 +273,4 @@ function registerTunnelRoutes(authenticated, deps) {
|
|
|
462
273
|
});
|
|
463
274
|
}
|
|
464
275
|
//#endregion
|
|
465
|
-
export {
|
|
276
|
+
export { registerTunnelRoutes };
|