/**
 * Settings carry-forward between version homes.
 *
 * Every installed version gets an isolated `home/`, so user-authored
 * preferences (settings.json, config.toml, keybindings, auth) written while
 * running one version do not exist in a freshly installed one. Resources
 * managed in ~/.agents/ (commands, skills, hooks, rules, MCP YAML, plugins,
 * subagents) are synced into every version home by syncResourcesToVersion and
 * are deliberately NOT listed here — copying them would fight that sync.
 *
 * The manifest below classifies the remaining per-agent files, and
 * carryForwardSettings() fills gaps in a target version home from a source
 * version home. It never overwrites a value the target already has: scalars
 * keep the target's value, objects merge recursively, arrays union. That makes
 * the operation idempotent and safe to run on every `agents add` / `agents use`.
 * (One scoped exception: the 'claude-trust' strategy promotes a stamped-default
 * `hasTrustDialogAccepted: false` to `true` — see the note on that entry.)
 */
import type { AgentId } from './types.js';
export interface CarryForwardResult {
    /** Manifest rel paths that were created or updated in the target home. */
    applied: string[];
    /** Backup directory holding pre-merge copies of modified target files, if any. */
    backupDir?: string;
}
/**
 * Fill gaps in `target` from `source` without overwriting target values:
 * missing keys are copied, plain objects recurse, and everything else —
 * scalars AND arrays — keeps the target's value. Arrays deliberately do not
 * union: other writers (factory sync, hooks registration) mutate array entries
 * in place, so a union would keep re-appending stale pre-mutation copies from
 * the source on every carry (e.g. a user hook duplicated after the system
 * hooks were merged into it). Returns a new object.
 */
export declare function fillGaps(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
/**
 * Carry user settings forward from one version home into another. Both paths
 * are version-home roots (the directory containing `.claude/` / `.codex/`).
 * Only fills gaps — never overwrites target values — so it is idempotent.
 */
export declare function carryForwardSettings(agent: AgentId, fromHome: string, toHome: string): CarryForwardResult;
