Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
feat: support custom connection data arg in execute proxy and tool (#1766)
lingalarahul7cea1b4881da3
diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 3225d7981..a619f0202 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -582,8 +582,8 @@ importers:ts/packages/core:dependencies:'@composio/client':- specifier: 0.1.0-alpha.27- version: 0.1.0-alpha.27+ specifier: 0.1.0-alpha.29+ version: 0.1.0-alpha.29'@composio/json-schema-to-zod':specifier: 0.1.10-next.5version: 0.1.10-next.5@@ -1132,8 +1132,8 @@ packages:'@composio/[email protected]':resolution: {integrity: sha512-iNCDSgdwfFVsjbbyZIMknMPy4uO8Xw5+MP2aI+yoQo34VXF17Fi6ZHYirrJPf8RbdoRROZTDJjC/rU18mMzC2Q==}- '@composio/[email protected]':- resolution: {integrity: sha512-IMjiJg8P9OVILmm0zDbshxvwCTzQg7Unxy4ighYp91z1BELakO9lBNSFWU4kRhSS9Tow/RiuBO63bNhPAT00cA==}+ '@composio/[email protected]':+ resolution: {integrity: sha512-0oI38Kl8LVEK/fFF7rTdvO11uwSWHzavTTUWE/ExnhIoik3wmHse1CRKywb06M+hkLO4+Vdkh46sXbNFs7YZyQ==}'@composio/[email protected]':resolution: {integrity: sha512-nWPq/uC6aOhrmexuC7HjIzwgZSpiI/B/Yn1Bi1NS1VWcJlLBTWJyEE/dh1Hd0TVEQJdyCMCBVRo00STLDW2EQw==}@@ -6907,7 +6907,7 @@ snapshots:'@composio/[email protected]': {}- '@composio/[email protected]': {}+ '@composio/[email protected]': {}'@composio/[email protected]':dependencies:diff --git a/python/composio/core/models/_modifiers.py b/python/composio/core/models/_modifiers.pyindex 05c75769a..c8538f725 100644--- a/python/composio/core/models/_modifiers.py+++ b/python/composio/core/models/_modifiers.py@@ -14,6 +14,7 @@ class ToolExecuteParams(te.TypedDict):arguments: t.Dictconnected_account_id: t.Optional[str]custom_auth_params: t.Optional["tool_execute_params.CustomAuthParams"]+ custom_connection_data: t.Optional["tool_execute_params.CustomConnectionData"]user_id: t.Optional[str]text: t.Optional[str]version: t.Optional[str]diff --git a/python/composio/core/models/auth_configs.py b/python/composio/core/models/auth_configs.pyindex 1c3449537..c941e24e7 100644--- a/python/composio/core/models/auth_configs.py+++ b/python/composio/core/models/auth_configs.py@@ -95,8 +95,8 @@ class AuthConfigs(Resource):nanoid=nanoid,type=options["type"], # type: ignorecredentials=options.get("credentials", self._client.not_given),- restrict_to_following_tools=options.get(- "restrict_to_following_tools", self._client.not_given+ tool_access_config=options.get(+ "tool_access_config", self._client.not_given),),)diff --git a/python/composio/core/models/toolkits.py b/python/composio/core/models/toolkits.pyindex 764e04b2a..4e49054a6 100644--- a/python/composio/core/models/toolkits.py+++ b/python/composio/core/models/toolkits.py@@ -84,7 +84,9 @@ class Toolkits(Resource):toolkit={"slug": toolkit},auth_config={"type": "use_composio_managed_auth",- "restrict_to_following_tools": [toolkit],+ "tool_access_config": {+ "tools_for_connected_account_creation": [toolkit],+ },},).auth_config.iddiff --git a/python/composio/core/models/tools.py b/python/composio/core/models/tools.pyindex e8ce0f5ac..dcd679bb6 100644--- a/python/composio/core/models/tools.py+++ b/python/composio/core/models/tools.py@@ -125,7 +125,7 @@ class Tools(Resource, t.Generic[TProvider]):),search=search if search else self._client.not_given,scopes=scopes,- limit=str(limit) if limit is not None else self._client.not_given,+ limit=limit,).items)return tools_list@@ -307,6 +307,7 @@ class Tools(Resource, t.Generic[TProvider]):arguments: t.Dict,connected_account_id: t.Optional[str] = None,custom_auth_params: t.Optional[tool_execute_params.CustomAuthParams] = None,+ custom_connection_data: t.Optional[tool_execute_params.CustomConnectionData] = None,user_id: t.Optional[str] = None,text: t.Optional[str] = None,version: t.Optional[str] = None,@@ -319,6 +320,7 @@ class Tools(Resource, t.Generic[TProvider]):arguments=arguments,connected_account_id=connected_account_id or self._client.not_given,custom_auth_params=custom_auth_params or self._client.not_given,+ custom_connection_data=custom_connection_data or self._client.not_given,user_id=user_id or self._client.not_given,text=text or self._client.not_given,version=version or self._client.not_given,@@ -337,6 +339,7 @@ class Tools(Resource, t.Generic[TProvider]):*,connected_account_id: t.Optional[str] = None,custom_auth_params: t.Optional[tool_execute_params.CustomAuthParams] = None,+ custom_connection_data: t.Optional[tool_execute_params.CustomConnectionData] = None,user_id: t.Optional[str] = None,text: t.Optional[str] = None,version: t.Optional[str] = None,@@ -353,6 +356,7 @@ class Tools(Resource, t.Generic[TProvider])::param arguments: The arguments to pass to the tool.:param connected_account_id: The ID of the connected account to use for the tool.:param custom_auth_params: The custom auth params to use for the tool.+ :param custom_connection_data: The custom connection data to use for the tool, takes priority over custom_auth_params.:param user_id: The ID of the user to execute the tool for.:param text: The text to pass to the tool.:param version: The version of the tool to execute.@@ -377,6 +381,7 @@ class Tools(Resource, t.Generic[TProvider]):request={"connected_account_id": connected_account_id,"custom_auth_params": custom_auth_params,+ "custom_connection_data": custom_connection_data,"version": version,"text": text,"user_id": user_id,@@ -385,6 +390,7 @@ class Tools(Resource, t.Generic[TProvider]):)connected_account_id = processed_params["connected_account_id"]custom_auth_params = processed_params["custom_auth_params"]+ custom_connection_data = processed_params["custom_connection_data"]text = processed_params["text"]version = processed_params["version"]user_id = processed_params["user_id"]@@ -402,6 +408,7 @@ class Tools(Resource, t.Generic[TProvider]):arguments=arguments,connected_account_id=connected_account_id,custom_auth_params=custom_auth_params,+ custom_connection_data=custom_connection_data,user_id=user_id,text=text,version=version,@@ -433,6 +440,9 @@ class Tools(Resource, t.Generic[TProvider]):"connected_account_id", self._client.not_given),parameters=options.get("parameters", self._client.not_given),+ custom_connection_data=options.get(+ "custom_connection_data", self._client.not_given+ ),)diff --git a/python/examples/auth_configs.py b/python/examples/auth_configs.pyindex 954db7425..c9f41da12 100644--- a/python/examples/auth_configs.py+++ b/python/examples/auth_configs.py@@ -58,7 +58,9 @@ auth_config_updated = composio.auth_configs.update("client_id": "1234567890","client_secret": "1234567890",},- "restrict_to_following_tools": ["github"],+ "tool_access_config": {+ "tools_for_connected_account_creation": ["github"],+ },},)print(auth_config_updated)diff --git a/python/pyproject.toml b/python/pyproject.tomlindex 910ce2710..e9ad26a71 100644--- a/python/pyproject.toml+++ b/python/pyproject.toml@@ -7,7 +7,7 @@ requires-python = ">=3.10,<4"dependencies = ["pysher>=1.0.8","pydantic>=2.6.4",- "composio-client==1.4.0",+ "composio-client==1.6.0","typing-extensions>=4.0.0","openai",]diff --git a/ts/docs/api/tools.md b/ts/docs/api/tools.mdindex eee673e48..8f23bad5b 100644--- a/ts/docs/api/tools.md+++ b/ts/docs/api/tools.md@@ -252,6 +252,7 @@ interface ToolExecuteParams {allowTracing?: boolean; // Enable/disable tracingconnectedAccountId?: string; // Connected account IDcustomAuthParams?: CustomAuthParams; // Custom auth parameters+ customConnectionData?: CustomConnectionData; // Custom connection dataarguments?: Record<string, unknown>; // Tool argumentsuserId: string; // User IDversion?: string; // Tool versiondiff --git a/ts/packages/core/package.json b/ts/packages/core/package.jsonindex ea56522d8..69cbaf29f 100644--- a/ts/packages/core/package.json+++ b/ts/packages/core/package.json@@ -44,7 +44,7 @@"vitest": "^3.1.4"},"dependencies": {- "@composio/client": "0.1.0-alpha.27",+ "@composio/client": "0.1.0-alpha.29","@composio/json-schema-to-zod": "0.1.10-next.5","@types/json-schema": "^7.0.15","chalk": "^4.1.2",diff --git a/ts/packages/core/src/models/AuthConfigs.ts b/ts/packages/core/src/models/AuthConfigs.tsindex 62ac8cc2e..1368f6536 100644--- a/ts/packages/core/src/models/AuthConfigs.ts+++ b/ts/packages/core/src/models/AuthConfigs.ts@@ -133,13 +133,17 @@ export class AuthConfigs {name: parsedOptions.data.name,authScheme: parsedOptions.data.authScheme,credentials: parsedOptions.data.credentials,- restrict_to_following_tools: parsedOptions.data.restrictToFollowingTools,+ tool_access_config: {+ tools_for_connected_account_creation: parsedOptions.data.restrictToFollowingTools,+ },}: {type: parsedOptions.data.type,credentials: parsedOptions.data.credentials,name: parsedOptions.data.name,- restrict_to_following_tools: parsedOptions.data.restrictToFollowingTools,+ tool_access_config: {+ tools_for_connected_account_creation: parsedOptions.data.restrictToFollowingTools,+ },},});return transformCreateAuthConfigResponse(result);@@ -212,12 +216,16 @@ export class AuthConfigs {? {type: 'custom',credentials: parsedData.data.credentials,- restrict_to_following_tools: parsedData.data.restrictToFollowingTools,+ tool_access_config: {+ tools_for_connected_account_creation: parsedData.data.restrictToFollowingTools,+ },}: {type: 'default',scopes: parsedData.data.scopes,- restrict_to_following_tools: parsedData.data.restrictToFollowingTools,+ tool_access_config: {+ tools_for_connected_account_creation: parsedData.data.restrictToFollowingTools,+ },});}diff --git a/ts/packages/core/src/models/CustomTools.ts b/ts/packages/core/src/models/CustomTools.tsindex 9bf53794b..75a1a5efc 100644--- a/ts/packages/core/src/models/CustomTools.ts+++ b/ts/packages/core/src/models/CustomTools.ts@@ -303,6 +303,7 @@ export class CustomTools {parameters: parameters,body: data.body,connected_account_id: data.connectedAccountId ?? connectedAccountId,+ custom_connection_data: data.customConnectionData,});return {diff --git a/ts/packages/core/src/models/Tools.ts b/ts/packages/core/src/models/Tools.tsindex fce9993e1..beb68c535 100644--- a/ts/packages/core/src/models/Tools.ts+++ b/ts/packages/core/src/models/Tools.ts@@ -704,6 +704,7 @@ export class Tools<allow_tracing: body.allowTracing,connected_account_id: body.connectedAccountId,custom_auth_params: body.customAuthParams,+ custom_connection_data: body.customConnectionData,arguments: body.arguments,user_id: body.userId,version: body.version,@@ -890,6 +891,7 @@ export class Tools<body: toolProxyParams.data.body,connected_account_id: toolProxyParams.data.connectedAccountId,parameters: parameters,+ custom_connection_data: toolProxyParams.data.customConnectionData,});}diff --git a/ts/packages/core/src/provider/OpenAIProvider.ts b/ts/packages/core/src/provider/OpenAIProvider.tsindex 006c90974..c73a55038 100644--- a/ts/packages/core/src/provider/OpenAIProvider.ts+++ b/ts/packages/core/src/provider/OpenAIProvider.ts@@ -183,6 +183,7 @@ export class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection,arguments: JSON.parse(tool.function.arguments),connectedAccountId: options?.connectedAccountId,customAuthParams: options?.customAuthParams,+ customConnectionData: options?.customConnectionData,userId: userId,};const result = await this.executeTool(tool.function.name, payload, modifiers);diff --git a/ts/packages/core/src/types/connectedAccountAuthStates.types.ts b/ts/packages/core/src/types/connectedAccountAuthStates.types.tsindex 0b1a6943a..c9d4b83e6 100644--- a/ts/packages/core/src/types/connectedAccountAuthStates.types.ts+++ b/ts/packages/core/src/types/connectedAccountAuthStates.types.ts@@ -91,7 +91,7 @@ export const Oauth2ActiveConnectionDataSchema = Oauth2InitiatingConnectionDataScaccess_token: z.string().optional(),id_token: z.string().optional(),token_type: z.string().optional(),- refresh_token: z.string().optional(),+ refresh_token: z.string().nullish(),expires_in: z.union([z.string(), z.number(), z.null()]).optional(),scope: z.union([z.string(), z.array(z.string())]).optional(),// previously verification_token, will be sent as verification_token to slack@@ -129,6 +129,13 @@ export const Oauth2ConnectionDataSchema = z.discriminatedUnion('status', [Oauth2InactiveConnectionDataSchema,]);+export const CustomOauth2ConnectionDataSchema = Oauth2ActiveConnectionDataSchema.omit({+ status: true,+ access_token: true,+}).extend({+ access_token: z.string(),+});+export type Oauth2InitiatingConnectionData = z.infer<typeof Oauth2InitiatingConnectionDataSchema>;export type Oauth2InitiatedConnectionData = z.infer<typeof Oauth2InitiatedConnectionDataSchema>;export type Oauth2ActiveConnectionData = z.infer<typeof Oauth2ActiveConnectionDataSchema>;@@ -136,6 +143,7 @@ export type Oauth2FailedConnectionData = z.infer<typeof Oauth2FailedConnectionDaexport type Oauth2ExpiredConnectionData = z.infer<typeof Oauth2ExpiredConnectionDataSchema>;export type Oauth2InactiveConnectionData = z.infer<typeof Oauth2InactiveConnectionDataSchema>;export type Oauth2ConnectionData = z.infer<typeof Oauth2ConnectionDataSchema>;+export type CustomOauth2ConnectionData = z.infer<typeof CustomOauth2ConnectionDataSchema>;// OAUTH1export const Oauth1InitiatingConnectionDataSchema = BaseSchemeRaw.extend({@@ -183,6 +191,14 @@ export const Oauth1ConnectionDataSchema = z.discriminatedUnion('status', [Oauth1InactiveConnectionDataSchema,]);+export const CustomOauth1ConnectionDataSchema = Oauth1ActiveConnectionDataSchema.omit({+ status: true,+ oauth_token: true,+}).extend({+ oauth_token_secret: z.string(),+ oauth_token: z.string(),+});+export type Oauth1InitiatingConnectionData = z.infer<typeof Oauth1InitiatingConnectionDataSchema>;export type Oauth1InitiatedConnectionData = z.infer<typeof Oauth1InitiatedConnectionDataSchema>;export type Oauth1ActiveConnectionData = z.infer<typeof Oauth1ActiveConnectionDataSchema>;@@ -190,6 +206,7 @@ export type Oauth1FailedConnectionData = z.infer<typeof Oauth1FailedConnectionDaexport type Oauth1ExpiredConnectionData = z.infer<typeof Oauth1ExpiredConnectionDataSchema>;export type Oauth1InactiveConnectionData = z.infer<typeof Oauth1InactiveConnectionDataSchema>;export type Oauth1ConnectionData = z.infer<typeof Oauth1ConnectionDataSchema>;+export type CustomOauth1ConnectionData = z.infer<typeof CustomOauth1ConnectionDataSchema>;// COMPOSIO_LINK_AUTHconst ComposioLinkInitiatingSchema = BaseSchemeRaw.extend({@@ -268,6 +285,9 @@ const BasicConnectionDataSchema = z.discriminatedUnion('status', [expired_at: z.string().optional(),}).catchall(z.unknown()),]);+const CustomBasicConnectionDataSchema = BasicInitiatingSchema.omit({+ status: true,+});// API_KEYconst ApiKeyInitiatingSchema = BaseSchemeRaw.extend({@@ -290,6 +310,9 @@ const ApiKeyConnectionDataSchema = z.discriminatedUnion('status', [expired_at: z.string().optional(),}).catchall(z.unknown()),]);+const CustomApiKeyConnectionDataSchema = ApiKeyInitiatingSchema.omit({+ status: true,+});// BEARER_TOKENconst BearerTokenInitiatingSchema = BaseSchemeRaw.extend({@@ -311,6 +334,9 @@ const BearerTokenConnectionDataSchema = z.discriminatedUnion('status', [expired_at: z.string().optional(),}).catchall(z.unknown()),]);+const CustomBearerTokenConnectionDataSchema = BearerTokenInitiatingSchema.omit({+ status: true,+});// GOOGLE_SERVICE_ACCOUNTconst GoogleServiceAccountInitiatingSchema = BaseSchemeRaw.extend({@@ -352,6 +378,9 @@ const NoAuthConnectionDataSchema = z.discriminatedUnion('status', [expired_at: z.string().optional(),}).catchall(z.unknown()),]);+const CustomNoAuthConnectionDataSchema = NoAuthInitiatingSchema.omit({+ status: true,+});// CALCOM_AUTHconst CalcomAuthInitiatingSchema = BaseSchemeRaw.extend({@@ -411,6 +440,9 @@ const BasicWithJwtConnectionDataSchema = z.discriminatedUnion('status', [expired_at: z.string().optional(),}).catchall(z.unknown()),]);+const CustomBasicWithJwtConnectionDataSchema = BasicWithJwtInitiatingSchema.omit({+ status: true,+});export const ConnectionDataSchema = z.discriminatedUnion('authScheme', [z.object({@@ -500,3 +532,43 @@ export const ConnectionDataSchema = z.discriminatedUnion('authScheme', []);export type ConnectionData = z.infer<typeof ConnectionDataSchema>;++export const CustomConnectionDataSchema = z.discriminatedUnion('authScheme', [+ z.object({+ authScheme: z.literal(AuthSchemeTypes.OAUTH2),+ toolkitSlug: z.string(),+ val: CustomOauth2ConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.API_KEY),+ toolkitSlug: z.string(),+ val: CustomApiKeyConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.BASIC_WITH_JWT),+ toolkitSlug: z.string(),+ val: CustomBasicWithJwtConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.BASIC),+ toolkitSlug: z.string(),+ val: CustomBasicConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.BEARER_TOKEN),+ toolkitSlug: z.string(),+ val: CustomBearerTokenConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.OAUTH1),+ toolkitSlug: z.string(),+ val: CustomOauth1ConnectionDataSchema,+ }),+ z.object({+ authScheme: z.literal(AuthSchemeTypes.NO_AUTH),+ toolkitSlug: z.string(),+ val: CustomNoAuthConnectionDataSchema,+ }),+]);++export type CustomConnectionData = z.infer<typeof CustomConnectionDataSchema>;diff --git a/ts/packages/core/src/types/provider.types.ts b/ts/packages/core/src/types/provider.types.tsindex 19c24e416..a788b7763 100644--- a/ts/packages/core/src/types/provider.types.ts+++ b/ts/packages/core/src/types/provider.types.ts@@ -6,6 +6,7 @@ import {ToolExecuteResponse,ToolListParams,} from './tool.types';+import { CustomConnectionData } from './connectedAccountAuthStates.types';/*** Base provider implementation, which needs to be implemented by the extended class.@@ -20,6 +21,7 @@ export interface Provider<TTool, TToolCollection> {export type ExecuteToolFnOptions = {connectedAccountId?: string;customAuthParams?: CustomAuthParams;+ customConnectionData?: CustomConnectionData;};/**diff --git a/ts/packages/core/src/types/tool.types.ts b/ts/packages/core/src/types/tool.types.tsindex dcc03b23d..9ed3b2157 100644--- a/ts/packages/core/src/types/tool.types.ts+++ b/ts/packages/core/src/types/tool.types.ts@@ -1,4 +1,5 @@import { z } from 'zod';+import { CustomConnectionDataSchema } from './connectedAccountAuthStates.types';/*** Toolkit is the collection of tools,@@ -232,6 +233,7 @@ export const ToolExecuteParamsSchema = z.object({allowTracing: z.boolean().optional(),connectedAccountId: z.string().optional(),customAuthParams: CustomAuthParamsSchema.optional(),+ customConnectionData: CustomConnectionDataSchema.optional(),arguments: z.record(z.string(), z.unknown()).optional(),userId: z.string(),version: z.string().optional(),@@ -265,5 +267,6 @@ export const ToolProxyParamsSchema = z.object({).optional(),connectedAccountId: z.string().optional(),+ customConnectionData: CustomConnectionDataSchema.optional(),});export type ToolProxyParams = z.infer<typeof ToolProxyParamsSchema>;diff --git a/ts/packages/core/src/utils/transformers/authConfigs.ts b/ts/packages/core/src/utils/transformers/authConfigs.tsindex eeea656a0..6678ed0fd 100644--- a/ts/packages/core/src/utils/transformers/authConfigs.ts+++ b/ts/packages/core/src/utils/transformers/authConfigs.ts@@ -48,7 +48,7 @@ export function transformAuthConfigRetrieveResponse(createdBy: authConfig.created_by,createdAt: authConfig.created_at,lastUpdatedAt: authConfig.last_updated_at,- restrictToFollowingTools: authConfig.restrict_to_following_tools,+ restrictToFollowingTools: authConfig.tool_access_config?.tools_for_connected_account_creation,}));}diff --git a/ts/packages/core/test/AuthConfigs/authConfigs.test.ts b/ts/packages/core/test/AuthConfigs/authConfigs.test.tsindex fa741b268..ae080fa7c 100644--- a/ts/packages/core/test/AuthConfigs/authConfigs.test.ts+++ b/ts/packages/core/test/AuthConfigs/authConfigs.test.ts@@ -42,6 +42,9 @@ const mockComposioAuthConfigResponse: ComposioAuthConfigRetrieveResponse = {created_by: 'user_123',created_at: '2023-01-01T00:00:00Z',last_updated_at: '2023-01-01T00:00:00Z',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },};const mockTransformedAuthConfigResponse = {@@ -257,6 +260,9 @@ describe('AuthConfigs', () => {},auth_config: {type: 'use_composio_managed_auth',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },},});@@ -280,6 +286,9 @@ describe('AuthConfigs', () => {const options = {type: 'use_custom_auth' as const,name: 'Custom GitHub Auth',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },authScheme: 'OAUTH2' as const,credentials: {client_id: 'test_client_id',@@ -310,6 +319,9 @@ describe('AuthConfigs', () => {const options = {type: 'use_composio_managed_auth' as const,name: 'My GitHub Config',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },credentials: {custom_field: 'value',},@@ -381,7 +393,6 @@ describe('AuthConfigs', () => {client_id: 'new_client_id',client_secret: 'new_client_secret',},- restrictToFollowingTools: ['repo', 'user'],};const result = await authConfigs.update('auth_12345', updateData);@@ -392,7 +403,9 @@ describe('AuthConfigs', () => {client_id: 'new_client_id',client_secret: 'new_client_secret',},- restrict_to_following_tools: ['repo', 'user'],+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },});expect(result).toEqual(mockUpdateResponse);@@ -404,7 +417,6 @@ describe('AuthConfigs', () => {const updateData = {type: 'default' as const,scopes: 'read:user,repo',- restrictToFollowingTools: ['repo'],};const result = await authConfigs.update('auth_12345', updateData);@@ -412,7 +424,9 @@ describe('AuthConfigs', () => {expect(mockClient.authConfigs.update).toHaveBeenCalledWith('auth_12345', {type: 'default',scopes: 'read:user,repo',- restrict_to_following_tools: ['repo'],+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },});expect(result).toEqual(mockUpdateResponse);@@ -435,7 +449,9 @@ describe('AuthConfigs', () => {credentials: {api_key: 'new_api_key',},- restrict_to_following_tools: undefined,+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },});expect(result).toEqual(mockUpdateResponse);@@ -687,7 +703,9 @@ describe('AuthConfigs', () => {expect(mockClient.authConfigs.update).toHaveBeenCalledWith('auth_12345', {type: 'custom',credentials: largeCredentials,- restrict_to_following_tools: undefined,+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },});expect(result).toEqual(mockUpdateResponse);@@ -713,7 +731,9 @@ describe('AuthConfigs', () => {expect(mockClient.authConfigs.update).toHaveBeenCalledWith('auth_12345', {type: 'default',scopes: longScopes,- restrict_to_following_tools: undefined,+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },});expect(result).toEqual(mockUpdateResponse);diff --git a/ts/packages/core/test/models/toolkits.test.ts b/ts/packages/core/test/models/toolkits.test.tsindex 7b8ac38f9..04da3646d 100644--- a/ts/packages/core/test/models/toolkits.test.ts+++ b/ts/packages/core/test/models/toolkits.test.ts@@ -270,6 +270,9 @@ describe('Toolkits', () => {is_composio_managed: true,is_disabled: false,name: 'Test Toolkit Auth Config',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },no_of_connections: 0,status: 'ENABLED',uuid: 'uuid-1',@@ -314,6 +317,9 @@ describe('Toolkits', () => {auth_config: {type: 'use_composio_managed_auth',name: 'Test Toolkit Auth Config',+ tool_access_config: {+ tools_for_connected_account_creation: undefined,+ },},});expect(mockClient.connectedAccounts.create).toHaveBeenCalledWith({diff --git a/ts/packages/core/test/tools/fileModifiers.test.ts b/ts/packages/core/test/tools/fileModifiers.test.tsindex 36c946ac0..5905d9cde 100644--- a/ts/packages/core/test/tools/fileModifiers.test.ts+++ b/ts/packages/core/test/tools/fileModifiers.test.ts@@ -416,6 +416,7 @@ describe('Tools with autoUploadDownloadFiles', () => {allow_tracing: undefined,connected_account_id: undefined,custom_auth_params: undefined,+ custom_connection_data: undefined,text: undefined,user_id: 'test-user',version: undefined,diff --git a/ts/packages/core/test/tools/tools.test.ts b/ts/packages/core/test/tools/tools.test.tsindex e6619484a..d373d15bb 100644--- a/ts/packages/core/test/tools/tools.test.ts+++ b/ts/packages/core/test/tools/tools.test.ts@@ -414,6 +414,7 @@ describe('Tools', () => {allow_tracing: undefined,connected_account_id: undefined,custom_auth_params: undefined,+ custom_connection_data: undefined,arguments: body.arguments,user_id: body.userId,version: undefined,@@ -438,6 +439,7 @@ describe('Tools', () => {allow_tracing: undefined,connected_account_id: 'test-connected-account-id',custom_auth_params: undefined,+ custom_connection_data: undefined,arguments: body.arguments,user_id: body.userId,version: undefined,diff --git a/ts/packages/providers/anthropic/src/index.ts b/ts/packages/providers/anthropic/src/index.tsindex a4a895363..29f11ea69 100644--- a/ts/packages/providers/anthropic/src/index.ts+++ b/ts/packages/providers/anthropic/src/index.ts@@ -214,6 +214,7 @@ export class AnthropicProvider extends BaseNonAgenticProvider<arguments: toolUse.input,connectedAccountId: options?.connectedAccountId,customAuthParams: options?.customAuthParams,+ customConnectionData: options?.customConnectionData,userId: userId,};const result = await this.executeTool(toolUse.name, payload, modifiers);diff --git a/ts/packages/providers/cloudflare/src/index.ts b/ts/packages/providers/cloudflare/src/index.tsindex dc17cb297..7c666dbf9 100644--- a/ts/packages/providers/cloudflare/src/index.ts+++ b/ts/packages/providers/cloudflare/src/index.ts@@ -232,6 +232,7 @@ export class CloudflareProvider extends BaseNonAgenticProvider<arguments: typeof tool.arguments === 'string' ? JSON.parse(tool.arguments) : tool.arguments,connectedAccountId: options.connectedAccountId,customAuthParams: options.customAuthParams,+ customConnectionData: options.customConnectionData,userId: userId,};diff --git a/ts/packages/providers/google/src/index.ts b/ts/packages/providers/google/src/index.tsindex 277808af7..43255ebc5 100644--- a/ts/packages/providers/google/src/index.ts+++ b/ts/packages/providers/google/src/index.ts@@ -241,6 +241,7 @@ export class GoogleProvider extends BaseNonAgenticProvider<GoogleGenAIToolCollecarguments: tool.args,connectedAccountId: options?.connectedAccountId,customAuthParams: options?.customAuthParams,+ customConnectionData: options?.customConnectionData,userId: userId,};diff --git a/ts/packages/providers/openai/src/OpenAIResponsesProvider.ts b/ts/packages/providers/openai/src/OpenAIResponsesProvider.tsindex b2b740fd8..f13d9b1fa 100644--- a/ts/packages/providers/openai/src/OpenAIResponsesProvider.ts+++ b/ts/packages/providers/openai/src/OpenAIResponsesProvider.ts@@ -229,6 +229,7 @@ export class OpenAIResponsesProvider extends BaseNonAgenticProvider<arguments: JSON.parse(tool.arguments),connectedAccountId: options?.connectedAccountId,customAuthParams: options?.customAuthParams,+ customConnectionData: options?.customConnectionData,userId: userId,};const result = await this.executeTool(tool.name, payload, modifiers);