Repository navigation
feat!: transform source maps, agent CLI, DTCG tokens - #426
Merged
Merged
Conversation
Every edit to a module now goes through one tracked emission, so the engine can return a source map that matches the final text. The map is built only when the host asks for one and flows through the Vite plugin, both Next loaders and the unplugin adapters, composed with any incoming map. Emitted code is byte-identical: the parity baselines are untouched.
resolveId, load and transform in the Vite plugin, layergate's Vite adapter and the unplugin adapters are object hooks with filters derived from the same patterns the handlers test.
Breaking: ExtractEngine.transformFile takes an optional source name and its result gains map; next-plugin transformWithManifest and unplugin transformWithEngine return code with a map; the layergate Vite plugin's hooks are {filter, handler} objects.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
describe prints the project's system and components as one JSON document. check analyses named files, or unsaved source on stdin, without a build and reports skipped properties, token misses and diagnostics with the CSS each component would emit. mcp serves both over stdio as Model Context Protocol tools, keeping the project loaded between calls; it speaks the 2026-07-28 revision and the earlier initialize-based ones without the SDK. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@animus-ui/core/dtcg adds fromDTCG, which builds a theme from a token or resolver document with token paths inferred from the document, and toDTCG, which writes a built theme back out. One resolver modifier maps to color modes. Gradients, dash-array stroke styles and $extends are rejected with the token path. The packed proof loads the new entry. Verified at this commit: vp run verify:full (54 of 54 tasks); verify:bench passed all four rows on the source-map change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three additions, one commit each.
Source maps for transformed modules; Rolldown hook filters
map: null, so breakpoints and stack traces below a rewritten builder chain pointed at the wrong lines. Every edit now goes through one tracked emission, and the engine returns a map that matches the final text. It is built only when the host asks for one.verify:paritypasses against untouched baselines.resolveId,loadandtransformin the Vite plugin, layergate's Vite adapter and the unplugin adapters are object hooks with filters. On a production build ofe2e/vite-app,loadhandler calls drop from 51 to 2;transformandresolveIdbarely move in that small app.packages/_integration/__tests__/source-map.test.ts, pins that a statement after a rewritten chain maps back to its original line.Limits: through unplugin, Rollup and Rolldown always build a map (the host gives no signal at transform time), and webpack and rspack only receive the map when an upstream loader supplied one.
animus describe,animus check,animus mcpdescribeprints the project's system and components as one JSON document: token scales with values, CSS variables and per-mode values; prop groups; selector and condition aliases; components with variants, states and inherited props.check <file...>analyses the named files without a build, or unsaved source through--stdin-filepath, and reports skipped properties, dynamic props, token misses and diagnostics with the CSS each component would emit. It exits 1 on an error-level finding.mcpserves both over stdio as Model Context Protocol tools (describe_system,list_components,check_source) and keeps the project loaded between calls. It implements the protocol directly, without the SDK, and speaks the 2026-07-28 revision and the earlierinitialize-based ones.e2e/rollup-appthatdescribelists the fixture's components and tokens andcheckreports a known token miss with its code.DTCG 2025.10 import and export
@animus-ui/core/dtcgaddsfromDTCG(document), which returns a theme builder with token paths inferred from the document, andtoDTCG(theme). A consumer who never imports the subpath pays nothing.$extendsare rejected with the token path.Release notes
map: null.ExtractEngine.transformFile(path, sourceMapSource?); its result gainsmapwhen a source name is passed.EngineApi.transformFiletakes a fourth argument andTransformFileResultgainsmap.@animus-ui/next-plugin:transformWithManifestreturns{ code, map }.@animus-ui/unplugin:transformWithEnginereturns code with a map.@animus-ui/layergate: the Vite plugin'sresolveId,loadandtransformare{ filter, handler }objects.animus describe,animus check,animus mcp;@animus-ui/core/dtcg.Verification
vp run verify:fullpasses ate9d59fa8: 54 of 54 tasks.verify:benchagainst release 0.2.0 passed all four rows on the source-map change (ratios 0.999 to 1.019).🤖 Generated with Claude Code