import type { FabricSpeculationStats } from "../speculation/types.js"; declare const PLANS: readonly ["admit", "skip", "ended"]; declare const OUTCOMES: readonly ["ready", "absent", "epoch", "freshness", "failed"]; declare const EVENTS: readonly ["launched", "served", "epochInvalidated", "freshnessInvalidated", "failed", "wasted", "skipped", "bump"]; export type SpeculationEvent = typeof EVENTS[number]; export declare const admitSpeculation: (input: { ended: boolean; duplicate: boolean; entries: number; inFlight: number; maxEntries: number; maxConcurrent: number; }) => (typeof PLANS)[number]; export interface SpeculationObservation { settled: boolean; aborted: boolean; now: number; createdAt: number; ttl: number; birthEpoch: number; epoch: number; fresh: boolean; failed: boolean; } export declare const checkSpeculation: (input: SpeculationObservation) => (typeof OUTCOMES)[number]; /** Expiry-only sweep uses the same compiled TTL predicate, without callbacks. */ export declare const speculationExpired: (now: number, createdAt: number, ttl: number) => boolean; /** The store owns this compiled state. No mutable statistics escape. */ export declare class SpeculationAccounting { #private; get epoch(): number; record(event: SpeculationEvent): void; stats(): FabricSpeculationStats; } export {}; //# sourceMappingURL=speculation.d.ts.map