/** * The JSON Claude Code writes to a configured status-line command's stdin. * * This is the one place the plan-limit percentages exist: no file Claude Code * keeps on disk records how much of the 5-hour or weekly limit is used. Only * the fields read here are modelled, and EVERY one is optional -- `rate_limits` * is absent for API-key users and before the first response of a session, and * the payload is internal and unversioned like the transcripts. See * docs/DATA_SOURCES.md ยง2.11. */ /** The two rolling windows a Pro or Max plan is limited by. */ export type PlanLimitWindow = 'five_hour' | 'seven_day'; export declare const PLAN_LIMIT_WINDOWS: PlanLimitWindow[]; /** How long each window runs, so its start can be put at `resets_at` minus this. */ export declare const WINDOW_MS: Record; export interface PlanLimitReading { window: PlanLimitWindow; /** 0 to 100, exactly as Claude Code reported it. */ usedPercent: number; /** ISO 8601, UTC. */ resetsAt: string; } export interface StatusLineInput { sessionId?: string; /** The session's transcript, from which the context size is read. */ transcriptPath?: string; /** Claude Code's version, kept beside each reading so odd data can be traced. */ version?: string; /** Empty when the payload carried none -- an API-key user, or no response yet. */ readings: PlanLimitReading[]; } /** * Reads the status-line payload. Never throws: a status line that errors shows * nothing at all, so anything unreadable is treated as "no data", and a value * outside its documented range is dropped rather than stored. */ export declare function parseStatusLineInput(raw: string): StatusLineInput;