feat: add tooling API to expose macro registry metadata#105
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Release preview: merging this PR will publish v0.34.0 (minor bump from v0.33.0) |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Summary
Closes #102.
Story.getMacroRegistry()— runtime API returning metadata for all registered macros (built-in + user-defined): name, block status, sub-macros, feature flags, source origin, and optional description/parameters@rohal12/spindle/tooling— lightweight Node.js entry point for LSP servers and linters. Exports a metadata-onlydefineMacro()shim (no Preact dependency) that captures macro metadata, pre-loaded with builtin metadata from a build-time JSON snapshot. LSPs can evaluate userdefineMacro()calls against this shim to auto-discover custom macros.descriptionandparametersfields onMacroDefinition— optional tooling hints for hover docs, completions, and parameter infoblock: trueadded to 11 builtin macro configs — makesdefineMacro()config the single source of truth for block status (previously some relied on hardcodedBLOCK_MACROSset)macro-registry.json— generated byscripts/dump-macro-registry.ts, consumed by the tooling entry pointTest plan
test/unit/macro-registry.test.ts— metadata storage, retrieval, source tracking, builtin verificationtest/unit/story-api.test.ts—getMacroRegistry()availability, builtin metadata, user source markingtest/unit/tooling-entry.test.ts— contract tests and file existence checksnpm run buildproducesdist/pkg/macro-registry.jsonwith all builtin metadata🤖 Generated with Claude Code