@@ -546,24 +546,22 @@ export function initHub(options: InitHubOptions): HubInstance {
546546 // into the connection meta right after this `init` returns.
547547 await options . ui ?. setup ?.( ctx )
548548
549- // Publish the renderer manifest — one `ClientScriptEntry` per dock
550- // `type`, `importFrom` base-absolute so it resolves to the served module
551- // from any page depth. Clients read it from shared state and import a
552- // module lazily the first time a dock of that type mounts.
553- if ( rendererRegistrations . length > 0 ) {
554- const manifest : Record < string , ClientScriptEntry > = { }
555- for ( const registration of rendererRegistrations ) {
556- manifest [ registration . type ] = {
557- importFrom : joinURL ( base , '__renderers' , `${ registration . type } .mjs` ) ,
558- ...( registration . importName ? { importName : registration . importName } : { } ) ,
559- }
549+ // Publish the authoritative renderer manifest, including an empty one.
550+ // Each `importFrom` is base-absolute so it resolves to the served module
551+ // from any page depth. Clients import a module lazily the first time a
552+ // dock of that type mounts.
553+ const manifest : Record < string , ClientScriptEntry > = { }
554+ for ( const registration of rendererRegistrations ) {
555+ manifest [ registration . type ] = {
556+ importFrom : joinURL ( base , '__renderers' , `${ registration . type } .mjs` ) ,
557+ ...( registration . importName ? { importName : registration . importName } : { } ) ,
560558 }
561- const manifestState = await ctx . rpc . sharedState . get < Record < string , ClientScriptEntry > > (
562- DOCK_RENDERERS_STATE_KEY ,
563- { initialValue : { } } ,
564- )
565- manifestState . mutate ( ( ) => manifest )
566559 }
560+ const manifestState = await ctx . rpc . sharedState . get < Record < string , ClientScriptEntry > > (
561+ DOCK_RENDERERS_STATE_KEY ,
562+ { initialValue : { } } ,
563+ )
564+ manifestState . mutate ( ( ) => manifest )
567565
568566 // Aggregate MCP — one Streamable-HTTP endpoint over the shared
569567 // context's whole registry (tool ids are namespaced per plugin, and the
0 commit comments