@composio/client 0.1.0-alpha.65 → 0.1.0-alpha.67
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 +33 -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/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 +199 -30
- package/resources/tool-router/session/session.d.mts.map +1 -1
- package/resources/tool-router/session/session.d.ts +199 -30
- package/resources/tool-router/session/session.d.ts.map +1 -1
- package/resources/tool-router/session/session.js +14 -11
- package/resources/tool-router/session/session.js.map +1 -1
- package/resources/tool-router/session/session.mjs +14 -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/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 +222 -30
- 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":"session.js","sourceRoot":"","sources":["../../../src/resources/tool-router/session/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,6DAAoC;AACpC,sCAUiB;AAGjB,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/resources/tool-router/session/session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,6DAAoC;AACpC,sCAUiB;AAGjB,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyM3D,CAAC;IAvMC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,+BAA+B,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CACL,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,+BAA+B,SAAS,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,WAAW,CACT,SA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AAC,IAAA,WAAI,EAAA,+BAA+B,SAAS,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF;AA1MD,0BA0MC;AAmqFD,OAAO,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -34,7 +34,7 @@ export class Session extends APIResource {
|
|
|
34
34
|
* @example
|
|
35
35
|
* ```ts
|
|
36
36
|
* const session = await client.toolRouter.session.retrieve(
|
|
37
|
-
* '
|
|
37
|
+
* 'trs_1a2b3c4d5e6f',
|
|
38
38
|
* );
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
@@ -42,11 +42,12 @@ export class Session extends APIResource {
|
|
|
42
42
|
return this._client.get(path `/api/v3/tool_router/session/${sessionID}`, options);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Executes a specific tool within a tool router session.
|
|
46
|
-
*
|
|
47
|
-
* toolkit
|
|
48
|
-
*
|
|
49
|
-
*
|
|
45
|
+
* Executes a specific tool within a tool router session. This is the primary
|
|
46
|
+
* execution endpoint for both meta tools and app tools exposed by the session. The
|
|
47
|
+
* toolkit is automatically inferred from the tool slug. For app tools, the tool
|
|
48
|
+
* must belong to an allowed toolkit and must not be disabled in the session
|
|
49
|
+
* configuration. The endpoint validates permissions, resolves connected accounts
|
|
50
|
+
* when needed, and executes the tool with the session context.
|
|
50
51
|
*
|
|
51
52
|
* @example
|
|
52
53
|
* ```ts
|
|
@@ -60,7 +61,9 @@ export class Session extends APIResource {
|
|
|
60
61
|
return this._client.post(path `/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
|
|
61
62
|
}
|
|
62
63
|
/**
|
|
63
|
-
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
64
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session. This
|
|
65
|
+
* endpoint is kept for meta-tool compatibility; clients can also use the primary
|
|
66
|
+
* /execute endpoint.
|
|
64
67
|
*
|
|
65
68
|
* @example
|
|
66
69
|
* ```ts
|
|
@@ -149,7 +152,7 @@ export class Session extends APIResource {
|
|
|
149
152
|
* @example
|
|
150
153
|
* ```ts
|
|
151
154
|
* const response = await client.toolRouter.session.toolkits(
|
|
152
|
-
* '
|
|
155
|
+
* 'trs_1a2b3c4d5e6f',
|
|
153
156
|
* );
|
|
154
157
|
* ```
|
|
155
158
|
*/
|
|
@@ -157,9 +160,9 @@ export class Session extends APIResource {
|
|
|
157
160
|
return this._client.get(path `/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
|
|
158
161
|
}
|
|
159
162
|
/**
|
|
160
|
-
* Returns the
|
|
161
|
-
* schemas. This includes
|
|
162
|
-
*
|
|
163
|
+
* Returns the tools available in a tool router session with their complete
|
|
164
|
+
* schemas. This includes both meta tools and any preloaded app tools exposed by
|
|
165
|
+
* the session.
|
|
163
166
|
*
|
|
164
167
|
* @example
|
|
165
168
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.mjs","sourceRoot":"","sources":["../../../src/resources/tool-router/session/session.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EASL,KAAK,GACN;OAGM,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"session.mjs","sourceRoot":"","sources":["../../../src/resources/tool-router/session/session.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EASL,KAAK,GACN;OAGM,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyM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GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,+BAA+B,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,SAAiB,EACjB,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CACH,SAAiB,EACjB,KAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF;AAmqFD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -291,6 +291,18 @@ export class Composio {
|
|
|
291
291
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
292
292
|
this.#encoder = Opts.FallbackEncoder;
|
|
293
293
|
|
|
294
|
+
const customHeadersEnv = readEnv('COMPOSIO_CUSTOM_HEADERS');
|
|
295
|
+
if (customHeadersEnv) {
|
|
296
|
+
const parsed: Record<string, string> = {};
|
|
297
|
+
for (const line of customHeadersEnv.split('\n')) {
|
|
298
|
+
const colon = line.indexOf(':');
|
|
299
|
+
if (colon >= 0) {
|
|
300
|
+
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
304
|
+
}
|
|
305
|
+
|
|
294
306
|
this._options = options;
|
|
295
307
|
|
|
296
308
|
this.apiKey = apiKey;
|
package/src/resources/files.ts
CHANGED
|
@@ -98,7 +98,7 @@ export interface FileCreatePresignedURLResponse {
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Object storage upload location. Example:
|
|
101
|
-
* "projects/
|
|
101
|
+
* "projects/pr_1a2b3c4d5e6f/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
|
|
102
102
|
*/
|
|
103
103
|
key: string;
|
|
104
104
|
|
|
@@ -106,14 +106,14 @@ export interface FileCreatePresignedURLResponse {
|
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Presigned URL for upload. Example:
|
|
109
|
-
* "https://storage.composio.dev/projects/
|
|
109
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
110
110
|
*/
|
|
111
111
|
new_presigned_url: string;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* @deprecated [DEPRECATED] Use new_presigned_url instead. Presigned URL for
|
|
115
115
|
* upload. Example:
|
|
116
|
-
* "https://storage.composio.dev/projects/
|
|
116
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
117
117
|
*/
|
|
118
118
|
newPresignedUrl: string;
|
|
119
119
|
|
|
@@ -17,7 +17,10 @@ export class Generate extends APIResource {
|
|
|
17
17
|
* ```ts
|
|
18
18
|
* const response = await client.mcp.generate.url({
|
|
19
19
|
* mcp_server_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
20
|
-
* connected_account_ids: [
|
|
20
|
+
* connected_account_ids: [
|
|
21
|
+
* 'ca_1a2b3c4d5e6f',
|
|
22
|
+
* 'ca_7g8h9i0j1k2l',
|
|
23
|
+
* ],
|
|
21
24
|
* user_ids: ['user_123456'],
|
|
22
25
|
* });
|
|
23
26
|
* ```
|
|
@@ -18,7 +18,7 @@ export class Files extends APIResource {
|
|
|
18
18
|
* ```ts
|
|
19
19
|
* const files = await client.toolRouter.session.files.list(
|
|
20
20
|
* 'files',
|
|
21
|
-
* { session_id: '
|
|
21
|
+
* { session_id: 'trs_1a2b3c4d5e6f' },
|
|
22
22
|
* );
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
@@ -39,7 +39,7 @@ export class Files extends APIResource {
|
|
|
39
39
|
* const file = await client.toolRouter.session.files.delete(
|
|
40
40
|
* 'files',
|
|
41
41
|
* {
|
|
42
|
-
* session_id: '
|
|
42
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
43
43
|
* mount_relative_path: 'report.pdf',
|
|
44
44
|
* },
|
|
45
45
|
* );
|
|
@@ -67,7 +67,7 @@ export class Files extends APIResource {
|
|
|
67
67
|
* await client.toolRouter.session.files.createDownloadURL(
|
|
68
68
|
* 'files',
|
|
69
69
|
* {
|
|
70
|
-
* session_id: '
|
|
70
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
71
71
|
* mount_relative_path: 'report.pdf',
|
|
72
72
|
* },
|
|
73
73
|
* );
|
|
@@ -95,7 +95,7 @@ export class Files extends APIResource {
|
|
|
95
95
|
* await client.toolRouter.session.files.createUploadURL(
|
|
96
96
|
* 'files',
|
|
97
97
|
* {
|
|
98
|
-
* session_id: '
|
|
98
|
+
* session_id: 'trs_1a2b3c4d5e6f',
|
|
99
99
|
* mount_relative_path: 'report.pdf',
|
|
100
100
|
* },
|
|
101
101
|
* );
|
|
@@ -47,7 +47,7 @@ export class Session extends APIResource {
|
|
|
47
47
|
* @example
|
|
48
48
|
* ```ts
|
|
49
49
|
* const session = await client.toolRouter.session.retrieve(
|
|
50
|
-
* '
|
|
50
|
+
* 'trs_1a2b3c4d5e6f',
|
|
51
51
|
* );
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
@@ -56,11 +56,12 @@ export class Session extends APIResource {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Executes a specific tool within a tool router session.
|
|
60
|
-
*
|
|
61
|
-
* toolkit
|
|
62
|
-
*
|
|
63
|
-
*
|
|
59
|
+
* Executes a specific tool within a tool router session. This is the primary
|
|
60
|
+
* execution endpoint for both meta tools and app tools exposed by the session. The
|
|
61
|
+
* toolkit is automatically inferred from the tool slug. For app tools, the tool
|
|
62
|
+
* must belong to an allowed toolkit and must not be disabled in the session
|
|
63
|
+
* configuration. The endpoint validates permissions, resolves connected accounts
|
|
64
|
+
* when needed, and executes the tool with the session context.
|
|
64
65
|
*
|
|
65
66
|
* @example
|
|
66
67
|
* ```ts
|
|
@@ -79,7 +80,9 @@ export class Session extends APIResource {
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
/**
|
|
82
|
-
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
83
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session. This
|
|
84
|
+
* endpoint is kept for meta-tool compatibility; clients can also use the primary
|
|
85
|
+
* /execute endpoint.
|
|
83
86
|
*
|
|
84
87
|
* @example
|
|
85
88
|
* ```ts
|
|
@@ -188,7 +191,7 @@ export class Session extends APIResource {
|
|
|
188
191
|
* @example
|
|
189
192
|
* ```ts
|
|
190
193
|
* const response = await client.toolRouter.session.toolkits(
|
|
191
|
-
* '
|
|
194
|
+
* 'trs_1a2b3c4d5e6f',
|
|
192
195
|
* );
|
|
193
196
|
* ```
|
|
194
197
|
*/
|
|
@@ -201,9 +204,9 @@ export class Session extends APIResource {
|
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
/**
|
|
204
|
-
* Returns the
|
|
205
|
-
* schemas. This includes
|
|
206
|
-
*
|
|
207
|
+
* Returns the tools available in a tool router session with their complete
|
|
208
|
+
* schemas. This includes both meta tools and any preloaded app tools exposed by
|
|
209
|
+
* the session.
|
|
207
210
|
*
|
|
208
211
|
* @example
|
|
209
212
|
* ```ts
|
|
@@ -227,6 +230,12 @@ export interface SessionCreateResponse {
|
|
|
227
230
|
*/
|
|
228
231
|
config: SessionCreateResponse.Config;
|
|
229
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Monotonic version of the config. Incremented on each PATCH. Use for optimistic
|
|
235
|
+
* concurrency control.
|
|
236
|
+
*/
|
|
237
|
+
config_version: number;
|
|
238
|
+
|
|
230
239
|
mcp: SessionCreateResponse.Mcp;
|
|
231
240
|
|
|
232
241
|
/**
|
|
@@ -244,6 +253,12 @@ export interface SessionCreateResponse {
|
|
|
244
253
|
* session creation, not on GET.
|
|
245
254
|
*/
|
|
246
255
|
experimental?: SessionCreateResponse.Experimental;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Advisory list — session was created, but the listed issues may warrant
|
|
259
|
+
* attention.
|
|
260
|
+
*/
|
|
261
|
+
warnings?: Array<SessionCreateResponse.Warning>;
|
|
247
262
|
}
|
|
248
263
|
|
|
249
264
|
export namespace SessionCreateResponse {
|
|
@@ -251,6 +266,15 @@ export namespace SessionCreateResponse {
|
|
|
251
266
|
* The session configuration including user, toolkits, and overrides
|
|
252
267
|
*/
|
|
253
268
|
export interface Config {
|
|
269
|
+
/**
|
|
270
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
271
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
272
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
273
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
274
|
+
* without a preload config).
|
|
275
|
+
*/
|
|
276
|
+
preload: Config.Preload;
|
|
277
|
+
|
|
254
278
|
/**
|
|
255
279
|
* User identifier for this session
|
|
256
280
|
*/
|
|
@@ -262,7 +286,8 @@ export namespace SessionCreateResponse {
|
|
|
262
286
|
auth_configs?: { [key: string]: string };
|
|
263
287
|
|
|
264
288
|
/**
|
|
265
|
-
* Connected account overrides per toolkit
|
|
289
|
+
* Connected account overrides per toolkit. Each connected account must belong to
|
|
290
|
+
* the same user_id as the session.
|
|
266
291
|
*/
|
|
267
292
|
connected_accounts?: { [key: string]: string };
|
|
268
293
|
|
|
@@ -271,6 +296,11 @@ export namespace SessionCreateResponse {
|
|
|
271
296
|
*/
|
|
272
297
|
manage_connections?: Config.ManageConnections;
|
|
273
298
|
|
|
299
|
+
/**
|
|
300
|
+
* Multi-account configuration for this session.
|
|
301
|
+
*/
|
|
302
|
+
multi_account?: Config.MultiAccount;
|
|
303
|
+
|
|
274
304
|
/**
|
|
275
305
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
276
306
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -295,6 +325,22 @@ export namespace SessionCreateResponse {
|
|
|
295
325
|
}
|
|
296
326
|
|
|
297
327
|
export namespace Config {
|
|
328
|
+
/**
|
|
329
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
330
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
331
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
332
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
333
|
+
* without a preload config).
|
|
334
|
+
*/
|
|
335
|
+
export interface Preload {
|
|
336
|
+
/**
|
|
337
|
+
* Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
|
|
338
|
+
* server tool list, callable directly without going through search. Empty array
|
|
339
|
+
* when no preload was configured.
|
|
340
|
+
*/
|
|
341
|
+
tools: Array<string>;
|
|
342
|
+
}
|
|
343
|
+
|
|
298
344
|
/**
|
|
299
345
|
* Manage connections configuration
|
|
300
346
|
*/
|
|
@@ -321,6 +367,29 @@ export namespace SessionCreateResponse {
|
|
|
321
367
|
enabled?: boolean;
|
|
322
368
|
}
|
|
323
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Multi-account configuration for this session.
|
|
372
|
+
*/
|
|
373
|
+
export interface MultiAccount {
|
|
374
|
+
/**
|
|
375
|
+
* When true, enables multi-account mode for this session. When not set, falls back
|
|
376
|
+
* to org/project-level configuration.
|
|
377
|
+
*/
|
|
378
|
+
enable?: boolean;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
|
|
382
|
+
* multi-account is enabled.
|
|
383
|
+
*/
|
|
384
|
+
max_accounts_per_toolkit?: number;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* When true, require explicit account selection when multiple accounts are
|
|
388
|
+
* connected. When false (default), use the first/default account.
|
|
389
|
+
*/
|
|
390
|
+
require_explicit_selection?: boolean;
|
|
391
|
+
}
|
|
392
|
+
|
|
324
393
|
/**
|
|
325
394
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
326
395
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -392,6 +461,12 @@ export namespace SessionCreateResponse {
|
|
|
392
461
|
* Whether proxy execution is enabled in the workbench
|
|
393
462
|
*/
|
|
394
463
|
proxy_execution_enabled?: boolean;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
467
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
468
|
+
*/
|
|
469
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
395
470
|
}
|
|
396
471
|
}
|
|
397
472
|
|
|
@@ -483,6 +558,19 @@ export namespace SessionCreateResponse {
|
|
|
483
558
|
output_schema?: { [key: string]: unknown };
|
|
484
559
|
}
|
|
485
560
|
}
|
|
561
|
+
|
|
562
|
+
export interface Warning {
|
|
563
|
+
/**
|
|
564
|
+
* Stable machine code identifying the advisory. Safe to switch on in client code.
|
|
565
|
+
*/
|
|
566
|
+
code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Human-readable description of the advisory. Suitable for logging or surfacing to
|
|
570
|
+
* end users.
|
|
571
|
+
*/
|
|
572
|
+
message: string;
|
|
573
|
+
}
|
|
486
574
|
}
|
|
487
575
|
|
|
488
576
|
export interface SessionRetrieveResponse {
|
|
@@ -491,6 +579,12 @@ export interface SessionRetrieveResponse {
|
|
|
491
579
|
*/
|
|
492
580
|
config: SessionRetrieveResponse.Config;
|
|
493
581
|
|
|
582
|
+
/**
|
|
583
|
+
* Monotonic version of the config. Incremented on each PATCH. Use for optimistic
|
|
584
|
+
* concurrency control.
|
|
585
|
+
*/
|
|
586
|
+
config_version: number;
|
|
587
|
+
|
|
494
588
|
mcp: SessionRetrieveResponse.Mcp;
|
|
495
589
|
|
|
496
590
|
/**
|
|
@@ -514,6 +608,15 @@ export namespace SessionRetrieveResponse {
|
|
|
514
608
|
* The session configuration including user, toolkits, and overrides
|
|
515
609
|
*/
|
|
516
610
|
export interface Config {
|
|
611
|
+
/**
|
|
612
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
613
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
614
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
615
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
616
|
+
* without a preload config).
|
|
617
|
+
*/
|
|
618
|
+
preload: Config.Preload;
|
|
619
|
+
|
|
517
620
|
/**
|
|
518
621
|
* User identifier for this session
|
|
519
622
|
*/
|
|
@@ -525,7 +628,8 @@ export namespace SessionRetrieveResponse {
|
|
|
525
628
|
auth_configs?: { [key: string]: string };
|
|
526
629
|
|
|
527
630
|
/**
|
|
528
|
-
* Connected account overrides per toolkit
|
|
631
|
+
* Connected account overrides per toolkit. Each connected account must belong to
|
|
632
|
+
* the same user_id as the session.
|
|
529
633
|
*/
|
|
530
634
|
connected_accounts?: { [key: string]: string };
|
|
531
635
|
|
|
@@ -534,6 +638,11 @@ export namespace SessionRetrieveResponse {
|
|
|
534
638
|
*/
|
|
535
639
|
manage_connections?: Config.ManageConnections;
|
|
536
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Multi-account configuration for this session.
|
|
643
|
+
*/
|
|
644
|
+
multi_account?: Config.MultiAccount;
|
|
645
|
+
|
|
537
646
|
/**
|
|
538
647
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
539
648
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -558,6 +667,22 @@ export namespace SessionRetrieveResponse {
|
|
|
558
667
|
}
|
|
559
668
|
|
|
560
669
|
export namespace Config {
|
|
670
|
+
/**
|
|
671
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
672
|
+
* MCP server tool list, callable directly without going through search. Each
|
|
673
|
+
* preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
|
|
674
|
+
* Always present in the response (empty `tools: []` when the session was created
|
|
675
|
+
* without a preload config).
|
|
676
|
+
*/
|
|
677
|
+
export interface Preload {
|
|
678
|
+
/**
|
|
679
|
+
* Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
|
|
680
|
+
* server tool list, callable directly without going through search. Empty array
|
|
681
|
+
* when no preload was configured.
|
|
682
|
+
*/
|
|
683
|
+
tools: Array<string>;
|
|
684
|
+
}
|
|
685
|
+
|
|
561
686
|
/**
|
|
562
687
|
* Manage connections configuration
|
|
563
688
|
*/
|
|
@@ -584,6 +709,29 @@ export namespace SessionRetrieveResponse {
|
|
|
584
709
|
enabled?: boolean;
|
|
585
710
|
}
|
|
586
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Multi-account configuration for this session.
|
|
714
|
+
*/
|
|
715
|
+
export interface MultiAccount {
|
|
716
|
+
/**
|
|
717
|
+
* When true, enables multi-account mode for this session. When not set, falls back
|
|
718
|
+
* to org/project-level configuration.
|
|
719
|
+
*/
|
|
720
|
+
enable?: boolean;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
|
|
724
|
+
* multi-account is enabled.
|
|
725
|
+
*/
|
|
726
|
+
max_accounts_per_toolkit?: number;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* When true, require explicit account selection when multiple accounts are
|
|
730
|
+
* connected. When false (default), use the first/default account.
|
|
731
|
+
*/
|
|
732
|
+
require_explicit_selection?: boolean;
|
|
733
|
+
}
|
|
734
|
+
|
|
587
735
|
/**
|
|
588
736
|
* MCP tool annotation hints for filtering tools with enabled/disabled support.
|
|
589
737
|
* enabled: tags that the tool must have at least one of. disabled: tags that the
|
|
@@ -655,6 +803,12 @@ export namespace SessionRetrieveResponse {
|
|
|
655
803
|
* Whether proxy execution is enabled in the workbench
|
|
656
804
|
*/
|
|
657
805
|
proxy_execution_enabled?: boolean;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
809
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
810
|
+
*/
|
|
811
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
658
812
|
}
|
|
659
813
|
}
|
|
660
814
|
|
|
@@ -1456,7 +1610,9 @@ export interface SessionCreateParams {
|
|
|
1456
1610
|
/**
|
|
1457
1611
|
* The connected accounts to use for the session. This will override the default
|
|
1458
1612
|
* behaviour and use the given connected account when specific toolkits are being
|
|
1459
|
-
* executed
|
|
1613
|
+
* executed. Each connected account must exist (not deleted or disabled) and belong
|
|
1614
|
+
* to the same `user_id` as the session — otherwise session creation fails with a
|
|
1615
|
+
* clear error explaining which account didn't match.
|
|
1460
1616
|
*/
|
|
1461
1617
|
connected_accounts?: { [key: string]: string };
|
|
1462
1618
|
|
|
@@ -1477,6 +1633,18 @@ export interface SessionCreateParams {
|
|
|
1477
1633
|
*/
|
|
1478
1634
|
multi_account?: SessionCreateParams.MultiAccount;
|
|
1479
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
1638
|
+
* MCP server tool list so the agent can call them directly without going through
|
|
1639
|
+
* search first — useful for frequently used tools. Each slug must be allowed by
|
|
1640
|
+
* the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
|
|
1641
|
+
* fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
|
|
1642
|
+
* can also be preloaded. Not supported when multi-account is enabled. Each
|
|
1643
|
+
* preloaded tool adds to the agent context window, so keep the list at or under
|
|
1644
|
+
* ~20 tools.
|
|
1645
|
+
*/
|
|
1646
|
+
preload?: SessionCreateParams.Preload;
|
|
1647
|
+
|
|
1480
1648
|
/**
|
|
1481
1649
|
* Global MCP tool annotation hints for filtering. Array format is treated as
|
|
1482
1650
|
* enabled list. Object format supports both enabled (tool must have at least one)
|
|
@@ -1494,8 +1662,11 @@ export interface SessionCreateParams {
|
|
|
1494
1662
|
toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
|
|
1495
1663
|
|
|
1496
1664
|
/**
|
|
1497
|
-
* Tool-level configuration per toolkit
|
|
1498
|
-
*
|
|
1665
|
+
* Tool-level configuration per toolkit. Allows you to enable, disable, or filter
|
|
1666
|
+
* by tags for specific tools within each toolkit. Every slug passed in `enable` /
|
|
1667
|
+
* `disable` must be a valid Composio tool slug for that toolkit — invalid or
|
|
1668
|
+
* typo'd slugs fail session creation with a clear error listing which ones didn't
|
|
1669
|
+
* match.
|
|
1499
1670
|
*/
|
|
1500
1671
|
tools?: {
|
|
1501
1672
|
[key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
|
|
@@ -1687,15 +1858,29 @@ export namespace SessionCreateParams {
|
|
|
1687
1858
|
require_explicit_selection?: boolean;
|
|
1688
1859
|
}
|
|
1689
1860
|
|
|
1690
|
-
|
|
1861
|
+
/**
|
|
1862
|
+
* Preload configuration. Controls which tools appear in `session.tools` and the
|
|
1863
|
+
* MCP server tool list so the agent can call them directly without going through
|
|
1864
|
+
* search first — useful for frequently used tools. Each slug must be allowed by
|
|
1865
|
+
* the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
|
|
1866
|
+
* fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
|
|
1867
|
+
* can also be preloaded. Not supported when multi-account is enabled. Each
|
|
1868
|
+
* preloaded tool adds to the agent context window, so keep the list at or under
|
|
1869
|
+
* ~20 tools.
|
|
1870
|
+
*/
|
|
1871
|
+
export interface Preload {
|
|
1691
1872
|
/**
|
|
1692
|
-
*
|
|
1873
|
+
* Tool slugs to preload. Each slug must be allowed by the session filters
|
|
1874
|
+
* (`toolkits`, `tools`, `tags`) and exist either in the Composio tool catalog or
|
|
1875
|
+
* in `custom_tools` / `custom_toolkits` — unknown or blocked slugs return a 400 at
|
|
1876
|
+
* session creation.
|
|
1693
1877
|
*/
|
|
1878
|
+
tools?: Array<string>;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
export interface UnionMember1 {
|
|
1694
1882
|
disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1695
1883
|
|
|
1696
|
-
/**
|
|
1697
|
-
* Tags that the tool must have at least one of
|
|
1698
|
-
*/
|
|
1699
1884
|
enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1700
1885
|
}
|
|
1701
1886
|
|
|
@@ -1743,14 +1928,8 @@ export namespace SessionCreateParams {
|
|
|
1743
1928
|
|
|
1744
1929
|
export namespace Tags {
|
|
1745
1930
|
export interface UnionMember1 {
|
|
1746
|
-
/**
|
|
1747
|
-
* Tags that the tool must NOT have any of
|
|
1748
|
-
*/
|
|
1749
1931
|
disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1750
1932
|
|
|
1751
|
-
/**
|
|
1752
|
-
* Tags that the tool must have at least one of
|
|
1753
|
-
*/
|
|
1754
1933
|
enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
|
|
1755
1934
|
}
|
|
1756
1935
|
}
|
|
@@ -1777,12 +1956,19 @@ export namespace SessionCreateParams {
|
|
|
1777
1956
|
* APIs directly.
|
|
1778
1957
|
*/
|
|
1779
1958
|
enable_proxy_execution?: boolean;
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
|
|
1962
|
+
* vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
|
|
1963
|
+
*/
|
|
1964
|
+
sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
|
|
1780
1965
|
}
|
|
1781
1966
|
}
|
|
1782
1967
|
|
|
1783
1968
|
export interface SessionExecuteParams {
|
|
1784
1969
|
/**
|
|
1785
|
-
* The unique slug identifier of the tool to execute
|
|
1970
|
+
* The unique slug identifier of the tool to execute. Supports both meta tools and
|
|
1971
|
+
* app tools exposed by the session.
|
|
1786
1972
|
*/
|
|
1787
1973
|
tool_slug: string;
|
|
1788
1974
|
|
|
@@ -1827,6 +2013,12 @@ export interface SessionLinkParams {
|
|
|
1827
2013
|
*/
|
|
1828
2014
|
toolkit: string;
|
|
1829
2015
|
|
|
2016
|
+
/**
|
|
2017
|
+
* A human-readable alias for this connected account. Must be unique per entity and
|
|
2018
|
+
* toolkit within the project.
|
|
2019
|
+
*/
|
|
2020
|
+
alias?: string;
|
|
2021
|
+
|
|
1830
2022
|
/**
|
|
1831
2023
|
* URL where users will be redirected after completing auth
|
|
1832
2024
|
*/
|
|
@@ -2707,13 +2899,13 @@ export namespace SessionSearchParams {
|
|
|
2707
2899
|
export interface Query {
|
|
2708
2900
|
/**
|
|
2709
2901
|
* The task or use case to search tools for. Provide a detailed description to get
|
|
2710
|
-
* the best results.
|
|
2902
|
+
* the best results. Max 1024 characters.
|
|
2711
2903
|
*/
|
|
2712
2904
|
use_case: string;
|
|
2713
2905
|
|
|
2714
2906
|
/**
|
|
2715
2907
|
* Known field hints as key:value pairs (e.g., "channel_name:general,
|
|
2716
|
-
* user_email:john@example.com")
|
|
2908
|
+
* user_email:john@example.com"). Max 500 characters.
|
|
2717
2909
|
*/
|
|
2718
2910
|
known_fields?: string;
|
|
2719
2911
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.67'; // x-release-please-version
|