/**
 * Paths (relative to `<rootPath>/.bobbit/`) that the running gateway owns
 * when the user's chosen rootPath happens to be the gateway's own working
 * directory. Bias toward false positives — preserving extra files is cheap,
 * accidentally archiving gateway state kills the running server.
 *
 * Three entry shapes:
 *   - "state/file"   — exact path match
 *   - "state/dir/"   — directory subtree (skip-and-record as a unit)
 *   - "state/foo-*"  — filename prefix (matches everything starting with
 *                      "foo-" in the parent dir; one segment only)
 *
 * `bobbitConfigDir()` (under `config/`) writes are all project-scoped
 * (system-prompt.md, tools/, mcp.json) and ARE archived. Do not add
 * `config/...` entries here.
 */
export declare const GATEWAY_OWNED_FILES: readonly string[];
export interface ArchiveResult {
    /** Absolute path of the created archive directory. */
    archiveDir: string;
    /** ISO timestamp of when the archive started. */
    archivedAt: string;
    /** Relative paths (from `<rootPath>/.bobbit/`) of entries that moved. */
    movedPaths: string[];
    /** Relative paths (from `<rootPath>/.bobbit/`) of entries that were preserved. */
    preservedPaths: string[];
    /** Whether the rootPath was detected as gateway-owned. */
    gatewayOwned: boolean;
    /** Partial-failure info if any per-entry move failed. */
    partial?: {
        failed: Array<{
            path: string;
            error: string;
        }>;
    };
}
export declare class ArchiveError extends Error {
    readonly code: "no-bobbit-dir" | "empty-bobbit-dir" | "bad-path";
    constructor(code: "no-bobbit-dir" | "empty-bobbit-dir" | "bad-path", message: string);
}
/**
 * Returns true if `relPath` is preserved by the allowlist.
 * Used while walking — caller short-circuits recursion for matched dirs.
 */
export declare function isPreserved(relPath: string, allowlist: readonly string[]): {
    preserved: boolean;
    isDirRoot: boolean;
};
/**
 * Archive the project-scoped contents of `<rootPath>/.bobbit/` to a fresh
 * `<rootPath>/.bobbit-archive-NNN/` directory. Skips entries that match
 * `GATEWAY_OWNED_FILES` when `gatewayOwned` is true.
 *
 * Throws `ArchiveError` for caller-recoverable problems:
 *   - "bad-path"        rootPath missing / not a directory
 *   - "no-bobbit-dir"   `<rootPath>/.bobbit/` does not exist
 *   - "empty-bobbit-dir" `<rootPath>/.bobbit/` exists but contains nothing
 *
 * Partial per-entry failures are NOT raised — they are surfaced via
 * `result.partial.failed` and the manifest. We do not roll back.
 */
export declare function archiveProjectBobbitDir(rootPath: string, opts: {
    gatewayOwned: boolean;
    allowlist?: readonly string[];
}): ArchiveResult;
//# sourceMappingURL=bobbit-archive.d.ts.map