import type { UnstampedMessageStreamEvent } from "#protocol/message.js"; import type { InputRequest } from "#shared/input.js"; /** * Channel state for showing a session's open requests one at a time. A typed * reply answers the first open request, so a channel that can only show text * shows that one and holds the rest until it is answered. */ export interface PromptQueueState { /** The request the channel last showed, which a typed reply answers. */ shownPromptId?: string; } /** * Event handlers that call `show` with the request a typed reply answers now, * each time that request changes. They read which requests are open from the * session's own record of the events it published, so a request that closed * never shows, and one the channel failed to show is tried again on the next * event. `show` returns `false` when it could not show the request. */ export declare function promptQueueEvents(show: (channel: TChannel, request: InputRequest) => Promise): { "input.requested"(data: Extract["data"], channel: TChannel): Promise; "input.resolved"(data: Extract["data"], channel: TChannel): Promise; "approval.settled"(data: Extract["data"], channel: TChannel): Promise; };