/** * Reviewers for `specweave review`: a CLI command per reviewer that reads the * brief on stdin and answers on stdout, or into `{out}` when the command names * one. SpecWeave holds no model keys; each CLI uses its own login. * * Defaults: Codex with GPT-6.1-Sol for code another family wrote, Claude Opus for * code OpenAI models wrote. `review.reviewers` in config overrides or adds. * * @module core/review/reviewer */ import type { ReviewConfiguration, ReviewerConfiguration } from '../config/types.js'; export interface Reviewer extends ReviewerConfiguration { name: string; family: string; } export declare const BUILTIN_REVIEWERS: Record; export declare const DEFAULT_TIMEOUT_MINUTES = 30; export declare function reviewersFrom(config: ReviewConfiguration | undefined): Reviewer[]; /** First word of a command, unquoted. */ export declare function commandBinary(command: string): string; export declare function onPath(binary: string, env?: NodeJS.ProcessEnv): boolean; export interface ReviewerChoice { reviewer?: Reviewer; /** Why this one, or why none. */ why: string; /** Set when an explicit `--reviewer` runs against the review policy: say so before running. */ conflict?: string; } /** * `--reviewer`, else `review.reviewer` unless it is `auto`, else the first installed * reviewer of another family than the author (Codex first). An unknown author gets * Codex, since most code SpecWeave sees is written by Claude. */ export declare function pickReviewer(reviewers: Reviewer[], authorFamily: string | undefined, opts?: { explicit?: string; configured?: string; available?: (r: Reviewer) => boolean; policyFamily?: string; /** A required cross-family policy also sets aside a configured reviewer of the author's family. */ policyRequired?: boolean; }): ReviewerChoice; /** * A built-in reviewer's command for the policy: the model it pins and, for a * deep review, Codex at `xhigh`. Commands from `review.reviewers` run as written. */ export declare function commandForPolicy(reviewer: Reviewer, policy: { model?: string; depth?: string; }): string; /** Env var holding the answer file; `{out}` becomes a quoted reference to it, never the path itself. */ export declare const OUT_ENV = "SPECWEAVE_REVIEW_OUT"; /** `{out}`, `"{out}"` or `'{out}'` → `"$SPECWEAVE_REVIEW_OUT"` (`"%SPECWEAVE_REVIEW_OUT%"` on Windows). */ export declare function expandOut(command: string, platform?: NodeJS.Platform): string; export interface RunResult { code: number; output: string; timedOut: boolean; stderr: string; } /** * Run a reviewer with the brief on stdin; its answer is `{out}` when used, else * stdout. On timeout the whole process tree is stopped, and the result returns * within two grace periods even if a descendant keeps the pipes open. */ export declare function runReviewer(command: string, brief: string, opts: { cwd: string; outFile: string; timeoutMs: number; env?: NodeJS.ProcessEnv; graceMs?: number; }): Promise; export type Verdict = 'ship' | 'fix first'; /** `Verdict: fix first` / `**Verdict:** ship` anywhere in the answer; the first one wins. */ export declare function parseVerdict(text: string): Verdict | undefined; //# sourceMappingURL=reviewer.d.ts.map