@composio/client 0.1.0-alpha.66 → 0.1.0-alpha.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +11 -0
- package/client.js.map +1 -1
- package/client.mjs +11 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/files.d.mts +3 -3
- package/resources/files.d.ts +3 -3
- package/resources/mcp/generate.d.mts +4 -1
- package/resources/mcp/generate.d.mts.map +1 -1
- package/resources/mcp/generate.d.ts +4 -1
- package/resources/mcp/generate.d.ts.map +1 -1
- package/resources/mcp/generate.js +4 -1
- package/resources/mcp/generate.js.map +1 -1
- package/resources/mcp/generate.mjs +4 -1
- package/resources/mcp/generate.mjs.map +1 -1
- package/resources/tool-router/session/files.d.mts +4 -4
- package/resources/tool-router/session/files.d.ts +4 -4
- package/resources/tool-router/session/files.js +4 -4
- package/resources/tool-router/session/files.mjs +4 -4
- package/resources/tool-router/session/session.d.mts +254 -34
- package/resources/tool-router/session/session.d.mts.map +1 -1
- package/resources/tool-router/session/session.d.ts +254 -34
- package/resources/tool-router/session/session.d.ts.map +1 -1
- package/resources/tool-router/session/session.js +18 -11
- package/resources/tool-router/session/session.js.map +1 -1
- package/resources/tool-router/session/session.mjs +18 -11
- package/resources/tool-router/session/session.mjs.map +1 -1
- package/resources/tool-router/tool-router.d.mts +1 -1
- package/resources/tool-router/tool-router.d.ts +1 -1
- package/src/client.ts +12 -0
- package/src/internal/types.ts +6 -8
- package/src/resources/files.ts +3 -3
- package/src/resources/mcp/generate.ts +4 -1
- package/src/resources/tool-router/session/files.ts +4 -4
- package/src/resources/tool-router/session/session.ts +281 -34
- package/src/resources/tool-router/tool-router.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.mjs","sourceRoot":"","sources":["../../src/resources/mcp/generate.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"generate.mjs","sourceRoot":"","sources":["../../src/resources/mcp/generate.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,IAAuB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF"}
|
|
@@ -14,7 +14,7 @@ export declare class Files extends APIResource {
|
|
|
14
14
|
* ```ts
|
|
15
15
|
* const files = await client.toolRouter.session.files.list(
|
|
16
16
|
* 'files',
|
|
17
|
-
* { session_id: '
|
|
17
|
+
* { session_id: 'trs_1a2b3c4d5e6f' },
|
|
18
18
|
* );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
@@ -28,7 +28,7 @@ export declare class Files extends APIResource {
|
|
|
28
28
|
* const file = await client.toolRouter.session.files.delete(
|
|
29
29
|
* 'files',
|
|
30
30
|
* {
|
|
31
|
-
* session_id: '
|
|
31
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
32
32
|
* mount_relative_path: 'report.pdf',
|
|
33
33
|
* },
|
|
34
34
|
* );
|
|
@@ -45,7 +45,7 @@ export declare class Files extends APIResource {
|
|
|
45
45
|
* await client.toolRouter.session.files.createDownloadURL(
|
|
46
46
|
* 'files',
|
|
47
47
|
* {
|
|
48
|
-
* session_id: '
|
|
48
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
49
49
|
* mount_relative_path: 'report.pdf',
|
|
50
50
|
* },
|
|
51
51
|
* );
|
|
@@ -62,7 +62,7 @@ export declare class Files extends APIResource {
|
|
|
62
62
|
* await client.toolRouter.session.files.createUploadURL(
|
|
63
63
|
* 'files',
|
|
64
64
|
* {
|
|
65
|
-
* session_id: '
|
|
65
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
66
66
|
* mount_relative_path: 'report.pdf',
|
|
67
67
|
* },
|
|
68
68
|
* );
|
|
@@ -14,7 +14,7 @@ export declare class Files extends APIResource {
|
|
|
14
14
|
* ```ts
|
|
15
15
|
* const files = await client.toolRouter.session.files.list(
|
|
16
16
|
* 'files',
|
|
17
|
-
* { session_id: '
|
|
17
|
+
* { session_id: 'trs_1a2b3c4d5e6f' },
|
|
18
18
|
* );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
@@ -28,7 +28,7 @@ export declare class Files extends APIResource {
|
|
|
28
28
|
* const file = await client.toolRouter.session.files.delete(
|
|
29
29
|
* 'files',
|
|
30
30
|
* {
|
|
31
|
-
* session_id: '
|
|
31
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
32
32
|
* mount_relative_path: 'report.pdf',
|
|
33
33
|
* },
|
|
34
34
|
* );
|
|
@@ -45,7 +45,7 @@ export declare class Files extends APIResource {
|
|
|
45
45
|
* await client.toolRouter.session.files.createDownloadURL(
|
|
46
46
|
* 'files',
|
|
47
47
|
* {
|
|
48
|
-
* session_id: '
|
|
48
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
49
49
|
* mount_relative_path: 'report.pdf',
|
|
50
50
|
* },
|
|
51
51
|
* );
|
|
@@ -62,7 +62,7 @@ export declare class Files extends APIResource {
|
|
|
62
62
|
* await client.toolRouter.session.files.createUploadURL(
|
|
63
63
|
* 'files',
|
|
64
64
|
* {
|
|
65
|
-
* session_id: '
|
|
65
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
66
66
|
* mount_relative_path: 'report.pdf',
|
|
67
67
|
* },
|
|
68
68
|
* );
|
|
@@ -17,7 +17,7 @@ class Files extends resource_1.APIResource {
|
|
|
17
17
|
* ```ts
|
|
18
18
|
* const files = await client.toolRouter.session.files.list(
|
|
19
19
|
* 'files',
|
|
20
|
-
* { session_id: '
|
|
20
|
+
* { session_id: 'trs_1a2b3c4d5e6f' },
|
|
21
21
|
* );
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
@@ -37,7 +37,7 @@ class Files extends resource_1.APIResource {
|
|
|
37
37
|
* const file = await client.toolRouter.session.files.delete(
|
|
38
38
|
* 'files',
|
|
39
39
|
* {
|
|
40
|
-
* session_id: '
|
|
40
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
41
41
|
* mount_relative_path: 'report.pdf',
|
|
42
42
|
* },
|
|
43
43
|
* );
|
|
@@ -60,7 +60,7 @@ class Files extends resource_1.APIResource {
|
|
|
60
60
|
* await client.toolRouter.session.files.createDownloadURL(
|
|
61
61
|
* 'files',
|
|
62
62
|
* {
|
|
63
|
-
* session_id: '
|
|
63
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
64
64
|
* mount_relative_path: 'report.pdf',
|
|
65
65
|
* },
|
|
66
66
|
* );
|
|
@@ -83,7 +83,7 @@ class Files extends resource_1.APIResource {
|
|
|
83
83
|
* await client.toolRouter.session.files.createUploadURL(
|
|
84
84
|
* 'files',
|
|
85
85
|
* {
|
|
86
|
-
* session_id: '
|
|
86
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
87
87
|
* mount_relative_path: 'report.pdf',
|
|
88
88
|
* },
|
|
89
89
|
* );
|
|
@@ -14,7 +14,7 @@ export class Files extends APIResource {
|
|
|
14
14
|
* ```ts
|
|
15
15
|
* const files = await client.toolRouter.session.files.list(
|
|
16
16
|
* 'files',
|
|
17
|
-
* { session_id: '
|
|
17
|
+
* { session_id: 'trs_1a2b3c4d5e6f' },
|
|
18
18
|
* );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
@@ -34,7 +34,7 @@ export class Files extends APIResource {
|
|
|
34
34
|
* const file = await client.toolRouter.session.files.delete(
|
|
35
35
|
* 'files',
|
|
36
36
|
* {
|
|
37
|
-
* session_id: '
|
|
37
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
38
38
|
* mount_relative_path: 'report.pdf',
|
|
39
39
|
* },
|
|
40
40
|
* );
|
|
@@ -57,7 +57,7 @@ export class Files extends APIResource {
|
|
|
57
57
|
* await client.toolRouter.session.files.createDownloadURL(
|
|
58
58
|
* 'files',
|
|
59
59
|
* {
|
|
60
|
-
* session_id: '
|
|
60
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
61
61
|
* mount_relative_path: 'report.pdf',
|
|
62
62
|
* },
|
|
63
63
|
* );
|
|
@@ -80,7 +80,7 @@ export class Files extends APIResource {
|
|
|
80
80
|
* await client.toolRouter.session.files.createUploadURL(
|
|
81
81
|
* 'files',
|
|
82
82
|
* {
|
|
83
|
-
* session_id: '
|
|
83
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
84
84
|
* mount_relative_path: 'report.pdf',
|
|
85
85
|
* },
|
|
86
86
|
* );
|
|
@@ -29,17 +29,22 @@ export declare class Session extends APIResource {
|
|
|
29
29
|
* @example
|
|
30
30
|
* ```ts
|
|
31
31
|
* const session = await client.toolRouter.session.retrieve(
|
|
32
|
-
* '
|
|
32
|
+
* 'trs_1a2b3c4d5e6f',
|
|
33
33
|
* );
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse>;
|
|
37
37
|
/**
|
|
38
|
-
* Executes a specific tool within a tool router session.
|
|
39
|
-
*
|
|
40
|
-
* toolkit
|
|
41
|
-
*
|
|
42
|
-
*
|
|
38
|
+
* Executes a specific tool within a tool router session. This is the primary
|
|
39
|
+
* execution endpoint for both meta tools and app tools exposed by the session. The
|
|
40
|
+
* toolkit is automatically inferred from the tool slug. For app tools, the tool
|
|
41
|
+
* must belong to an allowed toolkit and must not be disabled in the session
|
|
42
|
+
* configuration. The endpoint validates permissions, resolves connected accounts
|
|
43
|
+
* when needed, and executes the tool with the session context. The top-level
|
|
44
|
+
* account field applies only to direct app tool execution in multi-account
|
|
45
|
+
* sessions. Meta/helper tools either ignore it or define their own
|
|
46
|
+
* account-selection fields, for example
|
|
47
|
+
* COMPOSIO_MULTI_EXECUTE_TOOL.tools[].account.
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
50
|
* ```ts
|
|
@@ -51,7 +56,9 @@ export declare class Session extends APIResource {
|
|
|
51
56
|
*/
|
|
52
57
|
execute(sessionID: string, body: SessionExecuteParams, options?: RequestOptions): APIPromise<SessionExecuteResponse>;
|
|
53
58
|
/**
|
|
54
|
-
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
59
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session. This
|
|
60
|
+
* endpoint is kept for meta-tool compatibility; clients can also use the primary
|
|
61
|
+
* /execute endpoint.
|
|
55
62
|
*
|
|
56
63
|
* @example
|
|
57
64
|
* ```ts
|
|
@@ -126,15 +133,15 @@ export declare class Session extends APIResource {
|
|
|
126
133
|
* @example
|
|
127
134
|
* ```ts
|
|
128
135
|
* const response = await client.toolRouter.session.toolkits(
|
|
129
|
-
* '
|
|
136
|
+
* 'trs_1a2b3c4d5e6f',
|
|
130
137
|
* );
|
|
131
138
|
* ```
|
|
132
139
|
*/
|
|
133
140
|
toolkits(sessionID: string, query?: SessionToolkitsParams | null | undefined, options?: RequestOptions): APIPromise<SessionToolkitsResponse>;
|
|
134
141
|
/**
|
|
135
|
-
* Returns the
|
|
136
|
-
* schemas. This includes
|
|
137
|
-
*
|
|
142
|
+
* Returns the tools available in a tool router session with their complete
|
|
143
|
+
* schemas. This includes both meta tools and any preloaded app tools exposed by
|
|
144
|
+
* the session.
|
|
138
145
|
*
|
|
139
146
|
* @example
|
|
140
147
|
* ```ts
|
|
@@ -150,6 +157,11 @@ export interface SessionCreateResponse {
|
|
|
150
157
|
* The session configuration including user, toolkits, and overrides
|
|
151
158
|
*/
|
|
152
159
|
config: SessionCreateResponse.Config;
|
|
160
|
+
/**
|
|
161
|
+
* Monotonic version of the config. Incremented on each PATCH. Use for optimistic
|
|
162
|
+
* concurrency control.
|
|
163
|
+
*/
|
|
164
|
+
config_version: number;
|
|
153
165
|
mcp: SessionCreateResponse.Mcp;
|
|
154
166
|
/**
|
|
155
167
|
* The identifier of the session
|
|
@@ -164,12 +176,25 @@ export interface SessionCreateResponse {
|
|
|
164
176
|
* session creation, not on GET.
|
|
165
177
|
*/
|
|
166
178
|
experimental?: SessionCreateResponse.Experimental;
|
|
179
|
+
/**
|
|
180
|
+
* Advisory list — the session exists and is usable, but the listed issues may
|
|
181
|
+
* warrant attention.
|
|
182
|
+
*/
|
|
183
|
+
warnings?: Array<SessionCreateResponse.Warning>;
|
|
167
184
|
}
|
|
168
185
|
export declare namespace SessionCreateResponse {
|
|
169
186
|
/**
|
|
170
187
|
* The session configuration including user, toolkits, and overrides
|
|
171
188
|
*/
|
|
172
189
|
interface Config {
|
|
190
|
+
/**
|
|
191
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
192
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
193
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
194
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
195
|
+
* without a preload config).
|
|
196
|
+
*/
|
|
197
|
+
preload: Config.Preload;
|
|
173
198
|
/**
|
|
174
199
|
* User identifier for this session
|
|
175
200
|
*/
|
|
@@ -181,7 +206,8 @@ export declare namespace SessionCreateResponse {
|
|
|
181
206
|
[key: string]: string;
|
|
182
207
|
};
|
|
183
208
|
/**
|
|
184
|
-
* Connected account overrides per toolkit
|
|
209
|
+
* Connected account overrides per toolkit. Each connected account must belong to
|
|
210
|
+
* the same user_id as the session.
|
|
185
211
|
*/
|
|
186
212
|
connected_accounts?: {
|
|
187
213
|
[key: string]: string;
|
|
@@ -190,6 +216,10 @@ export declare namespace SessionCreateResponse {
|
|
|
190
216
|
* Manage connections configuration
|
|
191
217
|
*/
|
|
192
218
|
manage_connections?: Config.ManageConnections;
|
|
219
|
+
/**
|
|
220
|
+
* Multi-account configuration for this session.
|
|
221
|
+
*/
|
|
222
|
+
multi_account?: Config.MultiAccount;
|
|
193
223
|
/**
|
|
194
224
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
195
225
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -212,6 +242,21 @@ export declare namespace SessionCreateResponse {
|
|
|
212
242
|
workbench?: Config.Workbench;
|
|
213
243
|
}
|
|
214
244
|
namespace Config {
|
|
245
|
+
/**
|
|
246
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
247
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
248
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
249
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
250
|
+
* without a preload config).
|
|
251
|
+
*/
|
|
252
|
+
interface Preload {
|
|
253
|
+
/**
|
|
254
|
+
* Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
|
|
255
|
+
* server tool list, callable directly without going through search. Empty array
|
|
256
|
+
* when no preload was configured.
|
|
257
|
+
*/
|
|
258
|
+
tools: Array<string>;
|
|
259
|
+
}
|
|
215
260
|
/**
|
|
216
261
|
* Manage connections configuration
|
|
217
262
|
*/
|
|
@@ -234,6 +279,26 @@ export declare namespace SessionCreateResponse {
|
|
|
234
279
|
*/
|
|
235
280
|
enabled?: boolean;
|
|
236
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Multi-account configuration for this session.
|
|
284
|
+
*/
|
|
285
|
+
interface MultiAccount {
|
|
286
|
+
/**
|
|
287
|
+
* When true, enables multi-account mode for this session. When not set, falls back
|
|
288
|
+
* to org/project-level configuration.
|
|
289
|
+
*/
|
|
290
|
+
enable?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
|
|
293
|
+
* multi-account is enabled.
|
|
294
|
+
*/
|
|
295
|
+
max_accounts_per_toolkit?: number;
|
|
296
|
+
/**
|
|
297
|
+
* When true, require explicit account selection when multiple accounts are
|
|
298
|
+
* connected. When false (default), use the first/default account.
|
|
299
|
+
*/
|
|
300
|
+
require_explicit_selection?: boolean;
|
|
301
|
+
}
|
|
237
302
|
/**
|
|
238
303
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
239
304
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -294,6 +359,11 @@ export declare namespace SessionCreateResponse {
|
|
|
294
359
|
* Whether proxy execution is enabled in the workbench
|
|
295
360
|
*/
|
|
296
361
|
proxy_execution_enabled?: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
364
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
365
|
+
*/
|
|
366
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
297
367
|
}
|
|
298
368
|
}
|
|
299
369
|
interface Mcp {
|
|
@@ -371,12 +441,28 @@ export declare namespace SessionCreateResponse {
|
|
|
371
441
|
};
|
|
372
442
|
}
|
|
373
443
|
}
|
|
444
|
+
interface Warning {
|
|
445
|
+
/**
|
|
446
|
+
* Stable machine code identifying the advisory. Safe to switch on in client code.
|
|
447
|
+
*/
|
|
448
|
+
code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
|
|
449
|
+
/**
|
|
450
|
+
* Human-readable description of the advisory. Suitable for logging or surfacing to
|
|
451
|
+
* end users.
|
|
452
|
+
*/
|
|
453
|
+
message: string;
|
|
454
|
+
}
|
|
374
455
|
}
|
|
375
456
|
export interface SessionRetrieveResponse {
|
|
376
457
|
/**
|
|
377
458
|
* The session configuration including user, toolkits, and overrides
|
|
378
459
|
*/
|
|
379
460
|
config: SessionRetrieveResponse.Config;
|
|
461
|
+
/**
|
|
462
|
+
* Monotonic version of the config. Incremented on each PATCH. Use for optimistic
|
|
463
|
+
* concurrency control.
|
|
464
|
+
*/
|
|
465
|
+
config_version: number;
|
|
380
466
|
mcp: SessionRetrieveResponse.Mcp;
|
|
381
467
|
/**
|
|
382
468
|
* The identifier of the session
|
|
@@ -390,12 +476,25 @@ export interface SessionRetrieveResponse {
|
|
|
390
476
|
* Experimental features
|
|
391
477
|
*/
|
|
392
478
|
experimental?: SessionRetrieveResponse.Experimental;
|
|
479
|
+
/**
|
|
480
|
+
* Advisory list — the session exists and is usable, but the listed issues may
|
|
481
|
+
* warrant attention.
|
|
482
|
+
*/
|
|
483
|
+
warnings?: Array<SessionRetrieveResponse.Warning>;
|
|
393
484
|
}
|
|
394
485
|
export declare namespace SessionRetrieveResponse {
|
|
395
486
|
/**
|
|
396
487
|
* The session configuration including user, toolkits, and overrides
|
|
397
488
|
*/
|
|
398
489
|
interface Config {
|
|
490
|
+
/**
|
|
491
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
492
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
493
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
494
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
495
|
+
* without a preload config).
|
|
496
|
+
*/
|
|
497
|
+
preload: Config.Preload;
|
|
399
498
|
/**
|
|
400
499
|
* User identifier for this session
|
|
401
500
|
*/
|
|
@@ -407,7 +506,8 @@ export declare namespace SessionRetrieveResponse {
|
|
|
407
506
|
[key: string]: string;
|
|
408
507
|
};
|
|
409
508
|
/**
|
|
410
|
-
* Connected account overrides per toolkit
|
|
509
|
+
* Connected account overrides per toolkit. Each connected account must belong to
|
|
510
|
+
* the same user_id as the session.
|
|
411
511
|
*/
|
|
412
512
|
connected_accounts?: {
|
|
413
513
|
[key: string]: string;
|
|
@@ -416,6 +516,10 @@ export declare namespace SessionRetrieveResponse {
|
|
|
416
516
|
* Manage connections configuration
|
|
417
517
|
*/
|
|
418
518
|
manage_connections?: Config.ManageConnections;
|
|
519
|
+
/**
|
|
520
|
+
* Multi-account configuration for this session.
|
|
521
|
+
*/
|
|
522
|
+
multi_account?: Config.MultiAccount;
|
|
419
523
|
/**
|
|
420
524
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
421
525
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -438,6 +542,21 @@ export declare namespace SessionRetrieveResponse {
|
|
|
438
542
|
workbench?: Config.Workbench;
|
|
439
543
|
}
|
|
440
544
|
namespace Config {
|
|
545
|
+
/**
|
|
546
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
547
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
548
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
549
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
550
|
+
* without a preload config).
|
|
551
|
+
*/
|
|
552
|
+
interface Preload {
|
|
553
|
+
/**
|
|
554
|
+
* Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
|
|
555
|
+
* server tool list, callable directly without going through search. Empty array
|
|
556
|
+
* when no preload was configured.
|
|
557
|
+
*/
|
|
558
|
+
tools: Array<string>;
|
|
559
|
+
}
|
|
441
560
|
/**
|
|
442
561
|
* Manage connections configuration
|
|
443
562
|
*/
|
|
@@ -460,6 +579,26 @@ export declare namespace SessionRetrieveResponse {
|
|
|
460
579
|
*/
|
|
461
580
|
enabled?: boolean;
|
|
462
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* Multi-account configuration for this session.
|
|
584
|
+
*/
|
|
585
|
+
interface MultiAccount {
|
|
586
|
+
/**
|
|
587
|
+
* When true, enables multi-account mode for this session. When not set, falls back
|
|
588
|
+
* to org/project-level configuration.
|
|
589
|
+
*/
|
|
590
|
+
enable?: boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
|
|
593
|
+
* multi-account is enabled.
|
|
594
|
+
*/
|
|
595
|
+
max_accounts_per_toolkit?: number;
|
|
596
|
+
/**
|
|
597
|
+
* When true, require explicit account selection when multiple accounts are
|
|
598
|
+
* connected. When false (default), use the first/default account.
|
|
599
|
+
*/
|
|
600
|
+
require_explicit_selection?: boolean;
|
|
601
|
+
}
|
|
463
602
|
/**
|
|
464
603
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
465
604
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -520,6 +659,11 @@ export declare namespace SessionRetrieveResponse {
|
|
|
520
659
|
* Whether proxy execution is enabled in the workbench
|
|
521
660
|
*/
|
|
522
661
|
proxy_execution_enabled?: boolean;
|
|
662
|
+
/**
|
|
663
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
664
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
665
|
+
*/
|
|
666
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
523
667
|
}
|
|
524
668
|
}
|
|
525
669
|
interface Mcp {
|
|
@@ -596,6 +740,17 @@ export declare namespace SessionRetrieveResponse {
|
|
|
596
740
|
};
|
|
597
741
|
}
|
|
598
742
|
}
|
|
743
|
+
interface Warning {
|
|
744
|
+
/**
|
|
745
|
+
* Stable machine code identifying the advisory. Safe to switch on in client code.
|
|
746
|
+
*/
|
|
747
|
+
code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
|
|
748
|
+
/**
|
|
749
|
+
* Human-readable description of the advisory. Suitable for logging or surfacing to
|
|
750
|
+
* end users.
|
|
751
|
+
*/
|
|
752
|
+
message: string;
|
|
753
|
+
}
|
|
599
754
|
}
|
|
600
755
|
export interface SessionExecuteResponse {
|
|
601
756
|
/**
|
|
@@ -1210,7 +1365,9 @@ export interface SessionCreateParams {
|
|
|
1210
1365
|
/**
|
|
1211
1366
|
* The connected accounts to use for the session. This will override the default
|
|
1212
1367
|
* behaviour and use the given connected account when specific toolkits are being
|
|
1213
|
-
* executed
|
|
1368
|
+
* executed. Each connected account must exist (not deleted or disabled) and belong
|
|
1369
|
+
* to the same `user_id` as the session — otherwise session creation fails with a
|
|
1370
|
+
* clear error explaining which account didn't match.
|
|
1214
1371
|
*/
|
|
1215
1372
|
connected_accounts?: {
|
|
1216
1373
|
[key: string]: string;
|
|
@@ -1229,6 +1386,17 @@ export interface SessionCreateParams {
|
|
|
1229
1386
|
* accounts per toolkit.
|
|
1230
1387
|
*/
|
|
1231
1388
|
multi_account?: SessionCreateParams.MultiAccount;
|
|
1389
|
+
/**
|
|
1390
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
1391
|
+
* MCP server tool list so the agent can call them directly without going through
|
|
1392
|
+
* search first — useful for frequently used tools. Each slug must be allowed by
|
|
1393
|
+
* the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
|
|
1394
|
+
* fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
|
|
1395
|
+
* can also be preloaded. Not supported when multi-account is enabled. Each
|
|
1396
|
+
* preloaded tool adds to the agent context window, so keep the list at or under
|
|
1397
|
+
* ~20 tools.
|
|
1398
|
+
*/
|
|
1399
|
+
preload?: SessionCreateParams.Preload;
|
|
1232
1400
|
/**
|
|
1233
1401
|
* Global MCP tool annotation hints for filtering. Array format is treated as
|
|
1234
1402
|
* enabled list. Object format supports both enabled (tool must have at least one)
|
|
@@ -1242,8 +1410,11 @@ export interface SessionCreateParams {
|
|
|
1242
1410
|
*/
|
|
1243
1411
|
toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
|
|
1244
1412
|
/**
|
|
1245
|
-
* Tool-level configuration per toolkit
|
|
1246
|
-
*
|
|
1413
|
+
* Tool-level configuration per toolkit. Allows you to enable, disable, or filter
|
|
1414
|
+
* by tags for specific tools within each toolkit. Every slug passed in `enable` /
|
|
1415
|
+
* `disable` must be a valid Composio tool slug for that toolkit — invalid or
|
|
1416
|
+
* typo'd slugs fail session creation with a clear error listing which ones didn't
|
|
1417
|
+
* match.
|
|
1247
1418
|
*/
|
|
1248
1419
|
tools?: {
|
|
1249
1420
|
[key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
|
|
@@ -1273,6 +1444,11 @@ export declare namespace SessionCreateParams {
|
|
|
1273
1444
|
* extends_toolkit inherit the Composio toolkit's connection.
|
|
1274
1445
|
*/
|
|
1275
1446
|
custom_tools?: Array<Experimental.CustomTool>;
|
|
1447
|
+
/**
|
|
1448
|
+
* Per-tool elicitation permission config. Default behavior + per-tool
|
|
1449
|
+
* always_allow/always_deny overrides. Mutation via PATCH.
|
|
1450
|
+
*/
|
|
1451
|
+
permissions?: Experimental.Permissions;
|
|
1276
1452
|
}
|
|
1277
1453
|
namespace Experimental {
|
|
1278
1454
|
/**
|
|
@@ -1365,6 +1541,27 @@ export declare namespace SessionCreateParams {
|
|
|
1365
1541
|
[key: string]: unknown;
|
|
1366
1542
|
};
|
|
1367
1543
|
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Per-tool elicitation permission config. Default behavior + per-tool
|
|
1546
|
+
* always_allow/always_deny overrides. Mutation via PATCH.
|
|
1547
|
+
*/
|
|
1548
|
+
interface Permissions {
|
|
1549
|
+
/**
|
|
1550
|
+
* Default elicitation behavior when no override matches. `allow_all` runs every
|
|
1551
|
+
* tool without prompting; `ask_every_call` prompts on each invocation;
|
|
1552
|
+
* `ask_once_per_session` prompts once and remembers the answer for the rest of the
|
|
1553
|
+
* session.
|
|
1554
|
+
*/
|
|
1555
|
+
default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
|
|
1556
|
+
/**
|
|
1557
|
+
* Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`.
|
|
1558
|
+
* `always_allow` skips the prompt and runs the tool; `always_deny` blocks the
|
|
1559
|
+
* tool. Overrides take precedence over `default` and the session cache.
|
|
1560
|
+
*/
|
|
1561
|
+
overrides?: {
|
|
1562
|
+
[key: string]: 'always_allow' | 'always_deny';
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1368
1565
|
}
|
|
1369
1566
|
/**
|
|
1370
1567
|
* Configuration for connection management settings
|
|
@@ -1415,14 +1612,27 @@ export declare namespace SessionCreateParams {
|
|
|
1415
1612
|
*/
|
|
1416
1613
|
require_explicit_selection?: boolean;
|
|
1417
1614
|
}
|
|
1418
|
-
|
|
1615
|
+
/**
|
|
1616
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
1617
|
+
* MCP server tool list so the agent can call them directly without going through
|
|
1618
|
+
* search first — useful for frequently used tools. Each slug must be allowed by
|
|
1619
|
+
* the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
|
|
1620
|
+
* fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
|
|
1621
|
+
* can also be preloaded. Not supported when multi-account is enabled. Each
|
|
1622
|
+
* preloaded tool adds to the agent context window, so keep the list at or under
|
|
1623
|
+
* ~20 tools.
|
|
1624
|
+
*/
|
|
1625
|
+
interface Preload {
|
|
1419
1626
|
/**
|
|
1420
|
-
*
|
|
1627
|
+
* Tool slugs to preload. Each slug must be allowed by the session filters
|
|
1628
|
+
* (`toolkits`, `tools`, `tags`) and exist either in the Composio tool catalog or
|
|
1629
|
+
* in `custom_tools` / `custom_toolkits` — unknown or blocked slugs return a 400 at
|
|
1630
|
+
* session creation.
|
|
1421
1631
|
*/
|
|
1632
|
+
tools?: Array<string>;
|
|
1633
|
+
}
|
|
1634
|
+
interface UnionMember1 {
|
|
1422
1635
|
disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1423
|
-
/**
|
|
1424
|
-
* Tags that the tool must have at least one of
|
|
1425
|
-
*/
|
|
1426
1636
|
enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1427
1637
|
}
|
|
1428
1638
|
/**
|
|
@@ -1464,13 +1674,7 @@ export declare namespace SessionCreateParams {
|
|
|
1464
1674
|
}
|
|
1465
1675
|
namespace Tags {
|
|
1466
1676
|
interface UnionMember1 {
|
|
1467
|
-
/**
|
|
1468
|
-
* Tags that the tool must NOT have any of
|
|
1469
|
-
*/
|
|
1470
1677
|
disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1471
|
-
/**
|
|
1472
|
-
* Tags that the tool must have at least one of
|
|
1473
|
-
*/
|
|
1474
1678
|
enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1475
1679
|
}
|
|
1476
1680
|
}
|
|
@@ -1494,18 +1698,26 @@ export declare namespace SessionCreateParams {
|
|
|
1494
1698
|
* APIs directly.
|
|
1495
1699
|
*/
|
|
1496
1700
|
enable_proxy_execution?: boolean;
|
|
1701
|
+
/**
|
|
1702
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
1703
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
1704
|
+
*/
|
|
1705
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
1497
1706
|
}
|
|
1498
1707
|
}
|
|
1499
1708
|
export interface SessionExecuteParams {
|
|
1500
1709
|
/**
|
|
1501
|
-
* The unique slug identifier of the tool to execute
|
|
1710
|
+
* The unique slug identifier of the tool to execute. Supports both meta tools and
|
|
1711
|
+
* app tools exposed by the session.
|
|
1502
1712
|
*/
|
|
1503
1713
|
tool_slug: string;
|
|
1504
1714
|
/**
|
|
1505
|
-
* Account identifier to specify which connected account to use
|
|
1506
|
-
* (e.g. "coup_hurricane_dal_analytical") or an
|
|
1507
|
-
* account, the default is used. When omitted
|
|
1508
|
-
* lists available accounts.
|
|
1715
|
+
* Account identifier to specify which connected account to use for direct tool
|
|
1716
|
+
* execution. Use the account ID (e.g. "coup_hurricane_dal_analytical") or an
|
|
1717
|
+
* alias. When omitted with a single account, the default is used. When omitted
|
|
1718
|
+
* with multiple accounts, an error lists available accounts. Meta/helper tools
|
|
1719
|
+
* either ignore this top-level field or define their own account-selection fields,
|
|
1720
|
+
* for example COMPOSIO_MULTI_EXECUTE_TOOL.tools[].account.
|
|
1509
1721
|
*/
|
|
1510
1722
|
account?: string;
|
|
1511
1723
|
/**
|
|
@@ -1514,6 +1726,14 @@ export interface SessionExecuteParams {
|
|
|
1514
1726
|
arguments?: {
|
|
1515
1727
|
[key: string]: unknown;
|
|
1516
1728
|
};
|
|
1729
|
+
/**
|
|
1730
|
+
* When true, direct non-meta tool execution may return a workbench offload preview
|
|
1731
|
+
* if the response exceeds the configured threshold and the session workbench is
|
|
1732
|
+
* enabled. When omitted or false, direct tool execution returns the normal inline
|
|
1733
|
+
* response. Meta/helper tools are unaffected, and COMPOSIO_MULTI_EXECUTE_TOOL uses
|
|
1734
|
+
* session.workbench configuration for its own batch-level offload behavior.
|
|
1735
|
+
*/
|
|
1736
|
+
enable_auto_workbench_offload?: boolean;
|
|
1517
1737
|
}
|
|
1518
1738
|
export interface SessionExecuteMetaParams {
|
|
1519
1739
|
/**
|
|
@@ -2053,12 +2273,12 @@ export declare namespace SessionSearchParams {
|
|
|
2053
2273
|
interface Query {
|
|
2054
2274
|
/**
|
|
2055
2275
|
* The task or use case to search tools for. Provide a detailed description to get
|
|
2056
|
-
* the best results.
|
|
2276
|
+
* the best results. Max 1024 characters.
|
|
2057
2277
|
*/
|
|
2058
2278
|
use_case: string;
|
|
2059
2279
|
/**
|
|
2060
2280
|
* Known field hints as key:value pairs (e.g., "channel_name:general,
|
|
2061
|
-
* user_email:john@example.com")
|
|
2281
|
+
* user_email:john@example.com"). Max 500 characters.
|
|
2062
2282
|
*/
|
|
2063
2283
|
known_fields?: string;
|
|
2064
2284
|
}
|