/**
 * M27 Project Clone — service-owner of the `release_import` table and the clone
 * flow. `clone(slug)` is a COORDINATOR (reverse peer of M25 `ReleasePushService`):
 * it resolves the remote project anonymously, downloads the latest published
 * release bundle, verifies its hash, restores it via M17
 * (`releaseService.restoreBundleArchive`), collects the restored rows into local
 * release #1 (`releaseService.createRelease`), persists `remoteProjectId` so a
 * later push targets the same remote project, and records the attempt.
 *
 * No auth gate — the published snapshot is served anonymously, so clone has zero
 * dependency on the M24 device-flow / session machinery. Only a SUCCESSFUL clone
 * writes an append-only `release_import` row (`status='success'`). A failed clone
 * throws and writes nothing: the bootstrap caller performs a full all-or-nothing
 * rollback of `cwd` (see {@link rollbackClone}) that deletes `db.sqlite`, so there
 * is nowhere for an error row to survive — failures surface only via stderr + a
 * non-zero exit.
 *
 * Spec: brief 0-1-36-to-0-1-37.md (§ full-rollback clone).
 */
import type Database from 'better-sqlite3';
import { type RemoteHttpClient } from './remote-http-client.js';
import type { ReleaseService } from './release.js';
import type { ReleaseImportResponse } from '../../shared/release-import.js';
export declare class ReleaseImportService {
    private db;
    private releaseService;
    private remote;
    private cwd;
    constructor(db: Database.Database, releaseService: ReleaseService, remote: RemoteHttpClient, cwd: string);
    /**
     * Clone the latest published release of remote project `slug` into the local
     * (empty) project. On any caught failure: throw (no audit row) — the bootstrap
     * caller catches it, performs a full rollback ({@link rollbackClone}) so `cwd`
     * returns to its pre-`--clone` state, and exits non-zero.
     */
    clone(slug: string, opts?: {
        nameOverride?: string;
    }): Promise<ReleaseImportResponse>;
    /** Whole import audit log, newest first. Forward-looking (no HTTP surface in v1). */
    listAll(): ReleaseImportResponse[];
    /** Single import row by id, or null. */
    get(id: number): ReleaseImportResponse | null;
    private assertTargetEmpty;
    private insertRow;
}
/**
 * Full all-or-nothing rollback of a failed `--clone` (brief 0.1.37). Removes
 * exactly what THIS bootstrap run created so `cwd` returns to its pre-`--clone`
 * state; pre-existing user files (e.g. a hand-seeded `.claude4spec/config.json`
 * with a `remoteApiUrl` override) are never touched. The caller MUST close the DB
 * handle before invoking this so `db.sqlite` can be unlinked (required on Windows).
 */
export declare function rollbackClone(cwd: string, opts: {
    pagesDir: string;
    configCreated: boolean;
    claudeDirCreated: boolean;
    gitignoreCreated: boolean;
}): void;
