Skip to content

Publish schema-driven renderer discovery tooling #209

Description

@woksin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions