import type { PrefixCacheConfig, PrefixCacheTurnResult } from "./types.js"; /** Length of the longest common character prefix between two strings. */ export declare function commonPrefixLength(a: string, b: string): number; /** * Deterministic simulator of OpenAI-style automatic prompt caching. * * Caching is scoped to `sessionId` and matches the longest common prefix with * the previous request in that session. A prefix must reach `minCacheTokens` * to be served from cache at all (OpenAI's real threshold is ~1024 tokens). */ export declare class PrefixCacheSimulator { private readonly config; private lastPrompt; constructor(config: PrefixCacheConfig); /** Account one provider request. `outputTokens` does not affect cache, only reporting. */ account(promptText: string, outputTokens: number): PrefixCacheTurnResult; } //# sourceMappingURL=prefix-cache.d.ts.map