pmx-canvas 0.1.12 → 0.1.13
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 +82 -0
- package/dist/canvas/index.js +34 -34
- package/dist/types/client/nodes/trace-model.d.ts +9 -0
- package/dist/types/client/state/canvas-store.d.ts +2 -0
- package/dist/types/mcp/canvas-access.d.ts +1 -0
- package/dist/types/server/web-artifacts.d.ts +1 -0
- package/package.json +1 -1
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +9 -8
- package/src/client/nodes/TraceNode.tsx +2 -6
- package/src/client/nodes/trace-model.ts +19 -0
- package/src/client/state/canvas-store.ts +5 -2
- package/src/client/state/sse-bridge.ts +2 -1
- package/src/mcp/canvas-access.ts +28 -3
- package/src/mcp/server.ts +30 -8
- package/src/server/canvas-operations.ts +1 -0
- package/src/server/canvas-schema.ts +11 -0
- package/src/server/diagram-presets.ts +6 -28
- package/src/server/server.ts +1 -0
- package/src/server/web-artifacts/scripts/init-artifact.sh +9 -8
- package/src/server/web-artifacts.ts +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,87 @@
|
|
|
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.13] - 2026-05-02
|
|
7
|
+
|
|
8
|
+
Live-collaboration polish on top of 0.1.12. Server-driven SSE updates no
|
|
9
|
+
longer reset the user's viewport, the MCP server hot-promotes itself to
|
|
10
|
+
a daemon-backed access when one shows up later, agent-authored trace
|
|
11
|
+
nodes get first-class schema for the fields the renderer reads,
|
|
12
|
+
`canvas_batch` exposes partial-failure envelopes and bare-step refs,
|
|
13
|
+
`canvas_restore` returns a compact summary, and the web-artifact init
|
|
14
|
+
path stops leaking macOS `sed -i ''` backup files into Linux projects.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **First-class trace node fields in `canvas_describe_schema`.** The
|
|
19
|
+
trace `add` schema now lists `toolName`, `category`, `status`,
|
|
20
|
+
`duration`, `resultSummary`, and `error` as documented optional
|
|
21
|
+
fields, with the same defaults the renderer uses. Trace rendering was
|
|
22
|
+
also extracted to `src/client/nodes/trace-model.ts` so the
|
|
23
|
+
field-fallback contract is unit-testable.
|
|
24
|
+
- **MCP can hot-promote to a daemon.** `refreshCanvasAccess()` is
|
|
25
|
+
exported from the canvas-access module and called on every
|
|
26
|
+
`ensureCanvas()` after the first. If a workspace canvas daemon comes
|
|
27
|
+
online after the MCP server started in local mode, the MCP switches
|
|
28
|
+
to the remote backend without losing its tool registration. Resource
|
|
29
|
+
notifications now track local vs remote subscriptions independently
|
|
30
|
+
so a refresh does not double-subscribe.
|
|
31
|
+
- **Web-artifact build response carries a completion timestamp.**
|
|
32
|
+
`WebArtifactCanvasBuildResult` and the `/api/canvas/web-artifact`
|
|
33
|
+
HTTP response now include `completedAt` (ISO 8601) so agents that
|
|
34
|
+
trigger long builds can correlate their request with the response.
|
|
35
|
+
- **`canvas_build_web_artifact` schema documents `timeoutMs` and cold-
|
|
36
|
+
build behavior.** The schema lists `timeoutMs` as the subprocess
|
|
37
|
+
timeout (distinct from the MCP client request timeout) and adds a
|
|
38
|
+
note that cold builds can exceed the default 60s MCP client timeout.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **Server SSE layout updates no longer clobber the user's pan/zoom.**
|
|
43
|
+
`applyServerCanvasLayout` only re-applies the server viewport when
|
|
44
|
+
the caller explicitly opts in via `{ applyViewport: true }`. The
|
|
45
|
+
`canvas-layout-update` SSE handler now only opts in on the very
|
|
46
|
+
first layout sync; later updates from agent or HTTP mutations leave
|
|
47
|
+
the user's current viewport alone.
|
|
48
|
+
- **`canvas_restore` returns a compact summary instead of the full
|
|
49
|
+
layout.** Restoring a snapshot now responds with `{ok, restored,
|
|
50
|
+
summary: { ... }}` containing node and edge counts, pinned ids, and
|
|
51
|
+
group counts. Use `canvas_get_layout` afterwards if the full layout
|
|
52
|
+
is needed.
|
|
53
|
+
- **`canvas_batch` exposes partial-failure envelopes.** When the batch
|
|
54
|
+
endpoint returns a structured failure body (HTTP non-2xx with an
|
|
55
|
+
object payload), the MCP tool surfaces that body to the caller
|
|
56
|
+
instead of throwing. Bare `$step` references in batch payloads now
|
|
57
|
+
resolve to that step's `id`, matching the ergonomic
|
|
58
|
+
`{from: '$step1', to: '$step2'}` pattern.
|
|
59
|
+
- **Diagram preset keeps Excalidraw text elements as text.** The
|
|
60
|
+
bound-text → container `label` conversion added in 0.1.10 has been
|
|
61
|
+
removed; text elements now stay as text elements while
|
|
62
|
+
`boundElements` references are kept bidirectional, restoring the
|
|
63
|
+
Excalidraw-native shape the MCP app expects.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **`init-artifact.sh` no longer leaks literal `''` backup files on
|
|
68
|
+
Linux.** The script now wraps `sed -i` in a `sed_in_place` function
|
|
69
|
+
that picks the right syntax per OS instead of relying on a
|
|
70
|
+
`$SED_INPLACE` variable that contained a literal empty argument on
|
|
71
|
+
macOS and broke under word-splitting on Linux.
|
|
72
|
+
- **Web-artifact build cleans up pre-existing literal `''` files.**
|
|
73
|
+
Reusable build projects scaffolded by older versions of the init
|
|
74
|
+
script may still carry `index.html''`-style stragglers. The bundle
|
|
75
|
+
step now removes any literal-`''`-suffixed files in the project
|
|
76
|
+
directory before delegating to Parcel.
|
|
77
|
+
|
|
78
|
+
### Internal
|
|
79
|
+
|
|
80
|
+
- Regression coverage for: trace-model field fallbacks, applying server
|
|
81
|
+
layouts without auto-applying viewport plus the explicit
|
|
82
|
+
initial-sync path, MCP local→remote daemon promotion, `canvas_batch`
|
|
83
|
+
bare-ref resolution and partial-failure envelopes, `canvas_restore`
|
|
84
|
+
compact summary shape, Excalidraw bound-text repair without dropping
|
|
85
|
+
text elements, and the `init-artifact.sh` sed-backup cleanup.
|
|
86
|
+
|
|
6
87
|
## [0.1.12] - 2026-05-02
|
|
7
88
|
|
|
8
89
|
MCP/canvas state-sharing pass on top of 0.1.11. The MCP server now
|
|
@@ -363,6 +444,7 @@ otherwise have to discover by trial and error.
|
|
|
363
444
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
364
445
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
365
446
|
|
|
447
|
+
[0.1.13]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.13
|
|
366
448
|
[0.1.12]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.12
|
|
367
449
|
[0.1.11]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.11
|
|
368
450
|
[0.1.10]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.10
|