import { Config } from './config'; import { ParsedDiff } from './parser'; import { TemplateResources } from './template-reader'; /** * Contract version between core and the engine. Bump when the CoreToolkit / * context shape changes incompatibly so an out-of-date @iacreview/pro fails * loudly instead of crashing on a drifted shape. */ export declare const PROTOCOL_VERSION = 1; /** * Primitives the free core hands to the IaCReview engine so the engine can run * additional diffs, read templates, and post the combined comment — without the * engine re-implementing any of core's CI/platform plumbing. */ export interface CoreToolkit { /** Contract version — the engine may reject an incompatible core. */ protocolVersion: number; parseCdkDiff(raw: string): ParsedDiff; runCdkDiff(args: string[], cwd: string): Promise; readTemplates(cwd: string): TemplateResources; resolvePrUrl(config: Config): Promise; postComment(config: Config, markdown: string): Promise; fetchExistingCommentBody(config: Config): Promise; } export interface PremiumRunContext { config: Config; cwd: string; dryRun: boolean; envName?: string; toolkit: CoreToolkit; } export interface PremiumRunResult { /** True when the engine determined the merge should be blocked. */ blocked: boolean; blockReasons: string[]; } /** Implemented by @iacreview/pro (or a self-hosted engine). */ export interface PremiumRunner { /** Protocol version the engine was built against (checked by core). */ protocol?: number; run(ctx: PremiumRunContext): Promise; } /** The engine package's expected factory export. */ export type CreatePremiumRunner = (toolkit: CoreToolkit) => PremiumRunner; /** * Try to load the premium engine. Returns null in the free tier (engine not * installed), so `cdk-diff-report` works standalone. * * SECURITY: the module specifier is taken only from the trusted CI env var * (CDK_DIFF_PRO_MODULE) or the fixed default — NEVER from the analyzed repo's * committed .cdkdiffreportrc — and must be a bare package name. This prevents a * malicious PR from pointing the dynamic import() at arbitrary code. */ export declare function resolvePremiumRunner(_config: Config, toolkit: CoreToolkit): Promise; //# sourceMappingURL=enricher.d.ts.map