/**
 * ensureInteractiveReady — onboarding-safe config homes for the subscription
 * pool (2026-06-09 incident, topic 20905).
 *
 * Pool-account config homes are created via `claude auth login`, which stores
 * OAuth tokens but is HEADLESS-ONLY: it never sets the interactive first-launch
 * onboarding flags. Relaunching an INTERACTIVE Claude Code session into such a
 * home (session pinning, proactive/reactive account swap) re-runs first-launch
 * onboarding — the OAuth-authorize URL + the "Bypass Permissions mode" accept
 * screen — and the session wedges. The tokens were present; the onboarding
 * FLAGS were the missing piece (~8 live sessions wedged, browser-tab spam,
 * a manual operator login to recover).
 *
 * This util makes pin/swap onboarding-safe by construction: idempotently seed
 * the three local trust-acknowledgement flags in `<configHome>/.claude.json`,
 * preserving every other key byte-for-byte.
 *
 * Structural invariants:
 *   - NEVER touches `oauthAccount` or any token/credential field — only the
 *     three onboarding flags are ever written, onto the parsed existing object.
 *   - NEVER rewrites a file it cannot parse — an unparseable `.claude.json`
 *     may still hold the account's credentials in a salvageable form, so we
 *     refuse and report rather than clobber.
 *   - Fail-safe: never throws into the caller. A launch must not crash on
 *     this; the worst case is the pre-fix behavior (onboarding wedge), not a
 *     dead spawn path. All failures return `{ patched: false, reason }`.
 *   - Idempotent + cheap (one stat/read; a write only when a flag is missing),
 *     so calling it defensively on every pinned/swapped launch is fine.
 */
/**
 * The interactive first-launch flags `claude auth login` (headless) never
 * sets. All three are LOCAL trust acknowledgements — seeding them to `true`
 * asserts nothing about credentials, only that first-launch onboarding and
 * the bypass-permissions/trust dialogs are accepted for this home.
 */
export declare const INTERACTIVE_ONBOARDING_FLAGS: readonly ["hasCompletedOnboarding", "bypassPermissionsModeAccepted", "hasTrustDialogAccepted"];
export interface EnsureInteractiveReadyResult {
    /** True when this call wrote one or more missing flags. */
    patched: boolean;
    /** Why nothing was written (or which flags were seeded when patched). */
    reason: string;
}
export interface EnsureInteractiveReadyOptions {
    /**
     * When true, a config home whose directory does not exist is left alone
     * (`patched: false`) instead of being created. Used by the one-time
     * migration sweep so a stale pool entry never litters $HOME with empty
     * credential-less homes; launch paths keep the default (create/merge —
     * the account was just selected, so its home is expected to exist).
     */
    requireExistingHome?: boolean;
}
/**
 * Idempotently mark `<configHome>/.claude.json` interactive-ready. Returns
 * `{ patched: true }` only when a missing flag was actually written.
 */
export declare function ensureInteractiveReady(configHome: string, opts?: EnsureInteractiveReadyOptions): EnsureInteractiveReadyResult;
//# sourceMappingURL=ensureInteractiveReady.d.ts.map