import type { Message } from "@kenkaiiii/gg-ai"; export interface VerificationCommandClassification { accepted: boolean; /** False for ordinary shell work that was never plausibly a verification attempt. */ candidate: boolean; /** True when the command can rewrite files (fixers, builders, emitters): the * verification gate bumps its mutation revision when such a check STARTS, * because earlier in-flight evidence cannot cover files it may change. A * rejected-but-non-mutating check (an unrecognized runner like `make test`) * must NOT poison the revision — its green output is merely not evidence. */ mayMutate: boolean; reason: string; /** Still rejected by transcript parsing; only the live host can prove unchanged inputs. */ snapshotEligible?: boolean; /** Comparison may preserve earlier evidence, but must never certify this command. */ snapshotPreserveOnly?: boolean; /** A non-zero exit may come from a non-check part (`grep` matching nothing), * so it is not recorded as a failed check — only as missing evidence. */ ambiguousFailure?: boolean; } export interface VerificationEvidence { command: string; status: "passed" | "failed" | "rejected"; reason: string; } /** Fail-closed classifier: bounded checks with narrowly allowed non-check preludes. * * `posixShell`: the command runs under bash with pipefail (GG's bash tool on * macOS/Linux, or Windows with Git Bash). Only then can read-only commands * around a check count: cmd.exe has no pipefail, and there `;` is not a * separator, so `cat a; npm test` would run only `cat`. Default off, so a * caller that does not know the shell fails closed. */ export declare function classifyVerificationCommand(command: string, { posixShell }?: { posixShell?: boolean; }): VerificationCommandClassification; /** * True when some segment of `command` is, on its own, a bounded check — i.e. * the chain wraps a real verification attempt. Used to decide whether a * rejected classification deserves user-visible feedback: exploration that * merely mentions a verifier (`ls .venv/bin | grep ruff`, `ruff --version`) * was never a verification attempt and gets no nag. */ export declare function containsBoundedCheck(command: string): boolean; /** Extract harness-owned evidence from completed bash calls in a transcript. */ export declare function collectVerificationEvidence(messages: readonly Message[]): VerificationEvidence[];