@eraserlabs/eraser-mcp 0.2.0 → 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.
Files changed (37) hide show
  1. package/dist/descriptions/bpmn.d.ts +2 -0
  2. package/dist/descriptions/bpmn.d.ts.map +1 -0
  3. package/dist/descriptions/bpmn.js +42 -0
  4. package/dist/descriptions/cloudArchitecture.d.ts +2 -0
  5. package/dist/descriptions/cloudArchitecture.d.ts.map +1 -0
  6. package/dist/descriptions/cloudArchitecture.js +39 -0
  7. package/dist/descriptions/erd.d.ts +2 -0
  8. package/dist/descriptions/erd.d.ts.map +1 -0
  9. package/dist/descriptions/erd.js +44 -0
  10. package/dist/descriptions/flowchart.d.ts +2 -0
  11. package/dist/descriptions/flowchart.d.ts.map +1 -0
  12. package/dist/descriptions/flowchart.js +37 -0
  13. package/dist/descriptions/sequenceDiagram.d.ts +2 -0
  14. package/dist/descriptions/sequenceDiagram.d.ts.map +1 -0
  15. package/dist/descriptions/sequenceDiagram.js +26 -0
  16. package/dist/descriptions/tools.d.ts +4 -0
  17. package/dist/descriptions/tools.d.ts.map +1 -0
  18. package/dist/descriptions/tools.js +6 -0
  19. package/dist/schemas/createFile.d.ts +39 -0
  20. package/dist/schemas/createFile.d.ts.map +1 -0
  21. package/dist/schemas/createFile.js +21 -0
  22. package/dist/schemas/renderElements.d.ts +124 -0
  23. package/dist/schemas/renderElements.d.ts.map +1 -0
  24. package/dist/schemas/renderElements.js +10 -0
  25. package/dist/schemas/renderPrompt.d.ts +115 -0
  26. package/dist/schemas/renderPrompt.d.ts.map +1 -0
  27. package/dist/schemas/renderPrompt.js +16 -0
  28. package/dist/schemas/shared.d.ts +128 -0
  29. package/dist/schemas/shared.d.ts.map +1 -0
  30. package/dist/schemas/shared.js +68 -0
  31. package/dist/schemas/singleDiagram.d.ts +70 -0
  32. package/dist/schemas/singleDiagram.d.ts.map +1 -0
  33. package/dist/schemas/singleDiagram.js +8 -0
  34. package/dist/tools.d.ts +10 -296
  35. package/dist/tools.d.ts.map +1 -1
  36. package/dist/tools.js +47 -382
  37. package/package.json +3 -2
@@ -0,0 +1,2 @@
1
+ export declare const BPMN_DESCRIPTION = "Render a BPMN (Business Process Model and Notation) diagram. Use Eraser's BPMN syntax.\n\nExample syntax:\n```\ntitle Order Fulfillment Process\n\n// Swimlanes (pools)\nCustomer [color: blue] {\n Place Order [type: event, icon: shopping-cart]\n Receive Confirmation [type: event, icon: mail]\n Receive Package [type: event, icon: package]\n}\n\nSales [color: green] {\n Process Order [icon: clipboard]\n Check Inventory [icon: database]\n In Stock? [type: gateway, icon: help-circle]\n Create Backorder [icon: clock]\n Confirm Order [icon: check]\n}\n\nWarehouse [color: orange] {\n Pick Items [icon: box]\n Pack Order [icon: package]\n Ship Order [icon: truck]\n}\n\n// Flow connections (use --> for message flows between pools)\nPlace Order --> Process Order: Order details\nProcess Order > Check Inventory\nCheck Inventory > In Stock?\nIn Stock? > Confirm Order: Yes\nIn Stock? > Create Backorder: No\nConfirm Order --> Receive Confirmation: Confirmation email\nConfirm Order > Pick Items\nPick Items > Pack Order\nPack Order > Ship Order\nShip Order --> Receive Package: Delivery\n```";
2
+ //# sourceMappingURL=bpmn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bpmn.d.ts","sourceRoot":"","sources":["../../src/descriptions/bpmn.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,glCAsCtB,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BPMN_DESCRIPTION = void 0;
4
+ exports.BPMN_DESCRIPTION = `Render a BPMN (Business Process Model and Notation) diagram. Use Eraser's BPMN syntax.
5
+
6
+ Example syntax:
7
+ \`\`\`
8
+ title Order Fulfillment Process
9
+
10
+ // Swimlanes (pools)
11
+ Customer [color: blue] {
12
+ Place Order [type: event, icon: shopping-cart]
13
+ Receive Confirmation [type: event, icon: mail]
14
+ Receive Package [type: event, icon: package]
15
+ }
16
+
17
+ Sales [color: green] {
18
+ Process Order [icon: clipboard]
19
+ Check Inventory [icon: database]
20
+ In Stock? [type: gateway, icon: help-circle]
21
+ Create Backorder [icon: clock]
22
+ Confirm Order [icon: check]
23
+ }
24
+
25
+ Warehouse [color: orange] {
26
+ Pick Items [icon: box]
27
+ Pack Order [icon: package]
28
+ Ship Order [icon: truck]
29
+ }
30
+
31
+ // Flow connections (use --> for message flows between pools)
32
+ Place Order --> Process Order: Order details
33
+ Process Order > Check Inventory
34
+ Check Inventory > In Stock?
35
+ In Stock? > Confirm Order: Yes
36
+ In Stock? > Create Backorder: No
37
+ Confirm Order --> Receive Confirmation: Confirmation email
38
+ Confirm Order > Pick Items
39
+ Pick Items > Pack Order
40
+ Pack Order > Ship Order
41
+ Ship Order --> Receive Package: Delivery
42
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const CLOUD_ARCHITECTURE_DESCRIPTION = "Render a cloud architecture diagram. Use Eraser's cloud architecture syntax.\n\nExample syntax:\n```\ntitle AWS Microservices Architecture\n\n// Groups with cloud provider icons\nAWS Cloud [icon: aws] {\n VPC [icon: aws-vpc] {\n Public Subnet {\n ALB [icon: aws-elb]\n NAT Gateway [icon: aws-nat-gateway]\n }\n Private Subnet {\n ECS Cluster [icon: aws-ecs] {\n API Service [icon: aws-lambda]\n Worker Service [icon: aws-lambda]\n }\n RDS [icon: aws-rds]\n ElastiCache [icon: aws-elasticache]\n }\n }\n S3 [icon: aws-s3]\n CloudFront [icon: aws-cloudfront]\n}\n\nUsers [icon: users]\n\n// Connections\nUsers > CloudFront\nCloudFront > ALB\nALB > API Service\nAPI Service > RDS\nAPI Service > ElastiCache\nWorker Service > S3\n```";
2
+ //# sourceMappingURL=cloudArchitecture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudArchitecture.d.ts","sourceRoot":"","sources":["../../src/descriptions/cloudArchitecture.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,0xBAmCpC,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLOUD_ARCHITECTURE_DESCRIPTION = void 0;
4
+ exports.CLOUD_ARCHITECTURE_DESCRIPTION = `Render a cloud architecture diagram. Use Eraser's cloud architecture syntax.
5
+
6
+ Example syntax:
7
+ \`\`\`
8
+ title AWS Microservices Architecture
9
+
10
+ // Groups with cloud provider icons
11
+ AWS Cloud [icon: aws] {
12
+ VPC [icon: aws-vpc] {
13
+ Public Subnet {
14
+ ALB [icon: aws-elb]
15
+ NAT Gateway [icon: aws-nat-gateway]
16
+ }
17
+ Private Subnet {
18
+ ECS Cluster [icon: aws-ecs] {
19
+ API Service [icon: aws-lambda]
20
+ Worker Service [icon: aws-lambda]
21
+ }
22
+ RDS [icon: aws-rds]
23
+ ElastiCache [icon: aws-elasticache]
24
+ }
25
+ }
26
+ S3 [icon: aws-s3]
27
+ CloudFront [icon: aws-cloudfront]
28
+ }
29
+
30
+ Users [icon: users]
31
+
32
+ // Connections
33
+ Users > CloudFront
34
+ CloudFront > ALB
35
+ ALB > API Service
36
+ API Service > RDS
37
+ API Service > ElastiCache
38
+ Worker Service > S3
39
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const ERD_DESCRIPTION = "Render an entity-relationship diagram. Use Eraser's ERD syntax.\n\nExample syntax:\n```\ntitle E-commerce Database\n\n// Define tables with columns\nusers [icon: user, color: blue] {\n id int pk\n email string\n name string\n created_at timestamp\n}\n\norders [icon: shopping-cart, color: green] {\n id int pk\n user_id int\n total decimal\n status string\n created_at timestamp\n}\n\nproducts [icon: box, color: orange] {\n id int pk\n name string\n price decimal\n stock int\n}\n\norder_items [icon: list] {\n order_id int pk\n product_id int pk\n quantity int\n price decimal\n}\n\n// Relationships\nusers.id < orders.user_id\norders.id < order_items.order_id\nproducts.id < order_items.product_id\n```";
2
+ //# sourceMappingURL=erd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erd.d.ts","sourceRoot":"","sources":["../../src/descriptions/erd.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,utBAwCrB,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ERD_DESCRIPTION = void 0;
4
+ exports.ERD_DESCRIPTION = `Render an entity-relationship diagram. Use Eraser's ERD syntax.
5
+
6
+ Example syntax:
7
+ \`\`\`
8
+ title E-commerce Database
9
+
10
+ // Define tables with columns
11
+ users [icon: user, color: blue] {
12
+ id int pk
13
+ email string
14
+ name string
15
+ created_at timestamp
16
+ }
17
+
18
+ orders [icon: shopping-cart, color: green] {
19
+ id int pk
20
+ user_id int
21
+ total decimal
22
+ status string
23
+ created_at timestamp
24
+ }
25
+
26
+ products [icon: box, color: orange] {
27
+ id int pk
28
+ name string
29
+ price decimal
30
+ stock int
31
+ }
32
+
33
+ order_items [icon: list] {
34
+ order_id int pk
35
+ product_id int pk
36
+ quantity int
37
+ price decimal
38
+ }
39
+
40
+ // Relationships
41
+ users.id < orders.user_id
42
+ orders.id < order_items.order_id
43
+ products.id < order_items.product_id
44
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const FLOWCHART_DESCRIPTION = "Render a flowchart diagram. Use Eraser's flowchart syntax. Prefer horizontal layout (direction right) unless the user wants a vertical diagram.\n\nExample syntax:\n```\ntitle User Registration Flow\ndirection right\n\n// Nodes with shapes and icons\nStart [shape: oval, icon: play]\nEnter Details [icon: edit]\nValid Email? [shape: diamond, icon: help-circle]\nSend Verification [icon: mail]\nEmail Verified? [shape: diamond]\nCreate Account [icon: user-plus, color: green]\nShow Error [icon: alert-triangle, color: red]\nEnd [shape: oval, icon: check]\n\n// Groups\nValidation [color: blue] {\n Check Password Strength [icon: lock]\n Password OK? [shape: diamond]\n}\n\n// Connections with labels\nStart > Enter Details\nEnter Details > Valid Email?\nValid Email? > Send Verification: Yes\nValid Email? > Show Error: No\nSend Verification > Email Verified?\nEmail Verified? > Create Account: Yes\nEmail Verified? > Show Error: No\nCreate Account > End\nShow Error > Enter Details\n```";
2
+ //# sourceMappingURL=flowchart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowchart.d.ts","sourceRoot":"","sources":["../../src/descriptions/flowchart.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,g+BAiC3B,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FLOWCHART_DESCRIPTION = void 0;
4
+ exports.FLOWCHART_DESCRIPTION = `Render a flowchart diagram. Use Eraser's flowchart syntax. Prefer horizontal layout (direction right) unless the user wants a vertical diagram.
5
+
6
+ Example syntax:
7
+ \`\`\`
8
+ title User Registration Flow
9
+ direction right
10
+
11
+ // Nodes with shapes and icons
12
+ Start [shape: oval, icon: play]
13
+ Enter Details [icon: edit]
14
+ Valid Email? [shape: diamond, icon: help-circle]
15
+ Send Verification [icon: mail]
16
+ Email Verified? [shape: diamond]
17
+ Create Account [icon: user-plus, color: green]
18
+ Show Error [icon: alert-triangle, color: red]
19
+ End [shape: oval, icon: check]
20
+
21
+ // Groups
22
+ Validation [color: blue] {
23
+ Check Password Strength [icon: lock]
24
+ Password OK? [shape: diamond]
25
+ }
26
+
27
+ // Connections with labels
28
+ Start > Enter Details
29
+ Enter Details > Valid Email?
30
+ Valid Email? > Send Verification: Yes
31
+ Valid Email? > Show Error: No
32
+ Send Verification > Email Verified?
33
+ Email Verified? > Create Account: Yes
34
+ Email Verified? > Show Error: No
35
+ Create Account > End
36
+ Show Error > Enter Details
37
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const SEQUENCE_DIAGRAM_DESCRIPTION = "Render a sequence diagram. Use Eraser's sequence diagram syntax.\n\nExample syntax:\n```\ntitle Authentication Flow\nautoNumber on\n\nClient [icon: monitor, color: gray]\nServer [icon: server, color: blue]\nService [icon: tool, color: green]\n\nClient > Server: Data request\nactivate Server\nServer <> Service: Service request\n\nloop [label: until success, color: green] {\n Service > Service: Check availability\n}\n\nServer - Service: Data processing\nServer --> Client: Data response\ndeactivate Server\n```";
2
+ //# sourceMappingURL=sequenceDiagram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sequenceDiagram.d.ts","sourceRoot":"","sources":["../../src/descriptions/sequenceDiagram.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,sgBAsBlC,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEQUENCE_DIAGRAM_DESCRIPTION = void 0;
4
+ exports.SEQUENCE_DIAGRAM_DESCRIPTION = `Render a sequence diagram. Use Eraser's sequence diagram syntax.
5
+
6
+ Example syntax:
7
+ \`\`\`
8
+ title Authentication Flow
9
+ autoNumber on
10
+
11
+ Client [icon: monitor, color: gray]
12
+ Server [icon: server, color: blue]
13
+ Service [icon: tool, color: green]
14
+
15
+ Client > Server: Data request
16
+ activate Server
17
+ Server <> Service: Service request
18
+
19
+ loop [label: until success, color: green] {
20
+ Service > Service: Check availability
21
+ }
22
+
23
+ Server - Service: Data processing
24
+ Server --> Client: Data response
25
+ deactivate Server
26
+ \`\`\``;
@@ -0,0 +1,4 @@
1
+ export declare const CREATE_FILE_DESCRIPTION = "Create a new Eraser file with markdown notes and/or diagram elements. Supports embedded diagram code blocks in markdown (e.g., ```flowchart-diagram) which are automatically converted to interactive canvas diagrams. Additionally supports standalone diagram elements via the elements array.";
2
+ export declare const RENDER_PROMPT_DESCRIPTION = "Generate a diagram using AI from a natural language prompt, existing code, infrastructure configuration, or other diagram languages. Best for when you want AI to create the diagram code for you.";
3
+ export declare const RENDER_ELEMENTS_DESCRIPTION = "Render multiple diagram elements. Advanced use case for rendering multiple diagrams at once.";
4
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/descriptions/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,qSACgQ,CAAC;AAErS,eAAO,MAAM,yBAAyB,uMACgK,CAAC;AAEvM,eAAO,MAAM,2BAA2B,iGACwD,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RENDER_ELEMENTS_DESCRIPTION = exports.RENDER_PROMPT_DESCRIPTION = exports.CREATE_FILE_DESCRIPTION = void 0;
4
+ exports.CREATE_FILE_DESCRIPTION = 'Create a new Eraser file with markdown notes and/or diagram elements. Supports embedded diagram code blocks in markdown (e.g., ```flowchart-diagram) which are automatically converted to interactive canvas diagrams. Additionally supports standalone diagram elements via the elements array.';
5
+ exports.RENDER_PROMPT_DESCRIPTION = 'Generate a diagram using AI from a natural language prompt, existing code, infrastructure configuration, or other diagram languages. Best for when you want AI to create the diagram code for you.';
6
+ exports.RENDER_ELEMENTS_DESCRIPTION = 'Render multiple diagram elements. Advanced use case for rendering multiple diagrams at once.';
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const createFileSchema: z.ZodObject<{
3
+ title: z.ZodOptional<z.ZodString>;
4
+ markdown: z.ZodOptional<z.ZodString>;
5
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ type: z.ZodLiteral<"diagram">;
7
+ diagramType: z.ZodNativeEnum<typeof import("./shared").DiagramTypes>;
8
+ code: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: "diagram";
11
+ code: string;
12
+ diagramType: import("./shared").DiagramTypes;
13
+ }, {
14
+ type: "diagram";
15
+ code: string;
16
+ diagramType: import("./shared").DiagramTypes;
17
+ }>, "many">>;
18
+ linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
21
+ title?: string | undefined;
22
+ markdown?: string | undefined;
23
+ elements?: {
24
+ type: "diagram";
25
+ code: string;
26
+ diagramType: import("./shared").DiagramTypes;
27
+ }[] | undefined;
28
+ }, {
29
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
30
+ title?: string | undefined;
31
+ markdown?: string | undefined;
32
+ elements?: {
33
+ type: "diagram";
34
+ code: string;
35
+ diagramType: import("./shared").DiagramTypes;
36
+ }[] | undefined;
37
+ }>;
38
+ export type CreateFileInput = z.infer<typeof createFileSchema>;
39
+ //# sourceMappingURL=createFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFile.d.ts","sourceRoot":"","sources":["../../src/schemas/createFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB3B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createFileSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("./shared");
6
+ exports.createFileSchema = zod_1.z.object({
7
+ title: zod_1.z.string().optional().describe('Title for the file.'),
8
+ markdown: zod_1.z
9
+ .string()
10
+ .optional()
11
+ .describe('Markdown content for notes. Supports diagram code blocks (e.g., ```flowchart-diagram) which are converted to embedded diagrams.'),
12
+ elements: zod_1.z
13
+ .array(zod_1.z.object({
14
+ type: zod_1.z.literal('diagram'),
15
+ diagramType: shared_1.DiagramTypesEnum,
16
+ code: zod_1.z.string(),
17
+ }))
18
+ .optional()
19
+ .describe('Standalone diagram elements using diagram DSL syntax. Will be added to canvas.'),
20
+ linkAccess: shared_1.LinkAccessEnum.optional().describe('Optional link sharing access level. Defaults to using team config.'),
21
+ });
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ export declare const renderElementsSchema: 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
+ elements: z.ZodArray<z.ZodObject<{
24
+ type: z.ZodLiteral<"diagram">;
25
+ diagramType: z.ZodNativeEnum<typeof import("./shared").DiagramTypes>;
26
+ code: z.ZodString;
27
+ x: z.ZodOptional<z.ZodNumber>;
28
+ y: z.ZodOptional<z.ZodNumber>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "diagram";
31
+ code: string;
32
+ diagramType: import("./shared").DiagramTypes;
33
+ x?: number | undefined;
34
+ y?: number | undefined;
35
+ }, {
36
+ type: "diagram";
37
+ code: string;
38
+ diagramType: import("./shared").DiagramTypes;
39
+ x?: number | undefined;
40
+ y?: number | undefined;
41
+ }>, "many">;
42
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
43
+ imageQuality: 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
+ 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"]>>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ create?: boolean | undefined;
57
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
58
+ }, {
59
+ create?: boolean | undefined;
60
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
61
+ }>>;
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
+ returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
92
+ fileOptions: z.ZodOptional<z.ZodObject<{
93
+ create: z.ZodOptional<z.ZodBoolean>;
94
+ linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ create?: boolean | undefined;
97
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
98
+ }, {
99
+ create?: boolean | undefined;
100
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
101
+ }>>;
102
+ } & {
103
+ elements: z.ZodArray<z.ZodObject<{
104
+ type: z.ZodLiteral<"diagram">;
105
+ diagramType: z.ZodNativeEnum<typeof import("./shared").DiagramTypes>;
106
+ code: z.ZodString;
107
+ x: z.ZodOptional<z.ZodNumber>;
108
+ y: z.ZodOptional<z.ZodNumber>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ type: "diagram";
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">>;
123
+ export type RenderElementsInput = z.infer<typeof renderElementsSchema>;
124
+ //# sourceMappingURL=renderElements.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAIjB,CAAC;AAEjB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderElementsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("./shared");
6
+ exports.renderElementsSchema = shared_1.renderOptionsSchema
7
+ .extend({
8
+ elements: zod_1.z.array(shared_1.diagramElementSchema),
9
+ })
10
+ .passthrough();
@@ -0,0 +1,115 @@
1
+ import { z } from 'zod';
2
+ export declare const renderPromptSchema: 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
+ text: z.ZodString;
24
+ diagramType: z.ZodOptional<z.ZodString>;
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;
38
+ }>>;
39
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
40
+ imageQuality: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
41
+ background: z.ZodOptional<z.ZodBoolean>;
42
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
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"]>>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ create?: boolean | undefined;
54
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
55
+ }, {
56
+ create?: boolean | undefined;
57
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
58
+ }>>;
59
+ } & {
60
+ text: z.ZodString;
61
+ diagramType: z.ZodOptional<z.ZodString>;
62
+ priorRequestId: z.ZodOptional<z.ZodString>;
63
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
64
+ contextId: z.ZodOptional<z.ZodString>;
65
+ mode: z.ZodOptional<z.ZodEnum<["standard", "premium"]>>;
66
+ git: z.ZodOptional<z.ZodObject<{
67
+ repoName: z.ZodString;
68
+ orgName: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ repoName: string;
71
+ orgName: string;
72
+ }, {
73
+ repoName: string;
74
+ orgName: string;
75
+ }>>;
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
+ returnImageAsFile: z.ZodOptional<z.ZodBoolean>;
86
+ fileOptions: z.ZodOptional<z.ZodObject<{
87
+ create: z.ZodOptional<z.ZodBoolean>;
88
+ linkAccess: z.ZodOptional<z.ZodEnum<["no-link-access", "anyone-with-link-can-edit", "publicly-viewable", "publicly-editable"]>>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ create?: boolean | undefined;
91
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
92
+ }, {
93
+ create?: boolean | undefined;
94
+ linkAccess?: "no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | undefined;
95
+ }>>;
96
+ } & {
97
+ text: z.ZodString;
98
+ diagramType: z.ZodOptional<z.ZodString>;
99
+ priorRequestId: z.ZodOptional<z.ZodString>;
100
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
101
+ contextId: z.ZodOptional<z.ZodString>;
102
+ mode: z.ZodOptional<z.ZodEnum<["standard", "premium"]>>;
103
+ git: z.ZodOptional<z.ZodObject<{
104
+ repoName: z.ZodString;
105
+ orgName: z.ZodString;
106
+ }, "strip", z.ZodTypeAny, {
107
+ repoName: string;
108
+ orgName: string;
109
+ }, {
110
+ repoName: string;
111
+ orgName: string;
112
+ }>>;
113
+ }, z.ZodTypeAny, "passthrough">>;
114
+ export type RenderPromptInput = z.infer<typeof renderPromptSchema>;
115
+ //# sourceMappingURL=renderPrompt.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAUf,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderPromptSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("./shared");
6
+ exports.renderPromptSchema = shared_1.renderOptionsSchema
7
+ .extend({
8
+ text: zod_1.z.string(),
9
+ diagramType: zod_1.z.string().optional(),
10
+ priorRequestId: zod_1.z.string().optional().describe('Allows editing a previously created diagram.'),
11
+ attachments: zod_1.z.array(zod_1.z.unknown()).optional(),
12
+ contextId: zod_1.z.string().optional().describe('ID of an AI preset belonging to the team.'),
13
+ mode: zod_1.z.enum(shared_1.aiModeSettings).optional(),
14
+ git: shared_1.gitRepoSchema.optional(),
15
+ })
16
+ .passthrough();