/**
 * Rate Limit Parser Utility
 *
 * Detects and parses Claude Code rate limit messages emitted during
 * headless SDK sessions. Supports three known message formats:
 *
 *   1. Hourly/5-hour limit:  "You've hit your limit · resets 12am"
 *   2. Weekly limit:         "Weekly limit reached · resets Feb 22 at 9:30am"
 *   3. Tomorrow reset:       "resets tomorrow at 3pm"
 *
 * Also provides a fallback function for when parsing fails, so callers
 * can always obtain a conservative reset time estimate.
 *
 * Usage:
 *   import { isRateLimitMessage, parseRateLimitResetTime, getFallbackResetTime } from '../utils/rate-limit-parser.js';
 *
 *   if (isRateLimitMessage(text)) {
 *     const resetAt = parseRateLimitResetTime(text) ?? getFallbackResetTime(text);
 *   }
 *
 * @module
 */
/**
 * Patterns to detect rate limit messages from Claude Code.
 *
 * Handles:
 * - "You've hit your limit" with straight (') or curly (\u2019) apostrophes
 * - "Weekly limit reached"
 * - Generic "limit" + "resets" co-occurrence in the same message
 */
export declare const RATE_LIMIT_PATTERNS: ReadonlyArray<RegExp>;
/**
 * Returns `true` if the content matches any known rate limit pattern.
 */
export declare function isRateLimitMessage(content: string): boolean;
/**
 * Parses the reset time embedded in a rate limit message.
 *
 * Returns a `Date` representing when the rate limit resets, or `undefined`
 * if the message does not contain a parseable reset time.
 *
 * @param content - The raw message text from Claude Code
 * @returns The parsed reset `Date`, or `undefined` if parsing fails
 */
export declare function parseRateLimitResetTime(content: string): Date | undefined;
/**
 * Returns a fallback reset time when the exact time cannot be parsed.
 * Uses the message content to determine the type of limit and applies
 * a conservative default sleep duration.
 *
 * - Weekly limit ("weekly"): 6 hours from now
 * - Hourly/daily limit (default): 1 hour from now
 */
export declare function getFallbackResetTime(content: string): Date;
//# sourceMappingURL=rate-limit-parser.d.ts.map