- Experimental support for tool calls that need the user's approval, configured through a requireApproval list in the toolkits, tools and tags session filters on create() and update()
- session.execute() and session.executeMeta() throw ComposioToolInputRequiredError with questions on inputRequests when a call to an approval-required tool is made, and accept inputResponses and requestState to answer them
- Experimental experimental.noElicitationSupportFallback option ('deny' or 'allow') sets how approval-required calls behave when the session's MCP client cannot ask the user
- The Python SDK gains require_approval lists, experimental.no_elicitation_support_fallback, and input_responses and request_state on session.execute() and session.execute_meta()
- Requires @composio/client 2.0.0-rc.17, and the SDK now reports itself to the API client through the client's identity option instead of default headers requirement raised · inferred, marked in the notes below
- On Cloudflare Workers and Vercel Edge with Node.js compatibility enabled, x-client-runtime now names that runtime instead of nodejs
- A createSession() clone no longer copies SDK-managed headers into its defaultHeaders behavior changed · inferred, marked in the notes below
- 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 instead of silently overwriting them
- A custom provider whose name cannot be sent as a header value is reported as unknown in x-framework
- session.executeMeta() now takes the approval answers as its third argument, so its request options move to the fourth argument signature changed · inferred, marked in the notes below
- Updated the owned API client to @composio/client 2.0.0-rc.16 with no change to public API or runtime behavior
- triggers.unsubscribe() now closes the realtime connection so a Node process can exit once it has unsubscribed
- triggers.unsubscribe() before any subscribe() no longer fetches realtime credentials or creates a client
- Concurrent subscribe() calls share one connection, and unsubscribe() cancels a subscription that is still connecting so no connection is opened or events delivered afterwards
- 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
- Trigger handler failures log the error's message rather than an empty object
- The polyfilled Node.js version is no longer sent as x-runtime-version on Cloudflare Workers and Vercel Edge with Node.js compatibility enabled
2 changes to check, marked in the notes below
From Composio
Minor Changes
-
79c2d1d: Requires
@composio/client2.0.0-rc.17. The SDK now reports itself to the API client through the client'sidentityoption 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-runtimenow names that runtime instead ofnodejs, and the polyfilled Node.js version is no longer sent asx-runtime-version. AcreateSession()clone no longer copies these headers into itsdefaultHeaders. requirement raised · inferred behavior changed · inferredThe API client owns these headers, so
defaultHeadersandcreateSession({ headers })now rejectx-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-runtimeandx-runtime-versionwith aComposioErrorfrom@composio/client. The SDK used to overwrite such entries silently.A custom provider whose
namecannot be sent as a header value (anything other than printable ASCII with no leading or trailing whitespace) is reported asunknowninx-framework. -
40546c3: Add experimental support for tool calls that need the user's approval.
Sessions accept a
requireApprovallist next to thetoolkits,toolsandtagsfilters oncreate()andupdate(). A call to a matching tool doesn't run:session.execute()andsession.executeMeta()throwComposioToolInputRequiredErrorwith the questions oninputRequests. To answer, repeat the same call with the user's answers ininputResponsesand the error'srequestState:const session = await composio.create('user_123', { tools: { gmail: { requireApproval: ['GMAIL_SEND_EMAIL'] } }, }); try { await session.execute('GMAIL_SEND_EMAIL', args); } catch (error) { if (!(error instanceof ComposioToolInputRequiredError)) throw error; const inputResponses = await promptUser(error.inputRequests); await session.execute('GMAIL_SEND_EMAIL', args, { inputResponses, requestState: error.requestState, }); }promptUseris 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. Forwarddeclineandcancelresponses unchanged.experimental.noElicitationSupportFallback('deny'or'allow') sets what happens to such a call when the session's MCP client can't ask the user.session.executeMeta()now takes these answers as its third argument, so its request options move to the fourth. signature changed · inferredThe Python SDK gains the same
require_approvallists,experimental.no_elicitation_support_fallback, andinput_responsesandrequest_stateonsession.execute()andsession.execute_meta().
Patch Changes
-
f9a972b: Update the owned API client to
@composio/client@2.0.0-rc.16. The SDK's public API and runtime behavior are unchanged. -
04cd5c4: Fix the trigger subscription lifecycle and contain errors from trigger handlers.
triggers.unsubscribe()now closes the realtime connection, so a Node process can exit once it has unsubscribed. A latertriggers.subscribe()opens a new connection.triggers.unsubscribe()before anysubscribe()no longer fetches realtime credentials or creates a client.- Concurrent
subscribe()calls share one connection, andunsubscribe()cancels a subscription that is still connecting, so it never opens a connection or delivers events afterwards. - A rejected promise from an
asynctrigger 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{}.