@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
|
@@ -43,7 +43,20 @@ export declare class Session extends APIResource {
|
|
|
43
43
|
* );
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
execute(sessionID: string,
|
|
46
|
+
execute(sessionID: string, body: SessionExecuteParams, options?: RequestOptions): APIPromise<SessionExecuteResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const response =
|
|
53
|
+
* await client.toolRouter.session.executeMeta(
|
|
54
|
+
* 'trs_LX9uJKBinWWr',
|
|
55
|
+
* { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
executeMeta(sessionID: string, body: SessionExecuteMetaParams, options?: RequestOptions): APIPromise<SessionExecuteMetaResponse>;
|
|
47
60
|
/**
|
|
48
61
|
* Initiates an authentication link session for a specific toolkit within a tool
|
|
49
62
|
* router session. Returns a link token and redirect URL that users can use to
|
|
@@ -109,52 +122,49 @@ export declare namespace SessionCreateResponse {
|
|
|
109
122
|
[key: string]: string;
|
|
110
123
|
};
|
|
111
124
|
/**
|
|
112
|
-
*
|
|
125
|
+
* Manage connections configuration
|
|
113
126
|
*/
|
|
114
|
-
|
|
127
|
+
manage_connections?: Config.ManageConnections;
|
|
115
128
|
/**
|
|
116
|
-
*
|
|
129
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
130
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
131
|
+
* idempotentHint: tool may interact with external entities.
|
|
117
132
|
*/
|
|
118
|
-
|
|
133
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
119
134
|
/**
|
|
120
135
|
* Toolkit configuration - either enabled list or disabled list
|
|
121
136
|
*/
|
|
122
137
|
toolkits?: Config.Enabled | Config.Disabled;
|
|
123
138
|
/**
|
|
124
|
-
*
|
|
139
|
+
* Tool-level configuration per toolkit
|
|
125
140
|
*/
|
|
126
|
-
tools?:
|
|
141
|
+
tools?: {
|
|
142
|
+
[key: string]: Config.Enabled | Config.Disabled | Config.Tags;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Workbench configuration
|
|
146
|
+
*/
|
|
147
|
+
workbench?: Config.Workbench;
|
|
127
148
|
}
|
|
128
149
|
namespace Config {
|
|
129
150
|
/**
|
|
130
|
-
*
|
|
151
|
+
* Manage connections configuration
|
|
131
152
|
*/
|
|
132
|
-
interface
|
|
133
|
-
/**
|
|
134
|
-
* Whether to enable the connection manager for automatic connection handling
|
|
135
|
-
*/
|
|
136
|
-
auto_manage_connections?: boolean;
|
|
153
|
+
interface ManageConnections {
|
|
137
154
|
/**
|
|
138
155
|
* Custom callback URL for connected account auth flows
|
|
139
156
|
*/
|
|
140
157
|
callback_url?: string;
|
|
141
158
|
/**
|
|
142
|
-
* Whether to
|
|
159
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
143
160
|
*/
|
|
144
|
-
|
|
161
|
+
enabled?: boolean;
|
|
145
162
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
interface
|
|
150
|
-
|
|
151
|
-
* Whether to allow proxy execute calls in the workbench
|
|
152
|
-
*/
|
|
153
|
-
proxy_execution_enabled?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* Maximum execution time for workbench operations in seconds
|
|
156
|
-
*/
|
|
157
|
-
timeout_seconds?: number;
|
|
163
|
+
interface Enabled {
|
|
164
|
+
enabled: Array<string>;
|
|
165
|
+
}
|
|
166
|
+
interface Disabled {
|
|
167
|
+
disabled: Array<string>;
|
|
158
168
|
}
|
|
159
169
|
interface Enabled {
|
|
160
170
|
enabled: Array<string>;
|
|
@@ -162,52 +172,22 @@ export declare namespace SessionCreateResponse {
|
|
|
162
172
|
interface Disabled {
|
|
163
173
|
disabled: Array<string>;
|
|
164
174
|
}
|
|
175
|
+
interface Tags {
|
|
176
|
+
tags: Array<string>;
|
|
177
|
+
}
|
|
165
178
|
/**
|
|
166
|
-
*
|
|
179
|
+
* Workbench configuration
|
|
167
180
|
*/
|
|
168
|
-
interface
|
|
169
|
-
/**
|
|
170
|
-
* Tool filtering configuration
|
|
171
|
-
*/
|
|
172
|
-
filters?: Tools.Filters;
|
|
181
|
+
interface Workbench {
|
|
173
182
|
/**
|
|
174
|
-
*
|
|
183
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
184
|
+
* workbench. Default is 20k.
|
|
175
185
|
*/
|
|
176
|
-
|
|
177
|
-
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
namespace Tools {
|
|
186
|
+
auto_offload_threshold?: number;
|
|
181
187
|
/**
|
|
182
|
-
*
|
|
188
|
+
* Whether proxy execution is enabled in the workbench
|
|
183
189
|
*/
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Filter tools by specific tags
|
|
187
|
-
*/
|
|
188
|
-
tags?: Filters.Tags;
|
|
189
|
-
}
|
|
190
|
-
namespace Filters {
|
|
191
|
-
/**
|
|
192
|
-
* Filter tools by specific tags
|
|
193
|
-
*/
|
|
194
|
-
interface Tags {
|
|
195
|
-
/**
|
|
196
|
-
* Exclude tools that have these tags
|
|
197
|
-
*/
|
|
198
|
-
exclude?: Array<string>;
|
|
199
|
-
/**
|
|
200
|
-
* Only include tools that have these tags
|
|
201
|
-
*/
|
|
202
|
-
include?: Array<string>;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
interface Enabled {
|
|
206
|
-
enabled: Array<string>;
|
|
207
|
-
}
|
|
208
|
-
interface Disabled {
|
|
209
|
-
disabled: Array<string>;
|
|
210
|
-
}
|
|
190
|
+
proxy_execution_enabled?: boolean;
|
|
211
191
|
}
|
|
212
192
|
}
|
|
213
193
|
interface Mcp {
|
|
@@ -258,52 +238,49 @@ export declare namespace SessionRetrieveResponse {
|
|
|
258
238
|
[key: string]: string;
|
|
259
239
|
};
|
|
260
240
|
/**
|
|
261
|
-
*
|
|
241
|
+
* Manage connections configuration
|
|
262
242
|
*/
|
|
263
|
-
|
|
243
|
+
manage_connections?: Config.ManageConnections;
|
|
264
244
|
/**
|
|
265
|
-
*
|
|
245
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
246
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
247
|
+
* idempotentHint: tool may interact with external entities.
|
|
266
248
|
*/
|
|
267
|
-
|
|
249
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
268
250
|
/**
|
|
269
251
|
* Toolkit configuration - either enabled list or disabled list
|
|
270
252
|
*/
|
|
271
253
|
toolkits?: Config.Enabled | Config.Disabled;
|
|
272
254
|
/**
|
|
273
|
-
*
|
|
255
|
+
* Tool-level configuration per toolkit
|
|
274
256
|
*/
|
|
275
|
-
tools?:
|
|
257
|
+
tools?: {
|
|
258
|
+
[key: string]: Config.Enabled | Config.Disabled | Config.Tags;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Workbench configuration
|
|
262
|
+
*/
|
|
263
|
+
workbench?: Config.Workbench;
|
|
276
264
|
}
|
|
277
265
|
namespace Config {
|
|
278
266
|
/**
|
|
279
|
-
*
|
|
267
|
+
* Manage connections configuration
|
|
280
268
|
*/
|
|
281
|
-
interface
|
|
282
|
-
/**
|
|
283
|
-
* Whether to enable the connection manager for automatic connection handling
|
|
284
|
-
*/
|
|
285
|
-
auto_manage_connections?: boolean;
|
|
269
|
+
interface ManageConnections {
|
|
286
270
|
/**
|
|
287
271
|
* Custom callback URL for connected account auth flows
|
|
288
272
|
*/
|
|
289
273
|
callback_url?: string;
|
|
290
274
|
/**
|
|
291
|
-
* Whether to
|
|
275
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
292
276
|
*/
|
|
293
|
-
|
|
277
|
+
enabled?: boolean;
|
|
294
278
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
interface
|
|
299
|
-
|
|
300
|
-
* Whether to allow proxy execute calls in the workbench
|
|
301
|
-
*/
|
|
302
|
-
proxy_execution_enabled?: boolean;
|
|
303
|
-
/**
|
|
304
|
-
* Maximum execution time for workbench operations in seconds
|
|
305
|
-
*/
|
|
306
|
-
timeout_seconds?: number;
|
|
279
|
+
interface Enabled {
|
|
280
|
+
enabled: Array<string>;
|
|
281
|
+
}
|
|
282
|
+
interface Disabled {
|
|
283
|
+
disabled: Array<string>;
|
|
307
284
|
}
|
|
308
285
|
interface Enabled {
|
|
309
286
|
enabled: Array<string>;
|
|
@@ -311,52 +288,22 @@ export declare namespace SessionRetrieveResponse {
|
|
|
311
288
|
interface Disabled {
|
|
312
289
|
disabled: Array<string>;
|
|
313
290
|
}
|
|
291
|
+
interface Tags {
|
|
292
|
+
tags: Array<string>;
|
|
293
|
+
}
|
|
314
294
|
/**
|
|
315
|
-
*
|
|
295
|
+
* Workbench configuration
|
|
316
296
|
*/
|
|
317
|
-
interface
|
|
297
|
+
interface Workbench {
|
|
318
298
|
/**
|
|
319
|
-
*
|
|
299
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
300
|
+
* workbench. Default is 20k.
|
|
320
301
|
*/
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Tool-level overrides per toolkit
|
|
324
|
-
*/
|
|
325
|
-
overrides?: {
|
|
326
|
-
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
namespace Tools {
|
|
302
|
+
auto_offload_threshold?: number;
|
|
330
303
|
/**
|
|
331
|
-
*
|
|
304
|
+
* Whether proxy execution is enabled in the workbench
|
|
332
305
|
*/
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Filter tools by specific tags
|
|
336
|
-
*/
|
|
337
|
-
tags?: Filters.Tags;
|
|
338
|
-
}
|
|
339
|
-
namespace Filters {
|
|
340
|
-
/**
|
|
341
|
-
* Filter tools by specific tags
|
|
342
|
-
*/
|
|
343
|
-
interface Tags {
|
|
344
|
-
/**
|
|
345
|
-
* Exclude tools that have these tags
|
|
346
|
-
*/
|
|
347
|
-
exclude?: Array<string>;
|
|
348
|
-
/**
|
|
349
|
-
* Only include tools that have these tags
|
|
350
|
-
*/
|
|
351
|
-
include?: Array<string>;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
interface Enabled {
|
|
355
|
-
enabled: Array<string>;
|
|
356
|
-
}
|
|
357
|
-
interface Disabled {
|
|
358
|
-
disabled: Array<string>;
|
|
359
|
-
}
|
|
306
|
+
proxy_execution_enabled?: boolean;
|
|
360
307
|
}
|
|
361
308
|
}
|
|
362
309
|
interface Mcp {
|
|
@@ -386,6 +333,22 @@ export interface SessionExecuteResponse {
|
|
|
386
333
|
*/
|
|
387
334
|
log_id: string;
|
|
388
335
|
}
|
|
336
|
+
export interface SessionExecuteMetaResponse {
|
|
337
|
+
/**
|
|
338
|
+
* The data returned by the tool execution
|
|
339
|
+
*/
|
|
340
|
+
data: {
|
|
341
|
+
[key: string]: unknown;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Error message if the execution failed, null otherwise
|
|
345
|
+
*/
|
|
346
|
+
error: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* Unique identifier for the execution log
|
|
349
|
+
*/
|
|
350
|
+
log_id: string;
|
|
351
|
+
}
|
|
389
352
|
export interface SessionLinkResponse {
|
|
390
353
|
/**
|
|
391
354
|
* The unique identifier for the connected account
|
|
@@ -522,61 +485,49 @@ export interface SessionCreateParams {
|
|
|
522
485
|
/**
|
|
523
486
|
* Configuration for connection management settings
|
|
524
487
|
*/
|
|
525
|
-
|
|
488
|
+
manage_connections?: SessionCreateParams.ManageConnections;
|
|
526
489
|
/**
|
|
527
|
-
*
|
|
528
|
-
*
|
|
490
|
+
* Global MCP tool annotation hints for filtering. readOnlyHint: tool does not
|
|
491
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
492
|
+
* idempotentHint: repeated calls with same args have no additional effect.
|
|
493
|
+
* Toolkit-level tags override this. Toolkit enabled/disabled lists take precedence
|
|
494
|
+
* over tag filtering.
|
|
529
495
|
*/
|
|
530
|
-
|
|
496
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
531
497
|
/**
|
|
532
498
|
* Toolkit configuration - specify either enabled toolkits (allowlist) or disabled
|
|
533
499
|
* toolkits (denylist). Mutually exclusive.
|
|
534
500
|
*/
|
|
535
501
|
toolkits?: SessionCreateParams.Enabled | SessionCreateParams.Disabled;
|
|
536
502
|
/**
|
|
537
|
-
*
|
|
503
|
+
* Tool-level configuration per toolkit - either specify enabled tools (whitelist),
|
|
504
|
+
* disabled tools (blacklist), or filter by MCP tags for each toolkit
|
|
538
505
|
*/
|
|
539
|
-
tools?:
|
|
506
|
+
tools?: {
|
|
507
|
+
[key: string]: SessionCreateParams.Enabled | SessionCreateParams.Disabled | SessionCreateParams.Tags;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* Configuration for workbench behavior
|
|
511
|
+
*/
|
|
512
|
+
workbench?: SessionCreateParams.Workbench;
|
|
540
513
|
}
|
|
541
514
|
export declare namespace SessionCreateParams {
|
|
542
515
|
/**
|
|
543
516
|
* Configuration for connection management settings
|
|
544
517
|
*/
|
|
545
|
-
interface
|
|
546
|
-
/**
|
|
547
|
-
* Whether to enable the connection manager for automatic connection handling. If
|
|
548
|
-
* true, we will provide a tool your agent can use to initiate connections to
|
|
549
|
-
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
550
|
-
* connections manually.
|
|
551
|
-
*/
|
|
552
|
-
auto_manage_connections?: boolean | null;
|
|
518
|
+
interface ManageConnections {
|
|
553
519
|
/**
|
|
554
520
|
* The URL to redirect to after a user completes authentication for a connected
|
|
555
521
|
* account. This allows you to handle the auth callback in your own application.
|
|
556
522
|
*/
|
|
557
523
|
callback_url?: string;
|
|
558
524
|
/**
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
|
|
563
|
-
infer_scopes_from_tools?: boolean | null;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Configuration for workbench behavior including security restrictions and
|
|
567
|
-
* execution limits
|
|
568
|
-
*/
|
|
569
|
-
interface Execution {
|
|
570
|
-
/**
|
|
571
|
-
* Whether to allow proxy execute calls in the workbench. If false, prevents
|
|
572
|
-
* arbitrary HTTP requests and destructive actions.
|
|
573
|
-
*/
|
|
574
|
-
proxy_execution_enabled?: boolean | null;
|
|
575
|
-
/**
|
|
576
|
-
* Maximum allowed execution time for workbench operations in seconds. If not
|
|
577
|
-
* specified, uses the default timeout.
|
|
525
|
+
* Whether to enable the connection manager for automatic connection handling. If
|
|
526
|
+
* true, we will provide a tool your agent can use to initiate connections to
|
|
527
|
+
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
528
|
+
* connections manually.
|
|
578
529
|
*/
|
|
579
|
-
|
|
530
|
+
enabled?: boolean | null;
|
|
580
531
|
}
|
|
581
532
|
/**
|
|
582
533
|
* Enable only specific toolkits (allowlist)
|
|
@@ -596,83 +547,65 @@ export declare namespace SessionCreateParams {
|
|
|
596
547
|
*/
|
|
597
548
|
disabled: Array<string>;
|
|
598
549
|
}
|
|
599
|
-
|
|
600
|
-
* Configuration for tool overrides and filtering
|
|
601
|
-
*/
|
|
602
|
-
interface Tools {
|
|
550
|
+
interface Enabled {
|
|
603
551
|
/**
|
|
604
|
-
*
|
|
552
|
+
* Only these specific tools will be available for this toolkit
|
|
605
553
|
*/
|
|
606
|
-
|
|
554
|
+
enabled: Array<string>;
|
|
555
|
+
}
|
|
556
|
+
interface Disabled {
|
|
607
557
|
/**
|
|
608
|
-
*
|
|
609
|
-
* disabled tools (blacklist) for each toolkit
|
|
558
|
+
* These specific tools will be disabled for this toolkit
|
|
610
559
|
*/
|
|
611
|
-
|
|
612
|
-
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
613
|
-
};
|
|
560
|
+
disabled: Array<string>;
|
|
614
561
|
}
|
|
615
|
-
|
|
562
|
+
interface Tags {
|
|
616
563
|
/**
|
|
617
|
-
*
|
|
564
|
+
* MCP tags to filter tools for this toolkit. Only tools with these tags will be
|
|
565
|
+
* available.
|
|
618
566
|
*/
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
* filtered out.
|
|
637
|
-
*/
|
|
638
|
-
exclude?: Array<string>;
|
|
639
|
-
/**
|
|
640
|
-
* Only include tools that have these tags. Tools must have at least one of these
|
|
641
|
-
* tags to be included.
|
|
642
|
-
*/
|
|
643
|
-
include?: Array<string>;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
interface Enabled {
|
|
647
|
-
/**
|
|
648
|
-
* Only these specific tools will be available for this toolkit
|
|
649
|
-
*/
|
|
650
|
-
enabled: Array<string>;
|
|
651
|
-
}
|
|
652
|
-
interface Disabled {
|
|
653
|
-
/**
|
|
654
|
-
* These specific tools will be disabled for this toolkit
|
|
655
|
-
*/
|
|
656
|
-
disabled: Array<string>;
|
|
657
|
-
}
|
|
567
|
+
tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Configuration for workbench behavior
|
|
571
|
+
*/
|
|
572
|
+
interface Workbench {
|
|
573
|
+
/**
|
|
574
|
+
* Character threshold for automatic offloading. When workbench response exceeds
|
|
575
|
+
* this threshold, it will be automatically offloaded. Default is picked
|
|
576
|
+
* automatically based on the response size.
|
|
577
|
+
*/
|
|
578
|
+
auto_offload_threshold?: number;
|
|
579
|
+
/**
|
|
580
|
+
* Whether proxy execution is enabled. When enabled, workbench can call URLs and
|
|
581
|
+
* APIs directly.
|
|
582
|
+
*/
|
|
583
|
+
proxy_execution_enabled?: boolean;
|
|
658
584
|
}
|
|
659
585
|
}
|
|
660
586
|
export interface SessionExecuteParams {
|
|
661
587
|
/**
|
|
662
|
-
*
|
|
588
|
+
* The unique slug identifier of the tool to execute
|
|
663
589
|
*/
|
|
664
590
|
tool_slug: string;
|
|
665
591
|
/**
|
|
666
|
-
*
|
|
592
|
+
* The arguments required by the tool
|
|
667
593
|
*/
|
|
668
594
|
arguments?: {
|
|
669
595
|
[key: string]: unknown;
|
|
670
596
|
};
|
|
597
|
+
}
|
|
598
|
+
export interface SessionExecuteMetaParams {
|
|
671
599
|
/**
|
|
672
|
-
*
|
|
673
|
-
* Alternative to x-api-key for internal tool router endpoints.
|
|
600
|
+
* The unique slug identifier of the meta tool to execute
|
|
674
601
|
*/
|
|
675
|
-
|
|
602
|
+
slug: string;
|
|
603
|
+
/**
|
|
604
|
+
* The arguments required by the meta tool
|
|
605
|
+
*/
|
|
606
|
+
arguments?: {
|
|
607
|
+
[key: string]: unknown;
|
|
608
|
+
};
|
|
676
609
|
}
|
|
677
610
|
export interface SessionLinkParams {
|
|
678
611
|
/**
|
|
@@ -708,6 +641,6 @@ export interface SessionToolkitsParams {
|
|
|
708
641
|
toolkits?: Array<string> | null;
|
|
709
642
|
}
|
|
710
643
|
export declare namespace Session {
|
|
711
|
-
export { type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionLinkResponse as SessionLinkResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionLinkParams as SessionLinkParams, type SessionToolkitsParams as SessionToolkitsParams, };
|
|
644
|
+
export { type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionExecuteMetaResponse as SessionExecuteMetaResponse, type SessionLinkResponse as SessionLinkResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionExecuteMetaParams as SessionExecuteMetaParams, type SessionLinkParams as SessionLinkParams, type SessionToolkitsParams as SessionToolkitsParams, };
|
|
712
645
|
}
|
|
713
646
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;;;;;;;;;OAWG;IACH,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAOzC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU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,OAAO,CAAA;KAAE,CAAC;CACxC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Session = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
-
const headers_1 = require("../../internal/headers.js");
|
|
7
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
7
|
class Session extends resource_1.APIResource {
|
|
9
8
|
/**
|
|
@@ -51,15 +50,25 @@ class Session extends resource_1.APIResource {
|
|
|
51
50
|
* );
|
|
52
51
|
* ```
|
|
53
52
|
*/
|
|
54
|
-
execute(sessionID,
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
execute(sessionID, body, options) {
|
|
54
|
+
return this._client.post((0, path_1.path) `/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response =
|
|
62
|
+
* await client.toolRouter.session.executeMeta(
|
|
63
|
+
* 'trs_LX9uJKBinWWr',
|
|
64
|
+
* { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
executeMeta(sessionID, body, options) {
|
|
69
|
+
return this._client.post((0, path_1.path) `/api/v3/tool_router/session/${sessionID}/execute_meta`, {
|
|
57
70
|
body,
|
|
58
71
|
...options,
|
|
59
|
-
headers: (0, headers_1.buildHeaders)([
|
|
60
|
-
{ ...(xSessionAccessKey != null ? { 'x-session-access-key': xSessionAccessKey } : undefined) },
|
|
61
|
-
options?.headers,
|
|
62
|
-
]),
|
|
63
72
|
});
|
|
64
73
|
}
|
|
65
74
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/resources/tool-router/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,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