@composio/client 2.0.0-rc.2 → 2.0.0-rc.4

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 (164) hide show
  1. package/README.md +32 -0
  2. package/dist/{api-key-revocation-BqiqlJh6.mjs → api-key-revocation-Cbokr5zZ.mjs} +4 -3
  3. package/dist/{auth-ClFXmN5T.mjs → auth-CNDyZgjw.mjs} +1 -1
  4. package/dist/{auth-configs-COkEdwlP.mjs → auth-configs-4u-8I2K7.mjs} +17 -11
  5. package/dist/{clanker-1ptspWLR.mjs → clanker-D6FjS8Lj.mjs} +4 -3
  6. package/dist/{cli-BWTXVRT4.mjs → cli-LIRIGe7k.mjs} +11 -8
  7. package/dist/{client-D5v0_f-k.d.mts → client-ByIYmMzt.d.mts} +30 -2
  8. package/dist/{connected-accounts-DK24qYIM.mjs → connected-accounts-Bqtl42g0.mjs} +23 -15
  9. package/dist/{consumer-Do3lg_vI.mjs → consumer-BauHsJXO.mjs} +5 -4
  10. package/dist/{custom-CH7n4Dyd.mjs → custom-CGqEBUWj.mjs} +4 -3
  11. package/dist/{files-DoNtYu2Q.mjs → files-BYEsIET1.mjs} +7 -5
  12. package/dist/{files-lfGzAnJ_.mjs → files-DkH2-irQ.mjs} +13 -9
  13. package/dist/{generate-B7ClqhN0.mjs → generate-DTodgjHD.mjs} +4 -3
  14. package/dist/{request-zLX87M09.mjs → generated-operations-WtSYnmW0.mjs} +843 -16
  15. package/dist/index.d.mts +3 -3
  16. package/dist/index.mjs +127 -800
  17. package/dist/{link-NsFv9L3R.mjs → link-DL53IiYh.mjs} +4 -3
  18. package/dist/{logs-BhCTVSZE.mjs → logs-DPgNkEde.mjs} +8 -6
  19. package/dist/{manage-7vQYn-gu.mjs → manage-DDmuMlFb.mjs} +6 -4
  20. package/dist/mcp-CS9s4sDK.mjs +82 -0
  21. package/dist/{org-C12wx9QM.mjs → org-9gTqtmtc.mjs} +9 -8
  22. package/dist/{owner-D4ghEkrK.mjs → owner-EZzWtfQx.mjs} +1 -1
  23. package/dist/{project-By-OBe-4.mjs → project-4Ol46ZwD.mjs} +4 -3
  24. package/dist/project-CKmDHyu_.mjs +47 -0
  25. package/dist/{project-DgdqyoZJ.mjs → project-DeRwedA-.mjs} +1 -1
  26. package/dist/{project-Cnr9eceg.mjs → project-uN9dGkls.mjs} +4 -3
  27. package/dist/realtime-C8DEUgai.mjs +28 -0
  28. package/dist/resources/api-key-revocation.d.mts +1 -1
  29. package/dist/resources/api-key-revocation.mjs +1 -1
  30. package/dist/resources/auth/auth.d.mts +1 -1
  31. package/dist/resources/auth/auth.mjs +1 -1
  32. package/dist/resources/auth/index.d.mts +1 -1
  33. package/dist/resources/auth/index.mjs +2 -2
  34. package/dist/resources/auth/session.d.mts +1 -1
  35. package/dist/resources/auth/session.mjs +1 -1
  36. package/dist/resources/auth-configs.d.mts +1 -1
  37. package/dist/resources/auth-configs.mjs +1 -1
  38. package/dist/resources/auth.d.mts +1 -1
  39. package/dist/resources/auth.mjs +2 -2
  40. package/dist/resources/cli/cli.d.mts +1 -1
  41. package/dist/resources/cli/cli.mjs +1 -1
  42. package/dist/resources/cli/index.d.mts +1 -1
  43. package/dist/resources/cli/index.mjs +2 -2
  44. package/dist/resources/cli/realtime.d.mts +1 -1
  45. package/dist/resources/cli/realtime.mjs +1 -1
  46. package/dist/resources/cli.d.mts +1 -1
  47. package/dist/resources/cli.mjs +2 -2
  48. package/dist/resources/connected-accounts.d.mts +1 -1
  49. package/dist/resources/connected-accounts.mjs +1 -1
  50. package/dist/resources/files.d.mts +1 -1
  51. package/dist/resources/files.mjs +1 -1
  52. package/dist/resources/index.d.mts +1 -1
  53. package/dist/resources/index.mjs +13 -13
  54. package/dist/resources/link.d.mts +1 -1
  55. package/dist/resources/link.mjs +1 -1
  56. package/dist/resources/logs/index.d.mts +1 -1
  57. package/dist/resources/logs/index.mjs +3 -3
  58. package/dist/resources/logs/logs.d.mts +1 -1
  59. package/dist/resources/logs/logs.mjs +1 -1
  60. package/dist/resources/logs/tools.d.mts +1 -1
  61. package/dist/resources/logs/tools.mjs +1 -1
  62. package/dist/resources/logs/triggers.d.mts +1 -1
  63. package/dist/resources/logs/triggers.mjs +1 -1
  64. package/dist/resources/logs.d.mts +1 -1
  65. package/dist/resources/logs.mjs +3 -3
  66. package/dist/resources/mcp/custom.d.mts +1 -1
  67. package/dist/resources/mcp/custom.mjs +1 -1
  68. package/dist/resources/mcp/generate.d.mts +1 -1
  69. package/dist/resources/mcp/generate.mjs +1 -1
  70. package/dist/resources/mcp/index.d.mts +1 -1
  71. package/dist/resources/mcp/index.mjs +3 -3
  72. package/dist/resources/mcp/mcp.d.mts +1 -1
  73. package/dist/resources/mcp/mcp.mjs +1 -1
  74. package/dist/resources/mcp.d.mts +1 -1
  75. package/dist/resources/mcp.mjs +3 -3
  76. package/dist/resources/org/clanker.d.mts +1 -1
  77. package/dist/resources/org/clanker.mjs +1 -1
  78. package/dist/resources/org/consumer/consumer.d.mts +1 -1
  79. package/dist/resources/org/consumer/consumer.mjs +1 -1
  80. package/dist/resources/org/consumer/index.d.mts +1 -1
  81. package/dist/resources/org/consumer/index.mjs +2 -2
  82. package/dist/resources/org/consumer/project.d.mts +1 -1
  83. package/dist/resources/org/consumer/project.mjs +1 -1
  84. package/dist/resources/org/consumer.d.mts +1 -1
  85. package/dist/resources/org/consumer.mjs +2 -2
  86. package/dist/resources/org/index.d.mts +1 -1
  87. package/dist/resources/org/index.mjs +6 -6
  88. package/dist/resources/org/org.d.mts +1 -1
  89. package/dist/resources/org/org.mjs +1 -1
  90. package/dist/resources/org/owner/index.d.mts +1 -1
  91. package/dist/resources/org/owner/index.mjs +2 -2
  92. package/dist/resources/org/owner/owner.d.mts +1 -1
  93. package/dist/resources/org/owner/owner.mjs +1 -1
  94. package/dist/resources/org/owner/project.d.mts +1 -1
  95. package/dist/resources/org/owner/project.mjs +1 -1
  96. package/dist/resources/org/owner.d.mts +1 -1
  97. package/dist/resources/org/owner.mjs +2 -2
  98. package/dist/resources/org/project.d.mts +1 -1
  99. package/dist/resources/org/project.mjs +1 -1
  100. package/dist/resources/org/usage.d.mts +1 -1
  101. package/dist/resources/org/usage.mjs +1 -1
  102. package/dist/resources/org.d.mts +1 -1
  103. package/dist/resources/org.mjs +6 -6
  104. package/dist/resources/project/index.d.mts +1 -1
  105. package/dist/resources/project/index.mjs +1 -1
  106. package/dist/resources/project/project.d.mts +1 -1
  107. package/dist/resources/project/project.mjs +1 -1
  108. package/dist/resources/project/usage.d.mts +1 -1
  109. package/dist/resources/project/usage.mjs +1 -1
  110. package/dist/resources/project.d.mts +1 -1
  111. package/dist/resources/project.mjs +1 -1
  112. package/dist/resources/tool-router/index.d.mts +1 -1
  113. package/dist/resources/tool-router/index.mjs +2 -2
  114. package/dist/resources/tool-router/session/files.d.mts +1 -1
  115. package/dist/resources/tool-router/session/files.mjs +1 -1
  116. package/dist/resources/tool-router/session/index.d.mts +1 -1
  117. package/dist/resources/tool-router/session/index.mjs +2 -2
  118. package/dist/resources/tool-router/session/session.d.mts +1 -1
  119. package/dist/resources/tool-router/session/session.mjs +1 -1
  120. package/dist/resources/tool-router/session.d.mts +1 -1
  121. package/dist/resources/tool-router/session.mjs +2 -2
  122. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  123. package/dist/resources/tool-router/tool-router.mjs +1 -1
  124. package/dist/resources/tool-router.d.mts +1 -1
  125. package/dist/resources/tool-router.mjs +2 -2
  126. package/dist/resources/toolkits.d.mts +1 -1
  127. package/dist/resources/toolkits.mjs +1 -1
  128. package/dist/resources/tools.d.mts +1 -1
  129. package/dist/resources/tools.mjs +1 -1
  130. package/dist/resources/trigger-instances/index.d.mts +1 -1
  131. package/dist/resources/trigger-instances/index.mjs +2 -2
  132. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  133. package/dist/resources/trigger-instances/manage.mjs +1 -1
  134. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  135. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  136. package/dist/resources/trigger-instances.d.mts +1 -1
  137. package/dist/resources/trigger-instances.mjs +2 -2
  138. package/dist/resources/triggers-types.d.mts +1 -1
  139. package/dist/resources/triggers-types.mjs +1 -1
  140. package/dist/resources/webhook-endpoints.d.mts +1 -1
  141. package/dist/resources/webhook-endpoints.mjs +1 -1
  142. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  143. package/dist/resources/webhook-subscriptions.mjs +1 -1
  144. package/dist/{session-CmqSfXtq.mjs → session-DWQaRfV_.mjs} +39 -26
  145. package/dist/{session-Ci0MoTTn.mjs → session-EJK1YmKD.mjs} +3 -2
  146. package/dist/{tool-router-DbmIxiU5.mjs → tool-router-CqRP0_gv.mjs} +1 -1
  147. package/dist/toolkits-B3eGuBu0.mjs +48 -0
  148. package/dist/tools-B4uip2mE.mjs +33 -0
  149. package/dist/{tools-BO1wTIiE.mjs → tools-fb-vXe-l.mjs} +21 -14
  150. package/dist/{trigger-instances-CoEohjcv.mjs → trigger-instances-BCL5DJ0o.mjs} +8 -6
  151. package/dist/{triggers-BwsETpsM.mjs → triggers-DnDhI69h.mjs} +6 -4
  152. package/dist/triggers-types-HHDB0mLH.mjs +34 -0
  153. package/dist/{usage-D6ahTV_Y.mjs → usage-B6vtknow.mjs} +7 -5
  154. package/dist/{usage-BJsJ4nsd.mjs → usage-CzAfsIc4.mjs} +7 -5
  155. package/dist/{webhook-endpoints-CyWYVPMe.mjs → webhook-endpoints-DRJgQ6s0.mjs} +15 -10
  156. package/dist/webhook-subscriptions-WcdnIkGU.mjs +55 -0
  157. package/package.json +3 -1
  158. package/dist/mcp-r-SWyCDh.mjs +0 -73
  159. package/dist/project-DzrdSIis.mjs +0 -42
  160. package/dist/realtime-DHJnO2Ye.mjs +0 -26
  161. package/dist/toolkits-BUWB3p_C.mjs +0 -43
  162. package/dist/tools-B4kHPHbe.mjs +0 -30
  163. package/dist/triggers-types-DmOurxxx.mjs +0 -31
  164. package/dist/webhook-subscriptions-BgnCTUGn.mjs +0 -48
package/dist/index.mjs CHANGED
@@ -1,25 +1,25 @@
1
- import { _ as InternalServerError, a as inspectDeprecatedInputs, b as RateLimitError, c as mergeHeaders, d as APIError, f as APIUserAbortError, g as ConflictError, h as ComposioError, i as safeJSON, l as APIConnectionError, m as BadRequestError, n as makeRequest, o as inspectDeprecation, p as AuthenticationError, s as assertCredentialTransport, t as castToError, u as APIConnectionTimeoutError, v as NotFoundError, x as UnprocessableEntityError, y as PermissionDeniedError } from "./request-zLX87M09.mjs";
2
- import { t as ApiKeyRevocation } from "./api-key-revocation-BqiqlJh6.mjs";
3
- import { t as AuthConfigs } from "./auth-configs-COkEdwlP.mjs";
4
- import { t as Auth } from "./auth-ClFXmN5T.mjs";
5
- import { t as Cli } from "./cli-BWTXVRT4.mjs";
6
- import { t as ConnectedAccounts } from "./connected-accounts-DK24qYIM.mjs";
7
- import { t as Files$1 } from "./files-DoNtYu2Q.mjs";
8
- import { t as Link } from "./link-NsFv9L3R.mjs";
9
- import { t as Logs } from "./logs-BhCTVSZE.mjs";
10
- import { t as Mcp } from "./mcp-r-SWyCDh.mjs";
1
+ import { C as PermissionDeniedError, S as NotFoundError, T as UnprocessableEntityError, _ as AuthenticationError, b as ConflictError, d as assertCredentialTransport, f as mergeHeaders, g as APIUserAbortError, h as APIError, i as makeRequest, l as inspectDeprecatedInputs, m as APIConnectionTimeoutError, o as readOperation, p as APIConnectionError, r as castToError, s as safeJSON, t as GENERATED_OPERATIONS, u as inspectDeprecation, v as BadRequestError, w as RateLimitError, x as InternalServerError, y as ComposioError } from "./generated-operations-WtSYnmW0.mjs";
2
+ import { t as ApiKeyRevocation } from "./api-key-revocation-Cbokr5zZ.mjs";
3
+ import { t as AuthConfigs } from "./auth-configs-4u-8I2K7.mjs";
4
+ import { t as Auth } from "./auth-CNDyZgjw.mjs";
5
+ import { t as Cli } from "./cli-LIRIGe7k.mjs";
6
+ import { t as ConnectedAccounts } from "./connected-accounts-Bqtl42g0.mjs";
7
+ import { t as Files$1 } from "./files-BYEsIET1.mjs";
8
+ import { t as Link } from "./link-DL53IiYh.mjs";
9
+ import { t as Logs } from "./logs-DPgNkEde.mjs";
10
+ import { t as Mcp } from "./mcp-CS9s4sDK.mjs";
11
11
  import { t as Migration } from "./migration-CBhnoN-Y.mjs";
12
- import { t as Org } from "./org-C12wx9QM.mjs";
13
- import { t as Project } from "./project-DgdqyoZJ.mjs";
14
- import { t as Files } from "./files-lfGzAnJ_.mjs";
15
- import { t as Session } from "./session-CmqSfXtq.mjs";
16
- import { t as ToolRouter } from "./tool-router-DbmIxiU5.mjs";
17
- import { t as Toolkits } from "./toolkits-BUWB3p_C.mjs";
18
- import { t as Tools } from "./tools-BO1wTIiE.mjs";
19
- import { t as TriggerInstances } from "./trigger-instances-CoEohjcv.mjs";
20
- import { t as TriggersTypes } from "./triggers-types-DmOurxxx.mjs";
21
- import { t as WebhookEndpoints } from "./webhook-endpoints-CyWYVPMe.mjs";
22
- import { t as WebhookSubscriptions } from "./webhook-subscriptions-BgnCTUGn.mjs";
12
+ import { t as Org } from "./org-9gTqtmtc.mjs";
13
+ import { t as Project } from "./project-DeRwedA-.mjs";
14
+ import { t as Files } from "./files-DkH2-irQ.mjs";
15
+ import { t as Session } from "./session-DWQaRfV_.mjs";
16
+ import { t as ToolRouter } from "./tool-router-CqRP0_gv.mjs";
17
+ import { t as Toolkits } from "./toolkits-B3eGuBu0.mjs";
18
+ import { t as Tools } from "./tools-fb-vXe-l.mjs";
19
+ import { t as TriggerInstances } from "./trigger-instances-BCL5DJ0o.mjs";
20
+ import { t as TriggersTypes } from "./triggers-types-HHDB0mLH.mjs";
21
+ import { t as WebhookEndpoints } from "./webhook-endpoints-DRJgQ6s0.mjs";
22
+ import { t as WebhookSubscriptions } from "./webhook-subscriptions-WcdnIkGU.mjs";
23
23
 
24
24
  //#region src/compat/api-promise.ts
25
25
  /**
@@ -190,752 +190,6 @@ const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
190
190
  ]]
191
191
  ]);
192
192
 
193
- //#endregion
194
- //#region src/compat/generated-operations.ts
195
- const GENERATED_OPERATIONS = [
196
- {
197
- method: "delete",
198
- path: "/api/v3.1/auth_configs/{nanoid}",
199
- chain: ["authConfigs", "delete"],
200
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
201
- },
202
- {
203
- method: "delete",
204
- path: "/api/v3.1/connected_accounts/{nanoid}",
205
- chain: ["connectedAccounts", "delete"],
206
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
207
- },
208
- {
209
- method: "delete",
210
- path: "/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}",
211
- chain: ["mcp", "deleteInstance"]
212
- },
213
- {
214
- method: "delete",
215
- path: "/api/v3.1/mcp/{id}",
216
- chain: ["mcp", "delete"]
217
- },
218
- {
219
- method: "delete",
220
- path: "/api/v3.1/org/owner/project/{nano_id}",
221
- chain: [
222
- "org",
223
- "owner",
224
- "project",
225
- "delete"
226
- ],
227
- schemes: ["OrgApiKeyAuth"]
228
- },
229
- {
230
- method: "delete",
231
- path: "/api/v3.1/tool_router/session/{session_id}",
232
- chain: [
233
- "toolRouter",
234
- "session",
235
- "delete"
236
- ]
237
- },
238
- {
239
- method: "delete",
240
- path: "/api/v3.1/trigger_instances/manage/{triggerId}",
241
- chain: [
242
- "triggerInstances",
243
- "manage",
244
- "delete"
245
- ],
246
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
247
- },
248
- {
249
- method: "delete",
250
- path: "/api/v3.1/webhook_subscriptions/{id}",
251
- chain: ["webhookSubscriptions", "delete"]
252
- },
253
- {
254
- method: "get",
255
- path: "/api/v3.1/auth/session/info",
256
- chain: [
257
- "auth",
258
- "session",
259
- "retrieveInfo"
260
- ],
261
- schemes: ["UserApiKeyAuth"]
262
- },
263
- {
264
- method: "get",
265
- path: "/api/v3.1/auth_configs",
266
- chain: ["authConfigs", "list"],
267
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
268
- },
269
- {
270
- method: "get",
271
- path: "/api/v3.1/auth_configs/{nanoid}",
272
- chain: ["authConfigs", "retrieve"],
273
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
274
- },
275
- {
276
- method: "get",
277
- path: "/api/v3.1/cli/get-session",
278
- chain: ["cli", "getSession"],
279
- schemes: ["no_auth"]
280
- },
281
- {
282
- method: "get",
283
- path: "/api/v3.1/cli/realtime/credentials",
284
- chain: [
285
- "cli",
286
- "realtime",
287
- "credentials"
288
- ],
289
- schemes: ["UserApiKeyAuth"]
290
- },
291
- {
292
- method: "get",
293
- path: "/api/v3.1/connected_accounts",
294
- chain: ["connectedAccounts", "list"],
295
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
296
- },
297
- {
298
- method: "get",
299
- path: "/api/v3.1/connected_accounts/{nanoid}",
300
- chain: ["connectedAccounts", "retrieve"],
301
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
302
- },
303
- {
304
- method: "get",
305
- path: "/api/v3.1/files/list",
306
- chain: ["files", "list"]
307
- },
308
- {
309
- method: "get",
310
- path: "/api/v3.1/internal/action_execution/fields",
311
- chain: [
312
- "logs",
313
- "tools",
314
- "listFields"
315
- ]
316
- },
317
- {
318
- method: "get",
319
- path: "/api/v3.1/internal/action_execution/log/{id}",
320
- chain: [
321
- "logs",
322
- "tools",
323
- "retrieve"
324
- ]
325
- },
326
- {
327
- method: "get",
328
- path: "/api/v3.1/internal/trigger/log/{id}",
329
- chain: [
330
- "logs",
331
- "triggers",
332
- "retrieve"
333
- ]
334
- },
335
- {
336
- method: "get",
337
- path: "/api/v3.1/logs/tool_execution/{id}",
338
- chain: ["logs", "retrieveToolExecution"]
339
- },
340
- {
341
- method: "get",
342
- path: "/api/v3.1/mcp/app/{appKey}",
343
- chain: ["mcp", "retrieveApp"]
344
- },
345
- {
346
- method: "get",
347
- path: "/api/v3.1/mcp/servers",
348
- chain: ["mcp", "list"]
349
- },
350
- {
351
- method: "get",
352
- path: "/api/v3.1/mcp/servers/{serverId}/instances",
353
- chain: ["mcp", "listInstances"]
354
- },
355
- {
356
- method: "get",
357
- path: "/api/v3.1/mcp/{id}",
358
- chain: ["mcp", "retrieve"]
359
- },
360
- {
361
- method: "get",
362
- path: "/api/v3.1/org/consumer/connected_toolkits",
363
- chain: [
364
- "org",
365
- "consumer",
366
- "listConnectedToolkits"
367
- ],
368
- schemes: ["UserApiKeyAuth"]
369
- },
370
- {
371
- method: "get",
372
- path: "/api/v3.1/org/list",
373
- chain: ["org", "list"],
374
- schemes: ["UserApiKeyAuth"]
375
- },
376
- {
377
- method: "get",
378
- path: "/api/v3.1/org/owner/project/list",
379
- chain: [
380
- "org",
381
- "owner",
382
- "project",
383
- "list"
384
- ],
385
- schemes: ["OrgApiKeyAuth"]
386
- },
387
- {
388
- method: "get",
389
- path: "/api/v3.1/org/owner/project/{nano_id}",
390
- chain: [
391
- "org",
392
- "owner",
393
- "project",
394
- "retrieve"
395
- ],
396
- schemes: ["OrgApiKeyAuth"]
397
- },
398
- {
399
- method: "get",
400
- path: "/api/v3.1/org/project/list",
401
- chain: [
402
- "org",
403
- "project",
404
- "list"
405
- ],
406
- schemes: ["UserApiKeyAuth"]
407
- },
408
- {
409
- method: "get",
410
- path: "/api/v3.1/tool_router/session/{session_id}",
411
- chain: [
412
- "toolRouter",
413
- "session",
414
- "retrieve"
415
- ]
416
- },
417
- {
418
- method: "get",
419
- path: "/api/v3.1/tool_router/session/{session_id}/config_history",
420
- chain: [
421
- "toolRouter",
422
- "session",
423
- "configHistory"
424
- ]
425
- },
426
- {
427
- method: "get",
428
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/items",
429
- chain: [
430
- "toolRouter",
431
- "session",
432
- "files",
433
- "list"
434
- ]
435
- },
436
- {
437
- method: "get",
438
- path: "/api/v3.1/tool_router/session/{session_id}/toolkits",
439
- chain: [
440
- "toolRouter",
441
- "session",
442
- "toolkits"
443
- ]
444
- },
445
- {
446
- method: "get",
447
- path: "/api/v3.1/tool_router/session/{session_id}/tools",
448
- chain: [
449
- "toolRouter",
450
- "session",
451
- "tools"
452
- ]
453
- },
454
- {
455
- method: "get",
456
- path: "/api/v3.1/toolkits",
457
- chain: ["toolkits", "list"],
458
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
459
- },
460
- {
461
- method: "get",
462
- path: "/api/v3.1/toolkits/categories",
463
- chain: ["toolkits", "retrieveCategories"]
464
- },
465
- {
466
- method: "get",
467
- path: "/api/v3.1/toolkits/changelog",
468
- chain: ["toolkits", "retrieveChangelog"]
469
- },
470
- {
471
- method: "get",
472
- path: "/api/v3.1/toolkits/{slug}",
473
- chain: ["toolkits", "retrieve"],
474
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
475
- },
476
- {
477
- method: "get",
478
- path: "/api/v3.1/tools",
479
- chain: ["tools", "list"],
480
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
481
- },
482
- {
483
- method: "get",
484
- path: "/api/v3.1/tools/enum",
485
- chain: ["tools", "retrieveEnum"],
486
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
487
- },
488
- {
489
- method: "get",
490
- path: "/api/v3.1/tools/{tool_slug}",
491
- chain: ["tools", "retrieve"],
492
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
493
- },
494
- {
495
- method: "get",
496
- path: "/api/v3.1/trigger_instances/active",
497
- chain: ["triggerInstances", "listActive"],
498
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
499
- },
500
- {
501
- method: "get",
502
- path: "/api/v3.1/triggers_types",
503
- chain: ["triggersTypes", "list"],
504
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
505
- },
506
- {
507
- method: "get",
508
- path: "/api/v3.1/triggers_types/list/enum",
509
- chain: ["triggersTypes", "retrieveEnum"],
510
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
511
- },
512
- {
513
- method: "get",
514
- path: "/api/v3.1/triggers_types/{slug}",
515
- chain: ["triggersTypes", "retrieve"],
516
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
517
- },
518
- {
519
- method: "get",
520
- path: "/api/v3.1/webhook_endpoints",
521
- chain: ["webhookEndpoints", "list"]
522
- },
523
- {
524
- method: "get",
525
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
526
- chain: ["webhookEndpoints", "retrieve"]
527
- },
528
- {
529
- method: "get",
530
- path: "/api/v3.1/webhook_subscriptions",
531
- chain: ["webhookSubscriptions", "list"]
532
- },
533
- {
534
- method: "get",
535
- path: "/api/v3.1/webhook_subscriptions/event_types",
536
- chain: ["webhookSubscriptions", "listEventTypes"]
537
- },
538
- {
539
- method: "get",
540
- path: "/api/v3.1/webhook_subscriptions/{id}",
541
- chain: ["webhookSubscriptions", "retrieve"]
542
- },
543
- {
544
- method: "patch",
545
- path: "/api/v3.1/auth_configs/{nanoid}",
546
- chain: ["authConfigs", "update"],
547
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
548
- },
549
- {
550
- method: "patch",
551
- path: "/api/v3.1/auth_configs/{nanoid}/{status}",
552
- chain: ["authConfigs", "updateStatus"]
553
- },
554
- {
555
- method: "patch",
556
- path: "/api/v3.1/connected_accounts/{nanoId}/status",
557
- chain: ["connectedAccounts", "updateStatus"]
558
- },
559
- {
560
- method: "patch",
561
- path: "/api/v3.1/connected_accounts/{nanoid}",
562
- chain: ["connectedAccounts", "patch"]
563
- },
564
- {
565
- method: "patch",
566
- path: "/api/v3.1/mcp/{id}",
567
- chain: ["mcp", "update"]
568
- },
569
- {
570
- method: "patch",
571
- path: "/api/v3.1/tool_router/session/{session_id}",
572
- chain: [
573
- "toolRouter",
574
- "session",
575
- "patch"
576
- ]
577
- },
578
- {
579
- method: "patch",
580
- path: "/api/v3.1/trigger_instances/manage/{triggerId}",
581
- chain: [
582
- "triggerInstances",
583
- "manage",
584
- "update"
585
- ],
586
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
587
- },
588
- {
589
- method: "patch",
590
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
591
- chain: ["webhookEndpoints", "update"]
592
- },
593
- {
594
- method: "patch",
595
- path: "/api/v3.1/webhook_subscriptions/{id}",
596
- chain: ["webhookSubscriptions", "update"]
597
- },
598
- {
599
- method: "post",
600
- path: "/api/v3.1/api_key_revocation",
601
- chain: ["apiKeyRevocation", "create"],
602
- schemes: ["no_auth"]
603
- },
604
- {
605
- method: "post",
606
- path: "/api/v3.1/auth_configs",
607
- chain: ["authConfigs", "create"],
608
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
609
- },
610
- {
611
- method: "post",
612
- path: "/api/v3.1/cli/codact_failures",
613
- chain: ["cli", "createCodactFailure"],
614
- schemes: ["UserApiKeyAuth"]
615
- },
616
- {
617
- method: "post",
618
- path: "/api/v3.1/cli/create-session",
619
- chain: ["cli", "createSession"],
620
- schemes: ["no_auth"]
621
- },
622
- {
623
- method: "post",
624
- path: "/api/v3.1/cli/realtime/auth",
625
- chain: [
626
- "cli",
627
- "realtime",
628
- "auth"
629
- ],
630
- schemes: ["UserApiKeyAuth"]
631
- },
632
- {
633
- method: "post",
634
- path: "/api/v3.1/connected_accounts",
635
- chain: ["connectedAccounts", "create"]
636
- },
637
- {
638
- method: "post",
639
- path: "/api/v3.1/connected_accounts/link",
640
- chain: ["link", "create"],
641
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
642
- },
643
- {
644
- method: "post",
645
- path: "/api/v3.1/connected_accounts/{nanoid}/refresh",
646
- chain: ["connectedAccounts", "refresh"]
647
- },
648
- {
649
- method: "post",
650
- path: "/api/v3.1/connected_accounts/{nanoid}/revoke",
651
- chain: ["connectedAccounts", "revoke"]
652
- },
653
- {
654
- method: "post",
655
- path: "/api/v3.1/files/upload/request",
656
- chain: ["files", "createPresignedURL"]
657
- },
658
- {
659
- method: "post",
660
- path: "/api/v3.1/internal/action_execution/logs",
661
- chain: [
662
- "logs",
663
- "tools",
664
- "list"
665
- ]
666
- },
667
- {
668
- method: "post",
669
- path: "/api/v3.1/internal/trigger/logs",
670
- chain: [
671
- "logs",
672
- "triggers",
673
- "list"
674
- ]
675
- },
676
- {
677
- method: "post",
678
- path: "/api/v3.1/logs/tool_execution",
679
- chain: ["logs", "createToolExecution"]
680
- },
681
- {
682
- method: "post",
683
- path: "/api/v3.1/mcp/servers",
684
- chain: ["mcp", "create"]
685
- },
686
- {
687
- method: "post",
688
- path: "/api/v3.1/mcp/servers/custom",
689
- chain: [
690
- "mcp",
691
- "custom",
692
- "create"
693
- ]
694
- },
695
- {
696
- method: "post",
697
- path: "/api/v3.1/mcp/servers/generate",
698
- chain: [
699
- "mcp",
700
- "generate",
701
- "url"
702
- ]
703
- },
704
- {
705
- method: "post",
706
- path: "/api/v3.1/mcp/servers/{serverId}/instances",
707
- chain: ["mcp", "createInstance"]
708
- },
709
- {
710
- method: "post",
711
- path: "/api/v3.1/org/clanker/create_claim",
712
- chain: [
713
- "org",
714
- "clanker",
715
- "createClaim"
716
- ],
717
- schemes: ["OrgApiKeyAuth"]
718
- },
719
- {
720
- method: "post",
721
- path: "/api/v3.1/org/consumer/project/resolve",
722
- chain: [
723
- "org",
724
- "consumer",
725
- "project",
726
- "resolve"
727
- ],
728
- schemes: ["UserApiKeyAuth"]
729
- },
730
- {
731
- method: "post",
732
- path: "/api/v3.1/org/owner/project/new",
733
- chain: [
734
- "org",
735
- "owner",
736
- "project",
737
- "create"
738
- ],
739
- schemes: ["OrgApiKeyAuth"]
740
- },
741
- {
742
- method: "post",
743
- path: "/api/v3.1/org/owner/project/{nano_id}/regenerate_api_key",
744
- chain: [
745
- "org",
746
- "owner",
747
- "project",
748
- "regenerateAPIKey"
749
- ],
750
- schemes: ["OrgApiKeyAuth"]
751
- },
752
- {
753
- method: "post",
754
- path: "/api/v3.1/org/usage/summary",
755
- chain: [
756
- "org",
757
- "usage",
758
- "retrieveSummary"
759
- ],
760
- schemes: ["OrgApiKeyAuth"]
761
- },
762
- {
763
- method: "post",
764
- path: "/api/v3.1/org/usage/{entity_type}",
765
- chain: [
766
- "org",
767
- "usage",
768
- "retrieve"
769
- ],
770
- schemes: ["OrgApiKeyAuth"]
771
- },
772
- {
773
- method: "post",
774
- path: "/api/v3.1/project/usage/summary",
775
- chain: [
776
- "project",
777
- "usage",
778
- "retrieveSummary"
779
- ]
780
- },
781
- {
782
- method: "post",
783
- path: "/api/v3.1/project/usage/{entity_type}",
784
- chain: [
785
- "project",
786
- "usage",
787
- "retrieve"
788
- ]
789
- },
790
- {
791
- method: "post",
792
- path: "/api/v3.1/tool_router/session",
793
- chain: [
794
- "toolRouter",
795
- "session",
796
- "create"
797
- ]
798
- },
799
- {
800
- method: "post",
801
- path: "/api/v3.1/tool_router/session/{session_id}/attach",
802
- chain: [
803
- "toolRouter",
804
- "session",
805
- "attach"
806
- ]
807
- },
808
- {
809
- method: "post",
810
- path: "/api/v3.1/tool_router/session/{session_id}/execute",
811
- chain: [
812
- "toolRouter",
813
- "session",
814
- "execute"
815
- ],
816
- schemes: ["ApiKeyAuth", "workbench_access_key"]
817
- },
818
- {
819
- method: "post",
820
- path: "/api/v3.1/tool_router/session/{session_id}/execute_meta",
821
- chain: [
822
- "toolRouter",
823
- "session",
824
- "executeMeta"
825
- ]
826
- },
827
- {
828
- method: "post",
829
- path: "/api/v3.1/tool_router/session/{session_id}/link",
830
- chain: [
831
- "toolRouter",
832
- "session",
833
- "link"
834
- ]
835
- },
836
- {
837
- method: "post",
838
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/delete",
839
- chain: [
840
- "toolRouter",
841
- "session",
842
- "files",
843
- "delete"
844
- ]
845
- },
846
- {
847
- method: "post",
848
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/download_url",
849
- chain: [
850
- "toolRouter",
851
- "session",
852
- "files",
853
- "createDownloadURL"
854
- ]
855
- },
856
- {
857
- method: "post",
858
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/upload_url",
859
- chain: [
860
- "toolRouter",
861
- "session",
862
- "files",
863
- "createUploadURL"
864
- ]
865
- },
866
- {
867
- method: "post",
868
- path: "/api/v3.1/tool_router/session/{session_id}/proxy_execute",
869
- chain: [
870
- "toolRouter",
871
- "session",
872
- "proxyExecute"
873
- ],
874
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
875
- },
876
- {
877
- method: "post",
878
- path: "/api/v3.1/tool_router/session/{session_id}/search",
879
- chain: [
880
- "toolRouter",
881
- "session",
882
- "search"
883
- ]
884
- },
885
- {
886
- method: "post",
887
- path: "/api/v3.1/toolkits/multi",
888
- chain: ["toolkits", "retrieveMulti"]
889
- },
890
- {
891
- method: "post",
892
- path: "/api/v3.1/tools/execute/proxy",
893
- chain: ["tools", "proxy"]
894
- },
895
- {
896
- method: "post",
897
- path: "/api/v3.1/tools/execute/{tool_slug}",
898
- chain: ["tools", "execute"],
899
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
900
- },
901
- {
902
- method: "post",
903
- path: "/api/v3.1/tools/execute/{tool_slug}/input",
904
- chain: ["tools", "getInput"]
905
- },
906
- {
907
- method: "post",
908
- path: "/api/v3.1/tools/scopes/required",
909
- chain: ["tools", "retrieveRequiredScopes"]
910
- },
911
- {
912
- method: "post",
913
- path: "/api/v3.1/trigger_instances/{slug}/upsert",
914
- chain: ["triggerInstances", "upsert"],
915
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
916
- },
917
- {
918
- method: "post",
919
- path: "/api/v3.1/webhook_endpoints",
920
- chain: ["webhookEndpoints", "create"]
921
- },
922
- {
923
- method: "post",
924
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
925
- chain: ["webhookEndpoints", "replace"]
926
- },
927
- {
928
- method: "post",
929
- path: "/api/v3.1/webhook_subscriptions",
930
- chain: ["webhookSubscriptions", "create"]
931
- },
932
- {
933
- method: "post",
934
- path: "/api/v3.1/webhook_subscriptions/{id}/rotate_secret",
935
- chain: ["webhookSubscriptions", "rotateSecret"]
936
- }
937
- ];
938
-
939
193
  //#endregion
940
194
  //#region src/compat/generated-resource-wiring.ts
941
195
  const createClientResources = (client) => ({
@@ -962,7 +216,7 @@ const createClientResources = (client) => ({
962
216
 
963
217
  //#endregion
964
218
  //#region src/version.ts
965
- const VERSION = "2.0.0-rc.2";
219
+ const VERSION = "2.0.0-rc.4";
966
220
 
967
221
  //#endregion
968
222
  //#region src/compat/client.ts
@@ -971,6 +225,7 @@ const environments = {
971
225
  staging: "https://staging-backend.composio.dev",
972
226
  local: "http://localhost:9900"
973
227
  };
228
+ const environmentReader = Symbol("Composio.environmentReader");
974
229
  /** Read a trimmed environment value in Node or Deno without assuming either runtime exists. */
975
230
  const readEnv = (name) => {
976
231
  const globals = globalThis;
@@ -982,6 +237,21 @@ const readEnv = (name) => {
982
237
  return globals.Deno?.env?.get?.(name)?.trim() || void 0;
983
238
  } catch {}
984
239
  };
240
+ const createEnvironmentReader = (environment) => (name) => environment[name]?.trim() || void 0;
241
+ const emptyEnvironmentReader = () => void 0;
242
+ const mergeEnvironmentHeaders = (raw, defaults) => {
243
+ if (!raw) return defaults;
244
+ const parsed = {};
245
+ for (const line of raw.split("\n")) {
246
+ const colon = line.indexOf(":");
247
+ if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
248
+ }
249
+ try {
250
+ return mergeHeaders([parsed, defaults]);
251
+ } catch (cause) {
252
+ throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
253
+ }
254
+ };
985
255
  /** Severity order: a record at or below the configured level is emitted. */
986
256
  const LOG_LEVELS = {
987
257
  off: 0,
@@ -996,6 +266,37 @@ const LOG_LEVELS = {
996
266
  * the default rather than silencing the client or making it shout.
997
267
  */
998
268
  const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
269
+ const resolveCredential = (explicit, readEnvironment, variable) => {
270
+ if (explicit !== void 0) return explicit;
271
+ return readEnvironment(variable) ?? null;
272
+ };
273
+ const resolveBaseURL = (options, readEnvironment, hasExplicitEnvironment) => {
274
+ if (options.baseURL !== void 0) return options.baseURL;
275
+ if (hasExplicitEnvironment && options.environment !== void 0) return null;
276
+ return readEnvironment("COMPOSIO_BASE_URL") ?? null;
277
+ };
278
+ const resolveClientOptions = (input) => {
279
+ if (input.transport !== void 0 && (input.fetch !== void 0 || input.fetchOptions !== void 0)) throw new ComposioError("The `transport` option cannot be combined with `fetch` or `fetchOptions`");
280
+ const hasExplicitEnvironment = input[environmentReader] !== void 0;
281
+ const readEnvironment = input[environmentReader] ?? readEnv;
282
+ const baseURL = resolveBaseURL(input, readEnvironment, hasExplicitEnvironment);
283
+ const apiKey = resolveCredential(input.apiKey, readEnvironment, "COMPOSIO_API_KEY");
284
+ const userApiKey = resolveCredential(input.userApiKey, readEnvironment, "COMPOSIO_USER_API_KEY");
285
+ const orgApiKey = resolveCredential(input.orgApiKey, readEnvironment, "COMPOSIO_ORG_API_KEY");
286
+ if (baseURL && input.environment) throw new ComposioError("Ambiguous URL; The `baseURL` option (or COMPOSIO_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null");
287
+ const options = {
288
+ ...input,
289
+ apiKey,
290
+ userApiKey,
291
+ orgApiKey,
292
+ baseURL,
293
+ environment: input.environment ?? "production",
294
+ logLevel: input.logLevel ?? readEnvironment("COMPOSIO_LOG") ?? "warn"
295
+ };
296
+ options.defaultHeaders = mergeEnvironmentHeaders(readEnvironment("COMPOSIO_CUSTOM_HEADERS"), input.defaultHeaders);
297
+ if (hasExplicitEnvironment) options[environmentReader] = emptyEnvironmentReader;
298
+ return options;
299
+ };
999
300
  var Composio = class Composio {
1000
301
  apiKey;
1001
302
  userApiKey;
@@ -1007,6 +308,7 @@ var Composio = class Composio {
1007
308
  logLevel;
1008
309
  fetchOptions;
1009
310
  #fetch;
311
+ #transport;
1010
312
  #options;
1011
313
  /**
1012
314
  * The (operation, notice) pairs, and separately the (operation, deprecated
@@ -1023,45 +325,46 @@ var Composio = class Composio {
1023
325
  * only so a derived client can join its parent's record.
1024
326
  */
1025
327
  #deprecationSeen = /* @__PURE__ */ new Set();
1026
- constructor({ baseURL = readEnv("COMPOSIO_BASE_URL"), apiKey = readEnv("COMPOSIO_API_KEY") ?? null, userApiKey = readEnv("COMPOSIO_USER_API_KEY") ?? null, orgApiKey = readEnv("COMPOSIO_ORG_API_KEY") ?? null, ...opts } = {}) {
1027
- const options = {
1028
- apiKey,
1029
- userApiKey,
1030
- orgApiKey,
1031
- ...opts,
1032
- baseURL,
1033
- environment: opts.environment ?? "production"
1034
- };
1035
- if (baseURL && opts.environment) throw new ComposioError("Ambiguous URL; The `baseURL` option (or COMPOSIO_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null");
1036
- this.baseURL = options.baseURL || environments[options.environment || "production"];
328
+ constructor(input = {}) {
329
+ const options = resolveClientOptions(input);
330
+ this.baseURL = options.baseURL || environments[options.environment];
1037
331
  this.timeout = options.timeout ?? Composio.DEFAULT_TIMEOUT;
1038
332
  this.logger = options.logger ?? console;
1039
- this.logLevel = options.logLevel ?? readEnv("COMPOSIO_LOG") ?? "warn";
333
+ this.logLevel = options.logLevel;
1040
334
  this.fetchOptions = options.fetchOptions;
1041
335
  this.maxRetries = options.maxRetries ?? 2;
1042
336
  this.#fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
1043
- const customHeadersEnv = readEnv("COMPOSIO_CUSTOM_HEADERS");
1044
- if (customHeadersEnv) {
1045
- const parsed = {};
1046
- for (const line of customHeadersEnv.split("\n")) {
1047
- const colon = line.indexOf(":");
1048
- if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
1049
- }
1050
- try {
1051
- options.defaultHeaders = mergeHeaders([parsed, options.defaultHeaders]);
1052
- } catch (cause) {
1053
- throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
1054
- }
1055
- }
337
+ this.#transport = options.transport;
1056
338
  this.#options = options;
1057
- this.apiKey = apiKey;
1058
- this.userApiKey = userApiKey;
1059
- this.orgApiKey = orgApiKey;
339
+ this.apiKey = options.apiKey;
340
+ this.userApiKey = options.userApiKey;
341
+ this.orgApiKey = options.orgApiKey;
1060
342
  assertCredentialTransport(this.baseURL, this.#credentials());
1061
343
  Object.assign(this, createClientResources(this));
1062
344
  }
345
+ /**
346
+ * Constructs a client from a caller-supplied environment snapshot.
347
+ *
348
+ * Unlike the compatibility constructor, this method never reads ambient
349
+ * process or Deno state. Explicit options replace values from `environment`;
350
+ * in particular, an explicit named environment replaces
351
+ * `COMPOSIO_BASE_URL`, and `apiKey: null` disables a mapped API key.
352
+ */
353
+ static fromEnv(environment, options = {}) {
354
+ const input = {
355
+ ...options,
356
+ [environmentReader]: createEnvironmentReader(environment)
357
+ };
358
+ return new this(input);
359
+ }
1063
360
  /** Returns a new client reusing the current options with `options` merged over them. */
1064
361
  withOptions(options) {
362
+ const hasFetch = Object.hasOwn(options, "fetch");
363
+ const hasFetchOptions = Object.hasOwn(options, "fetchOptions");
364
+ const replacesTransport = hasFetch || hasFetchOptions;
365
+ const transport = Object.hasOwn(options, "transport") ? options.transport : replacesTransport ? void 0 : this.#transport;
366
+ const fetch = transport === void 0 ? hasFetch ? options.fetch : this.#fetch : void 0;
367
+ const fetchOptions = transport === void 0 ? hasFetchOptions ? options.fetchOptions : this.fetchOptions : void 0;
1065
368
  const client = new this.constructor({
1066
369
  ...this.#options,
1067
370
  environment: options.environment ? options.environment : void 0,
@@ -1070,12 +373,13 @@ var Composio = class Composio {
1070
373
  timeout: this.timeout,
1071
374
  logger: this.logger,
1072
375
  logLevel: this.logLevel,
1073
- fetch: this.#fetch,
1074
- fetchOptions: this.fetchOptions,
1075
376
  apiKey: this.apiKey,
1076
377
  userApiKey: this.userApiKey,
1077
378
  orgApiKey: this.orgApiKey,
1078
- ...options
379
+ ...options,
380
+ transport,
381
+ fetch,
382
+ fetchOptions
1079
383
  });
1080
384
  client.#deprecationSeen = this.#deprecationSeen;
1081
385
  return client;
@@ -1121,6 +425,7 @@ var Composio = class Composio {
1121
425
  response,
1122
426
  method: options.method,
1123
427
  path: options.path,
428
+ operation: readOperation(options),
1124
429
  baseURL: this.baseURL,
1125
430
  operations: GENERATED_OPERATIONS,
1126
431
  seen: this.#deprecationSeen,
@@ -1153,6 +458,7 @@ var Composio = class Composio {
1153
458
  timeout: this.timeout,
1154
459
  userAgent: `${this.constructor.name}/JS ${VERSION}`,
1155
460
  fetch: this.#fetch,
461
+ transport: this.#transport,
1156
462
  defaultHeaders: this.#options.defaultHeaders,
1157
463
  defaultQuery: this.#options.defaultQuery,
1158
464
  fetchOptions: this.fetchOptions,
@@ -1216,4 +522,25 @@ Composio.Auth = Auth;
1216
522
  Composio.ApiKeyRevocation = ApiKeyRevocation;
1217
523
 
1218
524
  //#endregion
1219
- export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, Composio, Composio as default, ComposioError, ConflictError, Files, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, Session, ToolRouter, UnprocessableEntityError, VERSION };
525
+ //#region src/compat/transport.ts
526
+ const KERNEL_OWNED_KEYS = [
527
+ "method",
528
+ "headers",
529
+ "body",
530
+ "signal",
531
+ "redirect"
532
+ ];
533
+ const assertSafeDefaults = (defaults) => {
534
+ if (defaults === void 0) return;
535
+ const owned = KERNEL_OWNED_KEYS.find((key) => key in defaults);
536
+ if (owned !== void 0) throw new TypeError(`Fetch transport defaults cannot set kernel-owned '${owned}'`);
537
+ };
538
+ /** Creates a transport backed by the supplied or global fetch function. */
539
+ const createFetchTransport = (options = {}) => {
540
+ assertSafeDefaults(options.defaults);
541
+ const fetchImplementation = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
542
+ return { send: (request) => fetchImplementation(request, options.defaults) };
543
+ };
544
+
545
+ //#endregion
546
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, Composio, Composio as default, ComposioError, ConflictError, Files, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, Session, ToolRouter, UnprocessableEntityError, VERSION, createFetchTransport };