Changelog
Source:
CHANGELOG.mdat the repo root.
0.2.0 — 2026-05-06
Changed
createRouterFromToolsnow throws at construction when no tool is reachable as an entry point (every tool listed under another tool'snextAllowed). The previous behaviour silently produced a router that would throw on every call.- Adjacency entries with duplicate names in
nextAllowedare now de-duplicated (preserving first-seen order).printRouterGraphno longer emits duplicates. legalNextFor(null)now returns entry tools in insertion order, matchingnextTools(router, null).
Fixed
- Replaced
as nevercast inrouter.tswith a properly typed cast. .gitignorenow ignores.env/.env.*(with!.env.example).
0.1.0 — 2026-05-04
Initial public release. Treated as a pre-1.0 calling card; a 1.0.0 cut will follow once the API has been used in anger.
defineTool({ name, inputSchema, nextAllowed, execute })— collocates the legality graph with the tool itself.createRouterFromTools(tools, options)— derives the name set from the tool array; one source of truth.- Per-step narrowing helper
nextTools(router, prevName)and the underlyingNextTools<R, Prev>type. ToolRouteViolationwithprev/next/legalNext/routerVersiondiagnostic fields.strictMode: truethrows,strictMode: falsewarns.- Edge-runtime detection (Vercel Edge, Cloudflare Workers,
NEXT_RUNTIME=edge) with a one-time init warning. printRouterGraph(router)— deterministic plain-text adjacency dump, zero deps.COMPATIBILITY.mdrow stamped againstai@6.0.174. Weekly CI cron runs the suite againstai@latest; failures open an issue taggedsdk-drift.- README hero recording showing both type-level red squiggle and
runtime
ToolRouteViolationfor the same offending call.