@@ -197,7 +197,7 @@ afterEach(() => {
197197describe ( "bundled channel entry shape guards" , ( ) => {
198198 const bundledPluginRoots = listSourceBundledPluginRoots ( ) ;
199199 let realBundledSourceTreeProbe : {
200- hasAccountInspect : boolean ;
200+ hasAccountInspector : boolean ;
201201 pluginIds : readonly string [ ] ;
202202 } ;
203203
@@ -221,7 +221,7 @@ describe("bundled channel entry shape guards", () => {
221221 "./bundled.js?scope=real-bundled-source-tree-preload" ,
222222 ) ;
223223 realBundledSourceTreeProbe = {
224- hasAccountInspect : bundled . hasBundledChannelEntryFeature ( "slack" , "accountInspect" ) ,
224+ hasAccountInspector : typeof bundled . getBundledChannelAccountInspector ( "slack" ) === "function" ,
225225 pluginIds : [ ...bundled . listBundledChannelPluginIds ( ) ] ,
226226 } ;
227227 } ) ;
@@ -256,7 +256,7 @@ describe("bundled channel entry shape guards", () => {
256256
257257 it ( "loads real bundled channel entry contracts from the source tree" , async ( ) => {
258258 expect ( realBundledSourceTreeProbe . pluginIds ) . toEqual ( [ "slack" ] ) ;
259- expect ( realBundledSourceTreeProbe . hasAccountInspect ) . toBe ( true ) ;
259+ expect ( realBundledSourceTreeProbe . hasAccountInspector ) . toBe ( true ) ;
260260 } ) ;
261261
262262 it ( "fills sparse bundled channel plugin metadata from package metadata" , async ( ) => {
@@ -316,12 +316,12 @@ describe("bundled channel entry shape guards", () => {
316316 "./bundled.js?scope=bundled-package-metadata" ,
317317 ) ;
318318
319- const plugin = bundled . requireBundledChannelPlugin ( "alpha" ) ;
320- expect ( plugin . meta . id ) . toBe ( "alpha" ) ;
321- expect ( plugin . meta . label ) . toBe ( "Alpha" ) ;
322- expect ( plugin . meta . selectionLabel ) . toBe ( "Use Alpha" ) ;
323- expect ( plugin . meta . docsPath ) . toBe ( "/channels/alpha" ) ;
324- expect ( plugin . meta . blurb ) . toBe ( "Alpha channel metadata." ) ;
319+ const plugin = bundled . getBundledChannelPlugin ( "alpha" ) ;
320+ expect ( plugin ? .meta . id ) . toBe ( "alpha" ) ;
321+ expect ( plugin ? .meta . label ) . toBe ( "Alpha" ) ;
322+ expect ( plugin ? .meta . selectionLabel ) . toBe ( "Use Alpha" ) ;
323+ expect ( plugin ? .meta . docsPath ) . toBe ( "/channels/alpha" ) ;
324+ expect ( plugin ? .meta . blurb ) . toBe ( "Alpha channel metadata." ) ;
325325 } finally {
326326 restoreBundledPluginsDir ( previousBundledPluginsDir ) ;
327327 fs . rmSync ( tempRoot , { recursive : true , force : true } ) ;
@@ -392,7 +392,7 @@ describe("bundled channel entry shape guards", () => {
392392 expect ( metadataRootDir ) . toBe ( tempRoot ) ;
393393 expect ( generatedRootDir ) . toBe ( tempRoot ) ;
394394 expect ( testGlobal [ "__bundledOverrideRuntime" ] ) . toBe ( "ok" ) ;
395- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . id ) . toBe ( "alpha" ) ;
395+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .id ) . toBe ( "alpha" ) ;
396396 } finally {
397397 restoreBundledPluginsDir ( previousBundledPluginsDir ) ;
398398 fs . rmSync ( tempRoot , { recursive : true , force : true } ) ;
@@ -459,7 +459,7 @@ describe("bundled channel entry shape guards", () => {
459459 "./bundled.js?scope=bundled-package-local-dist-sdk-alias" ,
460460 ) ;
461461
462- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . meta . label ) . toBe ( "Package dist Alpha" ) ;
462+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .meta . label ) . toBe ( "Package dist Alpha" ) ;
463463 } finally {
464464 fs . rmSync ( root , { recursive : true , force : true } ) ;
465465 }
@@ -514,7 +514,7 @@ describe("bundled channel entry shape guards", () => {
514514 "./bundled.js?scope=bundled-direct-dist-sdk-alias" ,
515515 ) ;
516516
517- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . meta . label ) . toBe ( "Direct dist Alpha" ) ;
517+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .meta . label ) . toBe ( "Direct dist Alpha" ) ;
518518 } finally {
519519 restoreBundledPluginsDir ( previousBundledPluginsDir ) ;
520520 fs . rmSync ( root , { recursive : true , force : true } ) ;
@@ -588,7 +588,7 @@ describe("bundled channel entry shape guards", () => {
588588 expect ( generatedRootDir ) . toBe ( pluginsRoot ) ;
589589 expect ( generatedScanDir ) . toBe ( pluginsRoot ) ;
590590 expect ( testGlobal [ "__bundledOverrideRuntime" ] ) . toBe ( "ok" ) ;
591- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . id ) . toBe ( "alpha" ) ;
591+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .id ) . toBe ( "alpha" ) ;
592592 } finally {
593593 restoreBundledPluginsDir ( previousBundledPluginsDir ) ;
594594 fs . rmSync ( tempRoot , { recursive : true , force : true } ) ;
@@ -673,7 +673,7 @@ describe("bundled channel entry shape guards", () => {
673673 ) ;
674674
675675 process . env . OPENCLAW_BUNDLED_PLUGINS_DIR = path . join ( rootA , "dist" , "extensions" ) ;
676- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . meta . label ) . toBe ( "Alpha A" ) ;
676+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .meta . label ) . toBe ( "Alpha A" ) ;
677677 expect ( bundled . getBundledChannelSetupPlugin ( "alpha" ) ?. meta . label ) . toBe ( "Setup A" ) ;
678678 expect ( bundled . getBundledChannelSecrets ( "alpha" ) ?. secretTargetRegistryEntries ?. [ 0 ] ?. id ) . toBe (
679679 "channels.alpha.A.entry-token" ,
@@ -684,7 +684,7 @@ describe("bundled channel entry shape guards", () => {
684684 bundled . setBundledChannelRuntime ( "alpha" , { marker : "first" } as never ) ;
685685
686686 process . env . OPENCLAW_BUNDLED_PLUGINS_DIR = path . join ( rootB , "dist" , "extensions" ) ;
687- expect ( bundled . requireBundledChannelPlugin ( "alpha" ) . meta . label ) . toBe ( "Alpha B" ) ;
687+ expect ( bundled . getBundledChannelPlugin ( "alpha" ) ? .meta . label ) . toBe ( "Alpha B" ) ;
688688 expect ( bundled . getBundledChannelSetupPlugin ( "alpha" ) ?. meta . label ) . toBe ( "Setup B" ) ;
689689 expect ( bundled . getBundledChannelSecrets ( "alpha" ) ?. secretTargetRegistryEntries ?. [ 0 ] ?. id ) . toBe (
690690 "channels.alpha.B.entry-token" ,
0 commit comments