import type { ChangePlan, ChangeRequest, MarketplaceManifest } from '@histoire/shared';
/** Declarative target metadata, resolved without executing package code. */
export interface PlanningPlugin {
    /** Target-version manifest. */ manifest: MarketplaceManifest;
    /** Concrete target version. */ version: string;
}
/** Read-only project dependencies for one generation's planner. */
export interface PlannerOptions {
    /** Project directory. */ root: string;
    /** Existing standalone Histoire config, if available. */ configFile?: string;
    /** Static contexts cannot automate project changes. */ static?: boolean;
    /** Loader-reported Histoire and Vite inputs, read afresh at review and admission. */ configDependencies?: () => Iterable<string>;
    /** Target metadata resolver; registry access belongs to the catalog service. */ resolvePlugin: (request: ChangeRequest) => Promise<PlanningPlugin>;
    /** Clock for bounded retention, injectable without replacing global time. */ now?: () => number;
}
/** Private execution material never exposed over the UI channel. */
export interface PlannedChange {
    /** Review DTO. */ plan: ChangePlan;
    /** Validated intent with concrete version. */ request: ChangeRequest;
    /** Original config revision required by writeConfig. */ configHash?: string;
    /** Exact proposed config source. */ configCode?: string;
    /** Exact proposed project manifest source. */ packageCode: string;
    /** Original project manifest revision. */ packageHash: string;
    /** Declarative manifest used by the editor. */ manifest: MarketplaceManifest;
}
/** Controlled planner error consumable by channel and job admission. */
export declare class PlanningError extends Error {
    /** Public failure code. */
    code: 'invalid' | 'stale' | 'unavailable' | 'failed';
    /** Attaches a transport-safe code to a readable failure. */
    constructor(code: PlanningError['code'], message: string);
}
/** Computes fresh argv, exact source edits and a review hash without writes. */
export declare function computePlan(options: PlannerOptions, input: ChangeRequest): Promise<PlannedChange>;
//# sourceMappingURL=planner.d.ts.map