import{Kw as U,Lw as V,Ow as f,gs as R,hs as T,is as $}from"./cli-0.5.12-zc0qwdy2.mjs";import{S1 as Q,T1 as _}from"./cli-0.5.12-pycnjaeg.mjs";import{Bca as G,Jca as Z,a9 as L,h9 as Y}from"./cli-0.5.12-g4wb8mj2.mjs";import{aoa as X}from"./cli-0.5.12-xzeb7mtb.mjs";function S(q,j){let z=new Map;for(let x of j)z.set(x.agentType,x);let H=new Set,J=[];for(let x of q){let K=`${x.agentType}:${x.source}`;if(H.has(K))continue;H.add(K);let E=z.get(x.agentType),W=E&&E.source!==x.source?E.source:void 0;J.push({...x,overriddenBy:W})}return J}function I(q){let j=q.model||U();if(!j)return;if(j==="inherit")return"inherit";if(j==="haiku"||j==="sonnet"||j==="opus"){try{if(!V())return"inherit";if(!Q(j))return"inherit"}catch(z){G(z)}return j}return T(j,`agent:${q.agentType}`,{getAvailableModelIds:R,logDebug:()=>{},logErr:G})??j}function N(q){return L(q).toLowerCase()}function P(q,j){return q.agentType.localeCompare(j.agentType,void 0,{sensitivity:"base"})}var O;var h=X(()=>{f();_();Z();Y();$();O=[{label:"User agents",source:"userSettings"},{label:"Project agents",source:"projectSettings"},{label:"Local agents",source:"localSettings"},{label:"Managed agents",source:"policySettings"},{label:"Plugin agents",source:"plugin"},{label:"CLI arg agents",source:"flagSettings"},{label:"Built-in agents",source:"built-in"}]});
export{O as Qb,S as Rb,I as Sb,N as Tb,P as Ub,h as Vb};
