@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
md 1,666 lines 115 KB
Rendered Raw
1 # @composio/core
2
3 ## 0.31.0
4
5 ### Minor Changes
6
7 - 7a1e7db: Choose which Composio-managed app an auth config uses. `composio.toolkits.get(slug)` returns `composioManagedAuth` in TypeScript, one entry per managed app with `managedAppId` and `isDefault`. Pass that id as `managedAppId` (TypeScript) or `managed_app_id` (Python) to `composio.authConfigs.create` / `composio.auth_configs.create`; omit it for the toolkit's default app. Auth config create, get and list responses return `managedAppId` in TypeScript (`null` when the auth config isn't on a managed app).
8
9 ### Patch Changes
10
11 - dbcecde: Update the API client dependencies to 2.1.36 to include the latest API changes.
12
13 ## 0.30.0
14
15 ### Minor Changes
16
17 - 6f8a704: Custom toolkits are no longer experimental. Use `composio.customToolkits` in TypeScript and `composio.custom_toolkits` in Python. `composio.experimental.customToolkits` and `composio.experimental.custom_toolkits` are deprecated aliases of the same object and keep working. Python also exports the class as `CustomToolkits`; `ExperimentalCustomToolkits` stays as an alias.
18 - 84fb5ba: Surface the server's error details on every API failure, not only the default `tools.execute` path.
19
20 **TypeScript:** `apiErrorCode` is now on `ComposioError`, derived from the `APIError` cause like `statusCode` and `requestId`, so every SDK wrapper gets it. The 429 branch, the 1803 connected-account branch, tool-fetch failures, and session/Tool Router execution now use the server's message, `suggested_fix`, status, and numeric code. Failures that never reached the API keep their original reason in the message. `ComposioConnectedAccountNotFoundError` keeps its 404 default but uses the server's status when it wraps an API error. Server-controlled error text is stripped of control characters and ANSI/OSC escapes before it reaches a message or terminal output.
21
22 **Python:** status errors raised by the SDK now expose `api_error_code`, `suggested_fix`, and `possible_fixes`, and `api_error_details(error)` gives type checkers a typed view of them. `possible_fixes` uses the server's `suggested_fix` when present and otherwise returns guidance for the HTTP status, so 401, 402, 403, 410, and 5xx no longer suggest checking the tool slug and arguments. Server-controlled text is sanitized before it reaches a message. The message already carries the server's explanation; a regression test now locks that. A tool-fetch 400/404 mapped to `ToolNotFoundError` now appends the server's message.
23
24 - be92189: Surface the API's error details when `tools.execute` fails. `ComposioError` now declares `statusCode` and `requestId`, read from the `@composio/client` `APIError` it wraps unless passed explicitly, and `ComposioToolExecutionError` adds `apiErrorCode`, the numeric `error.code` the API sent. `code` stays the SDK's `TS-SDK::` code. Branch on `error.statusCode` (for example `410`) instead of matching message text.
25
26 **Behavior change:** a rejected execution's message now ends with the server's message, and its `possibleFixes` come from the server's `suggested_fix`.
27
28 ```ts
29 // before
30 error.message; // 'Error executing the tool GITHUB_GET_REPOS'
31 error.possibleFixes; // ['Ensure the tool slug is correct and the input arguments for the tool is valid']
32
33 // now
34 error.message; // 'Error executing the tool GITHUB_GET_REPOS: <the API error message>'
35 error.possibleFixes; // ['<the API suggested_fix>']
36 ```
37
38 Without a `suggested_fix`, the fix depends on the HTTP status: a 401, 402, 403, 410 or 5xx no longer suggests checking the tool slug and arguments. A response that is not the API error envelope keeps the old message. `ComposioConnectedAccountNotFoundError` (API code 1803) now keeps the client error as `cause`, and errors that wrap an `APIError` cause, such as `ComposioToolFetchError`, now carry its `statusCode` and `requestId`. `ComposioAPIServerErrorBody` is now the client's `APIErrorBody`, where `request_id` and `suggested_fix` are optional, as the API sends them.
39
40 ### Patch Changes
41
42 - 41c4666: Allow `RemoteFile.save()` to save to an explicit path when the home directory cannot be resolved.
43 - 19a7a09: Update the API client dependencies to 2.1.33 to include the latest API changes.
44 - 24dfd33: Let `composio.files.upload()` and `composio.files.download()` be cancelled. Both now accept trailing request options (`{ signal }`), like the other SDK methods that do HTTP I/O. The signal reaches the presigned-URL request and the S3 transfer, and an aborted call rejects with `ComposioRequestCancelledError` instead of running to completion. Calls cancelled by `AbortSignal.timeout()` or by `abort(reason)` during a direct S3 transfer now also reject with `ComposioRequestCancelledError` rather than the signal's raw reason.
45 - 23360bb: Stop connection polling at the deadline after a rate-limited response. When a `429` with `Retry-After` reaches the timeout, `waitForConnection()` and `wait_for_connection()` now time out instead of sending another status request with a fresh client retry cycle.
46 - 4ee12da: Use generated client types for inline local-tool payloads and share Python result handling between session tool and meta-tool execution. Public methods and request and response shapes are unchanged.
47 - d5c1861: Update runtime dependencies, require patched Zod 4 releases where used directly, support Anthropic SDK 1.6, and update the AutoGen provider's FLAML dependency. Preserve Zod 3 compatibility fixtures and existing framework version boundaries.
48 - 6aa3f31: Tolerate malformed tool schemas instead of failing a whole toolkit's tool list. `getRawComposioTools` and the raw list path previously ran every tool's parameters through the strict schema validator with `parse`, so one tool whose schema used a valid-but-unusual JSON Schema shape — a boolean schema node (`items: true`, still emitted by MCP toolkits), a draft-04 boolean `exclusiveMinimum`/`exclusiveMaximum`, or a bare combinator root with no `type: "object"` — threw a `ZodError` and returned no tools at all for that toolkit (8 of 1562 toolkits ship such tools). Those shapes are now rewritten into the strict subset, preserving their meaning (`true` becomes `{}`, `false` becomes `{ not: {} }` — coercing it to `{}` would invert the schema). If a schema still cannot be repaired, the tool is skipped with a warning when its _input_ schema failed — providers build their call schema from it, so a tool without one is not callable — and returned without the _output_ schema when only that side failed. Identity-field failures stay loud.
49 - b2b9d38: Match the `toolkits` filter of `triggers.subscribe()` for toolkits whose slug contains an underscore
50
51 The toolkit of an incoming event is derived from the first `_` segment of its trigger slug, so `ONE_DRIVE_FILE_CREATED_TRIGGER` was attributed to `ONE` and `subscribe(fn, { toolkits: ['one_drive'] })` dropped every OneDrive event. The same happened to `launch_darkly` and `agent_mail`. A `toolkits` entry now also matches when the trigger slug starts with `<toolkit>_`.
52
53 - Updated dependencies [d5c1861]
54 - @composio/json-schema-to-zod@0.4.1
55
56 ## 0.29.0
57
58 ### Minor Changes
59
60 - f22ab26: Breaking (experimental API): `composio.experimental.customToolkits.create()` and `upsert()` take the MCP server URL as `mcpUrl` instead of `appUrl`, and send it to the API as `mcp_url`.
61 - f22ab26: Renames in-process custom tools to local tools, so they are no longer confused with the server-side custom toolkits on `composio.experimental.customToolkits`. Pass `experimental.localTools` and `experimental.localToolkits` to `composio.create()`, and `localTools` and `localToolkits` to `composio.use()`. List them with `session.localTools()` and `session.localToolkits()`. The types are now `LocalTool`, `LocalToolkit`, `RegisteredLocalTool`, `RegisteredLocalToolkit`, `CreateLocalToolParams`, `CreateLocalToolkitParams` and `LocalToolExecuteFn`. The `customTools` and `customToolkits` options, the `session.customTools()` and `session.customToolkits()` methods, and the `Custom*` type names are deprecated and keep working. Passing both a new option and its deprecated alias throws `ValidationError`. The request sent to the API is unchanged.
62 - f22ab26: Handle rate limits better: `tools.execute()` reuses tool schemas instead of fetching one per call, `waitForConnection()` backs off between polls and waits out a 429, and tool fetches and executions rejected with a 429 throw `ComposioToolFetchRateLimitError` or `ComposioToolExecutionRateLimitError` (check with `isComposioRateLimitError`).
63
64 ### Patch Changes
65
66 - f22ab26: Update @composio/client to 2.1.0 to include the latest API changes.
67
68 ## 0.28.0
69
70 ### Minor Changes
71
72 - d2d4148: Requires `@composio/client` `2.0.0`. POST and PATCH requests, including tool execution and trigger creation, are now sent once instead of being retried on a lost response or a retryable status, because a write can complete on the server after its response is lost. Other requests keep their retries. On the client returned by `getClient()`, a write retries only when that call sets `maxRetries`.
73 - e87ed85: Requires `@composio/client` `2.0.0-rc.20`. The SDK imports the client's types from the one `@composio/client/resources/*` spelling rc.20 publishes and reaches nested types by indexed access; every type the SDK exports keeps its shape. With rc.20, the resources of the client returned by `getClient()` are plain objects typed by interfaces: the resource classes, `Composio.Tools`-style statics and namespace-member types such as `SessionCreateParams.Experimental` are gone, and the `.js`/`.mjs` subpath spellings no longer resolve.
74 - 3f3df9a: Requires `@composio/client` `2.0.0-rc.21`. The SDK's behaviour is unchanged. With rc.21, the client returned by `getClient()` no longer has `request()`, `Composio.Composio` or `Composio.DEFAULT_TIMEOUT`: call the raw verb for the method (`get`, `post`, `patch`, `put`, `delete`), which takes the same `query`, `body` and request options.
75 - 54a935f: Requires `@composio/client` `2.0.0-rc.23`. `composio.sessionConfigs.list()` no longer sends `search`, which the Composio API removed: the option is deprecated, ignored, and logs a warning when set; filter `items` by name instead. With rc.23, the client returned by `getClient()` no longer has `cli.createCodactFailure` (now under `client._internal`, typed through `@composio/client/internal`) or `org.clanker.createClaim`, and its `sessionConfigs.list()` no longer accepts `search`.
76 - 7434e02: Requires `@composio/client` `2.0.0-rc.22`. `composio.toolkits.get(slug)` now returns `meta.appUrl` when the API sends the toolkit's app URL; it was always left out before. `composio.sessionConfigs.get()` keeps the `require_approval` lists of a stored policy, and no longer fails validation on a policy entry that only sets `require_approval`; `SessionConfigPolicy` gains the matching optional `require_approval` fields and the approval-only entry. Session hooks, blocked calls and hook results are read from the API types of `@composio/client` instead of SDK copies, with the same results and errors for well-formed responses; a malformed `hook_results` or blocked response is no longer re-validated by the SDK, matching every other API response.
77 - a5a1fc8: Requires `@composio/client` `2.0.1`. Adds `composio.experimental.customToolkits.create()` and `update()`, which call the v3.1 custom toolkit create and update endpoints. `create()` takes `userId` (`'all'` to share the toolkit, or the user it is private to), generates the slug, and returns a `connectLink` for a private toolkit. `upsert()` is deprecated and logs a warning once per process; it keeps working.
78
79 API-key auth schemes accept `additionalFields.genericId` with a required `displayName` and optional `description` to collect the value used by `{{generic_id}}` headers.
80
81 - d2d4148: `composio.triggers.create()` accepts `type` (`'webhook'` or `'poll'`, for a trigger that supports both) and `pollingInterval` (minutes between polls, which wins over `triggerConfig.interval`), and returns the instance's `type`, `fallbackReason` and `pollingInterval` along with `triggerId`. `composio.triggers.listActive()` items carry the same three fields, and `getType()` / `listTypes()` return each trigger type's `type`, `types` and `requiresWebhookEndpointSetup`.
82
83 ### Patch Changes
84
85 - e547eb0: Upload local files with the MIME type of their extension
86
87 A file uploaded from a local path used to be sent as `application/octet-stream` whatever it was, so tools that check the file's type, such as Canva's design import, rejected it. The SDK now infers the type from the file name's extension (a `.pptx` uploads as `application/vnd.openxmlformats-officedocument.presentationml.presentation`) and keeps `application/octet-stream` only for missing or unknown extensions. The TypeScript and Python SDKs now use the same extension table, so a file uploads with the same type from either SDK and from the CLI. Files passed as `File` objects and URLs keep the type they carry.
88
89 - 30f8ca1: `getExtensionFromMimeType` now maps `text/csv` to `csv` from its table, matching the Python SDK. The returned extension is unchanged.
90 - f6368e0: Add the missing `experimental` option to the `ToolRouterAuthorizeFn` type. `session.authorize()` already accepted `experimental: { accountType, aclConfigForShared }` at runtime, but sessions returned by `composio.create()` and `composio.use()` rejected it at compile time.
91
92 ## 0.27.0
93
94 ### Minor Changes
95
96 - c2bbfa8: Add session hooks. A hook can block a tool call before it runs, or block its result before the agent sees it.
97
98 `create()` and `update()` accept `hooks`. On `update()`, `hooks` replaces the whole list and `null` removes every hook. `hooks` cannot be combined with `experimental.sessionConfigId`.
99
100 ```ts
101 const session = await composio.create('user_123', {
102 hooks: [
103 {
104 type: 'before_execute',
105 id: 'no_external_email',
106 name: 'No external email',
107 appliesTo: { toolkits: ['gmail'] },
108 handler: {
109 type: 'condition_check',
110 condition: 'Sending email to anyone outside example.org',
111 action: 'block',
112 },
113 },
114 ],
115 });
116 ```
117
118 A blocked call comes back from `session.execute()` and `session.executeMeta()` with `resultType: 'blocked'`, empty `data`, the hook's message in `error`, and `blockReason`. Provider integrations hand it to the agent as a failed call with that message. Every result also carries `hookResults` when a hook applied.
119
120 `session.proxyExecute()` and `ctx.proxyExecute()` now return `resultType: 'completed'` or `resultType: 'blocked'`. A blocked request has no HTTP response, so TypeScript code that reads `status` has to check `resultType` first.
121
122 ## 0.26.0
123
124 ### Minor Changes
125
126 - e08c84f: Requires `@composio/client` `2.0.0-rc.18`. The SDK now hands the API client its credential as the client's `auth` option and its organization and project as `scope`, instead of placing them in default headers. The `apiKey`, `userApiKey`, `orgApiKey`, `orgId` and `projectId` options, their environment fallbacks and the credentials sent on each request are unchanged, with one exception: with `apiKey: null` and only an organization API key (the `orgApiKey` option, `COMPOSIO_ORG_API_KEY`, or an `x-org-api-key` default header), every request now carries `x-org-api-key`, and so do trigger channel authorization and `session.mcp.headers`. Before, only the organization-owner operations did, and every other request went out without a credential.
127
128 Credential and scope headers in `defaultHeaders` or `createSession({ headers })` keep working, but the SDK folds them into its own options instead of forwarding them: an `x-user-api-key` or `x-org-api-key` entry becomes the credential every request carries, an `x-api-key` entry becomes the project key, and `x-org-id` / `x-project-id` entries become `orgId` / `projectId`. `getConfig()` reports the folded values (for example `apiKey: null` and `userApiKey` for an `x-user-api-key` entry) and no longer lists those entries under `defaultHeaders`. Setting more than one of `x-api-key`, `x-user-api-key` and `x-org-api-key` now throws a `ComposioError`; the API rejected every such request.
129
130 On the client returned by `getClient()`, `apiKey`, `userApiKey` and `orgApiKey` are read-only and deprecated (read the keys from `getConfig()`, or `authMode` and `scope` from the client), and a per-call `headers` option can no longer name a credential or scope header. The API client no longer reads the environment itself: the SDK still honours `COMPOSIO_ALLOW_INSECURE_HTTP=1`, and no longer applies `COMPOSIO_CUSTOM_HEADERS`; pass `defaultHeaders` instead.
131
132 The deprecated `customConnectionData` now requires `val.access_token` for `S2S_OAUTH2`, as the API does.
133
134 - 57de614: Requires `@composio/client` `2.0.0-rc.19`. The SDK forwards the API client's log lines through a `Console`-shaped object instead of the client's removed `Logger` interface; what is logged, and at which SDK level, is unchanged. With rc.19, the client returned by `getClient()` no longer has `apiKey`, `userApiKey`, `orgApiKey` or `logger`, and its `baseURL`, `maxRetries`, `timeout` and `logLevel` are read-only: read the keys from `getConfig()`, and derive a client with `withOptions()` to change the others.
135
136 ### Patch Changes
137
138 - 9d26fb8: Fold OpenAPI `nullable` into the type in strict tool schemas
139
140 `toStrictJsonSchema` no longer passes OpenAPI `nullable` through. Anthropic strict tool use rejects it on an object schema with a 400 for the whole request. A node with `nullable: true` now accepts `null` through its `type` (`["object", "null"]`) or a null branch, matching how the tool's arguments are validated, and the rewrite is reported as a `nullable-converted` change. `nullable: false` is removed as an `unsupported-keyword-stripped` change. `omitNullToolArguments` now keeps a `null` for a property marked `nullable: true`, as it already does for one whose `type` includes `null`.
141
142 - 3dd9a2c: Strip string `format` values that OpenAI structured outputs rejects from strict tool schemas
143
144 `toStrictJsonSchema` now removes a `format` on a string schema unless it is one of `date-time`, `time`, `date`, `duration`, `email`, `hostname`, `ipv4`, `ipv6`, or `uuid`. OpenAI rejects any other string format in strict mode with a 400 for the whole request, so a single tool with `format: "uri"`, a custom format such as `repo.nwo`, or the `format: "path"` that file uploads add made every strict request fail. The removal is reported as an `unsupported-keyword-stripped` change. Formats on number and integer schemas are kept, since the API does not check them.
145
146 - 04fdb41: Check a string tool parameter as base64 only when its `contentEncoding` is `base64`. `format: "binary"` (raw octets in OpenAPI) and other encodings such as `base16` were validated as base64, so the Vercel, LangChain, LlamaIndex, and Claude Agent SDK providers rejected tool calls with plain text or hex in those fields, and the schema sent to the model described them as `contentEncoding: "base64"`. Those fields are now plain strings. `contentEncoding: "base64"` keeps its check, and `format: "byte"` stays unchecked.
147 - be12ce1: Warn once per toolkit version when the API reports it as deprecated through the `Composio-Deprecated-Toolkits` response header. The warning names the version, the sunset date and how to pin a newer version. Silence it with `logLevel: 'error'` or `COMPOSIO_LOG_LEVEL=error`.
148 - Updated dependencies [f119f05]
149 - Updated dependencies [04fdb41]
150 - @composio/json-schema-to-zod@0.4.0
151
152 ## 0.25.0
153
154 ### Minor Changes
155
156 - 79c2d1d: Requires `@composio/client` `2.0.0-rc.17`. The SDK now reports itself to the API client through the client's `identity` option instead of default headers. The headers sent with each request are unchanged, with one exception: on Cloudflare Workers and Vercel Edge with Node.js compatibility enabled, `x-client-runtime` now names that runtime instead of `nodejs`, and the polyfilled Node.js version is no longer sent as `x-runtime-version`. A `createSession()` clone no longer copies these headers into its `defaultHeaders`.
157
158 The API client owns these headers, so `defaultHeaders` and `createSession({ headers })` now reject `x-client-provenance`, `x-client-version`, `x-client-library`, `x-client-library-version`, `x-client-language`, `x-client-runtime`, `x-sdk-version`, `x-source`, `x-framework`, `x-runtime` and `x-runtime-version` with a `ComposioError` from `@composio/client`. The SDK used to overwrite such entries silently.
159
160 A custom provider whose `name` cannot be sent as a header value (anything other than printable ASCII with no leading or trailing whitespace) is reported as `unknown` in `x-framework`.
161
162 - 40546c3: Add experimental support for tool calls that need the user's approval.
163
164 Sessions accept a `requireApproval` list next to the `toolkits`, `tools` and `tags` filters on `create()` and `update()`. A call to a matching tool doesn't run: `session.execute()` and `session.executeMeta()` throw `ComposioToolInputRequiredError` with the questions on `inputRequests`. To answer, repeat the same call with the user's answers in `inputResponses` and the error's `requestState`:
165
166 ```ts
167 const session = await composio.create('user_123', {
168 tools: { gmail: { requireApproval: ['GMAIL_SEND_EMAIL'] } },
169 });
170
171 try {
172 await session.execute('GMAIL_SEND_EMAIL', args);
173 } catch (error) {
174 if (!(error instanceof ComposioToolInputRequiredError)) throw error;
175 const inputResponses = await promptUser(error.inputRequests);
176 await session.execute('GMAIL_SEND_EMAIL', args, {
177 inputResponses,
178 requestState: error.requestState,
179 });
180 }
181 ```
182
183 `promptUser` is a placeholder for your application's consent UI. Display each request, wait for the user's response, and return the answers keyed by request ID. Forward `decline` and `cancel` responses unchanged.
184
185 `experimental.noElicitationSupportFallback` (`'deny'` or `'allow'`) sets what happens to such a call when the session's MCP client can't ask the user.
186
187 `session.executeMeta()` now takes these answers as its third argument, so its request options move to the fourth.
188
189 The Python SDK gains the same `require_approval` lists, `experimental.no_elicitation_support_fallback`, and `input_responses` and `request_state` on `session.execute()` and `session.execute_meta()`.
190
191 ### Patch Changes
192
193 - f9a972b: Update the owned API client to `@composio/client@2.0.0-rc.16`. The SDK's public API and runtime behavior are unchanged.
194 - 04cd5c4: Fix the trigger subscription lifecycle and contain errors from trigger handlers.
195
196 - `triggers.unsubscribe()` now closes the realtime connection, so a Node process can exit once it has unsubscribed. A later `triggers.subscribe()` opens a new connection.
197 - `triggers.unsubscribe()` before any `subscribe()` no longer fetches realtime credentials or creates a client.
198 - Concurrent `subscribe()` calls share one connection, and `unsubscribe()` cancels a subscription that is still connecting, so it never opens a connection or delivers events afterwards.
199 - A rejected promise from an `async` trigger handler is logged like a synchronous throw instead of escaping as an unhandled rejection that ends the process. Handler failures log the error's message rather than `{}`.
200
201 ## 0.24.0
202
203 ### Minor Changes
204
205 - 59935c0: Add `session.executeMeta()` to run a Composio meta tool (`COMPOSIO_*`) within a session. It takes a meta tool slug and optional arguments, and returns the same result as `session.execute()`, including `resultType`. Like `session.execute()`, it throws `ComposioToolInputRequiredError` when the tool needs user input and is not retried. The new `ToolRouterSessionMetaToolSlug` type lists the accepted slugs.
206
207 The Python SDK gains the matching `session.execute_meta()` and `ToolRouterSessionMetaToolSlug`.
208
209 ### Patch Changes
210
211 - fd59eba: Update SDK and provider dependencies to compatible releases. Accept Anthropic SDK 0.132 and OpenAI Agents 0.20 in provider peer ranges, and add Pi coding-agent 1.x to the experimental provider's supported peer range.
212 - 79b4912: Update the owned API client to `@composio/client@2.0.0-rc.14`. OAuth connection data types now accept a `null` `id_token`. Session tag filters accept the `createHint` and `updateHint` tags. The experimental `instant.returnPricesInSearch` Session option returns each Instant tool's price in Session search results, under `toolkitConnectionStatuses[].instantAccount.prices`. `composio.mcp.generate()` now warns once that its URLs rely on the deprecated `include_composio_helper_actions` query parameter; switch to a Session's MCP endpoint.
213 - 58bcde8: Add a `proxyExecute` session option. `composio.sessions.create(userId, { proxyExecute: true })` exposes the `COMPOSIO_PROXY_EXECUTE` meta tool, which lets the agent call a toolkit's API directly with the user's connected account. A boolean is shorthand for `{ enable: boolean }`. `session.update()` accepts the same option, and `null` removes the stored value. `proxyExecute: false` also turns off the sandbox `proxy_execute()` helper, and the API rejects it at creation together with `sandbox.enableProxyExecution: true`.
214
215 ## 0.23.0
216
217 ### Minor Changes
218
219 - 55ed9e2: Update the owned API client to `@composio/client@2.0.0-rc.11`.
220
221 A session tool can now ask for user input, such as an approval, instead of running: the API answers the call with `result_type: "input_required"`. `session.execute()`, `session.proxyExecute()`, provider-wrapped session tools, and the `execute` / `proxyExecute` helpers passed to custom tools throw the new `ComposioToolInputRequiredError` in that case. A local custom tool whose body makes such a call lets the error through instead of returning it as a failed result. The error carries the questions on `inputRequests` and the opaque `request_state` on `requestState`. `requestState` is continuation state, so it is a non-enumerable property: read it as `error.requestState`, and `console.error(error)`, `util.inspect(error)` and `JSON.stringify(error)` leave it out. Nothing was executed and the call is not retried. The SDK does not submit answers yet.
222
223 Every session tool that ran reports `result_type` as `completed` or `failed`, and a failed execution can carry a `null` or empty `error`. `session.execute()` and the custom tool `execute` helper return it as the new `resultType`, which is always present; read it rather than `error` to tell a failure from a success. Provider-wrapped session tools, provider tool calls bound to a session, and the merged `COMPOSIO_MULTI_EXECUTE_TOOL` result set `successful` from it alone, so a failure without error text is no longer reported as successful. `error` is returned as the API sent it. A session execute answer without `result_type`, or with a value this SDK does not know, throws `ValidationError` instead of being read as a success or a failure.
224
225 A `COMPOSIO_MULTI_EXECUTE_TOOL` batch that mixes local custom tools with remote tools now throws `ComposioToolInputRequiredError` when the remote half needs user input, as an all-remote batch already did. It used to report the input request as a failure message on each remote tool, without `inputRequests` or `requestState`. Local tools in that batch have already run by then, and their results are discarded by the throw.
226
227 Breaking changes:
228
229 - `ToolRouterSessionConfig` (`session.config`, the result of `session.update()`) and `ToolRouterSessionConfigHistoryConfig` (`session.listConfigHistory()`) are now the client's own config types. `instant` is always present (`false` or the policy object) instead of optional.
230 - In those config types, `toolkits` and each `tools` entry can be a `{ require_approval }`-only object, so a check for `enabled` or `disabled` no longer covers every case. `tags` can carry `require_approval`, and the config can carry `proxy_execute`.
231 - The session config is returned as the API sent it. The SDK no longer validates `instant` at runtime or removes a `premium_usage` key.
232 - `ToolRouterSessionExecuteResponse` requires `resultType`. A custom `ToolCallSession` passed to a provider must return it from `execute()`, because `successful` is no longer derived from `error`.
233 - Removed the unused `ToolRouterInstantResponseSchema` and `ToolRouterInstantResponse` exports. Use `ToolRouterSessionConfig['instant']` for the Instant policy the API returns.
234
235 - ec55dd1: Add `userId` to `tools.proxyExecute()`. It is sent as `user_id`, which projects with 2FA enabled check against the connected account and may require. Python's `tools.proxy()` takes the same value as `user_id`.
236
237 ### Patch Changes
238
239 - 67e80e3: Update the owned API client to `@composio/client@2.0.0-rc.9`.
240 - a7b4943: Send product identity, product version, language, and runtime version with API requests. Identify installed core and slim packages separately while preserving existing telemetry headers.
241 - 077ceb3: Fix tool schemas rejected by OpenAI and Anthropic when a parameter uses `anyOf`, `oneOf`, `allOf`, `$ref`, or similar keywords. The converted schema is a `ZodObject` again, so the LangChain, Vercel, LlamaIndex, and Claude Agent SDK providers send tool parameters with a top-level `type: "object"`. Patterns with escapes such as `\_` or `\:` no longer fail every call to the tool.
242 - e3999c4: Stop retrying session tool executions and proxied calls. `session.execute()`, `session.proxyExecute()`, provider-wrapped session tools, and the `execute` / `proxyExecute` helpers passed to custom tools no longer retry after a timeout, connection error, or 408/409/429/5xx response, so a retry can no longer repeat a side effect such as sending the same email twice. This matches `tools.execute()` and `tools.proxyExecute()`.
243 - 8c7e40a: `RemoteFile.save()` without a path no longer rejects ordinary file names. Names with characters Windows reserves, such as `report_2026-09-29T10:30:00.csv` or `What is this?.png`, are saved with those characters replaced by `_`. Names longer than 128 bytes are truncated with their extension kept, and reserved device names such as `NUL` get a `_` prefix. A name changed this way also gets a short digest of the original before its extension (`What is this_-9c68adf2da8b6e8d.png`). Default saves create a new file exclusively; if the destination exists, a copy number is added before its extension. Repeated default saves therefore return distinct paths and preserve earlier downloads. Names with a NUL byte or no usable basename are still refused.
244 - d9f6291: Tool schema `pattern` and `patternProperties` regexes now run on a linear-time engine (RE2, via `re2js`), so a hostile pattern such as `^(a+)+$` can no longer hang argument validation. A `pattern` that needs lookaround still runs on the native engine when a static check shows it cannot backtrack catastrophically, on input up to 1000 characters; otherwise it is left unenforced. A `patternProperties` key that needs lookaround or a backreference now fails conversion with an `InvalidPatternError` (reason `unsupported`). Patterns now match astral characters (emoji) as single characters, as JSON Schema's Unicode regex dialect does.
245 - 48d3559: Fix optional enum and const parameters under strict mode. A typed enum such as `{ "type": "string", "enum": ["asc", "desc"] }` was widened by adding `null` to its `type` only, so the enum still rejected `null` and the model could not omit the parameter. Such schemas are now wrapped whole in `anyOf` with a `null` branch, as are `type` beside `anyOf` and `$ref` with sibling keywords. `omitNullToolArguments` now keeps a `null` only when every keyword of the tool's schema accepts it, so a `null` that an `enum`, `const`, `$ref` sibling or `allOf` rejects is treated as an omitted argument. Schemas whose only obstacle to `null` is `type` or `anyOf` are emitted exactly as before. A tool whose schema holds a `$ref` into a property that wrapping moves is reported in `unsupported` and sent without strict mode. Null checks remember their answer per schema node and are bounded in depth and work, so a schema whose definitions fan out through shared references stays cheap.
246 - Updated dependencies [077ceb3]
247 - Updated dependencies [d9f6291]
248 - @composio/json-schema-to-zod@0.3.4
249
250 ## 0.22.0
251
252 ### Minor Changes
253
254 - e7580cf: Align session creation and updates with `instant.return_instant_charge`, expose `instantCharge` on execution results, and rename search account metadata to `instantAccount`. Use `instant_account` for explicit account selection.
255 - ae3c069: Expose the exact Instant charge as `instantCharge` in project usage summaries and as `metadata.instant_charge` in tool log metadata.
256 - e182bc8: Remove the deprecated OpenAI Assistants API helpers from `OpenAIProvider`: `handleAssistantMessage`, `waitAndHandleAssistantToolCalls`, and `waitAndHandleAssistantStreamToolCalls`. OpenAI shut down the Assistants API on August 26, 2026, so these helpers could no longer complete a run. Use `OpenAIResponsesProvider` from `@composio/openai` with the Responses API instead.
257
258 ### Patch Changes
259
260 - f478a3d: Keep `ConnectionRequest.status` in sync with `waitForConnection()`. The request now reports `ACTIVE` once the connection completes, or the terminal status (`FAILED`, `EXPIRED`, `REVOKED`) when it fails, matching `toJSON()` and the Python SDK.
261 - f478a3d: Restore telemetry for `ConnectionRequest.waitForConnection()`. `telemetry.instrument()` now also instruments async methods defined directly on plain objects, such as the ones returned by `createConnectionRequest()`.
262 - 485c09d: Refresh runtime dependencies and support Anthropic SDK 0.127 in the Anthropic provider.
263
264 ## 0.21.0
265
266 ### Minor Changes
267
268 - 461c6c3: Add experimental `premiumUsage` support when creating and updating Tool Router Sessions.
269 - 0833c1b: Expose `hostedAccount.allowedToolSlugs` on `session.search()` toolkit connection statuses for toolkits served by a Composio hosted account.
270 - de5e3f6: Add experimental support for saved Session configs. `composio.sessionConfigs.list()` and `composio.sessionConfigs.get()` read the project's saved `sc_…` configs, and `experimental.sessionConfigId` on `composio.sessions.create()` starts a session from one. Combining `sessionConfigId` with inline access fields now fails before any request: on create with `toolkits`, `tools`, `tags`, `experimental.customTools` or `experimental.customToolkits`, and on `session.update()` with `toolkits`, `tools` or `tags` (including `null`). TypeScript reports the mix at compile time and the SDK throws `ValidationError` at runtime; other invalid inputs keep throwing `ZodError`. `session.experimental.sourceSessionConfig` exposes the last config applied to the session after `create()`, `sessions.use()` and `update()`. A 409 while `update()` applies a config now says that the session or the config changed and to re-fetch and retry, instead of reporting a stale version.
271
272 ### Patch Changes
273
274 - 3721d04: Validate the server-supplied mount path before `RemoteFile.save()` turns it into a filename. A `mountRelativePath` of `""`, `"."`, `"sub/."`, `"foo/.."` or `".."` made the default save path equal the download directory or its parent, which surfaced as an unhandled `EISDIR` from `writeFileSync` after the directory had already been created. These now throw a `ValidationError` naming the offending mount path, before any `mkdir` or write. An explicit `path` passed by the caller is unaffected.
275
276 The new `safeBasename` helper applies the filename safety checks used by the Python SDK: both `/` and `\` count as separators, and NUL or control characters, Windows-reserved characters and device names, trailing spaces or dots, invalid Unicode and names over 128 UTF-8 bytes are rejected. `RemoteFile.filename` now also splits on both separators, so a Windows-style mount path reduces to the same display name on every platform.
277
278 Drive-relative paths such as `C:report.txt` reduce to `report.txt`. Whitespace stripping follows Python rules, preserving U+FEFF. Both SDKs also reject trailing dots exposed by stripping Unicode whitespace.
279
280 - 5ec0bdf: Validate the default destination in `RemoteFile.save()` before downloading content. Invalid mount paths now raise `ValidationError` without a network request, even when the download would fail.
281 - de5e3f6: Remove experimental annotations from the top-level Session config read methods. Applying a config and reading its source metadata remain under `experimental`.
282 - 5d07582: `session.update()` no longer sends `expected_config_version` by default. Since 0.20.0 it sent the session's last observed `configVersion` on every call, and the API rejects that field with a 400 (`Unrecognized key(s) in object: 'expected_config_version'`), so every default `update()` failed. The default is now last writer wins. Pass `expectedConfigVersion` (for example `session.configVersion`) to make an update conditional where the API supports it; `expectedConfigVersion: false` is the same as omitting it.
283
284 ## 0.20.0
285
286 ### Minor Changes
287
288 - a4a40a1: Fix project API key resolution so the SDK never sends a Composio user API key (`uak_...`, as stored by `composio login`) as the `x-api-key` project credential. When that stored key is the only candidate, the constructor now throws a redacted `ComposioAPIKeyKindError` that explains the mismatch instead of making requests that fail with 401. `apiKey: null` now disables project-key authentication entirely, including the `COMPOSIO_API_KEY` and `~/.composio/user_data.json` fallbacks, and is accepted when the instance holds another credential: `userApiKey` or `orgApiKey` (explicit or from their environment variables), or an `x-user-api-key` entry in `defaultHeaders`. Requests then carry only that credential. Malformed or unexpectedly shaped user config files produce a diagnostic that names the file without echoing its contents, and cloned instances keep the credential they were resolved with instead of re-reading the environment. Code that resolves the key with `apiKey: process.env.COMPOSIO_API_KEY ?? null` (or any expression that yields `null` when the variable is unset) is affected: it used to fall back to the environment and the CLI config file and now throws unless another credential is configured; omit `apiKey` (or pass `undefined`) to keep the fallbacks. With `apiKey: null`, an `x-api-key` entry in `defaultHeaders` is rejected as well, including on `createSession()` clones: pass the project key as `apiKey` instead of a raw header.
289 - 6c56b73: Add `userApiKey` and `orgApiKey` to `ComposioConfig`. Both are forwarded to the underlying API client, which sends each one only on operations whose security scheme requires it (organization, consumer, and user-scoped endpoints reached through `getClient()`), never alongside the project key. They fall back to `COMPOSIO_USER_API_KEY` and `COMPOSIO_ORG_API_KEY`. A project `apiKey` is still required unless it is set to `null`, which opts into user-only authentication.
290 - 6c56b73: Expose the rest of the owned client surface on the `Composio` class:
291
292 - `composio.webhooks.subscriptions` (`list`, `get`, `set`, `update`, `delete`, `rotateSecret`, `listEventTypes`) and `composio.webhooks.endpoints` (`list`, `get`, `create`, `replace`, `update`). `composio.triggers.setWebhookSubscription()` now delegates to the same upsert as `webhooks.subscriptions.set()`. Its behaviour for well-formed API responses is unchanged; malformed responses are now rejected with a `ValidationError` instead of being read leniently.
293 - `composio.logs.search()` and `composio.logs.get()` for tool-execution logs.
294 - `composio.connectedAccounts.revoke()`, which surfaces the API's 400/409 as `ComposioConnectedAccountRevocationNotSupportedError` / `ComposioConnectedAccountNotRevokableError`. `connectedAccounts.refresh()` is marked `@deprecated` (the endpoint is deprecated upstream).
295 - `composio.toolkits.getMany(slugs)` and `composio.toolkits.changelog()`.
296 - `session.listConfigHistory()` on sessions.
297 - `composio.experimental.usage.summary()` and `composio.experimental.usage.breakdown()` (experimental, shape may change).
298 - `composio.toolkits.recommendScopes(toolkitSlug, { tools, ... })` and `composio.toolkits.listGrantContexts(toolkitSlug)` for OAuth scope recommendations (the API marks both beta).
299 - `composio.connectedAccounts.completeAuth({ userId, sessionUri })`, which completes a deferred OAuth connection after your OAuth callback verifier has confirmed the user's identity.
300 - `composio.keyring.listTransferKeys()`, which returns the public JWKs of the organization's customer-managed keyring.
301 - `composio.experimental.customToolkits` (`upsert`, `sync`, `delete`) for project-owned custom toolkits (in pilot, shape may change).
302 - `CIMD_OAUTH` joins `AuthSchemeTypes`.
303 - `triggers.listActive()` returns `{}` for `state` and `triggerConfig` when the API sends `null`.
304 - `ToolkitAuthField` gains `userVisible` (from `user_visible`) and `ToolkitAuthConfigDetails` gains `requiredScopes` (from `required_scopes`), both omitted when the API does not send them.
305 - `@composio/client` moves from the old autogenerated client to the new handrolled client. The API removed `validate_credentials` from the connected-account refresh, so `connectedAccounts.refresh()` now ignores `validateCredentials` and logs a warning when it is set.
306 - `logger` and `logLevel` options on `new Composio({...})`. `logger` accepts any `{ error, warn, info, debug }` sink (`console`, pino, winston, ...) and receives the SDK's formatted, credential-redacted output; `logLevel` (`'silent' | 'error' | 'warn' | 'info' | 'debug'`) overrides `COMPOSIO_LOG_LEVEL`. The owned client's runtime deprecation warnings (response `Deprecation`/`Sunset` headers and deprecated request inputs) are now routed through that SDK logger instead of `console`. The client's per-request lifecycle logs are emitted only at `'debug'`. `tools.get`/`getRawComposioTools` send the API's `query` parameter in place of the deprecated `search` wire parameter; the SDK's public `search` option is unchanged.
307
308 - a4a40a1: Sessions now export their MCP config from the auth context the session request was actually made with: the project key as `x-api-key` when one is configured, otherwise the user API key (`userApiKey` or the `x-user-api-key` default header) as `x-user-api-key`, plus `x-org-id` / `x-project-id` when the instance is scoped. No other default header and no ambient `COMPOSIO_API_KEY` is ever copied. The headers are only attached when the MCP URL shares the origin of the configured API base URL (whatever its scheme). Any other destination (a different origin, an opaque origin such as a `data:` URL, or a URL that does not parse) never receives them: with `mcp: true`, `create()` / `use()` throw `ComposioMCPDestinationError`, which names both origins and never includes a key; without `mcp: true` the session is returned with `session.mcp.headers` empty and a warning naming both origins is logged, so native tools keep working. The SDK never connects to the MCP URL itself and does not follow redirects for it. Trigger subscriptions (Pusher channel auth) follow the same rule instead of falling back to the environment when the project key is disabled.
309
310 `ComposioConfig` gains `orgId` and `projectId`: the organization and consumer project nano IDs, sent together as the `x-org-id` / `x-project-id` headers on every request and with the session MCP config. They may also be supplied through `defaultHeaders`; a half-configured or disagreeing scope throws `ComposioScopeConfigError`. Without a scope, a user API key keeps addressing the API default project.
311
312 `session.update()` now sends the session's last observed `configVersion` as the `expected_config_version` precondition by default and never retries that request, so a concurrent change surfaces as `ComposioSessionConfigConflictError` (HTTP 409; re-fetch the session, then retry) while the local session object stays unchanged. Pass `expectedConfigVersion` to send another version or `expectedConfigVersion: false` to opt out (last writer wins). Every policy block (`toolkits`, `tools`, `tags`, `authConfigs`, `connectedAccounts`, `preload`, `manageConnections`, `multiAccount`, `search`, `execute`, `experimental`) accepts `null` to remove the stored override, `manageConnections.callbackUrl: null` removes only the stored callback URL, `multiAccount.maxAccountsPerToolkit: null` removes the stored maximum, and an empty toolkit allowlist (`toolkits: []`) is sent as-is so it denies every app toolkit.
313
314 - 6c56b73: Replace the old autogenerated `@composio/client` with the new handrolled client.
315
316 ## 0.19.0
317
318 ### Minor Changes
319
320 - efc2e52: Keep TypeScript realtime subscription errors inside the SDK logging boundary so an asynchronous Pusher subscription failure cannot escape as an uncaught exception. The full subscription error payload is now logged, the success message is logged only once Pusher confirms the subscription, and `PusherService.subscribe` / `Triggers.subscribe` accept an optional `onSubscriptionError` callback so applications can react to subscription failures programmatically.
321 - 4b5920b: Add `session.ensureConnected(toolkit, options?)`: it returns immediately when the session already resolves an active connection (or the toolkit is no-auth), and only when needed starts the authorization flow via `session.authorize()` and waits for the new connection to become active. This prevents `authorize()` from spawning duplicate pending connections for toolkits that are already connected. The `session.execute()` `account` option is now documented as accepted on every project — on single-account projects the identifier must match one of the session's active connections for the toolkit (matching the API behavior).
322 - c7843d8: Expose the server-side session configuration on sessions and return it from `update()`. `session.config` now carries the toolkit/tool allowlists, tags, auth configs, connected accounts, `manage_connections`, preload and sandbox settings the API returned for the session (from `create()`, `use()` and after every `update()`), and `session.update()` resolves to that updated config instead of `void`. Previously the only `config` reachable on a session object at runtime was the SDK's own `ComposioConfig`, and reading the live allowlist after `sessions.use(id)` required dropping to the raw client.
323
324 `config` is a required member of the `Session` interface, so objects you construct yourself to satisfy `Session` (test doubles, wrappers) now need a `config` value. Callers of SDK-created sessions are unaffected. The read side is the raw API shape (`toolkits.enabled`, `manage_connections`), while `update()` keeps taking the SDK's camelCase input.
325
326 ### Patch Changes
327
328 - 62e51e8: Refresh runtime dependencies and extend provider peer compatibility to the latest supported Anthropic and OpenAI Agents SDK releases.
329 - 7055914: Move published dependency ranges to their current upstream releases: zod 4.5, openai 7.10, typebox 1.3.27, @mastra/schema-compat 1.3.8, and @cloudflare/workers-types 5.20260905. `@composio/anthropic` also accepts `@anthropic-ai/sdk` 0.124 as a peer, the line it is now tested against.
330 - b4b9fc4: Guard schema `pattern` and `patternProperties` compilation. A pattern that does not compile or exceeds 1024 characters now fails conversion with an `InvalidPatternError` that names the offending property path instead of a raw `SyntaxError`. `@composio/core` surfaces that path in the `JsonSchemaToZodError` message. No backtracking heuristic is applied: a hostile `pattern` that backtracks catastrophically remains a known limitation.
331 - d4d3060: Fix `composio.mcp.update()` silently dropping parts of the requested configuration. Tool-only updates (`allowedTools` without `toolkits`) sent no tools field at all, updates with toolkits sent the deprecated create-time `custom_tools` alias that the update endpoint ignores instead of `allowed_tools`, and `manuallyManageConnections` was forwarded as-is instead of being inverted into `managed_auth_via_composio` (so `manuallyManageConnections: true` stored the opposite configuration). `create()` and `update()` now also keep the auth config of a `{ toolkit, authConfigId }` toolkit entry instead of discarding it, and `create()` sends `allowed_tools` rather than the deprecated `custom_tools` alias, matching the Python SDK.
332 - 9d0cb2c: Export `readResponseBodyWithLimit` and `MAX_URL_UPLOAD_SIZE_BYTES` so downstream packages can apply the SDK's 100 MiB cap when they download a file from a user-supplied URL. The CLI's tool-input file uploads now use it instead of buffering the whole response.
333 - ba85f4d: Apply the Fetch standard's redirect rules in `ssrfSafeFetch`, which following redirects manually meant `fetch` never applied: a `303` now retries as a bodiless `GET` instead of replaying an upload's method and body at a result URL, a `301`/`302` does the same for a `POST`, and `307`/`308` keep replaying both. Only `301`, `302`, `303`, `307` and `308` count as redirects to follow, so a `304` or `305` carrying a `Location` is returned to the caller rather than followed.
334 - ba85f4d: Close the IPv6 transition ranges the SSRF guard's address blocklist let through: 6to4 (`2002::/16`), Teredo and the rest of `2001::/23`, local-use NAT64 (`64:ff9b:1::/48`), `100::/64`, `2001:db8::/32` and site-local `fec0::/10` each carry or reach an arbitrary IPv4 address, so `2002:7f00:1::` was a public-looking literal for `127.0.0.1`. IPv4 multicast and the `192.88.99.0/24` 6to4 relay range are blocked too.
335 - 85996c4: Drop `Authorization`, `Proxy-Authorization`, and `Cookie` from the request headers when the SSRF guard follows a redirect to a different origin, as the Fetch standard does for automatic redirects. Same-origin redirects keep them.
336 - eccb80e: Add an opt-in strict mode to `ssrfSafeFetch` that rejects configured network
337 routes when the connection cannot be pinned to the validated address.
338 - 8bb1d29: Stop reporting every failed tool lookup as `ComposioToolNotFoundError`. `tools.getRawComposioToolBySlug`, and the `tools.get` / `tools.execute` paths that call it, now raise `ComposioToolNotFoundError` only when the API answers 404 or 400. Any other failure, such as an invalid API key (401), a server error, or a network fault, raises the new `ComposioToolFetchError` with the client error preserved as `cause`. `toolkits.get(slug)` now applies its 404/400 check against the Composio client's `APIError` instead of the OpenAI one, so an unknown toolkit raises `ComposioToolkitNotFoundError` as documented.
339 - e9fcbe3: Stop dropping `is_secret`, `legacy_template_name` and `auth_hint_url` from toolkit auth config details. `transformToolkitRetrieveResponse` passed the auth field groups through unchanged, so the snake_case keys never matched `ToolkitAuthFieldSchema` and zod stripped them during validation; `auth_hint_url` was never mapped at all. Fields returned by `toolkits.getConnectedAccountInitiationFields()` and `toolkits.getAuthConfigCreationFields()` now carry `isSecret`, which the API documents as the signal for whether a client should mask the input, plus `legacyTemplateName`; auth config details returned by `toolkits.get()` now carry `authHintUrl`. Each of these keys is present only when the API sends it, so spreading a field no longer overwrites a caller's own fallback with `undefined`. An auth config detail that omits a field group entirely now yields empty lists for that group, matching how the docs pipeline defaults them, instead of failing validation and leaving the other group unusable.
340 - 9a69683: Correct the JSDoc for `tools.getInput` and `tools.proxyExecute`. The `getInput` example now passes the required `text` field and reads the generated `arguments`. The `proxyExecute` example now uses the flat `endpoint` / `method` / `connectedAccountId` shape and explains that a relative endpoint is appended to the toolkit's base URL, which can already include a path. The `tools.execute` example shows where to find the version to pin.
341 - Updated dependencies [b4b9fc4]
342 - @composio/json-schema-to-zod@0.3.3
343
344 ## 0.18.1
345
346 ### Patch Changes
347
348 - 8a56383: Fix: automatic S3 file downloads are now capped at 100 MiB (configurable per call) to prevent memory exhaustion from oversized or streaming responses.
349 - 7420927: Fix custom toolkit child slug mapping: reject response tools that have local handles but no exact toolkit match instead of silently dropping them or binding another toolkit's handler, derive bare-slug ambiguity from local definitions, and only reuse a same-toolkit bare alias in customToolkits().
350 - 1d31c80: Redact credential-shaped values at the SDK log boundary.
351 - 95f9d32: Expose the runtime-conditional SSRF-safe fetch helper for protected URL upload consumers.
352 - 0d28bef: Map file-download transport failures to the SDK error contract and bound streamed response bodies.
353 - 52efb5b: Fix trigger subscriptions ignoring the `authConfigId` filter.
354 - Updated dependencies [ab289d6]
355 - @composio/json-schema-to-zod@0.3.2
356
357 ## 0.18.0
358
359 ### Minor Changes
360
361 - 04817cb: Fix strict-mode tool schemas for OpenAI structured outputs. Strict normalization now applies OpenAI's contract at every depth (nested objects, `anyOf` branches, array items, inlined `$ref`/`$defs`): every object lists all of its properties in `required` and sets `additionalProperties: false`, so tools with nested or optional parameters no longer produce schemas the API rejects with a 400. Optional parameters are no longer dropped: they stay available and are widened to accept `null`, the emulation of optional fields OpenAI documents, and the strict providers drop a `null` argument the tool's own schema does not accept before executing the tool. Tools whose schema strict mode cannot express (objects with arbitrary keys, `allOf`, `prefixItems`, unresolved `$ref`s) are sent without strict mode with a warning naming the tool and path, instead of being narrowed. `@composio/core` exports the new `toStrictJsonSchema()` and `omitNullToolArguments()` utilities; `removeNonRequiredProperties` is unchanged for other callers. The Python `OpenAIResponsesProvider` gains a matching opt-in `strict=True` constructor flag that also emits `strict: true` on the wrapped tool.
362
363 ### Patch Changes
364
365 - 449f4e1: Block automatic uploads when a sensitive directory or file name is hidden by symlink resolution.
366 - 9545806: Bound the best-effort telemetry requests with a timeout so a stalled telemetry endpoint cannot leave an SDK call pending indefinitely.
367 - db7b576: Declare Node.js 22.22.3 as the minimum supported runtime for every published TypeScript package so package managers surface incompatible runtimes before users encounter ESM loading failures.
368 - fe66cbe: Omit empty-string file-uploadable arguments from tool execution requests instead of forwarding them to the backend, which rejected them with "Input should be a valid dictionary or instance of FileUploadable". This now also applies when `dangerouslyAllowAutoUploadDownloadFiles` is off, and with it on an empty value is no longer attempted as an upload.
369 - c0f1609: Fix three ComposioError subclasses (ComposioToolVersionRequiredError, JsonSchemaToZodError, JsonSchemaRefResolutionError) that omitted their `this.name` assignment and therefore reported `name` as 'ComposioError' instead of their own class name, mis-grouping distinct error types in error telemetry.
370 - d544006: Close a DNS-rebinding window in the SSRF guard: the address validated by `assertSafeFetchTarget` is now the address `ssrfSafeFetch` connects to, so a hostname is no longer resolved a second time between the check and the connection. Each redirect hop is re-validated and re-pinned. The request still carries the original hostname in `Host` and TLS SNI, so certificate verification is unchanged. Hops whose effective dispatcher is a configured route — a caller-supplied `dispatcher`, a global `ProxyAgent`/`EnvHttpProxyAgent`, or `NODE_USE_ENV_PROXY` env-proxy mode — keep the pre-flight check only, mirroring the Python guard's documented proxy residual.
371 - Updated dependencies [db7b576]
372 - @composio/json-schema-to-zod@0.3.1
373
374 ## 0.17.0
375
376 ### Minor Changes
377
378 - 760f8d0: Allow OpenAI and Anthropic provider tool-call helpers to execute through a supplied Tool Router session. Session meta-tools now retain their session context while provider argument normalization remains intact; existing user-ID calls continue to use direct execution. Anthropic helper failures now preserve their error text in `{ error }` results without changing successful payloads. Custom provider subclasses overriding `executeToolCall` or `handleToolCalls` may require updates because these methods now accept session targets.
379
380 ### Patch Changes
381
382 - 6ba9179: Validate the URLs that come from API responses before fetching them. Tool-execution downloads (`s3Url`), S3 presigned uploads (`new_presigned_url`), Tool Router session file downloads (`RemoteFile.buffer()` / `blob()` / `text()` / `save()`) and session file uploads (`upload_url`) now go through the same SSRF guard that already covered user-supplied URLs, so a response naming a private, loopback, or link-local address is refused instead of fetched. Redirect hops are re-validated. Edge runtimes keep their current behavior: session file transfers are not blocked there, since a Worker cannot resolve DNS to check and its `fetch` does not originate inside the caller's network.
383
384 ## 0.16.0
385
386 ### Minor Changes
387
388 - 5e57815: Keep free-form object roots, `patternProperties`, and `additionalProperties` when parsing a tool schema.
389
390 `ToolSchema.parse` used to reject a bare `{ "type": "object" }` root, drop root `patternProperties` as an unknown key, and reject a root `additionalProperties` written as a schema instead of a boolean. Free-form roots now parse successfully, and both constraints survive parsing exactly as written. The public `ToolSchema` type now makes `properties` optional to reflect those valid property-less object schemas.
391
392 This matters downstream. Every provider reads `inputParameters` after parsing, so a tool that declares dynamic keys had those rules stripped before the model ever saw them.
393
394 An omitted `additionalProperties` still stays omitted. The parser does not invent a value, because each converter decides its own default.
395
396 **What no longer works**
397
398 Parsing no longer fails on a schema-valued root `additionalProperties`.
399
400 ```ts
401 const tool = ToolSchema.parse({
402 slug: 'MY_TOOL',
403 inputParameters: {
404 type: 'object',
405 properties: { name: { type: 'string' } },
406 additionalProperties: { type: 'number' },
407 },
408 // ...
409 });
410
411 // before: parsing failed, because only a boolean was accepted
412 // now: tool.inputParameters.additionalProperties is { type: 'number' }
413 ```
414
415 **What to do instead**
416
417 Nothing, if you only ever passed boolean values. That case is unchanged.
418
419 If your code assumed `inputParameters` never carries `patternProperties`, or that `additionalProperties` is always a boolean, widen that assumption. Both keywords can now appear, and `additionalProperties` can be a boolean or a schema object.
420
421 ### Patch Changes
422
423 - a2f6b96: Add `type: "object"` to nested JSON Schema nodes that carry `properties` without an explicit type, so tool schemas work with strict OpenAPI 3.0 consumers like Google Gemini.
424 - c625edc: Reuse fetched tool schemas when provider-wrapped tools execute to avoid a redundant retrieval request.
425 - Updated dependencies [5e57815]
426 - @composio/json-schema-to-zod@0.3.0
427
428 ## 0.15.0
429
430 ### Minor Changes
431
432 - 1503786: Replace the loose JSON Schema property type with a recursive, type-safe definition.
433
434 `JSONSchemaProperty` (re-exported from `@composio/core` and reachable through
435 `Tool.input_parameters` / `Tool.output_parameters`) is now a concrete recursive
436 interface instead of effectively `any`. Runtime behavior is unchanged, but
437 consumer code that indexed into it without narrowing (for example
438 `schema.properties.foo.type` or `schema.default.someField`) may see new type
439 errors: `properties` entries are now possibly `undefined` and `default` /
440 `enum` values are `unknown`. Narrow with optional chaining or explicit type
441 guards when upgrading.
442
443 ### Patch Changes
444
445 - 2ac6ad3: Bound the background npm version check so registry outages cannot leave the request pending indefinitely.
446 - 5105612: Match sensitive upload path segments using the target filesystem's actual case sensitivity so case-insensitive mounts cannot bypass the denylist without over-blocking distinct paths on case-sensitive mounts.
447 - 051c8c5: Redact secrets that appear inside JSON payloads in telemetry error text. The key/value rule required the separator to follow the key name directly, so a serialized body such as `{"api_key": "..."}` — the shape error messages usually carry — was sent unredacted.
448 - e5c9ada: Refresh the OpenAI runtime dependency to version 7.
449 - ecd0861: Release unread response bodies on the paths the SDK knowingly abandons: cancel every intermediate redirect body in `ssrfSafeFetch`, and the response body before throwing on `!response.ok` in both URL-upload call sites, instead of leaving them for the garbage collector to reclaim.
450 - 2a6a051: Remove the unused internal `isNewerVersion` helper.
451 - Updated dependencies [1503786]
452 - @composio/json-schema-to-zod@0.2.2
453
454 ## 0.14.1
455
456 ### Patch Changes
457
458 - 577a3d4: Replace the backtracking leading/trailing-slash-trim regexes in the Cloudflare Workers/Edge platform path helpers with index-walk loops, closing a polynomial-time regular expression denial-of-service (CodeQL js/polynomial-redos) on long runs of slash characters. Output is unchanged for every input.
459 - 503b50a: Refresh runtime dependencies across the TypeScript SDK packages.
460 - 2f63fe5: Guard Tool Router session URL uploads against SSRF, revalidate redirect targets, and enforce a streamed 100 MiB response limit across TypeScript URL upload paths.
461
462 ## 0.14.0
463
464 ### Minor Changes
465
466 - fc17c37: Export the sensitive-file-upload denylist guard from the package root so downstream packages share one implementation: `assertSafeFileUploadPath`, `isBlockedSensitiveFileUploadPath`, and `BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS`. The guard now routes its filesystem access through the internal `#platform` abstraction (adding a `realpathSync` platform method), so it is edge/workerd-safe and the module carries no static `node:*` imports. Behavior on Node/Bun is unchanged.
467 - 20a4711: `triggers.create` now resolves the connection from `user_id` on the backend instead of client-side.
468
469 - The SDK no longer makes an extra `connectedAccounts.list()` call. When `connectedAccountId` is omitted, the backend resolves the first active connection for the user and the trigger's toolkit (ordered by most recently created), matching tool execution.
470 - **Behavior change:** `create` no longer throws `ComposioConnectedAccountNotFoundError` for a missing or invalid connection. That case now surfaces as the backend error from the upsert call. `ComposioTriggerTypeNotFoundError` (invalid slug) and `ValidationError` (including empty `userId`) are still thrown client-side.
471 - **Requires a backend that resolves the trigger connection from `user_id` on upsert** ([ComposioHQ/platform#10932](https://github.com/ComposioHQ/platform/pull/10932)). Self-hosted deployments must be on a version that includes it.
472
473 ### Patch Changes
474
475 - 7125576: Normalize duplicate JSON Schema `required` entries before provider tool schemas are emitted.
476 - 58bc93b: Refresh dependency ranges and lockfiles across the workspace.
477 - 4c3a321: Disable client retries on `tools.execute` and `tools.proxyExecute`. These are non-idempotent writes, so a silent retry after a read timeout could duplicate the side effect (e.g. send the same email more than once). Both now route through a sibling client built with `maxRetries: 0`; reads keep the default retry behaviour.
478 - b07fcad: Add an eve provider: `EveProvider` makes `session.tools()` return eve-native `defineTool`s, `defineComposioTools` is the replay-safe `step.started` resolver, and `(ctx, next)` hooks can rewrite, deny, or transform Tool Router meta-tool calls.
479
480 Preserve successful local-tool results when the remote half of a mixed `COMPOSIO_MULTI_EXECUTE_TOOL` batch fails at the transport layer, so callers can see which side effects already completed before retrying.
481
482 - fa933a6: Fix the `homepage` links in these packages' `package.json`. They pointed at `github.com/ComposioHQ/composio/tree/main/...`, but the default branch is `next` and no `main` branch exists, so every link 404'd on npm and in editor tooltips. They now point at `tree/next/...`.
483 - 2ef40ce: Treat local file paths that begin with `http` as paths instead of URLs, ensuring that upload allowlist and sensitive-file denylist checks still run.
484 - e78ed31: Execute every parallel tool call in `OpenAIProvider.handleToolCalls`. It previously only ran the first tool call in each assistant message, so parallel tool calls (on by default) dropped the rest and left their `tool_call_id`s unanswered, failing the next request.
485
486 The calls are run sequentially, in the order the model returned them — here "parallel" means the model issued several calls in one turn, not that they execute concurrently — so each `tool_call_id` is answered exactly once and the tool messages come back in a deterministic order.
487
488 Only the first choice is handled. Tool results are fed back into a single assistant turn, so with `n > 1` iterating over every choice would run each tool call once per choice and orphan the `tool_call_id`s from the alternative completions.
489
490 - a0f37a7: Close two secret/SSRF exposure surfaces in the TypeScript SDK:
491
492 - **SSRF guard on URL file inputs.** `composio.files.upload(url)` and automatic file upload during tool execution previously did a raw `fetch()` on user-supplied URLs with no guard. They now resolve the host and refuse private, loopback, link-local (incl. the `169.254.169.254` cloud-metadata endpoint), CGNAT, and reserved addresses, reject non-`http(s)` schemes, and follow redirects manually so each hop is re-validated (blocking a public URL that redirects into internal space). Blocked requests throw `ComposioBlockedInternalUrlError`. Node-only; behaviour for public URLs is unchanged.
493 - **Telemetry redaction.** Error telemetry previously shipped `error.message` / `error.stack` verbatim. They are now passed through a redactor that strips URL query strings, `Authorization` bearer/basic credentials, and secret-like `key=value` pairs (API keys, tokens, client secrets, passwords) before transport.
494
495 - 820abb9: Resolve toolkit version pins case-insensitively. Version maps are keyed by normalized (lowercase) slugs, but `getToolkitVersion` previously looked them up with the raw slug, so a pin configured under a different casing (e.g. `{ GitHub: '20250101_00' }` or `COMPOSIO_TOOLKIT_VERSION_GITHUB`) could silently fall back to `'latest'`. Normalization is now centralized in a single `normalizeToolkitSlug` helper used symmetrically on both the write (map-building) and read (lookup) paths, so the two sides can no longer drift. This mirrors the equivalent fix in the Python SDK.
496 - Updated dependencies [58bc93b]
497 - Updated dependencies [fa933a6]
498 - @composio/json-schema-to-zod@0.2.1
499
500 ## 0.13.1
501
502 ### Patch Changes
503
504 - 605a726: Add Tool Router session deletion APIs.
505
506 ## 0.13.0
507
508 ### Minor Changes
509
510 - d17a268: Add the first-class `composio.sessions.create()` API while keeping `composio.create()` as an alias, expose the experimental shared-connection ACL patch helper as `connectedAccounts.updateAcl()` while keeping `experimental.updateAcl()` as an alias, and include SDK docs/source in the published package.
511
512 **MCP is now opt-in.** Sessions return native tools by default; the hosted MCP endpoint is only surfaced on the type when you create the session with `{ mcp: true }`. The default `create()` / `use()` now return `SessionWithoutMcp` (the runtime object is unchanged — `session.mcp` still exists at runtime — but it is no longer in the type).
513
514 Migration: read `session.mcp` only after creating with `{ mcp: true }`.
515
516 - d17a268: Surface the resolved workbench config on Tool Router sessions.
517
518 - `Session.workbench` is now populated from the API response (on create/retrieve/attach/update). It exposes the resolved workbench config, e.g. `session.workbench?.enable` (defaults to `true` server-side).
519
520 This lets callers create a session with the remote workbench disabled (`workbench: { enable: false }`) and detect that state — the foundation for running code in a sandbox you own via the experimental `@composio/experimental/workbench` helpers.
521
522 ### Patch Changes
523
524 - d17a268: Prefer `sandbox` for session code-execution configuration while continuing to accept the existing `workbench` alias.
525 - d17a268: Add `triggers.parse()` to parse and optionally verify incoming webhook requests.
526 - d17a268: Add `triggers.setWebhookSubscription()` to create or update the project webhook subscription from the TypeScript SDK.
527
528 ## 0.12.0
529
530 ### Minor Changes
531
532 - a0bef5d: Bump `@composio/client` to `0.1.0-alpha.74`.
533 - dfd7a08: Add per-request cancellation to public SDK methods via a new `ComposioRequestOptions` (`{ signal?: AbortSignal }`) trailing argument, plus a typed `ComposioRequestCancelledError` for detecting caller-initiated aborts.
534
535 Without this, a slow `tools.get` or `tools.execute` had no way to be cancelled — a 100s search would block the calling agent indefinitely. The new shape:
536
537 ```typescript
538 try {
539 const tools = await composio.tools.get(
540 'user_1',
541 { search: 'send email', limit: 50 },
542 { signal: AbortSignal.timeout(5_000) }
543 );
544 } catch (err) {
545 if (err instanceof ComposioRequestCancelledError) {
546 return;
547 }
548 throw err;
549 }
550 ```
551
552 The signal is forwarded to the underlying `@composio/client` fetch. Any abort error (`APIUserAbortError`, `AbortError`, or `DOMException(name='AbortError')`) coming back is normalized to `ComposioRequestCancelledError` so callers can `instanceof`-detect cancellation without unwrapping nested causes. Catch-and-wrap paths in `tools.execute` / `tools.getRawComposioToolBySlug` / `toolkits.get` re-throw the cancellation error rather than remapping it to `ComposioToolExecutionError` / `ComposioToolNotFoundError` / `ComposioToolkitFetchError`.
553
554 Wired through on:
555 - **Tools**: `get`, `getRawComposioTools`, `getRawComposioToolBySlug`, `getRawToolRouterSessionTools`, `execute`, `executeSessionTool`, `getToolsEnum`, `getInput`, `proxyExecute`
556 - **Toolkits**: `get`, `listCategories`
557 - **AuthConfigs**: `list`, `create`, `get`, `update`, `delete`, `updateStatus`, `enable`, `disable`
558 - **ConnectedAccounts**: `list`, `get`, `delete`, `refresh`, `updateStatus`, `enable`, `disable`, `update`
559 - **Triggers**: `listActive`, `create`, `update`, `delete`, `enable`, `disable`, `listTypes`, `getType`, `listEnum`
560 - **MCP**: `create`, `list`, `get`, `delete`, `update`, `generate`
561 - **ToolRouter** (`composio.create` / `composio.use`, `composio.toolRouter.create` / `.use`) — long-running session-creation paths
562 - **ToolRouterSession**: `authorize`, `toolkits`, `search`, `execute`, `proxyExecute`, `update`
563
564 ### Custom-tool cooperative cancellation
565
566 Native tool execution is cancelled by the SDK (the underlying `fetch` is aborted). Custom tools are different — the SDK can't preempt user-supplied JavaScript. Two affordances are added so callers get sensible behavior anyway:
567
568 1. **Pre-execute signal check**: if `signal.aborted` is true before the user's `execute` runs, the SDK throws `ComposioRequestCancelledError` and never invokes user code.
569 2. **Cooperative signal forwarding**: the same `AbortSignal` is exposed via `SessionContext.signal` for Tool Router custom tools. Long-running implementations can wire `ctx.signal` into their own `fetch` (or any abortable IO) to abort mid-execution; the resulting `AbortError` is normalized to `ComposioRequestCancelledError` by the SDK.
570
571 ```typescript
572 import { experimental_createTool } from '@composio/core';
573
574 const longRunningFetch = experimental_createTool('LONG_RUNNING_FETCH', {
575 name: 'Long-running fetch',
576 description: 'Fetches a URL with cooperative cancellation',
577 inputParams: z.object({ url: z.string() }),
578 execute: async (input, ctx) => {
579 // Pass ctx.signal into fetch so a session.execute(...) abort cancels
580 // the in-flight HTTP request mid-flight.
581 const resp = await fetch(input.url, { signal: ctx.signal });
582 return { result: await resp.json() };
583 },
584 });
585 ```
586
587 - 025a657: Drop CommonJS entrypoints and publish the TypeScript SDK packages as ESM-only packages. This is a breaking change within the existing 0.x release line: consumers must use Node.js 22.22.3 or newer. CommonJS callers can only rely on Node's native `require(esm)` interop, and the SDK no longer ships custom CommonJS compatibility machinery or `.cjs` artifacts.
588 - 4b76dbf: Remove the deprecated `uuid` field from the auth config retrieve/list response type.
589
590 The platform has removed the deprecated V1/V2 UUID-mirror field from V3 API responses (it was a mirror of the canonical nanoid `id`). The SDK no longer reads or re-exposes `uuid` on `AuthConfigRetrieveResponse` (and therefore on the items of `AuthConfigListResponse`).
591
592 This is technically a breaking change to the SDK response type: consumers should use `id` instead of `uuid`. The `expectedInputFields` field is unaffected — it remains a top-level field on the API response.
593
594 ### Patch Changes
595
596 - 552859a: Expose `search` and `showDisabled` filters on `authConfigs.list()`.
597 - 23f9053: Replace `chalk` with `picocolors` for colored error and log output. The two render identically, but `picocolors` is a fraction of the size (~0.8 kB gzipped vs chalk's much larger footprint), shrinking the bundled package.
598 - 507318d: Add a provider-agnostic JSON-schema property-key sanitizer: `sanitizeSchemaPropertyKeys(schema, policy)`, `restoreOriginalKeys(value, mapping)`, `mappingHasRenames(mapping)`, and the `KeyMapping` / `KeySanitizationPolicy` types.
599
600 Some providers constrain the characters and length of tool `input_schema` property keys and reject the whole request on a single violation. This utility rewrites offending keys to conforming aliases (recursing through `properties`, array `items`/`prefixItems`, the composition keywords `allOf`/`anyOf`/`oneOf` and `not`/`if`/`then`/`else`, plus `additionalProperties`/`patternProperties`/`$defs`/`contains`) and records a schema-shaped reverse mapping so the original parameter names can be restored before execution. The _constraint_ is injected as a `KeySanitizationPolicy`, so the traversal, collision handling, prototype safety, and depth cap stay provider-agnostic. The `@composio/anthropic` provider now consumes it.
601
602 - 6a4cb54: Preserve root `$defs` / `definitions` blocks on tool parameter schemas and dereference them in the Node file modifier, so auto file upload/download detection works when `file_uploadable` or `file_downloadable` is hidden behind an internal `$ref`.
603 - cbbad15: Improve Zod compatibility at the SDK schema boundary. Custom tools now convert both `zod/v3` and Zod v4 schemas to JSON Schema correctly instead of degrading Zod v4 object schemas to empty schemas. `@composio/core` now exposes `jsonSchemaToZodShape` via `@composio/core/utils/json-schema`, and the Claude Agent SDK provider uses that core subpath instead of converting to a full Zod object and casting `.shape` out of it.
604 - Updated dependencies [025a657]
605 - @composio/json-schema-to-zod@0.2.0
606
607 ## 0.11.0
608
609 ### Minor Changes
610
611 - a94715f: Forward `userId` when creating trigger instances so trigger 2FA flows can verify connected account ownership.
612 - 44e5458: Remove the legacy `composio.tools.createCustomTool(...)` in-memory registry API. Use Tool Router custom tools via `experimental_createTool`, `experimental_createToolkit`, and `composio.create(..., { experimental: { customTools, customToolkits } })` instead.
613
614 ### Patch Changes
615
616 - 22a9171: Defer telemetry batch and error sends so instrumentation does not wait for telemetry network requests before returning SDK results or rethrowing SDK errors.
617 - 93b67e8: Fix automatic file upload/download substitution for file schemas that accept either a single file or a list of files.
618
619 The file modifier now selects composed-schema branches by runtime value shape, so `anyOf(file, array<file>)` uploads or downloads each file when the tool receives a list while preserving existing single-file behavior.
620
621 - b69cef1: Tolerate dangling `$ref` pointers in tool schemas the Composio API ships without a matching `$defs` entry. Some toolkits (e.g. `GMAIL_FETCH_EMAILS`) emit `outputParameters` with `"$ref": "#/$defs/FetchEmailsResponse"` while never declaring a top-level `$defs` block. After the strict resolver shipped with the previous Mastra fix, this caused `composio.tools.get(...)` to throw `JsonSchemaRefResolutionError` upfront, making every Gmail / Slack / Google-Calendar tool unusable through `MastraProvider`. The SDK now degrades the unresolvable branch to a permissive object schema and surfaces a single observability warning per `(toolSlug, ref)` pair instead of crashing.
622 - `dereferenceJsonSchema` accepts a new optional second argument `{ onUnresolved?: 'throw' | 'sentinel'; onReplace?: (ref, reason) => void }`. Default behavior is unchanged (`'throw'`) — first-party / custom-tool schemas with a typo'd `$ref` still surface as a hard error. Pass `'sentinel'` to replace unresolved branches with the cycle-break sentinel (`{ type: 'object', additionalProperties: true }`) that the resolver already uses for `$ref` cycles. The replaced sentinel carries a default `description` hint so LLMs consuming the wrapped tool's schema get an in-band signal that the branch is opaque; a caller-provided `description` sibling overrides the default (Draft 2020-12 sibling-keyword merge). Safety caps (`MAX_REF_CHAIN_DEPTH`, `MAX_NODE_DEPTH`) keep throwing in both modes. New `UnresolvedRefStrategy`, `UnresolvedRefReason`, and `DereferenceJsonSchemaOptions` type exports.
623 - `MastraProvider.wrapTool` opts both `inputParameters` and `outputParameters` into `'sentinel'` mode and emits one `logger.warn` per `(toolSlug, ref)` pair via the provider-scoped dedup `Set`. User-controlled segments in the warning (`tool.slug`, `toolkit.slug`, `ref`) are `JSON.stringify`d to neutralize embedded newlines / ANSI escapes / control bytes that could otherwise forge log lines (CWE-117). A matching one-shot telemetry event (`composio.mastra.wrapTool.danglingRef`) fires next to the warn so the Composio team has aggregate visibility into which toolkits are affected; the event respects `COMPOSIO_DISABLE_TELEMETRY=true`.
624 - The `telemetry` instance from `@composio/core` is now publicly re-exported alongside `logger`, so providers can emit aggregate signals without reaching into the package's internals.
625 - Resolvable `$defs` / `definitions` continue to be inlined exactly as before — no regression in the type-info preservation contract introduced by the previous Mastra fix.
626
627 - 1ba66ca: Fix `tools.execute` (and `tools.get` / `tools.list`) failing with a `ZodError` for every tool from an MCP-backed toolkit (e.g. `granola_mcp`, `apify_mcp`, `tavily_mcp`).
628
629 MCP toolkits don't declare an output schema, and the Composio API serializes that as `output_parameters: {}`. The SDK's `ParametersSchema` required `{ type: 'object', properties: {...} }`, so `transformToolCases` rejected the response and `getRawComposioToolBySlug` — called by `execute` and the list path — threw.
630
631 The SDK now normalizes empty (`{}`), `null`, and missing `input_parameters` / `output_parameters` payloads to `undefined` before validation. `outputParameters` was already declared `.optional()` in the public `Tool` type, so this preserves the contract: "undefined means no declared schema." Tools that _do_ declare a schema continue to be validated strictly.
632
633 No public API change; no toolkit allow-list.
634
635 - ce4b213: fix(providers): normalize string tool-call arguments across all providers
636
637 Models occasionally emit tool-call arguments as a JSON string instead of an
638 object (most visibly with `COMPOSIO_MULTI_EXECUTE_TOOL` on the Vercel AI SDK),
639 which broke downstream validation with errors like
640 `tool_use.input: Input should be a valid dictionary`.
641
642 `@composio/core` now exposes a single `normalizeToolArguments` helper, and every
643 provider routes model-supplied arguments through it. Object payloads pass
644 through unchanged, JSON strings are parsed, empty/`null` payloads become `{}`,
645 and anything that cannot resolve to an object throws a typed
646 `ComposioInvalidToolArgumentsError` instead of a raw `SyntaxError` or a silently
647 forwarded malformed string. This replaces the inconsistent per-provider guards
648 that previously existed only in vercel, cloudflare and openai-agents.
649
650 ## 0.10.0
651
652 ### Minor Changes
653
654 - 42ebff3: feat(connected-accounts): namespace SHARED-connection surface under `experimental`
655
656 Aligns the TypeScript SDK with the experimental wire shape used by Shared Connections. The flat `accountType` / `aclConfigForShared` options on `connectedAccounts.link()` and `session.authorize()` have moved under a single `experimental` block. ACL updates remain on the domain-specific `connectedAccounts.updateAcl()` mount, with `experimental.updateAcl()` kept as an experimental compatibility alias.
657
658 The `experimental` namespace is the signal that the shape may change in future releases. Pinning a SHARED connection in a session config (`connectedAccounts: { gmail: [...] }`) and direct execute by `connectedAccountId` are unchanged — only the connection-create / patch / authorize surfaces are namespaced.
659
660 Also surfaces the `accountType` filter on `connectedAccounts.list()` so SHARED connections can be listed without dropping to the raw client. The wire keeps this as a flat query param, so the SDK keeps it flat too.
661
662 `@composio/client` bumped from `0.1.0-alpha.71` → `0.1.0-alpha.72` so the generated typed client carries the `Experimental` namespaces for `link.create`, `toolRouter.session.link`, and `connectedAccounts.patch`.
663
664 Caller migration:
665
666 ```typescript
667 // before
668 await composio.connectedAccounts.link('user_id', 'auth_config_id', {
669 accountType: 'SHARED',
670 aclConfigForShared: { allowAllUsers: true },
671 });
672 await composio.connectedAccounts.updateAcl('ca_abc', { allowAllUsers: true });
673 await session.authorize('github', {
674 accountType: 'SHARED',
675 aclConfigForShared: { allowAllUsers: true },
676 });
677
678 // after
679 await composio.connectedAccounts.link('user_id', 'auth_config_id', {
680 experimental: {
681 accountType: 'SHARED',
682 aclConfigForShared: { allowAllUsers: true },
683 },
684 });
685 await composio.connectedAccounts.updateAcl('ca_abc', { allowAllUsers: true });
686 await session.authorize('github', {
687 experimental: {
688 accountType: 'SHARED',
689 aclConfigForShared: { allowAllUsers: true },
690 },
691 });
692
693 // new — list SHARED connections
694 const shared = await composio.connectedAccounts.list({
695 accountType: 'SHARED',
696 userIds: ['user_creator'],
697 });
698 ```
699
700 ## 0.9.1
701
702 ### Patch Changes
703
704 - 84a3a07: Add `accountType` and per-user ACL support for SHARED connected accounts.
705 - **`accountType` on create**: `composio.connectedAccounts.link(userId, authConfigId, { accountType: 'SHARED' })` creates a SHARED connection. Default remains `PRIVATE`. A SHARED connection can be used by other `userId`s, but only when the connection is explicitly pinned in a tool-router session's config and only when the requesting `userId` passes the connection's ACL.
706 - **`accountType` on retrieve**: `get()` and `list()` responses now include `accountType` (`'PRIVATE' | 'SHARED'`).
707 - **`aclConfigForShared` on create + retrieve**: per-user ACL block — `{ allowAllUsers, allowedUserIds, notAllowedUserIds }`. On responses the field is `undefined` when the caller isn't authorised to see the ACL, so callers can distinguish _"I can't see the ACL"_ from _"ACL is the default deny-by-default state"_.
708 - **`updateAcl()` method** (new): `composio.connectedAccounts.updateAcl(nanoid, { allowAllUsers, allowedUserIds, notAllowedUserIds })` writes the ACL via `PATCH`. PATCH semantics — omit a field to leave it unchanged; pass an empty array to clear an allow/deny list. At least one field required. Calling on a PRIVATE connection raises `ComposioAclOnlyForSharedError` (400).
709 - **`ToolRouterSession.authorize()` options gain `accountType` + `aclConfigForShared`**, so a SHARED connection with an ACL can be created in one call from inside a tool-router session.
710
711 ACL resolution rule (deny wins):
712 1. requesting `userId` ∈ `notAllowedUserIds` → DENY
713 2. `allowAllUsers === true` → ALLOW
714 3. requesting `userId` ∈ `allowedUserIds` → ALLOW
715 4. otherwise → DENY (deny-by-default)
716
717 Limits: each ACL list accepts up to 1000 entries; each `userId` is 1..256 characters. The SDK enforces these caps at the input boundary.
718
719 New error classes:
720 - `ComposioSharedAccessDeniedError` (403) — surfaces from direct `connectedAccountId` execution paths when the requesting user fails the ACL.
721 - `ComposioAclOnlyForSharedError` (400) — ACL fields sent on a PRIVATE connection.
722 - `ComposioSharedConnectionNotAccessibleError` (400) — tool-router session create / PATCH with a pinned SHARED connection the session user cannot use.
723
724 No breaking changes. Existing `link()` callers without the new options get a `PRIVATE` connection exactly as today; existing `get()` / `list()` callers see new optional fields.
725
726 The Python SDK mirror ships in a separate PR.
727
728 - c358ffa: Fix false-positive `initiate()` deprecation warning for custom auth configs (SEC-339 follow-up).
729
730 `composio.connectedAccounts.initiate()` previously emitted a one-time `console.warn` on every redirectable-OAuth response, regardless of whether the auth config was Composio-managed (subject to the 2026-07-03 cutover) or custom (unaffected). The wording was conditional ("If this auth config is Composio-managed…") so callers using their own OAuth apps could ignore it, but the warning still printed and caused noise in logs.
731
732 Apollo already emits the SEC-339 `Deprecation` / `Sunset` / `Link rel="deprecation"` headers (RFC 9745 / RFC 8594) **only** on the retiring branch — managed + redirectable OAuth. The SDK now reads the `Deprecation` header from the response (via `APIPromise.withResponse()`) and gates the warning on its presence. Custom auth configs and non-OAuth schemes get a clean response from the server and now stay silent in the SDK as well.
733 - **Behavior change:** No warning is emitted for `initiate()` calls against custom OAuth auth configs or non-OAuth schemes (API key, bearer, basic). Managed-OAuth callers continue to get exactly one warning per process, now with revised wording that points at the response's `Sunset` header for the precise cutover date.
734 - **No public API change:** `initiate()` returns the same `ConnectionRequest` shape and respects the same `allowMultiple` guard. `ComposioLegacyConnectedAccountsEndpointRetiredError` continues to surface from the 400 retired-path response.
735 - **Test scaffolding:** new mock helper `mockApiPromiseWithHeaders()` in `connectedAccounts.test.ts` wraps a value as an `APIPromise`-shaped thenable so the new tests can simulate apollo's header behavior. Pre-existing initiate tests using `mockResolvedValueOnce` continue to pass via the SDK's defensive fallback when `withResponse` is absent on the mock.
736
737 Python SDK gets the matching change in the same release train.
738
739 ## 0.9.0
740
741 ### Minor Changes
742
743 - 9f14971: Add migration tooling for the [link auth migration](https://docs.composio.dev/docs/changelog/2026/04/24): callers using `composio.connectedAccounts.initiate()` for Composio-managed auth configs on redirectable OAuth schemes (OAuth1, OAuth2, DCR_OAUTH) now get a typed error and a one-time deprecation warning ahead of the **2026-07-03** all-orgs cutover.
744 - **Added:** `ComposioLegacyConnectedAccountsEndpointRetiredError`, exported from `@composio/core`. Thrown by `initiate()` when the underlying `POST /api/v3/connected_accounts` returns a 400 indicating the retiring path. Carries the migration message and a `possibleFixes` block pointing at `link()` and the migration guide.
745 - **Added:** one-time-per-process `console.warn` from `initiate()` when the response indicates a redirectable OAuth scheme. Wording is conditional ("If this auth config is Composio-managed…") so callers using custom OAuth apps or non-OAuth schemes can ignore it without ambiguity.
746 - **JSDoc:** `initiate()` now flags the retirement explicitly and points at `link()` for the affected combination. Custom auth configs and non-OAuth schemes (API key, bearer, basic) are unaffected.
747
748 No behavior change for any caller outside the Composio-managed-OAuth combination — `initiate()` continues to call the legacy endpoint, return the same `ConnectionRequest` shape, and respect the `allowMultiple` guard.
749
750 - 81f8027: Add `session.update()` method for partially updating session configuration after creation. Accepts the same config shape as `create()` and mutates the session in-place. Available in both TypeScript and Python SDKs.
751 - 711a703: Add expanded ToolRouter session controls for agent workflows. `composio.create()`
752 now creates a fresh session on each call for better isolation and observability,
753 while `composio.use()` can resume an existing session for multi-turn
754 conversations. Sessions can preload frequently used tools, expose custom tools
755 directly from `session.tools()`, use a direct-tools preset for agents that know
756 their tool set upfront, and update session config mid-session with
757 `session.update()`.
758 - 07c9bab: `connectedAccounts` now accepts both `string` and `string[]` per toolkit.
759
760 A single string is automatically coerced to an array to match the v3.1 API wire format. Existing callers passing `{ gmail: "ca_xxx" }` continue to work without changes. Only one account per toolkit is allowed when multi-account mode is disabled.
761
762 - 3ece424: Add custom tools support to `composio.use()`.
763 - **`composio.use(id, { customTools, customToolkits })`**: Reuse an existing session and optionally bind SDK-local custom tools for search and execution.
764 - **Inline custom tools payload**: `use()` now correctly passes `inlineCustomToolsPayload` and `preloadedCustomToolSlugs` to the session, enabling custom tool execution and preloading on rehydrated sessions.
765 - **`CustomToolsMap.tools`**: The map now caches the raw `CustomTool[]` array for future inline re-injection on v3.1 search/execute requests.
766
767 ### Patch Changes
768
769 - c9b6525: Fix `connectedAccounts` TypeScript type so a single `string` per toolkit is actually accepted by the public API.
770
771 Previously the schema's `.transform()` made `ToolRouterCreateSessionConfig['connectedAccounts']` resolve to `Record<string, string[]>` (the post-transform output), so TypeScript users still got `Type 'string' is not assignable to type 'string[]'` even though the runtime accepted strings. Coercion now happens inside `ToolRouter.create`, mirroring the Python implementation, and the public type is `Record<string, string | string[]>`.
772
773 - cc673b6: Resolve internal JSON Schema `$ref` pointers (`#/$defs/...` and `#/definitions/...`) before handing tool parameters to `@mastra/schema-compat`. Composio tools whose schemas use `$defs`/`definitions` — legal under Draft 7 and 2020-12 — no longer trigger the AJV `can't resolve reference …` error, and the resolved type information from `$defs` survives the JSON-Schema → Zod → JSON-Schema round-trip instead of being silently degraded to a permissive `anyOf`.
774 - New `dereferenceJsonSchema` helper exported from `@composio/core` performs the inline expansion. It deep-clones the input, walks every applicator reflectively (so future JSON Schema keywords are covered), shallow-merges sibling keywords next to `$ref` per Draft 2020-12 semantics, breaks cycles with `{ type: 'object', additionalProperties: true }` (matching the upstream guidance in [mastra-ai/mastra#15341](https://github.com/mastra-ai/mastra/issues/15341)), and strips `$defs`/`definitions` once everything reachable is inlined. External (`http://`/`https://`) `$ref` pointers are left untouched.
775 - `@composio/mastra` calls the helper inside `wrapTool` for both `inputParameters` and `outputParameters`.
776 - `@mastra/schema-compat` dependency floor raised to `^1.2.9` so users automatically receive [PR #15400](https://github.com/mastra-ai/mastra/pull/15400)'s recursive-`$ref` handling.
777
778 - bccd32b: Expose and document the Tool Router direct-tools preset via `SessionPreset.DIRECT_TOOLS`, with Python parity through `SESSION_PRESET_DIRECT_TOOLS`. Direct-tools examples now use the constants and keep the agent prompt generic while still asserting that only direct tools are exposed.
779 - bccd32b: Document and tighten Tool Router preload behavior for app tools, `preload.tools = "all"`, and SDK custom tools. Custom tool and toolkit preload hints now have clearer user-facing comments, direct custom tool descriptions now only state that search is not needed beforehand, examples assert the normalized `LOCAL_*` tool slugs exposed by `session.tools()`, and `composio.use(..., customTools/customToolkits)` reuses the same custom preload preparation path as session creation.
780
781 ## 0.8.1
782
783 ### Patch Changes
784
785 - 6b986cd: Bring `connectedAccounts.link()` to parity with `connectedAccounts.initiate()` by adding the `allowMultiple` option and the matching active-connection guard. With customers being migrated off `connected_accounts/create` (initiate) onto `connected_accounts/link` ([SEC-339](https://github.com/ComposioHQ/composio/pull/3274)), the guard moves with them.
786 - **Added:** `link(userId, authConfigId, { allowMultiple })`. When `allowMultiple` is `false` (default) and the user already has an `ACTIVE` connection on the auth config, `link()` throws `ComposioMultipleConnectedAccountsError` — same behavior as `initiate()`. Pair with `alias` and a session-level `multiAccount` config to disambiguate at execution time.
787 - **Behavior change:** `link()` now performs a `connectedAccounts.list({ userIds, authConfigIds, statuses: ['ACTIVE'] })` pre-flight before calling `client.link.create`. Callers that intentionally create multiple connections per auth config must pass `allowMultiple: true`.
788
789 Python parity: same option (`allow_multiple: bool = False`) and same guard added to `composio.connected_accounts.link()`.
790
791 - 1c3276b: Add `workbench.sandboxSize` to the Tool Router session config so callers can pick the workbench sandbox compute tier.
792 - **Added:** `workbench.sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge'` on `ToolRouterCreateSessionConfig`. Forwarded to the API as snake_case `workbench.sandbox_size`. Optional; the server defaults it to `'standard'` (1 vCPU / 1 GB) when omitted, so existing callers keep current behavior.
793 - **Added:** `SandboxSize` literal union and `SandboxSizeSchema` zod enum, exported from `@composio/core` so callers can pass tier values without stringly-typing them.
794 - **Bumped:** `@composio/client` peer to `0.1.0-alpha.67` to pick up the matching `sandbox_size` field on the Tool Router session params.
795
796 Tiers: `standard` (1 vCPU / 1 GB), `medium` (2 / 2), `large` (4 / 4), `xlarge` (8 / 8). Sandboxes are not billed today; usage-based pricing is planned. See the changelog entry at [`docs/content/changelog/04-28-26-sdk-sandbox-size.mdx`](https://github.com/ComposioHQ/composio/blob/master/docs/content/changelog/04-28-26-sdk-sandbox-size.mdx) for usage and the full tier table.
797
798 Provider packages that depend on `@composio/core` receive automatic patch bumps in the same release train via the changesets `updateInternalDependencies: "patch"` setting — no public-API change in those packages.
799
800 ## 0.8.0
801
802 ### Minor Changes
803
804 - ebc9778: Make automatic file upload/download opt-in and add scoped allowlist controls.
805 - **Removed:** the legacy `autoUploadDownloadFiles` constructor option. Code that sets it must migrate to the new opt-in flag.
806 - **Added:** `dangerouslyAllowAutoUploadDownloadFiles` (default `false`). When `true`, the SDK collapses `file_uploadable` schemas to `{ type: 'string', format: 'path' }` for the model and stages local paths/URLs at execute time.
807 - **Added:** `fileUploadDirs?: string[] | false` — fail-closed allowlist for local upload paths. `undefined` defaults to `[<home>/.composio/temp]`; `false` rejects all local paths; an explicit `string[]` replaces the default.
808 - **Added:** `fileDownloadDir?: string` — directory used to stage S3 downloads on `file_downloadable` results.
809 - **Added:** `beforeFileUpload` modifier now receives `source: 'path' | 'url' | 'file'` so hooks can branch on the original input type.
810 - **Added:** when auto-upload is **off** but a tool with `file_uploadable` inputs is executed, the SDK emits a one-shot warning per tool slug pointing at `composio.files.upload()` for manual staging.
811
812 See the changelog entry at [`docs/content/changelog/04-24-26-legacy-auto-upload-config-removal.mdx`](https://github.com/ComposioHQ/composio/blob/master/docs/content/changelog/04-24-26-legacy-auto-upload-config-removal.mdx) for migration steps.
813
814 Provider packages that depend on `@composio/core` are bumped to `0.8.0` alongside core in this release train so the version line stays aligned across the monorepo, even though they have no public-API changes of their own.
815
816 ## 0.6.11
817
818 ### Patch Changes
819
820 - 27ed0c9: **Security:** Harden automatic file uploads by default-blocking local paths under common credential locations (e.g. `.ssh`, `.aws`) and credential-like filenames (e.g. `.env`, default SSH private key names). URLs and `File` objects are unchanged. Opt out with `sensitiveFileUploadProtection: false` only if needed; extend the denylist with `fileUploadPathDenySegments`.
821
822 Adds an optional `beforeFileUpload` hook (e.g. on `composio.tools.get`) to rewrite paths, return `false` to abort, or throw. New errors: `ComposioSensitiveFilePathBlockedError`, `ComposioFileUploadAbortedError`.
823
824 ## 0.6.10
825
826 ### Patch Changes
827
828 - 670ecc9: Add missing `alias` option to `ToolRouterAuthorizeFn` type. The `ToolRouterSession.authorize()` implementation already accepted `alias`, but the exported type didn't include it, causing type errors when passing `{ alias: 'work-gmail' }` to `session.authorize()`.
829
830 ## 0.6.9
831
832 ### Patch Changes
833
834 - 5b5723a: release
835
836 ## 0.6.8
837
838 ### Patch Changes
839
840 - 2b19ae9: Fix `customAuthParams.baseURL` not being sent to the API during tool execution. The SDK property `baseURL` is now correctly mapped to the API's expected `base_url` field.
841
842 ## 0.6.7
843
844 ### Patch Changes
845
846 - 8dc5568: Add `workbench.enable` option to session config for disabling the workbench entirely. When set to `false`, code execution tools (COMPOSIO_REMOTE_WORKBENCH, COMPOSIO_REMOTE_BASH_TOOL) are excluded from the session. Defaults to `true`.
847
848 ## 0.6.6
849
850 ### Patch Changes
851
852 - e1f6516: Add custom tool support in Toolrouter
853
854 ## 0.6.5
855
856 ### Patch Changes
857
858 - 476d451: Add support for files
859 - Add session file support
860
861 ## 0.6.5-alpha.0
862
863 ### Patch Changes
864
865 - Add support for files
866
867 ## 0.6.4
868
869 ### Patch Changes
870
871 - e3f1f6c: Remove telemetry payload
872
873 ## 0.6.3
874
875 ### Patch Changes
876
877 - 087385d: Remove important tag auto apply when limit is set
878
879 ## 0.6.2
880
881 ### Patch Changes
882
883 - Updated dependencies [eec8fd9]
884 - @composio/json-schema-to-zod@0.1.20
885
886 ## 0.6.1
887
888 ### Patch Changes
889
890 - e746383: Fix issues with file upload corruption
891
892 ## 0.6.0
893
894 ### Minor Changes
895
896 - **BREAKING**: Webhook verification now async with new signature
897 - `composio.triggers.verifyWebhook()` now requires `await`
898 - New required parameters: `id` (webhook-id header) and `timestamp` (webhook-timestamp header)
899 - Uses Web Crypto API for Cloudflare Workers compatibility
900 - Supports v1, v2, and v3 webhook formats
901 - **BREAKING**: Mastra provider updated to v1 API
902 - Requires Mastra v1 and Node.js v22.13.0+
903 - New initialization pattern with Mastra instance
904 - E2E tests for Zod v3 and v4 compatibility
905
906 - Platform-specific optimizations
907 - Separate file tool modifiers for Node.js and Cloudflare Workers
908 - Platform-specific config defaults (autoUploadDownloadFiles)
909 - Removed node:buffer usage, replaced with Uint8Array
910 - Removed node:crypto from triggers for edge runtime support
911
912 - Bug fixes
913 - Fixed tool fetching with specific version constraints
914 - Improved type safety across the SDK
915
916 ## 0.5.5
917
918 ### Patch Changes
919
920 - b132aad: Update client dependencies and introduce experimentatl tool router features
921
922 ## 0.5.4
923
924 ### Patch Changes
925
926 - b3f5875: Fix multi connected account flag to check only active accounts
927
928 ## 0.5.3
929
930 ### Patch Changes
931
932 - 498505d: Fix file upload and download in tools with anyOf schemas
933
934 ## 0.5.2
935
936 ### Patch Changes
937
938 - 277f02b: Fix bundling issues with external providers
939
940 ## 0.5.1
941
942 ### Patch Changes
943
944 - 3055048: Update client dependencies and auth config update params to be optional
945
946 ## 0.5.0
947
948 ### Minor Changes
949
950 - ded64be: Add Cloudflare Workers compatibility for `@composio/core`, tested end-to-end.
951
952 ## 0.4.0
953
954 ### Minor Changes
955
956 - c7e1217: Add support for dedicated tools for tool router
957
958 ## 0.3.4
959
960 ### Patch Changes
961
962 - 019f54f: Fix method binding for top level tool router methods
963
964 ## 0.3.3
965
966 ### Patch Changes
967
968 - a76b002: Add support for enable/disable tags and search toolkits in tool router
969
970 ## 0.3.2
971
972 ### Patch Changes
973
974 - 69cfede: Update client version and add openWorldHintSupport in toolrouter tag filters. Removes isLocal param in toolkit fetching
975
976 ## 0.3.1
977
978 ### Patch Changes
979
980 - 73db5f5: Fix callback url not working in toolrouter's session.authorize()
981
982 ## 0.3.0
983
984 ### Minor Changes
985
986 - 07551cd: Add support for native tool execution in tool router
987 - 9e002c5: Minor fixes
988 - f0e67c4: Update API client and tool router types
989 - 31521bd: Update typedocs and examples for toolkit versions
990 - 9e002c5: Alpha release of tool router
991
992 ## 0.2.7-alpha.4
993
994 ### Patch Changes
995
996 - 07551cd: Add support for native tool execution in tool router
997
998 ## 0.2.7-alpha.3
999
1000 ### Patch Changes
1001
1002 - f0e67c4: Update API client and tool router types
1003
1004 ## 0.2.7-alpha.2
1005
1006 ### Patch Changes
1007
1008 - 31521bd: Update typedocs and examples for toolkit versions
1009
1010 ## 0.2.7-alpha.1
1011
1012 ### Patch Changes
1013
1014 - Minor fixes
1015
1016 ## 0.2.7-alpha.0
1017
1018 ### Patch Changes
1019
1020 - Alpha release of tool router
1021
1022 ## 0.2.6
1023
1024 ### Patch Changes
1025
1026 - b5cc23f: Fix dangerously skip version check in non agentic providers, Throw error instead of process.exit when api key doesn't exist, bump zod-to-json-schema to 3.25.0, which supports "zod/3"
1027 - Updated dependencies [b5cc23f]
1028 - @composio/json-schema-to-zod@0.1.19
1029
1030 ## 0.2.5
1031
1032 ### Patch Changes
1033
1034 - e2762f2: Fix non-agentic providers to work without specifying versions
1035
1036 ## 0.2.4
1037
1038 ### Patch Changes
1039
1040 - 97c4138: Update composio client version and add support for toolkit version in fetching trigger types
1041
1042 ## 0.2.3
1043
1044 ### Patch Changes
1045
1046 - f88ab99: Fix: SDK telemetry methods and request headers
1047
1048 ## 0.2.2
1049
1050 ### Patch Changes
1051
1052 - cfc2c50: Update zod version to 4
1053 - Updated dependencies [cfc2c50]
1054 - @composio/json-schema-to-zod@0.1.18
1055
1056 ## 0.2.1
1057
1058 ### Patch Changes
1059
1060 - 6135896: Add toolkit versions support and deprecation flags to TypeScript SDK
1061
1062 This PR adds support for toolkit versions in the TypeScript SDK and introduces new fields for tracking tool deprecation status and no-auth capabilities.
1063
1064 ### Core Features
1065 - **Toolkit Versions Support**:
1066 - Added `toolkit_versions` parameter to the `Triggers` class, defaulting to `"latest"`
1067 - Made `Triggers` class generic to accept provider configuration
1068 - Pass `toolkit_versions` when listing trigger types
1069
1070 ### New Fields
1071 - **Tool Types**:
1072 - Added `isDeprecated` field to track deprecated tools
1073 - Added `isNoAuth` field to identify tools that support no-auth mode
1074 - **Trigger Types**:
1075 - Added `version` field to track trigger versions
1076 - **Toolkit Metadata**:
1077 - Added `availableVersions` array to track all available versions
1078
1079 ### Code Changes
1080 - Updated `Composio` class to pass config to `Triggers` constructor
1081 - Updated `Tools.get()` to include new `isDeprecated` and `isNoAuth` fields
1082 - Updated transformers for toolkits and triggers to handle new fields
1083 - Added TypeScript types for all new fields
1084
1085 ### Tests
1086 - Updated trigger tests to account for `toolkit_versions` and `cursor` parameters
1087 - Fixed generic type usage in `Triggers` test declarations
1088 - All 376 tests passing ✅
1089
1090 ### Dependencies
1091 - Updated `@composio/client` to version `0.1.0-alpha.38`
1092 - Updated `pnpm-lock.yaml` with dependency resolution changes
1093
1094 ## Testing
1095
1096 ```bash
1097 pnpm --filter @composio/core test
1098 ```
1099
1100 All tests passing (376/376) ✅
1101
1102 ## Breaking Changes
1103
1104 None - All changes are backwards compatible with default values
1105
1106 ## Related Issues
1107
1108 Fixes toolkit version handling and deprecation flag tracking in TypeScript SDK
1109
1110 ## 0.2.0
1111
1112 ### Minor Changes
1113
1114 - 157bf7b: ### Added
1115 - **Version validation for manual tool execution**: Tools now require explicit toolkit version specification when executing manually to prevent unexpected behavior from `latest` version changes
1116 - **New `dangerously_skip_version_check` parameter** (Python) / `dangerouslySkipVersionCheck` (TypeScript): Optional flag to bypass version validation (use with caution)
1117 - **`ToolVersionRequiredError` exception** (Python): Raised when attempting to execute tools with `latest` version without skip flag, includes helpful error messages with 4 possible fixes
1118 - **`ComposioToolVersionRequiredError` error** (TypeScript): Parallel implementation for TypeScript SDK with detailed error context and resolution suggestions
1119 - **Comprehensive test coverage**: Added 19 new test methods in Python covering all tool execution scenarios including version resolution, error handling, modifiers, and environment variables
1120
1121 ### Changed
1122 - **Tool execution behavior**: Manual execution via `tools.execute()` now validates toolkit versions before API calls
1123 - **Agentic provider flows**: Automatically set `dangerously_skip_version_check=True` internally to maintain backward compatibility for framework integrations
1124 - **Instance-level version resolution**: Both `execute()` and `_execute_tool()` methods now consistently resolve versions from instance-level `toolkit_versions` configuration
1125 - **Modifier support**: Added `dangerously_skip_version_check` to modifier parameter types for complete flow coverage
1126 - **Test version format**: Updated all test files to use production date-based version format (`20251201_XX`) instead of semantic versioning
1127
1128 ### Fixed
1129 - **Consistent version handling**: Removed `toolkit_versions` parameter from `_execute_tool()` in favor of instance-level configuration, ensuring consistent version resolution across the SDK
1130 - **Code formatting**: Applied ruff formatting to all modified Python files
1131 - **Array parsing to ZodSchema**: Fixes in json-schema-to-zod to parse array without properties and with properties
1132
1133 ### Migration Guide
1134
1135 When manually executing tools, you must now specify toolkit versions:
1136
1137 **Option 1: Pass explicit version parameter**
1138
1139 ```python
1140 tools.execute("GITHUB_CREATE_ISSUE",
1141 arguments={...},
1142 version="20251201_01"
1143 )
1144 ```
1145
1146 **Option 2: Configure at SDK initialization**
1147
1148 ```python
1149 tools = Tools(client, provider,
1150 toolkit_versions={"github": "20251201_01"}
1151 )
1152 ```
1153
1154 **Option 3: Use environment variables**
1155
1156 ```bash
1157 export COMPOSIO_TOOLKIT_VERSION_GITHUB=20251201_01
1158 ```
1159
1160 **Option 4: Skip validation (not recommended)**
1161
1162 ```python
1163 tools.execute("GITHUB_CREATE_ISSUE",
1164 arguments={...},
1165 dangerously_skip_version_check=True
1166 )
1167 ```
1168
1169 ### Developer Notes
1170 - Agentic framework integrations (LangChain, CrewAI, etc.) are not affected as they automatically use the skip flag
1171 - The `latest` version can still be used with the skip flag, but specific versions are strongly recommended
1172 - Error messages include all available resolution options for better developer experience
1173
1174 ### Patch Changes
1175
1176 - Updated dependencies [157bf7b]
1177 - @composio/json-schema-to-zod@0.1.17
1178
1179 ## 0.1.55
1180
1181 ### Patch Changes
1182
1183 - 8741165: Add zod 4 support via zod/v3 and fix zod schema parsing
1184 - Updated dependencies [8741165]
1185 - @composio/json-schema-to-zod@0.1.16
1186
1187 ## 0.1.54
1188
1189 ### Patch Changes
1190
1191 - e5b9db3: Fix exports for experimental tool router
1192
1193 ## 0.1.53
1194
1195 ### Patch Changes
1196
1197 - 9a1b0e9: - Adds the new experiemntal ToolRouter, Deprecates the existing MCP experience and adds the new MCP components.
1198 - The old MCP components can be accessed via `deprecated.mcp` until the next release, where it will get removed.
1199 - Fixes `toolkits.list` and `toolkits.get` methods to add `description` to connection fields
1200
1201 ## 0.1.52
1202
1203 ### Patch Changes
1204
1205 - 7077cee: Add tool versioning support
1206
1207 ## 0.1.51
1208
1209 ### Patch Changes
1210
1211 - b9b005a: Add support for composio connect links
1212
1213 ## 0.1.50
1214
1215 ### Patch Changes
1216
1217 - Updated dependencies [51033d8]
1218 - @composio/json-schema-to-zod@0.1.15
1219
1220 ## 0.1.49
1221
1222 ### Patch Changes
1223
1224 - 5027e18: Fix openai responses schema parsing
1225 - Updated dependencies [5027e18]
1226 - @composio/json-schema-to-zod@0.1.14
1227
1228 ## 0.1.48
1229
1230 ### Patch Changes
1231
1232 - bb32cc2: Bump openai responses and deprecate openai assistant
1233
1234 ## 0.1.47
1235
1236 ### Patch Changes
1237
1238 - 05ce9c6: Fix make access token and token type optional in oauth scheme
1239
1240 ## 0.1.46
1241
1242 ### Patch Changes
1243
1244 - ee12d25: Fix long filenames while uploading files from URL
1245 - 9458513: Feat: Add flags to disable version check
1246
1247 ## 0.1.45
1248
1249 ### Patch Changes
1250
1251 - Updated dependencies
1252 - @composio/json-schema-to-zod@0.1.13
1253
1254 ## 0.1.44
1255
1256 ### Patch Changes
1257
1258 - b4b8b94: Fix telemetry flags and disable when passed
1259
1260 ## 0.1.43
1261
1262 ### Patch Changes
1263
1264 - eb7691e: Add strict mode to vercel provider
1265
1266 ## 0.1.42
1267
1268 ### Patch Changes
1269
1270 - Updated dependencies
1271 - @composio/json-schema-to-zod@0.1.12
1272
1273 ## 0.1.41
1274
1275 ### Patch Changes
1276
1277 - 025600f: Bump composio client version to 0.1.0-alpha.31
1278
1279 ## 0.1.40
1280
1281 ### Patch Changes
1282
1283 - 1664c34: Fix auth config creation/updation methods to accept tool access configs
1284
1285 ## 0.1.39
1286
1287 ### Patch Changes
1288
1289 - Fix jsonSchema to zod parsing which used to eliminate min/max and examples proeperties
1290 - Updated dependencies
1291 - @composio/json-schema-to-zod@0.1.11
1292
1293 ## 0.1.38
1294
1295 ### Patch Changes
1296
1297 - 6c980ad: Add generics for CLI trigger type generation
1298
1299 ## 0.1.37
1300
1301 ### Patch Changes
1302
1303 - 09c4a26: Fix issues with tools.execute requiring userId for no auth apps
1304
1305 ## 0.1.36
1306
1307 ### Patch Changes
1308
1309 - 7276d1e: Fix issues with json schema to zod parsing causing nested objects to be marked as required
1310 - c223e54: Fix file upload handlers
1311 - 7276d1e: Fix issues with objects with default values being marked as required
1312 - 9a10986: Fix: Relax strict type/schema validations on API responses
1313 - 06612f5: Downgrade chalk to v4 to allow CJS as well
1314 - cb1b401: Update composio api client to latest version
1315 - da57771: dont't validate if authConfigIds is provided
1316 - 91c3647: Update deps
1317 - b001330: Fix package bumps
1318 - 77e96e4: Fix JSON Schema to Zod Parsing
1319 - ea79c18: Bump packages
1320 - cb1b401: Bump packages for authconfig fixes
1321 - ea79c18: Update packages
1322 - a79dfac: Relax connected account schema parsing
1323 - Create stable release
1324 - ea79c18: Fix: Gracefully handle connected account responses for missing fields
1325 - 91c3647: Fix proxy execute params and bump langchain packages
1326 - ea79c18: Bump packages
1327 - Updated dependencies [7276d1e]
1328 - Updated dependencies [7276d1e]
1329 - Updated dependencies [06612f5]
1330 - Updated dependencies [77e96e4]
1331 - Updated dependencies [cb1b401]
1332 - Updated dependencies
1333 - @composio/json-schema-to-zod@0.1.10
1334
1335 ## 0.1.36-next.13
1336
1337 ### Patch Changes
1338
1339 - 77e96e4: Fix JSON Schema to Zod Parsing
1340 - Updated dependencies [77e96e4]
1341 - @composio/json-schema-to-zod@0.1.10-next.5
1342
1343 ## 0.1.36-next.12
1344
1345 ### Patch Changes
1346
1347 - Update deps
1348
1349 ## 0.1.36-next.11
1350
1351 ### Patch Changes
1352
1353 - Fix proxy execute params and bump langchain packages
1354
1355 ## 0.1.36-next.10
1356
1357 ### Patch Changes
1358
1359 - Fix: Relax strict type/schema validations on API responses
1360
1361 ## 0.1.36-next.9
1362
1363 ### Patch Changes
1364
1365 - 9fa49ec: Update composio api client to latest version
1366 - Bump packages for authconfig fixes
1367 - Updated dependencies
1368 - @composio/json-schema-to-zod@0.1.10-next.4
1369
1370 ## 0.1.36-next.8
1371
1372 ### Patch Changes
1373
1374 - Fix package bumps
1375
1376 ## 0.1.36-next.7
1377
1378 ### Patch Changes
1379
1380 - da57771: dont't validate if authConfigIds is provided
1381
1382 ## 0.1.36-next.6
1383
1384 ### Patch Changes
1385
1386 - 06612f5: Downgrade chalk to v4 to allow CJS as well
1387 - Relax connected account schema parsing
1388 - Updated dependencies [06612f5]
1389 - @composio/json-schema-to-zod@0.1.10-next.3
1390
1391 ## 0.1.36-next.5
1392
1393 ### Patch Changes
1394
1395 - dd630fe: Bump packages
1396 - Bump packages
1397
1398 ## 0.1.36-next.4
1399
1400 ### Patch Changes
1401
1402 - Update packages
1403
1404 ## 0.1.36-next.3
1405
1406 ### Patch Changes
1407
1408 - Fix: Gracefully handle connected account responses for missing fields
1409
1410 ## 0.1.36-next.2
1411
1412 ### Patch Changes
1413
1414 - Fix issues with objects with default values being marked as required
1415 - Updated dependencies
1416 - @composio/json-schema-to-zod@0.1.10-next.1
1417
1418 ## 0.1.36-next.1
1419
1420 ### Patch Changes
1421
1422 - Fix issues with json schema to zod parsing causing nested objects to be marked as required
1423 - Updated dependencies
1424 - @composio/json-schema-to-zod@0.1.10-next.0
1425
1426 ## 0.1.36-next.0
1427
1428 ### Patch Changes
1429
1430 - Fix file upload handlers
1431
1432 ## 0.1.35
1433
1434 ### Patch Changes
1435
1436 - git status
1437
1438 ## 0.1.34
1439
1440 ### Patch Changes
1441
1442 - Add exports for connection request
1443
1444 ## 0.1.33
1445
1446 ### Patch Changes
1447
1448 - Fix types and exports
1449
1450 ## 0.1.32
1451
1452 ### Patch Changes
1453
1454 - Add support for File type in uploading files
1455
1456 ## 0.1.31
1457
1458 ### Patch Changes
1459
1460 - e660385: Fix file upload / download
1461
1462 ## 0.1.30
1463
1464 ### Patch Changes
1465
1466 - Improved support for file handling
1467
1468 ## 0.1.29
1469
1470 ### Patch Changes
1471
1472 - Add file upload / download modifiers
1473
1474 ## 0.1.28
1475
1476 ### Patch Changes
1477
1478 - Add MCP support for providers
1479
1480 ## 0.1.27
1481
1482 ### Patch Changes
1483
1484 - Remove cusrsor and important flags from tools.get
1485
1486 ## 0.1.26
1487
1488 ### Patch Changes
1489
1490 - Fix function signatures for toolkits auth fields
1491
1492 ## 0.1.25
1493
1494 ### Patch Changes
1495
1496 - Add MCP server to composio SDk
1497
1498 ## 0.1.24
1499
1500 ### Patch Changes
1501
1502 - Fix auth schemes for creating connected accounts
1503
1504 ## 0.1.23
1505
1506 ### Patch Changes
1507
1508 - Improvements in DX in triggers and bug fixes in tools
1509
1510 ## 0.1.22
1511
1512 ### Patch Changes
1513
1514 - Adds support for connected accounts allowMultiple flag, and other improvements
1515
1516 ## 0.1.21
1517
1518 ### Patch Changes
1519
1520 - Add host name support in SDK
1521 - Updated dependencies
1522 - @composio/json-schema-to-zod@0.1.9
1523
1524 ## 0.1.20
1525
1526 ### Patch Changes
1527
1528 - 1ab34ef: Fix json schema support in tools
1529 - Updated dependencies [1ab34ef]
1530 - @composio/json-schema-to-zod@0.1.8
1531
1532 ## 0.1.19
1533
1534 ### Patch Changes
1535
1536 - c8e89d5: Fix telemetry transport
1537 - Updated dependencies [c8e89d5]
1538 - @composio/json-schema-to-zod@0.1.7
1539
1540 ## 0.1.18
1541
1542 ### Patch Changes
1543
1544 - 37a1f01: Feat better connected account creation flow
1545 - Updated dependencies [37a1f01]
1546 - @composio/json-schema-to-zod@0.1.6
1547
1548 ## 0.1.17
1549
1550 ### Patch Changes
1551
1552 - df31cc2: Fix json schema parsing
1553 - Updated dependencies [df31cc2]
1554 - @composio/json-schema-to-zod@0.1.5
1555
1556 ## 0.1.16
1557
1558 ### Patch Changes
1559
1560 - f943ba4: Export all the types from the core SDK
1561 - Updated dependencies [f943ba4]
1562 - @composio/json-schema-to-zod@0.1.2
1563
1564 ## 0.1.15
1565
1566 ### Patch Changes
1567
1568 - 208e320: Update json schema transformations issues related to strict mode
1569 - Updated dependencies [208e320]
1570 - @composio/json-schema-to-zod@0.1.2
1571
1572 ## 0.1.14
1573
1574 ### Patch Changes
1575
1576 - 4ddfafc: Add json schema to zod schema
1577 - Updated dependencies [4ddfafc]
1578 - @composio/json-schema-to-zod@0.1.1
1579
1580 ## 0.1.13
1581
1582 ### Patch Changes
1583
1584 - 040b5a4: Ability to create sessions for transferring request ids
1585
1586 ## 0.1.12
1587
1588 ### Patch Changes
1589
1590 - c1443db: Improved error handling and telemetry
1591 - b121e73: Update packages to stable version
1592 - f144202: Update tsdocs across all the functions
1593 - ba8d991: Fix initiate connection flows and api issues
1594 - ca59bcd: Update documentations and fix API discrepencies
1595 - e51680c: Fix versioning with changesets
1596 - 0b15376: Add custom toolkit examples
1597 - de3f522: Stable version with test coverage and other stuff
1598 - a2f9537: Update tools.get to accept discriminated unions
1599 - 83a0d15: Test github ci publish
1600 - eeec413: Rename modifiers, add docs and other miscellanious improvements
1601
1602 ## 0.1.12-alpha.16
1603
1604 ### Patch Changes
1605
1606 - 0b15376: Add custom toolkit examples
1607
1608 ## 0.1.12-alpha.15
1609
1610 ### Patch Changes
1611
1612 - f144202: Update tsdocs across all the functions
1613
1614 ## 0.1.12-alpha.14
1615
1616 ### Patch Changes
1617
1618 - 83a0d15: Test github ci publish
1619
1620 ## 0.1.12-alpha.13
1621
1622 ### Patch Changes
1623
1624 - a2f9537: Update tools.get to accept discriminated unions
1625
1626 ## 0.1.12-alpha.12
1627
1628 ### Patch Changes
1629
1630 - de3f522: Stable version with test coverage and other stuff
1631
1632 ## 0.1.12-alpha.11
1633
1634 ### Patch Changes
1635
1636 - Improved error handling and telemetry
1637
1638 ## 0.1.12-alpha.10
1639
1640 ### Patch Changes
1641
1642 - eeec413: Rename modifiers, add docs and other miscellanious improvements
1643
1644 ## 0.1.12-alpha.9
1645
1646 ### Patch Changes
1647
1648 - ba8d991: Fix initiate connection flows and api issues
1649
1650 ## 0.1.12-alpha.8
1651
1652 ### Patch Changes
1653
1654 - ca59bcd: Update documentations and fix API discrepencies
1655
1656 ## 0.1.12-alpha.7
1657
1658 ### Patch Changes
1659
1660 - e51680c: Fix versioning with changesets
1661
1662 ## 0.1.0
1663
1664 ### Patch Changes
1665
1666 - Initial release