import { type CompositionBudgetIssue } from './compositionBudget';
import { type ThemeV2StyleAuthority } from './designState';
import { type PageDesignIntent } from './pageDesignIntent';
import { type CompiledPageRuntime } from './runtimeCompiler';
import { type BlockDesignCapabilityMap, type BlockDesignPlan, type DesignBlockId, type DesignRepairResult, type DesignResolutionIssue, type GeneratedPageDesignIntent, type ResolvedPageDesignPlan, type SiteStyleId } from './types';
import type { CuratedSiteStyle } from './curatedSiteStyles';
export declare const generatedDesignRetryPolicy: {
    readonly schemaRetries: 1;
    readonly repairPasses: 1;
};
type GeneratedDesignPipelineIssueKind = DesignResolutionIssue['kind'] | CompositionBudgetIssue['kind'];
export type GeneratedDesignPipelineSummary = Readonly<{
    siteStyleId: SiteStyleId;
    blockCount: number;
    issueCounts: Readonly<Partial<Record<GeneratedDesignPipelineIssueKind, number>>>;
    repairCounts: Readonly<Partial<Record<DesignRepairResult['kind'], number>>>;
    terminalIssueCount: number;
}>;
export type GeneratedDesignPipelineFailure = Readonly<{
    kind: 'invalid-generated-design';
    message: string;
    summary: GeneratedDesignPipelineSummary;
}> | Readonly<{
    kind: 'site-style-mismatch';
    expectedSiteStyleId: SiteStyleId;
    receivedSiteStyleId: SiteStyleId;
    summary: GeneratedDesignPipelineSummary;
}> | Readonly<{
    kind: 'terminal-resolution-issues';
    issues: readonly DesignResolutionIssue[];
    repairs: readonly DesignRepairResult[];
    summary: GeneratedDesignPipelineSummary;
}> | Readonly<{
    kind: 'terminal-composition-budget-issues';
    issues: readonly CompositionBudgetIssue[];
    repairs: readonly DesignRepairResult[];
    summary: GeneratedDesignPipelineSummary;
}>;
export type GeneratedDesignPipelineSuccess<TBlockId extends DesignBlockId = DesignBlockId> = Readonly<{
    kind: 'success';
    intent: GeneratedPageDesignIntent<TBlockId>;
    plan: readonly BlockDesignPlan<TBlockId>[];
    resolved: ResolvedPageDesignPlan<TBlockId>;
    repairs: readonly DesignRepairResult<TBlockId>[];
    compositionIssues: readonly [];
    compiledRuntime: CompiledPageRuntime<TBlockId>;
    styleAuthority: ThemeV2StyleAuthority;
    /** Persisted as page-owned content_versions.design_state; stores editor intent, not resolver output. */
    designState: PageDesignIntent<TBlockId>;
    summary: GeneratedDesignPipelineSummary;
}>;
export type GeneratedDesignPipelineResult<TBlockId extends DesignBlockId = DesignBlockId> = GeneratedDesignPipelineSuccess<TBlockId> | GeneratedDesignPipelineFailure;
export type GeneratedDesignBlockDescriptor<TBlockId extends DesignBlockId = DesignBlockId> = Readonly<{
    blockId: TBlockId;
    blockKind: string;
    purpose: string;
}>;
export type GeneratedDesignPipelineInput = Readonly<{
    intent: unknown;
    siteStyle: CuratedSiteStyle;
    capabilities: BlockDesignCapabilityMap;
}>;
export declare function buildDeterministicGeneratedPageDesignIntent(input: Readonly<{
    siteStyle: CuratedSiteStyle;
    blocks: readonly GeneratedDesignBlockDescriptor<DesignBlockId>[];
}>): GeneratedPageDesignIntent<DesignBlockId>;
export declare function runGeneratedPageDesignPipeline(input: GeneratedDesignPipelineInput): GeneratedDesignPipelineResult<DesignBlockId>;
export {};
