/** * ollama_batch_proof_check — NO-LLM tool. * * Shells out to the caller-selected typecheck/lint/test CLIs in parallel and * aggregates the results into a stable shape. This is the "did it pass?" * primitive for any multi-file refactor workflow — proof_check gives you the * green light, it doesn't generate new plans. * * Behavior: * - Each check runs in parallel under its own timeout (default 60s per check). * - Missing tools (ENOENT or exit 127) are reported as status:"missing" * rather than "fail" — not installing ruff is not a test failure. * - Timeouts are surfaced as status:"timeout" with the elapsed budget. * - stdout/stderr tails are capped so the envelope stays reviewable. * * Extensibility: * Tests swap out the spawn implementation via the internal `__setSpawner` * hook so unit tests never have to invoke real CLIs. Production uses * node:child_process.spawn. */ import { z } from "zod"; import type { Envelope } from "../envelope.js"; import type { RunContext } from "../runContext.js"; export declare function assertSafeFilePath(p: string, fieldName?: string): void; export declare const batchProofCheckSchema: z.ZodObject<{ checks: z.ZodArray>; files: z.ZodOptional>>; cwd: z.ZodOptional; allowed_roots: z.ZodOptional>; timeout_ms: z.ZodOptional; }, z.core.$strip>; export type BatchProofCheckInput = z.infer; export type CheckStatus = "pass" | "fail" | "timeout" | "missing"; export interface ProofFailure { file?: string; line?: number; message: string; } export interface CheckResult { check: string; status: CheckStatus; exit_code: number | null; stderr_tail: string; stdout_tail: string; elapsed_ms: number; failures?: ProofFailure[]; } export interface BatchProofCheckResult { checks: CheckResult[]; all_passed: boolean; any_missing: boolean; } export interface SpawnOutcome { stdout: string; stderr: string; exit_code: number | null; /** Set when the process was terminated because the timeout fired. */ timed_out: boolean; /** Set when the executable could not be found (ENOENT). */ not_found: boolean; elapsed_ms: number; } export type Spawner = (cmd: string, args: string[], opts: { cwd: string; timeout_ms: number; }) => Promise; /** Test hook — swap the spawn implementation. Production code never touches this. */ export declare function __setSpawner(s: Spawner | null): void; export declare function handleBatchProofCheck(input: BatchProofCheckInput, ctx: RunContext): Promise>; //# sourceMappingURL=batchProofCheck.d.ts.map