pmx-canvas 0.4.4 → 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 (48) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/Readme.md +33 -2
  3. package/dist/canvas/global.css +47 -11
  4. package/dist/canvas/index.js +53 -53
  5. package/dist/canvas/surface-theme.css +2 -2
  6. package/dist/types/cli/commands/skills.d.ts +1 -1
  7. package/dist/types/client/state/intent-store.d.ts +6 -0
  8. package/dist/types/server/ax-state-manager.d.ts +5 -0
  9. package/dist/types/server/ax-state.d.ts +9 -3
  10. package/dist/types/server/canvas-db.d.ts +3 -2
  11. package/dist/types/server/canvas-state.d.ts +12 -0
  12. package/dist/types/server/operations/ops/ax-shared.d.ts +4 -1
  13. package/dist/types/server/operations/registry.d.ts +9 -1
  14. package/dist/types/shared/ax-intent.d.ts +6 -0
  15. package/docs/environment.md +1 -0
  16. package/docs/screenshot.png +0 -0
  17. package/docs/screenshots/amp-orb-portal.png +0 -0
  18. package/docs/screenshots/claude-code-desktop.png +0 -0
  19. package/docs/screenshots/codex-app.png +0 -0
  20. package/docs/screenshots/github-copilot-app.png +0 -0
  21. package/package.json +1 -1
  22. package/skills/pmx-canvas/SKILL.md +15 -5
  23. package/skills/pmx-canvas-orchestration/SKILL.md +82 -0
  24. package/src/cli/commands/skills.ts +1 -1
  25. package/src/cli/index.ts +14 -2
  26. package/src/client/canvas/CanvasNode.tsx +12 -1
  27. package/src/client/canvas/IntentLayer.tsx +8 -6
  28. package/src/client/state/intent-bridge.ts +12 -3
  29. package/src/client/state/intent-store.ts +47 -2
  30. package/src/client/theme/global.css +47 -11
  31. package/src/client/theme/surface-theme.css +2 -2
  32. package/src/mcp/server.ts +3 -5
  33. package/src/server/ax-state-manager.ts +27 -6
  34. package/src/server/ax-state.ts +36 -3
  35. package/src/server/canvas-db.ts +83 -60
  36. package/src/server/canvas-state.ts +52 -6
  37. package/src/server/intent-registry.ts +2 -0
  38. package/src/server/operations/http.ts +5 -1
  39. package/src/server/operations/ops/ax-shared.ts +20 -1
  40. package/src/server/operations/ops/ax-state.ts +4 -7
  41. package/src/server/operations/ops/ax-timeline.ts +26 -3
  42. package/src/server/operations/ops/ax-work.ts +27 -1
  43. package/src/server/operations/ops/batch.ts +3 -1
  44. package/src/server/operations/ops/nodes.ts +15 -1
  45. package/src/server/operations/registry.ts +122 -1
  46. package/src/server/server.ts +10 -2
  47. package/src/shared/ax-intent.ts +6 -0
  48. package/src/shared/themes.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,57 @@
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
+
6
57
  ## [0.4.4] - 2026-08-06
7
58
 
8
59
  ### Fixed
@@ -2938,6 +2989,7 @@ otherwise have to discover by trial and error.
2938
2989
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
2939
2990
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
2940
2991
 
2992
+ [0.4.5]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.5
2941
2993
  [0.4.4]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.4
2942
2994
  [0.4.3]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.3
2943
2995
  [0.4.2]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.4.2
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=`
@@ -158,7 +168,6 @@ surfaces (the core never imports a host SDK).
158
168
  either behavior when diagnosing). Non-orb buffering proxies get the same
159
169
  protections via runtime detection: an SSE watchdog that falls back to
160
170
  polling, and the boot-time iframe probe.
161
- <!-- screenshot: docs/screenshots/amp-orb-portal.png — PMX Canvas live inside the Amp portal (to be added) -->
162
171
 
163
172
  Any other app browser (the ChatGPT desktop app, an IDE webview, …) works the
164
173
  same zero-adapter way: open the workbench URL, and add `?theme=<name|auto>` to
@@ -253,7 +262,29 @@ the full workflow and live-test checklist.
253
262
 
254
263
  Amp needs no adapter either. Run `pmx-canvas` as an orb service (the orb sets
255
264
  `AMP_ORB` in the environment automatically) and open the workbench through the
256
- 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
257
288
  embed on its own: live updates arrive over the proxy-safe polling transport,
258
289
  and iframe-backed nodes (HTML, graph, json-render, web artifacts) render
259
290
  inline via `srcdoc` with their theme styling included. Cross-origin hosted
@@ -456,7 +456,7 @@
456
456
  --c-text-soft: #CBD3CA;
457
457
  --c-muted: #9CA49C;
458
458
  --c-dim: #626962;
459
- --c-accent: #F34E3F;
459
+ --c-accent: #DFDFC1;
460
460
  --c-ok: #52C880;
461
461
  --c-warn: #E4C465;
462
462
  --c-warn-alt: #FFB300;
@@ -465,22 +465,22 @@
465
465
  --c-thinking: #BC8FB4;
466
466
  --c-subagent: #6CA0E0;
467
467
  --c-input-bg: #111311;
468
- --c-dot-grid: rgba(243, 78, 63, 0.08);
468
+ --c-dot-grid: rgba(223, 223, 193, 0.08);
469
469
  --c-panel-overlay: rgba(11, 13, 11, 0.6);
470
470
  --c-panel-glass: rgba(23, 26, 23, 0.92);
471
471
  --c-shadow: rgba(0, 0, 0, 0.3);
472
472
  --c-shadow-heavy: rgba(0, 0, 0, 0.5);
473
- --c-glow-accent: rgba(243, 78, 63, 0.15);
473
+ --c-glow-accent: rgba(223, 223, 193, 0.15);
474
474
  --c-surface-hover: rgba(255, 255, 255, 0.06);
475
475
  --c-surface-subtle: rgba(255, 255, 255, 0.03);
476
476
  --c-surface-th: rgba(255, 255, 255, 0.04);
477
- --c-accent-8: rgba(243, 78, 63, 0.08);
478
- --c-accent-10: rgba(243, 78, 63, 0.1);
479
- --c-accent-12: rgba(243, 78, 63, 0.12);
480
- --c-accent-15: rgba(243, 78, 63, 0.15);
481
- --c-accent-25: rgba(243, 78, 63, 0.25);
482
- --c-accent-30: rgba(243, 78, 63, 0.3);
483
- --c-accent-40: rgba(243, 78, 63, 0.4);
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
484
  --c-ok-10: rgba(82, 200, 128, 0.1);
485
485
  --c-ok-12: rgba(82, 200, 128, 0.12);
486
486
  --c-ok-20: rgba(82, 200, 128, 0.2);
@@ -495,7 +495,7 @@
495
495
  --c-danger-12: rgba(214, 118, 112, 0.12);
496
496
  --c-line-30: rgba(39, 42, 39, 0.3);
497
497
  --c-contrast-fg: #0B0D0B;
498
- --c-accent-hover: #F8695B;
498
+ --c-accent-hover: #EDEDDB;
499
499
  --c-warn-hover: #EBD087;
500
500
  --c-canvas-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
501
501
  --c-annotation: #F1F7F0;
@@ -669,6 +669,29 @@ body,
669
669
  flex-shrink: 0;
670
670
  }
671
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
+
672
695
  .canvas-node .node-controls {
673
696
  display: flex;
674
697
  align-items: center;
@@ -3955,6 +3978,19 @@ button.welcome-hint:hover {
3955
3978
  display: contents;
3956
3979
  }
3957
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
+
3958
3994
  .intent-ghost {
3959
3995
  position: absolute;
3960
3996
  pointer-events: none;