export type Release = () => void; /** * Shared by run_agent and run_workflow so one global cap bounds all subagents. Released * slots pass directly to FIFO waiters, preventing tryAcquire() from claiming a * slot during an asynchronous handoff and exceeding the cap. */ export declare class ConcurrencyLimiter { readonly max: number; private active; private readonly waiters; constructor(max: number); get activeCount(): number; get pendingCount(): number; /** Acquires synchronously without blocking, or returns null at capacity. */ tryAcquire(): Release | null; /** Acquires a slot or queues until one is available; rejects if aborted. */ acquire(signal?: AbortSignal): Promise; private makeRelease; private handOffOrDecrement; }