pmx-canvas 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/extensions/pmx-canvas/extension.mjs +3 -1
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +440 -18
- package/CHANGELOG.md +37 -0
- package/dist/amp-plugin/pmx-canvas/LICENSE +21 -0
- package/dist/amp-plugin/pmx-canvas/THIRD_PARTY_LICENSES.txt +331 -0
- package/dist/amp-plugin/pmx-canvas/index.js +5445 -0
- package/dist/amp-plugin/pmx-canvas/runtime.json +3 -0
- package/dist/amp-plugin/pmx-canvas/shared-runtime.mjs +194 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/SKILL.md +251 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1086 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/jwt.ts +17 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/login.ts +12 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/middleware.ts +13 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/routes/auth.ts +13 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/investigation-board/src/handlers/users.ts +27 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/mcp.json +36 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/ax-html-control-surface.md +101 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/codex-app-adapter.md +151 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +150 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/full-reference.md +1785 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/github-copilot-app-adapter.md +223 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/html-primitives.md +139 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/importing-context.md +132 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/installing-pmx-canvas.md +251 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +111 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +900 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-orchestration/SKILL.md +141 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-testing/SKILL.md +266 -0
- package/dist/amp-plugin/pmx-canvas/start-mcp.mjs +14857 -0
- package/dist/amp-plugin/pmx-canvas/tools.json +10963 -0
- package/dist/canvas/chunks/{abnfDiagram-N423BO3Z-p8dtp6va.js → abnfDiagram-N423BO3Z-cwtsds5d.js} +1 -1
- package/dist/canvas/chunks/architecture-TIHT7OUA-x63cwejs.js +1 -0
- package/dist/canvas/chunks/{architectureDiagram-T3A2C74G-5jhmxrzf.js → architectureDiagram-T3A2C74G-b4xc9tpz.js} +3 -3
- package/dist/canvas/chunks/{blockDiagram-VBNYF7ZC-pw1fa9yb.js → blockDiagram-VBNYF7ZC-ahp3yxxs.js} +7 -7
- package/dist/canvas/chunks/{c4Diagram-5PPSVZJV-x07nq0tt.js → c4Diagram-5PPSVZJV-nappnay7.js} +4 -4
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-k1j2xc1t.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-33x08xf2.js +1 -0
- package/dist/canvas/chunks/{cose-bilkent-JH36ORCC-nm39npq0.js → cose-bilkent-JH36ORCC-a428syda.js} +1 -1
- package/dist/canvas/chunks/cynefin-VYW2F7L2-8v6jxfz8.js +1 -0
- package/dist/canvas/chunks/{cynefinDiagram-MW4NZA55-vdxrwahz.js → cynefinDiagram-MW4NZA55-nspsqebj.js} +1 -1
- package/dist/canvas/chunks/{dagre-VZM6K2ZE-bqdm7wpd.js → dagre-VZM6K2ZE-8y6177fh.js} +2 -2
- package/dist/canvas/chunks/{diagram-7IWD3JNH-gs5gpr93.js → diagram-7IWD3JNH-vym028wn.js} +4 -4
- package/dist/canvas/chunks/{diagram-B4RE2ZJO-cgwjg47s.js → diagram-B4RE2ZJO-jddqb8sy.js} +1 -1
- package/dist/canvas/chunks/{diagram-LBJQPF4R-w3vahpav.js → diagram-LBJQPF4R-bjwbpkrn.js} +1 -1
- package/dist/canvas/chunks/{diagram-Q27KOJAE-42837z6h.js → diagram-Q27KOJAE-j6ph6hcx.js} +2 -2
- package/dist/canvas/chunks/{diagram-UB23O5K3-4fz83q59.js → diagram-UB23O5K3-p09w8jej.js} +1 -1
- package/dist/canvas/chunks/{ebnfDiagram-BXEA7PRR-zphtgegj.js → ebnfDiagram-BXEA7PRR-j975ycq5.js} +1 -1
- package/dist/canvas/chunks/{erDiagram-JOGREHBK-zvbbdxp4.js → erDiagram-JOGREHBK-sxp6hjn8.js} +5 -5
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-xzfgn6xg.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-2nsmkskb.js +1 -0
- package/dist/canvas/chunks/{ganttDiagram-PKOTCBZU-282jzycm.js → ganttDiagram-PKOTCBZU-4tv230y2.js} +2 -2
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-macbhand.js +1 -0
- package/dist/canvas/chunks/{gitGraphDiagram-DS77QQ5N-vqqy6p1b.js → gitGraphDiagram-DS77QQ5N-mqgmnw9g.js} +1 -1
- package/dist/canvas/chunks/{index-wgv7en21.js → index-037z5dz2.js} +2 -2
- package/dist/canvas/chunks/{index-w2mra17t.js → index-081n3har.js} +1 -1
- package/dist/canvas/chunks/{index-353m7b0p.js → index-5n03dmb9.js} +1 -1
- package/dist/canvas/chunks/{index-yw8h9vha.js → index-60pgzdqe.js} +1 -1
- package/dist/canvas/chunks/index-8g1vb57n.js +2 -0
- package/dist/canvas/chunks/{index-vv56h019.js → index-8rjes9r6.js} +1 -1
- package/dist/canvas/chunks/{index-nprm96xp.js → index-9022d1n9.js} +1 -1
- package/dist/canvas/chunks/{index-194m3hc3.js → index-9b02042t.js} +1 -1
- package/dist/canvas/chunks/{index-0rk4gp1g.js → index-ap4q4vez.js} +1 -1
- package/dist/canvas/chunks/{index-rh7nv68n.js → index-dyp2nhd3.js} +1 -1
- package/dist/canvas/chunks/index-frvta4tm.js +2 -0
- package/dist/canvas/chunks/{index-s4j678gj.js → index-h9ycj8n2.js} +1 -1
- package/dist/canvas/chunks/{index-fjtdggjn.js → index-mergmj97.js} +2 -2
- package/dist/canvas/chunks/index-nwsya6dj.js +301 -0
- package/dist/canvas/chunks/{index-3cy1bzwh.js → index-nz8qbd1p.js} +1 -1
- package/dist/canvas/chunks/{index-d3b3gqe9.js → index-qhfrazv3.js} +1 -1
- package/dist/canvas/chunks/{index-6qmsnxwy.js → index-v119nznk.js} +4 -4
- package/dist/canvas/chunks/{index-r2fyc9w1.js → index-vpt37m3d.js} +6 -6
- package/dist/canvas/chunks/{index-qj8fxwsf.js → index-y9ma6azy.js} +1 -1
- package/dist/canvas/chunks/{index-tb1wf525.js → index-zx0j3a2z.js} +26 -26
- package/dist/canvas/chunks/info-DKCQHKI2-a0ykzs9z.js +1 -0
- package/dist/canvas/chunks/{infoDiagram-6WML65LV-v1yvggqj.js → infoDiagram-6WML65LV-qv97qq6a.js} +2 -2
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-p9306gh0.js +70 -0
- package/dist/canvas/chunks/{journeyDiagram-NVQOT4AX-zjcffveh.js → journeyDiagram-NVQOT4AX-sv67zats.js} +5 -5
- package/dist/canvas/chunks/{kanban-definition-27J2QSJJ-dakqtfp1.js → kanban-definition-27J2QSJJ-k2pfam6p.js} +1 -1
- package/dist/canvas/chunks/{mermaid.core-j2geswrd.js → mermaid.core-83r0fdce.js} +4 -4
- package/dist/canvas/chunks/{mindmap-definition-FAOFIHXS-142xhr3k.js → mindmap-definition-FAOFIHXS-vg2newm1.js} +1 -1
- package/dist/canvas/chunks/packet-7NZHBO7P-tqnabcdv.js +1 -0
- package/dist/canvas/chunks/{pegDiagram-VL7TDLO6-5wvk7vsd.js → pegDiagram-VL7TDLO6-k2h7zc5n.js} +1 -1
- package/dist/canvas/chunks/pie-RZYD4A2V-wke6gyhe.js +1 -0
- package/dist/canvas/chunks/{pieDiagram-7S7Q4E2Y-ztdhwycc.js → pieDiagram-7S7Q4E2Y-hg169p1v.js} +2 -2
- package/dist/canvas/chunks/{quadrantDiagram-CIZ2JOQS-c5p9gmg6.js → quadrantDiagram-CIZ2JOQS-bxtvsq0b.js} +5 -5
- package/dist/canvas/chunks/radar-I7S5WNFK-w7ka0drw.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-y3vg318x.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-6hqvcz3c.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-vcae260m.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-0dbyme23.js +1 -0
- package/dist/canvas/chunks/{railroadDiagram-AXF67PYL-xkmqkjwf.js → railroadDiagram-AXF67PYL-njyhcp4p.js} +1 -1
- package/dist/canvas/chunks/{requirementDiagram-LRYGKXZP-9wm2dyaw.js → requirementDiagram-LRYGKXZP-2z6v09gm.js} +4 -4
- package/dist/canvas/chunks/{sankeyDiagram-W5VNT64P-2w19etgb.js → sankeyDiagram-W5VNT64P-15mzam0e.js} +1 -1
- package/dist/canvas/chunks/{sequenceDiagram-SI44F4Z6-0jn0vwmz.js → sequenceDiagram-SI44F4Z6-rbshyd2c.js} +12 -12
- package/dist/canvas/chunks/{sizeCapture-X5ZJPWSS-x75epwdq.js → sizeCapture-X5ZJPWSS-sg26xwts.js} +1 -1
- package/dist/canvas/chunks/{stateDiagram-OKZ733FA-schjpy6d.js → stateDiagram-OKZ733FA-6eahp98e.js} +1 -1
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-tty0ggn5.js +1 -0
- package/dist/canvas/chunks/{swimlanes-SLNWSIFB-gkw4xce3.js → swimlanes-SLNWSIFB-ze5db10t.js} +1 -1
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-thze75gq.js +8 -0
- package/dist/canvas/chunks/{timeline-definition-Z64GVDOM-x7nkcy01.js → timeline-definition-Z64GVDOM-vnp7jyy8.js} +3 -3
- package/dist/canvas/chunks/treeView-QDETBFTQ-6ysffnm6.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-m3h9p066.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-0qrnb7mj.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-dp37drwx.js +1 -0
- package/dist/canvas/chunks/{wardleyDiagram-T6FBY63Y-t1j52t9r.js → wardleyDiagram-T6FBY63Y-8nxg8wqt.js} +4 -4
- package/dist/canvas/chunks/{xychartDiagram-ELKLHX3M-38t16pme.js → xychartDiagram-ELKLHX3M-nj921e7s.js} +5 -5
- package/dist/canvas/global.css +94 -1
- package/dist/canvas/index.js +154 -145
- package/dist/canvas/mcp-app.html +600 -498
- package/dist/json-render/index.css +1 -1
- package/dist/types/client/canvas/BoardMoveDialog.d.ts +2 -0
- package/dist/types/client/canvas/EdgeEditor.d.ts +19 -0
- package/dist/types/client/canvas/GroupNavigation.d.ts +2 -0
- package/dist/types/client/canvas/TextPrompt.d.ts +4 -0
- package/dist/types/client/nodes/PromptNode.d.ts +1 -0
- package/dist/types/client/nodes/ViewerFrame.d.ts +1 -1
- package/dist/types/client/nodes/WorkCard.d.ts +7 -0
- package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +1 -0
- package/dist/types/client/state/canvas-store.d.ts +15 -0
- package/dist/types/client/state/human-store.d.ts +2 -0
- package/dist/types/client/state/intent-bridge.d.ts +4 -2
- package/dist/types/client/state/relation-store.d.ts +11 -0
- package/dist/types/client/types.d.ts +1 -1
- package/dist/types/json-render/catalog.d.ts +2 -2
- package/dist/types/server/agent-presence.d.ts +1 -0
- package/dist/types/server/ax-interaction.d.ts +1 -0
- package/dist/types/server/ax-state-manager.d.ts +10 -2
- package/dist/types/server/board-local.d.ts +4 -0
- package/dist/types/server/board-move.d.ts +38 -0
- package/dist/types/server/canvas-db.d.ts +12 -2
- package/dist/types/server/canvas-operations.d.ts +5 -6
- package/dist/types/server/canvas-provenance.d.ts +1 -1
- package/dist/types/server/canvas-serialization.d.ts +1 -0
- package/dist/types/server/canvas-state.d.ts +84 -20
- package/dist/types/server/card-relocation.d.ts +6 -0
- package/dist/types/server/context-reads.d.ts +3 -1
- package/dist/types/server/human-presence.d.ts +1 -1
- package/dist/types/server/index.d.ts +16 -5
- package/dist/types/server/intent-registry.d.ts +8 -4
- package/dist/types/server/knowledge-lifecycle.d.ts +4 -2
- package/dist/types/server/mutation-history.d.ts +7 -5
- package/dist/types/server/operations/registry.d.ts +2 -0
- package/dist/types/server/trace-manager.d.ts +1 -0
- package/dist/types/shared/ax-kinds.d.ts +6 -0
- package/dist/types/shared/ax-surface-protocol.d.ts +8 -0
- package/dist/types/shared/human-presence.d.ts +1 -0
- package/dist/types/shared/lifecycle-status.d.ts +2 -0
- package/docs/RELEASE.md +21 -14
- package/docs/agent-plugin.md +16 -2
- package/docs/amp-plugin.md +271 -0
- package/docs/cli.md +42 -3
- package/docs/design/GuestName.dc.html +50 -0
- package/docs/design/PluginLogo.svg +7 -0
- package/docs/design/WorkCards.dc.html +39 -0
- package/docs/design/canvas.json +16 -0
- package/docs/design/plugin-logo.png +0 -0
- package/docs/design.md +111 -8
- package/docs/evals/agents-md-sections.md +38 -0
- package/docs/http-api.md +128 -10
- package/docs/mcp.md +61 -9
- package/docs/node-types.md +71 -1
- package/docs/plans/plan-009-tech-debt-backlog.md +1 -1
- package/docs/plans/plan-019-post-0.9-roadmap.md +44 -20
- package/docs/plans/plan-020-wave-5-work-planning.md +553 -0
- package/docs/product-vision-2026-09.md +33 -17
- package/docs/sdk.md +18 -0
- package/package.json +6 -3
- package/plugins/pmx-canvas/assets/preview.png +0 -0
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +3 -1
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +2 -2
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +440 -18
- package/skills/data-analysis/SKILL.md +13 -26
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/SKILL.md +3 -0
- package/skills/pmx-canvas/SKILL.md +232 -842
- package/skills/pmx-canvas/evals/evals.json +26 -3
- package/skills/pmx-canvas/references/full-reference.md +80 -20
- package/skills/pmx-canvas/references/html-primitives.md +7 -0
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +6 -6
- package/skills/pmx-canvas/references/tours-and-recording.md +29 -2
- package/skills/pmx-canvas/references/workbench-workflows.md +900 -0
- package/skills/pmx-canvas-testing/SKILL.md +7 -5
- package/skills/published-consumer-e2e/SKILL.md +25 -8
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +51 -75
- package/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills/web-artifacts-builder/SKILL.md +6 -0
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +2 -2
- package/src/cli/commands/apps.ts +1 -0
- package/src/cli/commands/boards.ts +30 -0
- package/src/client/App.tsx +20 -4
- package/src/client/canvas/AttentionHistory.tsx +10 -2
- package/src/client/canvas/BoardMoveDialog.tsx +225 -0
- package/src/client/canvas/CanvasNode.tsx +45 -2
- package/src/client/canvas/CanvasViewport.tsx +38 -9
- package/src/client/canvas/ContextMenu.tsx +34 -12
- package/src/client/canvas/EdgeEditor.tsx +149 -0
- package/src/client/canvas/EdgeLayer.tsx +87 -16
- package/src/client/canvas/ExpandedNodeOverlay.tsx +4 -0
- package/src/client/canvas/GroupNavigation.tsx +85 -0
- package/src/client/canvas/RelationsPanel.tsx +9 -0
- package/src/client/canvas/SelectionBar.tsx +21 -0
- package/src/client/canvas/SessionPanel.tsx +35 -1
- package/src/client/canvas/TextPrompt.tsx +18 -1
- package/src/client/canvas/TopBar.tsx +30 -0
- package/src/client/canvas/canvas-area.ts +1 -1
- package/src/client/nodes/ExtAppFrame.tsx +26 -10
- package/src/client/nodes/MarkdownNode.tsx +6 -7
- package/src/client/nodes/PromptNode.tsx +32 -3
- package/src/client/nodes/StatusNode.tsx +12 -0
- package/src/client/nodes/StatusSummary.tsx +11 -0
- package/src/client/nodes/ViewerFrame.tsx +21 -10
- package/src/client/nodes/WorkCard.tsx +175 -0
- package/src/client/nodes/use-ax-surface-bridge.ts +18 -14
- package/src/client/state/attention-bridge.ts +5 -0
- package/src/client/state/attention-store.ts +1 -0
- package/src/client/state/canvas-store.ts +185 -15
- package/src/client/state/human-store.ts +22 -2
- package/src/client/state/intent-bridge.ts +19 -5
- package/src/client/state/relation-store.ts +127 -1
- package/src/client/theme/global.css +94 -1
- package/src/client/types.ts +1 -0
- package/src/mcp/server.ts +13 -3
- package/src/server/agent-presence.ts +43 -23
- package/src/server/ax-flow-loop.ts +6 -0
- package/src/server/ax-gate-ttl.ts +8 -1
- package/src/server/ax-interaction.ts +16 -10
- package/src/server/ax-state-manager.ts +17 -4
- package/src/server/ax-wait.ts +20 -6
- package/src/server/board-export.ts +19 -6
- package/src/server/board-local.ts +20 -0
- package/src/server/board-move.ts +297 -0
- package/src/server/canvas-db.ts +249 -158
- package/src/server/canvas-operations.ts +139 -109
- package/src/server/canvas-schema.ts +21 -0
- package/src/server/canvas-serialization.ts +2 -0
- package/src/server/canvas-state.ts +792 -159
- package/src/server/card-relocation.ts +53 -0
- package/src/server/code-graph.ts +4 -3
- package/src/server/context-reads.ts +83 -55
- package/src/server/demo-state.json +35 -15
- package/src/server/file-watcher.ts +30 -10
- package/src/server/human-presence.ts +18 -5
- package/src/server/index.ts +35 -15
- package/src/server/intent-registry.ts +43 -5
- package/src/server/knowledge-lifecycle.ts +32 -9
- package/src/server/lifecycle-status.ts +29 -1
- package/src/server/mcp-app-runtime.ts +26 -7
- package/src/server/mutation-history.ts +37 -8
- package/src/server/operations/composites.ts +6 -3
- package/src/server/operations/mcp-contracts.ts +15 -0
- package/src/server/operations/mcp.ts +36 -9
- package/src/server/operations/ops/annotation.ts +22 -1
- package/src/server/operations/ops/ax-await.ts +1 -0
- package/src/server/operations/ops/ax-timeline.ts +28 -2
- package/src/server/operations/ops/batch.ts +25 -11
- package/src/server/operations/ops/boards.ts +44 -3
- package/src/server/operations/ops/nodes.ts +70 -0
- package/src/server/operations/ops/query.ts +32 -3
- package/src/server/operations/ops/snapshots.ts +1 -0
- package/src/server/operations/registry.ts +49 -4
- package/src/server/server.ts +62 -16
- package/src/server/tour-control.ts +37 -12
- package/src/server/trace-manager.ts +4 -0
- package/src/server/web-artifacts/scripts/init-artifact.sh +2 -2
- package/src/shared/agent-context.ts +7 -1
- package/src/shared/auto-arrange.ts +5 -4
- package/src/shared/ax-kinds.ts +13 -0
- package/src/shared/ax-surface-protocol.ts +22 -0
- package/src/shared/human-presence.ts +1 -0
- package/src/shared/lifecycle-status.ts +2 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +0 -1
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +0 -1
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +0 -1
- package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +0 -1
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +0 -1
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +0 -1
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +0 -1
- package/dist/canvas/chunks/index-1r72hdzb.js +0 -301
- package/dist/canvas/chunks/index-g3pwnqeb.js +0 -2
- package/dist/canvas/chunks/index-rft2hcz5.js +0 -2
- package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +0 -1
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +0 -70
- package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +0 -1
- package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +0 -1
- package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +0 -1
- package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +0 -1
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +0 -1
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +0 -1
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +0 -1
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +0 -1
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +0 -8
- package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +0 -1
- package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +0 -1
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +0 -34
- package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +0 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# GitHub Copilot App Adapter
|
|
2
|
+
|
|
3
|
+
Use this reference when PMX Canvas is running inside the GitHub Copilot app as a project canvas
|
|
4
|
+
extension. The adapter is intentionally thin: PMX Canvas remains the state owner, and the extension
|
|
5
|
+
maps Copilot SDK features onto PMX AX primitives.
|
|
6
|
+
|
|
7
|
+
The [standalone agent plugin](https://github.com/pskoett/pmx-canvas/blob/main/docs/agent-plugin.md) bundles this adapter and PMX's
|
|
8
|
+
MCP launcher. Its native canvas is Copilot-only; other Agent Plugins-compatible clients use
|
|
9
|
+
the portable MCP tools and browser workbench.
|
|
10
|
+
|
|
11
|
+
## Adapter Identity
|
|
12
|
+
|
|
13
|
+
- Extension path: `.github/extensions/pmx-canvas/extension.mjs`
|
|
14
|
+
- Extension ID: `project:pmx-canvas`
|
|
15
|
+
- Canvas ID: `pmx-canvas`
|
|
16
|
+
- Display name: `PMX Canvas`
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
1. Install the project adapter with `pmx-canvas copilot install-extension --yes`, or copy the
|
|
21
|
+
packaged extension directory into the repository:
|
|
22
|
+
`mkdir -p .github/extensions && cp -R node_modules/pmx-canvas/.github/extensions/pmx-canvas .github/extensions/`
|
|
23
|
+
2. Reload Copilot app extensions with `extensions_reload` so `project:pmx-canvas` is registered.
|
|
24
|
+
3. The adapter discovers a matching workspace daemon or starts the pinned package version
|
|
25
|
+
in `runtime.json` with Bun. It needs Bun on `PATH`, not a global `pmx-canvas` executable.
|
|
26
|
+
The shared daemon stays running when the extension exits.
|
|
27
|
+
4. Open the canvas with `extensionId: "project:pmx-canvas"`, `canvasId: "pmx-canvas"`, and a stable
|
|
28
|
+
`instanceId`.
|
|
29
|
+
5. If the first `invoke_canvas_action` immediately after `open_canvas` returns
|
|
30
|
+
`Canvas instance not open`, retry the same action once. This is a known Copilot app timing race
|
|
31
|
+
during panel initialization, not a PMX server failure.
|
|
32
|
+
|
|
33
|
+
Open it with:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"extensionId": "project:pmx-canvas",
|
|
38
|
+
"canvasId": "pmx-canvas",
|
|
39
|
+
"instanceId": "pmx-canvas"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use a different `instanceId` for parallel panels. Reusing an `instanceId` focuses/reloads the same
|
|
44
|
+
panel.
|
|
45
|
+
|
|
46
|
+
## Agent presence (automatic)
|
|
47
|
+
|
|
48
|
+
The extension also reports Copilot's real context window: the SDK's `session.usage_info`
|
|
49
|
+
event (`currentTokens` / `tokenLimit`, root agent only) is posted to the presence as
|
|
50
|
+
`contextUsage`, so the board's context panel names how many tokens Copilot's whole context holds,
|
|
51
|
+
next to what the brief costs.
|
|
52
|
+
|
|
53
|
+
The extension attaches a Copilot session to the canvas when it joins the host session, flips the
|
|
54
|
+
phase to `thinking` on every submitted prompt, and detaches on exit. While attached the workbench
|
|
55
|
+
shows the Copilot cursor on the node the agent last touched plus a phase chip, and the agent's
|
|
56
|
+
canvas writes — which reach the server as MCP or HTTP tool calls, not as `copilot` — are attributed
|
|
57
|
+
to that session by the server. Nothing to configure; `GET /api/canvas/ax/presence` shows the live
|
|
58
|
+
state.
|
|
59
|
+
|
|
60
|
+
Read presence before starting board work. Reuse the extension's `copilot` session and
|
|
61
|
+
steering consumer; do not attach a second session such as “Copilot – team overview” with
|
|
62
|
+
a new source or `agentId`. Send task names as `detail` on `source: "copilot"`, preserving
|
|
63
|
+
the host's identity and polling route. The adapter owns attach/detach; the agent must not
|
|
64
|
+
end it after each task. Explicit agent IDs are reserved for genuinely independent subagents.
|
|
65
|
+
|
|
66
|
+
## What the Adapter Does
|
|
67
|
+
|
|
68
|
+
- Opens the live PMX workbench directly in a native Copilot canvas panel.
|
|
69
|
+
- Uses PMX-served same-origin frame documents for iframe-backed nodes (`html` and hosted MCP apps).
|
|
70
|
+
The Copilot app webview can leave nested `srcdoc` and `blob:` iframes blank, so PMX should route
|
|
71
|
+
generated frame HTML through `/api/canvas/frame-documents/...` instead.
|
|
72
|
+
- Connects to a matching local PMX server for the current workspace, or starts one when needed.
|
|
73
|
+
- Uses the session's working directory for startup, context, presence, and steering; Copilot's
|
|
74
|
+
`workspacePath` points to session artifacts and is not the project root.
|
|
75
|
+
- Reads `/api/canvas/ax/context` and injects pinned/focused context from
|
|
76
|
+
`onUserPromptSubmitted`.
|
|
77
|
+
- Exposes adapter actions for status, AX context refresh, AX focus, and explicit session steering.
|
|
78
|
+
|
|
79
|
+
### Agent behavior — steering push with a gated fallback
|
|
80
|
+
|
|
81
|
+
The adapter long-polls the consumer-scoped delivery queue, sends each steer through
|
|
82
|
+
`copilotSession.send`, and marks it only after the host accepts the prompt. Browser-originated
|
|
83
|
+
steering therefore creates a Copilot turn without waiting for another chat message. Addressed
|
|
84
|
+
steers follow their target; broadcasts are marked only for the `copilot` consumer; Copilot-origin
|
|
85
|
+
messages are excluded by the queue's loop-safety filter.
|
|
86
|
+
|
|
87
|
+
On adapter startup, existing backlog is marked for the `copilot` consumer without creating turns.
|
|
88
|
+
Only steers created after that adapter instance started can wake it, so reopening Copilot cannot
|
|
89
|
+
flood the chat with stale instructions from prior sessions.
|
|
90
|
+
|
|
91
|
+
`onUserPromptSubmitted` remains the fallback. It injects the whole `/api/canvas/ax/context`
|
|
92
|
+
(pins, focus, work items, approval gates, and the compact `delivery` lead block) as hidden context,
|
|
93
|
+
but only when the **pin/focus gate is open** (`pinned.count > 0 || focus.nodeIds.length > 0`), and
|
|
94
|
+
it is clipped to a char budget. Read steering from **`delivery.pendingSteering`** (the compact,
|
|
95
|
+
count-bearing block — newest-first, capped at 10), not the full `timeline.pendingSteering`.
|
|
96
|
+
|
|
97
|
+
Each prompt's injection is recorded in the context read log (`pmx-canvas ax reads`) as
|
|
98
|
+
`copilot:prompt-context`, with delivery computed from the clipped text Copilot actually received.
|
|
99
|
+
|
|
100
|
+
If native send fails, the adapter leaves the steer unmarked and retries. If marking fails after a
|
|
101
|
+
successful send, the in-process pump retries the mark without sending the prompt twice. A process
|
|
102
|
+
restart establishes a new delivery baseline and marks older unacknowledged rows without replaying
|
|
103
|
+
them.
|
|
104
|
+
|
|
105
|
+
To be robust to the char clip, prefer injecting that compact loop-safe lead block from
|
|
106
|
+
`GET /api/canvas/ax/context?consumer=copilot` (`delivery.pendingSteering` +
|
|
107
|
+
`delivery.totalPending` / `delivery.omittedPending` + `delivery.pendingActivity`)
|
|
108
|
+
**above** the full dump. When `omittedPending > 0`, drain the full FIFO backlog from
|
|
109
|
+
`canvas_ax_delivery { action: "claim", consumer: "copilot" }` (oldest-first).
|
|
110
|
+
|
|
111
|
+
#### Waking the agent from a canvas steer (#59) — adapter-owned
|
|
112
|
+
|
|
113
|
+
Recording a browser-origin `ax.steer` queues it in PMX; the Copilot adapter owns the wake. Its
|
|
114
|
+
delivery pump long-polls `…/delivery/pending?consumer=copilot`, calls
|
|
115
|
+
`copilotSession.send`, then marks that consumer's delivery. PMX remains host-agnostic and never
|
|
116
|
+
imports the Copilot SDK.
|
|
117
|
+
|
|
118
|
+
### Closing the loop (optional, recommended)
|
|
119
|
+
|
|
120
|
+
- **Forward tool/session hooks** (`onPreToolUse` / `onPostToolUse` /
|
|
121
|
+
`onPostToolUseFailure` / `onSessionStart` / `onSessionEnd` / `onErrorOccurred`) to
|
|
122
|
+
`POST /api/canvas/ax/activity` (`canvas_ingest_activity`) so the board reflects the
|
|
123
|
+
agent's real work automatically (a failed tool → a blocked work item + review +
|
|
124
|
+
evidence).
|
|
125
|
+
- **Await gates** with `canvas_ax_gate { kind, action: "await", id }` (or surface a native modal
|
|
126
|
+
and await the PMX result) so an approval gate actually blocks the agent until the human resolves it.
|
|
127
|
+
|
|
128
|
+
See [`docs/ax-host-adapter-contract.md`](https://github.com/pskoett/pmx-canvas/blob/main/docs/ax-host-adapter-contract.md).
|
|
129
|
+
- Keeps all persistent PMX state in `.pmx-canvas/canvas.db`; the extension does not own canvas
|
|
130
|
+
state.
|
|
131
|
+
|
|
132
|
+
## Open Input
|
|
133
|
+
|
|
134
|
+
All fields are optional:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"serverUrl": "http://127.0.0.1:4313",
|
|
139
|
+
"port": 4313,
|
|
140
|
+
"autoStart": true,
|
|
141
|
+
"allowWorkspaceMismatch": false,
|
|
142
|
+
"workspaceRoot": "/path/to/repo"
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Default discovery:
|
|
147
|
+
|
|
148
|
+
1. An explicit `serverUrl` input or `PMX_CANVAS_URL`, without silently choosing another target.
|
|
149
|
+
2. Workspace daemon pid-file ports, the preferred `PMX_CANVAS_PORT` / `PMX_WEB_CANVAS_PORT`,
|
|
150
|
+
and the normal MCP fallback ports, verified against the workspace's real path.
|
|
151
|
+
3. Serialized daemon startup for the session working directory when `autoStart` is not `false`.
|
|
152
|
+
|
|
153
|
+
The adapter rejects an unrelated running PMX server unless `allowWorkspaceMismatch` is true,
|
|
154
|
+
including when `serverUrl` is explicit.
|
|
155
|
+
|
|
156
|
+
To package this adapter in another plugin, copy `extension.mjs`, `steering-delivery.mjs`,
|
|
157
|
+
`runtime.mjs`, and `runtime.json`. For the portable MCP connector, also copy `start-mcp.mjs`,
|
|
158
|
+
`tools.json`, and `THIRD_PARTY_LICENSES.txt`, and invoke `start-mcp.mjs` with Bun. The agent calls
|
|
159
|
+
`canvas_connect_workspace` with its absolute project directory before using board tools;
|
|
160
|
+
plugin initialization must never adopt the installation directory as a project.
|
|
161
|
+
|
|
162
|
+
If discovery fails, the panel shows a connection page, not a partial workbench. It checks the
|
|
163
|
+
original target automatically; **Check connection** retries immediately and **Start server**
|
|
164
|
+
explicitly allows local startup even if `autoStart` was disabled. After recovery it navigates
|
|
165
|
+
to the server's real `/workbench`, with Home and recent boards. Adapter actions keep using that
|
|
166
|
+
server and refuse writes if its workspace changes. Reopen the canvas explicitly to select a
|
|
167
|
+
different target. The fallback shell's own `/health` or `/api/canvas/boards` returning 404 is
|
|
168
|
+
expected: the shell is not a PMX API proxy.
|
|
169
|
+
|
|
170
|
+
## Actions
|
|
171
|
+
|
|
172
|
+
| Action | Purpose |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `status` | Return PMX server health and persisted AX state, excluding serialized node context (`includeContext=false`). |
|
|
175
|
+
| `get_ax_context` | Return current pinned + focused AX context. |
|
|
176
|
+
| `focus_nodes` | Set AX focus with `source: "copilot"`. |
|
|
177
|
+
| `send_instruction` | Send an explicit prompt into the active Copilot session. |
|
|
178
|
+
| `add_work_item` | Create a canvas-bound AX work item. |
|
|
179
|
+
| `request_approval` | Open an approval gate (`pending`) before a high-impact action. |
|
|
180
|
+
| `resolve_approval` | Resolve an approval gate as approved/rejected. |
|
|
181
|
+
| `add_review_annotation` | Record a review comment/finding anchored to a node/file/region. |
|
|
182
|
+
| `get_timeline` | Read the bounded AX timeline (events, evidence, steering). |
|
|
183
|
+
| `report_capability` | Report host capabilities for diagnostics. |
|
|
184
|
+
|
|
185
|
+
Example focus action:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"nodeIds": ["node-123"]
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Use `nodeIds: []` to clear adapter-set AX focus after a live test.
|
|
194
|
+
|
|
195
|
+
## Live-Test Checklist
|
|
196
|
+
|
|
197
|
+
After changing the adapter:
|
|
198
|
+
|
|
199
|
+
1. Reload extensions.
|
|
200
|
+
2. Inspect `pmx-canvas` and confirm status is `running`.
|
|
201
|
+
3. Call `list_canvas_capabilities` for `extensionId: "project:pmx-canvas"` and
|
|
202
|
+
`canvasId: "pmx-canvas"`.
|
|
203
|
+
4. Open the canvas with a stable `instanceId`.
|
|
204
|
+
5. Invoke `status`.
|
|
205
|
+
6. Invoke `get_ax_context`.
|
|
206
|
+
7. If at least one node exists, invoke `focus_nodes` for one node ID and confirm
|
|
207
|
+
`get_ax_context.focus.nodeIds` includes it.
|
|
208
|
+
8. Clear the focus with `focus_nodes` and `nodeIds: []`.
|
|
209
|
+
9. Add or reuse one `html` node and one hosted MCP app node and confirm both render visibly in the
|
|
210
|
+
native PMX panel, not only in an external browser.
|
|
211
|
+
10. Inspect the extension log tail and confirm there are no runtime errors.
|
|
212
|
+
|
|
213
|
+
## Agent Behavior
|
|
214
|
+
|
|
215
|
+
When this adapter is loaded, the next user prompt may include hidden AX context generated from PMX
|
|
216
|
+
pins and focus. Treat pinned nodes and focused nodes as human-selected working context, not as a
|
|
217
|
+
global instruction to ignore the rest of the repository.
|
|
218
|
+
|
|
219
|
+
For non-Copilot agents, use the same core primitives directly:
|
|
220
|
+
|
|
221
|
+
- HTTP: `/api/canvas/ax`, `/api/canvas/ax/context`, `/api/canvas/ax/focus`
|
|
222
|
+
- MCP: `canvas://ax`, `canvas://ax-context`, `canvas_ax_state { action: "get" }`, `canvas_ax_state { action: "set-focus" }`
|
|
223
|
+
- CLI: `pmx-canvas ax status|context|focus`
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# HTML Primitive Authoring
|
|
2
|
+
|
|
3
|
+
Use this guide when creating reusable sandboxed HTML communication primitives through
|
|
4
|
+
`canvas_node { action: "add", type: "html", primitive, data }` or `pmx-canvas html primitive add`.
|
|
5
|
+
|
|
6
|
+
## What They Are
|
|
7
|
+
|
|
8
|
+
HTML primitives are generated `html` nodes. PMX Canvas stores the generated HTML in the normal
|
|
9
|
+
sandboxed iframe node, plus metadata describing the primitive kind and source data.
|
|
10
|
+
|
|
11
|
+
- Use them when markdown becomes too dense but a full React web artifact would be too heavy.
|
|
12
|
+
- Prefer them for communication artifacts: choices, plans, reviews, maps, explainers, reports,
|
|
13
|
+
lightweight editors, and handoff boards.
|
|
14
|
+
- Keep using `canvas_node { action: "add", type: "html", html }` for bespoke one-off HTML and JS.
|
|
15
|
+
- Keep using `canvas_app { action: "build-artifact" }` for multi-component apps, routing, React state, or shadcn UI.
|
|
16
|
+
|
|
17
|
+
The design language is inspired by high-density HTML communication patterns: strong hierarchy,
|
|
18
|
+
metric cards, sticky context panels, annotated snippets, inline SVG figures, and copy/export actions.
|
|
19
|
+
Do not copy upstream demo HTML verbatim; use the PMX primitive catalog and data shapes instead.
|
|
20
|
+
|
|
21
|
+
## Current Catalog
|
|
22
|
+
|
|
23
|
+
| Kind | Best use |
|
|
24
|
+
|------|----------|
|
|
25
|
+
| `choice-grid` | Side-by-side options with pros, cons, tradeoffs, and evidence |
|
|
26
|
+
| `plan-timeline` | Sequenced implementation plans with risks, flow, and checkpoints |
|
|
27
|
+
| `review-sheet` | PR or code review findings with severity, file, line, and diff context |
|
|
28
|
+
| `pr-writeup` | Reviewer-ready PR narrative with motivation, file tour, tests, and rollout |
|
|
29
|
+
| `system-map` | Architecture/module maps with entry points and relationships |
|
|
30
|
+
| `code-walkthrough` | Guided source-path explanations with ordered steps and snippets |
|
|
31
|
+
| `design-sheet` | Visual directions, palettes, tokens, type samples, and rationale |
|
|
32
|
+
| `component-gallery` | Component variants, states, sizes, and accessibility notes |
|
|
33
|
+
| `interaction-prototype` | Throwaway interaction or motion studies with live controls |
|
|
34
|
+
| `flowchart` | Process, journey, pipeline, and failure-path diagrams |
|
|
35
|
+
| `deck` | Compact arrow-key narrative decks with speaker notes |
|
|
36
|
+
| `presentation` | Fullscreen-ready PowerPoint-like slide decks for briefings and pitches |
|
|
37
|
+
| `illustration-set` | Inline SVG figure sheets with captions and SVG copy/export |
|
|
38
|
+
| `explainer` | Feature or algorithm explainers with TLDR, steps, FAQ, and glossary |
|
|
39
|
+
| `status-report` | Skimmable project health with metrics, shipped/slipped lists, and next actions |
|
|
40
|
+
| `incident-report` | Incident summaries with impact, timeline, root cause, logs, and action items |
|
|
41
|
+
| `triage-board` | Human-reorderable Now/Next/Later/Cut boards with markdown export |
|
|
42
|
+
| `config-editor` | Feature flag or config editors with dependency warnings and diff export |
|
|
43
|
+
| `prompt-tuner` | Prompt/template editors with variable previews and copy export |
|
|
44
|
+
|
|
45
|
+
## Request Shape
|
|
46
|
+
|
|
47
|
+
Use the running server as the source of truth before constructing data payloads:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pmx-canvas html primitive schema --summary
|
|
51
|
+
pmx-canvas html primitive schema --kind explainer
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
MCP shape:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"kind": "explainer",
|
|
59
|
+
"title": "HTML Primitives",
|
|
60
|
+
"data": {
|
|
61
|
+
"summary": "Reusable generated HTML nodes for rich agent-to-human communication.",
|
|
62
|
+
"steps": [
|
|
63
|
+
{ "title": "Pick a primitive", "detail": "Match the work product to the catalog kind." }
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"x": 120,
|
|
67
|
+
"y": 80,
|
|
68
|
+
"width": 980,
|
|
69
|
+
"height": 760
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
CLI shape:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pmx-canvas html primitive add \
|
|
77
|
+
--kind choice-grid \
|
|
78
|
+
--title "Implementation Options" \
|
|
79
|
+
--data-json '{"items":[{"title":"Small patch","summary":"Least disruption","tradeoff":"Limited future flexibility","pros":["Fast"],"cons":["May need follow-up"]}]}'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Important details:
|
|
83
|
+
|
|
84
|
+
- `kind` is required.
|
|
85
|
+
- `title`, `data`, `x`, `y`, `width`, `height`, and `strictSize` are optional.
|
|
86
|
+
- The persisted node type is `html`, not a separate durable `html-primitive` node type.
|
|
87
|
+
- `html-primitive` is accepted by schema validation and convenience creation paths as a virtual type.
|
|
88
|
+
- Batch `node.add` does not create HTML primitives; use the dedicated primitive tool first or batch the generated `html` node.
|
|
89
|
+
|
|
90
|
+
## Payload Rules
|
|
91
|
+
|
|
92
|
+
- Keep titles short and scannable; put detail in structured fields.
|
|
93
|
+
- Prefer arrays of small records over one large prose blob.
|
|
94
|
+
- Include file paths, line numbers, test commands, and exact statuses when the primitive is review or engineering focused.
|
|
95
|
+
- Use `summary`, `why`, `risks`, `next`, `tests`, and `reviewFocus` fields when the chosen primitive supports them.
|
|
96
|
+
- For `presentation`, use `slides: [{ title, kicker?, body?, bullets?, metrics?, note? }]`; keep one idea per slide, use `metrics` for big numbers, and put speaker notes in `note`.
|
|
97
|
+
- Only choose `presentation` when the user explicitly asks for a PowerPoint-like deck, pitch, briefing, workshop walkthrough, or fullscreen story. Otherwise create a normal `html` node or a non-presentation primitive.
|
|
98
|
+
- Presentation data supports `theme: "canvas" | "midnight" | "paper" | "aurora"` or a custom color object with `bg`, `panel`, `surface`, `border`, `text`, `textSecondary`, `textMuted`, `accent`, and `colorScheme`.
|
|
99
|
+
- For visual primitives, provide colors as hex/rgb/hsl values only; unsafe color strings are discarded.
|
|
100
|
+
- For editor primitives, seed realistic initial columns, flags, controls, variables, or template text so the human can interact immediately.
|
|
101
|
+
|
|
102
|
+
## Human Feedback Loop
|
|
103
|
+
|
|
104
|
+
Interactive/editor primitives are useful when the human should modify state and return it to the
|
|
105
|
+
agent.
|
|
106
|
+
|
|
107
|
+
- `triage-board` lets the human reorder and rebucket items, then copy markdown.
|
|
108
|
+
- `config-editor` lets the human toggle flags and copy a diff-like export.
|
|
109
|
+
- `prompt-tuner` lets the human edit prompts, preview sample substitutions, and copy the current prompt state.
|
|
110
|
+
- `interaction-prototype` exposes live controls and copyable config for implementation tuning.
|
|
111
|
+
- Tell the human which copy/export button to use, then ask them to paste the result back if you need to act on edits.
|
|
112
|
+
|
|
113
|
+
The card menu also offers **Copy JSON** for non-presentation HTML primitives. Open the viewer
|
|
114
|
+
first: this reads its current interactive state, preferring the expanded frame when present,
|
|
115
|
+
not a stale export of saved node data. The reply is bound to the frame source, document token
|
|
116
|
+
and request ID; the parent workbench requests clipboard access from the human's click.
|
|
117
|
+
Clipboard permission or host limitations can still refuse the copy and show an error.
|
|
118
|
+
This does not persist edits, support arbitrary raw HTML, or replace the per-format buttons above.
|
|
119
|
+
|
|
120
|
+
## Sandbox And Persistence
|
|
121
|
+
|
|
122
|
+
- Primitive output runs inside the existing HTML iframe sandbox with scripts allowed but no same-origin access.
|
|
123
|
+
- Generated HTML receives PMX Canvas theme CSS variables so it adapts to the current canvas theme, and sandboxed iframes receive live theme updates when the canvas theme changes.
|
|
124
|
+
- Generated and raw HTML nodes store an agent-readable summary sidecar (`agentSummary`, `contentSummary`, and embedded references) for search, pinned context, and spatial context.
|
|
125
|
+
- Only presentation-marked HTML nodes have a browser `Present` button. Use it for `presentation` nodes so the human can review the deck fullscreen, navigate slides with arrow keys/Space/Page Up/Page Down, and exit with `Esc` or `Exit presentation`.
|
|
126
|
+
- Presentation primitives also persist `presentation`, `slideCount`, `slideTitles`, and optional `speakerNotes` metadata so agents can understand the deck without parsing the iframe HTML.
|
|
127
|
+
- Primitive data is persisted in canvas state; do not include secrets, credentials, private tokens, or unnecessary personal data.
|
|
128
|
+
- Treat primitives as communication surfaces, not authoritative application state. If the result must be machine-roundtrippable, keep the original data in the node metadata or another structured node as well.
|
|
129
|
+
|
|
130
|
+
## Picking The Right Primitive
|
|
131
|
+
|
|
132
|
+
- Pick `choice-grid` when a decision has competing options.
|
|
133
|
+
- Pick `plan-timeline` when sequence, dependency, and risk matter.
|
|
134
|
+
- Pick `review-sheet` or `pr-writeup` for code review and pull-request communication.
|
|
135
|
+
- Pick `system-map`, `code-walkthrough`, or `flowchart` for architecture and source explanations.
|
|
136
|
+
- Pick `design-sheet`, `component-gallery`, `interaction-prototype`, or `illustration-set` for visual/product work.
|
|
137
|
+
- Pick `presentation` when the human asks for a PowerPoint-like deck, pitch, briefing, workshop walkthrough, or fullscreen story.
|
|
138
|
+
- Pick `explainer`, `deck`, `status-report`, or `incident-report` for narrative reporting.
|
|
139
|
+
- Pick `triage-board`, `config-editor`, or `prompt-tuner` when the human needs to edit or return structured feedback.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Importing context
|
|
2
|
+
|
|
3
|
+
Use this workflow when bringing existing context into PMX Canvas from folders, repositories,
|
|
4
|
+
documents, notes, backlogs, structured exports or knowledge bases. It guides organization and
|
|
5
|
+
verification, not a universal file converter or live sync. PDF/Office attachments still require
|
|
6
|
+
the human-consented extraction and review workflow; this guide does not bypass it.
|
|
7
|
+
|
|
8
|
+
## Inspect the source before choosing the structure
|
|
9
|
+
|
|
10
|
+
Inventory the requested scope, file types, existing categories, references and assets. Read
|
|
11
|
+
representative content before mapping it: folder names alone do not establish board boundaries,
|
|
12
|
+
and files may contain several independent items or one argument that should stay together.
|
|
13
|
+
Identify duplicates, historical material, unsupported formats and inaccessible sources. Report
|
|
14
|
+
gaps rather than silently skipping them or claiming extraction succeeded. Keep private context
|
|
15
|
+
within the authorized destination; a folder import is not permission to include credentials.
|
|
16
|
+
|
|
17
|
+
## Choose boards and cards by purpose
|
|
18
|
+
|
|
19
|
+
Categories organize boards; boards hold coherent topics or workflows; cards hold useful content.
|
|
20
|
+
Preserve useful categories and folder context without mechanically copying the directory tree.
|
|
21
|
+
A project folder may become an overview board, a backlog with item cards, and a research board.
|
|
22
|
+
Several small files may belong on one board; a single export may need several boards. Choose
|
|
23
|
+
cards by useful units of meaning, not automatically one per file, heading or data row. Retain
|
|
24
|
+
section context, nested details and useful source ordering when splitting content. These are
|
|
25
|
+
examples, not a fixed taxonomy. Explain consequential grouping choices and make them easy to revise.
|
|
26
|
+
Several boards in one category are fine. Keep an argument together when splitting would lose
|
|
27
|
+
meaning. Group related cards and use the main skill's README and focus guidance for a readable start.
|
|
28
|
+
|
|
29
|
+
Lead each card with the task, item, decision or document section the reader came to find.
|
|
30
|
+
Retain ancestor headings, folder/repository context and source details below that content,
|
|
31
|
+
not as repeated preambles that push every useful item below the card's visible area. Preserve
|
|
32
|
+
meaning and source hierarchy without making the reader expand every card to identify it.
|
|
33
|
+
|
|
34
|
+
## Preserve sources and stable targets
|
|
35
|
+
|
|
36
|
+
Work in an isolated workspace for a test import. Preserve an existing import before replacing
|
|
37
|
+
it, and leave source material unchanged unless editing it was requested. Record source paths,
|
|
38
|
+
URLs or record IDs, revisions where available, and the source-item/section → board/card ID
|
|
39
|
+
mapping so interruptions and retries can reuse created objects instead of duplicating them.
|
|
40
|
+
Distinguish faithful imports from summaries; keep a path back to the original. Capture the active
|
|
41
|
+
board before writes, separately from any explicit destination. Create destination boards and
|
|
42
|
+
cards before rewriting internal references, use returned IDs rather than guessed titles, and
|
|
43
|
+
preserve external links.
|
|
44
|
+
|
|
45
|
+
Create supported static cards, groups and edges on an inactive board with `destinationBoardId`
|
|
46
|
+
without switching the human's view. Static nodes are Markdown, status, context, ledger, trace,
|
|
47
|
+
diff, Mermaid and plain HTML; images, runtime-backed nodes, generated primitives and intents
|
|
48
|
+
are not supported by this path. Updates/removals still require the active board. In a named
|
|
49
|
+
`canvas_batch`, each operation's `args` carries its destination and retry fields; group children
|
|
50
|
+
and edge endpoints can use the existing named references. `toBoardId` independently chooses a
|
|
51
|
+
remote edge endpoint, not the board that owns its source.
|
|
52
|
+
|
|
53
|
+
Assign a stable `requestId` to each logical static node/group/edge creation and retain it in
|
|
54
|
+
the source-to-canvas mapping. Retry with the same input and destination: the durable receipt
|
|
55
|
+
returns the original result after interruption or restart, even if the object was subsequently
|
|
56
|
+
edited or deleted. It does not restore deleted objects. Changed-input reuse conflicts; a new
|
|
57
|
+
intentional creation gets a new ID even when its content is identical. Batch operations commit
|
|
58
|
+
in sequence, not as one all-or-nothing import. Persist the mapping as receipts arrive.
|
|
59
|
+
|
|
60
|
+
`expectedBoardId` guards the active board even with an explicit destination. A stale guard
|
|
61
|
+
means refresh context, not substitute the destination ID or switch the human's view to retry.
|
|
62
|
+
For active-only work, explicitly open the intended board and verify its returned ID first.
|
|
63
|
+
Scope fences and human edit locks remain enforced. If Home is active, list/open a suitable
|
|
64
|
+
board before reading board context; library discovery and background static creation can
|
|
65
|
+
stay on Home. For retrieval, `canvas_query` search accepts intersecting `boardId` and `folder`
|
|
66
|
+
filters. Folder includes slash-boundary descendants; `folder: ""` selects unfiled boards.
|
|
67
|
+
Filters default omitted scope to library, while explicit active scope never widens. Search
|
|
68
|
+
never changes the active board.
|
|
69
|
+
|
|
70
|
+
Use native `references` edges for explicit source links and qualified remote endpoints for
|
|
71
|
+
cross-board cards. Add semantic relations only when the source supports them; record the
|
|
72
|
+
supporting passage or source reference in `reason`. Similar subjects alone do not establish
|
|
73
|
+
dependency, causation or supersession. Follow the main skill's direction rules for dependency kinds.
|
|
74
|
+
|
|
75
|
+
Preserve historical/draft status and source evidence dates. Importing, reading or rendering
|
|
76
|
+
content does not revalidate it. Flag source contradictions separately from conversion errors
|
|
77
|
+
and product bugs; do not silently rewrite uncertain facts or invent validation dates.
|
|
78
|
+
|
|
79
|
+
## Markdown link conversion
|
|
80
|
+
|
|
81
|
+
For content represented as Markdown, use returned IDs in `[[board-id#card-id|label]]` links
|
|
82
|
+
and keep code spans/fences unchanged. In table cells, escape the alias pipe:
|
|
83
|
+
`[[board-id#card-id\|label]]`. Otherwise the table parser can split the link before the wiki
|
|
84
|
+
link parser sees it. Zero unresolved links is not sufficient: compare expected source link
|
|
85
|
+
occurrences with rendered anchors. This is a Markdown rendering concern, not a source-format requirement.
|
|
86
|
+
|
|
87
|
+
## Keep picture bytes out of long Markdown
|
|
88
|
+
|
|
89
|
+
Prefer local asset references over large base64 image strings embedded in Markdown. The
|
|
90
|
+
embedded bytes enlarge layout/render requests; inline pictures remain supported. Choosing
|
|
91
|
+
file-backed assets is a representation choice, not proof that a parser or loading bug is fixed.
|
|
92
|
+
Keep private pictures in the authorized workspace; do not upload them to a public image host.
|
|
93
|
+
|
|
94
|
+
One supported approach is a file-backed image card in the document's board:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{"action":"add","type":"image","content":"assets/diagram.png","title":"System diagram"}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Call `canvas_node` with that payload, then use the returned ID in the document:
|
|
101
|
+
``. Keep the original alt text and connect
|
|
102
|
+
the document to its figure card when useful. This route resolves nodes on the active board:
|
|
103
|
+
keep the image card in the same board, and recheck references after copying or moving cards.
|
|
104
|
+
|
|
105
|
+
Relative image creation paths resolve against the canvas workspace root, not the server's
|
|
106
|
+
launch directory. An absolute path inside that workspace also works. Image creation requires
|
|
107
|
+
opening its destination board; do not send `destinationBoardId` or `requestId` for image nodes.
|
|
108
|
+
The database stores the path, not the file bytes: retain the assets alongside it, update paths
|
|
109
|
+
if relocating the workspace, and verify images in exports rather than assuming the live URL
|
|
110
|
+
is portable.
|
|
111
|
+
|
|
112
|
+
## Verify the imported workspace, not just the API receipts
|
|
113
|
+
|
|
114
|
+
1. Account for each in-scope source item as imported, summarized, intentionally excluded or
|
|
115
|
+
unresolved. Reconcile split items, references and assets with the mapping. Check edge endpoints,
|
|
116
|
+
group containment and collisions with `canvas_query { action: "validate" }`.
|
|
117
|
+
2. Open representative boards for the content actually imported: for example a dense backlog,
|
|
118
|
+
long document, linked table or picture-heavy board. Wait for the correct board and populated
|
|
119
|
+
card bodies, not only titles or HTTP success. Images must load with nonzero natural dimensions.
|
|
120
|
+
3. Wait for the intended card/group bounding rectangle after a camera update. Two animation
|
|
121
|
+
frames do not prove an asynchronous layout update arrived. Inspect screenshots at the
|
|
122
|
+
intended viewing zoom for readable cards, relations, labels and unobscured controls.
|
|
123
|
+
4. Click local and cross-board links; verify the intended card becomes visible. On a disposable
|
|
124
|
+
test service, restart and verify persistence, including pictures. Compare asset bytes when
|
|
125
|
+
changing image representation to confirm originals were preserved.
|
|
126
|
+
5. If loading is slow, measure board-open to rendered-content readiness on repeated equivalent
|
|
127
|
+
workloads. Include a text-only control; record payload sizes, cache conditions and whether
|
|
128
|
+
measurements used a local connection or the user's host. Separate observations from causes.
|
|
129
|
+
|
|
130
|
+
Report coverage, unresolved issues and storage requirements. Distinguish an import workaround
|
|
131
|
+
from a product fix, and a source snapshot from live synchronization. Keep private source paths,
|
|
132
|
+
names and content out of reusable skills and public issue reports.
|