@xopcai/xopc 0.0.142 → 0.0.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +2 -2
- package/dist/extensions/telegram/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/extensions/weixin/src/workflow-progress.js +1 -1
- package/dist/gateway/static/root/assets/activity-center-store-jITiX2vJ.js +1 -0
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BawPxiu5.js → agent-avatar-dicebear-EAVnrCAs.js} +1 -1
- package/dist/gateway/static/root/assets/agents-5rTuJOtT.js +2 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-81xd1p9R.js → app-management-settings-panel-Bu568NpC.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DYeQsYU8.js → appearance-settings-DSkm9bp_.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DWetalKp.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-D_oa7oti.js → archive-plugin-C99N0vV6.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-Cd-bwI2N.js → attachment-load-CHTDqME5.js} +1 -1
- package/dist/gateway/static/root/assets/automation-suggestion-card-CBt6U3-S.js +1 -0
- package/dist/gateway/static/root/assets/automations-page-ICUfxeOz.js +4 -0
- package/dist/gateway/static/root/assets/{binary-plugins-O8svLKWw.js → binary-plugins-BRtxOLlM.js} +1 -1
- package/dist/gateway/static/root/assets/block-editor-CUlXfgXd.js +184 -0
- package/dist/gateway/static/root/assets/browser-settings-page-D7Bj4MKi.js +8 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-dJy1Eqgx.js → capability-presets-api-Bg1ntFSD.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-C-8I-Ktn.js +2 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-Bfuhp2ty.js → channel-recipient-api-DuulnhIj.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Dm5EqQyK.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-B5lVrUsN.js +1 -0
- package/dist/gateway/static/root/assets/check-BODqo66o.js +1 -0
- package/dist/gateway/static/root/assets/chunk-QUQL4437-DXsxWP7r.js +4 -0
- package/dist/gateway/static/root/assets/circle-alert-RzVebuX2.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-BOzjh-OK.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DFMfIb5F.js → desktop-pet-C-Drhqyk.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CRGiolqF.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BrYt1gAr.js → directory-picker-path-field-Dw1L3M84.js} +1 -1
- package/dist/gateway/static/root/assets/dist-SwiI0Xu3.js +1 -0
- package/dist/gateway/static/root/assets/dreaming-settings-CF21cbjo.js +3 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-Bh630pLD.js → extension-debug-page-Dcl8LJG_.js} +1 -1
- package/dist/gateway/static/root/assets/extension-page-i_BXmO_x.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-CWIi7xsn.js +1 -0
- package/dist/gateway/static/root/assets/{fetch-B1WtuprY.js → fetch-8QNN25Sh.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-De2N821l.js → gateway-config-api-2sLP2kkA.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-DMHiZc-2.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-nEujFSDj.js → gateway-startup-retry-5YBnS9Fj.js} +1 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-CAODVDiA.js +1 -0
- package/dist/gateway/static/root/assets/goal-detail-page-_d4DjmeX.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-DUy3eEse.js → goals-config-api-B4qeLKQS.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-lgsop664.js +2 -0
- package/dist/gateway/static/root/assets/goals-settings-Dx_1ZNgb.js +1 -0
- package/dist/gateway/static/root/assets/heartbeat-settings-DeTseEk_.js +1 -0
- package/dist/gateway/static/root/assets/index-CphxClbs.css +1 -0
- package/dist/gateway/static/root/assets/index-VWvztcst.js +257 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CVIwwM15.js → keyboard-shortcuts-settings-BpwpMmlk.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-9_hbTg3j.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-B_6us9j7.js → markdown-split-BTRFTK0w.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-D_fryIyj.js → media-plugins-BABfIZPU.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CzKxM6I4.js +5 -0
- package/dist/gateway/static/root/assets/models-hub-panel-B1CUvZxh.js +2 -0
- package/dist/gateway/static/root/assets/notes-page-88QBHW9a.js +1 -0
- package/dist/gateway/static/root/assets/notes-workbench-CerZOeLW.js +2 -0
- package/dist/gateway/static/root/assets/{page-tabs-D_8jGlqx.js → page-tabs-je95DZOf.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BBLMK8Mp.js → preview-open-alternatives-BJbwi7Rc.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BmrApldl.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-tTn-k76N.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-DeA2-pOi.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-DVS3FR5r.js → save-bar-controls-qWMQ9mod.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-D6vKd6-T.js → schedule-field-kxd270Gs.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BPy4lbIh.js → schema-form-DLnD-MuD.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-D4kvvcL1.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CI1OG4gq.js +1 -0
- package/dist/gateway/static/root/assets/{settings-collapsible-section-WzdikxPt.js → settings-collapsible-section-DQprvu5J.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-CvfzhBV-.js → settings-form-section-Cqq7Y98y.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-BxR-Ulhi.js → settings-loading-skeleton-b6rXULL5.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-BtBVz3cX.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-CKefvbYi.js → settings-page-layout-BNJbtklV.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-cmclUJzS.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page--zO-A1W1.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DNJvqA67.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DWr_0Xgn.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DEGsTbJx.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BokgAgf7.js → system-settings-panel-Cq9J7i7v.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-BwHlNL3L.js → typed-models-lib-CdSwi1gT.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-DR11ap3A.js → use-channel-catalog-COXIfXcl.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-C-V73ZaJ.js +1 -0
- package/dist/gateway/static/root/assets/user-profile-fields-editor-B1cxoGkh.js +1 -0
- package/dist/gateway/static/root/assets/user-profile-settings-panel-B8hlamVB.js +1 -0
- package/dist/gateway/static/root/assets/{utils-BKUWB-TT.js → utils-Dx01V8qF.js} +1 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-DGpIUelZ.js +1 -0
- package/dist/gateway/static/root/assets/with-selector-aYPsXwdl.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-fzWTxF26.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CL_rnAUB.js → workflow-run-setup-panel-Dt_x8LGg.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bg02zEUh.js +11 -0
- package/dist/gateway/static/root/assets/workflows-page-DLioOiRN.css +1 -0
- package/dist/gateway/static/root/connector-icons/README.md +11 -0
- package/dist/gateway/static/root/connector-icons/airtable.svg +13 -0
- package/dist/gateway/static/root/connector-icons/asana.svg +15 -0
- package/dist/gateway/static/root/connector-icons/brave-search.svg +1 -0
- package/dist/gateway/static/root/connector-icons/clickup.svg +19 -0
- package/dist/gateway/static/root/connector-icons/composio.svg +266 -0
- package/dist/gateway/static/root/connector-icons/discord.svg +15 -0
- package/dist/gateway/static/root/connector-icons/dropbox.svg +152 -0
- package/dist/gateway/static/root/connector-icons/excel.svg +56 -0
- package/dist/gateway/static/root/connector-icons/fetch.svg +6 -0
- package/dist/gateway/static/root/connector-icons/figma.svg +178 -0
- package/dist/gateway/static/root/connector-icons/filesystem.svg +6 -0
- package/dist/gateway/static/root/connector-icons/github.svg +10 -0
- package/dist/gateway/static/root/connector-icons/gmail.svg +3 -0
- package/dist/gateway/static/root/connector-icons/google-calendar.svg +3 -0
- package/dist/gateway/static/root/connector-icons/google-docs.svg +25 -0
- package/dist/gateway/static/root/connector-icons/google-drive.svg +25 -0
- package/dist/gateway/static/root/connector-icons/google-sheets.svg +1 -0
- package/dist/gateway/static/root/connector-icons/hubspot.svg +142 -0
- package/dist/gateway/static/root/connector-icons/jira.svg +15 -0
- package/dist/gateway/static/root/connector-icons/linear.svg +5 -0
- package/dist/gateway/static/root/connector-icons/memory.svg +5 -0
- package/dist/gateway/static/root/connector-icons/microsoft-teams.svg +33 -0
- package/dist/gateway/static/root/connector-icons/notion.svg +5 -0
- package/dist/gateway/static/root/connector-icons/one-drive.svg +13 -0
- package/dist/gateway/static/root/connector-icons/outlook.svg +76 -0
- package/dist/gateway/static/root/connector-icons/playwright.svg +9 -0
- package/dist/gateway/static/root/connector-icons/salesforce.svg +17 -0
- package/dist/gateway/static/root/connector-icons/sequential-thinking.svg +8 -0
- package/dist/gateway/static/root/connector-icons/shopify.svg +5 -0
- package/dist/gateway/static/root/connector-icons/slack.svg +9 -0
- package/dist/gateway/static/root/connector-icons/spotify.svg +43 -0
- package/dist/gateway/static/root/connector-icons/stripe.svg +11 -0
- package/dist/gateway/static/root/connector-icons/telegram.svg +130 -0
- package/dist/gateway/static/root/connector-icons/time.svg +6 -0
- package/dist/gateway/static/root/connector-icons/todoist.svg +277 -0
- package/dist/gateway/static/root/connector-icons/trello.svg +19 -0
- package/dist/gateway/static/root/connector-icons/twitter.svg +128 -0
- package/dist/gateway/static/root/connector-icons/whatsapp.svg +61 -0
- package/dist/gateway/static/root/connector-icons/youtube.svg +11 -0
- package/dist/gateway/static/root/index.html +10 -7
- package/dist/package.js +1 -1
- package/dist/src/activity/emitter.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +2 -0
- package/dist/src/agent/agent-manager.js +12 -4
- package/dist/src/agent/agent-manager.js.map +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +3 -2
- package/dist/src/agent/background-review/prompts.js.map +1 -1
- package/dist/src/agent/code-intelligence/binary.js +1 -1
- package/dist/src/agent/context/project-context.js +2 -2
- package/dist/src/agent/context/workspace-seed.js +2 -2
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.d.ts +9 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +71 -3
- package/dist/src/agent/embedded/xopc-tools-bridge.js.map +1 -1
- package/dist/src/agent/goals/post-turn.js +7 -6
- package/dist/src/agent/goals/post-turn.js.map +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.js +5 -2
- package/dist/src/agent/mcp/mcp-transport.js.map +1 -1
- package/dist/src/agent/memory/context/planner.d.ts +1 -0
- package/dist/src/agent/memory/context/planner.js +60 -14
- package/dist/src/agent/memory/context/planner.js.map +1 -1
- package/dist/src/agent/memory/context/types.d.ts +3 -1
- package/dist/src/agent/memory/lifecycle.d.ts +11 -0
- package/dist/src/agent/memory/lifecycle.js +50 -0
- package/dist/src/agent/memory/lifecycle.js.map +1 -0
- package/dist/src/agent/memory/plugin-discovery.js +1 -1
- package/dist/src/agent/memory/source-origin.d.ts +3 -0
- package/dist/src/agent/memory/source-origin.js +19 -0
- package/dist/src/agent/memory/source-origin.js.map +1 -0
- package/dist/src/agent/memory/understanding/service.js +5 -0
- package/dist/src/agent/memory/understanding/service.js.map +1 -1
- package/dist/src/agent/memory/user-context-coordinator.js +7 -2
- package/dist/src/agent/memory/user-context-coordinator.js.map +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/prompt/sections/behavior.d.ts +2 -0
- package/dist/src/agent/prompt/sections/behavior.js +30 -1
- package/dist/src/agent/prompt/sections/behavior.js.map +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +8 -1
- package/dist/src/agent/prompt/service-prompt-builder.js.map +1 -1
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -0
- package/dist/src/agent/prompt/system-prompt.js +6 -3
- package/dist/src/agent/prompt/system-prompt.js.map +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +22 -0
- package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
- package/dist/src/agent/service.d.ts +2 -0
- package/dist/src/agent/service.js +12 -6
- package/dist/src/agent/service.js.map +1 -1
- package/dist/src/agent/session/session-inspector.js +2 -2
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/starter-agents.js +1 -1
- package/dist/src/agent/starter-agents.js.map +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js.map +1 -1
- package/dist/src/agent/tools/composio-tool.d.ts +18 -5
- package/dist/src/agent/tools/composio-tool.js +252 -35
- package/dist/src/agent/tools/composio-tool.js.map +1 -1
- package/dist/src/agent/tools/factory.js +7 -3
- package/dist/src/agent/tools/factory.js.map +1 -1
- package/dist/src/agent/tools/goal-tool.js +2 -2
- package/dist/src/agent/tools/index.d.ts +1 -1
- package/dist/src/agent/tools/index.js +2 -2
- package/dist/src/agent/tools/workflow-tool.d.ts +0 -1
- package/dist/src/agent/tools/workflow-tool.js +4 -17
- package/dist/src/agent/tools/workflow-tool.js.map +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +1 -1
- package/dist/src/agent/workflow/builtins/index.d.ts +2 -28
- package/dist/src/agent/workflow/builtins/index.js +226 -41
- package/dist/src/agent/workflow/builtins/index.js.map +1 -1
- package/dist/src/agent/workflow/catalog.d.ts +32 -34
- package/dist/src/agent/workflow/catalog.js +158 -154
- package/dist/src/agent/workflow/catalog.js.map +1 -1
- package/dist/src/agent/workflow/index.d.ts +4 -6
- package/dist/src/agent/workflow/index.js +2 -5
- package/dist/src/agent/workflow/snapshot.d.ts +2 -2
- package/dist/src/agent/workflow/snapshot.js +2 -2
- package/dist/src/agent/workflow/snapshot.js.map +1 -1
- package/dist/src/agent/workflow/structured-output-tool.d.ts +2 -2
- package/dist/src/agent/workflow/structured-output-tool.js +2 -2
- package/dist/src/agent/workflow/structured-output-tool.js.map +1 -1
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent/workflow/types.d.ts +31 -26
- package/dist/src/agent/workspace-runtime/registry.js +2 -2
- package/dist/src/agent-manifest/index.d.ts +1 -0
- package/dist/src/agent-manifest/index.js +3 -1
- package/dist/src/agent-manifest/index.js.map +1 -1
- package/dist/src/agent-manifest/preset-chain.d.ts +10 -0
- package/dist/src/agent-manifest/preset-chain.js +32 -0
- package/dist/src/agent-manifest/preset-chain.js.map +1 -0
- package/dist/src/agent-manifest/resolver.js +3 -10
- package/dist/src/agent-manifest/resolver.js.map +1 -1
- package/dist/src/agent-manifest/schema.d.ts +4 -4
- package/dist/src/automations/api/routes.js +14 -2
- package/dist/src/automations/api/routes.js.map +1 -1
- package/dist/src/automations/domain/validation.d.ts +14 -14
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
- package/dist/src/automations/service/action-executor.js +2 -2
- package/dist/src/browser/cdp-local-launcher.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.d.ts +11 -1
- package/dist/src/browser/providers/browser-ext-install.js +42 -17
- package/dist/src/browser/providers/browser-ext-install.js.map +1 -1
- package/dist/src/browser/providers/cloakbrowser.js +2 -2
- package/dist/src/browser/providers/playwright-doctor.js +1 -1
- package/dist/src/browser/stealth.js +1 -1
- package/dist/src/capabilities/store-connector.d.ts +0 -1
- package/dist/src/capabilities/store-connector.js +4 -6
- package/dist/src/capabilities/store-connector.js.map +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/builtins/goal.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +72 -73
- package/dist/src/chat-commands/builtins/review.js.map +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +9 -54
- package/dist/src/chat-commands/builtins/workflow.js.map +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +2 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +1 -1
- package/dist/src/cli/commands/extension-create.js +2 -2
- package/dist/src/cli/commands/extension-create.js.map +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +43 -37
- package/dist/src/cli/commands/extension-marketplace.js.map +1 -1
- package/dist/src/cli/commands/extension-pack.d.ts +6 -0
- package/dist/src/cli/commands/extension-pack.js +4 -3
- package/dist/src/cli/commands/extension-pack.js.map +1 -1
- package/dist/src/cli/commands/goal.js +2 -2
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/project.js +3 -3
- package/dist/src/commands/agents.config.d.ts +1 -0
- package/dist/src/commands/agents.config.js +1 -0
- package/dist/src/commands/agents.config.js.map +1 -1
- package/dist/src/config/gateway-bind.js +1 -1
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +6 -6
- package/dist/src/config/schema.js +6 -22
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/config/web-patch.d.ts +1 -1
- package/dist/src/connectors/approval.d.ts +2 -0
- package/dist/src/connectors/approval.js +33 -0
- package/dist/src/connectors/approval.js.map +1 -0
- package/dist/src/connectors/auth-provider-registry.d.ts +9 -0
- package/dist/src/connectors/auth-provider-registry.js +17 -0
- package/dist/src/connectors/auth-provider-registry.js.map +1 -0
- package/dist/src/connectors/builtin-catalog.js +55 -116
- package/dist/src/connectors/builtin-catalog.js.map +1 -1
- package/dist/src/connectors/catalog.js +7 -2
- package/dist/src/connectors/catalog.js.map +1 -1
- package/dist/src/connectors/composio-catalog.d.ts +19 -0
- package/dist/src/connectors/composio-catalog.js +237 -0
- package/dist/src/connectors/composio-catalog.js.map +1 -0
- package/dist/src/connectors/composio-logo.d.ts +1 -0
- package/dist/src/connectors/composio-logo.js +51 -0
- package/dist/src/connectors/composio-logo.js.map +1 -0
- package/dist/src/connectors/composio-sessions.d.ts +116 -0
- package/dist/src/connectors/composio-sessions.js +296 -0
- package/dist/src/connectors/composio-sessions.js.map +1 -0
- package/dist/src/connectors/composio-triggers.d.ts +17 -0
- package/dist/src/connectors/composio-triggers.js +48 -5
- package/dist/src/connectors/composio-triggers.js.map +1 -1
- package/dist/src/connectors/composio.d.ts +31 -2
- package/dist/src/connectors/composio.js +374 -151
- package/dist/src/connectors/composio.js.map +1 -1
- package/dist/src/connectors/connector-memory-sync.d.ts +15 -0
- package/dist/src/connectors/connector-memory-sync.js +90 -0
- package/dist/src/connectors/connector-memory-sync.js.map +1 -0
- package/dist/src/connectors/install.js +35 -92
- package/dist/src/connectors/install.js.map +1 -1
- package/dist/src/connectors/instances.js +6 -2
- package/dist/src/connectors/instances.js.map +1 -1
- package/dist/src/connectors/integration-strategy.d.ts +3 -0
- package/dist/src/connectors/integration-strategy.js +29 -0
- package/dist/src/connectors/integration-strategy.js.map +1 -0
- package/dist/src/connectors/policy.d.ts +13 -0
- package/dist/src/connectors/policy.js +48 -0
- package/dist/src/connectors/policy.js.map +1 -0
- package/dist/src/connectors/providers.js +1 -1
- package/dist/src/connectors/runtime-adapter-registry.d.ts +25 -0
- package/dist/src/connectors/runtime-adapter-registry.js +154 -0
- package/dist/src/connectors/runtime-adapter-registry.js.map +1 -0
- package/dist/src/connectors/types.d.ts +113 -4
- package/dist/src/connectors/workflow-preflight.d.ts +20 -0
- package/dist/src/connectors/workflow-preflight.js +70 -0
- package/dist/src/connectors/workflow-preflight.js.map +1 -0
- package/dist/src/daemon/launchd.js +1 -1
- package/dist/src/daemon/systemd.js +1 -1
- package/dist/src/extensions/discover-extensions.js +1 -1
- package/dist/src/extensions/install-transaction.d.ts +16 -0
- package/dist/src/extensions/install-transaction.js +76 -0
- package/dist/src/extensions/install-transaction.js.map +1 -0
- package/dist/src/extensions/install.d.ts +2 -0
- package/dist/src/extensions/install.js +23 -1
- package/dist/src/extensions/install.js.map +1 -1
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/gateway/agents-admin.d.ts +2 -0
- package/dist/src/gateway/agents-admin.js +7 -0
- package/dist/src/gateway/agents-admin.js.map +1 -1
- package/dist/src/gateway/capability-presets-admin.d.ts +11 -0
- package/dist/src/gateway/capability-presets-admin.js +11 -4
- package/dist/src/gateway/capability-presets-admin.js.map +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +17 -0
- package/dist/src/gateway/chat-stream/mapper.js.map +1 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +18 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -3
- package/dist/src/gateway/hono/lib/static-ui.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +3 -0
- package/dist/src/gateway/hono/routes/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/capability-presets.js +19 -1
- package/dist/src/gateway/hono/routes/capability-presets.js.map +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +188 -25
- package/dist/src/gateway/hono/routes/connectors.js.map +1 -1
- package/dist/src/gateway/hono/routes/goals.js +22 -3
- package/dist/src/gateway/hono/routes/goals.js.map +1 -1
- package/dist/src/gateway/hono/routes/home.d.ts +60 -1
- package/dist/src/gateway/hono/routes/home.js +244 -18
- package/dist/src/gateway/hono/routes/home.js.map +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
- package/dist/src/gateway/hono/routes/memory.js +17 -4
- package/dist/src/gateway/hono/routes/memory.js.map +1 -1
- package/dist/src/gateway/hono/routes/projects.js +106 -5
- package/dist/src/gateway/hono/routes/projects.js.map +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +93 -0
- package/dist/src/gateway/hono/routes/public-gateway.js.map +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +137 -22
- package/dist/src/gateway/hono/routes/workflows.js.map +1 -1
- package/dist/src/gateway/hono/routes/you.d.ts +23 -0
- package/dist/src/gateway/hono/routes/you.js +538 -0
- package/dist/src/gateway/hono/routes/you.js.map +1 -0
- package/dist/src/gateway/hono/sse.d.ts +2 -1
- package/dist/src/gateway/hono/sse.js +2 -1
- package/dist/src/gateway/hono/sse.js.map +1 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/ports.js +1 -1
- package/dist/src/gateway/service/marketplace-service.d.ts +13 -1
- package/dist/src/gateway/service/marketplace-service.js +96 -40
- package/dist/src/gateway/service/marketplace-service.js.map +1 -1
- package/dist/src/gateway/service.d.ts +2 -0
- package/dist/src/gateway/service.js +13 -7
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/goals/goal-service.d.ts +7 -5
- package/dist/src/goals/goal-service.js +25 -13
- package/dist/src/goals/goal-service.js.map +1 -1
- package/dist/src/goals/goal-store.js +46 -7
- package/dist/src/goals/goal-store.js.map +1 -1
- package/dist/src/goals/goal-workflow-judge.js +1 -1
- package/dist/src/goals/types.d.ts +24 -0
- package/dist/src/infra/ports.js +1 -1
- package/dist/src/infra/ssh-tunnel.js +1 -1
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/migrations/runner.js +1 -1
- package/dist/src/notes/service.js +3 -3
- package/dist/src/notes/store.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/session-title.js +2 -2
- package/dist/src/session/store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +1 -1
- package/dist/src/storage/sqlite/connector-repository.d.ts +49 -0
- package/dist/src/storage/sqlite/connector-repository.js +385 -0
- package/dist/src/storage/sqlite/connector-repository.js.map +1 -0
- package/dist/src/storage/sqlite/index.d.ts +3 -0
- package/dist/src/storage/sqlite/index.js +4 -1
- package/dist/src/storage/sqlite/migrations/030_connectors.sql +94 -0
- package/dist/src/storage/sqlite/migrations/031_connector_approvals.sql +24 -0
- package/dist/src/storage/sqlite/migrations/032_connector_webhook_deliveries.sql +15 -0
- package/dist/src/storage/sqlite/migrations/033_user_trust_policies.sql +6 -0
- package/dist/src/storage/sqlite/migrations/034_allow_global_auto_trust.sql +14 -0
- package/dist/src/storage/sqlite/migrations/035_user_profile_prompt_state.sql +7 -0
- package/dist/src/storage/sqlite/migrations/036_goal_outcome_metric.sql +12 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/row-mappers.js +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/user-profile-setup-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/user-profile-setup-repository.js +34 -0
- package/dist/src/storage/sqlite/user-profile-setup-repository.js.map +1 -0
- package/dist/src/storage/sqlite/user-trust-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/user-trust-repository.js +34 -0
- package/dist/src/storage/sqlite/user-trust-repository.js.map +1 -0
- package/dist/src/tui/backends/embedded-backend.js +4 -4
- package/dist/src/tui/clipboard-image.js +1 -1
- package/dist/src/tui/components/assistant-message.js +15 -0
- package/dist/src/tui/components/assistant-message.js.map +1 -1
- package/dist/src/tui/tui-agent-events.js +85 -1
- package/dist/src/tui/tui-agent-events.js.map +1 -1
- package/dist/src/tui/tui-command-formatters.js +9 -9
- package/dist/src/tui/tui-command-formatters.js.map +1 -1
- package/dist/src/tui/tui-commands.js +4 -4
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/import.d.ts +12 -0
- package/dist/src/user-context/import.js +48 -0
- package/dist/src/user-context/import.js.map +1 -0
- package/dist/src/user-context/profile.d.ts +37 -0
- package/dist/src/user-context/profile.js +165 -0
- package/dist/src/user-context/profile.js.map +1 -0
- package/dist/src/user-context/projection.d.ts +54 -0
- package/dist/src/user-context/projection.js +121 -0
- package/dist/src/user-context/projection.js.map +1 -0
- package/dist/src/user-context/source-recommendations.d.ts +13 -0
- package/dist/src/user-context/source-recommendations.js +86 -0
- package/dist/src/user-context/source-recommendations.js.map +1 -0
- package/dist/src/user-context/trust-policy.d.ts +11 -0
- package/dist/src/user-context/trust-policy.js +31 -0
- package/dist/src/user-context/trust-policy.js.map +1 -0
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/logger/index.js +1 -1
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/work-items/work-item-service.js +1 -1
- package/dist/src/workflows/authoring/index.d.ts +1 -0
- package/dist/src/workflows/authoring/index.js +2 -0
- package/dist/src/workflows/authoring/workflow-draft-store.d.ts +33 -0
- package/dist/src/workflows/authoring/workflow-draft-store.js +74 -0
- package/dist/src/workflows/authoring/workflow-draft-store.js.map +1 -0
- package/dist/src/workflows/domain/definition-utils.d.ts +6 -4
- package/dist/src/workflows/domain/definition-utils.js +28 -26
- package/dist/src/workflows/domain/definition-utils.js.map +1 -1
- package/dist/src/workflows/domain/definition.d.ts +79 -6
- package/dist/src/workflows/domain/event.d.ts +18 -2
- package/dist/src/workflows/domain/index.js +3 -3
- package/dist/src/workflows/domain/run.d.ts +16 -2
- package/dist/src/workflows/domain/run.js.map +1 -1
- package/dist/src/workflows/domain/validation.d.ts +9 -5
- package/dist/src/workflows/domain/validation.js +183 -40
- package/dist/src/workflows/domain/validation.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft-prompt.d.ts +2 -3
- package/dist/src/workflows/draft/workflow-draft-prompt.js +31 -73
- package/dist/src/workflows/draft/workflow-draft-prompt.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft-service.js +5 -9
- package/dist/src/workflows/draft/workflow-draft-service.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft-validator.js +29 -37
- package/dist/src/workflows/draft/workflow-draft-validator.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft.types.d.ts +4 -4
- package/dist/src/workflows/engine/projector.js +43 -1
- package/dist/src/workflows/engine/projector.js.map +1 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +2 -3
- package/dist/src/workflows/engine/workflow-engine.js +24 -4
- package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
- package/dist/src/workflows/index.js +4 -7
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +1 -9
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +1 -1
- package/dist/src/workflows/runtime/graph-workflow-runtime.d.ts +10 -0
- package/dist/src/workflows/runtime/graph-workflow-runtime.js +295 -0
- package/dist/src/workflows/runtime/graph-workflow-runtime.js.map +1 -0
- package/dist/src/workflows/runtime/index.d.ts +1 -2
- package/dist/src/workflows/runtime/index.js +2 -5
- package/dist/src/workflows/runtime/workflow-runtime-port.d.ts +5 -8
- package/dist/src/workflows/service/workflow-run-service.js +15 -1
- package/dist/src/workflows/service/workflow-run-service.js.map +1 -1
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +2 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +3 -3
- package/package.json +5 -4
- package/dist/gateway/static/root/assets/agents-CyvCIHnB.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-DK_Vx6nl.js +0 -1
- package/dist/gateway/static/root/assets/automation-suggestion-card-B1LV3YYv.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-fzrovqhv.js +0 -4
- package/dist/gateway/static/root/assets/block-editor-Dhj5f4Bx.js +0 -184
- package/dist/gateway/static/root/assets/browser-settings-page-BDn-n-UB.js +0 -8
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Co5ipo_Q.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-BWlpaxg9.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-D_jkIZLV.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BcekbW4q.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-settings-BJCUuL8Y.js +0 -1
- package/dist/gateway/static/root/assets/dist-Mys7eFJ5.js +0 -1
- package/dist/gateway/static/root/assets/dreaming-settings-BN1Z2mIo.js +0 -3
- package/dist/gateway/static/root/assets/extension-page-B-1KxvVy.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BF9NACI3.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DN9sNREz.js +0 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-BpoQW8cD.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-CBRSPd0b.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-BCcBi407.js +0 -2
- package/dist/gateway/static/root/assets/goals-settings-pkTXzXkh.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-ezsufgLQ.js +0 -1
- package/dist/gateway/static/root/assets/index-B8s8Pq5U.css +0 -1
- package/dist/gateway/static/root/assets/index-DcUaXYeb.js +0 -262
- package/dist/gateway/static/root/assets/logs-page-DQtTRXtj.js +0 -7
- package/dist/gateway/static/root/assets/messages-BXNELNBa.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-panel-BP2M9n6Q.js +0 -2
- package/dist/gateway/static/root/assets/notes-page-CspveYaO.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-BHwzJ0OC.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-Dy3rsobs.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CWKpPE0L.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CqNRyXEo.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-MEME7ivF.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-JVd0qaSF.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-DYEbB1EV.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-dWN8BJ3z.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-D8foINzP.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-Tgbv1s7G.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-D_YK0b_Z.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DGytfoZK.js +0 -2
- package/dist/gateway/static/root/assets/toast-z0toXu32.js +0 -1
- package/dist/gateway/static/root/assets/user-profile-settings-panel-8YtygcJp.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-BVH71EFf.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-JeTE7XNM.js +0 -1
- package/dist/gateway/static/root/assets/workflow-start-dialog-_u8Uc1ze.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-ixgk_y1l.js +0 -18
- package/dist/src/agent/workflow/builtins/audit-repo.d.ts +0 -13
- package/dist/src/agent/workflow/builtins/audit-repo.js +0 -183
- package/dist/src/agent/workflow/builtins/audit-repo.js.map +0 -1
- package/dist/src/agent/workflow/builtins/client-proposal.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/client-proposal.js +0 -164
- package/dist/src/agent/workflow/builtins/client-proposal.js.map +0 -1
- package/dist/src/agent/workflow/builtins/competitor-scan.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/competitor-scan.js +0 -164
- package/dist/src/agent/workflow/builtins/competitor-scan.js.map +0 -1
- package/dist/src/agent/workflow/builtins/content-draft.d.ts +0 -13
- package/dist/src/agent/workflow/builtins/content-draft.js +0 -159
- package/dist/src/agent/workflow/builtins/content-draft.js.map +0 -1
- package/dist/src/agent/workflow/builtins/content-repurpose.d.ts +0 -11
- package/dist/src/agent/workflow/builtins/content-repurpose.js +0 -146
- package/dist/src/agent/workflow/builtins/content-repurpose.js.map +0 -1
- package/dist/src/agent/workflow/builtins/debug-incident.d.ts +0 -13
- package/dist/src/agent/workflow/builtins/debug-incident.js +0 -177
- package/dist/src/agent/workflow/builtins/debug-incident.js.map +0 -1
- package/dist/src/agent/workflow/builtins/decision-compare.d.ts +0 -13
- package/dist/src/agent/workflow/builtins/decision-compare.js +0 -187
- package/dist/src/agent/workflow/builtins/decision-compare.js.map +0 -1
- package/dist/src/agent/workflow/builtins/implementation-plan.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/implementation-plan.js +0 -185
- package/dist/src/agent/workflow/builtins/implementation-plan.js.map +0 -1
- package/dist/src/agent/workflow/builtins/inbox-triage.d.ts +0 -11
- package/dist/src/agent/workflow/builtins/inbox-triage.js +0 -158
- package/dist/src/agent/workflow/builtins/inbox-triage.js.map +0 -1
- package/dist/src/agent/workflow/builtins/meeting-prep.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/meeting-prep.js +0 -152
- package/dist/src/agent/workflow/builtins/meeting-prep.js.map +0 -1
- package/dist/src/agent/workflow/builtins/multi-perspective-review.d.ts +0 -14
- package/dist/src/agent/workflow/builtins/multi-perspective-review.js +0 -171
- package/dist/src/agent/workflow/builtins/multi-perspective-review.js.map +0 -1
- package/dist/src/agent/workflow/builtins/offer-design.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/offer-design.js +0 -170
- package/dist/src/agent/workflow/builtins/offer-design.js.map +0 -1
- package/dist/src/agent/workflow/builtins/pr-review.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/pr-review.js +0 -178
- package/dist/src/agent/workflow/builtins/pr-review.js.map +0 -1
- package/dist/src/agent/workflow/builtins/release-check.d.ts +0 -11
- package/dist/src/agent/workflow/builtins/release-check.js +0 -174
- package/dist/src/agent/workflow/builtins/release-check.js.map +0 -1
- package/dist/src/agent/workflow/builtins/research.d.ts +0 -13
- package/dist/src/agent/workflow/builtins/research.js +0 -188
- package/dist/src/agent/workflow/builtins/research.js.map +0 -1
- package/dist/src/agent/workflow/builtins/weekly-review.d.ts +0 -12
- package/dist/src/agent/workflow/builtins/weekly-review.js +0 -139
- package/dist/src/agent/workflow/builtins/weekly-review.js.map +0 -1
- package/dist/src/agent/workflow/last-run-memory.d.ts +0 -42
- package/dist/src/agent/workflow/last-run-memory.js +0 -60
- package/dist/src/agent/workflow/last-run-memory.js.map +0 -1
- package/dist/src/agent/workflow/lint.d.ts +0 -38
- package/dist/src/agent/workflow/lint.js +0 -74
- package/dist/src/agent/workflow/lint.js.map +0 -1
- package/dist/src/agent/workflow/meta-locale.d.ts +0 -12
- package/dist/src/agent/workflow/meta-locale.js +0 -62
- package/dist/src/agent/workflow/meta-locale.js.map +0 -1
- package/dist/src/agent/workflow/parser.d.ts +0 -20
- package/dist/src/agent/workflow/parser.js +0 -152
- package/dist/src/agent/workflow/parser.js.map +0 -1
- package/dist/src/agent/workflow/runtime.d.ts +0 -34
- package/dist/src/agent/workflow/runtime.js +0 -402
- package/dist/src/agent/workflow/runtime.js.map +0 -1
- package/dist/src/connectors/oauth.d.ts +0 -22
- package/dist/src/connectors/oauth.js +0 -99
- package/dist/src/connectors/oauth.js.map +0 -1
- package/dist/src/workflows/runtime/script-runtime.d.ts +0 -3
- package/dist/src/workflows/runtime/script-runtime.js +0 -3
- package/dist/src/workflows/runtime/script-workflow-runtime.d.ts +0 -5
- package/dist/src/workflows/runtime/script-workflow-runtime.js +0 -15
- package/dist/src/workflows/runtime/script-workflow-runtime.js.map +0 -1
|
@@ -1,50 +1,60 @@
|
|
|
1
1
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
2
|
+
import { getConnectorConnection, getConnectorInstallation, listConnectorConnections, upsertConnectorActionMetadata, upsertConnectorConnection, upsertConnectorInstallation } from "../storage/sqlite/connector-repository.js";
|
|
3
|
+
import { ComposioSessionsAdapter } from "./composio-sessions.js";
|
|
4
|
+
import { COMPOSIO_AGENT_READY_TOOLKITS, COMPOSIO_TOOLKIT_DISPLAY_NAMES, connectorDefinitionFromComposioToolkit } from "./composio-catalog.js";
|
|
2
5
|
import { consumeConnectorSetupSecretRef } from "./setup-secrets.js";
|
|
3
6
|
//#region src/connectors/composio.ts
|
|
4
7
|
init_credentials();
|
|
5
|
-
const COMPOSIO_TOOLKITS = [
|
|
6
|
-
[
|
|
7
|
-
"gmail",
|
|
8
|
-
"Gmail",
|
|
9
|
-
"Read and send Gmail messages through Composio."
|
|
10
|
-
],
|
|
11
|
-
[
|
|
12
|
-
"googlecalendar",
|
|
13
|
-
"Google Calendar",
|
|
14
|
-
"Read and manage Google Calendar events through Composio."
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"googledrive",
|
|
18
|
-
"Google Drive",
|
|
19
|
-
"Search and manage Google Drive files through Composio."
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
"notion",
|
|
23
|
-
"Notion",
|
|
24
|
-
"Search and update Notion pages and databases through Composio."
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"slack",
|
|
28
|
-
"Slack",
|
|
29
|
-
"Read and send Slack workspace messages through Composio."
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
"github",
|
|
33
|
-
"GitHub via Composio",
|
|
34
|
-
"Work with GitHub repositories, issues, and pull requests through Composio."
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"linear",
|
|
38
|
-
"Linear via Composio",
|
|
39
|
-
"Manage Linear issues and projects through Composio."
|
|
40
|
-
]
|
|
41
|
-
];
|
|
42
8
|
const COMPOSIO_API_KEY_PROVIDER = "connector-composio-api-key";
|
|
43
9
|
const COMPOSIO_SCOPE_ORDER = {
|
|
44
10
|
read: 1,
|
|
45
11
|
write: 2,
|
|
46
12
|
admin: 3
|
|
47
13
|
};
|
|
14
|
+
const COMPOSIO_AGENT_READY = new Set(COMPOSIO_AGENT_READY_TOOLKITS);
|
|
15
|
+
const STRICT_CURATED_TOOLKITS = new Set(["github"]);
|
|
16
|
+
const READ_ACTION_TOKENS = [
|
|
17
|
+
"GET",
|
|
18
|
+
"LIST",
|
|
19
|
+
"SEARCH",
|
|
20
|
+
"FETCH",
|
|
21
|
+
"FIND",
|
|
22
|
+
"LOOKUP",
|
|
23
|
+
"RETRIEVE",
|
|
24
|
+
"READ",
|
|
25
|
+
"QUERY",
|
|
26
|
+
"CHECK",
|
|
27
|
+
"DESCRIBE",
|
|
28
|
+
"DOWNLOAD"
|
|
29
|
+
];
|
|
30
|
+
const WRITE_ACTION_TOKENS = [
|
|
31
|
+
"CREATE",
|
|
32
|
+
"UPDATE",
|
|
33
|
+
"SEND",
|
|
34
|
+
"POST",
|
|
35
|
+
"ADD",
|
|
36
|
+
"UPLOAD",
|
|
37
|
+
"REPLY",
|
|
38
|
+
"DRAFT",
|
|
39
|
+
"INVITE",
|
|
40
|
+
"ASSIGN",
|
|
41
|
+
"MOVE",
|
|
42
|
+
"COPY",
|
|
43
|
+
"EDIT",
|
|
44
|
+
"WRITE",
|
|
45
|
+
"PUBLISH",
|
|
46
|
+
"SCHEDULE"
|
|
47
|
+
];
|
|
48
|
+
const ADMIN_ACTION_TOKENS = [
|
|
49
|
+
"DELETE",
|
|
50
|
+
"REMOVE",
|
|
51
|
+
"REVOKE",
|
|
52
|
+
"TRASH",
|
|
53
|
+
"ARCHIVE",
|
|
54
|
+
"CANCEL",
|
|
55
|
+
"DISCONNECT",
|
|
56
|
+
"DEACTIVATE"
|
|
57
|
+
];
|
|
48
58
|
const COMPOSIO_CURATED_ACTIONS = {
|
|
49
59
|
gmail: {
|
|
50
60
|
GMAIL_FETCH_EMAILS: "read",
|
|
@@ -82,10 +92,45 @@ const COMPOSIO_CURATED_ACTIONS = {
|
|
|
82
92
|
SLACK_SEND_DIRECT_MESSAGE: "write"
|
|
83
93
|
},
|
|
84
94
|
github: {
|
|
95
|
+
GITHUB_GET_THE_AUTHENTICATED_USER: "read",
|
|
96
|
+
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER: "read",
|
|
97
|
+
GITHUB_GET_A_REPOSITORY: "read",
|
|
85
98
|
GITHUB_GET_REPOSITORY: "read",
|
|
99
|
+
GITHUB_LIST_REPOSITORY_COLLABORATORS: "read",
|
|
100
|
+
GITHUB_SEARCH_REPOSITORIES: "read",
|
|
101
|
+
GITHUB_SEARCH_CODE: "read",
|
|
102
|
+
GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS: "read",
|
|
103
|
+
GITHUB_SEARCH_USERS: "read",
|
|
86
104
|
GITHUB_LIST_REPOSITORY_ISSUES: "read",
|
|
105
|
+
GITHUB_GET_AN_ISSUE: "read",
|
|
106
|
+
GITHUB_LIST_ISSUE_COMMENTS: "read",
|
|
107
|
+
GITHUB_LIST_PULL_REQUESTS: "read",
|
|
108
|
+
GITHUB_GET_A_PULL_REQUEST: "read",
|
|
109
|
+
GITHUB_LIST_BRANCHES: "read",
|
|
110
|
+
GITHUB_GET_A_BRANCH: "read",
|
|
111
|
+
GITHUB_LIST_COMMITS: "read",
|
|
112
|
+
GITHUB_GET_A_COMMIT: "read",
|
|
113
|
+
GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER: "write",
|
|
114
|
+
GITHUB_CREATE_OR_UPDATE_FILE_CONTENTS: "write",
|
|
115
|
+
GITHUB_CREATE_A_COMMIT: "write",
|
|
116
|
+
GITHUB_CREATE_A_COMMIT_COMMENT: "write",
|
|
87
117
|
GITHUB_CREATE_AN_ISSUE: "write",
|
|
88
|
-
|
|
118
|
+
GITHUB_UPDATE_AN_ISSUE: "write",
|
|
119
|
+
GITHUB_CREATE_AN_ISSUE_COMMENT: "write",
|
|
120
|
+
GITHUB_ADD_LABELS_TO_AN_ISSUE: "write",
|
|
121
|
+
GITHUB_ADD_ASSIGNEES_TO_AN_ISSUE: "write",
|
|
122
|
+
GITHUB_CREATE_A_PULL_REQUEST: "write",
|
|
123
|
+
GITHUB_CREATE_PULL_REQUEST: "write",
|
|
124
|
+
GITHUB_UPDATE_A_PULL_REQUEST: "write",
|
|
125
|
+
GITHUB_MERGE_A_PULL_REQUEST: "write",
|
|
126
|
+
GITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUEST: "write",
|
|
127
|
+
GITHUB_CREATE_A_REVIEW_COMMENT_FOR_A_PULL_REQUEST: "write",
|
|
128
|
+
GITHUB_CREATE_A_GIST: "write",
|
|
129
|
+
GITHUB_DELETE_A_REPOSITORY: "admin",
|
|
130
|
+
GITHUB_DELETE_A_REFERENCE: "admin",
|
|
131
|
+
GITHUB_DELETE_A_FILE: "admin",
|
|
132
|
+
GITHUB_ADD_A_REPOSITORY_COLLABORATOR: "admin",
|
|
133
|
+
GITHUB_CANCEL_A_WORKFLOW_RUN: "admin"
|
|
89
134
|
},
|
|
90
135
|
linear: {
|
|
91
136
|
LINEAR_LIST_ISSUES: "read",
|
|
@@ -94,42 +139,11 @@ const COMPOSIO_CURATED_ACTIONS = {
|
|
|
94
139
|
LINEAR_UPDATE_ISSUE: "write"
|
|
95
140
|
}
|
|
96
141
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (!key) throw new Error("Composio API key is not configured. Set XOPC_COMPOSIO_API_KEY or connect the Composio API Key connector.");
|
|
103
|
-
return key;
|
|
104
|
-
}
|
|
105
|
-
async function composioFetch(path, init = {}, resolver = new CredentialResolver()) {
|
|
106
|
-
const apiKey = await composioApiKey(resolver);
|
|
107
|
-
const response = await fetch(`${composioBaseUrl()}${path}`, {
|
|
108
|
-
...init,
|
|
109
|
-
headers: {
|
|
110
|
-
Accept: "application/json",
|
|
111
|
-
"Content-Type": "application/json",
|
|
112
|
-
"x-api-key": apiKey,
|
|
113
|
-
Authorization: `Bearer ${apiKey}`,
|
|
114
|
-
...init.headers ?? {}
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
const data = await response.json().catch(async () => ({ error: await response.text().catch(() => response.statusText) }));
|
|
118
|
-
if (!response.ok) {
|
|
119
|
-
const record = data && typeof data === "object" && !Array.isArray(data) ? data : {};
|
|
120
|
-
throw new Error(String(record.error ?? record.message ?? response.statusText));
|
|
121
|
-
}
|
|
122
|
-
return data;
|
|
123
|
-
}
|
|
124
|
-
function arrayAt(payload, keys) {
|
|
125
|
-
if (Array.isArray(payload)) return payload;
|
|
126
|
-
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return [];
|
|
127
|
-
const record = payload;
|
|
128
|
-
for (const key of keys) if (Array.isArray(record[key])) return record[key];
|
|
129
|
-
return [];
|
|
130
|
-
}
|
|
131
|
-
function readString(value) {
|
|
132
|
-
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
142
|
+
const LOCAL_OWNER_PRINCIPAL = "local-owner";
|
|
143
|
+
function toolkitFromConnectionMetadata(connection) {
|
|
144
|
+
const toolkit = connection.metadata.toolkit;
|
|
145
|
+
if (typeof toolkit !== "string" || !toolkit.trim()) throw new Error(`Composio connection "${connection.id}" does not contain toolkit metadata.`);
|
|
146
|
+
return toolkit;
|
|
133
147
|
}
|
|
134
148
|
function normalizeToolkit(toolkit) {
|
|
135
149
|
return toolkit.trim().toLowerCase().replace(/[^a-z0-9_]+/g, "");
|
|
@@ -137,8 +151,8 @@ function normalizeToolkit(toolkit) {
|
|
|
137
151
|
function toolkitFromComposioSlug(slug) {
|
|
138
152
|
const upper = slug.trim().toUpperCase();
|
|
139
153
|
if (!upper) return void 0;
|
|
140
|
-
|
|
141
|
-
if (
|
|
154
|
+
const known = [...COMPOSIO_AGENT_READY].sort((left, right) => right.length - left.length).find((toolkit) => upper === toolkit.toUpperCase() || upper.startsWith(`${toolkit.toUpperCase()}_`));
|
|
155
|
+
if (known) return known;
|
|
142
156
|
return upper.split("_")[0]?.toLowerCase() || void 0;
|
|
143
157
|
}
|
|
144
158
|
function scopeForComposioAction(slug) {
|
|
@@ -153,12 +167,39 @@ function scopeForComposioAction(slug) {
|
|
|
153
167
|
scope,
|
|
154
168
|
curated: true
|
|
155
169
|
};
|
|
170
|
+
if (STRICT_CURATED_TOOLKITS.has(toolkit)) return {
|
|
171
|
+
toolkit,
|
|
172
|
+
scope: "write",
|
|
173
|
+
curated: false
|
|
174
|
+
};
|
|
175
|
+
if (COMPOSIO_AGENT_READY.has(toolkit)) {
|
|
176
|
+
const tokens = slug.trim().toUpperCase().split("_");
|
|
177
|
+
if (tokens.some((token) => ADMIN_ACTION_TOKENS.some((verb) => token.startsWith(verb)))) return {
|
|
178
|
+
toolkit,
|
|
179
|
+
scope: "admin",
|
|
180
|
+
curated: true
|
|
181
|
+
};
|
|
182
|
+
if (tokens.some((token) => READ_ACTION_TOKENS.some((verb) => token.startsWith(verb)))) return {
|
|
183
|
+
toolkit,
|
|
184
|
+
scope: "read",
|
|
185
|
+
curated: true
|
|
186
|
+
};
|
|
187
|
+
if (tokens.some((token) => WRITE_ACTION_TOKENS.some((verb) => token.startsWith(verb)))) return {
|
|
188
|
+
toolkit,
|
|
189
|
+
scope: "write",
|
|
190
|
+
curated: true
|
|
191
|
+
};
|
|
192
|
+
}
|
|
156
193
|
return {
|
|
157
194
|
toolkit,
|
|
158
195
|
scope: "write",
|
|
159
196
|
curated: false
|
|
160
197
|
};
|
|
161
198
|
}
|
|
199
|
+
function isComposioActionAllowedByCatalog(slug) {
|
|
200
|
+
const action = scopeForComposioAction(slug);
|
|
201
|
+
return Boolean(action.toolkit && (action.curated || !STRICT_CURATED_TOOLKITS.has(action.toolkit)));
|
|
202
|
+
}
|
|
162
203
|
function getComposioToolkitScope(config, toolkit) {
|
|
163
204
|
const record = config?.connectors?.instances?.[`composio-${normalizeToolkit(toolkit)}`];
|
|
164
205
|
const raw = record && typeof record === "object" && !Array.isArray(record) ? record.scope : void 0;
|
|
@@ -177,6 +218,12 @@ function canUseComposioAction(config, slug) {
|
|
|
177
218
|
reason: `Unknown Composio toolkit for action: ${slug}`,
|
|
178
219
|
scope: action.scope
|
|
179
220
|
};
|
|
221
|
+
if (!isComposioActionAllowedByCatalog(slug)) return {
|
|
222
|
+
ok: false,
|
|
223
|
+
reason: `Composio action ${slug} is not in the curated ${action.toolkit} action catalog.`,
|
|
224
|
+
toolkit: action.toolkit,
|
|
225
|
+
scope: action.scope
|
|
226
|
+
};
|
|
180
227
|
if (!config?.connectors?.instances?.[`composio-${action.toolkit}`]) return {
|
|
181
228
|
ok: false,
|
|
182
229
|
reason: `Composio connector is not installed: ${action.toolkit}`,
|
|
@@ -210,6 +257,11 @@ const COMPOSIO_CONNECTORS = [{
|
|
|
210
257
|
category: "automation",
|
|
211
258
|
kind: "composio",
|
|
212
259
|
source: "builtin",
|
|
260
|
+
branding: {
|
|
261
|
+
logoUrl: "/connector-icons/composio.svg",
|
|
262
|
+
source: "composio-catalog"
|
|
263
|
+
},
|
|
264
|
+
verificationLevel: "verified",
|
|
213
265
|
capabilities: [
|
|
214
266
|
"auth.apiKey",
|
|
215
267
|
"tools",
|
|
@@ -229,92 +281,228 @@ const COMPOSIO_CONNECTORS = [{
|
|
|
229
281
|
}] },
|
|
230
282
|
runtime: {
|
|
231
283
|
type: "composio",
|
|
232
|
-
toolkit: "composio"
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
category: "automation",
|
|
240
|
-
kind: "composio",
|
|
241
|
-
source: "builtin",
|
|
242
|
-
capabilities: [
|
|
243
|
-
"tools",
|
|
244
|
-
"auth.oauth",
|
|
245
|
-
"events",
|
|
246
|
-
"workflows"
|
|
247
|
-
],
|
|
248
|
-
tags: ["composio", toolkit],
|
|
249
|
-
auth: { mode: "none" },
|
|
250
|
-
setup: {},
|
|
251
|
-
runtime: {
|
|
252
|
-
type: "composio",
|
|
253
|
-
toolkit
|
|
284
|
+
toolkit: "composio",
|
|
285
|
+
role: "credential"
|
|
286
|
+
},
|
|
287
|
+
integrationStrategy: {
|
|
288
|
+
lane: "composio",
|
|
289
|
+
workload: "long_tail",
|
|
290
|
+
preferred: true
|
|
254
291
|
}
|
|
255
|
-
})
|
|
292
|
+
}, ...COMPOSIO_AGENT_READY_TOOLKITS.map((toolkit) => {
|
|
293
|
+
return {
|
|
294
|
+
...connectorDefinitionFromComposioToolkit({
|
|
295
|
+
slug: toolkit,
|
|
296
|
+
name: COMPOSIO_TOOLKIT_DISPLAY_NAMES[toolkit],
|
|
297
|
+
isNoAuth: false,
|
|
298
|
+
connected: false
|
|
299
|
+
}),
|
|
300
|
+
version: "1.0.0"
|
|
301
|
+
};
|
|
302
|
+
})];
|
|
256
303
|
async function saveComposioApiKey(input, resolver = new CredentialResolver()) {
|
|
257
304
|
const raw = input.secrets?.COMPOSIO_API_KEY;
|
|
258
305
|
const resolved = typeof raw === "string" && raw.trim().startsWith("secret://") ? consumeConnectorSetupSecretRef(raw) : raw;
|
|
259
|
-
if (typeof resolved
|
|
306
|
+
if (typeof resolved !== "string" || !resolved.trim()) throw new Error("Composio API key is required.");
|
|
307
|
+
await resolver.saveApiKey(COMPOSIO_API_KEY_PROVIDER, resolved.trim(), { profileName: "default" });
|
|
260
308
|
}
|
|
261
309
|
async function listComposioConnections(resolver = new CredentialResolver()) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
310
|
+
await new ComposioSessionsAdapter({ resolver }).syncConnections({ principalId: LOCAL_OWNER_PRINCIPAL });
|
|
311
|
+
return listConnectorConnections({ principalId: LOCAL_OWNER_PRINCIPAL }).filter((connection) => connection.provider === "composio").map((connection) => ({
|
|
312
|
+
id: connection.id,
|
|
313
|
+
providerConnectionId: connection.providerConnectionId,
|
|
314
|
+
toolkit: toolkitFromConnectionMetadata(connection),
|
|
315
|
+
status: connection.status,
|
|
316
|
+
alias: connection.alias,
|
|
317
|
+
isDefault: connection.isDefault,
|
|
318
|
+
accountEmail: typeof connection.identity.email === "string" ? connection.identity.email : void 0,
|
|
319
|
+
workspace: typeof connection.identity.workspace === "string" ? connection.identity.workspace : void 0,
|
|
320
|
+
username: typeof connection.identity.username === "string" ? connection.identity.username : void 0,
|
|
321
|
+
connectedAt: connection.connectedAt,
|
|
322
|
+
lastError: connection.lastError
|
|
323
|
+
}));
|
|
324
|
+
}
|
|
325
|
+
async function inspectComposioConnectorHealth(toolkit, resolver = new CredentialResolver()) {
|
|
326
|
+
const normalizedToolkit = normalizeToolkit(toolkit);
|
|
327
|
+
try {
|
|
328
|
+
const connections = (await listComposioConnections(resolver)).filter((connection) => connection.toolkit.toLowerCase() === normalizedToolkit);
|
|
329
|
+
const activeConnections = connections.filter((connection) => connection.status === "active").length;
|
|
330
|
+
const affectedConnections = connections.filter((connection) => connection.status === "expired" || connection.status === "failed").length;
|
|
331
|
+
if (activeConnections > 0) return {
|
|
332
|
+
toolkit: normalizedToolkit,
|
|
333
|
+
status: "connected",
|
|
334
|
+
activeConnections,
|
|
335
|
+
affectedConnections,
|
|
336
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
337
|
+
message: `${activeConnections} active account connection${activeConnections === 1 ? "" : "s"}.`,
|
|
338
|
+
recovery: "none"
|
|
339
|
+
};
|
|
340
|
+
if (affectedConnections > 0) return {
|
|
341
|
+
toolkit: normalizedToolkit,
|
|
342
|
+
status: "reauthorization_required",
|
|
343
|
+
activeConnections: 0,
|
|
344
|
+
affectedConnections,
|
|
345
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
346
|
+
message: "The account connection expired or failed and must be authorized again.",
|
|
347
|
+
recovery: "reconnect"
|
|
348
|
+
};
|
|
349
|
+
return {
|
|
350
|
+
toolkit: normalizedToolkit,
|
|
351
|
+
status: "disconnected",
|
|
352
|
+
activeConnections: 0,
|
|
353
|
+
affectedConnections: 0,
|
|
354
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
355
|
+
message: "No active account is connected.",
|
|
356
|
+
recovery: "connect"
|
|
357
|
+
};
|
|
358
|
+
} catch (error) {
|
|
359
|
+
const failure = classifyComposioHealthError(error);
|
|
360
|
+
return {
|
|
361
|
+
toolkit: normalizedToolkit,
|
|
362
|
+
status: "degraded",
|
|
363
|
+
activeConnections: 0,
|
|
364
|
+
affectedConnections: 0,
|
|
365
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
366
|
+
message: failure.message,
|
|
367
|
+
recovery: "retry",
|
|
368
|
+
errorCode: failure.code
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function classifyComposioHealthError(error) {
|
|
373
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
374
|
+
if (/api key is not configured|missing.*api key/i.test(message)) return {
|
|
375
|
+
code: "missing_credential",
|
|
376
|
+
message
|
|
377
|
+
};
|
|
378
|
+
if (/\b401\b|unauthori[sz]ed|invalid api key|authentication failed/i.test(message)) return {
|
|
379
|
+
code: "unauthorized",
|
|
380
|
+
message: "Composio rejected the configured project API key."
|
|
381
|
+
};
|
|
382
|
+
if (/\b403\b|forbidden|insufficient permission|permission denied/i.test(message)) return {
|
|
383
|
+
code: "forbidden",
|
|
384
|
+
message: "The Composio project API key does not have the required permissions."
|
|
385
|
+
};
|
|
386
|
+
if (/timed?\s*out|timeout|aborterror/i.test(message)) return {
|
|
387
|
+
code: "timeout",
|
|
388
|
+
message: "The Composio health request timed out."
|
|
389
|
+
};
|
|
390
|
+
if (/fetch failed|network|econn|enotfound|eai_again|socket|tls/i.test(message)) return {
|
|
391
|
+
code: "network",
|
|
392
|
+
message: "The gateway could not reach the Composio API."
|
|
393
|
+
};
|
|
394
|
+
return {
|
|
395
|
+
code: "provider_error",
|
|
396
|
+
message
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function getComposioInstallationPolicy(config, toolkit) {
|
|
400
|
+
const normalizedToolkit = normalizeToolkit(toolkit);
|
|
401
|
+
const connectorId = `composio-${normalizedToolkit}`;
|
|
402
|
+
const id = `${connectorId}-${LOCAL_OWNER_PRINCIPAL}`;
|
|
403
|
+
const existing = getConnectorInstallation(id);
|
|
404
|
+
return upsertConnectorInstallation({
|
|
405
|
+
id,
|
|
406
|
+
connectorId,
|
|
407
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
408
|
+
enabled: existing?.enabled ?? true,
|
|
409
|
+
allowedAgentIds: existing?.allowedAgentIds ?? [],
|
|
410
|
+
maxScope: getComposioToolkitScope(config, normalizedToolkit),
|
|
411
|
+
confirmationPolicy: existing?.confirmationPolicy ?? "writes",
|
|
412
|
+
selectedConnectionIds: existing?.selectedConnectionIds ?? [],
|
|
413
|
+
createdAt: existing?.createdAt
|
|
281
414
|
});
|
|
282
415
|
}
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
if (!
|
|
416
|
+
function updateComposioInstallationPolicy(config, toolkit, patch) {
|
|
417
|
+
const current = getComposioInstallationPolicy(config, toolkit);
|
|
418
|
+
return upsertConnectorInstallation({
|
|
419
|
+
...current,
|
|
420
|
+
allowedAgentIds: patch.allowedAgentIds ?? current.allowedAgentIds,
|
|
421
|
+
confirmationPolicy: patch.confirmationPolicy ?? current.confirmationPolicy,
|
|
422
|
+
selectedConnectionIds: patch.selectedConnectionIds ?? current.selectedConnectionIds
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function updateComposioConnection(id, patch) {
|
|
426
|
+
const connection = getConnectorConnection(id);
|
|
427
|
+
if (!connection || connection.provider !== "composio" || connection.principalId !== LOCAL_OWNER_PRINCIPAL) throw new Error("Composio connection not found.");
|
|
428
|
+
upsertConnectorConnection({
|
|
429
|
+
...connection,
|
|
430
|
+
alias: patch.alias === void 0 ? connection.alias : patch.alias.trim() || void 0,
|
|
431
|
+
isDefault: patch.isDefault ?? connection.isDefault
|
|
432
|
+
});
|
|
433
|
+
const updated = getConnectorConnection(id);
|
|
295
434
|
return {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
435
|
+
id: updated.id,
|
|
436
|
+
providerConnectionId: updated.providerConnectionId,
|
|
437
|
+
toolkit: toolkitFromConnectionMetadata(updated),
|
|
438
|
+
status: updated.status,
|
|
439
|
+
alias: updated.alias,
|
|
440
|
+
isDefault: updated.isDefault,
|
|
441
|
+
accountEmail: typeof updated.identity.email === "string" ? updated.identity.email : void 0,
|
|
442
|
+
workspace: typeof updated.identity.workspace === "string" ? updated.identity.workspace : void 0,
|
|
443
|
+
username: typeof updated.identity.username === "string" ? updated.identity.username : void 0,
|
|
444
|
+
connectedAt: updated.connectedAt,
|
|
445
|
+
lastError: updated.lastError
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
async function refreshComposioConnection(id, resolver = new CredentialResolver()) {
|
|
449
|
+
const connection = getConnectorConnection(id);
|
|
450
|
+
if (!connection || connection.provider !== "composio" || connection.principalId !== LOCAL_OWNER_PRINCIPAL) throw new Error("Composio connection not found.");
|
|
451
|
+
await new ComposioSessionsAdapter({ resolver }).refreshConnection(connection);
|
|
452
|
+
}
|
|
453
|
+
async function revokeComposioConnection(id, resolver = new CredentialResolver()) {
|
|
454
|
+
const connection = getConnectorConnection(id);
|
|
455
|
+
if (!connection || connection.provider !== "composio" || connection.principalId !== LOCAL_OWNER_PRINCIPAL) throw new Error("Composio connection not found.");
|
|
456
|
+
await new ComposioSessionsAdapter({ resolver }).revokeConnection(connection);
|
|
457
|
+
}
|
|
458
|
+
async function startComposioAuthorize(connectorId, toolkit, resolver = new CredentialResolver()) {
|
|
459
|
+
const normalizedToolkit = normalizeToolkit(toolkit);
|
|
460
|
+
const authorization = await new ComposioSessionsAdapter({ resolver }).authorize({
|
|
461
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
462
|
+
toolkit: normalizedToolkit,
|
|
463
|
+
installationId: getConnectorInstallation(`${connectorId}-${LOCAL_OWNER_PRINCIPAL}`)?.id
|
|
464
|
+
});
|
|
465
|
+
if (!authorization.connectUrl) throw new Error("Composio authorize did not return a connect URL.");
|
|
466
|
+
return {
|
|
467
|
+
toolkit: authorization.toolkit,
|
|
468
|
+
connectUrl: authorization.connectUrl,
|
|
469
|
+
connectionId: authorization.connectionId
|
|
299
470
|
};
|
|
300
471
|
}
|
|
301
472
|
async function listComposioTools(toolkit, config, resolver = new CredentialResolver()) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
473
|
+
const normalizedToolkit = normalizeToolkit(toolkit);
|
|
474
|
+
const payload = await (await new ComposioSessionsAdapter({ resolver }).createSession({
|
|
475
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
476
|
+
toolkits: [normalizedToolkit]
|
|
477
|
+
})).search({
|
|
478
|
+
query: `List the available ${normalizedToolkit} actions and their exact input contracts.`,
|
|
479
|
+
toolkits: [normalizedToolkit]
|
|
480
|
+
});
|
|
481
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return [];
|
|
482
|
+
const schemas = payload.toolSchemas;
|
|
483
|
+
if (!schemas || typeof schemas !== "object" || Array.isArray(schemas)) return [];
|
|
484
|
+
return Object.values(schemas).flatMap((value) => {
|
|
485
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return [];
|
|
486
|
+
const row = value;
|
|
487
|
+
const slug = typeof row.toolSlug === "string" ? row.toolSlug : void 0;
|
|
310
488
|
if (!slug) return [];
|
|
311
489
|
const action = scopeForComposioAction(slug);
|
|
312
|
-
if (
|
|
490
|
+
if (config && !canUseComposioAction(config, slug).ok) return [];
|
|
491
|
+
const inputSchema = row.inputSchema;
|
|
492
|
+
upsertConnectorActionMetadata({
|
|
493
|
+
connectorId: `composio-${normalizedToolkit}`,
|
|
494
|
+
actionId: slug,
|
|
495
|
+
toolkit: normalizedToolkit,
|
|
496
|
+
scope: action.scope,
|
|
497
|
+
curated: action.curated,
|
|
498
|
+
inputSchema,
|
|
499
|
+
cachedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
500
|
+
});
|
|
313
501
|
return [{
|
|
314
502
|
slug,
|
|
315
|
-
name:
|
|
316
|
-
description:
|
|
317
|
-
inputSchema
|
|
503
|
+
name: slug,
|
|
504
|
+
description: typeof row.description === "string" ? row.description : void 0,
|
|
505
|
+
inputSchema,
|
|
318
506
|
scope: action.scope,
|
|
319
507
|
curated: action.curated
|
|
320
508
|
}];
|
|
@@ -323,12 +511,47 @@ async function listComposioTools(toolkit, config, resolver = new CredentialResol
|
|
|
323
511
|
async function executeComposioTool(params, resolver = new CredentialResolver()) {
|
|
324
512
|
const allowed = canUseComposioAction(params.config, params.slug);
|
|
325
513
|
if (allowed.ok === false) throw new Error(allowed.reason);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
514
|
+
if (!allowed.toolkit) throw new Error(`Unknown Composio toolkit for action: ${params.slug}`);
|
|
515
|
+
const connectorId = `composio-${allowed.toolkit}`;
|
|
516
|
+
const installation = upsertConnectorInstallation({
|
|
517
|
+
id: `${connectorId}-${LOCAL_OWNER_PRINCIPAL}`,
|
|
518
|
+
connectorId,
|
|
519
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
520
|
+
enabled: true,
|
|
521
|
+
allowedAgentIds: [],
|
|
522
|
+
maxScope: getComposioToolkitScope(params.config, allowed.toolkit),
|
|
523
|
+
confirmationPolicy: "writes",
|
|
524
|
+
selectedConnectionIds: []
|
|
525
|
+
});
|
|
526
|
+
const connection = listConnectorConnections({
|
|
527
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
528
|
+
connectorId
|
|
529
|
+
}).find((candidate) => candidate.status === "active" && candidate.isDefault) ?? listConnectorConnections({
|
|
530
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
531
|
+
connectorId
|
|
532
|
+
}).find((candidate) => candidate.status === "active");
|
|
533
|
+
const result = await new ComposioSessionsAdapter({ resolver }).executeWithPolicy({
|
|
534
|
+
context: {
|
|
535
|
+
principalId: LOCAL_OWNER_PRINCIPAL,
|
|
536
|
+
toolkits: [allowed.toolkit]
|
|
537
|
+
},
|
|
538
|
+
installation,
|
|
539
|
+
connection,
|
|
540
|
+
action: {
|
|
541
|
+
connectorId,
|
|
542
|
+
actionId: params.slug,
|
|
543
|
+
toolkit: allowed.toolkit,
|
|
544
|
+
scope: allowed.scope,
|
|
545
|
+
curated: scopeForComposioAction(params.slug).curated,
|
|
546
|
+
cachedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
547
|
+
},
|
|
548
|
+
args: params.arguments && typeof params.arguments === "object" && !Array.isArray(params.arguments) ? params.arguments : {},
|
|
549
|
+
confirmed: true
|
|
550
|
+
});
|
|
551
|
+
if (result.decision !== "allowed") throw new Error(result.reason);
|
|
552
|
+
return result.result;
|
|
330
553
|
}
|
|
331
554
|
//#endregion
|
|
332
|
-
export { COMPOSIO_CONNECTORS, canUseComposioAction, executeComposioTool, getComposioToolkitScope, listComposioConnections, listComposioTools, saveComposioApiKey, scopeForComposioAction, setComposioToolkitScope, startComposioAuthorize, toolkitFromComposioSlug };
|
|
555
|
+
export { COMPOSIO_CONNECTORS, canUseComposioAction, executeComposioTool, getComposioInstallationPolicy, getComposioToolkitScope, inspectComposioConnectorHealth, isComposioActionAllowedByCatalog, listComposioConnections, listComposioTools, refreshComposioConnection, revokeComposioConnection, saveComposioApiKey, scopeForComposioAction, setComposioToolkitScope, startComposioAuthorize, toolkitFromComposioSlug, updateComposioConnection, updateComposioInstallationPolicy };
|
|
333
556
|
|
|
334
557
|
//# sourceMappingURL=composio.js.map
|