merge in v0.9.0

This commit is contained in:
webdevcody
2026-01-07 18:22:32 -05:00
9 changed files with 1215 additions and 17 deletions

View File

@@ -681,20 +681,24 @@ export interface CodexRateLimitWindow {
limit: number;
used: number;
remaining: number;
window: number; // Duration in minutes
usedPercent: number; // Percentage used (0-100)
windowDurationMins: number; // Duration in minutes
resetsAt: number; // Unix timestamp in seconds
}
export interface CodexUsage {
planType: CodexPlanType | null;
credits: CodexCreditsSnapshot | null;
rateLimits: {
session?: CodexRateLimitWindow;
weekly?: CodexRateLimitWindow;
primary?: CodexRateLimitWindow;
secondary?: CodexRateLimitWindow;
credits?: CodexCreditsSnapshot;
planType?: CodexPlanType;
} | null;
lastUpdated: string;
}
// Response type for Codex usage API (can be success or error)
export type CodexUsageResponse = CodexUsage | { error: string; message?: string };
/**
* Check if Claude usage is at its limit (any of: session >= 100%, weekly >= 100%, OR cost >= limit)
* Returns true if any limit is reached, meaning auto mode should pause feature pickup.