@drawcall/design 0.10.0 → 0.12.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/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/command/context.d.ts +5 -0
- package/dist/protocol.d.ts +7 -0
- package/dist/protocol.js +9 -0
- package/dist/skill.generated.d.ts +2 -2
- package/dist/skill.generated.js +2 -2
- package/dist/v1/contract.d.ts +5 -0
- package/dist/v1/schemas.d.ts +10 -0
- package/dist/v1/schemas.js +3 -0
- package/package.json +1 -1
- package/skills/drawcall-design/SKILL.md +2 -0
package/dist/browser.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { frameCreationCapabilities, type FrameCreationCapability, type FrameCrea
|
|
|
6
6
|
export { cameraPoseSchema, commentBodySchema, commentPositionInputSchema, commentPositionSchema, commentSchema, createCommentSchema, IMAGE_GENERATION_MODEL, IMAGE_GENERATION_PROVIDER, } from "./v1/schemas.js";
|
|
7
7
|
export { parseFrameSize } from "./target.js";
|
|
8
8
|
export { projectFrameLayoutSchema, projectCommentsChangedServerMessageSchema, projectFrameRecordSchema, projectGltsFrameRecordSchema, projectImageFrameRecordSchema, projectMarkdownFrameRecordSchema, projectMarketFileSchema, projectMarketFrameRecordSchema, projectPresenceClientMessageSchema, projectPresenceServerMessageSchema, projectStateSchema, type ProjectFrameLayout, type ProjectCommentsChangedServerMessage, type ProjectFrameRecord, type ProjectGltsFrameRecord, type ProjectImageFrameRecord, type ProjectMarkdownFrameRecord, type ProjectMarketFile, type ProjectMarketFrameRecord, type ProjectPresenceClientMessage, type ProjectPresenceServerMessage, type ProjectState, } from "./project-state.js";
|
|
9
|
-
export { cameraCaptureCommandSchema, cameraCaptureResultSchema, cameraMessageTypes, cameraSetCommandSchema, commentActionMessageSchema, commentActionResultSchema, commentPickCommandSchema, commentPickResultSchema, commentRuntimeMessageTypes, commentSelectionMessageSchema, commentStateCommandSchema, frameRenderResultSchema, gltsExportCancelCommandSchema, gltsExportCancelledResultSchema, gltsExportCommandSchema, gltsExportFrameMessageSchema, gltsExportMessageTypes, gltsExportParentMessageSchema, gltsExportResultSchema, gltsRuntimeExportFormatSchema, immersiveCommandSchema, immersiveFrameMessageSchema, immersiveMessageTypes, immersiveModeSchema, inspectionCommandSchema, inspectionFrameMessageSchema, inspectionMessageTypes, posterMessageTypes, posterPagePath, posterPageUrl, posterRenderCommandSchema, posterRenderResultSchema, previewConfigureCommandSchema, previewLoadCommandSchema, previewLoadResultSchema, previewMessageTypes, previewPagePath, previewPageUrl, previewPixelRatioMax, previewSessionEventSchema, projectSyncUrl, sourceFileChangeSchema, sourceFileMessageTypes, sourceFileReloadResultSchema, sourceFilesChangedMessageSchema, type GltsExportCancelCommand, type GltsExportCancelledResult, type GltsExportCommand, type GltsExportFrameMessage, type GltsExportParentMessage, type GltsExportResult, type GltsRuntimeExportFormat, type CameraCaptureCommand, type CameraSetCommand, type CameraCaptureFailure, type CameraCaptureResult, type CommentActionMessage, type CommentActionResult, type CommentPickCommand, type CommentPickResult, type CommentSelectionMessage, type CommentStateCommand, type FrameRenderResult, type InspectionAppliedMessage, type InspectionCommand, type InspectionFrameMessage, type PosterRenderCommand, type PosterRenderResult, type PreviewLoadCommand, type PreviewLoadResult, type ImmersiveCommand, type ImmersiveFrameMessage, type ImmersiveMode, type SourceFileChange, type SourceFileReloadResult, type SourceFilesChangedMessage, } from "./protocol.js";
|
|
9
|
+
export { cameraCaptureCommandSchema, cameraCaptureResultSchema, cameraMessageTypes, cameraSetCommandSchema, commentActionMessageSchema, commentActionResultSchema, commentPickCommandSchema, commentPickResultSchema, commentRuntimeMessageTypes, commentSelectionMessageSchema, commentStateCommandSchema, frameNavigationMessageSchema, frameNavigationMessageTypes, frameRenderResultSchema, gltsExportCancelCommandSchema, gltsExportCancelledResultSchema, gltsExportCommandSchema, gltsExportFrameMessageSchema, gltsExportMessageTypes, gltsExportParentMessageSchema, gltsExportResultSchema, gltsRuntimeExportFormatSchema, immersiveCommandSchema, immersiveFrameMessageSchema, immersiveMessageTypes, immersiveModeSchema, inspectionCommandSchema, inspectionFrameMessageSchema, inspectionMessageTypes, posterMessageTypes, posterPagePath, posterPageUrl, posterRenderCommandSchema, posterRenderResultSchema, previewConfigureCommandSchema, previewLoadCommandSchema, previewLoadResultSchema, previewMessageTypes, previewPagePath, previewPageUrl, previewPixelRatioMax, previewSessionEventSchema, projectSyncUrl, sourceFileChangeSchema, sourceFileMessageTypes, sourceFileReloadResultSchema, sourceFilesChangedMessageSchema, type GltsExportCancelCommand, type GltsExportCancelledResult, type GltsExportCommand, type GltsExportFrameMessage, type GltsExportParentMessage, type GltsExportResult, type GltsRuntimeExportFormat, type CameraCaptureCommand, type CameraSetCommand, type CameraCaptureFailure, type CameraCaptureResult, type CommentActionMessage, type CommentActionResult, type CommentPickCommand, type CommentPickResult, type CommentSelectionMessage, type CommentStateCommand, type FrameRenderResult, type InspectionAppliedMessage, type InspectionCommand, type InspectionFrameMessage, type PosterRenderCommand, type PosterRenderResult, type PreviewLoadCommand, type PreviewLoadResult, type ImmersiveCommand, type ImmersiveFrameMessage, type ImmersiveMode, type SourceFileChange, type SourceFileReloadResult, type SourceFilesChangedMessage, } from "./protocol.js";
|
|
10
10
|
export type { BinaryFile, CameraPose, Comment, CommentAuthor, CommentPosition, CommentPositionInput, CommentReply, CommentResolution, CreateComment, CreateFrame, CreateProjectFromBrief, CreateGltsFrame, CreateImageFrame, CreateMarkdownFrame, CreateMarketFrame, GenerateImage, GenerateImageUrl, DesignFile, FileList, FileMutation, FrameExport, Frame, GltsFrame, GltsFrameExport, ImageFrame, ImageFrameExport, ImageGenerationOperation, ImageGenerationProvenance, ImageGenerationResult, ImageInput, ImageInputProvenance, MarketFrame, MarketFrameExport, MarkdownFrame, MarkdownFrameExport, Project, ProjectDerivationStatus, Screenshot, TextFile, User, } from "./v1/schemas.js";
|
package/dist/browser.js
CHANGED
|
@@ -6,4 +6,4 @@ export { frameCreationCapabilities, } from "./v1/capabilities.js";
|
|
|
6
6
|
export { cameraPoseSchema, commentBodySchema, commentPositionInputSchema, commentPositionSchema, commentSchema, createCommentSchema, IMAGE_GENERATION_MODEL, IMAGE_GENERATION_PROVIDER, } from "./v1/schemas.js";
|
|
7
7
|
export { parseFrameSize } from "./target.js";
|
|
8
8
|
export { projectFrameLayoutSchema, projectCommentsChangedServerMessageSchema, projectFrameRecordSchema, projectGltsFrameRecordSchema, projectImageFrameRecordSchema, projectMarkdownFrameRecordSchema, projectMarketFileSchema, projectMarketFrameRecordSchema, projectPresenceClientMessageSchema, projectPresenceServerMessageSchema, projectStateSchema, } from "./project-state.js";
|
|
9
|
-
export { cameraCaptureCommandSchema, cameraCaptureResultSchema, cameraMessageTypes, cameraSetCommandSchema, commentActionMessageSchema, commentActionResultSchema, commentPickCommandSchema, commentPickResultSchema, commentRuntimeMessageTypes, commentSelectionMessageSchema, commentStateCommandSchema, frameRenderResultSchema, gltsExportCancelCommandSchema, gltsExportCancelledResultSchema, gltsExportCommandSchema, gltsExportFrameMessageSchema, gltsExportMessageTypes, gltsExportParentMessageSchema, gltsExportResultSchema, gltsRuntimeExportFormatSchema, immersiveCommandSchema, immersiveFrameMessageSchema, immersiveMessageTypes, immersiveModeSchema, inspectionCommandSchema, inspectionFrameMessageSchema, inspectionMessageTypes, posterMessageTypes, posterPagePath, posterPageUrl, posterRenderCommandSchema, posterRenderResultSchema, previewConfigureCommandSchema, previewLoadCommandSchema, previewLoadResultSchema, previewMessageTypes, previewPagePath, previewPageUrl, previewPixelRatioMax, previewSessionEventSchema, projectSyncUrl, sourceFileChangeSchema, sourceFileMessageTypes, sourceFileReloadResultSchema, sourceFilesChangedMessageSchema, } from "./protocol.js";
|
|
9
|
+
export { cameraCaptureCommandSchema, cameraCaptureResultSchema, cameraMessageTypes, cameraSetCommandSchema, commentActionMessageSchema, commentActionResultSchema, commentPickCommandSchema, commentPickResultSchema, commentRuntimeMessageTypes, commentSelectionMessageSchema, commentStateCommandSchema, frameNavigationMessageSchema, frameNavigationMessageTypes, frameRenderResultSchema, gltsExportCancelCommandSchema, gltsExportCancelledResultSchema, gltsExportCommandSchema, gltsExportFrameMessageSchema, gltsExportMessageTypes, gltsExportParentMessageSchema, gltsExportResultSchema, gltsRuntimeExportFormatSchema, immersiveCommandSchema, immersiveFrameMessageSchema, immersiveMessageTypes, immersiveModeSchema, inspectionCommandSchema, inspectionFrameMessageSchema, inspectionMessageTypes, posterMessageTypes, posterPagePath, posterPageUrl, posterRenderCommandSchema, posterRenderResultSchema, previewConfigureCommandSchema, previewLoadCommandSchema, previewLoadResultSchema, previewMessageTypes, previewPagePath, previewPageUrl, previewPixelRatioMax, previewSessionEventSchema, projectSyncUrl, sourceFileChangeSchema, sourceFileMessageTypes, sourceFileReloadResultSchema, sourceFilesChangedMessageSchema, } from "./protocol.js";
|
|
@@ -778,6 +778,11 @@ export declare function clientFor(command: Command): Promise<{
|
|
|
778
778
|
frameName: import("zod").ZodString;
|
|
779
779
|
projectId: import("zod").ZodString;
|
|
780
780
|
type: import("zod").ZodLiteral<"markdown">;
|
|
781
|
+
pdf: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
782
|
+
filename: import("zod").ZodString;
|
|
783
|
+
url: import("zod").ZodString;
|
|
784
|
+
mediaType: import("zod").ZodLiteral<"application/pdf">;
|
|
785
|
+
}, import("zod/v4/core").$strict>>;
|
|
781
786
|
source: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
782
787
|
filename: import("zod").ZodString;
|
|
783
788
|
url: import("zod").ZodString;
|
package/dist/protocol.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ export declare const inspectionMessageTypes: {
|
|
|
7
7
|
readonly ready: "drawcall:inspection:ready";
|
|
8
8
|
readonly set: "drawcall:inspection:set";
|
|
9
9
|
};
|
|
10
|
+
export declare const frameNavigationMessageTypes: {
|
|
11
|
+
readonly open: "drawcall:frame:open";
|
|
12
|
+
};
|
|
13
|
+
export declare const frameNavigationMessageSchema: z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"drawcall:frame:open">;
|
|
15
|
+
frameId: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
10
17
|
export declare const previewMessageTypes: {
|
|
11
18
|
readonly configure: "drawcall:preview:configure";
|
|
12
19
|
readonly failed: "drawcall:preview:failed";
|
package/dist/protocol.js
CHANGED
|
@@ -8,6 +8,15 @@ export const inspectionMessageTypes = {
|
|
|
8
8
|
ready: "drawcall:inspection:ready",
|
|
9
9
|
set: "drawcall:inspection:set",
|
|
10
10
|
};
|
|
11
|
+
export const frameNavigationMessageTypes = {
|
|
12
|
+
open: "drawcall:frame:open",
|
|
13
|
+
};
|
|
14
|
+
export const frameNavigationMessageSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
type: z.literal(frameNavigationMessageTypes.open),
|
|
17
|
+
frameId: designIdSchema,
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
11
20
|
export const previewMessageTypes = {
|
|
12
21
|
configure: "drawcall:preview:configure",
|
|
13
22
|
failed: "drawcall:preview:failed",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mcpDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. 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 Drawcall transport in this environment. For Design operations, use only the tools documented here. A failed tool call does not make the transport unavailable.\n\nImage frame creation uses a public HTTP(S) image URL.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. Its references must be public HTTP(S) URLs. 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\nFor comments, call `list_design_comments` and, when needed, `get_design_comment` before changing a thread. Use `create_design_comment`, `reply_to_design_comment`, `resolve_design_comment`, `reopen_design_comment`, and `delete_design_comment` for their named operations. Structured tool calls use `body` for comment text. A positioned create requires the target frame's current `contentRevision` as `expectedContentRevision`; list frames again and re-inspect the position after a conflict.\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 \"tool\": \"create_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"frame\": \"a4z8m2q7v9kcde\",\n \"body\": \"The bevel catches the key light here.\",\n \"position\": {\n \"kind\": \"3d\",\n \"x\": 0.2,\n \"y\": 1.1,\n \"z\": -0.4\n },\n \"expectedContentRevision\": 7\n }\n },\n {\n \"tool\": \"reply_to_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"comment\": \"c4z8m2q7v9kcdf\",\n \"body\": \"Adjusted the material roughness.\"\n }\n },\n {\n \"tool\": \"resolve_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"comment\": \"c4z8m2q7v9kcdf\"\n }\n },\n {\n \"tool\": \"generate_design_image\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"operation\": \"generate\",\n \"prompt\": \"A product photograph of this object\",\n \"references\": [\n \"https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\"\n ],\n \"result\": \"new\",\n \"name\": \"Product photograph\"\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it as a reference URL to `generate_design_image` when one frame's appearance should inform another image.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account\u2014never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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
|
-
export declare const cliDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe commands below are the Drawcall transport in this environment. For Design operations, use only this documented command interface. A failed command does not make the transport unavailable.\n\nImage frame creation and image-generation references accept public HTTP(S) URLs or local PNG, JPEG, and WebP files.\n\nSelect the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID. Repeat `--reference` to preserve image-generation reference order.\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'\nnpx drawcall design -p r6z2n9k4x8m1qc comment list a4z8m2q7v9kcde\nnpx drawcall design -p r6z2n9k4x8m1qc comment show c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment create a4z8m2q7v9kcde 'The bevel catches the key light here.' --position-3d 0.2,1.1,-0.4\nnpx drawcall design -p r6z2n9k4x8m1qc comment reply c4z8m2q7v9kcdf 'Adjusted the material roughness.'\nnpx drawcall design -p r6z2n9k4x8m1qc comment resolve c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment delete c4z8m2q7v9kcdf --yes\nnpx drawcall design -p r6z2n9k4x8m1qc frame generate-image 'Product photograph' --prompt 'A product photograph of this object' --reference https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\nnpx drawcall design -p r6z2n9k4x8m1qc frame edit-image b4z8m2q7v9kcdf --prompt 'Use warmer light' --name 'Warm product photograph' --reference ./lighting.webp\n```\n\nComment create and reply text is positional to keep commands compact. Omit it or pass `-` to read the text from stdin. Use `--position-2d x,y` only for normalized image coordinates and `--position-3d x,y,z` only for authoritative GLTS world coordinates.\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it with `--reference` when one frame's appearance should inform another image. A reference may instead be a local PNG, JPEG, or WebP file.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account\u2014never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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";
|
|
1
|
+
export declare const mcpDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. 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 Drawcall transport in this environment. For Design operations, use only the tools documented here. A failed tool call does not make the transport unavailable.\n\nImage frame creation uses a public HTTP(S) image URL.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. Its references must be public HTTP(S) URLs. 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\nFor comments, call `list_design_comments` and, when needed, `get_design_comment` before changing a thread. Use `create_design_comment`, `reply_to_design_comment`, `resolve_design_comment`, `reopen_design_comment`, and `delete_design_comment` for their named operations. Structured tool calls use `body` for comment text. A positioned create requires the target frame's current `contentRevision` as `expectedContentRevision`; list frames again and re-inspect the position after a conflict.\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 \"tool\": \"create_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"frame\": \"a4z8m2q7v9kcde\",\n \"body\": \"The bevel catches the key light here.\",\n \"position\": {\n \"kind\": \"3d\",\n \"x\": 0.2,\n \"y\": 1.1,\n \"z\": -0.4\n },\n \"expectedContentRevision\": 7\n }\n },\n {\n \"tool\": \"reply_to_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"comment\": \"c4z8m2q7v9kcdf\",\n \"body\": \"Adjusted the material roughness.\"\n }\n },\n {\n \"tool\": \"resolve_design_comment\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"comment\": \"c4z8m2q7v9kcdf\"\n }\n },\n {\n \"tool\": \"generate_design_image\",\n \"arguments\": {\n \"project\": \"r6z2n9k4x8m1qc\",\n \"operation\": \"generate\",\n \"prompt\": \"A product photograph of this object\",\n \"references\": [\n \"https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\"\n ],\n \"result\": \"new\",\n \"name\": \"Product photograph\"\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it as a reference URL to `generate_design_image` when one frame's appearance should inform another image.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\nPrefer focused Markdown frames. A document that covers separable topics is usually clearer as multiple frames connected with canonical links, `[Related details](/<frame-id>/)`, because readers can navigate directly to the part they need. An embedded frame is useful when its current rendering adds visual context; a link is better when the reader only needs to navigate.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account\u2014never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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
|
+
export declare const cliDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe commands below are the Drawcall transport in this environment. For Design operations, use only this documented command interface. A failed command does not make the transport unavailable.\n\nImage frame creation and image-generation references accept public HTTP(S) URLs or local PNG, JPEG, and WebP files.\n\nSelect the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID. Repeat `--reference` to preserve image-generation reference order.\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'\nnpx drawcall design -p r6z2n9k4x8m1qc comment list a4z8m2q7v9kcde\nnpx drawcall design -p r6z2n9k4x8m1qc comment show c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment create a4z8m2q7v9kcde 'The bevel catches the key light here.' --position-3d 0.2,1.1,-0.4\nnpx drawcall design -p r6z2n9k4x8m1qc comment reply c4z8m2q7v9kcdf 'Adjusted the material roughness.'\nnpx drawcall design -p r6z2n9k4x8m1qc comment resolve c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment delete c4z8m2q7v9kcdf --yes\nnpx drawcall design -p r6z2n9k4x8m1qc frame generate-image 'Product photograph' --prompt 'A product photograph of this object' --reference https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\nnpx drawcall design -p r6z2n9k4x8m1qc frame edit-image b4z8m2q7v9kcdf --prompt 'Use warmer light' --name 'Warm product photograph' --reference ./lighting.webp\n```\n\nComment create and reply text is positional to keep commands compact. Omit it or pass `-` to read the text from stdin. Use `--position-2d x,y` only for normalized image coordinates and `--position-3d x,y,z` only for authoritative GLTS world coordinates.\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it with `--reference` when one frame's appearance should inform another image. A reference may instead be a local PNG, JPEG, or WebP file.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\nPrefer focused Markdown frames. A document that covers separable topics is usually clearer as multiple frames connected with canonical links, `[Related details](/<frame-id>/)`, because readers can navigate directly to the part they need. An embedded frame is useful when its current rendering adds visual context; a link is better when the reader only needs to navigate.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account\u2014never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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 GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. 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 Drawcall transport in this environment. For Design operations, use only the tools documented here. A failed tool call does not make the transport unavailable.\n\nImage frame creation uses a public HTTP(S) image URL.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. Its references must be public HTTP(S) URLs. 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\nFor comments, call `list_design_comments` and, when needed, `get_design_comment` before changing a thread. Use `create_design_comment`, `reply_to_design_comment`, `resolve_design_comment`, `reopen_design_comment`, and `delete_design_comment` for their named operations. Structured tool calls use `body` for comment text. A positioned create requires the target frame\'s current `contentRevision` as `expectedContentRevision`; list frames again and re-inspect the position after a conflict.\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 "tool": "create_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "frame": "a4z8m2q7v9kcde",\n "body": "The bevel catches the key light here.",\n "position": {\n "kind": "3d",\n "x": 0.2,\n "y": 1.1,\n "z": -0.4\n },\n "expectedContentRevision": 7\n }\n },\n {\n "tool": "reply_to_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "comment": "c4z8m2q7v9kcdf",\n "body": "Adjusted the material roughness."\n }\n },\n {\n "tool": "resolve_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "comment": "c4z8m2q7v9kcdf"\n }\n },\n {\n "tool": "generate_design_image",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "operation": "generate",\n "prompt": "A product photograph of this object",\n "references": [\n "https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp"\n ],\n "result": "new",\n "name": "Product photograph"\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it as a reference URL to `generate_design_image` when one frame\'s appearance should inform another image.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame\'s canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment\'s thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account—never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime\'s manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from "three";\nimport { loadingManager } from "@drawcall/glts";\nimport { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL("./car.glb", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from "three";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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
|
-
export const cliDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe commands below are the Drawcall transport in this environment. For Design operations, use only this documented command interface. A failed command does not make the transport unavailable.\n\nImage frame creation and image-generation references accept public HTTP(S) URLs or local PNG, JPEG, and WebP files.\n\nSelect the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID. Repeat `--reference` to preserve image-generation reference order.\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'\nnpx drawcall design -p r6z2n9k4x8m1qc comment list a4z8m2q7v9kcde\nnpx drawcall design -p r6z2n9k4x8m1qc comment show c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment create a4z8m2q7v9kcde 'The bevel catches the key light here.' --position-3d 0.2,1.1,-0.4\nnpx drawcall design -p r6z2n9k4x8m1qc comment reply c4z8m2q7v9kcdf 'Adjusted the material roughness.'\nnpx drawcall design -p r6z2n9k4x8m1qc comment resolve c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment delete c4z8m2q7v9kcdf --yes\nnpx drawcall design -p r6z2n9k4x8m1qc frame generate-image 'Product photograph' --prompt 'A product photograph of this object' --reference https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\nnpx drawcall design -p r6z2n9k4x8m1qc frame edit-image b4z8m2q7v9kcdf --prompt 'Use warmer light' --name 'Warm product photograph' --reference ./lighting.webp\n```\n\nComment create and reply text is positional to keep commands compact. Omit it or pass `-` to read the text from stdin. Use `--position-2d x,y` only for normalized image coordinates and `--position-3d x,y,z` only for authoritative GLTS world coordinates.\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it with `--reference` when one frame's appearance should inform another image. A reference may instead be a local PNG, JPEG, or WebP file.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account—never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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
|
+
export const mcpDesignSkill = '---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. 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 Drawcall transport in this environment. For Design operations, use only the tools documented here. A failed tool call does not make the transport unavailable.\n\nImage frame creation uses a public HTTP(S) image URL.\n\nUse `generate_design_image` only when the user asks for a 2D image or reference. Its references must be public HTTP(S) URLs. 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\nFor comments, call `list_design_comments` and, when needed, `get_design_comment` before changing a thread. Use `create_design_comment`, `reply_to_design_comment`, `resolve_design_comment`, `reopen_design_comment`, and `delete_design_comment` for their named operations. Structured tool calls use `body` for comment text. A positioned create requires the target frame\'s current `contentRevision` as `expectedContentRevision`; list frames again and re-inspect the position after a conflict.\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 "tool": "create_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "frame": "a4z8m2q7v9kcde",\n "body": "The bevel catches the key light here.",\n "position": {\n "kind": "3d",\n "x": 0.2,\n "y": 1.1,\n "z": -0.4\n },\n "expectedContentRevision": 7\n }\n },\n {\n "tool": "reply_to_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "comment": "c4z8m2q7v9kcdf",\n "body": "Adjusted the material roughness."\n }\n },\n {\n "tool": "resolve_design_comment",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "comment": "c4z8m2q7v9kcdf"\n }\n },\n {\n "tool": "generate_design_image",\n "arguments": {\n "project": "r6z2n9k4x8m1qc",\n "operation": "generate",\n "prompt": "A product photograph of this object",\n "references": [\n "https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp"\n ],\n "result": "new",\n "name": "Product photograph"\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it as a reference URL to `generate_design_image` when one frame\'s appearance should inform another image.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame\'s canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\nPrefer focused Markdown frames. A document that covers separable topics is usually clearer as multiple frames connected with canonical links, `[Related details](/<frame-id>/)`, because readers can navigate directly to the part they need. An embedded frame is useful when its current rendering adds visual context; a link is better when the reader only needs to navigate.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment\'s thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account—never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime\'s manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from "three";\nimport { loadingManager } from "@drawcall/glts";\nimport { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL("./car.glb", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from "three";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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
|
+
export const cliDesignSkill = "---\nname: drawcall-design\ndescription: Create, modify, inspect, compose, and reuse GLTS scenes, Markdown documents, and image or Market references in Drawcall Design. Use whenever the user names Drawcall Design or one of its projects, canvases, frames, filesystems, GLTS assets, or Markdown frames. Do not use for full games, applications, or unrelated image generation.\n---\n\n# Drawcall Design\n\n## CLI transport\n\nThe commands below are the Drawcall transport in this environment. For Design operations, use only this documented command interface. A failed command does not make the transport unavailable.\n\nImage frame creation and image-generation references accept public HTTP(S) URLs or local PNG, JPEG, and WebP files.\n\nSelect the project with `-p <project-id>`. File commands take project-absolute paths that include the frame ID. Repeat `--reference` to preserve image-generation reference order.\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'\nnpx drawcall design -p r6z2n9k4x8m1qc comment list a4z8m2q7v9kcde\nnpx drawcall design -p r6z2n9k4x8m1qc comment show c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment create a4z8m2q7v9kcde 'The bevel catches the key light here.' --position-3d 0.2,1.1,-0.4\nnpx drawcall design -p r6z2n9k4x8m1qc comment reply c4z8m2q7v9kcdf 'Adjusted the material roughness.'\nnpx drawcall design -p r6z2n9k4x8m1qc comment resolve c4z8m2q7v9kcdf\nnpx drawcall design -p r6z2n9k4x8m1qc comment delete c4z8m2q7v9kcdf --yes\nnpx drawcall design -p r6z2n9k4x8m1qc frame generate-image 'Product photograph' --prompt 'A product photograph of this object' --reference https://r6z2n9k4x8m1qc.design.drawcallcontent.com/a4z8m2q7v9kcde.webp\nnpx drawcall design -p r6z2n9k4x8m1qc frame edit-image b4z8m2q7v9kcdf --prompt 'Use warmer light' --name 'Warm product photograph' --reference ./lighting.webp\n```\n\nComment create and reply text is positional to keep commands compact. Omit it or pass `-` to read the text from stdin. Use `--position-2d x,y` only for normalized image coordinates and `--position-3d x,y,z` only for authoritative GLTS world coordinates.\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 mutable labels. In user-facing replies, refer to projects, frames, and other named resources by their current names. Do not expose their IDs unless the user explicitly asks for them; IDs may remain embedded in URLs that link to those resources.\n\nWe recommend using Drawcall Market when a design needs 3D assets such as models, textures, or environments.\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, Markdown for a formatted text document, image for an existing 2D image, and Market only for an exact public asset reference, `name@version`. GLTS and Markdown 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. GLTS and Markdown frame files may be created or deleted. Image and Market frame files are read-only.\n\n## Frame images\n\nEvery frame has a public image at `https://<project-id>.design.drawcallcontent.com/<frame-id>.webp`. This URL represents the current rendered frame whether its type is GLTS, Markdown, image, or Market. Pass it with `--reference` when one frame's appearance should inform another image. A reference may instead be a local PNG, JPEG, or WebP file.\n\n## Markdown documents\n\nA Markdown frame contains one optional source file at `/<frame-id>/index.md`; without it the frame renders as an empty document. Raw HTML is not rendered. Use ordinary Markdown image syntax with a frame's canonical WebP path to embed its current rendering:\n\n```md\n\n```\n\nAn absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.\n\nPrefer focused Markdown frames. A document that covers separable topics is usually clearer as multiple frames connected with canonical links, `[Related details](/<frame-id>/)`, because readers can navigate directly to the part they need. An embedded frame is useful when its current rendering adds visual context; a link is better when the reader only needs to navigate.\n\n## Comments and annotations\n\nUse comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.\n\nA comment without a position applies to its frame. A 2D position is normalized image space and applies only to an image frame. A 3D position is GLTS world space and applies only to a GLTS frame. Add a position only when its coordinates are authoritative; never infer 3D depth from a screenshot. Prefer a frame-level comment when the precise position is unknown.\n\nPositioned comments retain the frame version on which they were placed. If the frame later changes, treat the position as potentially stale and re-inspect the frame before relying on it. Replies belong to the root comment's thread. Resolved threads do not accept replies, so reopen one before continuing it. Resolve a thread when its concern has been addressed. Delete a comment or reply only when explicitly requested because deletion is permanent; deleting a root also deletes its replies. Comment authors come from the authenticated Drawcall account—never invent an author identity.\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\nWhen a `.glts` constructor starts resource loading through a Three.js loader, import the current runtime's manager and pass it to that loader. This makes the initial root `loadAsync()` promise or `load()` callback wait for the resource and surface its failure. Use it with `TextureLoader`, `GLTFLoader`, `FileLoader`, and comparable loaders. Reload construction remains synchronous, and arbitrary asynchronous work is not tracked.\n\n```ts\nimport * as THREE from \"three\";\nimport { loadingManager } from \"@drawcall/glts\";\nimport { GLTFLoader } from \"three/addons/loaders/GLTFLoader.js\";\n\nexport default class Car extends THREE.Group {\n constructor() {\n super();\n new GLTFLoader(loadingManager).load(\n new URL(\"./car.glb\", import.meta.url).href,\n ({ scene }) => this.add(scene),\n );\n }\n}\n```\n\nGLTS supports static `.glts`, `three`, Three addons, and bare npm imports. It does not support helper `.ts` modules, dynamic imports, cyclic GLTS graphs, or cross-asset inheritance. Keep the asset self-contained and compose with nested GLTS assets.\n\nKeep preview-only camera and lighting out of the default scene so importing the GLTS composes only reusable content. A root `index.glts` may export `previewCamera` and `previewLighting`; these named exports affect its direct preview and are ignored when another GLTS imports it. `previewLighting` must be a `THREE.Object3D` containing at least one light.\n\n```ts\nimport * as THREE from \"three\";\n\nexport const previewCamera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);\npreviewCamera.position.set(4, 3, 6);\npreviewCamera.lookAt(0, 0, 0);\n\nexport const previewLighting = new THREE.Group();\npreviewLighting.add(new THREE.HemisphereLight(0xffffff, 0x223344, 2));\n\nexport default class Product extends THREE.Group {\n // Reusable scene content only.\n}\n```\n\nWhen `previewCamera` is absent, the viewer uses the first camera found by depth-first traversal, then autofits if the scene has none. A saved frame camera remains the user override. Double-clicking a frame enters orbit from the 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/v1/contract.d.ts
CHANGED
|
@@ -778,6 +778,11 @@ export declare const contract: {
|
|
|
778
778
|
frameName: z.ZodString;
|
|
779
779
|
projectId: z.ZodString;
|
|
780
780
|
type: z.ZodLiteral<"markdown">;
|
|
781
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
782
|
+
filename: z.ZodString;
|
|
783
|
+
url: z.ZodString;
|
|
784
|
+
mediaType: z.ZodLiteral<"application/pdf">;
|
|
785
|
+
}, z.core.$strict>>;
|
|
781
786
|
source: z.ZodNullable<z.ZodObject<{
|
|
782
787
|
filename: z.ZodString;
|
|
783
788
|
url: z.ZodString;
|
package/dist/v1/schemas.d.ts
CHANGED
|
@@ -597,6 +597,11 @@ export declare const markdownFrameExportSchema: z.ZodObject<{
|
|
|
597
597
|
frameName: z.ZodString;
|
|
598
598
|
projectId: z.ZodString;
|
|
599
599
|
type: z.ZodLiteral<"markdown">;
|
|
600
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
601
|
+
filename: z.ZodString;
|
|
602
|
+
url: z.ZodString;
|
|
603
|
+
mediaType: z.ZodLiteral<"application/pdf">;
|
|
604
|
+
}, z.core.$strict>>;
|
|
600
605
|
source: z.ZodNullable<z.ZodObject<{
|
|
601
606
|
filename: z.ZodString;
|
|
602
607
|
url: z.ZodString;
|
|
@@ -653,6 +658,11 @@ export declare const frameExportSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
653
658
|
frameName: z.ZodString;
|
|
654
659
|
projectId: z.ZodString;
|
|
655
660
|
type: z.ZodLiteral<"markdown">;
|
|
661
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
662
|
+
filename: z.ZodString;
|
|
663
|
+
url: z.ZodString;
|
|
664
|
+
mediaType: z.ZodLiteral<"application/pdf">;
|
|
665
|
+
}, z.core.$strict>>;
|
|
656
666
|
source: z.ZodNullable<z.ZodObject<{
|
|
657
667
|
filename: z.ZodString;
|
|
658
668
|
url: z.ZodString;
|
package/dist/v1/schemas.js
CHANGED
|
@@ -419,6 +419,9 @@ export const gltsFrameExportSchema = frameExportBaseSchema.extend({
|
|
|
419
419
|
});
|
|
420
420
|
export const markdownFrameExportSchema = frameExportBaseSchema.extend({
|
|
421
421
|
type: z.literal("markdown"),
|
|
422
|
+
pdf: frameDownloadSchema
|
|
423
|
+
.extend({ mediaType: z.literal("application/pdf") })
|
|
424
|
+
.nullable(),
|
|
422
425
|
source: frameDownloadSchema
|
|
423
426
|
.extend({ mediaType: z.literal("text/markdown") })
|
|
424
427
|
.nullable(),
|
package/package.json
CHANGED
|
@@ -57,6 +57,8 @@ A Markdown frame contains one optional source file at `/<frame-id>/index.md`; wi
|
|
|
57
57
|
|
|
58
58
|
An absolute canonical WebP URL from the same project is equivalent. A Markdown document may embed up to 32 existing GLTS, image, or Market frames. It may not embed itself or another Markdown frame. Use the canonical syntax instead of copying a screenshot URL or source asset so the document follows later frame changes.
|
|
59
59
|
|
|
60
|
+
Prefer focused Markdown frames. A document that covers separable topics is usually clearer as multiple frames connected with canonical links, `[Related details](/<frame-id>/)`, because readers can navigate directly to the part they need. An embedded frame is useful when its current rendering adds visual context; a link is better when the reader only needs to navigate.
|
|
61
|
+
|
|
60
62
|
## Comments and annotations
|
|
61
63
|
|
|
62
64
|
Use comments for review conversations and persistent annotations, including explanations of objects or regions inside 2D and 3D frames. Inspect the current comments before replying, resolving, reopening, or deleting so the action targets the current thread.
|