export function dedupeAgentsByName(lists: T[][]): T[] { const byName = new Map(); for (const list of lists) for (const item of list) byName.set(item.name, item); return [...byName.values()]; }