import type { SopGate, SopCheckResult } from './sop-types.js'; export type GateVerdict = { result: SopCheckResult; reason?: string; }; export type CheckGateResult = GateVerdict & { id: string; gateId: string; phase: string; }; export type CheckGateOptions = { projectRoot: string; id: string; gateId: string; allowCommands?: boolean; /** Override the command-gate timeout (ms). Defaults to GATE_COMMAND_TIMEOUT_MS. */ commandTimeoutMs?: number; }; export declare class SopCheckError extends Error { readonly code: string; constructor(code: string, message: string); } /** * Strip meta content from a string for grep evaluation. The grep gate's * `stripMeta:true` opt-in lets content-publishing SOPs avoid the "literal-word * trap" (the author discussing the gate's pattern in the post would itself * trigger the gate). Three classes of meta are removed: * * - HTML comments: `` * - Fenced code blocks: 3+ backticks on their own line, opening through the * matching close on its own line (or end of string) * - C-style block comments: `/* ... *​/` * * Conservative fail-safe: unclosed fences and unclosed block comments are left * as-is (no partial strip), so the regex still matches any embedded pattern * rather than silently hiding it. This helper is pure; no side effects. */ export declare function stripMetaForGrep(content: string): string; export type EvaluateGateOptions = { allowCommands?: boolean; commandTimeoutMs?: number; }; /** Evaluate a single gate's check to a pass/fail/blocked verdict. Shared by `sop check` and `sop advance`. */ export declare function evaluateGate(projectRoot: string, gate: SopGate, options?: EvaluateGateOptions): GateVerdict; export declare function checkGate(options: CheckGateOptions): Promise;