/**
 * A child job's streamed updates (senpi#3566 todo 9): `update(value)` sends the job's next partial result in order,
 * by acknowledged reference when large, and waits for credit once `updatesInFlight` are unacknowledged - so a fast
 * producer is paced by the server instead of buffering without bound, and no update is ever dropped.
 */
import type { ToolChildChannel } from "./channel.ts";
import type { PayloadRefWriter } from "./payload-ref.ts";
export declare class JobUpdates {
    #private;
    constructor(options: {
        readonly jobId: string;
        readonly channel: Pick<ToolChildChannel, "send">;
        readonly writer?: PayloadRefWriter;
        readonly window?: number;
    });
    /** Sends the next update once a credit is free, after every earlier one; rejects after the job ended. */
    update(value: unknown): Promise<void>;
    /** The server delivered update `seq`: every update up to it holds no credit any more. */
    acked(seq: number): void;
    /** The job ended: waiting producers are released and further updates refused. */
    end(): void;
}
//# sourceMappingURL=job-updates.d.ts.map