pmx-canvas 0.1.3 → 0.1.4

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 CHANGED
@@ -3,6 +3,88 @@
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.4] - 2026-04-26
7
+
8
+ Graph/CLI ergonomics + canvas-node taxonomy hardening. Three threads:
9
+ (1) full graph payload surface (`zKey`, `axisKey`, `metrics`, `series`,
10
+ `barKey`/`lineKey`, `barColor`/`lineColor`) reaches CLI/MCP/HTTP/batch with
11
+ both kebab-case and camelCase flag aliases, (2) `mcp-app` nodes serialize a
12
+ `kind` discriminator so agents can target `web-artifact` / `external-app` /
13
+ `mcp-app` subtypes without inspecting `data`, (3) the long-standing
14
+ `ext-app-ext-app-…` double-prefix bug on node IDs is fixed with explicit
15
+ `nodeId` propagation through SSE.
16
+
17
+ ### Added
18
+
19
+ - Serialized `kind` discriminator on every canvas node. `mcp-app` nodes now
20
+ surface as `web-artifact`, `external-app`, or `mcp-app` so agents can
21
+ filter via `node list --type web-artifact` or
22
+ `--type external-app` directly.
23
+ - Full graph payload surface on MCP, HTTP `validate-spec`, and `batch`:
24
+ `zKey`, `axisKey`, `metrics`, `series`, `barKey`, `lineKey`, `barColor`,
25
+ `lineColor`. Radar (`metrics`), stacked-bar (`series`), and composed
26
+ (`barKey`/`lineKey`) configs are now uniformly addressable.
27
+ - CLI camelCase aliases for graph flags: `--graphType`, `--xKey`, `--yKey`,
28
+ `--zKey`, `--axisKey`, `--barKey`, `--lineKey`, `--barColor`,
29
+ `--lineColor`, alongside existing kebab-case forms. Same fields land in
30
+ `canvas_validate_spec` and `canvas_batch`.
31
+ - `id` field on `external-app add` / `canvas_open_mcp_app` /
32
+ `canvas_add_diagram` responses (alias for the canvas node ID, matches
33
+ HTTP).
34
+ - `viewerType: 'web-artifact'` persisted on web-artifact mcp-app nodes for
35
+ authoritative `kind` classification.
36
+
37
+ ### Changed
38
+
39
+ - `SerializedCanvasNode` now includes `kind: string` (additive; consumers
40
+ grouping by `type === 'mcp-app'` should switch to `kind`).
41
+ - `canvas://summary` `typeCounts` keys are derived from `kind`, not `type` —
42
+ `mcp-app` totals split into `web-artifact` / `external-app` / `mcp-app`.
43
+ - Charts wrap with type-specific CSS modifier classes
44
+ (`pmx-chart--line/--bar/--pie/--area/--scatter/--radar/--stacked-bar/--composed`)
45
+ and per-type minimum widths, so axes don't clip in narrow nodes.
46
+ - `canvas-schema.ts` cleanup based on the v0.1.4 review:
47
+ - `nodeHeight` no longer aliases `height` (collision with the chart-content
48
+ `height` field). Use `--node-height` going forward; `--height` always
49
+ means chart content height.
50
+ - `stdin` removed from the `data` and `appTsx` aliases — `--stdin` is an
51
+ input-mode (read from pipe), not a flag synonym. Behavior unchanged;
52
+ schema is now accurate.
53
+
54
+ ### Fixed
55
+
56
+ - Excalidraw / external-app node IDs no longer double-prefix to
57
+ `ext-app-ext-app-…`. The canvas node ID retains the `ext-app-` prefix; the
58
+ `toolCallId` is the random suffix only.
59
+ - SSE `ext-app-open` / `ext-app-update` / `ext-app-result` events now carry
60
+ an explicit `nodeId` so the client and server agree on node identity even
61
+ after the ID-format change.
62
+ - `getCanvasNodeKind` precedence reordered so a future URL-only web-artifact
63
+ (no `data.path`) still classifies correctly via `viewerType`. The legacy
64
+ `hostMode + path` heuristic is now an explicitly-documented backwards-compat
65
+ fallback for canvas state.json files persisted before v0.1.4.
66
+
67
+ ### Internal
68
+
69
+ - `findCanvasExtAppNodeId` extracted into `src/server/ext-app-lookup.ts` and
70
+ shared between `src/server/index.ts` and `src/server/server.ts` (was
71
+ duplicated; drift risk eliminated).
72
+ - `shouldReplayAppToolResult` documented with explicit intent: only `isError`
73
+ or `structuredContent` results overwrite the bootstrap-replay
74
+ `toolResult`, so a plain-text `read_checkpoint`-style return doesn't
75
+ clobber widget state on reload.
76
+ - E2E coverage now exercises camelCase graph flags and asserts the
77
+ single-prefix node-ID fix.
78
+ - New unit coverage:
79
+ - `kind` discriminator across fresh, URL-only, legacy, ext-app, and
80
+ plain-mcp-app paths (6 tests).
81
+ - Camel-case graph flags in CLI.
82
+ - Full-surface graph validation in MCP `canvas_validate_spec`.
83
+ - Single-prefix node-ID round-trip in `external-app add`.
84
+ - Post-restart text-tool replay semantics.
85
+
86
+ [0.1.4]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.4
87
+
6
88
  ## [0.1.3] - 2026-04-25
7
89
 
8
90
  CLI hardening release with full MCP parity for the new affordances. Closes