import{Hw as U,Iw as V,Lw as f,cs as R,ds as T,es as $}from"./cli-0.5.3-jbzr8k4s.mjs";import{j1 as Q,k1 as _}from"./cli-0.5.3-1vt6twff.mjs";import{$8 as L,H6 as Y,g9 as Z,z6 as G}from"./cli-0.5.3-t65dek0m.mjs";import{Xma as X}from"./cli-0.5.3-0df3r78b.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};
