Problem
The private composed Storybook discovers adapter workspaces from package.json#cratis metadata, but Components 4 intentionally does not publish the planned @cratis/components/renderer/tooling discovery API. External adapter authors therefore have a schema and Conformance package but no supported build-time discovery helper.
Direction
Publish optional, build-time-only schema-driven discovery:
- scan configured workspaces and
node_modules for cratis.kind === 'ui-adapter';
- validate metadata without executing adapter runtime code;
- report invalid packages with the exact failing field and package path;
- emit lazy import descriptors rather than eagerly bundling every adapter;
- expose a Vite integration and a framework-neutral inventory function;
- keep all discovery code out of Core runtime/root/Common closures.
The current private Storybook inventory is evidence and a design input, not the public implementation by default.
Acceptance criteria
- Adding/removing a fixture adapter changes discovery output with zero Core/Storybook source edits.
- Invalid and duplicate ids fail or warn according to a documented deterministic policy.
- Runtime package code is never executed during metadata scanning.
- Node_modules traversal, symlinks, package exports, path traversal, and malicious metadata have adversarial tests.
- Packed tooling has strict NodeNext/Bundler types and no renderer-vendor dependency.
- Public stability/promotion policy is documented separately from runtime renderer ABI.
Problem
The private composed Storybook discovers adapter workspaces from
package.json#cratismetadata, but Components 4 intentionally does not publish the planned@cratis/components/renderer/toolingdiscovery API. External adapter authors therefore have a schema and Conformance package but no supported build-time discovery helper.Direction
Publish optional, build-time-only schema-driven discovery:
node_modulesforcratis.kind === 'ui-adapter';The current private Storybook inventory is evidence and a design input, not the public implementation by default.
Acceptance criteria