/**
 * `olam flywheel migrate-overlays` — operator-local overlay-layer migration.
 *
 * Scans `~/.claude/{skills,agents}.overrides/` recursively for hardcoded
 * `~/.claude/scripts/<name>` references matching the SHIM_TARGETS registry;
 * sed-replaces each match with the corresponding `olam flywheel <subcmd>`
 * invocation. Each operator runs this once to migrate THEIR layer 3
 * (per-user overlay files) from the legacy script-path contract to the new
 * flywheel CLI surface.
 *
 * Closes K1 OQ23 (pass-3 resolution): the migration helper that scales
 * the namespace migration beyond just this operator's overlays. Each
 * operator with their own `.overrides/` tree runs this command once.
 *
 * Replaces:
 *   `bash ~/.claude/scripts/emit-breadcrumb.sh ...` → `olam flywheel emit-breadcrumb ...`
 *   `python3 ~/.claude/scripts/sanitize-persona-output.py ...` → `olam flywheel sanitize-persona-output ...`
 *   `~/.claude/scripts/k5-rubric-helper.py` → `olam flywheel k5-validate`
 *   etc. (full set per SHIM_TARGETS registry at @olam/core/lib/shim-targets)
 *
 * Flags:
 *   --dry-run             — preview changes without writing
 *   --target-dir <path>   — override the search root (default: ~/.claude/); for tests
 *   --json                — emit summary as JSON for tooling
 *
 *   --push                — PUSH mode: copy overlays into atlas-toolbox clone
 *   --target <name>       — required with --push; name of a registered skill source
 *
 * Idempotent: re-runs against already-migrated overlays produce no diff.
 *
 * Plan reference: docs/plans/olam-flywheel-cli-namespace/phase-c-tasks.md § C7
 * Phase B: docs/plans/member-overlays-sync/phase-b-tasks.md
 */
import type { Command } from 'commander';
interface MigrateOverlaysOptions {
    dryRun?: boolean;
    targetDir?: string;
    json?: boolean;
    push?: boolean;
    target?: string;
    forceCurrentBranch?: boolean;
    initMember?: string;
    /** For tests: inject clone path directly instead of reading from registry. */
    _testClonePath?: string;
    /** For tests: inject atlas-user directly instead of reading ~/.claude/.atlas-user. */
    _testAtlasUser?: string;
    /** For tests: override OLAM_CLAUDE_DIR for resolveAtlasUser. */
    _testClaudeDir?: string;
    /** For tests: inject git URLs by source name. */
    _testSkillSources?: Array<{
        id: string;
        name: string;
        gitUrl: string;
        branch: string;
        addedAt: number;
        prefix?: string;
    }>;
}
interface FileMigrationResult {
    path: string;
    replacements: Array<{
        basename: string;
        count: number;
        replacedBy: string;
    }>;
    totalReplacements: number;
}
interface MigrationSummary {
    scanned: number;
    modified: number;
    unchanged: number;
    totalReplacements: number;
    perFile: FileMigrationResult[];
}
export interface PushSummary {
    filesCopied: number;
    filesUnchanged: number;
    filesCreated: number;
    branchName: string;
    nextStepGhCommand: string;
    /** Full copy-paste block for stdout in human mode; populated only on real (non-dry-run) run. */
    _copyPasteBlock?: string;
}
export interface InitMemberSummary {
    memberName: string;
    branchName: string;
    nextStepGhCommand: string;
    /** Paths created or would-create in dry-run. */
    createdPaths: string[];
    /** Full copy-paste block for stdout in human mode; absent in dry-run. */
    _copyPasteBlock?: string;
}
/**
 * Error thrown by push-mode operations. Carries an exit code so callers
 * can distinguish between different failure scenarios.
 */
export declare class PushError extends Error {
    readonly exitCode: number;
    constructor(exitCode: number, message: string);
}
/**
 * Core push-overlays implementation (Phase B).
 * Returns PushSummary. Throws PushError on validation/pre-flight failures
 * (lets callers handle process.exit vs test assertions cleanly).
 */
export declare function pushOverlays(opts: MigrateOverlaysOptions): PushSummary;
/**
 * Scaffold members/<name>/{skills,agents}.overrides/.gitkeep + README.md
 * in the atlas-toolbox clone. Leaves the working tree dirty.
 * Throws PushError on validation / pre-flight / idempotency failures.
 */
export declare function initMember(opts: MigrateOverlaysOptions): InitMemberSummary;
export declare function migrateOverlays(opts?: MigrateOverlaysOptions): MigrationSummary;
export declare function registerFlywheelMigrateOverlays(parent: Command): void;
export {};
//# sourceMappingURL=migrate-overlays.d.ts.map