@drawcall/design 0.6.2 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/mcp/file.js +11 -6
- package/dist/mcp/frame.js +13 -7
- package/dist/mcp/project.js +6 -3
- package/dist/mcp/schema.js +4 -4
- package/dist/mcp/skill.js +2 -1
- package/dist/mcp/types.d.ts +1 -0
- package/dist/skill.generated.d.ts +1 -1
- package/dist/skill.generated.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,4 +58,4 @@ registerDesignTools(server, client);
|
|
|
58
58
|
The host owns the server identity, authentication, and transport. The MCP SDK
|
|
59
59
|
is an optional peer dependency and is required only when mounting these tools.
|
|
60
60
|
|
|
61
|
-
GLTS frames accept only `.glts` files. An absent `index.glts` still renders an intentionally empty frame. For authored scenes, work top-down: write `index.glts`, reference planned child assets, then implement those children progressively. A missing imported `.glts` path renders a labeled glowing placeholder without creating a stored file; writing the real file replaces it on revalidation. Image and Market files are available through the same filesystem but are read-only. Read `npx @drawcall/design skill` (or MCP `
|
|
61
|
+
GLTS frames accept only `.glts` files. An absent `index.glts` still renders an intentionally empty frame. For authored scenes, work top-down: write `index.glts`, reference planned child assets, then implement those children progressively. A missing imported `.glts` path renders a labeled glowing placeholder without creating a stored file; writing the real file replaces it on revalidation. Image and Market files are available through the same filesystem but are read-only. Read `npx @drawcall/design skill` (or MCP `get_design_instructions`) before creating or changing a GLTS asset.
|
package/dist/mcp/file.js
CHANGED
|
@@ -2,7 +2,8 @@ import { fileTextSchema } from "../v1/schemas.js";
|
|
|
2
2
|
import { fileResult, result } from "./result.js";
|
|
3
3
|
import { directoryPathSchema, fileInput, projectInput } from "./schema.js";
|
|
4
4
|
export function registerFileTools(server, client) {
|
|
5
|
-
server.registerTool("
|
|
5
|
+
server.registerTool("list_design_files", {
|
|
6
|
+
title: "List Design files",
|
|
6
7
|
description: "Return canonical project-absolute paths. Omit path to list the entire project; otherwise use /<frame-id> without a trailing slash. Pass returned file paths unchanged to file tools.",
|
|
7
8
|
inputSchema: projectInput.extend({
|
|
8
9
|
path: directoryPathSchema.optional(),
|
|
@@ -17,8 +18,9 @@ export function registerFileTools(server, client) {
|
|
|
17
18
|
project,
|
|
18
19
|
...(path === undefined ? {} : { path }),
|
|
19
20
|
})));
|
|
20
|
-
server.registerTool("
|
|
21
|
-
|
|
21
|
+
server.registerTool("read_design_file", {
|
|
22
|
+
title: "Read Design file",
|
|
23
|
+
description: "Read one canonical project-absolute path returned by list_design_files. The path includes the frame ID; this tool does not accept a frame argument. Binary files return their hosted URL and media type.",
|
|
22
24
|
inputSchema: fileInput,
|
|
23
25
|
annotations: {
|
|
24
26
|
readOnlyHint: true,
|
|
@@ -30,7 +32,8 @@ export function registerFileTools(server, client) {
|
|
|
30
32
|
const file = await client.filesystem.read({ project, path });
|
|
31
33
|
return file.type === "text" ? fileResult(file) : result(file);
|
|
32
34
|
});
|
|
33
|
-
server.registerTool("
|
|
35
|
+
server.registerTool("write_design_file", {
|
|
36
|
+
title: "Write Design file",
|
|
34
37
|
description: "Create or replace one .glts file at a canonical project-absolute path. The path includes the frame ID; this tool does not accept a frame argument.",
|
|
35
38
|
inputSchema: fileInput.extend({ text: fileTextSchema }),
|
|
36
39
|
annotations: {
|
|
@@ -39,7 +42,8 @@ export function registerFileTools(server, client) {
|
|
|
39
42
|
openWorldHint: true,
|
|
40
43
|
},
|
|
41
44
|
}, async ({ project, path, text }) => result(await client.filesystem.write({ project, path, text })));
|
|
42
|
-
server.registerTool("
|
|
45
|
+
server.registerTool("edit_design_file", {
|
|
46
|
+
title: "Edit Design file",
|
|
43
47
|
description: "Replace oldText when it occurs exactly once at a canonical project-absolute .glts path. The path includes the frame ID; this tool does not accept a frame argument.",
|
|
44
48
|
inputSchema: fileInput.extend({
|
|
45
49
|
oldText: fileTextSchema.min(1),
|
|
@@ -51,7 +55,8 @@ export function registerFileTools(server, client) {
|
|
|
51
55
|
openWorldHint: true,
|
|
52
56
|
},
|
|
53
57
|
}, async ({ project, path, oldText, newText }) => result(await client.filesystem.edit({ project, path, oldText, newText })));
|
|
54
|
-
server.registerTool("
|
|
58
|
+
server.registerTool("delete_design_file", {
|
|
59
|
+
title: "Delete Design file",
|
|
55
60
|
description: "Permanently delete one .glts file at a canonical project-absolute path. The path includes the frame ID; this tool does not accept a frame argument.",
|
|
56
61
|
inputSchema: fileInput,
|
|
57
62
|
annotations: {
|
package/dist/mcp/frame.js
CHANGED
|
@@ -2,7 +2,8 @@ import { frameNameSchema, generateImageFrameSchema, } from "../v1/schemas.js";
|
|
|
2
2
|
import { base64, result } from "./result.js";
|
|
3
3
|
import { createFrameSchema, frameCreationInput, frameInput, projectInput, } from "./schema.js";
|
|
4
4
|
export function registerFrameTools(server, client, fetcher) {
|
|
5
|
-
server.registerTool("
|
|
5
|
+
server.registerTool("list_design_frames", {
|
|
6
|
+
title: "List Design frames",
|
|
6
7
|
description: "List frames. Use their immutable ids for frame commands and filesystem paths.",
|
|
7
8
|
inputSchema: projectInput,
|
|
8
9
|
annotations: {
|
|
@@ -12,8 +13,9 @@ export function registerFrameTools(server, client, fetcher) {
|
|
|
12
13
|
idempotentHint: true,
|
|
13
14
|
},
|
|
14
15
|
}, async ({ project }) => result({ frames: await client.frame.list({ project }) }));
|
|
15
|
-
server.registerTool("
|
|
16
|
-
|
|
16
|
+
server.registerTool("create_design_frame", {
|
|
17
|
+
title: "Create Design frame",
|
|
18
|
+
description: "Create a frame in a Drawcall Design project. Use type=glts for reusable 3D objects and scenes, then write its source with write_design_file. Use type=image only for an existing public image URL and type=market only for an exact public Market asset.",
|
|
17
19
|
inputSchema: createFrameSchema,
|
|
18
20
|
annotations: {
|
|
19
21
|
readOnlyHint: false,
|
|
@@ -24,7 +26,8 @@ export function registerFrameTools(server, client, fetcher) {
|
|
|
24
26
|
}, async (input) => result({
|
|
25
27
|
frame: await client.frame.create(frameCreationInput(input)),
|
|
26
28
|
}));
|
|
27
|
-
server.registerTool("
|
|
29
|
+
server.registerTool("generate_design_image", {
|
|
30
|
+
title: "Generate Design image",
|
|
28
31
|
description: "Generate a 2D image or reference frame from text and up to four same-project image frame references. Use only when the user asks for a 2D image, picture, concept, or reference; do not use for 3D objects, scenes, or reusable GLTS assets. For edit, target is reference 0. New frames are the default; result=replace explicitly replaces the target image while preserving its frame ID, name, and layout.",
|
|
29
32
|
inputSchema: generateImageFrameSchema,
|
|
30
33
|
annotations: {
|
|
@@ -36,7 +39,8 @@ export function registerFrameTools(server, client, fetcher) {
|
|
|
36
39
|
}, async (input) => result({
|
|
37
40
|
frame: await client.frame.generateImage(input),
|
|
38
41
|
}));
|
|
39
|
-
server.registerTool("
|
|
42
|
+
server.registerTool("rename_design_frame", {
|
|
43
|
+
title: "Rename Design frame",
|
|
40
44
|
description: "Rename a frame. Its immutable frame id does not change.",
|
|
41
45
|
inputSchema: frameInput.extend({ name: frameNameSchema }),
|
|
42
46
|
annotations: {
|
|
@@ -47,7 +51,8 @@ export function registerFrameTools(server, client, fetcher) {
|
|
|
47
51
|
}, async ({ project, frame, name }) => result({
|
|
48
52
|
frame: await client.frame.rename({ project, frame, name }),
|
|
49
53
|
}));
|
|
50
|
-
server.registerTool("
|
|
54
|
+
server.registerTool("delete_design_frame", {
|
|
55
|
+
title: "Delete Design frame",
|
|
51
56
|
description: "Permanently delete a frame.",
|
|
52
57
|
inputSchema: frameInput,
|
|
53
58
|
annotations: {
|
|
@@ -57,7 +62,8 @@ export function registerFrameTools(server, client, fetcher) {
|
|
|
57
62
|
idempotentHint: false,
|
|
58
63
|
},
|
|
59
64
|
}, async ({ project, frame }) => result(await client.frame.delete({ project, frame })));
|
|
60
|
-
server.registerTool("
|
|
65
|
+
server.registerTool("get_design_frame_screenshot", {
|
|
66
|
+
title: "Get Design frame screenshot",
|
|
61
67
|
description: "Render a DPR-1 PNG screenshot of a frame.",
|
|
62
68
|
inputSchema: frameInput,
|
|
63
69
|
annotations: {
|
package/dist/mcp/project.js
CHANGED
|
@@ -3,7 +3,8 @@ import { projectNameSchema } from "../v1/schemas.js";
|
|
|
3
3
|
import { result } from "./result.js";
|
|
4
4
|
import { projectInput } from "./schema.js";
|
|
5
5
|
export function registerProjectTools(server, client) {
|
|
6
|
-
server.registerTool("
|
|
6
|
+
server.registerTool("list_design_projects", {
|
|
7
|
+
title: "List Design projects",
|
|
7
8
|
description: "List projects available to the current Drawcall account.",
|
|
8
9
|
annotations: {
|
|
9
10
|
readOnlyHint: true,
|
|
@@ -12,7 +13,8 @@ export function registerProjectTools(server, client) {
|
|
|
12
13
|
idempotentHint: true,
|
|
13
14
|
},
|
|
14
15
|
}, async () => result({ projects: await client.project.list() }));
|
|
15
|
-
server.registerTool("
|
|
16
|
+
server.registerTool("create_design_project", {
|
|
17
|
+
title: "Create Design project",
|
|
16
18
|
description: "Create a project. Use its returned immutable id in every later call.",
|
|
17
19
|
inputSchema: z.object({ name: projectNameSchema }).strict(),
|
|
18
20
|
annotations: {
|
|
@@ -22,7 +24,8 @@ export function registerProjectTools(server, client) {
|
|
|
22
24
|
idempotentHint: false,
|
|
23
25
|
},
|
|
24
26
|
}, async ({ name }) => result({ project: await client.project.create({ name }) }));
|
|
25
|
-
server.registerTool("
|
|
27
|
+
server.registerTool("delete_design_project", {
|
|
28
|
+
title: "Delete Design project",
|
|
26
29
|
description: "Permanently delete a project and its frames.",
|
|
27
30
|
inputSchema: projectInput,
|
|
28
31
|
annotations: {
|
package/dist/mcp/schema.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { MAX_FRAME_DIMENSION, designIdSchema, frameNameSchema, imageUrlSchema, marketAssetSchema, projectDirectoryPathSchema, projectFilePathSchema, } from "../v1/schemas.js";
|
|
3
|
-
export const projectIdSchema = designIdSchema.describe("Exact project ID returned by
|
|
4
|
-
export const frameIdSchema = designIdSchema.describe("Exact frame ID returned by
|
|
3
|
+
export const projectIdSchema = designIdSchema.describe("Exact project ID returned by list_design_projects");
|
|
4
|
+
export const frameIdSchema = designIdSchema.describe("Exact frame ID returned by list_design_frames");
|
|
5
5
|
export const directoryPathSchema = projectDirectoryPathSchema.describe("Project-absolute directory path without a trailing slash; omit it to list the entire project");
|
|
6
|
-
export const filePathSchema = projectFilePathSchema.describe("Project-absolute file path returned by
|
|
6
|
+
export const filePathSchema = projectFilePathSchema.describe("Project-absolute file path returned by list_design_files, including the frame ID; pass it unchanged");
|
|
7
7
|
const sizeSchema = z.coerce.number().int().min(1).max(MAX_FRAME_DIMENSION);
|
|
8
8
|
const positionSchema = z.coerce.number().finite();
|
|
9
9
|
// Some MCP clients lose property types in discriminated unions and serialize
|
|
10
|
-
// every
|
|
10
|
+
// every create_design_frame argument as a string. Keep the wire schema flat.
|
|
11
11
|
export const createFrameSchema = z
|
|
12
12
|
.object({
|
|
13
13
|
project: projectIdSchema,
|
package/dist/mcp/skill.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { mcpDesignSkill } from "../skill.generated.js";
|
|
3
3
|
export function registerSkillTool(server) {
|
|
4
|
-
server.registerTool("
|
|
4
|
+
server.registerTool("get_design_instructions", {
|
|
5
|
+
title: "Get Design instructions",
|
|
5
6
|
description: "Return instructions for building and composing 3D GLTS assets in Drawcall Design. Read it before creating or changing GLTS files.",
|
|
6
7
|
inputSchema: z.object({}).strict(),
|
|
7
8
|
annotations: {
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mcpDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## MCP transport\n\nMCP tools are the only Drawcall transport in this environment. Do not invoke a CLI or shell, make direct HTTP requests, or search the web for another transport. A failed MCP call does not make MCP unavailable.\n\nUse `
|
|
1
|
+
export declare const mcpDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## MCP transport\n\nMCP tools are the only Drawcall transport in this environment. Do not invoke a CLI or shell, make direct HTTP requests, or search the web for another transport. A failed MCP call does not make MCP unavailable.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. A 3D object, scene, or reusable asset is GLTS work, even when the user calls its canvas container a frame.\n\nTool arguments are JSON objects. File tools identify their target with `project` and a project-absolute `path`; they do not accept a separate `frame` argument. Call `list_design_files` and pass one of its returned paths unchanged.\n\n```json\n[\n {\n \"tool\": \"list_design_projects\",\n \"arguments\": {}\n },\n {\n \"tool\": \"list_design_frames\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\"\n }\n },\n {\n \"tool\": \"list_design_files\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\"\n }\n },\n {\n \"tool\": \"read_design_file\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"path\": \"/a4z8m2q7v9kcde/index.glts\"\n }\n },\n {\n \"tool\": \"edit_design_file\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"path\": \"/a4z8m2q7v9kcde/index.glts\",\n \"oldText\": \"color: 0xffffff\",\n \"newText\": \"color: 0x000000\"\n }\n }\n]\n```\n\nDesign is a remote, current-state canvas. Inspect the project and its frames before changing them. Use immutable IDs for every project and frame target; names are only labels.\n\n## Project filesystem\n\nA project is a hosted filesystem at `https://<project-id>.design.drawcallcontent.com/`. Each frame owns one top-level directory, `/<frame-id>`. Files use project-absolute paths that include that directory, for example `/a4z8m2q7v9kcde/index.glts`.\n\nCreate frames with an explicit type. Choose the type from the requested artifact, not from the word \"frame\": use GLTS for a 3D object or scene, especially one another frame will reuse. Use image only for a supplied 2D image URL and Market only for an exact public asset reference, `name@version`. GLTS frames require a viewport size; image and Market frames derive their canvas size.\n\nRead a file before editing it. Use a narrow edit for one known change and write a complete file when replacing it. Only GLTS frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Failures\n\nAn error means the requested operation did not happen. Follow its next action without switching transport. Correct invalid arguments from the documented shape. Refresh projects, frames, or files after a not-found or conflict error, then reuse the exact returned IDs and paths. Retry an upstream or internal failure once; if it repeats, report the failed operation and error. Never repeat an unchanged failed operation.\n\n## GLTS assets\n\nA GLTS frame contains only `.glts` files. `index.glts` is its optional root asset; without it the frame renders empty. Every `.glts` file is a trusted TypeScript ESM module that default-exports a no-argument class derived from `THREE.Object3D`. Avoid top-level side effects because reload evaluates the module again. Implement `dispose()` when the asset exclusively owns disposable resources.\n\nAuthor GLTS scenes top-down: create the root entry scene first, reference the child `.glts` assets it will compose, then implement those children progressively. A missing `.glts` import renders as a glowing marker labeled with its filename until the real file is written, so the completed parts of the scene remain visible. Treat the marker and its console warning as a temporary missing-dependency diagnostic, not as authored content.\n\n```ts\nimport * as THREE from \"three\";\nimport Wheel from \"./parts/wheel.glts\";\n\nexport default class Racecar extends THREE.Group {\n constructor() {\n super();\n this.add(new Wheel());\n }\n}\n```\n\nUse relative `.glts` imports within a frame. When a reusable 3D asset belongs in another frame, keep it in its own GLTS frame and import its root by project-absolute path from the consuming frame. Instantiate that import as often as needed instead of copying its source:\n\n```ts\nimport Chassis from \"/other-frame-id/index.glts\";\n```\n\nFor a non-GLTS file from an image or Market frame, preserve the project filesystem URL through `import.meta.url`:\n\n```ts\nconst modelUrl = new URL(\"/market-frame-id/models/car.glb\", import.meta.url);\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support local helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nThe viewer uses the first camera found by depth-first traversal. If none exists, it autofits the asset. Put an authored camera in the scene only when its framing is intentional. Double-clicking a frame enters orbit from that resolved view; deselecting restores it.\n\nTreat authoritative source or structured state as sufficient when it directly and completely determines the requested property. Do not take a screenshot merely to reconfirm that evidence. Take one only when the result depends on rendering or visual relationships the source cannot establish, such as layout, overlap, clipping, camera framing, lighting, or runtime-generated appearance, or when the user explicitly asks. Then inspect it against the request and iterate until the evidence supports completion.\n";
|
|
2
2
|
export declare const cliDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe CLI is the only Drawcall transport in this environment. Do not search for MCP tools or make direct HTTP requests. A failed CLI command does not justify switching transport.\n\nCLI calls are shell command strings. Select the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID.\n\n```sh\nnpx @drawcall/design project list\nnpx @drawcall/design -p r6z2n9k4x8m1qc frame list\nnpx @drawcall/design -p r6z2n9k4x8m1qc ls\nnpx @drawcall/design -p r6z2n9k4x8m1qc read /a4z8m2q7v9kcde/index.glts\nnpx @drawcall/design -p r6z2n9k4x8m1qc edit /a4z8m2q7v9kcde/index.glts 'color: 0xffffff' 'color: 0x000000'\n```\n\nDesign is a remote, current-state canvas. Inspect the project and its frames before changing them. Use immutable IDs for every project and frame target; names are only labels.\n\n## Project filesystem\n\nA project is a hosted filesystem at `https://<project-id>.design.drawcallcontent.com/`. Each frame owns one top-level directory, `/<frame-id>`. Files use project-absolute paths that include that directory, for example `/a4z8m2q7v9kcde/index.glts`.\n\nCreate frames with an explicit type. Choose the type from the requested artifact, not from the word \"frame\": use GLTS for a 3D object or scene, especially one another frame will reuse. Use image only for a supplied 2D image URL and Market only for an exact public asset reference, `name@version`. GLTS frames require a viewport size; image and Market frames derive their canvas size.\n\nRead a file before editing it. Use a narrow edit for one known change and write a complete file when replacing it. Only GLTS frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Failures\n\nAn error means the requested operation did not happen. Follow its next action without switching transport. Correct invalid arguments from the documented shape. Refresh projects, frames, or files after a not-found or conflict error, then reuse the exact returned IDs and paths. Retry an upstream or internal failure once; if it repeats, report the failed operation and error. Never repeat an unchanged failed operation.\n\n## GLTS assets\n\nA GLTS frame contains only `.glts` files. `index.glts` is its optional root asset; without it the frame renders empty. Every `.glts` file is a trusted TypeScript ESM module that default-exports a no-argument class derived from `THREE.Object3D`. Avoid top-level side effects because reload evaluates the module again. Implement `dispose()` when the asset exclusively owns disposable resources.\n\nAuthor GLTS scenes top-down: create the root entry scene first, reference the child `.glts` assets it will compose, then implement those children progressively. A missing `.glts` import renders as a glowing marker labeled with its filename until the real file is written, so the completed parts of the scene remain visible. Treat the marker and its console warning as a temporary missing-dependency diagnostic, not as authored content.\n\n```ts\nimport * as THREE from \"three\";\nimport Wheel from \"./parts/wheel.glts\";\n\nexport default class Racecar extends THREE.Group {\n constructor() {\n super();\n this.add(new Wheel());\n }\n}\n```\n\nUse relative `.glts` imports within a frame. When a reusable 3D asset belongs in another frame, keep it in its own GLTS frame and import its root by project-absolute path from the consuming frame. Instantiate that import as often as needed instead of copying its source:\n\n```ts\nimport Chassis from \"/other-frame-id/index.glts\";\n```\n\nFor a non-GLTS file from an image or Market frame, preserve the project filesystem URL through `import.meta.url`:\n\n```ts\nconst modelUrl = new URL(\"/market-frame-id/models/car.glb\", import.meta.url);\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support local helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nThe viewer uses the first camera found by depth-first traversal. If none exists, it autofits the asset. Put an authored camera in the scene only when its framing is intentional. Double-clicking a frame enters orbit from that resolved view; deselecting restores it.\n\nTreat authoritative source or structured state as sufficient when it directly and completely determines the requested property. Do not take a screenshot merely to reconfirm that evidence. Take one only when the result depends on rendering or visual relationships the source cannot establish, such as layout, overlap, clipping, camera framing, lighting, or runtime-generated appearance, or when the user explicitly asks. Then inspect it against the request and iterate until the evidence supports completion.\n";
|
package/dist/skill.generated.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated from skill/SKILL.template.md.
|
|
2
|
-
export const mcpDesignSkill = '---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## MCP transport\n\nMCP tools are the only Drawcall transport in this environment. Do not invoke a CLI or shell, make direct HTTP requests, or search the web for another transport. A failed MCP call does not make MCP unavailable.\n\nUse `
|
|
2
|
+
export const mcpDesignSkill = '---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## MCP transport\n\nMCP tools are the only Drawcall transport in this environment. Do not invoke a CLI or shell, make direct HTTP requests, or search the web for another transport. A failed MCP call does not make MCP unavailable.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. A 3D object, scene, or reusable asset is GLTS work, even when the user calls its canvas container a frame.\n\nTool arguments are JSON objects. File tools identify their target with `project` and a project-absolute `path`; they do not accept a separate `frame` argument. Call `list_design_files` and pass one of its returned paths unchanged.\n\n```json\n[\n {\n "tool": "list_design_projects",\n "arguments": {}\n },\n {\n "tool": "list_design_frames",\n "arguments": {\n "project": "r6z2n9k4x8m1qc"\n }\n },\n {\n "tool": "list_design_files",\n "arguments": {\n "project": "r6z2n9k4x8m1qc"\n }\n },\n {\n "tool": "read_design_file",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "path": "/a4z8m2q7v9kcde/index.glts"\n }\n },\n {\n "tool": "edit_design_file",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "path": "/a4z8m2q7v9kcde/index.glts",\n "oldText": "color: 0xffffff",\n "newText": "color: 0x000000"\n }\n }\n]\n```\n\nDesign is a remote, current-state canvas. Inspect the project and its frames before changing them. Use immutable IDs for every project and frame target; names are only labels.\n\n## Project filesystem\n\nA project is a hosted filesystem at `https://<project-id>.design.drawcallcontent.com/`. Each frame owns one top-level directory, `/<frame-id>`. Files use project-absolute paths that include that directory, for example `/a4z8m2q7v9kcde/index.glts`.\n\nCreate frames with an explicit type. Choose the type from the requested artifact, not from the word "frame": use GLTS for a 3D object or scene, especially one another frame will reuse. Use image only for a supplied 2D image URL and Market only for an exact public asset reference, `name@version`. GLTS frames require a viewport size; image and Market frames derive their canvas size.\n\nRead a file before editing it. Use a narrow edit for one known change and write a complete file when replacing it. Only GLTS frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Failures\n\nAn error means the requested operation did not happen. Follow its next action without switching transport. Correct invalid arguments from the documented shape. Refresh projects, frames, or files after a not-found or conflict error, then reuse the exact returned IDs and paths. Retry an upstream or internal failure once; if it repeats, report the failed operation and error. Never repeat an unchanged failed operation.\n\n## GLTS assets\n\nA GLTS frame contains only `.glts` files. `index.glts` is its optional root asset; without it the frame renders empty. Every `.glts` file is a trusted TypeScript ESM module that default-exports a no-argument class derived from `THREE.Object3D`. Avoid top-level side effects because reload evaluates the module again. Implement `dispose()` when the asset exclusively owns disposable resources.\n\nAuthor GLTS scenes top-down: create the root entry scene first, reference the child `.glts` assets it will compose, then implement those children progressively. A missing `.glts` import renders as a glowing marker labeled with its filename until the real file is written, so the completed parts of the scene remain visible. Treat the marker and its console warning as a temporary missing-dependency diagnostic, not as authored content.\n\n```ts\nimport * as THREE from "three";\nimport Wheel from "./parts/wheel.glts";\n\nexport default class Racecar extends THREE.Group {\n constructor() {\n super();\n this.add(new Wheel());\n }\n}\n```\n\nUse relative `.glts` imports within a frame. When a reusable 3D asset belongs in another frame, keep it in its own GLTS frame and import its root by project-absolute path from the consuming frame. Instantiate that import as often as needed instead of copying its source:\n\n```ts\nimport Chassis from "/other-frame-id/index.glts";\n```\n\nFor a non-GLTS file from an image or Market frame, preserve the project filesystem URL through `import.meta.url`:\n\n```ts\nconst modelUrl = new URL("/market-frame-id/models/car.glb", import.meta.url);\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support local helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nThe viewer uses the first camera found by depth-first traversal. If none exists, it autofits the asset. Put an authored camera in the scene only when its framing is intentional. Double-clicking a frame enters orbit from that resolved view; deselecting restores it.\n\nTreat authoritative source or structured state as sufficient when it directly and completely determines the requested property. Do not take a screenshot merely to reconfirm that evidence. Take one only when the result depends on rendering or visual relationships the source cannot establish, such as layout, overlap, clipping, camera framing, lighting, or runtime-generated appearance, or when the user explicitly asks. Then inspect it against the request and iterate until the evidence supports completion.\n';
|
|
3
3
|
export const cliDesignSkill = '---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse 3D GLTS assets and optional image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, or GLTS assets. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe CLI is the only Drawcall transport in this environment. Do not search for MCP tools or make direct HTTP requests. A failed CLI command does not justify switching transport.\n\nCLI calls are shell command strings. Select the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID.\n\n```sh\nnpx @drawcall/design project list\nnpx @drawcall/design -p r6z2n9k4x8m1qc frame list\nnpx @drawcall/design -p r6z2n9k4x8m1qc ls\nnpx @drawcall/design -p r6z2n9k4x8m1qc read /a4z8m2q7v9kcde/index.glts\nnpx @drawcall/design -p r6z2n9k4x8m1qc edit /a4z8m2q7v9kcde/index.glts \'color: 0xffffff\' \'color: 0x000000\'\n```\n\nDesign is a remote, current-state canvas. Inspect the project and its frames before changing them. Use immutable IDs for every project and frame target; names are only labels.\n\n## Project filesystem\n\nA project is a hosted filesystem at `https://<project-id>.design.drawcallcontent.com/`. Each frame owns one top-level directory, `/<frame-id>`. Files use project-absolute paths that include that directory, for example `/a4z8m2q7v9kcde/index.glts`.\n\nCreate frames with an explicit type. Choose the type from the requested artifact, not from the word "frame": use GLTS for a 3D object or scene, especially one another frame will reuse. Use image only for a supplied 2D image URL and Market only for an exact public asset reference, `name@version`. GLTS frames require a viewport size; image and Market frames derive their canvas size.\n\nRead a file before editing it. Use a narrow edit for one known change and write a complete file when replacing it. Only GLTS frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Failures\n\nAn error means the requested operation did not happen. Follow its next action without switching transport. Correct invalid arguments from the documented shape. Refresh projects, frames, or files after a not-found or conflict error, then reuse the exact returned IDs and paths. Retry an upstream or internal failure once; if it repeats, report the failed operation and error. Never repeat an unchanged failed operation.\n\n## GLTS assets\n\nA GLTS frame contains only `.glts` files. `index.glts` is its optional root asset; without it the frame renders empty. Every `.glts` file is a trusted TypeScript ESM module that default-exports a no-argument class derived from `THREE.Object3D`. Avoid top-level side effects because reload evaluates the module again. Implement `dispose()` when the asset exclusively owns disposable resources.\n\nAuthor GLTS scenes top-down: create the root entry scene first, reference the child `.glts` assets it will compose, then implement those children progressively. A missing `.glts` import renders as a glowing marker labeled with its filename until the real file is written, so the completed parts of the scene remain visible. Treat the marker and its console warning as a temporary missing-dependency diagnostic, not as authored content.\n\n```ts\nimport * as THREE from "three";\nimport Wheel from "./parts/wheel.glts";\n\nexport default class Racecar extends THREE.Group {\n constructor() {\n super();\n this.add(new Wheel());\n }\n}\n```\n\nUse relative `.glts` imports within a frame. When a reusable 3D asset belongs in another frame, keep it in its own GLTS frame and import its root by project-absolute path from the consuming frame. Instantiate that import as often as needed instead of copying its source:\n\n```ts\nimport Chassis from "/other-frame-id/index.glts";\n```\n\nFor a non-GLTS file from an image or Market frame, preserve the project filesystem URL through `import.meta.url`:\n\n```ts\nconst modelUrl = new URL("/market-frame-id/models/car.glb", import.meta.url);\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support local helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nThe viewer uses the first camera found by depth-first traversal. If none exists, it autofits the asset. Put an authored camera in the scene only when its framing is intentional. Double-clicking a frame enters orbit from that resolved view; deselecting restores it.\n\nTreat authoritative source or structured state as sufficient when it directly and completely determines the requested property. Do not take a screenshot merely to reconfirm that evidence. Take one only when the result depends on rendering or visual relationships the source cannot establish, such as layout, overlap, clipping, camera framing, lighting, or runtime-generated appearance, or when the user explicitly asks. Then inspect it against the request and iterate until the evidence supports completion.\n';
|