@eraserlabs/eraser-mcp 0.3.3-next.4 → 0.3.3-next.6
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.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/schemas/diagrams.d.ts +6 -38
- package/dist/schemas/diagrams.d.ts.map +1 -1
- package/dist/schemas/files.d.ts +29 -73
- package/dist/schemas/files.d.ts.map +1 -1
- package/dist/schemas/files.js +3 -3
- package/dist/schemas/renderElements.d.ts +40 -109
- package/dist/schemas/renderElements.d.ts.map +1 -1
- package/dist/schemas/renderPrompt.d.ts +42 -96
- package/dist/schemas/renderPrompt.d.ts.map +1 -1
- package/dist/schemas/shared.d.ts +60 -87
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/shared.js +2 -7
- package/dist/schemas/singleDiagram.d.ts +38 -59
- package/dist/schemas/singleDiagram.d.ts.map +1 -1
- package/dist/stdio.js +17 -7
- package/dist/tools.d.ts +1 -12
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +21 -22
- package/package.json +5 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export * from './tools';
|
|
2
|
+
export * from './schemas/files';
|
|
3
|
+
export * from './schemas/diagrams';
|
|
4
|
+
export * from './schemas/renderPrompt';
|
|
5
|
+
export * from './schemas/renderElements';
|
|
6
|
+
export * from './schemas/singleDiagram';
|
|
7
|
+
export * from './schemas/shared';
|
|
2
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,3 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./tools"), exports);
|
|
18
|
+
__exportStar(require("./schemas/files"), exports);
|
|
19
|
+
__exportStar(require("./schemas/diagrams"), exports);
|
|
20
|
+
__exportStar(require("./schemas/renderPrompt"), exports);
|
|
21
|
+
__exportStar(require("./schemas/renderElements"), exports);
|
|
22
|
+
__exportStar(require("./schemas/singleDiagram"), exports);
|
|
23
|
+
__exportStar(require("./schemas/shared"), exports);
|
|
@@ -1,57 +1,25 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const listDiagramsSchema: z.ZodObject<{
|
|
3
3
|
fileId: z.ZodString;
|
|
4
|
-
},
|
|
5
|
-
fileId: string;
|
|
6
|
-
}, {
|
|
7
|
-
fileId: string;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export declare const getDiagramSchema: z.ZodObject<{
|
|
10
6
|
fileId: z.ZodString;
|
|
11
7
|
diagramId: z.ZodString;
|
|
12
|
-
},
|
|
13
|
-
fileId: string;
|
|
14
|
-
diagramId: string;
|
|
15
|
-
}, {
|
|
16
|
-
fileId: string;
|
|
17
|
-
diagramId: string;
|
|
18
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
19
9
|
export declare const createDiagramSchema: z.ZodObject<{
|
|
20
10
|
fileId: z.ZodString;
|
|
21
|
-
diagramType: z.
|
|
11
|
+
diagramType: z.ZodEnum<typeof import("./shared").DiagramTypes>;
|
|
22
12
|
code: z.ZodOptional<z.ZodString>;
|
|
23
|
-
},
|
|
24
|
-
diagramType: import("./shared").DiagramTypes;
|
|
25
|
-
fileId: string;
|
|
26
|
-
code?: string | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
diagramType: import("./shared").DiagramTypes;
|
|
29
|
-
fileId: string;
|
|
30
|
-
code?: string | undefined;
|
|
31
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
32
14
|
export declare const updateDiagramSchema: z.ZodObject<{
|
|
33
15
|
fileId: z.ZodString;
|
|
34
16
|
diagramId: z.ZodString;
|
|
35
17
|
code: z.ZodString;
|
|
36
|
-
},
|
|
37
|
-
code: string;
|
|
38
|
-
fileId: string;
|
|
39
|
-
diagramId: string;
|
|
40
|
-
}, {
|
|
41
|
-
code: string;
|
|
42
|
-
fileId: string;
|
|
43
|
-
diagramId: string;
|
|
44
|
-
}>;
|
|
18
|
+
}, z.core.$strip>;
|
|
45
19
|
export declare const deleteDiagramSchema: z.ZodObject<{
|
|
46
20
|
fileId: z.ZodString;
|
|
47
21
|
diagramId: z.ZodString;
|
|
48
|
-
},
|
|
49
|
-
fileId: string;
|
|
50
|
-
diagramId: string;
|
|
51
|
-
}, {
|
|
52
|
-
fileId: string;
|
|
53
|
-
diagramId: string;
|
|
54
|
-
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
55
23
|
export type ListDiagramsInput = z.infer<typeof listDiagramsSchema>;
|
|
56
24
|
export type GetDiagramInput = z.infer<typeof getDiagramSchema>;
|
|
57
25
|
export type CreateDiagramInput = z.infer<typeof createDiagramSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagrams.d.ts","sourceRoot":"","sources":["../../src/schemas/diagrams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"diagrams.d.ts","sourceRoot":"","sources":["../../src/schemas/diagrams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;iBAE7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/schemas/files.d.ts
CHANGED
|
@@ -4,98 +4,54 @@ export declare const createFileSchema: z.ZodObject<{
|
|
|
4
4
|
document: z.ZodOptional<z.ZodString>;
|
|
5
5
|
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
6
|
type: z.ZodLiteral<"diagram">;
|
|
7
|
-
diagramType: z.
|
|
7
|
+
diagramType: z.ZodEnum<typeof import("./shared").DiagramTypes>;
|
|
8
8
|
code: z.ZodString;
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
9
|
+
}, z.core.$strip>>>;
|
|
10
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
"no-link-access": "no-link-access";
|
|
12
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
13
|
+
"publicly-viewable": "publicly-viewable";
|
|
14
|
+
"publicly-editable": "publicly-editable";
|
|
15
|
+
"sso-readable": "sso-readable";
|
|
16
|
+
"sso-editable": "sso-editable";
|
|
17
|
+
}>>;
|
|
19
18
|
folderId: z.ZodOptional<z.ZodString>;
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
title?: string | undefined;
|
|
23
|
-
document?: string | undefined;
|
|
24
|
-
elements?: {
|
|
25
|
-
type: "diagram";
|
|
26
|
-
code: string;
|
|
27
|
-
diagramType: import("./shared").DiagramTypes;
|
|
28
|
-
}[] | undefined;
|
|
29
|
-
folderId?: string | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
document?: string | undefined;
|
|
34
|
-
elements?: {
|
|
35
|
-
type: "diagram";
|
|
36
|
-
code: string;
|
|
37
|
-
diagramType: import("./shared").DiagramTypes;
|
|
38
|
-
}[] | undefined;
|
|
39
|
-
folderId?: string | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
declare const sortFields: readonly ["createdAt", "updatedAt"];
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const FILE_SORT_FIELDS: readonly ["createdAt", "updatedAt"];
|
|
42
21
|
export declare const listFilesSchema: z.ZodObject<{
|
|
43
22
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
44
23
|
cursor: z.ZodOptional<z.ZodString>;
|
|
45
24
|
folderId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
sort: z.ZodOptional<z.ZodEnum<
|
|
25
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
createdAt: "createdAt";
|
|
27
|
+
updatedAt: "updatedAt";
|
|
28
|
+
}>>;
|
|
47
29
|
author: z.ZodOptional<z.ZodString>;
|
|
48
|
-
},
|
|
49
|
-
sort?: "createdAt" | "updatedAt" | undefined;
|
|
50
|
-
folderId?: string | undefined;
|
|
51
|
-
limit?: number | undefined;
|
|
52
|
-
cursor?: string | undefined;
|
|
53
|
-
author?: string | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
sort?: "createdAt" | "updatedAt" | undefined;
|
|
56
|
-
folderId?: string | undefined;
|
|
57
|
-
limit?: number | undefined;
|
|
58
|
-
cursor?: string | undefined;
|
|
59
|
-
author?: string | undefined;
|
|
60
|
-
}>;
|
|
30
|
+
}, z.core.$strip>;
|
|
61
31
|
export declare const getFileSchema: z.ZodObject<{
|
|
62
32
|
fileId: z.ZodString;
|
|
63
|
-
},
|
|
64
|
-
fileId: string;
|
|
65
|
-
}, {
|
|
66
|
-
fileId: string;
|
|
67
|
-
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
68
34
|
export declare const updateFileSchema: z.ZodObject<{
|
|
69
35
|
fileId: z.ZodString;
|
|
70
36
|
title: z.ZodOptional<z.ZodString>;
|
|
71
37
|
folderId: z.ZodOptional<z.ZodString>;
|
|
72
38
|
document: z.ZodOptional<z.ZodString>;
|
|
73
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
83
|
-
title?: string | undefined;
|
|
84
|
-
document?: string | undefined;
|
|
85
|
-
folderId?: string | undefined;
|
|
86
|
-
}>;
|
|
39
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
"no-link-access": "no-link-access";
|
|
41
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
42
|
+
"publicly-viewable": "publicly-viewable";
|
|
43
|
+
"publicly-editable": "publicly-editable";
|
|
44
|
+
"sso-readable": "sso-readable";
|
|
45
|
+
"sso-editable": "sso-editable";
|
|
46
|
+
}>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
87
48
|
export declare const archiveFileSchema: z.ZodObject<{
|
|
88
49
|
fileId: z.ZodString;
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
}, {
|
|
92
|
-
fileId: string;
|
|
93
|
-
}>;
|
|
94
|
-
export type FileSortFields = typeof sortFields[number];
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type FileSortFields = typeof FILE_SORT_FIELDS[number];
|
|
95
52
|
export type CreateFileInput = z.infer<typeof createFileSchema>;
|
|
96
53
|
export type ListFilesInput = z.infer<typeof listFilesSchema>;
|
|
97
54
|
export type GetFileInput = z.infer<typeof getFileSchema>;
|
|
98
55
|
export type UpdateFileInput = z.infer<typeof updateFileSchema>;
|
|
99
56
|
export type ArchiveFileInput = z.infer<typeof archiveFileSchema>;
|
|
100
|
-
export {};
|
|
101
57
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/schemas/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/schemas/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;iBAoB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,qCAAsC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;iBAM1B,CAAC;AAEH,eAAO,MAAM,aAAa;;iBAExB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;iBAE5B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/schemas/files.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.archiveFileSchema = exports.updateFileSchema = exports.getFileSchema = exports.listFilesSchema = exports.createFileSchema = void 0;
|
|
3
|
+
exports.archiveFileSchema = exports.updateFileSchema = exports.getFileSchema = exports.listFilesSchema = exports.FILE_SORT_FIELDS = exports.createFileSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("./shared");
|
|
6
6
|
exports.createFileSchema = zod_1.z.object({
|
|
@@ -20,12 +20,12 @@ exports.createFileSchema = zod_1.z.object({
|
|
|
20
20
|
linkAccess: shared_1.LinkAccessEnum.optional().describe('Optional link sharing access level. Defaults to using team config.'),
|
|
21
21
|
folderId: zod_1.z.string().optional().describe('Folder ID to create the file in.'),
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
exports.FILE_SORT_FIELDS = ['createdAt', 'updatedAt'];
|
|
24
24
|
exports.listFilesSchema = zod_1.z.object({
|
|
25
25
|
limit: zod_1.z.number().optional().describe('Maximum number of files to return (1-500). Defaults to 100.'),
|
|
26
26
|
cursor: zod_1.z.string().optional().describe('Cursor for pagination. Use nextCursor from a previous response.'),
|
|
27
27
|
folderId: zod_1.z.string().optional().describe('Filter files by folder ID.'),
|
|
28
|
-
sort: zod_1.z.enum(
|
|
28
|
+
sort: zod_1.z.enum(exports.FILE_SORT_FIELDS).optional().describe('Sort field with optional "-" prefix for descending. Examples: "-updatedAt" (default), "createdAt". Valid fields: createdAt, updatedAt.'),
|
|
29
29
|
author: zod_1.z.string().optional().describe('Filter by author (user ID or email address).'),
|
|
30
30
|
});
|
|
31
31
|
exports.getFileSchema = zod_1.z.object({
|
|
@@ -1,124 +1,55 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const renderElementsSchema: z.ZodObject<{
|
|
3
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
3
|
+
imageQuality: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
4
4
|
background: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
theme: z.ZodOptional<z.ZodEnum<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
9
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
10
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
11
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
13
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
create?: boolean | undefined;
|
|
17
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
create?: boolean | undefined;
|
|
20
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
5
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
light: "light";
|
|
7
|
+
dark: "dark";
|
|
21
8
|
}>>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
47
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
48
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
49
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
50
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
51
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
53
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
55
|
-
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
create?: boolean | undefined;
|
|
57
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
create?: boolean | undefined;
|
|
60
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
9
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
png: "png";
|
|
11
|
+
jpeg: "jpeg";
|
|
12
|
+
}>>;
|
|
13
|
+
typeface: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
rough: "rough";
|
|
15
|
+
clean: "clean";
|
|
16
|
+
mono: "mono";
|
|
17
|
+
}>>;
|
|
18
|
+
colorMode: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
pastel: "pastel";
|
|
20
|
+
bold: "bold";
|
|
21
|
+
outline: "outline";
|
|
22
|
+
}>>;
|
|
23
|
+
styleMode: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
plain: "plain";
|
|
25
|
+
shadow: "shadow";
|
|
26
|
+
watercolor: "watercolor";
|
|
27
|
+
}>>;
|
|
28
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
up: "up";
|
|
30
|
+
down: "down";
|
|
31
|
+
left: "left";
|
|
32
|
+
right: "right";
|
|
61
33
|
}>>;
|
|
62
|
-
} & {
|
|
63
|
-
elements: z.ZodArray<z.ZodObject<{
|
|
64
|
-
type: z.ZodLiteral<"diagram">;
|
|
65
|
-
diagramType: z.ZodNativeEnum<typeof import("./shared").DiagramTypes>;
|
|
66
|
-
code: z.ZodString;
|
|
67
|
-
x: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
y: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
type: "diagram";
|
|
71
|
-
code: string;
|
|
72
|
-
diagramType: import("./shared").DiagramTypes;
|
|
73
|
-
x?: number | undefined;
|
|
74
|
-
y?: number | undefined;
|
|
75
|
-
}, {
|
|
76
|
-
type: "diagram";
|
|
77
|
-
code: string;
|
|
78
|
-
diagramType: import("./shared").DiagramTypes;
|
|
79
|
-
x?: number | undefined;
|
|
80
|
-
y?: number | undefined;
|
|
81
|
-
}>, "many">;
|
|
82
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
83
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
84
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
86
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
87
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
88
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
89
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
90
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
91
34
|
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
92
35
|
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
93
36
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
37
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"no-link-access": "no-link-access";
|
|
39
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
40
|
+
"publicly-viewable": "publicly-viewable";
|
|
41
|
+
"publicly-editable": "publicly-editable";
|
|
42
|
+
"sso-readable": "sso-readable";
|
|
43
|
+
"sso-editable": "sso-editable";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
103
46
|
elements: z.ZodArray<z.ZodObject<{
|
|
104
47
|
type: z.ZodLiteral<"diagram">;
|
|
105
|
-
diagramType: z.
|
|
48
|
+
diagramType: z.ZodEnum<typeof import("./shared").DiagramTypes>;
|
|
106
49
|
code: z.ZodString;
|
|
107
50
|
x: z.ZodOptional<z.ZodNumber>;
|
|
108
51
|
y: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
code: string;
|
|
112
|
-
diagramType: import("./shared").DiagramTypes;
|
|
113
|
-
x?: number | undefined;
|
|
114
|
-
y?: number | undefined;
|
|
115
|
-
}, {
|
|
116
|
-
type: "diagram";
|
|
117
|
-
code: string;
|
|
118
|
-
diagramType: import("./shared").DiagramTypes;
|
|
119
|
-
x?: number | undefined;
|
|
120
|
-
y?: number | undefined;
|
|
121
|
-
}>, "many">;
|
|
122
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$loose>;
|
|
123
54
|
export type RenderElementsInput = z.infer<typeof renderElementsSchema>;
|
|
124
55
|
//# sourceMappingURL=renderElements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderElements.d.ts","sourceRoot":"","sources":["../../src/schemas/renderElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"renderElements.d.ts","sourceRoot":"","sources":["../../src/schemas/renderElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjB,CAAC;AAEjB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,115 +1,61 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const renderPromptSchema: z.ZodObject<{
|
|
3
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
3
|
+
imageQuality: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
4
4
|
background: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
theme: z.ZodOptional<z.ZodEnum<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
9
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
10
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
11
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
13
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
create?: boolean | undefined;
|
|
17
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
create?: boolean | undefined;
|
|
20
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
5
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
light: "light";
|
|
7
|
+
dark: "dark";
|
|
21
8
|
}>>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
priorRequestId: z.ZodOptional<z.ZodString>;
|
|
26
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
27
|
-
contextId: z.ZodOptional<z.ZodString>;
|
|
28
|
-
mode: z.ZodOptional<z.ZodEnum<["standard", "premium"]>>;
|
|
29
|
-
git: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
repoName: z.ZodString;
|
|
31
|
-
orgName: z.ZodString;
|
|
32
|
-
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
repoName: string;
|
|
34
|
-
orgName: string;
|
|
35
|
-
}, {
|
|
36
|
-
repoName: string;
|
|
37
|
-
orgName: string;
|
|
9
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
png: "png";
|
|
11
|
+
jpeg: "jpeg";
|
|
38
12
|
}>>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
44
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
45
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
46
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
47
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
48
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
50
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
52
|
-
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
create?: boolean | undefined;
|
|
54
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
create?: boolean | undefined;
|
|
57
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
13
|
+
typeface: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
rough: "rough";
|
|
15
|
+
clean: "clean";
|
|
16
|
+
mono: "mono";
|
|
58
17
|
}>>;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
orgName: string;
|
|
18
|
+
colorMode: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
pastel: "pastel";
|
|
20
|
+
bold: "bold";
|
|
21
|
+
outline: "outline";
|
|
22
|
+
}>>;
|
|
23
|
+
styleMode: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
plain: "plain";
|
|
25
|
+
shadow: "shadow";
|
|
26
|
+
watercolor: "watercolor";
|
|
27
|
+
}>>;
|
|
28
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
up: "up";
|
|
30
|
+
down: "down";
|
|
31
|
+
left: "left";
|
|
32
|
+
right: "right";
|
|
75
33
|
}>>;
|
|
76
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
77
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
78
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
80
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
81
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
82
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
83
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
84
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
85
34
|
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
86
35
|
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
87
36
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
37
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"no-link-access": "no-link-access";
|
|
39
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
40
|
+
"publicly-viewable": "publicly-viewable";
|
|
41
|
+
"publicly-editable": "publicly-editable";
|
|
42
|
+
"sso-readable": "sso-readable";
|
|
43
|
+
"sso-editable": "sso-editable";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
97
46
|
text: z.ZodString;
|
|
98
47
|
diagramType: z.ZodOptional<z.ZodString>;
|
|
99
48
|
priorRequestId: z.ZodOptional<z.ZodString>;
|
|
100
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
49
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
101
50
|
contextId: z.ZodOptional<z.ZodString>;
|
|
102
|
-
mode: z.ZodOptional<z.ZodEnum<
|
|
51
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
standard: "standard";
|
|
53
|
+
premium: "premium";
|
|
54
|
+
}>>;
|
|
103
55
|
git: z.ZodOptional<z.ZodObject<{
|
|
104
56
|
repoName: z.ZodString;
|
|
105
57
|
orgName: z.ZodString;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
orgName: string;
|
|
109
|
-
}, {
|
|
110
|
-
repoName: string;
|
|
111
|
-
orgName: string;
|
|
112
|
-
}>>;
|
|
113
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$loose>;
|
|
114
60
|
export type RenderPromptInput = z.infer<typeof renderPromptSchema>;
|
|
115
61
|
//# sourceMappingURL=renderPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPrompt.d.ts","sourceRoot":"","sources":["../../src/schemas/renderPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"renderPrompt.d.ts","sourceRoot":"","sources":["../../src/schemas/renderPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUf,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -22,109 +22,82 @@ export declare enum DiagramTypes {
|
|
|
22
22
|
FLOW = "flowchart-diagram",
|
|
23
23
|
BPMN = "bpmn-diagram"
|
|
24
24
|
}
|
|
25
|
-
export declare const DiagramTypesEnum: z.
|
|
26
|
-
export declare const LinkAccessEnum: z.ZodEnum<
|
|
25
|
+
export declare const DiagramTypesEnum: z.ZodEnum<typeof DiagramTypes>;
|
|
26
|
+
export declare const LinkAccessEnum: z.ZodEnum<{
|
|
27
|
+
"no-link-access": "no-link-access";
|
|
28
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
29
|
+
"publicly-viewable": "publicly-viewable";
|
|
30
|
+
"publicly-editable": "publicly-editable";
|
|
31
|
+
"sso-readable": "sso-readable";
|
|
32
|
+
"sso-editable": "sso-editable";
|
|
33
|
+
}>;
|
|
27
34
|
export declare const diagramElementSchema: z.ZodObject<{
|
|
28
35
|
type: z.ZodLiteral<"diagram">;
|
|
29
|
-
diagramType: z.
|
|
36
|
+
diagramType: z.ZodEnum<typeof DiagramTypes>;
|
|
30
37
|
code: z.ZodString;
|
|
31
38
|
x: z.ZodOptional<z.ZodNumber>;
|
|
32
39
|
y: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
},
|
|
34
|
-
type: "diagram";
|
|
35
|
-
code: string;
|
|
36
|
-
diagramType: DiagramTypes;
|
|
37
|
-
x?: number | undefined;
|
|
38
|
-
y?: number | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
type: "diagram";
|
|
41
|
-
code: string;
|
|
42
|
-
diagramType: DiagramTypes;
|
|
43
|
-
x?: number | undefined;
|
|
44
|
-
y?: number | undefined;
|
|
45
|
-
}>;
|
|
40
|
+
}, z.core.$strip>;
|
|
46
41
|
export declare const gitRepoSchema: z.ZodObject<{
|
|
47
42
|
repoName: z.ZodString;
|
|
48
43
|
orgName: z.ZodString;
|
|
49
|
-
},
|
|
50
|
-
repoName: string;
|
|
51
|
-
orgName: string;
|
|
52
|
-
}, {
|
|
53
|
-
repoName: string;
|
|
54
|
-
orgName: string;
|
|
55
|
-
}>;
|
|
44
|
+
}, z.core.$strip>;
|
|
56
45
|
export declare const fileOptionsSchema: z.ZodObject<{
|
|
57
46
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
47
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
"no-link-access": "no-link-access";
|
|
49
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
50
|
+
"publicly-viewable": "publicly-viewable";
|
|
51
|
+
"publicly-editable": "publicly-editable";
|
|
52
|
+
"sso-readable": "sso-readable";
|
|
53
|
+
"sso-editable": "sso-editable";
|
|
54
|
+
}>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export declare const imageQualitySchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
67
57
|
export declare const renderOptionsSchema: z.ZodObject<{
|
|
68
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
58
|
+
imageQuality: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
69
59
|
background: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
-
theme: z.ZodOptional<z.ZodEnum<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
74
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
75
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
76
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
78
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
create?: boolean | undefined;
|
|
82
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
83
|
-
}, {
|
|
84
|
-
create?: boolean | undefined;
|
|
85
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
60
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
light: "light";
|
|
62
|
+
dark: "dark";
|
|
86
63
|
}>>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
64
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
png: "png";
|
|
66
|
+
jpeg: "jpeg";
|
|
67
|
+
}>>;
|
|
68
|
+
typeface: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
rough: "rough";
|
|
70
|
+
clean: "clean";
|
|
71
|
+
mono: "mono";
|
|
72
|
+
}>>;
|
|
73
|
+
colorMode: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
pastel: "pastel";
|
|
75
|
+
bold: "bold";
|
|
76
|
+
outline: "outline";
|
|
77
|
+
}>>;
|
|
78
|
+
styleMode: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
plain: "plain";
|
|
80
|
+
shadow: "shadow";
|
|
81
|
+
watercolor: "watercolor";
|
|
82
|
+
}>>;
|
|
83
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
up: "up";
|
|
85
|
+
down: "down";
|
|
86
|
+
left: "left";
|
|
87
|
+
right: "right";
|
|
106
88
|
}>>;
|
|
107
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
108
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
109
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
111
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
112
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
113
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
114
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
115
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
116
89
|
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
117
90
|
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
118
91
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, z.
|
|
128
|
-
|
|
92
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
"no-link-access": "no-link-access";
|
|
94
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
95
|
+
"publicly-viewable": "publicly-viewable";
|
|
96
|
+
"publicly-editable": "publicly-editable";
|
|
97
|
+
"sso-readable": "sso-readable";
|
|
98
|
+
"sso-editable": "sso-editable";
|
|
99
|
+
}>>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
}, z.core.$loose>;
|
|
129
102
|
export type DiagramElementInput = z.infer<typeof diagramElementSchema>;
|
|
130
103
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wCAAyC,CAAC;AACxE,eAAO,MAAM,iBAAiB,4CAA6C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,qCAAsC,CAAC;AACpE,eAAO,MAAM,iBAAiB,0CAA2C,CAAC;AAC1E,eAAO,MAAM,kBAAkB,oIAOrB,CAAC;AACX,eAAO,MAAM,cAAc,kCAAmC,CAAC;AAC/D,eAAO,MAAM,aAAa,4BAA6B,CAAC;AACxD,eAAO,MAAM,kBAAkB,0BAA2B,CAAC;AAE3D;;;GAGG;AACH,oBAAY,YAAY;IACtB,EAAE,qBAAqB;IACvB,GAAG,gCAAgC;IACnC,GAAG,+BAA+B;IAClC,IAAI,sBAAsB;IAC1B,IAAI,iBAAiB;CACtB;AAED,eAAO,MAAM,gBAAgB,gCAA6B,CAAC;AAC3D,eAAO,MAAM,cAAc;;;;;;;EAA6B,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,0EAAsD,CAAC;AAEtF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAahB,CAAC;AAGjB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/schemas/shared.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.renderOptionsSchema = exports.imageQualitySchema = exports.fileOptionsSchema = exports.gitRepoSchema = exports.diagramElementSchema = exports.LinkAccessEnum = exports.DiagramTypesEnum = exports.DiagramTypes = exports.fileFormatSettings = exports.themeSettings = exports.aiModeSettings = exports.linkAccessSettings = exports.directionSettings = exports.typefaceSettings = exports.styleModeSettings = exports.colorModeSettings = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
6
5
|
/**
|
|
7
6
|
* Settings duplicated from @eraserlabs/shared/modules/diagram-parser/settings
|
|
8
7
|
* We avoid importing to keep eraser-mcp buildable independently.
|
|
@@ -33,7 +32,7 @@ var DiagramTypes;
|
|
|
33
32
|
DiagramTypes["CAD"] = "cloud-architecture-diagram";
|
|
34
33
|
DiagramTypes["FLOW"] = "flowchart-diagram";
|
|
35
34
|
DiagramTypes["BPMN"] = "bpmn-diagram";
|
|
36
|
-
})(DiagramTypes
|
|
35
|
+
})(DiagramTypes || (exports.DiagramTypes = DiagramTypes = {}));
|
|
37
36
|
exports.DiagramTypesEnum = zod_1.z.nativeEnum(DiagramTypes);
|
|
38
37
|
exports.LinkAccessEnum = zod_1.z.enum(exports.linkAccessSettings);
|
|
39
38
|
exports.diagramElementSchema = zod_1.z.object({
|
|
@@ -66,7 +65,3 @@ exports.renderOptionsSchema = zod_1.z
|
|
|
66
65
|
fileOptions: exports.fileOptionsSchema.optional(),
|
|
67
66
|
})
|
|
68
67
|
.passthrough();
|
|
69
|
-
function toJsonSchema(schema) {
|
|
70
|
-
return (0, zod_to_json_schema_1.zodToJsonSchema)(schema, { target: 'openApi3' });
|
|
71
|
-
}
|
|
72
|
-
exports.toJsonSchema = toJsonSchema;
|
|
@@ -1,70 +1,49 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const singleDiagramSchema: z.ZodObject<{
|
|
3
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
3
|
+
imageQuality: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
4
4
|
background: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
theme: z.ZodOptional<z.ZodEnum<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
9
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
10
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
11
|
-
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
13
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable", "sso-readable", "sso-editable"]>>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
create?: boolean | undefined;
|
|
17
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
create?: boolean | undefined;
|
|
20
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable" | undefined;
|
|
5
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
light: "light";
|
|
7
|
+
dark: "dark";
|
|
21
8
|
}>>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
9
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
png: "png";
|
|
11
|
+
jpeg: "jpeg";
|
|
12
|
+
}>>;
|
|
13
|
+
typeface: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
rough: "rough";
|
|
15
|
+
clean: "clean";
|
|
16
|
+
mono: "mono";
|
|
17
|
+
}>>;
|
|
18
|
+
colorMode: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
pastel: "pastel";
|
|
20
|
+
bold: "bold";
|
|
21
|
+
outline: "outline";
|
|
22
|
+
}>>;
|
|
23
|
+
styleMode: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
plain: "plain";
|
|
25
|
+
shadow: "shadow";
|
|
26
|
+
watercolor: "watercolor";
|
|
27
|
+
}>>;
|
|
28
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
up: "up";
|
|
30
|
+
down: "down";
|
|
31
|
+
left: "left";
|
|
32
|
+
right: "right";
|
|
43
33
|
}>>;
|
|
44
|
-
} & {
|
|
45
|
-
code: z.ZodString;
|
|
46
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
47
|
-
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
48
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
50
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
51
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
52
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
53
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
54
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
55
34
|
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
56
35
|
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
57
36
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
-
linkAccess: z.ZodOptional<z.ZodEnum<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
37
|
+
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"no-link-access": "no-link-access";
|
|
39
|
+
"anyone-with-link-can-edit": "anyone-with-link-can-edit";
|
|
40
|
+
"publicly-viewable": "publicly-viewable";
|
|
41
|
+
"publicly-editable": "publicly-editable";
|
|
42
|
+
"sso-readable": "sso-readable";
|
|
43
|
+
"sso-editable": "sso-editable";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
67
46
|
code: z.ZodString;
|
|
68
|
-
}, z.
|
|
47
|
+
}, z.core.$loose>;
|
|
69
48
|
export type SingleDiagramInput = z.infer<typeof singleDiagramSchema>;
|
|
70
49
|
//# sourceMappingURL=singleDiagram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleDiagram.d.ts","sourceRoot":"","sources":["../../src/schemas/singleDiagram.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"singleDiagram.d.ts","sourceRoot":"","sources":["../../src/schemas/singleDiagram.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/stdio.js
CHANGED
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
57
|
const readline = __importStar(require("readline"));
|
|
48
58
|
const fs = __importStar(require("fs"));
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DiagramTypes
|
|
3
|
-
import { CreateFileInput } from './schemas/files';
|
|
4
|
-
import { ListFilesInput } from './schemas/files';
|
|
5
|
-
import { GetFileInput } from './schemas/files';
|
|
6
|
-
import { UpdateFileInput } from './schemas/files';
|
|
7
|
-
import { ArchiveFileInput } from './schemas/files';
|
|
8
|
-
import { RenderPromptInput } from './schemas/renderPrompt';
|
|
9
|
-
import { RenderElementsInput } from './schemas/renderElements';
|
|
10
|
-
import { SingleDiagramInput } from './schemas/singleDiagram';
|
|
11
|
-
import { ListDiagramsInput, GetDiagramInput, CreateDiagramInput, UpdateDiagramInput, DeleteDiagramInput } from './schemas/diagrams';
|
|
2
|
+
import { DiagramTypes } from './schemas/shared';
|
|
12
3
|
export type McpToolDefinition<TInput> = {
|
|
13
4
|
name: string;
|
|
14
5
|
description: string;
|
|
@@ -24,6 +15,4 @@ export declare function isSingleDiagramTool(name: string): name is keyof typeof
|
|
|
24
15
|
export declare const freeMcpTools: ReadonlyArray<McpToolDefinition<any>>;
|
|
25
16
|
export declare const freeMcpToolMap: Map<string, McpToolDefinition<any>>;
|
|
26
17
|
export declare function isFreeMcpToolName(name: unknown): name is string;
|
|
27
|
-
export type { RenderPromptInput, DiagramElementInput, RenderElementsInput, SingleDiagramInput, CreateFileInput, ListFilesInput, GetFileInput, UpdateFileInput, ArchiveFileInput, ListDiagramsInput, GetDiagramInput, CreateDiagramInput, UpdateDiagramInput, DeleteDiagramInput, };
|
|
28
|
-
export { DiagramTypes };
|
|
29
18
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAsChD,MAAM,MAAM,iBAAiB,CAAC,MAAM,IAAI;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,CAAC,CA0G1D,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,WAAW,CAEhE;AAED,eAAO,MAAM,UAAU,qCAAqD,CAAC;AAG7E,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAM3D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,OAAO,kBAAkB,CAEzF;AAoBD,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAO1D,CAAC;AAEN,eAAO,MAAM,cAAc,qCAAyD,CAAC;AAErF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAE/D"}
|
package/dist/tools.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.freeMcpToolMap = exports.freeMcpTools = exports.singleDiagramTools = exports.mcpToolMap = exports.mcpTools = void 0;
|
|
4
|
+
exports.isMcpToolName = isMcpToolName;
|
|
5
|
+
exports.isSingleDiagramTool = isSingleDiagramTool;
|
|
6
|
+
exports.isFreeMcpToolName = isFreeMcpToolName;
|
|
4
7
|
// Schemas
|
|
5
8
|
const shared_1 = require("./schemas/shared");
|
|
6
|
-
Object.defineProperty(exports, "DiagramTypes", { enumerable: true, get: function () { return shared_1.DiagramTypes; } });
|
|
7
9
|
const files_1 = require("./schemas/files");
|
|
8
10
|
const files_2 = require("./schemas/files");
|
|
9
11
|
const files_3 = require("./schemas/files");
|
|
@@ -26,111 +28,110 @@ exports.mcpTools = [
|
|
|
26
28
|
name: 'createFile',
|
|
27
29
|
description: tools_1.CREATE_FILE_DESCRIPTION,
|
|
28
30
|
schema: files_1.createFileSchema,
|
|
29
|
-
jsonSchema:
|
|
31
|
+
jsonSchema: files_1.createFileSchema.toJSONSchema(),
|
|
30
32
|
},
|
|
31
33
|
{
|
|
32
34
|
name: 'listFiles',
|
|
33
35
|
description: tools_1.LIST_FILES_DESCRIPTION,
|
|
34
36
|
schema: files_2.listFilesSchema,
|
|
35
|
-
jsonSchema:
|
|
37
|
+
jsonSchema: files_2.listFilesSchema.toJSONSchema(),
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
40
|
name: 'getFile',
|
|
39
41
|
description: tools_1.GET_FILE_DESCRIPTION,
|
|
40
42
|
schema: files_3.getFileSchema,
|
|
41
|
-
jsonSchema:
|
|
43
|
+
jsonSchema: files_3.getFileSchema.toJSONSchema(),
|
|
42
44
|
},
|
|
43
45
|
{
|
|
44
46
|
name: 'updateFile',
|
|
45
47
|
description: tools_1.UPDATE_FILE_DESCRIPTION,
|
|
46
48
|
schema: files_4.updateFileSchema,
|
|
47
|
-
jsonSchema:
|
|
49
|
+
jsonSchema: files_4.updateFileSchema.toJSONSchema(),
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
name: 'archiveFile',
|
|
51
53
|
description: tools_1.ARCHIVE_FILE_DESCRIPTION,
|
|
52
54
|
schema: files_5.archiveFileSchema,
|
|
53
|
-
jsonSchema:
|
|
55
|
+
jsonSchema: files_5.archiveFileSchema.toJSONSchema(),
|
|
54
56
|
},
|
|
55
57
|
// Diagram CRUD
|
|
56
58
|
{
|
|
57
59
|
name: 'listDiagrams',
|
|
58
60
|
description: tools_1.LIST_DIAGRAMS_DESCRIPTION,
|
|
59
61
|
schema: diagrams_1.listDiagramsSchema,
|
|
60
|
-
jsonSchema:
|
|
62
|
+
jsonSchema: diagrams_1.listDiagramsSchema.toJSONSchema(),
|
|
61
63
|
},
|
|
62
64
|
{
|
|
63
65
|
name: 'createDiagram',
|
|
64
66
|
description: tools_1.CREATE_DIAGRAM_DESCRIPTION,
|
|
65
67
|
schema: diagrams_1.createDiagramSchema,
|
|
66
|
-
jsonSchema:
|
|
68
|
+
jsonSchema: diagrams_1.createDiagramSchema.toJSONSchema(),
|
|
67
69
|
},
|
|
68
70
|
{
|
|
69
71
|
name: 'getDiagram',
|
|
70
72
|
description: tools_1.GET_DIAGRAM_DESCRIPTION,
|
|
71
73
|
schema: diagrams_1.getDiagramSchema,
|
|
72
|
-
jsonSchema:
|
|
74
|
+
jsonSchema: diagrams_1.getDiagramSchema.toJSONSchema(),
|
|
73
75
|
},
|
|
74
76
|
{
|
|
75
77
|
name: 'updateDiagram',
|
|
76
78
|
description: tools_1.UPDATE_DIAGRAM_DESCRIPTION,
|
|
77
79
|
schema: diagrams_1.updateDiagramSchema,
|
|
78
|
-
jsonSchema:
|
|
80
|
+
jsonSchema: diagrams_1.updateDiagramSchema.toJSONSchema(),
|
|
79
81
|
},
|
|
80
82
|
{
|
|
81
83
|
name: 'deleteDiagram',
|
|
82
84
|
description: tools_1.DELETE_DIAGRAM_DESCRIPTION,
|
|
83
85
|
schema: diagrams_1.deleteDiagramSchema,
|
|
84
|
-
jsonSchema:
|
|
86
|
+
jsonSchema: diagrams_1.deleteDiagramSchema.toJSONSchema(),
|
|
85
87
|
},
|
|
86
88
|
// Render tools
|
|
87
89
|
{
|
|
88
90
|
name: 'renderPrompt',
|
|
89
91
|
description: tools_1.RENDER_PROMPT_DESCRIPTION,
|
|
90
92
|
schema: renderPrompt_1.renderPromptSchema,
|
|
91
|
-
jsonSchema:
|
|
93
|
+
jsonSchema: renderPrompt_1.renderPromptSchema.toJSONSchema(),
|
|
92
94
|
},
|
|
93
95
|
{
|
|
94
96
|
name: 'renderElements',
|
|
95
97
|
description: tools_1.RENDER_ELEMENTS_DESCRIPTION,
|
|
96
98
|
schema: renderElements_1.renderElementsSchema,
|
|
97
|
-
jsonSchema:
|
|
99
|
+
jsonSchema: renderElements_1.renderElementsSchema.toJSONSchema(),
|
|
98
100
|
},
|
|
99
101
|
{
|
|
100
102
|
name: 'renderSequenceDiagram',
|
|
101
103
|
description: sequenceDiagram_1.SEQUENCE_DIAGRAM_DESCRIPTION,
|
|
102
104
|
schema: singleDiagram_1.singleDiagramSchema,
|
|
103
|
-
jsonSchema:
|
|
105
|
+
jsonSchema: singleDiagram_1.singleDiagramSchema.toJSONSchema(),
|
|
104
106
|
},
|
|
105
107
|
{
|
|
106
108
|
name: 'renderEntityRelationshipDiagram',
|
|
107
109
|
description: erd_1.ERD_DESCRIPTION,
|
|
108
110
|
schema: singleDiagram_1.singleDiagramSchema,
|
|
109
|
-
jsonSchema:
|
|
111
|
+
jsonSchema: singleDiagram_1.singleDiagramSchema.toJSONSchema(),
|
|
110
112
|
},
|
|
111
113
|
{
|
|
112
114
|
name: 'renderCloudArchitectureDiagram',
|
|
113
115
|
description: cloudArchitecture_1.CLOUD_ARCHITECTURE_DESCRIPTION,
|
|
114
116
|
schema: singleDiagram_1.singleDiagramSchema,
|
|
115
|
-
jsonSchema:
|
|
117
|
+
jsonSchema: singleDiagram_1.singleDiagramSchema.toJSONSchema(),
|
|
116
118
|
},
|
|
117
119
|
{
|
|
118
120
|
name: 'renderFlowchart',
|
|
119
121
|
description: flowchart_1.FLOWCHART_DESCRIPTION,
|
|
120
122
|
schema: singleDiagram_1.singleDiagramSchema,
|
|
121
|
-
jsonSchema:
|
|
123
|
+
jsonSchema: singleDiagram_1.singleDiagramSchema.toJSONSchema(),
|
|
122
124
|
},
|
|
123
125
|
{
|
|
124
126
|
name: 'renderBpmnDiagram',
|
|
125
127
|
description: bpmn_1.BPMN_DESCRIPTION,
|
|
126
128
|
schema: singleDiagram_1.singleDiagramSchema,
|
|
127
|
-
jsonSchema:
|
|
129
|
+
jsonSchema: singleDiagram_1.singleDiagramSchema.toJSONSchema(),
|
|
128
130
|
},
|
|
129
131
|
];
|
|
130
132
|
function isMcpToolName(name) {
|
|
131
133
|
return exports.mcpTools.some((tool) => tool.name === name);
|
|
132
134
|
}
|
|
133
|
-
exports.isMcpToolName = isMcpToolName;
|
|
134
135
|
exports.mcpToolMap = new Map(exports.mcpTools.map((tool) => [tool.name, tool]));
|
|
135
136
|
// Mapping from single diagram tool names to their diagram types
|
|
136
137
|
exports.singleDiagramTools = {
|
|
@@ -143,7 +144,6 @@ exports.singleDiagramTools = {
|
|
|
143
144
|
function isSingleDiagramTool(name) {
|
|
144
145
|
return name in exports.singleDiagramTools;
|
|
145
146
|
}
|
|
146
|
-
exports.isSingleDiagramTool = isSingleDiagramTool;
|
|
147
147
|
// Paid tier tools (require auth)
|
|
148
148
|
const PAID_TOOL_NAMES = new Set([
|
|
149
149
|
'createFile',
|
|
@@ -171,4 +171,3 @@ exports.freeMcpToolMap = new Map(exports.freeMcpTools.map((tool) => [tool.name,
|
|
|
171
171
|
function isFreeMcpToolName(name) {
|
|
172
172
|
return exports.freeMcpToolMap.has(name);
|
|
173
173
|
}
|
|
174
|
-
exports.isFreeMcpToolName = isFreeMcpToolName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eraserlabs/eraser-mcp",
|
|
3
|
-
"version": "0.3.3-next.
|
|
3
|
+
"version": "0.3.3-next.6",
|
|
4
4
|
"description": "MCP server for generating diagrams with Eraser.io",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,14 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"zod": "^3.
|
|
34
|
-
"zod-to-json-schema": "^3.24.5"
|
|
33
|
+
"zod": "^4.3.6"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^
|
|
38
|
-
"typescript": "^
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
39
38
|
},
|
|
40
39
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
40
|
+
"node": ">=22"
|
|
42
41
|
}
|
|
43
42
|
}
|