import type { CredentialStore } from '../credentials/credential-store.js'; import type { HttpPort } from '../platform/http.js'; /** * If the legacy account's `_keychain.claudeAiOauth` access token is expired * (or about to expire), call the Anthropic OAuth refresh endpoint and rewrite * the snapshot in-place. Returns true when a refresh actually happened, false * otherwise (no _keychain, no refresh_token, fresh tokens, or refresh failed). * * Called internally by `ensureProfileForAccount` before the sync * `importProfileFromAccount` flow, so the snapshot landing in the Keychain * / per-profile JSON is fresh by construction. Without this pre-step, profiles * dormant for hours/days would carry expired access tokens straight to claude, * which then 401s instead of auto-refreshing (it doesn't auto-refresh in * --print mode against a non-default config dir). * * Failure is silent: we log nothing, return false, and let the caller fall * through to its existing "needsLogin" handling. */ export declare function refreshLegacySnapshotIfStale(email: string, accountsDirPath: string, deps?: { credentials?: CredentialStore; claudeJsonPath?: string; http?: HttpPort; }): Promise;