Repository navigation
v2.0.1 — one skill, TypeScript, bundled CLI, npm install
The first public 2.x release (npm already held an early 2.0.0 build that never had real users). It folds in the earlier 2.0.0 work (one skill, a bundled CLI) and the planned 3.0.0 work
(TypeScript, a new search engine, a new installer). The characterization snapshots of the kit's output did not change. Numbers come from bench/RESULTS.md.
Breaking
- One skill (
skills/drawio/) replaces the five domain skills. Each domain is now a reference file. - The CLI ships as a Bun-minified bundle that runs on Node or Bun. The maintainer toolchain moved to Bun,
and CI tests on both runtimes. - Install from the npm registry (
npm i -g drawio-ai-kit/bun add -g). The new command
drawio-ai skill installpasses the bundled skill to theskillsCLI. - Engines: Node ≥ 20.6 or Bun ≥ 1.4 (was Node ≥ 18).
install.shchecks for Node 20.6 or later. - Scaffolds import by name. Generated scripts use
import { Diagram } from "drawio-ai-kit".
Run them withdrawio-ai run script.mjs(or install the package locally). Path-based imports still resolve. - Search result shapes.
search "a, b, c"(comma form) returns an object keyed per keyword.
search "a b c"(space form) returns one merged list that takes hits from each keyword in turn.
Ranking differs from 1.x.--fulloutput no longer hasscore. - Valueless string flags (e.g.
--modewith no value) now fall back to the default instead of
being read astrue. dist/is no longer committed. CI builds it, and so does the release job.
The npm registry is the only supported install source. Installing from git or GitHub is no longer supported.
Added
- TypeScript sources (
src/*.ts), using only erasable syntax with strict checks. They run as-is on Bun and on Node 22.18+
(type stripping). The published package ships.d.tstypes underdist/types. - Importable package: bare
import "drawio-ai-kit"from any Node or Bun project, with named exports
(Diagram, layout factories,loadCatalog, …). drawio-ai run <script>runs a diagram script with bare imports resolved to the installed kit,
through a Nodemodule.registerhook or a Bun preload plugin.- minisearch-based icon search, with:
- an alias table (
data/aliases.json:k8s,pg,es,tf, …) - typo correction against the catalog vocabulary (1 edit for 4-letter words, 2 from 5 letters; swaps count as one),
sokubernets,terafrom,promethues,cloud wtachrank the right icon first - plurals, vendor scoping and stopwords
- multi-keyword queries
- an exact or alias fast path that fills the rest of the results with icons sharing the name prefix
- an alias table (
install.sh, a POSIX one-line installer:- uses Bun if present, otherwise npm
- registers the skill
- installs
drawio-ai-kit@latestby default (--versionto pin) - links
drawio-aiinto~/.local/bin, orBIN_DIR/--bin-dir, and prints a PATH hint if that dir isn't on PATH - flags:
--version,--bin-dir,--runtime,--no-skill,--agent,--dry-run - on Bun-only machines, writes a small wrapper so
drawio-airuns without Node - removes old installs before installing, so exactly one copy remains (
--no-cleanto skip):- global copies from npm or Bun, including old git installs, and the Bun wrapper
- pre-2.0 skills and the skill folders and symlinks left by pre-1.0 installers
- the pre-1.0
drawio-ai-kitMCP entry
- Benchmarks:
scripts/bench.mjs: perf, compared againstbench/baseline.jsonwith a 10% tolerance.scripts/bench-search.mjs: 166 labeled queries in 12 scenarios (53 typo queries, all top-1).
- Characterization tests (
test/characterization/) that snapshot CLI and builder output. - CI checks the package size budget, smoke-tests the tarball and publishes to npm with provenance.
suggest-layoutwarning for wasted white space;stack:Nlayout option.- Numbered step edges on service pipeline spines.
- ADRs 0006 (TypeScript), 0007 (package import +
run), 0008 (minisearch).
Improved
-
Search quality: on the original 98-query set, the pass rate went from 60.2% to 100%. All 166 queries
in the current set pass.k8s, pg, esreturns Kubernetes, PostgreSQL and Elasticsearch in the top K. -
Icon packs load lazily from a slim catalog index, and each catalog is parsed once per process.
-
Icons are embedded as minified SVG. PNGs were shrunk to 96 px.
-
Startup and memory (
drawio-ai root):Runtime Time RSS Node 24 → ~20 ms 54 → 40 MB Bun 15 → ~11 ms 26 → 16 MB Importing the kit on Node went from 5.7 ms to 1.6 ms, because the catalog now loads lazily.
-
Known tradeoff: the first search that misses the exact or alias fast path costs about 10 ms more
on a cold start, because the index is built then. -
CI:
- runs on
mainandv2 - the Bun job builds
dist/, checks that the build is deterministic and sharesdist/as an artifact - tests run on Node 24, and a smoke test checks the bundle on Node 20.6.0
- runs on
-
Releases: npm
latestpublishes from thev2branch whenpackage.jsongains a new version (CI then tags
it). Other versions publish fromvX.Y.Ztags underrelease-<major>.
Fixed
renderwas broken: draw.io page indexes are 1-based.- Edges stay off frames and captions. Fixed pointless kinks, and fixed the straightener merging two wires onto one track.
- Caption height follows the line count; the equal-height stretch is capped.
- Subnet icons use the padlock glyph.
group_security_groupwas labeled "Private subnet" and now has the right label.
Searches now favour icons whose name ends with the query's main noun. skill installusesbunxunder Bun and reports a missing launcher instead of crashing.dist/cli.mjskeeps a#!/usr/bin/env nodeshebang, so the Windows npm shims work.spanVnow falls back cleanly when it is given no members. Public types match the runtime exports.