import { CancellationToken } from "../../../../../base/common/cancellation.js"; import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IReplayedTaskHistory } from "../../../../../platform/agentHost/common/taskEventReplay.js"; /** Shares reads within an authentication lifetime. The owner must clear synchronously when authentication changes. */ export declare class CloudSandboxHistoryCache extends Disposable { private readonly maxEntries; private readonly maxBytes; private readonly entries; private readonly pending; private estimatedBytes; constructor(maxEntries?: number, maxBytes?: number); load(taskId: string, token: CancellationToken, initialize: (token: CancellationToken) => Promise<{ readonly account: string; readonly fetch: (token: CancellationToken) => Promise; }>, onCachedHistory?: (history: IReplayedTaskHistory) => void, canCacheHistory?: (history: IReplayedTaskHistory | undefined) => boolean): Promise; /** Live changes invalidate stored data and prevent an older in-flight read from repopulating it. */ invalidate(taskId: string, cancelPending?: boolean, preserveCached?: boolean): void; clear(): void; private cache; dispose(): void; }