import{n as e,t}from"./cwd--iizewsn.js";import{i as n,o as r,r as i}from"./loadAgentsDir-C_wFhytF.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./agentDisplay-Dr1XbOAu.js";o(),r(),e();function d(e){let t=a(e),n=[e.agentType];return t&&n.push(t),e.memory&&n.push(`${e.memory} memory`),n.join(` · `)}async function f(){let{allAgents:e}=await n(t()),r=c(e,i(e)),a=[],o=0;for(let{label:e,source:t}of u){let n=r.filter(e=>e.source===t).sort(s);if(n.length!==0){a.push(`${e}:`);for(let e of n)if(e.overriddenBy){let t=l(e.overriddenBy);a.push(`  (shadowed by ${t}) ${d(e)}`)}else a.push(`  ${d(e)}`),o++;a.push(``)}}a.length===0?console.log(`No agents found.`):(console.log(`${o} active agents\n`),console.log(a.join(`
`).trimEnd()))}export{f as agentsHandler};