pmx-canvas 0.1.14 → 0.1.15
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 +94 -0
- package/Readme.md +108 -1058
- package/dist/canvas/global.css +141 -0
- package/dist/canvas/index.js +129 -79
- package/dist/json-render/index.css +1 -1
- package/dist/types/client/nodes/HtmlNode.d.ts +5 -0
- package/dist/types/client/state/canvas-store.d.ts +5 -1
- package/dist/types/client/state/intent-bridge.d.ts +3 -1
- package/dist/types/client/types.d.ts +2 -2
- package/dist/types/json-render/catalog.d.ts +1 -1
- package/dist/types/mcp/canvas-access.d.ts +7 -1
- package/dist/types/server/agent-context.d.ts +1 -0
- package/dist/types/server/canvas-operations.d.ts +4 -2
- package/dist/types/server/canvas-provenance.d.ts +1 -1
- package/dist/types/server/canvas-serialization.d.ts +3 -0
- package/dist/types/server/canvas-state.d.ts +51 -4
- package/dist/types/server/demo.d.ts +5 -0
- package/dist/types/server/index.d.ts +13 -3
- package/dist/types/server/web-artifacts.d.ts +18 -0
- package/dist/types/shared/canvas-node-kind.d.ts +5 -0
- package/package.json +1 -1
- package/skills/pmx-canvas/SKILL.md +43 -0
- package/skills/pmx-canvas-testing/SKILL.md +17 -0
- package/src/cli/agent.ts +52 -5
- package/src/cli/index.ts +2 -23
- package/src/client/canvas/AttentionHistory.tsx +14 -1
- package/src/client/canvas/CanvasNode.tsx +1 -1
- package/src/client/canvas/CanvasViewport.tsx +3 -0
- package/src/client/canvas/DockedNode.tsx +110 -12
- package/src/client/canvas/ExpandedNodeOverlay.tsx +5 -0
- package/src/client/canvas/Minimap.tsx +1 -0
- package/src/client/icons.tsx +1 -0
- package/src/client/nodes/HtmlNode.tsx +151 -0
- package/src/client/state/canvas-store.ts +24 -2
- package/src/client/state/intent-bridge.ts +4 -3
- package/src/client/state/sse-bridge.ts +1 -0
- package/src/client/theme/global.css +141 -0
- package/src/client/types.ts +3 -0
- package/src/mcp/canvas-access.ts +34 -7
- package/src/mcp/server.ts +178 -25
- package/src/server/agent-context.ts +50 -3
- package/src/server/canvas-operations.ts +20 -3
- package/src/server/canvas-provenance.ts +2 -1
- package/src/server/canvas-serialization.ts +38 -13
- package/src/server/canvas-state.ts +305 -34
- package/src/server/demo.ts +792 -0
- package/src/server/index.ts +33 -3
- package/src/server/server.ts +74 -13
- package/src/server/web-artifacts.ts +116 -3
- package/src/shared/canvas-node-kind.ts +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,99 @@
|
|
|
3
3
|
All notable changes to `pmx-canvas` are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [0.1.15] - 2026-05-03
|
|
7
|
+
|
|
8
|
+
A bigger release focused on right-sizing what flows through MCP and the
|
|
9
|
+
canvas state file. Adds an `html` node type, sidecar blob storage so
|
|
10
|
+
rich ext-app payloads stay out of the main `state.json`, compact-by-
|
|
11
|
+
default MCP responses with an opt-in `full` mode, `canvas_gc_snapshots`,
|
|
12
|
+
a shared `getCanvasNodeKind` classifier so pinned reads tell agents the
|
|
13
|
+
real kind of `mcp-app` subtypes, web-artifact source context for pinned
|
|
14
|
+
reads, an extracted demo module, and a five-file `docs/` reference set.
|
|
15
|
+
The README, AGENTS.md, and CLAUDE.md catch up to the new shape.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`html` node type and `canvas_add_html_node` MCP tool.** Adds a
|
|
20
|
+
dedicated HTML node renderer that sandboxes user-authored markup in
|
|
21
|
+
an iframe and injects canvas theme tokens (`--c-*` plus
|
|
22
|
+
`--color-*` aliases) so embedded content inherits the theme. Token
|
|
23
|
+
values are sanitized before interpolation. `canvas_add_node` now
|
|
24
|
+
also accepts `type: 'html'` for parity, with `canvas_add_html_node`
|
|
25
|
+
the preferred entry point. MCP tool count is now 40 (was 39).
|
|
26
|
+
- **Snapshot list filtering and `canvas_gc_snapshots`.**
|
|
27
|
+
`canvas_list_snapshots` accepts options (`limit`, `before`,
|
|
28
|
+
`after`), and `canvas_gc_snapshots({keep, dryRun})` deletes older
|
|
29
|
+
snapshots while keeping the newest N. CLI `pmx-canvas snapshot
|
|
30
|
+
list` and `pmx-canvas snapshot gc` expose the same surface; HTTP
|
|
31
|
+
endpoints support both.
|
|
32
|
+
- **Sidecar blob storage for large ext-app payloads.** When an
|
|
33
|
+
ext-app field on a node would exceed the configured threshold
|
|
34
|
+
(default 2048 bytes; override via
|
|
35
|
+
`PMX_CANVAS_BLOB_THRESHOLD_BYTES`), the value is written to
|
|
36
|
+
`.pmx-canvas/blobs/<sha>.json` and replaced with a checksum
|
|
37
|
+
reference in the main `state.json`. Blob refs are reinflated
|
|
38
|
+
transparently on read, with a checksum-mismatch warning if the
|
|
39
|
+
sidecar file has been tampered with.
|
|
40
|
+
- **`getCanvasNodeKind()` shared classifier.** New
|
|
41
|
+
`src/shared/canvas-node-kind.ts` returns
|
|
42
|
+
`'web-artifact' | 'external-app' | 'mcp-app' | <type>` so pinned
|
|
43
|
+
reads, agent context, and CLI output report the real subtype of
|
|
44
|
+
`mcp-app` nodes (web-artifact viewers vs. external apps vs. plain
|
|
45
|
+
hosted content). `canvas://pinned-context` now includes `kind` for
|
|
46
|
+
every node.
|
|
47
|
+
- **Web-artifact source context on pinned reads.** When a pinned
|
|
48
|
+
node is a web-artifact, agent context now exposes a bounded source
|
|
49
|
+
summary (`buildWebArtifactSourceContext`): a capped list of source
|
|
50
|
+
filenames plus a truncated preview, instead of inlining the full
|
|
51
|
+
bundled HTML. Total file count is preserved even when the list is
|
|
52
|
+
truncated.
|
|
53
|
+
- **Standalone reference docs.** New `docs/cli.md`,
|
|
54
|
+
`docs/http-api.md`, `docs/mcp.md`, `docs/node-types.md`, and
|
|
55
|
+
`docs/sdk.md` document each surface in detail alongside the
|
|
56
|
+
README.
|
|
57
|
+
- **Extracted demo module (`src/server/demo.ts`).** The project-tour
|
|
58
|
+
demo seed is now its own module with `seedDemoCanvas()` exported
|
|
59
|
+
and unit-tested, so contributors can read and iterate on the
|
|
60
|
+
demo without spelunking through the server boot path.
|
|
61
|
+
- **DockedNode context dock with item-count badge.** The dock
|
|
62
|
+
surfaces a pill with the count of pinned cards plus aux tabs, and
|
|
63
|
+
the dock and the right-edge Updates panel are mutually exclusive
|
|
64
|
+
(one open at a time) so they no longer collide on the same anchor.
|
|
65
|
+
- **Trace field aliases on `node update`.** `node update` accepts
|
|
66
|
+
both camel (`--toolName`) and kebab (`--tool-name`) variants for
|
|
67
|
+
trace fields, matching the `node add` flag style.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- **MCP responses are compact by default.** `canvas_add_node`,
|
|
72
|
+
`canvas_get_node`, `canvas_get_layout`, and `canvas_batch` now
|
|
73
|
+
return compact node/layout payloads (id, type, position, size,
|
|
74
|
+
pinned, kind, plus a small data digest) by default. Pass
|
|
75
|
+
`full: true` (or `verbose: true`) to opt into the full payload.
|
|
76
|
+
This keeps response token counts stable for agents iterating over
|
|
77
|
+
large boards.
|
|
78
|
+
- **README reframed around "moldable canvas" + curation flow.** The
|
|
79
|
+
README opens with a moldable-canvas summary, calls out
|
|
80
|
+
curation-as-communication, and adds two top-level sections:
|
|
81
|
+
`01 / Curate` (drag, group, pin) and `02 / Mix any data source`.
|
|
82
|
+
- **AGENTS.md and CLAUDE.md updated for the new tool set.** Both
|
|
83
|
+
guidance files now list `canvas_add_html_node` and
|
|
84
|
+
`canvas_gc_snapshots` and the new `html` node type. Quick-start
|
|
85
|
+
shows `bun run dev:demo` for the project-tour board.
|
|
86
|
+
|
|
87
|
+
### Internal
|
|
88
|
+
|
|
89
|
+
- Regression coverage for: snapshot list filtering and gc through
|
|
90
|
+
CLI / HTTP / MCP, blob-sidecar persistence for large ext-app
|
|
91
|
+
payloads with opt-in full reads, pinned-context `kind`
|
|
92
|
+
serialization for native, graph, and mcp-app subtype nodes,
|
|
93
|
+
web-artifact pinned context returning a bounded source-file
|
|
94
|
+
summary instead of bundled HTML, capped source file metadata
|
|
95
|
+
preserving total count, trace field camel/kebab alias forwarding
|
|
96
|
+
on update, demo seeding, and external-app kind serialization
|
|
97
|
+
for pinned context consumers.
|
|
98
|
+
|
|
6
99
|
## [0.1.14] - 2026-05-02
|
|
7
100
|
|
|
8
101
|
External-MCP-app and trace-node ergonomics on top of 0.1.13. Trace node
|
|
@@ -512,6 +605,7 @@ otherwise have to discover by trial and error.
|
|
|
512
605
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
513
606
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
514
607
|
|
|
608
|
+
[0.1.15]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.15
|
|
515
609
|
[0.1.14]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.14
|
|
516
610
|
[0.1.13]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.13
|
|
517
611
|
[0.1.12]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.12
|