import type { FabricFreshnessChecker } from "./freshness.js"; import type { FabricSpeculationConfig, FabricSpeculationReplay, FabricSpeculationRuntime, FabricSpeculationServeResult, FabricSpeculationStats } from "./types.js"; /** * Turn-scoped store of pre-launched speculation promises. * * Compiled kernels decide admission, consume each entry once, classify both * serve checkpoints, and update accounting. The host owns keyed storage and * observes actual promise settlement, epochs, time, freshness and aborts. * Binding identity is part of the key, so an old binding cannot serve a new one. * The concurrency observation counts retained nonfailed entries, not every * unsettled external effect. Reset aborts work and advances the epoch. */ export declare class FabricSpeculationStore implements FabricSpeculationRuntime { #private; constructor(config: Pick); get epoch(): number; stats(): FabricSpeculationStats & { pending: number; }; bumpEpoch(): void; /** Fence descriptor/argument preparation across resets, effects and invocation end. */ captureLaunch(parentToolCallId: string): () => boolean; static key(parentToolCallId: string, ref: string, preparedArgs: Record, bindingToken: string): string; /** Register and start work only after the compiled admission decision. */ launch(parentToolCallId: string, ref: string, preparedArgs: Record, execute: (signal: AbortSignal) => Promise, freshness: FabricFreshnessChecker | undefined, replay: FabricSpeculationReplay, bindingToken: string): boolean; tryServe(parentToolCallId: string, ref: string, preparedArgs: Record, bindingToken: string): Promise; /** Execution for this tool call finished: everything unserved is waste. */ onInvocationEnd(parentToolCallId: string): void; /** Turn backstop: speculation never outlives a turn. */ reset(): void; } //# sourceMappingURL=store.d.ts.map