@composio/core 0.18.1 → 0.20.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 (100) hide show
  1. package/dist/{CustomTool-VRfWzMix.d.mts → CustomTool-B3m-188G.d.mts} +1 -1
  2. package/dist/{CustomTool-Bz0f52QR.mjs → CustomTool-fYEFjSLM.mjs} +1 -1
  3. package/dist/{FileModifierErrors-CwB-Inm9.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
  4. package/dist/{FileToolModifier.utils.neutral-D_YkHwZP.mjs → FileToolModifier.utils.neutral-DWFpnsj2.mjs} +4 -2
  5. package/dist/{SsrfErrors-xhdVE4yw.mjs → SsrfErrors-DiQldIdC.mjs} +32 -17
  6. package/dist/{Telemetry-Dw9W5RSp.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
  7. package/dist/{cancellation-P5YUlcfz.mjs → cancellation-Dwa9lGHA.mjs} +7 -5
  8. package/dist/{composio-Cb3d1jFe.d.mts → composio-B36OXii1.d.mts} +3017 -144
  9. package/dist/{customTool.types-B6ej_8XZ.d.mts → customTool.types-C436M_D0.d.mts} +525 -101
  10. package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +10 -10
  11. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +8 -15
  12. package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +101 -18
  13. package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +123 -0
  14. package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +9 -2
  15. package/dist/docs/reference/sdk-reference/typescript/index.mdx +7 -0
  16. package/dist/docs/reference/sdk-reference/typescript/keyring.mdx +56 -0
  17. package/dist/docs/reference/sdk-reference/typescript/logs.mdx +78 -0
  18. package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +15 -15
  19. package/dist/docs/reference/sdk-reference/typescript/meta.json +8 -1
  20. package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +10 -10
  21. package/dist/docs/reference/sdk-reference/typescript/session.mdx +117 -24
  22. package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +24 -10
  23. package/dist/docs/reference/sdk-reference/typescript/toolkits.mdx +151 -14
  24. package/dist/docs/reference/sdk-reference/typescript/tools.mdx +50 -40
  25. package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +26 -25
  26. package/dist/docs/reference/sdk-reference/typescript/usage.mdx +78 -0
  27. package/dist/docs/reference/sdk-reference/typescript/webhook-endpoints.mdx +162 -0
  28. package/dist/docs/reference/sdk-reference/typescript/webhook-subscriptions.mdx +218 -0
  29. package/dist/docs/reference/sdk-reference/typescript/webhooks.mdx +20 -0
  30. package/dist/{errors-Ue9wMrPK.mjs → errors-D_A4b2c2.mjs} +143 -4
  31. package/dist/experimental/index.d.mts +2 -2
  32. package/dist/experimental/index.mjs +1 -1
  33. package/dist/{fileUtils.node-KE5Fa-af.mjs → fileUtils.node-DNLhLg0W.mjs} +8 -6
  34. package/dist/index.d.mts +418 -146
  35. package/dist/index.mjs +2728 -349
  36. package/dist/models/Files.node.d.mts +2 -3
  37. package/dist/models/Files.node.mjs +2 -2
  38. package/dist/models/Files.workerd.d.mts +2 -3
  39. package/dist/platform/node.d.mts +2 -3
  40. package/dist/platform/workerd.d.mts +2 -3
  41. package/dist/{sensitiveFileUploadPaths-QN7w4n8v.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +10 -7
  42. package/dist/{ssrfGuard.node-BLX6b-Rf.mjs → ssrfGuard.node-BZ270bcu.mjs} +104 -14
  43. package/dist/{types-CGdgK442.d.mts → types-Br3GBya5.d.mts} +2 -2
  44. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +3 -4
  45. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +3 -4
  46. package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -4
  47. package/dist/utils/modifiers/FileToolModifier.node.mjs +6 -6
  48. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +3 -4
  49. package/dist/utils/modifiers/FileToolModifier.workerd.mjs +1 -1
  50. package/dist/utils/ssrfGuard.node.d.mts +19 -10
  51. package/dist/utils/ssrfGuard.node.mjs +1 -1
  52. package/dist/utils/ssrfGuard.workerd.d.mts +12 -4
  53. package/dist/utils/ssrfGuard.workerd.mjs +2 -2
  54. package/package.json +9 -9
  55. package/src/composio.ts +207 -10
  56. package/src/errors/ConnectedAccountsErrors.ts +47 -0
  57. package/src/errors/SDKErrors.ts +52 -0
  58. package/src/errors/ToolErrors.ts +24 -0
  59. package/src/errors/ToolRouterErrors.ts +57 -0
  60. package/src/errors/index.ts +3 -0
  61. package/src/index.ts +15 -0
  62. package/src/lib/toolRouterMcp.ts +132 -0
  63. package/src/lib/toolRouterParams.ts +116 -29
  64. package/src/models/ConnectedAccounts.ts +118 -2
  65. package/src/models/CustomToolkits.ts +169 -0
  66. package/src/models/Experimental.ts +27 -0
  67. package/src/models/Keyring.ts +65 -0
  68. package/src/models/Logs.ts +101 -0
  69. package/src/models/MCP.ts +29 -15
  70. package/src/models/ToolRouter.ts +43 -14
  71. package/src/models/ToolRouterSession.ts +224 -16
  72. package/src/models/Toolkits.ts +181 -2
  73. package/src/models/Tools.ts +58 -26
  74. package/src/models/Triggers.ts +10 -90
  75. package/src/models/Usage.ts +119 -0
  76. package/src/models/Webhooks.ts +520 -0
  77. package/src/services/pusher/Pusher.ts +46 -16
  78. package/src/types/authConfigs.types.ts +2 -0
  79. package/src/types/connectedAccounts.types.ts +54 -0
  80. package/src/types/customToolkits.types.ts +102 -0
  81. package/src/types/keyring.types.ts +32 -0
  82. package/src/types/logs.types.ts +108 -0
  83. package/src/types/toolRouter.types.ts +259 -14
  84. package/src/types/toolkit.types.ts +161 -0
  85. package/src/types/usage.types.ts +81 -0
  86. package/src/types/webhooks.types.ts +143 -0
  87. package/src/utils/constants.ts +1 -5
  88. package/src/utils/jsonSchema.ts +4 -1
  89. package/src/utils/logger.ts +39 -7
  90. package/src/utils/sdk.ts +385 -22
  91. package/src/utils/ssrfGuard.node.ts +127 -13
  92. package/src/utils/ssrfGuard.workerd.ts +11 -1
  93. package/src/utils/transformers/connectedAccounts.ts +37 -2
  94. package/src/utils/transformers/customToolkits.ts +98 -0
  95. package/src/utils/transformers/keyring.ts +24 -0
  96. package/src/utils/transformers/logs.ts +85 -0
  97. package/src/utils/transformers/toolkits.ts +183 -3
  98. package/src/utils/transformers/triggers.ts +2 -2
  99. package/src/utils/transformers/usage.ts +77 -0
  100. package/src/utils/transformers/webhooks.ts +139 -0
@@ -14,6 +14,9 @@ description: "Complete API reference for the Composio TypeScript SDK (@composio/
14
14
  | [`Composio`](/reference/sdk-reference/typescript/composio) | This is the core class for Composio. |
15
15
  | [`AuthConfigs`](/reference/sdk-reference/typescript/auth-configs) | AuthConfigs class |
16
16
  | [`ConnectedAccounts`](/reference/sdk-reference/typescript/connected-accounts) | ConnectedAccounts class |
17
+ | [`CustomToolkits`](/reference/sdk-reference/typescript/custom-toolkits) | `composio.experimental.customToolkits` — toolkits your project registers |
18
+ | [`Keyring`](/reference/sdk-reference/typescript/keyring) | `composio.keyring` — the organization's customer-managed keyring. |
19
+ | [`Logs`](/reference/sdk-reference/typescript/logs) | `composio.logs` — tool-execution logs. |
17
20
  | [`Experimental`](/reference/sdk-reference/typescript/experimental) | Experimental API |
18
21
  | [`MCP`](/reference/sdk-reference/typescript/mcp) | MCP (Model Control Protocol) class |
19
22
  | [`RemoteFile`](/reference/sdk-reference/typescript/remote-file) | Represents a file stored in a tool router session's file mount. |
@@ -23,6 +26,10 @@ description: "Complete API reference for the Composio TypeScript SDK (@composio/
23
26
  | [`Session files`](/reference/sdk-reference/typescript/session-files) | File mount for a Composio session, reached via `session.experimental.files` |
24
27
  | [`Tools`](/reference/sdk-reference/typescript/tools) | This class is used to manage tools in the Composio SDK. |
25
28
  | [`Triggers`](/reference/sdk-reference/typescript/triggers) | Trigger (Instance) class |
29
+ | [`Usage`](/reference/sdk-reference/typescript/usage) | `composio.experimental.usage` — metering for the project the API key |
30
+ | [`WebhookEndpoints`](/reference/sdk-reference/typescript/webhook-endpoints) | `composio.webhooks.endpoints` — inbound webhook endpoints. Each endpoint is |
31
+ | [`Webhooks`](/reference/sdk-reference/typescript/webhooks) | `composio.webhooks` namespace. |
32
+ | [`WebhookSubscriptions`](/reference/sdk-reference/typescript/webhook-subscriptions) | `composio.webhooks.subscriptions` — the project's outbound webhook |
26
33
 
27
34
  ## Quick Start
28
35
 
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: "Keyring"
3
+ description: "`composio.keyring` — the organization's customer-managed keyring."
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ Access this class through the `composio.keyring` property:
9
+
10
+ ```typescript
11
+ const composio = new Composio({ apiKey: 'your-api-key' });
12
+ const result = await composio.keyring.list();
13
+ ```
14
+
15
+ ## Methods
16
+
17
+ ### listTransferKeys()
18
+
19
+ Lists the public transfer keys of the organization's active customer
20
+ keyring, the keys a secret is sealed to before it is sent to Composio.
21
+
22
+ Always seal new secrets to the key whose `kid` is `activeKid`: a JWE with
23
+ `RSA-OAEP-256` key management, `A256GCM` content encryption, and the
24
+ `kid` in the protected header. Older keys stay listed so values sealed to
25
+ them remain openable.
26
+
27
+ The organization behind the API key must have an ACTIVE customer keyring
28
+ instance; otherwise the API answers 404.
29
+
30
+ ```typescript
31
+ async listTransferKeys(requestOptions?: ComposioRequestOptions): Promise<{ activeKid: string; keys: { alg: string; e: string; kid: string; kty: string; n: string; use: string }[] }>
32
+ ```
33
+
34
+ **Parameters**
35
+
36
+ | Name | Type |
37
+ |------|------|
38
+ | `requestOptions?` | `ComposioRequestOptions` |
39
+
40
+ **Returns**
41
+
42
+ `Promise<\{ activeKid: string; keys: \{ alg: string; e: string; kid: string; kty: string; n: string; use: string \}[] \}>` — The active key ID and every accepted public JWK, newest first
43
+
44
+ **Example**
45
+
46
+ ```typescript
47
+ import { CompactEncrypt, importJWK } from 'jose';
48
+
49
+ const { activeKid, keys } = await composio.keyring.listTransferKeys();
50
+ const jwk = keys.find(key => key.kid === activeKid)!;
51
+ const sealed = await new CompactEncrypt(new TextEncoder().encode(secret))
52
+ .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM', kid: activeKid })
53
+ .encrypt(await importJWK(jwk, 'RSA-OAEP-256'));
54
+ ```
55
+
56
+ ---
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "Logs"
3
+ description: "`composio.logs` — tool-execution logs."
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ Access this class through the `composio.logs` property:
9
+
10
+ ```typescript
11
+ const composio = new Composio({ apiKey: 'your-api-key' });
12
+ const result = await composio.logs.list();
13
+ ```
14
+
15
+ ## Methods
16
+
17
+ ### get()
18
+
19
+ Retrieve one tool-execution log with its full detail (timings, context,
20
+ source and raw `data`).
21
+
22
+ ```typescript
23
+ async get(id: string, requestOptions?: ComposioRequestOptions): Promise<{ context: { requestId?: string; sessionId?: string; traceId?: string }; data: Record<string, unknown>; id: string; level: 'error' | 'warn' | 'info'; message?: string; metadata: Record<string, unknown>; metrics: Record<string, unknown>; parent: { logId: string; toolSlug: string } | null; source: { framework?: string; host?: string; language?: string }; status: 'success' | 'failed'; timestamp: string; timings?: { endTime: number; startTime: number }; type: string }>
24
+ ```
25
+
26
+ **Parameters**
27
+
28
+ | Name | Type | Description |
29
+ |------|------|-------------|
30
+ | `id` | `string` | The log id |
31
+ | `requestOptions?` | `ComposioRequestOptions` | |
32
+
33
+ **Returns**
34
+
35
+ `Promise<\{ context: \{ requestId?: string; sessionId?: string; traceId?: string \}; data: Record<string, unknown>; id: string; level: 'error' \| 'warn' \| 'info'; message?: string; metadata: Record<string, unknown>; metrics: Record<string, unknown>; parent: \{ logId: string; toolSlug: string \} \| null; source: \{ framework?: string; host?: string; language?: string \}; status: 'success' \| 'failed'; timestamp: string; timings?: \{ endTime: number; startTime: number \}; type: string \}>` — The log detail
36
+
37
+ **Example**
38
+
39
+ ```typescript
40
+ const log = await composio.logs.get('log_abc123');
41
+ console.log(log.status, log.timings?.endTime);
42
+ ```
43
+
44
+ ---
45
+
46
+ ### search()
47
+
48
+ Search tool-execution logs with filters, a time range and cursor
49
+ pagination.
50
+
51
+ ```typescript
52
+ async search(params?: { cursor?: string | null; filters?: { field: 'status' | 'tool_slug' | 'toolkit_slug' | 'connected_account_id' | 'auth_config_id' | 'user_id' | 'session_id' | 'sandbox_id' | 'request_id' | 'log_id'; operator: '==' | '!=' | 'contains' | 'not_contains'; value: string }[]; limit?: number; timeRange?: { from: number; to: number } }, requestOptions?: ComposioRequestOptions): Promise<{ logs: { id: string; level: 'error' | 'warn' | 'info'; message?: string; metadata: Record<string, unknown>; metrics: Record<string, unknown>; parent: { logId: ...; toolSlug: ... } | null; status: 'success' | 'failed'; timestamp: string; type: string }[]; nextCursor: string | null }>
53
+ ```
54
+
55
+ **Parameters**
56
+
57
+ | Name | Type | Description |
58
+ |------|------|-------------|
59
+ | `params?` | `\{ cursor?: string \| null; filters?: \{ field: 'status' \| 'tool_slug' \| 'toolkit_slug' \| 'connected_account_id' \| 'auth_config_id' \| 'user_id' \| 'session_id' \| 'sandbox_id' \| 'request_id' \| 'log_id'; operator: '==' \| '!=' \| 'contains' \| 'not_contains'; value: string \}[]; limit?: number; timeRange?: \{ from: number; to: number \} \}` | Filters, `timeRange`, `limit` and `cursor` |
60
+ | `requestOptions?` | `ComposioRequestOptions` | |
61
+
62
+ **Returns**
63
+
64
+ `Promise<\{ logs: \{ id: string; level: 'error' \| 'warn' \| 'info'; message?: string; metadata: Record<string, unknown>; metrics: Record<string, unknown>; parent: \{ logId: ...; toolSlug: ... \} \| null; status: 'success' \| 'failed'; timestamp: string; type: string \}[]; nextCursor: string \| null \}>` — Matching logs and the next cursor
65
+
66
+ **Example**
67
+
68
+ ```typescript
69
+ const { logs } = await composio.logs.search({
70
+ filters: [
71
+ { field: 'status', operator: '==', value: 'failed' },
72
+ { field: 'user_id', operator: '==', value: 'user_123' },
73
+ ],
74
+ timeRange: { from: Date.now() - 24 * 60 * 60 * 1000, to: Date.now() },
75
+ });
76
+ ```
77
+
78
+ ---
@@ -33,7 +33,7 @@ const result = await composio.mcp.list();
33
33
  Create a new MCP configuration.
34
34
 
35
35
  ```typescript
36
- async create(name: string, mcpConfig: MCPConfigCreationParams, requestOptions?: ComposioRequestOptions): Promise<MCPConfigCreateResponse>
36
+ async create(name: string, mcpConfig: { allowedTools?: string[]; manuallyManageConnections?: boolean; toolkits: string | { authConfigId?: string; toolkit?: string }[] }, requestOptions?: ComposioRequestOptions): Promise<MCPConfigCreateResponse>
37
37
  ```
38
38
 
39
39
  **Parameters**
@@ -41,7 +41,7 @@ async create(name: string, mcpConfig: MCPConfigCreationParams, requestOptions?:
41
41
  | Name | Type |
42
42
  |------|------|
43
43
  | `name` | `string` |
44
- | `mcpConfig` | `MCPConfigCreationParams` |
44
+ | `mcpConfig` | `\{ allowedTools?: string[]; manuallyManageConnections?: boolean; toolkits: string \| \{ authConfigId?: string; toolkit?: string \}[] \}` |
45
45
  | `requestOptions?` | `ComposioRequestOptions` |
46
46
 
47
47
  **Returns**
@@ -73,7 +73,7 @@ const server = await composio.mcpConfig.create("personal-mcp-server", {
73
73
  Delete an MCP server configuration permanently
74
74
 
75
75
  ```typescript
76
- async delete(serverId: string, requestOptions?: ComposioRequestOptions): Promise<{ id: string; deleted: boolean }>
76
+ async delete(serverId: string, requestOptions?: ComposioRequestOptions): Promise<{ deleted: boolean; id: string }>
77
77
  ```
78
78
 
79
79
  **Parameters**
@@ -85,7 +85,7 @@ async delete(serverId: string, requestOptions?: ComposioRequestOptions): Promise
85
85
 
86
86
  **Returns**
87
87
 
88
- `Promise<\{ id: string; deleted: boolean \}>` — Confirmation object with server ID and deletion status
88
+ `Promise<\{ deleted: boolean; id: string \}>` — Confirmation object with server ID and deletion status
89
89
 
90
90
  **Example**
91
91
 
@@ -122,7 +122,7 @@ Get server URLs for an existing MCP server.
122
122
  The response is wrapped according to the provider's specifications.
123
123
 
124
124
  ```typescript
125
- async generate(userId: string, mcpConfigId: string, options?: MCPGetInstanceParams, requestOptions?: ComposioRequestOptions): Promise<MCPServerInstance>
125
+ async generate(userId: string, mcpConfigId: string, options?: { manuallyManageConnections?: boolean }, requestOptions?: ComposioRequestOptions): Promise<...>
126
126
  ```
127
127
 
128
128
  **Parameters**
@@ -131,12 +131,12 @@ async generate(userId: string, mcpConfigId: string, options?: MCPGetInstancePara
131
131
  |------|------|-------------|
132
132
  | `userId` | `string` | \{string\} external user id from your database for whom you want the server for |
133
133
  | `mcpConfigId` | `string` | \{string\} config id of the MCPConfig for which you want to create a server for |
134
- | `options?` | `MCPGetInstanceParams` | \{object\} additional options |
134
+ | `options?` | `\{ manuallyManageConnections?: boolean \}` | \{object\} additional options |
135
135
  | `requestOptions?` | `ComposioRequestOptions` | |
136
136
 
137
137
  **Returns**
138
138
 
139
- `Promise<MCPServerInstance>`
139
+ `Promise<...>`
140
140
 
141
141
  **Example**
142
142
 
@@ -154,7 +154,7 @@ const mcp = await composio.experimental.mcp.generate("default", "<mcp_config_id>
154
154
  Retrieve detailed information about a specific MCP server by its ID
155
155
 
156
156
  ```typescript
157
- async get(serverId: string, requestOptions?: ComposioRequestOptions): Promise<MCPItem>
157
+ async get(serverId: string, requestOptions?: ComposioRequestOptions): Promise<{ allowedTools: string[]; authConfigIds: string[]; commands: { claude: string; cursor: string; windsurf: string }; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] }>
158
158
  ```
159
159
 
160
160
  **Parameters**
@@ -166,7 +166,7 @@ async get(serverId: string, requestOptions?: ComposioRequestOptions): Promise<MC
166
166
 
167
167
  **Returns**
168
168
 
169
- `Promise<MCPItem>` — Complete MCP server details including configuration, tools, and metadata
169
+ `Promise<\{ allowedTools: string[]; authConfigIds: string[]; commands: \{ claude: string; cursor: string; windsurf: string \}; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] \}>` — Complete MCP server details including configuration, tools, and metadata
170
170
 
171
171
  **Example**
172
172
 
@@ -195,19 +195,19 @@ const mcpUrl = server.MCPUrl;
195
195
  List the MCP servers with optional filtering and pagination
196
196
 
197
197
  ```typescript
198
- async list(options: MCPListParams, requestOptions?: ComposioRequestOptions): Promise<MCPListResponse>
198
+ async list(options: { authConfigs: string[]; limit: number; name?: string; page: number; toolkits: string[] }, requestOptions?: ComposioRequestOptions): Promise<{ currentPage: number; items: { allowedTools: string[]; authConfigIds: string[]; commands: { claude: string; cursor: string; windsurf: string }; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] }[]; totalPages: number }>
199
199
  ```
200
200
 
201
201
  **Parameters**
202
202
 
203
203
  | Name | Type | Description |
204
204
  |------|------|-------------|
205
- | `options` | `MCPListParams` | Filtering and pagination options |
205
+ | `options` | `\{ authConfigs: string[]; limit: number; name?: string; page: number; toolkits: string[] \}` | Filtering and pagination options |
206
206
  | `requestOptions?` | `ComposioRequestOptions` | |
207
207
 
208
208
  **Returns**
209
209
 
210
- `Promise<MCPListResponse>` — Paginated list of MCP servers with metadata
210
+ `Promise<\{ currentPage: number; items: \{ allowedTools: string[]; authConfigIds: string[]; commands: \{ claude: string; cursor: string; windsurf: string \}; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] \}[]; totalPages: number \}>` — Paginated list of MCP servers with metadata
211
211
 
212
212
  **Example**
213
213
 
@@ -239,7 +239,7 @@ const namedServers = await composio.experimental.mcp.list({
239
239
  Update an existing MCP server configuration with new settings
240
240
 
241
241
  ```typescript
242
- async update(serverId: string, config: MCPUpdateParams, requestOptions?: ComposioRequestOptions): Promise<MCPItem>
242
+ async update(serverId: string, config: { allowedTools?: string[]; manuallyManageConnections?: boolean; name?: string; toolkits?: string | { authConfigId?: string; toolkit?: string }[] }, requestOptions?: ComposioRequestOptions): Promise<{ allowedTools: string[]; authConfigIds: string[]; commands: { claude: string; cursor: string; windsurf: string }; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] }>
243
243
  ```
244
244
 
245
245
  **Parameters**
@@ -247,12 +247,12 @@ async update(serverId: string, config: MCPUpdateParams, requestOptions?: Composi
247
247
  | Name | Type | Description |
248
248
  |------|------|-------------|
249
249
  | `serverId` | `string` | The unique identifier of the MCP server to update |
250
- | `config` | `MCPUpdateParams` | Update configuration parameters |
250
+ | `config` | `\{ allowedTools?: string[]; manuallyManageConnections?: boolean; name?: string; toolkits?: string \| \{ authConfigId?: string; toolkit?: string \}[] \}` | Update configuration parameters |
251
251
  | `requestOptions?` | `ComposioRequestOptions` | |
252
252
 
253
253
  **Returns**
254
254
 
255
- `Promise<MCPItem>` — Updated MCP server configuration with all details
255
+ `Promise<\{ allowedTools: string[]; authConfigIds: string[]; commands: \{ claude: string; cursor: string; windsurf: string \}; id: string; MCPUrl: string; name: string; serverInstanceCount: number; toolkitIcons: Record<string, string>; toolkits: string[] \}>` — Updated MCP server configuration with all details
256
256
 
257
257
  **Example**
258
258
 
@@ -4,6 +4,9 @@
4
4
  "composio",
5
5
  "auth-configs",
6
6
  "connected-accounts",
7
+ "custom-toolkits",
8
+ "keyring",
9
+ "logs",
7
10
  "experimental",
8
11
  "mcp",
9
12
  "remote-file",
@@ -12,6 +15,10 @@
12
15
  "session",
13
16
  "session-files",
14
17
  "tools",
15
- "triggers"
18
+ "triggers",
19
+ "usage",
20
+ "webhook-endpoints",
21
+ "webhooks",
22
+ "webhook-subscriptions"
16
23
  ]
17
24
  }
@@ -13,7 +13,7 @@ Removes the file or directory from the virtual filesystem. Use with caution:
13
13
  deletion is typically irreversible. Ensure the path exists and is intended for removal.
14
14
 
15
15
  ```typescript
16
- async delete(remotePath: string, options?: ToolRouterSessionFilesMountDeleteOptions): Promise<FileDeleteResponse>
16
+ async delete(remotePath: string, options?: { mountId?: string }): Promise<{ mountRelativePath: string; sandboxMountPrefix: string }>
17
17
  ```
18
18
 
19
19
  **Parameters**
@@ -21,11 +21,11 @@ async delete(remotePath: string, options?: ToolRouterSessionFilesMountDeleteOpti
21
21
  | Name | Type | Description |
22
22
  |------|------|-------------|
23
23
  | `remotePath` | `string` | The path of the file or directory to delete on the mount. |
24
- | `options?` | `ToolRouterSessionFilesMountDeleteOptions` | Optional configuration for the delete operation. |
24
+ | `options?` | `\{ mountId?: string \}` | Optional configuration for the delete operation. |
25
25
 
26
26
  **Returns**
27
27
 
28
- `Promise<FileDeleteResponse>` — Confirmation of deletion (implementation-specific).
28
+ `Promise<\{ mountRelativePath: string; sandboxMountPrefix: string \}>` — Confirmation of deletion (implementation-specific).
29
29
 
30
30
  **Example**
31
31
 
@@ -51,7 +51,7 @@ Retrieves a file stored in the session's virtual filesystem (e.g., one produced
51
51
  by a tool or previously uploaded) and saves it to the specified local path.
52
52
 
53
53
  ```typescript
54
- async download(filePath: string, options?: ToolRouterSessionFilesMountDownloadOptions): Promise<RemoteFile>
54
+ async download(filePath: string, options?: { mountId?: string }): Promise<RemoteFile>
55
55
  ```
56
56
 
57
57
  **Parameters**
@@ -59,7 +59,7 @@ async download(filePath: string, options?: ToolRouterSessionFilesMountDownloadOp
59
59
  | Name | Type | Description |
60
60
  |------|------|-------------|
61
61
  | `filePath` | `string` | The path of the file on the mount to download, or the local path where the file should be saved (implementation-specific). |
62
- | `options?` | `ToolRouterSessionFilesMountDownloadOptions` | Optional configuration for the download. |
62
+ | `options?` | `\{ mountId?: string \}` | Optional configuration for the download. |
63
63
 
64
64
  **Returns**
65
65
 
@@ -90,18 +90,18 @@ The path is relative to the mount root (e.g., `"/"` for root, `"/documents"` for
90
90
  Supports cursor-based pagination via `cursor` and `limit` options.
91
91
 
92
92
  ```typescript
93
- async list(options?: ToolRouterSessionFilesMountListOptions): Promise<FileListResponse>
93
+ async list(options?: { cursor?: string; limit?: number; mountId?: string; path?: string }): Promise<{ items: { lastModified: string; mountRelativePath: string; sandboxMountPrefix: string; size: number }[]; nextCursor: string | undefined }>
94
94
  ```
95
95
 
96
96
  **Parameters**
97
97
 
98
98
  | Name | Type | Description |
99
99
  |------|------|-------------|
100
- | `options?` | `ToolRouterSessionFilesMountListOptions` | Optional configuration for the list operation. |
100
+ | `options?` | `\{ cursor?: string; limit?: number; mountId?: string; path?: string \}` | Optional configuration for the list operation. |
101
101
 
102
102
  **Returns**
103
103
 
104
- `Promise<FileListResponse>` — List of files with nextCursor for pagination.
104
+ `Promise<\{ items: \{ lastModified: string; mountRelativePath: string; sandboxMountPrefix: string; size: number \}[]; nextCursor: string \| undefined \}>` — List of files with nextCursor for pagination.
105
105
 
106
106
  **Example**
107
107
 
@@ -130,7 +130,7 @@ URL inputs require a Node.js or Bun runtime so the destination can be DNS-valida
130
130
  edge runtimes must fetch the file themselves and pass a File or ArrayBuffer.
131
131
 
132
132
  ```typescript
133
- async upload(input: string | File | ArrayBuffer | Uint8Array, options?: ToolRouterSessionFilesMountUploadOptions): Promise<RemoteFile>
133
+ async upload(input: string | File | ArrayBuffer | Uint8Array, options?: { mimetype?: string; mountId?: string; remotePath?: string }): Promise<RemoteFile>
134
134
  ```
135
135
 
136
136
  **Parameters**
@@ -138,7 +138,7 @@ async upload(input: string | File | ArrayBuffer | Uint8Array, options?: ToolRout
138
138
  | Name | Type | Description |
139
139
  |------|------|-------------|
140
140
  | `input` | `string \| File \| ArrayBuffer \| Uint8Array` | File path (string), native File, or raw buffer (ArrayBuffer \| Uint8Array). |
141
- | `options?` | `ToolRouterSessionFilesMountUploadOptions` | Optional configuration. When passing a buffer, remotePath is required. |
141
+ | `options?` | `\{ mimetype?: string; mountId?: string; remotePath?: string \}` | Optional configuration. When passing a buffer, remotePath is required. |
142
142
 
143
143
  **Returns**
144
144
 
@@ -7,13 +7,14 @@ description: "A Composio session — the object returned by `composio.sessions.c
7
7
 
8
8
  | Name | Type | Description |
9
9
  |------|------|-------------|
10
- | `configVersion` | `number` | |
10
+ | `config` | `Config` | Server-side session configuration (toolkit/tool allowlists, tags, preload, sandbox, manage_connections) as returned by the API. Refreshed in place by `update()`. |
11
+ | `configVersion` | `number` | Version of the server-side configuration this object last observed. Refreshed in place by `update()`, which sends it as the `expected_config_version` precondition by default. |
11
12
  | `experimental` | `SessionExperimental` | |
12
13
  | `mcp` | `\{ headers?: Record<string, string>; type: 'http' \| 'sse'; url: string \}` | Hosted MCP endpoint (`session.mcp.url` / `session.mcp.headers`). Exists on every session at runtime, but only surfaced in the type when the session is created with `\{ mcp: true \}` (which returns `Session`); the default `SessionWithoutMcp` omits `mcp`, so MCP is an explicit opt-in. See https://docs.composio.dev/docs/sessions-via-mcp |
13
- | `preload` | `Preload` | |
14
- | `sandbox` | `Workbench` | Resolved sandbox (code-execution) config returned by the API. `enable` defaults to `true` server-side. |
14
+ | `preload` | `\{ tools: string[] \| 'all' \}` | |
15
+ | `sandbox` | `\{ auto_offload_threshold?: number; enable?: boolean; proxy_execution_enabled?: boolean; sandbox_size?: 'standard' \| 'medium' \| 'large' \| 'xlarge'; tool_execution_enabled?: boolean \}` | Resolved sandbox (code-execution) config returned by the API. `enable` defaults to `true` server-side. |
15
16
  | `sessionId` | `string` | |
16
- | `warnings` | `Warning[]` | |
17
+ | `warnings` | `\{ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE'; message: string \}[]` | |
17
18
 
18
19
  ## Methods
19
20
 
@@ -34,7 +35,7 @@ Experimental — shape may change in future releases.
34
35
  at the SDK boundary.
35
36
 
36
37
  ```typescript
37
- async authorize(toolkit: string, options?: { callbackUrl?: string; alias?: string; experimental?: { accountType?: ConnectedAccountType; aclConfigForShared?: ConnectedAccountAclConfig; }; }, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
38
+ async authorize(toolkit: string, options?: { alias?: string; callbackUrl?: string; experimental?: { accountType?: ConnectedAccountType; aclConfigForShared?: { allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] } } }, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
38
39
  ```
39
40
 
40
41
  **Parameters**
@@ -42,7 +43,7 @@ async authorize(toolkit: string, options?: { callbackUrl?: string; alias?: strin
42
43
  | Name | Type |
43
44
  |------|------|
44
45
  | `toolkit` | `string` |
45
- | `options?` | `\{ callbackUrl?: string; alias?: string; experimental?: \{ accountType?: ConnectedAccountType; aclConfigForShared?: ConnectedAccountAclConfig; \}; \}` |
46
+ | `options?` | `\{ alias?: string; callbackUrl?: string; experimental?: \{ accountType?: ConnectedAccountType; aclConfigForShared?: \{ allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] \} \} \}` |
46
47
  | `requestOptions?` | `ComposioRequestOptions` |
47
48
 
48
49
  **Returns**
@@ -95,7 +96,7 @@ Deleted sessions immediately stop being retrievable or executable. Deleting
95
96
  an already-deleted session surfaces the backend 404.
96
97
 
97
98
  ```typescript
98
- async delete(requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionDeleteResponse>
99
+ async delete(requestOptions?: ComposioRequestOptions): Promise<{ deleted: true; sessionId: string }>
99
100
  ```
100
101
 
101
102
  **Parameters**
@@ -106,7 +107,48 @@ async delete(requestOptions?: ComposioRequestOptions): Promise<ToolRouterSession
106
107
 
107
108
  **Returns**
108
109
 
109
- `Promise<ToolRouterSessionDeleteResponse>`
110
+ `Promise<\{ deleted: true; sessionId: string \}>`
111
+
112
+ ---
113
+
114
+ ### ensureConnected()
115
+
116
+ Ensure a toolkit has an active connection in this session, reconciling
117
+ `authorize()`/`session.link` with the session's active connection state.
118
+
119
+ If the session already resolves an ACTIVE connection (or the toolkit is
120
+ no-auth), this returns immediately without creating a link — unlike
121
+ `authorize()`, which always starts a new link flow, even when one is
122
+ already connected. Otherwise it starts the authorization flow and waits
123
+ for the new connection to become ACTIVE.
124
+
125
+ For interactive flows that should surface the redirect URL instead of
126
+ blocking, use `authorize()` and its `waitForConnection()` directly.
127
+
128
+ ```typescript
129
+ async ensureConnected(toolkit: string, options?: { alias?: string; callbackUrl?: string; experimental?: { accountType?: 'PRIVATE' | 'SHARED'; aclConfigForShared?: { allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] } }; timeout?: number }, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionEnsureConnectedResult>
130
+ ```
131
+
132
+ **Parameters**
133
+
134
+ | Name | Type | Description |
135
+ |------|------|-------------|
136
+ | `toolkit` | `string` | The toolkit slug to ensure a connection for (e.g. 'github') |
137
+ | `options?` | `\{ alias?: string; callbackUrl?: string; experimental?: \{ accountType?: 'PRIVATE' \| 'SHARED'; aclConfigForShared?: \{ allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] \} \}; timeout?: number \}` | Optional authorization options plus `timeout` (ms to wait for a newly-initiated connection, default 60000) |
138
+ | `requestOptions?` | `ComposioRequestOptions` | |
139
+
140
+ **Returns**
141
+
142
+ `Promise<ToolRouterSessionEnsureConnectedResult>` — The toolkit's canonical slug, whether it was already connected,
143
+ and the active connected account (omitted for no-auth toolkits)
144
+
145
+ **Example**
146
+
147
+ ```typescript
148
+ const session = await composio.sessions.create({ toolkits: ['github'] });
149
+ const { wasConnected, connectedAccount } = await session.ensureConnected('github');
150
+ if (!wasConnected) console.log('Newly linked:', connectedAccount?.id);
151
+ ```
110
152
 
111
153
  ---
112
154
 
@@ -120,7 +162,7 @@ the session's custom tools and toolkits. Custom tools are executed
120
162
  in-process; remote tools are sent to the Composio backend.
121
163
 
122
164
  ```typescript
123
- async execute(toolSlug: string, arguments_?: Record<string, unknown>, options?: ToolRouterSessionExecuteOptions, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionExecuteResponse>
165
+ async execute(toolSlug: string, arguments_?: Record<string, unknown>, options?: ToolRouterSessionExecuteOptions, requestOptions?: ComposioRequestOptions): Promise<{ data: Record<string, unknown>; error: string | null; logId: string }>
124
166
  ```
125
167
 
126
168
  **Parameters**
@@ -134,7 +176,38 @@ async execute(toolSlug: string, arguments_?: Record<string, unknown>, options?:
134
176
 
135
177
  **Returns**
136
178
 
137
- `Promise<ToolRouterSessionExecuteResponse>` — The tool execution result
179
+ `Promise<\{ data: Record<string, unknown>; error: string \| null; logId: string \}>` — The tool execution result
180
+
181
+ ---
182
+
183
+ ### listConfigHistory()
184
+
185
+ Page through this session's configuration history, newest first. The
186
+ first page starts with the live config (`isCurrent: true`); every
187
+ `session.update()` archives the previous version as a history row.
188
+
189
+ ```typescript
190
+ async listConfigHistory(options?: { cursor?: string; limit?: number }, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionListConfigHistoryResponse>
191
+ ```
192
+
193
+ **Parameters**
194
+
195
+ | Name | Type | Description |
196
+ |------|------|-------------|
197
+ | `options?` | `\{ cursor?: string; limit?: number \}` | Optional `cursor` and `limit` (max 100) |
198
+ | `requestOptions?` | `ComposioRequestOptions` | |
199
+
200
+ **Returns**
201
+
202
+ `Promise<ToolRouterSessionListConfigHistoryResponse>` — The config versions on this page plus pagination info
203
+
204
+ **Example**
205
+
206
+ ```typescript
207
+ const { items, nextCursor } = await session.listConfigHistory({ limit: 10 });
208
+ console.log(items[0].version, items[0].isCurrent); // e.g. 3, true
209
+ console.log(items[1].config.toolkits);
210
+ ```
138
211
 
139
212
  ---
140
213
 
@@ -144,14 +217,14 @@ Proxy an API call through Composio's auth layer using the session's connected ac
144
217
  The backend resolves the connected account from the toolkit within the session.
145
218
 
146
219
  ```typescript
147
- async proxyExecute(params: SessionProxyExecuteParams, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionProxyExecuteResponse>
220
+ async proxyExecute(params: { body?: unknown; endpoint: string; method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; parameters?: { in: 'query' | 'header'; name: string; value: string | number }[]; toolkit: string }, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionProxyExecuteResponse>
148
221
  ```
149
222
 
150
223
  **Parameters**
151
224
 
152
225
  | Name | Type | Description |
153
226
  |------|------|-------------|
154
- | `params` | `SessionProxyExecuteParams` | Proxy request parameters (toolkit, endpoint, method, body, headers/query params) |
227
+ | `params` | `\{ body?: unknown; endpoint: string; method: 'GET' \| 'POST' \| 'PUT' \| 'DELETE' \| 'PATCH'; parameters?: \{ in: 'query' \| 'header'; name: string; value: string \| number \}[]; toolkit: string \}` | Proxy request parameters (toolkit, endpoint, method, body, headers/query params) |
155
228
  | `requestOptions?` | `ComposioRequestOptions` | |
156
229
 
157
230
  **Returns**
@@ -166,19 +239,19 @@ Search for tools by semantic use case.
166
239
  Returns relevant tools for the given query with schemas and guidance.
167
240
 
168
241
  ```typescript
169
- async search(params: { query: string; toolkits?: string[]; }, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionSearchResponse>
242
+ async search(params: { query: string; toolkits?: string[] }, requestOptions?: ComposioRequestOptions): Promise<{ error: string | null; nextStepsGuidance: string[]; results: { difficulty?: string; error?: string | null; executionGuidance?: string; index: number; knownPitfalls?: string[]; memory?: Record<string, ...[]>; planId?: string; primaryToolSlugs: string[]; recommendedPlanSteps?: string[]; referenceWorkbenchSnippets?: { code: ...; description: ... }[]; relatedToolSlugs: string[]; toolkits: string[]; useCase: string }[]; session: { generateId: boolean; id: string; instructions: string }; success: boolean; timeInfo: { currentTimeUtc: string; currentTimeUtcEpochSeconds: number; message: string }; toolkitConnectionStatuses: { connectionDetails?: Record<string, unknown>; currentUserInfo?: Record<string, unknown>; description: string; hasActiveConnection: boolean; statusMessage: string; toolkit: string }[]; toolSchemas: Record<string, { description?: string; hasFullSchema?: boolean; inputSchema?: Record<string, unknown>; outputSchema?: Record<string, unknown>; schemaRef?: { args: { toolSlugs: ... }; message?: string; tool: 'COMPOSIO_GET_TOOL_SCHEMAS' }; toolkit: string; toolSlug: string }> }>
170
243
  ```
171
244
 
172
245
  **Parameters**
173
246
 
174
247
  | Name | Type |
175
248
  |------|------|
176
- | `params` | `\{ query: string; toolkits?: string[]; \}` |
249
+ | `params` | `\{ query: string; toolkits?: string[] \}` |
177
250
  | `requestOptions?` | `ComposioRequestOptions` |
178
251
 
179
252
  **Returns**
180
253
 
181
- `Promise<ToolRouterSessionSearchResponse>`
254
+ `Promise<\{ error: string \| null; nextStepsGuidance: string[]; results: \{ difficulty?: string; error?: string \| null; executionGuidance?: string; index: number; knownPitfalls?: string[]; memory?: Record<string, ...[]>; planId?: string; primaryToolSlugs: string[]; recommendedPlanSteps?: string[]; referenceWorkbenchSnippets?: \{ code: ...; description: ... \}[]; relatedToolSlugs: string[]; toolkits: string[]; useCase: string \}[]; session: \{ generateId: boolean; id: string; instructions: string \}; success: boolean; timeInfo: \{ currentTimeUtc: string; currentTimeUtcEpochSeconds: number; message: string \}; toolkitConnectionStatuses: \{ connectionDetails?: Record<string, unknown>; currentUserInfo?: Record<string, unknown>; description: string; hasActiveConnection: boolean; statusMessage: string; toolkit: string \}[]; toolSchemas: Record<string, \{ description?: string; hasFullSchema?: boolean; inputSchema?: Record<string, unknown>; outputSchema?: Record<string, unknown>; schemaRef?: \{ args: \{ toolSlugs: ... \}; message?: string; tool: 'COMPOSIO_GET_TOOL_SCHEMAS' \}; toolkit: string; toolSlug: string \}> \}>`
182
255
 
183
256
  ---
184
257
 
@@ -188,14 +261,14 @@ Query the connection state of toolkits in the session.
188
261
  Supports pagination and filtering by toolkit slugs.
189
262
 
190
263
  ```typescript
191
- async toolkits(options?: ToolRouterToolkitsOptions, requestOptions?: ComposioRequestOptions): Promise<{ cursor: string | undefined; items: { connection?: { authConfig?: ... | ...; connectedAccount?: { id: ...; status: ... }; isActive: boolean }; isNoAuth: boolean; logo?: string; name: string; slug: string }[]; totalPages: number }>
264
+ async toolkits(options?: { cursor?: string; isConnected?: boolean; limit?: number; search?: string; toolkits?: string[] }, requestOptions?: ComposioRequestOptions): Promise<{ cursor: string | undefined; items: { connection?: { authConfig?: ... | ...; connectedAccount?: { id: ...; status: ... }; isActive: boolean }; isNoAuth: boolean; logo?: string; name: string; slug: string }[]; totalPages: number }>
192
265
  ```
193
266
 
194
267
  **Parameters**
195
268
 
196
269
  | Name | Type |
197
270
  |------|------|
198
- | `options?` | `ToolRouterToolkitsOptions` |
271
+ | `options?` | `\{ cursor?: string; isConnected?: boolean; limit?: number; search?: string; toolkits?: string[] \}` |
199
272
  | `requestOptions?` | `ComposioRequestOptions` |
200
273
 
201
274
  **Returns**
@@ -213,7 +286,7 @@ When custom tools are bound to the session, execution of COMPOSIO_MULTI_EXECUTE_
213
286
  is intercepted: local tools are executed in-process, remote tools are sent to the backend.
214
287
 
215
288
  ```typescript
216
- async tools(modifiers?: SessionMetaToolOptions, requestOptions?: ComposioRequestOptions): Promise<ReturnType<TProvider['wrapTools']>>
289
+ async tools(modifiers?: SessionMetaToolOptions, requestOptions?: ComposioRequestOptions): Promise<ReturnType>
217
290
  ```
218
291
 
219
292
  **Parameters**
@@ -225,29 +298,49 @@ async tools(modifiers?: SessionMetaToolOptions, requestOptions?: ComposioRequest
225
298
 
226
299
  **Returns**
227
300
 
228
- `Promise<ReturnType<TProvider['wrapTools']>>`
301
+ `Promise<ReturnType>`
229
302
 
230
303
  ---
231
304
 
232
305
  ### update()
233
306
 
234
307
  Partially update the session configuration.
235
- Only the fields provided will be changed; omitted fields are preserved.
236
- Mutates this session's `configVersion`, `preload`, and `warnings` in-place.
308
+
309
+ Only the fields provided are changed; omitted fields are preserved. For
310
+ each policy block `null` removes the stored override (which can increase
311
+ access: `toolkits: null` restores the unrestricted default, while
312
+ `toolkits: []` denies every app toolkit and is sent as-is). Supplied
313
+ `tools`, `authConfigs` and `connectedAccounts` maps replace the stored
314
+ map entirely. `manageConnections.callbackUrl: null` removes only the
315
+ stored callback URL.
316
+
317
+ The request carries the `configVersion` this object last observed as the
318
+ `expected_config_version` precondition, so a concurrent change surfaces as
319
+ ComposioSessionConfigConflictError (HTTP 409) instead of being
320
+ overwritten. Pass `expectedConfigVersion` to send another version, or
321
+ `expectedConfigVersion: false` to send no precondition (last writer
322
+ wins). The PATCH is never retried by the transport, so a 409 is reported
323
+ exactly once. On conflict this object is left unchanged: re-fetch the
324
+ session with `sessions.use(sessionId)` and retry against the fresh
325
+ `configVersion`.
326
+
327
+ `config`, `configVersion`, `preload`, `sandbox` and `warnings` are
328
+ refreshed in place only after a successful response, and the updated
329
+ `config` is returned.
237
330
 
238
331
  ```typescript
239
- async update(config: ToolRouterUpdateSessionConfig, requestOptions?: ComposioRequestOptions): Promise<void>
332
+ async update(config: { authConfigs?: Record<string, string> | null; connectedAccounts?: Record<string, string[]> | null; execute?: { enableMultiExecute?: boolean } | null; expectedConfigVersion?: number | false; experimental?: { fastMode?: boolean | null; linkUrlOverwrite?: string | null; permissions?: { default: ... | ... | ...; overrides?: Record<..., ...> } | null; sessionConfigId?: string; submitFeedback?: { enable: boolean } | null } | null; manageConnections?: boolean | { callbackUrl?: string | null; enable?: boolean; enableConnectionRemoval?: boolean | null; waitForConnections?: boolean } | null; multiAccount?: { enable?: boolean; maxAccountsPerToolkit?: number | null; requireExplicitSelection?: boolean } | null; preload?: { tools?: string[] | 'all' } | null; sandbox?: { autoOffloadThreshold?: number; enable?: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' } | null; search?: { enable?: boolean } | null; tags?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[] | { disable?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[]; enable?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[] } | null; toolkits?: string[] | { disable: string[] } | { enable: string[] } | null; tools?: Record<string, string[] | { enable: ...[] } | { disable: ...[] } | { tags: ... | ... }> | null; workbench?: { autoOffloadThreshold?: number; enable?: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' } | null }, requestOptions?: ComposioRequestOptions): Promise<Config>
240
333
  ```
241
334
 
242
335
  **Parameters**
243
336
 
244
337
  | Name | Type |
245
338
  |------|------|
246
- | `config` | `ToolRouterUpdateSessionConfig` |
339
+ | `config` | `\{ authConfigs?: Record<string, string> \| null; connectedAccounts?: Record<string, string[]> \| null; execute?: \{ enableMultiExecute?: boolean \} \| null; expectedConfigVersion?: number \| false; experimental?: \{ fastMode?: boolean \| null; linkUrlOverwrite?: string \| null; permissions?: \{ default: ... \| ... \| ...; overrides?: Record<..., ...> \} \| null; sessionConfigId?: string; submitFeedback?: \{ enable: boolean \} \| null \} \| null; manageConnections?: boolean \| \{ callbackUrl?: string \| null; enable?: boolean; enableConnectionRemoval?: boolean \| null; waitForConnections?: boolean \} \| null; multiAccount?: \{ enable?: boolean; maxAccountsPerToolkit?: number \| null; requireExplicitSelection?: boolean \} \| null; preload?: \{ tools?: string[] \| 'all' \} \| null; sandbox?: \{ autoOffloadThreshold?: number; enable?: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \} \| null; search?: \{ enable?: boolean \} \| null; tags?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[] \| \{ disable?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[]; enable?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[] \} \| null; toolkits?: string[] \| \{ disable: string[] \} \| \{ enable: string[] \} \| null; tools?: Record<string, string[] \| \{ enable: ...[] \} \| \{ disable: ...[] \} \| \{ tags: ... \| ... \}> \| null; workbench?: \{ autoOffloadThreshold?: number; enable?: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \} \| null \}` |
247
340
  | `requestOptions?` | `ComposioRequestOptions` |
248
341
 
249
342
  **Returns**
250
343
 
251
- `Promise<void>`
344
+ `Promise<Config>`
252
345
 
253
346
  ---