import{n as e}from"./chunk-DR8-3Aex.js";import{Gs as t,Ws as n}from"./paths-Ci1iwL5Y.js";import{X_ as r,Z_ as i}from"./loadAgentsDir-C_wFhytF.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let t=e.model||r();if(t)return t===`inherit`?`inherit`:t}function s(e){return n(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{i(),t(),l=[{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 a,u as i,c as n,a as o,s as r,l as t};