@composio/core 0.2.7-alpha.2 → 0.2.7-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -153,10 +153,12 @@ __export(index_exports, {
153
153
  ToolRouterCreateSessionConfigSchema: () => ToolRouterCreateSessionConfigSchema,
154
154
  ToolRouterDisabledTagsConfigSchema: () => ToolRouterDisabledTagsConfigSchema,
155
155
  ToolRouterEnabledTagsConfigSchema: () => ToolRouterEnabledTagsConfigSchema,
156
+ ToolRouterMCPServerConfigSchema: () => ToolRouterMCPServerConfigSchema,
156
157
  ToolRouterManageConnectionsConfigSchema: () => ToolRouterManageConnectionsConfigSchema,
157
158
  ToolRouterTagsParamSchema: () => ToolRouterTagsParamSchema,
158
159
  ToolRouterToolkitsDisabledConfigSchema: () => ToolRouterToolkitsDisabledConfigSchema,
159
160
  ToolRouterToolkitsEnabledConfigSchema: () => ToolRouterToolkitsEnabledConfigSchema,
161
+ ToolRouterToolkitsOptionsSchema: () => ToolRouterToolkitsOptionsSchema,
160
162
  ToolRouterToolkitsParamSchema: () => ToolRouterToolkitsParamSchema,
161
163
  ToolRouterToolsParamSchema: () => ToolRouterToolsParamSchema,
162
164
  ToolSchema: () => ToolSchema,
@@ -7691,7 +7693,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
7691
7693
  };
7692
7694
 
7693
7695
  // package.json
7694
- var version = "0.2.7-alpha.2";
7696
+ var version = "0.2.7-alpha.3";
7695
7697
 
7696
7698
  // src/models/Files.ts
7697
7699
  var Files = class {
@@ -7787,12 +7789,12 @@ var getDefaultHeaders = (headers, provider) => {
7787
7789
 
7788
7790
  // src/types/toolRouter.types.ts
7789
7791
  var import_v312 = __toESM(require("zod/v3"), 1);
7790
- var MCPServerTypeSchema = import_v312.default.enum(["HTTP", "SSE"]);
7792
+ var MCPServerTypeSchema = import_v312.default.enum(["http", "sse"]);
7791
7793
  var ToolRouterConfigManageConnectionsSchema = import_v312.default.object({
7792
7794
  enabled: import_v312.default.boolean().default(true).optional().describe(
7793
7795
  "Whether to use tools to manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually"
7794
7796
  ),
7795
- callbackUri: import_v312.default.string().optional().describe("The callback uri to use in the tool router session"),
7797
+ callbackUrl: import_v312.default.string().optional().describe("The callback uri to use in the tool router session"),
7796
7798
  inferScopesFromTools: import_v312.default.boolean().default(false).optional().describe(
7797
7799
  "Whether to infer scopes from tools in the tool router session. Defaults to false, if set to true, tool router will infer scopes from allowed tools"
7798
7800
  )
@@ -7885,13 +7887,24 @@ var ToolkitConnectionStateSchema = import_v312.default.object({
7885
7887
  id: import_v312.default.string().describe("The id of the connected account"),
7886
7888
  status: import_v312.default.string().describe("The status of the connected account")
7887
7889
  }).optional().describe("The connected account of a toolkit")
7888
- })
7890
+ }).optional().describe("The connection of a toolkit")
7889
7891
  }).describe("The connection state of a toolkit");
7890
7892
  var ToolkitConnectionsDetailsSchema = import_v312.default.object({
7891
7893
  items: import_v312.default.array(ToolkitConnectionStateSchema),
7892
7894
  nextCursor: import_v312.default.string().optional(),
7893
7895
  totalPages: import_v312.default.number()
7894
7896
  });
7897
+ var ToolRouterMCPServerConfigSchema = import_v312.default.object({
7898
+ type: MCPServerTypeSchema,
7899
+ url: import_v312.default.string(),
7900
+ headers: import_v312.default.record(import_v312.default.string(), import_v312.default.string().optional()).optional()
7901
+ });
7902
+ var ToolRouterToolkitsOptionsSchema = import_v312.default.object({
7903
+ toolkits: import_v312.default.array(import_v312.default.string()).optional(),
7904
+ nextCursor: import_v312.default.string().optional(),
7905
+ limit: import_v312.default.number().optional(),
7906
+ isConnected: import_v312.default.boolean().optional()
7907
+ });
7895
7908
 
7896
7909
  // src/models/ToolRouter.ts
7897
7910
  var ToolRouter = class {
@@ -7939,18 +7952,25 @@ var ToolRouter = class {
7939
7952
  */
7940
7953
  createToolkitsFn = (sessionId) => {
7941
7954
  const connectionsFn = async (options) => {
7955
+ const toolkitOptions = ToolRouterToolkitsOptionsSchema.safeParse(options ?? {});
7956
+ if (!toolkitOptions.success) {
7957
+ throw new ValidationError("Failed to parse toolkits options", {
7958
+ cause: toolkitOptions.error
7959
+ });
7960
+ }
7942
7961
  const result = await this.client.toolRouter.session.toolkits(sessionId, {
7943
- cursor: options?.nextCursor,
7944
- limit: options?.limit,
7945
- toolkits: options?.toolkits
7962
+ cursor: toolkitOptions.data.nextCursor,
7963
+ limit: toolkitOptions.data.limit,
7964
+ toolkits: toolkitOptions.data.toolkits,
7965
+ is_connected: toolkitOptions.data.isConnected
7946
7966
  });
7947
7967
  const toolkitConnectedStates = result.items.map((item) => {
7948
7968
  const connectedState = transform(item).with(ToolkitConnectionStateSchema).using((item2) => ({
7949
7969
  slug: item2.slug,
7950
7970
  name: item2.name,
7951
- logo: item2.meta.logo,
7952
- isNoAuth: false,
7953
- connection: {
7971
+ logo: item2.meta?.logo,
7972
+ isNoAuth: item2.is_no_auth,
7973
+ connection: item2.is_no_auth ? void 0 : {
7954
7974
  isActive: item2.connected_account?.status === "ACTIVE",
7955
7975
  authConfig: item2.connected_account && {
7956
7976
  id: item2.connected_account?.auth_config.id,
@@ -7995,6 +8015,24 @@ var ToolRouter = class {
7995
8015
  return tools;
7996
8016
  };
7997
8017
  };
8018
+ /**
8019
+ * Creates a MCP server config object.
8020
+ * @param type {MCPServerType} The type of the MCP server
8021
+ * @param url {string} The URL of the MCP server
8022
+ * @returns {ToolRouterMCPServerConfig} The MCP server config object
8023
+ */
8024
+ createMCPServerConfig = ({
8025
+ type,
8026
+ url
8027
+ }) => {
8028
+ return {
8029
+ type,
8030
+ url,
8031
+ headers: {
8032
+ "x-api-key": this.config?.apiKey ?? void 0
8033
+ }
8034
+ };
8035
+ };
7998
8036
  /**
7999
8037
  * Creates a new tool router session for a user.
8000
8038
  *
@@ -8033,7 +8071,7 @@ var ToolRouter = class {
8033
8071
  connections: {
8034
8072
  infer_scopes_from_tools: inferScopesFromTools,
8035
8073
  auto_manage_connections: manageConnectedAccounts,
8036
- callback_uri: typeof routerConfig.manageConnections === "object" ? routerConfig.manageConnections.callbackUri : void 0
8074
+ callback_url: typeof routerConfig.manageConnections === "object" ? routerConfig.manageConnections.callbackUrl : void 0
8037
8075
  },
8038
8076
  execution: routerConfig.execution ? {
8039
8077
  proxy_execution_enabled: routerConfig.execution?.proxyExecutionEnabled,
@@ -8043,10 +8081,7 @@ var ToolRouter = class {
8043
8081
  const session = await this.client.toolRouter.session.create(payload);
8044
8082
  return {
8045
8083
  sessionId: session.session_id,
8046
- mcp: {
8047
- type: session.mcp.type,
8048
- url: session.mcp.url
8049
- },
8084
+ mcp: this.createMCPServerConfig(session.mcp),
8050
8085
  tools: this.createToolsFn(userId, session.tool_router_tools),
8051
8086
  authorize: this.createAuthorizeFn(session.session_id),
8052
8087
  toolkits: this.createToolkitsFn(session.session_id)
@@ -8070,10 +8105,7 @@ var ToolRouter = class {
8070
8105
  const session = await this.client.toolRouter.session.retrieve(id);
8071
8106
  return {
8072
8107
  sessionId: session.session_id,
8073
- mcp: {
8074
- type: session.mcp.type,
8075
- url: session.mcp.url
8076
- },
8108
+ mcp: this.createMCPServerConfig(session.mcp),
8077
8109
  tools: this.createToolsFn(session.config.user_id, session.tool_router_tools),
8078
8110
  authorize: this.createAuthorizeFn(session.session_id),
8079
8111
  toolkits: this.createToolkitsFn(session.session_id)
@@ -8586,10 +8618,12 @@ var AuthScheme = class {
8586
8618
  ToolRouterCreateSessionConfigSchema,
8587
8619
  ToolRouterDisabledTagsConfigSchema,
8588
8620
  ToolRouterEnabledTagsConfigSchema,
8621
+ ToolRouterMCPServerConfigSchema,
8589
8622
  ToolRouterManageConnectionsConfigSchema,
8590
8623
  ToolRouterTagsParamSchema,
8591
8624
  ToolRouterToolkitsDisabledConfigSchema,
8592
8625
  ToolRouterToolkitsEnabledConfigSchema,
8626
+ ToolRouterToolkitsOptionsSchema,
8593
8627
  ToolRouterToolkitsParamSchema,
8594
8628
  ToolRouterToolsParamSchema,
8595
8629
  ToolSchema,
package/dist/index.d.cts CHANGED
@@ -31738,19 +31738,19 @@ declare class Files {
31738
31738
  }): Promise<FileDownloadData>;
31739
31739
  }
31740
31740
 
31741
- declare const MCPServerTypeSchema: z$1.ZodEnum<["HTTP", "SSE"]>;
31741
+ declare const MCPServerTypeSchema: z$1.ZodEnum<["http", "sse"]>;
31742
31742
  type MCPServerType = z$1.infer<typeof MCPServerTypeSchema>;
31743
31743
  declare const ToolRouterConfigManageConnectionsSchema: z$1.ZodObject<{
31744
31744
  enabled: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31745
- callbackUri: z$1.ZodOptional<z$1.ZodString>;
31745
+ callbackUrl: z$1.ZodOptional<z$1.ZodString>;
31746
31746
  inferScopesFromTools: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31747
31747
  }, "strict", z$1.ZodTypeAny, {
31748
+ callbackUrl?: string | undefined;
31748
31749
  enabled?: boolean | undefined;
31749
- callbackUri?: string | undefined;
31750
31750
  inferScopesFromTools?: boolean | undefined;
31751
31751
  }, {
31752
+ callbackUrl?: string | undefined;
31752
31753
  enabled?: boolean | undefined;
31753
- callbackUri?: string | undefined;
31754
31754
  inferScopesFromTools?: boolean | undefined;
31755
31755
  }>;
31756
31756
  declare const ToolRouterToolkitsParamSchema: z$1.ZodArray<z$1.ZodString, "many">;
@@ -31908,15 +31908,15 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31908
31908
  connectedAccounts: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
31909
31909
  manageConnections: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodBoolean, z$1.ZodObject<{
31910
31910
  enabled: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31911
- callbackUri: z$1.ZodOptional<z$1.ZodString>;
31911
+ callbackUrl: z$1.ZodOptional<z$1.ZodString>;
31912
31912
  inferScopesFromTools: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31913
31913
  }, "strict", z$1.ZodTypeAny, {
31914
+ callbackUrl?: string | undefined;
31914
31915
  enabled?: boolean | undefined;
31915
- callbackUri?: string | undefined;
31916
31916
  inferScopesFromTools?: boolean | undefined;
31917
31917
  }, {
31918
+ callbackUrl?: string | undefined;
31918
31919
  enabled?: boolean | undefined;
31919
- callbackUri?: string | undefined;
31920
31920
  inferScopesFromTools?: boolean | undefined;
31921
31921
  }>]>>>>;
31922
31922
  execution: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
@@ -31938,8 +31938,8 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31938
31938
  authConfigs?: Record<string, string> | undefined;
31939
31939
  connectedAccounts?: Record<string, string> | undefined;
31940
31940
  manageConnections?: boolean | {
31941
+ callbackUrl?: string | undefined;
31941
31942
  enabled?: boolean | undefined;
31942
- callbackUri?: string | undefined;
31943
31943
  inferScopesFromTools?: boolean | undefined;
31944
31944
  } | undefined;
31945
31945
  execution?: {
@@ -31955,8 +31955,8 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31955
31955
  authConfigs?: Record<string, string> | undefined;
31956
31956
  connectedAccounts?: Record<string, string> | undefined;
31957
31957
  manageConnections?: boolean | {
31958
+ callbackUrl?: string | undefined;
31958
31959
  enabled?: boolean | undefined;
31959
- callbackUri?: string | undefined;
31960
31960
  inferScopesFromTools?: boolean | undefined;
31961
31961
  } | undefined;
31962
31962
  execution?: {
@@ -31974,7 +31974,7 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31974
31974
  * @param {Record<string, string>} connectedAccounts - The connected accounts to use in the tool router session
31975
31975
  * @param {ToolRouterConfigManageConnectionsSchema | boolean} manageConnections - The config for the manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually. If set to an object, you can configure the manage connections settings.
31976
31976
  * @param {boolean} [manageConnections.enabled] - Whether to use tools to manage connections in the tool router session @default true
31977
- * @param {string} [manageConnections.callbackUri] - The callback uri to use in the tool router session
31977
+ * @param {string} [manageConnections.callbackUrl] - The callback uri to use in the tool router session
31978
31978
  * @param {boolean} [manageConnections.inferScopesFromTools] - Whether to infer scopes from tools in the tool router session @default false
31979
31979
  */
31980
31980
  type ToolRouterCreateSessionConfig = z$1.infer<typeof ToolRouterCreateSessionConfigSchema>;
@@ -31983,7 +31983,7 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
31983
31983
  name: z$1.ZodString;
31984
31984
  logo: z$1.ZodOptional<z$1.ZodString>;
31985
31985
  isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
31986
- connection: z$1.ZodObject<{
31986
+ connection: z$1.ZodOptional<z$1.ZodObject<{
31987
31987
  isActive: z$1.ZodBoolean;
31988
31988
  authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
31989
31989
  id: z$1.ZodString;
@@ -32030,12 +32030,13 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32030
32030
  status: string;
32031
32031
  id: string;
32032
32032
  } | undefined;
32033
- }>;
32033
+ }>>;
32034
32034
  }, "strip", z$1.ZodTypeAny, {
32035
32035
  name: string;
32036
32036
  slug: string;
32037
32037
  isNoAuth: boolean;
32038
- connection: {
32038
+ logo?: string | undefined;
32039
+ connection?: {
32039
32040
  isActive: boolean;
32040
32041
  authConfig?: {
32041
32042
  id: string;
@@ -32046,12 +32047,13 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32046
32047
  status: string;
32047
32048
  id: string;
32048
32049
  } | undefined;
32049
- };
32050
- logo?: string | undefined;
32050
+ } | undefined;
32051
32051
  }, {
32052
32052
  name: string;
32053
32053
  slug: string;
32054
- connection: {
32054
+ logo?: string | undefined;
32055
+ isNoAuth?: boolean | undefined;
32056
+ connection?: {
32055
32057
  isActive: boolean;
32056
32058
  authConfig?: {
32057
32059
  id: string;
@@ -32062,9 +32064,7 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32062
32064
  status: string;
32063
32065
  id: string;
32064
32066
  } | undefined;
32065
- };
32066
- logo?: string | undefined;
32067
- isNoAuth?: boolean | undefined;
32067
+ } | undefined;
32068
32068
  }>;
32069
32069
  declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32070
32070
  items: z$1.ZodArray<z$1.ZodObject<{
@@ -32072,7 +32072,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32072
32072
  name: z$1.ZodString;
32073
32073
  logo: z$1.ZodOptional<z$1.ZodString>;
32074
32074
  isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
32075
- connection: z$1.ZodObject<{
32075
+ connection: z$1.ZodOptional<z$1.ZodObject<{
32076
32076
  isActive: z$1.ZodBoolean;
32077
32077
  authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
32078
32078
  id: z$1.ZodString;
@@ -32119,12 +32119,13 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32119
32119
  status: string;
32120
32120
  id: string;
32121
32121
  } | undefined;
32122
- }>;
32122
+ }>>;
32123
32123
  }, "strip", z$1.ZodTypeAny, {
32124
32124
  name: string;
32125
32125
  slug: string;
32126
32126
  isNoAuth: boolean;
32127
- connection: {
32127
+ logo?: string | undefined;
32128
+ connection?: {
32128
32129
  isActive: boolean;
32129
32130
  authConfig?: {
32130
32131
  id: string;
@@ -32135,12 +32136,13 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32135
32136
  status: string;
32136
32137
  id: string;
32137
32138
  } | undefined;
32138
- };
32139
- logo?: string | undefined;
32139
+ } | undefined;
32140
32140
  }, {
32141
32141
  name: string;
32142
32142
  slug: string;
32143
- connection: {
32143
+ logo?: string | undefined;
32144
+ isNoAuth?: boolean | undefined;
32145
+ connection?: {
32144
32146
  isActive: boolean;
32145
32147
  authConfig?: {
32146
32148
  id: string;
@@ -32151,9 +32153,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32151
32153
  status: string;
32152
32154
  id: string;
32153
32155
  } | undefined;
32154
- };
32155
- logo?: string | undefined;
32156
- isNoAuth?: boolean | undefined;
32156
+ } | undefined;
32157
32157
  }>, "many">;
32158
32158
  nextCursor: z$1.ZodOptional<z$1.ZodString>;
32159
32159
  totalPages: z$1.ZodNumber;
@@ -32162,7 +32162,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32162
32162
  name: string;
32163
32163
  slug: string;
32164
32164
  isNoAuth: boolean;
32165
- connection: {
32165
+ logo?: string | undefined;
32166
+ connection?: {
32166
32167
  isActive: boolean;
32167
32168
  authConfig?: {
32168
32169
  id: string;
@@ -32173,8 +32174,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32173
32174
  status: string;
32174
32175
  id: string;
32175
32176
  } | undefined;
32176
- };
32177
- logo?: string | undefined;
32177
+ } | undefined;
32178
32178
  }[];
32179
32179
  totalPages: number;
32180
32180
  nextCursor?: string | undefined;
@@ -32182,7 +32182,9 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32182
32182
  items: {
32183
32183
  name: string;
32184
32184
  slug: string;
32185
- connection: {
32185
+ logo?: string | undefined;
32186
+ isNoAuth?: boolean | undefined;
32187
+ connection?: {
32186
32188
  isActive: boolean;
32187
32189
  authConfig?: {
32188
32190
  id: string;
@@ -32193,28 +32195,49 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32193
32195
  status: string;
32194
32196
  id: string;
32195
32197
  } | undefined;
32196
- };
32197
- logo?: string | undefined;
32198
- isNoAuth?: boolean | undefined;
32198
+ } | undefined;
32199
32199
  }[];
32200
32200
  totalPages: number;
32201
32201
  nextCursor?: string | undefined;
32202
32202
  }>;
32203
32203
  type ToolkitConnectionsDetails = z$1.infer<typeof ToolkitConnectionsDetailsSchema>;
32204
32204
  type ToolkitConnectionState = z$1.infer<typeof ToolkitConnectionStateSchema>;
32205
- type ToolRouterMCPServerConfig = {
32206
- type: MCPServerType;
32205
+ declare const ToolRouterMCPServerConfigSchema: z$1.ZodObject<{
32206
+ type: z$1.ZodEnum<["http", "sse"]>;
32207
+ url: z$1.ZodString;
32208
+ headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodOptional<z$1.ZodString>>>;
32209
+ }, "strip", z$1.ZodTypeAny, {
32210
+ type: "http" | "sse";
32207
32211
  url: string;
32208
- };
32212
+ headers?: Record<string, string | undefined> | undefined;
32213
+ }, {
32214
+ type: "http" | "sse";
32215
+ url: string;
32216
+ headers?: Record<string, string | undefined> | undefined;
32217
+ }>;
32218
+ type ToolRouterMCPServerConfig = z$1.infer<typeof ToolRouterMCPServerConfigSchema>;
32209
32219
  type ToolRouterToolsFn<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> = (modifiers?: ProviderOptions<TProvider>) => Promise<ReturnType<TProvider['wrapTools']>>;
32210
32220
  type ToolRouterAuthorizeFn = (toolkit: string, options?: {
32211
32221
  callbackUrl?: string;
32212
32222
  }) => Promise<ConnectionRequest>;
32213
- type ToolRouterToolkitsFn = (options?: {
32214
- toolkits?: Array<string>;
32215
- nextCursor?: string;
32216
- limit?: number;
32217
- }) => Promise<ToolkitConnectionsDetails>;
32223
+ declare const ToolRouterToolkitsOptionsSchema: z$1.ZodObject<{
32224
+ toolkits: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
32225
+ nextCursor: z$1.ZodOptional<z$1.ZodString>;
32226
+ limit: z$1.ZodOptional<z$1.ZodNumber>;
32227
+ isConnected: z$1.ZodOptional<z$1.ZodBoolean>;
32228
+ }, "strip", z$1.ZodTypeAny, {
32229
+ limit?: number | undefined;
32230
+ nextCursor?: string | undefined;
32231
+ toolkits?: string[] | undefined;
32232
+ isConnected?: boolean | undefined;
32233
+ }, {
32234
+ limit?: number | undefined;
32235
+ nextCursor?: string | undefined;
32236
+ toolkits?: string[] | undefined;
32237
+ isConnected?: boolean | undefined;
32238
+ }>;
32239
+ type ToolRouterToolkitsOptions = z$1.infer<typeof ToolRouterToolkitsOptionsSchema>;
32240
+ type ToolRouterToolkitsFn = (options?: ToolRouterToolkitsOptions) => Promise<ToolkitConnectionsDetails>;
32218
32241
  interface ToolRouterSession<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
32219
32242
  /**
32220
32243
  * The session id of the tool router session.
@@ -32288,6 +32311,13 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
32288
32311
  * @returns A function that wraps the tools based on the provider.
32289
32312
  */
32290
32313
  private createToolsFn;
32314
+ /**
32315
+ * Creates a MCP server config object.
32316
+ * @param type {MCPServerType} The type of the MCP server
32317
+ * @param url {string} The URL of the MCP server
32318
+ * @returns {ToolRouterMCPServerConfig} The MCP server config object
32319
+ */
32320
+ private createMCPServerConfig;
32291
32321
  /**
32292
32322
  * Creates a new tool router session for a user.
32293
32323
  *
@@ -33116,4 +33146,4 @@ declare class ComposioNoAPIKeyError extends ComposioError {
33116
33146
  constructor(message?: string, options?: Omit<ComposioErrorOptions, 'code' | 'statusCode'>);
33117
33147
  }
33118
33148
 
33119
- export { type AgenticToolOptions, AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, type ComposioAPIServerErrorBody, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioFailedToCreateConnectedAccountLink, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, type ConnectedAccountAuthConfig, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, type ConnectedAccountListParams, ConnectedAccountListParamsSchema, type ConnectedAccountListResponse, type ConnectedAccountListResponseItem, ConnectedAccountListResponseSchema, type ConnectedAccountRetrieveResponse, ConnectedAccountRetrieveResponseSchema, type ConnectedAccountStatus, type ConnectedAccountStatusEnum, ConnectedAccountStatusSchema, ConnectedAccountStatuses, type ConnectionData, ConnectionDataSchema, type ConnectionRequest, ConnectionRequestErrorCodes, ConnectionRequestFailedError, type ConnectionRequestState, ConnectionRequestTimeoutError, ConnectionStatus, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, type CreateConnectedAccountLinkOptions, CreateConnectedAccountLinkOptionsSchema, type CreateConnectedAccountLinkResponse, CreateConnectedAccountLinkResponseSchema, type CreateConnectedAccountOptions, CreateConnectedAccountOptionsSchema, type CreateConnectedAccountParams, CreateConnectedAccountParamsSchema, type CreateConnectedAccountResponse, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, type CustomConnectionData, CustomConnectionDataSchema, type CustomCreateResponse, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomOauth1ConnectionData, CustomOauth1ConnectionDataSchema, type CustomOauth2ConnectionData, CustomOauth2ConnectionDataSchema, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, DefaultCreateConnectedAccountParamsSchema, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, type FileDownloadData, type FileUploadData, type GenerateURLParams, GenerateURLParamsSchema, type GenerateURLResponse, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, type JSONSchemaProperty, JSONSchemaPropertySchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerType, MCPServerTypeSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponse, McpDeleteResponseSchema, type McpListResponse, McpListResponseSchema, type McpRetrieveResponse, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpToolkitConnectionStatus, type McpUpdateResponse, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type McpUserConnectionStatus, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InactiveConnectionData, Oauth1InactiveConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InactiveConnectionData, Oauth2InactiveConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type SchemaModifierOptions, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, type ToolRouterAuthorizeFn, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, type ToolRouterConfigTools, ToolRouterConfigToolsSchema, type ToolRouterCreateSessionConfig, ToolRouterCreateSessionConfigSchema, ToolRouterDisabledTagsConfigSchema, ToolRouterEnabledTagsConfigSchema, type ToolRouterMCPServerConfig, ToolRouterManageConnectionsConfigSchema, type ToolRouterSession, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, type ToolRouterToolkitsFn, ToolRouterToolkitsParamSchema, type ToolRouterToolsFn, ToolRouterToolsParamSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, type ToolkitConnectionState, ToolkitConnectionStateSchema, type ToolkitConnectionsDetails, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, type ToolkitLatestVersion, ToolkitLatestVersionSchema, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, type ToolkitVersion, type ToolkitVersionParam, ToolkitVersionParamSchema, ToolkitVersionSchema, type ToolkitVersions, ToolkitVersionsSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerEvent, type TriggerEventData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, type TriggerType, TriggerTypeSchema, type TriggersTypeListParams, TriggersTypeListParamsSchema, type TriggersTypeListResponse, TriggersTypeListResponseSchema, type TriggersTypeRetrieveResponse, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, createConnectionRequest, handleToolExecutionError, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
33149
+ export { type AgenticToolOptions, AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, type ComposioAPIServerErrorBody, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioFailedToCreateConnectedAccountLink, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, type ConnectedAccountAuthConfig, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, type ConnectedAccountListParams, ConnectedAccountListParamsSchema, type ConnectedAccountListResponse, type ConnectedAccountListResponseItem, ConnectedAccountListResponseSchema, type ConnectedAccountRetrieveResponse, ConnectedAccountRetrieveResponseSchema, type ConnectedAccountStatus, type ConnectedAccountStatusEnum, ConnectedAccountStatusSchema, ConnectedAccountStatuses, type ConnectionData, ConnectionDataSchema, type ConnectionRequest, ConnectionRequestErrorCodes, ConnectionRequestFailedError, type ConnectionRequestState, ConnectionRequestTimeoutError, ConnectionStatus, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, type CreateConnectedAccountLinkOptions, CreateConnectedAccountLinkOptionsSchema, type CreateConnectedAccountLinkResponse, CreateConnectedAccountLinkResponseSchema, type CreateConnectedAccountOptions, CreateConnectedAccountOptionsSchema, type CreateConnectedAccountParams, CreateConnectedAccountParamsSchema, type CreateConnectedAccountResponse, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, type CustomConnectionData, CustomConnectionDataSchema, type CustomCreateResponse, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomOauth1ConnectionData, CustomOauth1ConnectionDataSchema, type CustomOauth2ConnectionData, CustomOauth2ConnectionDataSchema, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, DefaultCreateConnectedAccountParamsSchema, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, type FileDownloadData, type FileUploadData, type GenerateURLParams, GenerateURLParamsSchema, type GenerateURLResponse, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, type JSONSchemaProperty, JSONSchemaPropertySchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerType, MCPServerTypeSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponse, McpDeleteResponseSchema, type McpListResponse, McpListResponseSchema, type McpRetrieveResponse, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpToolkitConnectionStatus, type McpUpdateResponse, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type McpUserConnectionStatus, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InactiveConnectionData, Oauth1InactiveConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InactiveConnectionData, Oauth2InactiveConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type SchemaModifierOptions, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, type ToolRouterAuthorizeFn, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, type ToolRouterConfigTools, ToolRouterConfigToolsSchema, type ToolRouterCreateSessionConfig, ToolRouterCreateSessionConfigSchema, ToolRouterDisabledTagsConfigSchema, ToolRouterEnabledTagsConfigSchema, type ToolRouterMCPServerConfig, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, type ToolRouterSession, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, type ToolRouterToolkitsFn, type ToolRouterToolkitsOptions, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, type ToolRouterToolsFn, ToolRouterToolsParamSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, type ToolkitConnectionState, ToolkitConnectionStateSchema, type ToolkitConnectionsDetails, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, type ToolkitLatestVersion, ToolkitLatestVersionSchema, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, type ToolkitVersion, type ToolkitVersionParam, ToolkitVersionParamSchema, ToolkitVersionSchema, type ToolkitVersions, ToolkitVersionsSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerEvent, type TriggerEventData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, type TriggerType, TriggerTypeSchema, type TriggersTypeListParams, TriggersTypeListParamsSchema, type TriggersTypeListResponse, TriggersTypeListResponseSchema, type TriggersTypeRetrieveResponse, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, createConnectionRequest, handleToolExecutionError, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
package/dist/index.d.ts CHANGED
@@ -31738,19 +31738,19 @@ declare class Files {
31738
31738
  }): Promise<FileDownloadData>;
31739
31739
  }
31740
31740
 
31741
- declare const MCPServerTypeSchema: z$1.ZodEnum<["HTTP", "SSE"]>;
31741
+ declare const MCPServerTypeSchema: z$1.ZodEnum<["http", "sse"]>;
31742
31742
  type MCPServerType = z$1.infer<typeof MCPServerTypeSchema>;
31743
31743
  declare const ToolRouterConfigManageConnectionsSchema: z$1.ZodObject<{
31744
31744
  enabled: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31745
- callbackUri: z$1.ZodOptional<z$1.ZodString>;
31745
+ callbackUrl: z$1.ZodOptional<z$1.ZodString>;
31746
31746
  inferScopesFromTools: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31747
31747
  }, "strict", z$1.ZodTypeAny, {
31748
+ callbackUrl?: string | undefined;
31748
31749
  enabled?: boolean | undefined;
31749
- callbackUri?: string | undefined;
31750
31750
  inferScopesFromTools?: boolean | undefined;
31751
31751
  }, {
31752
+ callbackUrl?: string | undefined;
31752
31753
  enabled?: boolean | undefined;
31753
- callbackUri?: string | undefined;
31754
31754
  inferScopesFromTools?: boolean | undefined;
31755
31755
  }>;
31756
31756
  declare const ToolRouterToolkitsParamSchema: z$1.ZodArray<z$1.ZodString, "many">;
@@ -31908,15 +31908,15 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31908
31908
  connectedAccounts: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
31909
31909
  manageConnections: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodBoolean, z$1.ZodObject<{
31910
31910
  enabled: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31911
- callbackUri: z$1.ZodOptional<z$1.ZodString>;
31911
+ callbackUrl: z$1.ZodOptional<z$1.ZodString>;
31912
31912
  inferScopesFromTools: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
31913
31913
  }, "strict", z$1.ZodTypeAny, {
31914
+ callbackUrl?: string | undefined;
31914
31915
  enabled?: boolean | undefined;
31915
- callbackUri?: string | undefined;
31916
31916
  inferScopesFromTools?: boolean | undefined;
31917
31917
  }, {
31918
+ callbackUrl?: string | undefined;
31918
31919
  enabled?: boolean | undefined;
31919
- callbackUri?: string | undefined;
31920
31920
  inferScopesFromTools?: boolean | undefined;
31921
31921
  }>]>>>>;
31922
31922
  execution: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
@@ -31938,8 +31938,8 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31938
31938
  authConfigs?: Record<string, string> | undefined;
31939
31939
  connectedAccounts?: Record<string, string> | undefined;
31940
31940
  manageConnections?: boolean | {
31941
+ callbackUrl?: string | undefined;
31941
31942
  enabled?: boolean | undefined;
31942
- callbackUri?: string | undefined;
31943
31943
  inferScopesFromTools?: boolean | undefined;
31944
31944
  } | undefined;
31945
31945
  execution?: {
@@ -31955,8 +31955,8 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31955
31955
  authConfigs?: Record<string, string> | undefined;
31956
31956
  connectedAccounts?: Record<string, string> | undefined;
31957
31957
  manageConnections?: boolean | {
31958
+ callbackUrl?: string | undefined;
31958
31959
  enabled?: boolean | undefined;
31959
- callbackUri?: string | undefined;
31960
31960
  inferScopesFromTools?: boolean | undefined;
31961
31961
  } | undefined;
31962
31962
  execution?: {
@@ -31974,7 +31974,7 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
31974
31974
  * @param {Record<string, string>} connectedAccounts - The connected accounts to use in the tool router session
31975
31975
  * @param {ToolRouterConfigManageConnectionsSchema | boolean} manageConnections - The config for the manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually. If set to an object, you can configure the manage connections settings.
31976
31976
  * @param {boolean} [manageConnections.enabled] - Whether to use tools to manage connections in the tool router session @default true
31977
- * @param {string} [manageConnections.callbackUri] - The callback uri to use in the tool router session
31977
+ * @param {string} [manageConnections.callbackUrl] - The callback uri to use in the tool router session
31978
31978
  * @param {boolean} [manageConnections.inferScopesFromTools] - Whether to infer scopes from tools in the tool router session @default false
31979
31979
  */
31980
31980
  type ToolRouterCreateSessionConfig = z$1.infer<typeof ToolRouterCreateSessionConfigSchema>;
@@ -31983,7 +31983,7 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
31983
31983
  name: z$1.ZodString;
31984
31984
  logo: z$1.ZodOptional<z$1.ZodString>;
31985
31985
  isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
31986
- connection: z$1.ZodObject<{
31986
+ connection: z$1.ZodOptional<z$1.ZodObject<{
31987
31987
  isActive: z$1.ZodBoolean;
31988
31988
  authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
31989
31989
  id: z$1.ZodString;
@@ -32030,12 +32030,13 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32030
32030
  status: string;
32031
32031
  id: string;
32032
32032
  } | undefined;
32033
- }>;
32033
+ }>>;
32034
32034
  }, "strip", z$1.ZodTypeAny, {
32035
32035
  name: string;
32036
32036
  slug: string;
32037
32037
  isNoAuth: boolean;
32038
- connection: {
32038
+ logo?: string | undefined;
32039
+ connection?: {
32039
32040
  isActive: boolean;
32040
32041
  authConfig?: {
32041
32042
  id: string;
@@ -32046,12 +32047,13 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32046
32047
  status: string;
32047
32048
  id: string;
32048
32049
  } | undefined;
32049
- };
32050
- logo?: string | undefined;
32050
+ } | undefined;
32051
32051
  }, {
32052
32052
  name: string;
32053
32053
  slug: string;
32054
- connection: {
32054
+ logo?: string | undefined;
32055
+ isNoAuth?: boolean | undefined;
32056
+ connection?: {
32055
32057
  isActive: boolean;
32056
32058
  authConfig?: {
32057
32059
  id: string;
@@ -32062,9 +32064,7 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
32062
32064
  status: string;
32063
32065
  id: string;
32064
32066
  } | undefined;
32065
- };
32066
- logo?: string | undefined;
32067
- isNoAuth?: boolean | undefined;
32067
+ } | undefined;
32068
32068
  }>;
32069
32069
  declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32070
32070
  items: z$1.ZodArray<z$1.ZodObject<{
@@ -32072,7 +32072,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32072
32072
  name: z$1.ZodString;
32073
32073
  logo: z$1.ZodOptional<z$1.ZodString>;
32074
32074
  isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
32075
- connection: z$1.ZodObject<{
32075
+ connection: z$1.ZodOptional<z$1.ZodObject<{
32076
32076
  isActive: z$1.ZodBoolean;
32077
32077
  authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
32078
32078
  id: z$1.ZodString;
@@ -32119,12 +32119,13 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32119
32119
  status: string;
32120
32120
  id: string;
32121
32121
  } | undefined;
32122
- }>;
32122
+ }>>;
32123
32123
  }, "strip", z$1.ZodTypeAny, {
32124
32124
  name: string;
32125
32125
  slug: string;
32126
32126
  isNoAuth: boolean;
32127
- connection: {
32127
+ logo?: string | undefined;
32128
+ connection?: {
32128
32129
  isActive: boolean;
32129
32130
  authConfig?: {
32130
32131
  id: string;
@@ -32135,12 +32136,13 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32135
32136
  status: string;
32136
32137
  id: string;
32137
32138
  } | undefined;
32138
- };
32139
- logo?: string | undefined;
32139
+ } | undefined;
32140
32140
  }, {
32141
32141
  name: string;
32142
32142
  slug: string;
32143
- connection: {
32143
+ logo?: string | undefined;
32144
+ isNoAuth?: boolean | undefined;
32145
+ connection?: {
32144
32146
  isActive: boolean;
32145
32147
  authConfig?: {
32146
32148
  id: string;
@@ -32151,9 +32153,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32151
32153
  status: string;
32152
32154
  id: string;
32153
32155
  } | undefined;
32154
- };
32155
- logo?: string | undefined;
32156
- isNoAuth?: boolean | undefined;
32156
+ } | undefined;
32157
32157
  }>, "many">;
32158
32158
  nextCursor: z$1.ZodOptional<z$1.ZodString>;
32159
32159
  totalPages: z$1.ZodNumber;
@@ -32162,7 +32162,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32162
32162
  name: string;
32163
32163
  slug: string;
32164
32164
  isNoAuth: boolean;
32165
- connection: {
32165
+ logo?: string | undefined;
32166
+ connection?: {
32166
32167
  isActive: boolean;
32167
32168
  authConfig?: {
32168
32169
  id: string;
@@ -32173,8 +32174,7 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32173
32174
  status: string;
32174
32175
  id: string;
32175
32176
  } | undefined;
32176
- };
32177
- logo?: string | undefined;
32177
+ } | undefined;
32178
32178
  }[];
32179
32179
  totalPages: number;
32180
32180
  nextCursor?: string | undefined;
@@ -32182,7 +32182,9 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32182
32182
  items: {
32183
32183
  name: string;
32184
32184
  slug: string;
32185
- connection: {
32185
+ logo?: string | undefined;
32186
+ isNoAuth?: boolean | undefined;
32187
+ connection?: {
32186
32188
  isActive: boolean;
32187
32189
  authConfig?: {
32188
32190
  id: string;
@@ -32193,28 +32195,49 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
32193
32195
  status: string;
32194
32196
  id: string;
32195
32197
  } | undefined;
32196
- };
32197
- logo?: string | undefined;
32198
- isNoAuth?: boolean | undefined;
32198
+ } | undefined;
32199
32199
  }[];
32200
32200
  totalPages: number;
32201
32201
  nextCursor?: string | undefined;
32202
32202
  }>;
32203
32203
  type ToolkitConnectionsDetails = z$1.infer<typeof ToolkitConnectionsDetailsSchema>;
32204
32204
  type ToolkitConnectionState = z$1.infer<typeof ToolkitConnectionStateSchema>;
32205
- type ToolRouterMCPServerConfig = {
32206
- type: MCPServerType;
32205
+ declare const ToolRouterMCPServerConfigSchema: z$1.ZodObject<{
32206
+ type: z$1.ZodEnum<["http", "sse"]>;
32207
+ url: z$1.ZodString;
32208
+ headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodOptional<z$1.ZodString>>>;
32209
+ }, "strip", z$1.ZodTypeAny, {
32210
+ type: "http" | "sse";
32207
32211
  url: string;
32208
- };
32212
+ headers?: Record<string, string | undefined> | undefined;
32213
+ }, {
32214
+ type: "http" | "sse";
32215
+ url: string;
32216
+ headers?: Record<string, string | undefined> | undefined;
32217
+ }>;
32218
+ type ToolRouterMCPServerConfig = z$1.infer<typeof ToolRouterMCPServerConfigSchema>;
32209
32219
  type ToolRouterToolsFn<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> = (modifiers?: ProviderOptions<TProvider>) => Promise<ReturnType<TProvider['wrapTools']>>;
32210
32220
  type ToolRouterAuthorizeFn = (toolkit: string, options?: {
32211
32221
  callbackUrl?: string;
32212
32222
  }) => Promise<ConnectionRequest>;
32213
- type ToolRouterToolkitsFn = (options?: {
32214
- toolkits?: Array<string>;
32215
- nextCursor?: string;
32216
- limit?: number;
32217
- }) => Promise<ToolkitConnectionsDetails>;
32223
+ declare const ToolRouterToolkitsOptionsSchema: z$1.ZodObject<{
32224
+ toolkits: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
32225
+ nextCursor: z$1.ZodOptional<z$1.ZodString>;
32226
+ limit: z$1.ZodOptional<z$1.ZodNumber>;
32227
+ isConnected: z$1.ZodOptional<z$1.ZodBoolean>;
32228
+ }, "strip", z$1.ZodTypeAny, {
32229
+ limit?: number | undefined;
32230
+ nextCursor?: string | undefined;
32231
+ toolkits?: string[] | undefined;
32232
+ isConnected?: boolean | undefined;
32233
+ }, {
32234
+ limit?: number | undefined;
32235
+ nextCursor?: string | undefined;
32236
+ toolkits?: string[] | undefined;
32237
+ isConnected?: boolean | undefined;
32238
+ }>;
32239
+ type ToolRouterToolkitsOptions = z$1.infer<typeof ToolRouterToolkitsOptionsSchema>;
32240
+ type ToolRouterToolkitsFn = (options?: ToolRouterToolkitsOptions) => Promise<ToolkitConnectionsDetails>;
32218
32241
  interface ToolRouterSession<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
32219
32242
  /**
32220
32243
  * The session id of the tool router session.
@@ -32288,6 +32311,13 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
32288
32311
  * @returns A function that wraps the tools based on the provider.
32289
32312
  */
32290
32313
  private createToolsFn;
32314
+ /**
32315
+ * Creates a MCP server config object.
32316
+ * @param type {MCPServerType} The type of the MCP server
32317
+ * @param url {string} The URL of the MCP server
32318
+ * @returns {ToolRouterMCPServerConfig} The MCP server config object
32319
+ */
32320
+ private createMCPServerConfig;
32291
32321
  /**
32292
32322
  * Creates a new tool router session for a user.
32293
32323
  *
@@ -33116,4 +33146,4 @@ declare class ComposioNoAPIKeyError extends ComposioError {
33116
33146
  constructor(message?: string, options?: Omit<ComposioErrorOptions, 'code' | 'statusCode'>);
33117
33147
  }
33118
33148
 
33119
- export { type AgenticToolOptions, AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, type ComposioAPIServerErrorBody, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioFailedToCreateConnectedAccountLink, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, type ConnectedAccountAuthConfig, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, type ConnectedAccountListParams, ConnectedAccountListParamsSchema, type ConnectedAccountListResponse, type ConnectedAccountListResponseItem, ConnectedAccountListResponseSchema, type ConnectedAccountRetrieveResponse, ConnectedAccountRetrieveResponseSchema, type ConnectedAccountStatus, type ConnectedAccountStatusEnum, ConnectedAccountStatusSchema, ConnectedAccountStatuses, type ConnectionData, ConnectionDataSchema, type ConnectionRequest, ConnectionRequestErrorCodes, ConnectionRequestFailedError, type ConnectionRequestState, ConnectionRequestTimeoutError, ConnectionStatus, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, type CreateConnectedAccountLinkOptions, CreateConnectedAccountLinkOptionsSchema, type CreateConnectedAccountLinkResponse, CreateConnectedAccountLinkResponseSchema, type CreateConnectedAccountOptions, CreateConnectedAccountOptionsSchema, type CreateConnectedAccountParams, CreateConnectedAccountParamsSchema, type CreateConnectedAccountResponse, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, type CustomConnectionData, CustomConnectionDataSchema, type CustomCreateResponse, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomOauth1ConnectionData, CustomOauth1ConnectionDataSchema, type CustomOauth2ConnectionData, CustomOauth2ConnectionDataSchema, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, DefaultCreateConnectedAccountParamsSchema, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, type FileDownloadData, type FileUploadData, type GenerateURLParams, GenerateURLParamsSchema, type GenerateURLResponse, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, type JSONSchemaProperty, JSONSchemaPropertySchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerType, MCPServerTypeSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponse, McpDeleteResponseSchema, type McpListResponse, McpListResponseSchema, type McpRetrieveResponse, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpToolkitConnectionStatus, type McpUpdateResponse, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type McpUserConnectionStatus, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InactiveConnectionData, Oauth1InactiveConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InactiveConnectionData, Oauth2InactiveConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type SchemaModifierOptions, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, type ToolRouterAuthorizeFn, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, type ToolRouterConfigTools, ToolRouterConfigToolsSchema, type ToolRouterCreateSessionConfig, ToolRouterCreateSessionConfigSchema, ToolRouterDisabledTagsConfigSchema, ToolRouterEnabledTagsConfigSchema, type ToolRouterMCPServerConfig, ToolRouterManageConnectionsConfigSchema, type ToolRouterSession, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, type ToolRouterToolkitsFn, ToolRouterToolkitsParamSchema, type ToolRouterToolsFn, ToolRouterToolsParamSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, type ToolkitConnectionState, ToolkitConnectionStateSchema, type ToolkitConnectionsDetails, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, type ToolkitLatestVersion, ToolkitLatestVersionSchema, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, type ToolkitVersion, type ToolkitVersionParam, ToolkitVersionParamSchema, ToolkitVersionSchema, type ToolkitVersions, ToolkitVersionsSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerEvent, type TriggerEventData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, type TriggerType, TriggerTypeSchema, type TriggersTypeListParams, TriggersTypeListParamsSchema, type TriggersTypeListResponse, TriggersTypeListResponseSchema, type TriggersTypeRetrieveResponse, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, createConnectionRequest, handleToolExecutionError, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
33149
+ export { type AgenticToolOptions, AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, type ComposioAPIServerErrorBody, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioFailedToCreateConnectedAccountLink, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, type ConnectedAccountAuthConfig, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, type ConnectedAccountListParams, ConnectedAccountListParamsSchema, type ConnectedAccountListResponse, type ConnectedAccountListResponseItem, ConnectedAccountListResponseSchema, type ConnectedAccountRetrieveResponse, ConnectedAccountRetrieveResponseSchema, type ConnectedAccountStatus, type ConnectedAccountStatusEnum, ConnectedAccountStatusSchema, ConnectedAccountStatuses, type ConnectionData, ConnectionDataSchema, type ConnectionRequest, ConnectionRequestErrorCodes, ConnectionRequestFailedError, type ConnectionRequestState, ConnectionRequestTimeoutError, ConnectionStatus, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, type CreateConnectedAccountLinkOptions, CreateConnectedAccountLinkOptionsSchema, type CreateConnectedAccountLinkResponse, CreateConnectedAccountLinkResponseSchema, type CreateConnectedAccountOptions, CreateConnectedAccountOptionsSchema, type CreateConnectedAccountParams, CreateConnectedAccountParamsSchema, type CreateConnectedAccountResponse, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, type CustomConnectionData, CustomConnectionDataSchema, type CustomCreateResponse, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomOauth1ConnectionData, CustomOauth1ConnectionDataSchema, type CustomOauth2ConnectionData, CustomOauth2ConnectionDataSchema, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, DefaultCreateConnectedAccountParamsSchema, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, type FileDownloadData, type FileUploadData, type GenerateURLParams, GenerateURLParamsSchema, type GenerateURLResponse, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, type JSONSchemaProperty, JSONSchemaPropertySchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerType, MCPServerTypeSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponse, McpDeleteResponseSchema, type McpListResponse, McpListResponseSchema, type McpRetrieveResponse, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpToolkitConnectionStatus, type McpUpdateResponse, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type McpUserConnectionStatus, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InactiveConnectionData, Oauth1InactiveConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InactiveConnectionData, Oauth2InactiveConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type SchemaModifierOptions, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, type ToolRouterAuthorizeFn, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, type ToolRouterConfigTools, ToolRouterConfigToolsSchema, type ToolRouterCreateSessionConfig, ToolRouterCreateSessionConfigSchema, ToolRouterDisabledTagsConfigSchema, ToolRouterEnabledTagsConfigSchema, type ToolRouterMCPServerConfig, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, type ToolRouterSession, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, type ToolRouterToolkitsFn, type ToolRouterToolkitsOptions, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, type ToolRouterToolsFn, ToolRouterToolsParamSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, type ToolkitConnectionState, ToolkitConnectionStateSchema, type ToolkitConnectionsDetails, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, type ToolkitLatestVersion, ToolkitLatestVersionSchema, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, type ToolkitVersion, type ToolkitVersionParam, ToolkitVersionParamSchema, ToolkitVersionSchema, type ToolkitVersions, ToolkitVersionsSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerEvent, type TriggerEventData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, type TriggerType, TriggerTypeSchema, type TriggersTypeListParams, TriggersTypeListParamsSchema, type TriggersTypeListResponse, TriggersTypeListResponseSchema, type TriggersTypeRetrieveResponse, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, createConnectionRequest, handleToolExecutionError, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
package/dist/index.js CHANGED
@@ -7499,7 +7499,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
7499
7499
  };
7500
7500
 
7501
7501
  // package.json
7502
- var version = "0.2.7-alpha.2";
7502
+ var version = "0.2.7-alpha.3";
7503
7503
 
7504
7504
  // src/models/Files.ts
7505
7505
  var Files = class {
@@ -7595,12 +7595,12 @@ var getDefaultHeaders = (headers, provider) => {
7595
7595
 
7596
7596
  // src/types/toolRouter.types.ts
7597
7597
  import z10 from "zod/v3";
7598
- var MCPServerTypeSchema = z10.enum(["HTTP", "SSE"]);
7598
+ var MCPServerTypeSchema = z10.enum(["http", "sse"]);
7599
7599
  var ToolRouterConfigManageConnectionsSchema = z10.object({
7600
7600
  enabled: z10.boolean().default(true).optional().describe(
7601
7601
  "Whether to use tools to manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually"
7602
7602
  ),
7603
- callbackUri: z10.string().optional().describe("The callback uri to use in the tool router session"),
7603
+ callbackUrl: z10.string().optional().describe("The callback uri to use in the tool router session"),
7604
7604
  inferScopesFromTools: z10.boolean().default(false).optional().describe(
7605
7605
  "Whether to infer scopes from tools in the tool router session. Defaults to false, if set to true, tool router will infer scopes from allowed tools"
7606
7606
  )
@@ -7693,13 +7693,24 @@ var ToolkitConnectionStateSchema = z10.object({
7693
7693
  id: z10.string().describe("The id of the connected account"),
7694
7694
  status: z10.string().describe("The status of the connected account")
7695
7695
  }).optional().describe("The connected account of a toolkit")
7696
- })
7696
+ }).optional().describe("The connection of a toolkit")
7697
7697
  }).describe("The connection state of a toolkit");
7698
7698
  var ToolkitConnectionsDetailsSchema = z10.object({
7699
7699
  items: z10.array(ToolkitConnectionStateSchema),
7700
7700
  nextCursor: z10.string().optional(),
7701
7701
  totalPages: z10.number()
7702
7702
  });
7703
+ var ToolRouterMCPServerConfigSchema = z10.object({
7704
+ type: MCPServerTypeSchema,
7705
+ url: z10.string(),
7706
+ headers: z10.record(z10.string(), z10.string().optional()).optional()
7707
+ });
7708
+ var ToolRouterToolkitsOptionsSchema = z10.object({
7709
+ toolkits: z10.array(z10.string()).optional(),
7710
+ nextCursor: z10.string().optional(),
7711
+ limit: z10.number().optional(),
7712
+ isConnected: z10.boolean().optional()
7713
+ });
7703
7714
 
7704
7715
  // src/models/ToolRouter.ts
7705
7716
  var ToolRouter = class {
@@ -7747,18 +7758,25 @@ var ToolRouter = class {
7747
7758
  */
7748
7759
  createToolkitsFn = (sessionId) => {
7749
7760
  const connectionsFn = async (options) => {
7761
+ const toolkitOptions = ToolRouterToolkitsOptionsSchema.safeParse(options ?? {});
7762
+ if (!toolkitOptions.success) {
7763
+ throw new ValidationError("Failed to parse toolkits options", {
7764
+ cause: toolkitOptions.error
7765
+ });
7766
+ }
7750
7767
  const result = await this.client.toolRouter.session.toolkits(sessionId, {
7751
- cursor: options?.nextCursor,
7752
- limit: options?.limit,
7753
- toolkits: options?.toolkits
7768
+ cursor: toolkitOptions.data.nextCursor,
7769
+ limit: toolkitOptions.data.limit,
7770
+ toolkits: toolkitOptions.data.toolkits,
7771
+ is_connected: toolkitOptions.data.isConnected
7754
7772
  });
7755
7773
  const toolkitConnectedStates = result.items.map((item) => {
7756
7774
  const connectedState = transform(item).with(ToolkitConnectionStateSchema).using((item2) => ({
7757
7775
  slug: item2.slug,
7758
7776
  name: item2.name,
7759
- logo: item2.meta.logo,
7760
- isNoAuth: false,
7761
- connection: {
7777
+ logo: item2.meta?.logo,
7778
+ isNoAuth: item2.is_no_auth,
7779
+ connection: item2.is_no_auth ? void 0 : {
7762
7780
  isActive: item2.connected_account?.status === "ACTIVE",
7763
7781
  authConfig: item2.connected_account && {
7764
7782
  id: item2.connected_account?.auth_config.id,
@@ -7803,6 +7821,24 @@ var ToolRouter = class {
7803
7821
  return tools;
7804
7822
  };
7805
7823
  };
7824
+ /**
7825
+ * Creates a MCP server config object.
7826
+ * @param type {MCPServerType} The type of the MCP server
7827
+ * @param url {string} The URL of the MCP server
7828
+ * @returns {ToolRouterMCPServerConfig} The MCP server config object
7829
+ */
7830
+ createMCPServerConfig = ({
7831
+ type,
7832
+ url
7833
+ }) => {
7834
+ return {
7835
+ type,
7836
+ url,
7837
+ headers: {
7838
+ "x-api-key": this.config?.apiKey ?? void 0
7839
+ }
7840
+ };
7841
+ };
7806
7842
  /**
7807
7843
  * Creates a new tool router session for a user.
7808
7844
  *
@@ -7841,7 +7877,7 @@ var ToolRouter = class {
7841
7877
  connections: {
7842
7878
  infer_scopes_from_tools: inferScopesFromTools,
7843
7879
  auto_manage_connections: manageConnectedAccounts,
7844
- callback_uri: typeof routerConfig.manageConnections === "object" ? routerConfig.manageConnections.callbackUri : void 0
7880
+ callback_url: typeof routerConfig.manageConnections === "object" ? routerConfig.manageConnections.callbackUrl : void 0
7845
7881
  },
7846
7882
  execution: routerConfig.execution ? {
7847
7883
  proxy_execution_enabled: routerConfig.execution?.proxyExecutionEnabled,
@@ -7851,10 +7887,7 @@ var ToolRouter = class {
7851
7887
  const session = await this.client.toolRouter.session.create(payload);
7852
7888
  return {
7853
7889
  sessionId: session.session_id,
7854
- mcp: {
7855
- type: session.mcp.type,
7856
- url: session.mcp.url
7857
- },
7890
+ mcp: this.createMCPServerConfig(session.mcp),
7858
7891
  tools: this.createToolsFn(userId, session.tool_router_tools),
7859
7892
  authorize: this.createAuthorizeFn(session.session_id),
7860
7893
  toolkits: this.createToolkitsFn(session.session_id)
@@ -7878,10 +7911,7 @@ var ToolRouter = class {
7878
7911
  const session = await this.client.toolRouter.session.retrieve(id);
7879
7912
  return {
7880
7913
  sessionId: session.session_id,
7881
- mcp: {
7882
- type: session.mcp.type,
7883
- url: session.mcp.url
7884
- },
7914
+ mcp: this.createMCPServerConfig(session.mcp),
7885
7915
  tools: this.createToolsFn(session.config.user_id, session.tool_router_tools),
7886
7916
  authorize: this.createAuthorizeFn(session.session_id),
7887
7917
  toolkits: this.createToolkitsFn(session.session_id)
@@ -8393,10 +8423,12 @@ export {
8393
8423
  ToolRouterCreateSessionConfigSchema,
8394
8424
  ToolRouterDisabledTagsConfigSchema,
8395
8425
  ToolRouterEnabledTagsConfigSchema,
8426
+ ToolRouterMCPServerConfigSchema,
8396
8427
  ToolRouterManageConnectionsConfigSchema,
8397
8428
  ToolRouterTagsParamSchema,
8398
8429
  ToolRouterToolkitsDisabledConfigSchema,
8399
8430
  ToolRouterToolkitsEnabledConfigSchema,
8431
+ ToolRouterToolkitsOptionsSchema,
8400
8432
  ToolRouterToolkitsParamSchema,
8401
8433
  ToolRouterToolsParamSchema,
8402
8434
  ToolSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/core",
3
- "version": "0.2.7-alpha.2",
3
+ "version": "0.2.7-alpha.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "zod": ">=3.25.76 <5"
40
40
  },
41
41
  "dependencies": {
42
- "@composio/client": "0.1.0-alpha.46",
42
+ "@composio/client": "0.1.0-alpha.47",
43
43
  "@types/json-schema": "^7.0.15",
44
44
  "chalk": "^4.1.2",
45
45
  "openai": "^5.16.0",