import type { EvaluatorKind } from '../workflow/workflow-spec.js'; /** Standard evaluator verdict envelope — matches the union members * consumed by `envelopesToAggregatorInput`. */ export interface EvaluatorVerdictEnvelope { readonly kind: EvaluatorKind; readonly passed: boolean; readonly gateAction: 'pass' | 'warn' | 'block'; /** Severity-graded violations (file + line + hint). */ readonly violations: ReadonlyArray<{ readonly severity: 'CRITICAL' | 'HIGH' | 'MED' | 'LOW'; readonly file: string; readonly line: number; readonly hint: string; readonly dimension?: string; }>; /** Summary line; surfaced in the nextActions list. */ readonly summary: string; /** Wall-time the evaluator took (seconds). */ readonly wallSeconds: number; /** When true, the evaluator fell back to a stub because the binary was * unavailable in this environment. Surfaces in the verdict envelope so * the user can rerun on a real peaks-loop install. */ readonly degraded: boolean; } export interface DispatchOptions { readonly projectRoot: string; readonly rid: string; /** Session id — required by `monotonic-improvement` so the guard * can read the prior cycle from the slice dir. Other evaluators * ignore it. */ readonly sessionId?: string; readonly scope?: string; readonly threshold?: string; /** Override the peaks binary path (default: `node bin/peaks.js` from cwd). */ readonly peaksBin?: string; } /** Dispatch a single evaluator against the given rid and project. */ export declare function dispatchEvaluator(kind: EvaluatorKind, options: DispatchOptions): EvaluatorVerdictEnvelope; export declare function envelopeAs(envelope: EvaluatorVerdictEnvelope, kind: EvaluatorKind): EvaluatorVerdictEnvelope; /** * Best-effort markdown parse for karpathy-review.md / security.md / perf.md. * Mirrors the shape accepted by `parseKarpathyEnvelope` / * `parseSecurityEnvelope` / `parsePerfEnvelope` in `services/verdict/envelopes.ts`, * keeping verdict-aggregator backward-compat intact. */ export declare function parseAuditMarkdownEnvelope(md: string, kind: 'security-review' | 'perf-baseline'): EvaluatorVerdictEnvelope | null; /** Load an on-disk audit file (e.g. `.peaks/_runtime//audit/security.md`) * and project it to an `EvaluatorVerdictEnvelope`. Used by workflow yaml * evaluators that point at on-disk artifacts. */ export declare function loadEnvelopeFromDisk(projectRoot: string, sid: string, rel: string, kind: 'security-review' | 'perf-baseline'): EvaluatorVerdictEnvelope | null;