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.
- package/.github/extensions/pmx-canvas/extension.mjs +4 -1
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +440 -18
- package/CHANGELOG.md +51 -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 +267 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1168 -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 +1839 -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 +301 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +117 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +908 -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 +22 -2
- package/docs/amp-plugin.md +270 -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 +4 -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 +248 -842
- package/skills/pmx-canvas/evals/evals.json +110 -5
- package/skills/pmx-canvas/references/full-reference.md +142 -28
- package/skills/pmx-canvas/references/html-primitives.md +7 -0
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +61 -11
- package/skills/pmx-canvas/references/tours-and-recording.md +39 -6
- package/skills/pmx-canvas/references/workbench-workflows.md +908 -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/bundle-artifact.sh +2 -2
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +8 -8
- 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 +262 -160
- 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/bundle-artifact.sh +2 -2
- package/src/server/web-artifacts/scripts/init-artifact.sh +8 -8
- 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
|
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { basename, resolve } from 'node:path';
|
|
4
4
|
import { agentPresence } from './agent-presence.js';
|
|
5
|
+
import { createBoardLocal } from './board-local.js';
|
|
5
6
|
import { recomputeCodeGraph } from './code-graph.js';
|
|
6
7
|
import { diffLayouts } from './mutation-history.js';
|
|
7
8
|
import {
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
type CanvasSnapshot,
|
|
14
15
|
} from './canvas-state.js';
|
|
15
16
|
import { applyFileContentToNodeData, readFileNodeContent } from './file-content.js';
|
|
16
|
-
import { rewatchAllFileNodes,
|
|
17
|
+
import { rewatchAllFileNodes, unwatchFileForNode, watchFileForNode } from './file-watcher.js';
|
|
17
18
|
import {
|
|
18
19
|
closeMcpAppSession,
|
|
19
20
|
hasMcpAppSession,
|
|
@@ -657,93 +658,113 @@ export function primeCanvasRuntimeBackends(options: { forceRehydrateExtApps?: bo
|
|
|
657
658
|
return { targetIds: prepareExtAppNodesForSessionSync(forceRehydrateExtApps) };
|
|
658
659
|
}
|
|
659
660
|
|
|
660
|
-
export
|
|
661
|
+
export function syncCanvasRuntimeBackends(
|
|
661
662
|
options: { forceRehydrateExtApps?: boolean; alreadyPrimed?: boolean } = {},
|
|
662
663
|
): Promise<{ rehydrated: number; failed: number }> {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
options.alreadyPrimed === true
|
|
666
|
-
? canvasState
|
|
667
|
-
.getLayout()
|
|
668
|
-
.nodes.filter((node) => isExtAppNode(node) && node.data.sessionStatus === 'rehydrating')
|
|
669
|
-
.map((node) => node.id)
|
|
670
|
-
: primeCanvasRuntimeBackends(options).targetIds;
|
|
671
|
-
let rehydrated = 0;
|
|
672
|
-
let failed = 0;
|
|
673
|
-
|
|
674
|
-
for (const nodeId of targetIds) {
|
|
675
|
-
if (canvasState.boardGeneration !== boardGeneration) break;
|
|
676
|
-
const current = canvasState.getNode(nodeId);
|
|
677
|
-
if (!isExtAppNode(current)) continue;
|
|
678
|
-
|
|
679
|
-
const transport = normalizeTransportConfig(current.data.transportConfig);
|
|
680
|
-
const toolName = typeof current.data.toolName === 'string' ? current.data.toolName.trim() : '';
|
|
681
|
-
if (!transport || !toolName) {
|
|
682
|
-
canvasState.withSuppressedRecording(() => {
|
|
683
|
-
setExtAppRuntimeState(nodeId, {
|
|
684
|
-
appSessionId: null,
|
|
685
|
-
sessionStatus: 'error',
|
|
686
|
-
sessionError:
|
|
687
|
-
'Saved app session cannot be restored because its launch metadata is incomplete. Reopen the app to restore interactivity.',
|
|
688
|
-
});
|
|
689
|
-
});
|
|
690
|
-
failed++;
|
|
691
|
-
continue;
|
|
692
|
-
}
|
|
664
|
+
return canvasState.bindBoard(() => syncBoardRuntimeBackends(options))();
|
|
665
|
+
}
|
|
693
666
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
667
|
+
async function syncBoardRuntimeBackends(options: {
|
|
668
|
+
forceRehydrateExtApps?: boolean;
|
|
669
|
+
alreadyPrimed?: boolean;
|
|
670
|
+
}): Promise<{ rehydrated: number; failed: number }> {
|
|
671
|
+
let disposed = false;
|
|
672
|
+
const unregister = canvasState.onBoardDispose(() => {
|
|
673
|
+
disposed = true;
|
|
674
|
+
});
|
|
675
|
+
try {
|
|
676
|
+
const boardGeneration = canvasState.boardGeneration;
|
|
677
|
+
const targetIds =
|
|
678
|
+
options.alreadyPrimed === true
|
|
679
|
+
? canvasState
|
|
680
|
+
.getLayout()
|
|
681
|
+
.nodes.filter((node) => isExtAppNode(node) && node.data.sessionStatus === 'rehydrating')
|
|
682
|
+
.map((node) => node.id)
|
|
683
|
+
: primeCanvasRuntimeBackends(options).targetIds;
|
|
684
|
+
let rehydrated = 0;
|
|
685
|
+
let failed = 0;
|
|
686
|
+
|
|
687
|
+
for (const nodeId of targetIds) {
|
|
688
|
+
if (disposed || canvasState.boardGeneration !== boardGeneration) break;
|
|
689
|
+
const current = canvasState.getNode(nodeId);
|
|
690
|
+
if (!isExtAppNode(current)) continue;
|
|
691
|
+
|
|
692
|
+
const transport = normalizeTransportConfig(current.data.transportConfig);
|
|
693
|
+
const toolName = typeof current.data.toolName === 'string' ? current.data.toolName.trim() : '';
|
|
694
|
+
if (!transport || !toolName) {
|
|
695
|
+
canvasState.withSuppressedRecording(() => {
|
|
696
|
+
setExtAppRuntimeState(nodeId, {
|
|
697
|
+
appSessionId: null,
|
|
698
|
+
sessionStatus: 'error',
|
|
699
|
+
sessionError:
|
|
700
|
+
'Saved app session cannot be restored because its launch metadata is incomplete. Reopen the app to restore interactivity.',
|
|
701
|
+
});
|
|
702
|
+
});
|
|
703
|
+
failed++;
|
|
705
704
|
continue;
|
|
706
705
|
}
|
|
707
|
-
const toolInput = resolveExtAppRehydratedToolInput(current, opened.toolInput);
|
|
708
|
-
const storedCheckpointId = getStoredExcalidrawCheckpointId(current);
|
|
709
|
-
const toolResult = isExcalidrawCreateView(opened.serverName, opened.toolName)
|
|
710
|
-
? ensureExcalidrawCheckpointId(opened.toolResult, nodeId, storedCheckpointId)
|
|
711
|
-
: opened.toolResult;
|
|
712
706
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
toolInput,
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
resourceMeta: opened.resourceMeta,
|
|
722
|
-
serverName: opened.serverName,
|
|
723
|
-
toolName: opened.toolName,
|
|
724
|
-
transportConfig: transport,
|
|
725
|
-
sessionStatus: 'ready',
|
|
726
|
-
sessionError: null,
|
|
707
|
+
try {
|
|
708
|
+
const opened = await openMcpApp({
|
|
709
|
+
transport,
|
|
710
|
+
toolName,
|
|
711
|
+
...(isRecord(current.data.toolInput) ? { toolArguments: current.data.toolInput } : {}),
|
|
712
|
+
...(typeof current.data.serverName === 'string' && current.data.serverName.trim().length > 0
|
|
713
|
+
? { serverName: current.data.serverName.trim() }
|
|
714
|
+
: {}),
|
|
727
715
|
});
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
716
|
+
if (disposed || canvasState.boardGeneration !== boardGeneration) {
|
|
717
|
+
closeMcpAppSession(opened.sessionId);
|
|
718
|
+
continue;
|
|
719
|
+
}
|
|
720
|
+
const toolInput = resolveExtAppRehydratedToolInput(current, opened.toolInput);
|
|
721
|
+
const storedCheckpointId = getStoredExcalidrawCheckpointId(current);
|
|
722
|
+
const toolResult = isExcalidrawCreateView(opened.serverName, opened.toolName)
|
|
723
|
+
? ensureExcalidrawCheckpointId(opened.toolResult, nodeId, storedCheckpointId)
|
|
724
|
+
: opened.toolResult;
|
|
725
|
+
|
|
726
|
+
canvasState.withSuppressedRecording(() => {
|
|
727
|
+
setExtAppRuntimeState(nodeId, {
|
|
728
|
+
appSessionId: opened.sessionId,
|
|
729
|
+
html: opened.html,
|
|
730
|
+
toolInput,
|
|
731
|
+
toolResult,
|
|
732
|
+
resourceUri: opened.resourceUri,
|
|
733
|
+
toolDefinition: opened.tool,
|
|
734
|
+
resourceMeta: opened.resourceMeta,
|
|
735
|
+
serverName: opened.serverName,
|
|
736
|
+
toolName: opened.toolName,
|
|
737
|
+
transportConfig: transport,
|
|
738
|
+
sessionStatus: 'ready',
|
|
739
|
+
sessionError: null,
|
|
740
|
+
});
|
|
737
741
|
});
|
|
738
|
-
|
|
739
|
-
|
|
742
|
+
rehydrated++;
|
|
743
|
+
} catch (error) {
|
|
744
|
+
if (disposed || canvasState.boardGeneration !== boardGeneration) continue;
|
|
745
|
+
canvasState.withSuppressedRecording(() => {
|
|
746
|
+
setExtAppRuntimeState(nodeId, {
|
|
747
|
+
appSessionId: null,
|
|
748
|
+
sessionStatus: 'error',
|
|
749
|
+
sessionError: error instanceof Error ? error.message : String(error),
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
failed++;
|
|
753
|
+
}
|
|
740
754
|
}
|
|
741
|
-
}
|
|
742
755
|
|
|
743
|
-
|
|
756
|
+
return { rehydrated, failed };
|
|
757
|
+
} finally {
|
|
758
|
+
unregister();
|
|
759
|
+
}
|
|
744
760
|
}
|
|
745
761
|
|
|
746
|
-
|
|
762
|
+
const graphRecompute = createBoardLocal(
|
|
763
|
+
() => ({ timer: null as ReturnType<typeof setTimeout> | null }),
|
|
764
|
+
(state) => {
|
|
765
|
+
if (state.timer) clearTimeout(state.timer);
|
|
766
|
+
},
|
|
767
|
+
);
|
|
747
768
|
|
|
748
769
|
function shouldTreatFileContentAsPath(input: CanvasAddNodeInput): boolean {
|
|
749
770
|
if (input.fileMode === 'path') return true;
|
|
@@ -896,19 +917,24 @@ export function hasTraceNodeDataFields(input: Record<string, unknown>): boolean
|
|
|
896
917
|
}
|
|
897
918
|
|
|
898
919
|
export function scheduleCodeGraphRecompute(onComplete?: () => void): void {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
920
|
+
const state = graphRecompute.current;
|
|
921
|
+
if (state.timer) clearTimeout(state.timer);
|
|
922
|
+
state.timer = setTimeout(
|
|
923
|
+
canvasState.bindBoard(() => {
|
|
924
|
+
state.timer = null;
|
|
925
|
+
recomputeCodeGraph();
|
|
926
|
+
onComplete?.();
|
|
927
|
+
}),
|
|
928
|
+
300,
|
|
929
|
+
);
|
|
905
930
|
}
|
|
906
931
|
|
|
907
932
|
/** Clear a pending recompute so the timer cannot outlive its server (start/stop cycles, tests). */
|
|
908
933
|
export function cancelCodeGraphRecompute(): void {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
934
|
+
const state = graphRecompute.current;
|
|
935
|
+
if (state.timer) {
|
|
936
|
+
clearTimeout(state.timer);
|
|
937
|
+
state.timer = null;
|
|
912
938
|
}
|
|
913
939
|
}
|
|
914
940
|
|
|
@@ -1473,41 +1499,40 @@ export function saveCanvasSnapshot(name: string): CanvasSnapshot | null {
|
|
|
1473
1499
|
export async function restoreCanvasSnapshot(idOrName: string): Promise<{ ok: boolean }> {
|
|
1474
1500
|
const ok = canvasState.restoreSnapshot(idOrName);
|
|
1475
1501
|
if (ok) {
|
|
1476
|
-
|
|
1477
|
-
const boardGeneration = canvasState.boardGeneration;
|
|
1478
|
-
void syncCanvasRuntimeBackends({ forceRehydrateExtApps: true, alreadyPrimed: true }).finally(() => {
|
|
1479
|
-
if (canvasState.boardGeneration === boardGeneration) emitCanvasLayoutUpdate();
|
|
1480
|
-
});
|
|
1502
|
+
startBoardRuntime({ forceRehydrateExtApps: true });
|
|
1481
1503
|
canvasState.flushToDisk();
|
|
1482
1504
|
}
|
|
1483
1505
|
return { ok };
|
|
1484
1506
|
}
|
|
1485
1507
|
|
|
1486
1508
|
/**
|
|
1487
|
-
* Open a board (or Home for null)
|
|
1488
|
-
*
|
|
1489
|
-
* reset — undo closures, pending intents, file watchers, app sessions and the
|
|
1490
|
-
* code graph (the trace chain restarts itself when its last node is gone).
|
|
1491
|
-
* Agent and human presence are kept: they belong to the people and agents,
|
|
1492
|
-
* not to a board.
|
|
1509
|
+
* Open a board (or Home for null), retaining other live boards and their
|
|
1510
|
+
* undo history, intents, watchers and app sessions for background operations.
|
|
1493
1511
|
*/
|
|
1494
1512
|
export function openCanvasBoard(id: string | null): { ok: boolean } {
|
|
1495
1513
|
if (!canvasState.switchBoard(id)) return { ok: false };
|
|
1496
|
-
mutationHistory.reset();
|
|
1497
|
-
intentRegistry.reset();
|
|
1498
1514
|
startBoardRuntime();
|
|
1499
1515
|
return { ok: true };
|
|
1500
1516
|
}
|
|
1501
1517
|
|
|
1502
|
-
function startBoardRuntime(): void {
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1518
|
+
export function startBoardRuntime(options: { forceRehydrateExtApps?: boolean } = {}): void {
|
|
1519
|
+
canvasState.bindBoard(() => {
|
|
1520
|
+
let disposed = false;
|
|
1521
|
+
const unregister = canvasState.onBoardDispose(() => {
|
|
1522
|
+
disposed = true;
|
|
1523
|
+
});
|
|
1524
|
+
primeCanvasRuntimeBackends(options);
|
|
1525
|
+
scheduleCodeGraphRecompute();
|
|
1526
|
+
emitCanvasLayoutUpdate();
|
|
1527
|
+
// App rehydration can take a network round trip; it finishes in the background.
|
|
1528
|
+
const boardGeneration = canvasState.boardGeneration;
|
|
1529
|
+
void syncCanvasRuntimeBackends({ alreadyPrimed: true })
|
|
1530
|
+
.then(() => {
|
|
1531
|
+
if (!disposed && canvasState.boardGeneration === boardGeneration) emitCanvasLayoutUpdate();
|
|
1532
|
+
})
|
|
1533
|
+
.catch((error: unknown) => console.warn('[canvas-runtime] Rehydration failed', error))
|
|
1534
|
+
.finally(unregister);
|
|
1535
|
+
})();
|
|
1511
1536
|
}
|
|
1512
1537
|
|
|
1513
1538
|
/**
|
|
@@ -1530,7 +1555,12 @@ export function restoreCanvasLibrary(file: string): void {
|
|
|
1530
1555
|
export function openBoardForWrite(): void {
|
|
1531
1556
|
if (canvasState.activeBoardId) return;
|
|
1532
1557
|
const recent = canvasState.listBoards()[0] ?? canvasState.createBoard(defaultBoardName());
|
|
1533
|
-
if (recent
|
|
1558
|
+
if (!recent) return;
|
|
1559
|
+
const moveIntents = canvasState.bindBoard(() => intentRegistry.moveHomeIntentsToBoard(recent.id));
|
|
1560
|
+
if (canvasState.switchBoard(recent.id)) {
|
|
1561
|
+
moveIntents();
|
|
1562
|
+
startBoardRuntime();
|
|
1563
|
+
}
|
|
1534
1564
|
}
|
|
1535
1565
|
|
|
1536
1566
|
export function deleteCanvasSnapshot(id: string): { ok: boolean } {
|
|
@@ -1791,8 +1821,8 @@ export function ungroupCanvasNodes(groupId: string): { ok: boolean } {
|
|
|
1791
1821
|
}
|
|
1792
1822
|
|
|
1793
1823
|
export function clearCanvas(): { ok: boolean } {
|
|
1794
|
-
unwatchAll();
|
|
1795
1824
|
canvasState.clear();
|
|
1825
|
+
rewatchAllFileNodes();
|
|
1796
1826
|
return { ok: true };
|
|
1797
1827
|
}
|
|
1798
1828
|
|
|
@@ -128,6 +128,27 @@ const CANVAS_CREATE_TYPES: CanvasCreateTypeSchema[] = [
|
|
|
128
128
|
fields: [
|
|
129
129
|
{ name: 'title', type: 'string', required: false, description: 'Status label.' },
|
|
130
130
|
{ name: 'content', type: 'string', required: false, description: 'Rendered status text.' },
|
|
131
|
+
{
|
|
132
|
+
name: 'data.workItemId',
|
|
133
|
+
type: 'string',
|
|
134
|
+
required: false,
|
|
135
|
+
description:
|
|
136
|
+
'Read-only live presentation of an existing work item on the active board. Omit title, detail, workState and progress; they are derived. Removing the card does not cancel work.',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'data.workState',
|
|
140
|
+
type: 'string',
|
|
141
|
+
required: false,
|
|
142
|
+
description:
|
|
143
|
+
'Explicit authored work card: todo, in-progress, blocked, done or cancelled. Creates no session or task.',
|
|
144
|
+
},
|
|
145
|
+
{ name: 'data.detail', type: 'string', required: false, description: 'Work card detail.' },
|
|
146
|
+
{
|
|
147
|
+
name: 'data.progress',
|
|
148
|
+
type: 'number | null',
|
|
149
|
+
required: false,
|
|
150
|
+
description: 'Optional percentage from 0 to 100, independent of workState; null clears it.',
|
|
151
|
+
},
|
|
131
152
|
],
|
|
132
153
|
example: {
|
|
133
154
|
type: 'status',
|
|
@@ -36,6 +36,7 @@ export interface CanvasAnnotationSummary {
|
|
|
36
36
|
export interface CanvasAnnotationContextSummary {
|
|
37
37
|
id: string;
|
|
38
38
|
label: string | null;
|
|
39
|
+
text?: string;
|
|
39
40
|
bounds: CanvasAnnotation['bounds'];
|
|
40
41
|
targetNodeIds: string[];
|
|
41
42
|
targetNodeTitles: string[];
|
|
@@ -252,6 +253,7 @@ export function summarizeCanvasAnnotationForContext(
|
|
|
252
253
|
return {
|
|
253
254
|
id: annotation.id,
|
|
254
255
|
label: annotation.label ?? annotation.text ?? null,
|
|
256
|
+
...(annotation.type === 'text' && annotation.text ? { text: annotation.text } : {}),
|
|
255
257
|
bounds: annotation.bounds,
|
|
256
258
|
targetNodeIds: targetNodes.map((node) => node.id),
|
|
257
259
|
targetNodeTitles,
|