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
@@ -15,8 +15,9 @@ has the published package and skills installed.
15
15
 
16
16
  For an isolated consumer workspace, do not expect the package to contain this checkout's
17
17
  `tests/`, source-only scripts, or Playwright configuration. Validate package transports and host
18
- integration through their public CLI, MCP, HTTP, and SDK surfaces; use the
19
- `published-consumer-e2e` skill when a packed-install outside-in check is required.
18
+ integration through their public CLI, MCP, HTTP, and SDK surfaces. The `published-consumer-e2e`
19
+ helper requires a source checkout, including its unshipped demo fixture; it is not runnable from
20
+ an installed-only package. Use it from source to verify an actual packed install.
20
21
 
21
22
  ## When To Use
22
23
 
@@ -103,9 +104,10 @@ Prefer extending the existing suites before inventing a one-off script.
103
104
  `transport.close()` on the `StdioClientTransport`. Closing only the client leaves the spawned
104
105
  stdio server process alive after the test exits (0.4.0 cycle finding)
105
106
  - Before a version-test cycle, run `pmx-canvas skills sync --check` in the consumer workspace —
106
- exit 1 means the installed skill copies are stale against the package; run
107
- `pmx-canvas skills sync --yes` to refresh them (whole trees, whatever agent layout owns them) before
108
- trusting skill-guided results
107
+ exit 1 means the installed copies differ from the package. Inspect whole-tree differences and
108
+ preserve local edits. Run `pmx-canvas skills sync --yes` only after the owner approves replacing
109
+ all affected installed copies. An upgrade or audit is not permission to overwrite owned guidance.
110
+ Without that approval, test released guidance in a disposable consumer and report mirror drift.
109
111
 
110
112
  ## Tests That Cannot Fail
111
113
 
@@ -7,37 +7,54 @@ description: Re-run PMX Canvas like an external user by packing the repo, instal
7
7
 
8
8
  Use this skill when the goal is to test PMX Canvas from the outside instead of the repo dev path.
9
9
 
10
+ This helper requires a **source checkout**, Bun, Python 3, curl, and (for browser checks) Node
11
+ and the repo's Playwright dependencies/browser. The npm package ships this skill but not
12
+ `examples/`, `tests/`, or the source test runner. Installing the skill alone is not sufficient.
13
+ For an installed-only consumer, verify public CLI/MCP/HTTP/SDK operations in a disposable
14
+ workspace instead; do not claim this source helper ran.
15
+
10
16
  ## Default Path
11
17
 
12
- Run:
18
+ From the source checkout, install dependencies and build the publishable assets first:
13
19
 
14
20
  ```bash
21
+ bun install
22
+ bun run build
15
23
  bash skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh
16
24
  ```
17
25
 
18
26
  That script will:
19
27
 
20
- 1. pack the current repo as a tarball,
28
+ 1. run `bun pm pack` against the real `package.json` publish surface, including skills,
29
+ docs, plugins and TypeScript declarations,
21
30
  2. create a clean temp consumer workspace,
22
31
  3. install the tarball with Bun,
23
32
  4. copy `examples/published-consumer-sdlc/` into that workspace,
24
33
  5. start the seeded demo through the package's public SDK,
25
- 6. run a headed `playwright-cli` browser pass that snapshots the live workbench and asserts the article, artifact, json-render, graph, trace, and context surfaces are present.
34
+ 6. run the existing `tests/e2e/published-consumer.pw.ts` through the Node Playwright runner,
35
+ headed by default, asserting visible artifact/JSON/graph content, context pins, node types
36
+ and the saved baseline snapshot.
37
+
38
+ This proves a local packed install, not the identity or integrity of a registry release.
26
39
 
27
40
  ## Flags
28
41
 
29
42
  - `--port=4600` to change the server port
30
43
  - `--skip-playwright` to stop after pack/install + HTTP smoke
31
- - `--headless` if a visible browser is impossible
44
+ - `--headless` only when explicitly requested
32
45
  - `--keep-running` to leave the temp consumer server alive after the script exits
33
- - `--workdir=/tmp/custom-dir` to reuse a known temp location
46
+ - `--workdir=/tmp/custom-dir` to choose an empty temp location (existing files are never replaced)
34
47
 
35
48
  ## Notes
36
49
 
37
- - Install the browser tool once with `bun add -g @playwright/cli@latest`.
50
+ - Install the repo's matching browser with `bun run test:install-browsers` if needed.
38
51
  - Default to headed browser validation so the human can watch the run.
39
52
  - Prefer the script over manually rebuilding the temp consumer.
40
53
  - If you change the example assets or this browser test, rerun the full script instead of repo-only tests.
41
- - The script assembles the tarball manually instead of relying on `npm pack` or `bun pm pack`, because pack/build commands can hang in this workspace.
42
- - The skill uses `playwright-cli` instead of the repo-local `playwright test` path because the local Playwright CLI is currently incompatible with the Bun/Node mix in this environment.
54
+ - Run on a dedicated port. In Amp orbs the server uses a supervised service; otherwise it reports
55
+ a process ID. With `--keep-running`, stop the printed `PMX_SERVER_SERVICE` using
56
+ `amp orb service stop <name>`, or terminate the printed `PMX_SERVER_PID` outside an orb.
57
+ - The browser runner also starts the repo config's separate fixture server. Set
58
+ `PMX_PLAYWRIGHT_PORT` to a free port when running alongside another browser suite.
59
+ - Logs, tarball and browser failure artifacts remain in the printed temp workspace for inspection.
43
60
  - On failure, inspect the temp workspace log path printed by the script before changing code.
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
5
  SKILL_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
6
6
  REPO_ROOT="$(cd "${SKILL_DIR}/../.." && pwd)"
7
7
 
8
- BUN_BIN="${BUN_BIN:-$HOME/.bun/bin/bun}"
8
+ BUN_BIN="${BUN_BIN:-$(command -v bun || true)}"
9
9
  PORT="4513"
10
10
  WORKDIR=""
11
11
  KEEP_RUNNING=0
@@ -46,21 +46,39 @@ fi
46
46
 
47
47
  export PATH="/opt/homebrew/bin:/usr/local/bin:$(dirname "${BUN_BIN}"):${PATH}"
48
48
 
49
+ for required in examples/published-consumer-sdlc/seed-demo.ts scripts/run-playwright.sh tests/e2e/published-consumer.pw.ts; do
50
+ if [[ ! -f "${REPO_ROOT}/${required}" ]]; then
51
+ echo "[published-consumer] requires a source checkout, not an installed skill/package: missing ${required}" >&2
52
+ exit 1
53
+ fi
54
+ done
55
+ for required in dist/canvas/index.js dist/json-render/index.js dist/types/server/index.d.ts; do
56
+ if [[ ! -f "${REPO_ROOT}/${required}" ]]; then
57
+ echo "[published-consumer] missing ${required}; run bun install && bun run build in the source checkout first." >&2
58
+ exit 1
59
+ fi
60
+ done
61
+
49
62
  if [[ -z "${WORKDIR}" ]]; then
50
63
  WORKDIR="$(mktemp -d "${TMPDIR:-/tmp}/pmx-canvas-published-consumer.XXXXXX")"
51
64
  else
52
65
  mkdir -p "${WORKDIR}"
66
+ if [[ -n "$(ls -A "${WORKDIR}")" ]]; then
67
+ echo "[published-consumer] --workdir must be empty; refusing to replace existing files." >&2
68
+ exit 1
69
+ fi
53
70
  fi
71
+ WORKDIR="$(cd "${WORKDIR}" && pwd)"
54
72
 
55
73
  PACK_DIR="${WORKDIR}/pack"
56
- PACKAGE_STAGING="${WORKDIR}/package"
57
74
  CONSUMER_DIR="${WORKDIR}/consumer"
58
75
  LOG_FILE="${WORKDIR}/server.log"
59
- rm -rf "${PACK_DIR}" "${PACKAGE_STAGING}"
60
- mkdir -p "${PACK_DIR}" "${PACKAGE_STAGING}/package" "${CONSUMER_DIR}/demo"
76
+ mkdir -p "${PACK_DIR}" "${CONSUMER_DIR}/demo"
61
77
 
62
78
  cleanup() {
63
- if [[ -n "${SERVER_PID:-}" ]] && kill -0 "${SERVER_PID}" 2>/dev/null; then
79
+ if [[ -n "${SERVER_SERVICE:-}" ]]; then
80
+ amp orb service stop "${SERVER_SERVICE}"
81
+ elif [[ -n "${SERVER_PID:-}" ]] && kill -0 "${SERVER_PID}" 2>/dev/null; then
64
82
  kill "${SERVER_PID}" 2>/dev/null || true
65
83
  wait "${SERVER_PID}" 2>/dev/null || true
66
84
  fi
@@ -68,22 +86,11 @@ cleanup() {
68
86
 
69
87
  trap cleanup EXIT
70
88
 
71
- echo "[published-consumer] assembling install tarball from ${REPO_ROOT}"
72
- cp "${REPO_ROOT}/package.json" "${PACKAGE_STAGING}/package/package.json"
73
- cp "${REPO_ROOT}/Readme.md" "${PACKAGE_STAGING}/package/Readme.md"
74
- if [[ -f "${REPO_ROOT}/LICENSE" ]]; then
75
- cp "${REPO_ROOT}/LICENSE" "${PACKAGE_STAGING}/package/LICENSE"
76
- fi
77
- cp -R "${REPO_ROOT}/src" "${PACKAGE_STAGING}/package/src"
78
- mkdir -p "${PACKAGE_STAGING}/package/dist"
79
- cp -R "${REPO_ROOT}/dist/canvas" "${PACKAGE_STAGING}/package/dist/canvas"
80
- cp -R "${REPO_ROOT}/dist/json-render" "${PACKAGE_STAGING}/package/dist/json-render"
89
+ echo "[published-consumer] packing the package.json publish surface from ${REPO_ROOT}"
81
90
  TARBALL="pmx-canvas-published-consumer.tgz"
82
- tar -czf "${PACK_DIR}/${TARBALL}" -C "${PACKAGE_STAGING}" package
91
+ (cd "${REPO_ROOT}" && "${BUN_BIN}" pm pack --filename "${PACK_DIR}/${TARBALL}" --quiet)
83
92
 
84
93
  echo "[published-consumer] staging temp consumer at ${CONSUMER_DIR}"
85
- rm -rf "${CONSUMER_DIR}"
86
- mkdir -p "${CONSUMER_DIR}/demo"
87
94
  cp -R "${REPO_ROOT}/examples/published-consumer-sdlc/." "${CONSUMER_DIR}/demo/"
88
95
  cat > "${CONSUMER_DIR}/package.json" <<'JSON'
89
96
  {
@@ -95,7 +102,22 @@ JSON
95
102
 
96
103
  (cd "${CONSUMER_DIR}" && "${BUN_BIN}" add "${PACK_DIR}/${TARBALL}")
97
104
 
105
+ if curl -fsS "http://127.0.0.1:${PORT}/health" >/dev/null 2>&1; then
106
+ echo "[published-consumer] port ${PORT} already has a healthy listener; choose a dedicated --port." >&2
107
+ exit 1
108
+ fi
109
+
98
110
  echo "[published-consumer] starting seeded demo on port ${PORT}"
111
+ export PMX_CANVAS_WORKSPACE_ROOT="${CONSUMER_DIR}"
112
+ export PMX_CANVAS_DB_PATH="${CONSUMER_DIR}/.pmx-canvas/canvas.db"
113
+ export PMX_CANVAS_STATE_FILE=""
114
+ export PMX_CANVAS_DISABLE_BROWSER_OPEN=1
115
+ if [[ -n "${AMP_ORB:-}" ]]; then
116
+ SERVER_SERVICE="published-consumer-${PORT}-$$"
117
+ printf -v SERVICE_COMMAND 'exec env PMX_CANVAS_WORKSPACE_ROOT=%q PMX_CANVAS_DB_PATH=%q PMX_CANVAS_STATE_FILE= PMX_CANVAS_DISABLE_BROWSER_OPEN=1 %q run demo/seed-demo.ts --port=%q --hold >%q 2>&1' \
118
+ "${PMX_CANVAS_WORKSPACE_ROOT}" "${PMX_CANVAS_DB_PATH}" "${BUN_BIN}" "${PORT}" "${LOG_FILE}"
119
+ amp orb service start "${SERVER_SERVICE}" --cwd "${CONSUMER_DIR}" --port "${PORT}" --command "${SERVICE_COMMAND}"
120
+ else
99
121
  SERVER_PID="$(
100
122
  python3 - "${CONSUMER_DIR}" "${BUN_BIN}" "${PORT}" "${LOG_FILE}" <<'PY'
101
123
  import subprocess
@@ -115,6 +137,7 @@ with open(log_file, "ab", buffering=0) as log:
115
137
  print(proc.pid)
116
138
  PY
117
139
  )"
140
+ fi
118
141
 
119
142
  READY=0
120
143
  for _ in $(seq 1 90); do
@@ -134,7 +157,7 @@ fi
134
157
  SEEDED=0
135
158
  NODE_COUNT="0"
136
159
  for _ in $(seq 1 120); do
137
- if ! kill -0 "${SERVER_PID}" 2>/dev/null; then
160
+ if [[ -n "${SERVER_PID:-}" ]] && ! kill -0 "${SERVER_PID}" 2>/dev/null; then
138
161
  echo "[published-consumer] seeded demo process exited early. Log follows:" >&2
139
162
  cat "${LOG_FILE}" >&2 || true
140
163
  exit 1
@@ -145,7 +168,7 @@ for _ in $(seq 1 120); do
145
168
  | python3 -c 'import json, sys; print(len(json.load(sys.stdin).get("nodes", [])))'
146
169
  )"
147
170
 
148
- if [[ "${NODE_COUNT}" -ge 18 ]]; then
171
+ if [[ "${NODE_COUNT}" -ge 18 ]] && grep -q 'Published consumer demo ready' "${LOG_FILE}"; then
149
172
  SEEDED=1
150
173
  break
151
174
  fi
@@ -167,62 +190,11 @@ echo " server-log: ${LOG_FILE}"
167
190
 
168
191
  if [[ "${SKIP_PLAYWRIGHT}" -ne 1 ]]; then
169
192
  echo "[published-consumer] running browser validation"
170
- if ! command -v playwright-cli >/dev/null 2>&1; then
171
- echo "[published-consumer] playwright-cli is required for browser validation." >&2
172
- echo "Install it with: bun add -g @playwright/cli@latest" >&2
173
- exit 1
174
- fi
175
-
176
- PLAYWRIGHT_SESSION="pc${PORT}"
177
- PLAYWRIGHT_OPEN_CMD=(playwright-cli "-s=${PLAYWRIGHT_SESSION}" open "http://127.0.0.1:${PORT}/workbench" --browser chrome)
193
+ PLAYWRIGHT_ARGS=(tests/e2e/published-consumer.pw.ts --project=desktop "--output=${WORKDIR}/browser-results")
178
194
  if [[ "${HEADED}" -eq 1 ]]; then
179
- PLAYWRIGHT_OPEN_CMD+=(--headed)
195
+ PLAYWRIGHT_ARGS+=(--headed)
180
196
  fi
181
-
182
- (
183
- cd "${REPO_ROOT}"
184
- rm -f .playwright-cli/page-*.yml .playwright-cli/page-*.png .playwright-cli/console-*.log 2>/dev/null || true
185
- "${PLAYWRIGHT_OPEN_CMD[@]}"
186
- sleep 3
187
- playwright-cli "-s=${PLAYWRIGHT_SESSION}" snapshot >/dev/null
188
-
189
- SNAPSHOT_FILE="$(ls -t .playwright-cli/page-*.yml | head -n 1)"
190
- if [[ -z "${SNAPSHOT_FILE}" ]]; then
191
- echo "[published-consumer] playwright-cli did not produce a snapshot." >&2
192
- exit 1
193
- fi
194
-
195
- for expected in \
196
- "Synthetic SDLC Report" \
197
- "Pipeline Atlas" \
198
- "SDLC Control Room Artifact" \
199
- "Control Tower Widgets" \
200
- "Release Gate Intake" \
201
- "Service Readiness Matrix" \
202
- "Lead Time Trend" \
203
- "Defects by Stage" \
204
- "Operational Load" \
205
- "Context (3)" \
206
- "npm pack" \
207
- "canvas.buildWebArtifact" \
208
- "playwright"
209
- do
210
- if ! rg -Fq "${expected}" "${SNAPSHOT_FILE}"; then
211
- echo "[published-consumer] expected browser snapshot to include: ${expected}" >&2
212
- echo "Snapshot: ${SNAPSHOT_FILE}" >&2
213
- exit 1
214
- fi
215
- done
216
-
217
- playwright-cli "-s=${PLAYWRIGHT_SESSION}" screenshot >/dev/null
218
- SCREENSHOT_FILE="$(ls -t .playwright-cli/page-*.png | head -n 1)"
219
- echo "[published-consumer] browser snapshot: ${SNAPSHOT_FILE}"
220
- echo "[published-consumer] browser screenshot: ${SCREENSHOT_FILE}"
221
-
222
- if [[ "${KEEP_RUNNING}" -ne 1 ]]; then
223
- playwright-cli "-s=${PLAYWRIGHT_SESSION}" close >/dev/null || true
224
- fi
225
- )
197
+ PMX_CANVAS_URL="http://127.0.0.1:${PORT}" bash "${REPO_ROOT}/scripts/run-playwright.sh" "${PLAYWRIGHT_ARGS[@]}"
226
198
  fi
227
199
 
228
200
  if [[ "${KEEP_RUNNING}" -eq 1 ]]; then
@@ -230,7 +202,11 @@ if [[ "${KEEP_RUNNING}" -eq 1 ]]; then
230
202
  echo "[published-consumer] leaving server running"
231
203
  echo " PMX_CANVAS_URL=http://127.0.0.1:${PORT}"
232
204
  echo " PMX_CONSUMER_DIR=${CONSUMER_DIR}"
233
- echo " PMX_SERVER_PID=${SERVER_PID}"
205
+ if [[ -n "${SERVER_SERVICE:-}" ]]; then
206
+ echo " PMX_SERVER_SERVICE=${SERVER_SERVICE}"
207
+ else
208
+ echo " PMX_SERVER_PID=${SERVER_PID}"
209
+ fi
234
210
  exit 0
235
211
  fi
236
212
 
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -6,6 +6,10 @@ license: Complete terms in LICENSE.txt
6
6
 
7
7
  # Web Artifacts Builder
8
8
 
9
+ Adapted from [Anthropic's web-artifacts-builder skill](https://github.com/anthropics/skills/tree/00756142ab04c82a447693cf373c4e0c554d1005/skills/web-artifacts-builder),
10
+ under [Apache-2.0](LICENSE.txt). Modified for standalone HTML delivery, PMX Canvas integration,
11
+ and local build-script dependency reuse, logging and a pinned scaffolder.
12
+
9
13
  To build powerful single-file frontend web artifacts, follow these steps:
10
14
  1. Initialize the frontend repo using `scripts/init-artifact.sh`
11
15
  2. Develop your artifact by editing the generated code
@@ -15,6 +19,8 @@ To build powerful single-file frontend web artifacts, follow these steps:
15
19
 
16
20
  **Stack**: React 18 + TypeScript + Vite + Parcel (bundling) + Tailwind CSS + shadcn/ui
17
21
 
22
+ The initializer pins `create-vite@9.3.1`; `9.3.2` omits the templates needed to scaffold a project.
23
+
18
24
  ## Design & Style Guidelines
19
25
 
20
26
  VERY IMPORTANT: To avoid what is often referred to as "AI slop", avoid using excessive centered layouts, purple gradients, uniform rounded corners, and Inter font.
@@ -68,7 +68,7 @@ function run_with_filtered_stderr() {
68
68
  }
69
69
 
70
70
  function run_pnpm_quiet() {
71
- run_with_filtered_stderr "${PNPM_CMD[@]}" --silent "$@"
71
+ run_with_filtered_stderr "${PNPM_CMD[@]}" --reporter=append-only "$@"
72
72
  }
73
73
 
74
74
  function run_pnpm_allow_build() {
@@ -77,7 +77,7 @@ function run_pnpm_allow_build() {
77
77
  for package_name in "${ALLOWED_BUILD_PACKAGES[@]}"; do
78
78
  allow_build_args+=(--allow-build="$package_name")
79
79
  done
80
- run_with_filtered_stderr "${PNPM_CMD[@]}" --silent "$@" "${allow_build_args[@]}"
80
+ run_with_filtered_stderr "${PNPM_CMD[@]}" --reporter=append-only "$@" "${allow_build_args[@]}"
81
81
  }
82
82
 
83
83
  function package_has_dependency() {
@@ -69,21 +69,21 @@ function replay_filtered_stderr() {
69
69
 
70
70
  function run_with_filtered_stderr() {
71
71
  local stderr_file
72
+ local status
72
73
  stderr_file="$(mktemp)"
73
74
  if "$@" 2>"$stderr_file"; then
74
- replay_filtered_stderr "$stderr_file"
75
- rm -f "$stderr_file"
76
- return 0
75
+ status=0
76
+ else
77
+ status=$?
77
78
  fi
78
79
 
79
- local status=$?
80
80
  replay_filtered_stderr "$stderr_file"
81
81
  rm -f "$stderr_file"
82
82
  return "$status"
83
83
  }
84
84
 
85
85
  function run_pnpm_quiet() {
86
- run_with_filtered_stderr "${PNPM_CMD[@]}" --silent "$@"
86
+ run_with_filtered_stderr "${PNPM_CMD[@]}" --reporter=append-only "$@"
87
87
  }
88
88
 
89
89
  function run_pnpm_allow_build() {
@@ -92,7 +92,7 @@ function run_pnpm_allow_build() {
92
92
  for package_name in "${ALLOWED_BUILD_PACKAGES[@]}"; do
93
93
  allow_build_args+=(--allow-build="$package_name")
94
94
  done
95
- run_with_filtered_stderr "${PNPM_CMD[@]}" --silent "$@" "${allow_build_args[@]}"
95
+ run_with_filtered_stderr "${PNPM_CMD[@]}" --reporter=append-only "$@" "${allow_build_args[@]}"
96
96
  }
97
97
 
98
98
  RUNTIME_INFO="$(detect_runtime_major)"
@@ -145,8 +145,8 @@ fi
145
145
 
146
146
  echo "🚀 Creating new React + Vite project: $PROJECT_NAME"
147
147
 
148
- # Create new Vite project (always use latest create-vite, pin vite version later)
149
- run_pnpm_quiet create vite "$PROJECT_NAME" --template react-ts --no-interactive
148
+ # 9.3.2 shipped without templates; keep scaffolding on the verified complete package.
149
+ run_pnpm_quiet create vite@9.3.1 "$PROJECT_NAME" --template react-ts --no-interactive
150
150
 
151
151
  # Navigate into project directory
152
152
  cd "$PROJECT_NAME"
@@ -97,6 +97,7 @@ cmd(
97
97
  [
98
98
  'pmx-canvas batch --file ./canvas-ops.json',
99
99
  'pmx-canvas batch --json \'[{"op":"node.add","assign":"a","args":{"type":"markdown","title":"A"}}]\'',
100
+ 'pmx-canvas batch --json \'[{"op":"annotation.add","args":{"type":"text","points":[{"x":160,"y":320}],"text":"Use this option?"}}]\'',
100
101
  'pmx-canvas batch --json \'[{"op":"graph.add","assign":"g","args":{"graphType":"bar","data":[{"label":"Docs","value":5}],"xKey":"label","yKey":"value"}}]\'',
101
102
  'cat ops.json | pmx-canvas batch --stdin',
102
103
  ],
@@ -95,6 +95,36 @@ cmd(
95
95
  },
96
96
  );
97
97
 
98
+ cmd(
99
+ 'board move-selection',
100
+ 'Preview or move original cards to a new board, leaving a portal (does not open it)',
101
+ ['pmx-canvas board move-selection <source-id> "Follow-up" --nodes id1,id2 --revision 42 --request move-1 --preview'],
102
+ async (args) => {
103
+ const { positional, flags } = parseFlags(args, { boolFlags: ['preview'] });
104
+ if (flags.help || flags.h) return showCommandHelp('board move-selection');
105
+ const [sourceBoardId, ...nameParts] = positional;
106
+ const name = nameParts.join(' ').trim();
107
+ const nodeIds = getStringFlag(flags, 'nodes')?.split(',').filter(Boolean);
108
+ const revision = getStringFlag(flags, 'revision');
109
+ const requestId = getStringFlag(flags, 'request');
110
+ if (!sourceBoardId || !name || !nodeIds?.length || !revision || !requestId)
111
+ die('Expected source board, name, --nodes, --revision and --request. Reuse the request ID when retrying.');
112
+ const expectedRevision = Number(revision);
113
+ if (!Number.isSafeInteger(expectedRevision) || expectedRevision < 0)
114
+ die('--revision must be a nonnegative integer.');
115
+ output(
116
+ await invokeOperation('board.move-selection', {
117
+ sourceBoardId,
118
+ name,
119
+ nodeIds,
120
+ expectedRevision,
121
+ requestId,
122
+ preview: !!flags.preview,
123
+ }),
124
+ );
125
+ },
126
+ );
127
+
98
128
  cmd(
99
129
  'board create',
100
130
  'Create an empty board (use board open with its returned id before writing)',