@composio/client 0.1.0-alpha.47 → 0.1.0-alpha.49
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 +30 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +58 -55
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +58 -55
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +8 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +8 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +45 -40
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +45 -40
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/tool-router/index.d.mts +1 -1
- package/resources/tool-router/index.d.mts.map +1 -1
- package/resources/tool-router/index.d.ts +1 -1
- package/resources/tool-router/index.d.ts.map +1 -1
- package/resources/tool-router/index.js.map +1 -1
- package/resources/tool-router/index.mjs.map +1 -1
- package/resources/tool-router/session.d.mts +158 -225
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +158 -225
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/tool-router/session.js +17 -8
- package/resources/tool-router/session.js.map +1 -1
- package/resources/tool-router/session.mjs +17 -8
- package/resources/tool-router/session.mjs.map +1 -1
- package/resources/tool-router/tool-router.d.mts +6 -6
- package/resources/tool-router/tool-router.d.mts.map +1 -1
- package/resources/tool-router/tool-router.d.ts +6 -6
- package/resources/tool-router/tool-router.d.ts.map +1 -1
- package/resources/tool-router/tool-router.js +4 -4
- package/resources/tool-router/tool-router.js.map +1 -1
- package/resources/tool-router/tool-router.mjs +4 -4
- package/resources/tool-router/tool-router.mjs.map +1 -1
- package/resources/toolkits.d.mts +4 -10
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +4 -10
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +2 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +2 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +7 -6
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +7 -6
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/src/client.ts +0 -2
- package/src/resources/auth-configs.ts +64 -61
- package/src/resources/connected-accounts.ts +8 -5
- package/src/resources/index.ts +0 -1
- package/src/resources/mcp/mcp.ts +45 -40
- package/src/resources/tool-router/index.ts +2 -0
- package/src/resources/tool-router/session.ts +168 -242
- package/src/resources/tool-router/tool-router.ts +8 -4
- package/src/resources/toolkits.ts +4 -15
- package/src/resources/trigger-instances/trigger-instances.ts +7 -6
- 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
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../internal/headers';
|
|
6
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
6
|
import { path } from '../../internal/utils/path';
|
|
8
7
|
|
|
@@ -56,17 +55,32 @@ export class Session extends APIResource {
|
|
|
56
55
|
*/
|
|
57
56
|
execute(
|
|
58
57
|
sessionID: string,
|
|
59
|
-
|
|
58
|
+
body: SessionExecuteParams,
|
|
60
59
|
options?: RequestOptions,
|
|
61
60
|
): APIPromise<SessionExecuteResponse> {
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response =
|
|
70
|
+
* await client.toolRouter.session.executeMeta(
|
|
71
|
+
* 'trs_LX9uJKBinWWr',
|
|
72
|
+
* { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
executeMeta(
|
|
77
|
+
sessionID: string,
|
|
78
|
+
body: SessionExecuteMetaParams,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): APIPromise<SessionExecuteMetaResponse> {
|
|
81
|
+
return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute_meta`, {
|
|
64
82
|
body,
|
|
65
83
|
...options,
|
|
66
|
-
headers: buildHeaders([
|
|
67
|
-
{ ...(xSessionAccessKey != null ? { 'x-session-access-key': xSessionAccessKey } : undefined) },
|
|
68
|
-
options?.headers,
|
|
69
|
-
]),
|
|
70
84
|
});
|
|
71
85
|
}
|
|
72
86
|
|
|
@@ -159,14 +173,16 @@ export namespace SessionCreateResponse {
|
|
|
159
173
|
connected_accounts?: { [key: string]: string };
|
|
160
174
|
|
|
161
175
|
/**
|
|
162
|
-
*
|
|
176
|
+
* Manage connections configuration
|
|
163
177
|
*/
|
|
164
|
-
|
|
178
|
+
manage_connections?: Config.ManageConnections;
|
|
165
179
|
|
|
166
180
|
/**
|
|
167
|
-
*
|
|
181
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
182
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
183
|
+
* idempotentHint: tool may interact with external entities.
|
|
168
184
|
*/
|
|
169
|
-
|
|
185
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
170
186
|
|
|
171
187
|
/**
|
|
172
188
|
* Toolkit configuration - either enabled list or disabled list
|
|
@@ -174,45 +190,38 @@ export namespace SessionCreateResponse {
|
|
|
174
190
|
toolkits?: Config.Enabled | Config.Disabled;
|
|
175
191
|
|
|
176
192
|
/**
|
|
177
|
-
*
|
|
193
|
+
* Tool-level configuration per toolkit
|
|
178
194
|
*/
|
|
179
|
-
tools?: Config.
|
|
195
|
+
tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Workbench configuration
|
|
199
|
+
*/
|
|
200
|
+
workbench?: Config.Workbench;
|
|
180
201
|
}
|
|
181
202
|
|
|
182
203
|
export namespace Config {
|
|
183
204
|
/**
|
|
184
|
-
*
|
|
205
|
+
* Manage connections configuration
|
|
185
206
|
*/
|
|
186
|
-
export interface
|
|
187
|
-
/**
|
|
188
|
-
* Whether to enable the connection manager for automatic connection handling
|
|
189
|
-
*/
|
|
190
|
-
auto_manage_connections?: boolean;
|
|
191
|
-
|
|
207
|
+
export interface ManageConnections {
|
|
192
208
|
/**
|
|
193
209
|
* Custom callback URL for connected account auth flows
|
|
194
210
|
*/
|
|
195
211
|
callback_url?: string;
|
|
196
212
|
|
|
197
213
|
/**
|
|
198
|
-
* Whether to
|
|
214
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
199
215
|
*/
|
|
200
|
-
|
|
216
|
+
enabled?: boolean;
|
|
201
217
|
}
|
|
202
218
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export interface Execution {
|
|
207
|
-
/**
|
|
208
|
-
* Whether to allow proxy execute calls in the workbench
|
|
209
|
-
*/
|
|
210
|
-
proxy_execution_enabled?: boolean;
|
|
219
|
+
export interface Enabled {
|
|
220
|
+
enabled: Array<string>;
|
|
221
|
+
}
|
|
211
222
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*/
|
|
215
|
-
timeout_seconds?: number;
|
|
223
|
+
export interface Disabled {
|
|
224
|
+
disabled: Array<string>;
|
|
216
225
|
}
|
|
217
226
|
|
|
218
227
|
export interface Enabled {
|
|
@@ -223,56 +232,24 @@ export namespace SessionCreateResponse {
|
|
|
223
232
|
disabled: Array<string>;
|
|
224
233
|
}
|
|
225
234
|
|
|
235
|
+
export interface Tags {
|
|
236
|
+
tags: Array<string>;
|
|
237
|
+
}
|
|
238
|
+
|
|
226
239
|
/**
|
|
227
|
-
*
|
|
240
|
+
* Workbench configuration
|
|
228
241
|
*/
|
|
229
|
-
export interface
|
|
242
|
+
export interface Workbench {
|
|
230
243
|
/**
|
|
231
|
-
*
|
|
244
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
245
|
+
* workbench. Default is 20k.
|
|
232
246
|
*/
|
|
233
|
-
|
|
247
|
+
auto_offload_threshold?: number;
|
|
234
248
|
|
|
235
249
|
/**
|
|
236
|
-
*
|
|
250
|
+
* Whether proxy execution is enabled in the workbench
|
|
237
251
|
*/
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export namespace Tools {
|
|
242
|
-
/**
|
|
243
|
-
* Tool filtering configuration
|
|
244
|
-
*/
|
|
245
|
-
export interface Filters {
|
|
246
|
-
/**
|
|
247
|
-
* Filter tools by specific tags
|
|
248
|
-
*/
|
|
249
|
-
tags?: Filters.Tags;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export namespace Filters {
|
|
253
|
-
/**
|
|
254
|
-
* Filter tools by specific tags
|
|
255
|
-
*/
|
|
256
|
-
export interface Tags {
|
|
257
|
-
/**
|
|
258
|
-
* Exclude tools that have these tags
|
|
259
|
-
*/
|
|
260
|
-
exclude?: Array<string>;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Only include tools that have these tags
|
|
264
|
-
*/
|
|
265
|
-
include?: Array<string>;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export interface Enabled {
|
|
270
|
-
enabled: Array<string>;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface Disabled {
|
|
274
|
-
disabled: Array<string>;
|
|
275
|
-
}
|
|
252
|
+
proxy_execution_enabled?: boolean;
|
|
276
253
|
}
|
|
277
254
|
}
|
|
278
255
|
|
|
@@ -336,14 +313,16 @@ export namespace SessionRetrieveResponse {
|
|
|
336
313
|
connected_accounts?: { [key: string]: string };
|
|
337
314
|
|
|
338
315
|
/**
|
|
339
|
-
*
|
|
316
|
+
* Manage connections configuration
|
|
340
317
|
*/
|
|
341
|
-
|
|
318
|
+
manage_connections?: Config.ManageConnections;
|
|
342
319
|
|
|
343
320
|
/**
|
|
344
|
-
*
|
|
321
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
322
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
323
|
+
* idempotentHint: tool may interact with external entities.
|
|
345
324
|
*/
|
|
346
|
-
|
|
325
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
347
326
|
|
|
348
327
|
/**
|
|
349
328
|
* Toolkit configuration - either enabled list or disabled list
|
|
@@ -351,45 +330,38 @@ export namespace SessionRetrieveResponse {
|
|
|
351
330
|
toolkits?: Config.Enabled | Config.Disabled;
|
|
352
331
|
|
|
353
332
|
/**
|
|
354
|
-
*
|
|
333
|
+
* Tool-level configuration per toolkit
|
|
355
334
|
*/
|
|
356
|
-
tools?: Config.
|
|
335
|
+
tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Workbench configuration
|
|
339
|
+
*/
|
|
340
|
+
workbench?: Config.Workbench;
|
|
357
341
|
}
|
|
358
342
|
|
|
359
343
|
export namespace Config {
|
|
360
344
|
/**
|
|
361
|
-
*
|
|
345
|
+
* Manage connections configuration
|
|
362
346
|
*/
|
|
363
|
-
export interface
|
|
364
|
-
/**
|
|
365
|
-
* Whether to enable the connection manager for automatic connection handling
|
|
366
|
-
*/
|
|
367
|
-
auto_manage_connections?: boolean;
|
|
368
|
-
|
|
347
|
+
export interface ManageConnections {
|
|
369
348
|
/**
|
|
370
349
|
* Custom callback URL for connected account auth flows
|
|
371
350
|
*/
|
|
372
351
|
callback_url?: string;
|
|
373
352
|
|
|
374
353
|
/**
|
|
375
|
-
* Whether to
|
|
354
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
376
355
|
*/
|
|
377
|
-
|
|
356
|
+
enabled?: boolean;
|
|
378
357
|
}
|
|
379
358
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
export interface Execution {
|
|
384
|
-
/**
|
|
385
|
-
* Whether to allow proxy execute calls in the workbench
|
|
386
|
-
*/
|
|
387
|
-
proxy_execution_enabled?: boolean;
|
|
359
|
+
export interface Enabled {
|
|
360
|
+
enabled: Array<string>;
|
|
361
|
+
}
|
|
388
362
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
*/
|
|
392
|
-
timeout_seconds?: number;
|
|
363
|
+
export interface Disabled {
|
|
364
|
+
disabled: Array<string>;
|
|
393
365
|
}
|
|
394
366
|
|
|
395
367
|
export interface Enabled {
|
|
@@ -400,56 +372,24 @@ export namespace SessionRetrieveResponse {
|
|
|
400
372
|
disabled: Array<string>;
|
|
401
373
|
}
|
|
402
374
|
|
|
375
|
+
export interface Tags {
|
|
376
|
+
tags: Array<string>;
|
|
377
|
+
}
|
|
378
|
+
|
|
403
379
|
/**
|
|
404
|
-
*
|
|
380
|
+
* Workbench configuration
|
|
405
381
|
*/
|
|
406
|
-
export interface
|
|
382
|
+
export interface Workbench {
|
|
407
383
|
/**
|
|
408
|
-
*
|
|
384
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
385
|
+
* workbench. Default is 20k.
|
|
409
386
|
*/
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Tool-level overrides per toolkit
|
|
414
|
-
*/
|
|
415
|
-
overrides?: { [key: string]: Tools.Enabled | Tools.Disabled };
|
|
416
|
-
}
|
|
387
|
+
auto_offload_threshold?: number;
|
|
417
388
|
|
|
418
|
-
export namespace Tools {
|
|
419
389
|
/**
|
|
420
|
-
*
|
|
390
|
+
* Whether proxy execution is enabled in the workbench
|
|
421
391
|
*/
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* Filter tools by specific tags
|
|
425
|
-
*/
|
|
426
|
-
tags?: Filters.Tags;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export namespace Filters {
|
|
430
|
-
/**
|
|
431
|
-
* Filter tools by specific tags
|
|
432
|
-
*/
|
|
433
|
-
export interface Tags {
|
|
434
|
-
/**
|
|
435
|
-
* Exclude tools that have these tags
|
|
436
|
-
*/
|
|
437
|
-
exclude?: Array<string>;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Only include tools that have these tags
|
|
441
|
-
*/
|
|
442
|
-
include?: Array<string>;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
export interface Enabled {
|
|
447
|
-
enabled: Array<string>;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export interface Disabled {
|
|
451
|
-
disabled: Array<string>;
|
|
452
|
-
}
|
|
392
|
+
proxy_execution_enabled?: boolean;
|
|
453
393
|
}
|
|
454
394
|
}
|
|
455
395
|
|
|
@@ -483,6 +423,23 @@ export interface SessionExecuteResponse {
|
|
|
483
423
|
log_id: string;
|
|
484
424
|
}
|
|
485
425
|
|
|
426
|
+
export interface SessionExecuteMetaResponse {
|
|
427
|
+
/**
|
|
428
|
+
* The data returned by the tool execution
|
|
429
|
+
*/
|
|
430
|
+
data: { [key: string]: unknown };
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Error message if the execution failed, null otherwise
|
|
434
|
+
*/
|
|
435
|
+
error: string | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Unique identifier for the execution log
|
|
439
|
+
*/
|
|
440
|
+
log_id: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
486
443
|
export interface SessionLinkResponse {
|
|
487
444
|
/**
|
|
488
445
|
* The unique identifier for the connected account
|
|
@@ -643,13 +600,16 @@ export interface SessionCreateParams {
|
|
|
643
600
|
/**
|
|
644
601
|
* Configuration for connection management settings
|
|
645
602
|
*/
|
|
646
|
-
|
|
603
|
+
manage_connections?: SessionCreateParams.ManageConnections;
|
|
647
604
|
|
|
648
605
|
/**
|
|
649
|
-
*
|
|
650
|
-
*
|
|
606
|
+
* Global MCP tool annotation hints for filtering. readOnlyHint: tool does not
|
|
607
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
608
|
+
* idempotentHint: repeated calls with same args have no additional effect.
|
|
609
|
+
* Toolkit-level tags override this. Toolkit enabled/disabled lists take precedence
|
|
610
|
+
* over tag filtering.
|
|
651
611
|
*/
|
|
652
|
-
|
|
612
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
653
613
|
|
|
654
614
|
/**
|
|
655
615
|
* Toolkit configuration - specify either enabled toolkits (allowlist) or disabled
|
|
@@ -658,24 +618,24 @@ export interface SessionCreateParams {
|
|
|
658
618
|
toolkits?: SessionCreateParams.Enabled | SessionCreateParams.Disabled;
|
|
659
619
|
|
|
660
620
|
/**
|
|
661
|
-
*
|
|
621
|
+
* Tool-level configuration per toolkit - either specify enabled tools (whitelist),
|
|
622
|
+
* disabled tools (blacklist), or filter by MCP tags for each toolkit
|
|
623
|
+
*/
|
|
624
|
+
tools?: {
|
|
625
|
+
[key: string]: SessionCreateParams.Enabled | SessionCreateParams.Disabled | SessionCreateParams.Tags;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Configuration for workbench behavior
|
|
662
630
|
*/
|
|
663
|
-
|
|
631
|
+
workbench?: SessionCreateParams.Workbench;
|
|
664
632
|
}
|
|
665
633
|
|
|
666
634
|
export namespace SessionCreateParams {
|
|
667
635
|
/**
|
|
668
636
|
* Configuration for connection management settings
|
|
669
637
|
*/
|
|
670
|
-
export interface
|
|
671
|
-
/**
|
|
672
|
-
* Whether to enable the connection manager for automatic connection handling. If
|
|
673
|
-
* true, we will provide a tool your agent can use to initiate connections to
|
|
674
|
-
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
675
|
-
* connections manually.
|
|
676
|
-
*/
|
|
677
|
-
auto_manage_connections?: boolean | null;
|
|
678
|
-
|
|
638
|
+
export interface ManageConnections {
|
|
679
639
|
/**
|
|
680
640
|
* The URL to redirect to after a user completes authentication for a connected
|
|
681
641
|
* account. This allows you to handle the auth callback in your own application.
|
|
@@ -683,29 +643,12 @@ export namespace SessionCreateParams {
|
|
|
683
643
|
callback_url?: string;
|
|
684
644
|
|
|
685
645
|
/**
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
|
|
690
|
-
infer_scopes_from_tools?: boolean | null;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Configuration for workbench behavior including security restrictions and
|
|
695
|
-
* execution limits
|
|
696
|
-
*/
|
|
697
|
-
export interface Execution {
|
|
698
|
-
/**
|
|
699
|
-
* Whether to allow proxy execute calls in the workbench. If false, prevents
|
|
700
|
-
* arbitrary HTTP requests and destructive actions.
|
|
701
|
-
*/
|
|
702
|
-
proxy_execution_enabled?: boolean | null;
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* Maximum allowed execution time for workbench operations in seconds. If not
|
|
706
|
-
* specified, uses the default timeout.
|
|
646
|
+
* Whether to enable the connection manager for automatic connection handling. If
|
|
647
|
+
* true, we will provide a tool your agent can use to initiate connections to
|
|
648
|
+
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
649
|
+
* connections manually.
|
|
707
650
|
*/
|
|
708
|
-
|
|
651
|
+
enabled?: boolean | null;
|
|
709
652
|
}
|
|
710
653
|
|
|
711
654
|
/**
|
|
@@ -728,88 +671,69 @@ export namespace SessionCreateParams {
|
|
|
728
671
|
disabled: Array<string>;
|
|
729
672
|
}
|
|
730
673
|
|
|
731
|
-
|
|
732
|
-
* Configuration for tool overrides and filtering
|
|
733
|
-
*/
|
|
734
|
-
export interface Tools {
|
|
674
|
+
export interface Enabled {
|
|
735
675
|
/**
|
|
736
|
-
*
|
|
676
|
+
* Only these specific tools will be available for this toolkit
|
|
737
677
|
*/
|
|
738
|
-
|
|
678
|
+
enabled: Array<string>;
|
|
679
|
+
}
|
|
739
680
|
|
|
681
|
+
export interface Disabled {
|
|
740
682
|
/**
|
|
741
|
-
*
|
|
742
|
-
* disabled tools (blacklist) for each toolkit
|
|
683
|
+
* These specific tools will be disabled for this toolkit
|
|
743
684
|
*/
|
|
744
|
-
|
|
685
|
+
disabled: Array<string>;
|
|
745
686
|
}
|
|
746
687
|
|
|
747
|
-
export
|
|
688
|
+
export interface Tags {
|
|
748
689
|
/**
|
|
749
|
-
*
|
|
690
|
+
* MCP tags to filter tools for this toolkit. Only tools with these tags will be
|
|
691
|
+
* available.
|
|
750
692
|
*/
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
* Filter tools by tags such as read_only_hint, non_destructive_hint,
|
|
754
|
-
* open_world_hint, idempotent_hint. Use include to only show tools with specific
|
|
755
|
-
* tags, or exclude to hide tools with specific tags.
|
|
756
|
-
*/
|
|
757
|
-
tags?: Filters.Tags;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
export namespace Filters {
|
|
761
|
-
/**
|
|
762
|
-
* Filter tools by tags such as read_only_hint, non_destructive_hint,
|
|
763
|
-
* open_world_hint, idempotent_hint. Use include to only show tools with specific
|
|
764
|
-
* tags, or exclude to hide tools with specific tags.
|
|
765
|
-
*/
|
|
766
|
-
export interface Tags {
|
|
767
|
-
/**
|
|
768
|
-
* Exclude tools that have any of these tags. Tools with any of these tags will be
|
|
769
|
-
* filtered out.
|
|
770
|
-
*/
|
|
771
|
-
exclude?: Array<string>;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* Only include tools that have these tags. Tools must have at least one of these
|
|
775
|
-
* tags to be included.
|
|
776
|
-
*/
|
|
777
|
-
include?: Array<string>;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
693
|
+
tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
694
|
+
}
|
|
780
695
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
696
|
+
/**
|
|
697
|
+
* Configuration for workbench behavior
|
|
698
|
+
*/
|
|
699
|
+
export interface Workbench {
|
|
700
|
+
/**
|
|
701
|
+
* Character threshold for automatic offloading. When workbench response exceeds
|
|
702
|
+
* this threshold, it will be automatically offloaded. Default is picked
|
|
703
|
+
* automatically based on the response size.
|
|
704
|
+
*/
|
|
705
|
+
auto_offload_threshold?: number;
|
|
787
706
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
707
|
+
/**
|
|
708
|
+
* Whether proxy execution is enabled. When enabled, workbench can call URLs and
|
|
709
|
+
* APIs directly.
|
|
710
|
+
*/
|
|
711
|
+
proxy_execution_enabled?: boolean;
|
|
794
712
|
}
|
|
795
713
|
}
|
|
796
714
|
|
|
797
715
|
export interface SessionExecuteParams {
|
|
798
716
|
/**
|
|
799
|
-
*
|
|
717
|
+
* The unique slug identifier of the tool to execute
|
|
800
718
|
*/
|
|
801
719
|
tool_slug: string;
|
|
802
720
|
|
|
803
721
|
/**
|
|
804
|
-
*
|
|
722
|
+
* The arguments required by the tool
|
|
805
723
|
*/
|
|
806
724
|
arguments?: { [key: string]: unknown };
|
|
725
|
+
}
|
|
807
726
|
|
|
727
|
+
export interface SessionExecuteMetaParams {
|
|
808
728
|
/**
|
|
809
|
-
*
|
|
810
|
-
* Alternative to x-api-key for internal tool router endpoints.
|
|
729
|
+
* The unique slug identifier of the meta tool to execute
|
|
811
730
|
*/
|
|
812
|
-
|
|
731
|
+
slug: string;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* The arguments required by the meta tool
|
|
735
|
+
*/
|
|
736
|
+
arguments?: { [key: string]: unknown };
|
|
813
737
|
}
|
|
814
738
|
|
|
815
739
|
export interface SessionLinkParams {
|
|
@@ -856,10 +780,12 @@ export declare namespace Session {
|
|
|
856
780
|
type SessionCreateResponse as SessionCreateResponse,
|
|
857
781
|
type SessionRetrieveResponse as SessionRetrieveResponse,
|
|
858
782
|
type SessionExecuteResponse as SessionExecuteResponse,
|
|
783
|
+
type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
|
|
859
784
|
type SessionLinkResponse as SessionLinkResponse,
|
|
860
785
|
type SessionToolkitsResponse as SessionToolkitsResponse,
|
|
861
786
|
type SessionCreateParams as SessionCreateParams,
|
|
862
787
|
type SessionExecuteParams as SessionExecuteParams,
|
|
788
|
+
type SessionExecuteMetaParams as SessionExecuteMetaParams,
|
|
863
789
|
type SessionLinkParams as SessionLinkParams,
|
|
864
790
|
type SessionToolkitsParams as SessionToolkitsParams,
|
|
865
791
|
};
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
Session,
|
|
7
7
|
SessionCreateParams,
|
|
8
8
|
SessionCreateResponse,
|
|
9
|
+
SessionExecuteMetaParams,
|
|
10
|
+
SessionExecuteMetaResponse,
|
|
9
11
|
SessionExecuteParams,
|
|
10
12
|
SessionExecuteResponse,
|
|
11
13
|
SessionLinkParams,
|
|
@@ -21,10 +23,10 @@ export class ToolRouter extends APIResource {
|
|
|
21
23
|
session: SessionAPI.Session = new SessionAPI.Session(this._client);
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
|
-
* Creates a new session for the tool router lab feature. This endpoint
|
|
25
|
-
* a new session with specified toolkits and their authentication
|
|
26
|
-
* The session provides an isolated environment for testing and
|
|
27
|
-
* routing logic with scoped MCP server access.
|
|
26
|
+
* Creates a new session for the tool router lab feature (Legacy). This endpoint
|
|
27
|
+
* initializes a new session with specified toolkits and their authentication
|
|
28
|
+
* configurations. The session provides an isolated environment for testing and
|
|
29
|
+
* managing tool routing logic with scoped MCP server access.
|
|
28
30
|
*
|
|
29
31
|
* @example
|
|
30
32
|
* ```ts
|
|
@@ -127,10 +129,12 @@ export declare namespace ToolRouter {
|
|
|
127
129
|
type SessionCreateResponse as SessionCreateResponse,
|
|
128
130
|
type SessionRetrieveResponse as SessionRetrieveResponse,
|
|
129
131
|
type SessionExecuteResponse as SessionExecuteResponse,
|
|
132
|
+
type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
|
|
130
133
|
type SessionLinkResponse as SessionLinkResponse,
|
|
131
134
|
type SessionToolkitsResponse as SessionToolkitsResponse,
|
|
132
135
|
type SessionCreateParams as SessionCreateParams,
|
|
133
136
|
type SessionExecuteParams as SessionExecuteParams,
|
|
137
|
+
type SessionExecuteMetaParams as SessionExecuteMetaParams,
|
|
134
138
|
type SessionLinkParams as SessionLinkParams,
|
|
135
139
|
type SessionToolkitsParams as SessionToolkitsParams,
|
|
136
140
|
};
|
|
@@ -39,11 +39,8 @@ export class Toolkits extends APIResource {
|
|
|
39
39
|
* purpose when using the toolkit listing endpoint. Categories help organize
|
|
40
40
|
* toolkits into logical groups based on their functionality or industry focus.
|
|
41
41
|
*/
|
|
42
|
-
retrieveCategories(
|
|
43
|
-
|
|
44
|
-
options?: RequestOptions,
|
|
45
|
-
): APIPromise<ToolkitRetrieveCategoriesResponse> {
|
|
46
|
-
return this._client.get('/api/v3/toolkits/categories', { query, ...options });
|
|
42
|
+
retrieveCategories(options?: RequestOptions): APIPromise<ToolkitRetrieveCategoriesResponse> {
|
|
43
|
+
return this._client.get('/api/v3/toolkits/categories', options);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
46
|
|
|
@@ -358,7 +355,7 @@ export namespace ToolkitListResponse {
|
|
|
358
355
|
*/
|
|
359
356
|
export interface Item {
|
|
360
357
|
/**
|
|
361
|
-
* Deprecated toolkit ID
|
|
358
|
+
* @deprecated Deprecated toolkit ID
|
|
362
359
|
*/
|
|
363
360
|
deprecated: Item.Deprecated;
|
|
364
361
|
|
|
@@ -401,7 +398,7 @@ export namespace ToolkitListResponse {
|
|
|
401
398
|
|
|
402
399
|
export namespace Item {
|
|
403
400
|
/**
|
|
404
|
-
* Deprecated toolkit ID
|
|
401
|
+
* @deprecated Deprecated toolkit ID
|
|
405
402
|
*/
|
|
406
403
|
export interface Deprecated {
|
|
407
404
|
toolkitId: string;
|
|
@@ -544,13 +541,6 @@ export interface ToolkitListParams {
|
|
|
544
541
|
sort_by?: 'usage' | 'alphabetically';
|
|
545
542
|
}
|
|
546
543
|
|
|
547
|
-
export interface ToolkitRetrieveCategoriesParams {
|
|
548
|
-
/**
|
|
549
|
-
* Cache control parameter
|
|
550
|
-
*/
|
|
551
|
-
cache?: string;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
544
|
export declare namespace Toolkits {
|
|
555
545
|
export {
|
|
556
546
|
type ToolkitRetrieveResponse as ToolkitRetrieveResponse,
|
|
@@ -558,6 +548,5 @@ export declare namespace Toolkits {
|
|
|
558
548
|
type ToolkitRetrieveCategoriesResponse as ToolkitRetrieveCategoriesResponse,
|
|
559
549
|
type ToolkitRetrieveParams as ToolkitRetrieveParams,
|
|
560
550
|
type ToolkitListParams as ToolkitListParams,
|
|
561
|
-
type ToolkitRetrieveCategoriesParams as ToolkitRetrieveCategoriesParams,
|
|
562
551
|
};
|
|
563
552
|
}
|