Optionalchannels: IsolationChannelsimport { r, scope, subtreeOf } from "@bluelibs/runner";
const app = r.resource("app")
.isolate({
deny: [
scope(dangerousTask), // block all channels
scope(userCreated, { listening: false }), // block emit, allow listen
scope([subtreeOf(lib), subtreeOf(agent)], { tagging: false }), // block deps/listen/mw
scope(subtreeOf(internalModule), { dependencies: false }), // block listen/tag/mw only
],
})
.build();
Creates a scoped isolation entry with channel-level precision.
When used inside
.isolate({ deny: [...] })or.isolate({ only: [...] }), controls which interaction types the rule applies to. Channels default totrue(all blocked) — passfalseto opt-out of specific channels.