(args, context)
| 392 | "Returns structured line-level findings as JSON. Use preview=true to inspect scope without LLM usage.", |
| 393 | args: reviewArgs, |
| 394 | async execute(args, context) { |
| 395 | const input = args as ReviewInput |
| 396 | const { background, ...inputWithoutBackground } = input |
| 397 | const normalizedBackground = background?.trim() |
| 398 | const normalizedInput: ReviewInput = normalizedBackground |
| 399 | ? { ...inputWithoutBackground, background: normalizedBackground } |
| 400 | : inputWithoutBackground |
| 401 | const cwd = context.worktree || context.directory || worktree |
| 402 | const defaultOverallMs = 30 * 60 * 1000 |
| 403 | const options: RunOptions = { |
| 404 | cwd, |
| 405 | signal: context.abort, |
| 406 | timeoutMs: input.overallTimeoutMinutes !== undefined |
| 407 | ? input.overallTimeoutMinutes * 60 * 1000 |
| 408 | : defaultOverallMs, |
| 409 | } |
| 410 | const runReview = async (backgroundFile?: string): Promise<string> => { |
| 411 | const result = await runOcr( |
| 412 | buildReviewArgs(normalizedInput, cwd, backgroundFile), |
| 413 | options, |
| 414 | ) |
| 415 | return formatReviewResult(result, normalizedInput.preview === true) |
| 416 | } |
| 417 | if (normalizedInput.background !== undefined) { |
| 418 | return await withTemporaryBackgroundFile(normalizedInput.background, runReview) |
| 419 | } |
| 420 | return await runReview() |
| 421 | }, |
| 422 | }), |
| 423 | ocr_health: tool({ |
| 424 | description: |
nothing calls this directly
no test coverage detected