/** * OCR 1.x delegation — the pinned CLI's payloads, parsed at their boundary. * * `ocr delegate preview` returns the file selection; `ocr delegate rule` returns * the resolved rule text per pattern. Neither calls an LLM and neither reads a * key. These parsers are strict on purpose: a `comments[]` review payload is NOT * a delegation spec, and reading one as the other is the defect this slice fixes. */ import { type Ocr18Range, type Ocr18State } from './ocr-multilang-adapter.js'; export type DelegateFile = { readonly path: string; readonly status: string; readonly insertions: number; readonly deletions: number; readonly exclude_reason?: string; }; export type DelegatePreview = { readonly schema_version: string; readonly mode: string; readonly repository: string; readonly from?: string; readonly to?: string; readonly merge_base?: string; readonly total_files: number; readonly reviewable_count: number; readonly excluded_count: number; readonly total_insertions: number; readonly total_deletions: number; readonly reviewable_files: readonly DelegateFile[]; readonly excluded_files: readonly DelegateFile[]; }; export type DelegateRuleGroup = { readonly group_id: number; readonly source: string; readonly pattern: string; readonly files: readonly string[]; readonly rule: string; }; export declare function buildDelegatePreviewArgs(range: Ocr18Range): string[]; export declare function buildDelegateRuleArgs(paths: readonly string[], range: Ocr18Range): string[]; export type PreviewResult = { readonly ok: true; readonly preview: DelegatePreview; } | { readonly ok: false; readonly reason: string; }; export declare function parseDelegatePreview(stdout: string): PreviewResult; export type RulesResult = { readonly ok: true; readonly groups: readonly DelegateRuleGroup[]; } | { readonly ok: false; readonly state: Ocr18State; readonly rawOutput: string; }; export declare function parseDelegateRules(stdout: string): RulesResult; export type DelegatePreviewResult = { readonly ok: true; readonly preview: DelegatePreview; } | { readonly ok: false; readonly state: Ocr18State; readonly rawOutput: string; }; /** One `delegate preview` invocation — the selection only. No review runs. */ export declare function runDelegatePreview(cwd: string, range?: Ocr18Range, timeoutMs?: number): DelegatePreviewResult;