3 Commits

Author SHA1 Message Date
Gaudenz Alder d406e162db chore(libavoid): sync vendored routing-core fallback with canonical drawio copy
Verbatim refresh of the tool server's cold-cache/offline fallback from
drawio d972771957: self-loops are now excluded from libavoid routing
(keeps the caller's loop styling and waypoints), plus the earlier
Object.create(null) hardening for id-keyed maps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 22:19:30 +02:00
Gaudenz Alder 40f960e839 feat(libavoid): adopt the pure-JS two-file js/libavoid-js CDN layout
The next draw.io release replaces the three-part WASM bundle (glue +
base64 wasm payload + loader) with a single self-contained pure-JS
libavoid.min.js that publishes globalThis.Avoid and parks
window.__libavoidReady itself, next to the shared routing core.

- mcp-app-server: load the bundle + routing core from the CDN as two
  ETag-versioned URLs and drop the loader plumbing the new bundle makes
  obsolete (processLibavoidBundle, libavoidWasmB64, wasm-unsafe-eval
  notes). No pre-release fallback: deploy once the release is on
  viewer.diagrams.net - against the old CDN layout routing degrades
  gracefully to unrouted edges.
- mcp-tool-server: refresh the vendored cold-cache/offline fallback copy
  of libavoid-routing.js verbatim from drawio-dev (dangling-end
  free-point routing, lazily-requested jetty checkpoints, cappedJetty,
  snapToPoint candidate pins).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 19:14:38 +02:00
Gaudenz Alder 908e8bdf2d feat(libavoid): load the shared routing core from the viewer.diagrams.net CDN
Squashed merge of libavoid-cdn:

- vendor the shared routing core (globalThis.AvoidRouting) from
  drawio-dev, synced to the release now in production: fixed
  connection points, jettySize, port-constraint masks, and
  snap-point candidate anchors (draw.io's snapToPoint)
- app server: load libavoid from the viewer.diagrams.net CDN like
  elk/mermaid, with ETag-versioned URLs in the served HTML; drop the
  vendored browser build + wasm
- tool server: load the routing core from the CDN through an
  ETag-revalidated per-user disk cache (primed by npm postinstall),
  with the vendored copy as last-resort fallback
- plugin skill: document --layout libavoid routing and --mermaid-image

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 14:37:38 +02:00