pmx-canvas 0.3.0 → 0.3.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.
Files changed (161) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/canvas/index.js +65 -65
  3. package/dist/types/cli/agent.d.ts +9 -1
  4. package/dist/types/cli/daemon.d.ts +74 -0
  5. package/dist/types/cli/watch.d.ts +2 -2
  6. package/dist/types/client/canvas/CanvasViewport.d.ts +1 -1
  7. package/dist/types/client/canvas/CommandPalette.d.ts +1 -1
  8. package/dist/types/client/canvas/Minimap.d.ts +1 -1
  9. package/dist/types/client/nodes/ExtAppFrame.d.ts +9 -1
  10. package/dist/types/client/nodes/FileNode.d.ts +1 -1
  11. package/dist/types/client/nodes/ImageNode.d.ts +1 -1
  12. package/dist/types/client/nodes/InlineFormatBar.d.ts +1 -1
  13. package/dist/types/client/nodes/MarkdownNode.d.ts +1 -1
  14. package/dist/types/client/nodes/PromptNode.d.ts +1 -1
  15. package/dist/types/client/nodes/ResponseNode.d.ts +1 -1
  16. package/dist/types/server/canvas-schema.d.ts +1 -1
  17. package/dist/types/server/html-primitives.d.ts +1 -1
  18. package/dist/types/server/index.d.ts +4 -4
  19. package/dist/types/server/operations/index.d.ts +1 -1
  20. package/dist/types/server/operations/ops/ax-read.d.ts +2 -0
  21. package/dist/types/server/operations/ops/canvas-wire.d.ts +2 -0
  22. package/dist/types/server/operations/ops/ext-app.d.ts +2 -0
  23. package/dist/types/server/server.d.ts +8 -0
  24. package/docs/cli.md +10 -1
  25. package/docs/http-api.md +28 -0
  26. package/docs/plans/plan-009-tech-debt-backlog.md +5 -5
  27. package/docs/screenshot.png +0 -0
  28. package/docs/tech-debt-assessment-2026-07.md +2 -2
  29. package/package.json +5 -2
  30. package/skills/pmx-canvas/SKILL.md +15 -10
  31. package/skills/pmx-canvas/references/full-reference.md +17 -3
  32. package/src/cli/agent.ts +1951 -1571
  33. package/src/cli/daemon.ts +460 -0
  34. package/src/cli/index.ts +80 -323
  35. package/src/cli/watch.ts +2 -10
  36. package/src/client/App.tsx +48 -46
  37. package/src/client/canvas/AttentionHistory.tsx +11 -1
  38. package/src/client/canvas/CanvasNode.tsx +41 -29
  39. package/src/client/canvas/CanvasViewport.tsx +101 -66
  40. package/src/client/canvas/CommandPalette.tsx +61 -27
  41. package/src/client/canvas/ContextMenu.tsx +13 -20
  42. package/src/client/canvas/ContextPinBar.tsx +1 -5
  43. package/src/client/canvas/ContextPinHud.tsx +1 -6
  44. package/src/client/canvas/DockedNode.tsx +4 -4
  45. package/src/client/canvas/EdgeLayer.tsx +37 -36
  46. package/src/client/canvas/ExpandedNodeOverlay.tsx +69 -45
  47. package/src/client/canvas/FocusFieldLayer.tsx +20 -22
  48. package/src/client/canvas/IntentLayer.tsx +31 -14
  49. package/src/client/canvas/Minimap.tsx +11 -16
  50. package/src/client/canvas/SelectionBar.tsx +4 -11
  51. package/src/client/canvas/ShortcutOverlay.tsx +3 -1
  52. package/src/client/canvas/SnapshotPanel.tsx +77 -95
  53. package/src/client/canvas/auto-fit.ts +15 -14
  54. package/src/client/canvas/snap-guides.ts +12 -12
  55. package/src/client/canvas/use-node-resize.ts +1 -5
  56. package/src/client/canvas/use-pan-zoom.ts +25 -26
  57. package/src/client/ext-app/bridge.ts +3 -12
  58. package/src/client/icons.tsx +63 -20
  59. package/src/client/nodes/ContextNode.tsx +14 -25
  60. package/src/client/nodes/ExtAppFrame.tsx +194 -80
  61. package/src/client/nodes/FileNode.tsx +74 -62
  62. package/src/client/nodes/GroupNode.tsx +4 -6
  63. package/src/client/nodes/HtmlNode.tsx +76 -46
  64. package/src/client/nodes/ImageNode.tsx +18 -27
  65. package/src/client/nodes/InlineFormatBar.tsx +4 -21
  66. package/src/client/nodes/InlineMarkdownEditor.tsx +0 -1
  67. package/src/client/nodes/LedgerNode.tsx +10 -4
  68. package/src/client/nodes/MarkdownNode.tsx +3 -10
  69. package/src/client/nodes/McpAppNode.tsx +26 -22
  70. package/src/client/nodes/MdFormatBar.tsx +10 -7
  71. package/src/client/nodes/PromptNode.tsx +23 -51
  72. package/src/client/nodes/ResponseNode.tsx +3 -13
  73. package/src/client/nodes/StatusNode.tsx +5 -9
  74. package/src/client/nodes/StatusSummary.tsx +2 -8
  75. package/src/client/nodes/WebpageNode.tsx +20 -14
  76. package/src/client/nodes/iframe-document-url.ts +25 -16
  77. package/src/client/nodes/image-warnings.ts +1 -7
  78. package/src/client/nodes/md-format.ts +20 -5
  79. package/src/client/state/attention-bridge.ts +4 -9
  80. package/src/client/state/attention-store.ts +1 -7
  81. package/src/client/state/canvas-store.ts +52 -36
  82. package/src/client/state/intent-bridge.ts +176 -112
  83. package/src/client/state/intent-store.ts +4 -1
  84. package/src/client/state/sse-bridge.ts +53 -70
  85. package/src/json-render/catalog.ts +12 -16
  86. package/src/json-render/charts/components.tsx +16 -20
  87. package/src/json-render/charts/extra-components.tsx +8 -16
  88. package/src/json-render/charts/extra-definitions.ts +1 -2
  89. package/src/json-render/charts/tufte-components.tsx +37 -20
  90. package/src/json-render/charts/tufte-definitions.ts +8 -2
  91. package/src/json-render/renderer/index.tsx +42 -22
  92. package/src/json-render/schema.ts +6 -3
  93. package/src/json-render/server.ts +33 -39
  94. package/src/mcp/canvas-access.ts +35 -21
  95. package/src/mcp/server.ts +132 -70
  96. package/src/server/agent-context.ts +63 -36
  97. package/src/server/ax-context.ts +7 -5
  98. package/src/server/ax-interaction.ts +176 -43
  99. package/src/server/ax-state-manager.ts +182 -39
  100. package/src/server/ax-state.ts +142 -47
  101. package/src/server/canvas-db.ts +213 -95
  102. package/src/server/canvas-operations.ts +180 -123
  103. package/src/server/canvas-provenance.ts +1 -4
  104. package/src/server/canvas-schema.ts +454 -73
  105. package/src/server/canvas-serialization.ts +27 -35
  106. package/src/server/canvas-state.ts +150 -58
  107. package/src/server/chart-template.ts +4 -5
  108. package/src/server/code-graph.ts +19 -6
  109. package/src/server/diagram-presets.ts +28 -29
  110. package/src/server/ext-app-lookup.ts +3 -12
  111. package/src/server/html-node-summary.ts +19 -10
  112. package/src/server/html-primitives.ts +326 -97
  113. package/src/server/html-surface.ts +6 -9
  114. package/src/server/image-source.ts +6 -4
  115. package/src/server/index.ts +320 -217
  116. package/src/server/intent-registry.ts +2 -5
  117. package/src/server/mcp-app-candidate.ts +5 -10
  118. package/src/server/mcp-app-host.ts +14 -38
  119. package/src/server/mcp-app-runtime.ts +12 -20
  120. package/src/server/mutation-history.ts +15 -5
  121. package/src/server/operations/composites.ts +1 -3
  122. package/src/server/operations/http.ts +2 -3
  123. package/src/server/operations/index.ts +7 -1
  124. package/src/server/operations/invoker.ts +4 -3
  125. package/src/server/operations/mcp.ts +22 -30
  126. package/src/server/operations/ops/annotation.ts +122 -10
  127. package/src/server/operations/ops/app.ts +98 -73
  128. package/src/server/operations/ops/ax-await.ts +17 -10
  129. package/src/server/operations/ops/ax-read.ts +347 -0
  130. package/src/server/operations/ops/ax-shared.ts +2 -7
  131. package/src/server/operations/ops/ax-state.ts +32 -14
  132. package/src/server/operations/ops/ax-timeline.ts +32 -19
  133. package/src/server/operations/ops/ax-work.ts +54 -37
  134. package/src/server/operations/ops/batch.ts +41 -15
  135. package/src/server/operations/ops/canvas-wire.ts +91 -0
  136. package/src/server/operations/ops/edges.ts +37 -25
  137. package/src/server/operations/ops/ext-app.ts +346 -0
  138. package/src/server/operations/ops/groups.ts +49 -20
  139. package/src/server/operations/ops/intent.ts +18 -12
  140. package/src/server/operations/ops/json-render.ts +239 -98
  141. package/src/server/operations/ops/nodes.ts +298 -109
  142. package/src/server/operations/ops/query.ts +46 -28
  143. package/src/server/operations/ops/snapshots.ts +35 -26
  144. package/src/server/operations/ops/validate.ts +2 -1
  145. package/src/server/operations/ops/viewport.ts +60 -16
  146. package/src/server/operations/ops/webview.ts +44 -18
  147. package/src/server/operations/registry.ts +2 -3
  148. package/src/server/operations/types.ts +7 -5
  149. package/src/server/operations/webview-runner.ts +1 -3
  150. package/src/server/placement.ts +8 -18
  151. package/src/server/server.ts +122 -1028
  152. package/src/server/spatial-analysis.ts +39 -25
  153. package/src/server/trace-manager.ts +3 -8
  154. package/src/server/web-artifacts.ts +23 -27
  155. package/src/server/webpage-node.ts +5 -13
  156. package/src/shared/auto-arrange.ts +12 -5
  157. package/src/shared/content-height-reporter.ts +8 -6
  158. package/src/shared/ext-app-tool-result.ts +2 -6
  159. package/src/shared/placement.ts +1 -4
  160. package/src/shared/semantic-attention.ts +39 -37
  161. package/src/shared/surface.ts +8 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,77 @@
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.3.2] - 2026-07-08
7
+
8
+ ### Added
9
+
10
+ - `canvas_batch` supports `edge.remove` (0.3.1 test-report Finding M) — edge
11
+ cleanup no longer needs a separate `canvas_edge` call.
12
+ - Global `--port <n>` and `--server-url <url>` CLI flags target a specific
13
+ daemon for one invocation (they override `PMX_CANVAS_PORT` /
14
+ `PMX_CANVAS_URL`). Previously `--port` was silently ignored and the command
15
+ hit the default port; an invalid value is now a hard error.
16
+ - CI runs the typecheck and unit suite on Windows and macOS on every push and
17
+ pull request, so platform-specific breakage (like the Windows static-asset
18
+ bug) is caught before release.
19
+
20
+ ### Fixed
21
+
22
+ - **Windows: the canvas SPA now boots.** Bundle assets (`/canvas/index.js`,
23
+ `/canvas/global.css`) were rejected by a path check that compared Windows
24
+ backslash paths against a forward-slash template, so every asset returned 404
25
+ and the browser showed "PMX Canvas did not finish booting".
26
+ - Excalidraw/ext-app tiles that went black on canvas reload in WebKit host
27
+ panels (e.g. the GitHub Copilot app) now auto-recover: present-at-load apps
28
+ are remounted through a serialized, boot-aware queue with a watchdog retry,
29
+ instead of a single fixed-delay repaint that re-collided on multi-app boards.
30
+ Rare stragglers still recover via expand-then-close.
31
+ - File and image node titles on Windows now use the file name instead of the
32
+ full backslash path.
33
+
34
+ ### Docs
35
+
36
+ - The pmx-canvas skill documents the batch op support list, the
37
+ WebView-before-screenshot requirement, the `query` (not `q`) search
38
+ parameter, and the intent TTL + linked-settle pattern for agent turns.
39
+
40
+ ## [0.3.1] - 2026-07-07
41
+
42
+ ### Fixed
43
+
44
+ - Documented the Ghost Cursor intent HTTP endpoints in `docs/http-api.md`: the
45
+ operation is chosen by method and path (POST signals, PATCH updates, DELETE
46
+ clears/settles/vetoes) — there is no `action` field over raw HTTP; that
47
+ discriminator exists only on the MCP `canvas_intent` composite.
48
+ - `DELETE /api/canvas/ax/intent/:id?vetoed=true` now works: the query-string
49
+ form of `vetoed` is coerced to a boolean (literal `true`/`false` only; other
50
+ values are still rejected with 400).
51
+ - `serve --daemon` lifecycle is now race- and orphan-free: the pid file is
52
+ created as a lock before the child spawns and records the pid immediately,
53
+ a failed startup kills the child instead of leaving it orphaned, and a
54
+ liveness check guards against recycled pids.
55
+ - `serve --daemon` no longer reports "already running" when the port is held
56
+ by a daemon for a different workspace (or another application) — it refuses
57
+ with the owner's workspace named and a hint to pick another port.
58
+ - `serve status` no longer deletes a concurrent `serve --daemon`'s in-progress
59
+ spawn lock, closing a race that could otherwise let two daemons start on the
60
+ same port.
61
+
62
+ ### Changed
63
+
64
+ - The `/api/ext-app/*` endpoints are now served by the operation registry;
65
+ request and response wire shapes are unchanged.
66
+ - The AX read endpoints (`ax/work`, `ax/approval`, `ax/review`,
67
+ `ax/elicitation`, `ax/mode`, `ax/command`, `ax/policy`,
68
+ `ax/host-capability`, `ax/context`, `ax/surface-snapshot`),
69
+ `pinned-context`, `code-graph`, `ax/activity`, `ax/interaction`, and
70
+ `PATCH /api/canvas/ax` are likewise registry-served with unchanged wire
71
+ shapes.
72
+ - The theme, update, viewport, annotation, and webpage-refresh endpoints are
73
+ also registry-served now; wire shapes unchanged. One edge-case difference:
74
+ a malformed JSON body on the refresh endpoint returns 400 before the
75
+ missing-node 404 check (previously the 404 won).
76
+
6
77
  ## [0.3.0] - 2026-07-07
7
78
 
8
79
  ### Breaking
@@ -2641,6 +2712,8 @@ otherwise have to discover by trial and error.
2641
2712
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
2642
2713
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
2643
2714
 
2715
+ [0.3.2]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.3.2
2716
+ [0.3.1]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.3.1
2644
2717
  [0.3.0]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.3.0
2645
2718
  [0.2.7]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.2.7
2646
2719
  [0.2.6]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.2.6