import { type AggregateSyncStatus, type ItemSyncView, type RiskSeverity } from "./sync-state.js"; import { type UsageProgressView } from "./usage-progress.js"; import type { NotificationDigest, TodayLiveProviderView, TodayLiveView } from "./view-model.js"; import type { NotificationWidgetKey } from "./notification-preferences-model.js"; export type CreditAccuracy = "exact" | "estimated" | "bounded" | "unknown"; export interface CreditItemView { itemKey: string; expiresAt: string | null; estimatedEarliestAt: string | null; estimatedLatestAt: string | null; accuracy: CreditAccuracy; status: "active" | "expiring_soon" | "expired" | "unknown"; } export interface CreditPoolView { kind: "credit_pool"; id: string; providerKey: "codex-app" | "codex-cli"; variant: "count" | "expiry"; availableCount: number | null; totalEarnedCount: number | null; credits: readonly CreditItemView[]; unresolvedCount: number; nearestExpiryAt: string | null; accuracy: CreditAccuracy; sync: ItemSyncView; riskSeverity: RiskSeverity; target: { type: "service"; providerKey: "codex-app" | "codex-cli"; }; } export interface QuotaItemView { kind: "quota"; id: string; providerKey: string; window: "five_hour" | "weekly" | "context" | "budget"; progress: UsageProgressView; resetAt: string | null; sync: ItemSyncView; riskSeverity: RiskSeverity; target: { type: "service" | "dashboard"; providerKey?: string; routeKey?: string; }; } export interface WidgetItemView { kind: "widget"; id: string; widgetKey: NotificationWidgetKey; label: string; value: string; numericValue: number | null; unit: string | null; providerKey: string | null; sync: ItemSyncView; riskSeverity: RiskSeverity; target: { type: "path"; path: string; }; } export type HudItemView = QuotaItemView | CreditPoolView | WidgetItemView; export interface HudViewModel { generatedAt: string; localOnly: true; secretsReturned: false; dataRevision: string; sync: { status: AggregateSyncStatus; freshCount: number; staleCount: number; errorCount: number; neutralCount: number; lastSuccessAt: string | null; }; risk: { severity: RiskSeverity; warningCount: number; criticalCount: number; }; items: readonly HudItemView[]; } export declare const CODEX_APP_PROVIDER_KEY = "codex-app"; export declare const CODEX_CLI_PROVIDER_KEY = "codex-cli"; export interface BuildHudViewModelOptions { digest?: NotificationDigest; } export declare function buildHudViewModel(todayLive: TodayLiveView, options?: BuildHudViewModelOptions): HudViewModel; export declare function filterHudViewModelByWidgets(model: HudViewModel, selectedWidgets: readonly NotificationWidgetKey[]): HudViewModel; export declare function buildCreditPoolFromProvider(provider: TodayLiveProviderView, generatedAt: string): CreditPoolView | null; export declare function buildCreditPoolsFromProvider(provider: TodayLiveProviderView, generatedAt: string): CreditPoolView[]; //# sourceMappingURL=hud-model.d.ts.map