/**
 * In-memory rate limiter shared by AccessLogWriter and AuditLogger to enforce
 * the per-action / per-actor caps defined in the engine's
 * `POLICY_BY_ACTION` table (one row per minute per actor for diagnostics-class
 * reads).
 *
 * Implementation: a single Map keyed by `${action}:${actorKey}` whose value
 * is the last permit timestamp. The token bucket is implicit — a permit is
 * granted iff `now - last >= floor(60_000 / perMinutePerActor)`. On each
 * permit() call we lazily prune entries older than 5 minutes so memory
 * stays bounded for long-lived orchestrators.
 *
 * Thread-safety: Node's single-threaded event loop guarantees the
 * read-then-write below is atomic per call. No locking needed.
 */
import type { AccessLogAction, AccessLogRateLimiter } from '@kici-dev/engine';
/**
 * Implementation of `AccessLogRateLimiter` (engine interface). Constructed
 * once per orchestrator process and injected into both
 * `AccessLogWriter` and `AuditLogger`.
 */
export declare class SamplingRateLimiter implements AccessLogRateLimiter {
    private readonly buckets;
    private readonly now;
    private lastPruneAt;
    /**
     * @param now  Time source override (test seam). Defaults to `Date.now`.
     */
    constructor(now?: () => number);
    permit(action: AccessLogAction, actorKey: string, perMinute: number): boolean;
    /**
     * Drop entries older than PRUNE_TTL_MS. Called opportunistically from
     * `permit()` so memory stays bounded without a background timer. With the
     * 1-row/min/actor cap the map is naturally tiny (it grows by one entry
     * per active actor and prunes after five minutes of silence).
     */
    private maybePrune;
    /** Test-only: introspect the bucket size. */
    size(): number;
}
//# sourceMappingURL=sampling-rate-limiter.d.ts.map