@composio/core 0.14.0 → 0.14.1
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/{BaseProvider-lCxnjFKQ.d.mts → BaseProvider-Dc5yKZhk.d.mts} +81 -82
- package/dist/{CustomTool-CmokRT9q.d.mts → CustomTool-4nVuwLzO.d.mts} +1 -2
- package/dist/{CustomTool-C_5NvBsX.mjs → CustomTool-l-j5HtEf.mjs} +1 -1
- package/dist/FileModifierErrors-B8V8_3VE.mjs +97 -0
- package/dist/{SsrfErrors-BQRozkeU.mjs → SsrfErrors-DNJt57GL.mjs} +5 -98
- package/dist/{Telemetry-llfvticE.mjs → Telemetry-CF0rNHu2.mjs} +2 -2
- package/dist/{cancellation-W65QRyj2.mjs → cancellation-BbJ-UQ__.mjs} +2 -2
- package/dist/{composio-6C8kHtqc.d.mts → composio-ChU3eD9F.d.mts} +260 -257
- package/dist/{customTool.types-kFhNYuzh.d.mts → customTool.types-CX2-LbfI.d.mts} +142 -109
- package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +2 -0
- package/dist/{errors-B165yJUQ.mjs → errors-BcEUHZbq.mjs} +2 -1
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-iPFi2o4i.mjs → fileUtils.node-DOkW4PBg.mjs} +5 -153
- package/dist/index.d.mts +1585 -753
- package/dist/index.mjs +14 -10
- package/dist/models/Files.node.d.mts +2 -11
- package/dist/models/Files.node.mjs +2 -2
- package/dist/models/Files.workerd.d.mts +0 -1
- package/dist/platform/node.d.mts +0 -1
- package/dist/platform/workerd.d.mts +0 -1
- package/dist/platform/workerd.mjs +27 -3
- package/dist/{sensitiveFileUploadPaths-B1OLsd8F.mjs → sensitiveFileUploadPaths-C43dHP7S.mjs} +52 -2
- package/dist/{types-yCrveqAj.d.mts → types-D5N60gUD.d.mts} +2 -3
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -2
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -2
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -2
- package/dist/utils/modifiers/FileToolModifier.node.mjs +5 -4
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -2
- package/dist/utils/ssrfGuard.node.d.mts +22 -0
- package/dist/utils/ssrfGuard.node.mjs +152 -0
- package/dist/utils/ssrfGuard.workerd.d.mts +9 -0
- package/dist/utils/ssrfGuard.workerd.mjs +17 -0
- package/package.json +14 -9
- package/src/errors/SsrfErrors.ts +4 -3
- package/src/models/ToolRouterSessionFileMount.ts +7 -3
- package/src/platform/workerd.ts +30 -3
- package/src/utils/fileUtils.node.ts +2 -2
- package/src/utils/readResponseBody.ts +63 -0
- package/src/utils/ssrfGuard.node.ts +6 -6
- package/src/utils/ssrfGuard.workerd.ts +19 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z as z$1 } from "zod/v3";
|
|
2
2
|
import { CustomCreateResponse, GenerateURLResponse, McpCreateResponse } from "@composio/client/resources/mcp";
|
|
3
|
-
|
|
4
3
|
//#region src/types/tool.types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Toolkit is the collection of tools,
|
|
@@ -13,12 +12,12 @@ declare const ToolkitSchema: z$1.ZodObject<{
|
|
|
13
12
|
name: z$1.ZodString;
|
|
14
13
|
logo: z$1.ZodOptional<z$1.ZodString>;
|
|
15
14
|
}, "strip", z$1.ZodTypeAny, {
|
|
16
|
-
slug: string;
|
|
17
15
|
name: string;
|
|
16
|
+
slug: string;
|
|
18
17
|
logo?: string | undefined;
|
|
19
18
|
}, {
|
|
20
|
-
slug: string;
|
|
21
19
|
name: string;
|
|
20
|
+
slug: string;
|
|
22
21
|
logo?: string | undefined;
|
|
23
22
|
}>;
|
|
24
23
|
type Toolkit = z$1.infer<typeof ToolkitSchema>;
|
|
@@ -162,12 +161,12 @@ declare const ToolSchema: z$1.ZodObject<{
|
|
|
162
161
|
name: z$1.ZodString;
|
|
163
162
|
logo: z$1.ZodOptional<z$1.ZodString>;
|
|
164
163
|
}, "strip", z$1.ZodTypeAny, {
|
|
165
|
-
slug: string;
|
|
166
164
|
name: string;
|
|
165
|
+
slug: string;
|
|
167
166
|
logo?: string | undefined;
|
|
168
167
|
}, {
|
|
169
|
-
slug: string;
|
|
170
168
|
name: string;
|
|
169
|
+
slug: string;
|
|
171
170
|
logo?: string | undefined;
|
|
172
171
|
}>>;
|
|
173
172
|
version: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -176,8 +175,13 @@ declare const ToolSchema: z$1.ZodObject<{
|
|
|
176
175
|
scopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
177
176
|
isNoAuth: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
178
177
|
}, "strip", z$1.ZodTypeAny, {
|
|
179
|
-
slug: string;
|
|
180
178
|
name: string;
|
|
179
|
+
slug: string;
|
|
180
|
+
toolkit?: {
|
|
181
|
+
name: string;
|
|
182
|
+
slug: string;
|
|
183
|
+
logo?: string | undefined;
|
|
184
|
+
} | undefined;
|
|
181
185
|
description?: string | undefined;
|
|
182
186
|
inputParameters?: {
|
|
183
187
|
type: "object";
|
|
@@ -212,28 +216,23 @@ declare const ToolSchema: z$1.ZodObject<{
|
|
|
212
216
|
definitions?: Record<string, any> | undefined;
|
|
213
217
|
} | undefined;
|
|
214
218
|
tags?: string[] | undefined;
|
|
215
|
-
toolkit?: {
|
|
216
|
-
slug: string;
|
|
217
|
-
name: string;
|
|
218
|
-
logo?: string | undefined;
|
|
219
|
-
} | undefined;
|
|
220
219
|
version?: string | undefined;
|
|
221
220
|
isDeprecated?: boolean | undefined;
|
|
222
221
|
availableVersions?: string[] | undefined;
|
|
223
222
|
scopes?: string[] | undefined;
|
|
224
223
|
isNoAuth?: boolean | undefined;
|
|
225
224
|
}, {
|
|
226
|
-
slug: string;
|
|
227
225
|
name: string;
|
|
228
|
-
|
|
229
|
-
inputParameters?: unknown;
|
|
230
|
-
outputParameters?: unknown;
|
|
231
|
-
tags?: string[] | undefined;
|
|
226
|
+
slug: string;
|
|
232
227
|
toolkit?: {
|
|
233
|
-
slug: string;
|
|
234
228
|
name: string;
|
|
229
|
+
slug: string;
|
|
235
230
|
logo?: string | undefined;
|
|
236
231
|
} | undefined;
|
|
232
|
+
description?: string | undefined;
|
|
233
|
+
inputParameters?: unknown;
|
|
234
|
+
outputParameters?: unknown;
|
|
235
|
+
tags?: string[] | undefined;
|
|
237
236
|
version?: string | undefined;
|
|
238
237
|
isDeprecated?: boolean | undefined;
|
|
239
238
|
availableVersions?: string[] | undefined;
|
|
@@ -377,12 +376,12 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
377
376
|
name: z$1.ZodString;
|
|
378
377
|
logo: z$1.ZodOptional<z$1.ZodString>;
|
|
379
378
|
}, "strip", z$1.ZodTypeAny, {
|
|
380
|
-
slug: string;
|
|
381
379
|
name: string;
|
|
380
|
+
slug: string;
|
|
382
381
|
logo?: string | undefined;
|
|
383
382
|
}, {
|
|
384
|
-
slug: string;
|
|
385
383
|
name: string;
|
|
384
|
+
slug: string;
|
|
386
385
|
logo?: string | undefined;
|
|
387
386
|
}>>;
|
|
388
387
|
version: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -391,8 +390,13 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
391
390
|
scopes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
392
391
|
isNoAuth: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
393
392
|
}, "strip", z$1.ZodTypeAny, {
|
|
394
|
-
slug: string;
|
|
395
393
|
name: string;
|
|
394
|
+
slug: string;
|
|
395
|
+
toolkit?: {
|
|
396
|
+
name: string;
|
|
397
|
+
slug: string;
|
|
398
|
+
logo?: string | undefined;
|
|
399
|
+
} | undefined;
|
|
396
400
|
description?: string | undefined;
|
|
397
401
|
inputParameters?: {
|
|
398
402
|
type: "object";
|
|
@@ -427,28 +431,23 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
427
431
|
definitions?: Record<string, any> | undefined;
|
|
428
432
|
} | undefined;
|
|
429
433
|
tags?: string[] | undefined;
|
|
430
|
-
toolkit?: {
|
|
431
|
-
slug: string;
|
|
432
|
-
name: string;
|
|
433
|
-
logo?: string | undefined;
|
|
434
|
-
} | undefined;
|
|
435
434
|
version?: string | undefined;
|
|
436
435
|
isDeprecated?: boolean | undefined;
|
|
437
436
|
availableVersions?: string[] | undefined;
|
|
438
437
|
scopes?: string[] | undefined;
|
|
439
438
|
isNoAuth?: boolean | undefined;
|
|
440
439
|
}, {
|
|
441
|
-
slug: string;
|
|
442
440
|
name: string;
|
|
443
|
-
|
|
444
|
-
inputParameters?: unknown;
|
|
445
|
-
outputParameters?: unknown;
|
|
446
|
-
tags?: string[] | undefined;
|
|
441
|
+
slug: string;
|
|
447
442
|
toolkit?: {
|
|
448
|
-
slug: string;
|
|
449
443
|
name: string;
|
|
444
|
+
slug: string;
|
|
450
445
|
logo?: string | undefined;
|
|
451
446
|
} | undefined;
|
|
447
|
+
description?: string | undefined;
|
|
448
|
+
inputParameters?: unknown;
|
|
449
|
+
outputParameters?: unknown;
|
|
450
|
+
tags?: string[] | undefined;
|
|
452
451
|
version?: string | undefined;
|
|
453
452
|
isDeprecated?: boolean | undefined;
|
|
454
453
|
availableVersions?: string[] | undefined;
|
|
@@ -459,8 +458,13 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
459
458
|
totalPages: z$1.ZodNumber;
|
|
460
459
|
}, "strip", z$1.ZodTypeAny, {
|
|
461
460
|
items: {
|
|
462
|
-
slug: string;
|
|
463
461
|
name: string;
|
|
462
|
+
slug: string;
|
|
463
|
+
toolkit?: {
|
|
464
|
+
name: string;
|
|
465
|
+
slug: string;
|
|
466
|
+
logo?: string | undefined;
|
|
467
|
+
} | undefined;
|
|
464
468
|
description?: string | undefined;
|
|
465
469
|
inputParameters?: {
|
|
466
470
|
type: "object";
|
|
@@ -495,11 +499,6 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
495
499
|
definitions?: Record<string, any> | undefined;
|
|
496
500
|
} | undefined;
|
|
497
501
|
tags?: string[] | undefined;
|
|
498
|
-
toolkit?: {
|
|
499
|
-
slug: string;
|
|
500
|
-
name: string;
|
|
501
|
-
logo?: string | undefined;
|
|
502
|
-
} | undefined;
|
|
503
502
|
version?: string | undefined;
|
|
504
503
|
isDeprecated?: boolean | undefined;
|
|
505
504
|
availableVersions?: string[] | undefined;
|
|
@@ -510,17 +509,17 @@ declare const ToolListResponseSchema: z$1.ZodObject<{
|
|
|
510
509
|
nextCursor?: string | null | undefined;
|
|
511
510
|
}, {
|
|
512
511
|
items: {
|
|
513
|
-
slug: string;
|
|
514
512
|
name: string;
|
|
515
|
-
|
|
516
|
-
inputParameters?: unknown;
|
|
517
|
-
outputParameters?: unknown;
|
|
518
|
-
tags?: string[] | undefined;
|
|
513
|
+
slug: string;
|
|
519
514
|
toolkit?: {
|
|
520
|
-
slug: string;
|
|
521
515
|
name: string;
|
|
516
|
+
slug: string;
|
|
522
517
|
logo?: string | undefined;
|
|
523
518
|
} | undefined;
|
|
519
|
+
description?: string | undefined;
|
|
520
|
+
inputParameters?: unknown;
|
|
521
|
+
outputParameters?: unknown;
|
|
522
|
+
tags?: string[] | undefined;
|
|
524
523
|
version?: string | undefined;
|
|
525
524
|
isDeprecated?: boolean | undefined;
|
|
526
525
|
availableVersions?: string[] | undefined;
|
|
@@ -574,22 +573,22 @@ declare const ToolListParamsSchema: z$1.ZodObject<{
|
|
|
574
573
|
authConfigIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
575
574
|
important: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
576
575
|
}, "strip", z$1.ZodTypeAny, {
|
|
577
|
-
tags?: string[] | undefined;
|
|
578
|
-
scopes?: string[] | undefined;
|
|
579
576
|
tools?: string[] | undefined;
|
|
580
577
|
toolkits?: string[] | undefined;
|
|
578
|
+
authConfigIds?: string[] | undefined;
|
|
579
|
+
tags?: string[] | undefined;
|
|
580
|
+
scopes?: string[] | undefined;
|
|
581
581
|
limit?: number | undefined;
|
|
582
582
|
search?: string | undefined;
|
|
583
|
-
authConfigIds?: string[] | undefined;
|
|
584
583
|
important?: boolean | undefined;
|
|
585
584
|
}, {
|
|
586
|
-
tags?: string[] | undefined;
|
|
587
|
-
scopes?: string[] | undefined;
|
|
588
585
|
tools?: string[] | undefined;
|
|
589
586
|
toolkits?: string[] | undefined;
|
|
587
|
+
authConfigIds?: string[] | undefined;
|
|
588
|
+
tags?: string[] | undefined;
|
|
589
|
+
scopes?: string[] | undefined;
|
|
590
590
|
limit?: number | undefined;
|
|
591
591
|
search?: string | undefined;
|
|
592
|
-
authConfigIds?: string[] | undefined;
|
|
593
592
|
important?: boolean | undefined;
|
|
594
593
|
}>;
|
|
595
594
|
type BaseParams = {
|
|
@@ -652,26 +651,26 @@ declare const CustomAuthParamsSchema: z$1.ZodObject<{
|
|
|
652
651
|
name: z$1.ZodString;
|
|
653
652
|
value: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>;
|
|
654
653
|
}, "strip", z$1.ZodTypeAny, {
|
|
655
|
-
name: string;
|
|
656
654
|
value: string | number;
|
|
655
|
+
name: string;
|
|
657
656
|
in: "query" | "header";
|
|
658
657
|
}, {
|
|
659
|
-
name: string;
|
|
660
658
|
value: string | number;
|
|
659
|
+
name: string;
|
|
661
660
|
in: "query" | "header";
|
|
662
661
|
}>, "many">;
|
|
663
662
|
}, "strip", z$1.ZodTypeAny, {
|
|
664
663
|
parameters: {
|
|
665
|
-
name: string;
|
|
666
664
|
value: string | number;
|
|
665
|
+
name: string;
|
|
667
666
|
in: "query" | "header";
|
|
668
667
|
}[];
|
|
669
668
|
baseURL?: string | undefined;
|
|
670
669
|
body?: Record<string, unknown> | undefined;
|
|
671
670
|
}, {
|
|
672
671
|
parameters: {
|
|
673
|
-
name: string;
|
|
674
672
|
value: string | number;
|
|
673
|
+
name: string;
|
|
675
674
|
in: "query" | "header";
|
|
676
675
|
}[];
|
|
677
676
|
baseURL?: string | undefined;
|
|
@@ -725,26 +724,26 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
|
|
|
725
724
|
name: z$1.ZodString;
|
|
726
725
|
value: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>;
|
|
727
726
|
}, "strip", z$1.ZodTypeAny, {
|
|
728
|
-
name: string;
|
|
729
727
|
value: string | number;
|
|
728
|
+
name: string;
|
|
730
729
|
in: "query" | "header";
|
|
731
730
|
}, {
|
|
732
|
-
name: string;
|
|
733
731
|
value: string | number;
|
|
732
|
+
name: string;
|
|
734
733
|
in: "query" | "header";
|
|
735
734
|
}>, "many">;
|
|
736
735
|
}, "strip", z$1.ZodTypeAny, {
|
|
737
736
|
parameters: {
|
|
738
|
-
name: string;
|
|
739
737
|
value: string | number;
|
|
738
|
+
name: string;
|
|
740
739
|
in: "query" | "header";
|
|
741
740
|
}[];
|
|
742
741
|
baseURL?: string | undefined;
|
|
743
742
|
body?: Record<string, unknown> | undefined;
|
|
744
743
|
}, {
|
|
745
744
|
parameters: {
|
|
746
|
-
name: string;
|
|
747
745
|
value: string | number;
|
|
746
|
+
name: string;
|
|
748
747
|
in: "query" | "header";
|
|
749
748
|
}[];
|
|
750
749
|
baseURL?: string | undefined;
|
|
@@ -2733,13 +2732,14 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
|
|
|
2733
2732
|
dangerouslySkipVersionCheck: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2734
2733
|
text: z$1.ZodOptional<z$1.ZodString>;
|
|
2735
2734
|
}, "strip", z$1.ZodTypeAny, {
|
|
2735
|
+
userId?: string | undefined;
|
|
2736
2736
|
version?: string | undefined;
|
|
2737
2737
|
allowTracing?: boolean | undefined;
|
|
2738
2738
|
connectedAccountId?: string | undefined;
|
|
2739
2739
|
customAuthParams?: {
|
|
2740
2740
|
parameters: {
|
|
2741
|
-
name: string;
|
|
2742
2741
|
value: string | number;
|
|
2742
|
+
name: string;
|
|
2743
2743
|
in: "query" | "header";
|
|
2744
2744
|
}[];
|
|
2745
2745
|
baseURL?: string | undefined;
|
|
@@ -3160,17 +3160,17 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
|
|
|
3160
3160
|
};
|
|
3161
3161
|
} | undefined;
|
|
3162
3162
|
arguments?: Record<string, unknown> | undefined;
|
|
3163
|
-
userId?: string | undefined;
|
|
3164
3163
|
dangerouslySkipVersionCheck?: boolean | undefined;
|
|
3165
3164
|
text?: string | undefined;
|
|
3166
3165
|
}, {
|
|
3166
|
+
userId?: string | undefined;
|
|
3167
3167
|
version?: string | undefined;
|
|
3168
3168
|
allowTracing?: boolean | undefined;
|
|
3169
3169
|
connectedAccountId?: string | undefined;
|
|
3170
3170
|
customAuthParams?: {
|
|
3171
3171
|
parameters: {
|
|
3172
|
-
name: string;
|
|
3173
3172
|
value: string | number;
|
|
3173
|
+
name: string;
|
|
3174
3174
|
in: "query" | "header";
|
|
3175
3175
|
}[];
|
|
3176
3176
|
baseURL?: string | undefined;
|
|
@@ -3591,7 +3591,6 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
|
|
|
3591
3591
|
};
|
|
3592
3592
|
} | undefined;
|
|
3593
3593
|
arguments?: Record<string, unknown> | undefined;
|
|
3594
|
-
userId?: string | undefined;
|
|
3595
3594
|
dangerouslySkipVersionCheck?: boolean | undefined;
|
|
3596
3595
|
text?: string | undefined;
|
|
3597
3596
|
}>;
|
|
@@ -3617,14 +3616,14 @@ declare const ToolExecuteResponseSchema: z$1.ZodObject<{
|
|
|
3617
3616
|
logId: z$1.ZodOptional<z$1.ZodString>;
|
|
3618
3617
|
sessionInfo: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
3619
3618
|
}, "strip", z$1.ZodTypeAny, {
|
|
3620
|
-
data: Record<string, unknown>;
|
|
3621
3619
|
error: string | null;
|
|
3620
|
+
data: Record<string, unknown>;
|
|
3622
3621
|
successful: boolean;
|
|
3623
3622
|
logId?: string | undefined;
|
|
3624
3623
|
sessionInfo?: unknown;
|
|
3625
3624
|
}, {
|
|
3626
|
-
data: Record<string, unknown>;
|
|
3627
3625
|
error: string | null;
|
|
3626
|
+
data: Record<string, unknown>;
|
|
3628
3627
|
successful: boolean;
|
|
3629
3628
|
logId?: string | undefined;
|
|
3630
3629
|
sessionInfo?: unknown;
|
|
@@ -3639,12 +3638,12 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
|
|
|
3639
3638
|
name: z$1.ZodString;
|
|
3640
3639
|
value: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>;
|
|
3641
3640
|
}, "strip", z$1.ZodTypeAny, {
|
|
3642
|
-
name: string;
|
|
3643
3641
|
value: string | number;
|
|
3642
|
+
name: string;
|
|
3644
3643
|
in: "query" | "header";
|
|
3645
3644
|
}, {
|
|
3646
|
-
name: string;
|
|
3647
3645
|
value: string | number;
|
|
3646
|
+
name: string;
|
|
3648
3647
|
in: "query" | "header";
|
|
3649
3648
|
}>, "many">>;
|
|
3650
3649
|
connectedAccountId: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -5633,8 +5632,8 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
|
|
|
5633
5632
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
5634
5633
|
body?: unknown;
|
|
5635
5634
|
parameters?: {
|
|
5636
|
-
name: string;
|
|
5637
5635
|
value: string | number;
|
|
5636
|
+
name: string;
|
|
5638
5637
|
in: "query" | "header";
|
|
5639
5638
|
}[] | undefined;
|
|
5640
5639
|
connectedAccountId?: string | undefined;
|
|
@@ -6057,8 +6056,8 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
|
|
|
6057
6056
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
6058
6057
|
body?: unknown;
|
|
6059
6058
|
parameters?: {
|
|
6060
|
-
name: string;
|
|
6061
6059
|
value: string | number;
|
|
6060
|
+
name: string;
|
|
6062
6061
|
in: "query" | "header";
|
|
6063
6062
|
}[] | undefined;
|
|
6064
6063
|
connectedAccountId?: string | undefined;
|
|
@@ -28731,7 +28730,7 @@ declare const MCPServerSchema: z$1.ZodObject<{
|
|
|
28731
28730
|
}>]>;
|
|
28732
28731
|
}, "strip", z$1.ZodTypeAny, {
|
|
28733
28732
|
type: "single" | "multi";
|
|
28734
|
-
status: "
|
|
28733
|
+
status: "active" | "inactive" | "error";
|
|
28735
28734
|
id: string;
|
|
28736
28735
|
createdAt: string;
|
|
28737
28736
|
updatedAt: string;
|
|
@@ -28758,7 +28757,7 @@ declare const MCPServerSchema: z$1.ZodObject<{
|
|
|
28758
28757
|
tools: string[];
|
|
28759
28758
|
toolkits: string[];
|
|
28760
28759
|
};
|
|
28761
|
-
status?: "
|
|
28760
|
+
status?: "active" | "inactive" | "error" | undefined;
|
|
28762
28761
|
}>;
|
|
28763
28762
|
type MCPServer = z$1.infer<typeof MCPServerSchema>;
|
|
28764
28763
|
/**
|
|
@@ -28798,7 +28797,7 @@ declare const MCPServerListResponseSchema: z$1.ZodObject<{
|
|
|
28798
28797
|
}>]>;
|
|
28799
28798
|
}, "strip", z$1.ZodTypeAny, {
|
|
28800
28799
|
type: "single" | "multi";
|
|
28801
|
-
status: "
|
|
28800
|
+
status: "active" | "inactive" | "error";
|
|
28802
28801
|
id: string;
|
|
28803
28802
|
createdAt: string;
|
|
28804
28803
|
updatedAt: string;
|
|
@@ -28825,7 +28824,7 @@ declare const MCPServerListResponseSchema: z$1.ZodObject<{
|
|
|
28825
28824
|
tools: string[];
|
|
28826
28825
|
toolkits: string[];
|
|
28827
28826
|
};
|
|
28828
|
-
status?: "
|
|
28827
|
+
status?: "active" | "inactive" | "error" | undefined;
|
|
28829
28828
|
}>, "many">;
|
|
28830
28829
|
total: z$1.ZodNumber;
|
|
28831
28830
|
page: z$1.ZodNumber;
|
|
@@ -28833,7 +28832,7 @@ declare const MCPServerListResponseSchema: z$1.ZodObject<{
|
|
|
28833
28832
|
}, "strip", z$1.ZodTypeAny, {
|
|
28834
28833
|
items: {
|
|
28835
28834
|
type: "single" | "multi";
|
|
28836
|
-
status: "
|
|
28835
|
+
status: "active" | "inactive" | "error";
|
|
28837
28836
|
id: string;
|
|
28838
28837
|
createdAt: string;
|
|
28839
28838
|
updatedAt: string;
|
|
@@ -28865,7 +28864,7 @@ declare const MCPServerListResponseSchema: z$1.ZodObject<{
|
|
|
28865
28864
|
tools: string[];
|
|
28866
28865
|
toolkits: string[];
|
|
28867
28866
|
};
|
|
28868
|
-
status?: "
|
|
28867
|
+
status?: "active" | "inactive" | "error" | undefined;
|
|
28869
28868
|
}[];
|
|
28870
28869
|
total: number;
|
|
28871
28870
|
page: number;
|
|
@@ -28880,13 +28879,13 @@ declare const MCPServerUpdateParamsSchema: z$1.ZodObject<{
|
|
|
28880
28879
|
toolkits: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
28881
28880
|
allowedTools: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
|
|
28882
28881
|
}, "strip", z$1.ZodTypeAny, {
|
|
28882
|
+
allowedTools?: string[] | undefined;
|
|
28883
28883
|
name?: string | undefined;
|
|
28884
28884
|
toolkits?: string[] | undefined;
|
|
28885
|
-
allowedTools?: string[] | undefined;
|
|
28886
28885
|
}, {
|
|
28886
|
+
allowedTools?: string[] | undefined;
|
|
28887
28887
|
name?: string | undefined;
|
|
28888
28888
|
toolkits?: string[] | undefined;
|
|
28889
|
-
allowedTools?: string[] | undefined;
|
|
28890
28889
|
}>;
|
|
28891
28890
|
type MCPServerUpdateParams = z$1.infer<typeof MCPServerUpdateParamsSchema>;
|
|
28892
28891
|
/**
|
|
@@ -28925,7 +28924,7 @@ declare const MCPServerCreateResponseSchema: z$1.ZodObject<{
|
|
|
28925
28924
|
}>]>;
|
|
28926
28925
|
}, "strip", z$1.ZodTypeAny, {
|
|
28927
28926
|
type: "single" | "multi";
|
|
28928
|
-
status: "
|
|
28927
|
+
status: "active" | "inactive" | "error";
|
|
28929
28928
|
id: string;
|
|
28930
28929
|
createdAt: string;
|
|
28931
28930
|
updatedAt: string;
|
|
@@ -28952,7 +28951,7 @@ declare const MCPServerCreateResponseSchema: z$1.ZodObject<{
|
|
|
28952
28951
|
tools: string[];
|
|
28953
28952
|
toolkits: string[];
|
|
28954
28953
|
};
|
|
28955
|
-
status?: "
|
|
28954
|
+
status?: "active" | "inactive" | "error" | undefined;
|
|
28956
28955
|
}>;
|
|
28957
28956
|
type MCPServerCreateResponse = z$1.infer<typeof MCPServerCreateResponseSchema>;
|
|
28958
28957
|
/**
|
|
@@ -29147,8 +29146,8 @@ declare const McpRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
29147
29146
|
windsurf: string;
|
|
29148
29147
|
}>;
|
|
29149
29148
|
}, "strip", z$1.ZodTypeAny, {
|
|
29150
|
-
name: string;
|
|
29151
29149
|
mcpUrl: string;
|
|
29150
|
+
name: string;
|
|
29152
29151
|
id: string;
|
|
29153
29152
|
commands: {
|
|
29154
29153
|
claude: string;
|
|
@@ -29158,13 +29157,13 @@ declare const McpRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
29158
29157
|
status?: string | undefined;
|
|
29159
29158
|
tools?: string[] | undefined;
|
|
29160
29159
|
toolkits?: string[] | undefined;
|
|
29161
|
-
authConfigIds?: string[] | undefined;
|
|
29162
29160
|
createdAt?: string | undefined;
|
|
29163
29161
|
updatedAt?: string | undefined;
|
|
29164
29162
|
managedAuthViaComposio?: boolean | undefined;
|
|
29163
|
+
authConfigIds?: string[] | undefined;
|
|
29165
29164
|
}, {
|
|
29166
|
-
name: string;
|
|
29167
29165
|
mcpUrl: string;
|
|
29166
|
+
name: string;
|
|
29168
29167
|
id: string;
|
|
29169
29168
|
commands: {
|
|
29170
29169
|
claude: string;
|
|
@@ -29174,10 +29173,10 @@ declare const McpRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
29174
29173
|
status?: string | undefined;
|
|
29175
29174
|
tools?: string[] | undefined;
|
|
29176
29175
|
toolkits?: string[] | undefined;
|
|
29177
|
-
authConfigIds?: string[] | undefined;
|
|
29178
29176
|
createdAt?: string | undefined;
|
|
29179
29177
|
updatedAt?: string | undefined;
|
|
29180
29178
|
managedAuthViaComposio?: boolean | undefined;
|
|
29179
|
+
authConfigIds?: string[] | undefined;
|
|
29181
29180
|
}>;
|
|
29182
29181
|
declare const ComposioMcpRetrieveResponseSchema: z$1.ZodObject<{
|
|
29183
29182
|
id: z$1.ZodString;
|
|
@@ -29339,7 +29338,7 @@ declare abstract class BaseProvider<TMcpResponse> {
|
|
|
29339
29338
|
* for MCP server responses.
|
|
29340
29339
|
*
|
|
29341
29340
|
* @param data - The MCP URL response data
|
|
29342
|
-
|
|
29341
|
+
* @returns Transformed response in provider-specific format, or undefined to use default transformation
|
|
29343
29342
|
*/
|
|
29344
29343
|
wrapMcpServerResponse?(data: McpUrlResponse): TMcpResponse;
|
|
29345
29344
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-
|
|
1
|
+
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-CX2-LbfI.mjs";
|
|
2
2
|
import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/models/CustomTool.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Create a custom tool for use in tool router sessions.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { r as ComposioError } from "./SsrfErrors-DNJt57GL.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/FileModifierErrors.ts
|
|
4
|
+
const FileModifierErrorCodes = {
|
|
5
|
+
FILE_UPLOAD_FAILED: "FILE_UPLOAD_FAILED",
|
|
6
|
+
SENSITIVE_FILE_PATH_BLOCKED: "SENSITIVE_FILE_PATH_BLOCKED",
|
|
7
|
+
FILE_UPLOAD_ABORTED: "FILE_UPLOAD_ABORTED",
|
|
8
|
+
FILE_UPLOAD_PATH_NOT_ALLOWED: "FILE_UPLOAD_PATH_NOT_ALLOWED",
|
|
9
|
+
FILE_NOT_FOUND: "FILE_NOT_FOUND"
|
|
10
|
+
};
|
|
11
|
+
var ComposioFileUploadError = class extends ComposioError {
|
|
12
|
+
constructor(message = "Failed to upload file", options = {}) {
|
|
13
|
+
super(message, {
|
|
14
|
+
...options,
|
|
15
|
+
code: options.code ?? FileModifierErrorCodes.FILE_UPLOAD_FAILED,
|
|
16
|
+
possibleFixes: options.possibleFixes || ["Check if the file exists in the location provided"]
|
|
17
|
+
});
|
|
18
|
+
this.name = "ComposioFileUploadError";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Thrown when a local file path is refused before upload (sensitive directory or
|
|
23
|
+
* credential-like file name). Subclass of {@link ComposioFileUploadError} so existing
|
|
24
|
+
* `instanceof ComposioFileUploadError` handlers still apply.
|
|
25
|
+
*/
|
|
26
|
+
var ComposioSensitiveFilePathBlockedError = class extends ComposioFileUploadError {
|
|
27
|
+
constructor(message, options = {}) {
|
|
28
|
+
super(message, {
|
|
29
|
+
...options,
|
|
30
|
+
code: FileModifierErrorCodes.SENSITIVE_FILE_PATH_BLOCKED,
|
|
31
|
+
possibleFixes: options.possibleFixes ?? [
|
|
32
|
+
"Use a file outside ~/.ssh, ~/.aws, and other credential locations",
|
|
33
|
+
"Set sensitiveFileUploadProtection: false only if you understand the risk",
|
|
34
|
+
"Add path segments to block with fileUploadPathDenySegments"
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
this.name = "ComposioSensitiveFilePathBlockedError";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Thrown when a `beforeFileUpload` hook returns `false`.
|
|
42
|
+
*/
|
|
43
|
+
var ComposioFileUploadAbortedError = class extends ComposioFileUploadError {
|
|
44
|
+
constructor(message, options = {}) {
|
|
45
|
+
super(message, {
|
|
46
|
+
...options,
|
|
47
|
+
code: FileModifierErrorCodes.FILE_UPLOAD_ABORTED,
|
|
48
|
+
possibleFixes: options.possibleFixes ?? ["Change beforeFileUpload to return a file path to upload, or allow the upload to proceed"]
|
|
49
|
+
});
|
|
50
|
+
this.name = "ComposioFileUploadAbortedError";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Thrown when automatic file upload during tool execution is attempted from a path
|
|
55
|
+
* that is outside the configured {@link ComposioConfig.fileUploadDirs} allowlist.
|
|
56
|
+
*
|
|
57
|
+
* This only fires for auto-upload (enabled via
|
|
58
|
+
* `dangerouslyAllowAutoUploadDownloadFiles: true`). Manual `composio.files.upload()`
|
|
59
|
+
* calls are never subject to this check.
|
|
60
|
+
*/
|
|
61
|
+
var ComposioFileUploadPathNotAllowedError = class extends ComposioFileUploadError {
|
|
62
|
+
constructor(message, options = {}) {
|
|
63
|
+
super(message, {
|
|
64
|
+
...options,
|
|
65
|
+
code: FileModifierErrorCodes.FILE_UPLOAD_PATH_NOT_ALLOWED,
|
|
66
|
+
possibleFixes: options.possibleFixes ?? [
|
|
67
|
+
"Move the file under one of the directories in `fileUploadDirs`",
|
|
68
|
+
"Stage the file under the default upload dir (`~/.composio/temp`)",
|
|
69
|
+
"Add the containing directory to `fileUploadDirs` when constructing Composio",
|
|
70
|
+
"Pass the file by URL or as a File/Blob object instead of a filesystem path"
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
this.name = "ComposioFileUploadPathNotAllowedError";
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Thrown when a local file path passed for upload does not exist on disk.
|
|
78
|
+
* Provides extra debugging context (resolved absolute path, cwd, allowlist state)
|
|
79
|
+
* to help the caller distinguish between "typo" and "not-allowlisted" failures.
|
|
80
|
+
*/
|
|
81
|
+
var ComposioFileNotFoundError = class extends ComposioFileUploadError {
|
|
82
|
+
constructor(message, options = {}) {
|
|
83
|
+
super(message, {
|
|
84
|
+
...options,
|
|
85
|
+
code: FileModifierErrorCodes.FILE_NOT_FOUND,
|
|
86
|
+
possibleFixes: options.possibleFixes ?? [
|
|
87
|
+
"Double-check the path for typos",
|
|
88
|
+
"Remember relative paths are resolved against process.cwd() at upload time",
|
|
89
|
+
"Verify the file exists and the process has read permission"
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
this.name = "ComposioFileNotFoundError";
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
export { ComposioSensitiveFilePathBlockedError as a, ComposioFileUploadPathNotAllowedError as i, ComposioFileUploadAbortedError as n, FileModifierErrorCodes as o, ComposioFileUploadError as r, ComposioFileNotFoundError as t };
|