pmx-canvas 0.11.0 → 0.12.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 (300) hide show
  1. package/.github/extensions/pmx-canvas/extension.mjs +4 -1
  2. package/.github/extensions/pmx-canvas/runtime.json +1 -1
  3. package/.github/extensions/pmx-canvas/tools.json +440 -18
  4. package/CHANGELOG.md +51 -0
  5. package/dist/amp-plugin/pmx-canvas/LICENSE +21 -0
  6. package/dist/amp-plugin/pmx-canvas/THIRD_PARTY_LICENSES.txt +331 -0
  7. package/dist/amp-plugin/pmx-canvas/index.js +5445 -0
  8. package/dist/amp-plugin/pmx-canvas/runtime.json +3 -0
  9. package/dist/amp-plugin/pmx-canvas/shared-runtime.mjs +194 -0
  10. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/SKILL.md +267 -0
  11. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1168 -0
  12. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/jwt.ts +17 -0
  13. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/login.ts +12 -0
  14. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/middleware.ts +13 -0
  15. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/routes/auth.ts +13 -0
  16. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/investigation-board/src/handlers/users.ts +27 -0
  17. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/mcp.json +36 -0
  18. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/ax-html-control-surface.md +101 -0
  19. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/codex-app-adapter.md +151 -0
  20. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +150 -0
  21. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/full-reference.md +1839 -0
  22. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/github-copilot-app-adapter.md +223 -0
  23. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/html-primitives.md +139 -0
  24. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/importing-context.md +132 -0
  25. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/installing-pmx-canvas.md +301 -0
  26. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +117 -0
  27. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  28. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-orchestration/SKILL.md +141 -0
  29. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-testing/SKILL.md +266 -0
  30. package/dist/amp-plugin/pmx-canvas/start-mcp.mjs +14857 -0
  31. package/dist/amp-plugin/pmx-canvas/tools.json +10963 -0
  32. package/dist/canvas/chunks/{abnfDiagram-N423BO3Z-p8dtp6va.js → abnfDiagram-N423BO3Z-cwtsds5d.js} +1 -1
  33. package/dist/canvas/chunks/architecture-TIHT7OUA-x63cwejs.js +1 -0
  34. package/dist/canvas/chunks/{architectureDiagram-T3A2C74G-5jhmxrzf.js → architectureDiagram-T3A2C74G-b4xc9tpz.js} +3 -3
  35. package/dist/canvas/chunks/{blockDiagram-VBNYF7ZC-pw1fa9yb.js → blockDiagram-VBNYF7ZC-ahp3yxxs.js} +7 -7
  36. package/dist/canvas/chunks/{c4Diagram-5PPSVZJV-x07nq0tt.js → c4Diagram-5PPSVZJV-nappnay7.js} +4 -4
  37. package/dist/canvas/chunks/classDiagram-JCYQIIEL-k1j2xc1t.js +1 -0
  38. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-33x08xf2.js +1 -0
  39. package/dist/canvas/chunks/{cose-bilkent-JH36ORCC-nm39npq0.js → cose-bilkent-JH36ORCC-a428syda.js} +1 -1
  40. package/dist/canvas/chunks/cynefin-VYW2F7L2-8v6jxfz8.js +1 -0
  41. package/dist/canvas/chunks/{cynefinDiagram-MW4NZA55-vdxrwahz.js → cynefinDiagram-MW4NZA55-nspsqebj.js} +1 -1
  42. package/dist/canvas/chunks/{dagre-VZM6K2ZE-bqdm7wpd.js → dagre-VZM6K2ZE-8y6177fh.js} +2 -2
  43. package/dist/canvas/chunks/{diagram-7IWD3JNH-gs5gpr93.js → diagram-7IWD3JNH-vym028wn.js} +4 -4
  44. package/dist/canvas/chunks/{diagram-B4RE2ZJO-cgwjg47s.js → diagram-B4RE2ZJO-jddqb8sy.js} +1 -1
  45. package/dist/canvas/chunks/{diagram-LBJQPF4R-w3vahpav.js → diagram-LBJQPF4R-bjwbpkrn.js} +1 -1
  46. package/dist/canvas/chunks/{diagram-Q27KOJAE-42837z6h.js → diagram-Q27KOJAE-j6ph6hcx.js} +2 -2
  47. package/dist/canvas/chunks/{diagram-UB23O5K3-4fz83q59.js → diagram-UB23O5K3-p09w8jej.js} +1 -1
  48. package/dist/canvas/chunks/{ebnfDiagram-BXEA7PRR-zphtgegj.js → ebnfDiagram-BXEA7PRR-j975ycq5.js} +1 -1
  49. package/dist/canvas/chunks/{erDiagram-JOGREHBK-zvbbdxp4.js → erDiagram-JOGREHBK-sxp6hjn8.js} +5 -5
  50. package/dist/canvas/chunks/eventmodeling-45OFAUF4-xzfgn6xg.js +1 -0
  51. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-2nsmkskb.js +1 -0
  52. package/dist/canvas/chunks/{ganttDiagram-PKOTCBZU-282jzycm.js → ganttDiagram-PKOTCBZU-4tv230y2.js} +2 -2
  53. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-macbhand.js +1 -0
  54. package/dist/canvas/chunks/{gitGraphDiagram-DS77QQ5N-vqqy6p1b.js → gitGraphDiagram-DS77QQ5N-mqgmnw9g.js} +1 -1
  55. package/dist/canvas/chunks/{index-wgv7en21.js → index-037z5dz2.js} +2 -2
  56. package/dist/canvas/chunks/{index-w2mra17t.js → index-081n3har.js} +1 -1
  57. package/dist/canvas/chunks/{index-353m7b0p.js → index-5n03dmb9.js} +1 -1
  58. package/dist/canvas/chunks/{index-yw8h9vha.js → index-60pgzdqe.js} +1 -1
  59. package/dist/canvas/chunks/index-8g1vb57n.js +2 -0
  60. package/dist/canvas/chunks/{index-vv56h019.js → index-8rjes9r6.js} +1 -1
  61. package/dist/canvas/chunks/{index-nprm96xp.js → index-9022d1n9.js} +1 -1
  62. package/dist/canvas/chunks/{index-194m3hc3.js → index-9b02042t.js} +1 -1
  63. package/dist/canvas/chunks/{index-0rk4gp1g.js → index-ap4q4vez.js} +1 -1
  64. package/dist/canvas/chunks/{index-rh7nv68n.js → index-dyp2nhd3.js} +1 -1
  65. package/dist/canvas/chunks/index-frvta4tm.js +2 -0
  66. package/dist/canvas/chunks/{index-s4j678gj.js → index-h9ycj8n2.js} +1 -1
  67. package/dist/canvas/chunks/{index-fjtdggjn.js → index-mergmj97.js} +2 -2
  68. package/dist/canvas/chunks/index-nwsya6dj.js +301 -0
  69. package/dist/canvas/chunks/{index-3cy1bzwh.js → index-nz8qbd1p.js} +1 -1
  70. package/dist/canvas/chunks/{index-d3b3gqe9.js → index-qhfrazv3.js} +1 -1
  71. package/dist/canvas/chunks/{index-6qmsnxwy.js → index-v119nznk.js} +4 -4
  72. package/dist/canvas/chunks/{index-r2fyc9w1.js → index-vpt37m3d.js} +6 -6
  73. package/dist/canvas/chunks/{index-qj8fxwsf.js → index-y9ma6azy.js} +1 -1
  74. package/dist/canvas/chunks/{index-tb1wf525.js → index-zx0j3a2z.js} +26 -26
  75. package/dist/canvas/chunks/info-DKCQHKI2-a0ykzs9z.js +1 -0
  76. package/dist/canvas/chunks/{infoDiagram-6WML65LV-v1yvggqj.js → infoDiagram-6WML65LV-qv97qq6a.js} +2 -2
  77. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-p9306gh0.js +70 -0
  78. package/dist/canvas/chunks/{journeyDiagram-NVQOT4AX-zjcffveh.js → journeyDiagram-NVQOT4AX-sv67zats.js} +5 -5
  79. package/dist/canvas/chunks/{kanban-definition-27J2QSJJ-dakqtfp1.js → kanban-definition-27J2QSJJ-k2pfam6p.js} +1 -1
  80. package/dist/canvas/chunks/{mermaid.core-j2geswrd.js → mermaid.core-83r0fdce.js} +4 -4
  81. package/dist/canvas/chunks/{mindmap-definition-FAOFIHXS-142xhr3k.js → mindmap-definition-FAOFIHXS-vg2newm1.js} +1 -1
  82. package/dist/canvas/chunks/packet-7NZHBO7P-tqnabcdv.js +1 -0
  83. package/dist/canvas/chunks/{pegDiagram-VL7TDLO6-5wvk7vsd.js → pegDiagram-VL7TDLO6-k2h7zc5n.js} +1 -1
  84. package/dist/canvas/chunks/pie-RZYD4A2V-wke6gyhe.js +1 -0
  85. package/dist/canvas/chunks/{pieDiagram-7S7Q4E2Y-ztdhwycc.js → pieDiagram-7S7Q4E2Y-hg169p1v.js} +2 -2
  86. package/dist/canvas/chunks/{quadrantDiagram-CIZ2JOQS-c5p9gmg6.js → quadrantDiagram-CIZ2JOQS-bxtvsq0b.js} +5 -5
  87. package/dist/canvas/chunks/radar-I7S5WNFK-w7ka0drw.js +1 -0
  88. package/dist/canvas/chunks/railroad-3IZDKUUU-y3vg318x.js +1 -0
  89. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-6hqvcz3c.js +1 -0
  90. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-vcae260m.js +1 -0
  91. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-0dbyme23.js +1 -0
  92. package/dist/canvas/chunks/{railroadDiagram-AXF67PYL-xkmqkjwf.js → railroadDiagram-AXF67PYL-njyhcp4p.js} +1 -1
  93. package/dist/canvas/chunks/{requirementDiagram-LRYGKXZP-9wm2dyaw.js → requirementDiagram-LRYGKXZP-2z6v09gm.js} +4 -4
  94. package/dist/canvas/chunks/{sankeyDiagram-W5VNT64P-2w19etgb.js → sankeyDiagram-W5VNT64P-15mzam0e.js} +1 -1
  95. package/dist/canvas/chunks/{sequenceDiagram-SI44F4Z6-0jn0vwmz.js → sequenceDiagram-SI44F4Z6-rbshyd2c.js} +12 -12
  96. package/dist/canvas/chunks/{sizeCapture-X5ZJPWSS-x75epwdq.js → sizeCapture-X5ZJPWSS-sg26xwts.js} +1 -1
  97. package/dist/canvas/chunks/{stateDiagram-OKZ733FA-schjpy6d.js → stateDiagram-OKZ733FA-6eahp98e.js} +1 -1
  98. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-tty0ggn5.js +1 -0
  99. package/dist/canvas/chunks/{swimlanes-SLNWSIFB-gkw4xce3.js → swimlanes-SLNWSIFB-ze5db10t.js} +1 -1
  100. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-thze75gq.js +8 -0
  101. package/dist/canvas/chunks/{timeline-definition-Z64GVDOM-x7nkcy01.js → timeline-definition-Z64GVDOM-vnp7jyy8.js} +3 -3
  102. package/dist/canvas/chunks/treeView-QDETBFTQ-6ysffnm6.js +1 -0
  103. package/dist/canvas/chunks/treemap-6X3UGDF4-m3h9p066.js +1 -0
  104. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-0qrnb7mj.js +34 -0
  105. package/dist/canvas/chunks/wardley-OPB4EBWU-dp37drwx.js +1 -0
  106. package/dist/canvas/chunks/{wardleyDiagram-T6FBY63Y-t1j52t9r.js → wardleyDiagram-T6FBY63Y-8nxg8wqt.js} +4 -4
  107. package/dist/canvas/chunks/{xychartDiagram-ELKLHX3M-38t16pme.js → xychartDiagram-ELKLHX3M-nj921e7s.js} +5 -5
  108. package/dist/canvas/global.css +94 -1
  109. package/dist/canvas/index.js +154 -145
  110. package/dist/canvas/mcp-app.html +600 -498
  111. package/dist/json-render/index.css +1 -1
  112. package/dist/types/client/canvas/BoardMoveDialog.d.ts +2 -0
  113. package/dist/types/client/canvas/EdgeEditor.d.ts +19 -0
  114. package/dist/types/client/canvas/GroupNavigation.d.ts +2 -0
  115. package/dist/types/client/canvas/TextPrompt.d.ts +4 -0
  116. package/dist/types/client/nodes/PromptNode.d.ts +1 -0
  117. package/dist/types/client/nodes/ViewerFrame.d.ts +1 -1
  118. package/dist/types/client/nodes/WorkCard.d.ts +7 -0
  119. package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +1 -0
  120. package/dist/types/client/state/canvas-store.d.ts +15 -0
  121. package/dist/types/client/state/human-store.d.ts +2 -0
  122. package/dist/types/client/state/intent-bridge.d.ts +4 -2
  123. package/dist/types/client/state/relation-store.d.ts +11 -0
  124. package/dist/types/client/types.d.ts +1 -1
  125. package/dist/types/json-render/catalog.d.ts +2 -2
  126. package/dist/types/server/agent-presence.d.ts +1 -0
  127. package/dist/types/server/ax-interaction.d.ts +1 -0
  128. package/dist/types/server/ax-state-manager.d.ts +10 -2
  129. package/dist/types/server/board-local.d.ts +4 -0
  130. package/dist/types/server/board-move.d.ts +38 -0
  131. package/dist/types/server/canvas-db.d.ts +12 -2
  132. package/dist/types/server/canvas-operations.d.ts +5 -6
  133. package/dist/types/server/canvas-provenance.d.ts +1 -1
  134. package/dist/types/server/canvas-serialization.d.ts +1 -0
  135. package/dist/types/server/canvas-state.d.ts +84 -20
  136. package/dist/types/server/card-relocation.d.ts +6 -0
  137. package/dist/types/server/context-reads.d.ts +3 -1
  138. package/dist/types/server/human-presence.d.ts +1 -1
  139. package/dist/types/server/index.d.ts +16 -5
  140. package/dist/types/server/intent-registry.d.ts +8 -4
  141. package/dist/types/server/knowledge-lifecycle.d.ts +4 -2
  142. package/dist/types/server/mutation-history.d.ts +7 -5
  143. package/dist/types/server/operations/registry.d.ts +2 -0
  144. package/dist/types/server/trace-manager.d.ts +1 -0
  145. package/dist/types/shared/ax-kinds.d.ts +6 -0
  146. package/dist/types/shared/ax-surface-protocol.d.ts +8 -0
  147. package/dist/types/shared/human-presence.d.ts +1 -0
  148. package/dist/types/shared/lifecycle-status.d.ts +2 -0
  149. package/docs/RELEASE.md +21 -14
  150. package/docs/agent-plugin.md +22 -2
  151. package/docs/amp-plugin.md +270 -0
  152. package/docs/cli.md +42 -3
  153. package/docs/design/GuestName.dc.html +50 -0
  154. package/docs/design/PluginLogo.svg +7 -0
  155. package/docs/design/WorkCards.dc.html +39 -0
  156. package/docs/design/canvas.json +16 -0
  157. package/docs/design/plugin-logo.png +0 -0
  158. package/docs/design.md +111 -8
  159. package/docs/evals/agents-md-sections.md +38 -0
  160. package/docs/http-api.md +128 -10
  161. package/docs/mcp.md +61 -9
  162. package/docs/node-types.md +71 -1
  163. package/docs/plans/plan-009-tech-debt-backlog.md +1 -1
  164. package/docs/plans/plan-019-post-0.9-roadmap.md +44 -20
  165. package/docs/plans/plan-020-wave-5-work-planning.md +553 -0
  166. package/docs/product-vision-2026-09.md +33 -17
  167. package/docs/sdk.md +18 -0
  168. package/package.json +6 -3
  169. package/plugins/pmx-canvas/assets/preview.png +0 -0
  170. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +4 -1
  171. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
  172. package/plugins/pmx-canvas/plugin.json +2 -2
  173. package/plugins/pmx-canvas/runtime.json +1 -1
  174. package/plugins/pmx-canvas/tools.json +440 -18
  175. package/skills/data-analysis/SKILL.md +13 -26
  176. package/skills/frontend-design/LICENSE.txt +177 -0
  177. package/skills/frontend-design/SKILL.md +3 -0
  178. package/skills/pmx-canvas/SKILL.md +248 -842
  179. package/skills/pmx-canvas/evals/evals.json +110 -5
  180. package/skills/pmx-canvas/references/full-reference.md +142 -28
  181. package/skills/pmx-canvas/references/html-primitives.md +7 -0
  182. package/skills/pmx-canvas/references/installing-pmx-canvas.md +61 -11
  183. package/skills/pmx-canvas/references/tours-and-recording.md +39 -6
  184. package/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  185. package/skills/pmx-canvas-testing/SKILL.md +7 -5
  186. package/skills/published-consumer-e2e/SKILL.md +25 -8
  187. package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +51 -75
  188. package/skills/web-artifacts-builder/LICENSE.txt +202 -0
  189. package/skills/web-artifacts-builder/SKILL.md +6 -0
  190. package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +2 -2
  191. package/skills/web-artifacts-builder/scripts/init-artifact.sh +8 -8
  192. package/src/cli/commands/apps.ts +1 -0
  193. package/src/cli/commands/boards.ts +30 -0
  194. package/src/client/App.tsx +20 -4
  195. package/src/client/canvas/AttentionHistory.tsx +10 -2
  196. package/src/client/canvas/BoardMoveDialog.tsx +225 -0
  197. package/src/client/canvas/CanvasNode.tsx +45 -2
  198. package/src/client/canvas/CanvasViewport.tsx +38 -9
  199. package/src/client/canvas/ContextMenu.tsx +34 -12
  200. package/src/client/canvas/EdgeEditor.tsx +149 -0
  201. package/src/client/canvas/EdgeLayer.tsx +87 -16
  202. package/src/client/canvas/ExpandedNodeOverlay.tsx +4 -0
  203. package/src/client/canvas/GroupNavigation.tsx +85 -0
  204. package/src/client/canvas/RelationsPanel.tsx +9 -0
  205. package/src/client/canvas/SelectionBar.tsx +21 -0
  206. package/src/client/canvas/SessionPanel.tsx +35 -1
  207. package/src/client/canvas/TextPrompt.tsx +18 -1
  208. package/src/client/canvas/TopBar.tsx +30 -0
  209. package/src/client/canvas/canvas-area.ts +1 -1
  210. package/src/client/nodes/ExtAppFrame.tsx +26 -10
  211. package/src/client/nodes/MarkdownNode.tsx +6 -7
  212. package/src/client/nodes/PromptNode.tsx +32 -3
  213. package/src/client/nodes/StatusNode.tsx +12 -0
  214. package/src/client/nodes/StatusSummary.tsx +11 -0
  215. package/src/client/nodes/ViewerFrame.tsx +21 -10
  216. package/src/client/nodes/WorkCard.tsx +175 -0
  217. package/src/client/nodes/use-ax-surface-bridge.ts +18 -14
  218. package/src/client/state/attention-bridge.ts +5 -0
  219. package/src/client/state/attention-store.ts +1 -0
  220. package/src/client/state/canvas-store.ts +185 -15
  221. package/src/client/state/human-store.ts +22 -2
  222. package/src/client/state/intent-bridge.ts +19 -5
  223. package/src/client/state/relation-store.ts +127 -1
  224. package/src/client/theme/global.css +94 -1
  225. package/src/client/types.ts +1 -0
  226. package/src/mcp/server.ts +13 -3
  227. package/src/server/agent-presence.ts +43 -23
  228. package/src/server/ax-flow-loop.ts +6 -0
  229. package/src/server/ax-gate-ttl.ts +8 -1
  230. package/src/server/ax-interaction.ts +16 -10
  231. package/src/server/ax-state-manager.ts +17 -4
  232. package/src/server/ax-wait.ts +20 -6
  233. package/src/server/board-export.ts +19 -6
  234. package/src/server/board-local.ts +20 -0
  235. package/src/server/board-move.ts +297 -0
  236. package/src/server/canvas-db.ts +262 -160
  237. package/src/server/canvas-operations.ts +139 -109
  238. package/src/server/canvas-schema.ts +21 -0
  239. package/src/server/canvas-serialization.ts +2 -0
  240. package/src/server/canvas-state.ts +792 -159
  241. package/src/server/card-relocation.ts +53 -0
  242. package/src/server/code-graph.ts +4 -3
  243. package/src/server/context-reads.ts +83 -55
  244. package/src/server/demo-state.json +35 -15
  245. package/src/server/file-watcher.ts +30 -10
  246. package/src/server/human-presence.ts +18 -5
  247. package/src/server/index.ts +35 -15
  248. package/src/server/intent-registry.ts +43 -5
  249. package/src/server/knowledge-lifecycle.ts +32 -9
  250. package/src/server/lifecycle-status.ts +29 -1
  251. package/src/server/mcp-app-runtime.ts +26 -7
  252. package/src/server/mutation-history.ts +37 -8
  253. package/src/server/operations/composites.ts +6 -3
  254. package/src/server/operations/mcp-contracts.ts +15 -0
  255. package/src/server/operations/mcp.ts +36 -9
  256. package/src/server/operations/ops/annotation.ts +22 -1
  257. package/src/server/operations/ops/ax-await.ts +1 -0
  258. package/src/server/operations/ops/ax-timeline.ts +28 -2
  259. package/src/server/operations/ops/batch.ts +25 -11
  260. package/src/server/operations/ops/boards.ts +44 -3
  261. package/src/server/operations/ops/nodes.ts +70 -0
  262. package/src/server/operations/ops/query.ts +32 -3
  263. package/src/server/operations/ops/snapshots.ts +1 -0
  264. package/src/server/operations/registry.ts +49 -4
  265. package/src/server/server.ts +62 -16
  266. package/src/server/tour-control.ts +37 -12
  267. package/src/server/trace-manager.ts +4 -0
  268. package/src/server/web-artifacts/scripts/bundle-artifact.sh +2 -2
  269. package/src/server/web-artifacts/scripts/init-artifact.sh +8 -8
  270. package/src/shared/agent-context.ts +7 -1
  271. package/src/shared/auto-arrange.ts +5 -4
  272. package/src/shared/ax-kinds.ts +13 -0
  273. package/src/shared/ax-surface-protocol.ts +22 -0
  274. package/src/shared/human-presence.ts +1 -0
  275. package/src/shared/lifecycle-status.ts +2 -0
  276. package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +0 -1
  277. package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +0 -1
  278. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +0 -1
  279. package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +0 -1
  280. package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +0 -1
  281. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +0 -1
  282. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +0 -1
  283. package/dist/canvas/chunks/index-1r72hdzb.js +0 -301
  284. package/dist/canvas/chunks/index-g3pwnqeb.js +0 -2
  285. package/dist/canvas/chunks/index-rft2hcz5.js +0 -2
  286. package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +0 -1
  287. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +0 -70
  288. package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +0 -1
  289. package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +0 -1
  290. package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +0 -1
  291. package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +0 -1
  292. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +0 -1
  293. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +0 -1
  294. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +0 -1
  295. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +0 -1
  296. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +0 -8
  297. package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +0 -1
  298. package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +0 -1
  299. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +0 -34
  300. package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +0 -1
package/docs/design.md CHANGED
@@ -21,6 +21,33 @@ contract and the schedule.
21
21
  3. Apply the [Principles](#principles), above all the fixed meaning colours.
22
22
  4. Meet the [Definition of done](#definition-of-done-for-any-design-work) before calling it done.
23
23
 
24
+ ## Plugin logo
25
+
26
+ The plugin uses the existing Focus Field brand mark, matching the canvas favicon:
27
+ blue (`#4BBCFF`) concentric rounded squares on Harbor navy (`#081524`). The source is
28
+ [`PluginLogo.svg`](design/PluginLogo.svg), exported at 512 × 512 to
29
+ [`plugin-logo.png`](design/plugin-logo.png). The plugin build copies that PNG to the
30
+ marketplace-required `assets/preview.png` path referenced by `extensions.com.github.copilot.logo`.
31
+ README screenshots remain unchanged. This packages existing branding; it does not change canvas
32
+ styling or establish which image the Copilot plugin-list row displays.
33
+
34
+ To regenerate the PNG from the repository root with the existing Playwright installation:
35
+
36
+ ```bash
37
+ bun -e '
38
+ import { chromium } from "@playwright/test";
39
+ const browser = await chromium.launch({ headless: false });
40
+ try {
41
+ const page = await browser.newPage({ viewport: { width: 512, height: 512 }, deviceScaleFactor: 1 });
42
+ await page.setContent(`<body style="margin:0">${await Bun.file("docs/design/PluginLogo.svg").text()}</body>`);
43
+ await page.locator("svg").screenshot({ path: "docs/design/plugin-logo.png", omitBackground: true });
44
+ } finally {
45
+ await browser.close();
46
+ }
47
+ '
48
+ bun run build:plugin
49
+ ```
50
+
24
51
  ## Token system
25
52
 
26
53
  Drawn on [`TokenSystem.dc.html`](design/TokenSystem.dc.html); per-theme meaning colours on
@@ -121,6 +148,7 @@ the same change.
121
148
  | [`Themes.dc.html`](design/Themes.dc.html) | Meaning colours across all nine themes, proposed names | 0 |
122
149
  | [`Chrome.dc.html`](design/Chrome.dc.html) | Rail at 690 px, node header (expand and context pin always visible, the rest under ⋯), bounded reference footer, section headings, floating chrome | 0 |
123
150
  | [`EmptyState.dc.html`](design/EmptyState.dc.html) | Empty board: Drop files here, Paste a link, Start a note with collaboration guidance, then a separate agent-first path | 0 |
151
+ | [`GuestName.dc.html`](design/GuestName.dc.html) | Optional Your name button, existing text dialog and named collaborator cursor. Self-reported names only; sharing stays in Amp. | 5, Amp collaboration |
124
152
  | [`Context.dc.html`](design/Context.dc.html) | Nodes in context: every state, the count chip, the command bar | 0–1 |
125
153
  | [`NearPin.dc.html`](design/NearPin.dc.html) | Near a pin: the dotted “near” chip on a pinned node's unpinned neighbours, tethers on hover, the moment of change, combinations, 600 px; ships with the brief carrying neighbours (title + summary, reason “near <pin>”) | 1 |
126
154
  | [`ContextChip.dc.html`](design/ContextChip.dc.html), [`ContextChip600.dc.html`](design/ContextChip600.dc.html) | The one context chip (decided with the maintainer 2026-10-07: placement, near muted, quiet empty state, agent-pin dots, “N in context” at 600 px): top bar, right, replacing the floating ContextPinBar and the ContextBudget meter; at rest for cards, near, boards, agent-only pins, nothing pinned; opened into Cards (full, × unpin, clear all), Near (derived, title + summary, no ×, Pin to promote) and Boards (read state, × unpin). **A pinned board travels as a map** (decided 2026-10-07): folder, README summary, each pinned card's title + summary, links and backlinks; the agent pulls a card or board in full itself, so the chip shows no full / summary / not-sent state. **A cost, not a budget** (decided with the maintainer 2026-10-08): the chip shows what the brief costs as ≈ tokens, with no meter, share or clipped state; when the host reports its agent's token usage the panel names that count too (“Copilot’s whole context holds 42.8k tokens”). The brief's size limit stays internal as a page size. At rest it is the summary, always visible and right-aligned in the top bar at every width; the details open only on click. At ≤ 760 px the summary is “N in context” with no token text, and the bar gives way in this order: session id and counts; Export, Present, zoom and fit fold into ⋯; agent chip to its avatar, Start agent session to its icon; the board name truncates — the dot, board pin, summary and ⋯ never collapse. Harbor and Daylight, 600 px. Supersedes the chip wording on Context, NearPin and BoardPins | 1 (slices 4b, 5b) |
@@ -154,6 +182,17 @@ With the beta on, the existing Start agent session action sits below that guidan
154
182
  The existing panel, type and colour tokens stay; actions form one readable column, and
155
183
  short windows scroll the guide rather than cutting off either starting path.
156
184
 
185
+ **Guest name entry (2026-10-31).** A neutral 28px initial button at the end of the top bar
186
+ opens the existing text prompt, with its existing 440px maximum width, padding and actions.
187
+ The caption explains that a name is self-reported and grants no access. Entry is optional;
188
+ Cancel and Escape keep the current name. Save trims the name to the existing 40-character
189
+ presence limit and remembers it in this browser, without changing the tab's presence ID.
190
+ The existing cursor tags identify collaborators. No people panel or sharing controls are
191
+ added. The button remains visible when the bar folds at narrow widths, including Home;
192
+ MCP-hosted workbenches and agent-view tabs do not report human presence or offer this control.
193
+ The drawing refines the minimal dialog option, retaining actual text-prompt geometry rather
194
+ than the generated concept's smaller panel. Amp controls access to the port, not one board.
195
+
157
196
  **Canvas mouse gestures (owner decision, 2026-10-19).** Right-click on empty canvas
158
197
  opens the existing creation menu on release. Holding the right button and moving more
159
198
  than 5 screen pixels pans; releasing after a drag never opens a menu, even when the
@@ -320,8 +359,9 @@ Standalone viewers and HTML/artifact viewers retain their existing load path; no
320
359
  working set (README and pinned cards in full, on every board); there is no separate card
321
360
  pin, which would only send the portal's summary while this board is open. Every other
322
361
  card keeps its card pin.
323
- - **Relations are the edge layer, not node types.** Design work adds no node type;
324
- the vision's own `ask` node (move 3) is separate.
362
+ - **Relations are the edge layer, not node types.** Design work adds no node type.
363
+ The general `ask` node is deferred by the Wave 5 decision below; ordinary planning questions
364
+ and alternatives use existing cards.
325
365
  - **Any size, from a side pane to a full window.** The workbench lives in narrow agent-host
326
366
  panes, the resizable side browser in the Claude desktop app, and full browser windows. Every
327
367
  drawing shows the narrow end (600 px) and a full window before it is built, and the build
@@ -362,15 +402,71 @@ vision's target designs, not screenshots of the shipped workbench. The Wave-3
362
402
  foundation does not implement every interaction pictured in them. It provides
363
403
  per-board vocabularies, semantic inks, separate endpoint slots, authored reasons,
364
404
  evidence/source/use queries, downstream review qualification and view-only
365
- highlights. Parallel-pair count badges, cycle/affected counts, the compact inline
366
- edge editor, amber stale-lineage strokes and the Show lineage / Show on canvas
367
- actions are not implemented. The current editor is a context menu with text
368
- dialogs; source changes appear as review-due card footers, not recoloured edges.
369
- Group drill-in with breadcrumbs and outside endpoint stubs belongs to Wave 5.
405
+ highlights. Wave 5 adds parallel-pair counts, dependency cycle/affected counts,
406
+ the compact inline edge editor and Show lineage / Show on canvas. A cycle count
407
+ means cyclic dependency clusters, not every illustrated route through a graph.
408
+ Source warnings reuse lifecycle qualification and appear as amber glyphs and words
409
+ beside the semantic label, rather than replacing the relation ink with amber.
410
+ Group drill-in adds breadcrumbs and outside endpoint stubs on the same board.
411
+ The boundary is neutral, reserving blue for context pins; hidden viewers stay mounted
412
+ so navigation does not discard drafts. These are scoped deviations from the older
413
+ drawings' blue boundary and amber relation strokes, not new relation meanings.
370
414
  The sketches' suggested-link Accept/Dismiss treatment was superseded by the
371
415
  2026-10-10 direct-edit decision recorded above; it is not a pending acceptance
372
416
  workflow. A demo of existing features must not be used to claim full sketch parity.
373
417
 
418
+ **Wave 5 decision, 2026-10-27.** The owner reaffirmed Uses' Agent flow, Dependencies and
419
+ Decision drawings; Flows remains the reference for group navigation. Humans and agents author ordinary cards and
420
+ relations, showing work deliberately rather than automatically creating a card for every task.
421
+ Illustrated loops describe a plan; they do not execute it. Planning works without Sessions.
422
+ An explicitly linked session-task card presents the existing record's live state; starting a
423
+ session does not convert the plan. Native-agent approvals stay in the host, PMX session controls
424
+ remain separate, and explicit/automatic ghost feedback is unchanged. The general `ask` card
425
+ is deferred.
426
+
427
+ Agents also use the existing pen, text and whole-mark eraser layer for questions and
428
+ emphasis. This adds no new visual controls or mark style. Humans can answer in their
429
+ external agent host's composer; PMX's composer and Sessions are optional.
430
+
431
+ **Work-card authoring, selected 2026-10-27:** [WorkCards](design/WorkCards.dc.html)
432
+ adds option A's in-card editor to the approved Uses work steps. Title, work state,
433
+ detail and optional progress are authored node data. Edit grows the card locally;
434
+ Save/Cancel do not persist that temporary geometry. Drafts, refused saves and pending
435
+ saves survive opening and closing focus mode. Generic phase/tool status cards
436
+ remain unchanged.
437
+
438
+ **Read-only live cards, selected 2026-10-27:** the same WorkCards artboard adds a
439
+ **Show on board** action to task rows, becoming **Show card** when presented. A live
440
+ card shows task state, detail and attribution with a **Read-only** caption, no Edit,
441
+ progress or approval controls. Missing references show **Task unavailable**. Ordinary
442
+ plans are not converted, ending a session preserves cards, and deleting a card does not cancel work.
443
+ Existing selective board copies detach the live reference and task attribution, producing
444
+ an independent authored card. They do not copy tasks or create cross-board live links.
445
+
446
+ **Move to new board** is the agreed label for multi-selection and the group's **⋯** menu:
447
+ move the cards, preserve identity/history/relations and leave a portal. No reverse move or
448
+ inline-board operation in this wave. Opening a group within the current board is navigation
449
+ only, with breadcrumbs and outside endpoints, not a new board. These decisions supersede the
450
+ earlier automatic work-card and make/inline-board wording. Implementation and technical
451
+ checkpoints live in [plan 020](plans/plan-020-wave-5-work-planning.md).
452
+ [WorkCards](design/WorkCards.dc.html) now draws name, preview, refusal and interrupted-reply
453
+ states using the existing modal shell. Preview names pins, README, live owners and the
454
+ Undo/snapshot boundary. Save or cancel local card drafts before moving. A late reply never
455
+ overrides newer navigation; a retry uses the original request ID.
456
+
457
+ **Amp plugin added to Wave 5, 2026-10-27.** The owner added the native Canvas plugin
458
+ described in [this discussion](https://ampcode.com/threads/T-01a17d25-69d9-7693-986a-f3991de6a346).
459
+ It hosts Canvas through Amp's Portal and connects context, steering, creation, sharing and
460
+ collaboration to Amp threads. Jev optionally ranks context, chooses output representation and
461
+ prioritizes review; the integration works without it. Amp retains execution, credentials and
462
+ native permissions. The owner simplified sharing to **use Amp's existing sharing; let the guest
463
+ enter their name**. Add identification through existing canvas presence, not a separate guest
464
+ permission system, share server or custom expiry/revocation. A name is self-reported and grants
465
+ no additional access. Participation follows Amp's existing access model; do not promise anonymous
466
+ or board-only access that it does not provide. General hosted accounts and organization roles
467
+ remain later work. Draw the missing name-entry and identified-guest states here before UI
468
+ implementation; packaging, reliability gates and acceptance are in plan 020, Slice 4.
469
+
374
470
  | Wave | Vision | Function (build) | Design (proposal boards) | Done when |
375
471
  |---|---|---|---|---|
376
472
  | **0. Foundation**: shipped in 0.8.0; remaining foundation gaps ship with plan 019 step 3 | Moves 5, 9, 10 | Bundle Plex; controls inherit the font; type/radius/shadow tokens; meaning tokens per theme; theme renames (`dark` → Harbor, `light` → Daylight, neutral; no aliases); pin style that survives selection and attention; violet header bar replaces amber halos and focus fields | Today / Proposed, Tokens, Themes, Rail and node header, Nodes in context | No control renders in a fallback font; token test passes for all nine themes; reference cases pass at 600, 1024 and 1920 px; demo board regenerated |
@@ -378,7 +474,7 @@ workflow. A demo of existing features must not be used to claim full sketch pari
378
474
  | **2. Connected memory views** — implemented, verification gates apply | Moves 0, 14 | One board/card projection for Home, links/backlinks, brief discovery and `canvas://graph{?focus,depth}`; saved wiki ID bindings, direct cross-board card edges, previous-board chains, persisted Map positions | Home Map, Home Graph (deviations below) | Map and Graph are generated from the library; orphans visible; works at 600 px and in a full window |
379
475
  | **3. Relations layer** | Moves 0, 1, 13 | Edge `reason` and an open `kind` with a per-board vocabulary; relations carried in the brief's text form; "derived from" with staleness from provenance and recipes; relation queries for the inspector | Relations, Lineage, One relation layer | Hovering a node explains each link; a changed source turns downstream nodes amber; the agent's brief includes relations |
380
476
  | **4. Frame host and viewers** | Moves 5, 9 | One frame host passing the full theme tokens; json-render defaults to the canvas theme with an opt-out for design experiments; native proportional canvas at every zoom | Node types 1–3, Zoom | Viewers use the canvas palette and fill their authored space; approaching a viewer mounts it automatically and retains its state when panning away; no alternate grid or lifetime preview cap |
381
- | **5. Agent output and groups as pages** | Moves 3, 0 | Work items, gates and asks as nodes; make board / inline board; opening a group keeps its outside links | One relation layer (agent flow), Lineage (open a group) | Agent output is styled by the same shell and tokens; a group opened as a board shows its outside stubs |
477
+ | **5. Work planning, group navigation and Amp integration** | Moves 3, 0; native Amp plugin | Deliberate work cards and relations; optional live task views; Move to new board with a portal; group drill-in; Amp Portal/context/steering plugin with optional Jev; native Amp sharing plus guest names; no reverse move | Uses (agent flow, dependencies, decisions), Flows (open a group), Relations; move/plugin states to be drawn | Human and agent can plan without Sessions; loops stay inert; drill-in keeps outside stubs; moves preserve identity/audit; native Amp sharing and guest identification pass; shared shell/tokens and plan 020 checks pass |
382
478
  | **Later: hosted version** | Part 4 (moved from Part 3, 2026-10-19) | Read-only link, comments, second writer, accounts and roles; org → team → personal scopes with configurable categories and per-user pins; built once for the ChatGPT Sites and later Cloudflare editions | HomeTeam is the earlier two-root look ahead; updated scope/category drawings are required before building, retaining explicit publication and locked cards for unreadable boards | Exports and shared views inherit the tokens; a viewer sees the same meaning colours; nothing personal reaches a wider audience without explicit publication |
383
479
 
384
480
  **Folders and portals (decided 2026-10-06).** Home uses folders as the visible hierarchy (where a
@@ -486,6 +582,13 @@ scroll references instead of moving the canvas. No graph data is collapsed or re
486
582
  Reading expanded Markdown, closing it or following a link without input preserves
487
583
  the exact source and revision. Pending real edits still finish before navigation.
488
584
 
585
+ **Expanded-editor refusals (2026-10-31).** The existing attention toast, history
586
+ panel and Updates tab render inside the expanded dialog so they remain in its
587
+ keyboard focus loop, above its content and below blocking dialogs. Their placement,
588
+ dimensions and palette stay unchanged. Opening history dismisses the toast, and
589
+ queued notices stay in history without covering the open panel. Closing history
590
+ returns focus to Updates; reopening it never closes the editor or discards its draft.
591
+
489
592
  **Owner-guide fixes (2026-10-20).** The same reference list follows cards into focus
490
593
  mode, above the provenance strip, capped at 132 screen pixels there. It retains every
491
594
  target without displacing the document. A refused Markdown save keeps the reader and
@@ -0,0 +1,38 @@
1
+ # Eval: does each AGENTS.md section change what agents do?
2
+
3
+ Run 2026-10-26. Rerun it whenever a section is added or questioned; delete sections that change
4
+ nothing, rewrite sections that change behaviour in the wrong direction.
5
+
6
+ ## Method
7
+
8
+ 1. Copy `AGENTS.md` into neutrally named directories: the full file (control) and one copy per
9
+ treatment with a single `##` section removed.
10
+ 2. Start three subagents per variant. Each reads only its copy and writes the work plan it would
11
+ follow for two fixed requests, without implementing:
12
+ - "Wiki aliases inside fenced code blocks get turned into links on Markdown cards. Fix it."
13
+ - "Add a lastSavedAt field to GET /health."
14
+ 3. Score each plan on observable choices: skills named, plan mode, subagents, and the core
15
+ verification steps (failing test first, `pmx_canvas_health`, live check, docs and changelog).
16
+
17
+ Plans, not implementations: this measures what the instructions steer, which is what a section
18
+ can change. Subagents may also see the real repository guidance, which would shrink differences.
19
+
20
+ ## Results (n = 3 per variant)
21
+
22
+ | Variant | Pipeline skills named | Plan mode (request 1 / 2) | Plans using a subagent | Core verification |
23
+ |---|---|---|---|---|
24
+ | Full file | 3/3 | 2/3 · 3/3 | 5/6 | 3/3 |
25
+ | Without Agent Skill Pipeline | 0/3 | 3/3 · 3/3 | 3/6 | 3/3 |
26
+ | Without Workflow Orchestration | 3/3 | 0/3 · 0/3 | 1/6 | 3/3 |
27
+
28
+ `bun run acceptance` appeared in 2/3, 0/3 and 2/3 plans respectively; with n = 3 that is not
29
+ distinguishable from noise.
30
+
31
+ ## Decisions
32
+
33
+ - **Workflow Orchestration: deleted.** Its only effect was plan mode and subagents for a one-file
34
+ fix and a one-field change, which Amp's own guidance and Core Principles 1 and 4 already govern.
35
+ Verification was identical without it.
36
+ - **Agent Skill Pipeline: kept, corrected.** Removing it drops the owner's pipeline skills from
37
+ every plan, so it is load-bearing. It wrongly said the skills exist only in gitignored local
38
+ trees; they are global user skills, available in every orb.
package/docs/http-api.md CHANGED
@@ -3,6 +3,26 @@
3
3
  REST endpoints for all canvas operations + an SSE event stream. Works from
4
4
  any language. Default base URL: `http://localhost:4313`.
5
5
 
6
+ ## Board-targeted operations
7
+
8
+ Registry-backed routes accept `targetBoardId` in the JSON body, or in query parameters
9
+ for GET/DELETE. It must name an existing board. Board-bound reads, writes, batches and waits
10
+ execute on that board without opening it, including across awaits and concurrent navigation.
11
+ Omitting it retains the visible-board behavior. `agentId` identifies the writer for attribution
12
+ and scope fences; it is not an authentication credential.
13
+
14
+ Nested operations inherit the target and writer and reject conflicting overrides. Explicit
15
+ `board`, `expectedBoardId` and `destinationBoardId` must agree with the target. Board metadata
16
+ updates must name that board; a move-selection source must also agree. Deletion or
17
+ workspace replacement invalidates pending work, never redirects it to another board.
18
+
19
+ Board opening/deletion, backup restore and WebView automation refuse a target because they control the
20
+ shared view/workspace. Catalog operations, board creation/pins, settings and knowledge categories
21
+ retain their workspace scope and existing authority checks. AX timeline, evidence and steering
22
+ are workspace-wide; `delivery/pending` uses the consumer's addressed inbox and the target board's
23
+ `pendingActivity`. This is operation routing, not board-level access control. The SSE/poll stream
24
+ still projects the human's visible board, not an individual caller's target.
25
+
6
26
  ## Operation cancellation and progress (0.10)
7
27
 
8
28
  Registry-backed operation routes use the request's abort signal. Disconnecting
@@ -173,6 +193,11 @@ are JSON `[boardId,cardId]`. If the snapshot exceeds a quarter of the budget, `c
173
193
  explicitly requires rechecking cached cards via lifecycle-get before reuse. Empty lists in an
174
194
  incomplete snapshot do not mean healthy or active. Delivered entries still carry qualification.
175
195
 
196
+ `GET /health` includes `bundleStamp`, the `<mtimeMs>-<size>` of `dist/canvas/index.js` that
197
+ tabs compare on (re)connect to decide whether to reload. It is read once per process: when it
198
+ differs from the file on disk, new page loads get the rebuilt files but already-open tabs keep
199
+ their old JavaScript until the server restarts.
200
+
176
201
  `GET /health` includes `contracts: ["pmx-embedded-workbench-v4"]` when the daemon
177
202
  enforces `expectedBoardId` and `expectedContentRevision` preconditions, bulk-write
178
203
  fences/locks using validated geometry and affected automatic parent frames only,
@@ -300,6 +325,43 @@ open either board.
300
325
  Board-list `links` expose qualified `boardId`/`cardId` targets; native card
301
326
  connections include `cardTitle` (null if missing), so footers need not display raw IDs.
302
327
 
328
+ ### Move original cards to a new board
329
+
330
+ `GET /api/canvas/boards/:id` returns `contentRevision` alongside `board` and `open`.
331
+ Use that revision for `POST /api/canvas/boards/move-selection`:
332
+
333
+ ```json
334
+ {"sourceBoardId":"board-source","nodeIds":["card-a","group-b"],"name":"Follow-up","expectedRevision":42,"requestId":"unique-move-request","preview":true}
335
+ ```
336
+
337
+ Preview is read-only and returns `{ok:true, preview}` with expanded `nodeIds`,
338
+ `affectedBoardIds`, `readmeNodeId`, `pinnedNodeIds`, `liveTaskNodeIds`, `attachmentIds`,
339
+ `blockers` and `notices`. Commit with the identical input and `preview:false` (or omitted).
340
+ The source must still be open and at that revision. Commit rechecks permissions and bindings,
341
+ then atomically returns `{ok:true, sourceBoardId, destinationBoardId, portalId, nodeIds,
342
+ affectedBoardIds, replayed}`. It never opens the destination. The SDK exposes the same input
343
+ through `moveSelectionToNewBoard(input)`.
344
+
345
+ Keep the request ID and exact input until success is known. Retrying after an interrupted reply
346
+ or restart returns the original result without another board or portal, even if the source is
347
+ no longer open. Reusing that ID with different input returns 409. A stale revision or unsafe
348
+ binding also returns 409; binding refusals include `blockers`. Resolve the cause and preview
349
+ again before a new attempt.
350
+
351
+ This moves identities, not copies. Groups include descendants; card/edge IDs, relative geometry,
352
+ content revisions, pins, review/read evidence and supported attachments survive. Incoming and
353
+ outgoing relations, wiki bindings and provenance retarget across the library. The destination
354
+ inherits the source folder, theme and relation vocabulary. A selected README moves its designation.
355
+ Live task cards keep their original `workItemBoardId` and `workItemId`; task authority stays put.
356
+ Board-space annotations stay on the source, which receives a portal at the moved selection.
357
+
358
+ The entire move is refused for unsafe runtime producers, external app sessions, task/flow action
359
+ bindings, partial or unfinished imports, source tours targeting moved cards, unresolved local
360
+ viewer references, edit locks or scope fences on affected boards. Nothing is silently dropped.
361
+ Pre-move Undo/Redo is cleared on affected boards. Older snapshots remain readable but neither
362
+ whole-board nor single-card restore may cross the move boundary. Use a post-move snapshot for
363
+ restore; consult older snapshots to recover text manually without recreating the old identities.
364
+
303
365
  ### Markdown previews and saved links
304
366
 
305
367
  `POST /api/render` accepts `{markdown, nodeId?, expectedBoardId?}` and returns `{html}`.
@@ -558,7 +620,8 @@ term-OR discovery and whole-term ranking remain unchanged. Search never navigate
558
620
  `POST /api/canvas/node` accepts `destinationBoardId` to create on a stored board
559
621
  without opening it or changing the human's active board. `expectedBoardId` remains
560
622
  an **active-board** precondition, not a destination selector; stale values return 409.
561
- Unknown destinations return 404. This is creation-only, not background CRUD.
623
+ Unknown destinations return 404. `destinationBoardId` is creation-only. Use
624
+ `targetBoardId` for board-scoped reads and mutations without shared navigation.
562
625
 
563
626
  Optional `requestId` identifies a logical creation within the workspace database.
564
627
  Use the same id, destination and creation input when retrying; a new intentional
@@ -591,8 +654,24 @@ descendants and affected parent frames. Edges resolve `from`/`fromSearch` and
591
654
  target board, not the owner of the edge. Both endpoints' relation clocks update
592
655
  without changing their content/freshness. A retry returns its original group or
593
656
  edge receipt, preserving later edits and not resurrecting removals. A request ID
594
- cannot be reused for a different creation operation. Inactive group membership
595
- updates/removals and other background CRUD remain unsupported.
657
+ cannot be reused for a different creation operation. `destinationBoardId` selects
658
+ the destination for creation only. Use `targetBoardId` for background updates,
659
+ removals and group membership changes (see [board-targeted operations](#board-targeted-operations)).
660
+
661
+ For authored work cards, create `type: "status"` with
662
+ `data: { workState: "todo", detail: "Plan the change", progress: 25 }`.
663
+ `workState` accepts `todo`, `in-progress`, `blocked`, `done`, `cancelled`;
664
+ `detail` must be a string and progress must be 0–100 or `null` to clear it.
665
+ PATCH merges supplied data fields and validates the resulting work card. Use
666
+ `expectedBoardId` and `expectedContentRevision` to refuse stale edits. These cards
667
+ do not create session work or approvals. See [work cards](node-types.md#work-cards).
668
+
669
+ For a read-only live task presentation, POST `{"type":"status","data":{"workItemId":"<task-id>"}}`
670
+ on the task's active board. Unknown tasks, background creation, supplied display fields,
671
+ reference changes and display-field PATCHes return 400. Title, detail, work state and attribution
672
+ are derived from the existing task; progress is absent. Geometry and pins remain writable.
673
+ Use the existing AX work update endpoint to change the task. Deleting a presentation never
674
+ cancels work. See [live task cards](node-types.md#read-only-live-task-cards).
596
675
 
597
676
  ```bash
598
677
  # Add a node
@@ -634,9 +713,10 @@ against the node's top-level `contentRevision`; stale content returns `409`
634
713
  without changing the node. Conditional edits cannot request webpage refresh.
635
714
  The private MCP App uses these guards to reject stale board actions and note drafts.
636
715
 
637
- Native Markdown Save captures the currently observed revision for each attempt. Newer content
638
- arriving during rendering or network delivery refuses that attempt and keeps the draft; a later
639
- deliberate human Save may replace already-observed work. Queued saves advance their precondition
716
+ Markdown Save uses the draft's original content revision in both standalone and hosted workbenches.
717
+ Newer content refuses the save and keeps the draft, even if the peer update arrived before Save
718
+ was clicked. Retrying a stale draft still refuses; copy it before reloading to reconcile with the
719
+ latest saved text. Queued saves advance their precondition
640
720
  only through successful acknowledgements of their own preceding saves, never through an external
641
721
  revision or an automatic retry after conflict. Acknowledgements from before a restart, restore,
642
722
  or board replacement cannot update canonical content, clear an unsaved draft or advance queued
@@ -757,8 +837,23 @@ curl -X POST http://localhost:4313/api/canvas/annotation \
757
837
  curl -X DELETE http://localhost:4313/api/canvas/annotation/ann-123
758
838
  ```
759
839
 
760
- Agent-readable context reports annotation IDs, targets, and bounds. Use WebView
761
- inspection or screenshots when the drawn shape matters.
840
+ Both agents and humans use this layer. Set `type: "text"`, `text` and a point to
841
+ write a note; omit `type` for freehand ink with at least two points. Coordinates
842
+ are canvas world coordinates, independent of pan and zoom. `width` is stroke
843
+ width for ink (default 4, clamped to 1–24), or font size for text (default 24,
844
+ clamped to 1–96). Text is trimmed to 240 characters and labels to 160.
845
+
846
+ An explicit `id` makes creation retryable while that mark exists: the same
847
+ normalized content returns the existing mark without another Undo entry;
848
+ different content returns 409. After removal or Undo, adding that ID creates
849
+ the mark again. This is not a durable creation receipt. Removal erases the whole
850
+ mark, never the underlying cards; missing IDs return 404. Agent writes obey the
851
+ existing scope fence, including annotation points and removal bounds.
852
+
853
+ Agent-readable context reports annotation IDs, labels, text-note content,
854
+ targets and bounds without raw stroke points. Use screenshots when the drawn
855
+ shape matters. Questions can be answered in the external agent host's composer;
856
+ no PMX session or canvas reply is required, and marks are not approval gates.
762
857
 
763
858
  ## Viewport
764
859
 
@@ -830,8 +925,17 @@ a merged receipt has recorded more than 20 IDs across sessions; unrelated pins s
830
925
 
831
926
  `consumer` is optional. Supply a stable unique value only for a durable,
832
927
  board-scoped cursor; without `consumer` or `since`, each request starts from the
833
- beginning. An explicit `since` never advances a cursor. The brief is a map,
834
- not a dump: an `overview` entry for the open board first, then pins, then each
928
+ beginning. An explicit `since` never advances a cursor. `contextDelivery=false`
929
+ prepares the brief without recording a read or advancing the
930
+ consumer cursor. Adapters must record reception separately; preparation is not
931
+ delivery. `includeSteering=false` excludes steering when the host delivers addressed
932
+ instructions separately. Both flags default to true.
933
+
934
+ Before capturing context, live task cards reconcile their displayed content and
935
+ content revisions with their task owner, including after restart or another writer's
936
+ task update. This does not attribute an edit to the reader or reset consumer cursors.
937
+
938
+ The brief is a map, not a dump: an `overview` entry for the open board first, then pins, then each
835
939
  pin's neighbours (reason `near`: up to five unpinned cards within a 600 canvas-pixel
836
940
  edge-to-edge gap, nearest first, with `near: { pinNodeId, pinTitle }`), then relevant
837
941
  current-board changes and asks, then pinned boards (reason `pinned-board`: the board and its pinned
@@ -944,6 +1048,11 @@ curl "http://localhost:4313/api/canvas/ax/context-status?board=<board-id>"
944
1048
  # For a captured graph/brief, also pass seenLinkRevisions: {"node-1": 12} from
945
1049
  # the delivered linksRevision values, not revisions fetched after delivery.
946
1050
  # Only seenNodeIds with captured entries are acknowledged when this map is supplied.
1051
+ # Optional deliveryId deduplicates receipt retries by source, consumer and board
1052
+ # while the original read is retained (the read log retains 5000 rows).
1053
+ # Repeating it returns the original read, never revisions fetched at retry time.
1054
+ # Receipt identities outlive diagnostic pruning. An expired retry returns HTTP 409
1055
+ # with code=context_receipt_expired; obtain fresh context instead of retrying that ID.
947
1056
  curl -X POST http://localhost:4313/api/canvas/ax/context-reads \
948
1057
  -H "Content-Type: application/json" \
949
1058
  -d '{"channel":"adapter","resource":"copilot:prompt-context","consumer":"copilot","pinnedNodeIds":["node-1"],"deliveredNodeIds":["node-1"],"bytes":2048}'
@@ -1200,6 +1309,10 @@ curl -X POST http://localhost:4313/api/canvas/ax/interaction \
1200
1309
  # browser composer offers a target picker fed by live presence — always claim
1201
1310
  # with your own label or addressed steering never reaches you.
1202
1311
  curl "http://localhost:4313/api/canvas/ax/delivery/pending?consumer=copilot&limit=20"
1312
+ # addressedOnly=true requires consumer and excludes broadcasts BEFORE the limit.
1313
+ # offset skips matching pending messages; restart at zero after an empty page.
1314
+ # Used by hosts that can wake one explicitly addressed thread.
1315
+ curl "http://localhost:4313/api/canvas/ax/delivery/pending?consumer=amp:T-example&addressedOnly=true"
1203
1316
 
1204
1317
  # Long-poll: `waitMs` parks the request until steering for this consumer
1205
1318
  # arrives or the timeout elapses (capped at 120000ms) — the reactive loop for
@@ -1521,6 +1634,10 @@ curl -X POST http://localhost:4313/api/workbench/webview/screenshot \
1521
1634
  Build a canvas in one shot. Earlier results can be referenced from later
1522
1635
  operations via `$assigned-name.field`.
1523
1636
 
1637
+ Entries retain the caller's transport source for per-agent scope checks. An
1638
+ optional top-level `agentId` supplies the default writer identity for entries
1639
+ without their own `args.agentId`. Batches never inherit a human scope bypass.
1640
+
1524
1641
  ```bash
1525
1642
  curl -X POST http://localhost:4313/api/canvas/batch \
1526
1643
  -H "Content-Type: application/json" \
@@ -1533,6 +1650,7 @@ Supported operations:
1533
1650
  - `graph.add`
1534
1651
  - `edge.add`
1535
1652
  - `group.create`, `group.add`, `group.remove`
1653
+ - `annotation.add`, `annotation.remove`
1536
1654
  - `pin.set`, `pin.add`, `pin.remove`
1537
1655
  - `snapshot.save`
1538
1656
  - `arrange`
package/docs/mcp.md CHANGED
@@ -6,6 +6,25 @@ resources**, and two canvas resource templates, plus per-skill resources at
6
6
  `notifications/resources/updated` to subscribed connections when canvas state changes.
7
7
  This uses MCP SDK v1, not SDK v2.
8
8
 
9
+ ## Board-targeted tools
10
+
11
+ Registry-backed tools and AX interaction/activity tools accept `targetBoardId` and `agentId`.
12
+ Board-bound operations retain that target across awaits and nested batches without changing the
13
+ human's view. See the [routing contract](http-api.md#board-targeted-operations) for conflicts,
14
+ workspace-wide operations and permissions. `canvas_screenshot` rejects a target: its image is
15
+ of the shared WebView, not a background board.
16
+
17
+ The [Amp plugin](amp-plugin.md) supplies the target and authenticated thread identity for bound
18
+ MCP tool calls. It does not intercept MCP resource reads or CLI commands. Use routed query tools
19
+ instead of `canvas://` resources when reading a bound background board.
20
+
21
+ The plugin's `pmx_canvas_delivery` tool is an Amp host tool, not part of this MCP catalog.
22
+ It confirms automatic context reception separately from successful steering actions.
23
+ Context preparation uses `contextDelivery: false`; adapters record receipts through the
24
+ [HTTP context-reads endpoint](http-api.md#ax-context-and-focus), not a public MCP write action.
25
+ `canvas_ax_delivery` with `action: "claim"` supports `addressedOnly` and `offset` so a host pump
26
+ can scan beyond already-received instructions without marking them acted on.
27
+
9
28
  ## Operation help (0.10)
10
29
 
11
30
  Call `canvas_help {}` for the sorted registry names exposed through MCP, then
@@ -378,7 +397,7 @@ its `action` to the same operation the legacy tool used, so results are identica
378
397
  | `canvas_edge` | `add` · `update` · `remove` | `canvas_add_edge`, `canvas_update_edge`, `canvas_remove_edge` |
379
398
  | `canvas_group` | `create` · `add` · `ungroup` | `canvas_create_group`, `canvas_group_nodes`, `canvas_ungroup` |
380
399
  | `canvas_history` | `undo` · `redo` | `canvas_undo`, `canvas_redo` |
381
- | `canvas_view` | `arrange` · `focus` · `fit` · `clear` · `remove-annotation` · `get-tour` · `set-tour` · `tour-go` · `tour-exit` · `move` | `canvas_arrange`, `canvas_focus_node`, `canvas_fit_view`, `canvas_clear`, `canvas_remove_annotation` |
400
+ | `canvas_view` | `arrange` · `focus` · `fit` · `clear` · `add-annotation` · `remove-annotation` · `get-tour` · `set-tour` · `tour-go` · `tour-exit` · `move` | `canvas_arrange`, `canvas_focus_node`, `canvas_fit_view`, `canvas_clear`, `canvas_remove_annotation` |
382
401
  | `canvas_query` | `context` · `graph` · `search` · `layout` · `validate` | Budgeted context and summary-only connected memory; the others replace `canvas_search`, `canvas_get_layout`, `canvas_validate` |
383
402
  | `canvas_webview` | `status` · `start` · `stop` · `resize` · `evaluate` | `canvas_webview_status`, `canvas_webview_start`, `canvas_webview_stop`, `canvas_resize`, `canvas_evaluate` |
384
403
  | `canvas_app` | `open-mcp-app` · `diagram` · `build-artifact` | `canvas_open_mcp_app`, `canvas_add_diagram`, `canvas_build_web_artifact` |
@@ -388,7 +407,7 @@ its `action` to the same operation the legacy tool used, so results are identica
388
407
  | `canvas_ax_timeline` | `read` · `record-event` · `add-evidence` · `send-steering` · `reads` · `read-status` | `canvas_get_ax_timeline`, `canvas_record_ax_event`, `canvas_add_evidence`, `canvas_send_steering` (`reads` is the context read log; `read-status` is per node: last read, by whom, at which content revision) |
389
408
  | `canvas_ax_delivery` | `claim` (long-polls with `timeoutMs`) · `mark` | `canvas_claim_ax_delivery`, `canvas_mark_ax_delivery` |
390
409
  | `canvas_intent` | `signal` · `update` · `clear` | _(new — Ghost Cursor of Intent; no legacy standalone tool)_ |
391
- | `canvas_board` | `list` · `get` · `create` · `create-from` · `open` · `update` · `pin` · `unpin` · `knowledge-list` · `category-set` · `category-remove` · `folder-set` · `relation-preset-set` · `relation-preset-remove` | Boards and explicit workspace category/folder/shared-preset data |
410
+ | `canvas_board` | `list` · `get` · `create` · `create-from` · `move-selection` · `open` · `update` · `pin` · `unpin` · `knowledge-list` · `category-set` · `category-remove` · `folder-set` · `relation-preset-set` · `relation-preset-remove` | Boards and explicit workspace category/folder/shared-preset data |
392
411
  | `canvas_snapshot` | `save` · `list` · `restore` · `restore-node` · `delete` · `gc` · `diff` | `canvas_snapshot` (legacy save tool), `canvas_list_snapshots`, `canvas_restore`, `canvas_delete_snapshot`, `canvas_gc_snapshots`, `canvas_diff` — removed in v0.4.0 after one deprecated minor |
393
412
 
394
413
  For receipt-safe single-card Undo, use `canvas_snapshot { action: "restore-node", id,
@@ -416,6 +435,17 @@ first: `prompt`, `response`, `trace`, and `mcp-app` are not reusable. Creation i
416
435
  transactional and inactive, assigns fresh node/edge IDs, and copies no pins, AX
417
436
  state, or history. Groups and the designated README are opt-in.
418
437
 
438
+ `canvas_board { action: "move-selection", sourceBoardId, nodeIds, name,
439
+ expectedRevision, requestId, preview: true }` instead previews relocation of the
440
+ original cards, expanding group descendants. Get `contentRevision` from `get`
441
+ for `expectedRevision`. Commit the same input without `preview`; retain the
442
+ request ID for safe retries, including after restart. A successful result names
443
+ `destinationBoardId`, `portalId`, moved `nodeIds`, affected boards and `replayed`.
444
+ It does not open the destination. Preview exposes unsafe bindings and the history
445
+ boundary: pre-move Undo/Redo clears; older snapshots remain readable but cannot
446
+ restore across the move. Resolve blockers before committing, never omit cards
447
+ silently. See the [move contract](http-api.md#move-original-cards-to-a-new-board).
448
+
419
449
  The copy records `previousBoardId` for its source. Board `update` accepts
420
450
  `mapPosition: { x, y }` or `null` to persist/reset a Home Map position.
421
451
  `canvas_edge { action: "add", from, to, toBoardId, type }` connects the open
@@ -521,6 +551,17 @@ For Markdown nodes, `canvas_node` actions `add` and `update` accept
521
551
  `data: { display: "heading" | "card" }`. Heading display uses the existing title
522
552
  and content as a frameless section label, without changing pin membership.
523
553
 
554
+ For authored work cards, use `canvas_node { action: "add", type: "status", title:
555
+ "Verify", data: { workState: "todo", detail: "Run browser checks" } }`. Update the
556
+ same fields with `action: "update"`. State is `todo`, `in-progress`, `blocked`,
557
+ `done` or `cancelled`; optional `progress` is 0–100 or `null` to clear it.
558
+ These are ordinary cards, not sessions or approvals. [Work-card behavior](node-types.md#work-cards).
559
+
560
+ To present an existing task read-only, use `canvas_node { action: "add", type: "status",
561
+ data: { workItemId: "<task-id>" } }` on its active board. Omit title, detail, state and progress:
562
+ the task supplies display fields. Remove the card without cancelling work; update the task
563
+ through `canvas_ax_work`, not `canvas_node`. The reference cannot be patched or converted.
564
+
524
565
  For Mermaid nodes, `canvas_node` actions `add` and `update` accept
525
566
  `data: { fit: "contain" | "none" }`. Contain is the default, shrinking overflow
526
567
  uniformly; none keeps 100% with scrolling. Use Open as site for 100% without
@@ -813,14 +854,25 @@ AX state records where the focus came from. The full workflow lives in
813
854
 
814
855
  ## Annotation Visibility
815
856
 
816
- Human-drawn canvas annotations are rendered as browser SVG ink. MCP resources
817
- keep annotation context compact: agents see annotation counts, bounds, and target
818
- summaries such as the node or empty canvas region that was marked, but not the
819
- raw stroke geometry or visual shape.
857
+ Humans and agents share browser SVG ink and text notes. MCP resources keep context
858
+ compact: annotation IDs, labels, text-note content, bounds and target summaries,
859
+ without raw stroke geometry. These are distinct from AX review annotations.
860
+
861
+ ```json
862
+ {"action":"add-annotation","id":"option-question","type":"text","points":[{"x":160,"y":320}],"text":"Use this option?"}
863
+ ```
820
864
 
821
- Annotations are a browser-visible markup layer. Humans draw with the rail's
822
- Annotate popover (pen / text / eraser — the eraser removes a mark); agents can also
823
- remove a known annotation ID with `canvas_view { action: "remove-annotation", id }`.
865
+ Pass that input to `canvas_view`. Omit `type` for freehand drawing with at least
866
+ two points. Coordinates are canvas world coordinates, not screen pixels.
867
+ `color` defaults to the theme's annotation ink; `width` controls stroke width
868
+ or text size. [Defaults and retry rules](http-api.md#annotations) match HTTP.
869
+ Erase a whole mark with `canvas_view { action: "remove-annotation", id }`.
870
+ Both operations also work in `canvas_batch` as `annotation.add` / `annotation.remove`.
871
+
872
+ Use marks when helpful for questions, pointing and emphasis, not for every task.
873
+ The human can answer in the external agent host's composer; the agent then uses
874
+ its canvas tools to act on the answer. No PMX composer or Session is required,
875
+ and drawing or erasing a mark never resolves an approval.
824
876
 
825
877
  Use WebView automation when an agent needs to actually see annotations as drawn.
826
878
  For example, inspect `.annotation-layer path` with `canvas_webview { action: "evaluate" }`