@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
|
@@ -5,7 +5,7 @@ import { appendProductDeliveryText } from "../../../packages/gateway-contract/sr
|
|
|
5
5
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
6
6
|
import { enqueueTaskChangedEvent } from "../../tasks/task-change-events.js";
|
|
7
7
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
8
|
-
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
8
|
+
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
9
9
|
import "../../storage/sqlite/index.js";
|
|
10
10
|
import { ObjectLinkService } from "../../activity/service.js";
|
|
11
11
|
import "../../activity/index.js";
|
|
@@ -14,15 +14,11 @@ import { TaskRepository } from "../../tasks/task-repository.js";
|
|
|
14
14
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
15
15
|
import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
16
16
|
import "../../projects/index.js";
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
17
|
+
import { CreateAutomationSchema, UpdateAutomationSchema } from "../../automations/domain/validation.js";
|
|
18
|
+
import "../../automations/index.js";
|
|
19
19
|
import { TaskContextRepository } from "../../tasks/task-context-repository.js";
|
|
20
20
|
import { TaskDependencyError, TaskDependencyService } from "../../tasks/task-dependency-service.js";
|
|
21
21
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
22
|
-
import { getCard } from "../../proactive/inbox/cards.js";
|
|
23
|
-
import { checkDelegation, delegationOverview, startDelegation } from "../../proactive/experience.js";
|
|
24
|
-
import { CreateAutomationSchema, UpdateAutomationSchema } from "../../automations/domain/validation.js";
|
|
25
|
-
import "../../automations/index.js";
|
|
26
22
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
27
23
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
28
24
|
import "../../tasks/index.js";
|
|
@@ -34,7 +30,7 @@ init_resolve_route();
|
|
|
34
30
|
init_transaction();
|
|
35
31
|
const XopcUseToolSchema = Type.Object({
|
|
36
32
|
mode: Type.Union([
|
|
37
|
-
Type.Literal("
|
|
33
|
+
Type.Literal("scene"),
|
|
38
34
|
Type.Literal("project"),
|
|
39
35
|
Type.Literal("automation"),
|
|
40
36
|
Type.Literal("note"),
|
|
@@ -43,7 +39,7 @@ const XopcUseToolSchema = Type.Object({
|
|
|
43
39
|
Type.Literal("local_app"),
|
|
44
40
|
Type.Literal("settings")
|
|
45
41
|
]),
|
|
46
|
-
command: Type.String({ description: "Object command.
|
|
42
|
+
command: Type.String({ description: "Object command. Scene commands: templates, list, get {id}, mail_accounts, mail_search {accountId, query}, mail_sources, read_notes {id}, preflight/start {templateKey, templateVersion, goal, scope, permissions}, configure {id, expectedRevision, goal, scope, permissions}, transition {id, expectedRevision, status: paused|active|completed|archived}, check {id}, notes {id, expectedRevision, content, validUntil?}, work_item {id, subjectId, accountId, dueAt}, update_work_item {workItemId, expectedRevision, dueAt?, status?}, schedule {id, triggerKey, expectedRevision, schedule}, results {id?}, feedback {presentationId, expectedRevision, rating}, mark_read {presentationId, read}, diagnostics, get_preferences, set_preferences {expectedRevision, ...preferences}. Start and check accept a stable requestId for retries. Scenes prepare read-only suggestions and drafts; never send mail. Only create a scene for work explicitly delegated by the user; inspect existing scenes first. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/pause/resume/history, note list/get/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, local_app list/get/create/validate, and settings open." }),
|
|
47
43
|
args: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
48
44
|
dryRun: Type.Optional(Type.Boolean({ description: "Validate and preview the action without mutating xopc state." }))
|
|
49
45
|
});
|
|
@@ -227,6 +223,21 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
227
223
|
]
|
|
228
224
|
};
|
|
229
225
|
}
|
|
226
|
+
} else if (mode === "scene") {
|
|
227
|
+
source = record(resultRecord.activation);
|
|
228
|
+
const id = deliveryText(source?.id);
|
|
229
|
+
if (id) primary = {
|
|
230
|
+
kind: "scene",
|
|
231
|
+
id,
|
|
232
|
+
title: deliveryText(source?.goal) ?? "Scene",
|
|
233
|
+
status: deliveryText(source?.status),
|
|
234
|
+
revision: deliveryRevision(source?.revision),
|
|
235
|
+
capabilities: [
|
|
236
|
+
"open",
|
|
237
|
+
"edit",
|
|
238
|
+
"continue_in_chat"
|
|
239
|
+
]
|
|
240
|
+
};
|
|
230
241
|
} else if (mode === "note") {
|
|
231
242
|
source = record(resultRecord.note);
|
|
232
243
|
const id = deliveryText(source?.id);
|
|
@@ -318,7 +329,7 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
318
329
|
if (!primary) return void 0;
|
|
319
330
|
return {
|
|
320
331
|
version: 1,
|
|
321
|
-
operation: mode === "task" && deliveryText(resultRecord.runId) || mode === "automation" && command === "run" ? "started" : command === "create" ? "created" : command === "get" || command === "resolve_workspace" || mode === "settings" ? "opened" : command === "validate" ? "completed" : "updated",
|
|
332
|
+
operation: mode === "task" && deliveryText(resultRecord.runId) || mode === "automation" && command === "run" || mode === "scene" && command === "check" ? "started" : command === "create" || mode === "scene" && command === "start" ? "created" : command === "get" || command === "resolve_workspace" || mode === "settings" ? "opened" : command === "validate" ? "completed" : "updated",
|
|
322
333
|
primary
|
|
323
334
|
};
|
|
324
335
|
}
|
|
@@ -1767,7 +1778,7 @@ function createXopcUseTool(deps) {
|
|
|
1767
1778
|
return {
|
|
1768
1779
|
name: "xopc_use",
|
|
1769
1780
|
label: "XOPC Use",
|
|
1770
|
-
description: "Operate first-class xopc objects through one safe entry point. Use for projects, automations, notes, tasks, TaskRuns, local apps, and exact settings jump targets instead of editing storage files directly. For non-trivial object changes, load the built-in manual first with tool_manual({ tool: \"xopc_use\" }).",
|
|
1781
|
+
description: "Operate first-class xopc objects through one safe entry point. Use for scenes, projects, automations, notes, tasks, TaskRuns, local apps, and exact settings jump targets instead of editing storage files directly. For non-trivial object changes, load the built-in manual first with tool_manual({ tool: \"xopc_use\" }).",
|
|
1771
1782
|
parameters: XopcUseToolSchema,
|
|
1772
1783
|
mutatesWorkspace: true,
|
|
1773
1784
|
mutationScope: "external",
|
|
@@ -1801,7 +1812,7 @@ function createXopcUseTool(deps) {
|
|
|
1801
1812
|
kind: "xopc_use",
|
|
1802
1813
|
toolCallId
|
|
1803
1814
|
}
|
|
1804
|
-
}, async () => mode === "
|
|
1815
|
+
}, async () => mode === "scene" ? await handleScene(command, args, deps, dryRun, toolCallId) : mode === "project" ? await handleProject(command, args, deps, dryRun) : mode === "automation" ? await handleAutomation(command, args, deps, dryRun) : mode === "note" ? await handleNote(command, args, deps, dryRun) : mode === "task" ? await handleTask(command, args, deps, dryRun) : mode === "task_run" ? await handleTaskRun(command, args, dryRun, deps) : mode === "local_app" ? await handleLocalApp(command, args, deps, dryRun) : mode === "settings" ? handleSettings(command, args) : {
|
|
1805
1816
|
ok: false,
|
|
1806
1817
|
error: `Unsupported mode: ${String(mode)}`
|
|
1807
1818
|
});
|
|
@@ -1816,44 +1827,93 @@ function createXopcUseTool(deps) {
|
|
|
1816
1827
|
}
|
|
1817
1828
|
};
|
|
1818
1829
|
}
|
|
1819
|
-
function
|
|
1820
|
-
const
|
|
1821
|
-
if (!
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
+
async function handleScene(command, args, deps, dryRun, toolCallId) {
|
|
1831
|
+
const access = deps.getSceneAccess?.();
|
|
1832
|
+
if (!access) throw new Error("Scene service is unavailable");
|
|
1833
|
+
const { services, principal } = access;
|
|
1834
|
+
const { id, requestId, triggerKey, ...input } = args;
|
|
1835
|
+
const activationId = typeof id === "string" ? id : "";
|
|
1836
|
+
const request = typeof requestId === "string" && requestId.trim() ? requestId : toolCallId;
|
|
1837
|
+
if (command === "templates") return { templates: services.repository.listTemplates() };
|
|
1838
|
+
if (command === "list") return { activations: services.repository.listActivations(principal) };
|
|
1839
|
+
if (command === "get") return {
|
|
1840
|
+
activation: services.repository.getActivation(principal, activationId),
|
|
1841
|
+
runs: services.repository.listRuns(principal, activationId),
|
|
1842
|
+
schedules: services.repository.listSchedules(principal, activationId)
|
|
1830
1843
|
};
|
|
1831
|
-
if (command === "
|
|
1832
|
-
if (command === "
|
|
1833
|
-
|
|
1834
|
-
|
|
1844
|
+
if (command === "mail_accounts") return { accounts: services.mailDiscovery?.listAccounts(principal) ?? [] };
|
|
1845
|
+
if (command === "mail_search") {
|
|
1846
|
+
if (!services.mailDiscovery) throw new Error("Mail search is unavailable");
|
|
1847
|
+
if (dryRun) return {
|
|
1848
|
+
preview: true,
|
|
1849
|
+
command,
|
|
1850
|
+
input
|
|
1851
|
+
};
|
|
1852
|
+
return { sources: await services.mailDiscovery.searchSources(principal, input, AbortSignal.timeout(15e3)) };
|
|
1835
1853
|
}
|
|
1836
|
-
if (command === "
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1854
|
+
if (command === "read_notes") return { notes: services.repository.readNotes(principal, activationId) };
|
|
1855
|
+
if (command === "mail_sources") return { sources: services.mail.listSources(principal) };
|
|
1856
|
+
if (command === "results") return { outcomes: services.repository.listInbox(principal, 50, "", activationId || null) };
|
|
1857
|
+
if (command === "diagnostics") return services.metrics.diagnostics(principal);
|
|
1858
|
+
if (command === "get_preferences") return services.preferences.get(principal);
|
|
1859
|
+
if (command === "preflight" || command === "start" && dryRun) return services.application.preflight(principal, input);
|
|
1860
|
+
if (dryRun) {
|
|
1861
|
+
if (command === "set_preferences") return {
|
|
1862
|
+
preview: true,
|
|
1863
|
+
command,
|
|
1864
|
+
input: args
|
|
1865
|
+
};
|
|
1866
|
+
if (command === "update_work_item") return {
|
|
1867
|
+
preview: true,
|
|
1868
|
+
command,
|
|
1869
|
+
workItemId: args.workItemId ?? id,
|
|
1870
|
+
input
|
|
1871
|
+
};
|
|
1872
|
+
if (command === "feedback" || command === "mark_read") return {
|
|
1873
|
+
preview: true,
|
|
1874
|
+
command,
|
|
1875
|
+
presentationId: args.presentationId ?? id,
|
|
1876
|
+
input
|
|
1877
|
+
};
|
|
1878
|
+
services.repository.getActivation(principal, activationId);
|
|
1845
1879
|
return {
|
|
1846
|
-
|
|
1847
|
-
|
|
1880
|
+
preview: true,
|
|
1881
|
+
command,
|
|
1882
|
+
activationId,
|
|
1883
|
+
input
|
|
1848
1884
|
};
|
|
1849
1885
|
}
|
|
1850
|
-
if (command === "start") return
|
|
1851
|
-
if (command === "
|
|
1852
|
-
|
|
1853
|
-
|
|
1886
|
+
if (command === "start") return { activation: await services.application.start(principal, input, request) };
|
|
1887
|
+
if (command === "configure") return { activation: services.application.configure(principal, activationId, input) };
|
|
1888
|
+
if (command === "transition") return { activation: await services.application.transition(principal, activationId, input) };
|
|
1889
|
+
if (command === "check") return { intentId: services.application.check(principal, activationId, request) };
|
|
1890
|
+
if (command === "notes") return { revision: services.application.writeNotes(principal, activationId, input) };
|
|
1891
|
+
if (command === "work_item") return { workItem: services.application.createWorkItem(principal, activationId, input) };
|
|
1892
|
+
if (command === "update_work_item") {
|
|
1893
|
+
const workItemId = typeof args.workItemId === "string" ? args.workItemId : activationId;
|
|
1894
|
+
const { workItemId: _workItemId, ...workItemInput } = args;
|
|
1895
|
+
return { workItem: services.application.updateWorkItem(principal, workItemId, workItemInput) };
|
|
1896
|
+
}
|
|
1897
|
+
if (command === "schedule") return { revision: services.application.setSchedule(principal, activationId, String(triggerKey ?? ""), input) };
|
|
1898
|
+
if (command === "set_preferences") return services.preferences.update(principal, args);
|
|
1899
|
+
if (command === "feedback") {
|
|
1900
|
+
const presentationId = typeof args.presentationId === "string" ? args.presentationId : activationId;
|
|
1901
|
+
if (!presentationId.trim()) throw new Error("presentationId is required");
|
|
1902
|
+
const { presentationId: _presentationId, ...feedbackInput } = args;
|
|
1903
|
+
return { revision: services.inbox.feedback(principal, presentationId, feedbackInput) };
|
|
1904
|
+
}
|
|
1905
|
+
if (command === "mark_read") {
|
|
1906
|
+
const presentationId = typeof args.presentationId === "string" ? args.presentationId : activationId;
|
|
1907
|
+
if (!presentationId.trim()) throw new Error("presentationId is required");
|
|
1908
|
+
if (typeof args.read !== "boolean") throw new Error("read must be a boolean");
|
|
1909
|
+
services.inbox.setRead(principal, presentationId, args.read);
|
|
1910
|
+
return {
|
|
1911
|
+
ok: true,
|
|
1912
|
+
presentationId,
|
|
1913
|
+
read: args.read
|
|
1914
|
+
};
|
|
1854
1915
|
}
|
|
1855
|
-
|
|
1856
|
-
throw new Error("Unsupported proactive command");
|
|
1916
|
+
throw new Error("Unsupported scene command");
|
|
1857
1917
|
}
|
|
1858
1918
|
//#endregion
|
|
1859
1919
|
export { createXopcUseTool };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ProactiveSignalPublisher } from '../../proactive/events/publisher.js';
|
|
2
1
|
import type { Automation, AutomationDeps, AutomationEvent, AutomationMetrics, AutomationProductEventRun, AutomationRun, AutomationRunEvent } from '../domain/types.js';
|
|
3
2
|
import { type CreateAutomationInput, type UpdateAutomationInput } from '../domain/validation.js';
|
|
4
3
|
export declare class AutomationAlreadyRunningError extends Error {
|
|
@@ -7,8 +6,6 @@ export declare class AutomationAlreadyRunningError extends Error {
|
|
|
7
6
|
constructor(automationId: string, runningRunId?: string);
|
|
8
7
|
}
|
|
9
8
|
export declare class AutomationService {
|
|
10
|
-
private readonly signals?;
|
|
11
|
-
private readonly workspaceId;
|
|
12
9
|
private readonly executor;
|
|
13
10
|
private timer;
|
|
14
11
|
private stopped;
|
|
@@ -18,7 +15,6 @@ export declare class AutomationService {
|
|
|
18
15
|
private readonly activeRuns;
|
|
19
16
|
private readonly heartbeatTimers;
|
|
20
17
|
private readonly leaseOwner;
|
|
21
|
-
constructor(signals?: ProactiveSignalPublisher, workspaceId?: string);
|
|
22
18
|
setDeps(deps: AutomationDeps): void;
|
|
23
19
|
initialize(options?: {
|
|
24
20
|
maxConcurrentRuns?: number;
|
|
@@ -41,10 +41,6 @@ var AutomationService = class {
|
|
|
41
41
|
activeRuns = /* @__PURE__ */ new Map();
|
|
42
42
|
heartbeatTimers = /* @__PURE__ */ new Map();
|
|
43
43
|
leaseOwner = `automation-service:${process.pid}:${randomUUID()}`;
|
|
44
|
-
constructor(signals, workspaceId = "default") {
|
|
45
|
-
this.signals = signals;
|
|
46
|
-
this.workspaceId = workspaceId;
|
|
47
|
-
}
|
|
48
44
|
setDeps(deps) {
|
|
49
45
|
this.deps = {
|
|
50
46
|
...this.deps,
|
|
@@ -458,33 +454,6 @@ var AutomationService = class {
|
|
|
458
454
|
error
|
|
459
455
|
});
|
|
460
456
|
this.finishAutomationRun(automation.id, status, error, endedAtMs);
|
|
461
|
-
if (status === "failed" || status === "timeout") this.signals?.publish({
|
|
462
|
-
type: "automation.run_failed.v1",
|
|
463
|
-
schemaVersion: 1,
|
|
464
|
-
source: {
|
|
465
|
-
kind: "automations",
|
|
466
|
-
id: automation.id
|
|
467
|
-
},
|
|
468
|
-
subject: {
|
|
469
|
-
kind: "automation_run",
|
|
470
|
-
id: run.id
|
|
471
|
-
},
|
|
472
|
-
actor: { kind: "system" },
|
|
473
|
-
scope: {
|
|
474
|
-
workspaceId: this.workspaceId,
|
|
475
|
-
...automation.projectId ? { projectId: automation.projectId } : {}
|
|
476
|
-
},
|
|
477
|
-
occurredAt: new Date(endedAtMs).toISOString(),
|
|
478
|
-
dedupeKey: `automation_run:${run.id}:failed`,
|
|
479
|
-
sensitivity: "personal",
|
|
480
|
-
payload: {
|
|
481
|
-
automationId: automation.id,
|
|
482
|
-
status,
|
|
483
|
-
error,
|
|
484
|
-
summary: run.summary,
|
|
485
|
-
durationMs: run.durationMs
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
457
|
});
|
|
489
458
|
try {
|
|
490
459
|
this.deps.onRunCompleted?.(run);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getCliAdapter } from "../connectors/cli/adapterRegistry.js";
|
|
1
2
|
import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
2
3
|
import { installConnectorDefinition } from "../connectors/install.js";
|
|
3
4
|
import { createHash } from "node:crypto";
|
|
@@ -146,6 +147,51 @@ function readConnectorManifest(value, packageName, version, sha256) {
|
|
|
146
147
|
if (manifest.contractVersion !== 1) throw new Error("Store connector manifest must use contractVersion 1.");
|
|
147
148
|
if (asString(manifest.id, "Connector id") !== packageName) throw new Error("Connector manifest id does not match the store package name.");
|
|
148
149
|
const runtime = asRecord(manifest.runtime, "Connector runtime");
|
|
150
|
+
if (runtime.type === "cli") {
|
|
151
|
+
const adapter = getCliAdapter(asString(runtime.adapterId, "CLI adapter id"));
|
|
152
|
+
if (runtime.adapterVersion !== adapter.version || runtime.binaryVersion !== adapter.binaryVersion || Object.keys(runtime).some((key) => ![
|
|
153
|
+
"type",
|
|
154
|
+
"adapterId",
|
|
155
|
+
"adapterVersion",
|
|
156
|
+
"binaryVersion"
|
|
157
|
+
].includes(key))) throw new Error("Store CLI runtime must reference an exact registered adapter.");
|
|
158
|
+
if (asRecord(manifest.auth, "Connector auth").mode !== "cli") throw new Error("CLI connectors require managed CLI authorization.");
|
|
159
|
+
const { setup, keys } = readSetup(manifest.setup);
|
|
160
|
+
if (keys.size) throw new Error("CLI credentials are managed through authorization.");
|
|
161
|
+
const category = asString(manifest.category, "Connector category");
|
|
162
|
+
if (![
|
|
163
|
+
"code",
|
|
164
|
+
"docs",
|
|
165
|
+
"browser",
|
|
166
|
+
"data",
|
|
167
|
+
"automation",
|
|
168
|
+
"custom"
|
|
169
|
+
].includes(category)) throw new Error("Unsupported connector category.");
|
|
170
|
+
if (asStringArray(manifest.capabilities, "Connector capabilities").some((value) => value !== "tools")) throw new Error("CLI connectors support tools only.");
|
|
171
|
+
return {
|
|
172
|
+
id: packageName,
|
|
173
|
+
version,
|
|
174
|
+
displayName: asString(manifest.displayName, "Connector displayName"),
|
|
175
|
+
description: asString(manifest.description, "Connector description"),
|
|
176
|
+
category,
|
|
177
|
+
kind: "cli",
|
|
178
|
+
source: "store",
|
|
179
|
+
capabilities: ["tools"],
|
|
180
|
+
auth: { mode: "cli" },
|
|
181
|
+
setup,
|
|
182
|
+
runtime: {
|
|
183
|
+
type: "cli",
|
|
184
|
+
adapterId: adapter.id,
|
|
185
|
+
adapterVersion: adapter.version,
|
|
186
|
+
binaryVersion: adapter.binaryVersion
|
|
187
|
+
},
|
|
188
|
+
permissions: readPermissions(manifest.permissions, true),
|
|
189
|
+
provenance: {
|
|
190
|
+
packageName,
|
|
191
|
+
sha256
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
149
195
|
if (runtime.type !== "mcp") throw new Error("Store connectors must use the MCP runtime.");
|
|
150
196
|
const serverTemplate = asRecord(runtime.serverTemplate, "Connector MCP serverTemplate");
|
|
151
197
|
const localPackage = readPinnedLocalRuntime(runtime, serverTemplate);
|
|
@@ -53,7 +53,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
53
53
|
id: "database-schema",
|
|
54
54
|
label: "Database schema",
|
|
55
55
|
status: "pass",
|
|
56
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
56
|
+
message: `SQLite schema v${status.dbVersion} (current release v189).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { closeXopcDatabase, isXopcDatabaseOpen, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
-
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
2
|
+
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
3
3
|
import "../../storage/sqlite/index.js";
|
|
4
4
|
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
5
5
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath } from "./paths-state.js";
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
|
-
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
4
|
+
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
5
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
@@ -27,4 +27,4 @@ init_workspace_path();
|
|
|
27
27
|
init_models_json();
|
|
28
28
|
init_resolve_config_value();
|
|
29
29
|
//#endregion
|
|
30
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, assertConfigRewriteSafeForRunningGateway, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
30
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, assertConfigRewriteSafeForRunningGateway, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
@@ -771,6 +771,9 @@ export declare const GatewayWebchatConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
771
771
|
off: "off";
|
|
772
772
|
}>>;
|
|
773
773
|
}, z.core.$strip>>;
|
|
774
|
+
export declare const GatewayScenesConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
775
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
776
|
+
}, z.core.$strip>>;
|
|
774
777
|
export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
775
778
|
bind: z.ZodOptional<z.ZodEnum<{
|
|
776
779
|
custom: "custom";
|
|
@@ -841,7 +844,7 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
841
844
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
842
845
|
}, z.core.$strict>>;
|
|
843
846
|
}, z.core.$strip>>>;
|
|
844
|
-
heartbeat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
847
|
+
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
845
848
|
enabled: z.ZodBoolean;
|
|
846
849
|
intervalMs: z.ZodNumber;
|
|
847
850
|
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -855,7 +858,7 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
855
858
|
end: z.ZodString;
|
|
856
859
|
timezone: z.ZodOptional<z.ZodString>;
|
|
857
860
|
}, z.core.$strip>>;
|
|
858
|
-
}, z.core.$strip
|
|
861
|
+
}, z.core.$strip>>>>;
|
|
859
862
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
860
863
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
861
864
|
stream: "stream";
|
|
@@ -863,6 +866,9 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
863
866
|
off: "off";
|
|
864
867
|
}>>;
|
|
865
868
|
}, z.core.$strip>>>;
|
|
869
|
+
scenes: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
870
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
871
|
+
}, z.core.$strip>>>;
|
|
866
872
|
corsOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
867
873
|
publicUrl: z.ZodOptional<z.ZodString>;
|
|
868
874
|
dangerouslyAllowHostHeaderOriginFallback: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1883,7 +1889,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1883
1889
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
1884
1890
|
}, z.core.$strict>>;
|
|
1885
1891
|
}, z.core.$strip>>>;
|
|
1886
|
-
heartbeat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1892
|
+
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1887
1893
|
enabled: z.ZodBoolean;
|
|
1888
1894
|
intervalMs: z.ZodNumber;
|
|
1889
1895
|
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -1897,7 +1903,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1897
1903
|
end: z.ZodString;
|
|
1898
1904
|
timezone: z.ZodOptional<z.ZodString>;
|
|
1899
1905
|
}, z.core.$strip>>;
|
|
1900
|
-
}, z.core.$strip
|
|
1906
|
+
}, z.core.$strip>>>>;
|
|
1901
1907
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1902
1908
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
1903
1909
|
stream: "stream";
|
|
@@ -1905,6 +1911,9 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1905
1911
|
off: "off";
|
|
1906
1912
|
}>>;
|
|
1907
1913
|
}, z.core.$strip>>>;
|
|
1914
|
+
scenes: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1915
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1916
|
+
}, z.core.$strip>>>;
|
|
1908
1917
|
corsOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1909
1918
|
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1910
1919
|
dangerouslyAllowHostHeaderOriginFallback: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
2
3
|
import { AgentModelsOverrideSchema, AgentsConfigSchema as AgentsConfigSchema$1, DEFAULT_AGENT_MODEL_REF, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
3
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
5
5
|
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config as init_config$1 } from "../user-context/config.js";
|
|
6
6
|
import { init_default_model } from "./default-model.js";
|
|
7
7
|
import { init_public_url, validatePublicUrl } from "./public-url.js";
|
|
@@ -38,7 +38,7 @@ function parseModelRef(ref) {
|
|
|
38
38
|
model: trimmed.slice(idx + 1).trim()
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, AgentsConfigSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, HeartbeatConfigSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, UpdateConfigSchema, CommandsConfigSchema, TuiConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
41
|
+
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, AgentsConfigSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, HeartbeatConfigSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayScenesConfigSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, UpdateConfigSchema, CommandsConfigSchema, TuiConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
42
42
|
var init_schema = __esmMin((() => {
|
|
43
43
|
init_config();
|
|
44
44
|
init_agent_config();
|
|
@@ -484,6 +484,9 @@ activityDetailDefault: z.enum([
|
|
|
484
484
|
"on",
|
|
485
485
|
"stream"
|
|
486
486
|
]).default("on") }).default({ activityDetailDefault: "on" });
|
|
487
|
+
GatewayScenesConfigSchema = z.object({
|
|
488
|
+
/** Explicit opt-in while real-device and sustained-load launch gates remain open. */
|
|
489
|
+
enabled: z.boolean().default(false) }).default({ enabled: false });
|
|
487
490
|
GatewayConfigSchema = z.object({
|
|
488
491
|
/** Semantic bind mode. */
|
|
489
492
|
bind: GatewayBindModeSchema.optional(),
|
|
@@ -497,8 +500,9 @@ activityDetailDefault: z.enum([
|
|
|
497
500
|
tailscale: GatewayTailscaleSchema.optional(),
|
|
498
501
|
tls: GatewayTlsSchema.optional(),
|
|
499
502
|
auth: GatewayAuthSchema.optional(),
|
|
500
|
-
heartbeat: HeartbeatConfigSchema.optional(),
|
|
503
|
+
heartbeat: z.preprocess(() => void 0, HeartbeatConfigSchema.optional()),
|
|
501
504
|
webchat: GatewayWebchatConfigSchema.optional(),
|
|
505
|
+
scenes: GatewayScenesConfigSchema.optional(),
|
|
502
506
|
corsOrigins: z.array(z.string()).optional(),
|
|
503
507
|
/**
|
|
504
508
|
* Reverse-proxy publicly reachable URL (e.g. `https://gateway.example.com`).
|
|
@@ -684,12 +688,8 @@ activityDetailDefault: z.enum([
|
|
|
684
688
|
bind: "loopback",
|
|
685
689
|
port: 18790,
|
|
686
690
|
auth: { mode: "token" },
|
|
687
|
-
heartbeat: {
|
|
688
|
-
enabled: true,
|
|
689
|
-
intervalMs: 18e5,
|
|
690
|
-
includeSystemPromptSection: false
|
|
691
|
-
},
|
|
692
691
|
webchat: { activityDetailDefault: "on" },
|
|
692
|
+
scenes: { enabled: false },
|
|
693
693
|
corsOrigins: [],
|
|
694
694
|
skillsMarketplaceProvider: "store",
|
|
695
695
|
skillsStoreBaseUrl: "https://store.xopc.ai"
|
|
@@ -1149,12 +1149,8 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1149
1149
|
bind: "loopback",
|
|
1150
1150
|
port: 18790,
|
|
1151
1151
|
auth: { mode: "token" },
|
|
1152
|
-
heartbeat: {
|
|
1153
|
-
enabled: true,
|
|
1154
|
-
intervalMs: 18e5,
|
|
1155
|
-
includeSystemPromptSection: false
|
|
1156
|
-
},
|
|
1157
1152
|
webchat: { activityDetailDefault: "on" },
|
|
1153
|
+
scenes: { enabled: false },
|
|
1158
1154
|
corsOrigins: [],
|
|
1159
1155
|
skillsMarketplaceProvider: "store",
|
|
1160
1156
|
skillsStoreBaseUrl: "https://store.xopc.ai"
|
|
@@ -1210,4 +1206,4 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1210
1206
|
}));
|
|
1211
1207
|
//#endregion
|
|
1212
1208
|
init_schema();
|
|
1213
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
1209
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
@@ -88,11 +88,6 @@ function mergeGatewaySkillsMarketplacePatch(config, patch) {
|
|
|
88
88
|
bind: "loopback",
|
|
89
89
|
port: 18790,
|
|
90
90
|
auth: { mode: "token" },
|
|
91
|
-
heartbeat: {
|
|
92
|
-
enabled: true,
|
|
93
|
-
intervalMs: 18e5,
|
|
94
|
-
includeSystemPromptSection: false
|
|
95
|
-
},
|
|
96
91
|
corsOrigins: []
|
|
97
92
|
};
|
|
98
93
|
if (parsed.data.skillsMarketplaceProvider !== void 0) config.gateway.skillsMarketplaceProvider = parsed.data.skillsMarketplaceProvider.trim();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { listConnectorConnections } from '../storage/sqlite/connector-repository.js';
|
|
2
|
+
import type { ConnectorInstallationPolicy } from './types.js';
|
|
3
|
+
/** Resolve one explicitly allowed account without falling back from an unavailable selection. */
|
|
4
|
+
export declare function selectConnectorAccount(input: {
|
|
5
|
+
installation: ConnectorInstallationPolicy;
|
|
6
|
+
agentId?: string;
|
|
7
|
+
conversationId?: string;
|
|
8
|
+
requestedAccountId?: string;
|
|
9
|
+
accept?: (connection: ReturnType<typeof listConnectorConnections>[number]) => boolean;
|
|
10
|
+
}): {
|
|
11
|
+
connection: import("./types.js").ConnectorConnection;
|
|
12
|
+
candidates: import("./types.js").ConnectorConnection[];
|
|
13
|
+
requestedAccountId: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
|
|
2
|
+
import { bindObjectiveAccount, connectionBindings, init_connection_wait_repository } from "../storage/sqlite/connection-wait-repository.js";
|
|
3
|
+
import { canAccessConnectorAccount, currentAccountConnections } from "./account-access.js";
|
|
4
|
+
//#region src/connectors/account-selection.ts
|
|
5
|
+
init_connection_wait_repository();
|
|
6
|
+
init_connector_repository();
|
|
7
|
+
/** Resolve one explicitly allowed account without falling back from an unavailable selection. */
|
|
8
|
+
function selectConnectorAccount(input) {
|
|
9
|
+
const { installation } = input;
|
|
10
|
+
const candidates = currentAccountConnections(listConnectorConnections({
|
|
11
|
+
principalId: installation.principalId,
|
|
12
|
+
connectorId: installation.connectorId
|
|
13
|
+
}).filter((connection) => connection.status === "active" && canAccessConnectorAccount(connection, installation, input.agentId) && (!input.accept || input.accept(connection))));
|
|
14
|
+
const bindings = input.conversationId ? connectionBindings(input.conversationId).filter((binding) => binding.connectorId === installation.connectorId) : [];
|
|
15
|
+
const requested = input.requestedAccountId ?? (bindings.length === 1 ? bindings[0]?.accountId : void 0);
|
|
16
|
+
if (requested && bindings.length && !bindings.some((binding) => binding.accountId === requested)) throw new Error("This account is not selected for the current objective.");
|
|
17
|
+
const connection = requested ? candidates.find((candidate) => candidate.accountId === requested) : bindings.length > 1 ? void 0 : candidates.length === 1 ? candidates[0] : void 0;
|
|
18
|
+
if (connection?.accountId && input.conversationId) bindObjectiveAccount(input.conversationId, installation.connectorId, connection.accountId);
|
|
19
|
+
return {
|
|
20
|
+
connection,
|
|
21
|
+
candidates,
|
|
22
|
+
requestedAccountId: requested
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { selectConnectorAccount };
|