/** * Rate Limit Display Utilities * * Formats and displays detailed rate limit information when limits are reached. */ /** * Rate limit information extracted from API responses or agent output */ export interface RateLimitInfo { /** Current usage as percentage (0-100) */ usagePercent: number; /** Tokens used in current period */ tokensUsed?: number; /** Maximum tokens allowed */ tokensLimit?: number; /** Number of requests made this hour */ requestsMade?: number; /** Timestamp when rate limit resets (Unix epoch seconds) */ resetTimestamp?: number; /** Seconds until reset (from retry-after header) */ retryAfterSeconds?: number; } /** * Session context for display when rate limited */ export interface SessionContext { /** Number of tasks completed */ tasksCompleted: number; /** Total number of tasks */ totalTasks: number; /** Current task being worked on */ currentTask?: string; /** Current git branch */ branch?: string; /** Number of loop iterations completed */ iterations?: number; } /** * Parse rate limit headers from API response headers */ export declare function parseRateLimitHeaders(headers: Record): RateLimitInfo; /** * Extract rate limit info from agent output text */ export declare function parseRateLimitFromOutput(output: string): RateLimitInfo; /** * Format time duration in human-readable format */ export declare function formatDuration(seconds: number): string; /** * Format a timestamp as local and UTC time */ export declare function formatResetTime(timestamp: number): string; /** * Format token count with K/M suffixes */ export declare function formatTokenCount(tokens: number): string; /** * Display detailed rate limit information */ export declare function displayRateLimitStats(rateLimitInfo: RateLimitInfo, sessionContext?: SessionContext): void; /** * Format rate limit stats as a single-line summary */ export declare function formatRateLimitSummary(rateLimitInfo: RateLimitInfo): string; //# sourceMappingURL=rate-limit-display.d.ts.map