@@ -34,6 +34,7 @@ import {
3434 type StorageHealthSummary ,
3535} from "../../storage.js" ;
3636import type { RuntimeObservabilitySnapshot } from "../../runtime/runtime-observability.js" ;
37+ import type { QuotaCacheData } from "../../quota-cache.js" ;
3738import type { TokenFailure , TokenResult } from "../../types.js" ;
3839import { sleep } from "../../utils.js" ;
3940
@@ -108,6 +109,7 @@ export interface ReportCommandDeps {
108109 getCwd ?: ( ) => string ;
109110 writeFile ?: ( path : string , contents : string ) => Promise < void > ;
110111 loadRuntimeObservabilitySnapshot ?: ( ) => Promise < RuntimeObservabilitySnapshot | null > ;
112+ loadQuotaCache ?: ( ) => Promise < QuotaCacheData | null > ;
111113}
112114
113115function isRetryableWriteError ( error : unknown ) : boolean {
@@ -315,6 +317,7 @@ export async function runReportCommand(
315317 const refreshFailures = new Map < number , TokenFailure > ( ) ;
316318 const liveQuotaByIndex = new Map < number , CodexQuotaSnapshot > ( ) ;
317319 const probeErrors : string [ ] = [ ] ;
320+ const quotaCache = ( await deps . loadQuotaCache ?.( ) . catch ( ( ) => null ) ) ?? null ;
318321 let runtimeSnapshot : RuntimeObservabilitySnapshot | null | undefined ;
319322 let runtimeSnapshotLoadError : string | null = null ;
320323 try {
@@ -462,6 +465,8 @@ export async function runReportCommand(
462465 now,
463466 refreshFailure : refreshFailures . get ( index ) ,
464467 liveQuota : liveQuotaByIndex . get ( index ) ,
468+ quotaCache,
469+ allAccounts : storage . accounts ,
465470 runtimeOverlay : runtimeSnapshot ,
466471 } ) ) ,
467472 )
0 commit comments