import { type PolicySpawner } from './policy-spawn.mts'; /** How long each policy export may run before its process is killed, in milliseconds. */ export declare const POLICY_TIMEOUTS_MS: { readonly validateRetrospective: 30000; readonly validatePullRequest: 120000; readonly pullRequestDefaults: 120000; readonly renderNoSourceIssue: 30000; }; type PolicyExport = keyof typeof POLICY_TIMEOUTS_MS; export type PolicyResult = { status: 'no-policy'; } | { status: 'skipped'; } | { status: 'ok'; result: unknown; }; export type PolicyRun = { worktree: string; export: PolicyExport; input: unknown; env: NodeJS.ProcessEnv; /** Test seam: replaces the real child process. */ spawn?: PolicySpawner; /** Test seam: replaces `process.execPath` as the Node binary to launch. */ nodePath?: string; }; /** * Runs one export of the worktree's declared policy module in a fresh child process (never in * this one). Resolves `no-policy` when the worktree declares none and `skipped` when the module * lacks the export. A timeout, crash, non-zero exit, oversized output, or unusable reply throws: * a failed policy is never a pass. */ export declare function runPolicyExport(run: PolicyRun): Promise; export type ValidatorReport = { errors: string[]; warnings: string[]; }; /** Runs a validator export and checks its result is `{ errors: string[], warnings?: string[] }`. */ export declare function runValidator(run: PolicyRun): Promise; export {};