@xopcai/xopc 0.0.309 → 0.0.312
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 +2 -1
- package/README.zh-CN.md +2 -1
- 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-XKNYlFUI.js → activity-store-DVUTs1fk.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-1S2TFECE.js → agent-avatar-dicebear-BVIJMP8w.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-K3hTmu9d.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CPqUMtCL.js → agents-D6g_SeWI.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BEUEE4f2.js → api-_aHQA8bd.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-CKueEVbT.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CgVBSqzu.js → app-management-settings-panel-CLg_aXYG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CoWdCokb.js → appearance-settings-CU52MfIT.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-ZpA1-6ad.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-C3ZA6LRS.js → archive-plugin-CHO3heHX.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CdgS6_zy.js → attachment-load-BsmsBCI2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BtHL2hpg.js → automations-page-CftigJlf.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-IEAxKRME.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CiDhtq_H.js → binary-plugins-CRCLWBo2.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Br00T83w.js → block-editor-D0LDiOTT.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-D2tILykA.js → browser-automation-inputs-C611KRBx.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BVuEmryB.js → browser-automations-page-Djyv3vy-.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-CU4VWsmX.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C9XQk3HL.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-Bqlhjooi.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-JsMtzDao.js → chat-terminal-dock-CIsKqdET.js} +2 -2
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-Cq1tE_3b.js → chunk-KS7C4IRE-BMYIfy9x.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-C0YL9J7m.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-DZFNUTiN.js → connector-service-page-BmH17JnO.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-zkx8Q-e6.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-CDsfv8R0.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-B-BcuG1y.js → dependency-picker-DvhPj3CZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CdBBhhdY.js → desktop-pet-Cyg8XMpL.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CE4GOlMM.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-CdKJqnnw.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BFp5eKtY.js → extension-debug-page-D-AVJU3q.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DL3vyyH6.js → extension-page-DrFoQ9xt.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BXtvdAsY.js → extension-settings-page-DxWjESC1.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-xAOGtenO.js → gateway-config-swr-DUDX42qY.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BuaTsMSi.js → gateway-realtime-CGOW0-b4.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-D4um_sV7.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CgXp2zq4.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BwDxKHd4.js → gateway-startup-retry-Cf8OxlvY.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-D6Idk732.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-wGMeI_yW.js → image-generation-api-D2YorS--.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-zexFT5Rq.js → imports-page-BKucJlXI.js} +1 -1
- package/dist/gateway/static/root/assets/index-1wIKA-kM.css +1 -0
- package/dist/gateway/static/root/assets/index-PFQHPGgi.js +79 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CutG9zLh.js → keyboard-shortcuts-settings-BxLXD-yU.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BmAqTRb4.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CJy6I7Dt.js → local-apps-page-BAsQJQKJ.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DPZ79W1-.js → locale-store-DA0Z5jM_.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-egGcPHNi.js → logs-page-ZjVYXXyM.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-BQhIOELc.js → management-settings-CSTkYVOZ.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-DSjfHfaW.css +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-p2P5hP1U.js → markdown-view-DYGPxPee.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CsBylqlN.js → media-plugins-CQtQzLyg.js} +1 -1
- package/dist/gateway/static/root/assets/messages-4BtQKYlM.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DuXCt-MM.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-BjOgBVq5.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-ChQ4jJFs.js → page-tabs-B6DjkyMM.js} +1 -1
- package/dist/gateway/static/root/assets/{popover-select-9i-ZtHXL.js → popover-select-B-GDnZO9.js} +1 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-Dn57uLhr.js +1 -0
- package/dist/gateway/static/root/assets/product-delivery-CrAI8ZEa.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BADxWEdP.js → product-open-page-H2YMk8TY.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-0zi4-i9X.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-B18OxmJj.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-B_e_nZSN.js → registry-api-C0DCx3wv.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-z-DxbuaE.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-pwiIyp.js → runtime-tools-settings-panel-DGsBTbo6.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-Bgba03B_.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-IWmb05DX.js → schema-form-CblI9WUA.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B1t3bMsm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CBX0Ezhf.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-B0veRBZs.js → settings-form-section-BAaVyxJH.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-CKNPbm5q.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-layout-DqNCGKxQ.js +1 -0
- package/dist/gateway/static/root/assets/{settings-shell-layer-context-DCp6ykjQ.js → settings-shell-layer-context-BTQUDoJ2.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Bw71C2X3.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CirpgkfD.js → share-preview-page-BzMfp_HM.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BoVDQolc.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DtTptpAt.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DIht92q6.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-B42mpWKV.js → skills-page.utils-DLYRiEn3.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-yYs4YgYk.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-vgkiGo-D.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-BFbj_2Tu.js → theme-store-CegIlB8d.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-BasDYxvx.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CWAUHhcb.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-CAGafNfP.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BZbKQ8HT.js → voice-api-key-field-Kc4UlxZs.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-SKCeQLrH.js → voice-config-api-DTyMdGOR.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BRVTTXNG.js → work-discovery-overlay-BPC_c9dO.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D2kuwv5e.js → workflow-run-setup-panel-DBTciOrq.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CSxHVs1p.js +6 -0
- package/dist/gateway/static/root/connector-icons/SOURCES.md +0 -2
- package/dist/gateway/static/root/index.html +18 -21
- package/dist/gateway/static/root/notification-sw.js +1 -1
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/notifications.js +12 -11
- package/dist/packages/gateway-contract/src/proactive.js +6 -6
- package/dist/packages/gateway-contract/src/product-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/project-monitoring.js +4 -4
- package/dist/packages/gateway-contract/src/project-operating.js +1 -4
- package/dist/src/agent/agent-manager.d.ts +2 -6
- package/dist/src/agent/agent-manager.js +2 -1
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/context/execution-scope.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.d.ts +47 -0
- package/dist/src/agent/external-tools/cliProvider.js +317 -0
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/gateway-tools.js +8 -2
- package/dist/src/agent/external-tools/index.js +6 -0
- package/dist/src/agent/external-tools/service.js +1 -1
- package/dist/src/agent/external-tools/types.d.ts +1 -1
- package/dist/src/agent/external-tools/types.js +1 -0
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
- package/dist/src/agent/memory/turn-provenance.js +2 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +1 -1
- package/dist/src/agent/service.js +1 -0
- package/dist/src/agent/service.types.d.ts +2 -0
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +43 -16
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +3 -2
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +20 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +56 -0
- package/dist/src/agent/tools/search/registry.d.ts +4 -2
- package/dist/src/agent/tools/search/registry.js +5 -3
- package/dist/src/agent/tools/xopc-use-tool.d.ts +4 -2
- package/dist/src/agent/tools/xopc-use-tool.js +104 -44
- package/dist/src/automations/service/automation-service.d.ts +0 -4
- package/dist/src/automations/service/automation-service.js +0 -31
- package/dist/src/capabilities/store-connector.js +46 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/schema.d.ts +13 -4
- package/dist/src/config/schema.js +10 -14
- package/dist/src/config/web-patch.js +0 -5
- package/dist/src/connectors/account-selection.d.ts +14 -0
- package/dist/src/connectors/account-selection.js +26 -0
- package/dist/src/connectors/china-catalog.js +93 -226
- package/dist/src/connectors/cli/adapterRegistry.d.ts +4 -0
- package/dist/src/connectors/cli/adapterRegistry.js +26 -0
- package/dist/src/connectors/cli/adapters/lark.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/lark.js +143 -0
- package/dist/src/connectors/cli/adapters/larkShortcuts.d.ts +3 -0
- package/dist/src/connectors/cli/adapters/larkShortcuts.js +64 -0
- package/dist/src/connectors/cli/adapters/wecom.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/wecom.js +97 -0
- package/dist/src/connectors/cli/adapters/wps365/bundle.js +575 -0
- package/dist/src/connectors/cli/adapters/wps365.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/wps365.js +115 -0
- package/dist/src/connectors/cli/assets.d.ts +3 -0
- package/dist/src/connectors/cli/assets.js +44 -0
- package/dist/src/connectors/cli/authorization.d.ts +16 -0
- package/dist/src/connectors/cli/authorization.js +184 -0
- package/dist/src/connectors/cli/distributions.d.ts +4 -0
- package/dist/src/connectors/cli/distributions.js +69 -0
- package/dist/src/connectors/cli/installer.d.ts +5 -0
- package/dist/src/connectors/cli/installer.js +102 -0
- package/dist/src/connectors/cli/lifecycle.d.ts +1 -0
- package/dist/src/connectors/cli/lifecycle.js +19 -0
- package/dist/src/connectors/cli/process.d.ts +18 -0
- package/dist/src/connectors/cli/process.js +100 -0
- package/dist/src/connectors/cli/protocol.d.ts +10 -0
- package/dist/src/connectors/cli/protocol.js +63 -0
- package/dist/src/connectors/cli/runtime.d.ts +10 -0
- package/dist/src/connectors/cli/runtime.js +93 -0
- package/dist/src/connectors/cli/store.d.ts +35 -0
- package/dist/src/connectors/cli/store.js +121 -0
- package/dist/src/connectors/cli/types.d.ts +73 -0
- package/dist/src/connectors/composio-backends.js +1 -1
- package/dist/src/connectors/composio-sessions.d.ts +1 -0
- package/dist/src/connectors/composio-sessions.js +8 -3
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connection-candidates.js +22 -3
- package/dist/src/connectors/connection-recovery-service.d.ts +1 -0
- package/dist/src/connectors/connection-recovery-service.js +53 -8
- package/dist/src/connectors/health.js +52 -0
- package/dist/src/connectors/instances.js +5 -1
- package/dist/src/connectors/lifecycle.js +2 -0
- package/dist/src/connectors/principal.js +2 -1
- package/dist/src/connectors/runtime-adapter-registry.js +31 -0
- package/dist/src/connectors/types.d.ts +13 -1
- package/dist/src/connectors/usage.js +1 -1
- package/dist/src/connectors/workflow-preflight.js +8 -4
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/gateway/hono/app.d.ts +2 -0
- package/dist/src/gateway/hono/app.js +4 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -15
- package/dist/src/gateway/hono/lib/config-payload.js +1 -11
- package/dist/src/gateway/hono/routes/cli-connectors.d.ts +3 -0
- package/dist/src/gateway/hono/routes/cli-connectors.js +219 -0
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -59
- package/dist/src/gateway/hono/routes/config.js +0 -16
- package/dist/src/gateway/hono/routes/connectors.js +21 -22
- package/dist/src/gateway/hono/routes/deps.d.ts +2 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +4 -17
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +0 -1
- package/dist/src/gateway/hono/routes/scenes.d.ts +3 -0
- package/dist/src/gateway/hono/routes/scenes.js +142 -0
- package/dist/src/gateway/hono/routes/tasks.js +0 -46
- package/dist/src/gateway/hono/routes/user-model.js +54 -1
- package/dist/src/gateway/scenes/browserNotifications.d.ts +4 -0
- package/dist/src/gateway/scenes/browserNotifications.js +54 -0
- package/dist/src/gateway/scenes/host.d.ts +34 -0
- package/dist/src/gateway/scenes/host.js +130 -0
- package/dist/src/gateway/scenes/mailContext.d.ts +32 -0
- package/dist/src/gateway/scenes/mailContext.js +235 -0
- package/dist/src/gateway/security/gateway-scopes.js +0 -4
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -10
- package/dist/src/gateway/service/config-coordinator.js +0 -16
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service.d.ts +4 -25
- package/dist/src/gateway/service.js +44 -99
- package/dist/src/gateway/session-context-summary.js +2 -1
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/unhandled-rejections.js +1 -1
- package/dist/src/migrations/runner.js +1 -4
- package/dist/src/notifications/browser-endpoint.d.ts +2 -0
- package/dist/src/notifications/browser-endpoint.js +13 -0
- package/dist/src/notifications/browserSubscriptions.d.ts +20 -0
- package/dist/src/notifications/browserSubscriptions.js +59 -0
- package/dist/src/notifications/browserTransport.d.ts +9 -0
- package/dist/src/notifications/browserTransport.js +64 -0
- package/dist/src/notifications/dispatch.d.ts +46 -0
- package/dist/src/notifications/dispatch.js +109 -0
- package/dist/src/notifications/domain-delivery.d.ts +21 -0
- package/dist/src/notifications/planner.js +0 -36
- package/dist/src/notifications/quietHours.d.ts +6 -0
- package/dist/src/notifications/quietHours.js +23 -0
- package/dist/src/notifications/resultOutbox.d.ts +23 -0
- package/dist/src/notifications/resultOutbox.js +49 -0
- package/dist/src/notifications/service.d.ts +18 -4
- package/dist/src/notifications/service.js +42 -61
- package/dist/src/notifications/store.d.ts +2 -1
- package/dist/src/notifications/store.js +7 -8
- package/dist/src/projects/project-service.d.ts +1 -4
- package/dist/src/projects/project-service.js +2 -30
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +19 -1
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +17 -0
- package/dist/src/providers/xopc-cloud-model-source.js +27 -0
- package/dist/src/scenes/agentExecutor.d.ts +8 -0
- package/dist/src/scenes/agentExecutor.js +63 -0
- package/dist/src/scenes/contracts.d.ts +118 -0
- package/dist/src/scenes/contracts.js +145 -0
- package/dist/src/scenes/execution.d.ts +56 -0
- package/dist/src/scenes/execution.js +168 -0
- package/dist/src/scenes/httpServices.d.ts +34 -0
- package/dist/src/scenes/inbox.d.ts +16 -0
- package/dist/src/scenes/inbox.js +68 -0
- package/dist/src/scenes/mailContext.d.ts +20 -0
- package/dist/src/scenes/mailContext.js +106 -0
- package/dist/src/scenes/mailObservations.d.ts +20 -0
- package/dist/src/scenes/mailObservations.js +107 -0
- package/dist/src/scenes/maintenance.d.ts +3 -0
- package/dist/src/scenes/maintenance.js +24 -0
- package/dist/src/scenes/metrics.d.ts +37 -0
- package/dist/src/scenes/metrics.js +100 -0
- package/dist/src/scenes/model.d.ts +3 -0
- package/dist/src/scenes/model.js +10 -0
- package/dist/src/scenes/notificationEligibility.d.ts +17 -0
- package/dist/src/scenes/notificationEligibility.js +72 -0
- package/dist/src/scenes/notificationPublication.d.ts +7 -0
- package/dist/src/scenes/notificationPublication.js +43 -0
- package/dist/src/scenes/preferences.d.ts +40 -0
- package/dist/src/scenes/preferences.js +108 -0
- package/dist/src/scenes/readiness.d.ts +7 -0
- package/dist/src/scenes/readiness.js +20 -0
- package/dist/src/scenes/repository.d.ts +174 -0
- package/dist/src/scenes/repository.js +740 -0
- package/dist/src/scenes/resultNotifications.d.ts +17 -0
- package/dist/src/scenes/resultNotifications.js +204 -0
- package/dist/src/scenes/runtime.d.ts +25 -0
- package/dist/src/scenes/runtime.js +101 -0
- package/dist/src/scenes/schedule.d.ts +9 -0
- package/dist/src/scenes/schedule.js +45 -0
- package/dist/src/scenes/service.d.ts +29 -0
- package/dist/src/scenes/service.js +116 -0
- package/dist/src/scenes/templates.d.ts +64 -0
- package/dist/src/scenes/templates.js +76 -0
- package/dist/src/scenes/userNotes.d.ts +10 -0
- package/dist/src/scenes/userNotes.js +34 -0
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/store.js +2 -1
- package/dist/src/share/share-config.js +0 -5
- package/dist/src/share/site-share-config.js +0 -5
- package/dist/src/storage/sqlite/connection-wait-repository.js +20 -7
- package/dist/src/storage/sqlite/connection.js +1 -1
- package/dist/src/storage/sqlite/connector-account-repository.js +1 -0
- package/dist/src/storage/sqlite/connector-sync-policy-repository.d.ts +0 -4
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +3 -17
- package/dist/src/storage/sqlite/conversation-repository.js +2 -1
- package/dist/src/storage/sqlite/index.js +2 -1
- package/dist/src/storage/sqlite/migrations/187_cli_connectors.sql +34 -0
- package/dist/src/storage/sqlite/migrations/188_scene_storage.sql +2 -0
- package/dist/src/storage/sqlite/migrations/189_scene_source_health.sql +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +7 -3
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +20 -44
- package/dist/src/storage/sqlite/migrations/scene-reset.d.ts +5 -0
- package/dist/src/storage/sqlite/migrations/scene-reset.js +40 -0
- package/dist/src/storage/sqlite/scenes-schema.d.ts +8 -0
- package/dist/src/storage/sqlite/scenes-schema.js +61 -0
- package/dist/src/storage/sqlite/schema.js +4 -10
- package/dist/src/storage/sqlite/schemas/notifications.sql +65 -0
- package/dist/src/storage/sqlite/schemas/scenes.sql +212 -0
- package/dist/src/storage/sqlite/session-read-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/session-read-repository.js +35 -0
- package/dist/src/storage/sqlite/session-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-repository.js +2 -25
- package/dist/src/storage/sqlite/sql-assets.d.ts +2 -0
- package/dist/src/storage/sqlite/sql-assets.js +18 -0
- package/dist/src/storage/sqlite/transaction.d.ts +2 -0
- package/dist/src/storage/sqlite/transaction.js +20 -1
- package/dist/src/tasks/home-query-service.d.ts +0 -2
- package/dist/src/tasks/home-query-service.js +13 -43
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +4 -5
- package/dist/src/tasks/project-operating-view-service.js +1 -4
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/user-model/goals.d.ts +10 -0
- package/dist/src/user-model/goals.js +29 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +2 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +5 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-f0-YFMUz.js +0 -1
- package/dist/gateway/static/root/assets/api-CN4id43t.js +0 -1
- package/dist/gateway/static/root/assets/app-link-BiBXVEvp.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-CexHOcWg.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-onJPfmO6.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BgVTyPFY.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Dra8wj1S.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-CkxiMDJ4.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-Dtder4G_.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-DHerePwo.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-cl9ZrV4D.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-DAhdv_Xv.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-PacO1m3a.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-Gy03NgMI.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-aV25nKag.js +0 -1
- package/dist/gateway/static/root/assets/external-link-DjqjBmc3.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BG95uGVW.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dcr2Ikeh.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DOy3alvT.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CDm3dGVy.js +0 -1
- package/dist/gateway/static/root/assets/index-D-vczw_0.css +0 -1
- package/dist/gateway/static/root/assets/index-DJo4DimT.js +0 -79
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CwLvTwjn.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-Y68dCxuc.css +0 -1
- package/dist/gateway/static/root/assets/messages-BiYTyLJr.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-c2k5Uz6X.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BLQWJMhf.js +0 -8
- package/dist/gateway/static/root/assets/preview-open-alternatives-9B5W7nVE.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-iOjI0d_e.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-CCC4FJ3Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BcxbQn2M.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BuSvld0O.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CFS8LQKW.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-DZjc__ok.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C1SM5B93.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-CxRWyWYe.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-layout-X1x-2Cp9.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D9Rl7Tec.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CwCThBs0.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DG6VGbOX.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BdRJ2vnL.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-DXIZpAvU.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-QXo9LJly.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Db2guRdW.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-DDY9qoXZ.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CzPmMkaO.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-CQXtiYtq.js +0 -6
- package/dist/gateway/static/root/connector-icons/wps-calendar.svg +0 -14
- package/dist/gateway/static/root/connector-icons/wps-mail.svg +0 -7
- package/dist/src/connectors/source-change-publisher.d.ts +0 -17
- package/dist/src/connectors/source-change-publisher.js +0 -151
- package/dist/src/gateway/heartbeat/check-store.d.ts +0 -18
- package/dist/src/gateway/heartbeat/check-store.js +0 -74
- package/dist/src/gateway/heartbeat/index.d.ts +0 -1
- package/dist/src/gateway/heartbeat/index.js +0 -2
- package/dist/src/gateway/heartbeat/service.d.ts +0 -55
- package/dist/src/gateway/heartbeat/service.js +0 -228
- package/dist/src/gateway/hono/routes/proactive-control.d.ts +0 -3
- package/dist/src/gateway/hono/routes/proactive-control.js +0 -135
- package/dist/src/gateway/hono/routes/proactive.d.ts +0 -4
- package/dist/src/gateway/hono/routes/proactive.js +0 -164
- package/dist/src/gateway/hono/routes/workspace.d.ts +0 -3
- package/dist/src/gateway/hono/routes/workspace.js +0 -62
- package/dist/src/gateway/workspace-heartbeat-path.d.ts +0 -3
- package/dist/src/gateway/workspace-heartbeat-path.js +0 -14
- package/dist/src/migrations/conversation-routing-config.d.ts +0 -2
- package/dist/src/migrations/conversation-routing-config.js +0 -42
- package/dist/src/notifications/proactive-channel.d.ts +0 -8
- package/dist/src/notifications/proactive-channel.js +0 -60
- package/dist/src/notifications/proactive-policy.d.ts +0 -3
- package/dist/src/notifications/proactive-policy.js +0 -35
- package/dist/src/notifications/web-push.d.ts +0 -19
- package/dist/src/notifications/web-push.js +0 -185
- package/dist/src/proactive/actions/service.d.ts +0 -1
- package/dist/src/proactive/actions/service.js +0 -82
- package/dist/src/proactive/events/envelope.d.ts +0 -2
- package/dist/src/proactive/events/envelope.js +0 -54
- package/dist/src/proactive/events/product-event-bridge.d.ts +0 -7
- package/dist/src/proactive/events/product-event-bridge.js +0 -87
- package/dist/src/proactive/events/publisher.d.ts +0 -4
- package/dist/src/proactive/events/repository.d.ts +0 -9
- package/dist/src/proactive/events/repository.js +0 -63
- package/dist/src/proactive/events/types.d.ts +0 -44
- package/dist/src/proactive/events/types.js +0 -15
- package/dist/src/proactive/execution/agent-executor.d.ts +0 -21
- package/dist/src/proactive/execution/agent-executor.js +0 -125
- package/dist/src/proactive/execution/authorization.d.ts +0 -7
- package/dist/src/proactive/execution/authorization.js +0 -71
- package/dist/src/proactive/execution/context.d.ts +0 -49
- package/dist/src/proactive/execution/context.js +0 -408
- package/dist/src/proactive/execution/insight.d.ts +0 -14
- package/dist/src/proactive/execution/insight.js +0 -132
- package/dist/src/proactive/execution/repository.d.ts +0 -28
- package/dist/src/proactive/execution/repository.js +0 -211
- package/dist/src/proactive/execution/types.d.ts +0 -80
- package/dist/src/proactive/execution/worker.d.ts +0 -15
- package/dist/src/proactive/execution/worker.js +0 -146
- package/dist/src/proactive/experience.d.ts +0 -89
- package/dist/src/proactive/experience.js +0 -195
- package/dist/src/proactive/follow-ups.d.ts +0 -128
- package/dist/src/proactive/follow-ups.js +0 -182
- package/dist/src/proactive/inbox/cards.d.ts +0 -21
- package/dist/src/proactive/inbox/cards.js +0 -276
- package/dist/src/proactive/inbox/delivery.d.ts +0 -6
- package/dist/src/proactive/inbox/delivery.js +0 -54
- package/dist/src/proactive/inbox/digest.d.ts +0 -8
- package/dist/src/proactive/inbox/digest.js +0 -123
- package/dist/src/proactive/inbox/lifecycle.d.ts +0 -4
- package/dist/src/proactive/inbox/lifecycle.js +0 -62
- package/dist/src/proactive/inbox/notification-policy.d.ts +0 -1
- package/dist/src/proactive/inbox/notification-policy.js +0 -25
- package/dist/src/proactive/inbox/repository.d.ts +0 -25
- package/dist/src/proactive/inbox/repository.js +0 -244
- package/dist/src/proactive/inbox/service.d.ts +0 -23
- package/dist/src/proactive/inbox/service.js +0 -46
- package/dist/src/proactive/inbox/types.d.ts +0 -64
- package/dist/src/proactive/inbox/worker.d.ts +0 -13
- package/dist/src/proactive/inbox/worker.js +0 -71
- package/dist/src/proactive/index.d.ts +0 -20
- package/dist/src/proactive/index.js +0 -14
- package/dist/src/proactive/mail-thread.d.ts +0 -13
- package/dist/src/proactive/mail-thread.js +0 -55
- package/dist/src/proactive/maintenance.d.ts +0 -4
- package/dist/src/proactive/maintenance.js +0 -28
- package/dist/src/proactive/metrics.d.ts +0 -10
- package/dist/src/proactive/metrics.js +0 -28
- package/dist/src/proactive/policy/presence.d.ts +0 -2
- package/dist/src/proactive/policy/presence.js +0 -30
- package/dist/src/proactive/policy/service.d.ts +0 -54
- package/dist/src/proactive/policy/service.js +0 -123
- package/dist/src/proactive/routing/batch-repository.d.ts +0 -27
- package/dist/src/proactive/routing/batch-repository.js +0 -57
- package/dist/src/proactive/routing/matcher.d.ts +0 -5
- package/dist/src/proactive/routing/matcher.js +0 -57
- package/dist/src/proactive/routing/types.d.ts +0 -44
- package/dist/src/proactive/routing/types.js +0 -1
- package/dist/src/proactive/scenarios/control.d.ts +0 -52
- package/dist/src/proactive/scenarios/control.js +0 -75
- package/dist/src/proactive/scenarios/prompt-composer.d.ts +0 -14
- package/dist/src/proactive/scenarios/prompt-composer.js +0 -26
- package/dist/src/proactive/scenarios/repository.d.ts +0 -23
- package/dist/src/proactive/scenarios/repository.js +0 -174
- package/dist/src/proactive/scenarios/service.d.ts +0 -15
- package/dist/src/proactive/scenarios/service.js +0 -26
- package/dist/src/proactive/scenarios/types.d.ts +0 -43
- package/dist/src/proactive/scenarios/types.js +0 -1
- package/dist/src/proactive/service.d.ts +0 -25
- package/dist/src/proactive/service.js +0 -78
- package/dist/src/proactive/source-freshness.d.ts +0 -8
- package/dist/src/proactive/source-freshness.js +0 -28
- package/dist/src/proactive/status.d.ts +0 -2
- package/dist/src/proactive/status.js +0 -22
- package/dist/src/proactive/temporal/schedule.d.ts +0 -3
- package/dist/src/proactive/temporal/schedule.js +0 -68
- package/dist/src/proactive/temporal/worker.d.ts +0 -17
- package/dist/src/proactive/temporal/worker.js +0 -129
- package/dist/src/tasks/project-monitoring-service.d.ts +0 -32
- package/dist/src/tasks/project-monitoring-service.js +0 -118
- /package/dist/src/{proactive/execution → connectors/cli}/types.js +0 -0
- /package/dist/src/{proactive/events/publisher.js → notifications/domain-delivery.js} +0 -0
- /package/dist/src/{proactive/inbox/types.js → scenes/httpServices.js} +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../../../storage/sqlite/transaction.js";
|
|
2
|
+
import { hasGatewayScope } from "../../security/gateway-scopes.js";
|
|
3
|
+
import { getConnectorAccount, init_connector_account_repository, listConnectorAccounts, updateConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
4
|
+
import { getConnectorConnection, getConnectorInstallation, init_connector_repository, listConnectorConnections, upsertConnectorConnection, upsertConnectorInstallation } from "../../../storage/sqlite/connector-repository.js";
|
|
5
|
+
import { cancelCliContext, cliContextPath, resolveCliArtifact } from "../../../connectors/cli/process.js";
|
|
6
|
+
import { cliAuthorizationView, readCliAuthorization, recoverCliExecutions } from "../../../connectors/cli/store.js";
|
|
7
|
+
import { cancelCliAuthorization, requireCliInstance, startCliAuthorization } from "../../../connectors/cli/authorization.js";
|
|
8
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { readFile } from "node:fs/promises";
|
|
11
|
+
//#region src/gateway/hono/routes/cli-connectors.ts
|
|
12
|
+
init_connector_account_repository();
|
|
13
|
+
init_connector_repository();
|
|
14
|
+
init_transaction();
|
|
15
|
+
function registerCliConnectorRoutes(app, deps) {
|
|
16
|
+
const admin = async (c, next) => {
|
|
17
|
+
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin")) return c.json({
|
|
18
|
+
ok: false,
|
|
19
|
+
error: "Connector administration requires gateway.admin."
|
|
20
|
+
}, 403);
|
|
21
|
+
c.header("Cache-Control", "no-store");
|
|
22
|
+
await next();
|
|
23
|
+
};
|
|
24
|
+
const config = () => deps.service.currentConfig;
|
|
25
|
+
const failure = (error) => ({
|
|
26
|
+
ok: false,
|
|
27
|
+
error: error instanceof Error ? error.message : "Connector request failed."
|
|
28
|
+
});
|
|
29
|
+
app.get("/api/connectors/executions/:executionId/artifact", admin, async (c) => {
|
|
30
|
+
const id = c.req.param("executionId");
|
|
31
|
+
if (!/^[a-f0-9-]{36}$/.test(id)) return c.json({
|
|
32
|
+
ok: false,
|
|
33
|
+
error: "Artifact not found."
|
|
34
|
+
}, 404);
|
|
35
|
+
const row = getSqliteDatabase().prepare("SELECT connection_id, instance_id FROM connector_cli_executions WHERE id = ? AND status = 'success'").get(id);
|
|
36
|
+
const connection = row ? getConnectorConnection(row.connection_id) : void 0;
|
|
37
|
+
if (!connection || connection.principalId !== "local-owner" || connection.provider !== "cli") return c.json({
|
|
38
|
+
ok: false,
|
|
39
|
+
error: "Artifact not found."
|
|
40
|
+
}, 404);
|
|
41
|
+
try {
|
|
42
|
+
requireCliInstance(config(), row.instance_id, { allowDisabled: true });
|
|
43
|
+
const contextId = String(connection.metadata.contextId);
|
|
44
|
+
const file = await resolveCliArtifact(contextId, join(cliContextPath(contextId), "files", `${id}.json`));
|
|
45
|
+
c.header("Content-Type", "application/json");
|
|
46
|
+
c.header("Cache-Control", "no-store");
|
|
47
|
+
c.header("Content-Disposition", `attachment; filename="${id}.json"`);
|
|
48
|
+
return c.body(new Uint8Array(await readFile(file)));
|
|
49
|
+
} catch {
|
|
50
|
+
return c.json({
|
|
51
|
+
ok: false,
|
|
52
|
+
error: "Artifact not found."
|
|
53
|
+
}, 404);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
app.get("/api/connectors/:id/executions", admin, (c) => {
|
|
57
|
+
try {
|
|
58
|
+
const id = c.req.param("id");
|
|
59
|
+
requireCliInstance(config(), id, { allowDisabled: true });
|
|
60
|
+
recoverCliExecutions();
|
|
61
|
+
const executions = getSqliteDatabase().prepare("SELECT id, account_id, action_id, status, error_kind, started_at, finished_at FROM connector_cli_executions WHERE instance_id = ? ORDER BY started_at DESC LIMIT 25").all(id);
|
|
62
|
+
return c.json({
|
|
63
|
+
ok: true,
|
|
64
|
+
payload: { executions }
|
|
65
|
+
});
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return c.json(failure(error), 400);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
app.get("/api/connectors/:id/accounts", admin, (c) => {
|
|
71
|
+
try {
|
|
72
|
+
const instanceId = c.req.param("id");
|
|
73
|
+
requireCliInstance(config(), instanceId, { allowDisabled: true });
|
|
74
|
+
const connections = listConnectorConnections({ principalId: "local-owner" });
|
|
75
|
+
const accounts = listConnectorAccounts({ principalId: "local-owner" }).filter((account) => account.runtimeInstanceId === instanceId).map((account) => ({
|
|
76
|
+
id: account.id,
|
|
77
|
+
label: account.label,
|
|
78
|
+
identity: account.identity,
|
|
79
|
+
enabled: account.enabled,
|
|
80
|
+
status: connections.find((connection) => connection.id === account.currentConnectionId)?.status ?? "unknown"
|
|
81
|
+
}));
|
|
82
|
+
const policy = getConnectorInstallation(`${instanceId}-local-owner`);
|
|
83
|
+
const active = getSqliteDatabase().prepare("SELECT id FROM connector_cli_authorizations WHERE instance_id = ? AND principal_id = 'local-owner' AND phase IN ('preparing','awaiting_user','verifying')").get(instanceId);
|
|
84
|
+
const attempt = active ? readCliAuthorization(active.id) : void 0;
|
|
85
|
+
return c.json({
|
|
86
|
+
ok: true,
|
|
87
|
+
payload: {
|
|
88
|
+
accounts,
|
|
89
|
+
policy,
|
|
90
|
+
authorization: attempt ? cliAuthorizationView(attempt) : void 0
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
} catch (error) {
|
|
94
|
+
return c.json(failure(error), 400);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
app.post("/api/connectors/:id/authorizations", admin, deps.strictRateLimitMiddleware, async (c) => {
|
|
98
|
+
try {
|
|
99
|
+
const body = await c.req.json().catch(() => ({}));
|
|
100
|
+
const authorization = startCliAuthorization(config(), c.req.param("id"), typeof body.accountId === "string" ? body.accountId : void 0);
|
|
101
|
+
return c.json({
|
|
102
|
+
ok: true,
|
|
103
|
+
payload: { authorization }
|
|
104
|
+
});
|
|
105
|
+
} catch (error) {
|
|
106
|
+
return c.json(failure(error), 400);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
app.get("/api/connectors/authorizations/:attemptId", admin, (c) => {
|
|
110
|
+
const row = readCliAuthorization(c.req.param("attemptId"));
|
|
111
|
+
return row ? c.json({
|
|
112
|
+
ok: true,
|
|
113
|
+
payload: { authorization: cliAuthorizationView(row) }
|
|
114
|
+
}) : c.json({
|
|
115
|
+
ok: false,
|
|
116
|
+
error: "Authorization not found."
|
|
117
|
+
}, 404);
|
|
118
|
+
});
|
|
119
|
+
app.post("/api/connectors/authorizations/:attemptId/cancel", admin, (c) => {
|
|
120
|
+
try {
|
|
121
|
+
cancelCliAuthorization(c.req.param("attemptId"));
|
|
122
|
+
return c.json({ ok: true });
|
|
123
|
+
} catch (error) {
|
|
124
|
+
return c.json(failure(error), 404);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
app.get("/api/connectors/authorizations/:attemptId/artifact", admin, async (c) => {
|
|
128
|
+
const row = readCliAuthorization(c.req.param("attemptId"));
|
|
129
|
+
if (!row || row.phase !== "awaiting_user" || !row.challenge_json || JSON.parse(row.challenge_json).type !== "qr_code") return c.json({
|
|
130
|
+
ok: false,
|
|
131
|
+
error: "QR code unavailable."
|
|
132
|
+
}, 404);
|
|
133
|
+
try {
|
|
134
|
+
const bytes = await readFile(await resolveCliArtifact(row.context_id, join(cliContextPath(row.context_id), "files", "authorization.png")));
|
|
135
|
+
if (!bytes.subarray(0, 8).equals(Buffer.from([
|
|
136
|
+
137,
|
|
137
|
+
80,
|
|
138
|
+
78,
|
|
139
|
+
71,
|
|
140
|
+
13,
|
|
141
|
+
10,
|
|
142
|
+
26,
|
|
143
|
+
10
|
|
144
|
+
]))) throw new Error("Invalid QR image.");
|
|
145
|
+
c.header("Content-Type", "image/png");
|
|
146
|
+
c.header("Cache-Control", "no-store");
|
|
147
|
+
return c.body(new Uint8Array(bytes));
|
|
148
|
+
} catch (error) {
|
|
149
|
+
return c.json(failure(error), 404);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
app.patch("/api/connectors/:id/policy", admin, async (c) => {
|
|
153
|
+
try {
|
|
154
|
+
const id = c.req.param("id");
|
|
155
|
+
requireCliInstance(config(), id, { allowDisabled: true });
|
|
156
|
+
const policy = getConnectorInstallation(`${id}-local-owner`);
|
|
157
|
+
if (!policy) throw new Error("Connector policy not found.");
|
|
158
|
+
const body = await c.req.json();
|
|
159
|
+
if (!["read", "write"].includes(body.maxScope)) throw new Error("Select read or write scope.");
|
|
160
|
+
const updated = upsertConnectorInstallation({
|
|
161
|
+
...policy,
|
|
162
|
+
maxScope: body.maxScope,
|
|
163
|
+
confirmationPolicy: "writes"
|
|
164
|
+
});
|
|
165
|
+
return c.json({
|
|
166
|
+
ok: true,
|
|
167
|
+
payload: { policy: updated }
|
|
168
|
+
});
|
|
169
|
+
} catch (error) {
|
|
170
|
+
return c.json(failure(error), 400);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
app.patch("/api/connectors/accounts/:accountId", admin, async (c) => {
|
|
174
|
+
try {
|
|
175
|
+
const id = c.req.param("accountId");
|
|
176
|
+
const account = getConnectorAccount(id);
|
|
177
|
+
if (account?.principalId !== "local-owner" || !account.runtimeInstanceId) throw new Error("CLI account not found.");
|
|
178
|
+
requireCliInstance(config(), account.runtimeInstanceId, { allowDisabled: true });
|
|
179
|
+
const body = await c.req.json();
|
|
180
|
+
if (body.label !== void 0 && typeof body.label !== "string" || body.enabled !== void 0 && typeof body.enabled !== "boolean") throw new Error("Invalid account update.");
|
|
181
|
+
return c.json({
|
|
182
|
+
ok: true,
|
|
183
|
+
payload: { account: updateConnectorAccount(id, {
|
|
184
|
+
label: body.label,
|
|
185
|
+
enabled: body.enabled
|
|
186
|
+
}) }
|
|
187
|
+
});
|
|
188
|
+
} catch (error) {
|
|
189
|
+
return c.json(failure(error), 400);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
app.delete("/api/connectors/accounts/:accountId", admin, (c) => {
|
|
193
|
+
try {
|
|
194
|
+
const id = c.req.param("accountId");
|
|
195
|
+
const account = getConnectorAccount(id);
|
|
196
|
+
if (account?.principalId !== "local-owner" || !account.runtimeInstanceId) throw new Error("CLI account not found.");
|
|
197
|
+
requireCliInstance(config(), account.runtimeInstanceId, { allowDisabled: true });
|
|
198
|
+
updateConnectorAccount(id, { enabled: false });
|
|
199
|
+
for (const connection of listConnectorConnections({ principalId: "local-owner" }).filter((connection) => connection.accountId === id && connection.provider === "cli")) {
|
|
200
|
+
cancelCliContext(String(connection.metadata.contextId));
|
|
201
|
+
upsertConnectorConnection({
|
|
202
|
+
...connection,
|
|
203
|
+
status: "disabled"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return c.json({
|
|
207
|
+
ok: true,
|
|
208
|
+
payload: {
|
|
209
|
+
localDisconnected: true,
|
|
210
|
+
remotelyRevoked: false
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
} catch (error) {
|
|
214
|
+
return c.json(failure(error), 400);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
export { registerCliConnectorRoutes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `PATCH /api/config` — `body.gateway.*` section.
|
|
3
3
|
*
|
|
4
|
-
* Covers
|
|
4
|
+
* Covers bind/customBindHost/port, tailscale, auth (mode + token +
|
|
5
5
|
* password + rateLimit + trustedProxy), trustedProxies, allowRealIpFallback,
|
|
6
6
|
* dangerouslyAllowHostHeaderOriginFallback, security, share, siteShare, publicUrl, webchat,
|
|
7
7
|
* corsOrigins and channelConnectDefer{Mode,Ids,SkipIds}.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* specific `message`. The dispatcher converts these into `c.json(...)`.
|
|
11
11
|
*
|
|
12
12
|
* Initial-state branches use the same literal defaults the inline code did
|
|
13
|
-
* (loopback + port 18790 +
|
|
13
|
+
* (loopback + port 18790 + empty CORS) so
|
|
14
14
|
* a brand-new install gets a working gateway after the first PATCH.
|
|
15
15
|
*/
|
|
16
16
|
import type { Config } from '../../../../config/schema.js';
|
|
@@ -15,11 +15,6 @@ function ensureGateway(config) {
|
|
|
15
15
|
if (!config.gateway) config.gateway = {
|
|
16
16
|
bind: "loopback",
|
|
17
17
|
port: 18790,
|
|
18
|
-
heartbeat: {
|
|
19
|
-
enabled: true,
|
|
20
|
-
intervalMs: 18e5,
|
|
21
|
-
includeSystemPromptSection: false
|
|
22
|
-
},
|
|
23
18
|
corsOrigins: []
|
|
24
19
|
};
|
|
25
20
|
return config.gateway;
|
|
@@ -40,45 +35,6 @@ function applyGatewayPatch(config, body) {
|
|
|
40
35
|
activityDetailDefault: level
|
|
41
36
|
};
|
|
42
37
|
}
|
|
43
|
-
if (body.gateway?.heartbeat !== void 0 && typeof body.gateway.heartbeat === "object") {
|
|
44
|
-
const gw = ensureGateway(config);
|
|
45
|
-
if (!gw.heartbeat) gw.heartbeat = {
|
|
46
|
-
enabled: true,
|
|
47
|
-
intervalMs: 18e5,
|
|
48
|
-
includeSystemPromptSection: false
|
|
49
|
-
};
|
|
50
|
-
const h = gw.heartbeat;
|
|
51
|
-
const p = body.gateway.heartbeat;
|
|
52
|
-
if (p.enabled !== void 0) h.enabled = Boolean(p.enabled);
|
|
53
|
-
if (p.intervalMs !== void 0 && typeof p.intervalMs === "number" && Number.isFinite(p.intervalMs)) h.intervalMs = p.intervalMs;
|
|
54
|
-
if (p.includeSystemPromptSection !== void 0) h.includeSystemPromptSection = Boolean(p.includeSystemPromptSection);
|
|
55
|
-
if (p.target !== void 0) if (p.target === null || p.target === "") delete h.target;
|
|
56
|
-
else h.target = String(p.target);
|
|
57
|
-
if (p.targetChatId !== void 0) if (p.targetChatId === null || p.targetChatId === "") delete h.targetChatId;
|
|
58
|
-
else h.targetChatId = String(p.targetChatId);
|
|
59
|
-
if (p.prompt !== void 0) if (p.prompt === null || p.prompt === "") delete h.prompt;
|
|
60
|
-
else h.prompt = String(p.prompt);
|
|
61
|
-
if (p.ackMaxChars !== void 0) {
|
|
62
|
-
if (p.ackMaxChars === null || p.ackMaxChars === "") delete h.ackMaxChars;
|
|
63
|
-
else if (typeof p.ackMaxChars === "number" && Number.isFinite(p.ackMaxChars)) h.ackMaxChars = p.ackMaxChars;
|
|
64
|
-
}
|
|
65
|
-
if (p.isolatedSession !== void 0) if (p.isolatedSession === null || p.isolatedSession === false) delete h.isolatedSession;
|
|
66
|
-
else h.isolatedSession = Boolean(p.isolatedSession);
|
|
67
|
-
if (p.activeHours !== void 0) {
|
|
68
|
-
if (p.activeHours === null) delete h.activeHours;
|
|
69
|
-
else if (typeof p.activeHours === "object" && p.activeHours !== null) {
|
|
70
|
-
const ah = p.activeHours;
|
|
71
|
-
const start = typeof ah.start === "string" ? ah.start : "";
|
|
72
|
-
const end = typeof ah.end === "string" ? ah.end : "";
|
|
73
|
-
if (start && end) h.activeHours = {
|
|
74
|
-
start,
|
|
75
|
-
end,
|
|
76
|
-
...typeof ah.timezone === "string" && ah.timezone.trim() ? { timezone: ah.timezone } : {}
|
|
77
|
-
};
|
|
78
|
-
else delete h.activeHours;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
38
|
if (body.gateway?.bind !== void 0) {
|
|
83
39
|
const bindModes = new Set([
|
|
84
40
|
"auto",
|
|
@@ -92,11 +48,6 @@ function applyGatewayPatch(config, body) {
|
|
|
92
48
|
if (!config.gateway) config.gateway = {
|
|
93
49
|
bind,
|
|
94
50
|
port: 18790,
|
|
95
|
-
heartbeat: {
|
|
96
|
-
enabled: true,
|
|
97
|
-
intervalMs: 18e5,
|
|
98
|
-
includeSystemPromptSection: false
|
|
99
|
-
},
|
|
100
51
|
corsOrigins: []
|
|
101
52
|
};
|
|
102
53
|
else config.gateway.bind = bind;
|
|
@@ -116,11 +67,6 @@ function applyGatewayPatch(config, body) {
|
|
|
116
67
|
if (!config.gateway) config.gateway = {
|
|
117
68
|
bind: "loopback",
|
|
118
69
|
port: Math.floor(body.gateway.port),
|
|
119
|
-
heartbeat: {
|
|
120
|
-
enabled: true,
|
|
121
|
-
intervalMs: 18e5,
|
|
122
|
-
includeSystemPromptSection: false
|
|
123
|
-
},
|
|
124
70
|
corsOrigins: []
|
|
125
71
|
};
|
|
126
72
|
else config.gateway.port = Math.floor(body.gateway.port);
|
|
@@ -131,11 +77,6 @@ function applyGatewayPatch(config, body) {
|
|
|
131
77
|
bind: "loopback",
|
|
132
78
|
port: 18790,
|
|
133
79
|
auth: { mode: "token" },
|
|
134
|
-
heartbeat: {
|
|
135
|
-
enabled: true,
|
|
136
|
-
intervalMs: 18e5,
|
|
137
|
-
includeSystemPromptSection: false
|
|
138
|
-
},
|
|
139
80
|
corsOrigins: []
|
|
140
81
|
};
|
|
141
82
|
config.gateway.tailscale = { ...config.gateway.tailscale ?? {
|
|
@@ -20,21 +20,6 @@ function registerConfigRoutes(authenticated, deps) {
|
|
|
20
20
|
payload: result
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
|
-
authenticated.post("/api/heartbeat/trigger", strictRateLimitMiddleware, async (c) => {
|
|
24
|
-
let reason = "manual";
|
|
25
|
-
try {
|
|
26
|
-
const body = await c.req.json();
|
|
27
|
-
if (body && typeof body === "object" && typeof body.reason === "string") {
|
|
28
|
-
const r = body.reason.trim();
|
|
29
|
-
if (r) reason = r.slice(0, 120);
|
|
30
|
-
}
|
|
31
|
-
} catch {}
|
|
32
|
-
service.requestHeartbeatNow({ reason });
|
|
33
|
-
return c.json({
|
|
34
|
-
ok: true,
|
|
35
|
-
payload: { scheduled: true }
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
23
|
authenticated.get("/api/config", async (c) => {
|
|
39
24
|
const safeConfig = await buildSafeWebConfigPayload(service, { locale: localeFromRequest(c) });
|
|
40
25
|
return c.json({
|
|
@@ -86,7 +71,6 @@ function registerConfigRoutes(authenticated, deps) {
|
|
|
86
71
|
error: result.error
|
|
87
72
|
}, 500);
|
|
88
73
|
prepareLocalVoiceModelAfterProviderSwitch(previousSttProvider, service.currentConfig);
|
|
89
|
-
if (body.gateway?.heartbeat !== void 0 && typeof body.gateway.heartbeat === "object") service.reloadHeartbeatFromCurrentConfig();
|
|
90
74
|
const safeConfig = await buildSafeWebConfigPayload(service, { locale: localeFromRequest(c) });
|
|
91
75
|
return c.json({
|
|
92
76
|
ok: true,
|
|
@@ -2,7 +2,7 @@ import { createLogger } from "../../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
3
|
import { hasGatewayScope } from "../../security/gateway-scopes.js";
|
|
4
4
|
import { listConnectorLearningJobs } from "../../../storage/sqlite/connector-learning-repository.js";
|
|
5
|
-
import { getConnectorAccount, init_connector_account_repository, updateConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
5
|
+
import { getConnectorAccount, init_connector_account_repository, listConnectorAccounts, updateConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
6
6
|
import { decideConnectorApproval, getConnectorApproval, listConnectorApprovals, listConnectorConnections } from "../../../storage/sqlite/connector-repository.js";
|
|
7
7
|
import { getConnectorSyncPolicy, upsertConnectorSyncPolicy } from "../../../storage/sqlite/connector-sync-policy-repository.js";
|
|
8
8
|
import "../../../storage/sqlite/index.js";
|
|
@@ -33,6 +33,7 @@ import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
|
33
33
|
import { projectComposioConnectionStatus } from "../../../connectors/runtime-status.js";
|
|
34
34
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
35
35
|
import { markContextSourceAssertionsForReview } from "./context-sources.js";
|
|
36
|
+
import { registerCliConnectorRoutes } from "./cli-connectors.js";
|
|
36
37
|
//#region src/gateway/hono/routes/connectors.ts
|
|
37
38
|
init_logger();
|
|
38
39
|
init_agent_scope();
|
|
@@ -45,6 +46,7 @@ function defaultConnectorSyncInterval(connectorId) {
|
|
|
45
46
|
return definition?.runtime.type === "composio" && definition.runtime.role === "toolkit" ? getConnectorLearningPlan(definition.runtime.toolkit)?.intervalMinutes ?? 30 : 30;
|
|
46
47
|
}
|
|
47
48
|
function registerConnectorRoutes(authenticated, deps) {
|
|
49
|
+
registerCliConnectorRoutes(authenticated, deps);
|
|
48
50
|
const log = createLogger("Connectors:Routes");
|
|
49
51
|
const { service, strictRateLimitMiddleware } = deps;
|
|
50
52
|
authenticated.get("/api/connectors/catalog", (c) => {
|
|
@@ -62,6 +64,21 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
62
64
|
authenticated.get("/api/connectors/installed", async (c) => {
|
|
63
65
|
const config = service.currentConfig;
|
|
64
66
|
const instances = await Promise.all(listConnectorInstances(config).map(async (instance) => {
|
|
67
|
+
if (instance.enabled && instance.materialized.type === "cli") {
|
|
68
|
+
const connected = listConnectorAccounts({
|
|
69
|
+
principalId: "local-owner",
|
|
70
|
+
connectorId: instance.connectorId
|
|
71
|
+
}).some((account) => account.enabled && account.currentConnectionId && listConnectorConnections({
|
|
72
|
+
principalId: "local-owner",
|
|
73
|
+
connectorId: instance.connectorId
|
|
74
|
+
}).some((connection) => connection.id === account.currentConnectionId && connection.status === "active" && connection.provider === "cli" && connection.metadata.runtimeInstanceId === instance.instanceId));
|
|
75
|
+
return {
|
|
76
|
+
...instance,
|
|
77
|
+
status: connected ? "connected" : "installed",
|
|
78
|
+
authStatus: connected ? "connected" : "missing",
|
|
79
|
+
connectionStatus: connected ? "connected" : "disconnected"
|
|
80
|
+
};
|
|
81
|
+
}
|
|
65
82
|
if (!instance.enabled || instance.materialized.type !== "mcp") return instance;
|
|
66
83
|
const server = config.mcp?.servers?.[instance.materialized.serverId];
|
|
67
84
|
if (!server) return instance;
|
|
@@ -232,9 +249,7 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
232
249
|
const policy = getConnectorSyncPolicy(account.id) ?? {
|
|
233
250
|
accountId: account.id,
|
|
234
251
|
scanEnabled: false,
|
|
235
|
-
proactiveEnabled: false,
|
|
236
252
|
intervalMinutes: defaultConnectorSyncInterval(account.connectorId),
|
|
237
|
-
allowedScenarioKeys: [],
|
|
238
253
|
revision: 0,
|
|
239
254
|
updatedAt: account.updatedAt
|
|
240
255
|
};
|
|
@@ -255,32 +270,16 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
255
270
|
ok: false,
|
|
256
271
|
error: "scanEnabled must be a boolean."
|
|
257
272
|
}, 400);
|
|
258
|
-
if (row.proactiveEnabled !== void 0 && typeof row.proactiveEnabled !== "boolean") return c.json({
|
|
259
|
-
ok: false,
|
|
260
|
-
error: "proactiveEnabled must be a boolean."
|
|
261
|
-
}, 400);
|
|
262
273
|
if (row.intervalMinutes !== void 0 && (!Number.isInteger(row.intervalMinutes) || Number(row.intervalMinutes) < 5 || Number(row.intervalMinutes) > 1440)) return c.json({
|
|
263
274
|
ok: false,
|
|
264
275
|
error: "intervalMinutes must be an integer from 5 to 1440."
|
|
265
276
|
}, 400);
|
|
266
|
-
const allowedScenarioKeys = row.allowedScenarioKeys === void 0 ? void 0 : Array.isArray(row.allowedScenarioKeys) ? [...new Set(row.allowedScenarioKeys.filter((value) => typeof value === "string").map((value) => value.trim()).filter(Boolean))] : null;
|
|
267
|
-
if (allowedScenarioKeys === null) return c.json({
|
|
268
|
-
ok: false,
|
|
269
|
-
error: "allowedScenarioKeys must be an array of strings."
|
|
270
|
-
}, 400);
|
|
271
|
-
const knownScenarioKeys = new Set(service.proactiveScenarios.list().map((scenario) => scenario.key));
|
|
272
|
-
if (allowedScenarioKeys?.some((key) => !knownScenarioKeys.has(key))) return c.json({
|
|
273
|
-
ok: false,
|
|
274
|
-
error: "allowedScenarioKeys contains an unknown scenario."
|
|
275
|
-
}, 400);
|
|
276
277
|
const previous = getConnectorSyncPolicy(account.id);
|
|
277
278
|
const policy = upsertConnectorSyncPolicy({
|
|
278
279
|
accountId: account.id,
|
|
279
280
|
defaultIntervalMinutes: defaultConnectorSyncInterval(account.connectorId),
|
|
280
281
|
...typeof row.scanEnabled === "boolean" ? { scanEnabled: row.scanEnabled } : {},
|
|
281
|
-
...typeof row.
|
|
282
|
-
...typeof row.intervalMinutes === "number" ? { intervalMinutes: row.intervalMinutes } : {},
|
|
283
|
-
...allowedScenarioKeys ? { allowedScenarioKeys } : {}
|
|
282
|
+
...typeof row.intervalMinutes === "number" ? { intervalMinutes: row.intervalMinutes } : {}
|
|
284
283
|
});
|
|
285
284
|
const connectionId = account.currentConnectionId;
|
|
286
285
|
if (connectionId && !policy.scanEnabled) {
|
|
@@ -884,12 +883,12 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
884
883
|
ok: false,
|
|
885
884
|
error: `Connector instance not found: ${instanceId}`
|
|
886
885
|
}, 404);
|
|
887
|
-
if (instance.materialized.type !== "mcp") return c.json({
|
|
886
|
+
if (instance.materialized.type !== "mcp" && instance.materialized.type !== "cli") return c.json({
|
|
888
887
|
ok: false,
|
|
889
888
|
error: `Connector type "${instance.materialized.type}" does not support MCP health checks.`
|
|
890
889
|
}, 400);
|
|
891
890
|
try {
|
|
892
|
-
const result = await testConnectorInstance(config, instance.materialized.serverId);
|
|
891
|
+
const result = await testConnectorInstance(config, instance.materialized.type === "mcp" ? instance.materialized.serverId : instance.instanceId);
|
|
893
892
|
await persistConfigMutation({
|
|
894
893
|
config,
|
|
895
894
|
mutate: () => recordConnectorHealthUsage(config, instance.instanceId, result),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MiddlewareHandler } from 'hono';
|
|
2
2
|
import type { GatewayService } from '../../service.js';
|
|
3
|
+
import type { SceneHttpServices } from '../../../scenes/httpServices.js';
|
|
3
4
|
export interface AuthenticatedRouteDeps {
|
|
4
5
|
service: GatewayService;
|
|
5
6
|
strictRateLimitMiddleware: MiddlewareHandler;
|
|
@@ -8,4 +9,5 @@ export interface AuthenticatedRouteDeps {
|
|
|
8
9
|
taskRateLimitMiddleware?: MiddlewareHandler;
|
|
9
10
|
xopcCloudPollRateLimitMiddleware: MiddlewareHandler;
|
|
10
11
|
channelRateLimitMiddleware?: MiddlewareHandler;
|
|
12
|
+
scenes?: SceneHttpServices;
|
|
11
13
|
}
|
|
@@ -36,15 +36,11 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
id: "
|
|
40
|
-
match: (path) => startsWithAny(path, [
|
|
41
|
-
"/api/proactive",
|
|
42
|
-
"/api/inbox/judgments",
|
|
43
|
-
"/api/internal/proactive"
|
|
44
|
-
]),
|
|
39
|
+
id: "scenes",
|
|
40
|
+
match: (path) => startsWithAny(path, ["/api/scenes"]),
|
|
45
41
|
load: async () => {
|
|
46
|
-
const {
|
|
47
|
-
return { register:
|
|
42
|
+
const { registerSceneRoutes } = await import("./scenes.js");
|
|
43
|
+
return { register: registerSceneRoutes };
|
|
48
44
|
}
|
|
49
45
|
},
|
|
50
46
|
{
|
|
@@ -71,14 +67,6 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
71
67
|
return { register: registerFilesRoutes };
|
|
72
68
|
}
|
|
73
69
|
},
|
|
74
|
-
{
|
|
75
|
-
id: "workspace",
|
|
76
|
-
match: (path) => startsWithAny(path, ["/api/workspace"]),
|
|
77
|
-
load: async () => {
|
|
78
|
-
const { registerWorkspaceRoutes } = await import("./workspace.js");
|
|
79
|
-
return { register: registerWorkspaceRoutes };
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
70
|
{
|
|
83
71
|
id: "host-fs",
|
|
84
72
|
match: (path) => startsWithAny(path, ["/api/host/fs"]),
|
|
@@ -123,7 +111,6 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
123
111
|
id: "config",
|
|
124
112
|
match: (path) => startsWithAny(path, [
|
|
125
113
|
"/api/config",
|
|
126
|
-
"/api/heartbeat/trigger",
|
|
127
114
|
"/api/gateway/reveal-auth-secret",
|
|
128
115
|
"/api/tools/web/reveal-search-api-key"
|
|
129
116
|
]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
3
|
import { getSqliteDatabase } from "../../../storage/sqlite/transaction.js";
|
|
4
|
-
import { getSessionMetadata } from "../../../storage/sqlite/session-repository.js";
|
|
4
|
+
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
5
5
|
import { loadTranscriptRowsForSession } from "../../../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import "../../../storage/sqlite/index.js";
|
|
7
7
|
import { ActivityService } from "../../../activity/service.js";
|
|
@@ -138,7 +138,6 @@ function registerPublicGatewayRoutes(app, service) {
|
|
|
138
138
|
"DELETE /api/providers/:providerId/key",
|
|
139
139
|
"PATCH /api/config",
|
|
140
140
|
"POST /api/config/reload",
|
|
141
|
-
"POST /api/heartbeat/trigger",
|
|
142
141
|
"... /api/automations/*",
|
|
143
142
|
"... /api/automation-runs/*",
|
|
144
143
|
"GET/PATCH /api/sessions/:key/agent-config",
|