@composio/client 2.0.0-rc.8 → 2.0.0
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/LICENSE +202 -0
- package/MIGRATION.md +164 -0
- package/README.md +499 -39
- package/dist/{session-configs-DC9dblKH.d.mts → _internal-BBZ8gsxI.d.mts} +2297 -1749
- package/dist/_internal-C4YQE9nG.d.mts +281 -0
- package/dist/effect/internal.d.mts +9 -0
- package/dist/effect/internal.mjs +1 -0
- package/dist/effect/schemas/_internal/cli/create-codact-failure.d.mts +9 -0
- package/dist/effect/schemas/_internal/cli/create-codact-failure.mjs +17 -0
- package/dist/effect/schemas/_internal/cli/create-session.d.mts +12 -0
- package/dist/effect/schemas/_internal/cli/create-session.mjs +26 -0
- package/dist/effect/schemas/_internal/cli/get-session.d.mts +18 -0
- package/dist/effect/schemas/_internal/cli/get-session.mjs +48 -0
- package/dist/effect/schemas/_internal/cli/realtime/auth.d.mts +9 -0
- package/dist/effect/schemas/_internal/cli/realtime/auth.mjs +11 -0
- package/dist/effect/schemas/_internal/cli/realtime/credentials.d.mts +10 -0
- package/dist/effect/schemas/_internal/cli/realtime/credentials.mjs +12 -0
- package/dist/effect/schemas/_internal/consumer/permissions/resolve.d.mts +13 -0
- package/dist/effect/schemas/_internal/consumer/permissions/resolve.mjs +20 -0
- package/dist/effect/schemas/_internal/logs/tools/list-fields.d.mts +13 -0
- package/dist/effect/schemas/_internal/logs/tools/list-fields.mjs +13 -0
- package/dist/effect/schemas/_internal/logs/tools/list.d.mts +28 -0
- package/dist/effect/schemas/_internal/logs/tools/list.mjs +33 -0
- package/dist/effect/schemas/_internal/logs/tools/retrieve.d.mts +60 -0
- package/dist/effect/schemas/_internal/logs/tools/retrieve.mjs +74 -0
- package/dist/effect/schemas/_internal/logs/triggers/list.d.mts +34 -0
- package/dist/effect/schemas/_internal/logs/triggers/list.mjs +12 -0
- package/dist/effect/schemas/_internal/logs/triggers/retrieve.d.mts +33 -0
- package/dist/effect/schemas/_internal/logs/triggers/retrieve.mjs +9 -0
- package/dist/effect/schemas/_internal/org/consumer/list-connected-toolkits.d.mts +8 -0
- package/dist/effect/schemas/_internal/org/consumer/list-connected-toolkits.mjs +8 -0
- package/dist/effect/schemas/_internal/org/consumer/project/resolve.d.mts +20 -0
- package/dist/effect/schemas/_internal/org/consumer/project/resolve.mjs +31 -0
- package/dist/effect/schemas/_internal/org/consumer/retrieve-config.d.mts +10 -0
- package/dist/effect/schemas/_internal/org/consumer/retrieve-config.mjs +18 -0
- package/dist/effect/schemas/api-key-revocation/create.d.mts +8 -0
- package/dist/effect/schemas/api-key-revocation/create.mjs +8 -0
- package/dist/effect/schemas/auth/session/retrieve-info.d.mts +56 -0
- package/dist/effect/schemas/auth/session/retrieve-info.mjs +174 -0
- package/dist/effect/schemas/auth-configs/create.d.mts +16 -0
- package/dist/effect/schemas/auth-configs/create.mjs +22 -0
- package/dist/effect/schemas/auth-configs/delete.d.mts +10 -0
- package/dist/effect/schemas/auth-configs/delete.mjs +15 -0
- package/dist/effect/schemas/auth-configs/list.d.mts +55 -0
- package/dist/effect/schemas/auth-configs/list.mjs +67 -0
- package/dist/effect/schemas/auth-configs/retrieve.d.mts +49 -0
- package/dist/effect/schemas/auth-configs/retrieve.mjs +61 -0
- package/dist/effect/schemas/auth-configs/update-status.d.mts +9 -0
- package/dist/effect/schemas/auth-configs/update-status.mjs +11 -0
- package/dist/effect/schemas/auth-configs/update.d.mts +9 -0
- package/dist/effect/schemas/auth-configs/update.mjs +11 -0
- package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.d.mts +17 -0
- package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.mjs +22 -0
- package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.d.mts +9 -0
- package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.mjs +20 -0
- package/dist/effect/schemas/components/block-reason.d.mts +12 -0
- package/dist/effect/schemas/components/block-reason.mjs +14 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.d.mts +31 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.mjs +33 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.d.mts +33 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.mjs +35 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.d.mts +32 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.mjs +34 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.d.mts +179 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.mjs +113 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.d.mts +168 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.mjs +104 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.d.mts +140 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.mjs +76 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.d.mts +162 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.mjs +12 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.d.mts +202 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.mjs +130 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.d.mts +193 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.mjs +211 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.d.mts +176 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.mjs +86 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.d.mts +33 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.mjs +35 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.d.mts +35 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.mjs +37 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.d.mts +34 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.mjs +36 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.d.mts +231 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.mjs +160 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.d.mts +31 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.mjs +33 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.d.mts +31 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.mjs +33 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.d.mts +171 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.mjs +108 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.d.mts +139 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.mjs +74 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.d.mts +136 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.mjs +72 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.d.mts +139 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.mjs +98 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.d.mts +159 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.mjs +69 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.d.mts +162 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.mjs +12 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.d.mts +162 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.mjs +12 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.d.mts +167 -0
- package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.mjs +101 -0
- package/dist/effect/schemas/components/connected-account-retrieve-response-state.d.mts +2443 -0
- package/dist/effect/schemas/components/connected-account-retrieve-response-state.mjs +42 -0
- package/dist/effect/schemas/components/deprecated-toolkit-info.d.mts +8 -0
- package/dist/effect/schemas/components/deprecated-toolkit-info.mjs +12 -0
- package/dist/effect/schemas/components/execute-blocked.d.mts +30 -0
- package/dist/effect/schemas/components/execute-blocked.mjs +24 -0
- package/dist/effect/schemas/components/execute-completed.d.mts +24 -0
- package/dist/effect/schemas/components/execute-completed.mjs +29 -0
- package/dist/effect/schemas/components/execute-failed.d.mts +24 -0
- package/dist/effect/schemas/components/execute-failed.mjs +29 -0
- package/dist/effect/schemas/components/execute-requires-user-input.d.mts +15 -0
- package/dist/effect/schemas/components/execute-requires-user-input.mjs +16 -0
- package/dist/effect/schemas/components/hook-result.d.mts +13 -0
- package/dist/effect/schemas/components/hook-result.mjs +15 -0
- package/dist/effect/schemas/components/instant-account.d.mts +12 -0
- package/dist/effect/schemas/components/instant-account.mjs +15 -0
- package/dist/effect/schemas/components/mcp-create-response-commands.d.mts +10 -0
- package/dist/effect/schemas/components/mcp-create-response-commands.mjs +24 -0
- package/dist/effect/schemas/components/mcp-list-response-items.d.mts +23 -0
- package/dist/effect/schemas/components/mcp-list-response-items.mjs +96 -0
- package/dist/effect/schemas/components/project-list-response-data.d.mts +21 -0
- package/dist/effect/schemas/components/project-list-response-data.mjs +74 -0
- package/dist/effect/schemas/components/proxy-execute-blocked.d.mts +24 -0
- package/dist/effect/schemas/components/proxy-execute-blocked.mjs +18 -0
- package/dist/effect/schemas/components/proxy-execute-completed.d.mts +25 -0
- package/dist/effect/schemas/components/proxy-execute-completed.mjs +38 -0
- package/dist/effect/schemas/components/session-create-response-config.d.mts +112 -0
- package/dist/effect/schemas/components/session-create-response-config.mjs +167 -0
- package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.d.mts +20 -0
- package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.mjs +25 -0
- package/dist/effect/schemas/components/session-create-response-warnings.d.mts +9 -0
- package/dist/effect/schemas/components/session-create-response-warnings.mjs +25 -0
- package/dist/effect/schemas/components/session-link-response-experimental.d.mts +13 -0
- package/dist/effect/schemas/components/session-link-response-experimental.mjs +18 -0
- package/dist/effect/schemas/components/session-retrieve-response-experimental.d.mts +37 -0
- package/dist/effect/schemas/components/session-retrieve-response-experimental.mjs +27 -0
- package/dist/effect/schemas/components/tool-details.d.mts +51 -0
- package/dist/effect/schemas/components/tool-details.mjs +144 -0
- package/dist/effect/schemas/components/tool-pricing.d.mts +9 -0
- package/dist/effect/schemas/components/tool-pricing.mjs +14 -0
- package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.d.mts +123 -0
- package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.mjs +178 -0
- package/dist/effect/schemas/components/tool-router-toolkits-list-response.d.mts +34 -0
- package/dist/effect/schemas/components/tool-router-toolkits-list-response.mjs +45 -0
- package/dist/effect/schemas/components/tool.d.mts +51 -0
- package/dist/effect/schemas/components/tool.mjs +144 -0
- package/dist/effect/schemas/components/toolkit-list-response-items.d.mts +36 -0
- package/dist/effect/schemas/components/toolkit-list-response-items.mjs +101 -0
- package/dist/effect/schemas/components/tools-paginated.d.mts +57 -0
- package/dist/effect/schemas/components/tools-paginated.mjs +15 -0
- package/dist/effect/schemas/components/trigger-retrieve-response-log.d.mts +31 -0
- package/dist/effect/schemas/components/trigger-retrieve-response-log.mjs +39 -0
- package/dist/effect/schemas/components/user-input-request.d.mts +11 -0
- package/dist/effect/schemas/components/user-input-request.mjs +19 -0
- package/dist/effect/schemas/connected-accounts/complete-auth.d.mts +9 -0
- package/dist/effect/schemas/connected-accounts/complete-auth.mjs +11 -0
- package/dist/effect/schemas/connected-accounts/create.d.mts +2457 -0
- package/dist/effect/schemas/connected-accounts/create.mjs +58 -0
- package/dist/effect/schemas/connected-accounts/delete.d.mts +9 -0
- package/dist/effect/schemas/connected-accounts/delete.mjs +17 -0
- package/dist/effect/schemas/connected-accounts/list.d.mts +2480 -0
- package/dist/effect/schemas/connected-accounts/list.mjs +84 -0
- package/dist/effect/schemas/connected-accounts/patch.d.mts +10 -0
- package/dist/effect/schemas/connected-accounts/patch.mjs +19 -0
- package/dist/effect/schemas/connected-accounts/refresh.d.mts +10 -0
- package/dist/effect/schemas/connected-accounts/refresh.mjs +27 -0
- package/dist/effect/schemas/connected-accounts/retrieve.d.mts +2477 -0
- package/dist/effect/schemas/connected-accounts/retrieve.mjs +81 -0
- package/dist/effect/schemas/connected-accounts/revoke.d.mts +12 -0
- package/dist/effect/schemas/connected-accounts/revoke.mjs +35 -0
- package/dist/effect/schemas/connected-accounts/update-status.d.mts +8 -0
- package/dist/effect/schemas/connected-accounts/update-status.mjs +11 -0
- package/dist/effect/schemas/custom/delete-toolkit.d.mts +12 -0
- package/dist/effect/schemas/custom/delete-toolkit.mjs +17 -0
- package/dist/effect/schemas/custom/sync.d.mts +10 -0
- package/dist/effect/schemas/custom/sync.mjs +21 -0
- package/dist/effect/schemas/custom/upsert.d.mts +8 -0
- package/dist/effect/schemas/custom/upsert.mjs +11 -0
- package/dist/effect/schemas/files/create-presigned-url.d.mts +15 -0
- package/dist/effect/schemas/files/create-presigned-url.mjs +15 -0
- package/dist/effect/schemas/files/list.d.mts +18 -0
- package/dist/effect/schemas/files/list.mjs +20 -0
- package/dist/effect/schemas/keyring/list-transfer-keys.d.mts +17 -0
- package/dist/effect/schemas/keyring/list-transfer-keys.mjs +19 -0
- package/dist/effect/schemas/link/create.d.mts +19 -0
- package/dist/effect/schemas/link/create.mjs +18 -0
- package/dist/effect/schemas/logs/create-tool-execution.d.mts +25 -0
- package/dist/effect/schemas/logs/create-tool-execution.mjs +39 -0
- package/dist/effect/schemas/logs/retrieve-tool-execution.d.mts +37 -0
- package/dist/effect/schemas/logs/retrieve-tool-execution.mjs +51 -0
- package/dist/effect/schemas/mcp/create-instance.d.mts +12 -0
- package/dist/effect/schemas/mcp/create-instance.mjs +29 -0
- package/dist/effect/schemas/mcp/create.d.mts +23 -0
- package/dist/effect/schemas/mcp/create.mjs +67 -0
- package/dist/effect/schemas/mcp/custom/create.d.mts +17 -0
- package/dist/effect/schemas/mcp/custom/create.mjs +48 -0
- package/dist/effect/schemas/mcp/delete-instance.d.mts +9 -0
- package/dist/effect/schemas/mcp/delete-instance.mjs +11 -0
- package/dist/effect/schemas/mcp/delete.d.mts +9 -0
- package/dist/effect/schemas/mcp/delete.mjs +17 -0
- package/dist/effect/schemas/mcp/generate/url.d.mts +10 -0
- package/dist/effect/schemas/mcp/generate/url.mjs +21 -0
- package/dist/effect/schemas/mcp/list-instances.d.mts +18 -0
- package/dist/effect/schemas/mcp/list-instances.mjs +56 -0
- package/dist/effect/schemas/mcp/list.d.mts +27 -0
- package/dist/effect/schemas/mcp/list.mjs +19 -0
- package/dist/effect/schemas/mcp/retrieve-app.d.mts +27 -0
- package/dist/effect/schemas/mcp/retrieve-app.mjs +19 -0
- package/dist/effect/schemas/mcp/retrieve.d.mts +24 -0
- package/dist/effect/schemas/mcp/retrieve.mjs +68 -0
- package/dist/effect/schemas/mcp/update.d.mts +24 -0
- package/dist/effect/schemas/mcp/update.mjs +68 -0
- package/dist/effect/schemas/org/list.d.mts +17 -0
- package/dist/effect/schemas/org/list.mjs +22 -0
- package/dist/effect/schemas/org/owner/project/create.d.mts +10 -0
- package/dist/effect/schemas/org/owner/project/create.mjs +22 -0
- package/dist/effect/schemas/org/owner/project/delete.d.mts +9 -0
- package/dist/effect/schemas/org/owner/project/delete.mjs +17 -0
- package/dist/effect/schemas/org/owner/project/list.d.mts +27 -0
- package/dist/effect/schemas/org/owner/project/list.mjs +15 -0
- package/dist/effect/schemas/org/owner/project/regenerate-api-key.d.mts +14 -0
- package/dist/effect/schemas/org/owner/project/regenerate-api-key.mjs +31 -0
- package/dist/effect/schemas/org/owner/project/retrieve.d.mts +27 -0
- package/dist/effect/schemas/org/owner/project/retrieve.mjs +93 -0
- package/dist/effect/schemas/org/project/list.d.mts +27 -0
- package/dist/effect/schemas/org/project/list.mjs +15 -0
- package/dist/effect/schemas/org/usage/retrieve-summary.d.mts +13 -0
- package/dist/effect/schemas/org/usage/retrieve-summary.mjs +15 -0
- package/dist/effect/schemas/org/usage/retrieve.d.mts +16 -0
- package/dist/effect/schemas/org/usage/retrieve.mjs +18 -0
- package/dist/effect/schemas/project/usage/retrieve-summary.d.mts +13 -0
- package/dist/effect/schemas/project/usage/retrieve-summary.mjs +15 -0
- package/dist/effect/schemas/project/usage/retrieve.d.mts +16 -0
- package/dist/effect/schemas/project/usage/retrieve.mjs +18 -0
- package/dist/effect/schemas/session-configs/list.d.mts +15 -0
- package/dist/effect/schemas/session-configs/list.mjs +26 -0
- package/dist/effect/schemas/session-configs/retrieve.d.mts +45 -0
- package/dist/effect/schemas/session-configs/retrieve.mjs +103 -0
- package/dist/effect/schemas/tool-router/session/attach.d.mts +157 -0
- package/dist/effect/schemas/tool-router/session/attach.mjs +30 -0
- package/dist/effect/schemas/tool-router/session/config-history.d.mts +122 -0
- package/dist/effect/schemas/tool-router/session/config-history.mjs +8 -0
- package/dist/effect/schemas/tool-router/session/create.d.mts +157 -0
- package/dist/effect/schemas/tool-router/session/create.mjs +45 -0
- package/dist/effect/schemas/tool-router/session/delete.d.mts +9 -0
- package/dist/effect/schemas/tool-router/session/delete.mjs +18 -0
- package/dist/effect/schemas/tool-router/session/execute-meta.d.mts +75 -0
- package/dist/effect/schemas/tool-router/session/execute-meta.mjs +17 -0
- package/dist/effect/schemas/tool-router/session/execute.d.mts +75 -0
- package/dist/effect/schemas/tool-router/session/execute.mjs +17 -0
- package/dist/effect/schemas/tool-router/session/files/create-download-url.d.mts +11 -0
- package/dist/effect/schemas/tool-router/session/files/create-download-url.mjs +13 -0
- package/dist/effect/schemas/tool-router/session/files/create-upload-url.d.mts +11 -0
- package/dist/effect/schemas/tool-router/session/files/create-upload-url.mjs +13 -0
- package/dist/effect/schemas/tool-router/session/files/delete.d.mts +9 -0
- package/dist/effect/schemas/tool-router/session/files/delete.mjs +11 -0
- package/dist/effect/schemas/tool-router/session/files/list.d.mts +14 -0
- package/dist/effect/schemas/tool-router/session/files/list.mjs +16 -0
- package/dist/effect/schemas/tool-router/session/link.d.mts +18 -0
- package/dist/effect/schemas/tool-router/session/link.mjs +25 -0
- package/dist/effect/schemas/tool-router/session/patch.d.mts +157 -0
- package/dist/effect/schemas/tool-router/session/patch.mjs +30 -0
- package/dist/effect/schemas/tool-router/session/proxy-execute.d.mts +52 -0
- package/dist/effect/schemas/tool-router/session/proxy-execute.mjs +15 -0
- package/dist/effect/schemas/tool-router/session/retrieve.d.mts +157 -0
- package/dist/effect/schemas/tool-router/session/retrieve.mjs +30 -0
- package/dist/effect/schemas/tool-router/session/search.d.mts +80 -0
- package/dist/effect/schemas/tool-router/session/search.mjs +78 -0
- package/dist/effect/schemas/tool-router/session/toolkits.d.mts +33 -0
- package/dist/effect/schemas/tool-router/session/toolkits.mjs +8 -0
- package/dist/effect/schemas/tool-router/session/tools.d.mts +56 -0
- package/dist/effect/schemas/tool-router/session/tools.mjs +8 -0
- package/dist/effect/schemas/toolkits/list.d.mts +42 -0
- package/dist/effect/schemas/toolkits/list.mjs +15 -0
- package/dist/effect/schemas/toolkits/recommend-scopes.d.mts +19 -0
- package/dist/effect/schemas/toolkits/recommend-scopes.mjs +21 -0
- package/dist/effect/schemas/toolkits/retrieve-categories.d.mts +15 -0
- package/dist/effect/schemas/toolkits/retrieve-categories.mjs +23 -0
- package/dist/effect/schemas/toolkits/retrieve-changelog.d.mts +16 -0
- package/dist/effect/schemas/toolkits/retrieve-changelog.mjs +16 -0
- package/dist/effect/schemas/toolkits/retrieve-multi.d.mts +42 -0
- package/dist/effect/schemas/toolkits/retrieve-multi.mjs +15 -0
- package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.d.mts +15 -0
- package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.mjs +17 -0
- package/dist/effect/schemas/toolkits/retrieve.d.mts +110 -0
- package/dist/effect/schemas/toolkits/retrieve.mjs +202 -0
- package/dist/effect/schemas/tools/execute.d.mts +12 -0
- package/dist/effect/schemas/tools/execute.mjs +35 -0
- package/dist/effect/schemas/tools/get-input.d.mts +9 -0
- package/dist/effect/schemas/tools/get-input.mjs +22 -0
- package/dist/effect/schemas/tools/list.d.mts +56 -0
- package/dist/effect/schemas/tools/list.mjs +8 -0
- package/dist/effect/schemas/tools/proxy.d.mts +16 -0
- package/dist/effect/schemas/tools/proxy.mjs +36 -0
- package/dist/effect/schemas/tools/retrieve-enum.d.mts +6 -0
- package/dist/effect/schemas/tools/retrieve-enum.mjs +8 -0
- package/dist/effect/schemas/tools/retrieve-required-scopes.d.mts +22 -0
- package/dist/effect/schemas/tools/retrieve-required-scopes.mjs +33 -0
- package/dist/effect/schemas/tools/retrieve.d.mts +50 -0
- package/dist/effect/schemas/tools/retrieve.mjs +8 -0
- package/dist/effect/schemas/trigger-instances/list-active.d.mts +37 -0
- package/dist/effect/schemas/trigger-instances/list-active.mjs +49 -0
- package/dist/effect/schemas/trigger-instances/manage/delete.d.mts +8 -0
- package/dist/effect/schemas/trigger-instances/manage/delete.mjs +11 -0
- package/dist/effect/schemas/trigger-instances/manage/update.d.mts +8 -0
- package/dist/effect/schemas/trigger-instances/manage/update.mjs +8 -0
- package/dist/effect/schemas/trigger-instances/upsert.d.mts +11 -0
- package/dist/effect/schemas/trigger-instances/upsert.mjs +22 -0
- package/dist/effect/schemas/triggers-types/list.d.mts +28 -0
- package/dist/effect/schemas/triggers-types/list.mjs +90 -0
- package/dist/effect/schemas/triggers-types/retrieve-enum.d.mts +6 -0
- package/dist/effect/schemas/triggers-types/retrieve-enum.mjs +8 -0
- package/dist/effect/schemas/triggers-types/retrieve.d.mts +22 -0
- package/dist/effect/schemas/triggers-types/retrieve.mjs +84 -0
- package/dist/effect/schemas/webhook-endpoints/create.d.mts +13 -0
- package/dist/effect/schemas/webhook-endpoints/create.mjs +15 -0
- package/dist/effect/schemas/webhook-endpoints/list.d.mts +12 -0
- package/dist/effect/schemas/webhook-endpoints/list.mjs +12 -0
- package/dist/effect/schemas/webhook-endpoints/replace.d.mts +13 -0
- package/dist/effect/schemas/webhook-endpoints/replace.mjs +15 -0
- package/dist/effect/schemas/webhook-endpoints/retrieve.d.mts +13 -0
- package/dist/effect/schemas/webhook-endpoints/retrieve.mjs +15 -0
- package/dist/effect/schemas/webhook-endpoints/update.d.mts +13 -0
- package/dist/effect/schemas/webhook-endpoints/update.mjs +15 -0
- package/dist/effect/schemas/webhook-subscriptions/create.d.mts +14 -0
- package/dist/effect/schemas/webhook-subscriptions/create.mjs +23 -0
- package/dist/effect/schemas/webhook-subscriptions/delete.d.mts +8 -0
- package/dist/effect/schemas/webhook-subscriptions/delete.mjs +8 -0
- package/dist/effect/schemas/webhook-subscriptions/list-event-types.d.mts +12 -0
- package/dist/effect/schemas/webhook-subscriptions/list-event-types.mjs +16 -0
- package/dist/effect/schemas/webhook-subscriptions/list.d.mts +20 -0
- package/dist/effect/schemas/webhook-subscriptions/list.mjs +29 -0
- package/dist/effect/schemas/webhook-subscriptions/retrieve.d.mts +14 -0
- package/dist/effect/schemas/webhook-subscriptions/retrieve.mjs +23 -0
- package/dist/effect/schemas/webhook-subscriptions/rotate-secret.d.mts +9 -0
- package/dist/effect/schemas/webhook-subscriptions/rotate-secret.mjs +14 -0
- package/dist/effect/schemas/webhook-subscriptions/update.d.mts +14 -0
- package/dist/effect/schemas/webhook-subscriptions/update.mjs +23 -0
- package/dist/effect/schemas.d.mts +9922 -0
- package/dist/effect/schemas.mjs +132 -0
- package/dist/effect.d.mts +505 -0
- package/dist/effect.mjs +1632 -0
- package/dist/environments-BFGXNbF0.mjs +230 -0
- package/dist/environments-cVbMu7FC.d.mts +19 -0
- package/dist/{error-DLB1uKM3.mjs → error-Bw7_G2NZ.mjs} +16 -8
- package/dist/{generated-operations-DVRtlxnl.mjs → generated-operations-DXMQK5w5.mjs} +642 -243
- package/dist/index.d.mts +3 -5
- package/dist/index.mjs +132 -429
- package/dist/internal.d.mts +9 -0
- package/dist/internal.mjs +1 -0
- package/dist/pagination-rules-CMnBwktJ.mjs +36 -0
- package/dist/pagination.mjs +5 -9
- package/dist/resources/_internal/_internal.d.mts +2 -0
- package/dist/resources/_internal/_internal.mjs +16 -0
- package/dist/resources/_internal/cli/cli.d.mts +2 -0
- package/dist/resources/_internal/cli/cli.mjs +33 -0
- package/dist/resources/_internal/cli/realtime.d.mts +2 -0
- package/dist/resources/_internal/cli/realtime.mjs +20 -0
- package/dist/resources/_internal/cli.d.mts +2 -0
- package/dist/resources/_internal/cli.mjs +1 -0
- package/dist/resources/_internal/consumer/consumer.d.mts +2 -0
- package/dist/resources/_internal/consumer/consumer.mjs +8 -0
- package/dist/resources/_internal/consumer/permissions.d.mts +2 -0
- package/dist/resources/_internal/consumer/permissions.mjs +14 -0
- package/dist/resources/_internal/consumer.d.mts +2 -0
- package/dist/resources/_internal/consumer.mjs +1 -0
- package/dist/resources/_internal/logs/logs.d.mts +2 -0
- package/dist/resources/_internal/logs/logs.mjs +12 -0
- package/dist/resources/_internal/logs/tools.d.mts +2 -0
- package/dist/resources/_internal/logs/tools.mjs +24 -0
- package/dist/resources/_internal/logs/triggers.d.mts +2 -0
- package/dist/resources/_internal/logs/triggers.mjs +20 -0
- package/dist/resources/_internal/logs.d.mts +2 -0
- package/dist/resources/_internal/logs.mjs +1 -0
- package/dist/resources/_internal/org/consumer/consumer.d.mts +2 -0
- package/dist/resources/_internal/org/consumer/consumer.mjs +26 -0
- package/dist/resources/_internal/org/consumer/project.d.mts +2 -0
- package/dist/resources/_internal/org/consumer/project.mjs +15 -0
- package/dist/resources/_internal/org/consumer.d.mts +2 -0
- package/dist/resources/_internal/org/consumer.mjs +1 -0
- package/dist/resources/_internal/org/org.d.mts +2 -0
- package/dist/resources/_internal/org/org.mjs +8 -0
- package/dist/resources/_internal/org.d.mts +2 -0
- package/dist/resources/_internal/org.mjs +1 -0
- package/dist/resources/_internal.d.mts +2 -0
- package/dist/resources/_internal.mjs +1 -0
- package/dist/resources/api-key-revocation.d.mts +2 -2
- package/dist/resources/api-key-revocation.mjs +13 -2
- package/dist/resources/auth/auth.d.mts +2 -2
- package/dist/resources/auth/auth.mjs +7 -2
- package/dist/resources/auth/session.d.mts +2 -2
- package/dist/resources/auth/session.mjs +10 -2
- package/dist/resources/auth-configs.d.mts +2 -2
- package/dist/resources/auth-configs.mjs +45 -2
- package/dist/resources/auth.d.mts +2 -2
- package/dist/resources/auth.mjs +1 -5
- package/dist/resources/connected-accounts.d.mts +2 -2
- package/dist/resources/connected-accounts.mjs +70 -2
- package/dist/resources/custom.d.mts +2 -2
- package/dist/resources/custom.mjs +29 -2
- package/dist/resources/files.d.mts +2 -2
- package/dist/resources/files.mjs +22 -2
- package/dist/resources/keyring.d.mts +2 -2
- package/dist/resources/keyring.mjs +10 -2
- package/dist/resources/link.d.mts +2 -2
- package/dist/resources/link.mjs +13 -2
- package/dist/resources/logs/logs.d.mts +2 -2
- package/dist/resources/logs/logs.mjs +19 -2
- package/dist/resources/logs.d.mts +2 -2
- package/dist/resources/logs.mjs +1 -6
- package/dist/resources/mcp/custom.d.mts +2 -2
- package/dist/resources/mcp/custom.mjs +13 -2
- package/dist/resources/mcp/generate.d.mts +2 -2
- package/dist/resources/mcp/generate.mjs +13 -2
- package/dist/resources/mcp/mcp.d.mts +2 -2
- package/dist/resources/mcp/mcp.mjs +67 -2
- package/dist/resources/mcp.d.mts +2 -2
- package/dist/resources/mcp.mjs +1 -6
- package/dist/resources/org/org.d.mts +2 -2
- package/dist/resources/org/org.mjs +21 -2
- package/dist/resources/org/owner/owner.d.mts +2 -2
- package/dist/resources/org/owner/owner.mjs +7 -2
- package/dist/resources/org/owner/project.d.mts +2 -2
- package/dist/resources/org/owner/project.mjs +37 -2
- package/dist/resources/org/owner.d.mts +2 -2
- package/dist/resources/org/owner.mjs +1 -5
- package/dist/resources/org/project.d.mts +2 -2
- package/dist/resources/org/project.mjs +13 -2
- package/dist/resources/org/usage.d.mts +2 -2
- package/dist/resources/org/usage.mjs +22 -2
- package/dist/resources/org.d.mts +2 -2
- package/dist/resources/org.mjs +1 -9
- package/dist/resources/project/project.d.mts +2 -2
- package/dist/resources/project/project.mjs +7 -2
- package/dist/resources/project/usage.d.mts +2 -2
- package/dist/resources/project/usage.mjs +22 -2
- package/dist/resources/project.d.mts +2 -3
- package/dist/resources/project.mjs +1 -5
- package/dist/resources/session-configs.d.mts +2 -2
- package/dist/resources/session-configs.mjs +8 -12
- package/dist/resources/tool-router/session/files.d.mts +2 -2
- package/dist/resources/tool-router/session/files.mjs +40 -2
- package/dist/resources/tool-router/session/session.d.mts +2 -2
- package/dist/resources/tool-router/session/session.mjs +95 -2
- package/dist/resources/tool-router/session.d.mts +2 -2
- package/dist/resources/tool-router/session.mjs +1 -5
- package/dist/resources/tool-router/tool-router.d.mts +2 -2
- package/dist/resources/tool-router/tool-router.mjs +7 -2
- package/dist/resources/tool-router.d.mts +2 -2
- package/dist/resources/tool-router.mjs +1 -5
- package/dist/resources/toolkits.d.mts +2 -2
- package/dist/resources/toolkits.mjs +51 -2
- package/dist/resources/tools.d.mts +2 -2
- package/dist/resources/tools.mjs +56 -2
- package/dist/resources/trigger-instances/manage.d.mts +2 -2
- package/dist/resources/trigger-instances/manage.mjs +19 -2
- package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -2
- package/dist/resources/trigger-instances/trigger-instances.mjs +24 -2
- package/dist/resources/trigger-instances.d.mts +2 -2
- package/dist/resources/trigger-instances.mjs +1 -5
- package/dist/resources/triggers-types.d.mts +2 -2
- package/dist/resources/triggers-types.mjs +26 -2
- package/dist/resources/webhook-endpoints.d.mts +2 -2
- package/dist/resources/webhook-endpoints.mjs +40 -2
- package/dist/resources/webhook-subscriptions.d.mts +2 -2
- package/dist/resources/webhook-subscriptions.mjs +45 -2
- package/package.json +42 -34
- package/dist/api-key-revocation--5qqPnDz.mjs +0 -25
- package/dist/auth-_btgyN8t.mjs +0 -17
- package/dist/auth-configs-lkRDnT-a.mjs +0 -54
- package/dist/clanker-DBfYfkSH.mjs +0 -24
- package/dist/cli-Ckmt28-b.mjs +0 -45
- package/dist/config-BLBbhLe1.mjs +0 -10
- package/dist/config-DnyMhILW.d.mts +0 -9
- package/dist/connected-accounts-BJ5Ms_qb.mjs +0 -82
- package/dist/consumer--h4l55c3.mjs +0 -34
- package/dist/custom-CA8Amqss.mjs +0 -24
- package/dist/custom-CFKQnTel.mjs +0 -31
- package/dist/files-BP4vVrwo.mjs +0 -49
- package/dist/files-DG9Gc9CB.mjs +0 -31
- package/dist/generate-CGElZfOL.mjs +0 -24
- package/dist/keyring-DaSYpy6j.mjs +0 -17
- package/dist/link-DUiP6kjL.mjs +0 -23
- package/dist/logs-e4Kf3pcP.mjs +0 -38
- package/dist/manage-DTaRdqWV.mjs +0 -28
- package/dist/mcp-DxX8J9j8.mjs +0 -91
- package/dist/migration-CBhnoN-Y.mjs +0 -10
- package/dist/migration-CKGKuRO3.d.mts +0 -9
- package/dist/org-BIGutZCA.mjs +0 -45
- package/dist/owner-YrMH9R90.mjs +0 -17
- package/dist/project-B59Fh0L9.mjs +0 -47
- package/dist/project-D2NT5pmv.mjs +0 -29
- package/dist/project-DGE_op-j.mjs +0 -22
- package/dist/project-DWBDOy0X.mjs +0 -25
- package/dist/realtime-BFjIp94B.mjs +0 -28
- package/dist/resources/auth/index.d.mts +0 -2
- package/dist/resources/auth/index.mjs +0 -4
- package/dist/resources/cli/cli.d.mts +0 -2
- package/dist/resources/cli/cli.mjs +0 -3
- package/dist/resources/cli/index.d.mts +0 -2
- package/dist/resources/cli/index.mjs +0 -4
- package/dist/resources/cli/realtime.d.mts +0 -2
- package/dist/resources/cli/realtime.mjs +0 -3
- package/dist/resources/cli.d.mts +0 -2
- package/dist/resources/cli.mjs +0 -5
- package/dist/resources/index.d.mts +0 -3
- package/dist/resources/index.mjs +0 -16
- package/dist/resources/logs/index.d.mts +0 -2
- package/dist/resources/logs/index.mjs +0 -5
- package/dist/resources/logs/tools.d.mts +0 -2
- package/dist/resources/logs/tools.mjs +0 -3
- package/dist/resources/logs/triggers.d.mts +0 -2
- package/dist/resources/logs/triggers.mjs +0 -3
- package/dist/resources/mcp/index.d.mts +0 -2
- package/dist/resources/mcp/index.mjs +0 -5
- package/dist/resources/migration.d.mts +0 -2
- package/dist/resources/migration.mjs +0 -3
- package/dist/resources/org/clanker.d.mts +0 -2
- package/dist/resources/org/clanker.mjs +0 -3
- package/dist/resources/org/consumer/consumer.d.mts +0 -2
- package/dist/resources/org/consumer/consumer.mjs +0 -3
- package/dist/resources/org/consumer/index.d.mts +0 -2
- package/dist/resources/org/consumer/index.mjs +0 -4
- package/dist/resources/org/consumer/project.d.mts +0 -2
- package/dist/resources/org/consumer/project.mjs +0 -3
- package/dist/resources/org/consumer.d.mts +0 -2
- package/dist/resources/org/consumer.mjs +0 -5
- package/dist/resources/org/index.d.mts +0 -2
- package/dist/resources/org/index.mjs +0 -8
- package/dist/resources/org/owner/index.d.mts +0 -2
- package/dist/resources/org/owner/index.mjs +0 -4
- package/dist/resources/project/config.d.mts +0 -2
- package/dist/resources/project/config.mjs +0 -3
- package/dist/resources/project/index.d.mts +0 -3
- package/dist/resources/project/index.mjs +0 -4
- package/dist/resources/tool-router/index.d.mts +0 -2
- package/dist/resources/tool-router/index.mjs +0 -4
- package/dist/resources/tool-router/session/index.d.mts +0 -2
- package/dist/resources/tool-router/session/index.mjs +0 -4
- package/dist/resources/trigger-instances/index.d.mts +0 -2
- package/dist/resources/trigger-instances/index.mjs +0 -4
- package/dist/session-B9FZU6oA.mjs +0 -22
- package/dist/session-DtXQM3G3.mjs +0 -110
- package/dist/tool-router-CTH_fcxP.mjs +0 -14
- package/dist/toolkits-CxXj47JG.mjs +0 -62
- package/dist/tools-B9zq-uPU.mjs +0 -68
- package/dist/tools-BpRusMHS.mjs +0 -33
- package/dist/trigger-instances-DSk1vemj.mjs +0 -35
- package/dist/triggers-DRn4adsh.mjs +0 -28
- package/dist/triggers-types-Cgh-mvOz.mjs +0 -34
- package/dist/usage-B6pidrAI.mjs +0 -31
- package/dist/usage-B8p0O_pg.mjs +0 -31
- package/dist/webhook-endpoints-D4uTri1P.mjs +0 -51
- package/dist/webhook-subscriptions-DYxSYlZP.mjs +0 -55
package/README.md
CHANGED
|
@@ -1,22 +1,76 @@
|
|
|
1
1
|
# composio-client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript and Python clients for the Composio v3.1 API. The checked-in OpenAPI snapshot supplies
|
|
4
|
+
114 operations, including explicitly unsupported internal operations used by Composio's own SDKs.
|
|
5
|
+
Use the Promise client at the package root, the optional [Effect client](#effect), or the
|
|
6
|
+
[Python sync and async clients](./python/README.md).
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Node.js 22 or newer is required.
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pnpm add @composio/client
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
See [Upgrading to 2.0](#upgrading-to-20) for intentional compatibility changes from the previous
|
|
17
|
+
Stainless client and earlier 2.0 release candidates.
|
|
6
18
|
|
|
7
19
|
## Usage
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
Construct a Promise client with explicit authentication:
|
|
10
22
|
|
|
11
23
|
```ts
|
|
12
|
-
import Composio from '@composio/client'
|
|
24
|
+
import Composio, { Auth } from '@composio/client'
|
|
13
25
|
|
|
14
|
-
const composio = new Composio({
|
|
26
|
+
const composio = new Composio({ auth: Auth.project(process.env.COMPOSIO_API_KEY!) })
|
|
15
27
|
|
|
16
28
|
const session = await composio.toolRouter.session.create({ user_id: 'user_123' })
|
|
17
29
|
console.log(session.session_id, session.mcp.url)
|
|
18
30
|
```
|
|
19
31
|
|
|
32
|
+
### Authentication and scope
|
|
33
|
+
|
|
34
|
+
`auth` is required and says how every request authenticates. A request carries at most one Composio
|
|
35
|
+
credential.
|
|
36
|
+
|
|
37
|
+
| `auth` | Sends |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `Auth.project(key)` | `x-api-key` on every request to the API origin |
|
|
40
|
+
| `Auth.user(key)` | `x-user-api-key` on every request to the API origin |
|
|
41
|
+
| `Auth.organization(key)` | `x-org-api-key` on every request to the API origin |
|
|
42
|
+
| `Auth.auto({ project, user, organization })` | one of the keys given, chosen per operation: the project key wherever the operation accepts it, otherwise the first scheme it declares that a key is given for. This is how releases before rc.18 chose |
|
|
43
|
+
| `Auth.none()` | no credential. The credential header names are then ordinary headers, for a client used as a transport for schemes it does not model |
|
|
44
|
+
|
|
45
|
+
A fixed mode never consults the operation table. A key may be a function that returns one (or a
|
|
46
|
+
promise of one): it is called once per call, after the call starts, and its key is reused across
|
|
47
|
+
retries and same-origin redirects. It is not called for a call that starts off the API origin.
|
|
48
|
+
`client.authMode` reads the mode back; the client never returns a credential it was given as a
|
|
49
|
+
function.
|
|
50
|
+
|
|
51
|
+
`scope` names the organization and project the client addresses, sent as `x-org-id` and
|
|
52
|
+
`x-project-id` on requests to the API origin: `{ organizationId }`, `{ projectId }`, or both.
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
const composio = new Composio({
|
|
56
|
+
auth: Auth.user(() => vault.read('composio-user-key')),
|
|
57
|
+
scope: { organizationId: 'org_123', projectId: 'pr_456' },
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
A header name is reserved while something is configured to write it: the three credential names
|
|
62
|
+
while `auth` is not `none`, `x-org-id` and `x-project-id` while `scope` is set, and the identity
|
|
63
|
+
names as [below](#identify-the-calling-product). `defaultHeaders` and `COMPOSIO_CUSTOM_HEADERS` that
|
|
64
|
+
name a reserved header fail construction, and a call's `headers` that name one fail the call before
|
|
65
|
+
anything is sent. A client that needs another credential or scope derives one:
|
|
66
|
+
`composio.withOptions({ auth: Auth.project(key) })`. `withOptions` re-runs every construction check.
|
|
67
|
+
|
|
68
|
+
Three operations declare a credential or scope id as a header parameter
|
|
69
|
+
(`_internal.org.consumer.project.resolve`, `_internal.org.consumer.listConnectedToolkits`,
|
|
70
|
+
`_internal.cli.createCodactFailure`).
|
|
71
|
+
Their signatures are unchanged: the value replaces the configured credential for that call, and an
|
|
72
|
+
`x-org-id` that disagrees with the configured `scope` fails the call.
|
|
73
|
+
|
|
20
74
|
### Pagination
|
|
21
75
|
|
|
22
76
|
Use the `@composio/client/pagination` subpath to traverse list operations that return the standard
|
|
@@ -65,79 +119,480 @@ cursor ends traversal. When a response omits `next_cursor` but numeric `current_
|
|
|
65
119
|
returning partial results; provide a custom adapter for that response shape. Requests are sequential
|
|
66
120
|
and inherit the normal client retry/backoff path, but this is not proactive/shared rate-limit pacing.
|
|
67
121
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
applications that load configuration themselves:
|
|
122
|
+
The constructor reads nothing from the process. `Composio.fromEnv` is the one reader of the
|
|
123
|
+
environment, and it reads the mapping it is handed:
|
|
71
124
|
|
|
72
125
|
```ts
|
|
73
|
-
const composio = Composio.fromEnv(
|
|
126
|
+
const composio = Composio.fromEnv(process.env, { baseURL: 'https://staging-backend.composio.dev' })
|
|
74
127
|
```
|
|
75
128
|
|
|
76
|
-
`fromEnv`
|
|
77
|
-
`
|
|
78
|
-
`
|
|
79
|
-
not
|
|
129
|
+
`fromEnv` reads `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and `COMPOSIO_ORG_API_KEY` into `auth`
|
|
130
|
+
(one set: that fixed mode; several: `Auth.auto`; none: `Auth.none()`), and `COMPOSIO_BASE_URL`,
|
|
131
|
+
`COMPOSIO_ALLOW_INSECURE_HTTP=1`, `COMPOSIO_CUSTOM_HEADERS` (as `defaultHeaders`) and
|
|
132
|
+
`COMPOSIO_LOG_LEVEL`. It does not read `COMPOSIO_ORG_ID` or `COMPOSIO_PROJECT_ID`: `scope` is always
|
|
133
|
+
an argument. An override replaces the whole field it names, so `{ auth: Auth.none() }` means none
|
|
134
|
+
whatever the mapping holds. Derived clients created with `withOptions()` keep using the resolved
|
|
135
|
+
snapshot.
|
|
80
136
|
|
|
81
137
|
Inject a `Transport` when an application or test needs to own HTTP dispatch. The transport receives
|
|
82
138
|
a complete `Request`; retries, credential-safe redirects, timeouts, and response parsing stay in the
|
|
83
139
|
client:
|
|
84
140
|
|
|
85
141
|
```ts
|
|
86
|
-
import Composio, { createFetchTransport } from '@composio/client'
|
|
142
|
+
import Composio, { Auth, createFetchTransport } from '@composio/client'
|
|
87
143
|
|
|
88
144
|
const transport = createFetchTransport({ fetch: instrumentedFetch })
|
|
89
|
-
const composio = new Composio({ apiKey, transport })
|
|
145
|
+
const composio = new Composio({ auth: Auth.project(apiKey), transport })
|
|
90
146
|
```
|
|
91
147
|
|
|
92
|
-
|
|
93
|
-
|
|
148
|
+
Without a `transport`, the client resolves `globalThis.fetch` when a request is sent, so late
|
|
149
|
+
polyfills and test interceptors keep working. A custom `fetch` or extra `RequestInit` defaults go
|
|
150
|
+
through `createFetchTransport({ fetch, defaults })`; the former `fetch`, `fetchOptions` and
|
|
151
|
+
`defaultQuery` constructor options are gone (see the upgrade section).
|
|
94
152
|
|
|
95
|
-
|
|
153
|
+
### Retries and timeouts
|
|
96
154
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
155
|
+
GET, HEAD, OPTIONS, PUT and DELETE calls retry up to twice on connection errors, timeouts and
|
|
156
|
+
retryable HTTP responses. POST and PATCH calls are sent once by default, including tool execution:
|
|
157
|
+
a lost response may hide a successful write. A client-level `maxRetries` only applies to idempotent
|
|
158
|
+
methods. A call that is safe to repeat opts in with `{ maxRetries: 2 }` in its request options.
|
|
159
|
+
An `idempotencyKey` sends a header; server deduplication is not guaranteed, and it does not opt a
|
|
160
|
+
write into retries. Timeouts default to one minute per attempt.
|
|
161
|
+
|
|
162
|
+
### Internal operations
|
|
163
|
+
|
|
164
|
+
The spec publishes some operations for Composio's own CLI and SDKs and tags them `x-internal`: CLI
|
|
165
|
+
login sessions, realtime credentials, the execution and trigger logs, and the consumer-project
|
|
166
|
+
routes. They are under `client._internal`, they carry no compatibility promise, and any release may
|
|
167
|
+
change them. The property exists on every client, but the root types do not name it, so it stays
|
|
168
|
+
out of autocompletion. A program that needs it imports the opt-in subpath once:
|
|
100
169
|
|
|
101
170
|
```ts
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
allowInsecureHTTP: true,
|
|
106
|
-
})
|
|
171
|
+
import type {} from '@composio/client/internal' // `@composio/client/effect/internal` for the Effect client
|
|
172
|
+
|
|
173
|
+
const session = await composio._internal.cli.getSession({ id })
|
|
107
174
|
```
|
|
108
175
|
|
|
109
|
-
The
|
|
176
|
+
Their types are under `@composio/client/resources/_internal/*`. The previous-release gate does not
|
|
177
|
+
pin them. In Python the same operations are `client._internal.cli.get_session(...)`.
|
|
178
|
+
|
|
179
|
+
## Handle API errors
|
|
180
|
+
|
|
181
|
+
Awaiting a failed call throws an `APIError` subclass, such as `NotFoundError` or `RateLimitError`,
|
|
182
|
+
exported from `@composio/client`. Status errors carry `status`, `requestId`, and `details` when the
|
|
183
|
+
API returned a Composio error envelope. Connection failures, timeouts and caller cancellation use
|
|
184
|
+
`APIConnectionError`, `APIConnectionTimeoutError` and `APIUserAbortError` respectively.
|
|
185
|
+
|
|
186
|
+
Use `.withResponse()` for parsed data plus response metadata. Use `.asResponse()` to inspect the raw
|
|
187
|
+
response, including a non-success HTTP status, without parsing it into an exception.
|
|
188
|
+
|
|
189
|
+
## Effect
|
|
190
|
+
|
|
191
|
+
`@composio/client/effect` is the same API surface for applications written with
|
|
192
|
+
[Effect](https://effect.website). Every operation returns an `Effect` whose failures are tagged
|
|
193
|
+
errors, the transport is the `HttpClient` in context, and interrupting a call aborts its request.
|
|
194
|
+
|
|
195
|
+
Use it when the calling code is already Effect code and would otherwise wrap each call in
|
|
196
|
+
`Effect.tryPromise` and inspect what was thrown. Otherwise use the package root: it needs no peer
|
|
197
|
+
dependency, loads faster and spends less time per request (see [Performance](#performance)).
|
|
198
|
+
|
|
199
|
+
The accessor chains, method names, argument order and request and response types are the root
|
|
200
|
+
client's, and a call sends the same method, URL, body and headers as the root client does for the same
|
|
201
|
+
input. All 114 operations of the spec are there.
|
|
202
|
+
|
|
203
|
+
### Install
|
|
110
204
|
|
|
111
205
|
```sh
|
|
112
|
-
|
|
113
|
-
|
|
206
|
+
pnpm add @composio/client 'effect@>=4.0.3 <4.2.0'
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`effect` is an optional peer dependency. Effect 4.1 requires Node.js 22.19 or newer.
|
|
210
|
+
The root entry and the `./pagination` and `./resources/*` subpaths never import it and load without it.
|
|
211
|
+
|
|
212
|
+
- **Supported range: `effect >=4.0.3 <4.2.0`.** The manifest declares the peer as `*`, because a
|
|
213
|
+
bounded optional peer makes npm refuse the whole install for a project that lists some other
|
|
214
|
+
`effect` and never imports this subpath. The cost is that a package manager does not warn about an
|
|
215
|
+
unsupported version. The range above is the one the subpath is tested against.
|
|
216
|
+
- **Install exactly one copy of `effect`.** With two copies, even one patch apart, the project does
|
|
217
|
+
not type-check: the client's `Effect`, `Layer` and `HttpClient` are not assignable to the
|
|
218
|
+
application's. At run time `Redacted` values do not cross between copies and `instanceof` is false,
|
|
219
|
+
and nothing warns about it.
|
|
220
|
+
- **The supported range bounds your Effect upgrades.** The client runs on the application's `effect`,
|
|
221
|
+
so moving to a new Effect minor waits for a client release whose supported range includes it.
|
|
222
|
+
|
|
223
|
+
### Construct a client
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
import { Effect, Layer } from 'effect'
|
|
227
|
+
import * as FetchHttpClient from 'effect/http/FetchHttpClient'
|
|
228
|
+
import { Auth, ComposioClient, layer, layerConfig } from '@composio/client/effect'
|
|
229
|
+
|
|
230
|
+
// Explicit options, over the `HttpClient` the application provides; here a fetch-backed one.
|
|
231
|
+
const live = layer({ auth: Auth.project('your-api-key') }).pipe(Layer.provide(FetchHttpClient.layer))
|
|
232
|
+
|
|
233
|
+
// Options read from the `COMPOSIO_*` settings.
|
|
234
|
+
const fromConfig = layerConfig().pipe(Layer.provide(FetchHttpClient.layer))
|
|
235
|
+
|
|
236
|
+
const program = Effect.gen(function* () {
|
|
237
|
+
const composio = yield* ComposioClient
|
|
238
|
+
const toolkit = yield* composio.toolkits.retrieve('github')
|
|
239
|
+
return toolkit.slug
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
const slug: Promise<string> = Effect.runPromise(program.pipe(Effect.provide(live)))
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`make(options, httpClient)` builds the same client synchronously from an `HttpClient` you already
|
|
246
|
+
hold, and throws where the layers fail.
|
|
247
|
+
|
|
248
|
+
`auth` and `scope` mean what they mean on the root client (see
|
|
249
|
+
[Authentication and scope](#authentication-and-scope)), and `Auth` is exported from
|
|
250
|
+
`@composio/client/effect` too. A key may also be a `Redacted<string>`, or a function returning a
|
|
251
|
+
string or a `Redacted<string>`. There is no `withOptions`: a client is a value, and a caller that
|
|
252
|
+
needs another credential calls `make` again with the same `HttpClient`.
|
|
253
|
+
|
|
254
|
+
Only `layerConfig` reads the environment. It reads `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and
|
|
255
|
+
`COMPOSIO_ORG_API_KEY` into `auth` by the rule `Composio.fromEnv` applies, each key `Redacted`
|
|
256
|
+
throughout, and `COMPOSIO_BASE_URL` and `COMPOSIO_ALLOW_INSECURE_HTTP=1`, through Effect's `Config`,
|
|
257
|
+
so the `ConfigProvider` in context decides where they come from; by default that is the process
|
|
258
|
+
environment. An option passed to `layerConfig` replaces the setting it names, so
|
|
259
|
+
`layerConfig({ auth: Auth.none() })` means none whatever is configured. `make` and `layer` read
|
|
260
|
+
nothing.
|
|
261
|
+
|
|
262
|
+
Construction fails with a `ConfigurationError` when a credentialed origin is not HTTPS (loopback and
|
|
263
|
+
`allowInsecureHTTP` excepted, as on the root client), when a key or a header option is refused, or
|
|
264
|
+
when `decode: true` is given without `schemas`. A credential provider that fails, or returns
|
|
265
|
+
something a header cannot carry, fails the call with a `ConfigurationError` before anything is sent.
|
|
266
|
+
|
|
267
|
+
The resources are plain objects of functions, not classes, so a method can be passed around without
|
|
268
|
+
binding. The root client's resources are the same since rc.20.
|
|
269
|
+
|
|
270
|
+
### Errors
|
|
271
|
+
|
|
272
|
+
Every call fails with a `ComposioError`, a union of tagged errors. The tags are namespaced:
|
|
273
|
+
|
|
274
|
+
| Tag | When |
|
|
275
|
+
| --- | --- |
|
|
276
|
+
| `@composio/client/BadRequestError` | 400 |
|
|
277
|
+
| `@composio/client/AuthenticationError` | 401 |
|
|
278
|
+
| `@composio/client/PermissionDeniedError` | 403 |
|
|
279
|
+
| `@composio/client/NotFoundError` | 404 |
|
|
280
|
+
| `@composio/client/ConflictError` | 409 |
|
|
281
|
+
| `@composio/client/UnprocessableEntityError` | 422 |
|
|
282
|
+
| `@composio/client/RateLimitError` | 429 |
|
|
283
|
+
| `@composio/client/InternalServerError` | 500 and above |
|
|
284
|
+
| `@composio/client/APIError` | any other non-success status |
|
|
285
|
+
| `@composio/client/APIConnectionError` | the transport failed before a response |
|
|
286
|
+
| `@composio/client/APIConnectionTimeoutError` | an attempt outlived its time budget |
|
|
287
|
+
| `@composio/client/DecodeError` | a success body failed validation (only with `decode: true`) |
|
|
288
|
+
| `@composio/client/ConfigurationError` | no request can be made from this client or call |
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
import { Effect } from 'effect'
|
|
292
|
+
import { isAPIError, type ComposioClientShape } from '@composio/client/effect'
|
|
293
|
+
|
|
294
|
+
const slugOrNull = (composio: ComposioClientShape, slug: string) =>
|
|
295
|
+
composio.toolkits.retrieve(slug).pipe(
|
|
296
|
+
Effect.map((toolkit) => toolkit.slug),
|
|
297
|
+
Effect.catchTag('@composio/client/NotFoundError', () => Effect.succeed(null)),
|
|
298
|
+
Effect.tapError((error) =>
|
|
299
|
+
isAPIError(error) ? Effect.logWarning(`${error.status} ${error.requestId}`) : Effect.void,
|
|
300
|
+
),
|
|
301
|
+
)
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
A status error carries `status`, `requestId`, `details` (the Composio error envelope, when the body
|
|
305
|
+
is one), `body`, `message`, `method` and `url`. `isAPIError` matches any status error and
|
|
306
|
+
`isComposioError` any error of the union; both test the tag, not the class. There is no access to the
|
|
307
|
+
raw response of a successful call.
|
|
308
|
+
|
|
309
|
+
Timeouts and retries follow the root client's policy: one minute per attempt by default. A
|
|
310
|
+
call whose method is idempotent (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`) is retried up to 2 times
|
|
311
|
+
on a connection failure, a timeout, or a 408, 409, 429 or 5xx response. Any other call, `POST` and `PATCH` included, is sent once, because a write that failed in
|
|
312
|
+
flight may already have acted. A call that is safe to repeat opts back in with its own `maxRetries`:
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
composio.toolRouter.session.search(sessionId, { queries }, { maxRetries: 2 })
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Streams
|
|
319
|
+
|
|
320
|
+
Fourteen cursor-paginated operations have a `<method>Stream` beside them that yields items across
|
|
321
|
+
pages:
|
|
322
|
+
|
|
323
|
+
- `authConfigs.listStream`, `connectedAccounts.listStream`, `files.listStream`,
|
|
324
|
+
`sessionConfigs.listStream`, `toolkits.listStream`, `toolkits.retrieveMultiStream`,
|
|
325
|
+
`tools.listStream`, `triggerInstances.listActiveStream`, `triggersTypes.listStream`,
|
|
326
|
+
`webhookSubscriptions.listStream`
|
|
327
|
+
- `toolRouter.session.configHistoryStream`, `toolRouter.session.toolkitsStream`,
|
|
328
|
+
`toolRouter.session.toolsStream`, `toolRouter.session.files.listStream`
|
|
329
|
+
|
|
330
|
+
```ts
|
|
331
|
+
import { Stream } from 'effect'
|
|
332
|
+
import type { ComposioClientShape } from '@composio/client/effect'
|
|
333
|
+
|
|
334
|
+
const firstSlugs = (composio: ComposioClientShape) =>
|
|
335
|
+
composio.toolkits.listStream({ limit: 100 }).pipe(
|
|
336
|
+
Stream.map((toolkit) => toolkit.slug),
|
|
337
|
+
Stream.take(250),
|
|
338
|
+
Stream.runCollect,
|
|
339
|
+
)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
A page is requested only when the stream is pulled that far, so `Stream.take` above stops after the
|
|
343
|
+
third page. The cursor rules are those of `@composio/client/pagination`, and a traversal that cannot
|
|
344
|
+
continue — a cursor the server repeats, a page with no `items` array — fails with a
|
|
345
|
+
`ConfigurationError`.
|
|
346
|
+
|
|
347
|
+
No other operation has a stream. That includes the list operations whose page is not the standard
|
|
348
|
+
`items` and `next_cursor` shape: `org.list` (`organizations`), `org.project.list` and
|
|
349
|
+
`org.owner.project.list` (`data`), and `logs.createToolExecution` (`logs`). Page those by passing
|
|
350
|
+
`next_cursor` back yourself.
|
|
351
|
+
|
|
352
|
+
### Per-call options
|
|
353
|
+
|
|
354
|
+
The last argument of every operation and raw method:
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
import type { ComposioClientShape } from '@composio/client/effect'
|
|
358
|
+
|
|
359
|
+
const once = (composio: ComposioClientShape) =>
|
|
360
|
+
composio.toolkits.retrieve(
|
|
361
|
+
'github',
|
|
362
|
+
{},
|
|
363
|
+
{
|
|
364
|
+
headers: { 'x-trace-id': 'abc', 'x-team': null }, // `null` removes a default header
|
|
365
|
+
maxRetries: 0,
|
|
366
|
+
timeout: 10_000, // milliseconds, per attempt
|
|
367
|
+
},
|
|
368
|
+
)
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Per-call headers win over the client's `defaultHeaders`. `decode` is the fourth option, described
|
|
372
|
+
next.
|
|
373
|
+
|
|
374
|
+
### Decoding
|
|
375
|
+
|
|
376
|
+
By default a response body is returned as parsed and nothing checks it. Decoding is opt-in, per call
|
|
377
|
+
or as a client default, and needs the response schemas, which are a separate entry:
|
|
378
|
+
|
|
379
|
+
```ts
|
|
380
|
+
import * as HttpClient from 'effect/http/HttpClient'
|
|
381
|
+
import { Effect } from 'effect'
|
|
382
|
+
import { Auth, make } from '@composio/client/effect'
|
|
383
|
+
import { schemaLoaders } from '@composio/client/effect/schemas'
|
|
384
|
+
|
|
385
|
+
const checkedCategories = (httpClient: HttpClient.HttpClient) => {
|
|
386
|
+
const composio = make({ auth: Auth.project('your-api-key'), schemas: schemaLoaders }, httpClient)
|
|
387
|
+
return composio.toolkits.retrieveCategories({ decode: true }).pipe(
|
|
388
|
+
Effect.catchTag('@composio/client/DecodeError', (error) =>
|
|
389
|
+
Effect.logError(`${error.operation}: ${JSON.stringify(error.issues)}`).pipe(Effect.as(null)),
|
|
390
|
+
),
|
|
391
|
+
)
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
- **It validates and changes nothing.** A call that passes returns the body exactly as it was parsed;
|
|
396
|
+
a field the API returns ahead of the spec is not stripped. The response type is the same either way.
|
|
397
|
+
- **`DecodeError`** carries `operation` (`toolkits.retrieveCategories`), `status`, `requestId`,
|
|
398
|
+
`method`, `url` and `issues`, each a `path` and a `kind` such as `MissingKey` or `InvalidType`. It
|
|
399
|
+
never carries the body or the value found: a success body is where this API returns secrets.
|
|
400
|
+
- **`decode: true` needs `schemas`.** As a client option without `schemas` it is a compile error, and a
|
|
401
|
+
`ConfigurationError` at construction for a caller the types did not reach. A per-call
|
|
402
|
+
`decode: true` on a client built without `schemas` fails with a `ConfigurationError` before
|
|
403
|
+
anything is sent.
|
|
404
|
+
- **Schemas load lazily.** `schemaLoaders` is a table of `import()` calls, one per operation. A schema
|
|
405
|
+
module is loaded by the first call that decodes its operation. A single schema can also be imported
|
|
406
|
+
directly, for example
|
|
407
|
+
`import { ToolkitRetrieveCategoriesResponse } from '@composio/client/effect/schemas/toolkits/retrieve-categories'`.
|
|
408
|
+
A decoding call also checks that the table contains its operation before sending the request. The
|
|
409
|
+
loader itself runs only after a non-204 success; a failed dynamic import can therefore fail a call
|
|
410
|
+
after the server has already processed it.
|
|
411
|
+
- **An application that never imports `@composio/client/effect/schemas` ships no schema.** The
|
|
412
|
+
`./effect` entry does not reach the table, so a bundler has no path to it.
|
|
413
|
+
- A 204 has no body to validate. A raw call is validated when its path is a declared operation's.
|
|
414
|
+
|
|
415
|
+
A schema is generated from the spec snapshot this version was built from, so decoding holds a
|
|
416
|
+
response to that snapshot. A response from before a required field existed fails: replaying stored
|
|
417
|
+
production responses through the schemas, the four `toolRouter.session` operations `create`,
|
|
418
|
+
`retrieve`, `attach` and `patch` failed on a missing `config.instant` for every capture through
|
|
419
|
+
2026-09-11, taken before the spec declared that field, and passed for the 2026-10-08 capture, taken
|
|
420
|
+
after. The record is in [`docs/upstream-asks.md`](./docs/upstream-asks.md).
|
|
421
|
+
|
|
422
|
+
### Tracing
|
|
423
|
+
|
|
424
|
+
One option, `tracing`, says what the client's own requests add to a trace:
|
|
425
|
+
|
|
426
|
+
| Value | Effect |
|
|
427
|
+
| --- | --- |
|
|
428
|
+
| `'off'` (default) | No span is opened for a request and no trace header is sent, so the request carries exactly the headers the root client sends. |
|
|
429
|
+
| `'span'` | Effect's `HttpClient` opens its client span around each request, a child of the span the call runs in. Nothing about it goes on the wire. |
|
|
430
|
+
| `'propagate'` | The span, also sent to the API as `b3` and `traceparent` headers. |
|
|
431
|
+
|
|
432
|
+
The option only ever reduces tracing, and only for this client's requests. A span asked for here is
|
|
433
|
+
still subject to the application's own `HttpClient.TracerDisabledWhen` and
|
|
434
|
+
`HttpClient.TracerPropagationEnabled`.
|
|
435
|
+
|
|
436
|
+
With a span on, the span ends on the client's own error, not on Effect's `HttpClientError`. That
|
|
437
|
+
error holds the request and its credential headers, and a tracer keeps what a span ended on. To do
|
|
438
|
+
this the client reassigns `end` on the span object the tracer returns, so a tracer that returns
|
|
439
|
+
frozen spans throws when a request starts. The replacement costs about a microsecond per request on
|
|
440
|
+
top of the span itself.
|
|
441
|
+
|
|
442
|
+
### Credentials and redaction
|
|
443
|
+
|
|
444
|
+
A request carries at most one credential header, chosen by `auth` as on the root client:
|
|
445
|
+
`x-api-key`, `x-user-api-key` or `x-org-api-key`. The client holds every key as a `Redacted` value
|
|
446
|
+
and adds all three header names to Effect's redaction list for its requests, so spans and renderings
|
|
447
|
+
of a request show `<redacted>`; Effect's own list knows only `x-api-key`.
|
|
448
|
+
|
|
449
|
+
No error the client produces holds the request, the transport's error or a credential value. One
|
|
450
|
+
caveat: `APIConnectionError.description` is the transport's own message text, copied. A transport
|
|
451
|
+
that writes a header value into its error messages would put it there.
|
|
452
|
+
|
|
453
|
+
The credential is applied before the request reaches the `HttpClient`, so a transform the application
|
|
454
|
+
puts on its `HttpClient` sees it.
|
|
455
|
+
|
|
456
|
+
### Redirects
|
|
457
|
+
|
|
458
|
+
The client follows redirects itself and withdraws credentials once a chain changes origin. It does so
|
|
459
|
+
by dispatching with `redirect: 'manual'`, which a fetch-backed `HttpClient` honors. The guarantee
|
|
460
|
+
holds only when nothing between the client and the wire follows redirects. An `HttpClient` wrapped in
|
|
461
|
+
`HttpClient.followRedirects`, or a transport that follows redirects on its own, forwards the
|
|
462
|
+
credential headers across origins and is unsupported for a credentialed client. Headers an
|
|
463
|
+
application places in `FetchHttpClient.RequestInit` are outside the client's credential handling:
|
|
464
|
+
the credential check does not see them, and they are not withdrawn on a cross-origin redirect.
|
|
465
|
+
|
|
466
|
+
### Deprecation notices
|
|
467
|
+
|
|
468
|
+
A deprecated input, or a response carrying `Deprecation`, `Sunset` and `Link` headers, is reported
|
|
469
|
+
through `Effect.logWarning`, once per operation and notice for each client. The application's
|
|
470
|
+
`Logger` and `References.MinimumLogLevel` decide what becomes of it; there is no client option.
|
|
471
|
+
`isDeprecationNotice` recognises a notice, so a logger can drop or route the notices alone:
|
|
472
|
+
|
|
473
|
+
```ts
|
|
474
|
+
import { isDeprecationNotice } from '@composio/client/effect'
|
|
475
|
+
|
|
476
|
+
const quiet = Logger.make((options) => (isDeprecationNotice(options) ? undefined : base.log(options)))
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### Raw methods
|
|
480
|
+
|
|
481
|
+
`get`, `post`, `put`, `patch` and `delete` reach any path through the same kernel: credentials,
|
|
482
|
+
retries, timeouts, redirects and errors behave as for a generated method.
|
|
483
|
+
|
|
484
|
+
```ts
|
|
485
|
+
import type { ComposioClientShape } from '@composio/client/effect'
|
|
486
|
+
|
|
487
|
+
const raw = (composio: ComposioClientShape) =>
|
|
488
|
+
composio.post<{ id: string }>('/api/v3.1/some/path', {
|
|
489
|
+
query: { dry_run: true },
|
|
490
|
+
body: { name: 'example' },
|
|
491
|
+
maxRetries: 0,
|
|
492
|
+
})
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
The type argument is an assertion, not a check.
|
|
496
|
+
|
|
497
|
+
### Performance
|
|
498
|
+
|
|
499
|
+
Measured against a mocked transport, so these are client overhead and say nothing about network
|
|
500
|
+
latency. The full tables and method are in
|
|
501
|
+
[`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md); the figures below are
|
|
502
|
+
its 2026-10-13 runs on Node 24.17.0 and Bun 1.4.0, `effect` 4.0.3, one Apple M1 Pro.
|
|
503
|
+
|
|
504
|
+
**The Effect surface is slower per request than the root client.** Typed geometric mean over two
|
|
505
|
+
runs: 154.1% and 153.2% of the root client by default, 173.8% and 171.1% with `tracing: 'span'`. In
|
|
506
|
+
absolute terms that is 10 to 14 microseconds more per request, and 3 to 5 more with the span on. It
|
|
507
|
+
is a measurement, not a win; what it buys is the typed failure channel, interruption and a transport
|
|
508
|
+
taken from context.
|
|
509
|
+
|
|
510
|
+
**Decoding costs more than the request.** Validating a twenty-item `toolkits.list` page took a call
|
|
511
|
+
from 77.7 / 78.9 µs to 187.3 / 192.4 µs, about 110 µs or 5.5 µs per item.
|
|
512
|
+
|
|
513
|
+
**Import time**, over what Effect's own HTTP modules already cost, minimum / median of thirty in
|
|
514
|
+
milliseconds:
|
|
515
|
+
|
|
516
|
+
| | Node, modules | Node, bundle | Bun, modules | Bun, bundle |
|
|
517
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
518
|
+
| `./effect`, never decodes | 4.2 / 4.5 | 4.7 / 4.8 | 3.6 / 2.8 | 11.2 / 11.7 |
|
|
519
|
+
| plus importing `schemaLoaders` | 2.4 / 0.2 | 5.3 / 5.2 | 0.2 / −0.7 | 3.6 / 3.8 |
|
|
520
|
+
|
|
521
|
+
The published-module lanes are noisy, which is how a difference comes out negative. Effect itself
|
|
522
|
+
is the larger part: 122.2 / 128.3 ms as modules on Node and 22.0 / 23.8 ms bundled, against 9.6 /
|
|
523
|
+
10.5 ms and 4.0 / 4.4 ms for the root client.
|
|
524
|
+
|
|
525
|
+
**Bundle size** of a single-file consumer: Effect's HTTP modules alone, then with a client that never
|
|
526
|
+
decodes, then with the loader table and every schema it reaches.
|
|
527
|
+
|
|
528
|
+
| Bundler | Effect alone | never decodes | decodes |
|
|
529
|
+
| --- | ---: | ---: | ---: |
|
|
530
|
+
| rolldown | 498 kB | 732 kB | 893 kB |
|
|
531
|
+
| `bun build` | 266 kB | 705 kB | 1088 kB |
|
|
532
|
+
|
|
533
|
+
**Package weight.** The schema modules make the package larger on disk: 3.4 MB unpacked in 509 files,
|
|
534
|
+
of which 2.1 MB and 328 files are `dist/effect/schemas*`, against 1.1 MB in 176 files for
|
|
535
|
+
`2.0.0-rc.11` as published. None of it is on the root entry's import path.
|
|
536
|
+
|
|
537
|
+
## Identify the calling product
|
|
538
|
+
|
|
539
|
+
A product built on the client passes `identity` instead of setting headers by hand. The root client
|
|
540
|
+
and `./effect` take the same option:
|
|
541
|
+
|
|
542
|
+
```ts
|
|
543
|
+
const composio = new Composio({
|
|
544
|
+
auth: Auth.project(apiKey),
|
|
545
|
+
identity: { product: '@composio/core', version: '0.9.0', source: 'TYPESCRIPT_SDK', framework: 'openai' },
|
|
546
|
+
})
|
|
114
547
|
```
|
|
115
548
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
549
|
+
| Header | Sent from | Without `identity` |
|
|
550
|
+
| --- | --- | --- |
|
|
551
|
+
| `x-client-provenance`, `x-client-version` | `product`, `version` | the package name and version |
|
|
552
|
+
| `x-sdk-version` | `version` | not sent |
|
|
553
|
+
| `x-source`, `x-framework` | `source`, `framework` | not sent |
|
|
554
|
+
| `x-runtime` | `runtime`, else the detected runtime | the detected runtime |
|
|
555
|
+
| `x-client-runtime`, `x-runtime-version` | the detected runtime | the detected runtime |
|
|
556
|
+
| `x-client-library`, `x-client-library-version`, `x-client-language` | the package | the package |
|
|
557
|
+
|
|
558
|
+
The three library headers are the package's own: `defaultHeaders`, `COMPOSIO_CUSTOM_HEADERS` and a
|
|
559
|
+
call's `headers` cannot set or delete them. Once `identity` is set, the same holds for every header
|
|
560
|
+
in the table. A refused name fails construction (`ComposioError`, or `ConfigurationError` on
|
|
561
|
+
`./effect`), or the call before anything is sent. Identity values must be non-empty printable ASCII
|
|
562
|
+
with no surrounding whitespace, and are sent to the configured API origin only.
|
|
563
|
+
|
|
564
|
+
The detected runtime is one of `nodejs`, `bun`, `deno`, `cloudflare`, `vercel_edge`, `netlify`,
|
|
565
|
+
`fastly` or `unknown`, checked in [`std-env`](https://github.com/unjs/std-env)'s order; the
|
|
566
|
+
Python client always reports `python`.
|
|
567
|
+
|
|
568
|
+
## Upgrading to 2.0
|
|
569
|
+
|
|
570
|
+
Authentication is explicit, several legacy exports are removed, internal operations have moved,
|
|
571
|
+
and POST/PATCH retries now require per-call opt-in. Read the [TypeScript migration guide](./MIGRATION.md)
|
|
572
|
+
or [Python migration guide](./python/MIGRATION.md) before upgrading from Stainless or an earlier RC.
|
|
119
573
|
|
|
120
574
|
## Development
|
|
121
575
|
|
|
122
|
-
Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node
|
|
576
|
+
Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node, Bun, pnpm, Python and uv. Exact versions live in `mise.toml`. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
|
|
123
577
|
|
|
124
578
|
```sh
|
|
125
579
|
pnpm install
|
|
126
|
-
pnpm generate # hey-api + compat codegen: spec/openapi.json → src/generated
|
|
580
|
+
pnpm generate # hey-api + compat and Effect codegen: spec/openapi.json → src/generated, src/compat/resources, src/effect/generated (do not edit)
|
|
127
581
|
pnpm lint # eslint over src, test, codegen, parity, and demo
|
|
128
582
|
pnpm typecheck # tsgo (TS native), including type tests and demo
|
|
129
583
|
pnpm typecheck:tsc # same programs under tsc — both compilers must pass
|
|
130
|
-
pnpm codegen:check # verify committed
|
|
131
|
-
pnpm test # unit
|
|
584
|
+
pnpm codegen:check # verify every committed generated tree matches the generator
|
|
585
|
+
pnpm test # offline unit, codegen, parity-harness and demo suites
|
|
132
586
|
pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
|
|
133
|
-
pnpm test:pack #
|
|
587
|
+
pnpm test:pack # installed export inventory, Effect consumers and optional-peer matrix
|
|
134
588
|
pnpm benchmark:baseline # capture the dist/ a benchmark run compares against
|
|
135
|
-
pnpm benchmark # score SDK overhead against that baseline
|
|
589
|
+
pnpm benchmark # score SDK overhead against that baseline
|
|
590
|
+
pnpm benchmark:import # time what importing each entry costs, on Node and Bun
|
|
136
591
|
pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
|
|
137
592
|
pnpm refresh-spec # re-fetch spec/openapi.json from the live backend
|
|
138
593
|
```
|
|
139
594
|
|
|
140
|
-
`src/generated/` and `src/
|
|
595
|
+
`src/generated/`, `src/compat/resources/` and `src/effect/generated/` are regenerated output — never edit them by hand; CI fails if they drift from `spec/openapi.json`.
|
|
141
596
|
|
|
142
597
|
### Python lane
|
|
143
598
|
|
|
@@ -155,3 +610,8 @@ uv run pytest
|
|
|
155
610
|
Client-overhead measurements use a deterministic in-memory transport and are documented in
|
|
156
611
|
[`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md). They do not measure API
|
|
157
612
|
latency.
|
|
613
|
+
|
|
614
|
+
## Contributing and security
|
|
615
|
+
|
|
616
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and verification,
|
|
617
|
+
[SECURITY.md](./SECURITY.md) for private vulnerability reports, and [LICENSE](./LICENSE) for Apache-2.0.
|