Files
Gaudenz Alder fb952971f8 feat(tool-server): add search_shapes tool; extract search into shared/
Extract the shape-search algorithm (soundex, compound-token splitting,
scored AND/OR ranking) out of mcp-app-server/src/shared.js into
shared/shape-search.js as the single source of truth, imported by both
servers.

Expose search_shapes on the stdio tool server. To keep the npm package
lean the ~4.6 MB shape index is not bundled: it is loaded lazily on the
first call and cached in memory, read from the local file in-repo or
fetched from the CDN (jsDelivr @main, overridable via
DRAWIO_SHAPE_INDEX_URL) in a published install. Only the ~9 KB algorithm
module is copied into src/ by copy-shared. Packed tarball stays ~0.66 MB.

Based on the approach in #50 by @Suryajit27, reworked to avoid committing
the index and drop the unrelated lockfile churn.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:28:50 +02:00
..