#!/usr/bin/env node
/**
 * Top-level v16 -> v17 graph substrate upgrade utility.
 *
 * Usage:
 *   npm run upgrade -- [--repo <path>] [--graph <name>] [--dry-run] [--json]
 */
import { type CheckpointSchemaUpgradeResult } from './migrations/v17.0.0/checkpoint-schema-upgrade.ts';
import type GraphPersistencePort from '../src/ports/GraphPersistencePort.ts';
import type CryptoPort from '../src/ports/CryptoPort.ts';
type CacheRefAction = 'absent' | 'would-delete' | 'deleted';
export declare class V16ToV17UpgradeArgumentError extends Error {
    constructor(message: string);
}
type V16ToV17UpgradeArgsOptions = {
    readonly repo: string;
    readonly graphNames: readonly string[];
    readonly dryRun: boolean;
    readonly json: boolean;
    readonly help: boolean;
};
export declare class V16ToV17UpgradeArgs {
    readonly repo: string;
    readonly graphNames: readonly string[];
    readonly dryRun: boolean;
    readonly json: boolean;
    readonly help: boolean;
    constructor(options: V16ToV17UpgradeArgsOptions);
}
export interface CacheRefMigrationResult {
    readonly ref: string;
    readonly action: CacheRefAction;
    readonly previousOid: string | null;
}
export interface GraphV16ToV17UpgradeResult {
    readonly graphName: string;
    readonly checkpoint: CheckpointSchemaUpgradeResult;
    readonly cacheRefs: readonly CacheRefMigrationResult[];
}
export interface V16ToV17UpgradeResult {
    readonly dryRun: boolean;
    readonly graphCount: number;
    readonly graphs: readonly GraphV16ToV17UpgradeResult[];
}
export interface V16ToV17UpgradeOptions {
    readonly persistence: GraphPersistencePort;
    readonly graphNames: readonly string[];
    readonly dryRun?: boolean;
    readonly crypto?: CryptoPort;
}
export declare function parseArgs(argv: readonly string[], cwd: string): V16ToV17UpgradeArgs;
export declare function upgradeV16ToV17(options: V16ToV17UpgradeOptions): Promise<V16ToV17UpgradeResult>;
export declare function formatHumanResult(result: V16ToV17UpgradeResult): string;
export {};
