(text: string)
| 24 | |
| 25 | /** Read the agent's required `VERDICT: <value>` first line. Returns null if missing/unknown. */ |
| 26 | export function parseVerdict(text: string): Verdict | null { |
| 27 | const line = text.split('\n').find((l) => /^\s*verdict\s*:/i.test(l)) |
| 28 | if (!line) return null |
| 29 | const value = line.split(':')[1]?.trim().toLowerCase() |
| 30 | return value && VERDICTS.has(value as Verdict) ? (value as Verdict) : null |
| 31 | } |
| 32 | |
| 33 | // Picker-safe shape: only the label, no factory functions or server-only deps. |
| 34 | export interface PickerSpec { |
no test coverage detected