Summary
Implement the WASM-JS bridge for plugin-supplied block server-renderers. When a block declares render: { handler }, the renderer pipeline (1) looks up the registering plugin from the blocks namespace, (2) constructs synthetic hook name block.render:{plugin_slug}/{handler}, (3) dispatches as a FILTER via the hook bus, (4) caches result by (block_type, attrs_hash, content_version).
The bridge has no separate WASM export — it is one more dispatch through the single hook_handler entry point.
Design reference
- docs/02-plugin-system.md §7.4 (cross-refs doc 04 §2.1, doc 07 §15.5)
Acceptance criteria
Dependencies
#73 (hook bus), #95 (hook handler), #214 (frontend SDK), doc 04 (block editor), doc 07 §15 (cache tags)
Complexity
M
Summary
Implement the WASM-JS bridge for plugin-supplied block server-renderers. When a block declares
render: { handler }, the renderer pipeline (1) looks up the registering plugin from the blocks namespace, (2) constructs synthetic hook nameblock.render:{plugin_slug}/{handler}, (3) dispatches as a FILTER via the hook bus, (4) caches result by(block_type, attrs_hash, content_version).The bridge has no separate WASM export — it is one more dispatch through the single
hook_handlerentry point.Design reference
Acceptance criteria
registerBlockSDK helper constructs the canonical doc-04BlockTypeDefinitionshape (same shape as core blocks)render: { handler }:gn-seo/meta->gn-seo)block.render:gn-seo/seo_meta.renderHookCall{block: {name, attributes}, context: {post_id, view, locale, ...}}hooks.filtersfor fast-path lookup, OR registers ininit()viahost_register_hook(block_type, attrs_hash, content_version)per doc 07 §15.5cache.invalidatecapability follow doc 07 §15 conventionsrenderbut nosave-> dynamic (server-rendered every fetch unless cached)saveandrender-> static HTML for public site + server-render available for preview/adminDependencies
#73 (hook bus), #95 (hook handler), #214 (frontend SDK), doc 04 (block editor), doc 07 §15 (cache tags)
Complexity
M