@xopcai/xopc 0.0.306 → 0.0.307
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-DLtim-_I.js → activity-store-wgSB2HYK.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-iQXtiilH.js → agent-avatar-dicebear-CZeQo09T.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BPsRb9Ck.js +1 -0
- package/dist/gateway/static/root/assets/agents-BlrHMbRx.js +1 -0
- package/dist/gateway/static/root/assets/{api-DfSU0-lD.js → api-BKHmTb0w.js} +1 -1
- package/dist/gateway/static/root/assets/api-DFOlahZv.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BpYFKz7B.js → app-management-settings-panel-Bzw4fQP8.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-8GZpUXva.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-BkQQtIxH.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BxOvZ-ZX.js → archive-plugin-CQ2NaoHb.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-B0FzTMAJ.js → attachment-load-BFi1H7yJ.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BpXuPaPg.js → automations-page-CDBXcii_.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CUpiTTiY.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BP7wfpqy.js → binary-plugins-D07eWmOx.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-oMLvdnOQ.js → block-editor-CtVnjyYU.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DTxSZ00u.js → browser-automation-inputs-BzkJog8e.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-IbJnwEY4.js → browser-automations-page-DyrSbDdG.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-CqTxLpil.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BZ_-pnS6.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-DAD9qE3J.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-D2AmAoty.js → channels-status-swr-B2JwuTjG.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B-yI3Mi1.js → chat-terminal-dock-B62SZdAo.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CWx_jnng.js → computer-settings-page-ClSresNq.js} +1 -1
- package/dist/gateway/static/root/assets/connector-service-page-CPqVmNvx.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-BUQyg3CW.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DMRRL4Zg.js → cron-expression-CTMi_tql.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-BSwL0e6E.js → date-picker-B71AJK50.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BQTspLzC.js → dependency-picker-DlyGK-kA.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C3lFxDF6.js → desktop-pet-DGkbTE8_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Y8pjpXFE.js → desktop-pet-settings-BY8r9j66.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DzRrgd59.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CVGiGVcR.js → extension-debug-page-L8Mm1n3A.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-g3JtCP_y.js → extension-page-CFc4vSNU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CjpoKV1f.js → extension-settings-page-B5zWyHr3.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BSvXXpKM.js → gateway-config-swr-B6wHa6ZI.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BDCpS7U1.js → gateway-realtime-B53R0CA4.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BLDgrJ30.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-CYG9WCZn.js → gateway-settings-D7qmTH4R.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Caf8g3sC.js → gateway-startup-retry-DRzGnEV-.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-Cl834-SS.js → heartbeat-settings-Glsl3X5b.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-s9hDQ8Hc.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-BwEWBUVC.js → image-generation-api-Ck_pyDom.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CoMlgSIA.js → imports-page-ByBX7ome.js} +1 -1
- package/dist/gateway/static/root/assets/{index-Do9MltC4.js → index-RBCkv8a_.js} +48 -48
- package/dist/gateway/static/root/assets/index-cFU4S35z.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CNq5D4pe.js → keyboard-shortcuts-settings-C45RlO8a.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DP0x2jpR.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DQnRA598.js → local-apps-page-C_AQc2bI.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-D16nmbaN.js → locale-store-msTfRK8P.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DvM8Pyok.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DKcO5fQ-.js → management-settings-D1uwSutV.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DCp4BlZP.js → markdown-view-BInabSKf.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Cy64sn_C.js → media-plugins-C4mhf13f.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-C-9oo69N.js → messages-F74LVAiU.js} +3 -3
- package/dist/gateway/static/root/assets/note-detail-panel-D35sErp2.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-8jCDklDn.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-CgEoHSVT.js → page-tabs-1go_BtX1.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Ck2uKTbf.js → preview-open-alternatives-DmoSC0j1.js} +1 -1
- package/dist/gateway/static/root/assets/{proactive-page-Dr1mCJhZ.js → proactive-page-xAjKTIID.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DbZvJ5GE.js → product-open-page-gmi5LLwM.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BUMQHy_N.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DT-Mt7XR.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DcQdwpPu.js → registry-api-BSWtko7U.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Clz3byir.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CPwdgWKo.js → runtime-tools-settings-panel-ClkOoxDl.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-8psK4cFO.js → schema-form-BuEmLiaU.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-tQRwktKm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DqWg9XS5.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D_Gsz5rl.js → settings-form-section-Dor39QON.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C_Tj_mkZ.js → settings-page-Xj-yvIc8.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BB_sMB7P.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-B_M_oPsT.js → share-preview-page-BFWZoXdm.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-oDALm4b6.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DmwelnfK.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DYgwzl5B.js → skills-page-BE9JXz4U.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-Cuh6s2HM.js → skills-page.utils-Ii8qeXhs.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-aassGyNb.js → system-settings-panel-Di6OSO-0.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-D1AWszc7.js +1 -0
- package/dist/gateway/static/root/assets/theme-store-1SZ-HFHX.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DJYcPWIV.js → tunnel-api-DDOlOYlj.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-QGYG7oMZ.js → use-autosave-CQ8uWNnB.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-C00i4ea0.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-D1s0gIRW.js → voice-api-key-field-COTzshjL.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D2goEn5e.js → voice-config-api-DgJML_uM.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DkFW9aJ6.js → work-discovery-overlay-_URrXbi4.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BYToUPUY.js → workflow-run-setup-panel-CALs-1nd.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BUiBjz6m.js +6 -0
- package/dist/gateway/static/root/channel-icons/feishu.svg +6 -12
- package/dist/gateway/static/root/connector-icons/SOURCES.md +12 -0
- package/dist/gateway/static/root/connector-icons/dingtalk-mark.svg +1 -0
- package/dist/gateway/static/root/connector-icons/tencent-meeting-mark.svg +37 -0
- package/dist/gateway/static/root/connector-icons/wps-calendar.svg +14 -0
- package/dist/gateway/static/root/connector-icons/wps-docs.svg +14 -0
- package/dist/gateway/static/root/connector-icons/wps-mail.svg +7 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +83 -20
- package/dist/src/agent/external-tools/gateway-tools.js +2 -1
- 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/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +2 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/config/schema.d.ts +12 -0
- package/dist/src/config/schema.js +4 -2
- package/dist/src/connectors/account-access.d.ts +4 -0
- package/dist/src/connectors/account-access.js +23 -0
- package/dist/src/connectors/approval-resume.d.ts +4 -0
- package/dist/src/connectors/approval-resume.js +23 -0
- package/dist/src/connectors/auth-provider-registry.d.ts +1 -0
- package/dist/src/connectors/auth-provider-registry.js +2 -1
- package/dist/src/connectors/authorization-attempts.d.ts +21 -0
- package/dist/src/connectors/authorization-attempts.js +33 -0
- package/dist/src/connectors/builtin-catalog.js +1 -3
- package/dist/src/connectors/catalog.js +2 -1
- package/dist/src/connectors/china-catalog.d.ts +2 -0
- package/dist/src/connectors/china-catalog.js +430 -0
- package/dist/src/connectors/composio-backends.d.ts +26 -0
- package/dist/src/connectors/composio-backends.js +65 -0
- package/dist/src/connectors/composio-catalog.js +2 -1
- package/dist/src/connectors/composio-managed-client.js +3 -1
- package/dist/src/connectors/composio-managed-events.js +5 -2
- package/dist/src/connectors/composio-session-types.d.ts +2 -0
- package/dist/src/connectors/composio-sessions.d.ts +11 -2
- package/dist/src/connectors/composio-sessions.js +137 -35
- package/dist/src/connectors/composio-triggers.js +4 -2
- package/dist/src/connectors/composio.d.ts +11 -8
- package/dist/src/connectors/composio.js +68 -84
- package/dist/src/connectors/connected-source-ingestion.js +4 -3
- package/dist/src/connectors/connection-recovery-service.js +25 -13
- package/dist/src/connectors/connector-identity.d.ts +2 -0
- package/dist/src/connectors/connector-identity.js +18 -5
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/instances.js +1 -7
- package/dist/src/connectors/learning-coordinator.js +4 -3
- package/dist/src/connectors/materialize.js +14 -1
- package/dist/src/connectors/policy.d.ts +1 -1
- package/dist/src/connectors/policy.js +1 -1
- package/dist/src/connectors/principal.js +24 -3
- package/dist/src/connectors/providers.d.ts +1 -0
- package/dist/src/connectors/providers.js +14 -2
- package/dist/src/connectors/runtime-adapter-registry.js +4 -9
- package/dist/src/connectors/secret-store.d.ts +4 -1
- package/dist/src/connectors/secret-store.js +7 -3
- package/dist/src/connectors/source-change-publisher.js +4 -2
- package/dist/src/connectors/types.d.ts +16 -11
- package/dist/src/connectors/workflow-preflight.d.ts +2 -1
- package/dist/src/connectors/workflow-preflight.js +20 -3
- package/dist/src/gateway/hono/routes/connectors.js +208 -17
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +4 -1
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service.js +10 -10
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +2 -2
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/proactive/follow-ups.js +2 -1
- package/dist/src/storage/sqlite/connection-wait-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/connection-wait-repository.js +63 -2
- package/dist/src/storage/sqlite/connector-account-repository.d.ts +6 -0
- package/dist/src/storage/sqlite/connector-account-repository.js +35 -7
- package/dist/src/storage/sqlite/connector-repository.js +15 -10
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +1 -1
- package/dist/src/storage/sqlite/index.js +4 -2
- package/dist/src/storage/sqlite/migrations/182_connector_account_policies.sql +92 -0
- package/dist/src/storage/sqlite/migrations/183_connector_backend_consistency.sql +20 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +7 -7
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/home-query-service.js +3 -3
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/workflows/domain/definition.d.ts +1 -0
- package/dist/src/workflows/domain/validation.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +14 -0
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +1 -0
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -0
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CxOv4ivK.js +0 -1
- package/dist/gateway/static/root/assets/agents-DzKx7z3k.js +0 -1
- package/dist/gateway/static/root/assets/api-gpHh07OL.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-BQfR5vrq.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BceB7JHZ.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Cn_p8zY_.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CCUO3G23.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BjMb5H2_.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-P22-_i13.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BLgPORmH.js +0 -2
- package/dist/gateway/static/root/assets/device-pairing-wizard-DM4_GMzo.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BGmP1obI.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CB_XVtIM.js +0 -1
- package/dist/gateway/static/root/assets/index-CI37dTAn.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BxQlEje6.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CT5GrcMs.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-panel-5dc3LKTL.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-AbwxgXuG.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-DnE1zI1c.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BD0nLYxk.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-TYuE6A3S.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BcWDQQFX.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DzGQX6Hq.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CE2X89qN.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BL4H9Iym.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-WMKIgUOp.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BjeRslap.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-RUBQBsFP.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-PrRsd4go.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Z8iZe9YP.js +0 -6
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-RBCkv8a_.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-F74LVAiU.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-msTfRK8P.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-BaskVM5g.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-CCC4FJ3Y.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/app-link-BiBXVEvp.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-BInabSKf.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/dist-Che_jiQF.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CifKLtgG.js">
|
|
48
48
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-BLDgrJ30.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-B53R0CA4.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/files-Be5viEFY.js">
|
|
52
52
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="/assets/button-CS04eWY9.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
55
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-DRzGnEV-.js">
|
|
55
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BSWtko7U.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-B6wHa6ZI.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
59
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-wgSB2HYK.js">
|
|
59
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-1SZ-HFHX.js">
|
|
60
60
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
61
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
61
|
+
<link rel="stylesheet" crossorigin href="/assets/index-cFU4S35z.css">
|
|
62
62
|
</head>
|
|
63
63
|
<body>
|
|
64
64
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getSessionInputState, init_session_input_repository } from "../../storage/sqlite/session-input-repository.js";
|
|
4
|
+
import { getConnectorAccount } from "../../storage/sqlite/connector-account-repository.js";
|
|
5
|
+
import { consumeConnectorApproval, createConnectorApproval, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listConnectorActionMetadata, listConnectorConnections, listConnectorInstallations, upsertConnectorActionMetadata, upsertConnectorInstallation } from "../../storage/sqlite/connector-repository.js";
|
|
6
|
+
import { bindObjectiveAccount, connectionBinding, connectionBindings, connectorObjectiveScope, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../../storage/sqlite/connection-wait-repository.js";
|
|
5
7
|
import "../../storage/sqlite/index.js";
|
|
6
8
|
import { connectorArgumentsHash, connectorArgumentsPreview } from "../../connectors/approval.js";
|
|
9
|
+
import { connectorIdentitySummary } from "../../connectors/connector-identity.js";
|
|
10
|
+
import { canAccessConnectorAccount, currentAccountConnections } from "../../connectors/account-access.js";
|
|
7
11
|
import { ComposioSessionsAdapter } from "../../connectors/composio-sessions.js";
|
|
8
12
|
import { getComposioToolkitScope, getConfiguredComposioAuthConfigs, isComposioActionAllowedByCatalog, scopeForComposioAction } from "../../connectors/composio.js";
|
|
9
13
|
import { getConnectorDefinition } from "../../connectors/catalog.js";
|
|
14
|
+
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
10
15
|
import { isToolInputSchema } from "../../connectors/connection-capabilities.js";
|
|
11
16
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
12
17
|
import { ExternalToolSearchError } from "./search-error.js";
|
|
13
18
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
14
19
|
//#region src/agent/external-tools/composio-provider.ts
|
|
20
|
+
init_session_input_repository();
|
|
15
21
|
init_connection_wait_repository();
|
|
16
22
|
init_logger();
|
|
17
|
-
const CONNECTION_ARGUMENT = "
|
|
23
|
+
const CONNECTION_ARGUMENT = "xopcAccountId";
|
|
18
24
|
const log = createLogger("ComposioToolProvider");
|
|
19
25
|
function textResult(value) {
|
|
20
26
|
return {
|
|
@@ -62,7 +68,7 @@ function syncLocalOwnerInstallations(config) {
|
|
|
62
68
|
allowedAgentIds: existing?.allowedAgentIds ?? [],
|
|
63
69
|
maxScope: existing?.maxScope ?? getComposioToolkitScope(config, toolkit),
|
|
64
70
|
confirmationPolicy: existing?.confirmationPolicy ?? "writes",
|
|
65
|
-
|
|
71
|
+
selectedAccountIds: existing?.selectedAccountIds ?? null,
|
|
66
72
|
createdAt: existing?.createdAt
|
|
67
73
|
});
|
|
68
74
|
}
|
|
@@ -98,6 +104,7 @@ function actionInputSchema(action) {
|
|
|
98
104
|
if (!isToolInputSchema(action.inputSchema)) throw new Error(`Exact input contract is unavailable for ${action.actionId}`);
|
|
99
105
|
const schema = action.inputSchema;
|
|
100
106
|
const properties = schema.properties && typeof schema.properties === "object" && !Array.isArray(schema.properties) ? schema.properties : {};
|
|
107
|
+
if (Object.hasOwn(properties, CONNECTION_ARGUMENT)) throw new Error("The provider contract conflicts with the reserved account selector.");
|
|
101
108
|
return {
|
|
102
109
|
...schema,
|
|
103
110
|
type: "object",
|
|
@@ -105,7 +112,7 @@ function actionInputSchema(action) {
|
|
|
105
112
|
...properties,
|
|
106
113
|
[CONNECTION_ARGUMENT]: {
|
|
107
114
|
type: "string",
|
|
108
|
-
description: "
|
|
115
|
+
description: "Stable local account ID. Required when this objective uses multiple accounts. Never guess an account."
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
};
|
|
@@ -190,13 +197,22 @@ var ComposioToolProvider = class {
|
|
|
190
197
|
const action = listConnectorActionMetadata(resolved.installation.connectorId).find((candidate) => candidate.actionId === resolved.actionId);
|
|
191
198
|
if (!action || !isToolInputSchema(action.inputSchema) || !isComposioActionAllowedByCatalog(action.actionId)) return void 0;
|
|
192
199
|
const summary = `Run ${action.actionId} in ${toolkit}.`;
|
|
200
|
+
const available = this.availableInstallations();
|
|
201
|
+
const accounts = currentAccountConnections(listConnectorConnections({
|
|
202
|
+
principalId: available.principalId,
|
|
203
|
+
connectorId: resolved.installation.connectorId
|
|
204
|
+
}).filter((connection) => canAccessConnectorAccount(connection, resolved.installation, available.agentId))).map((connection) => ({
|
|
205
|
+
accountId: connection.accountId,
|
|
206
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
207
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
208
|
+
}));
|
|
193
209
|
return {
|
|
194
210
|
toolRef,
|
|
195
211
|
source: this.source,
|
|
196
212
|
namespace: toolkit,
|
|
197
213
|
title: action.actionId,
|
|
198
214
|
summary,
|
|
199
|
-
description: summary
|
|
215
|
+
description: `${summary} Available accounts: ${JSON.stringify(accounts)}. Use xopcAccountId to select one; never guess when the user's intent is ambiguous.`,
|
|
200
216
|
inputSchema: actionInputSchema(action)
|
|
201
217
|
};
|
|
202
218
|
}
|
|
@@ -220,19 +236,20 @@ var ComposioToolProvider = class {
|
|
|
220
236
|
const refreshed = await this.adapter.refreshConnection(expired);
|
|
221
237
|
fresh = fresh.map((item) => item.id === refreshed.id ? refreshed : item);
|
|
222
238
|
}
|
|
223
|
-
const connections = listConnectorConnections({
|
|
239
|
+
const connections = currentAccountConnections(listConnectorConnections({
|
|
224
240
|
principalId: available.principalId,
|
|
225
241
|
connectorId: resolved.installation.connectorId
|
|
226
|
-
}).filter((connection) => connection.status === "active" && fresh.some((item) => item.id === connection.id) && (
|
|
227
|
-
const
|
|
242
|
+
}).filter((connection) => connection.status === "active" && fresh.some((item) => item.id === connection.id) && canAccessConnectorAccount(connection, resolved.installation, available.agentId)));
|
|
243
|
+
const boundConnection = available.context ? connectionBinding(available.context.conversationId, resolved.installation.connectorId) : void 0;
|
|
244
|
+
const requestedAccount = typeof executionArgs[CONNECTION_ARGUMENT] === "string" ? executionArgs[CONNECTION_ARGUMENT] : boundConnection ? getConnectorConnection(boundConnection)?.accountId : void 0;
|
|
228
245
|
const bindings = available.context ? connectionBindings(available.context.conversationId).filter((need) => need.connectorId === resolved.installation.connectorId) : [];
|
|
229
|
-
if (bindings.length > 1 && !
|
|
246
|
+
if (bindings.length > 1 && !requestedAccount) return textResult({
|
|
230
247
|
status: "account_selection_required",
|
|
231
248
|
accounts: bindings,
|
|
232
|
-
instruction: "Choose the account for this operation using
|
|
249
|
+
instruction: "Choose the account for this operation using xopcAccountId."
|
|
233
250
|
});
|
|
234
|
-
if (bindings.length &&
|
|
235
|
-
const connection =
|
|
251
|
+
if (bindings.length && requestedAccount && !bindings.some((need) => need.accountId === requestedAccount)) return textResult("This account was not selected for the current objective.");
|
|
252
|
+
const connection = requestedAccount ? connections.find((candidate) => candidate.accountId === requestedAccount) : connections.length === 1 ? connections[0] : void 0;
|
|
236
253
|
const requestConnection = () => {
|
|
237
254
|
if (!available.context) return textResult({ status: "connection_required" });
|
|
238
255
|
const result = requireSessionConnection({
|
|
@@ -243,7 +260,7 @@ var ComposioToolProvider = class {
|
|
|
243
260
|
needs: [{
|
|
244
261
|
key: `${resolved.installation.connectorId}:default`,
|
|
245
262
|
connectorId: resolved.installation.connectorId,
|
|
246
|
-
|
|
263
|
+
accountId: requestedAccount,
|
|
247
264
|
label: getConnectorDefinition(resolved.installation.connectorId)?.displayName ?? toolkit,
|
|
248
265
|
capabilities: [action.actionId]
|
|
249
266
|
}]
|
|
@@ -252,13 +269,18 @@ var ComposioToolProvider = class {
|
|
|
252
269
|
return textResult(result);
|
|
253
270
|
};
|
|
254
271
|
if (!connection) return requestConnection();
|
|
272
|
+
if (available.context && connection.accountId) bindObjectiveAccount(available.context.conversationId, resolved.installation.connectorId, connection.accountId);
|
|
255
273
|
const actionArgs = { ...executionArgs };
|
|
256
274
|
delete actionArgs[CONNECTION_ARGUMENT];
|
|
257
|
-
const argsHash = connectorArgumentsHash(
|
|
275
|
+
const argsHash = connectorArgumentsHash({
|
|
276
|
+
args: actionArgs,
|
|
277
|
+
accountId: connection.accountId,
|
|
278
|
+
objective: available.context ? connectorObjectiveScope(available.context.conversationId) : void 0
|
|
279
|
+
});
|
|
258
280
|
let confirmed = false;
|
|
259
281
|
if (approvalId) {
|
|
260
282
|
const pending = getConnectorApproval(approvalId);
|
|
261
|
-
if (!pending || pending.principalId !== available.principalId || pending.connectorId !== resolved.installation.connectorId || pending.actionId !== action.actionId || pending.conversationId !== available.context?.conversationId) return textResult("The connector approval is invalid for this session or action.");
|
|
283
|
+
if (!pending || pending.principalId !== available.principalId || pending.connectorId !== resolved.installation.connectorId || pending.actionId !== action.actionId || pending.conversationId !== available.context?.conversationId || pending.agentId !== available.agentId || !pending.connectionId || getConnectorConnection(pending.connectionId)?.accountId !== connection.accountId) return textResult("The connector approval is invalid for this session or action.");
|
|
262
284
|
confirmed = Boolean(consumeConnectorApproval(approvalId, argsHash));
|
|
263
285
|
if (!confirmed) return textResult("The connector approval is not approved, has expired, or was already used.");
|
|
264
286
|
}
|
|
@@ -286,7 +308,22 @@ var ComposioToolProvider = class {
|
|
|
286
308
|
throw error;
|
|
287
309
|
}
|
|
288
310
|
if (result.decision === "confirmation_required") {
|
|
311
|
+
const wait = available.context && getSessionInputState(available.context.conversationId).activeInputId ? requireSessionConnection({
|
|
312
|
+
conversationId: available.context.conversationId,
|
|
313
|
+
principalId: available.principalId,
|
|
314
|
+
agentId: available.agentId ?? "main",
|
|
315
|
+
summary: `Confirm ${action.actionId}`,
|
|
316
|
+
needs: [{
|
|
317
|
+
key: `${resolved.installation.connectorId}:${connection.accountId}`,
|
|
318
|
+
connectorId: resolved.installation.connectorId,
|
|
319
|
+
accountId: connection.accountId,
|
|
320
|
+
connectionId: connection.id,
|
|
321
|
+
label: toolkit,
|
|
322
|
+
capabilities: [action.actionId]
|
|
323
|
+
}]
|
|
324
|
+
}) : void 0;
|
|
289
325
|
const approval = createConnectorApproval({
|
|
326
|
+
waitId: wait?.waitId,
|
|
290
327
|
principalId: available.principalId,
|
|
291
328
|
connectorId: resolved.installation.connectorId,
|
|
292
329
|
connectionId: connection?.id,
|
|
@@ -294,10 +331,22 @@ var ComposioToolProvider = class {
|
|
|
294
331
|
conversationId: available.context?.conversationId,
|
|
295
332
|
actionId: action.actionId,
|
|
296
333
|
scope: action.scope,
|
|
297
|
-
argumentsHash:
|
|
298
|
-
|
|
334
|
+
argumentsHash: connectorArgumentsHash({
|
|
335
|
+
args: actionArgs,
|
|
336
|
+
accountId: connection.accountId,
|
|
337
|
+
objective: available.context ? connectorObjectiveScope(available.context.conversationId) : void 0
|
|
338
|
+
}),
|
|
339
|
+
argumentsPreview: {
|
|
340
|
+
account: {
|
|
341
|
+
id: connection.accountId,
|
|
342
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
343
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
344
|
+
},
|
|
345
|
+
arguments: connectorArgumentsPreview(actionArgs)
|
|
346
|
+
},
|
|
299
347
|
expiresAt: new Date(Date.now() + 10 * 6e4).toISOString()
|
|
300
348
|
});
|
|
349
|
+
if (available.context && wait?.waitId) publishConnectionWait(available.context.conversationId);
|
|
301
350
|
return textResult({
|
|
302
351
|
status: "confirmation_required",
|
|
303
352
|
approvalId: approval.id,
|
|
@@ -305,17 +354,31 @@ var ComposioToolProvider = class {
|
|
|
305
354
|
scope: approval.scope,
|
|
306
355
|
argumentsPreview: approval.argumentsPreview,
|
|
307
356
|
expiresAt: approval.expiresAt,
|
|
357
|
+
account: {
|
|
358
|
+
id: connection.accountId,
|
|
359
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
360
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
361
|
+
},
|
|
308
362
|
instruction: "Ask the user to approve this exact action in xopc, then retry with the approvalId and unchanged arguments."
|
|
309
363
|
});
|
|
310
364
|
}
|
|
311
|
-
return textResult(result.decision === "allowed" ?
|
|
365
|
+
return textResult(result.decision === "allowed" ? {
|
|
366
|
+
account: {
|
|
367
|
+
id: connection.accountId,
|
|
368
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
369
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
370
|
+
},
|
|
371
|
+
result: result.result
|
|
372
|
+
} : result.reason);
|
|
312
373
|
}
|
|
313
374
|
availableInstallations() {
|
|
314
375
|
const context = this.deps.getCurrentContext();
|
|
315
376
|
const principal = connectorPrincipalForSession(context?.conversationId);
|
|
316
377
|
if (principal.isLocalOwner) syncLocalOwnerInstallations(this.deps.getConfig());
|
|
317
378
|
const agentId = this.deps.agentId ?? principal.agentId;
|
|
318
|
-
const
|
|
379
|
+
const config = this.deps.getConfig();
|
|
380
|
+
const disabled = new Set(config ? listConnectorInstances(config).filter((instance) => !instance.enabled).map((instance) => instance.connectorId) : []);
|
|
381
|
+
const installations = listConnectorInstallations(principal.principalId).filter((installation) => installation.enabled && !disabled.has(installation.connectorId) && composioToolkitFromConnectorId(installation.connectorId) !== void 0 && (installation.allowedAgentIds.length === 0 || Boolean(agentId && installation.allowedAgentIds.includes(agentId))));
|
|
319
382
|
return {
|
|
320
383
|
principalId: principal.principalId,
|
|
321
384
|
agentId,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { init_connector_repository, listConnectorConnections } from "../../storage/sqlite/connector-repository.js";
|
|
1
2
|
import { connectionBindings, getActiveConnectionWait, init_connection_wait_repository, publishConnectionWait, requireSessionConnection, reviseCurrentConnectionObjective } from "../../storage/sqlite/connection-wait-repository.js";
|
|
2
|
-
import { listConnectorConnections } from "../../storage/sqlite/connector-repository.js";
|
|
3
3
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
4
4
|
import { connectionCandidates, resolveConnectionCandidate } from "../../connectors/connection-candidates.js";
|
|
5
5
|
import { ExternalToolService } from "./service.js";
|
|
6
6
|
import { EXTERNAL_TOOL_SOURCES } from "./types.js";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/agent/external-tools/gateway-tools.ts
|
|
9
|
+
init_connector_repository();
|
|
9
10
|
init_connection_wait_repository();
|
|
10
11
|
const EXTERNAL_TOOL_NAMES = {
|
|
11
12
|
search: "xopc_tool_search",
|
|
@@ -2,9 +2,9 @@ import { init_global_singleton, resolveGlobalSingleton } from "../../utils/globa
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_string_coerce, normalizeOptionalString } from "../../utils/string-coerce.js";
|
|
5
|
+
import { resolveConnectorSecretReferences } from "../../connectors/secret-store.js";
|
|
5
6
|
import { redactSensitiveUrlLikeString } from "../../utils/redact-sensitive-url.js";
|
|
6
7
|
import { loadEmbeddedMcpConfig } from "./embedded-mcp.js";
|
|
7
|
-
import { resolveConnectorSecretReferences } from "../../connectors/secret-store.js";
|
|
8
8
|
import { isMcpConfigRecord } from "./mcp-config-shared.js";
|
|
9
9
|
import { resolveMcpTransport } from "./mcp-transport.js";
|
|
10
10
|
import { sanitizeServerName } from "./bundle-mcp-names.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_global_singleton, resolveGlobalSingleton } from "../../../utils/global-singleton.js";
|
|
2
2
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../../utils/logger.js";
|
|
4
|
-
import { redactSensitiveUrlLikeString } from "../../../utils/redact-sensitive-url.js";
|
|
5
4
|
import { resolveConnectorSecretReferences } from "../../../connectors/secret-store.js";
|
|
5
|
+
import { redactSensitiveUrlLikeString } from "../../../utils/redact-sensitive-url.js";
|
|
6
6
|
import { resolveMcpTransportConfig } from "../mcp-transport-config.js";
|
|
7
7
|
import { isMcpAuthorizationError } from "./mcp-oauth-errors.js";
|
|
8
8
|
import { McpOAuthStore, canonicalMcpServerUrl } from "./mcp-oauth-store.js";
|
|
@@ -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 v183).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
3
|
import "../../../config/index.js";
|
|
4
|
-
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
4
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
|
-
import {
|
|
5
|
+
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
7
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
|
+
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
8
8
|
import { runServiceRestart, runServiceStop } from "./lifecycle-core.js";
|
|
9
9
|
import { DEFAULT_RESTART_HEALTH_ATTEMPTS, renderGatewayPortHealthDiagnostics, waitForGatewayHealthyListener } from "./restart-health.js";
|
|
10
10
|
import { parsePortFromArgs, renderGatewayServiceStartHints, resolveGatewayPortFromConfig } from "./shared.js";
|
|
@@ -2,9 +2,9 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import "../../config/index.js";
|
|
5
|
+
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
5
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
6
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
7
|
-
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
8
8
|
import { formatUpdateApiResult, resolveUpdateInstallSurface, runGatewayUpdateWithPostSteps } from "../../infra/update-runner.js";
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
//#region src/cli/commands/update.ts
|
|
@@ -1378,6 +1378,8 @@ export declare const McpServerSchema: z.ZodObject<{
|
|
|
1378
1378
|
xopcSecretRef: z.ZodObject<{
|
|
1379
1379
|
provider: z.ZodString;
|
|
1380
1380
|
fieldKey: z.ZodString;
|
|
1381
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1382
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1381
1383
|
}, z.core.$strip>;
|
|
1382
1384
|
}, z.core.$strip>]>>>;
|
|
1383
1385
|
cwd: z.ZodOptional<z.ZodString>;
|
|
@@ -1391,6 +1393,8 @@ export declare const McpServerSchema: z.ZodObject<{
|
|
|
1391
1393
|
xopcSecretRef: z.ZodObject<{
|
|
1392
1394
|
provider: z.ZodString;
|
|
1393
1395
|
fieldKey: z.ZodString;
|
|
1396
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1397
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1394
1398
|
}, z.core.$strip>;
|
|
1395
1399
|
}, z.core.$strip>]>>>;
|
|
1396
1400
|
auth: z.ZodOptional<z.ZodObject<{
|
|
@@ -1408,6 +1412,8 @@ export declare const McpConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1408
1412
|
xopcSecretRef: z.ZodObject<{
|
|
1409
1413
|
provider: z.ZodString;
|
|
1410
1414
|
fieldKey: z.ZodString;
|
|
1415
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1416
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1411
1417
|
}, z.core.$strip>;
|
|
1412
1418
|
}, z.core.$strip>]>>>;
|
|
1413
1419
|
cwd: z.ZodOptional<z.ZodString>;
|
|
@@ -1421,6 +1427,8 @@ export declare const McpConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1421
1427
|
xopcSecretRef: z.ZodObject<{
|
|
1422
1428
|
provider: z.ZodString;
|
|
1423
1429
|
fieldKey: z.ZodString;
|
|
1430
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1431
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1424
1432
|
}, z.core.$strip>;
|
|
1425
1433
|
}, z.core.$strip>]>>>;
|
|
1426
1434
|
auth: z.ZodOptional<z.ZodObject<{
|
|
@@ -2174,6 +2182,8 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2174
2182
|
xopcSecretRef: z.ZodObject<{
|
|
2175
2183
|
provider: z.ZodString;
|
|
2176
2184
|
fieldKey: z.ZodString;
|
|
2185
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
2186
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
2177
2187
|
}, z.core.$strip>;
|
|
2178
2188
|
}, z.core.$strip>]>>>;
|
|
2179
2189
|
cwd: z.ZodOptional<z.ZodString>;
|
|
@@ -2187,6 +2197,8 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2187
2197
|
xopcSecretRef: z.ZodObject<{
|
|
2188
2198
|
provider: z.ZodString;
|
|
2189
2199
|
fieldKey: z.ZodString;
|
|
2200
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
2201
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
2190
2202
|
}, z.core.$strip>;
|
|
2191
2203
|
}, z.core.$strip>]>>>;
|
|
2192
2204
|
auth: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
3
2
|
import { AgentModelsOverrideSchema, AgentsConfigSchema as AgentsConfigSchema$1, DEFAULT_AGENT_MODEL_REF, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
4
3
|
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";
|
|
@@ -958,7 +958,9 @@ defaultAgent: z.string().min(1).optional() }).strict().default({});
|
|
|
958
958
|
}, "MCP server URL must use http or https");
|
|
959
959
|
ConnectorSecretReferenceSchema = z.object({ xopcSecretRef: z.object({
|
|
960
960
|
provider: z.string().min(1),
|
|
961
|
-
fieldKey: z.string().min(1)
|
|
961
|
+
fieldKey: z.string().min(1),
|
|
962
|
+
prefix: z.string().optional(),
|
|
963
|
+
suffix: z.string().optional()
|
|
962
964
|
}) });
|
|
963
965
|
McpConfigScalarSchema = z.union([
|
|
964
966
|
z.string(),
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConnectorConnection, ConnectorInstallationPolicy } from './types.js';
|
|
2
|
+
/** Account policy can only narrow the installation's permissions. */
|
|
3
|
+
export declare function canAccessConnectorAccount(connection: ConnectorConnection, installation: ConnectorInstallationPolicy, agentId?: string): boolean;
|
|
4
|
+
export declare function currentAccountConnections(connections: ConnectorConnection[]): ConnectorConnection[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
|
|
2
|
+
//#region src/connectors/account-access.ts
|
|
3
|
+
init_connector_account_repository();
|
|
4
|
+
/** Account policy can only narrow the installation's permissions. */
|
|
5
|
+
function canAccessConnectorAccount(connection, installation, agentId) {
|
|
6
|
+
if (!installation.enabled || connection.principalId !== installation.principalId || connection.connectorId !== installation.connectorId || !connection.accountId) return false;
|
|
7
|
+
if (installation.allowedAgentIds.length && (!agentId || !installation.allowedAgentIds.includes(agentId))) return false;
|
|
8
|
+
if (installation.selectedAccountIds !== null && !installation.selectedAccountIds.includes(connection.accountId)) return false;
|
|
9
|
+
const account = getConnectorAccount(connection.accountId);
|
|
10
|
+
return Boolean(account?.enabled && (account.allowedAgentIds === null || agentId && account.allowedAgentIds.includes(agentId)));
|
|
11
|
+
}
|
|
12
|
+
function currentAccountConnections(connections) {
|
|
13
|
+
const byAccount = /* @__PURE__ */ new Map();
|
|
14
|
+
for (const connection of connections) {
|
|
15
|
+
if (!connection.accountId || connection.status !== "active") continue;
|
|
16
|
+
const existing = byAccount.get(connection.accountId);
|
|
17
|
+
const currentId = getConnectorAccount(connection.accountId)?.currentConnectionId;
|
|
18
|
+
if (!existing || connection.id === currentId || existing.id !== currentId && connection.updatedAt > existing.updatedAt) byAccount.set(connection.accountId, connection);
|
|
19
|
+
}
|
|
20
|
+
return [...byAccount.values()];
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { canAccessConnectorAccount, currentAccountConnections };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConnectorApprovalRecord } from './types.js';
|
|
2
|
+
import type { ConnectionRecoveryService } from './connection-recovery-service.js';
|
|
3
|
+
/** Approval resumes only the exact suspended objective that requested it. */
|
|
4
|
+
export declare function resumeApprovedConnectorAction(approval: ConnectorApprovalRecord, recovery: ConnectionRecoveryService): Promise<boolean>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getActiveConnectionWait, init_connection_wait_repository } from "../storage/sqlite/connection-wait-repository.js";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
//#region src/connectors/approval-resume.ts
|
|
4
|
+
init_connection_wait_repository();
|
|
5
|
+
/** Approval resumes only the exact suspended objective that requested it. */
|
|
6
|
+
async function resumeApprovedConnectorAction(approval, recovery) {
|
|
7
|
+
if (approval.status !== "approved" || !approval.waitId || !approval.conversationId) return false;
|
|
8
|
+
const wait = getActiveConnectionWait(approval.conversationId);
|
|
9
|
+
if (!wait || wait.id !== approval.waitId || wait.principalId !== approval.principalId || wait.agentId !== approval.agentId || wait.status !== "open") return false;
|
|
10
|
+
try {
|
|
11
|
+
return (await recovery.act(wait.conversationId, {
|
|
12
|
+
action: "continue",
|
|
13
|
+
waitId: wait.id,
|
|
14
|
+
expectedTranscriptId: wait.transcriptId,
|
|
15
|
+
expectedVersion: wait.version,
|
|
16
|
+
idempotencyKey: randomUUID()
|
|
17
|
+
})).snapshot.wait?.phase === "queued";
|
|
18
|
+
} catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { resumeApprovedConnectorAction };
|
|
@@ -6,5 +6,6 @@ export type ConnectorAuthStartResult = {
|
|
|
6
6
|
status: string;
|
|
7
7
|
authorizationUrl?: string;
|
|
8
8
|
connectionId?: string;
|
|
9
|
+
attemptId?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare function startConnectorAuthorization(definition: ConnectorDefinition, config?: Config, instanceId?: string): Promise<ConnectorAuthStartResult>;
|
|
@@ -32,7 +32,8 @@ async function startConnectorAuthorization(definition, config, instanceId) {
|
|
|
32
32
|
provider: "composio",
|
|
33
33
|
status: "pending",
|
|
34
34
|
authorizationUrl: authorization.connectUrl,
|
|
35
|
-
connectionId: authorization.connectionId
|
|
35
|
+
connectionId: authorization.connectionId,
|
|
36
|
+
attemptId: authorization.attemptId
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type AuthorizationAttempt = {
|
|
2
|
+
id: string;
|
|
3
|
+
principal_id: string;
|
|
4
|
+
connector_id: string;
|
|
5
|
+
backend_id: string | null;
|
|
6
|
+
connection_id: string;
|
|
7
|
+
expected_account_id: string | null;
|
|
8
|
+
authorization_url: string | null;
|
|
9
|
+
status: 'awaiting_user' | 'succeeded' | 'failed' | 'expired';
|
|
10
|
+
expires_at: number;
|
|
11
|
+
created_at: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function saveAuthorizationAttempt(input: {
|
|
14
|
+
connectionId: string;
|
|
15
|
+
principalId: string;
|
|
16
|
+
connectorId: string;
|
|
17
|
+
backendId?: string;
|
|
18
|
+
expectedAccountId?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare function getAuthorizationAttempt(id: string, principalId: string): AuthorizationAttempt | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { getConnectorConnection, init_connector_repository } from "../storage/sqlite/connector-repository.js";
|
|
3
|
+
//#region src/connectors/authorization-attempts.ts
|
|
4
|
+
init_connector_repository();
|
|
5
|
+
init_transaction();
|
|
6
|
+
function saveAuthorizationAttempt(input) {
|
|
7
|
+
const now = Date.now();
|
|
8
|
+
getSqliteDatabase().prepare(`INSERT INTO connector_authorization_attempts
|
|
9
|
+
(id, principal_id, connector_id, backend_id, connection_id, expected_account_id, authorization_url, status, expires_at, created_at)
|
|
10
|
+
VALUES(?,?,?,?,?,?,?,'awaiting_user',?,?)
|
|
11
|
+
ON CONFLICT(id) DO UPDATE SET expected_account_id = excluded.expected_account_id,
|
|
12
|
+
authorization_url = excluded.authorization_url, status = 'awaiting_user',
|
|
13
|
+
expires_at = excluded.expires_at, created_at = excluded.created_at`).run(input.connectionId, input.principalId, input.connectorId, input.backendId ?? null, input.connectionId, input.expectedAccountId ?? null, input.url ?? null, now + 10 * 6e4, now);
|
|
14
|
+
return input.connectionId;
|
|
15
|
+
}
|
|
16
|
+
function getAuthorizationAttempt(id, principalId) {
|
|
17
|
+
const db = getSqliteDatabase();
|
|
18
|
+
const row = db.prepare("SELECT * FROM connector_authorization_attempts WHERE id = ? AND principal_id = ?").get(id, principalId);
|
|
19
|
+
if (!row || row.status !== "awaiting_user") return row;
|
|
20
|
+
const connection = getConnectorConnection(row.connection_id);
|
|
21
|
+
const status = row.expires_at <= Date.now() ? "expired" : connection?.status === "active" ? row.expected_account_id && row.expected_account_id !== connection.accountId ? "failed" : "succeeded" : connection && ["failed", "revoked"].includes(connection.status) ? "failed" : "awaiting_user";
|
|
22
|
+
if (status !== row.status) {
|
|
23
|
+
db.prepare("UPDATE connector_authorization_attempts SET status = ?, authorization_url = NULL WHERE id = ?").run(status, id);
|
|
24
|
+
return {
|
|
25
|
+
...row,
|
|
26
|
+
status,
|
|
27
|
+
authorization_url: null
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return row;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { getAuthorizationAttempt, saveAuthorizationAttempt };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
//#region src/connectors/builtin-catalog.ts
|
|
2
|
-
const BUILTIN_CONNECTOR_BACKGROUNDS = { filesystem: "#FFF7E6" };
|
|
3
2
|
function builtinBranding(id) {
|
|
4
3
|
return {
|
|
5
4
|
logoUrl: `/connector-icons/${id}.svg`,
|
|
6
|
-
source: "builtin"
|
|
7
|
-
backgroundColor: BUILTIN_CONNECTOR_BACKGROUNDS[id] ?? "#FFFFFF"
|
|
5
|
+
source: "builtin"
|
|
8
6
|
};
|
|
9
7
|
}
|
|
10
8
|
const BUILTIN_CONNECTORS = [{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { init_connection, isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
|
-
import { getCachedConnectorCatalogEntry } from "../storage/sqlite/connector-repository.js";
|
|
2
|
+
import { getCachedConnectorCatalogEntry, init_connector_repository } from "../storage/sqlite/connector-repository.js";
|
|
3
3
|
import { listConnectorProviderDefinitions, listConnectorProviders } from "./providers.js";
|
|
4
4
|
//#region src/connectors/catalog.ts
|
|
5
|
+
init_connector_repository();
|
|
5
6
|
init_connection();
|
|
6
7
|
const CONNECTOR_BY_ID = new Map(listConnectorProviderDefinitions().map((connector) => [connector.id, connector]));
|
|
7
8
|
function listConnectorCatalog() {
|