pmx-canvas 0.1.35 → 0.1.36
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 +52 -0
- package/Readme.md +14 -2
- package/dist/canvas/index.js +82 -41
- package/dist/types/client/nodes/ExtAppFrame.d.ts +2 -0
- package/dist/types/mcp/canvas-access.d.ts +20 -1
- package/dist/types/server/ax-context.d.ts +1 -1
- package/dist/types/server/ax-state.d.ts +28 -0
- package/dist/types/server/ax-wait.d.ts +23 -0
- package/dist/types/server/canvas-state.d.ts +55 -3
- package/dist/types/server/html-surface.d.ts +7 -0
- package/dist/types/server/index.d.ts +60 -2
- package/docs/ax-host-adapter-contract.md +65 -0
- package/docs/http-api.md +34 -2
- package/docs/mcp.md +5 -1
- package/docs/screenshot.png +0 -0
- package/package.json +1 -1
- package/skills/pmx-canvas/SKILL.md +50 -8
- package/skills/pmx-canvas/references/codex-app-adapter.md +15 -1
- package/skills/pmx-canvas/references/github-copilot-app-adapter.md +31 -0
- package/src/client/nodes/ExtAppFrame.tsx +73 -5
- package/src/client/nodes/HtmlNode.tsx +12 -3
- package/src/client/nodes/McpAppNode.tsx +12 -3
- package/src/json-render/renderer/index.tsx +3 -0
- package/src/mcp/canvas-access.ts +74 -5
- package/src/mcp/server.ts +94 -53
- package/src/server/ax-context.ts +7 -1
- package/src/server/ax-state.ts +87 -0
- package/src/server/ax-wait.ts +56 -0
- package/src/server/canvas-state.ts +131 -3
- package/src/server/html-surface.ts +49 -11
- package/src/server/index.ts +82 -2
- package/src/server/server.ts +189 -9
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,57 @@ All notable changes to `pmx-canvas` are documented here. This project follows
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.1.36] - 2026-06-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Activity ingestion closes the AX loop (report primitive A).** New
|
|
13
|
+
`POST /api/canvas/ax/activity` + `canvas_ingest_activity` MCP tool let a harness
|
|
14
|
+
forward the agent's real tool/session events; the board auto-reacts with
|
|
15
|
+
kind-driven, overridable defaults — `failure`/`error` (or `outcome:"failure"`) →
|
|
16
|
+
a blocked work item + a review finding + a `logs` evidence item; `tool-result` +
|
|
17
|
+
`outcome:"success"` → a `tool-result` evidence item; everything else (tool-start,
|
|
18
|
+
`session-start`/`session-end`, command, note) records a timeline event only. A
|
|
19
|
+
reaction set to `false` suppresses it; an object overrides its fields. AX is now
|
|
20
|
+
bidirectional (agent → board *and* work → board), no longer one-directional.
|
|
21
|
+
- **Blocking gates (report primitive D).** Single-item `GET /api/canvas/ax/{approval
|
|
22
|
+
|elicitation|mode}/<id>` returns the primitive (404 if unknown) and accepts an
|
|
23
|
+
optional `?waitMs=` long-poll that resolves the moment the human resolves the gate
|
|
24
|
+
in the browser (or times out, ≤120000ms). New `canvas_await_approval` /
|
|
25
|
+
`canvas_await_elicitation` / `canvas_await_mode` MCP tools block the same way, so an
|
|
26
|
+
agent can request a gate and *wait* for the decision instead of polling. Gates that
|
|
27
|
+
actually gate.
|
|
28
|
+
- **Context delivery lead block (report #54 hardening, harness-neutral).**
|
|
29
|
+
`GET /api/canvas/ax/context` (and `canvas://ax-context`) now include a compact
|
|
30
|
+
`delivery: { pendingSteering, pendingActivity }` block, with an optional
|
|
31
|
+
`?consumer=` filter (loop-safe — a consumer never sees what it originated). A host
|
|
32
|
+
adapter can inject this small, un-truncated block per turn so steering survives the
|
|
33
|
+
full-context char clip on a busy board.
|
|
34
|
+
- **AX host-adapter contract.** New `docs/ax-host-adapter-contract.md` documents the
|
|
35
|
+
harness-neutral interface (pull-context / deliver-steer / ingest-activity /
|
|
36
|
+
await-gate / mirror-log), what PMX owns vs. what each adapter implements, and the
|
|
37
|
+
steering lifecycle + gating conditions.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **`window.PMX_AX.emit` now confirms (report #55).** Emit returns a Promise that
|
|
42
|
+
resolves with the interaction result once the parent acks it (and fires a
|
|
43
|
+
`pmx-ax-ack` event / `window.PMX_AX.on('ack', cb)`), so a surface button can
|
|
44
|
+
self-confirm (`queued ✓`) instead of looking like "nothing happened". Falls back to
|
|
45
|
+
an `ax-ack-timeout` result after 10s so `await emit()` never hangs.
|
|
46
|
+
- **HTTP node creation requires a `type` (report #50).** `POST /api/canvas/node` with
|
|
47
|
+
an empty / type-less body now returns `400` (with the valid-type list) instead of
|
|
48
|
+
silently creating a phantom markdown node. The `?type=` query param still resolves it.
|
|
49
|
+
- **HTTP accepts top-level `html` / `axCapabilities` on html nodes (report #53).** Both
|
|
50
|
+
`POST /api/canvas/node` and `PATCH /api/canvas/node/<id>` now accept these fields at
|
|
51
|
+
the top level (previously dropped on update, and `axCapabilities` dropped on add) —
|
|
52
|
+
transport parity with `canvas_add_html_node` / `canvas_update_node`. `data.*` nesting
|
|
53
|
+
still works.
|
|
54
|
+
- **`POST`/`PATCH /api/canvas/ax/work` reject an unknown status (report #56).** Sending
|
|
55
|
+
`status: "in_progress"` (underscore) now returns `400` with the valid enum instead of
|
|
56
|
+
`ok:true` + a silent no-op. Accepted tokens: `todo`, `in-progress`, `blocked`, `done`,
|
|
57
|
+
`cancelled`.
|
|
58
|
+
|
|
8
59
|
## [0.1.35] - 2026-06-08
|
|
9
60
|
|
|
10
61
|
### Fixed
|
|
@@ -1775,6 +1826,7 @@ otherwise have to discover by trial and error.
|
|
|
1775
1826
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
1776
1827
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
1777
1828
|
|
|
1829
|
+
[0.1.36]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.36
|
|
1778
1830
|
[0.1.35]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.35
|
|
1779
1831
|
[0.1.34]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.34
|
|
1780
1832
|
[0.1.33]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.33
|
package/Readme.md
CHANGED
|
@@ -61,6 +61,10 @@ immediately — an explicit, low-noise control over what the agent sees next.
|
|
|
61
61
|
On top of pins, a host-agnostic **AX (agent-experience) layer** turns the
|
|
62
62
|
canvas into a shared workspace between you and the agent:
|
|
63
63
|
|
|
64
|
+
- **Agent-native nodes** — create markdown, status, HTML, json-render, graph,
|
|
65
|
+
web-artifact, or MCP app nodes that can act as interactive controls for the
|
|
66
|
+
agent. A node can focus context, create or update work, add evidence, request
|
|
67
|
+
input or approval, or send steering without leaving the board.
|
|
64
68
|
- **Focus** — promote nodes into the agent's active context without moving the viewport.
|
|
65
69
|
- **Work items & approval gates** — track visible tasks tied to nodes, and gate
|
|
66
70
|
high-impact actions behind a human `pending → approved/rejected` decision.
|
|
@@ -76,6 +80,12 @@ canvas into a shared workspace between you and the agent:
|
|
|
76
80
|
commands (`pmx.plan`, `pmx.review`, …), and read a tool/prompt policy.
|
|
77
81
|
- **Host capability** — adapters report what the host can do, for diagnostics.
|
|
78
82
|
|
|
83
|
+
Recent additions in this layer: agent-native nodes can now complete the full
|
|
84
|
+
AX loop; agent tool/session activity can flow back into the board as work,
|
|
85
|
+
evidence, and findings; approval, input, and mode gates can wait for a human
|
|
86
|
+
decision instead of polling; and AX-enabled HTML/web-artifact or MCP app
|
|
87
|
+
controls can show an in-surface confirmation after an action is accepted.
|
|
88
|
+
|
|
79
89
|
Canvas-bound state (focus, work items, approvals, review annotations,
|
|
80
90
|
elicitations, mode requests, policy) rides canvas snapshots and restore; the
|
|
81
91
|
timeline persists for continuity but is retention-bounded and never restored by a
|
|
@@ -95,7 +105,7 @@ the DB so SQLite WAL data is checkpointed into the file.
|
|
|
95
105
|
|
|
96
106
|
### 06 / Any agent
|
|
97
107
|
|
|
98
|
-
Harness-agnostic. Drive the canvas from [MCP](docs/mcp.md) (
|
|
108
|
+
Harness-agnostic. Drive the canvas from [MCP](docs/mcp.md) (69 tools,
|
|
99
109
|
14 resources, change notifications), the [CLI](docs/cli.md), the
|
|
100
110
|
[HTTP API](docs/http-api.md), or the [Bun SDK](docs/sdk.md). Works with
|
|
101
111
|
Claude Code, GitHub Copilot CLI, Codex, Cursor, Windsurf, or any agent
|
|
@@ -245,9 +255,11 @@ the agent can read `canvas://skills` and pull in companion skills
|
|
|
245
255
|
the three-tier visual matrix (json-render → html → web-artifact)
|
|
246
256
|
- **[CLI reference](docs/cli.md)** — full command surface, daemon mode,
|
|
247
257
|
watch streams, WebView automation
|
|
248
|
-
- **[MCP reference](docs/mcp.md)** —
|
|
258
|
+
- **[MCP reference](docs/mcp.md)** — 69 tools, 14 resources, change
|
|
249
259
|
notifications, node-type routing
|
|
250
260
|
- **[HTTP API](docs/http-api.md)** — REST endpoints, SSE, batch operations
|
|
261
|
+
- **[AX host-adapter contract](docs/ax-host-adapter-contract.md)** — how native
|
|
262
|
+
host adapters connect context, steering, activity, and human gates
|
|
251
263
|
- **[Bun SDK](docs/sdk.md)** — `createCanvas()` for TypeScript on Bun
|
|
252
264
|
- **[Release process](docs/RELEASE.md)** — maintainer-only
|
|
253
265
|
|