/**
 * PackEvaluator prewarm -- V8 JIT warmup before external traffic arrives.
 *
 * Problem: V8's Sparkplug/Maglev JIT compilers tier up only after a function
 * is called enough times to be considered "hot". On a cold server start, the
 * first 5-50 seconds of traffic at 10 RPS will see p99 90-130ms (exceeds the
 * 50ms GAP-S3-01 budget) while V8 compiles the PackEvaluator hot path.
 *
 * Solution: before server.listen() binds the external port, run one synthetic
 * evaluate() call per active pack. This drives:
 *   - getClassifierIndex() (cache miss path -> buildClassifierIndex -> Map ops)
 *   - categoryMatches() for each classifier
 *   - All downstream helper functions (serializeActionForMatching, actionToVerdict,
 *     stricterVerdict, buildReason)
 *
 * After prewarm completes, the JIT has promoted the hot path to Maglev tier.
 * Steady-state p99 drops to ~0.241ms (Wave A measurement).
 *
 * Boot-gate contract: if prewarm throws, the calling server MUST refuse to bind
 * the port. A prewarm failure indicates a broken pack registry (e.g., a pack with
 * malformed categoryActions that crashes the evaluator), which would cause runtime
 * governance failures later. Fail loud at boot rather than at the first user call.
 *
 * @connexum/ai-governance  Wave-B
 */
import { PackEvaluator } from './pack-evaluator';
import type { PackRegistry } from '../packs/index';
/**
 * Prewarm result reported after a successful prewarm pass.
 */
export interface PrewarmResult {
    /** Number of packs prewarmed. */
    packCount: number;
    /** Elapsed time for the full prewarm pass in milliseconds. */
    elapsedMs: number;
}
/**
 * Run one synthetic evaluate() call per active pack.
 *
 * @param packRegistry - The registry from which active packs are resolved.
 * @param evaluator    - The PackEvaluator instance to warm. Pass the same
 *                       instance that will serve production traffic so the
 *                       JIT warmup and cache state carry over.
 * @returns PrewarmResult with pack count and elapsed time.
 * @throws  If any pack's prewarm call throws (boot-gate: caller must not bind port).
 */
export declare function prewarmPackEvaluator(packRegistry: PackRegistry, evaluator: PackEvaluator): Promise<PrewarmResult>;
/**
 * Convenience factory: creates a fresh PackEvaluator, runs prewarm, then
 * returns the evaluator for production use. Useful when the caller does not
 * already have an evaluator instance.
 *
 * Boot-gate: throws if prewarm fails. Caller must not proceed to server.listen().
 */
export declare function createAndPrewarmEvaluator(packRegistry: PackRegistry, options?: {
    /** Directory for the internal EventBus. Defaults to a temp directory. */
    eventBusDir?: string;
    /** Agent name for the internal EventBus. Defaults to 'governance-server'. */
    agentName?: string;
    /** TTL for the evaluator cache in ms. Default: 5 minutes. */
    ttlMs?: number;
}): Promise<{
    evaluator: PackEvaluator;
    prewarmResult: PrewarmResult;
}>;
//# sourceMappingURL=pack-evaluator-prewarm.d.ts.map