@eraserlabs/eraser-mcp 0.1.1 → 0.3.1-next.0
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/descriptions/bpmn.d.ts +2 -0
- package/dist/descriptions/bpmn.d.ts.map +1 -0
- package/dist/descriptions/bpmn.js +42 -0
- package/dist/descriptions/cloudArchitecture.d.ts +2 -0
- package/dist/descriptions/cloudArchitecture.d.ts.map +1 -0
- package/dist/descriptions/cloudArchitecture.js +39 -0
- package/dist/descriptions/erd.d.ts +2 -0
- package/dist/descriptions/erd.d.ts.map +1 -0
- package/dist/descriptions/erd.js +44 -0
- package/dist/descriptions/flowchart.d.ts +2 -0
- package/dist/descriptions/flowchart.d.ts.map +1 -0
- package/dist/descriptions/flowchart.js +37 -0
- package/dist/descriptions/sequenceDiagram.d.ts +2 -0
- package/dist/descriptions/sequenceDiagram.d.ts.map +1 -0
- package/dist/descriptions/sequenceDiagram.js +26 -0
- package/dist/descriptions/tools.d.ts +4 -0
- package/dist/descriptions/tools.d.ts.map +1 -0
- package/dist/descriptions/tools.js +6 -0
- package/dist/schemas/createFile.d.ts +39 -0
- package/dist/schemas/createFile.d.ts.map +1 -0
- package/dist/schemas/createFile.js +21 -0
- package/dist/schemas/renderElements.d.ts +124 -0
- package/dist/schemas/renderElements.d.ts.map +1 -0
- package/dist/schemas/renderElements.js +10 -0
- package/dist/schemas/renderPrompt.d.ts +115 -0
- package/dist/schemas/renderPrompt.d.ts.map +1 -0
- package/dist/schemas/renderPrompt.js +16 -0
- package/dist/schemas/shared.d.ts +128 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +68 -0
- package/dist/schemas/singleDiagram.d.ts +70 -0
- package/dist/schemas/singleDiagram.d.ts.map +1 -0
- package/dist/schemas/singleDiagram.js +8 -0
- package/dist/tools.d.ts +10 -293
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +47 -394
- package/package.json +3 -2
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Settings duplicated from @eraserlabs/shared/modules/diagram-parser/settings
|
|
4
|
+
* We avoid importing to keep eraser-mcp buildable independently.
|
|
5
|
+
*/
|
|
6
|
+
export declare const colorModeSettings: readonly ["pastel", "bold", "outline"];
|
|
7
|
+
export declare const styleModeSettings: readonly ["plain", "shadow", "watercolor"];
|
|
8
|
+
export declare const typefaceSettings: readonly ["rough", "clean", "mono"];
|
|
9
|
+
export declare const directionSettings: readonly ["up", "down", "left", "right"];
|
|
10
|
+
export declare const linkAccessSettings: readonly ["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"];
|
|
11
|
+
export declare const aiModeSettings: readonly ["standard", "premium"];
|
|
12
|
+
/**
|
|
13
|
+
* The diagram types supported by the MCP tools.
|
|
14
|
+
* Duplicated from DiagramTypes enum, excluding 'custom-diagram'.
|
|
15
|
+
*/
|
|
16
|
+
export declare enum DiagramTypes {
|
|
17
|
+
SD = "sequence-diagram",
|
|
18
|
+
ERD = "entity-relationship-diagram",
|
|
19
|
+
CAD = "cloud-architecture-diagram",
|
|
20
|
+
FLOW = "flowchart-diagram",
|
|
21
|
+
BPMN = "bpmn-diagram"
|
|
22
|
+
}
|
|
23
|
+
export declare const DiagramTypesEnum: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
24
|
+
export declare const LinkAccessEnum: z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>;
|
|
25
|
+
export declare const diagramElementSchema: z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"diagram">;
|
|
27
|
+
diagramType: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
28
|
+
code: z.ZodString;
|
|
29
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "diagram";
|
|
33
|
+
code: string;
|
|
34
|
+
diagramType: DiagramTypes;
|
|
35
|
+
x?: number | undefined;
|
|
36
|
+
y?: number | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
type: "diagram";
|
|
39
|
+
code: string;
|
|
40
|
+
diagramType: DiagramTypes;
|
|
41
|
+
x?: number | undefined;
|
|
42
|
+
y?: number | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const gitRepoSchema: z.ZodObject<{
|
|
45
|
+
repoName: z.ZodString;
|
|
46
|
+
orgName: z.ZodString;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
repoName: string;
|
|
49
|
+
orgName: string;
|
|
50
|
+
}, {
|
|
51
|
+
repoName: string;
|
|
52
|
+
orgName: string;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const fileOptionsSchema: z.ZodObject<{
|
|
55
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
create?: boolean | undefined;
|
|
59
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
create?: boolean | undefined;
|
|
62
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
export declare const imageQualitySchema: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
65
|
+
export declare const renderOptionsSchema: z.ZodObject<{
|
|
66
|
+
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
67
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
69
|
+
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
70
|
+
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
71
|
+
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
72
|
+
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
73
|
+
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
74
|
+
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
create?: boolean | undefined;
|
|
80
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
create?: boolean | undefined;
|
|
83
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
84
|
+
}>>;
|
|
85
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
86
|
+
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
87
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
89
|
+
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
90
|
+
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
91
|
+
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
92
|
+
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
93
|
+
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
94
|
+
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
create?: boolean | undefined;
|
|
100
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
create?: boolean | undefined;
|
|
103
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
104
|
+
}>>;
|
|
105
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
106
|
+
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
107
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
109
|
+
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
110
|
+
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
111
|
+
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
112
|
+
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
113
|
+
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
114
|
+
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
create?: boolean | undefined;
|
|
120
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
create?: boolean | undefined;
|
|
123
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
124
|
+
}>>;
|
|
125
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
126
|
+
export declare function toJsonSchema(schema: z.ZodType): Record<string, unknown>;
|
|
127
|
+
export type DiagramElementInput = z.infer<typeof diagramElementSchema>;
|
|
128
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;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,oGAKrB,CAAC;AACX,eAAO,MAAM,cAAc,kCAAmC,CAAC;AAE/D;;;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,sCAA6B,CAAC;AAC3D,eAAO,MAAM,cAAc,sGAA6B,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;EAGxB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,iEAAsD,CAAC;AAEtF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAahB,CAAC;AAEjB,wBAAgB,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEvE;AAGD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toJsonSchema = exports.renderOptionsSchema = exports.imageQualitySchema = exports.fileOptionsSchema = exports.gitRepoSchema = exports.diagramElementSchema = exports.LinkAccessEnum = exports.DiagramTypesEnum = exports.DiagramTypes = exports.aiModeSettings = exports.linkAccessSettings = exports.directionSettings = exports.typefaceSettings = exports.styleModeSettings = exports.colorModeSettings = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
6
|
+
/**
|
|
7
|
+
* Settings duplicated from @eraserlabs/shared/modules/diagram-parser/settings
|
|
8
|
+
* We avoid importing to keep eraser-mcp buildable independently.
|
|
9
|
+
*/
|
|
10
|
+
exports.colorModeSettings = ['pastel', 'bold', 'outline'];
|
|
11
|
+
exports.styleModeSettings = ['plain', 'shadow', 'watercolor'];
|
|
12
|
+
exports.typefaceSettings = ['rough', 'clean', 'mono'];
|
|
13
|
+
exports.directionSettings = ['up', 'down', 'left', 'right'];
|
|
14
|
+
exports.linkAccessSettings = [
|
|
15
|
+
'no-link-access',
|
|
16
|
+
'anyone-with-link-can-edit',
|
|
17
|
+
'publicly-viewable',
|
|
18
|
+
'publicly-editable',
|
|
19
|
+
];
|
|
20
|
+
exports.aiModeSettings = ['standard', 'premium'];
|
|
21
|
+
/**
|
|
22
|
+
* The diagram types supported by the MCP tools.
|
|
23
|
+
* Duplicated from DiagramTypes enum, excluding 'custom-diagram'.
|
|
24
|
+
*/
|
|
25
|
+
var DiagramTypes;
|
|
26
|
+
(function (DiagramTypes) {
|
|
27
|
+
DiagramTypes["SD"] = "sequence-diagram";
|
|
28
|
+
DiagramTypes["ERD"] = "entity-relationship-diagram";
|
|
29
|
+
DiagramTypes["CAD"] = "cloud-architecture-diagram";
|
|
30
|
+
DiagramTypes["FLOW"] = "flowchart-diagram";
|
|
31
|
+
DiagramTypes["BPMN"] = "bpmn-diagram";
|
|
32
|
+
})(DiagramTypes = exports.DiagramTypes || (exports.DiagramTypes = {}));
|
|
33
|
+
exports.DiagramTypesEnum = zod_1.z.nativeEnum(DiagramTypes);
|
|
34
|
+
exports.LinkAccessEnum = zod_1.z.enum(exports.linkAccessSettings);
|
|
35
|
+
exports.diagramElementSchema = zod_1.z.object({
|
|
36
|
+
type: zod_1.z.literal('diagram'),
|
|
37
|
+
diagramType: exports.DiagramTypesEnum,
|
|
38
|
+
code: zod_1.z.string(),
|
|
39
|
+
x: zod_1.z.number().optional(),
|
|
40
|
+
y: zod_1.z.number().optional(),
|
|
41
|
+
});
|
|
42
|
+
exports.gitRepoSchema = zod_1.z.object({
|
|
43
|
+
repoName: zod_1.z.string().describe('Name of the repository.'),
|
|
44
|
+
orgName: zod_1.z.string().describe('Name of the organization.'),
|
|
45
|
+
});
|
|
46
|
+
exports.fileOptionsSchema = zod_1.z.object({
|
|
47
|
+
create: zod_1.z.boolean().optional().describe('Whether to create a new file. Defaults to false.'),
|
|
48
|
+
linkAccess: exports.LinkAccessEnum.optional().describe('Optional link sharing access level. Defaults to using team config.'),
|
|
49
|
+
});
|
|
50
|
+
exports.imageQualitySchema = zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2), zod_1.z.literal(3)]);
|
|
51
|
+
exports.renderOptionsSchema = zod_1.z
|
|
52
|
+
.object({
|
|
53
|
+
imageQuality: exports.imageQualitySchema.optional().describe('Image resolution multiplier (1x, 2x, or 3x).'),
|
|
54
|
+
background: zod_1.z.boolean().optional().describe('Whether to include a solid background.'),
|
|
55
|
+
theme: zod_1.z.enum(['light', 'dark']).optional(),
|
|
56
|
+
format: zod_1.z.enum(['png', 'jpeg']).optional(),
|
|
57
|
+
typeface: zod_1.z.enum(exports.typefaceSettings).optional(),
|
|
58
|
+
colorMode: zod_1.z.enum(exports.colorModeSettings).optional(),
|
|
59
|
+
styleMode: zod_1.z.enum(exports.styleModeSettings).optional(),
|
|
60
|
+
direction: zod_1.z.enum(exports.directionSettings).optional().describe('Applies to flowcharts and architecture diagrams only.'),
|
|
61
|
+
returnImageAsFile: zod_1.z.boolean().optional().describe('If true, streams the image as a file to the client, with no other response.'),
|
|
62
|
+
fileOptions: exports.fileOptionsSchema.optional(),
|
|
63
|
+
})
|
|
64
|
+
.passthrough();
|
|
65
|
+
function toJsonSchema(schema) {
|
|
66
|
+
return (0, zod_to_json_schema_1.zodToJsonSchema)(schema, { target: 'openApi3' });
|
|
67
|
+
}
|
|
68
|
+
exports.toJsonSchema = toJsonSchema;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const singleDiagramSchema: z.ZodObject<{
|
|
3
|
+
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
4
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
6
|
+
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
7
|
+
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
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"]>>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
create?: boolean | undefined;
|
|
17
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
create?: boolean | undefined;
|
|
20
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
} & {
|
|
23
|
+
code: z.ZodString;
|
|
24
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
25
|
+
imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
26
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
28
|
+
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
29
|
+
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
30
|
+
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
31
|
+
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
32
|
+
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
33
|
+
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
create?: boolean | undefined;
|
|
39
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
create?: boolean | undefined;
|
|
42
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
43
|
+
}>>;
|
|
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
|
+
returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
create: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
create?: boolean | undefined;
|
|
61
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
create?: boolean | undefined;
|
|
64
|
+
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
} & {
|
|
67
|
+
code: z.ZodString;
|
|
68
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
69
|
+
export type SingleDiagramInput = z.infer<typeof singleDiagramSchema>;
|
|
70
|
+
//# sourceMappingURL=singleDiagram.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAE9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.singleDiagramSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("./shared");
|
|
6
|
+
exports.singleDiagramSchema = shared_1.renderOptionsSchema.extend({
|
|
7
|
+
code: zod_1.z.string().describe('The diagram code in Eraser syntax.'),
|
|
8
|
+
});
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,304 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const colorModeSettings: readonly ["pastel", "bold", "outline"];
|
|
8
|
-
export declare const styleModeSettings: readonly ["plain", "shadow", "watercolor"];
|
|
9
|
-
export declare const typefaceSettings: readonly ["rough", "clean", "mono"];
|
|
10
|
-
export declare const directionSettings: readonly ["up", "down", "left", "right"];
|
|
11
|
-
/**
|
|
12
|
-
* The diagram types supported by the MCP tools.
|
|
13
|
-
* Duplicated from DiagramTypes enum, excluding 'custom-diagram'.
|
|
14
|
-
*/
|
|
15
|
-
export declare enum DiagramTypes {
|
|
16
|
-
SD = "sequence-diagram",
|
|
17
|
-
ERD = "entity-relationship-diagram",
|
|
18
|
-
CAD = "cloud-architecture-diagram",
|
|
19
|
-
FLOW = "flowchart-diagram",
|
|
20
|
-
BPMN = "bpmn-diagram"
|
|
21
|
-
}
|
|
22
|
-
declare const diagramElementSchema: z.ZodObject<{
|
|
23
|
-
type: z.ZodLiteral<"diagram">;
|
|
24
|
-
diagramType: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
25
|
-
code: z.ZodString;
|
|
26
|
-
x: z.ZodOptional<z.ZodNumber>;
|
|
27
|
-
y: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
type: "diagram";
|
|
30
|
-
code: string;
|
|
31
|
-
diagramType: DiagramTypes;
|
|
32
|
-
x?: number | undefined;
|
|
33
|
-
y?: number | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
type: "diagram";
|
|
36
|
-
code: string;
|
|
37
|
-
diagramType: DiagramTypes;
|
|
38
|
-
x?: number | undefined;
|
|
39
|
-
y?: number | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
declare const renderPromptSchema: z.ZodObject<{
|
|
42
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
44
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
46
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
47
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
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
|
-
title: z.ZodOptional<z.ZodString>;
|
|
56
|
-
} & {
|
|
57
|
-
text: z.ZodString;
|
|
58
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
-
diagramType: z.ZodOptional<z.ZodString>;
|
|
60
|
-
mode: z.ZodOptional<z.ZodString>;
|
|
61
|
-
priorRequestId: z.ZodOptional<z.ZodString>;
|
|
62
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
63
|
-
contextId: z.ZodOptional<z.ZodString>;
|
|
64
|
-
git: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
66
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
create?: boolean | undefined;
|
|
70
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
71
|
-
}, {
|
|
72
|
-
create?: boolean | undefined;
|
|
73
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
74
|
-
}>>;
|
|
75
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
76
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
77
|
-
scale: 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
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
82
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
83
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
85
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
86
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
87
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
88
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
89
|
-
title: z.ZodOptional<z.ZodString>;
|
|
90
|
-
} & {
|
|
91
|
-
text: z.ZodString;
|
|
92
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
-
diagramType: z.ZodOptional<z.ZodString>;
|
|
94
|
-
mode: z.ZodOptional<z.ZodString>;
|
|
95
|
-
priorRequestId: z.ZodOptional<z.ZodString>;
|
|
96
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
97
|
-
contextId: z.ZodOptional<z.ZodString>;
|
|
98
|
-
git: z.ZodOptional<z.ZodUnknown>;
|
|
99
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
100
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
create?: boolean | undefined;
|
|
104
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
105
|
-
}, {
|
|
106
|
-
create?: boolean | undefined;
|
|
107
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
108
|
-
}>>;
|
|
109
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
110
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
112
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
114
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
115
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
116
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
117
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
119
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
120
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
121
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
122
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
123
|
-
title: z.ZodOptional<z.ZodString>;
|
|
124
|
-
} & {
|
|
125
|
-
text: z.ZodString;
|
|
126
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
-
diagramType: z.ZodOptional<z.ZodString>;
|
|
128
|
-
mode: z.ZodOptional<z.ZodString>;
|
|
129
|
-
priorRequestId: z.ZodOptional<z.ZodString>;
|
|
130
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
131
|
-
contextId: z.ZodOptional<z.ZodString>;
|
|
132
|
-
git: z.ZodOptional<z.ZodUnknown>;
|
|
133
|
-
fileOptions: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
create: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
|
|
136
|
-
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
create?: boolean | undefined;
|
|
138
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
139
|
-
}, {
|
|
140
|
-
create?: boolean | undefined;
|
|
141
|
-
linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
|
|
142
|
-
}>>;
|
|
143
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
144
|
-
declare const renderElementsSchema: z.ZodObject<{
|
|
145
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
146
|
-
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
147
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
149
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
150
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
151
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
152
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
154
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
155
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
156
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
157
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
158
|
-
title: z.ZodOptional<z.ZodString>;
|
|
159
|
-
} & {
|
|
160
|
-
elements: z.ZodArray<z.ZodObject<{
|
|
161
|
-
type: z.ZodLiteral<"diagram">;
|
|
162
|
-
diagramType: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
163
|
-
code: z.ZodString;
|
|
164
|
-
x: z.ZodOptional<z.ZodNumber>;
|
|
165
|
-
y: z.ZodOptional<z.ZodNumber>;
|
|
166
|
-
}, "strip", z.ZodTypeAny, {
|
|
167
|
-
type: "diagram";
|
|
168
|
-
code: string;
|
|
169
|
-
diagramType: DiagramTypes;
|
|
170
|
-
x?: number | undefined;
|
|
171
|
-
y?: number | undefined;
|
|
172
|
-
}, {
|
|
173
|
-
type: "diagram";
|
|
174
|
-
code: string;
|
|
175
|
-
diagramType: DiagramTypes;
|
|
176
|
-
x?: number | undefined;
|
|
177
|
-
y?: number | undefined;
|
|
178
|
-
}>, "many">;
|
|
179
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
181
|
-
teamId: z.ZodOptional<z.ZodString>;
|
|
182
|
-
returnElements: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
-
skipCache: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
185
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
186
|
-
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
187
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
189
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
190
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
191
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
192
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
194
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
195
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
196
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
197
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
198
|
-
title: z.ZodOptional<z.ZodString>;
|
|
199
|
-
} & {
|
|
200
|
-
elements: z.ZodArray<z.ZodObject<{
|
|
201
|
-
type: z.ZodLiteral<"diagram">;
|
|
202
|
-
diagramType: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
203
|
-
code: z.ZodString;
|
|
204
|
-
x: z.ZodOptional<z.ZodNumber>;
|
|
205
|
-
y: z.ZodOptional<z.ZodNumber>;
|
|
206
|
-
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
type: "diagram";
|
|
208
|
-
code: string;
|
|
209
|
-
diagramType: DiagramTypes;
|
|
210
|
-
x?: number | undefined;
|
|
211
|
-
y?: number | undefined;
|
|
212
|
-
}, {
|
|
213
|
-
type: "diagram";
|
|
214
|
-
code: string;
|
|
215
|
-
diagramType: DiagramTypes;
|
|
216
|
-
x?: number | undefined;
|
|
217
|
-
y?: number | undefined;
|
|
218
|
-
}>, "many">;
|
|
219
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
221
|
-
teamId: z.ZodOptional<z.ZodString>;
|
|
222
|
-
returnElements: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
-
skipCache: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
225
|
-
padding: z.ZodOptional<z.ZodNumber>;
|
|
226
|
-
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
227
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
229
|
-
format: z.ZodOptional<z.ZodEnum<["png", "jpeg"]>>;
|
|
230
|
-
selection: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
231
|
-
ignoreElements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
232
|
-
limitToSelection: z.ZodOptional<z.ZodBoolean>;
|
|
233
|
-
customIcons: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
234
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
235
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
236
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
237
|
-
direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
238
|
-
title: z.ZodOptional<z.ZodString>;
|
|
239
|
-
} & {
|
|
240
|
-
elements: z.ZodArray<z.ZodObject<{
|
|
241
|
-
type: z.ZodLiteral<"diagram">;
|
|
242
|
-
diagramType: z.ZodNativeEnum<typeof DiagramTypes>;
|
|
243
|
-
code: z.ZodString;
|
|
244
|
-
x: z.ZodOptional<z.ZodNumber>;
|
|
245
|
-
y: z.ZodOptional<z.ZodNumber>;
|
|
246
|
-
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
type: "diagram";
|
|
248
|
-
code: string;
|
|
249
|
-
diagramType: DiagramTypes;
|
|
250
|
-
x?: number | undefined;
|
|
251
|
-
y?: number | undefined;
|
|
252
|
-
}, {
|
|
253
|
-
type: "diagram";
|
|
254
|
-
code: string;
|
|
255
|
-
diagramType: DiagramTypes;
|
|
256
|
-
x?: number | undefined;
|
|
257
|
-
y?: number | undefined;
|
|
258
|
-
}>, "many">;
|
|
259
|
-
returnFile: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
261
|
-
teamId: z.ZodOptional<z.ZodString>;
|
|
262
|
-
returnElements: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
-
skipCache: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
265
|
-
declare const singleDiagramSchema: z.ZodObject<{
|
|
266
|
-
code: z.ZodString;
|
|
267
|
-
theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
268
|
-
colorMode: z.ZodOptional<z.ZodEnum<["pastel", "bold", "outline"]>>;
|
|
269
|
-
styleMode: z.ZodOptional<z.ZodEnum<["plain", "shadow", "watercolor"]>>;
|
|
270
|
-
typeface: z.ZodOptional<z.ZodEnum<["rough", "clean", "mono"]>>;
|
|
271
|
-
background: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
-
}, "strip", z.ZodTypeAny, {
|
|
273
|
-
code: string;
|
|
274
|
-
background?: boolean | undefined;
|
|
275
|
-
theme?: "light" | "dark" | undefined;
|
|
276
|
-
typeface?: "rough" | "clean" | "mono" | undefined;
|
|
277
|
-
colorMode?: "pastel" | "bold" | "outline" | undefined;
|
|
278
|
-
styleMode?: "plain" | "shadow" | "watercolor" | undefined;
|
|
279
|
-
}, {
|
|
280
|
-
code: string;
|
|
281
|
-
background?: boolean | undefined;
|
|
282
|
-
theme?: "light" | "dark" | undefined;
|
|
283
|
-
typeface?: "rough" | "clean" | "mono" | undefined;
|
|
284
|
-
colorMode?: "pastel" | "bold" | "outline" | undefined;
|
|
285
|
-
styleMode?: "plain" | "shadow" | "watercolor" | undefined;
|
|
286
|
-
}>;
|
|
287
|
-
export type RenderPromptInput = z.infer<typeof renderPromptSchema>;
|
|
288
|
-
export type DiagramElementInput = z.infer<typeof diagramElementSchema>;
|
|
289
|
-
export type RenderElementsInput = z.infer<typeof renderElementsSchema>;
|
|
290
|
-
export type SingleDiagramInput = z.infer<typeof singleDiagramSchema>;
|
|
2
|
+
import { DiagramTypes, DiagramElementInput } from './schemas/shared';
|
|
3
|
+
import { CreateFileInput } from './schemas/createFile';
|
|
4
|
+
import { RenderPromptInput } from './schemas/renderPrompt';
|
|
5
|
+
import { RenderElementsInput } from './schemas/renderElements';
|
|
6
|
+
import { SingleDiagramInput } from './schemas/singleDiagram';
|
|
291
7
|
export type McpToolDefinition<TInput> = {
|
|
292
8
|
name: string;
|
|
293
9
|
description: string;
|
|
294
10
|
schema: z.ZodType<TInput>;
|
|
295
|
-
jsonSchema:
|
|
11
|
+
jsonSchema: Record<string, unknown>;
|
|
296
12
|
};
|
|
297
|
-
export declare const mcpTools: ReadonlyArray<McpToolDefinition<
|
|
13
|
+
export declare const mcpTools: ReadonlyArray<McpToolDefinition<any>>;
|
|
298
14
|
export type McpToolName = typeof mcpTools[number]['name'];
|
|
299
15
|
export declare function isMcpToolName(name: unknown): name is McpToolName;
|
|
300
|
-
export declare const mcpToolMap: Map<string, McpToolDefinition<
|
|
16
|
+
export declare const mcpToolMap: Map<string, McpToolDefinition<any>>;
|
|
301
17
|
export declare const singleDiagramTools: Record<string, DiagramTypes>;
|
|
302
18
|
export declare function isSingleDiagramTool(name: string): name is keyof typeof singleDiagramTools;
|
|
303
|
-
export {};
|
|
19
|
+
export type { RenderPromptInput, DiagramElementInput, RenderElementsInput, SingleDiagramInput, CreateFileInput, };
|
|
20
|
+
export { DiagramTypes };
|
|
304
21
|
//# 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;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,YAAY,EAEZ,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAsB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAwB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAuB,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAclF,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,CAiD1D,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;AAGD,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|