import type { SessionEventWriter } from "./session-event-writer.ts";
import type { HostToSessionWorker, SessionWorkerToHost } from "./session-worker-protocol.ts";
import type { WorkerRequestInput } from "./session-worker-requests.ts";
type Reply = Extract<SessionWorkerToHost, {
    request: number;
}>;
interface HostSecretsDeps {
    readonly post: (message: HostToSessionWorker) => void;
    readonly request: (message: WorkerRequestInput) => Promise<Reply>;
}
/**
 * The host half of one worker isolate's secret prompts (senpi#5192; D11 secret phase 5.5): the route selection the
 * isolate asks for, its bounded frames, and sealed answers forwarded to the isolate's latch after the host
 * authenticated them.
 */
export declare class WorkerHostSecrets {
    private route?;
    private writer?;
    private readonly ids;
    private readonly queue;
    /** Grants whose sealed answer the host forwarded, per id: the only grants an isolate may name as the winner. */
    private readonly forwarded;
    private readonly settledIds;
    private readonly deps;
    constructor(deps: HostSecretsDeps);
    bind(sessionId: string, writer: SessionEventWriter): void;
    /** A forwarded `extension_ui_response` for one of this isolate's secrets that its route does not accept. */
    refuses(uiRequestId: string): boolean;
    exited(): void;
    receive(message: SessionWorkerToHost): boolean;
    private select;
    private admitsSettle;
    /** Only for ids the isolate holds; one in flight and four queued per id, beyond that `secret_answer_refused`. */
    private forward;
}
export {};
//# sourceMappingURL=session-worker-host-secrets.d.ts.map