pmx-canvas 0.2.7 → 0.3.1

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 (189) hide show
  1. package/CHANGELOG.md +148 -1
  2. package/Readme.md +13 -11
  3. package/dist/canvas/index.js +2 -2
  4. package/dist/json-render/index.css +1 -1
  5. package/dist/types/cli/daemon.d.ts +74 -0
  6. package/dist/types/cli/watch.d.ts +2 -2
  7. package/dist/types/client/canvas/CanvasViewport.d.ts +1 -1
  8. package/dist/types/client/canvas/CommandPalette.d.ts +1 -1
  9. package/dist/types/client/canvas/Minimap.d.ts +1 -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/mcp/canvas-access.d.ts +0 -7
  17. package/dist/types/server/ax-state-manager.d.ts +3 -2
  18. package/dist/types/server/bundled-skills.d.ts +3 -3
  19. package/dist/types/server/canvas-schema.d.ts +1 -1
  20. package/dist/types/server/canvas-state.d.ts +2 -0
  21. package/dist/types/server/ext-app-lookup.d.ts +1 -3
  22. package/dist/types/server/html-primitives.d.ts +1 -1
  23. package/dist/types/server/index.d.ts +4 -4
  24. package/dist/types/server/operations/composites.d.ts +29 -23
  25. package/dist/types/server/operations/http.d.ts +2 -1
  26. package/dist/types/server/operations/index.d.ts +1 -1
  27. package/dist/types/server/operations/ops/ax-read.d.ts +2 -0
  28. package/dist/types/server/operations/ops/canvas-wire.d.ts +2 -0
  29. package/dist/types/server/operations/ops/ext-app.d.ts +2 -0
  30. package/dist/types/shared/ax-intent.d.ts +1 -1
  31. package/docs/RELEASE.md +23 -8
  32. package/docs/ax-host-adapter-contract.md +7 -7
  33. package/docs/ax-state-contract.md +7 -6
  34. package/docs/bun-webview-integration.md +5 -5
  35. package/docs/cli.md +1 -1
  36. package/docs/http-api.md +35 -3
  37. package/docs/mcp.md +121 -100
  38. package/docs/node-types.md +45 -35
  39. package/docs/plans/plan-006-mcp-tool-consolidation.md +3 -1
  40. package/docs/plans/plan-008-registry-finish.md +2 -0
  41. package/docs/plans/plan-009-tech-debt-backlog.md +51 -0
  42. package/docs/screenshot.png +0 -0
  43. package/docs/tech-debt-assessment-2026-06.md +1 -1
  44. package/docs/tech-debt-assessment-2026-07.md +135 -0
  45. package/package.json +5 -2
  46. package/skills/data-analysis/SKILL.md +3 -3
  47. package/skills/frontend-design/SKILL.md +3 -2
  48. package/skills/json-render-mcp/SKILL.md +4 -3
  49. package/skills/playwright-cli/SKILL.md +1 -1
  50. package/skills/pmx-canvas/SKILL.md +12 -7
  51. package/skills/pmx-canvas/evals/evals.json +2 -2
  52. package/skills/pmx-canvas/references/ax-html-control-surface.md +3 -1
  53. package/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +2 -2
  54. package/skills/pmx-canvas/references/full-reference.md +58 -56
  55. package/skills/pmx-canvas/references/html-primitives.md +3 -3
  56. package/skills/tufte-viz/SKILL.md +5 -4
  57. package/skills/web-artifacts-builder/SKILL.md +4 -4
  58. package/src/cli/agent.ts +1861 -1548
  59. package/src/cli/daemon.ts +460 -0
  60. package/src/cli/index.ts +63 -326
  61. package/src/cli/watch.ts +2 -10
  62. package/src/client/App.tsx +48 -46
  63. package/src/client/canvas/AttentionHistory.tsx +11 -1
  64. package/src/client/canvas/CanvasNode.tsx +41 -29
  65. package/src/client/canvas/CanvasViewport.tsx +101 -66
  66. package/src/client/canvas/CommandPalette.tsx +61 -27
  67. package/src/client/canvas/ContextMenu.tsx +13 -20
  68. package/src/client/canvas/ContextPinBar.tsx +1 -5
  69. package/src/client/canvas/ContextPinHud.tsx +1 -6
  70. package/src/client/canvas/DockedNode.tsx +4 -4
  71. package/src/client/canvas/EdgeLayer.tsx +37 -36
  72. package/src/client/canvas/ExpandedNodeOverlay.tsx +69 -45
  73. package/src/client/canvas/FocusFieldLayer.tsx +20 -22
  74. package/src/client/canvas/IntentLayer.tsx +31 -14
  75. package/src/client/canvas/Minimap.tsx +11 -16
  76. package/src/client/canvas/SelectionBar.tsx +4 -11
  77. package/src/client/canvas/ShortcutOverlay.tsx +3 -1
  78. package/src/client/canvas/SnapshotPanel.tsx +77 -95
  79. package/src/client/canvas/auto-fit.ts +15 -14
  80. package/src/client/canvas/snap-guides.ts +12 -12
  81. package/src/client/canvas/use-node-resize.ts +1 -5
  82. package/src/client/canvas/use-pan-zoom.ts +25 -26
  83. package/src/client/ext-app/bridge.ts +3 -12
  84. package/src/client/icons.tsx +63 -20
  85. package/src/client/nodes/ContextNode.tsx +14 -25
  86. package/src/client/nodes/ExtAppFrame.tsx +60 -39
  87. package/src/client/nodes/FileNode.tsx +74 -62
  88. package/src/client/nodes/GroupNode.tsx +4 -6
  89. package/src/client/nodes/HtmlNode.tsx +76 -46
  90. package/src/client/nodes/ImageNode.tsx +18 -27
  91. package/src/client/nodes/InlineFormatBar.tsx +4 -21
  92. package/src/client/nodes/InlineMarkdownEditor.tsx +0 -1
  93. package/src/client/nodes/LedgerNode.tsx +10 -4
  94. package/src/client/nodes/MarkdownNode.tsx +3 -10
  95. package/src/client/nodes/McpAppNode.tsx +26 -22
  96. package/src/client/nodes/MdFormatBar.tsx +10 -7
  97. package/src/client/nodes/PromptNode.tsx +23 -51
  98. package/src/client/nodes/ResponseNode.tsx +3 -13
  99. package/src/client/nodes/StatusNode.tsx +5 -9
  100. package/src/client/nodes/StatusSummary.tsx +2 -8
  101. package/src/client/nodes/WebpageNode.tsx +20 -14
  102. package/src/client/nodes/iframe-document-url.ts +25 -16
  103. package/src/client/nodes/image-warnings.ts +1 -7
  104. package/src/client/nodes/md-format.ts +20 -5
  105. package/src/client/state/attention-bridge.ts +4 -9
  106. package/src/client/state/attention-store.ts +1 -7
  107. package/src/client/state/canvas-store.ts +52 -36
  108. package/src/client/state/intent-bridge.ts +176 -112
  109. package/src/client/state/intent-store.ts +4 -1
  110. package/src/client/state/sse-bridge.ts +53 -70
  111. package/src/json-render/catalog.ts +12 -16
  112. package/src/json-render/charts/components.tsx +16 -20
  113. package/src/json-render/charts/extra-components.tsx +8 -16
  114. package/src/json-render/charts/extra-definitions.ts +1 -2
  115. package/src/json-render/charts/tufte-components.tsx +37 -20
  116. package/src/json-render/charts/tufte-definitions.ts +8 -2
  117. package/src/json-render/renderer/index.tsx +42 -22
  118. package/src/json-render/schema.ts +6 -3
  119. package/src/json-render/server.ts +33 -39
  120. package/src/mcp/canvas-access.ts +40 -121
  121. package/src/mcp/server.ts +206 -271
  122. package/src/server/agent-context.ts +63 -36
  123. package/src/server/ax-context.ts +7 -5
  124. package/src/server/ax-interaction.ts +176 -43
  125. package/src/server/ax-state-manager.ts +185 -41
  126. package/src/server/ax-state.ts +142 -47
  127. package/src/server/bundled-skills.ts +3 -3
  128. package/src/server/canvas-db.ts +213 -95
  129. package/src/server/canvas-operations.ts +177 -120
  130. package/src/server/canvas-provenance.ts +1 -4
  131. package/src/server/canvas-schema.ts +500 -102
  132. package/src/server/canvas-serialization.ts +27 -35
  133. package/src/server/canvas-state.ts +155 -58
  134. package/src/server/chart-template.ts +4 -5
  135. package/src/server/code-graph.ts +20 -7
  136. package/src/server/diagram-presets.ts +28 -29
  137. package/src/server/ext-app-lookup.ts +4 -20
  138. package/src/server/html-node-summary.ts +19 -10
  139. package/src/server/html-primitives.ts +326 -97
  140. package/src/server/html-surface.ts +6 -9
  141. package/src/server/image-source.ts +6 -4
  142. package/src/server/index.ts +321 -218
  143. package/src/server/intent-registry.ts +3 -6
  144. package/src/server/mcp-app-candidate.ts +5 -10
  145. package/src/server/mcp-app-host.ts +14 -38
  146. package/src/server/mcp-app-runtime.ts +12 -20
  147. package/src/server/mutation-history.ts +15 -5
  148. package/src/server/operations/composites.ts +38 -40
  149. package/src/server/operations/http.ts +5 -5
  150. package/src/server/operations/index.ts +7 -1
  151. package/src/server/operations/invoker.ts +4 -3
  152. package/src/server/operations/mcp.ts +29 -36
  153. package/src/server/operations/ops/annotation.ts +122 -10
  154. package/src/server/operations/ops/app.ts +102 -77
  155. package/src/server/operations/ops/ax-await.ts +17 -10
  156. package/src/server/operations/ops/ax-read.ts +347 -0
  157. package/src/server/operations/ops/ax-shared.ts +2 -7
  158. package/src/server/operations/ops/ax-state.ts +32 -14
  159. package/src/server/operations/ops/ax-timeline.ts +32 -19
  160. package/src/server/operations/ops/ax-work.ts +54 -37
  161. package/src/server/operations/ops/batch.ts +39 -14
  162. package/src/server/operations/ops/canvas-wire.ts +91 -0
  163. package/src/server/operations/ops/edges.ts +37 -25
  164. package/src/server/operations/ops/ext-app.ts +346 -0
  165. package/src/server/operations/ops/groups.ts +49 -20
  166. package/src/server/operations/ops/intent.ts +18 -12
  167. package/src/server/operations/ops/json-render.ts +239 -98
  168. package/src/server/operations/ops/nodes.ts +300 -111
  169. package/src/server/operations/ops/query.ts +62 -33
  170. package/src/server/operations/ops/snapshots.ts +35 -26
  171. package/src/server/operations/ops/validate.ts +2 -1
  172. package/src/server/operations/ops/viewport.ts +60 -16
  173. package/src/server/operations/ops/webview.ts +44 -18
  174. package/src/server/operations/registry.ts +2 -3
  175. package/src/server/operations/types.ts +7 -5
  176. package/src/server/operations/webview-runner.ts +1 -3
  177. package/src/server/placement.ts +8 -18
  178. package/src/server/server.ts +121 -1012
  179. package/src/server/spatial-analysis.ts +39 -25
  180. package/src/server/trace-manager.ts +3 -8
  181. package/src/server/web-artifacts.ts +23 -27
  182. package/src/server/webpage-node.ts +5 -13
  183. package/src/shared/auto-arrange.ts +12 -5
  184. package/src/shared/ax-intent.ts +1 -1
  185. package/src/shared/content-height-reporter.ts +8 -6
  186. package/src/shared/ext-app-tool-result.ts +2 -6
  187. package/src/shared/placement.ts +1 -4
  188. package/src/shared/semantic-attention.ts +39 -37
  189. package/src/shared/surface.ts +8 -4
package/CHANGELOG.md CHANGED
@@ -3,7 +3,152 @@
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]
6
+ ## [0.3.1] - 2026-07-07
7
+
8
+ ### Fixed
9
+
10
+ - Documented the Ghost Cursor intent HTTP endpoints in `docs/http-api.md`: the
11
+ operation is chosen by method and path (POST signals, PATCH updates, DELETE
12
+ clears/settles/vetoes) — there is no `action` field over raw HTTP; that
13
+ discriminator exists only on the MCP `canvas_intent` composite.
14
+ - `DELETE /api/canvas/ax/intent/:id?vetoed=true` now works: the query-string
15
+ form of `vetoed` is coerced to a boolean (literal `true`/`false` only; other
16
+ values are still rejected with 400).
17
+ - `serve --daemon` lifecycle is now race- and orphan-free: the pid file is
18
+ created as a lock before the child spawns and records the pid immediately,
19
+ a failed startup kills the child instead of leaving it orphaned, and a
20
+ liveness check guards against recycled pids.
21
+ - `serve --daemon` no longer reports "already running" when the port is held
22
+ by a daemon for a different workspace (or another application) — it refuses
23
+ with the owner's workspace named and a hint to pick another port.
24
+ - `serve status` no longer deletes a concurrent `serve --daemon`'s in-progress
25
+ spawn lock, closing a race that could otherwise let two daemons start on the
26
+ same port.
27
+
28
+ ### Changed
29
+
30
+ - The `/api/ext-app/*` endpoints are now served by the operation registry;
31
+ request and response wire shapes are unchanged.
32
+ - The AX read endpoints (`ax/work`, `ax/approval`, `ax/review`,
33
+ `ax/elicitation`, `ax/mode`, `ax/command`, `ax/policy`,
34
+ `ax/host-capability`, `ax/context`, `ax/surface-snapshot`),
35
+ `pinned-context`, `code-graph`, `ax/activity`, `ax/interaction`, and
36
+ `PATCH /api/canvas/ax` are likewise registry-served with unchanged wire
37
+ shapes.
38
+ - The theme, update, viewport, annotation, and webpage-refresh endpoints are
39
+ also registry-served now; wire shapes unchanged. One edge-case difference:
40
+ a malformed JSON body on the refresh endpoint returns 400 before the
41
+ missing-node 404 check (previously the 404 won).
42
+
43
+ ## [0.3.0] - 2026-07-07
44
+
45
+ ### Breaking
46
+
47
+ - **MCP tool surface shrinks from 84 to 27.** The 57 deprecated legacy
48
+ single-purpose MCP tools left over from the v0.2 composites migration are
49
+ removed. Each has a direct composite replacement — same operation, new
50
+ entry point:
51
+ - **`canvas_node`**: `canvas_add_node` → `action: "add"`; `canvas_get_node`
52
+ → `action: "get"`; `canvas_update_node` → `action: "update"`;
53
+ `canvas_remove_node` → `action: "remove"`; `canvas_add_html_node` →
54
+ `action: "add"` with `type: "html"`; `canvas_add_html_primitive` →
55
+ `action: "add"` with `type: "html"` + `primitive: "<kind>"`;
56
+ `canvas_refresh_webpage_node` → `action: "update"` with `refresh: true`.
57
+ - **`canvas_render`**: `canvas_describe_schema` → `action:
58
+ "describe-schema"`; `canvas_validate_spec` → `action: "validate"`;
59
+ `canvas_add_json_render_node` → `action: "add-json-render"`;
60
+ `canvas_stream_json_render_node` → `action: "stream-json-render"`;
61
+ `canvas_add_graph_node` → `action: "add-graph"`.
62
+ - **`canvas_edge`**: `canvas_add_edge` → `action: "add"`;
63
+ `canvas_remove_edge` → `action: "remove"`.
64
+ - **`canvas_group`**: `canvas_create_group` → `action: "create"`;
65
+ `canvas_group_nodes` → `action: "add"`; `canvas_ungroup` → `action:
66
+ "ungroup"`.
67
+ - **`canvas_history`**: `canvas_undo` → `action: "undo"`; `canvas_redo` →
68
+ `action: "redo"`.
69
+ - **`canvas_view`**: `canvas_arrange` → `action: "arrange"`;
70
+ `canvas_focus_node` → `action: "focus"`; `canvas_fit_view` → `action:
71
+ "fit"`; `canvas_clear` → `action: "clear"`; `canvas_remove_annotation` →
72
+ `action: "remove-annotation"`.
73
+ - **`canvas_query`**: `canvas_search` → `action: "search"`;
74
+ `canvas_get_layout` → `action: "layout"`; `canvas_validate` → `action:
75
+ "validate"`.
76
+ - **`canvas_app`**: `canvas_open_mcp_app` → `action: "open-mcp-app"`;
77
+ `canvas_add_diagram` → `action: "diagram"`; `canvas_build_web_artifact` →
78
+ `action: "build-artifact"`.
79
+ - **`canvas_webview`**: `canvas_webview_status` → `action: "status"`;
80
+ `canvas_webview_start` → `action: "start"`; `canvas_webview_stop` →
81
+ `action: "stop"`; `canvas_resize` → `action: "resize"`; `canvas_evaluate`
82
+ → `action: "evaluate"`.
83
+ - **`canvas_ax_state`**: `canvas_get_ax` → `action: "get"`;
84
+ `canvas_set_ax_focus` → `action: "set-focus"`; `canvas_set_ax_policy` →
85
+ `action: "set-policy"`; `canvas_report_host_capability` → `action:
86
+ "report-capability"`.
87
+ - **`canvas_ax_work`**: `canvas_add_work_item` → `action: "add"`;
88
+ `canvas_update_work_item` → `action: "update"`;
89
+ `canvas_add_review_annotation` → `action: "annotate"`.
90
+ - **`canvas_ax_gate`**: `canvas_request_approval` → `kind: "approval"`,
91
+ `action: "request"`; `canvas_resolve_approval` → `kind: "approval"`,
92
+ `action: "resolve"`; `canvas_await_approval` → `kind: "approval"`,
93
+ `action: "await"`; `canvas_request_elicitation` → `kind: "elicitation"`,
94
+ `action: "request"`; `canvas_respond_elicitation` → `kind:
95
+ "elicitation"`, `action: "resolve"`; `canvas_await_elicitation` → `kind:
96
+ "elicitation"`, `action: "await"`; `canvas_request_mode` → `kind:
97
+ "mode"`, `action: "request"`; `canvas_resolve_mode` → `kind: "mode"`,
98
+ `action: "resolve"`; `canvas_await_mode` → `kind: "mode"`, `action:
99
+ "await"`.
100
+ - **`canvas_ax_timeline`**: `canvas_get_ax_timeline` → `action: "read"`;
101
+ `canvas_record_ax_event` → `action: "record-event"`; `canvas_add_evidence`
102
+ → `action: "add-evidence"`; `canvas_send_steering` → `action:
103
+ "send-steering"`.
104
+ - **`canvas_ax_delivery`**: `canvas_claim_ax_delivery` → `action: "claim"`;
105
+ `canvas_mark_ax_delivery` → `action: "mark"`.
106
+
107
+ The HTTP API, the SDK, and `canvas_batch` are unaffected — these are the
108
+ same underlying operations, only the standalone MCP tool entry points are
109
+ removed. `docs/mcp.md` retains the full migration table for reference.
110
+
111
+ - **Malformed JSON request bodies now return 400.** Every HTTP API route
112
+ responds `400 { ok: false, error: "Malformed JSON body." }` when a non-empty
113
+ body fails to parse, instead of silently treating it as an empty request.
114
+ Empty bodies are still accepted.
115
+
116
+ ### Deprecated
117
+
118
+ - The 6 snapshot standalone tools (`canvas_snapshot`, `canvas_list_snapshots`,
119
+ `canvas_restore`, `canvas_delete_snapshot`, `canvas_gc_snapshots`,
120
+ `canvas_diff`) now carry deprecation notices in their tool descriptions and
121
+ fold into a `canvas_snapshot` composite (`action: save|list|restore|delete
122
+ |gc|diff`) in v0.4.
123
+
124
+ ### Removed
125
+
126
+ - Legacy `ext-app-ext-app-…` double-prefix blob-lookup fallback in
127
+ `findCanvasExtAppNodeId` (`src/server/ext-app-lookup.ts`), scheduled for
128
+ removal since v0.1.4. All ext-app node IDs have carried the single-prefix
129
+ form since then; the primary lookup and the data-scan fallback are
130
+ unaffected.
131
+ - The orphaned `dist/client` bundle and the generated web-artifact build
132
+ projects under `.pmx-canvas/artifacts/.web-artifacts/` are no longer
133
+ committed to the repo.
134
+
135
+ ### Fixed
136
+
137
+ - HTTP `GET /api/canvas/search` now honors the `limit` query parameter
138
+ (previously only the MCP tool applied it).
139
+ - The SDK's `setContextPins` emits the same `context-pins-changed` event as
140
+ the HTTP API and MCP tool, instead of a full layout update.
141
+ - `canvas_ax_interaction` and `canvas_ingest_activity` return a clean tool
142
+ error instead of an MCP protocol error when they fail.
143
+ - The code graph resolves workspace-relative imports against the configured
144
+ workspace root instead of the server process working directory.
145
+ - The MCP server now reports the real package version in its handshake
146
+ (read from `package.json`) instead of a stale hard-coded `0.1.0`.
147
+
148
+ ### Docs
149
+
150
+ - Operation descriptions and field hints no longer route agents to MCP tools
151
+ removed in v0.3.0.
7
152
 
8
153
  ## [0.2.7] - 2026-06-25
9
154
 
@@ -2533,6 +2678,8 @@ otherwise have to discover by trial and error.
2533
2678
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
2534
2679
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
2535
2680
 
2681
+ [0.3.1]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.3.1
2682
+ [0.3.0]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.3.0
2536
2683
  [0.2.7]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.2.7
2537
2684
  [0.2.6]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.2.6
2538
2685
  [0.2.5]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.2.5
package/Readme.md CHANGED
@@ -98,14 +98,14 @@ vendor-specific.
98
98
 
99
99
  Spatial state auto-saves to `.pmx-canvas/canvas.db` (debounced ~500 ms) —
100
100
  git-committable, shareable across machines, and survives both browser
101
- refresh and server restart. Named [snapshots](docs/mcp.md#tools), full
101
+ refresh and server restart. Named [snapshots](docs/mcp.md#standalone-tools), full
102
102
  undo/redo, and an auto-detected code graph (JS/TS, Python, Go, Rust) make
103
103
  the canvas durable rather than throwaway. Stop the server before committing
104
104
  the DB so SQLite WAL data is checkpointed into the file.
105
105
 
106
106
  ### 06 / Any agent
107
107
 
108
- Harness-agnostic. Drive the canvas from [MCP](docs/mcp.md) (84 tools,
108
+ Harness-agnostic. Drive the canvas from [MCP](docs/mcp.md) (27 tools,
109
109
  14 resources, change notifications), the [CLI](docs/cli.md), the
110
110
  [HTTP API](docs/http-api.md), or the [Bun SDK](docs/sdk.md). Works with
111
111
  Claude Code, GitHub Copilot CLI, Codex, Cursor, Windsurf, or any agent
@@ -136,9 +136,9 @@ surfaces (the core never imports a host SDK).
136
136
  preview).
137
137
  - **Codex app** — native through the Codex in-app Browser (opened to
138
138
  `/workbench`) plus the PMX MCP server: agents read `canvas://ax-context` /
139
- `canvas_get_ax` and label Codex-originated focus with `source: "codex"`. No
140
- extension API needed — Codex's two native surfaces (MCP + in-app Browser) are
141
- exactly what the canvas requires.
139
+ `canvas_ax_state { action: "get" }` and label Codex-originated focus with
140
+ `source: "codex"`. No extension API needed — Codex's two native surfaces
141
+ (MCP + in-app Browser) are exactly what the canvas requires.
142
142
 
143
143
  The contract is host-agnostic, so a new host plugs in the same way: map its
144
144
  hooks, canvas, and session APIs onto PMX's AX primitives — no core changes.
@@ -219,8 +219,9 @@ Codex needs no extension — its two native surfaces are exactly what the canvas
219
219
  requires. Add the PMX MCP server to the Codex workspace config (same snippet as
220
220
  [Connect your agent](#connect-your-agent-mcp)), then open the returned
221
221
  `/workbench` URL in the **Codex in-app Browser** so you can see mutations live.
222
- Agents read pinned/focused context from `canvas://ax-context` / `canvas_get_ax`
223
- and label Codex-originated focus with `source: "codex"`. See
222
+ Agents read pinned/focused context from `canvas://ax-context` /
223
+ `canvas_ax_state { action: "get" }` and label Codex-originated focus with
224
+ `source: "codex"`. See
224
225
  [`codex-app-adapter.md`](skills/pmx-canvas/references/codex-app-adapter.md) for
225
226
  the full workflow and live-test checklist.
226
227
 
@@ -255,7 +256,7 @@ the agent can read `canvas://skills` and pull in companion skills
255
256
  the three-tier visual matrix (json-render → html → web-artifact)
256
257
  - **[CLI reference](docs/cli.md)** — full command surface, daemon mode,
257
258
  watch streams, WebView automation
258
- - **[MCP reference](docs/mcp.md)** — 84 tools, 14 resources, change
259
+ - **[MCP reference](docs/mcp.md)** — 27 tools, 14 resources, change
259
260
  notifications, node-type routing
260
261
  - **[HTTP API](docs/http-api.md)** — REST endpoints, SSE, batch operations
261
262
  - **[AX host-adapter contract](docs/ax-host-adapter-contract.md)** — how native
@@ -273,9 +274,10 @@ the agent can read `canvas://skills` and pull in companion skills
273
274
  - **What leaves your machine.** The core canvas runs entirely on
274
275
  `localhost`. Network egress only happens for explicit, opt-in flows:
275
276
  `webpage` nodes fetch the URL you give them; `mcp-app` /
276
- `canvas_add_diagram` calls go to whatever MCP server URL you configure
277
- (the Excalidraw preset uses `https://mcp.excalidraw.com/mcp`); `bunx`
278
- itself reads the npm registry on first install. Nothing else phones home.
277
+ `canvas_app { action: "diagram" }` calls go to whatever MCP server URL you
278
+ configure (the Excalidraw preset uses `https://mcp.excalidraw.com/mcp`);
279
+ `bunx` itself reads the npm registry on first install. Nothing else phones
280
+ home.
279
281
 
280
282
  ## Tech stack
281
283