import{Jw as U,Kw as V,Nw as f,es as R,fs as T,gs as $}from"./cli-0.5.4-k5fz4zd3.mjs";import{l1 as Q,m1 as _}from"./cli-0.5.4-jqt00ywx.mjs";import{B6 as G,J6 as Y,b9 as L,i9 as Z}from"./cli-0.5.4-cbq01zg3.mjs";import{Zma as X}from"./cli-0.5.4-aacw1src.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();_();Y();Z();$();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 Kb,S as Lb,I as Mb,N as Nb,P as Ob,h as Pb};
