export type WorkflowStageAdmissionDecision = "admitted" | "late" | "duplicate";
export interface WorkflowStageAdmissionResult {
    readonly decision: WorkflowStageAdmissionDecision;
    readonly completion: Promise<void>;
}
/**
 * Linearizable admission boundary for externally-produced workflow-stage traffic.
 * JavaScript execution between the state check and state transition is synchronous:
 * an enqueue that wins belongs to the stage, while close makes every later enqueue
 * use the external route. Stable keys make either outcome exactly-once.
 */
export declare class WorkflowStageAdmissionBoundary {
    private open;
    private readonly completed;
    private readonly inFlight;
    private readonly pending;
    private readonly invocationContext;
    private closePromise;
    private readonly drainAdmittedWork;
    constructor(drainAdmittedWork?: () => Promise<void>);
    admit(key: string | undefined, deliver: () => void | Promise<void>, routeLate: () => void | Promise<void>): WorkflowStageAdmissionResult;
    trackAdmittedWork(completion: Promise<void>): void;
    isOpen(): boolean;
    seal(): void;
    close(): Promise<void>;
    private finishClose;
    private invoke;
}
//# sourceMappingURL=workflow-stage-admission.d.ts.map