Helper: the union of agent text + every tool input/output for matching.
(result: any)
| 143 | |
| 144 | /** Helper: the union of agent text + every tool input/output for matching. */ |
| 145 | function fullSurface(result: any): string { |
| 146 | const parts: string[] = []; |
| 147 | if (result.output) parts.push(String(result.output)); |
| 148 | for (const tc of result.toolCalls || []) { |
| 149 | parts.push(JSON.stringify(tc.input || {})); |
| 150 | if (tc.output) parts.push(String(tc.output)); |
| 151 | } |
| 152 | for (const entry of result.transcript || []) { |
| 153 | try { parts.push(JSON.stringify(entry)); } catch { /* skip */ } |
| 154 | } |
| 155 | return parts.join('\n'); |
| 156 | } |
| 157 | |
| 158 | // ─── Test fixtures ────────────────────────────────────────────── |
| 159 |
no test coverage detected