import { linkSync } from "node:fs";
export interface PlanV2PublishBlob {
    readonly sourcePath: string;
    readonly sha256: string;
    readonly sizeBytes: number;
}
export interface PlanV2ArtifactPublisher {
    /**
     * Durably publish one immutable digest before resolving. `sourcePath` is
     * planner-local and valid only for the lifetime of this call; remote
     * adapters must finish reading/uploading it before the promise resolves.
     */
    putBlob(blob: Readonly<PlanV2PublishBlob>): Promise<void>;
    /** Commit the manifest only after every referenced blob is durable. */
    commitManifest(manifestBytes: string): Promise<void>;
    /** Idempotent best-effort cleanup for an unpublished or partial plan. */
    abort(): Promise<void>;
}
export interface LocalPlanV2ArtifactPublisherOptions {
    /** Test seam for exercising cross-device/restricted-filesystem fallback. */
    readonly linkFile?: typeof linkSync;
}
/**
 * Planner-local manifest-last publisher.
 *
 * Same-filesystem blobs are hard-linked from the frozen source plan, so the
 * staging tree and local CAS do not consume a second set of data blocks.
 * Cross-device and restricted filesystems fall back to an atomic copy. This
 * implementation is a compatibility adapter for local callers; distributed
 * nodes exchange remote manifest/CAS locators through their cloud adapters.
 */
export declare class LocalPlanV2ArtifactPublisher implements PlanV2ArtifactPublisher {
    #private;
    readonly destinationDir: string;
    readonly temporaryDir: string;
    constructor(destinationDir: string, options?: Readonly<LocalPlanV2ArtifactPublisherOptions>);
    putBlob(blob: Readonly<PlanV2PublishBlob>): Promise<void>;
    commitManifest(manifestBytes: string): Promise<void>;
    abort(): Promise<void>;
}
//# sourceMappingURL=planV2Publisher.d.ts.map