| 324 | } |
| 325 | |
| 326 | function computeStatus( |
| 327 | anyPathRan: boolean, |
| 328 | hasResults: boolean, |
| 329 | warnings: Set<EvidenceWarning> |
| 330 | ): EvidencePayloadStatus { |
| 331 | if (!anyPathRan) return 'unavailable' |
| 332 | if (!hasResults) return 'empty' |
| 333 | const degraded = |
| 334 | warnings.has('semantic_partial') || warnings.has('semantic_unavailable') || warnings.has('keyword_unavailable') |
| 335 | return degraded ? 'partial' : 'complete' |
| 336 | } |
| 337 | |
| 338 | async function handler(params: Record<string, unknown>, context: ToolExecutionContext): Promise<ToolResult> { |
| 339 | const locale = context.locale |