/**
 * Kimi CLI OAuth + usage tracker.
 *
 * - Reads ~/.kimi/credentials/kimi-code.json without exposing tokens.
 * - Decodes safe OAuth identity claims into a masked display id.
 * - Fetches Kimi Code /usages quota when possible.
 * - Scans local session traces as a no-network fallback for rolling 5h/week time.
 */
export interface UsageStats {
    totalSecondsToday: number;
    sessionCountToday: number;
    totalSecondsLast5Hours: number;
    sessionCountLast5Hours: number;
    totalSecondsWeek: number;
    sessionCountWeek: number;
    oauth: OAuthIdentity;
    quota: KimiQuotaStatus;
}
export interface OAuthIdentity {
    loggedIn: boolean;
    displayId: string;
    tokenStatus: "missing" | "valid" | "expired" | "unknown";
    source: "kimi-code" | "none";
    expiresAt?: string;
}
export interface KimiQuotaRow {
    label: string;
    used: number;
    limit: number;
    remaining: number;
    remainingPercent: number | null;
    resetHint?: string;
    window: "5h" | "weekly" | "other";
}
export interface KimiQuotaStatus {
    fetchedAt?: string;
    error?: string;
    fiveHour?: KimiQuotaRow;
    weekly?: KimiQuotaRow;
    rows: KimiQuotaRow[];
}
export interface GetKimiUsageOptions {
    homeDir?: string;
    nowMs?: number;
    fetchQuota?: boolean;
    fetchImpl?: typeof fetch;
    usageBaseUrl?: string;
}
export declare function getKimiUsage(options?: GetKimiUsageOptions): Promise<UsageStats>;
export declare function formatDuration(seconds: number): string;
export declare function formatQuota(row: KimiQuotaRow | undefined, fallbackSeconds: number): string;
export declare function formatKimiUsageInline(stats: UsageStats): string;
