#5747·webiny-js

remote-components: no server-readable component manifest

Author: SvenAlHamadCreated Sep 21, 2026Updated Sep 21, 2026

Summary

There is no supported way to obtain a remote component's ComponentManifest anywhere except in a browser. Anything server-side that needs to know a component's inputs — to place it on a page, to validate bindings, to generate content for it — currently cannot.

Where it stands today

wbyRemoteComponent persists no manifest. Its fields are name, label, description, aiContext, source, css, bundledJs, bundledJsSha256, bundledCss, bundledCssSha256, aiPrompt, status, sdkVersion (packages/remote-components/src/api/domain/WbyRemoteComponentModel.ts).

The only supported route to a manifest is to execute the bundle:

typescript
const fn = new Function(`var __remoteComponent__; ${entry.bundledJs}; return __remoteComponent__;`);
const mod = fn();
const component = mod.createComponent(runtimeSdk); // runtimeSdk.dependencies.React must be real
component.manifest;

That is ComponentsSdk.hydrateComponent (packages/sdk-frontend/src/ComponentsSdk.ts), and it needs a React instance injected, so it is browser-only in practice.

Server-side the pieces exist but are private to the bundler: extractManifestSource, extractInputFactories and buildManifestCode in packages/remote-components/src/api/bundler/bundleComponent.ts are module-local, and bundler/index.ts exports only bundleComponent, bundleComponents and validateComponentSource.

Why it matters beyond one caller

The universal migration tool has to compose Website Builder pages from generated components, and ElementFactory.createElementFromComponent requires a ComponentManifest to emit correctly typed input bindings ({ id, static, type, list, translatable }). Any server-side consumer hits the same wall: there is no API that answers "what inputs does this component have?".

Suggested fix

Either of:

  1. Persist the manifest when a component is created or refined. A manifest JSON field on wbyRemoteComponent, written by CreateRemoteComponentUseCase / RefineRemoteComponentUseCase. Most robust — a consumer reads a field, no evaluation anywhere.
  2. Export a manifest accessor from the components module. A use case (or an export of the existing private helpers) that returns a ComponentManifest for a stored component. Cheaper, but keeps the source-parsing on the read path.

Worth noting for whoever picks this up: the manifest in the stored source is declarative data ({ name, factory: "createTextInput", params: {…} }), and the SDK's input factories in packages/website-builder-sdk/src/createInput.ts are pure functions with no React dependency, so expanding descriptors into real inputs works fine in Node. See also the nested-descriptor bug in buildComponentPrompt-generated manifests, filed separately.

Context

Found while building a throwaway page-composition proof of concept, which currently works around this by reimplementing the extraction in its own package. That workaround is deliberately temporary and should not become the pattern.