@composio/core 0.1.27 → 0.1.29
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/dist/index.cjs +461 -86
- package/dist/index.d.cts +392 -214
- package/dist/index.d.ts +392 -214
- package/dist/index.js +460 -86
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare const ToolkitSchema: z.ZodObject<{
|
|
|
28
28
|
logo?: string | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
type Toolkit = z.infer<typeof ToolkitSchema>;
|
|
31
|
+
declare const JSONSchemaPropertySchema: z.ZodType<any>;
|
|
32
|
+
type JSONSchemaProperty = z.infer<typeof JSONSchemaPropertySchema>;
|
|
31
33
|
/**
|
|
32
34
|
* Tool is a single action that can be performed by a toolkit.
|
|
33
35
|
* Tool is simlar to an action that an app can perform.
|
|
@@ -40,11 +42,11 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
40
42
|
description: z.ZodOptional<z.ZodString>;
|
|
41
43
|
inputParameters: z.ZodOptional<z.ZodObject<{
|
|
42
44
|
type: z.ZodLiteral<"object">;
|
|
43
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
44
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
45
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
46
|
-
not: z.ZodOptional<z.ZodType<
|
|
47
|
-
properties: z.ZodRecord<z.ZodString, z.ZodType<
|
|
45
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
46
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
47
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
48
|
+
not: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
49
|
+
properties: z.ZodRecord<z.ZodString, z.ZodType<any, z.ZodTypeDef, any>>;
|
|
48
50
|
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
51
|
title: z.ZodOptional<z.ZodString>;
|
|
50
52
|
default: z.ZodOptional<z.ZodAny>;
|
|
@@ -53,12 +55,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
53
55
|
additionalProperties: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
54
56
|
}, "strip", z.ZodTypeAny, {
|
|
55
57
|
type: "object";
|
|
56
|
-
properties: Record<string,
|
|
58
|
+
properties: Record<string, any>;
|
|
57
59
|
description?: string | undefined;
|
|
58
|
-
anyOf?:
|
|
59
|
-
oneOf?:
|
|
60
|
-
allOf?:
|
|
61
|
-
not?:
|
|
60
|
+
anyOf?: any[] | undefined;
|
|
61
|
+
oneOf?: any[] | undefined;
|
|
62
|
+
allOf?: any[] | undefined;
|
|
63
|
+
not?: any;
|
|
62
64
|
title?: string | undefined;
|
|
63
65
|
default?: any;
|
|
64
66
|
nullable?: boolean | undefined;
|
|
@@ -66,12 +68,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
66
68
|
additionalProperties?: boolean | undefined;
|
|
67
69
|
}, {
|
|
68
70
|
type: "object";
|
|
69
|
-
properties: Record<string,
|
|
71
|
+
properties: Record<string, any>;
|
|
70
72
|
description?: string | undefined;
|
|
71
|
-
anyOf?:
|
|
72
|
-
oneOf?:
|
|
73
|
-
allOf?:
|
|
74
|
-
not?:
|
|
73
|
+
anyOf?: any[] | undefined;
|
|
74
|
+
oneOf?: any[] | undefined;
|
|
75
|
+
allOf?: any[] | undefined;
|
|
76
|
+
not?: any;
|
|
75
77
|
title?: string | undefined;
|
|
76
78
|
default?: any;
|
|
77
79
|
nullable?: boolean | undefined;
|
|
@@ -80,11 +82,11 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
80
82
|
}>>;
|
|
81
83
|
outputParameters: z.ZodOptional<z.ZodObject<{
|
|
82
84
|
type: z.ZodLiteral<"object">;
|
|
83
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
84
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
85
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
86
|
-
not: z.ZodOptional<z.ZodType<
|
|
87
|
-
properties: z.ZodRecord<z.ZodString, z.ZodType<
|
|
85
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
86
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
87
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
88
|
+
not: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
89
|
+
properties: z.ZodRecord<z.ZodString, z.ZodType<any, z.ZodTypeDef, any>>;
|
|
88
90
|
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
91
|
title: z.ZodOptional<z.ZodString>;
|
|
90
92
|
default: z.ZodOptional<z.ZodAny>;
|
|
@@ -93,12 +95,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
93
95
|
additionalProperties: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
94
96
|
}, "strip", z.ZodTypeAny, {
|
|
95
97
|
type: "object";
|
|
96
|
-
properties: Record<string,
|
|
98
|
+
properties: Record<string, any>;
|
|
97
99
|
description?: string | undefined;
|
|
98
|
-
anyOf?:
|
|
99
|
-
oneOf?:
|
|
100
|
-
allOf?:
|
|
101
|
-
not?:
|
|
100
|
+
anyOf?: any[] | undefined;
|
|
101
|
+
oneOf?: any[] | undefined;
|
|
102
|
+
allOf?: any[] | undefined;
|
|
103
|
+
not?: any;
|
|
102
104
|
title?: string | undefined;
|
|
103
105
|
default?: any;
|
|
104
106
|
nullable?: boolean | undefined;
|
|
@@ -106,12 +108,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
106
108
|
additionalProperties?: boolean | undefined;
|
|
107
109
|
}, {
|
|
108
110
|
type: "object";
|
|
109
|
-
properties: Record<string,
|
|
111
|
+
properties: Record<string, any>;
|
|
110
112
|
description?: string | undefined;
|
|
111
|
-
anyOf?:
|
|
112
|
-
oneOf?:
|
|
113
|
-
allOf?:
|
|
114
|
-
not?:
|
|
113
|
+
anyOf?: any[] | undefined;
|
|
114
|
+
oneOf?: any[] | undefined;
|
|
115
|
+
allOf?: any[] | undefined;
|
|
116
|
+
not?: any;
|
|
115
117
|
title?: string | undefined;
|
|
116
118
|
default?: any;
|
|
117
119
|
nullable?: boolean | undefined;
|
|
@@ -141,12 +143,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
141
143
|
description?: string | undefined;
|
|
142
144
|
inputParameters?: {
|
|
143
145
|
type: "object";
|
|
144
|
-
properties: Record<string,
|
|
146
|
+
properties: Record<string, any>;
|
|
145
147
|
description?: string | undefined;
|
|
146
|
-
anyOf?:
|
|
147
|
-
oneOf?:
|
|
148
|
-
allOf?:
|
|
149
|
-
not?:
|
|
148
|
+
anyOf?: any[] | undefined;
|
|
149
|
+
oneOf?: any[] | undefined;
|
|
150
|
+
allOf?: any[] | undefined;
|
|
151
|
+
not?: any;
|
|
150
152
|
title?: string | undefined;
|
|
151
153
|
default?: any;
|
|
152
154
|
nullable?: boolean | undefined;
|
|
@@ -155,12 +157,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
155
157
|
} | undefined;
|
|
156
158
|
outputParameters?: {
|
|
157
159
|
type: "object";
|
|
158
|
-
properties: Record<string,
|
|
160
|
+
properties: Record<string, any>;
|
|
159
161
|
description?: string | undefined;
|
|
160
|
-
anyOf?:
|
|
161
|
-
oneOf?:
|
|
162
|
-
allOf?:
|
|
163
|
-
not?:
|
|
162
|
+
anyOf?: any[] | undefined;
|
|
163
|
+
oneOf?: any[] | undefined;
|
|
164
|
+
allOf?: any[] | undefined;
|
|
165
|
+
not?: any;
|
|
164
166
|
title?: string | undefined;
|
|
165
167
|
default?: any;
|
|
166
168
|
nullable?: boolean | undefined;
|
|
@@ -180,12 +182,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
180
182
|
description?: string | undefined;
|
|
181
183
|
inputParameters?: {
|
|
182
184
|
type: "object";
|
|
183
|
-
properties: Record<string,
|
|
185
|
+
properties: Record<string, any>;
|
|
184
186
|
description?: string | undefined;
|
|
185
|
-
anyOf?:
|
|
186
|
-
oneOf?:
|
|
187
|
-
allOf?:
|
|
188
|
-
not?:
|
|
187
|
+
anyOf?: any[] | undefined;
|
|
188
|
+
oneOf?: any[] | undefined;
|
|
189
|
+
allOf?: any[] | undefined;
|
|
190
|
+
not?: any;
|
|
189
191
|
title?: string | undefined;
|
|
190
192
|
default?: any;
|
|
191
193
|
nullable?: boolean | undefined;
|
|
@@ -194,12 +196,12 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
194
196
|
} | undefined;
|
|
195
197
|
outputParameters?: {
|
|
196
198
|
type: "object";
|
|
197
|
-
properties: Record<string,
|
|
199
|
+
properties: Record<string, any>;
|
|
198
200
|
description?: string | undefined;
|
|
199
|
-
anyOf?:
|
|
200
|
-
oneOf?:
|
|
201
|
-
allOf?:
|
|
202
|
-
not?:
|
|
201
|
+
anyOf?: any[] | undefined;
|
|
202
|
+
oneOf?: any[] | undefined;
|
|
203
|
+
allOf?: any[] | undefined;
|
|
204
|
+
not?: any;
|
|
203
205
|
title?: string | undefined;
|
|
204
206
|
default?: any;
|
|
205
207
|
nullable?: boolean | undefined;
|
|
@@ -226,11 +228,11 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
226
228
|
description: z.ZodOptional<z.ZodString>;
|
|
227
229
|
inputParameters: z.ZodOptional<z.ZodObject<{
|
|
228
230
|
type: z.ZodLiteral<"object">;
|
|
229
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
230
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
231
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
232
|
-
not: z.ZodOptional<z.ZodType<
|
|
233
|
-
properties: z.ZodRecord<z.ZodString, z.ZodType<
|
|
231
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
232
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
233
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
234
|
+
not: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
235
|
+
properties: z.ZodRecord<z.ZodString, z.ZodType<any, z.ZodTypeDef, any>>;
|
|
234
236
|
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
235
237
|
title: z.ZodOptional<z.ZodString>;
|
|
236
238
|
default: z.ZodOptional<z.ZodAny>;
|
|
@@ -239,12 +241,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
239
241
|
additionalProperties: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
240
242
|
}, "strip", z.ZodTypeAny, {
|
|
241
243
|
type: "object";
|
|
242
|
-
properties: Record<string,
|
|
244
|
+
properties: Record<string, any>;
|
|
243
245
|
description?: string | undefined;
|
|
244
|
-
anyOf?:
|
|
245
|
-
oneOf?:
|
|
246
|
-
allOf?:
|
|
247
|
-
not?:
|
|
246
|
+
anyOf?: any[] | undefined;
|
|
247
|
+
oneOf?: any[] | undefined;
|
|
248
|
+
allOf?: any[] | undefined;
|
|
249
|
+
not?: any;
|
|
248
250
|
title?: string | undefined;
|
|
249
251
|
default?: any;
|
|
250
252
|
nullable?: boolean | undefined;
|
|
@@ -252,12 +254,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
252
254
|
additionalProperties?: boolean | undefined;
|
|
253
255
|
}, {
|
|
254
256
|
type: "object";
|
|
255
|
-
properties: Record<string,
|
|
257
|
+
properties: Record<string, any>;
|
|
256
258
|
description?: string | undefined;
|
|
257
|
-
anyOf?:
|
|
258
|
-
oneOf?:
|
|
259
|
-
allOf?:
|
|
260
|
-
not?:
|
|
259
|
+
anyOf?: any[] | undefined;
|
|
260
|
+
oneOf?: any[] | undefined;
|
|
261
|
+
allOf?: any[] | undefined;
|
|
262
|
+
not?: any;
|
|
261
263
|
title?: string | undefined;
|
|
262
264
|
default?: any;
|
|
263
265
|
nullable?: boolean | undefined;
|
|
@@ -266,11 +268,11 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
266
268
|
}>>;
|
|
267
269
|
outputParameters: z.ZodOptional<z.ZodObject<{
|
|
268
270
|
type: z.ZodLiteral<"object">;
|
|
269
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
270
|
-
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
271
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
272
|
-
not: z.ZodOptional<z.ZodType<
|
|
273
|
-
properties: z.ZodRecord<z.ZodString, z.ZodType<
|
|
271
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
272
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
273
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
274
|
+
not: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
275
|
+
properties: z.ZodRecord<z.ZodString, z.ZodType<any, z.ZodTypeDef, any>>;
|
|
274
276
|
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
275
277
|
title: z.ZodOptional<z.ZodString>;
|
|
276
278
|
default: z.ZodOptional<z.ZodAny>;
|
|
@@ -279,12 +281,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
279
281
|
additionalProperties: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
280
282
|
}, "strip", z.ZodTypeAny, {
|
|
281
283
|
type: "object";
|
|
282
|
-
properties: Record<string,
|
|
284
|
+
properties: Record<string, any>;
|
|
283
285
|
description?: string | undefined;
|
|
284
|
-
anyOf?:
|
|
285
|
-
oneOf?:
|
|
286
|
-
allOf?:
|
|
287
|
-
not?:
|
|
286
|
+
anyOf?: any[] | undefined;
|
|
287
|
+
oneOf?: any[] | undefined;
|
|
288
|
+
allOf?: any[] | undefined;
|
|
289
|
+
not?: any;
|
|
288
290
|
title?: string | undefined;
|
|
289
291
|
default?: any;
|
|
290
292
|
nullable?: boolean | undefined;
|
|
@@ -292,12 +294,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
292
294
|
additionalProperties?: boolean | undefined;
|
|
293
295
|
}, {
|
|
294
296
|
type: "object";
|
|
295
|
-
properties: Record<string,
|
|
297
|
+
properties: Record<string, any>;
|
|
296
298
|
description?: string | undefined;
|
|
297
|
-
anyOf?:
|
|
298
|
-
oneOf?:
|
|
299
|
-
allOf?:
|
|
300
|
-
not?:
|
|
299
|
+
anyOf?: any[] | undefined;
|
|
300
|
+
oneOf?: any[] | undefined;
|
|
301
|
+
allOf?: any[] | undefined;
|
|
302
|
+
not?: any;
|
|
301
303
|
title?: string | undefined;
|
|
302
304
|
default?: any;
|
|
303
305
|
nullable?: boolean | undefined;
|
|
@@ -327,12 +329,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
327
329
|
description?: string | undefined;
|
|
328
330
|
inputParameters?: {
|
|
329
331
|
type: "object";
|
|
330
|
-
properties: Record<string,
|
|
332
|
+
properties: Record<string, any>;
|
|
331
333
|
description?: string | undefined;
|
|
332
|
-
anyOf?:
|
|
333
|
-
oneOf?:
|
|
334
|
-
allOf?:
|
|
335
|
-
not?:
|
|
334
|
+
anyOf?: any[] | undefined;
|
|
335
|
+
oneOf?: any[] | undefined;
|
|
336
|
+
allOf?: any[] | undefined;
|
|
337
|
+
not?: any;
|
|
336
338
|
title?: string | undefined;
|
|
337
339
|
default?: any;
|
|
338
340
|
nullable?: boolean | undefined;
|
|
@@ -341,12 +343,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
341
343
|
} | undefined;
|
|
342
344
|
outputParameters?: {
|
|
343
345
|
type: "object";
|
|
344
|
-
properties: Record<string,
|
|
346
|
+
properties: Record<string, any>;
|
|
345
347
|
description?: string | undefined;
|
|
346
|
-
anyOf?:
|
|
347
|
-
oneOf?:
|
|
348
|
-
allOf?:
|
|
349
|
-
not?:
|
|
348
|
+
anyOf?: any[] | undefined;
|
|
349
|
+
oneOf?: any[] | undefined;
|
|
350
|
+
allOf?: any[] | undefined;
|
|
351
|
+
not?: any;
|
|
350
352
|
title?: string | undefined;
|
|
351
353
|
default?: any;
|
|
352
354
|
nullable?: boolean | undefined;
|
|
@@ -366,12 +368,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
366
368
|
description?: string | undefined;
|
|
367
369
|
inputParameters?: {
|
|
368
370
|
type: "object";
|
|
369
|
-
properties: Record<string,
|
|
371
|
+
properties: Record<string, any>;
|
|
370
372
|
description?: string | undefined;
|
|
371
|
-
anyOf?:
|
|
372
|
-
oneOf?:
|
|
373
|
-
allOf?:
|
|
374
|
-
not?:
|
|
373
|
+
anyOf?: any[] | undefined;
|
|
374
|
+
oneOf?: any[] | undefined;
|
|
375
|
+
allOf?: any[] | undefined;
|
|
376
|
+
not?: any;
|
|
375
377
|
title?: string | undefined;
|
|
376
378
|
default?: any;
|
|
377
379
|
nullable?: boolean | undefined;
|
|
@@ -380,12 +382,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
380
382
|
} | undefined;
|
|
381
383
|
outputParameters?: {
|
|
382
384
|
type: "object";
|
|
383
|
-
properties: Record<string,
|
|
385
|
+
properties: Record<string, any>;
|
|
384
386
|
description?: string | undefined;
|
|
385
|
-
anyOf?:
|
|
386
|
-
oneOf?:
|
|
387
|
-
allOf?:
|
|
388
|
-
not?:
|
|
387
|
+
anyOf?: any[] | undefined;
|
|
388
|
+
oneOf?: any[] | undefined;
|
|
389
|
+
allOf?: any[] | undefined;
|
|
390
|
+
not?: any;
|
|
389
391
|
title?: string | undefined;
|
|
390
392
|
default?: any;
|
|
391
393
|
nullable?: boolean | undefined;
|
|
@@ -411,12 +413,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
411
413
|
description?: string | undefined;
|
|
412
414
|
inputParameters?: {
|
|
413
415
|
type: "object";
|
|
414
|
-
properties: Record<string,
|
|
416
|
+
properties: Record<string, any>;
|
|
415
417
|
description?: string | undefined;
|
|
416
|
-
anyOf?:
|
|
417
|
-
oneOf?:
|
|
418
|
-
allOf?:
|
|
419
|
-
not?:
|
|
418
|
+
anyOf?: any[] | undefined;
|
|
419
|
+
oneOf?: any[] | undefined;
|
|
420
|
+
allOf?: any[] | undefined;
|
|
421
|
+
not?: any;
|
|
420
422
|
title?: string | undefined;
|
|
421
423
|
default?: any;
|
|
422
424
|
nullable?: boolean | undefined;
|
|
@@ -425,12 +427,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
425
427
|
} | undefined;
|
|
426
428
|
outputParameters?: {
|
|
427
429
|
type: "object";
|
|
428
|
-
properties: Record<string,
|
|
430
|
+
properties: Record<string, any>;
|
|
429
431
|
description?: string | undefined;
|
|
430
|
-
anyOf?:
|
|
431
|
-
oneOf?:
|
|
432
|
-
allOf?:
|
|
433
|
-
not?:
|
|
432
|
+
anyOf?: any[] | undefined;
|
|
433
|
+
oneOf?: any[] | undefined;
|
|
434
|
+
allOf?: any[] | undefined;
|
|
435
|
+
not?: any;
|
|
434
436
|
title?: string | undefined;
|
|
435
437
|
default?: any;
|
|
436
438
|
nullable?: boolean | undefined;
|
|
@@ -454,12 +456,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
454
456
|
description?: string | undefined;
|
|
455
457
|
inputParameters?: {
|
|
456
458
|
type: "object";
|
|
457
|
-
properties: Record<string,
|
|
459
|
+
properties: Record<string, any>;
|
|
458
460
|
description?: string | undefined;
|
|
459
|
-
anyOf?:
|
|
460
|
-
oneOf?:
|
|
461
|
-
allOf?:
|
|
462
|
-
not?:
|
|
461
|
+
anyOf?: any[] | undefined;
|
|
462
|
+
oneOf?: any[] | undefined;
|
|
463
|
+
allOf?: any[] | undefined;
|
|
464
|
+
not?: any;
|
|
463
465
|
title?: string | undefined;
|
|
464
466
|
default?: any;
|
|
465
467
|
nullable?: boolean | undefined;
|
|
@@ -468,12 +470,12 @@ declare const ToolListResponseSchema: z.ZodObject<{
|
|
|
468
470
|
} | undefined;
|
|
469
471
|
outputParameters?: {
|
|
470
472
|
type: "object";
|
|
471
|
-
properties: Record<string,
|
|
473
|
+
properties: Record<string, any>;
|
|
472
474
|
description?: string | undefined;
|
|
473
|
-
anyOf?:
|
|
474
|
-
oneOf?:
|
|
475
|
-
allOf?:
|
|
476
|
-
not?:
|
|
475
|
+
anyOf?: any[] | undefined;
|
|
476
|
+
oneOf?: any[] | undefined;
|
|
477
|
+
allOf?: any[] | undefined;
|
|
478
|
+
not?: any;
|
|
477
479
|
title?: string | undefined;
|
|
478
480
|
default?: any;
|
|
479
481
|
nullable?: boolean | undefined;
|
|
@@ -756,37 +758,69 @@ type ToolProxyParams = z.infer<typeof ToolProxyParamsSchema>;
|
|
|
756
758
|
*
|
|
757
759
|
* @example
|
|
758
760
|
* ```typescript
|
|
759
|
-
* // Add authentication headers to all tool requests
|
|
760
|
-
* const beforeExecute = (toolSlug, toolkitSlug
|
|
761
|
+
* // Example 1: Add authentication headers to all tool requests
|
|
762
|
+
* const beforeExecute = ({ params, toolSlug, toolkitSlug }) => {
|
|
763
|
+
* // Log the execution attempt
|
|
764
|
+
* console.log(`Executing ${toolSlug} from toolkit ${toolkitSlug}`);
|
|
765
|
+
*
|
|
766
|
+
* // Add authentication and tracking headers
|
|
761
767
|
* return {
|
|
762
768
|
* ...params,
|
|
763
769
|
* customAuthParams: {
|
|
764
770
|
* ...params.customAuthParams,
|
|
765
771
|
* headers: {
|
|
766
772
|
* ...params.customAuthParams?.headers,
|
|
767
|
-
* 'X-API-Key': 'my-api-key'
|
|
773
|
+
* 'X-API-Key': 'my-api-key',
|
|
774
|
+
* 'X-Request-ID': generateRequestId(),
|
|
775
|
+
* 'X-Toolkit': toolkitSlug
|
|
768
776
|
* }
|
|
769
777
|
* }
|
|
770
778
|
* };
|
|
771
779
|
* };
|
|
772
780
|
*
|
|
773
|
-
* // Transform input parameters for
|
|
774
|
-
* const beforeExecute = (toolSlug, toolkitSlug
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
* ...params
|
|
781
|
-
*
|
|
781
|
+
* // Example 2: Transform input parameters for specific tools with validation
|
|
782
|
+
* const beforeExecute = ({ params, toolSlug, toolkitSlug }) => {
|
|
783
|
+
* // Handle different tools
|
|
784
|
+
* switch (toolSlug) {
|
|
785
|
+
* case 'GITHUB_SEARCH_REPOS':
|
|
786
|
+
* // Enhance search query with additional filters
|
|
787
|
+
* return {
|
|
788
|
+
* ...params,
|
|
789
|
+
* arguments: {
|
|
790
|
+
* ...params.arguments,
|
|
791
|
+
* q: `${params.arguments.query} in:name,description language:typescript stars:>100`,
|
|
792
|
+
* sort: 'stars',
|
|
793
|
+
* order: 'desc'
|
|
794
|
+
* }
|
|
795
|
+
* };
|
|
796
|
+
*
|
|
797
|
+
* case 'NPM_PACKAGE_INFO':
|
|
798
|
+
* // Validate and normalize package name
|
|
799
|
+
* const pkgName = params.arguments.packageName.trim().toLowerCase();
|
|
800
|
+
* if (!pkgName) {
|
|
801
|
+
* throw new Error('Package name is required');
|
|
782
802
|
* }
|
|
783
|
-
*
|
|
803
|
+
*
|
|
804
|
+
* return {
|
|
805
|
+
* ...params,
|
|
806
|
+
* arguments: {
|
|
807
|
+
* ...params.arguments,
|
|
808
|
+
* packageName: pkgName,
|
|
809
|
+
* includeVersions: true
|
|
810
|
+
* }
|
|
811
|
+
* };
|
|
812
|
+
*
|
|
813
|
+
* default:
|
|
814
|
+
* return params;
|
|
784
815
|
* }
|
|
785
|
-
* return params;
|
|
786
816
|
* };
|
|
787
817
|
* ```
|
|
788
818
|
*/
|
|
789
|
-
type beforeExecuteModifier = (
|
|
819
|
+
type beforeExecuteModifier = (context: {
|
|
820
|
+
toolSlug: string;
|
|
821
|
+
toolkitSlug: string;
|
|
822
|
+
params: ToolExecuteParams;
|
|
823
|
+
}) => Promise<ToolExecuteParams> | ToolExecuteParams;
|
|
790
824
|
/**
|
|
791
825
|
* Modifier for altering the tool execution response after execution completes.
|
|
792
826
|
*
|
|
@@ -804,40 +838,85 @@ type beforeExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecute
|
|
|
804
838
|
*
|
|
805
839
|
* @example
|
|
806
840
|
* ```typescript
|
|
807
|
-
* // Transform
|
|
808
|
-
* const afterExecute = (toolSlug, toolkitSlug
|
|
809
|
-
*
|
|
810
|
-
*
|
|
841
|
+
* // Example 1: Transform and enrich response data
|
|
842
|
+
* const afterExecute = ({ result, toolSlug, toolkitSlug }) => {
|
|
843
|
+
* // Handle successful GitHub repository listing
|
|
844
|
+
* if (toolSlug === 'GITHUB_LIST_REPOS' && result.successful) {
|
|
845
|
+
* // Transform the returned repos into a more useful format
|
|
846
|
+
* const repositories = result.data.items.map(repo => ({
|
|
847
|
+
* name: repo.name,
|
|
848
|
+
* url: repo.html_url,
|
|
849
|
+
* stars: repo.stargazers_count,
|
|
850
|
+
* // Add derived and computed fields
|
|
851
|
+
* isPopular: repo.stargazers_count > 1000,
|
|
852
|
+
* lastUpdated: new Date(repo.updated_at).toLocaleDateString(),
|
|
853
|
+
* topics: repo.topics || [],
|
|
854
|
+
* license: repo.license?.spdx_id || 'No License'
|
|
855
|
+
* }));
|
|
856
|
+
*
|
|
857
|
+
* // Add metadata about the response
|
|
811
858
|
* return {
|
|
812
|
-
* ...
|
|
859
|
+
* ...result,
|
|
813
860
|
* data: {
|
|
814
|
-
* repositories
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
861
|
+
* repositories,
|
|
862
|
+
* totalCount: result.data.total_count,
|
|
863
|
+
* metadata: {
|
|
864
|
+
* queryTime: new Date().toISOString(),
|
|
865
|
+
* toolkit: toolkitSlug,
|
|
866
|
+
* filterApplied: true
|
|
867
|
+
* }
|
|
819
868
|
* }
|
|
820
869
|
* };
|
|
821
870
|
* }
|
|
822
|
-
*
|
|
871
|
+
*
|
|
872
|
+
* return result;
|
|
823
873
|
* };
|
|
824
874
|
*
|
|
825
|
-
* //
|
|
826
|
-
* const afterExecute = (toolSlug, toolkitSlug
|
|
827
|
-
*
|
|
875
|
+
* // Example 2: Comprehensive error handling and logging
|
|
876
|
+
* const afterExecute = ({ result, toolSlug, toolkitSlug }) => {
|
|
877
|
+
* // Log all executions for monitoring
|
|
878
|
+
* logToolExecution(toolSlug, toolkitSlug, result.successful);
|
|
879
|
+
*
|
|
880
|
+
* if (!result.successful) {
|
|
881
|
+
* // Get error details
|
|
882
|
+
* const errorCode = result.error?.code || 'UNKNOWN_ERROR';
|
|
883
|
+
* const errorMessage = result.error?.message || 'An unknown error occurred';
|
|
884
|
+
*
|
|
885
|
+
* // Handle specific error cases
|
|
886
|
+
* switch (errorCode) {
|
|
887
|
+
* case 'RATE_LIMIT_EXCEEDED':
|
|
888
|
+
* notifyRateLimitExceeded(toolkitSlug);
|
|
889
|
+
* break;
|
|
890
|
+
* case 'AUTHENTICATION_FAILED':
|
|
891
|
+
* refreshAuthToken(toolkitSlug);
|
|
892
|
+
* break;
|
|
893
|
+
* }
|
|
894
|
+
*
|
|
895
|
+
* // Return enhanced error response
|
|
828
896
|
* return {
|
|
829
|
-
* ...
|
|
897
|
+
* ...result,
|
|
830
898
|
* error: {
|
|
831
|
-
* message: `Error using ${toolSlug}: ${
|
|
832
|
-
* code:
|
|
899
|
+
* message: `Error using ${toolSlug}: ${errorMessage}`,
|
|
900
|
+
* code: errorCode,
|
|
901
|
+
* timestamp: new Date().toISOString(),
|
|
902
|
+
* context: {
|
|
903
|
+
* toolkit: toolkitSlug,
|
|
904
|
+
* severity: getSeverityLevel(errorCode),
|
|
905
|
+
* retryable: isRetryableError(errorCode)
|
|
906
|
+
* }
|
|
833
907
|
* }
|
|
834
908
|
* };
|
|
835
909
|
* }
|
|
836
|
-
*
|
|
910
|
+
*
|
|
911
|
+
* return result;
|
|
837
912
|
* };
|
|
838
913
|
* ```
|
|
839
914
|
*/
|
|
840
|
-
type afterExecuteModifier = (
|
|
915
|
+
type afterExecuteModifier = (context: {
|
|
916
|
+
toolSlug: string;
|
|
917
|
+
toolkitSlug: string;
|
|
918
|
+
result: ToolExecuteResponse;
|
|
919
|
+
}) => Promise<ToolExecuteResponse> | ToolExecuteResponse;
|
|
841
920
|
/**
|
|
842
921
|
* Modifier for altering the tool schema before it's exposed to consumers.
|
|
843
922
|
*
|
|
@@ -855,49 +934,133 @@ type afterExecuteModifier = (toolSlug: string, toolkitSlug: string, toolExecuteR
|
|
|
855
934
|
*
|
|
856
935
|
* @example
|
|
857
936
|
* ```typescript
|
|
858
|
-
* //
|
|
859
|
-
* const modifySchema = (toolSlug, toolkitSlug
|
|
937
|
+
* // Example 1: Comprehensive schema modification with validation
|
|
938
|
+
* const modifySchema = ({ schema, toolSlug, toolkitSlug }) => {
|
|
939
|
+
* // Handle specific tools
|
|
860
940
|
* if (toolSlug === 'HACKERNEWS_GET_USER') {
|
|
861
941
|
* return {
|
|
862
|
-
* ...
|
|
942
|
+
* ...schema,
|
|
943
|
+
* name: 'Get HackerNews User Profile',
|
|
944
|
+
* description: 'Retrieve detailed user information from HackerNews',
|
|
945
|
+
* version: '2.0.0',
|
|
863
946
|
* inputParameters: {
|
|
864
|
-
* ...
|
|
947
|
+
* ...schema.inputParameters,
|
|
865
948
|
* userId: {
|
|
866
949
|
* type: 'string',
|
|
867
950
|
* description: 'The HackerNews username to retrieve information for',
|
|
868
|
-
* required: true
|
|
951
|
+
* required: true,
|
|
952
|
+
* minLength: 2,
|
|
953
|
+
* maxLength: 15,
|
|
954
|
+
* pattern: '^[a-zA-Z0-9_-]+$'
|
|
955
|
+
* },
|
|
956
|
+
* includeSubmissions: {
|
|
957
|
+
* type: 'boolean',
|
|
958
|
+
* description: 'Include user submissions in the response',
|
|
959
|
+
* default: false
|
|
960
|
+
* },
|
|
961
|
+
* submissionLimit: {
|
|
962
|
+
* type: 'number',
|
|
963
|
+
* description: 'Maximum number of submissions to return',
|
|
964
|
+
* default: 10,
|
|
965
|
+
* minimum: 1,
|
|
966
|
+
* maximum: 100
|
|
967
|
+
* }
|
|
968
|
+
* },
|
|
969
|
+
* outputSchema: {
|
|
970
|
+
* type: 'object',
|
|
971
|
+
* properties: {
|
|
972
|
+
* user: {
|
|
973
|
+
* type: 'object',
|
|
974
|
+
* properties: {
|
|
975
|
+
* id: { type: 'string' },
|
|
976
|
+
* karma: { type: 'number' },
|
|
977
|
+
* created: { type: 'string', format: 'date-time' },
|
|
978
|
+
* submissions: { type: 'array', items: { type: 'object' } }
|
|
979
|
+
* }
|
|
980
|
+
* }
|
|
869
981
|
* }
|
|
870
982
|
* }
|
|
871
983
|
* };
|
|
872
984
|
* }
|
|
873
|
-
*
|
|
985
|
+
*
|
|
986
|
+
* return schema;
|
|
874
987
|
* };
|
|
875
988
|
*
|
|
876
|
-
* //
|
|
877
|
-
* const modifySchema = (toolSlug, toolkitSlug
|
|
989
|
+
* // Example 2: Add organization-specific customizations
|
|
990
|
+
* const modifySchema = ({ schema, toolSlug, toolkitSlug }) => {
|
|
991
|
+
* // Add organization prefix to all GitHub tools
|
|
878
992
|
* if (toolkitSlug === 'github') {
|
|
879
|
-
*
|
|
880
|
-
* ...
|
|
881
|
-
*
|
|
882
|
-
*
|
|
993
|
+
* const enhancedSchema = {
|
|
994
|
+
* ...schema,
|
|
995
|
+
* name: `Acme Corp - ${schema.name}`,
|
|
996
|
+
* description: `Company GitHub tool: ${schema.description}`,
|
|
997
|
+
* category: 'Internal Tools',
|
|
998
|
+
* tags: [...(schema.tags || []), 'acme-corp', 'internal'],
|
|
999
|
+
* metadata: {
|
|
1000
|
+
* ...(schema.metadata || {}),
|
|
1001
|
+
* organization: 'acme-corp',
|
|
1002
|
+
* department: 'engineering',
|
|
1003
|
+
* supportContact: 'tools@acme-corp.com'
|
|
1004
|
+
* },
|
|
1005
|
+
* authentication: {
|
|
1006
|
+
* type: 'oauth2',
|
|
1007
|
+
* scopes: ['repo', 'user'],
|
|
1008
|
+
* enterpriseServer: 'github.acme-corp.com'
|
|
1009
|
+
* }
|
|
883
1010
|
* };
|
|
1011
|
+
*
|
|
1012
|
+
* // Add rate limiting metadata
|
|
1013
|
+
* if (schema.rateLimit) {
|
|
1014
|
+
* enhancedSchema.rateLimit = {
|
|
1015
|
+
* ...schema.rateLimit,
|
|
1016
|
+
* enterprise: {
|
|
1017
|
+
* requests: 5000,
|
|
1018
|
+
* per: '1 hour'
|
|
1019
|
+
* }
|
|
1020
|
+
* };
|
|
1021
|
+
* }
|
|
1022
|
+
*
|
|
1023
|
+
* return enhancedSchema;
|
|
884
1024
|
* }
|
|
885
|
-
*
|
|
1025
|
+
*
|
|
1026
|
+
* return schema;
|
|
886
1027
|
* };
|
|
887
1028
|
*
|
|
888
|
-
* // Simplify
|
|
889
|
-
* const modifySchema = (
|
|
890
|
-
* // Remove
|
|
891
|
-
* const {
|
|
1029
|
+
* // Example 3: Simplify schemas for external consumers
|
|
1030
|
+
* const modifySchema = ({ schema }) => {
|
|
1031
|
+
* // Remove internal or complex parameters
|
|
1032
|
+
* const {
|
|
1033
|
+
* debugMode,
|
|
1034
|
+
* internalFlags,
|
|
1035
|
+
* experimentalFeatures,
|
|
1036
|
+
* ...simpleInputParams
|
|
1037
|
+
* } = schema.inputParameters;
|
|
1038
|
+
*
|
|
1039
|
+
* // Simplify authentication requirements
|
|
1040
|
+
* const { oauth2, apiKey, ...simpleAuth } = schema.authentication || {};
|
|
892
1041
|
*
|
|
893
1042
|
* return {
|
|
894
|
-
* ...
|
|
895
|
-
* inputParameters: simpleInputParams
|
|
1043
|
+
* ...schema,
|
|
1044
|
+
* inputParameters: simpleInputParams,
|
|
1045
|
+
* authentication: {
|
|
1046
|
+
* type: 'apiKey',
|
|
1047
|
+
* in: 'header',
|
|
1048
|
+
* name: 'X-API-Key'
|
|
1049
|
+
* },
|
|
1050
|
+
* // Remove internal metadata
|
|
1051
|
+
* metadata: {
|
|
1052
|
+
* isPublic: true,
|
|
1053
|
+
* version: schema.metadata?.version
|
|
1054
|
+
* }
|
|
896
1055
|
* };
|
|
897
1056
|
* };
|
|
898
1057
|
* ```
|
|
899
1058
|
*/
|
|
900
|
-
type TransformToolSchemaModifier = (
|
|
1059
|
+
type TransformToolSchemaModifier = (context: {
|
|
1060
|
+
toolSlug: string;
|
|
1061
|
+
toolkitSlug: string;
|
|
1062
|
+
schema: Tool;
|
|
1063
|
+
}) => Tool | Promise<Tool>;
|
|
901
1064
|
/**
|
|
902
1065
|
* Options for non-agentic tool configuration.
|
|
903
1066
|
*
|
|
@@ -910,9 +1073,9 @@ type TransformToolSchemaModifier = (toolSlug: string, toolkitSlug: string, toolS
|
|
|
910
1073
|
* const tools = await composio.tools.get('default', {
|
|
911
1074
|
* toolkits: ['github']
|
|
912
1075
|
* }, {
|
|
913
|
-
* modifySchema: (
|
|
1076
|
+
* modifySchema: (context) => {
|
|
914
1077
|
* // Custom schema modifications
|
|
915
|
-
* return schema;
|
|
1078
|
+
* return context.schema;
|
|
916
1079
|
* }
|
|
917
1080
|
* });
|
|
918
1081
|
* ```
|
|
@@ -938,15 +1101,15 @@ type ToolOptions = {
|
|
|
938
1101
|
* userId: 'default',
|
|
939
1102
|
* arguments: { owner: 'composio' }
|
|
940
1103
|
* }, {
|
|
941
|
-
* beforeExecute: (
|
|
942
|
-
* console.log(`Executing ${toolSlug} from ${toolkitSlug}`);
|
|
943
|
-
* return params;
|
|
1104
|
+
* beforeExecute: (context) => {
|
|
1105
|
+
* console.log(`Executing ${context.toolSlug} from ${context.toolkitSlug}`);
|
|
1106
|
+
* return context.params;
|
|
944
1107
|
* },
|
|
945
|
-
* afterExecute: (
|
|
946
|
-
* if (
|
|
947
|
-
* console.log(`Successfully executed ${toolSlug}`);
|
|
1108
|
+
* afterExecute: (context) => {
|
|
1109
|
+
* if (context.result.successful) {
|
|
1110
|
+
* console.log(`Successfully executed ${context.toolSlug}`);
|
|
948
1111
|
* }
|
|
949
|
-
* return
|
|
1112
|
+
* return context.result;
|
|
950
1113
|
* }
|
|
951
1114
|
* });
|
|
952
1115
|
* ```
|
|
@@ -974,27 +1137,27 @@ type ExecuteToolModifiers = {
|
|
|
974
1137
|
* ```typescript
|
|
975
1138
|
* // Configure agentic tools with schema and execution modifications
|
|
976
1139
|
* const agenticTools = await vercel.tools.get('default', 'GITHUB_GET_REPOS', {
|
|
977
|
-
* modifySchema: (
|
|
1140
|
+
* modifySchema: (context) => {
|
|
978
1141
|
* return {
|
|
979
|
-
* ...schema,
|
|
980
|
-
* description: `Enhanced ${toolSlug} for better context`
|
|
1142
|
+
* ...context.schema,
|
|
1143
|
+
* description: `Enhanced ${context.toolSlug} for better context`
|
|
981
1144
|
* };
|
|
982
1145
|
* },
|
|
983
1146
|
*
|
|
984
1147
|
* // Intercept before execution
|
|
985
|
-
* beforeExecute: (
|
|
1148
|
+
* beforeExecute: (context) => {
|
|
986
1149
|
* // Add analytics tracking
|
|
987
|
-
* trackToolUsage(toolSlug);
|
|
988
|
-
* return params;
|
|
1150
|
+
* trackToolUsage(context.toolSlug);
|
|
1151
|
+
* return context.params;
|
|
989
1152
|
* },
|
|
990
1153
|
*
|
|
991
1154
|
* // Transform after execution
|
|
992
|
-
* afterExecute: (
|
|
1155
|
+
* afterExecute: (context) => {
|
|
993
1156
|
* // Log results and handle errors
|
|
994
|
-
* if (!
|
|
995
|
-
* logToolError(toolSlug,
|
|
1157
|
+
* if (!context.result.successful) {
|
|
1158
|
+
* logToolError(context.toolSlug, context.result.error);
|
|
996
1159
|
* }
|
|
997
|
-
* return
|
|
1160
|
+
* return context.result;
|
|
998
1161
|
* }
|
|
999
1162
|
* });
|
|
1000
1163
|
* ```
|
|
@@ -1012,7 +1175,7 @@ type AgenticToolOptions = ToolOptions & ExecuteToolModifiers;
|
|
|
1012
1175
|
* ```typescript
|
|
1013
1176
|
* // With standard provider (non-agentic)
|
|
1014
1177
|
* const tools = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
|
|
1015
|
-
* modifySchema: (
|
|
1178
|
+
* modifySchema: (context) => context.schema
|
|
1016
1179
|
* });
|
|
1017
1180
|
*
|
|
1018
1181
|
* // With agentic provider (e.g., VercelProvider)
|
|
@@ -1022,9 +1185,9 @@ type AgenticToolOptions = ToolOptions & ExecuteToolModifiers;
|
|
|
1022
1185
|
* });
|
|
1023
1186
|
*
|
|
1024
1187
|
* const agenticTools = await vercel.tools.get('default', 'GITHUB_GET_REPOS', {
|
|
1025
|
-
* modifySchema: (
|
|
1026
|
-
* beforeExecute: (
|
|
1027
|
-
* afterExecute: (
|
|
1188
|
+
* modifySchema: (context) => context.schema,
|
|
1189
|
+
* beforeExecute: (context) => context.params,
|
|
1190
|
+
* afterExecute: (context) => context.result
|
|
1028
1191
|
* });
|
|
1029
1192
|
* ```
|
|
1030
1193
|
*/
|
|
@@ -1510,10 +1673,9 @@ type McpUrlResponseCamelCase = {
|
|
|
1510
1673
|
mcpUrl: string;
|
|
1511
1674
|
};
|
|
1512
1675
|
type McpUrlResponse = {
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
};
|
|
1676
|
+
name: string;
|
|
1677
|
+
url: string;
|
|
1678
|
+
}[];
|
|
1517
1679
|
type McpServerCreateResponse<T> = (McpCreateResponse | CustomCreateResponse) & {
|
|
1518
1680
|
toolkits: string[];
|
|
1519
1681
|
getServer: (params: MCPGetServerParams) => Promise<T>;
|
|
@@ -1818,12 +1980,10 @@ declare abstract class BaseProvider<TMcpResponse = McpServerGetResponse> {
|
|
|
1818
1980
|
*
|
|
1819
1981
|
* @param data - The MCP URL response data
|
|
1820
1982
|
* @param serverName - Name of the MCP server
|
|
1821
|
-
|
|
1822
|
-
* @param userIds - Optional array of user IDs
|
|
1823
|
-
* @param toolkits - Optional array of toolkit names
|
|
1983
|
+
|
|
1824
1984
|
* @returns Transformed response in provider-specific format, or undefined to use default transformation
|
|
1825
1985
|
*/
|
|
1826
|
-
wrapMcpServerResponse?(data: McpUrlResponse
|
|
1986
|
+
wrapMcpServerResponse?(data: McpUrlResponse): TMcpResponse;
|
|
1827
1987
|
}
|
|
1828
1988
|
/**
|
|
1829
1989
|
* @public
|
|
@@ -10525,6 +10685,30 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
10525
10685
|
* @returns {Promise<string | null>} The connected account id or null if the toolkit is a no auth app
|
|
10526
10686
|
*/
|
|
10527
10687
|
private getConnectedAccountIdForTool;
|
|
10688
|
+
/**
|
|
10689
|
+
* Applies the default schema modifiers to the tools
|
|
10690
|
+
* @param tools - The tools to apply the default schema modifiers to
|
|
10691
|
+
* @returns The tools with the default schema modifiers applied
|
|
10692
|
+
*/
|
|
10693
|
+
private applyDefaultSchemaModifiers;
|
|
10694
|
+
/**
|
|
10695
|
+
* Applies the before execute modifiers to the tool execution params
|
|
10696
|
+
* @param options.toolSlug - The slug of the tool
|
|
10697
|
+
* @param options.toolkitSlug - The slug of the toolkit
|
|
10698
|
+
* @param options.params - The params of the tool execution
|
|
10699
|
+
* @param modifier - The modifier to apply
|
|
10700
|
+
* @returns The modified params
|
|
10701
|
+
*/
|
|
10702
|
+
private applyBeforeExecuteModifiers;
|
|
10703
|
+
/**
|
|
10704
|
+
* Applies the after execute modifiers to the tool execution result
|
|
10705
|
+
* @param options.toolSlug - The slug of the tool
|
|
10706
|
+
* @param options.toolkitSlug - The slug of the toolkit
|
|
10707
|
+
* @param options.result - The result of the tool execution
|
|
10708
|
+
* @param modifier - The modifier to apply
|
|
10709
|
+
* @returns The modified result
|
|
10710
|
+
*/
|
|
10711
|
+
private applyAfterExecuteModifiers;
|
|
10528
10712
|
/**
|
|
10529
10713
|
* Lists all tools available in the Composio SDK including custom tools.
|
|
10530
10714
|
*
|
|
@@ -39929,9 +40113,7 @@ declare class MCP<T = McpServerGetResponse> {
|
|
|
39929
40113
|
*
|
|
39930
40114
|
* @param data - The MCP URL response data (in camelCase)
|
|
39931
40115
|
* @param serverName - Name of the MCP server
|
|
39932
|
-
|
|
39933
|
-
* @param userIds - Optional array of user IDs
|
|
39934
|
-
* @param toolkits - Optional array of toolkit names
|
|
40116
|
+
|
|
39935
40117
|
* @returns Transformed response in appropriate format
|
|
39936
40118
|
*/
|
|
39937
40119
|
private wrapMcpServerResponse;
|
|
@@ -39977,13 +40159,9 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
39977
40159
|
* OpenAI uses the standard format by default.
|
|
39978
40160
|
*
|
|
39979
40161
|
* @param data - The MCP URL response data
|
|
39980
|
-
* @param serverName - Name of the MCP server
|
|
39981
|
-
* @param connectedAccountIds - Optional array of connected account IDs
|
|
39982
|
-
* @param userIds - Optional array of user IDs
|
|
39983
|
-
* @param toolkits - Optional array of toolkit names
|
|
39984
40162
|
* @returns Standard MCP server response format
|
|
39985
40163
|
*/
|
|
39986
|
-
wrapMcpServerResponse(data: McpUrlResponse
|
|
40164
|
+
wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
|
|
39987
40165
|
/**
|
|
39988
40166
|
* Wraps a Composio tool in the OpenAI function calling format.
|
|
39989
40167
|
*
|
|
@@ -40848,4 +41026,4 @@ declare class ComposioNoAPIKeyError extends ComposioError {
|
|
|
40848
41026
|
constructor(message?: string, options?: Omit<ComposioErrorOptions, 'code' | 'statusCode'>);
|
|
40849
41027
|
}
|
|
40850
41028
|
|
|
40851
|
-
export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BasicWithJwtConnectionDataSchema, BillcomAuthConnectionDataSchema, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioLinkConnectionDataSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, type ConnectionData, ConnectionDataSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, CustomCreateResponseCamelCaseSchema, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, GenerateURLParamsSchema, GenerateURLParamsSnakeCaseSchema, type GenerateURLParamsValidated, type GenerateURLResponseCamelCase, GenerateURLResponseCamelCaseSchema, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponseCamelCase, McpDeleteResponseCamelCaseSchema, McpDeleteResponseSchema, type McpListResponseCamelCase, McpListResponseCamelCaseSchema, McpListResponseSchema, type McpRetrieveResponseCamelCase, McpRetrieveResponseCamelCaseSchema, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpUpdateResponseCamelCase, McpUpdateResponseCamelCaseSchema, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, ToolkitErrorCodes, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
|
|
41029
|
+
export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BasicWithJwtConnectionDataSchema, BillcomAuthConnectionDataSchema, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioLinkConnectionDataSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, type ConnectionData, ConnectionDataSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, CustomCreateResponseCamelCaseSchema, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, GenerateURLParamsSchema, GenerateURLParamsSnakeCaseSchema, type GenerateURLParamsValidated, type GenerateURLResponseCamelCase, GenerateURLResponseCamelCaseSchema, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, type JSONSchemaProperty, JSONSchemaPropertySchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponseCamelCase, McpDeleteResponseCamelCaseSchema, McpDeleteResponseSchema, type McpListResponseCamelCase, McpListResponseCamelCaseSchema, McpListResponseSchema, type McpRetrieveResponseCamelCase, McpRetrieveResponseCamelCaseSchema, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpUpdateResponseCamelCase, McpUpdateResponseCamelCaseSchema, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, ToolkitErrorCodes, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
|