(value: unknown)
| 84 | } |
| 85 | |
| 86 | function normalizePrimaryTools(value: unknown): string[] { |
| 87 | if (!Array.isArray(value)) return []; |
| 88 | |
| 89 | const seen = new Set<string>(); |
| 90 | const tools: string[] = []; |
| 91 | for (const item of value) { |
| 92 | if (typeof item !== "string") continue; |
| 93 | const trimmed = item.trim(); |
| 94 | if (!trimmed || seen.has(trimmed)) continue; |
| 95 | seen.add(trimmed); |
| 96 | tools.push(trimmed); |
| 97 | } |
| 98 | |
| 99 | return tools; |
| 100 | } |
| 101 | |
| 102 | export function isPlanningAgent( |
| 103 | agentName: string | undefined, |
no test coverage detected