pmx-canvas 0.8.0 → 0.8.2
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/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/CHANGELOG.md +17 -0
- package/Readme.md +2 -2
- package/dist/canvas/global.css +6 -5
- package/dist/canvas/index.js +12 -12
- package/dist/canvas/mcp-app.html +22 -21
- package/dist/json-render/index.css +81 -1
- package/dist/json-render/index.js +1 -1
- package/dist/types/client/nodes/HtmlNode.d.ts +1 -0
- package/docs/design/Chrome.dc.html +3 -0
- package/docs/design.md +6 -3
- package/docs/http-api.md +6 -1
- package/docs/mcp.md +4 -1
- package/package.json +1 -1
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/skills/pmx-canvas/SKILL.md +20 -3
- package/skills/pmx-canvas/evals/evals.json +62 -0
- package/skills/pmx-canvas/references/ax-html-control-surface.md +6 -0
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +6 -6
- package/src/cli/commands/nodes.ts +3 -2
- package/src/cli/index.ts +2 -1
- package/src/client/nodes/HtmlNode.tsx +12 -2
- package/src/client/theme/global.css +6 -5
- package/src/json-render/renderer/index.css +6 -1
- package/src/json-render/renderer/index.tsx +0 -1
- package/src/server/canvas-operations.ts +1 -1
- package/src/server/context-reads.ts +1 -0
- package/src/server/index.ts +22 -2
- package/src/server/operations/mcp.ts +6 -0
- package/src/server/operations/ops/json-render.ts +5 -1
- package/src/server/operations/registry.ts +3 -1
|
@@ -43,6 +43,12 @@ async function invokeMcpOperation(
|
|
|
43
43
|
.filter((item): item is Extract<(typeof formatted.content)[number], { type: 'text' }> => item.type === 'text')
|
|
44
44
|
.map((item) => item.text)
|
|
45
45
|
.join('');
|
|
46
|
+
if (op.name === 'node.get') {
|
|
47
|
+
// Compact responses can still deliver text. Metadata without text or
|
|
48
|
+
// data must not mark unseen content read.
|
|
49
|
+
const node = JSON.parse(text) as { data?: unknown; content?: string | null };
|
|
50
|
+
if (node.data === undefined && !node.content) return formatted;
|
|
51
|
+
}
|
|
46
52
|
try {
|
|
47
53
|
await host.recordContextRead(
|
|
48
54
|
contextReadFromPayload(
|
|
@@ -309,7 +309,11 @@ const jsonRenderStreamOperation = defineOperation<z.infer<typeof jsonRenderStrea
|
|
|
309
309
|
// node degrades to the bare { ok, id, nodeId } payload.
|
|
310
310
|
let created: Record<string, unknown> = { ok: true, id, nodeId: id };
|
|
311
311
|
try {
|
|
312
|
-
const node = (await host.invoker().invoke('node.get', {
|
|
312
|
+
const node = (await host.invoker().invoke('node.get', {
|
|
313
|
+
id,
|
|
314
|
+
includeBlobs: true,
|
|
315
|
+
contextDelivery: false,
|
|
316
|
+
})) as CanvasNodeState;
|
|
313
317
|
created = { ok: true, node: compactNodePayload(node), id, nodeId: id };
|
|
314
318
|
} catch {
|
|
315
319
|
// keep the bare payload (legacy c.getNode → undefined path)
|
|
@@ -391,8 +391,10 @@ export async function executeOperation(
|
|
|
391
391
|
...(typeof inputAgentId === 'string' && inputAgentId.trim() ? { agentId: inputAgentId.trim() } : {}),
|
|
392
392
|
},
|
|
393
393
|
async () => {
|
|
394
|
-
const recordRead = CONTEXT_READ_OPS.has(name) && !meta.fromWorkbench && !meta.proxiedRead;
|
|
395
394
|
const input = asRecord(rawInput);
|
|
395
|
+
const deliversContext =
|
|
396
|
+
name !== 'node.get' || (input.contextDelivery !== false && input.contextDelivery !== 'false');
|
|
397
|
+
const recordRead = CONTEXT_READ_OPS.has(name) && deliversContext && !meta.fromWorkbench && !meta.proxiedRead;
|
|
396
398
|
const requestedBoard =
|
|
397
399
|
recordRead && 'board' in getOperation(name).inputShape && isString(input.board) && input.board.trim()
|
|
398
400
|
? input.board.trim()
|