/**
 * KiroGraph Utility Module
 *
 * Shared utilities: concurrency, batching, rate limiting, memory monitoring,
 * security path validation, and misc helpers.
 */
export declare class Mutex {
    private queue;
    private _locked;
    acquire(): Promise<() => void>;
    withLock<T>(fn: () => Promise<T>): Promise<T>;
    isLocked(): boolean;
    private _release;
}
export declare class FileLock {
    private readonly lockPath;
    static readonly STALE_TIMEOUT_MS = 120000;
    constructor(lockPath: string);
    acquire(): Promise<() => void>;
    withLock<T>(fn: () => T): T;
    withLockAsync<T>(fn: () => Promise<T>): Promise<T>;
    private _release;
}
export declare function processInBatches<T, R>(items: T[], batchSize: number, fn: (batch: T[]) => Promise<R[]>): Promise<R[]>;
export declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, delayMs: number): T;
export declare function throttle<T extends (...args: unknown[]) => unknown>(fn: T, intervalMs: number): T;
export declare class MemoryMonitor {
    private readonly thresholdBytes;
    private readonly intervalMs;
    private timer;
    private peakBytes;
    constructor(opts: {
        thresholdMb: number;
        intervalMs: number;
    });
    start(): void;
    stop(): void;
    /** Returns peak heap usage in bytes. */
    getPeakUsage(): number;
}
/** Resolve and validate that filePath is within root. Returns null if not. */
export declare function validatePathWithinRoot(filePath: string, root: string): string | null;
/** Throw if the given path is a sensitive system directory. */
export declare function validateProjectPath(projectRoot: string): void;
/** Returns true if filePath is within root (string-based, no symlink resolution). */
export declare function isPathWithinRoot(filePath: string, root: string): boolean;
/** Returns true if filePath is within root, resolving symlinks (symlink-safe). */
export declare function isPathWithinRootReal(filePath: string, root: string): boolean;
export declare function clamp(value: number, min: number, max: number): number;
export declare function normalizePath(p: string): string;
export declare function safeJsonParse<T>(json: string, fallback: T): T;
//# sourceMappingURL=utils.d.ts.map