import type { DoctorReport } from '../contract.js'; /** Minimal snapshot view doctor needs — a subset of AccountSnapshot. */ export interface DoctorSnapshotView { email: string; /** oauthAccount.accountUuid from the snapshot (the account it claims to be). */ accountUuid?: string; /** _keychain.claudeAiOauth.accessToken, when the snapshot carries tokens. */ accessToken?: string; /** _capturedFrom.accountUuid (provenance stamp), when present. */ capturedFromAccountUuid?: string; } /** Per-account usage-cache view doctor needs. */ export interface DoctorUsageView { email: string; /** rateLimitedUntil epoch-ms from the cache, when set. */ rateLimitedUntil?: number; } export interface DoctorInput { activeAccount: string | null; snapshots: DoctorSnapshotView[]; usage: DoctorUsageView[]; /** macOS only: a Claude Code Keychain OAuth item is still present. */ keychainItemPresent: boolean; /** Clock injection for the rate-limit check. */ now: number; } /** * Run the credential-health diagnostics over already-read on-disk state. * Pure and deterministic. */ export declare function diagnose(input: DoctorInput): DoctorReport;