@composio/core 0.13.0 → 0.13.1

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.
@@ -1,4 +1,4 @@
1
- import { dt as ConnectionDataSchema, n as BaseComposioProvider, rn as SessionMetaToolOptions } from "./BaseProvider-BBnsv9kS.mjs";
1
+ import { dt as ConnectionDataSchema, n as BaseComposioProvider, rn as SessionMetaToolOptions } from "./BaseProvider-Brb3o86-.mjs";
2
2
  import { Composio } from "@composio/client";
3
3
  import z$1, { z } from "zod/v3";
4
4
  import { z as z$2 } from "zod/v4";
@@ -212,12 +212,12 @@ declare const CreateConnectedAccountResponseSchema: z.ZodObject<{
212
212
  redirectUrl: z.ZodNullable<z.ZodString>;
213
213
  }, "strip", z.ZodTypeAny, {
214
214
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
215
- id: string;
216
215
  redirectUrl: string | null;
216
+ id: string;
217
217
  }, {
218
218
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
219
- id: string;
220
219
  redirectUrl: string | null;
220
+ id: string;
221
221
  }>;
222
222
  type CreateConnectedAccountResponse = z.infer<typeof CreateConnectedAccountResponseSchema>;
223
223
  declare const ConnectedAccountAuthConfigSchema: z.ZodObject<{
@@ -277,19 +277,19 @@ declare const ConnectedAccountListParamsSchema: z.ZodObject<{
277
277
  */
278
278
  accountType: z.ZodOptional<z.ZodEnum<["PRIVATE", "SHARED", "ALL"]>>;
279
279
  }, "strip", z.ZodTypeAny, {
280
- userIds?: string[] | null | undefined;
280
+ limit?: number | null | undefined;
281
281
  authConfigIds?: string[] | null | undefined;
282
+ userIds?: string[] | null | undefined;
282
283
  cursor?: string | null | undefined;
283
- limit?: number | null | undefined;
284
284
  accountType?: "PRIVATE" | "SHARED" | "ALL" | undefined;
285
285
  orderBy?: "created_at" | "updated_at" | undefined;
286
286
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED")[] | null | undefined;
287
287
  toolkitSlugs?: string[] | null | undefined;
288
288
  }, {
289
- userIds?: string[] | null | undefined;
289
+ limit?: number | null | undefined;
290
290
  authConfigIds?: string[] | null | undefined;
291
+ userIds?: string[] | null | undefined;
291
292
  cursor?: string | null | undefined;
292
- limit?: number | null | undefined;
293
293
  accountType?: "PRIVATE" | "SHARED" | "ALL" | undefined;
294
294
  orderBy?: "created_at" | "updated_at" | undefined;
295
295
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED")[] | null | undefined;
@@ -548,6 +548,45 @@ interface ConnectionRequest extends ConnectionRequestState {
548
548
  toString: () => string;
549
549
  }
550
550
  //#endregion
551
+ //#region src/types/requestOptions.types.d.ts
552
+ /**
553
+ * Per-request transport options for cancelling an SDK call.
554
+ *
555
+ * For `tools.get` and `tools.execute`, pass `signal` directly in the
556
+ * options bag (3rd argument) alongside any modifiers or provider options.
557
+ * For other methods (e.g. `toolkits.get`, `authConfigs.list`), pass as a
558
+ * trailing argument. Forwarded to the underlying `@composio/client` request.
559
+ *
560
+ * If the underlying request is aborted via this signal, the SDK throws a
561
+ * {@link ComposioRequestCancelledError} so callers can `instanceof`-detect
562
+ * cancellation without unwrapping nested causes.
563
+ *
564
+ * @example Timeout after 5 seconds
565
+ * ```typescript
566
+ * await composio.tools.execute(
567
+ * 'HACKERNEWS_GET_FRONTPAGE',
568
+ * { userId: 'default', arguments: {} },
569
+ * { signal: AbortSignal.timeout(5_000) }
570
+ * );
571
+ * ```
572
+ *
573
+ * @example Combine signal with modifiers
574
+ * ```typescript
575
+ * await composio.tools.execute('TOOL', body, {
576
+ * signal: AbortSignal.timeout(10_000),
577
+ * beforeExecute: ({ params }) => params,
578
+ * });
579
+ * ```
580
+ */
581
+ type ComposioRequestOptions = {
582
+ /**
583
+ * An `AbortSignal` used to cancel the in-flight HTTP request. When the
584
+ * signal aborts, the underlying fetch is aborted and the SDK throws a
585
+ * {@link ComposioRequestCancelledError} (subclass of {@link ComposioError}).
586
+ */
587
+ signal?: AbortSignal;
588
+ };
589
+ //#endregion
551
590
  //#region src/types/ToolRouterSessionFilesMount.types.d.ts
552
591
  declare const ToolRouterSessionFilesMountListOptionsSchema: z$1.ZodObject<{
553
592
  path: z$1.ZodOptional<z$1.ZodString>;
@@ -557,12 +596,12 @@ declare const ToolRouterSessionFilesMountListOptionsSchema: z$1.ZodObject<{
557
596
  }, "strip", z$1.ZodTypeAny, {
558
597
  mountId: string;
559
598
  path?: string | undefined;
560
- cursor?: string | undefined;
561
599
  limit?: number | undefined;
600
+ cursor?: string | undefined;
562
601
  }, {
563
602
  path?: string | undefined;
564
- cursor?: string | undefined;
565
603
  limit?: number | undefined;
604
+ cursor?: string | undefined;
566
605
  mountId?: string | undefined;
567
606
  }>;
568
607
  type ToolRouterSessionFilesMountListOptions = z$1.input<typeof ToolRouterSessionFilesMountListOptionsSchema>;
@@ -1240,6 +1279,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1240
1279
  customToolkits?: CustomToolkit[] | undefined;
1241
1280
  }>>>;
1242
1281
  }, "strip", z$1.ZodTypeAny, {
1282
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1283
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1284
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1285
+ } | undefined;
1243
1286
  tools?: Record<string, string[] | {
1244
1287
  enable: string[];
1245
1288
  } | {
@@ -1255,10 +1298,6 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1255
1298
  } | {
1256
1299
  enable: string[];
1257
1300
  } | undefined;
1258
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1259
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1260
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1261
- } | undefined;
1262
1301
  preload?: {
1263
1302
  tools?: string[] | "all" | undefined;
1264
1303
  } | undefined;
@@ -1296,6 +1335,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1296
1335
  customToolkits?: CustomToolkit[] | undefined;
1297
1336
  } | undefined;
1298
1337
  }, {
1338
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1339
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1340
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1341
+ } | undefined;
1299
1342
  tools?: Record<string, string[] | {
1300
1343
  enable: string[];
1301
1344
  } | {
@@ -1311,10 +1354,6 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1311
1354
  } | {
1312
1355
  enable: string[];
1313
1356
  } | undefined;
1314
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1315
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1316
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1317
- } | undefined;
1318
1357
  preload?: {
1319
1358
  tools?: string[] | "all" | undefined;
1320
1359
  } | undefined;
@@ -1352,6 +1391,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1352
1391
  customToolkits?: CustomToolkit[] | undefined;
1353
1392
  } | undefined;
1354
1393
  }>, {
1394
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1395
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1396
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1397
+ } | undefined;
1355
1398
  tools?: Record<string, string[] | {
1356
1399
  enable: string[];
1357
1400
  } | {
@@ -1367,10 +1410,6 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1367
1410
  } | {
1368
1411
  enable: string[];
1369
1412
  } | undefined;
1370
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1371
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1372
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1373
- } | undefined;
1374
1413
  preload?: {
1375
1414
  tools?: string[] | "all" | undefined;
1376
1415
  } | undefined;
@@ -1408,6 +1447,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1408
1447
  customToolkits?: CustomToolkit[] | undefined;
1409
1448
  } | undefined;
1410
1449
  }, {
1450
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1451
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1452
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1453
+ } | undefined;
1411
1454
  tools?: Record<string, string[] | {
1412
1455
  enable: string[];
1413
1456
  } | {
@@ -1423,10 +1466,6 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1423
1466
  } | {
1424
1467
  enable: string[];
1425
1468
  } | undefined;
1426
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1427
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1428
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1429
- } | undefined;
1430
1469
  preload?: {
1431
1470
  tools?: string[] | "all" | undefined;
1432
1471
  } | undefined;
@@ -1464,6 +1503,10 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1464
1503
  customToolkits?: CustomToolkit[] | undefined;
1465
1504
  } | undefined;
1466
1505
  }>, {
1506
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1507
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1508
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1509
+ } | undefined;
1467
1510
  tools?: Record<string, string[] | {
1468
1511
  enable: string[];
1469
1512
  } | {
@@ -1479,10 +1522,6 @@ declare const ToolRouterCreateSessionConfigSchema: z$1.ZodEffects<z$1.ZodEffects
1479
1522
  } | {
1480
1523
  enable: string[];
1481
1524
  } | undefined;
1482
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
1483
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1484
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
1485
- } | undefined;
1486
1525
  preload?: {
1487
1526
  tools?: string[] | "all" | undefined;
1488
1527
  } | undefined;
@@ -1600,8 +1639,8 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
1600
1639
  } | undefined;
1601
1640
  }>>;
1602
1641
  }, "strip", z$1.ZodTypeAny, {
1603
- name: string;
1604
1642
  slug: string;
1643
+ name: string;
1605
1644
  isNoAuth: boolean;
1606
1645
  logo?: string | undefined;
1607
1646
  connection?: {
@@ -1617,8 +1656,8 @@ declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
1617
1656
  } | undefined;
1618
1657
  } | undefined;
1619
1658
  }, {
1620
- name: string;
1621
1659
  slug: string;
1660
+ name: string;
1622
1661
  logo?: string | undefined;
1623
1662
  isNoAuth?: boolean | undefined;
1624
1663
  connection?: {
@@ -1689,8 +1728,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
1689
1728
  } | undefined;
1690
1729
  }>>;
1691
1730
  }, "strip", z$1.ZodTypeAny, {
1692
- name: string;
1693
1731
  slug: string;
1732
+ name: string;
1694
1733
  isNoAuth: boolean;
1695
1734
  logo?: string | undefined;
1696
1735
  connection?: {
@@ -1706,8 +1745,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
1706
1745
  } | undefined;
1707
1746
  } | undefined;
1708
1747
  }, {
1709
- name: string;
1710
1748
  slug: string;
1749
+ name: string;
1711
1750
  logo?: string | undefined;
1712
1751
  isNoAuth?: boolean | undefined;
1713
1752
  connection?: {
@@ -1727,8 +1766,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
1727
1766
  totalPages: z$1.ZodNumber;
1728
1767
  }, "strip", z$1.ZodTypeAny, {
1729
1768
  items: {
1730
- name: string;
1731
1769
  slug: string;
1770
+ name: string;
1732
1771
  isNoAuth: boolean;
1733
1772
  logo?: string | undefined;
1734
1773
  connection?: {
@@ -1748,8 +1787,8 @@ declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
1748
1787
  cursor?: string | undefined;
1749
1788
  }, {
1750
1789
  items: {
1751
- name: string;
1752
1790
  slug: string;
1791
+ name: string;
1753
1792
  logo?: string | undefined;
1754
1793
  isNoAuth?: boolean | undefined;
1755
1794
  connection?: {
@@ -1797,15 +1836,15 @@ declare const ToolRouterToolkitsOptionsSchema: z$1.ZodObject<{
1797
1836
  search: z$1.ZodOptional<z$1.ZodString>;
1798
1837
  }, "strip", z$1.ZodTypeAny, {
1799
1838
  toolkits?: string[] | undefined;
1800
- cursor?: string | undefined;
1801
1839
  limit?: number | undefined;
1802
1840
  search?: string | undefined;
1841
+ cursor?: string | undefined;
1803
1842
  isConnected?: boolean | undefined;
1804
1843
  }, {
1805
1844
  toolkits?: string[] | undefined;
1806
- cursor?: string | undefined;
1807
1845
  limit?: number | undefined;
1808
1846
  search?: string | undefined;
1847
+ cursor?: string | undefined;
1809
1848
  isConnected?: boolean | undefined;
1810
1849
  }>;
1811
1850
  type ToolRouterToolkitsOptions = z$1.infer<typeof ToolRouterToolkitsOptionsSchema>;
@@ -1938,15 +1977,15 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
1938
1977
  connectionDetails: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
1939
1978
  currentUserInfo: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
1940
1979
  }, "strip", z$1.ZodTypeAny, {
1941
- toolkit: string;
1942
1980
  description: string;
1981
+ toolkit: string;
1943
1982
  hasActiveConnection: boolean;
1944
1983
  statusMessage: string;
1945
1984
  connectionDetails?: Record<string, unknown> | undefined;
1946
1985
  currentUserInfo?: Record<string, unknown> | undefined;
1947
1986
  }, {
1948
- toolkit: string;
1949
1987
  description: string;
1988
+ toolkit: string;
1950
1989
  hasActiveConnection: boolean;
1951
1990
  statusMessage: string;
1952
1991
  connectionDetails?: Record<string, unknown> | undefined;
@@ -2016,8 +2055,8 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
2016
2055
  } | undefined;
2017
2056
  }>;
2018
2057
  toolkitConnectionStatuses: {
2019
- toolkit: string;
2020
2058
  description: string;
2059
+ toolkit: string;
2021
2060
  hasActiveConnection: boolean;
2022
2061
  statusMessage: string;
2023
2062
  connectionDetails?: Record<string, unknown> | undefined;
@@ -2071,8 +2110,8 @@ declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
2071
2110
  } | undefined;
2072
2111
  }>;
2073
2112
  toolkitConnectionStatuses: {
2074
- toolkit: string;
2075
2113
  description: string;
2114
+ toolkit: string;
2076
2115
  hasActiveConnection: boolean;
2077
2116
  statusMessage: string;
2078
2117
  connectionDetails?: Record<string, unknown> | undefined;
@@ -2096,12 +2135,12 @@ declare const ToolRouterSessionExecuteResponseSchema: z$1.ZodObject<{
2096
2135
  error: z$1.ZodNullable<z$1.ZodString>;
2097
2136
  logId: z$1.ZodString;
2098
2137
  }, "strip", z$1.ZodTypeAny, {
2099
- error: string | null;
2100
2138
  data: Record<string, unknown>;
2139
+ error: string | null;
2101
2140
  logId: string;
2102
2141
  }, {
2103
- error: string | null;
2104
2142
  data: Record<string, unknown>;
2143
+ error: string | null;
2105
2144
  logId: string;
2106
2145
  }>;
2107
2146
  type ToolRouterSessionExecuteResponse = z$1.infer<typeof ToolRouterSessionExecuteResponseSchema>;
@@ -2170,12 +2209,12 @@ declare const SessionProxyExecuteParamsSchema: z$1.ZodObject<{
2170
2209
  name: z$1.ZodString;
2171
2210
  value: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>;
2172
2211
  }, "strip", z$1.ZodTypeAny, {
2173
- value: string | number;
2174
2212
  name: string;
2213
+ value: string | number;
2175
2214
  in: "query" | "header";
2176
2215
  }, {
2177
- value: string | number;
2178
2216
  name: string;
2217
+ value: string | number;
2179
2218
  in: "query" | "header";
2180
2219
  }>, "many">>;
2181
2220
  }, "strip", z$1.ZodTypeAny, {
@@ -2184,8 +2223,8 @@ declare const SessionProxyExecuteParamsSchema: z$1.ZodObject<{
2184
2223
  method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
2185
2224
  body?: unknown;
2186
2225
  parameters?: {
2187
- value: string | number;
2188
2226
  name: string;
2227
+ value: string | number;
2189
2228
  in: "query" | "header";
2190
2229
  }[] | undefined;
2191
2230
  }, {
@@ -2194,8 +2233,8 @@ declare const SessionProxyExecuteParamsSchema: z$1.ZodObject<{
2194
2233
  method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
2195
2234
  body?: unknown;
2196
2235
  parameters?: {
2197
- value: string | number;
2198
2236
  name: string;
2237
+ value: string | number;
2199
2238
  in: "query" | "header";
2200
2239
  }[] | undefined;
2201
2240
  }>;
@@ -2345,6 +2384,10 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2345
2384
  tools?: string[] | "all" | undefined;
2346
2385
  }>>>;
2347
2386
  }, "strip", z$1.ZodTypeAny, {
2387
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2388
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2389
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2390
+ } | undefined;
2348
2391
  tools?: Record<string, string[] | {
2349
2392
  enable: string[];
2350
2393
  } | {
@@ -2360,10 +2403,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2360
2403
  } | {
2361
2404
  enable: string[];
2362
2405
  } | undefined;
2363
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2364
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2365
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2366
- } | undefined;
2367
2406
  preload?: {
2368
2407
  tools?: string[] | "all" | undefined;
2369
2408
  } | undefined;
@@ -2392,6 +2431,10 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2392
2431
  requireExplicitSelection?: boolean | undefined;
2393
2432
  } | null | undefined;
2394
2433
  }, {
2434
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2435
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2436
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2437
+ } | undefined;
2395
2438
  tools?: Record<string, string[] | {
2396
2439
  enable: string[];
2397
2440
  } | {
@@ -2407,10 +2450,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2407
2450
  } | {
2408
2451
  enable: string[];
2409
2452
  } | undefined;
2410
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2411
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2412
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2413
- } | undefined;
2414
2453
  preload?: {
2415
2454
  tools?: string[] | "all" | undefined;
2416
2455
  } | undefined;
@@ -2439,6 +2478,10 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2439
2478
  requireExplicitSelection?: boolean | undefined;
2440
2479
  } | null | undefined;
2441
2480
  }>, {
2481
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2482
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2483
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2484
+ } | undefined;
2442
2485
  tools?: Record<string, string[] | {
2443
2486
  enable: string[];
2444
2487
  } | {
@@ -2454,10 +2497,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2454
2497
  } | {
2455
2498
  enable: string[];
2456
2499
  } | undefined;
2457
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2458
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2459
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2460
- } | undefined;
2461
2500
  preload?: {
2462
2501
  tools?: string[] | "all" | undefined;
2463
2502
  } | undefined;
@@ -2486,6 +2525,10 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2486
2525
  requireExplicitSelection?: boolean | undefined;
2487
2526
  } | null | undefined;
2488
2527
  }, {
2528
+ tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2529
+ disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2530
+ enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2531
+ } | undefined;
2489
2532
  tools?: Record<string, string[] | {
2490
2533
  enable: string[];
2491
2534
  } | {
@@ -2501,10 +2544,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2501
2544
  } | {
2502
2545
  enable: string[];
2503
2546
  } | undefined;
2504
- tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
2505
- disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2506
- enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
2507
- } | undefined;
2508
2547
  preload?: {
2509
2548
  tools?: string[] | "all" | undefined;
2510
2549
  } | undefined;
@@ -2535,6 +2574,18 @@ declare const ToolRouterUpdateSessionConfigSchema: z$1.ZodEffects<z$1.ZodObject<
2535
2574
  }>;
2536
2575
  type ToolRouterUpdateSessionConfig = z$1.infer<typeof ToolRouterUpdateSessionConfigSchema>;
2537
2576
  type ToolRouterSessionUpdateFn = (config: ToolRouterUpdateSessionConfig) => Promise<void>;
2577
+ declare const ToolRouterSessionDeleteResponseSchema: z$1.ZodObject<{
2578
+ sessionId: z$1.ZodString;
2579
+ deleted: z$1.ZodLiteral<true>;
2580
+ }, "strip", z$1.ZodTypeAny, {
2581
+ sessionId: string;
2582
+ deleted: true;
2583
+ }, {
2584
+ sessionId: string;
2585
+ deleted: true;
2586
+ }>;
2587
+ type ToolRouterSessionDeleteResponse = z$1.infer<typeof ToolRouterSessionDeleteResponseSchema>;
2588
+ type ToolRouterSessionDeleteFn = (requestOptions?: ComposioRequestOptions) => Promise<ToolRouterSessionDeleteResponse>;
2538
2589
  /** Session type returned by ToolRouter.create() and ToolRouter.use() */
2539
2590
  interface Session<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
2540
2591
  sessionId: string;
@@ -2566,6 +2617,8 @@ interface Session<TToolCollection, TTool, TProvider extends BaseComposioProvider
2566
2617
  execute: ToolRouterSessionExecuteFn;
2567
2618
  /** Update the session configuration. Mutates this session in-place. */
2568
2619
  update: ToolRouterSessionUpdateFn;
2620
+ /** Delete the session. Deleted sessions are no longer retrievable or executable. */
2621
+ delete: ToolRouterSessionDeleteFn;
2569
2622
  /** Proxy an API call through Composio's auth layer using the session's connected account */
2570
2623
  proxyExecute: ToolRouterSessionProxyExecuteFn;
2571
2624
  /** List custom tools registered in this session, with their final slugs and schemas */
@@ -2770,4 +2823,4 @@ type CustomToolResponse = SessionCreateResponse.Experimental.CustomTool;
2770
2823
  /** Custom toolkit as returned in the session create response (has prefixed slugs + original_slugs). */
2771
2824
  type CustomToolkitResponse = SessionCreateResponse.Experimental.CustomToolkit;
2772
2825
  //#endregion
2773
- export { ToolRouterSessionProxyExecuteResponse as $, ConnectedAccountListResponseItem as $t, SessionProxyExecuteParams as A, ToolRouterSessionFilesMountDeleteOptions as At, ToolRouterCreateSessionConfigSchema as B, ConnectedAccountAclConfig as Bt, MCPServerType as C, UpdateConnectedAccountAclParams as Cn, RemoteFile as Ct, Session as D, FileListResponseSchema as Dt, SandboxSizeSchema as E, UpdateConnectedAccountParamsSchema as En, FileListResponse as Et, ToolRouterConfigTags as F, ToolRouterSessionFilesMountListOptionsSchema as Ft, ToolRouterSandboxConfigSchema as G, ConnectedAccountAuthConfigSchema as Gt, ToolRouterMCPServerConfigSchema as H, ConnectedAccountAclConfigResponseSchema as Ht, ToolRouterConfigTagsSchema as I, ToolRouterSessionFilesMountUploadOptions as It, ToolRouterSessionExecuteResponse as J, ConnectedAccountExperimentalResponseSchema as Jt, ToolRouterSessionExecuteFn as K, ConnectedAccountExperimental as Kt, ToolRouterConfigTools as L, ToolRouterSessionFilesMountUploadOptionsSchema as Lt, SessionWithoutMcp as M, ToolRouterSessionFilesMountDownloadOptions as Mt, ToolRouterAuthorizeFn as N, ToolRouterSessionFilesMountDownloadOptionsSchema as Nt, SessionExperimental as O, RemoteFileData as Ot, ToolRouterConfigManageConnectionsSchema as P, ToolRouterSessionFilesMountListOptions as Pt, ToolRouterSessionProxyExecuteFn as Q, ConnectedAccountListResponse as Qt, ToolRouterConfigToolsSchema as R, ConnectionRequest as Rt, SessionContext as S, DefaultCreateConnectedAccountParamsSchema as Sn, ToolkitConnectionsDetailsSchema as St, SandboxSize as T, UpdateConnectedAccountParams as Tn, FileDeleteResponseSchema as Tt, ToolRouterManageConnectionsConfigSchema as U, ConnectedAccountAclConfigSchema as Ut, ToolRouterMCPServerConfig as V, ConnectedAccountAclConfigResponse as Vt, ToolRouterSandboxConfig as W, ConnectedAccountAuthConfig as Wt, ToolRouterSessionMetadata as X, ConnectedAccountListParams as Xt, ToolRouterSessionExecuteResponseSchema as Y, ConnectedAccountExperimentalSchema as Yt, ToolRouterSessionPreloadConfig as Z, ConnectedAccountListParamsSchema as Zt, CustomToolsMapEntry as _, CreateConnectedAccountOptionsSchema as _n, ToolRouterUpdateSessionConfig as _t, CreateCustomToolkitParams as a, ConnectedAccountStatus as an, ToolRouterSessionWorkbenchConfig as at, RegisteredCustomTool as b, CreateConnectedAccountResponse as bn, ToolkitConnectionStateSchema as bt, CustomToolExecuteFn as c, ConnectedAccountStatuses as cn, ToolRouterToolkitsDisabledConfigSchema as ct, CustomToolWireDefinition as d, ConnectedAccountTypes as dn, ToolRouterToolkitsOptions as dt, ConnectedAccountListResponseSchema as en, ToolRouterSessionSearchFn as et, CustomToolkit as f, CreateConnectedAccountLinkOptions as fn, ToolRouterToolkitsOptionsSchema as ft, CustomToolsMap as g, CreateConnectedAccountOptions as gn, ToolRouterToolsParamSchema as gt, CustomToolkitWireDefinition as h, CreateConnectedAccountLinkResponseSchema as hn, ToolRouterToolsParam as ht, CreateCustomToolkitBaseSchema as i, ConnectedAccountRetrieveResponseSchema as in, ToolRouterSessionWarning as it, SessionProxyExecuteParamsSchema as j, ToolRouterSessionFilesMountDeleteOptionsSchema as jt, SessionPreset as k, RemoteFileDataSchema as kt, CustomToolResponse as l, ConnectedAccountType as ln, ToolRouterToolkitsEnabledConfigSchema as lt, CustomToolkitResponse as m, CreateConnectedAccountLinkResponse as mn, ToolRouterToolsFn as mt, CreateCustomToolBaseSchema as n, ConnectedAccountRefreshOptionsSchema as nn, ToolRouterSessionSearchResponseSchema as nt, CustomTool as o, ConnectedAccountStatusEnum as on, ToolRouterTagsEnableDisableSchema as ot, CustomToolkitDefinition as p, CreateConnectedAccountLinkOptionsSchema as pn, ToolRouterToolkitsParamSchema as pt, ToolRouterSessionExecuteOptions as q, ConnectedAccountExperimentalResponse as qt, CreateCustomToolParams as r, ConnectedAccountRetrieveResponse as rn, ToolRouterSessionUpdateFn as rt, CustomToolDefinition as s, ConnectedAccountStatusSchema as sn, ToolRouterTagsParamSchema as st, AnyZodSchema as t, ConnectedAccountRefreshOptions as tn, ToolRouterSessionSearchResponse as tt, CustomToolSlugSchema as u, ConnectedAccountTypeSchema as un, ToolRouterToolkitsFn as ut, InferZodSchema as v, CreateConnectedAccountParams as vn, ToolRouterUpdateSessionConfigSchema as vt, MCPServerTypeSchema as w, UpdateConnectedAccountAclParamsSchema as wn, FileDeleteResponse as wt, RegisteredCustomToolkit as x, CreateConnectedAccountResponseSchema as xn, ToolkitConnectionsDetails as xt, InlineCustomToolsWirePayload as y, CreateConnectedAccountParamsSchema as yn, ToolkitConnectionState as yt, ToolRouterCreateSessionConfig as z, ConnectionRequestState as zt };
2826
+ export { ToolRouterSessionMetadata as $, ConnectedAccountExperimentalSchema as $t, SessionProxyExecuteParams as A, UpdateConnectedAccountParamsSchema as An, FileListResponseSchema as At, ToolRouterCreateSessionConfigSchema as B, ToolRouterSessionFilesMountUploadOptionsSchema as Bt, MCPServerType as C, CreateConnectedAccountParamsSchema as Cn, ToolkitConnectionStateSchema as Ct, Session as D, UpdateConnectedAccountAclParams as Dn, FileDeleteResponse as Dt, SandboxSizeSchema as E, DefaultCreateConnectedAccountParamsSchema as En, RemoteFile as Et, ToolRouterConfigTags as F, ToolRouterSessionFilesMountDownloadOptions as Ft, ToolRouterSandboxConfigSchema as G, ConnectedAccountAclConfigResponse as Gt, ToolRouterMCPServerConfigSchema as H, ConnectionRequest as Ht, ToolRouterConfigTagsSchema as I, ToolRouterSessionFilesMountDownloadOptionsSchema as It, ToolRouterSessionDeleteResponseSchema as J, ConnectedAccountAuthConfig as Jt, ToolRouterSessionDeleteFn as K, ConnectedAccountAclConfigResponseSchema as Kt, ToolRouterConfigTools as L, ToolRouterSessionFilesMountListOptions as Lt, SessionWithoutMcp as M, RemoteFileDataSchema as Mt, ToolRouterAuthorizeFn as N, ToolRouterSessionFilesMountDeleteOptions as Nt, SessionExperimental as O, UpdateConnectedAccountAclParamsSchema as On, FileDeleteResponseSchema as Ot, ToolRouterConfigManageConnectionsSchema as P, ToolRouterSessionFilesMountDeleteOptionsSchema as Pt, ToolRouterSessionExecuteResponseSchema as Q, ConnectedAccountExperimentalResponseSchema as Qt, ToolRouterConfigToolsSchema as R, ToolRouterSessionFilesMountListOptionsSchema as Rt, SessionContext as S, CreateConnectedAccountParams as Sn, ToolkitConnectionState as St, SandboxSize as T, CreateConnectedAccountResponseSchema as Tn, ToolkitConnectionsDetailsSchema as Tt, ToolRouterManageConnectionsConfigSchema as U, ConnectionRequestState as Ut, ToolRouterMCPServerConfig as V, ComposioRequestOptions as Vt, ToolRouterSandboxConfig as W, ConnectedAccountAclConfig as Wt, ToolRouterSessionExecuteOptions as X, ConnectedAccountExperimental as Xt, ToolRouterSessionExecuteFn as Y, ConnectedAccountAuthConfigSchema as Yt, ToolRouterSessionExecuteResponse as Z, ConnectedAccountExperimentalResponse as Zt, CustomToolsMapEntry as _, CreateConnectedAccountLinkOptionsSchema as _n, ToolRouterToolsFn as _t, CreateCustomToolkitParams as a, ConnectedAccountRefreshOptions as an, ToolRouterSessionSearchResponseSchema as at, RegisteredCustomTool as b, CreateConnectedAccountOptions as bn, ToolRouterUpdateSessionConfig as bt, CustomToolExecuteFn as c, ConnectedAccountRetrieveResponseSchema as cn, ToolRouterSessionWorkbenchConfig as ct, CustomToolWireDefinition as d, ConnectedAccountStatusSchema as dn, ToolRouterToolkitsDisabledConfigSchema as dt, ConnectedAccountListParams as en, ToolRouterSessionPreloadConfig as et, CustomToolkit as f, ConnectedAccountStatuses as fn, ToolRouterToolkitsEnabledConfigSchema as ft, CustomToolsMap as g, CreateConnectedAccountLinkOptions as gn, ToolRouterToolkitsParamSchema as gt, CustomToolkitWireDefinition as h, ConnectedAccountTypes as hn, ToolRouterToolkitsOptionsSchema as ht, CreateCustomToolkitBaseSchema as i, ConnectedAccountListResponseSchema as in, ToolRouterSessionSearchResponse as it, SessionProxyExecuteParamsSchema as j, RemoteFileData as jt, SessionPreset as k, UpdateConnectedAccountParams as kn, FileListResponse as kt, CustomToolResponse as l, ConnectedAccountStatus as ln, ToolRouterTagsEnableDisableSchema as lt, CustomToolkitResponse as m, ConnectedAccountTypeSchema as mn, ToolRouterToolkitsOptions as mt, CreateCustomToolBaseSchema as n, ConnectedAccountListResponse as nn, ToolRouterSessionProxyExecuteResponse as nt, CustomTool as o, ConnectedAccountRefreshOptionsSchema as on, ToolRouterSessionUpdateFn as ot, CustomToolkitDefinition as p, ConnectedAccountType as pn, ToolRouterToolkitsFn as pt, ToolRouterSessionDeleteResponse as q, ConnectedAccountAclConfigSchema as qt, CreateCustomToolParams as r, ConnectedAccountListResponseItem as rn, ToolRouterSessionSearchFn as rt, CustomToolDefinition as s, ConnectedAccountRetrieveResponse as sn, ToolRouterSessionWarning as st, AnyZodSchema as t, ConnectedAccountListParamsSchema as tn, ToolRouterSessionProxyExecuteFn as tt, CustomToolSlugSchema as u, ConnectedAccountStatusEnum as un, ToolRouterTagsParamSchema as ut, InferZodSchema as v, CreateConnectedAccountLinkResponse as vn, ToolRouterToolsParam as vt, MCPServerTypeSchema as w, CreateConnectedAccountResponse as wn, ToolkitConnectionsDetails as wt, RegisteredCustomToolkit as x, CreateConnectedAccountOptionsSchema as xn, ToolRouterUpdateSessionConfigSchema as xt, InlineCustomToolsWirePayload as y, CreateConnectedAccountLinkResponseSchema as yn, ToolRouterToolsParamSchema as yt, ToolRouterCreateSessionConfig as z, ToolRouterSessionFilesMountUploadOptions as zt };
@@ -87,6 +87,29 @@ customTools(options?: { toolkit?: string }): RegisteredCustomTool[]
87
87
 
88
88
  ---
89
89
 
90
+ ### delete()
91
+
92
+ Delete this session.
93
+
94
+ Deleted sessions immediately stop being retrievable or executable. Deleting
95
+ an already-deleted session surfaces the backend 404.
96
+
97
+ ```typescript
98
+ async delete(requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionDeleteResponse>
99
+ ```
100
+
101
+ **Parameters**
102
+
103
+ | Name | Type |
104
+ |------|------|
105
+ | `requestOptions?` | `ComposioRequestOptions` |
106
+
107
+ **Returns**
108
+
109
+ `Promise<ToolRouterSessionDeleteResponse>`
110
+
111
+ ---
112
+
90
113
  ### execute()
91
114
 
92
115
  Execute a tool within the session.
@@ -75,6 +75,30 @@ const session = await composio.sessions.create('user_123', {
75
75
 
76
76
  ---
77
77
 
78
+ ### delete()
79
+
80
+ Delete a tool router session by ID.
81
+
82
+ Deleted sessions immediately stop being retrievable or executable. Deleting
83
+ a missing or already-deleted session surfaces the backend 404.
84
+
85
+ ```typescript
86
+ async delete(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionDeleteResponse>
87
+ ```
88
+
89
+ **Parameters**
90
+
91
+ | Name | Type |
92
+ |------|------|
93
+ | `id` | `string` |
94
+ | `requestOptions?` | `ComposioRequestOptions` |
95
+
96
+ **Returns**
97
+
98
+ `Promise<ToolRouterSessionDeleteResponse>`
99
+
100
+ ---
101
+
78
102
  ### use()
79
103
 
80
104
  Use an existing session
@@ -1,3 +1,3 @@
1
- import { S as SessionContext, a as CreateCustomToolkitParams, c as CustomToolExecuteFn, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams } from "../customTool.types-CKH2R2ia.mjs";
2
- import { n as createCustomToolkit, t as createCustomTool } from "../CustomTool-Dmi6ti3I.mjs";
1
+ import { S as SessionContext, a as CreateCustomToolkitParams, c as CustomToolExecuteFn, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams } from "../customTool.types-D-6YqFdW.mjs";
2
+ import { n as createCustomToolkit, t as createCustomTool } from "../CustomTool-NpHpqdnU.mjs";
3
3
  export { type CreateCustomToolParams, type CreateCustomToolkitParams, type CustomTool, type CustomToolExecuteFn, type CustomToolkit, type SessionContext, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit };