pmx-canvas 0.1.31 → 0.1.32

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 (38) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/canvas/global.css +18 -3
  3. package/dist/canvas/index.js +57 -57
  4. package/dist/json-render/index.js +97 -97
  5. package/dist/types/client/nodes/surface-url.d.ts +7 -0
  6. package/dist/types/client/state/canvas-store.d.ts +1 -0
  7. package/dist/types/client/state/intent-bridge.d.ts +7 -0
  8. package/dist/types/json-render/renderer/index.d.ts +1 -0
  9. package/dist/types/json-render/server.d.ts +1 -0
  10. package/dist/types/server/ax-context.d.ts +24 -1
  11. package/dist/types/server/html-surface.d.ts +23 -0
  12. package/dist/types/server/index.d.ts +6 -0
  13. package/package.json +1 -1
  14. package/skills/pmx-canvas/SKILL.md +96 -1
  15. package/src/cli/agent.ts +18 -1
  16. package/src/client/App.tsx +3 -3
  17. package/src/client/canvas/CanvasNode.tsx +16 -1
  18. package/src/client/canvas/ExpandedNodeOverlay.tsx +12 -1
  19. package/src/client/nodes/ContextNode.tsx +1 -1
  20. package/src/client/nodes/HtmlNode.tsx +26 -1
  21. package/src/client/nodes/McpAppNode.tsx +35 -8
  22. package/src/client/nodes/StatusNode.tsx +0 -20
  23. package/src/client/nodes/surface-url.ts +12 -0
  24. package/src/client/state/canvas-store.ts +4 -0
  25. package/src/client/state/intent-bridge.ts +19 -0
  26. package/src/client/state/sse-bridge.ts +17 -0
  27. package/src/client/theme/global.css +18 -3
  28. package/src/json-render/renderer/index.tsx +31 -2
  29. package/src/json-render/server.ts +3 -0
  30. package/src/mcp/canvas-access.ts +3 -0
  31. package/src/mcp/server.ts +23 -1
  32. package/src/server/ax-context.ts +49 -1
  33. package/src/server/ax-interaction.ts +3 -0
  34. package/src/server/ax-state.ts +3 -1
  35. package/src/server/canvas-state.ts +6 -1
  36. package/src/server/html-surface.ts +48 -11
  37. package/src/server/index.ts +8 -0
  38. package/src/server/server.ts +62 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,64 @@
3
3
  All notable changes to `pmx-canvas` are documented here. This project follows
4
4
  [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [Unreleased]
7
+
8
+ ## [0.1.32] - 2026-06-07
9
+
10
+ ### Added
11
+
12
+ - **Composable AX surfaces (emit + reflect).** AX-enabled `html`, `json-render`,
13
+ and `web-artifact` nodes can now both EMIT AX interactions and RENDER live AX
14
+ state, so an agent (or human) can build an interactive work board / review board
15
+ / inbox as a canvas node. The canvas seeds each surface with a compact AX
16
+ snapshot and pushes live updates over the existing nonce-validated postMessage
17
+ channel: `html` exposes `window.PMX_AX.state` + a `pmx-ax-update` event;
18
+ `json-render` binds the snapshot under `/ax` (e.g. `{ "$state": "/ax/workItems" }`);
19
+ `web-artifact` gets the same `window.PMX_AX` bridge injected at the `/artifact`
20
+ route. New `GET /api/canvas/ax/surface-snapshot`. See the "Building an AX
21
+ surface" section in the pmx-canvas skill.
22
+ - **AX opt-in via MCP/SDK (report #42).** `canvas_add_html_node` and
23
+ `canvas_update_node` accept an `axCapabilities` parameter ({ enabled, allowed })
24
+ so an agent can turn an html node into an AX surface without hand-crafting raw
25
+ HTTP — the previously-missing opt-in that made the (already-working) AX bridge
26
+ look broken. Clamped to the node-type ceiling server-side; cannot escalate.
27
+ (#42 was not a missing listener — the emit bridge + listeners already existed
28
+ and are e2e-verified.)
29
+ - **Open in system browser.** A node-header / expanded-overlay "Open in system
30
+ browser" action (and `POST /api/canvas/open-external`) opens a node's surface in
31
+ the real OS browser via the existing launcher — for hosts (e.g. Codex) whose
32
+ embedded browser makes a normal new tab feel in-place. Accepts only `{ nodeId }`
33
+ (opens this server's own surface URL — no arbitrary-URL launch), honors
34
+ `PMX_CANVAS_DISABLE_BROWSER_OPEN`, and falls back to a normal new tab.
35
+
36
+ ### Changed
37
+
38
+ - **Responsive top HUD (report #41).** The toolbar + docked status/context pills
39
+ now wrap instead of clipping in narrow embedding panels (e.g. the Copilot side
40
+ panel); low-value text (session id, zoom %, counts) is hidden below ~720px.
41
+
42
+ ### Fixed
43
+
44
+ - **Body-only review annotations succeed (report #39).** `ax.review.add` /
45
+ `canvas_add_review_annotation` with only a `body` (no `anchorType`, no `nodeId`)
46
+ now creates an unanchored note instead of returning 400 — `anchorType` defaults
47
+ to a node anchor only when a usable `nodeId` is present. An explicit bad node
48
+ anchor still rejects.
49
+ - **CLI can undock a node (report #40).** `pmx-canvas node update --dock-position
50
+ left|right|none` docks/undocks a node (`none` → `null`). The previous
51
+ `--data '{"dockPosition":null}'` never worked because `--data` is reserved for
52
+ graph datasets; the CLI had no path mapping it to the top-level field.
53
+
54
+ ### Removed
55
+
56
+ - **Status node "Track as work" button.** Tracking a status signal as a work item
57
+ produced a thin, auto-titled item (often just "idle") with no visible effect on
58
+ the board and no proactive agent reaction — confusing UI for little value. The
59
+ underlying AX work-item primitive (`ax.work.create`) is unchanged and still
60
+ available to agents, the SDK/MCP/HTTP API, and authored AX surfaces
61
+ (json-render/HTML bridges) — the better home for a deliberate, in-canvas
62
+ work-item/steering experience.
63
+
6
64
  ## [0.1.31] - 2026-06-07
7
65
 
8
66
  ### Added
@@ -1632,6 +1690,7 @@ otherwise have to discover by trial and error.
1632
1690
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
1633
1691
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
1634
1692
 
1693
+ [0.1.32]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.32
1635
1694
  [0.1.31]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.31
1636
1695
  [0.1.30]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.30
1637
1696
  [0.1.29]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.29
@@ -457,13 +457,15 @@ body,
457
457
  font-weight: 600;
458
458
  }
459
459
 
460
- /* HUD layer — fixed row: [left-dock] [toolbar] [right-dock] */
460
+ /* HUD layer — [left-dock] [toolbar] [right-dock]. Wraps onto multiple rows in a
461
+ narrow embedding panel (e.g. the Copilot side panel) instead of clipping. */
461
462
  .hud-layer {
462
463
  position: fixed;
463
464
  top: 12px;
464
465
  left: 12px;
465
466
  right: 12px;
466
467
  display: flex;
468
+ flex-wrap: wrap;
467
469
  align-items: flex-start;
468
470
  justify-content: center;
469
471
  gap: 8px;
@@ -476,22 +478,24 @@ body,
476
478
  .hud-left,
477
479
  .hud-right {
478
480
  display: flex;
481
+ flex-wrap: wrap;
479
482
  gap: 8px;
480
483
  }
481
484
 
482
485
  /* Toolbar */
483
486
  .canvas-toolbar {
484
487
  display: flex;
488
+ flex-wrap: wrap;
485
489
  align-items: center;
486
490
  gap: 6px;
487
491
  padding: 6px 10px;
488
492
  min-height: var(--hud-bar-height);
493
+ max-width: 100%;
489
494
  box-sizing: border-box;
490
495
  background: var(--c-panel-glass);
491
496
  backdrop-filter: blur(12px);
492
497
  border: 1px solid var(--c-line);
493
498
  border-radius: var(--radius);
494
- flex-shrink: 0;
495
499
  }
496
500
 
497
501
  .toolbar-tooltip-anchor {
@@ -666,9 +670,11 @@ body,
666
670
 
667
671
  .toolbar-group {
668
672
  display: flex;
673
+ flex-wrap: wrap;
669
674
  align-items: center;
670
675
  gap: 6px;
671
- flex-shrink: 0;
676
+ min-width: 0;
677
+ max-width: 100%;
672
678
  }
673
679
 
674
680
  .canvas-toolbar button svg {
@@ -692,6 +698,15 @@ body,
692
698
  }
693
699
  }
694
700
 
701
+ /* Narrow embedding panels: drop low-value text from the HUD so the icon controls
702
+ fit in fewer rows. Buttons keep their aria-labels + tooltips, so nothing is
703
+ lost for a11y or discovery. */
704
+ @media (max-width: 720px) {
705
+ .hud-collapsible-text {
706
+ display: none;
707
+ }
708
+ }
709
+
695
710
  /* Raw markdown source editor */
696
711
  .md-editor-split {
697
712
  display: flex;