v0.2.0
Token economy release: an iteration loop no longer pays context tokens for SVG text. Minor version bump because the default render_svg response shape changed.
What changed
render_svgnow answers with a PNG preview image plus a server-side artifact id instead of the SVG text. The store keeps the 32 most recent renders for the process lifetime.previewandsaveacceptartifact: "art-1"directly, so the render → look → revise loop costs one tool call per round and the SVG string never travels through the model's context window.- New top-level
outputconfig block controls the response shape:svg: trueincludes the SVG text,preview: falseskips the image,previewWidthscales it,minify: truecollapses inter-tag whitespace in the stored and saved SVG. - Pattern groups (radial, arc, grid, scatter, path) now render the child element once into a local defs block and instance it with
<use>per placement. A 12x12 grid went from 144 full copies of the child markup to one definition plus 144 one-line use tags. Also fixes duplicated ids when a pattern child carried an id. - Parametric path data coordinates are capped at 2 decimals (was 3).
previewandsavereturn a clear error naming the live artifact ids when given an unknown or expired id, and still accept rawcontentfor anything that did not come fromrender_svg.- 336 tests (20 new covering the artifact store, minification, use-instancing, output options and coercion).
Dogfood: pelican test (2026-07-07, second run) — PASS
4 iterations through the fresh build over the real MCP stdio layer, entirely on the new economy: every render came back as a PNG preview directly, and the final save used the artifact id. The use-instanced wheel spokes render pixel-identical to 0.1.7 while shrinking the same config from 7553 to 6783 chars. Result: assets/pelican-2026-07-07-1.svg and .png.