@composio/core 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +23 -0
  2. package/dist/{CustomTool-Bd1KdWvo.mjs → CustomTool-9Vlb4XaS.mjs} +4 -7
  3. package/dist/{CustomTool-CMW-d2ZN.d.mts → CustomTool-Ds5aLDth.d.mts} +2 -4
  4. package/dist/FileModifierErrors-WrqokuIF.mjs +199 -0
  5. package/dist/{FileToolModifier.utils.neutral-DWFpnsj2.mjs → FileToolModifier.utils.neutral-BQP85ZJj.mjs} +1 -2
  6. package/dist/{SsrfErrors-DiQldIdC.mjs → SsrfErrors-BSVMW915.mjs} +49 -26
  7. package/dist/{Telemetry-D2PJwXKx.mjs → Telemetry-a7SOQXcg.mjs} +6 -10
  8. package/dist/{composio-D5UV5HXN.d.mts → composio-Ba89XGHL.d.mts} +310 -222
  9. package/dist/{customTool.types-B9fs34dv.d.mts → customTool.types-DHxXBU6E.d.mts} +205 -268
  10. package/dist/docs/error-consistency.md +3 -3
  11. package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +9 -0
  12. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +1 -0
  13. package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +6 -11
  14. package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +1 -1
  15. package/dist/docs/reference/sdk-reference/typescript/index.mdx +1 -1
  16. package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +2 -2
  17. package/dist/docs/reference/sdk-reference/typescript/remote-file.mdx +1 -1
  18. package/dist/docs/reference/sdk-reference/typescript/tools.mdx +2 -2
  19. package/dist/{errors-BK6Xc7Ia.mjs → errors-xC13uvaA.mjs} +56 -139
  20. package/dist/experimental/index.d.mts +16 -2
  21. package/dist/experimental/index.mjs +1 -1
  22. package/dist/{fileUtils.node-ILI1IjnZ.mjs → fileUtils.node-CAwIbWYH.mjs} +6 -8
  23. package/dist/{files.types-DeMC_mAW.d.mts → files.types-Dg6HcEzs.d.mts} +0 -2
  24. package/dist/index.d.mts +37 -72
  25. package/dist/index.mjs +339 -254
  26. package/dist/{cancellation-BoJjs34Y.mjs → jsonSchema-Cc4EtHRw.mjs} +5 -22
  27. package/dist/models/Files.node.d.mts +32 -13
  28. package/dist/models/Files.node.mjs +36 -19
  29. package/dist/models/Files.workerd.d.mts +8 -3
  30. package/dist/models/Files.workerd.mjs +1 -2
  31. package/dist/platform/node.d.mts +2 -4
  32. package/dist/platform/node.mjs +15 -16
  33. package/dist/platform/workerd.d.mts +2 -4
  34. package/dist/platform/workerd.mjs +1 -2
  35. package/dist/requestOptions.types-DWrTcbss.d.mts +38 -0
  36. package/dist/rolldown-runtime-ad2WFvuA.mjs +17 -0
  37. package/dist/{sensitiveFileUploadPaths-BaEORC7-.mjs → sensitiveFileUploadPaths-CSyJ3Ku8.mjs} +22 -12
  38. package/dist/{ssrfGuard.node-BZ270bcu.mjs → ssrfGuard.node-CdIkwqVu.mjs} +3 -5
  39. package/dist/{types-CaP2SytR.d.mts → types-DcdZy5Nc.d.mts} +2 -4
  40. package/dist/{types-DuVZKrXO.d.mts → types-Ds6XbK1m.d.mts} +0 -2
  41. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +2 -4
  42. package/dist/utils/config-defaults/ConfigDefaults.node.mjs +1 -2
  43. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +2 -4
  44. package/dist/utils/config-defaults/ConfigDefaults.workerd.mjs +1 -2
  45. package/dist/utils/modifiers/FileToolModifier.node.d.mts +2 -4
  46. package/dist/utils/modifiers/FileToolModifier.node.mjs +7 -8
  47. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +2 -4
  48. package/dist/utils/modifiers/FileToolModifier.workerd.mjs +2 -3
  49. package/dist/utils/ssrfGuard.node.d.mts +1 -3
  50. package/dist/utils/ssrfGuard.node.mjs +1 -1
  51. package/dist/utils/ssrfGuard.workerd.d.mts +1 -3
  52. package/dist/utils/ssrfGuard.workerd.mjs +2 -3
  53. package/docs/error-consistency.md +3 -3
  54. package/package.json +12 -13
  55. package/src/composio.ts +12 -0
  56. package/src/errors/ComposioError.ts +40 -16
  57. package/src/errors/ConnectedAccountsErrors.ts +2 -2
  58. package/src/errors/ToolErrors.ts +107 -30
  59. package/src/errors/apiErrorDetails.ts +40 -0
  60. package/src/models/AuthConfigs.ts +9 -0
  61. package/src/models/ConnectionRequest.ts +12 -4
  62. package/src/models/CustomToolkits.ts +11 -17
  63. package/src/models/Experimental.ts +2 -7
  64. package/src/models/Files.node.ts +68 -37
  65. package/src/models/MCP.ts +2 -2
  66. package/src/models/RemoteFile.ts +22 -16
  67. package/src/models/SessionContext.ts +6 -7
  68. package/src/models/ToolRouterSession.ts +16 -23
  69. package/src/models/Tools.ts +220 -22
  70. package/src/models/Triggers.ts +8 -2
  71. package/src/types/authConfigs.types.ts +14 -0
  72. package/src/types/customToolkits.types.ts +4 -9
  73. package/src/types/tool.types.ts +1 -1
  74. package/src/types/toolkit.types.ts +21 -0
  75. package/src/utils/cancellation.ts +5 -1
  76. package/src/utils/transformers/authConfigs.ts +6 -2
  77. package/src/utils/transformers/toolkits.ts +7 -0
  78. package/dist/FileModifierErrors-CdGSABoq.mjs +0 -97
  79. package/dist/rolldown-runtime-w6R9maHv.mjs +0 -18
  80. package/src/models/inlineCustomToolsPayload.ts +0 -17
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { c as DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID, d as USER_DATA_FILE_NAME, f as constants_exports, i as logger, l as IS_DEVELOPMENT_OR_CI, m as getEnvsWithPrefix, n as SsrfErrorCodes, o as COMPOSIO_DIR, p as getEnvVariable, r as ComposioError, s as DEFAULT_BASE_URL, t as ComposioBlockedInternalUrlError, u as TEMP_FILES_DIRECTORY_NAME } from "./SsrfErrors-DiQldIdC.mjs";
2
- import { $ as ComposioMultipleConnectedAccountsError, A as ComposioInvalidModifierError, B as handleToolExecutionError, C as ValidationError, D as ToolkitErrorCodes, E as ComposioToolkitNotFoundError, F as ComposioToolFetchError, G as ConnectionRequestFailedError, H as getRetryAfterSeconds, I as ComposioToolFetchRateLimitError, J as ComposioConnectedAccountNotFoundError, K as ConnectionRequestTimeoutError, L as ComposioToolNotFoundError, M as ComposioProviderNotDefinedError, N as ComposioToolExecutionError, O as ComposioGlobalExecuteToolFnNotSetError, P as ComposioToolExecutionRateLimitError, Q as ComposioLegacyConnectedAccountsEndpointRetiredError, R as ComposioToolVersionRequiredError, S as JsonSchemaToZodError, T as ComposioToolkitFetchError, U as isRateLimitResponse, V as isComposioRateLimitError, W as ConnectionRequestErrorCodes, X as ComposioConnectedAccountRevocationNotSupportedError, Y as ComposioConnectedAccountNotRevokableError, Z as ComposioFailedToCreateConnectedAccountLink, _ as ComposioRequestCancelledError, a as RemoteFileDownloadError, b as isRequestAbortError, c as ComposioFailedToGetSDKRealtimeCredentialsError, d as ComposioTriggerTypeNotFoundError, et as ComposioSharedAccessDeniedError, f as ComposioWebhookPayloadError, g as ComposioNoAPIKeyError, h as ComposioAPIKeyKindError, i as ToolRouterErrorCodes, it as ComposioAuthConfigNotFoundError, j as ComposioInvalidToolArgumentsError, k as ComposioInvalidExecuteFunctionError, l as ComposioFailedToSubscribeToPusherChannelError, m as TriggerErrorCodes, n as ComposioSessionConfigConflictError, nt as ConnectedAccountErrorCodes, o as RemoteFileErrorCodes, p as ComposioWebhookSignatureVerificationError, q as ComposioAclOnlyForSharedError, r as ComposioToolInputRequiredError, rt as AuthConfigErrorCodes, s as ComposioFailedToCreatePusherClientError, t as ComposioMCPDestinationError, tt as ComposioSharedConnectionNotAccessibleError, u as ComposioFailedToUnsubscribeFromPusherChannelError, v as ComposioScopeConfigError, w as ValidationErrorCodes, x as JsonSchemaRefResolutionError, y as SDKErrorCodes, z as ToolErrorCodes } from "./errors-BK6Xc7Ia.mjs";
3
- import { a as ComposioSensitiveFilePathBlockedError, i as ComposioFileUploadPathNotAllowedError, n as ComposioFileUploadAbortedError, o as FileModifierErrorCodes, r as ComposioFileUploadError, t as ComposioFileNotFoundError } from "./FileModifierErrors-CdGSABoq.mjs";
4
- import { n as dropEmptyFileUploads, o as isPlainObject, s as schemaHasFileUploadable } from "./FileToolModifier.utils.neutral-DWFpnsj2.mjs";
5
- import { a as jsonSchemaToZodSchema, c as toStrictJsonSchema, i as ensureObjectTypeOnProperties, n as deduplicateJsonSchemaRequiredArrays, o as omitNullToolArguments, r as dereferenceJsonSchema, s as removeNonRequiredProperties, t as withCancellation } from "./cancellation-BoJjs34Y.mjs";
6
- import { t as telemetry } from "./Telemetry-D2PJwXKx.mjs";
7
- import { c as arrayBufferToBase64, d as getRandomShortId, i as getExtensionFromMimeType, n as assertSafeFileUploadPath, o as MAX_URL_UPLOAD_SIZE_BYTES, r as isBlockedSensitiveFileUploadPath, s as readResponseBodyWithLimit, t as BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS } from "./sensitiveFileUploadPaths-BaEORC7-.mjs";
8
- import { a as createCustomToolkit, c as getPreloadedCustomToolSlugs, d as CreateCustomToolBaseSchema, f as CreateCustomToolkitBaseSchema, i as createCustomTool, l as serializeCustomToolkits, n as buildCustomToolsMap, o as findCustomToolMapEntryByFinalSlug, p as CustomToolSlugSchema, r as buildCustomToolsMapFromResponse, s as findCustomToolMapEntryByToolkitAndOriginalSlug, t as assertNoCustomToolSlugsInPreload, u as serializeCustomTools } from "./CustomTool-Bd1KdWvo.mjs";
1
+ import { _ as getEnvsWithPrefix, d as DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID, f as IS_DEVELOPMENT_OR_CI, g as getEnvVariable, h as constants_exports, i as apiErrorSuggestedFixes, l as COMPOSIO_DIR, m as USER_DATA_FILE_NAME, n as SsrfErrorCodes, o as withApiErrorMessage, p as TEMP_FILES_DIRECTORY_NAME, r as ComposioError, s as logger, t as ComposioBlockedInternalUrlError, u as DEFAULT_BASE_URL } from "./SsrfErrors-BSVMW915.mjs";
2
+ import { a as omitNullToolArguments, i as jsonSchemaToZodSchema, n as dereferenceJsonSchema, o as removeNonRequiredProperties, r as ensureObjectTypeOnProperties, s as toStrictJsonSchema, t as deduplicateJsonSchemaRequiredArrays } from "./jsonSchema-Cc4EtHRw.mjs";
3
+ import { $ as ComposioAuthConfigNotFoundError, A as ComposioToolFetchRateLimitError, B as ConnectionRequestFailedError, C as ComposioInvalidExecuteFunctionError, D as ComposioToolExecutionError, E as ComposioProviderNotDefinedError, F as handleToolExecutionError, G as ComposioConnectedAccountRevocationNotSupportedError, H as ComposioAclOnlyForSharedError, I as isComposioRateLimitError, J as ComposioMultipleConnectedAccountsError, K as ComposioFailedToCreateConnectedAccountLink, L as getRetryAfterSeconds, M as ComposioToolSchemaInvalidError, N as ComposioToolVersionRequiredError, O as ComposioToolExecutionRateLimitError, P as ToolErrorCodes, Q as AuthConfigErrorCodes, R as isRateLimitResponse, S as ComposioGlobalExecuteToolFnNotSetError, T as ComposioInvalidToolArgumentsError, U as ComposioConnectedAccountNotFoundError, V as ConnectionRequestTimeoutError, W as ComposioConnectedAccountNotRevokableError, X as ComposioSharedConnectionNotAccessibleError, Y as ComposioSharedAccessDeniedError, Z as ConnectedAccountErrorCodes, _ as ValidationError, a as RemoteFileDownloadError, b as ComposioToolkitNotFoundError, c as ComposioFailedToGetSDKRealtimeCredentialsError, d as ComposioTriggerTypeNotFoundError, f as ComposioWebhookPayloadError, g as JsonSchemaToZodError, h as JsonSchemaRefResolutionError, i as ToolRouterErrorCodes, j as ComposioToolNotFoundError, k as ComposioToolFetchError, l as ComposioFailedToSubscribeToPusherChannelError, m as TriggerErrorCodes, n as ComposioSessionConfigConflictError, o as RemoteFileErrorCodes, p as ComposioWebhookSignatureVerificationError, q as ComposioLegacyConnectedAccountsEndpointRetiredError, r as ComposioToolInputRequiredError, s as ComposioFailedToCreatePusherClientError, t as ComposioMCPDestinationError, u as ComposioFailedToUnsubscribeFromPusherChannelError, v as ValidationErrorCodes, w as ComposioInvalidModifierError, x as ToolkitErrorCodes, y as ComposioToolkitFetchError, z as ConnectionRequestErrorCodes } from "./errors-xC13uvaA.mjs";
4
+ import { t as telemetry } from "./Telemetry-a7SOQXcg.mjs";
5
+ import { n as dropEmptyFileUploads, o as isPlainObject, s as schemaHasFileUploadable } from "./FileToolModifier.utils.neutral-BQP85ZJj.mjs";
6
+ import { c as arrayBufferToBase64, d as withCancellation, f as getRandomShortId, i as getExtensionFromMimeType, n as assertSafeFileUploadPath, o as MAX_URL_UPLOAD_SIZE_BYTES, r as isBlockedSensitiveFileUploadPath, s as readResponseBodyWithLimit, t as BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS } from "./sensitiveFileUploadPaths-CSyJ3Ku8.mjs";
7
+ import { a as ComposioSensitiveFilePathBlockedError, c as ComposioNoAPIKeyError, d as SDKErrorCodes, f as isRequestAbortError, i as ComposioFileUploadPathNotAllowedError, l as ComposioRequestCancelledError, n as ComposioFileUploadAbortedError, o as FileModifierErrorCodes, r as ComposioFileUploadError, s as ComposioAPIKeyKindError, t as ComposioFileNotFoundError, u as ComposioScopeConfigError } from "./FileModifierErrors-WrqokuIF.mjs";
8
+ import { a as createCustomToolkit, c as getPreloadedCustomToolSlugs, d as CreateCustomToolBaseSchema, f as CreateCustomToolkitBaseSchema, i as createCustomTool, l as serializeCustomToolkits, n as buildCustomToolsMap, o as findCustomToolMapEntryByFinalSlug, p as CustomToolSlugSchema, r as buildCustomToolsMapFromResponse, s as findCustomToolMapEntryByToolkitAndOriginalSlug, t as assertNoCustomToolSlugsInPreload, u as serializeCustomTools } from "./CustomTool-9Vlb4XaS.mjs";
9
9
  import ComposioClient, { APIError, Auth, BadRequestError, ConflictError, createFetchTransport } from "@composio/client";
10
10
  import { FileToolModifier } from "#file_tool_modifier";
11
11
  import z, { z as z$1 } from "zod/v3";
@@ -17,7 +17,7 @@ import manifest from "#client_identity" with { type: "json" };
17
17
  import { ssrfSafeFetch, ssrfSafeFetchWhereSupported } from "#ssrf_guard";
18
18
  import { z as z$2 } from "zod";
19
19
 
20
- //#region src/types/authConfigs.types.ts
20
+ // src/types/authConfigs.types.ts
21
21
  const AuthConfigTypes = {
22
22
  CUSTOM: "use_custom_auth",
23
23
  COMPOSIO_MANAGED: "use_composio_managed_auth"
@@ -85,17 +85,29 @@ const CreateComposioManagedAuthConfigParamsSchema = z$1.object({
85
85
  user_scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional()
86
86
  }).passthrough().optional(),
87
87
  toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
88
- isEnabledForToolRouter: z$1.boolean().optional()
88
+ isEnabledForToolRouter: z$1.boolean().optional(),
89
+ /**
90
+ * The Composio-managed app to use, as `composioManagedAuth[].managedAppId`
91
+ * from `composio.toolkits.get(slug)`. Omit to use the toolkit's default app.
92
+ */
93
+ managedAppId: z$1.string().optional()
89
94
  });
90
95
  /**
91
96
  * Discriminated union of all possible auth config types.
92
97
  */
93
98
  const CreateAuthConfigParamsSchema = z$1.discriminatedUnion("type", [CreateCustomAuthConfigParamsSchema, CreateComposioManagedAuthConfigParamsSchema]);
99
+ /**
100
+ * The Composio-managed app an auth config uses, as
101
+ * `composioManagedAuth[].managedAppId` from `composio.toolkits.get(slug)`.
102
+ * `null` when the auth config is not linked to a managed app.
103
+ */
104
+ const AuthConfigManagedAppIdSchema = z$1.string().nullable();
94
105
  const CreateAuthConfigResponseSchema = z$1.object({
95
106
  id: z$1.string(),
96
107
  authScheme: z$1.string(),
97
108
  isComposioManaged: z$1.boolean(),
98
- toolkit: z$1.string()
109
+ toolkit: z$1.string(),
110
+ managedAppId: AuthConfigManagedAppIdSchema
99
111
  });
100
112
  const AuthConfigRetrieveResponseSchema = z$1.object({
101
113
  id: z$1.string(),
@@ -118,7 +130,8 @@ const AuthConfigRetrieveResponseSchema = z$1.object({
118
130
  createdBy: z$1.string().optional(),
119
131
  createdAt: z$1.string().optional(),
120
132
  lastUpdatedAt: z$1.string().optional(),
121
- toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
133
+ toolAccessConfig: AuthConfigToolAccessConfigSchema.optional(),
134
+ managedAppId: AuthConfigManagedAppIdSchema
122
135
  });
123
136
  const AuthConfigListParamsSchema = z$1.object({
124
137
  cursor: z$1.string().optional(),
@@ -158,8 +171,7 @@ const AuthDefaultConfigUpdateParamsSchema = z$1.object({
158
171
  });
159
172
  const AuthConfigUpdateParamsSchema = z$1.discriminatedUnion("type", [AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema]);
160
173
 
161
- //#endregion
162
- //#region src/types/connectedAccountAuthStates.types.ts
174
+ // src/types/connectedAccountAuthStates.types.ts
163
175
  const ConnectionStatuses = {
164
176
  INITIALIZING: "INITIALIZING",
165
177
  INITIATED: "INITIATED",
@@ -851,8 +863,7 @@ const CustomConnectionDataSchema = z$1.discriminatedUnion("authScheme", [
851
863
  })
852
864
  ]);
853
865
 
854
- //#endregion
855
- //#region src/types/tool.types.ts
866
+ // src/types/tool.types.ts
856
867
  /**
857
868
  * Toolkit is the collection of tools,
858
869
  * A toolkit can be thought of as an app which provides a set of tools/actions/triggers.
@@ -1081,8 +1092,7 @@ const ToolProxyParamsSchema = z$1.object({
1081
1092
  customConnectionData: CustomConnectionDataSchema.describe("DEPRECATED: This field is deprecated and will be removed in the future.").optional()
1082
1093
  });
1083
1094
 
1084
- //#endregion
1085
- //#region src/utils/toolkitVersion.ts
1095
+ // src/utils/toolkitVersion.ts
1086
1096
  /**
1087
1097
  * Canonicalizes a toolkit slug into the form used as a version-map key.
1088
1098
  *
@@ -1112,8 +1122,7 @@ const getToolkitVersion = (toolkitSlug, toolkitVersions) => {
1112
1122
  return "latest";
1113
1123
  };
1114
1124
 
1115
- //#endregion
1116
- //#region src/utils/fileDirs.ts
1125
+ // src/utils/fileDirs.ts
1117
1126
  /**
1118
1127
  * Runtime-neutral helpers for normalizing user-provided filesystem paths.
1119
1128
  *
@@ -1188,8 +1197,7 @@ function resolveEffectiveUploadAllowlist(userDirs) {
1188
1197
  return Array.isArray(resolved) ? resolved : [];
1189
1198
  }
1190
1199
 
1191
- //#endregion
1192
- //#region src/utils/retries.ts
1200
+ // src/utils/retries.ts
1193
1201
  /**
1194
1202
  * Request options for a call that executes a tool or proxies an API call: the
1195
1203
  * caller's options with retries disabled.
@@ -1210,8 +1218,7 @@ function withoutRetries(requestOptions) {
1210
1218
  };
1211
1219
  }
1212
1220
 
1213
- //#endregion
1214
- //#region src/utils/transformers/toolRouterResponseTransform.ts
1221
+ // src/utils/transformers/toolRouterResponseTransform.ts
1215
1222
  /**
1216
1223
  * The `result_type` values of a call that ran. `input_required` and `blocked`
1217
1224
  * are handled before this is read.
@@ -1374,24 +1381,97 @@ function transformProxyExecuteResponse(raw, subject) {
1374
1381
  };
1375
1382
  }
1376
1383
 
1377
- //#endregion
1378
- //#region src/models/Tools.ts
1384
+ // src/models/Tools.ts
1379
1385
  const TOOL_ROUTER_SESSION_TOOLS_PAGE_LIMIT = 500;
1386
+ const isSchemaRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1387
+ /**
1388
+ * Flatten a value for interpolation into a log line.
1389
+ *
1390
+ * The logger writes straight to the console sink, and the slug and the zod
1391
+ * issue paths here are built from property names a remote toolkit controls. A
1392
+ * name carrying a newline could otherwise forge or erase a line in the host's
1393
+ * log, and an ANSI clear-line sequence could hide what came before it.
1394
+ */
1395
+ const sanitizeForLog = (value) => value.replace(/[\u0000-\u001F\u007F-\u009F]/g, " ");
1396
+ /**
1397
+ * Rewrite one JSON-Schema node into the strict subset `ParametersSchema`
1398
+ * accepts, preserving its meaning:
1399
+ *
1400
+ * - boolean nodes (`items: true` / `items: false`) become `{}` / `{ not: {} }`
1401
+ * — the strict subset's way to express "anything" and "nothing", so the
1402
+ * meaning survives; booleans are still valid JSON Schema (draft-04 style)
1403
+ * that MCP toolkits emit;
1404
+ * - draft-04 boolean `exclusiveMinimum`/`exclusiveMaximum` (paired with
1405
+ * `minimum`/`maximum`) become the numeric form draft-07+ uses;
1406
+ *
1407
+ * Children are rewritten recursively. `additionalProperties` legitimately
1408
+ * accepts a boolean, so it is only recursed into when it is a schema.
1409
+ */
1410
+ function sanitizeJsonSchemaNode(node) {
1411
+ if (typeof node === "boolean") return node ? {} : { not: {} };
1412
+ if (Array.isArray(node)) return node.map(sanitizeJsonSchemaNode);
1413
+ if (!isSchemaRecord(node)) return node;
1414
+ const schema = { ...node };
1415
+ for (const [bound, limit] of [["exclusiveMinimum", "minimum"], ["exclusiveMaximum", "maximum"]]) {
1416
+ if (typeof schema[bound] !== "boolean") continue;
1417
+ if (schema[bound] && typeof schema[limit] === "number") schema[bound] = schema[limit];
1418
+ else delete schema[bound];
1419
+ }
1420
+ for (const key of [
1421
+ "items",
1422
+ "not",
1423
+ "if",
1424
+ "then",
1425
+ "else",
1426
+ "additionalProperties"
1427
+ ]) {
1428
+ const child = schema[key];
1429
+ if (child === void 0) continue;
1430
+ if (key === "additionalProperties" && typeof child === "boolean") continue;
1431
+ schema[key] = sanitizeJsonSchemaNode(child);
1432
+ }
1433
+ for (const key of [
1434
+ "anyOf",
1435
+ "oneOf",
1436
+ "allOf"
1437
+ ]) if (Array.isArray(schema[key])) schema[key] = sanitizeJsonSchemaNode(schema[key]);
1438
+ for (const key of [
1439
+ "properties",
1440
+ "patternProperties",
1441
+ "$defs",
1442
+ "definitions"
1443
+ ]) {
1444
+ const children = schema[key];
1445
+ if (!isSchemaRecord(children)) continue;
1446
+ const mapped = {};
1447
+ for (const [name, child] of Object.entries(children)) mapped[name] = sanitizeJsonSchemaNode(child);
1448
+ schema[key] = mapped;
1449
+ }
1450
+ return schema;
1451
+ }
1380
1452
  /**
1381
1453
  * Normalize a raw `input_parameters` / `output_parameters` payload returned by
1382
1454
  * the Composio API. Maps `null`, `undefined`, and empty `{}` — all of which
1383
1455
  * mean "no declared schema" — to `undefined` so the strict `ParametersSchema`
1384
- * validator never sees them. Non-empty objects pass through unchanged and
1385
- * remain subject to strict Zod validation.
1456
+ * validator never sees them, and rewrites the valid-but-unusual JSON Schema
1457
+ * shapes MCP toolkits ship (boolean nodes, draft-04 boolean bounds, a bare
1458
+ * combinator root) into the strict subset.
1386
1459
  *
1387
1460
  * MCP-backed toolkits (granola_mcp, apify_mcp, tavily_mcp, …) have no
1388
1461
  * declared output schema and the API serializes that as `{}`, which would
1389
1462
  * otherwise trip `ParametersSchema`. See
1390
- * https://github.com/ComposioHQ/composio/issues/3354.
1463
+ * https://github.com/ComposioHQ/composio/issues/3354. The malformed-shape
1464
+ * handling covers the toolkits listed in
1465
+ * https://github.com/ComposioHQ/composio/issues/4757.
1391
1466
  */
1392
1467
  function normalizeRawToolParameters(params) {
1393
1468
  if (params == null || Object.keys(params).length === 0) return void 0;
1394
- return params;
1469
+ const sanitized = sanitizeJsonSchemaNode(params);
1470
+ if (isSchemaRecord(sanitized) && sanitized.type === void 0 && (Array.isArray(sanitized.anyOf) || Array.isArray(sanitized.oneOf) || Array.isArray(sanitized.allOf))) return {
1471
+ ...sanitized,
1472
+ type: "object"
1473
+ };
1474
+ return sanitized;
1395
1475
  }
1396
1476
  /** How long `execute()` reuses a schema fetched for `latest`, which can change at any release. */
1397
1477
  const LATEST_TOOL_SCHEMA_TTL_MS = 3e5;
@@ -1415,6 +1495,8 @@ var Tools = class {
1415
1495
  * Scoped per-instance so a fresh `Composio` starts with a clean slate.
1416
1496
  */
1417
1497
  warnedAutoUploadDisabledForTool = /* @__PURE__ */ new Set();
1498
+ /** Tools whose parameters were dropped by `transformToolCases`; warn once each. */
1499
+ warnedMalformedToolParametersSlugs = /* @__PURE__ */ new Set();
1418
1500
  /**
1419
1501
  * Schemas `execute()` already fetched, so repeated executions don't each spend a request.
1420
1502
  * Holds what `getRawComposioToolBySlug` returned with no `modifySchema`, so a caller's schema
@@ -1447,19 +1529,49 @@ var Tools = class {
1447
1529
  * making them more consistent with JavaScript/TypeScript conventions.
1448
1530
  *
1449
1531
  * @param {ToolRetrieveResponse | ComposioToolListResponse['items'][0]} tool - The tool object to transform
1450
- * @returns {Tool} The transformed tool with camelCase properties
1532
+ * @returns {Tool} The transformed tool with camelCase properties, or
1533
+ * `undefined` when its input schema is unrepairable and the tool is skipped
1451
1534
  *
1452
1535
  * @private
1453
1536
  */
1454
1537
  transformToolCases(tool) {
1455
- return ToolSchema.parse({
1538
+ const candidate = {
1456
1539
  ...tool,
1457
1540
  inputParameters: normalizeRawToolParameters(tool.input_parameters),
1458
1541
  outputParameters: normalizeRawToolParameters(tool.output_parameters),
1459
1542
  availableVersions: tool.available_versions,
1460
1543
  isDeprecated: tool.deprecated?.is_deprecated ?? false,
1461
1544
  isNoAuth: tool.no_auth
1462
- });
1545
+ };
1546
+ const parsed = ToolSchema.safeParse(candidate);
1547
+ if (parsed.success) return parsed.data;
1548
+ const failingSides = /* @__PURE__ */ new Set();
1549
+ let hasNonParameterIssue = false;
1550
+ for (const issue of parsed.error.issues) {
1551
+ const root = issue.path[0];
1552
+ if (root === "inputParameters" || root === "outputParameters") failingSides.add(root);
1553
+ else hasNonParameterIssue = true;
1554
+ }
1555
+ if (hasNonParameterIssue || failingSides.size === 0) throw parsed.error;
1556
+ this.warnMalformedToolParameters(tool, parsed.error, [...failingSides]);
1557
+ if (failingSides.has("inputParameters")) return void 0;
1558
+ const degradedCandidate = { ...candidate };
1559
+ for (const side of failingSides) degradedCandidate[side] = void 0;
1560
+ const degraded = ToolSchema.safeParse(degradedCandidate);
1561
+ if (degraded.success) return degraded.data;
1562
+ throw parsed.error;
1563
+ }
1564
+ /**
1565
+ * Warn once per tool that its declared parameters could not be parsed and
1566
+ * were dropped, so a caller sees why a tool carries no schema instead of a
1567
+ * bare TypeError from deep inside Zod.
1568
+ */
1569
+ warnMalformedToolParameters(tool, error, droppedSides) {
1570
+ const slug = String(tool.slug ?? "");
1571
+ if (slug && this.warnedMalformedToolParametersSlugs.has(slug)) return;
1572
+ if (slug) this.warnedMalformedToolParametersSlugs.add(slug);
1573
+ const inputFailed = droppedSides.includes("inputParameters");
1574
+ logger.warn(`Tool "${sanitizeForLog(slug) || "(unknown slug)"}" has ${droppedSides.join(" and ")} that do not match the expected schema, so the tool was ${inputFailed ? "skipped" : "returned without those parameters"}. ${inputFailed ? "It cannot be offered without an input schema." : "The tool still executes, but LLM callers will not see those parameters."} Issues: ${error.issues.map((issue) => `${sanitizeForLog(issue.path.join("."))}: ${sanitizeForLog(issue.message)}`).join("; ")}`);
1463
1575
  }
1464
1576
  /**
1465
1577
  * Transforms tool execution response from snake_case API format to camelCase.
@@ -1669,7 +1781,7 @@ var Tools = class {
1669
1781
  logger.debug(`Fetching tools with filters: ${JSON.stringify(filters, null, 2)}`);
1670
1782
  const tools = await withCancellation(() => this.client.tools.list(filters, requestOptions), requestOptions?.signal);
1671
1783
  if (!tools) return [];
1672
- const caseTransformedTools = tools.items.map((tool) => this.transformToolCases(tool));
1784
+ const caseTransformedTools = tools.items.map((tool) => this.transformToolCases(tool)).filter((tool) => tool !== void 0);
1673
1785
  let modifiedTools = await this.applyDefaultSchemaModifiers(caseTransformedTools);
1674
1786
  if (options?.modifySchema) {
1675
1787
  const modifier = options.modifySchema;
@@ -1709,7 +1821,7 @@ var Tools = class {
1709
1821
  ...cursor ? { cursor } : {}
1710
1822
  };
1711
1823
  const response = await withCancellation(() => this.client.toolRouter.session.tools(sessionId, sessionToolsParams, requestOptions), requestOptions?.signal);
1712
- tools.push(...response.items.map((tool) => this.transformToolCases(tool)));
1824
+ tools.push(...response.items.map((tool) => this.transformToolCases(tool)).filter((tool) => tool !== void 0));
1713
1825
  cursor = response.next_cursor;
1714
1826
  } while (cursor);
1715
1827
  let modifiedTools = tools;
@@ -1765,7 +1877,7 @@ var Tools = class {
1765
1877
  * );
1766
1878
  *
1767
1879
  * // Access tool properties
1768
- * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_ISSUE');
1880
+ * const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_AN_ISSUE');
1769
1881
  * console.log({
1770
1882
  * slug: githubTool.slug,
1771
1883
  * name: githubTool.name,
@@ -1783,17 +1895,23 @@ var Tools = class {
1783
1895
  tool = await withCancellation(() => this.client.tools.retrieve(slug, retrieveParams, requestOptions), requestOptions?.signal);
1784
1896
  } catch (error) {
1785
1897
  if (error instanceof ComposioRequestCancelledError) throw error;
1786
- if (isRateLimitResponse(error)) throw new ComposioToolFetchRateLimitError(`Rate limited while retrieving tool with slug ${slug}`, error, { slug });
1787
- if (error instanceof APIError && (error.status === 404 || error.status === 400)) throw new ComposioToolNotFoundError(`Tool with slug ${slug} not found`, {
1898
+ if (isRateLimitResponse(error)) throw new ComposioToolFetchRateLimitError(withApiErrorMessage(`Rate limited while retrieving tool with slug ${slug}`, error.details), error, { slug });
1899
+ if (error instanceof APIError && (error.status === 404 || error.status === 400)) throw new ComposioToolNotFoundError(withApiErrorMessage(`Tool with slug ${slug} not found`, error.details), {
1788
1900
  meta: { slug },
1789
- cause: error
1901
+ cause: error,
1902
+ possibleFixes: apiErrorSuggestedFixes(error.details)
1790
1903
  });
1791
- throw new ComposioToolFetchError(`Unable to retrieve tool with slug ${slug}`, {
1904
+ const details = error instanceof APIError ? error.details : void 0;
1905
+ const originalMessage = error instanceof APIError && error.status !== void 0 ? void 0 : error instanceof Error ? error.message : void 0;
1906
+ throw new ComposioToolFetchError(withApiErrorMessage(`Unable to retrieve tool with slug ${slug}`, details, originalMessage), {
1792
1907
  meta: { slug },
1793
- cause: error
1908
+ cause: error,
1909
+ possibleFixes: apiErrorSuggestedFixes(details)
1794
1910
  });
1795
1911
  }
1796
- let [modifiedTool] = await this.applyDefaultSchemaModifiers([this.transformToolCases(tool)]);
1912
+ const transformedTool = this.transformToolCases(tool);
1913
+ if (transformedTool === void 0) throw new ComposioToolSchemaInvalidError(`Tool with slug ${slug} has an unusable input schema`, { meta: { slug } });
1914
+ let [modifiedTool] = await this.applyDefaultSchemaModifiers([transformedTool]);
1797
1915
  if (options?.modifySchema) {
1798
1916
  const modifier = options.modifySchema;
1799
1917
  if (typeof modifier === "function") modifiedTool = await modifier({
@@ -2113,7 +2231,9 @@ var Tools = class {
2113
2231
  enable_auto_workbench_offload: true
2114
2232
  };
2115
2233
  if (options?.experimental) executePayload.experimental = options.experimental;
2116
- const response = await withCancellation(() => this.client.toolRouter.session.execute(body.sessionId, executePayload, withoutRetries(requestOptions)), requestOptions?.signal);
2234
+ const response = await withCancellation(() => this.client.toolRouter.session.execute(body.sessionId, executePayload, withoutRetries(requestOptions)), requestOptions?.signal).catch((error) => {
2235
+ throw handleToolExecutionError(toolSlug, error);
2236
+ });
2117
2237
  const { data, error, logId, resultType, instantCharge } = transformExecuteResponse(response, toolSlug);
2118
2238
  let result = {
2119
2239
  data,
@@ -2163,7 +2283,7 @@ var Tools = class {
2163
2283
  *
2164
2284
  * @example
2165
2285
  * ```typescript
2166
- * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_ISSUE', {
2286
+ * const { arguments: args, error } = await composio.tools.getInput('GITHUB_CREATE_AN_ISSUE', {
2167
2287
  * text: 'Open an issue in composiohq/composio titled "Docs typo" describing the broken link',
2168
2288
  * version: '20250909_00',
2169
2289
  * });
@@ -2237,8 +2357,7 @@ var Tools = class {
2237
2357
  }
2238
2358
  };
2239
2359
 
2240
- //#endregion
2241
- //#region src/types/toolkit.types.ts
2360
+ // src/types/toolkit.types.ts
2242
2361
  /**
2243
2362
  * Toolkit list params
2244
2363
  */
@@ -2344,12 +2463,28 @@ const ToolkitAuthConfigDetailsSchema = z$1.object({
2344
2463
  }),
2345
2464
  proxy: z$1.object({ baseUrl: z$1.string().optional() }).optional()
2346
2465
  });
2466
+ const ToolkitManagedAuthScopesSchema = z$1.object({ available: z$1.array(z$1.string()) });
2467
+ /**
2468
+ * A Composio-managed app for a toolkit. Pass `managedAppId` to
2469
+ * `composio.authConfigs.create` to create an auth config on this app.
2470
+ */
2471
+ const ToolkitComposioManagedAuthSchema = z$1.object({
2472
+ managedAppId: z$1.string(),
2473
+ /** Whether this is the app used when `managedAppId` is omitted. */
2474
+ isDefault: z$1.boolean(),
2475
+ mode: z$1.string(),
2476
+ scopes: ToolkitManagedAuthScopesSchema,
2477
+ /** Present only for Slack. */
2478
+ userScopes: ToolkitManagedAuthScopesSchema.optional()
2479
+ });
2347
2480
  const ToolkitRetrieveResponseSchema = z$1.object({
2348
2481
  name: z$1.string(),
2349
2482
  slug: z$1.string(),
2350
2483
  meta: ToolKitMetaSchema,
2351
2484
  isLocalToolkit: z$1.boolean(),
2352
2485
  composioManagedAuthSchemes: z$1.array(z$1.string()).optional(),
2486
+ /** One entry per Composio-managed app, the default first. */
2487
+ composioManagedAuth: z$1.array(ToolkitComposioManagedAuthSchema).optional(),
2353
2488
  authConfigDetails: z$1.array(ToolkitAuthConfigDetailsSchema).optional(),
2354
2489
  baseUrl: z$1.string().optional(),
2355
2490
  getCurrentUserEndpoint: z$1.string().optional(),
@@ -2471,8 +2606,7 @@ const ToolkitListGrantContextsResponseSchema = z$1.object({
2471
2606
  });
2472
2607
  const ToolkitAuthFieldsResponseSchema = z$1.array(ToolkitAuthFieldSchema.extend({ required: z$1.boolean().optional() }));
2473
2608
 
2474
- //#endregion
2475
- //#region src/utils/transform.ts
2609
+ // src/utils/transform.ts
2476
2610
  function transform(raw) {
2477
2611
  return { with(schema) {
2478
2612
  return { using(transformer, options) {
@@ -2489,15 +2623,14 @@ function transform(raw) {
2489
2623
  } };
2490
2624
  }
2491
2625
 
2492
- //#endregion
2493
- //#region src/utils/transformers/authConfigs.ts
2626
+ // src/utils/transformers/authConfigs.ts
2494
2627
  /**
2495
2628
  * Transforms an auth config response from API format to SDK format.
2496
2629
  *
2497
2630
  * This method converts property names from snake_case to camelCase and reorganizes
2498
2631
  * the data structure to match the SDK's standardized format for auth configurations.
2499
2632
  *
2500
- * @param {RawAuthConfigRetrieveResponse} authConfig - The raw API response to transform
2633
+ * @param {RawAuthConfig} authConfig - The raw retrieve response or list item to transform
2501
2634
  * @returns {AuthConfigRetrieveResponse} The transformed auth config data
2502
2635
  *
2503
2636
  * @private
@@ -2524,7 +2657,8 @@ function transformAuthConfigRetrieveResponse(authConfig) {
2524
2657
  toolAccessConfig: authConfig.tool_access_config ? {
2525
2658
  toolsAvailableForExecution: authConfig.tool_access_config.tools_available_for_execution,
2526
2659
  toolsForConnectedAccountCreation: authConfig.tool_access_config.tools_for_connected_account_creation
2527
- } : void 0
2660
+ } : void 0,
2661
+ managedAppId: authConfig.managed_app_id
2528
2662
  }));
2529
2663
  }
2530
2664
  /**
@@ -2561,12 +2695,12 @@ function transformCreateAuthConfigResponse(response) {
2561
2695
  id: response.auth_config.id,
2562
2696
  authScheme: response.auth_config.auth_scheme,
2563
2697
  isComposioManaged: response.auth_config.is_composio_managed,
2564
- toolkit: response.toolkit.slug
2698
+ toolkit: response.toolkit.slug,
2699
+ managedAppId: response.auth_config.managed_app_id
2565
2700
  }));
2566
2701
  }
2567
2702
 
2568
- //#endregion
2569
- //#region src/models/AuthConfigs.ts
2703
+ // src/models/AuthConfigs.ts
2570
2704
  /**
2571
2705
  * AuthConfigs class
2572
2706
  *
@@ -2631,6 +2765,14 @@ var AuthConfigs = class {
2631
2765
  * @returns {Promise<CreateAuthConfigResponse>} Created auth config
2632
2766
  *
2633
2767
  * @example
2768
+ * // Use a specific Composio-managed app; omit managedAppId for the toolkit's default
2769
+ * const { composioManagedAuth } = await composio.toolkits.get('slack');
2770
+ * const slackAuthConfig = await authConfigs.create('slack', {
2771
+ * type: AuthConfigTypes.COMPOSIO_MANAGED,
2772
+ * managedAppId: composioManagedAuth?.find(app => !app.isDefault)?.managedAppId,
2773
+ * });
2774
+ *
2775
+ * @example
2634
2776
  * const authConfig = await authConfigs.create('my-toolkit', {
2635
2777
  * type: AuthConfigTypes.CUSTOM,
2636
2778
  * name: 'My Custom Auth Config',
@@ -2663,7 +2805,8 @@ var AuthConfigs = class {
2663
2805
  credentials: parsedOptions.data.credentials,
2664
2806
  name: parsedOptions.data.name,
2665
2807
  is_enabled_for_tool_router: parsedOptions.data.isEnabledForToolRouter,
2666
- tool_access_config: parsedOptions.data.toolAccessConfig ? { tools_for_connected_account_creation: parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation } : void 0
2808
+ tool_access_config: parsedOptions.data.toolAccessConfig ? { tools_for_connected_account_creation: parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation } : void 0,
2809
+ managed_app_id: parsedOptions.data.managedAppId
2667
2810
  }
2668
2811
  };
2669
2812
  const result = await withCancellation(() => this.client.authConfigs.create(createBody, requestOptions), requestOptions?.signal);
@@ -2830,8 +2973,7 @@ var AuthConfigs = class {
2830
2973
  }
2831
2974
  };
2832
2975
 
2833
- //#endregion
2834
- //#region src/types/connectedAccounts.types.ts
2976
+ // src/types/connectedAccounts.types.ts
2835
2977
  /**
2836
2978
  * Connected Account create parameters
2837
2979
  */
@@ -3114,8 +3256,7 @@ const ConnectedAccountCompleteAuthResponseSchema = z$1.object({
3114
3256
  toolkitSlug: z$1.string()
3115
3257
  });
3116
3258
 
3117
- //#endregion
3118
- //#region src/utils/transformers/connectedAccounts.ts
3259
+ // src/utils/transformers/connectedAccounts.ts
3119
3260
  /**
3120
3261
  * Transforms the raw connected account response from the Composio API to the SDK format.
3121
3262
  *
@@ -3201,8 +3342,7 @@ const transformConnectedAccountCompleteAuthResponse = (response) => {
3201
3342
  }));
3202
3343
  };
3203
3344
 
3204
- //#endregion
3205
- //#region src/models/ConnectionRequest.ts
3345
+ // src/models/ConnectionRequest.ts
3206
3346
  /**
3207
3347
  * @fileoverview Connection request function for Composio SDK, used to manage an initiated connection request.
3208
3348
  *
@@ -3243,8 +3383,9 @@ function createConnectionRequest(client, connectedAccountId, status, redirectUrl
3243
3383
  * either becomes active, enters a terminal error state, or times out. The delay between polls
3244
3384
  * grows from 1 second to 5 seconds, so a connection can be up to 5 seconds old when this returns.
3245
3385
  * A rate-limited poll doesn't fail the wait: once the client's own retries run out, it waits as
3246
- * long as the response asks, up to the timeout, and polls again. The client's retries can carry
3247
- * the wait past the timeout, because they aren't bound by it.
3386
+ * long as the response asks before polling again. If that delay reaches the timeout, the wait
3387
+ * times out without another poll. The client's retries can carry the wait past the timeout,
3388
+ * because they aren't bound by it.
3248
3389
  *
3249
3390
  * @param {number} [timeout=60000] - Maximum time to wait in milliseconds before timing out (default: 60 seconds)
3250
3391
  * @returns {Promise<ConnectedAccountRetrieveResponse>} The final connected account response when successful
@@ -3283,6 +3424,7 @@ function createConnectionRequest(client, connectedAccountId, status, redirectUrl
3283
3424
  let pollDelay = INITIAL_POLL_DELAY_MS;
3284
3425
  while (true) {
3285
3426
  let delay = pollDelay;
3427
+ let rateLimited = false;
3286
3428
  try {
3287
3429
  const response = await client.connectedAccounts.retrieve(request.id);
3288
3430
  request.status = response.status;
@@ -3291,19 +3433,21 @@ function createConnectionRequest(client, connectedAccountId, status, redirectUrl
3291
3433
  } catch (error) {
3292
3434
  if (error instanceof ComposioClient.NotFoundError) throw new ComposioConnectedAccountNotFoundError(`Connected account with id ${request.id} not found`, { meta: { connectedAccountId: request.id } });
3293
3435
  if (!isRateLimitResponse(error)) throw error;
3436
+ rateLimited = true;
3294
3437
  delay = Math.max(delay, (getRetryAfterSeconds(error) ?? 0) * 1e3);
3295
3438
  }
3296
3439
  const remaining = deadline - Date.now();
3297
- if (!(remaining > 0)) throw new ConnectionRequestTimeoutError(`Connection request timed out for ${request.id}`);
3440
+ if (!(remaining > 0)) break;
3298
3441
  await new Promise((resolve) => setTimeout(resolve, Math.min(delay, remaining)));
3442
+ if (rateLimited && Date.now() >= deadline) break;
3299
3443
  pollDelay = Math.min(pollDelay * POLL_DELAY_GROWTH, MAX_POLL_DELAY_MS);
3300
3444
  }
3445
+ throw new ConnectionRequestTimeoutError(`Connection request timed out for ${request.id}`);
3301
3446
  }
3302
3447
  return request;
3303
3448
  }
3304
3449
 
3305
- //#endregion
3306
- //#region src/types/usage.types.ts
3450
+ // src/types/usage.types.ts
3307
3451
  /**
3308
3452
  * Filters shared by the usage summary and breakdown queries.
3309
3453
  * **Experimental — shape may change in future releases.**
@@ -3376,8 +3520,7 @@ const UsageBreakdownResponseSchema = z$1.object({
3376
3520
  groups: z$1.array(UsageBreakdownGroupSchema)
3377
3521
  });
3378
3522
 
3379
- //#endregion
3380
- //#region src/utils/transformers/usage.ts
3523
+ // src/utils/transformers/usage.ts
3381
3524
  const transformUsageFilters = (filters) => filters ? {
3382
3525
  user_id: filters.userId,
3383
3526
  session_id: filters.sessionId
@@ -3421,8 +3564,7 @@ const transformUsageBreakdownResponse = (response) => {
3421
3564
  }));
3422
3565
  };
3423
3566
 
3424
- //#endregion
3425
- //#region src/models/Usage.ts
3567
+ // src/models/Usage.ts
3426
3568
  /**
3427
3569
  * `composio.experimental.usage` — metering for the project the API key
3428
3570
  * belongs to. **Experimental — shape may change in future releases.**
@@ -3494,15 +3636,13 @@ var Usage = class {
3494
3636
  }
3495
3637
  };
3496
3638
 
3497
- //#endregion
3498
- //#region src/types/customToolkits.types.ts
3639
+ // src/types/customToolkits.types.ts
3499
3640
  const CustomToolkitApiKeyFieldSchema = z$1.object({
3500
3641
  displayName: z$1.string().min(1).max(100).optional(),
3501
3642
  description: z$1.string().min(1).max(500).optional()
3502
3643
  });
3503
3644
  /**
3504
3645
  * How end users authenticate to a custom toolkit.
3505
- * **Experimental — custom toolkits are in pilot; shape may change.**
3506
3646
  */
3507
3647
  const CustomToolkitAuthSchemeSchema = z$1.discriminatedUnion("mode", [
3508
3648
  z$1.object({ mode: z$1.literal("NO_AUTH") }),
@@ -3536,8 +3676,7 @@ const CustomToolkitLogoFileSchema = z$1.object({
3536
3676
  mimeType: z$1.enum(["image/png", "image/jpeg"])
3537
3677
  });
3538
3678
  /**
3539
- * Params for `composio.experimental.customToolkits.create()`.
3540
- * **Experimental — custom toolkits are in pilot; shape may change.**
3679
+ * Params for `composio.customToolkits.create()`.
3541
3680
  */
3542
3681
  const CustomToolkitCreateParamsSchema = z$1.object({
3543
3682
  /** Human-readable toolkit name. */
@@ -3570,8 +3709,7 @@ const CustomToolkitCreateResponseSchema = z$1.object({
3570
3709
  }).nullable()
3571
3710
  });
3572
3711
  /**
3573
- * Params for `composio.experimental.customToolkits.update()`.
3574
- * **Experimental — custom toolkits are in pilot; shape may change.**
3712
+ * Params for `composio.customToolkits.update()`.
3575
3713
  */
3576
3714
  const CustomToolkitUpdateParamsSchema = z$1.object({
3577
3715
  name: z$1.string().min(1).max(200).optional(),
@@ -3590,8 +3728,7 @@ const CustomToolkitUpdateParamsSchema = z$1.object({
3590
3728
  ].some((value) => value !== void 0), { message: "Provide at least one of name, logoFile, apiKeyField" });
3591
3729
  const CustomToolkitUpdateResponseSchema = z$1.object({ success: z$1.literal(true) });
3592
3730
  /**
3593
- * Params for `composio.experimental.customToolkits.upsert()`.
3594
- * **Experimental — custom toolkits are in pilot; shape may change.**
3731
+ * Params for `composio.customToolkits.upsert()`.
3595
3732
  *
3596
3733
  * @deprecated Use `CustomToolkitCreateParams` with `create()`.
3597
3734
  */
@@ -3616,8 +3753,7 @@ const CustomToolkitUpsertResponseSchema = z$1.object({
3616
3753
  /** Slug of the created or updated toolkit. */
3617
3754
  slug: z$1.string() });
3618
3755
  /**
3619
- * Params for `composio.experimental.customToolkits.sync()`.
3620
- * **Experimental — custom toolkits are in pilot; shape may change.**
3756
+ * Params for `composio.customToolkits.sync()`.
3621
3757
  */
3622
3758
  const CustomToolkitSyncParamsSchema = z$1.object({
3623
3759
  /** Connected account to use when fetching the remote tool definitions. */
@@ -3639,8 +3775,7 @@ const CustomToolkitDeleteResponseSchema = z$1.object({
3639
3775
  connectedAccountsDeleted: z$1.number()
3640
3776
  });
3641
3777
 
3642
- //#endregion
3643
- //#region src/utils/transformers/customToolkits.ts
3778
+ // src/utils/transformers/customToolkits.ts
3644
3779
  const transformCustomToolkitLogoFile = (logoFile) => logoFile && {
3645
3780
  content: logoFile.content,
3646
3781
  mime_type: logoFile.mimeType
@@ -3727,14 +3862,13 @@ const transformCustomToolkitDeleteResponse = (response) => {
3727
3862
  }));
3728
3863
  };
3729
3864
 
3730
- //#endregion
3731
- //#region src/models/CustomToolkits.ts
3732
- const UPSERT_DEPRECATION = "[Deprecation] composio.experimental.customToolkits.upsert() is deprecated. Use create() for a new toolkit and update(slug, ...) to change its name, logo or API key field.";
3865
+ // src/models/CustomToolkits.ts
3866
+ const UPSERT_DEPRECATION = "[Deprecation] composio.customToolkits.upsert() is deprecated. Use create() for a new toolkit and update(slug, ...) to change its name, logo or API key field.";
3733
3867
  let _upsertDeprecationWarned = false;
3734
3868
  /**
3735
- * `composio.experimental.customToolkits` — toolkits your project registers
3869
+ * `composio.customToolkits` — toolkits your project registers
3736
3870
  * from its own app or MCP server, with their own auth configs and connected
3737
- * accounts. **Experimental — custom toolkits are in pilot; shape may change.**
3871
+ * accounts.
3738
3872
  *
3739
3873
  * These live on the Composio platform. They are unrelated to the in-process
3740
3874
  * toolkits built with `experimental_createToolkit()`, which run inside your
@@ -3742,13 +3876,13 @@ let _upsertDeprecationWarned = false;
3742
3876
  *
3743
3877
  * @example
3744
3878
  * ```typescript
3745
- * const { slug } = await composio.experimental.customToolkits.create({
3879
+ * const { slug } = await composio.customToolkits.create({
3746
3880
  * name: 'My Toolkit',
3747
3881
  * mcpUrl: 'https://mcp.example.com/mcp',
3748
3882
  * authSchemes: [{ mode: 'DCR_OAUTH', discoveryUrl: 'https://mcp.example.com/.well-known/oauth-authorization-server' }],
3749
3883
  * userId: 'all',
3750
3884
  * });
3751
- * await composio.experimental.customToolkits.update(slug, { name: 'My Renamed Toolkit' });
3885
+ * await composio.customToolkits.update(slug, { name: 'My Renamed Toolkit' });
3752
3886
  * ```
3753
3887
  */
3754
3888
  var CustomToolkits = class {
@@ -3759,7 +3893,6 @@ var CustomToolkits = class {
3759
3893
  }
3760
3894
  /**
3761
3895
  * Creates a custom MCP toolkit and returns its generated slug.
3762
- * **Experimental — custom toolkits are in pilot; shape may change.**
3763
3896
  *
3764
3897
  * Set `userId` to `'all'` to share the toolkit with every user in the
3765
3898
  * project, or to a user ID to make it private to that user. `mcpUrl`,
@@ -3773,7 +3906,7 @@ var CustomToolkits = class {
3773
3906
  *
3774
3907
  * @example
3775
3908
  * ```typescript
3776
- * const { slug, connectLink } = await composio.experimental.customToolkits.create({
3909
+ * const { slug, connectLink } = await composio.customToolkits.create({
3777
3910
  * name: 'Internal API',
3778
3911
  * mcpUrl: 'https://mcp.internal.example.com/mcp',
3779
3912
  * authSchemes: [
@@ -3793,7 +3926,6 @@ var CustomToolkits = class {
3793
3926
  /**
3794
3927
  * Updates a custom toolkit's name, logo or API key field copy. Omitted
3795
3928
  * fields keep their current value.
3796
- * **Experimental — custom toolkits are in pilot; shape may change.**
3797
3929
  *
3798
3930
  * On a project with 2FA enabled, updating a private toolkit requires the
3799
3931
  * `userId` it is private to.
@@ -3805,7 +3937,7 @@ var CustomToolkits = class {
3805
3937
  *
3806
3938
  * @example
3807
3939
  * ```typescript
3808
- * await composio.experimental.customToolkits.update('CUSTOM_INTERNAL_API_K7F2Q', {
3940
+ * await composio.customToolkits.update('CUSTOM_INTERNAL_API_K7F2Q', {
3809
3941
  * name: 'Internal API (prod)',
3810
3942
  * userId: 'user_123',
3811
3943
  * });
@@ -3821,7 +3953,6 @@ var CustomToolkits = class {
3821
3953
  /**
3822
3954
  * Creates a custom toolkit, or updates its display metadata (name, API key
3823
3955
  * field copy) when the project already owns a toolkit with this slug.
3824
- * **Experimental — custom toolkits are in pilot; shape may change.**
3825
3956
  *
3826
3957
  * `mcpUrl` and `authSchemes` cannot change on an existing toolkit:
3827
3958
  * re-sending them unchanged is a no-op, and changing them fails with a 409.
@@ -3833,7 +3964,7 @@ var CustomToolkits = class {
3833
3964
  *
3834
3965
  * @example
3835
3966
  * ```typescript
3836
- * await composio.experimental.customToolkits.upsert({
3967
+ * await composio.customToolkits.upsert({
3837
3968
  * slug: 'INTERNAL_API',
3838
3969
  * toolkitConfig: {
3839
3970
  * name: 'Internal API',
@@ -3863,7 +3994,6 @@ var CustomToolkits = class {
3863
3994
  /**
3864
3995
  * Re-fetches the tool definitions of a custom toolkit from its remote MCP
3865
3996
  * server. Call it when automatic sync fails or the remote tools change.
3866
- * **Experimental — custom toolkits are in pilot; shape may change.**
3867
3997
  *
3868
3998
  * @param {string} slug - The custom toolkit slug (`CUSTOM_...`)
3869
3999
  * @param {CustomToolkitSyncParams} [params] - Optional connected account to fetch the definitions with
@@ -3872,7 +4002,7 @@ var CustomToolkits = class {
3872
4002
  *
3873
4003
  * @example
3874
4004
  * ```typescript
3875
- * const { version, syncedCount } = await composio.experimental.customToolkits.sync(
4005
+ * const { version, syncedCount } = await composio.customToolkits.sync(
3876
4006
  * 'CUSTOM_MY_TOOLKIT',
3877
4007
  * { connectedAccountId: 'ca_abc123' }
3878
4008
  * );
@@ -3889,7 +4019,6 @@ var CustomToolkits = class {
3889
4019
  * Deletes a custom toolkit owned by the project, with its tools, auth
3890
4020
  * configs and connected accounts. The credentials behind those connected
3891
4021
  * accounts are revoked in background jobs (`revokeJobIds`).
3892
- * **Experimental — custom toolkits are in pilot; shape may change.**
3893
4022
  *
3894
4023
  * Composio-managed toolkits cannot be deleted; the API answers 403.
3895
4024
  *
@@ -3898,7 +4027,7 @@ var CustomToolkits = class {
3898
4027
  *
3899
4028
  * @example
3900
4029
  * ```typescript
3901
- * const result = await composio.experimental.customToolkits.delete('CUSTOM_MY_TOOLKIT');
4030
+ * const result = await composio.customToolkits.delete('CUSTOM_MY_TOOLKIT');
3902
4031
  * console.log(result.connectedAccountsDeleted);
3903
4032
  * ```
3904
4033
  */
@@ -3908,8 +4037,7 @@ var CustomToolkits = class {
3908
4037
  }
3909
4038
  };
3910
4039
 
3911
- //#endregion
3912
- //#region src/models/Experimental.ts
4040
+ // src/models/Experimental.ts
3913
4041
  /**
3914
4042
  * @fileoverview The `composio.experimental` namespace. Houses experimental
3915
4043
  * SDK methods whose shape may change in future releases.
@@ -3985,13 +4113,8 @@ var Experimental = class {
3985
4113
  */
3986
4114
  usage;
3987
4115
  /**
3988
- * Register and manage project-owned custom toolkits (`create()` / `update()` / `sync()` / `delete()`).
3989
- * **Experimental — custom toolkits are in pilot; shape may change.**
3990
- *
3991
- * @example
3992
- * ```typescript
3993
- * await composio.experimental.customToolkits.sync('CUSTOM_MY_TOOLKIT');
3994
- * ```
4116
+ * Same object as `composio.customToolkits`.
4117
+ * @deprecated Use `composio.customToolkits` instead. Custom toolkits are no longer experimental; this alias is kept for backwards compatibility.
3995
4118
  */
3996
4119
  customToolkits;
3997
4120
  constructor(client) {
@@ -4064,8 +4187,7 @@ var Experimental = class {
4064
4187
  }
4065
4188
  };
4066
4189
 
4067
- //#endregion
4068
- //#region src/models/ConnectedAccounts.ts
4190
+ // src/models/ConnectedAccounts.ts
4069
4191
  /**
4070
4192
  * @fileoverview Connected accounts class for Composio SDK, used to manage connected accounts of a user.
4071
4193
  *
@@ -4581,8 +4703,7 @@ var ConnectedAccounts = class {
4581
4703
  }
4582
4704
  };
4583
4705
 
4584
- //#endregion
4585
- //#region src/utils/transformers/toolkits.ts
4706
+ // src/utils/transformers/toolkits.ts
4586
4707
  const transformToolkitAuthField = (field) => ({
4587
4708
  name: field.name,
4588
4709
  displayName: field.displayName,
@@ -4657,6 +4778,13 @@ const transformToolkitRetrieveResponse = (response) => {
4657
4778
  },
4658
4779
  isLocalToolkit: response.is_local_toolkit,
4659
4780
  composioManagedAuthSchemes: response.composio_managed_auth_schemes,
4781
+ composioManagedAuth: response.composio_managed_auth?.map((app) => ({
4782
+ managedAppId: app.managed_app_id,
4783
+ isDefault: app.is_default,
4784
+ mode: app.mode,
4785
+ scopes: app.scopes,
4786
+ ...app.user_scopes != null && { userScopes: app.user_scopes }
4787
+ })),
4660
4788
  authConfigDetails: response.auth_config_details?.map((authConfig) => ({
4661
4789
  name: authConfig.name,
4662
4790
  mode: authConfig.mode,
@@ -4736,8 +4864,7 @@ const transformToolkitListGrantContextsResponse = (response) => {
4736
4864
  }));
4737
4865
  };
4738
4866
 
4739
- //#endregion
4740
- //#region src/models/Toolkits.ts
4867
+ // src/models/Toolkits.ts
4741
4868
  /**
4742
4869
  * Toolkits class
4743
4870
  *
@@ -5036,8 +5163,7 @@ var Toolkits = class {
5036
5163
  }
5037
5164
  };
5038
5165
 
5039
- //#endregion
5040
- //#region src/types/triggers.types.ts
5166
+ // src/types/triggers.types.ts
5041
5167
  const TriggerStatuses = {
5042
5168
  ENABLE: "enable",
5043
5169
  DISABLE: "disable"
@@ -5268,8 +5394,7 @@ const VerifyWebhookParamsSchema = z$1.object({
5268
5394
  tolerance: z$1.number().optional().default(300)
5269
5395
  });
5270
5396
 
5271
- //#endregion
5272
- //#region src/types/webhooks.types.ts
5397
+ // src/types/webhooks.types.ts
5273
5398
  /**
5274
5399
  * Webhook payload versions accepted by the webhook subscription endpoints.
5275
5400
  */
@@ -5361,8 +5486,7 @@ const WebhookEndpointUpdateParamsSchema = z$1.object({
5361
5486
  /** Key-value pairs to merge into the setup fields. Omitted fields are preserved. */
5362
5487
  data: z$1.record(z$1.string(), z$1.string()) });
5363
5488
 
5364
- //#endregion
5365
- //#region src/utils/transformers/webhooks.ts
5489
+ // src/utils/transformers/webhooks.ts
5366
5490
  const transformWebhookSubscription = (response) => {
5367
5491
  return transform(response).with(WebhookSubscriptionSchema).using((response) => ({
5368
5492
  id: response.id,
@@ -5417,8 +5541,7 @@ const transformWebhookEndpointListResponse = (response) => {
5417
5541
  })) }));
5418
5542
  };
5419
5543
 
5420
- //#endregion
5421
- //#region src/models/Webhooks.ts
5544
+ // src/models/Webhooks.ts
5422
5545
  /**
5423
5546
  * The only part of the `list({ limit: 1 })` probe the upsert needs: the id of
5424
5547
  * the first (and, since the API allows one subscription per project, only)
@@ -5741,16 +5864,14 @@ var Webhooks = class {
5741
5864
  }
5742
5865
  };
5743
5866
 
5744
- //#endregion
5745
- //#region src/services/internal/InternalService.types.ts
5867
+ // src/services/internal/InternalService.types.ts
5746
5868
  const SDKRealtimeCredentialsResponseSchema = z$1.object({
5747
5869
  projectId: z$1.string().describe("The project ID"),
5748
5870
  pusherKey: z$1.string().describe("The Pusher key"),
5749
5871
  pusherCluster: z$1.string().describe("The Pusher cluster")
5750
5872
  });
5751
5873
 
5752
- //#endregion
5753
- //#region src/services/internal/InternalService.ts
5874
+ // src/services/internal/InternalService.ts
5754
5875
  const SDK_REALTIME_CREDENTIALS_ENDPOINT = "/api/v3/internal/sdk/realtime/credentials";
5755
5876
  var InternalService = class {
5756
5877
  client;
@@ -5775,8 +5896,7 @@ var InternalService = class {
5775
5896
  }
5776
5897
  };
5777
5898
 
5778
- //#endregion
5779
- //#region src/utils/userCallback.ts
5899
+ // src/utils/userCallback.ts
5780
5900
  /**
5781
5901
  * Describes a thrown or rejected value for a log line without ever throwing.
5782
5902
  *
@@ -5816,8 +5936,7 @@ function invokeUserCallback(label, callback) {
5816
5936
  }
5817
5937
  }
5818
5938
 
5819
- //#endregion
5820
- //#region src/utils/sdk.ts
5939
+ // src/utils/sdk.ts
5821
5940
  /**
5822
5941
  * Header that carries a Composio user API key (`uak_...`) instead of a project
5823
5942
  * API key. It is the only default header the credential resolver reads.
@@ -6214,8 +6333,7 @@ function getToolkitVersionsFromEnv(defaultVersions) {
6214
6333
  return toolkitVersions;
6215
6334
  }
6216
6335
 
6217
- //#endregion
6218
- //#region src/services/pusher/Pusher.ts
6336
+ // src/services/pusher/Pusher.ts
6219
6337
  /**
6220
6338
  * Owns the realtime connection that delivers trigger events.
6221
6339
  *
@@ -6425,8 +6543,7 @@ var PusherService = class {
6425
6543
  }
6426
6544
  };
6427
6545
 
6428
- //#endregion
6429
- //#region src/utils/transformers/triggers.ts
6546
+ // src/utils/transformers/triggers.ts
6430
6547
  function transformIncomingTriggerPayload(response) {
6431
6548
  return transform(response).with(IncomingTriggerPayloadSchema).using((response) => ({
6432
6549
  id: response.metadata.nanoId,
@@ -6513,8 +6630,7 @@ function transformTriggerInstanceListActiveResponse(response) {
6513
6630
  }));
6514
6631
  }
6515
6632
 
6516
- //#endregion
6517
- //#region src/utils/crypto.ts
6633
+ // src/utils/crypto.ts
6518
6634
  /**
6519
6635
  * Computes HMAC-SHA256 using Web Crypto API
6520
6636
  */
@@ -6539,8 +6655,7 @@ function timingSafeEqual(a, b) {
6539
6655
  return result === 0;
6540
6656
  }
6541
6657
 
6542
- //#endregion
6543
- //#region src/models/Triggers.ts
6658
+ // src/models/Triggers.ts
6544
6659
  /**
6545
6660
  * Safely converts a value to a string, returning the default if the value is null, undefined, or empty.
6546
6661
  * This prevents runtime crashes when calling string methods like `.toLowerCase()` on non-string values.
@@ -6794,7 +6909,9 @@ var Triggers = class {
6794
6909
  * @returns True if the trigger data matches the filters, false otherwise
6795
6910
  */
6796
6911
  shouldSendTriggerAfterFilters(filters, data) {
6797
- if (filters.toolkits?.length && !filters.toolkits.map((toolkit) => toolkit.toLowerCase()).includes(data.toolkitSlug.toLowerCase())) {
6912
+ const toolkitSlug = data.toolkitSlug.toLowerCase();
6913
+ const triggerSlug = data.triggerSlug.toLowerCase();
6914
+ if (filters.toolkits?.length && !filters.toolkits.map((toolkit) => toolkit.toLowerCase()).some((toolkit) => toolkit === toolkitSlug || triggerSlug.startsWith(`${toolkit}_`))) {
6798
6915
  logger.debug("Trigger does not match toolkits filter", JSON.stringify(filters.toolkits, null, 2));
6799
6916
  return false;
6800
6917
  }
@@ -7328,8 +7445,7 @@ var Triggers = class {
7328
7445
  }
7329
7446
  };
7330
7447
 
7331
- //#endregion
7332
- //#region src/types/mcp.experimental.types.ts
7448
+ // src/types/mcp.experimental.types.ts
7333
7449
  const MCPServerInstanceSchema = z.object({
7334
7450
  id: z.string(),
7335
7451
  name: z.string(),
@@ -7431,8 +7547,7 @@ const MCPServerConnectedAccountsSchema = z.record(z.string(), z.array(z.object({
7431
7547
  connectedAccountId: z.string()
7432
7548
  })));
7433
7549
 
7434
- //#endregion
7435
- //#region src/models/MCP.ts
7550
+ // src/models/MCP.ts
7436
7551
  function transformMCPItemResponse(response) {
7437
7552
  return transform(response).with(MCPItemSchema).using((raw) => ({
7438
7553
  name: raw.name,
@@ -7596,7 +7711,7 @@ var MCP = class {
7596
7711
  * const server = await composio.experimental.mcp.get("mcp_12345");
7597
7712
  *
7598
7713
  * console.log(server.name); // "My Personal MCP Server"
7599
- * console.log(server.allowedTools); // ["GITHUB_CREATE_ISSUE", "SLACK_SEND_MESSAGE"]
7714
+ * console.log(server.allowedTools); // ["GITHUB_CREATE_AN_ISSUE", "SLACK_SEND_MESSAGE"]
7600
7715
  * console.log(server.toolkits); // ["github", "slack"]
7601
7716
  * console.log(server.serverInstanceCount); // 3
7602
7717
  *
@@ -7678,7 +7793,7 @@ var MCP = class {
7678
7793
  * {
7679
7794
  * toolkit: "github",
7680
7795
  * authConfigId: "auth_abc123",
7681
- * allowedTools: ["GITHUB_CREATE_ISSUE", "GITHUB_LIST_REPOS"]
7796
+ * allowedTools: ["GITHUB_CREATE_AN_ISSUE", "GITHUB_LIST_REPOS"]
7682
7797
  * },
7683
7798
  * {
7684
7799
  * toolkit: "slack",
@@ -7785,8 +7900,7 @@ var MCP = class {
7785
7900
  }
7786
7901
  };
7787
7902
 
7788
- //#endregion
7789
- //#region src/types/logs.types.ts
7903
+ // src/types/logs.types.ts
7790
7904
  /**
7791
7905
  * Fields a tool-execution log search can filter on.
7792
7906
  */
@@ -7884,8 +7998,7 @@ const ToolExecutionLogDetailSchema = ToolExecutionLogSchema.extend({
7884
7998
  data: z$1.record(z$1.string(), z$1.unknown())
7885
7999
  });
7886
8000
 
7887
- //#endregion
7888
- //#region src/utils/transformers/logs.ts
8001
+ // src/utils/transformers/logs.ts
7889
8002
  const transformLogSearchParams = (params) => ({
7890
8003
  limit: params.limit,
7891
8004
  cursor: params.cursor,
@@ -7946,8 +8059,7 @@ const transformToolExecutionLogDetail = (response) => {
7946
8059
  }));
7947
8060
  };
7948
8061
 
7949
- //#endregion
7950
- //#region src/models/Logs.ts
8062
+ // src/models/Logs.ts
7951
8063
  /**
7952
8064
  * `composio.logs` — tool-execution logs.
7953
8065
  *
@@ -8011,8 +8123,7 @@ var Logs = class {
8011
8123
  }
8012
8124
  };
8013
8125
 
8014
- //#endregion
8015
- //#region src/lib/sessionConfigConflict.ts
8126
+ // src/lib/sessionConfigConflict.ts
8016
8127
  const SESSION_CONFIG_CONFLICT_MARKER = "sessionConfigConflict";
8017
8128
  /**
8018
8129
  * Adds the issue raised when a saved Session config (`experimental.sessionConfigId`)
@@ -8040,8 +8151,7 @@ const parseSessionConfigInput = (schema, input) => {
8040
8151
  throw result.error;
8041
8152
  };
8042
8153
 
8043
- //#endregion
8044
- //#region src/types/toolRouter.types.ts
8154
+ // src/types/toolRouter.types.ts
8045
8155
  const SessionPreset = { DIRECT_TOOLS: "direct_tools" };
8046
8156
  const MCPServerTypeSchema = z.enum(["http", "sse"]);
8047
8157
  /**
@@ -8583,8 +8693,7 @@ const ToolRouterSessionEnsureConnectedOptionsSchema = z.object({
8583
8693
  timeout: z.number().int().positive().optional()
8584
8694
  });
8585
8695
 
8586
- //#endregion
8587
- //#region src/types/sessionConfigs.types.ts
8696
+ // src/types/sessionConfigs.types.ts
8588
8697
  /**
8589
8698
  * Params for `composio.sessionConfigs.list()`. The backend owns the defaults:
8590
8699
  * active configs only, 20 per page, at most 100.
@@ -8675,8 +8784,7 @@ const SessionConfigSchema = SessionConfigSummarySchema.extend({
8675
8784
  config: SessionConfigPolicySchema
8676
8785
  });
8677
8786
 
8678
- //#endregion
8679
- //#region src/utils/transformers/sessionConfigs.ts
8787
+ // src/utils/transformers/sessionConfigs.ts
8680
8788
  const transformSessionConfigSummary = (response) => {
8681
8789
  return transform(response).with(SessionConfigSummarySchema).using((response) => ({
8682
8790
  id: response.id,
@@ -8704,8 +8812,7 @@ const transformSessionConfig = (response) => {
8704
8812
  }));
8705
8813
  };
8706
8814
 
8707
- //#endregion
8708
- //#region src/models/SessionConfigs.ts
8815
+ // src/models/SessionConfigs.ts
8709
8816
  /**
8710
8817
  * `composio.sessionConfigs` — saved, reusable Session configs.
8711
8818
  *
@@ -8786,8 +8893,7 @@ var SessionConfigs = class {
8786
8893
  }
8787
8894
  };
8788
8895
 
8789
- //#endregion
8790
- //#region src/types/keyring.types.ts
8896
+ // src/types/keyring.types.ts
8791
8897
  /**
8792
8898
  * A public JWK a secret can be sealed to. Fields keep their JWK names so a
8793
8899
  * key can be handed straight to WebCrypto or a JOSE library.
@@ -8816,8 +8922,7 @@ const KeyringTransferKeysResponseSchema = z$1.object({
8816
8922
  keys: z$1.array(KeyringTransferKeySchema)
8817
8923
  });
8818
8924
 
8819
- //#endregion
8820
- //#region src/utils/transformers/keyring.ts
8925
+ // src/utils/transformers/keyring.ts
8821
8926
  const transformKeyringTransferKeysResponse = (response) => {
8822
8927
  return transform(response).with(KeyringTransferKeysResponseSchema).using((response) => ({
8823
8928
  activeKid: response.active_kid,
@@ -8832,8 +8937,7 @@ const transformKeyringTransferKeysResponse = (response) => {
8832
8937
  }));
8833
8938
  };
8834
8939
 
8835
- //#endregion
8836
- //#region src/models/Keyring.ts
8940
+ // src/models/Keyring.ts
8837
8941
  /**
8838
8942
  * `composio.keyring` — the organization's customer-managed keyring.
8839
8943
  *
@@ -8880,8 +8984,7 @@ var Keyring = class {
8880
8984
  }
8881
8985
  };
8882
8986
 
8883
- //#endregion
8884
- //#region src/utils/version.ts
8987
+ // src/utils/version.ts
8885
8988
  const VERSION_CHECK_TIMEOUT_MS = 2e3;
8886
8989
  /**
8887
8990
  * Checks for the latest version of the Composio SDK from NPM.
@@ -8910,8 +9013,7 @@ async function checkForLatestVersionFromNPM(currentVersion) {
8910
9013
  } catch (_error) {}
8911
9014
  }
8912
9015
 
8913
- //#endregion
8914
- //#region src/provider/BaseProvider.ts
9016
+ // src/provider/BaseProvider.ts
8915
9017
  /**
8916
9018
  * @internal
8917
9019
  * Base class for all providers.
@@ -8987,8 +9089,7 @@ var BaseAgenticProvider = class extends BaseProvider {
8987
9089
  _isAgentic = true;
8988
9090
  };
8989
9091
 
8990
- //#endregion
8991
- //#region src/utils/toolArguments.ts
9092
+ // src/utils/toolArguments.ts
8992
9093
  /**
8993
9094
  * Tool-argument normalization.
8994
9095
  *
@@ -9044,8 +9145,7 @@ function describeTool(toolSlug) {
9044
9145
  return toolSlug ? `Tool '${toolSlug}'` : "Tool";
9045
9146
  }
9046
9147
 
9047
- //#endregion
9048
- //#region src/provider/OpenAIProvider.ts
9148
+ // src/provider/OpenAIProvider.ts
9049
9149
  var OpenAIProvider = class extends BaseNonAgenticProvider {
9050
9150
  name = "openai";
9051
9151
  /**
@@ -9184,12 +9284,10 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
9184
9284
  }
9185
9285
  };
9186
9286
 
9187
- //#endregion
9188
- //#region package.json
9189
- var version = "0.29.0";
9287
+ // package.json
9288
+ var version = "0.31.0";
9190
9289
 
9191
- //#endregion
9192
- //#region src/utils/session.ts
9290
+ // src/utils/session.ts
9193
9291
  /**
9194
9292
  * Detect the JavaScript runtime environment without importing any external modules.
9195
9293
  * Uses only built-in globals to avoid breaking in different environments.
@@ -9236,8 +9334,7 @@ function getClientIdentity(provider) {
9236
9334
  };
9237
9335
  }
9238
9336
 
9239
- //#endregion
9240
- //#region src/lib/toolRouterParams.ts
9337
+ // src/lib/toolRouterParams.ts
9241
9338
  /** `require_approval` when the caller set an approval list, nothing otherwise. */
9242
9339
  const requireApprovalParam = (requireApproval) => requireApproval !== void 0 ? { require_approval: requireApproval } : {};
9243
9340
  const transformToolRouterToolsParams = (params) => {
@@ -9429,8 +9526,7 @@ const transformToolRouterUpdateParams = (config) => {
9429
9526
  return params;
9430
9527
  };
9431
9528
 
9432
- //#endregion
9433
- //#region src/lib/toolRouterMcp.ts
9529
+ // src/lib/toolRouterMcp.ts
9434
9530
  /**
9435
9531
  * Returns the tuple origin (`scheme://host[:port]`) of an absolute URL.
9436
9532
  *
@@ -9507,8 +9603,7 @@ const buildMCPServerConfig = (input) => {
9507
9603
  };
9508
9604
  };
9509
9605
 
9510
- //#endregion
9511
- //#region src/lib/toolRouterSourceSessionConfig.ts
9606
+ // src/lib/toolRouterSourceSessionConfig.ts
9512
9607
  /**
9513
9608
  * Reads the saved Session config most recently applied to a session from a
9514
9609
  * create, retrieve, attach or patch response. Copies only `id`.
@@ -9518,8 +9613,7 @@ const getSourceSessionConfig = (response) => {
9518
9613
  return source ? { id: source.id } : void 0;
9519
9614
  };
9520
9615
 
9521
- //#endregion
9522
- //#region src/types/ToolRouterSessionFilesMount.types.ts
9616
+ // src/types/ToolRouterSessionFilesMount.types.ts
9523
9617
  const ToolRouterSessionFilesMountListOptionsSchema = z.object({
9524
9618
  path: z.string().optional(),
9525
9619
  mountId: z.string().default(DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID),
@@ -9574,8 +9668,7 @@ const FileDeleteResponseSchema = z.object({
9574
9668
  sandboxMountPrefix: data.sandbox_mount_prefix
9575
9669
  }));
9576
9670
 
9577
- //#endregion
9578
- //#region src/utils/safePath.ts
9671
+ // src/utils/safePath.ts
9579
9672
  /**
9580
9673
  * Filename containment for untrusted input.
9581
9674
  *
@@ -9770,8 +9863,7 @@ function safeBasename(name, label = "filename") {
9770
9863
  return portable === basename ? portable : tagWithOriginal(portable, basename);
9771
9864
  }
9772
9865
 
9773
- //#endregion
9774
- //#region src/models/RemoteFile.ts
9866
+ // src/models/RemoteFile.ts
9775
9867
  const existingFileError = z$2.object({ code: z$2.literal("EEXIST") });
9776
9868
  function getParentDir(filePath) {
9777
9869
  const lastSep = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\"));
@@ -9907,7 +9999,8 @@ var RemoteFile = class RemoteFile {
9907
9999
  * Downloads and saves the file to the local filesystem.
9908
10000
  * Requires a Node.js runtime with file system support (not available in Cloudflare Workers/Edge).
9909
10001
  *
9910
- * @param path - Local path to save the file. If omitted, saves to the Composio temp directory using the filename from the mount path.
10002
+ * @param path - Local path to save the file. An explicit path does not require a home directory.
10003
+ * If omitted, saves to the Composio temp directory using the filename from the mount path.
9911
10004
  * An existing default destination gets a copy number before its extension.
9912
10005
  * @returns The absolute path where the file was saved
9913
10006
  * @throws Error if file system is not supported or the save fails
@@ -9915,18 +10008,20 @@ var RemoteFile = class RemoteFile {
9915
10008
  */
9916
10009
  async save(path) {
9917
10010
  if (!platform.supportsFileSystem) throw new Error("File system operations are not supported in this runtime (e.g. Cloudflare Workers). Use buffer(), text(), or blob() to work with the file content in memory, or run in Node.js.");
10011
+ if (path != null) {
10012
+ const content = await this.buffer();
10013
+ const dir = getParentDir(path);
10014
+ if (dir && !platform.existsSync(dir)) platform.mkdirSync(dir);
10015
+ platform.writeFileSync(path, content);
10016
+ return path;
10017
+ }
9918
10018
  const homeDir = platform.homedir();
9919
10019
  if (!homeDir) throw new Error("Cannot determine save location: home directory is not available");
9920
10020
  const defaultDir = platform.joinPath(homeDir, COMPOSIO_DIR, TEMP_FILES_DIRECTORY_NAME);
9921
- const defaultName = path == null ? safeBasename(this.mountRelativePath, "mount path") : "";
9922
- const savePath = path ?? platform.joinPath(defaultDir, defaultName);
10021
+ const defaultName = safeBasename(this.mountRelativePath, "mount path");
10022
+ const savePath = platform.joinPath(defaultDir, defaultName);
9923
10023
  const content = await this.buffer();
9924
- const dir = path != null ? getParentDir(savePath) : defaultDir;
9925
- if (dir && !platform.existsSync(dir)) platform.mkdirSync(dir);
9926
- if (path != null) {
9927
- platform.writeFileSync(savePath, content);
9928
- return savePath;
9929
- }
10024
+ if (!platform.existsSync(defaultDir)) platform.mkdirSync(defaultDir);
9930
10025
  for (let copy = 0;; copy++) {
9931
10026
  const destination = copy === 0 ? savePath : platform.joinPath(defaultDir, numberedBasename(defaultName, copy));
9932
10027
  try {
@@ -9939,8 +10034,7 @@ var RemoteFile = class RemoteFile {
9939
10034
  }
9940
10035
  };
9941
10036
 
9942
- //#endregion
9943
- //#region src/models/ToolRouterSessionFileMount.ts
10037
+ // src/models/ToolRouterSessionFileMount.ts
9944
10038
  /**
9945
10039
  * File mount for a Composio session, reached via `session.experimental.files`
9946
10040
  * on a session created with `composio.sessions.create(...)`. Upload, list,
@@ -10180,8 +10274,7 @@ var ToolRouterSessionFilesMount = class {
10180
10274
  }
10181
10275
  };
10182
10276
 
10183
- //#endregion
10184
- //#region src/models/proxyParamsTransform.ts
10277
+ // src/models/proxyParamsTransform.ts
10185
10278
  /**
10186
10279
  * Transform SDK session proxy params to the official client request format.
10187
10280
  * Converts SDK-facing `toolkit` → `toolkit_slug` and `parameters[].in` → `parameters[].type`.
@@ -10201,8 +10294,7 @@ function transformProxyParams(params) {
10201
10294
  };
10202
10295
  }
10203
10296
 
10204
- //#endregion
10205
- //#region src/models/customToolExecution.ts
10297
+ // src/models/customToolExecution.ts
10206
10298
  /**
10207
10299
  * Find a custom tool entry by slug.
10208
10300
  * Checks both the final slug map (LOCAL_X — agent/LLM path) and original slug map (X — programmatic path).
@@ -10267,14 +10359,7 @@ async function executeCustomTool(entry, arguments_, sessionContext, options) {
10267
10359
  }
10268
10360
  }
10269
10361
 
10270
- //#endregion
10271
- //#region src/models/inlineCustomToolsPayload.ts
10272
- function inlineCustomToolsExperimental(payload) {
10273
- return payload;
10274
- }
10275
-
10276
- //#endregion
10277
- //#region src/models/SessionContext.ts
10362
+ // src/models/SessionContext.ts
10278
10363
  /**
10279
10364
  * Concrete implementation of SessionContext.
10280
10365
  * One instance is created per session (or per multi-execute batch) and shared
@@ -10334,9 +10419,10 @@ var SessionContextImpl = class {
10334
10419
  tool_slug: toolSlug,
10335
10420
  arguments: arguments_
10336
10421
  };
10337
- const experimental = inlineCustomToolsExperimental(this.inlineCustomToolsPayload);
10338
- if (experimental) executeParams.experimental = experimental;
10339
- const response = await withCancellation(() => this.client.toolRouter.session.execute(this.sessionId, executeParams, withoutRetries(requestOptions)), requestOptions?.signal);
10422
+ if (this.inlineCustomToolsPayload) executeParams.experimental = this.inlineCustomToolsPayload;
10423
+ const response = await withCancellation(() => this.client.toolRouter.session.execute(this.sessionId, executeParams, withoutRetries(requestOptions)), requestOptions?.signal).catch((error) => {
10424
+ throw handleToolExecutionError(toolSlug, error);
10425
+ });
10340
10426
  return ToolRouterSessionExecuteResponseSchema.parse(transformExecuteResponse(response, toolSlug));
10341
10427
  }
10342
10428
  /**
@@ -10354,8 +10440,7 @@ var SessionContextImpl = class {
10354
10440
  }
10355
10441
  };
10356
10442
 
10357
- //#endregion
10358
- //#region src/lib/toolRouterSessionDelete.ts
10443
+ // src/lib/toolRouterSessionDelete.ts
10359
10444
  async function deleteToolRouterSession(client, sessionId, requestOptions) {
10360
10445
  const response = await withCancellation(() => client.toolRouter.session.delete(sessionId, requestOptions), requestOptions?.signal);
10361
10446
  return ToolRouterSessionDeleteResponseSchema.parse({
@@ -10364,8 +10449,7 @@ async function deleteToolRouterSession(client, sessionId, requestOptions) {
10364
10449
  });
10365
10450
  }
10366
10451
 
10367
- //#endregion
10368
- //#region src/models/ToolRouterSession.ts
10452
+ // src/models/ToolRouterSession.ts
10369
10453
  const COMPOSIO_MULTI_EXECUTE_TOOL = "COMPOSIO_MULTI_EXECUTE_TOOL";
10370
10454
  /** The request fields that carry the user's answers to an earlier `input_required` call. */
10371
10455
  function inputResponseParams(options) {
@@ -10751,11 +10835,10 @@ var ToolRouterSession = class {
10751
10835
  * Returns relevant tools for the given query with schemas and guidance.
10752
10836
  */
10753
10837
  async search(params, requestOptions) {
10754
- const experimental = inlineCustomToolsExperimental(this.inlineCustomToolsPayload);
10755
10838
  const searchParams = {
10756
10839
  queries: [{ use_case: params.query }],
10757
10840
  ...params.toolkits?.length ? { toolkits: params.toolkits } : {},
10758
- ...experimental ? { experimental } : {}
10841
+ ...this.inlineCustomToolsPayload && { experimental: this.inlineCustomToolsPayload }
10759
10842
  };
10760
10843
  const response = await withCancellation(() => this.client.toolRouter.session.search(this.sessionId, searchParams, requestOptions), requestOptions?.signal);
10761
10844
  const transformed = transformSearchResponse(response);
@@ -10797,9 +10880,10 @@ var ToolRouterSession = class {
10797
10880
  ...inputResponseParams(options)
10798
10881
  };
10799
10882
  if (options?.account) executeParams.account = options.account;
10800
- const experimental = inlineCustomToolsExperimental(this.inlineCustomToolsPayload);
10801
- if (experimental) executeParams.experimental = experimental;
10802
- const response = await withCancellation(() => this.client.toolRouter.session.execute(this.sessionId, executeParams, withoutRetries(requestOptions)), requestOptions?.signal);
10883
+ if (this.inlineCustomToolsPayload) executeParams.experimental = this.inlineCustomToolsPayload;
10884
+ const response = await withCancellation(() => this.client.toolRouter.session.execute(this.sessionId, executeParams, withoutRetries(requestOptions)), requestOptions?.signal).catch((error) => {
10885
+ throw handleToolExecutionError(toolSlug, error);
10886
+ });
10803
10887
  const transformed = transformExecuteResponse(response, toolSlug);
10804
10888
  return ToolRouterSessionExecuteResponseSchema.parse(transformed);
10805
10889
  }
@@ -10830,9 +10914,10 @@ var ToolRouterSession = class {
10830
10914
  arguments: arguments_ ?? {},
10831
10915
  ...inputResponseParams(options)
10832
10916
  };
10833
- const experimental = inlineCustomToolsExperimental(this.inlineCustomToolsPayload);
10834
- if (experimental) executeMetaParams.experimental = experimental;
10835
- const response = await withCancellation(() => this.client.toolRouter.session.executeMeta(this.sessionId, executeMetaParams, withoutRetries(requestOptions)), requestOptions?.signal);
10917
+ if (this.inlineCustomToolsPayload) executeMetaParams.experimental = this.inlineCustomToolsPayload;
10918
+ const response = await withCancellation(() => this.client.toolRouter.session.executeMeta(this.sessionId, executeMetaParams, withoutRetries(requestOptions)), requestOptions?.signal).catch((error) => {
10919
+ throw handleToolExecutionError(slug, error);
10920
+ });
10836
10921
  const transformed = transformExecuteResponse(response, slug);
10837
10922
  return ToolRouterSessionExecuteResponseSchema.parse(transformed);
10838
10923
  }
@@ -10980,8 +11065,7 @@ var ToolRouterSession = class {
10980
11065
  sessionId: this.sessionId,
10981
11066
  arguments: input
10982
11067
  };
10983
- const experimental = inlineCustomToolsExperimental(this.inlineCustomToolsPayload);
10984
- if (experimental) return ToolsModel.executeSessionTool(toolSlug, body, modifiers, tool, { experimental });
11068
+ if (this.inlineCustomToolsPayload) return ToolsModel.executeSessionTool(toolSlug, body, modifiers, tool, { experimental: this.inlineCustomToolsPayload });
10985
11069
  return ToolsModel.executeSessionTool(toolSlug, body, modifiers, tool);
10986
11070
  }
10987
11071
  /** Parse an individual tool item from COMPOSIO_MULTI_EXECUTE_TOOL's tools array */
@@ -11095,8 +11179,7 @@ var ToolRouterSession = class {
11095
11179
  }
11096
11180
  };
11097
11181
 
11098
- //#endregion
11099
- //#region src/models/ToolRouter.ts
11182
+ // src/models/ToolRouter.ts
11100
11183
  function getSessionMetadata(session) {
11101
11184
  return {
11102
11185
  config: session.config,
@@ -11249,8 +11332,7 @@ var ToolRouter = class {
11249
11332
  }
11250
11333
  };
11251
11334
 
11252
- //#endregion
11253
- //#region src/models/Sessions.ts
11335
+ // src/models/Sessions.ts
11254
11336
  /**
11255
11337
  * First-class API for creating and reusing Composio sessions.
11256
11338
  *
@@ -11264,8 +11346,7 @@ var Sessions = class extends ToolRouter {
11264
11346
  }
11265
11347
  };
11266
11348
 
11267
- //#endregion
11268
- //#region src/utils/toolkitDeprecation.ts
11349
+ // src/utils/toolkitDeprecation.ts
11269
11350
  /**
11270
11351
  * Toolkit version deprecation warnings.
11271
11352
  *
@@ -11489,8 +11570,7 @@ function createToolkitDeprecationFetch(baseFetch) {
11489
11570
  };
11490
11571
  }
11491
11572
 
11492
- //#endregion
11493
- //#region src/composio.ts
11573
+ // src/composio.ts
11494
11574
  /**
11495
11575
  * Level for the API client given the SDK level. The client logs each request's
11496
11576
  * lifecycle at `info`, which is debug-grade for SDK users, so the client stays
@@ -11556,6 +11636,16 @@ var Composio = class Composio {
11556
11636
  /** Public transfer keys of the organization's customer-managed keyring */
11557
11637
  keyring;
11558
11638
  /**
11639
+ * Register and manage project-owned custom toolkits, such as a remote MCP
11640
+ * server (`create()` / `update()` / `sync()` / `delete()`).
11641
+ *
11642
+ * @example
11643
+ * ```typescript
11644
+ * await composio.customToolkits.sync('CUSTOM_MY_TOOLKIT');
11645
+ * ```
11646
+ */
11647
+ customToolkits;
11648
+ /**
11559
11649
  * Experimental SDK methods whose shape may change in future releases.
11560
11650
  * Prefer domain-specific mounts (for example
11561
11651
  * `composio.connectedAccounts.updateAcl(...)`) when available; this
@@ -11747,6 +11837,7 @@ var Composio = class Composio {
11747
11837
  this.logs = new Logs(this.client);
11748
11838
  this.keyring = new Keyring(this.client);
11749
11839
  this.experimental = new Experimental(this.client);
11840
+ this.customToolkits = this.experimental.customToolkits;
11750
11841
  this.sessions = new Sessions(this.client, this.config);
11751
11842
  this.toolRouter = this.sessions;
11752
11843
  this.sessionConfigs = new SessionConfigs(this.client);
@@ -11872,8 +11963,7 @@ var Composio = class Composio {
11872
11963
  }
11873
11964
  };
11874
11965
 
11875
- //#endregion
11876
- //#region src/provider/ComposioProvider.ts
11966
+ // src/provider/ComposioProvider.ts
11877
11967
  var ComposioProvider = class extends BaseNonAgenticProvider {
11878
11968
  name = "ComposioProvider";
11879
11969
  constructor() {
@@ -11887,8 +11977,7 @@ var ComposioProvider = class extends BaseNonAgenticProvider {
11887
11977
  }
11888
11978
  };
11889
11979
 
11890
- //#endregion
11891
- //#region src/utils/schemaPropertyKeys.ts
11980
+ // src/utils/schemaPropertyKeys.ts
11892
11981
  /**
11893
11982
  * JSON-schema property-key sanitization.
11894
11983
  *
@@ -12164,8 +12253,7 @@ function restoreOriginalKeys(value, mapping, depth = 0) {
12164
12253
  return value;
12165
12254
  }
12166
12255
 
12167
- //#endregion
12168
- //#region src/models/AuthScheme.ts
12256
+ // src/models/AuthScheme.ts
12169
12257
  var AuthScheme = class {
12170
12258
  /**
12171
12259
  * Creates a ConnectionData object for OAuth2 authentication.
@@ -12315,8 +12403,7 @@ var AuthScheme = class {
12315
12403
  }
12316
12404
  };
12317
12405
 
12318
- //#endregion
12319
- //#region src/types/webhookEvents.types.ts
12406
+ // src/types/webhookEvents.types.ts
12320
12407
  const WebhookEventTypes = {
12321
12408
  CONNECTION_EXPIRED: "composio.connected_account.expired",
12322
12409
  TRIGGER_MESSAGE: "composio.trigger.message"
@@ -12473,8 +12560,7 @@ const ConnectionExpiredEventSchema = z$1.object({
12473
12560
  */
12474
12561
  const WebhookEventSchema = z$1.discriminatedUnion("type", [ConnectionExpiredEventSchema]);
12475
12562
 
12476
- //#endregion
12477
- //#region src/types/mcp.types.ts
12563
+ // src/types/mcp.types.ts
12478
12564
  /**
12479
12565
  * @deprecated
12480
12566
  */
@@ -12668,5 +12754,4 @@ const ComposioMcpUpdateResponseSchema = z$1.object({
12668
12754
  tools: z$1.array(z$1.string()).optional()
12669
12755
  });
12670
12756
 
12671
- //#endregion
12672
- export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAPIKeyKindError, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioBlockedInternalUrlError, ComposioConnectedAccountNotFoundError, ComposioConnectedAccountNotRevokableError, ComposioConnectedAccountRevocationNotSupportedError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMCPDestinationError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioScopeConfigError, ComposioSensitiveFilePathBlockedError, ComposioSessionConfigConflictError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolExecutionRateLimitError, ComposioToolFetchError, ComposioToolFetchRateLimitError, ComposioToolInputRequiredError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountCompleteAuthParamsSchema, ConnectedAccountCompleteAuthResponseSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountRevokeResponseSchema, ConnectedAccountRevokedTokenSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, CustomToolkitAuthSchemeSchema, CustomToolkitCreateParamsSchema, CustomToolkitCreateResponseSchema, CustomToolkitDeleteResponseSchema, CustomToolkitSyncParamsSchema, CustomToolkitSyncResponseSchema, CustomToolkitUpdateParamsSchema, CustomToolkitUpdateResponseSchema, CustomToolkitUpsertParamsSchema, CustomToolkitUpsertResponseSchema, CustomToolkits, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, Keyring, KeyringTransferKeySchema, KeyringTransferKeysResponseSchema, LogSearchFilterFieldSchema, LogSearchFilterOperatorSchema, LogSearchFilterSchema, LogSearchParamsSchema, LogSearchResponseSchema, LogSearchTimeRangeSchema, Logs, MAX_URL_UPLOAD_SIZE_BYTES, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionConfigListParamsSchema, SessionConfigListResponseSchema, SessionConfigPolicySchema, SessionConfigSchema, SessionConfigSummarySchema, SessionConfigs, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, SsrfErrorCodes, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolExecutionLogDetailSchema, ToolExecutionLogLevelSchema, ToolExecutionLogMetadataSchema, ToolExecutionLogParentSchema, ToolExecutionLogSchema, ToolExecutionLogStatusSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterBlockReasonSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterErrorCodes, ToolRouterHookAppliesToSchema, ToolRouterHookConditionCheckHandlerSchema, ToolRouterHookPromptInjectionCheckHandlerSchema, ToolRouterHookResultSchema, ToolRouterHookSchema, ToolRouterInstantSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterProxyExecuteConfigSchema, ToolRouterProxyExecuteSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionEnsureConnectedOptionsSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionListConfigHistoryOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateExperimentalSchema, ToolRouterUpdateManageConnectionsSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitChangelogItemSchema, ToolkitChangelogResponseSchema, ToolkitConditionalScopeSchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitGetManySlugsSchema, ToolkitGrantContextDimensionSchema, ToolkitLatestVersionSchema, ToolkitListGrantContextsParamsSchema, ToolkitListGrantContextsResponseSchema, ToolkitMangedByEnumSchema, ToolkitRecommendScopesParamsSchema, ToolkitRecommendScopesResponseSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionChangelogSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsGetManyParamsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceTypeSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, Usage, UsageBreakdownGroupSchema, UsageBreakdownParamsSchema, UsageBreakdownResponseSchema, UsageEntitySummarySchema, UsageFiltersSchema, UsageOrderBySchema, UsageOrderDirectionSchema, UsageSummaryParamsSchema, UsageSummaryResponseSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEndpointCreateParamsSchema, WebhookEndpointListItemSchema, WebhookEndpointListParamsSchema, WebhookEndpointListResponseSchema, WebhookEndpointReplaceParamsSchema, WebhookEndpointSchema, WebhookEndpointUpdateParamsSchema, WebhookEndpoints, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookSubscriptionDeleteResponseSchema, WebhookSubscriptionEventTypeSchema, WebhookSubscriptionEventTypesResponseSchema, WebhookSubscriptionListParamsSchema, WebhookSubscriptionListResponseSchema, WebhookSubscriptionRotateSecretResponseSchema, WebhookSubscriptionSchema, WebhookSubscriptionSetParamsSchema, WebhookSubscriptionUpdateParamsSchema, WebhookSubscriptions, WebhookTriggerPayloadV3Schema, WebhookVersionSchema, WebhookVersions, Webhooks, assertSafeFileUploadPath, constants_exports as constants, createConnectionRequest, deduplicateJsonSchemaRequiredArrays, dereferenceJsonSchema, ensureObjectTypeOnProperties, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isBlockedSensitiveFileUploadPath, isComposioRateLimitError, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, omitNullToolArguments, readResponseBodyWithLimit, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry, toStrictJsonSchema };
12757
+ export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAPIKeyKindError, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioBlockedInternalUrlError, ComposioConnectedAccountNotFoundError, ComposioConnectedAccountNotRevokableError, ComposioConnectedAccountRevocationNotSupportedError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMCPDestinationError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioScopeConfigError, ComposioSensitiveFilePathBlockedError, ComposioSessionConfigConflictError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolExecutionRateLimitError, ComposioToolFetchError, ComposioToolFetchRateLimitError, ComposioToolInputRequiredError, ComposioToolNotFoundError, ComposioToolSchemaInvalidError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountCompleteAuthParamsSchema, ConnectedAccountCompleteAuthResponseSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountRevokeResponseSchema, ConnectedAccountRevokedTokenSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, CustomToolkitAuthSchemeSchema, CustomToolkitCreateParamsSchema, CustomToolkitCreateResponseSchema, CustomToolkitDeleteResponseSchema, CustomToolkitSyncParamsSchema, CustomToolkitSyncResponseSchema, CustomToolkitUpdateParamsSchema, CustomToolkitUpdateResponseSchema, CustomToolkitUpsertParamsSchema, CustomToolkitUpsertResponseSchema, CustomToolkits, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, Keyring, KeyringTransferKeySchema, KeyringTransferKeysResponseSchema, LogSearchFilterFieldSchema, LogSearchFilterOperatorSchema, LogSearchFilterSchema, LogSearchParamsSchema, LogSearchResponseSchema, LogSearchTimeRangeSchema, Logs, MAX_URL_UPLOAD_SIZE_BYTES, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionConfigListParamsSchema, SessionConfigListResponseSchema, SessionConfigPolicySchema, SessionConfigSchema, SessionConfigSummarySchema, SessionConfigs, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, SsrfErrorCodes, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolExecutionLogDetailSchema, ToolExecutionLogLevelSchema, ToolExecutionLogMetadataSchema, ToolExecutionLogParentSchema, ToolExecutionLogSchema, ToolExecutionLogStatusSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterBlockReasonSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterErrorCodes, ToolRouterHookAppliesToSchema, ToolRouterHookConditionCheckHandlerSchema, ToolRouterHookPromptInjectionCheckHandlerSchema, ToolRouterHookResultSchema, ToolRouterHookSchema, ToolRouterInstantSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterProxyExecuteConfigSchema, ToolRouterProxyExecuteSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionEnsureConnectedOptionsSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionListConfigHistoryOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateExperimentalSchema, ToolRouterUpdateManageConnectionsSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitChangelogItemSchema, ToolkitChangelogResponseSchema, ToolkitComposioManagedAuthSchema, ToolkitConditionalScopeSchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitGetManySlugsSchema, ToolkitGrantContextDimensionSchema, ToolkitLatestVersionSchema, ToolkitListGrantContextsParamsSchema, ToolkitListGrantContextsResponseSchema, ToolkitMangedByEnumSchema, ToolkitRecommendScopesParamsSchema, ToolkitRecommendScopesResponseSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionChangelogSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsGetManyParamsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceTypeSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, Usage, UsageBreakdownGroupSchema, UsageBreakdownParamsSchema, UsageBreakdownResponseSchema, UsageEntitySummarySchema, UsageFiltersSchema, UsageOrderBySchema, UsageOrderDirectionSchema, UsageSummaryParamsSchema, UsageSummaryResponseSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEndpointCreateParamsSchema, WebhookEndpointListItemSchema, WebhookEndpointListParamsSchema, WebhookEndpointListResponseSchema, WebhookEndpointReplaceParamsSchema, WebhookEndpointSchema, WebhookEndpointUpdateParamsSchema, WebhookEndpoints, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookSubscriptionDeleteResponseSchema, WebhookSubscriptionEventTypeSchema, WebhookSubscriptionEventTypesResponseSchema, WebhookSubscriptionListParamsSchema, WebhookSubscriptionListResponseSchema, WebhookSubscriptionRotateSecretResponseSchema, WebhookSubscriptionSchema, WebhookSubscriptionSetParamsSchema, WebhookSubscriptionUpdateParamsSchema, WebhookSubscriptions, WebhookTriggerPayloadV3Schema, WebhookVersionSchema, WebhookVersions, Webhooks, assertSafeFileUploadPath, constants_exports as constants, createConnectionRequest, deduplicateJsonSchemaRequiredArrays, dereferenceJsonSchema, ensureObjectTypeOnProperties, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isBlockedSensitiveFileUploadPath, isComposioRateLimitError, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, omitNullToolArguments, readResponseBodyWithLimit, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry, toStrictJsonSchema };