import { EventType } from "../common/Exports.js"; /** * Inline commit: bookkeeping of commits sent but not yet acknowledged, for one * recognition session. Decides which commits are re-sent after a reconnect, and where. */ export declare class InlineCommitTracker { private static readonly MaxPendingCommits; private privPending; private privSentBytes; static log(message: string, eventType: EventType): void; get pendingCount(): number; /** * Discards all pending commits, e.g. at session teardown. */ reset(reason: string): void; /** * Records a commit read from the audio stream. Returns false if it must not be sent. */ onCommitRead(token: number, channelId: number | undefined, offsetBytes: number): boolean; /** * Audio is about to be replayed from startBytes, on a new connection or in a new turn. * Commits before that point are obsolete: the service has processed audio past them. * The others are re-sent when the replayed audio reaches their position. */ onReplay(startBytes: number): void; /** * Audio has been sent up to endBytes. */ onAudioSent(endBytes: number): void; /** * Returns the commits to re-send now that the audio before them has been sent, in order. */ takeResendable(): { token: number; channelId?: number; }[]; /** * A result carrying the token was received. Earlier tokens will not be acknowledged, * since the service processes commits in order on a connection. */ onAcknowledged(token: number): void; }