(input: unknown)
| 5 | export const cmp = (a: string, b: string) => (a < b ? -1 : a > b ? 1 : 0) |
| 6 | |
| 7 | function isAgent(input: unknown): input is Agent { |
| 8 | if (!input || typeof input !== "object") return false |
| 9 | const item = input as { name?: unknown; mode?: unknown } |
| 10 | if (typeof item.name !== "string") return false |
| 11 | return item.mode === "subagent" || item.mode === "primary" || item.mode === "all" |
| 12 | } |
| 13 | |
| 14 | export function normalizeAgentList(input: unknown): Agent[] { |
| 15 | if (Array.isArray(input)) return input.filter(isAgent) |
no outgoing calls
no test coverage detected