@@ -187,7 +187,6 @@ afterEach(() => {
187187 vi . doUnmock ( "../../plugins/manifest-registry.js" ) ;
188188 vi . doUnmock ( "../../plugins/channel-catalog-registry.js" ) ;
189189 vi . doUnmock ( "../../infra/boundary-file-read.js" ) ;
190- vi . doUnmock ( "./bundled-root.js" ) ;
191190 vi . doUnmock ( "jiti" ) ;
192191} ) ;
193192
@@ -576,63 +575,6 @@ describe("bundled channel entry shape guards", () => {
576575 }
577576 } ) ;
578577
579- it ( "uses dist-runtime as the boundary root for packaged setup entries" , async ( ) => {
580- const root = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "openclaw-bundled-runtime-root-" ) ) ;
581- const pluginDir = path . join ( root , "dist-runtime" , "extensions" , "alpha" ) ;
582- fs . mkdirSync ( pluginDir , { recursive : true } ) ;
583- fs . writeFileSync (
584- path . join ( pluginDir , "setup-entry.js" ) ,
585- [
586- "export default {" ,
587- " kind: 'bundled-channel-setup-entry'," ,
588- " loadSetupPlugin() {" ,
589- " return {" ,
590- " id: 'alpha'," ,
591- " meta: { id: 'alpha', label: 'Setup dist-runtime' }," ,
592- " capabilities: {}," ,
593- " config: {}," ,
594- " };" ,
595- " }," ,
596- "};" ,
597- "" ,
598- ] . join ( "\n" ) ,
599- "utf8" ,
600- ) ;
601-
602- vi . doMock ( "./bundled-root.js" , ( ) => ( {
603- resolveBundledChannelRootScope : ( ) => ( {
604- packageRoot : root ,
605- cacheKey : `${ root } :dist-runtime` ,
606- } ) ,
607- } ) ) ;
608- vi . doMock ( "../../plugins/bundled-channel-runtime.js" , ( ) => ( {
609- listBundledChannelPluginMetadata : ( ) => [ alphaChannelMetadata ( { includeSetup : true } ) ] ,
610- resolveBundledChannelGeneratedPath : (
611- rootDir : string ,
612- entry : BundledEntrySource | undefined ,
613- pluginDirName ?: string ,
614- ) =>
615- path . join (
616- rootDir ,
617- "dist-runtime" ,
618- "extensions" ,
619- pluginDirName ?? "alpha" ,
620- ( entry ?. built ?? entry ?. source ?? "./index.js" ) . replace ( / ^ \. \/ / u, "" ) ,
621- ) ,
622- } ) ) ;
623-
624- try {
625- const bundled = await importFreshModule < typeof import ( "./bundled.js" ) > (
626- import . meta. url ,
627- "./bundled.js?scope=bundled-dist-runtime-boundary" ,
628- ) ;
629-
630- expect ( bundled . getBundledChannelSetupPlugin ( "alpha" ) ?. meta . label ) . toBe ( "Setup dist-runtime" ) ;
631- } finally {
632- fs . rmSync ( root , { recursive : true , force : true } ) ;
633- }
634- } ) ;
635-
636578 it ( "loads setup-entry feature plugins without loading the main channel entry" , async ( ) => {
637579 const root = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "openclaw-bundled-setup-only-" ) ) ;
638580 const previousBundledPluginsDir = process . env . OPENCLAW_BUNDLED_PLUGINS_DIR ;
0 commit comments