(value: unknown)
| 66 | } |
| 67 | |
| 68 | function normalizePlanningAgents(value: unknown): string[] { |
| 69 | const seen = new Set<string>(); |
| 70 | const agents: string[] = [BUILTIN_PLAN_AGENT]; |
| 71 | seen.add(BUILTIN_PLAN_AGENT); |
| 72 | |
| 73 | if (!Array.isArray(value)) return agents; |
| 74 | |
| 75 | for (const item of value) { |
| 76 | if (typeof item !== "string") continue; |
| 77 | const trimmed = item.trim(); |
| 78 | if (!trimmed || seen.has(trimmed)) continue; |
| 79 | seen.add(trimmed); |
| 80 | agents.push(trimmed); |
| 81 | } |
| 82 | |
| 83 | return agents; |
| 84 | } |
| 85 | |
| 86 | function normalizePrimaryTools(value: unknown): string[] { |
| 87 | if (!Array.isArray(value)) return []; |
no test coverage detected