pmx-canvas 0.2.7 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +148 -1
- package/Readme.md +13 -11
- package/dist/canvas/index.js +2 -2
- package/dist/json-render/index.css +1 -1
- package/dist/types/cli/daemon.d.ts +74 -0
- package/dist/types/cli/watch.d.ts +2 -2
- package/dist/types/client/canvas/CanvasViewport.d.ts +1 -1
- package/dist/types/client/canvas/CommandPalette.d.ts +1 -1
- package/dist/types/client/canvas/Minimap.d.ts +1 -1
- package/dist/types/client/nodes/FileNode.d.ts +1 -1
- package/dist/types/client/nodes/ImageNode.d.ts +1 -1
- package/dist/types/client/nodes/InlineFormatBar.d.ts +1 -1
- package/dist/types/client/nodes/MarkdownNode.d.ts +1 -1
- package/dist/types/client/nodes/PromptNode.d.ts +1 -1
- package/dist/types/client/nodes/ResponseNode.d.ts +1 -1
- package/dist/types/mcp/canvas-access.d.ts +0 -7
- package/dist/types/server/ax-state-manager.d.ts +3 -2
- package/dist/types/server/bundled-skills.d.ts +3 -3
- package/dist/types/server/canvas-schema.d.ts +1 -1
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/ext-app-lookup.d.ts +1 -3
- package/dist/types/server/html-primitives.d.ts +1 -1
- package/dist/types/server/index.d.ts +4 -4
- package/dist/types/server/operations/composites.d.ts +29 -23
- package/dist/types/server/operations/http.d.ts +2 -1
- package/dist/types/server/operations/index.d.ts +1 -1
- package/dist/types/server/operations/ops/ax-read.d.ts +2 -0
- package/dist/types/server/operations/ops/canvas-wire.d.ts +2 -0
- package/dist/types/server/operations/ops/ext-app.d.ts +2 -0
- package/dist/types/shared/ax-intent.d.ts +1 -1
- package/docs/RELEASE.md +23 -8
- package/docs/ax-host-adapter-contract.md +7 -7
- package/docs/ax-state-contract.md +7 -6
- package/docs/bun-webview-integration.md +5 -5
- package/docs/cli.md +1 -1
- package/docs/http-api.md +35 -3
- package/docs/mcp.md +121 -100
- package/docs/node-types.md +45 -35
- package/docs/plans/plan-006-mcp-tool-consolidation.md +3 -1
- package/docs/plans/plan-008-registry-finish.md +2 -0
- package/docs/plans/plan-009-tech-debt-backlog.md +51 -0
- package/docs/screenshot.png +0 -0
- package/docs/tech-debt-assessment-2026-06.md +1 -1
- package/docs/tech-debt-assessment-2026-07.md +135 -0
- package/package.json +5 -2
- package/skills/data-analysis/SKILL.md +3 -3
- package/skills/frontend-design/SKILL.md +3 -2
- package/skills/json-render-mcp/SKILL.md +4 -3
- package/skills/playwright-cli/SKILL.md +1 -1
- package/skills/pmx-canvas/SKILL.md +12 -7
- package/skills/pmx-canvas/evals/evals.json +2 -2
- package/skills/pmx-canvas/references/ax-html-control-surface.md +3 -1
- package/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +2 -2
- package/skills/pmx-canvas/references/full-reference.md +58 -56
- package/skills/pmx-canvas/references/html-primitives.md +3 -3
- package/skills/tufte-viz/SKILL.md +5 -4
- package/skills/web-artifacts-builder/SKILL.md +4 -4
- package/src/cli/agent.ts +1861 -1548
- package/src/cli/daemon.ts +460 -0
- package/src/cli/index.ts +63 -326
- package/src/cli/watch.ts +2 -10
- package/src/client/App.tsx +48 -46
- package/src/client/canvas/AttentionHistory.tsx +11 -1
- package/src/client/canvas/CanvasNode.tsx +41 -29
- package/src/client/canvas/CanvasViewport.tsx +101 -66
- package/src/client/canvas/CommandPalette.tsx +61 -27
- package/src/client/canvas/ContextMenu.tsx +13 -20
- package/src/client/canvas/ContextPinBar.tsx +1 -5
- package/src/client/canvas/ContextPinHud.tsx +1 -6
- package/src/client/canvas/DockedNode.tsx +4 -4
- package/src/client/canvas/EdgeLayer.tsx +37 -36
- package/src/client/canvas/ExpandedNodeOverlay.tsx +69 -45
- package/src/client/canvas/FocusFieldLayer.tsx +20 -22
- package/src/client/canvas/IntentLayer.tsx +31 -14
- package/src/client/canvas/Minimap.tsx +11 -16
- package/src/client/canvas/SelectionBar.tsx +4 -11
- package/src/client/canvas/ShortcutOverlay.tsx +3 -1
- package/src/client/canvas/SnapshotPanel.tsx +77 -95
- package/src/client/canvas/auto-fit.ts +15 -14
- package/src/client/canvas/snap-guides.ts +12 -12
- package/src/client/canvas/use-node-resize.ts +1 -5
- package/src/client/canvas/use-pan-zoom.ts +25 -26
- package/src/client/ext-app/bridge.ts +3 -12
- package/src/client/icons.tsx +63 -20
- package/src/client/nodes/ContextNode.tsx +14 -25
- package/src/client/nodes/ExtAppFrame.tsx +60 -39
- package/src/client/nodes/FileNode.tsx +74 -62
- package/src/client/nodes/GroupNode.tsx +4 -6
- package/src/client/nodes/HtmlNode.tsx +76 -46
- package/src/client/nodes/ImageNode.tsx +18 -27
- package/src/client/nodes/InlineFormatBar.tsx +4 -21
- package/src/client/nodes/InlineMarkdownEditor.tsx +0 -1
- package/src/client/nodes/LedgerNode.tsx +10 -4
- package/src/client/nodes/MarkdownNode.tsx +3 -10
- package/src/client/nodes/McpAppNode.tsx +26 -22
- package/src/client/nodes/MdFormatBar.tsx +10 -7
- package/src/client/nodes/PromptNode.tsx +23 -51
- package/src/client/nodes/ResponseNode.tsx +3 -13
- package/src/client/nodes/StatusNode.tsx +5 -9
- package/src/client/nodes/StatusSummary.tsx +2 -8
- package/src/client/nodes/WebpageNode.tsx +20 -14
- package/src/client/nodes/iframe-document-url.ts +25 -16
- package/src/client/nodes/image-warnings.ts +1 -7
- package/src/client/nodes/md-format.ts +20 -5
- package/src/client/state/attention-bridge.ts +4 -9
- package/src/client/state/attention-store.ts +1 -7
- package/src/client/state/canvas-store.ts +52 -36
- package/src/client/state/intent-bridge.ts +176 -112
- package/src/client/state/intent-store.ts +4 -1
- package/src/client/state/sse-bridge.ts +53 -70
- package/src/json-render/catalog.ts +12 -16
- package/src/json-render/charts/components.tsx +16 -20
- package/src/json-render/charts/extra-components.tsx +8 -16
- package/src/json-render/charts/extra-definitions.ts +1 -2
- package/src/json-render/charts/tufte-components.tsx +37 -20
- package/src/json-render/charts/tufte-definitions.ts +8 -2
- package/src/json-render/renderer/index.tsx +42 -22
- package/src/json-render/schema.ts +6 -3
- package/src/json-render/server.ts +33 -39
- package/src/mcp/canvas-access.ts +40 -121
- package/src/mcp/server.ts +206 -271
- package/src/server/agent-context.ts +63 -36
- package/src/server/ax-context.ts +7 -5
- package/src/server/ax-interaction.ts +176 -43
- package/src/server/ax-state-manager.ts +185 -41
- package/src/server/ax-state.ts +142 -47
- package/src/server/bundled-skills.ts +3 -3
- package/src/server/canvas-db.ts +213 -95
- package/src/server/canvas-operations.ts +177 -120
- package/src/server/canvas-provenance.ts +1 -4
- package/src/server/canvas-schema.ts +500 -102
- package/src/server/canvas-serialization.ts +27 -35
- package/src/server/canvas-state.ts +155 -58
- package/src/server/chart-template.ts +4 -5
- package/src/server/code-graph.ts +20 -7
- package/src/server/diagram-presets.ts +28 -29
- package/src/server/ext-app-lookup.ts +4 -20
- package/src/server/html-node-summary.ts +19 -10
- package/src/server/html-primitives.ts +326 -97
- package/src/server/html-surface.ts +6 -9
- package/src/server/image-source.ts +6 -4
- package/src/server/index.ts +321 -218
- package/src/server/intent-registry.ts +3 -6
- package/src/server/mcp-app-candidate.ts +5 -10
- package/src/server/mcp-app-host.ts +14 -38
- package/src/server/mcp-app-runtime.ts +12 -20
- package/src/server/mutation-history.ts +15 -5
- package/src/server/operations/composites.ts +38 -40
- package/src/server/operations/http.ts +5 -5
- package/src/server/operations/index.ts +7 -1
- package/src/server/operations/invoker.ts +4 -3
- package/src/server/operations/mcp.ts +29 -36
- package/src/server/operations/ops/annotation.ts +122 -10
- package/src/server/operations/ops/app.ts +102 -77
- package/src/server/operations/ops/ax-await.ts +17 -10
- package/src/server/operations/ops/ax-read.ts +347 -0
- package/src/server/operations/ops/ax-shared.ts +2 -7
- package/src/server/operations/ops/ax-state.ts +32 -14
- package/src/server/operations/ops/ax-timeline.ts +32 -19
- package/src/server/operations/ops/ax-work.ts +54 -37
- package/src/server/operations/ops/batch.ts +39 -14
- package/src/server/operations/ops/canvas-wire.ts +91 -0
- package/src/server/operations/ops/edges.ts +37 -25
- package/src/server/operations/ops/ext-app.ts +346 -0
- package/src/server/operations/ops/groups.ts +49 -20
- package/src/server/operations/ops/intent.ts +18 -12
- package/src/server/operations/ops/json-render.ts +239 -98
- package/src/server/operations/ops/nodes.ts +300 -111
- package/src/server/operations/ops/query.ts +62 -33
- package/src/server/operations/ops/snapshots.ts +35 -26
- package/src/server/operations/ops/validate.ts +2 -1
- package/src/server/operations/ops/viewport.ts +60 -16
- package/src/server/operations/ops/webview.ts +44 -18
- package/src/server/operations/registry.ts +2 -3
- package/src/server/operations/types.ts +7 -5
- package/src/server/operations/webview-runner.ts +1 -3
- package/src/server/placement.ts +8 -18
- package/src/server/server.ts +121 -1012
- package/src/server/spatial-analysis.ts +39 -25
- package/src/server/trace-manager.ts +3 -8
- package/src/server/web-artifacts.ts +23 -27
- package/src/server/webpage-node.ts +5 -13
- package/src/shared/auto-arrange.ts +12 -5
- package/src/shared/ax-intent.ts +1 -1
- package/src/shared/content-height-reporter.ts +8 -6
- package/src/shared/ext-app-tool-result.ts +2 -6
- package/src/shared/placement.ts +1 -4
- package/src/shared/semantic-attention.ts +39 -37
- package/src/shared/surface.ts +8 -4
|
@@ -62,7 +62,7 @@ const CANONICAL_GRAPH_TYPES = [
|
|
|
62
62
|
'slopegraph',
|
|
63
63
|
] as const;
|
|
64
64
|
|
|
65
|
-
type CanvasGraphType = typeof CANONICAL_GRAPH_TYPES[number];
|
|
65
|
+
type CanvasGraphType = (typeof CANONICAL_GRAPH_TYPES)[number];
|
|
66
66
|
|
|
67
67
|
function readPackageVersion(): string | null {
|
|
68
68
|
try {
|
|
@@ -80,7 +80,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
80
80
|
kind: 'node',
|
|
81
81
|
description: 'Freeform markdown note.',
|
|
82
82
|
endpoint: '/api/canvas/node',
|
|
83
|
-
mcpTool: '
|
|
83
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
84
84
|
fields: [
|
|
85
85
|
{ name: 'title', type: 'string', required: false, description: 'Optional node title.' },
|
|
86
86
|
{ name: 'content', type: 'string', required: false, description: 'Markdown body.' },
|
|
@@ -88,7 +88,13 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
88
88
|
{ name: 'y', type: 'number', required: false, description: 'Optional Y position.' },
|
|
89
89
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width.' },
|
|
90
90
|
{ name: 'height', type: 'number', required: false, description: 'Optional node height.' },
|
|
91
|
-
{
|
|
91
|
+
{
|
|
92
|
+
name: 'strictSize',
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
required: false,
|
|
95
|
+
description: 'Keep explicit width/height fixed and scroll overflowing content instead of browser auto-fitting.',
|
|
96
|
+
aliases: ['strict-size', 'scroll-overflow'],
|
|
97
|
+
},
|
|
92
98
|
],
|
|
93
99
|
example: {
|
|
94
100
|
type: 'markdown',
|
|
@@ -104,7 +110,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
104
110
|
kind: 'node',
|
|
105
111
|
description: 'Compact status indicator.',
|
|
106
112
|
endpoint: '/api/canvas/node',
|
|
107
|
-
mcpTool: '
|
|
113
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
108
114
|
fields: [
|
|
109
115
|
{ name: 'title', type: 'string', required: false, description: 'Status label.' },
|
|
110
116
|
{ name: 'content', type: 'string', required: false, description: 'Rendered status text.' },
|
|
@@ -120,7 +126,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
120
126
|
kind: 'node',
|
|
121
127
|
description: 'Agent context card container.',
|
|
122
128
|
endpoint: '/api/canvas/node',
|
|
123
|
-
mcpTool: '
|
|
129
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
124
130
|
fields: [
|
|
125
131
|
{ name: 'title', type: 'string', required: false, description: 'Optional title override.' },
|
|
126
132
|
{ name: 'content', type: 'string', required: false, description: 'Optional context body.' },
|
|
@@ -136,7 +142,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
136
142
|
kind: 'node',
|
|
137
143
|
description: 'Structured ledger/log node.',
|
|
138
144
|
endpoint: '/api/canvas/node',
|
|
139
|
-
mcpTool: '
|
|
145
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
140
146
|
fields: [
|
|
141
147
|
{ name: 'title', type: 'string', required: false, description: 'Optional title.' },
|
|
142
148
|
{ name: 'content', type: 'string', required: false, description: 'Ledger body text.' },
|
|
@@ -152,15 +158,30 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
152
158
|
kind: 'node',
|
|
153
159
|
description: 'Execution trace viewer.',
|
|
154
160
|
endpoint: '/api/canvas/node',
|
|
155
|
-
mcpTool: '
|
|
161
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
156
162
|
fields: [
|
|
157
163
|
{ name: 'title', type: 'string', required: false, description: 'Optional title.' },
|
|
158
164
|
{ name: 'content', type: 'string', required: false, description: 'Trace summary.' },
|
|
159
|
-
{
|
|
160
|
-
|
|
165
|
+
{
|
|
166
|
+
name: 'toolName',
|
|
167
|
+
type: 'string',
|
|
168
|
+
required: false,
|
|
169
|
+
description: 'Tool or operation label shown in the trace pill; defaults to title.',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'category',
|
|
173
|
+
type: 'string',
|
|
174
|
+
required: false,
|
|
175
|
+
description: 'Trace category color key: mcp, file, subagent, or other.',
|
|
176
|
+
},
|
|
161
177
|
{ name: 'status', type: 'string', required: false, description: 'Trace status: running, success, or failed.' },
|
|
162
178
|
{ name: 'duration', type: 'string', required: false, description: 'Optional duration badge text.' },
|
|
163
|
-
{
|
|
179
|
+
{
|
|
180
|
+
name: 'resultSummary',
|
|
181
|
+
type: 'string',
|
|
182
|
+
required: false,
|
|
183
|
+
description: 'Short trace result summary; defaults to content.',
|
|
184
|
+
},
|
|
164
185
|
{ name: 'error', type: 'string', required: false, description: 'Short error message shown in failed traces.' },
|
|
165
186
|
],
|
|
166
187
|
example: {
|
|
@@ -175,7 +196,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
175
196
|
kind: 'node',
|
|
176
197
|
description: 'Workspace file viewer.',
|
|
177
198
|
endpoint: '/api/canvas/node',
|
|
178
|
-
mcpTool: '
|
|
199
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
179
200
|
fields: [
|
|
180
201
|
{ name: 'content', type: 'string', required: true, description: 'Workspace-relative or absolute file path.' },
|
|
181
202
|
{ name: 'title', type: 'string', required: false, description: 'Optional title override.' },
|
|
@@ -193,14 +214,40 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
193
214
|
kind: 'node',
|
|
194
215
|
description: 'Image node backed by a path, URL, or data URI.',
|
|
195
216
|
endpoint: '/api/canvas/node',
|
|
196
|
-
mcpTool: '
|
|
217
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
197
218
|
fields: [
|
|
198
|
-
{
|
|
219
|
+
{
|
|
220
|
+
name: 'content',
|
|
221
|
+
type: 'string',
|
|
222
|
+
required: true,
|
|
223
|
+
description: 'Image path, URL, or data URI.',
|
|
224
|
+
aliases: ['path'],
|
|
225
|
+
},
|
|
199
226
|
{ name: 'title', type: 'string', required: false, description: 'Optional title override.' },
|
|
200
|
-
{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
227
|
+
{
|
|
228
|
+
name: 'data.warning',
|
|
229
|
+
type: 'string | { title?: string; detail: string }',
|
|
230
|
+
required: false,
|
|
231
|
+
description: 'Optional agent-supplied warning shown above the image.',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'data.warnings',
|
|
235
|
+
type: 'Array<string | { title?: string; detail: string }>',
|
|
236
|
+
required: false,
|
|
237
|
+
description: 'Optional list of agent-supplied image warnings.',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'data.validationStatus',
|
|
241
|
+
type: '"passed" | "failed" | "invalid"',
|
|
242
|
+
required: false,
|
|
243
|
+
description: 'Optional agent validation result for evidence-style images.',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'data.validationMessage',
|
|
247
|
+
type: 'string',
|
|
248
|
+
required: false,
|
|
249
|
+
description: 'Optional detail shown when validation fails.',
|
|
250
|
+
},
|
|
204
251
|
],
|
|
205
252
|
example: {
|
|
206
253
|
type: 'image',
|
|
@@ -219,15 +266,27 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
219
266
|
kind: 'node',
|
|
220
267
|
description: 'Persisted webpage snapshot with server-side fetch and refresh.',
|
|
221
268
|
endpoint: '/api/canvas/node',
|
|
222
|
-
mcpTool: '
|
|
269
|
+
mcpTool: 'canvas_node (action:"add")',
|
|
223
270
|
fields: [
|
|
224
|
-
{
|
|
271
|
+
{
|
|
272
|
+
name: 'url',
|
|
273
|
+
type: 'string',
|
|
274
|
+
required: true,
|
|
275
|
+
description: 'HTTP(S) URL to fetch and cache.',
|
|
276
|
+
aliases: ['content'],
|
|
277
|
+
},
|
|
225
278
|
{ name: 'title', type: 'string', required: false, description: 'Optional title override.' },
|
|
226
279
|
{ name: 'x', type: 'number', required: false, description: 'Optional X position.' },
|
|
227
280
|
{ name: 'y', type: 'number', required: false, description: 'Optional Y position.' },
|
|
228
281
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width.' },
|
|
229
282
|
{ name: 'height', type: 'number', required: false, description: 'Optional node height.' },
|
|
230
|
-
{
|
|
283
|
+
{
|
|
284
|
+
name: 'strictSize',
|
|
285
|
+
type: 'boolean',
|
|
286
|
+
required: false,
|
|
287
|
+
description: 'Keep explicit width/height fixed and scroll overflowing content instead of browser auto-fitting.',
|
|
288
|
+
aliases: ['strict-size', 'scroll-overflow'],
|
|
289
|
+
},
|
|
231
290
|
],
|
|
232
291
|
example: {
|
|
233
292
|
type: 'webpage',
|
|
@@ -246,21 +305,78 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
246
305
|
endpoint: '/api/canvas/node',
|
|
247
306
|
mcpTool: 'canvas_node (action:"add", type:"html")',
|
|
248
307
|
fields: [
|
|
249
|
-
{
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
{
|
|
257
|
-
|
|
308
|
+
{
|
|
309
|
+
name: 'html',
|
|
310
|
+
type: 'string',
|
|
311
|
+
required: false,
|
|
312
|
+
description: 'HTML document or fragment rendered in the sandboxed iframe.',
|
|
313
|
+
aliases: ['content', 'stdin'],
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'summary',
|
|
317
|
+
type: 'string',
|
|
318
|
+
required: false,
|
|
319
|
+
description: 'Explicit agent-readable summary. If omitted, PMX derives one from visible HTML text.',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
name: 'agentSummary',
|
|
323
|
+
type: 'string',
|
|
324
|
+
required: false,
|
|
325
|
+
description: 'Explicit semantic sidecar used by search, pinned context, and spatial context.',
|
|
326
|
+
aliases: ['agent-summary'],
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
name: 'embeddedNodeIds',
|
|
330
|
+
type: 'string[]',
|
|
331
|
+
required: false,
|
|
332
|
+
description: 'Canvas node IDs represented or iframe-embedded by this HTML surface.',
|
|
333
|
+
aliases: ['embedded-node-id', 'embedded-node-ids'],
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: 'embeddedUrls',
|
|
337
|
+
type: 'string[]',
|
|
338
|
+
required: false,
|
|
339
|
+
description: 'URLs represented or iframe-embedded by this HTML surface.',
|
|
340
|
+
aliases: ['embedded-url', 'embedded-urls'],
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'presentation',
|
|
344
|
+
type: 'boolean',
|
|
345
|
+
required: false,
|
|
346
|
+
description: 'Marks this HTML surface as a fullscreen presentation/deck.',
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: 'slideTitles',
|
|
350
|
+
type: 'string[]',
|
|
351
|
+
required: false,
|
|
352
|
+
description: 'Agent-readable slide titles for presentation HTML.',
|
|
353
|
+
aliases: ['slide-title', 'slide-titles'],
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: 'primitive',
|
|
357
|
+
type: 'HtmlPrimitiveKind',
|
|
358
|
+
required: false,
|
|
359
|
+
description: 'Generate HTML from a built-in communication primitive instead of passing raw HTML.',
|
|
360
|
+
aliases: ['kind'],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: 'data',
|
|
364
|
+
type: 'record<string, unknown>',
|
|
365
|
+
required: false,
|
|
366
|
+
description: 'Primitive data when --primitive is used, or arbitrary node metadata.',
|
|
367
|
+
},
|
|
258
368
|
{ name: 'title', type: 'string', required: false, description: 'Optional node title.' },
|
|
259
369
|
{ name: 'x', type: 'number', required: false, description: 'Optional X position.' },
|
|
260
370
|
{ name: 'y', type: 'number', required: false, description: 'Optional Y position.' },
|
|
261
371
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width.' },
|
|
262
372
|
{ name: 'height', type: 'number', required: false, description: 'Optional node height.' },
|
|
263
|
-
{
|
|
373
|
+
{
|
|
374
|
+
name: 'strictSize',
|
|
375
|
+
type: 'boolean',
|
|
376
|
+
required: false,
|
|
377
|
+
description: 'Keep explicit width/height fixed and scroll overflowing content instead of browser auto-fitting.',
|
|
378
|
+
aliases: ['strict-size', 'scroll-overflow'],
|
|
379
|
+
},
|
|
264
380
|
],
|
|
265
381
|
example: {
|
|
266
382
|
type: 'html',
|
|
@@ -283,23 +399,37 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
283
399
|
endpoint: '/api/canvas/node',
|
|
284
400
|
mcpTool: 'canvas_node (action:"add", type:"html", primitive:"<kind>")',
|
|
285
401
|
fields: [
|
|
286
|
-
{
|
|
287
|
-
|
|
402
|
+
{
|
|
403
|
+
name: 'kind',
|
|
404
|
+
type: 'HtmlPrimitiveKind',
|
|
405
|
+
required: true,
|
|
406
|
+
description: 'Primitive kind. See top-level htmlPrimitives for the supported catalog.',
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
name: 'data',
|
|
410
|
+
type: 'record<string, unknown>',
|
|
411
|
+
required: false,
|
|
412
|
+
description: 'Primitive-specific JSON object payload.',
|
|
413
|
+
},
|
|
288
414
|
{ name: 'title', type: 'string', required: false, description: 'Optional node title.' },
|
|
289
415
|
{ name: 'x', type: 'number', required: false, description: 'Optional X position.' },
|
|
290
416
|
{ name: 'y', type: 'number', required: false, description: 'Optional Y position.' },
|
|
291
417
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width; defaults per primitive.' },
|
|
292
418
|
{ name: 'height', type: 'number', required: false, description: 'Optional node height; defaults per primitive.' },
|
|
293
|
-
{
|
|
419
|
+
{
|
|
420
|
+
name: 'strictSize',
|
|
421
|
+
type: 'boolean',
|
|
422
|
+
required: false,
|
|
423
|
+
description: 'Keep explicit width/height fixed and scroll overflowing content instead of browser auto-fitting.',
|
|
424
|
+
aliases: ['strict-size', 'scroll-overflow'],
|
|
425
|
+
},
|
|
294
426
|
],
|
|
295
427
|
example: {
|
|
296
428
|
type: 'html-primitive',
|
|
297
429
|
kind: 'choice-grid',
|
|
298
430
|
title: 'Implementation Options',
|
|
299
431
|
data: {
|
|
300
|
-
items: [
|
|
301
|
-
{ title: 'Small patch', summary: 'Least disruption.', pros: ['Fast'], cons: ['Limited flexibility'] },
|
|
302
|
-
],
|
|
432
|
+
items: [{ title: 'Small patch', summary: 'Least disruption.', pros: ['Fast'], cons: ['Limited flexibility'] }],
|
|
303
433
|
},
|
|
304
434
|
},
|
|
305
435
|
notes: [
|
|
@@ -314,7 +444,7 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
314
444
|
kind: 'node',
|
|
315
445
|
description: 'Hosted iframe/app node.',
|
|
316
446
|
endpoint: '/api/canvas/node',
|
|
317
|
-
mcpTool: '
|
|
447
|
+
mcpTool: 'canvas_app (action:"open-mcp-app")',
|
|
318
448
|
fields: [
|
|
319
449
|
{ name: 'title', type: 'string', required: false, description: 'App title.' },
|
|
320
450
|
{ name: 'content', type: 'string', required: false, description: 'Optional inline content.' },
|
|
@@ -333,11 +463,21 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
333
463
|
kind: 'virtual-node',
|
|
334
464
|
description: 'Tool-backed hosted app opened from an external MCP server, such as Excalidraw.',
|
|
335
465
|
endpoint: '/api/canvas/mcp-app/open',
|
|
336
|
-
mcpTool: '
|
|
466
|
+
mcpTool: 'canvas_app (action:"open-mcp-app")',
|
|
337
467
|
fields: [
|
|
338
468
|
{ name: 'toolName', type: 'string', required: true, description: 'Tool name on the external MCP server.' },
|
|
339
|
-
{
|
|
340
|
-
|
|
469
|
+
{
|
|
470
|
+
name: 'transport',
|
|
471
|
+
type: '{ type: "stdio", command, args? } | { type: "http", url, headers? }',
|
|
472
|
+
required: true,
|
|
473
|
+
description: 'External MCP transport definition.',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
name: 'toolArguments',
|
|
477
|
+
type: 'record<string, unknown>',
|
|
478
|
+
required: false,
|
|
479
|
+
description: 'Arguments passed to the external MCP tool.',
|
|
480
|
+
},
|
|
341
481
|
{ name: 'title', type: 'string', required: false, description: 'Optional canvas node title override.' },
|
|
342
482
|
],
|
|
343
483
|
example: {
|
|
@@ -347,8 +487,8 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
347
487
|
title: 'Excalidraw Diagram',
|
|
348
488
|
},
|
|
349
489
|
notes: [
|
|
350
|
-
'For Excalidraw specifically, prefer
|
|
351
|
-
'The CLI convenience command `external-app add --kind excalidraw` maps to this built-in Excalidraw preset; MCP
|
|
490
|
+
'For Excalidraw specifically, prefer canvas_app (action:"diagram") because it fills in the built-in transport, toolName, and checkpoint wiring.',
|
|
491
|
+
'The CLI convenience command `external-app add --kind excalidraw` maps to this built-in Excalidraw preset; MCP canvas_app (action:"open-mcp-app") is the lower-level transport form.',
|
|
352
492
|
],
|
|
353
493
|
},
|
|
354
494
|
{
|
|
@@ -356,11 +496,16 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
356
496
|
kind: 'node',
|
|
357
497
|
description: 'Canvas group frame.',
|
|
358
498
|
endpoint: '/api/canvas/group',
|
|
359
|
-
mcpTool: '
|
|
499
|
+
mcpTool: 'canvas_group (action:"create")',
|
|
360
500
|
fields: [
|
|
361
501
|
{ name: 'title', type: 'string', required: false, description: 'Group title.' },
|
|
362
502
|
{ name: 'childIds', type: 'string[]', required: false, description: 'Initial child node IDs.' },
|
|
363
|
-
{
|
|
503
|
+
{
|
|
504
|
+
name: 'childLayout',
|
|
505
|
+
type: '"grid" | "column" | "flow"',
|
|
506
|
+
required: false,
|
|
507
|
+
description: 'Optional layout for grouped children.',
|
|
508
|
+
},
|
|
364
509
|
],
|
|
365
510
|
example: {
|
|
366
511
|
title: 'API Layer',
|
|
@@ -373,10 +518,21 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
373
518
|
kind: 'virtual-node',
|
|
374
519
|
description: 'Native structured UI panel rendered from a validated json-render spec.',
|
|
375
520
|
endpoint: '/api/canvas/json-render',
|
|
376
|
-
mcpTool: '
|
|
521
|
+
mcpTool: 'canvas_render (action:"add-json-render")',
|
|
377
522
|
fields: [
|
|
378
|
-
{
|
|
379
|
-
|
|
523
|
+
{
|
|
524
|
+
name: 'title',
|
|
525
|
+
type: 'string',
|
|
526
|
+
required: false,
|
|
527
|
+
description: 'Optional rendered node title; inferred from the root element when omitted.',
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: 'spec',
|
|
531
|
+
type: 'JsonRenderSpec | JsonRenderElement',
|
|
532
|
+
required: true,
|
|
533
|
+
description:
|
|
534
|
+
'Complete {root, elements} json-render spec, or a legacy single bare component object with a type field.',
|
|
535
|
+
},
|
|
380
536
|
{ name: 'x', type: 'number', required: false, description: 'Optional X position.' },
|
|
381
537
|
{ name: 'y', type: 'number', required: false, description: 'Optional Y position.' },
|
|
382
538
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width.' },
|
|
@@ -406,45 +562,212 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
406
562
|
kind: 'virtual-node',
|
|
407
563
|
description: 'Native chart node backed by the json-render chart catalog.',
|
|
408
564
|
endpoint: '/api/canvas/graph',
|
|
409
|
-
mcpTool: '
|
|
565
|
+
mcpTool: 'canvas_render (action:"add-graph")',
|
|
410
566
|
fields: [
|
|
411
567
|
{
|
|
412
568
|
name: 'graphType',
|
|
413
569
|
type: '"line" | "bar" | "pie" | "area" | "scatter" | "radar" | "stacked-bar" | "composed" | "sparkline" | "dot-plot" | "bullet" | "slopegraph"',
|
|
414
570
|
required: true,
|
|
415
|
-
description:
|
|
571
|
+
description:
|
|
572
|
+
'Chart type. Includes the Tufte primitives sparkline, dot-plot (Cleveland), bullet (Few KPI vs target), and slopegraph (paired before/after). Aliases like "stack", "combo", "dot", and "slope" are normalized server-side.',
|
|
416
573
|
aliases: ['graph-type'],
|
|
417
574
|
},
|
|
418
|
-
{
|
|
575
|
+
{
|
|
576
|
+
name: 'data',
|
|
577
|
+
type: 'Record<string, unknown>[]',
|
|
578
|
+
required: true,
|
|
579
|
+
description: 'Chart dataset. The CLI also accepts piped JSON via --stdin.',
|
|
580
|
+
aliases: ['data-json', 'data-file'],
|
|
581
|
+
},
|
|
419
582
|
{ name: 'title', type: 'string', required: false, description: 'Optional graph title.' },
|
|
420
|
-
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
{
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
{
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
{
|
|
443
|
-
|
|
444
|
-
|
|
583
|
+
{
|
|
584
|
+
name: 'xKey',
|
|
585
|
+
type: 'string',
|
|
586
|
+
required: false,
|
|
587
|
+
description: 'X-axis/category key for line, bar, area, scatter, stacked-bar, and composed charts.',
|
|
588
|
+
aliases: ['x-key'],
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: 'yKey',
|
|
592
|
+
type: 'string',
|
|
593
|
+
required: false,
|
|
594
|
+
description:
|
|
595
|
+
'Y-axis value key for line, bar, area, and scatter charts. Also used as a fallback bar key for composed charts.',
|
|
596
|
+
aliases: ['y-key'],
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: 'zKey',
|
|
600
|
+
type: 'string',
|
|
601
|
+
required: false,
|
|
602
|
+
description: 'Optional bubble-size key for scatter charts.',
|
|
603
|
+
aliases: ['z-key'],
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: 'nameKey',
|
|
607
|
+
type: 'string',
|
|
608
|
+
required: false,
|
|
609
|
+
description: 'Slice name key for pie graphs.',
|
|
610
|
+
aliases: ['name-key'],
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: 'valueKey',
|
|
614
|
+
type: 'string',
|
|
615
|
+
required: false,
|
|
616
|
+
description: 'Value key for pie slices, sparkline, dot-plot, and the bullet measure.',
|
|
617
|
+
aliases: ['value-key'],
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
name: 'axisKey',
|
|
621
|
+
type: 'string',
|
|
622
|
+
required: false,
|
|
623
|
+
description: 'Category key for radar charts.',
|
|
624
|
+
aliases: ['axis-key'],
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
name: 'metrics',
|
|
628
|
+
type: 'string[]',
|
|
629
|
+
required: false,
|
|
630
|
+
description: 'Series keys to plot as radar polygons. Defaults to non-axis numeric columns.',
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: 'series',
|
|
634
|
+
type: 'string[]',
|
|
635
|
+
required: false,
|
|
636
|
+
description: 'Series keys for stacked-bar segments. Defaults to non-x numeric columns.',
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: 'barKey',
|
|
640
|
+
type: 'string',
|
|
641
|
+
required: false,
|
|
642
|
+
description: 'Bar series key for composed charts.',
|
|
643
|
+
aliases: ['bar-key'],
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
name: 'lineKey',
|
|
647
|
+
type: 'string',
|
|
648
|
+
required: false,
|
|
649
|
+
description: 'Line series key for composed charts.',
|
|
650
|
+
aliases: ['line-key'],
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
name: 'aggregate',
|
|
654
|
+
type: '"sum" | "count" | "avg"',
|
|
655
|
+
required: false,
|
|
656
|
+
description: 'Optional aggregation for repeated x-axis values in line, bar, area, and stacked-bar charts.',
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
name: 'color',
|
|
660
|
+
type: 'string',
|
|
661
|
+
required: false,
|
|
662
|
+
description: 'Optional series color for line, bar, area, and scatter charts.',
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: 'barColor',
|
|
666
|
+
type: 'string',
|
|
667
|
+
required: false,
|
|
668
|
+
description: 'Optional bar color for composed charts.',
|
|
669
|
+
aliases: ['bar-color'],
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
name: 'lineColor',
|
|
673
|
+
type: 'string',
|
|
674
|
+
required: false,
|
|
675
|
+
description: 'Optional line color for composed charts.',
|
|
676
|
+
aliases: ['line-color'],
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
name: 'colorBy',
|
|
680
|
+
type: '"series" | "category" | "value" | "none"',
|
|
681
|
+
required: false,
|
|
682
|
+
description:
|
|
683
|
+
'Bar charts only: how bars are colored. Default "series" (single accent + one highlighted bar). "category" rotates the palette, "value" shades by magnitude, "none" is flat. Color should encode data, not decorate.',
|
|
684
|
+
aliases: ['color-by'],
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
name: 'highlight',
|
|
688
|
+
type: 'number | "max" | "min"',
|
|
689
|
+
required: false,
|
|
690
|
+
description:
|
|
691
|
+
'Bar charts (colorBy="series") only: which bar gets the accent — "max" (default), "min", a 0-based index, or null for no emphasis.',
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
name: 'labelKey',
|
|
695
|
+
type: 'string',
|
|
696
|
+
required: false,
|
|
697
|
+
description: 'Category label key for dot-plot, bullet, and slopegraph rows.',
|
|
698
|
+
aliases: ['label-key'],
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
name: 'targetKey',
|
|
702
|
+
type: 'string',
|
|
703
|
+
required: false,
|
|
704
|
+
description: 'Per-row target value key for bullet charts.',
|
|
705
|
+
aliases: ['target-key'],
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
name: 'rangesKey',
|
|
709
|
+
type: 'string',
|
|
710
|
+
required: false,
|
|
711
|
+
description: 'Per-row qualitative band thresholds (number[]) key for bullet charts.',
|
|
712
|
+
aliases: ['ranges-key'],
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
name: 'beforeKey',
|
|
716
|
+
type: 'string',
|
|
717
|
+
required: false,
|
|
718
|
+
description: 'Left-column value key for slopegraph.',
|
|
719
|
+
aliases: ['before-key'],
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
name: 'afterKey',
|
|
723
|
+
type: 'string',
|
|
724
|
+
required: false,
|
|
725
|
+
description: 'Right-column value key for slopegraph.',
|
|
726
|
+
aliases: ['after-key'],
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
name: 'sort',
|
|
730
|
+
type: '"asc" | "desc" | "none"',
|
|
731
|
+
required: false,
|
|
732
|
+
description: 'Row sort order for dot-plot (defaults to desc).',
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: 'height',
|
|
736
|
+
type: 'number',
|
|
737
|
+
required: false,
|
|
738
|
+
description: 'Optional chart content height.',
|
|
739
|
+
aliases: ['chart-height'],
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'showLegend',
|
|
743
|
+
type: 'boolean',
|
|
744
|
+
required: false,
|
|
745
|
+
description: 'Show chart legend when supported; pass false for compact node layouts.',
|
|
746
|
+
aliases: ['show-legend'],
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'showLabels',
|
|
750
|
+
type: 'boolean',
|
|
751
|
+
required: false,
|
|
752
|
+
description: 'Show direct labels when supported, such as pie slice labels; defaults to true.',
|
|
753
|
+
aliases: ['show-labels'],
|
|
754
|
+
},
|
|
445
755
|
{ name: 'width', type: 'number', required: false, description: 'Optional node width.' },
|
|
446
|
-
{
|
|
447
|
-
|
|
756
|
+
{
|
|
757
|
+
name: 'nodeHeight',
|
|
758
|
+
type: 'number',
|
|
759
|
+
required: false,
|
|
760
|
+
description:
|
|
761
|
+
'Optional node height (canvas frame). Distinct from `height`, which sets only the chart content height inside the node.',
|
|
762
|
+
aliases: ['node-height'],
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: 'strictSize',
|
|
766
|
+
type: 'boolean',
|
|
767
|
+
required: false,
|
|
768
|
+
description: 'Keep explicit node size fixed and scroll overflowing content instead of browser auto-fitting.',
|
|
769
|
+
aliases: ['strict-size', 'scroll-overflow'],
|
|
770
|
+
},
|
|
448
771
|
],
|
|
449
772
|
example: {
|
|
450
773
|
title: 'Deploy Trend',
|
|
@@ -467,19 +790,65 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
467
790
|
kind: 'virtual-node',
|
|
468
791
|
description: 'Bundled single-file HTML artifact that can open as an embedded canvas node.',
|
|
469
792
|
endpoint: '/api/canvas/web-artifact',
|
|
470
|
-
mcpTool: '
|
|
793
|
+
mcpTool: 'canvas_app (action:"build-artifact")',
|
|
471
794
|
fields: [
|
|
472
795
|
{ name: 'title', type: 'string', required: true, description: 'Artifact title used for default paths.' },
|
|
473
|
-
{
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
796
|
+
{
|
|
797
|
+
name: 'appTsx',
|
|
798
|
+
type: 'string',
|
|
799
|
+
required: true,
|
|
800
|
+
description: 'Contents for src/App.tsx. The CLI also accepts piped contents via --stdin.',
|
|
801
|
+
aliases: ['app-file', 'app-tsx'],
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'indexCss',
|
|
805
|
+
type: 'string',
|
|
806
|
+
required: false,
|
|
807
|
+
description: 'Optional src/index.css contents.',
|
|
808
|
+
aliases: ['index-css-file', 'index-css'],
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
name: 'mainTsx',
|
|
812
|
+
type: 'string',
|
|
813
|
+
required: false,
|
|
814
|
+
description: 'Optional src/main.tsx contents.',
|
|
815
|
+
aliases: ['main-file', 'main-tsx'],
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
name: 'indexHtml',
|
|
819
|
+
type: 'string',
|
|
820
|
+
required: false,
|
|
821
|
+
description: 'Optional index.html contents.',
|
|
822
|
+
aliases: ['index-html-file', 'index-html'],
|
|
823
|
+
},
|
|
477
824
|
{ name: 'projectPath', type: 'string', required: false, description: 'Optional project directory.' },
|
|
478
825
|
{ name: 'outputPath', type: 'string', required: false, description: 'Optional output HTML path.' },
|
|
479
|
-
{
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
826
|
+
{
|
|
827
|
+
name: 'openInCanvas',
|
|
828
|
+
type: 'boolean',
|
|
829
|
+
required: false,
|
|
830
|
+
description: 'Open the built artifact on the canvas (default true).',
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: 'includeLogs',
|
|
834
|
+
type: 'boolean',
|
|
835
|
+
required: false,
|
|
836
|
+
description: 'Include raw build stdout/stderr in the response (default false).',
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: 'deps',
|
|
840
|
+
type: 'string[]',
|
|
841
|
+
required: false,
|
|
842
|
+
description: 'Optional npm dependencies to add before bundling, e.g. recharts.',
|
|
843
|
+
aliases: ['deps'],
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: 'timeoutMs',
|
|
847
|
+
type: 'number',
|
|
848
|
+
required: false,
|
|
849
|
+
description:
|
|
850
|
+
'Build command timeout in milliseconds. This controls subprocess timeout, not the MCP client request timeout.',
|
|
851
|
+
},
|
|
483
852
|
],
|
|
484
853
|
example: {
|
|
485
854
|
title: 'Dashboard Artifact',
|
|
@@ -540,9 +909,21 @@ export function describeCanvasSchema(): {
|
|
|
540
909
|
},
|
|
541
910
|
components: clone(describeJsonRenderCatalog()),
|
|
542
911
|
directives: [
|
|
543
|
-
{
|
|
544
|
-
|
|
545
|
-
|
|
912
|
+
{
|
|
913
|
+
name: '$state',
|
|
914
|
+
usage:
|
|
915
|
+
'{ "$state": "/path/to/value" } — read a value from the state model by path (one-way). Use this to bind a value by path; there is no $path directive.',
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: '$format',
|
|
919
|
+
usage:
|
|
920
|
+
'{ "$format": "currency"|"number"|"percent"|"date", "value": <num|state-ref>, "currency"?: "USD", "locale"?, "style"?, "options"? } — Intl-formatted string',
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: '$math',
|
|
924
|
+
usage:
|
|
925
|
+
'{ "$math": "add"|"subtract"|"multiply"|"divide"|"mod"|"min"|"max"|"round"|"floor"|"ceil"|"abs", "a": <num>, "b"?: <num> }',
|
|
926
|
+
},
|
|
546
927
|
{ name: '$concat', usage: '{ "$concat": [<value>, <value>, ...] } — join values into one string' },
|
|
547
928
|
{ name: '$count', usage: '{ "$count": <array|state-ref> } — length of an array' },
|
|
548
929
|
{ name: '$truncate', usage: '{ "$truncate": <string>, "length": <num>, "suffix"?: "…" }' },
|
|
@@ -556,19 +937,36 @@ export function describeCanvasSchema(): {
|
|
|
556
937
|
htmlPrimitives: listHtmlPrimitiveDescriptors(),
|
|
557
938
|
mcp: {
|
|
558
939
|
tools: [
|
|
559
|
-
|
|
560
|
-
'
|
|
561
|
-
'
|
|
562
|
-
'
|
|
563
|
-
'
|
|
564
|
-
'
|
|
565
|
-
'
|
|
566
|
-
'
|
|
567
|
-
'
|
|
568
|
-
'
|
|
569
|
-
'
|
|
570
|
-
'
|
|
571
|
-
'
|
|
940
|
+
// 15 composites
|
|
941
|
+
'canvas_node',
|
|
942
|
+
'canvas_render',
|
|
943
|
+
'canvas_edge',
|
|
944
|
+
'canvas_group',
|
|
945
|
+
'canvas_history',
|
|
946
|
+
'canvas_view',
|
|
947
|
+
'canvas_query',
|
|
948
|
+
'canvas_webview',
|
|
949
|
+
'canvas_app',
|
|
950
|
+
'canvas_ax_state',
|
|
951
|
+
'canvas_ax_work',
|
|
952
|
+
'canvas_ax_gate',
|
|
953
|
+
'canvas_ax_timeline',
|
|
954
|
+
'canvas_ax_delivery',
|
|
955
|
+
'canvas_intent',
|
|
956
|
+
// 6 standalones
|
|
957
|
+
'canvas_batch',
|
|
958
|
+
'canvas_pin_nodes',
|
|
959
|
+
'canvas_invoke_command',
|
|
960
|
+
'canvas_ax_interaction',
|
|
961
|
+
'canvas_ingest_activity',
|
|
962
|
+
'canvas_screenshot',
|
|
963
|
+
// 6 snapshot tools (deprecated; fold into canvas_snapshot composite in v0.4)
|
|
964
|
+
'canvas_snapshot',
|
|
965
|
+
'canvas_list_snapshots',
|
|
966
|
+
'canvas_restore',
|
|
967
|
+
'canvas_delete_snapshot',
|
|
968
|
+
'canvas_gc_snapshots',
|
|
969
|
+
'canvas_diff',
|
|
572
970
|
],
|
|
573
971
|
resources: ['canvas://schema'],
|
|
574
972
|
nodeTypeRouting: buildMcpNodeTypeRouting(nodeTypes),
|