/**
 * studiograph admin migrate — bulk regex find-replace across workspace repos.
 *
 * Codifies the hand-rolled sed pattern the owner has reached for twice
 * during schema renames. Walks every repo in workspace.json (or a
 * `--repos`-filtered subset), applies the regex, and produces one commit
 * per repo with the same message. `--dry-run` reports without writing.
 * `--also-rename-files` does a second pass that `git mv`s any files
 * whose name matches the regex.
 *
 * Safety:
 *   - Refuses if ANY targeted repo has uncommitted changes. Catches
 *     half-finished local edits before they're caught up in the rewrite.
 *   - Runs the regex against the file contents read with utf-8; commit
 *     uses `git -c core.quotepath=false` so non-ASCII file paths in
 *     summaries don't render as `\xxx` escapes.
 *   - Skips the .git/, .studiograph/, and node_modules/ subtrees of every
 *     repo (defensive — none of those should ever match a workspace glob,
 *     but a stray `--in '**'` shouldn't pull them in either).
 */
import { Command } from 'commander';
import type { RepoConfig } from '../../../core/types.js';
interface RepoChange {
    repoName: string;
    repoPath: string;
    fileChanges: Array<{
        relPath: string;
        replacements: number;
    }>;
    fileRenames: Array<{
        from: string;
        to: string;
    }>;
}
export declare const adminMigrateCommand: Command;
/**
 * Walk one repo, regex-replace contents in every file matching `pattern`
 * (the glob pattern, not the regex). Returns a summary; writes files
 * unless `dryRun` is true.
 */
export declare function migrateRepoContent(repo: RepoConfig, globPattern: string, regex: RegExp, replacement: string, dryRun: boolean): Promise<RepoChange>;
/**
 * Apply a replacement-string template the way String.prototype.replace
 * does when given a string (not a function): expand $1..$9 to capture
 * groups, $$ to a literal $, $& to the whole match.
 *
 * We re-implement this because we call replace with a *function* (to
 * count matches) but want the literal-string substitution semantics for
 * the actual replacement text. Without this, $1/$2 would render
 * literally instead of being expanded.
 */
declare function applyReplacementString(template: string, match: string, args: unknown[]): string;
export declare const __internals: {
    applyReplacementString: typeof applyReplacementString;
};
export {};
