/**
 * The canonical .aperant/.gitignore template for the R6 layout, specialized
 * by a resolved share policy (C35).
 *
 * No-arg form expands DEFAULT_SHARE_POLICY (the `solo` preset) so existing
 * callers that don't know about the policy surface still produce the exact
 * bytes the R6 tests pin.
 *
 * @param {ReturnType<typeof resolveSharePolicy>} [policy]
 * @returns {string}
 *
 * @internal
 */
export function buildAperantGitignoreTemplate(policy?: ReturnType<typeof resolveSharePolicy>): string;
/**
 * Run the gitignore upgrade on an existing project. Non-destructive.
 *
 * C35: accepts an optional pre-resolved `policy`. When omitted, reads
 * `.aperant/config.json` from the project root and resolves via share-policy
 * — so existing callers that don't pass a policy pick up whatever the user
 * saved via `/apt:setup`. Falls back to DEFAULT_SHARE_POLICY (solo) if
 * config is missing.
 *
 * @param {string} projectRoot
 * @param {{ dryRun?: boolean, policy?: ReturnType<typeof resolveSharePolicy> }} [opts]
 * @returns {{
 *   status: 'ok' | 'noop',
 *   dryRun: boolean,
 *   backupPath: string | null,
 *   gitignorePath: string,
 *   trackedButIgnored: string[],
 *   suggestedUntrack: string | null,
 *   replaced: boolean,
 *   policy: ReturnType<typeof resolveSharePolicy>,
 * }}
 *
 * @internal
 */
export function runGitignoreUpgrade(projectRoot: string, opts?: {
    dryRun?: boolean;
    policy?: ReturnType<typeof resolveSharePolicy>;
}): {
    status: "ok" | "noop";
    dryRun: boolean;
    backupPath: string | null;
    gitignorePath: string;
    trackedButIgnored: string[];
    suggestedUntrack: string | null;
    replaced: boolean;
    policy: ReturnType<typeof resolveSharePolicy>;
};
import { resolveSharePolicy } from './share-policy.mjs';
//# sourceMappingURL=upgrade-gitignore.d.mts.map