@composio/client 0.1.0-alpha.39 → 0.1.0-alpha.41
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 +21 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +41 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +41 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +2656 -964
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +2656 -964
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/files.d.mts +30 -0
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +30 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/link.d.mts +410 -1
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +410 -1
- package/resources/link.d.ts.map +1 -1
- package/resources/mcp/custom.d.mts +9 -6
- package/resources/mcp/custom.d.mts.map +1 -1
- package/resources/mcp/custom.d.ts +9 -6
- package/resources/mcp/custom.d.ts.map +1 -1
- package/resources/mcp/mcp.d.mts +2 -4
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +2 -4
- 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 +3 -0
- package/resources/tool-router/index.d.mts.map +1 -0
- package/resources/tool-router/index.d.ts +3 -0
- package/resources/tool-router/index.d.ts.map +1 -0
- package/resources/tool-router/index.js +9 -0
- package/resources/tool-router/index.js.map +1 -0
- package/resources/tool-router/index.mjs +4 -0
- package/resources/tool-router/index.mjs.map +1 -0
- package/resources/tool-router/session.d.mts +708 -0
- package/resources/tool-router/session.d.mts.map +1 -0
- package/resources/tool-router/session.d.ts +708 -0
- package/resources/tool-router/session.d.ts.map +1 -0
- package/resources/tool-router/session.js +98 -0
- package/resources/tool-router/session.js.map +1 -0
- package/resources/tool-router/session.mjs +94 -0
- package/resources/tool-router/session.mjs.map +1 -0
- package/resources/tool-router/tool-router.d.mts +91 -0
- package/resources/tool-router/tool-router.d.mts.map +1 -0
- package/resources/tool-router/tool-router.d.ts +91 -0
- package/resources/tool-router/tool-router.d.ts.map +1 -0
- package/resources/tool-router/tool-router.js +46 -0
- package/resources/tool-router/tool-router.js.map +1 -0
- package/resources/tool-router/tool-router.mjs +41 -0
- package/resources/tool-router/tool-router.mjs.map +1 -0
- package/resources/tool-router.d.mts +1 -86
- package/resources/tool-router.d.mts.map +1 -1
- package/resources/tool-router.d.ts +1 -86
- package/resources/tool-router.d.ts.map +1 -1
- package/resources/tool-router.js +2 -34
- package/resources/tool-router.js.map +1 -1
- package/resources/tool-router.mjs +1 -32
- package/resources/tool-router.mjs.map +1 -1
- package/resources/toolkits.d.mts +9 -9
- package/resources/toolkits.d.ts +9 -9
- package/resources/toolkits.js +9 -9
- package/resources/toolkits.mjs +9 -9
- package/resources/tools.d.mts +161 -45
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +161 -45
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +3 -3
- package/resources/tools.mjs +3 -3
- package/resources/trigger-instances/manage.d.mts +17 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -1
- package/resources/trigger-instances/manage.d.ts +17 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -1
- package/resources/trigger-instances/manage.js +17 -0
- package/resources/trigger-instances/manage.js.map +1 -1
- package/resources/trigger-instances/manage.mjs +17 -0
- package/resources/trigger-instances/manage.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +25 -0
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +25 -0
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +14 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +14 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +1 -5
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +1 -5
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +1 -1
- package/resources/triggers-types.mjs +1 -1
- package/src/client.ts +5 -5
- package/src/resources/auth-configs.ts +43 -3
- package/src/resources/connected-accounts.ts +4657 -1579
- package/src/resources/files.ts +36 -0
- package/src/resources/index.ts +1 -1
- package/src/resources/link.ts +741 -1
- package/src/resources/mcp/custom.ts +10 -6
- package/src/resources/mcp/mcp.ts +2 -4
- package/src/resources/tool-router/index.ts +19 -0
- package/src/resources/tool-router/session.ts +858 -0
- package/src/resources/tool-router/tool-router.ts +137 -0
- package/src/resources/tool-router.ts +1 -105
- package/src/resources/toolkits.ts +9 -9
- package/src/resources/tools.ts +237 -45
- package/src/resources/trigger-instances/manage.ts +17 -0
- package/src/resources/trigger-instances/trigger-instances.ts +25 -0
- package/src/resources/triggers-types.ts +1 -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
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Session extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new session for the tool router feature. This endpoint initializes a
|
|
7
|
+
* new session with specified toolkits and their authentication configurations. The
|
|
8
|
+
* session provides an isolated environment for testing and managing tool routing
|
|
9
|
+
* logic with scoped MCP server access.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const session = await client.toolRouter.session.create({
|
|
14
|
+
* user_id: 'user_123456789',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(body: SessionCreateParams, options?: RequestOptions): APIPromise<SessionCreateResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves an existing tool router session by its ID. Returns the session
|
|
21
|
+
* configuration, MCP server URL, and available tools.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const session = await client.toolRouter.session.retrieve(
|
|
26
|
+
* 'trs_123456789',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Executes a specific tool within a tool router session. The toolkit is
|
|
33
|
+
* automatically inferred from the tool slug. The tool must belong to an allowed
|
|
34
|
+
* toolkit and must not be disabled in the session configuration. This endpoint
|
|
35
|
+
* validates permissions, resolves connected accounts, and executes the tool with
|
|
36
|
+
* the session context.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const response = await client.toolRouter.session.execute(
|
|
41
|
+
* 'trs_LX9uJKBinWWr',
|
|
42
|
+
* { tool_slug: 'GITHUB_CREATE_ISSUE' },
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
execute(sessionID: string, params: SessionExecuteParams, options?: RequestOptions): APIPromise<SessionExecuteResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Initiates an authentication link session for a specific toolkit within a tool
|
|
49
|
+
* router session. Returns a link token and redirect URL that users can use to
|
|
50
|
+
* complete the OAuth flow.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const response = await client.toolRouter.session.link(
|
|
55
|
+
* 'trs_LX9uJKBinWWr',
|
|
56
|
+
* { toolkit: 'github' },
|
|
57
|
+
* );
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
link(sessionID: string, body: SessionLinkParams, options?: RequestOptions): APIPromise<SessionLinkResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a cursor-paginated list of toolkits available in the tool router
|
|
63
|
+
* session. Includes toolkit metadata, composio-managed auth schemes, and connected
|
|
64
|
+
* accounts if available. Optionally filter by specific toolkit slugs.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const response = await client.toolRouter.session.toolkits(
|
|
69
|
+
* 'trs_123456789',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
toolkits(sessionID: string, query?: SessionToolkitsParams | null | undefined, options?: RequestOptions): APIPromise<SessionToolkitsResponse>;
|
|
74
|
+
}
|
|
75
|
+
export interface SessionCreateResponse {
|
|
76
|
+
/**
|
|
77
|
+
* The session configuration including user, toolkits, and overrides
|
|
78
|
+
*/
|
|
79
|
+
config: SessionCreateResponse.Config;
|
|
80
|
+
mcp: SessionCreateResponse.Mcp;
|
|
81
|
+
/**
|
|
82
|
+
* The identifier of the session
|
|
83
|
+
*/
|
|
84
|
+
session_id: string;
|
|
85
|
+
/**
|
|
86
|
+
* List of available tools in this session
|
|
87
|
+
*/
|
|
88
|
+
tool_router_tools: Array<'COMPOSIO_SEARCH_TOOLS' | 'COMPOSIO_MULTI_EXECUTE_TOOL' | 'COMPOSIO_MANAGE_CONNECTIONS' | 'COMPOSIO_REMOTE_WORKBENCH' | 'COMPOSIO_REMOTE_BASH_TOOL'>;
|
|
89
|
+
}
|
|
90
|
+
export declare namespace SessionCreateResponse {
|
|
91
|
+
/**
|
|
92
|
+
* The session configuration including user, toolkits, and overrides
|
|
93
|
+
*/
|
|
94
|
+
interface Config {
|
|
95
|
+
/**
|
|
96
|
+
* User identifier for this session
|
|
97
|
+
*/
|
|
98
|
+
user_id: string;
|
|
99
|
+
/**
|
|
100
|
+
* Connections configuration
|
|
101
|
+
*/
|
|
102
|
+
connections?: Config.Connections;
|
|
103
|
+
/**
|
|
104
|
+
* Execution configuration
|
|
105
|
+
*/
|
|
106
|
+
execution?: Config.Execution;
|
|
107
|
+
/**
|
|
108
|
+
* Toolkit configuration - either enabled list or disabled list
|
|
109
|
+
*/
|
|
110
|
+
toolkits?: Config.Enabled | Config.Disabled;
|
|
111
|
+
/**
|
|
112
|
+
* Tools configuration
|
|
113
|
+
*/
|
|
114
|
+
tools?: Config.Tools;
|
|
115
|
+
}
|
|
116
|
+
namespace Config {
|
|
117
|
+
/**
|
|
118
|
+
* Connections configuration
|
|
119
|
+
*/
|
|
120
|
+
interface Connections {
|
|
121
|
+
/**
|
|
122
|
+
* Auth config overrides per toolkit
|
|
123
|
+
*/
|
|
124
|
+
auth_config_overrides?: {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
129
|
+
*/
|
|
130
|
+
auto_manage_connections?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Custom callback URI for connected account auth flows
|
|
133
|
+
*/
|
|
134
|
+
callback_uri?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Connected account overrides per toolkit
|
|
137
|
+
*/
|
|
138
|
+
connected_account_overrides?: {
|
|
139
|
+
[key: string]: string;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Whether to auto-infer auth scopes from tools
|
|
143
|
+
*/
|
|
144
|
+
infer_scopes_from_tools?: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Execution configuration
|
|
148
|
+
*/
|
|
149
|
+
interface Execution {
|
|
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;
|
|
158
|
+
}
|
|
159
|
+
interface Enabled {
|
|
160
|
+
enabled: Array<string>;
|
|
161
|
+
}
|
|
162
|
+
interface Disabled {
|
|
163
|
+
disabled: Array<string>;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Tools configuration
|
|
167
|
+
*/
|
|
168
|
+
interface Tools {
|
|
169
|
+
/**
|
|
170
|
+
* Tool filtering configuration
|
|
171
|
+
*/
|
|
172
|
+
filters?: Tools.Filters;
|
|
173
|
+
/**
|
|
174
|
+
* Tool-level overrides per toolkit
|
|
175
|
+
*/
|
|
176
|
+
overrides?: {
|
|
177
|
+
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
namespace Tools {
|
|
181
|
+
/**
|
|
182
|
+
* Tool filtering configuration
|
|
183
|
+
*/
|
|
184
|
+
interface Filters {
|
|
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
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
interface Mcp {
|
|
214
|
+
/**
|
|
215
|
+
* The type of the MCP server. Can be http
|
|
216
|
+
*/
|
|
217
|
+
type: 'HTTP';
|
|
218
|
+
/**
|
|
219
|
+
* The URL of the MCP server
|
|
220
|
+
*/
|
|
221
|
+
url: string;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
export interface SessionRetrieveResponse {
|
|
225
|
+
/**
|
|
226
|
+
* The session configuration including user, toolkits, and overrides
|
|
227
|
+
*/
|
|
228
|
+
config: SessionRetrieveResponse.Config;
|
|
229
|
+
mcp: SessionRetrieveResponse.Mcp;
|
|
230
|
+
/**
|
|
231
|
+
* The identifier of the session
|
|
232
|
+
*/
|
|
233
|
+
session_id: string;
|
|
234
|
+
/**
|
|
235
|
+
* List of available tools in this session
|
|
236
|
+
*/
|
|
237
|
+
tool_router_tools: Array<'COMPOSIO_SEARCH_TOOLS' | 'COMPOSIO_MULTI_EXECUTE_TOOL' | 'COMPOSIO_MANAGE_CONNECTIONS' | 'COMPOSIO_REMOTE_WORKBENCH' | 'COMPOSIO_REMOTE_BASH_TOOL'>;
|
|
238
|
+
}
|
|
239
|
+
export declare namespace SessionRetrieveResponse {
|
|
240
|
+
/**
|
|
241
|
+
* The session configuration including user, toolkits, and overrides
|
|
242
|
+
*/
|
|
243
|
+
interface Config {
|
|
244
|
+
/**
|
|
245
|
+
* User identifier for this session
|
|
246
|
+
*/
|
|
247
|
+
user_id: string;
|
|
248
|
+
/**
|
|
249
|
+
* Connections configuration
|
|
250
|
+
*/
|
|
251
|
+
connections?: Config.Connections;
|
|
252
|
+
/**
|
|
253
|
+
* Execution configuration
|
|
254
|
+
*/
|
|
255
|
+
execution?: Config.Execution;
|
|
256
|
+
/**
|
|
257
|
+
* Toolkit configuration - either enabled list or disabled list
|
|
258
|
+
*/
|
|
259
|
+
toolkits?: Config.Enabled | Config.Disabled;
|
|
260
|
+
/**
|
|
261
|
+
* Tools configuration
|
|
262
|
+
*/
|
|
263
|
+
tools?: Config.Tools;
|
|
264
|
+
}
|
|
265
|
+
namespace Config {
|
|
266
|
+
/**
|
|
267
|
+
* Connections configuration
|
|
268
|
+
*/
|
|
269
|
+
interface Connections {
|
|
270
|
+
/**
|
|
271
|
+
* Auth config overrides per toolkit
|
|
272
|
+
*/
|
|
273
|
+
auth_config_overrides?: {
|
|
274
|
+
[key: string]: string;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
278
|
+
*/
|
|
279
|
+
auto_manage_connections?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Custom callback URI for connected account auth flows
|
|
282
|
+
*/
|
|
283
|
+
callback_uri?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Connected account overrides per toolkit
|
|
286
|
+
*/
|
|
287
|
+
connected_account_overrides?: {
|
|
288
|
+
[key: string]: string;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Whether to auto-infer auth scopes from tools
|
|
292
|
+
*/
|
|
293
|
+
infer_scopes_from_tools?: boolean;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Execution configuration
|
|
297
|
+
*/
|
|
298
|
+
interface Execution {
|
|
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;
|
|
307
|
+
}
|
|
308
|
+
interface Enabled {
|
|
309
|
+
enabled: Array<string>;
|
|
310
|
+
}
|
|
311
|
+
interface Disabled {
|
|
312
|
+
disabled: Array<string>;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Tools configuration
|
|
316
|
+
*/
|
|
317
|
+
interface Tools {
|
|
318
|
+
/**
|
|
319
|
+
* Tool filtering configuration
|
|
320
|
+
*/
|
|
321
|
+
filters?: Tools.Filters;
|
|
322
|
+
/**
|
|
323
|
+
* Tool-level overrides per toolkit
|
|
324
|
+
*/
|
|
325
|
+
overrides?: {
|
|
326
|
+
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
namespace Tools {
|
|
330
|
+
/**
|
|
331
|
+
* Tool filtering configuration
|
|
332
|
+
*/
|
|
333
|
+
interface Filters {
|
|
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
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
interface Mcp {
|
|
363
|
+
/**
|
|
364
|
+
* The type of the MCP server. Can be http
|
|
365
|
+
*/
|
|
366
|
+
type: 'HTTP';
|
|
367
|
+
/**
|
|
368
|
+
* The URL of the MCP server
|
|
369
|
+
*/
|
|
370
|
+
url: string;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
export interface SessionExecuteResponse {
|
|
374
|
+
/**
|
|
375
|
+
* The data returned by the tool execution
|
|
376
|
+
*/
|
|
377
|
+
data: {
|
|
378
|
+
[key: string]: unknown;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Error message if the execution failed, null otherwise
|
|
382
|
+
*/
|
|
383
|
+
error: string | null;
|
|
384
|
+
/**
|
|
385
|
+
* Unique identifier for the execution log
|
|
386
|
+
*/
|
|
387
|
+
log_id: string;
|
|
388
|
+
}
|
|
389
|
+
export interface SessionLinkResponse {
|
|
390
|
+
/**
|
|
391
|
+
* The unique identifier for the connected account
|
|
392
|
+
*/
|
|
393
|
+
connected_account_id: string;
|
|
394
|
+
/**
|
|
395
|
+
* Token used to complete the authentication flow
|
|
396
|
+
*/
|
|
397
|
+
link_token: string;
|
|
398
|
+
/**
|
|
399
|
+
* The URL where users should be redirected to complete OAuth
|
|
400
|
+
*/
|
|
401
|
+
redirect_url: string;
|
|
402
|
+
}
|
|
403
|
+
export interface SessionToolkitsResponse {
|
|
404
|
+
current_page: number;
|
|
405
|
+
items: Array<SessionToolkitsResponse.Item>;
|
|
406
|
+
total_items: number;
|
|
407
|
+
total_pages: number;
|
|
408
|
+
next_cursor?: string | null;
|
|
409
|
+
}
|
|
410
|
+
export declare namespace SessionToolkitsResponse {
|
|
411
|
+
interface Item {
|
|
412
|
+
/**
|
|
413
|
+
* Available Composio-managed auth schemes
|
|
414
|
+
*/
|
|
415
|
+
composio_managed_auth_schemes: Array<string>;
|
|
416
|
+
/**
|
|
417
|
+
* Connected account if available
|
|
418
|
+
*/
|
|
419
|
+
connected_account: Item.ConnectedAccount | null;
|
|
420
|
+
/**
|
|
421
|
+
* Whether the toolkit is enabled
|
|
422
|
+
*/
|
|
423
|
+
enabled: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* Toolkit metadata
|
|
426
|
+
*/
|
|
427
|
+
meta: Item.Meta;
|
|
428
|
+
/**
|
|
429
|
+
* Display name of the toolkit
|
|
430
|
+
*/
|
|
431
|
+
name: string;
|
|
432
|
+
/**
|
|
433
|
+
* Unique slug identifier
|
|
434
|
+
*/
|
|
435
|
+
slug: string;
|
|
436
|
+
}
|
|
437
|
+
namespace Item {
|
|
438
|
+
/**
|
|
439
|
+
* Connected account if available
|
|
440
|
+
*/
|
|
441
|
+
interface ConnectedAccount {
|
|
442
|
+
/**
|
|
443
|
+
* Connected account identifier
|
|
444
|
+
*/
|
|
445
|
+
id: string;
|
|
446
|
+
/**
|
|
447
|
+
* Auth config details
|
|
448
|
+
*/
|
|
449
|
+
auth_config: ConnectedAccount.AuthConfig;
|
|
450
|
+
/**
|
|
451
|
+
* Creation timestamp
|
|
452
|
+
*/
|
|
453
|
+
created_at: string;
|
|
454
|
+
/**
|
|
455
|
+
* Connection status
|
|
456
|
+
*/
|
|
457
|
+
status: string;
|
|
458
|
+
/**
|
|
459
|
+
* Last update timestamp
|
|
460
|
+
*/
|
|
461
|
+
updated_at: string;
|
|
462
|
+
/**
|
|
463
|
+
* User identifier
|
|
464
|
+
*/
|
|
465
|
+
user_id: string;
|
|
466
|
+
}
|
|
467
|
+
namespace ConnectedAccount {
|
|
468
|
+
/**
|
|
469
|
+
* Auth config details
|
|
470
|
+
*/
|
|
471
|
+
interface AuthConfig {
|
|
472
|
+
/**
|
|
473
|
+
* Auth config identifier
|
|
474
|
+
*/
|
|
475
|
+
id: string;
|
|
476
|
+
/**
|
|
477
|
+
* Authentication scheme type
|
|
478
|
+
*/
|
|
479
|
+
auth_scheme: string;
|
|
480
|
+
/**
|
|
481
|
+
* Whether this is a Composio-managed auth config
|
|
482
|
+
*/
|
|
483
|
+
is_composio_managed: boolean;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Toolkit metadata
|
|
488
|
+
*/
|
|
489
|
+
interface Meta {
|
|
490
|
+
/**
|
|
491
|
+
* Description of the toolkit
|
|
492
|
+
*/
|
|
493
|
+
description: string;
|
|
494
|
+
/**
|
|
495
|
+
* URL to the toolkit logo
|
|
496
|
+
*/
|
|
497
|
+
logo: string;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
export interface SessionCreateParams {
|
|
502
|
+
/**
|
|
503
|
+
* The identifier of the user who is initiating the session, ideally a unique
|
|
504
|
+
* identifier from your database like a user ID or email address
|
|
505
|
+
*/
|
|
506
|
+
user_id: string;
|
|
507
|
+
/**
|
|
508
|
+
* Configuration for authentication and connected account management
|
|
509
|
+
*/
|
|
510
|
+
connections?: SessionCreateParams.Connections;
|
|
511
|
+
/**
|
|
512
|
+
* Configuration for workbench behavior including security restrictions and
|
|
513
|
+
* execution limits
|
|
514
|
+
*/
|
|
515
|
+
execution?: SessionCreateParams.Execution;
|
|
516
|
+
/**
|
|
517
|
+
* Toolkit configuration - specify either enabled toolkits (allowlist) or disabled
|
|
518
|
+
* toolkits (denylist). Mutually exclusive.
|
|
519
|
+
*/
|
|
520
|
+
toolkits?: SessionCreateParams.Enabled | SessionCreateParams.Disabled;
|
|
521
|
+
/**
|
|
522
|
+
* Configuration for tool overrides and filtering
|
|
523
|
+
*/
|
|
524
|
+
tools?: SessionCreateParams.Tools;
|
|
525
|
+
}
|
|
526
|
+
export declare namespace SessionCreateParams {
|
|
527
|
+
/**
|
|
528
|
+
* Configuration for authentication and connected account management
|
|
529
|
+
*/
|
|
530
|
+
interface Connections {
|
|
531
|
+
/**
|
|
532
|
+
* The auth configs to use for the session. This will override the default behavior
|
|
533
|
+
* and use the given auth config when specific toolkits are being executed
|
|
534
|
+
*/
|
|
535
|
+
auth_config_overrides?: {
|
|
536
|
+
[key: string]: string;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* Whether to enable the connection manager for automatic connection handling. If
|
|
540
|
+
* true, we will provide a tool your agent can use to initiate connections to
|
|
541
|
+
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
542
|
+
* connections manually.
|
|
543
|
+
*/
|
|
544
|
+
auto_manage_connections?: boolean | null;
|
|
545
|
+
/**
|
|
546
|
+
* The URI to redirect to after a user completes authentication for a connected
|
|
547
|
+
* account. This allows you to handle the auth callback in your own application.
|
|
548
|
+
*/
|
|
549
|
+
callback_uri?: string;
|
|
550
|
+
/**
|
|
551
|
+
* The connected accounts to use for the session. This will override the default
|
|
552
|
+
* behaviour and use the given connected account when specific toolkits are being
|
|
553
|
+
* executed
|
|
554
|
+
*/
|
|
555
|
+
connected_account_overrides?: {
|
|
556
|
+
[key: string]: string;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* If enabled, authentication scopes will be automatically inferred from the
|
|
560
|
+
* specific tools being used in the session. This ensures minimal permissions are
|
|
561
|
+
* requested.
|
|
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.
|
|
578
|
+
*/
|
|
579
|
+
timeout_seconds?: number;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Enable only specific toolkits (allowlist)
|
|
583
|
+
*/
|
|
584
|
+
interface Enabled {
|
|
585
|
+
/**
|
|
586
|
+
* Only these specific toolkits will be enabled
|
|
587
|
+
*/
|
|
588
|
+
enabled: Array<string>;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Disable specific toolkits (denylist)
|
|
592
|
+
*/
|
|
593
|
+
interface Disabled {
|
|
594
|
+
/**
|
|
595
|
+
* These specific toolkits will be disabled
|
|
596
|
+
*/
|
|
597
|
+
disabled: Array<string>;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Configuration for tool overrides and filtering
|
|
601
|
+
*/
|
|
602
|
+
interface Tools {
|
|
603
|
+
/**
|
|
604
|
+
* Configuration for filtering available tools based on tags and characteristics
|
|
605
|
+
*/
|
|
606
|
+
filters?: Tools.Filters;
|
|
607
|
+
/**
|
|
608
|
+
* Tool-level overrides per toolkit - either specify enabled tools (whitelist) or
|
|
609
|
+
* disabled tools (blacklist) for each toolkit
|
|
610
|
+
*/
|
|
611
|
+
overrides?: {
|
|
612
|
+
[key: string]: Tools.Enabled | Tools.Disabled;
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
namespace Tools {
|
|
616
|
+
/**
|
|
617
|
+
* Configuration for filtering available tools based on tags and characteristics
|
|
618
|
+
*/
|
|
619
|
+
interface Filters {
|
|
620
|
+
/**
|
|
621
|
+
* Filter tools by tags such as read_only_hint, non_destructive_hint,
|
|
622
|
+
* open_world_hint, idempotent_hint. Use include to only show tools with specific
|
|
623
|
+
* tags, or exclude to hide tools with specific tags.
|
|
624
|
+
*/
|
|
625
|
+
tags?: Filters.Tags;
|
|
626
|
+
}
|
|
627
|
+
namespace Filters {
|
|
628
|
+
/**
|
|
629
|
+
* Filter tools by tags such as read_only_hint, non_destructive_hint,
|
|
630
|
+
* open_world_hint, idempotent_hint. Use include to only show tools with specific
|
|
631
|
+
* tags, or exclude to hide tools with specific tags.
|
|
632
|
+
*/
|
|
633
|
+
interface Tags {
|
|
634
|
+
/**
|
|
635
|
+
* Exclude tools that have any of these tags. Tools with any of these tags will be
|
|
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
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
export interface SessionExecuteParams {
|
|
661
|
+
/**
|
|
662
|
+
* Body param: The unique slug identifier of the tool to execute
|
|
663
|
+
*/
|
|
664
|
+
tool_slug: string;
|
|
665
|
+
/**
|
|
666
|
+
* Body param: The arguments required by the tool
|
|
667
|
+
*/
|
|
668
|
+
arguments?: {
|
|
669
|
+
[key: string]: unknown;
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* Header param: Session access key for sandbox/workbench authentication.
|
|
673
|
+
* Alternative to x-api-key for internal tool router endpoints.
|
|
674
|
+
*/
|
|
675
|
+
'x-session-access-key'?: string;
|
|
676
|
+
}
|
|
677
|
+
export interface SessionLinkParams {
|
|
678
|
+
/**
|
|
679
|
+
* The unique slug identifier of the toolkit to connect
|
|
680
|
+
*/
|
|
681
|
+
toolkit: string;
|
|
682
|
+
/**
|
|
683
|
+
* URL where users will be redirected after completing auth
|
|
684
|
+
*/
|
|
685
|
+
callback_url?: string;
|
|
686
|
+
}
|
|
687
|
+
export interface SessionToolkitsParams {
|
|
688
|
+
/**
|
|
689
|
+
* Cursor for pagination. The cursor is a base64 encoded string of the page and
|
|
690
|
+
* limit. The page is the page number and the limit is the number of items per
|
|
691
|
+
* page. The cursor is used to paginate through the items. The cursor is not
|
|
692
|
+
* required for the first page.
|
|
693
|
+
*/
|
|
694
|
+
cursor?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Number of items per page, max allowed is 1000
|
|
697
|
+
*/
|
|
698
|
+
limit?: number | null;
|
|
699
|
+
/**
|
|
700
|
+
* Optional comma-separated list of toolkit slugs to filter by. If provided, only
|
|
701
|
+
* these toolkits will be returned, overriding the session configuration.
|
|
702
|
+
*/
|
|
703
|
+
toolkits?: Array<string> | null;
|
|
704
|
+
}
|
|
705
|
+
export declare namespace Session {
|
|
706
|
+
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, };
|
|
707
|
+
}
|
|
708
|
+
//# sourceMappingURL=session.d.ts.map
|