pmx-canvas 0.4.3 → 0.4.5

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 (62) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/Readme.md +40 -8
  3. package/dist/canvas/global.css +91 -0
  4. package/dist/canvas/index.js +53 -53
  5. package/dist/canvas/surface-theme.css +32 -0
  6. package/dist/types/cli/agent.d.ts +1 -0
  7. package/dist/types/cli/commands/skills.d.ts +41 -0
  8. package/dist/types/client/state/intent-store.d.ts +6 -0
  9. package/dist/types/client/state/sse-bridge.d.ts +1 -0
  10. package/dist/types/server/ax-state-manager.d.ts +5 -0
  11. package/dist/types/server/ax-state.d.ts +9 -3
  12. package/dist/types/server/canvas-db.d.ts +3 -2
  13. package/dist/types/server/canvas-state.d.ts +12 -0
  14. package/dist/types/server/operations/ops/ax-shared.d.ts +4 -1
  15. package/dist/types/server/operations/registry.d.ts +9 -1
  16. package/dist/types/shared/ax-intent.d.ts +6 -0
  17. package/dist/types/shared/themes.d.ts +1 -1
  18. package/docs/RELEASE.md +14 -6
  19. package/docs/bun-webview-integration.md +2 -2
  20. package/docs/cli.md +24 -1
  21. package/docs/environment.md +3 -2
  22. package/docs/http-api.md +6 -3
  23. package/docs/plans/plan-009-tech-debt-backlog.md +4 -3
  24. package/docs/screenshot.png +0 -0
  25. package/docs/screenshots/amp-orb-portal.png +0 -0
  26. package/docs/screenshots/claude-code-desktop.png +0 -0
  27. package/docs/screenshots/codex-app.png +0 -0
  28. package/docs/screenshots/github-copilot-app.png +0 -0
  29. package/package.json +1 -1
  30. package/skills/pmx-canvas/SKILL.md +25 -5
  31. package/skills/pmx-canvas/references/full-reference.md +1 -1
  32. package/skills/pmx-canvas-orchestration/SKILL.md +82 -0
  33. package/skills/pmx-canvas-testing/SKILL.md +4 -0
  34. package/src/cli/agent.ts +1 -0
  35. package/src/cli/commands/skills.ts +183 -0
  36. package/src/cli/index.ts +17 -3
  37. package/src/cli/shared.ts +1 -0
  38. package/src/client/canvas/CanvasNode.tsx +12 -1
  39. package/src/client/canvas/IntentLayer.tsx +8 -6
  40. package/src/client/state/intent-bridge.ts +12 -3
  41. package/src/client/state/intent-store.ts +47 -2
  42. package/src/client/state/sse-bridge.ts +14 -3
  43. package/src/client/theme/global.css +91 -0
  44. package/src/client/theme/surface-theme.css +32 -0
  45. package/src/mcp/server.ts +3 -5
  46. package/src/server/ax-state-manager.ts +27 -6
  47. package/src/server/ax-state.ts +36 -3
  48. package/src/server/canvas-db.ts +83 -60
  49. package/src/server/canvas-state.ts +52 -6
  50. package/src/server/intent-registry.ts +2 -0
  51. package/src/server/operations/http.ts +5 -1
  52. package/src/server/operations/ops/ax-shared.ts +20 -1
  53. package/src/server/operations/ops/ax-state.ts +4 -7
  54. package/src/server/operations/ops/ax-timeline.ts +26 -3
  55. package/src/server/operations/ops/ax-work.ts +27 -1
  56. package/src/server/operations/ops/batch.ts +3 -1
  57. package/src/server/operations/ops/canvas-wire.ts +1 -1
  58. package/src/server/operations/ops/nodes.ts +15 -1
  59. package/src/server/operations/registry.ts +122 -1
  60. package/src/server/server.ts +23 -4
  61. package/src/shared/ax-intent.ts +6 -0
  62. package/src/shared/themes.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,83 @@
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.4.5] - 2026-08-07
7
+
8
+ ### Added
9
+
10
+ - A third bundled skill, `pmx-canvas-orchestration`: the choreography for
11
+ multi-agent orchestration ON a canvas board — the agent host executes, the
12
+ canvas is the shared graph, state, human-steering surface, and audit trail.
13
+ It ships in the package's `skills/`; `pmx-canvas skills sync --yes` refreshes
14
+ installed copies of it like the others (sync never creates a copy — install
15
+ one the way your agent layout expects first).
16
+ - Per-agent identity for orchestration: work items, timeline events, and
17
+ steering messages accept an optional `agentId` (who within the host), on
18
+ top of the coarse `source` host label.
19
+ - Addressed steering: a steer can carry a `target` agent id — a consumer
20
+ claiming deliveries only sees steers addressed to it or broadcast steers.
21
+ - Work-item status now mirrors onto linked canvas nodes automatically (an
22
+ `axWorkStatus` chip on the node), so the board reflects step state without
23
+ double-writing.
24
+ - Running as an Amp orb service now binds the portal-assigned `$PORT`
25
+ automatically, so the service command is just `pmx-canvas --no-open` — no
26
+ port flags or `$PORT` interpolation. Honored only when `AMP_ORB` is set, so
27
+ a stray `PORT` in normal shells never changes the default. The README now
28
+ carries the full zero-config orb recipe (setup + services.yaml).
29
+ - Auto-ghost: agent mutations that arrive without an explicit `canvas_intent`
30
+ signal now synthesize a short ghost that settles the moment the mutation
31
+ lands, so agent activity is visible even when the caller doesn't signal.
32
+ Auto-ghosts render lighter (dimmer, dotted, no veto) than a deliberate
33
+ signal; human actions in the browser and `canvas_batch` churn never ghost.
34
+ Disable with `PMX_CANVAS_AUTO_INTENT=0`.
35
+ - Ghost minimum dwell: a ghost now stays visible for a perceptible floor
36
+ (~0.65s) even when its mutation settles within milliseconds.
37
+ - The `amp` AX source label, for Amp host adapters and steering loop
38
+ prevention.
39
+
40
+ ### Changed
41
+
42
+ - The `volt` theme's accent was retuned from coral to the Amp app's cream
43
+ (`#DFDFC1`).
44
+ - Marking an AX delivery is now compare-and-set: `delivered:true` only on the
45
+ actual undelivered→delivered transition, so racing adapters can detect lost
46
+ claims.
47
+ - The WebView-automation unavailable error now names the running Bun version
48
+ and clarifies that the canvas itself keeps working — only automation and
49
+ screenshots need Bun >= 1.3.12.
50
+
51
+ ### Fixed
52
+
53
+ - File nodes are no longer created as content-less slivers: they get a real
54
+ code-preview default size, and untitled file nodes show their filename in
55
+ the title bar instead of a bare "FILE" chip.
56
+
57
+ ## [0.4.4] - 2026-08-06
58
+
59
+ ### Fixed
60
+
61
+ - Amp orb pages now default straight to the polling transport instead of
62
+ waiting out the 3-second SSE watchdog behind the portal's buffering proxy —
63
+ on slow proxy days that wait could trip the "did not finish booting" modal.
64
+ `?transport=sse` still overrides for diagnosis.
65
+ - When the SSE watchdog does fall back to polling mid-boot (non-orb buffering
66
+ proxies), the boot screen now shows "switching to polling" and restarts its
67
+ deadline instead of alarming while the fallback is already recovering.
68
+
69
+ ### Added
70
+
71
+ - A ninth theme, `volt` — built from the Amp app's real palette (green-tinted
72
+ charcoal neutrals, warm green-white text, coral accent). `ember` stays
73
+ unchanged.
74
+ - `pmx-canvas skills sync --yes` refreshes the pmx-canvas skill copies already
75
+ installed in the workspace — whatever agent layout owns them — by comparing
76
+ and replacing whole trees from the installed package; `--check` (or running
77
+ without `--yes`) reports drift and exits 1 without changing anything. A
78
+ directory whose `SKILL.md` identity doesn't match the bundled skill is
79
+ skipped, never replaced, and it never creates a copy where none is
80
+ installed. This automates the sync every release test cycle previously did
81
+ by hand.
82
+
6
83
  ## [0.4.3] - 2026-08-05
7
84
 
8
85
  ### Added
@@ -2912,6 +2989,8 @@ otherwise have to discover by trial and error.
2912
2989
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
2913
2990
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
2914
2991
 
2992
+ [0.4.5]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.5
2993
+ [0.4.4]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.4
2915
2994
  [0.4.3]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.3
2916
2995
  [0.4.2]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.2
2917
2996
  [0.4.1]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.1
package/Readme.md CHANGED
@@ -128,6 +128,16 @@ surfaces (the core never imports a host SDK).
128
128
  </p>
129
129
  <p align="center"><sub>The live PMX workbench in the Codex in-app Browser.</sub></p>
130
130
 
131
+ <p align="center">
132
+ <img src="docs/screenshots/claude-code-desktop.png" alt="PMX Canvas in the Claude Code desktop app's built-in browser pane, driven over MCP" width="100%" />
133
+ </p>
134
+ <p align="center"><sub>Claude Code desktop: the workbench in the built-in browser pane, mutated live over MCP.</sub></p>
135
+
136
+ <p align="center">
137
+ <img src="docs/screenshots/amp-orb-portal.png" alt="PMX Canvas running as an Amp orb service, viewed through the Amp portal in the Volt theme" width="100%" />
138
+ </p>
139
+ <p align="center"><sub>AMPCode: the canvas as an orb service through the Amp portal (Volt theme).</sub></p>
140
+
131
141
  - **GitHub Copilot app** — a committed project canvas extension
132
142
  (`.github/extensions/pmx-canvas/`) opens the live PMX workbench in a native
133
143
  Copilot panel (light-themed by default to match the app, via the `?theme=`
@@ -151,13 +161,13 @@ surfaces (the core never imports a host SDK).
151
161
  live workbench through the Amp portal (the `*.onamp.dev` URL ampcode.com
152
162
  embeds for the thread). Zero configuration: orbs set `AMP_ORB` in the
153
163
  service environment, and the canvas auto-adapts to the portal's constraints
154
- — it switches to a polling transport when the portal proxy buffers the live
155
- event stream, and renders HTML, graph, json-render, and app surfaces inline
156
- via `srcdoc` because the nested-iframe embed blocks `src`-URL child iframes
157
- (`/workbench?transport=poll` and `?iframe-mode=srcdoc` force either behavior
158
- when diagnosing). The same detection helps other buffering proxies and
159
- nested-iframe embeds.
160
- <!-- screenshot: docs/screenshots/amp-orb-portal.png — PMX Canvas live inside the Amp portal (to be added) -->
164
+ — it defaults straight to the proxy-safe polling transport (the portal
165
+ proxy buffers the live event stream), and renders HTML, graph, json-render,
166
+ and app surfaces inline via `srcdoc` because the nested-iframe embed blocks
167
+ `src`-URL child iframes (`?transport=sse` and `?iframe-mode=src` override
168
+ either behavior when diagnosing). Non-orb buffering proxies get the same
169
+ protections via runtime detection: an SSE watchdog that falls back to
170
+ polling, and the boot-time iframe probe.
161
171
 
162
172
  Any other app browser (the ChatGPT desktop app, an IDE webview, …) works the
163
173
  same zero-adapter way: open the workbench URL, and add `?theme=<name|auto>` to
@@ -252,7 +262,29 @@ the full workflow and live-test checklist.
252
262
 
253
263
  Amp needs no adapter either. Run `pmx-canvas` as an orb service (the orb sets
254
264
  `AMP_ORB` in the environment automatically) and open the workbench through the
255
- thread's portal URL. The canvas detects the orb and the portal's nested-iframe
265
+ thread's portal URL. The zero-config recipe for the repo the orb runs in:
266
+
267
+ ```yaml
268
+ # .amp/services.yaml — supervised portal service
269
+ services:
270
+ pmx-canvas:
271
+ command: pmx-canvas --no-open
272
+ portal: true
273
+ health: /health
274
+ ```
275
+
276
+ ```bash
277
+ # .agents/setup — install the CLI (pin the version for reproducible starts)
278
+ npm install -g pmx-canvas@latest
279
+ ```
280
+
281
+ The server binds the portal-assigned `$PORT` automatically (gated on the
282
+ `AMP_ORB` env the orb always sets, so a stray `PORT` elsewhere never changes
283
+ the default), restores `.pmx-canvas/canvas.db`, and the portal manifest picks
284
+ it up — no port flags or `$PORT` interpolation in the service command. One
285
+ caveat: WebView automation (`pmx-canvas screenshot`) needs Bun >= 1.3.12 in
286
+ the orb image; the canvas itself runs fine without it and says so in the
287
+ error. The canvas detects the orb and the portal's nested-iframe
256
288
  embed on its own: live updates arrive over the proxy-safe polling transport,
257
289
  and iframe-backed nodes (HTML, graph, json-render, web artifacts) render
258
290
  inline via `srcdoc` with their theme styling included. Cross-origin hosted
@@ -446,6 +446,61 @@
446
446
  --c-annotation: #EDF5EF;
447
447
  }
448
448
 
449
+ :root[data-theme="volt"] {
450
+ /* ── Core palette (volt · green-tinted charcoal + coral) ── */
451
+ --c-bg: #0B0D0B;
452
+ --c-panel: #171A17;
453
+ --c-panel-soft: #111311;
454
+ --c-line: #272A27;
455
+ --c-text: #F6FFF5;
456
+ --c-text-soft: #CBD3CA;
457
+ --c-muted: #9CA49C;
458
+ --c-dim: #626962;
459
+ --c-accent: #DFDFC1;
460
+ --c-ok: #52C880;
461
+ --c-warn: #E4C465;
462
+ --c-warn-alt: #FFB300;
463
+ --c-danger: #D67670;
464
+ --c-purple: #BC8FB4;
465
+ --c-thinking: #BC8FB4;
466
+ --c-subagent: #6CA0E0;
467
+ --c-input-bg: #111311;
468
+ --c-dot-grid: rgba(223, 223, 193, 0.08);
469
+ --c-panel-overlay: rgba(11, 13, 11, 0.6);
470
+ --c-panel-glass: rgba(23, 26, 23, 0.92);
471
+ --c-shadow: rgba(0, 0, 0, 0.3);
472
+ --c-shadow-heavy: rgba(0, 0, 0, 0.5);
473
+ --c-glow-accent: rgba(223, 223, 193, 0.15);
474
+ --c-surface-hover: rgba(255, 255, 255, 0.06);
475
+ --c-surface-subtle: rgba(255, 255, 255, 0.03);
476
+ --c-surface-th: rgba(255, 255, 255, 0.04);
477
+ --c-accent-8: rgba(223, 223, 193, 0.08);
478
+ --c-accent-10: rgba(223, 223, 193, 0.1);
479
+ --c-accent-12: rgba(223, 223, 193, 0.12);
480
+ --c-accent-15: rgba(223, 223, 193, 0.15);
481
+ --c-accent-25: rgba(223, 223, 193, 0.25);
482
+ --c-accent-30: rgba(223, 223, 193, 0.3);
483
+ --c-accent-40: rgba(223, 223, 193, 0.4);
484
+ --c-ok-10: rgba(82, 200, 128, 0.1);
485
+ --c-ok-12: rgba(82, 200, 128, 0.12);
486
+ --c-ok-20: rgba(82, 200, 128, 0.2);
487
+ --c-ok-25: rgba(82, 200, 128, 0.25);
488
+ --c-warn-10: rgba(228, 196, 101, 0.1);
489
+ --c-warn-12: rgba(228, 196, 101, 0.12);
490
+ --c-warn-15: rgba(228, 196, 101, 0.15);
491
+ --c-warn-20: rgba(228, 196, 101, 0.2);
492
+ --c-warn-22: rgba(228, 196, 101, 0.22);
493
+ --c-warn-30: rgba(228, 196, 101, 0.3);
494
+ --c-warn-60: rgba(228, 196, 101, 0.6);
495
+ --c-danger-12: rgba(214, 118, 112, 0.12);
496
+ --c-line-30: rgba(39, 42, 39, 0.3);
497
+ --c-contrast-fg: #0B0D0B;
498
+ --c-accent-hover: #EDEDDB;
499
+ --c-warn-hover: #EBD087;
500
+ --c-canvas-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
501
+ --c-annotation: #F1F7F0;
502
+ }
503
+
449
504
  * {
450
505
  box-sizing: border-box;
451
506
  margin: 0;
@@ -614,6 +669,29 @@ body,
614
669
  flex-shrink: 0;
615
670
  }
616
671
 
672
+ .canvas-node .node-ax-status {
673
+ font-size: calc(9px * var(--node-chrome-scale, 1));
674
+ padding: calc(1px * var(--node-chrome-scale, 1)) calc(6px * var(--node-chrome-scale, 1));
675
+ border-radius: calc(4px * var(--node-chrome-scale, 1));
676
+ background: var(--c-panel-overlay);
677
+ color: var(--c-muted);
678
+ text-transform: uppercase;
679
+ letter-spacing: 0.04em;
680
+ flex-shrink: 0;
681
+ }
682
+
683
+ .canvas-node .node-ax-status-in-progress {
684
+ color: var(--c-accent);
685
+ }
686
+
687
+ .canvas-node .node-ax-status-done {
688
+ color: var(--c-ok);
689
+ }
690
+
691
+ .canvas-node .node-ax-status-blocked {
692
+ color: var(--c-warn);
693
+ }
694
+
617
695
  .canvas-node .node-controls {
618
696
  display: flex;
619
697
  align-items: center;
@@ -3900,6 +3978,19 @@ button.welcome-hint:hover {
3900
3978
  display: contents;
3901
3979
  }
3902
3980
 
3981
+ /* Auto-ghosts (server-synthesized for unlinked agent mutations) read lighter
3982
+ than a deliberate canvas_intent signal: desaturated, dotted, no veto —
3983
+ the opacity drop lives in ghostOpacity() (inline style). */
3984
+ .intent-ghost.is-auto {
3985
+ filter: saturate(0.7);
3986
+ border-style: dotted;
3987
+ }
3988
+
3989
+ .intent-ghost.is-auto .intent-ghost-titlebar,
3990
+ .intent-ghost.is-auto .intent-chip {
3991
+ border-style: dotted;
3992
+ }
3993
+
3903
3994
  .intent-ghost {
3904
3995
  position: absolute;
3905
3996
  pointer-events: none;