@xopcai/xopc 0.0.309 → 0.0.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-XKNYlFUI.js → activity-store-DVUTs1fk.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-1S2TFECE.js → agent-avatar-dicebear-zKINl7UH.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D2ePZKdY.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CPqUMtCL.js → agents-BiD9STyv.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-BiBXVEvp.js → app-link-wamYbNUl.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CgVBSqzu.js → app-management-settings-panel-C94LAxyt.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CoWdCokb.js → appearance-settings-CP01zHvC.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-B7DmSJQj.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-C3ZA6LRS.js → archive-plugin-SwWFt5MT.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CdgS6_zy.js → attachment-load-DdTFml9l.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BtHL2hpg.js → automations-page-Kmr5WVFp.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-bkijiu-Y.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CiDhtq_H.js → binary-plugins-47UTtDNq.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Br00T83w.js → block-editor-DvzZkMG8.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-DrUKNL9X.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-Dhf_MWCf.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BCubrDf8.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-e4T1DEfN.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-JsMtzDao.js → chat-terminal-dock-Bg_m7HUE.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-CosCmVsT.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-DZFNUTiN.js → connector-service-page-BL-hSR7_.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-C0WWxnxJ.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-DqYFVasF.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-B-BcuG1y.js → dependency-picker-DCyyFLKp.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CdBBhhdY.js → desktop-pet-CFnnpRA_.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-U5wWRH4c.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-BhHxvFO1.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BFp5eKtY.js → extension-debug-page-DA8WJ3-E.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DL3vyyH6.js → extension-page-C2BIB88m.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BXtvdAsY.js → extension-settings-page-kpYo979N.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-CE9t1yTa.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-C7Ezx8Du.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-NPk698vI.js} +1 -1
- package/dist/gateway/static/root/assets/index-1wIKA-kM.css +1 -0
- package/dist/gateway/static/root/assets/index-DxYitLp8.js +79 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CutG9zLh.js → keyboard-shortcuts-settings-BhreF0_O.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CPmynb3x.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CJy6I7Dt.js → local-apps-page-DOZZBdqj.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-M8kz26yo.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-BQhIOELc.js → management-settings-JLqHYQvY.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-p2P5hP1U.js → markdown-view-BDpcjR_Z.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-DSjfHfaW.css +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-CsBylqlN.js → media-plugins-B75SWUJd.js} +1 -1
- package/dist/gateway/static/root/assets/messages-4BtQKYlM.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-B_Ft0M32.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C32mxSD-.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-ChQ4jJFs.js → page-tabs-CMlQUzT6.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-cZ2hszQT.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BADxWEdP.js → product-open-page-CPoSbglF.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DYttWua0.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-D46drWbl.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-C9n9Nuhi.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-pwiIyp.js → runtime-tools-settings-panel-bMLWRApp.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-Dw3hmHAr.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-IWmb05DX.js → schema-form-UVJV_7AS.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-C8P6ff91.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-whpUsAy3.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-B0veRBZs.js → settings-form-section-BqzOqonM.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DQ9RJ8-b.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-layout-D3Spald3.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-C8u601m8.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CirpgkfD.js → share-preview-page-BcgYzA7y.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Bv-2rZ8e.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-LM-cgWUS.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-ggmb7rCW.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-B42mpWKV.js → skills-page.utils-ADABzrtk.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-DfkcW_Za.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-DC4yqDFd.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-CTuwTdMm.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-5ZDd9XKh.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-BFKFhdZ0.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BZbKQ8HT.js → voice-api-key-field-D3urfd-n.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-JzM3Ylbs.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D2kuwv5e.js → workflow-run-setup-panel-Bn2CtRdB.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BiCmt98A.js +6 -0
- package/dist/gateway/static/root/connector-icons/SOURCES.md +0 -2
- package/dist/gateway/static/root/index.html +17 -20
- 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/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/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 +46 -43
- 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/schema.d.ts +4 -4
- package/dist/src/config/schema.js +2 -12
- 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 +0 -15
- package/dist/src/gateway/hono/lib/config-payload.js +0 -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 +129 -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 +35 -0
- package/dist/src/scenes/metrics.js +94 -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 +4 -2
- 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/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/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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { getSessionMetadata
|
|
1
|
+
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
2
|
+
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
2
3
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
3
4
|
import { init_session_key } from "../../routing/session-key.js";
|
|
4
5
|
//#region src/agent/memory/turn-provenance.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
1
|
+
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
2
2
|
import "../../storage/sqlite/index.js";
|
|
3
3
|
import { INTERNAL_OUTBOUND_DROP_CHANNEL } from "../../channels/internal-outbound.js";
|
|
4
4
|
//#region src/agent/service/parse-outbound-session-key.ts
|
|
@@ -233,6 +233,7 @@ var AgentService = class {
|
|
|
233
233
|
verboseLevel: config.verboseLevel,
|
|
234
234
|
gatewayClarify: config.gatewayClarify,
|
|
235
235
|
getAutomationService: config.getAutomationService,
|
|
236
|
+
getSceneAccess: config.getSceneAccess,
|
|
236
237
|
getBrowserAutomationService: config.getBrowserAutomationService,
|
|
237
238
|
emitBrowserEvent: config.emitBrowserEvent,
|
|
238
239
|
getNotesService: config.getNotesService,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SceneAccess } from '../scenes/httpServices.js';
|
|
1
2
|
import type { ThinkingLevel } from '@earendil-works/pi-agent-core';
|
|
2
3
|
import type { Config } from '../config/schema.js';
|
|
3
4
|
import type { SessionStore } from '../session/store.js';
|
|
@@ -28,6 +29,7 @@ export interface AgentServiceConfig {
|
|
|
28
29
|
requestClarification: GatewayClarifyRequestFn;
|
|
29
30
|
};
|
|
30
31
|
getAutomationService?: () => AutomationService | undefined;
|
|
32
|
+
getSceneAccess?: () => SceneAccess | undefined;
|
|
31
33
|
getBrowserAutomationService?: () => import('../browser/automations/index.js').BrowserAutomationService | undefined;
|
|
32
34
|
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
33
35
|
/** Gateway: exposes first-class xopc product objects for the `xopc_use` tool. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SceneAccess } from '../../scenes/httpServices.js';
|
|
1
2
|
/**
|
|
2
3
|
* Agent Tools Factory - Creates and configures agent tools
|
|
3
4
|
*
|
|
@@ -54,6 +55,7 @@ export interface ToolFactoryDeps {
|
|
|
54
55
|
};
|
|
55
56
|
/** Gateway: enables the `automation` tool. */
|
|
56
57
|
getAutomationService?: () => AutomationService | undefined;
|
|
58
|
+
getSceneAccess?: () => SceneAccess | undefined;
|
|
57
59
|
getBrowserAutomationService?: () => BrowserAutomationService | undefined;
|
|
58
60
|
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
59
61
|
/** Gateway: enables the `xopc_use` product-object tool. */
|
|
@@ -3,7 +3,7 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
5
5
|
import { getBrowserTabBinding } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
6
|
-
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
6
|
+
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
|
|
8
8
|
import "../../storage/sqlite/index.js";
|
|
9
9
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
@@ -425,12 +425,13 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
425
425
|
})] : [],
|
|
426
426
|
...this.deps.getAutomationService ? [createAutomationTool({ getAutomationService: this.deps.getAutomationService })] : [],
|
|
427
427
|
...browserEnabled && this.deps.getBrowserAutomationService ? [createBrowserAutomationTool({ getBrowserAutomationService: this.deps.getBrowserAutomationService })] : [],
|
|
428
|
-
...this.deps.getAutomationService || this.deps.getProjectService || this.deps.getNotesService || this.deps.getLocalAppService || this.deps.dispatchTaskEvents || this.deps.dispatchTaskRuns ? [createXopcUseTool({
|
|
428
|
+
...this.deps.getAutomationService || this.deps.getSceneAccess || this.deps.getProjectService || this.deps.getNotesService || this.deps.getLocalAppService || this.deps.dispatchTaskEvents || this.deps.dispatchTaskRuns ? [createXopcUseTool({
|
|
429
429
|
getWorkspace: () => this.deps.workspace,
|
|
430
430
|
getConfig: () => this.deps.getConfig?.(),
|
|
431
431
|
getCurrentAgentId: () => options.agentId,
|
|
432
432
|
getCurrentConversationId: () => this.deps.getCurrentContext()?.conversationId,
|
|
433
433
|
getAutomationService: this.deps.getAutomationService,
|
|
434
|
+
getSceneAccess: this.deps.getSceneAccess,
|
|
434
435
|
getNotesService: this.deps.getNotesService,
|
|
435
436
|
getProjectService: this.deps.getProjectService,
|
|
436
437
|
getLocalAppService: this.deps.getLocalAppService,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ModelCatalogStore } from '../../../../providers/model-catalog-store.js';
|
|
2
|
+
import { type ProviderAuthService } from '../../../../providers/provider-auth-service.js';
|
|
3
|
+
import type { SearchProvider, SearchResult } from '../types.js';
|
|
4
|
+
interface XopcCloudSearchProviderOptions {
|
|
5
|
+
region: 'cn' | 'global';
|
|
6
|
+
fetchImpl?: typeof fetch;
|
|
7
|
+
catalogStore?: Pick<ModelCatalogStore, 'getSource'>;
|
|
8
|
+
credentials?: Pick<ProviderAuthService, 'resolveApiKey'>;
|
|
9
|
+
}
|
|
10
|
+
export declare class XopcCloudSearchProvider implements SearchProvider {
|
|
11
|
+
private readonly options;
|
|
12
|
+
readonly name = "xopc-cloud";
|
|
13
|
+
private readonly fetchImpl;
|
|
14
|
+
private readonly catalogStore;
|
|
15
|
+
private readonly credentials;
|
|
16
|
+
constructor(options: XopcCloudSearchProviderOptions);
|
|
17
|
+
isAvailable(): boolean;
|
|
18
|
+
search(query: string, count: number, signal?: AbortSignal): Promise<SearchResult[]>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { getModelCatalogStore, init_model_catalog_store } from "../../../../providers/model-catalog-store.js";
|
|
2
|
+
import { getProviderAuthService, init_provider_auth_service } from "../../../../providers/provider-auth-service.js";
|
|
3
|
+
//#region src/agent/tools/search/providers/xopc-cloud.ts
|
|
4
|
+
init_model_catalog_store();
|
|
5
|
+
init_provider_auth_service();
|
|
6
|
+
var XopcCloudSearchProvider = class {
|
|
7
|
+
name = "xopc-cloud";
|
|
8
|
+
fetchImpl;
|
|
9
|
+
catalogStore;
|
|
10
|
+
credentials;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.options = options;
|
|
13
|
+
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
14
|
+
this.catalogStore = options.catalogStore ?? getModelCatalogStore();
|
|
15
|
+
this.credentials = options.credentials ?? getProviderAuthService();
|
|
16
|
+
}
|
|
17
|
+
isAvailable() {
|
|
18
|
+
return Boolean(this.catalogStore.getSource("xopc-cloud")?.search);
|
|
19
|
+
}
|
|
20
|
+
async search(query, count, signal) {
|
|
21
|
+
const source = this.catalogStore.getSource("xopc-cloud");
|
|
22
|
+
if (!source?.search) throw new Error("XOPC Cloud search is not available");
|
|
23
|
+
const requestSignal = signal ? AbortSignal.any([signal, AbortSignal.timeout(3e4)]) : AbortSignal.timeout(3e4);
|
|
24
|
+
const accessToken = await this.credentials.resolveApiKey("xopc-cloud", requestSignal);
|
|
25
|
+
if (!accessToken) throw new Error("XOPC Cloud is not connected");
|
|
26
|
+
const endpoint = `${source.baseUrl.replace(/\/+$/, "")}/${source.search.endpoint.replace(/^\/+/, "")}`;
|
|
27
|
+
const response = await this.fetchImpl(endpoint, {
|
|
28
|
+
method: "POST",
|
|
29
|
+
headers: {
|
|
30
|
+
authorization: `Bearer ${accessToken}`,
|
|
31
|
+
accept: "application/json",
|
|
32
|
+
"content-type": "application/json"
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify({
|
|
35
|
+
query,
|
|
36
|
+
count: Math.max(1, Math.min(count, source.search.maxResults)),
|
|
37
|
+
region: this.options.region
|
|
38
|
+
}),
|
|
39
|
+
signal: requestSignal
|
|
40
|
+
});
|
|
41
|
+
const body = await response.json().catch(() => null);
|
|
42
|
+
if (!response.ok) throw new Error(typeof body?.error?.message === "string" ? body.error.message : `XOPC Cloud search failed (${response.status})`);
|
|
43
|
+
if (!Array.isArray(body?.results)) throw new Error("XOPC Cloud search returned an invalid response");
|
|
44
|
+
return body.results.flatMap((result) => {
|
|
45
|
+
if (typeof result.title !== "string" || typeof result.url !== "string" || typeof result.description !== "string") return [];
|
|
46
|
+
return [{
|
|
47
|
+
title: result.title,
|
|
48
|
+
url: result.url,
|
|
49
|
+
description: result.description,
|
|
50
|
+
source: this.name
|
|
51
|
+
}];
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { XopcCloudSearchProvider };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { ResolvedWebSearchConfig, SearchResult } from './types.js';
|
|
1
|
+
import type { ResolvedWebSearchConfig, SearchProvider, SearchResult } from './types.js';
|
|
2
2
|
export declare class SearchProviderRegistry {
|
|
3
3
|
private readonly providers;
|
|
4
4
|
private readonly fallbackProvider;
|
|
5
|
-
constructor(config: ResolvedWebSearchConfig
|
|
5
|
+
constructor(config: ResolvedWebSearchConfig, options?: {
|
|
6
|
+
cloudProvider?: SearchProvider;
|
|
7
|
+
});
|
|
6
8
|
private buildProviders;
|
|
7
9
|
hasConfiguredApiProvider(): boolean;
|
|
8
10
|
search(query: string, count: number, signal?: AbortSignal): Promise<{
|
|
@@ -6,22 +6,24 @@ import { BingApiProvider } from "./providers/bing-api.js";
|
|
|
6
6
|
import { BingHtmlProvider } from "./providers/bing-html.js";
|
|
7
7
|
import { DuckDuckGoHtmlProvider } from "./providers/duckduckgo-html.js";
|
|
8
8
|
import { SearXNGProvider } from "./providers/searxng.js";
|
|
9
|
+
import { XopcCloudSearchProvider } from "./providers/xopc-cloud.js";
|
|
9
10
|
//#region src/agent/tools/search/registry.ts
|
|
10
11
|
init_logger();
|
|
11
12
|
const log = createLogger("Agent:WebSearch");
|
|
12
13
|
var SearchProviderRegistry = class {
|
|
13
14
|
providers;
|
|
14
15
|
fallbackProvider;
|
|
15
|
-
constructor(config) {
|
|
16
|
-
this.providers = this.buildProviders(config);
|
|
16
|
+
constructor(config, options = {}) {
|
|
17
|
+
this.providers = this.buildProviders(config, options.cloudProvider);
|
|
17
18
|
this.fallbackProvider = config.region === "cn" ? new BingHtmlProvider() : new DuckDuckGoHtmlProvider();
|
|
18
19
|
log.debug({
|
|
19
20
|
region: config.region,
|
|
20
21
|
configuredCount: this.providers.filter((p) => p.isAvailable()).length
|
|
21
22
|
}, "Web search registry ready");
|
|
22
23
|
}
|
|
23
|
-
buildProviders(config) {
|
|
24
|
+
buildProviders(config, cloudProvider) {
|
|
24
25
|
const list = [];
|
|
26
|
+
if (config.providers.length === 0) list.push(cloudProvider ?? new XopcCloudSearchProvider({ region: config.region }));
|
|
25
27
|
for (const p of config.providers) {
|
|
26
28
|
if (p.disabled) continue;
|
|
27
29
|
switch (p.type) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SceneAccess } from '../../scenes/httpServices.js';
|
|
1
2
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
3
|
import { type ProductDeliveryEnvelope } from '@xopcai/gateway-contract';
|
|
3
4
|
import { type AutomationService } from '../../automations/index.js';
|
|
@@ -6,12 +7,12 @@ import type { NotesService } from '../../notes/index.js';
|
|
|
6
7
|
import { type ProjectService } from '../../projects/index.js';
|
|
7
8
|
import type { LocalAppService } from '../../local-apps/index.js';
|
|
8
9
|
declare const XopcUseToolSchema: import("@sinclair/typebox").TObject<{
|
|
9
|
-
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"
|
|
10
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"scene">, import("@sinclair/typebox").TLiteral<"project">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"note">, import("@sinclair/typebox").TLiteral<"task">, import("@sinclair/typebox").TLiteral<"task_run">, import("@sinclair/typebox").TLiteral<"local_app">, import("@sinclair/typebox").TLiteral<"settings">]>;
|
|
10
11
|
command: import("@sinclair/typebox").TString;
|
|
11
12
|
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
12
13
|
dryRun: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
13
14
|
}>;
|
|
14
|
-
export type XopcUseMode = '
|
|
15
|
+
export type XopcUseMode = 'scene' | 'project' | 'automation' | 'note' | 'task' | 'task_run' | 'local_app' | 'settings';
|
|
15
16
|
export interface XopcUseToolInput {
|
|
16
17
|
mode: XopcUseMode;
|
|
17
18
|
command: string;
|
|
@@ -24,6 +25,7 @@ export interface XopcUseToolDeps {
|
|
|
24
25
|
getCurrentAgentId?: () => string | undefined;
|
|
25
26
|
getCurrentConversationId?: () => string | undefined;
|
|
26
27
|
getAutomationService?: () => AutomationService | undefined;
|
|
28
|
+
getSceneAccess?: () => SceneAccess | undefined;
|
|
27
29
|
getNotesService?: () => NotesService | undefined;
|
|
28
30
|
getProjectService?: () => ProjectService | undefined;
|
|
29
31
|
getLocalAppService?: () => LocalAppService | undefined;
|
|
@@ -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, 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}, schedule {id, triggerKey, expectedRevision, schedule}, results {id}. 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
|
});
|
|
@@ -1801,7 +1797,7 @@ function createXopcUseTool(deps) {
|
|
|
1801
1797
|
kind: "xopc_use",
|
|
1802
1798
|
toolCallId
|
|
1803
1799
|
}
|
|
1804
|
-
}, async () => mode === "
|
|
1800
|
+
}, 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
1801
|
ok: false,
|
|
1806
1802
|
error: `Unsupported mode: ${String(mode)}`
|
|
1807
1803
|
});
|
|
@@ -1816,44 +1812,51 @@ function createXopcUseTool(deps) {
|
|
|
1816
1812
|
}
|
|
1817
1813
|
};
|
|
1818
1814
|
}
|
|
1819
|
-
function
|
|
1820
|
-
const
|
|
1821
|
-
if (!
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1815
|
+
async function handleScene(command, args, deps, dryRun, toolCallId) {
|
|
1816
|
+
const access = deps.getSceneAccess?.();
|
|
1817
|
+
if (!access) throw new Error("Scene service is unavailable");
|
|
1818
|
+
const { services, principal } = access;
|
|
1819
|
+
const { id, requestId, triggerKey, ...input } = args;
|
|
1820
|
+
const activationId = typeof id === "string" ? id : "";
|
|
1821
|
+
const request = typeof requestId === "string" && requestId.trim() ? requestId : toolCallId;
|
|
1822
|
+
if (command === "templates") return { templates: services.repository.listTemplates() };
|
|
1823
|
+
if (command === "list") return { activations: services.repository.listActivations(principal) };
|
|
1824
|
+
if (command === "get") return {
|
|
1825
|
+
activation: services.repository.getActivation(principal, activationId),
|
|
1826
|
+
runs: services.repository.listRuns(principal, activationId),
|
|
1827
|
+
schedules: services.repository.listSchedules(principal, activationId)
|
|
1830
1828
|
};
|
|
1831
|
-
if (command === "
|
|
1832
|
-
if (command === "
|
|
1833
|
-
|
|
1834
|
-
|
|
1829
|
+
if (command === "mail_accounts") return { accounts: services.mailDiscovery?.listAccounts(principal) ?? [] };
|
|
1830
|
+
if (command === "mail_search") {
|
|
1831
|
+
if (!services.mailDiscovery) throw new Error("Mail search is unavailable");
|
|
1832
|
+
if (dryRun) return {
|
|
1833
|
+
preview: true,
|
|
1834
|
+
command,
|
|
1835
|
+
input
|
|
1836
|
+
};
|
|
1837
|
+
return { sources: await services.mailDiscovery.searchSources(principal, input, AbortSignal.timeout(15e3)) };
|
|
1835
1838
|
}
|
|
1836
|
-
if (command === "
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
].includes(card.status)) throw new Error("Open a current communication card");
|
|
1843
|
-
const conversationId = deps.getCurrentConversationId?.();
|
|
1844
|
-
if (!conversationId) throw new Error("A conversation is required");
|
|
1839
|
+
if (command === "read_notes") return { notes: services.repository.readNotes(principal, activationId) };
|
|
1840
|
+
if (command === "mail_sources") return { sources: services.mail.listSources(principal) };
|
|
1841
|
+
if (command === "results") return { outcomes: services.repository.listInbox(principal, 50, "", activationId || null) };
|
|
1842
|
+
if (command === "preflight" || command === "start" && dryRun) return services.application.preflight(principal, input);
|
|
1843
|
+
if (dryRun) {
|
|
1844
|
+
services.repository.getActivation(principal, activationId);
|
|
1845
1845
|
return {
|
|
1846
|
-
|
|
1847
|
-
|
|
1846
|
+
preview: true,
|
|
1847
|
+
command,
|
|
1848
|
+
activationId,
|
|
1849
|
+
input
|
|
1848
1850
|
};
|
|
1849
1851
|
}
|
|
1850
|
-
if (command === "start") return
|
|
1851
|
-
if (command === "
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
}
|
|
1855
|
-
if (command === "
|
|
1856
|
-
|
|
1852
|
+
if (command === "start") return { activation: await services.application.start(principal, input, request) };
|
|
1853
|
+
if (command === "configure") return { activation: services.application.configure(principal, activationId, input) };
|
|
1854
|
+
if (command === "transition") return { activation: await services.application.transition(principal, activationId, input) };
|
|
1855
|
+
if (command === "check") return { intentId: services.application.check(principal, activationId, request) };
|
|
1856
|
+
if (command === "notes") return { revision: services.application.writeNotes(principal, activationId, input) };
|
|
1857
|
+
if (command === "work_item") return { workItem: services.application.createWorkItem(principal, activationId, input) };
|
|
1858
|
+
if (command === "schedule") return { revision: services.application.setSchedule(principal, activationId, String(triggerKey ?? ""), input) };
|
|
1859
|
+
throw new Error("Unsupported scene command");
|
|
1857
1860
|
}
|
|
1858
1861
|
//#endregion
|
|
1859
1862
|
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";
|
|
@@ -841,7 +841,7 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
841
841
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
842
842
|
}, z.core.$strict>>;
|
|
843
843
|
}, z.core.$strip>>>;
|
|
844
|
-
heartbeat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
844
|
+
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
845
845
|
enabled: z.ZodBoolean;
|
|
846
846
|
intervalMs: z.ZodNumber;
|
|
847
847
|
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -855,7 +855,7 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
855
855
|
end: z.ZodString;
|
|
856
856
|
timezone: z.ZodOptional<z.ZodString>;
|
|
857
857
|
}, z.core.$strip>>;
|
|
858
|
-
}, z.core.$strip
|
|
858
|
+
}, z.core.$strip>>>>;
|
|
859
859
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
860
860
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
861
861
|
stream: "stream";
|
|
@@ -1883,7 +1883,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1883
1883
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
1884
1884
|
}, z.core.$strict>>;
|
|
1885
1885
|
}, z.core.$strip>>>;
|
|
1886
|
-
heartbeat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1886
|
+
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1887
1887
|
enabled: z.ZodBoolean;
|
|
1888
1888
|
intervalMs: z.ZodNumber;
|
|
1889
1889
|
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -1897,7 +1897,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1897
1897
|
end: z.ZodString;
|
|
1898
1898
|
timezone: z.ZodOptional<z.ZodString>;
|
|
1899
1899
|
}, z.core.$strip>>;
|
|
1900
|
-
}, z.core.$strip
|
|
1900
|
+
}, z.core.$strip>>>>;
|
|
1901
1901
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1902
1902
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
1903
1903
|
stream: "stream";
|
|
@@ -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";
|
|
@@ -497,7 +497,7 @@ activityDetailDefault: z.enum([
|
|
|
497
497
|
tailscale: GatewayTailscaleSchema.optional(),
|
|
498
498
|
tls: GatewayTlsSchema.optional(),
|
|
499
499
|
auth: GatewayAuthSchema.optional(),
|
|
500
|
-
heartbeat: HeartbeatConfigSchema.optional(),
|
|
500
|
+
heartbeat: z.preprocess(() => void 0, HeartbeatConfigSchema.optional()),
|
|
501
501
|
webchat: GatewayWebchatConfigSchema.optional(),
|
|
502
502
|
corsOrigins: z.array(z.string()).optional(),
|
|
503
503
|
/**
|
|
@@ -684,11 +684,6 @@ activityDetailDefault: z.enum([
|
|
|
684
684
|
bind: "loopback",
|
|
685
685
|
port: 18790,
|
|
686
686
|
auth: { mode: "token" },
|
|
687
|
-
heartbeat: {
|
|
688
|
-
enabled: true,
|
|
689
|
-
intervalMs: 18e5,
|
|
690
|
-
includeSystemPromptSection: false
|
|
691
|
-
},
|
|
692
687
|
webchat: { activityDetailDefault: "on" },
|
|
693
688
|
corsOrigins: [],
|
|
694
689
|
skillsMarketplaceProvider: "store",
|
|
@@ -1149,11 +1144,6 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1149
1144
|
bind: "loopback",
|
|
1150
1145
|
port: 18790,
|
|
1151
1146
|
auth: { mode: "token" },
|
|
1152
|
-
heartbeat: {
|
|
1153
|
-
enabled: true,
|
|
1154
|
-
intervalMs: 18e5,
|
|
1155
|
-
includeSystemPromptSection: false
|
|
1156
|
-
},
|
|
1157
1147
|
webchat: { activityDetailDefault: "on" },
|
|
1158
1148
|
corsOrigins: [],
|
|
1159
1149
|
skillsMarketplaceProvider: "store",
|
|
@@ -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
|
+
};
|