interface ProjectIsolationConfig { maxConcurrentPerProject: number; circuitBreakerThreshold: number; circuitResetTimeMs: number; failureWindowMs: number; } export interface IsolationCheckResult { allowed: boolean; reason?: "circuit_open" | "max_concurrent"; waitTimeMs?: number; } export declare class ProjectIsolationManager { private projects; private config; private cleanupInterval; constructor(config?: Partial); private startCleanup; private getOrCreateState; checkRequest(projectSlug: string | undefined): IsolationCheckResult; startRequest(projectSlug: string | undefined): void; completeRequest(projectSlug: string | undefined, timedOut: boolean): void; /** * Record a request timeout without releasing its concurrency slot. * * Runtime handlers use this when a timeout response is returned before the * underlying work settles. This lets the circuit breaker react immediately * while the still-running work remains counted against the project limit. */ recordTimeout(projectSlug: string | undefined): void; /** * Record a worker crash for a project. This counts as a failure * toward the circuit breaker threshold and evicts the worker. */ recordWorkerCrash(projectSlug: string | undefined): void; getStats(): Record; shutdown(): void; } export declare const projectIsolation: ProjectIsolationManager; export {}; //# sourceMappingURL=project-isolation.d.ts.map