import { AdminShell, StatusPill } from '../../components/admin/admin-page.jsx';
import { getTeamAgent } from '../../../lib/team.js';
export const dynamic='force-dynamic';
export default async function TeamAgentPage({params}){ const {agentId}=await params; const data=getTeamAgent(agentId); if(!data) return <AdminShell title="Agent not found"><p>Missing agent.</p></AdminShell>; const a=data.agent; return <AdminShell kicker="Team" title={a.name} description={`from template: ${a.template_slug || 'custom'} · ${a.project_name || 'All projects'}`} actions={<StatusPill>{a.status}</StatusPill>}><section className="team-detail" data-page="team-agent"><h2>Permissions</h2>{data.permissions.map(p=><p key={p.id}>{p.tool_name}: {p.mode}</p>)}<h2>Recent activity</h2>{data.activity.map(e=><p key={e.id}>{e.action}</p>)}<h2>Memory</h2>{data.memory.map(m=><p key={m.id}>{m.content}</p>)}</section></AdminShell>; }
