pmx-canvas 0.1.13 → 0.1.14
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 +69 -0
- package/dist/canvas/index.js +34 -34
- package/dist/types/client/nodes/ExtAppFrame.d.ts +2 -3
- package/dist/types/client/nodes/McpAppNode.d.ts +2 -1
- package/dist/types/server/canvas-operations.d.ts +8 -0
- package/dist/types/server/diagram-presets.d.ts +4 -0
- package/dist/types/server/index.d.ts +8 -0
- package/dist/types/server/mcp-app-runtime.d.ts +1 -0
- package/package.json +1 -1
- package/src/cli/agent.ts +15 -1
- package/src/client/canvas/ExpandedNodeOverlay.tsx +3 -3
- package/src/client/nodes/ExtAppFrame.tsx +10 -35
- package/src/client/nodes/McpAppNode.tsx +2 -2
- package/src/client/state/sse-bridge.ts +1 -0
- package/src/mcp/server.ts +21 -1
- package/src/server/canvas-operations.ts +35 -0
- package/src/server/diagram-presets.ts +45 -25
- package/src/server/index.ts +31 -4
- package/src/server/mcp-app-runtime.ts +15 -5
- package/src/server/server.ts +95 -50
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,74 @@
|
|
|
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.14] - 2026-05-02
|
|
7
|
+
|
|
8
|
+
External-MCP-app and trace-node ergonomics on top of 0.1.13. Trace node
|
|
9
|
+
fields land as top-level inputs across CLI / HTTP / MCP / SDK,
|
|
10
|
+
`canvas_open_mcp_app` and `canvas_add_diagram` gain `nodeId` for
|
|
11
|
+
update-in-place plus `timeoutMs` for cold external servers, expanded
|
|
12
|
+
mcp-app frames receive the matching host context, and ext-app result
|
|
13
|
+
streaming no longer pollutes undo/redo history.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Trace node fields on the add/update surfaces.** `pmx-canvas node add
|
|
18
|
+
--type trace` now accepts `--toolName`, `--category`, `--status`,
|
|
19
|
+
`--duration`, `--resultSummary`, and `--error` flags. The same fields
|
|
20
|
+
are accepted top-level on `POST /api/canvas/node`, `PATCH
|
|
21
|
+
/api/canvas/node/<id>`, MCP `canvas_add_node`, and SDK
|
|
22
|
+
`PmxCanvas.addNode()`/`updateNode()`. Updates merge per-field through
|
|
23
|
+
`mergeTraceNodeDataFields` so partial patches keep the rest intact.
|
|
24
|
+
- **`canvas_open_mcp_app` and `canvas_add_diagram` accept `nodeId` for
|
|
25
|
+
update-in-place.** Passing an existing `mcp-app` ext-app node id
|
|
26
|
+
closes the previous session and reuses the node id, title, and
|
|
27
|
+
geometry instead of creating a new node. Available on MCP, HTTP
|
|
28
|
+
`POST /api/canvas/mcp-app` and `POST /api/canvas/diagram`, and CLI
|
|
29
|
+
`external-app add --node-id` (also `--nodeId` / `--id`).
|
|
30
|
+
- **`canvas_open_mcp_app` and `canvas_add_diagram` accept `timeoutMs`.**
|
|
31
|
+
The value is forwarded to the external MCP client's `connect()` and
|
|
32
|
+
`listTools()` calls so cold external app servers don't fail under
|
|
33
|
+
the default request timeout. CLI `external-app add` exposes the
|
|
34
|
+
same flag as `--timeout-ms`. The MCP error message for a
|
|
35
|
+
client-cancelled `canvas_add_diagram` now points users at this
|
|
36
|
+
knob.
|
|
37
|
+
- **`pmx-canvas external-app add --elements` alias.** `--elements`
|
|
38
|
+
is now accepted as an alias for `--elements-json`.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **Excalidraw bound text is folded into container labels.** When a
|
|
43
|
+
text element references a container (`containerId`) that supports a
|
|
44
|
+
native label — `rectangle`, `ellipse`, or `diamond` — the diagram
|
|
45
|
+
preset now hoists the text into the container's `label` field
|
|
46
|
+
instead of leaving a separate text element behind. This restores
|
|
47
|
+
the native Excalidraw shape so the hosted app renders the label as
|
|
48
|
+
expected. Other container shapes still keep bidirectional
|
|
49
|
+
`boundElements` references.
|
|
50
|
+
- **Expanded mcp-app frames receive `fullscreen` host context.**
|
|
51
|
+
`ExpandedNodeOverlay` now passes `expanded={true}` to `McpAppNode`
|
|
52
|
+
for `mcp-app`, `json-render`, and `graph` nodes; `ExtAppFrame`
|
|
53
|
+
forwards it to the bridge as a `host-context-change` so external
|
|
54
|
+
apps know when they're rendered fullscreen versus inline.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- **Ext-app runtime result streaming no longer pollutes undo/redo.**
|
|
59
|
+
Streaming HTML updates and result-handling for hosted external apps
|
|
60
|
+
now run through `canvasState.withSuppressedRecording()` so undo no
|
|
61
|
+
longer needs to walk through every intermediate ext-app html
|
|
62
|
+
patch. Opening an ext-app remains a user-visible history step.
|
|
63
|
+
|
|
64
|
+
### Internal
|
|
65
|
+
|
|
66
|
+
- Regression coverage for: trace fields landing on add and patch
|
|
67
|
+
through CLI / HTTP / MCP, Excalidraw bound-text → container label
|
|
68
|
+
hoisting (including centered container text), `external-app add`
|
|
69
|
+
accepting the `--elements` alias and an existing node target,
|
|
70
|
+
`canvas_add_diagram` updating an existing Excalidraw node in
|
|
71
|
+
place, and ext-app result streaming preserving redo history after
|
|
72
|
+
an undo.
|
|
73
|
+
|
|
6
74
|
## [0.1.13] - 2026-05-02
|
|
7
75
|
|
|
8
76
|
Live-collaboration polish on top of 0.1.12. Server-driven SSE updates no
|
|
@@ -444,6 +512,7 @@ otherwise have to discover by trial and error.
|
|
|
444
512
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
445
513
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
446
514
|
|
|
515
|
+
[0.1.14]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.14
|
|
447
516
|
[0.1.13]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.13
|
|
448
517
|
[0.1.12]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.12
|
|
449
518
|
[0.1.11]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.11
|