import { Token } from "../types.js";
export declare class TokenStreamRegulator {
    addChunk({ tokens, text }: {
        tokens: Token[];
        text: string;
    }): QueuedTokenRelease;
    popFreeChunkTokens(): Token[];
    getPartiallyFreeChunk(): {
        tokens: Token[];
        text: string;
    };
    getAllQueuedChunkTokens(): Token[];
}
export declare class QueuedTokenRelease {
    readonly tokens: readonly Token[];
    readonly text: string;
    private constructor();
    get isFree(): boolean;
    get isPartiallyFree(): boolean;
    getFreeTextIndex(): number;
    getFreeTokenIndex(): number;
    createTextIndexLock(startIndex: number): QueuedTokenReleaseLock;
    createTokenIndexLock(startIndex: number): QueuedTokenReleaseLock;
}
export declare class QueuedTokenReleaseLock {
    private constructor();
    get index(): number;
    dispose(): void;
    [Symbol.dispose](): void;
}
