import{d as e,f as t}from"./runtime-snapshot-C54O1-gI-DxusscPf.mjs";import{n,t as r}from"./runtime-Cym-fqI8-1GOIuRRQ.mjs";import{i}from"./loader-708jrx4Y-BbJRXNlQ.mjs";import{t as a}from"./plugin-auto-enable-DdH3n9V8-Dr_bUXkG.mjs";const o=new Set;function s(){o.clear()}function c(s){let c=s.cfg;if(!c||r()?.channels?.some(e=>e?.plugin?.id===s.channel))return;let l=`${n()}:${s.channel}`;if(o.has(l))return;o.add(l);let u=a({config:c}),d=t(u.config),f=e(u.config,d);try{i({config:u.config,activationSourceConfig:c,autoEnabledReasons:u.autoEnabledReasons,workspaceDir:f,runtimeOptions:{allowGatewaySubagentBinding:!0}})}catch{o.delete(l)}}export{s as n,c as t};