/**
 * Inbound-queue config types + the config-seam validation (Durable Inbound
 * Message Queue spec §Config, "Config-seam validation").
 *
 * Every cross-component timing invariant named in the spec is validated in
 * THIS one seam at construction (boot), not scattered. A violated invariant
 * does NOT boot the queue with broken timing: the queue stays OFF for that
 * boot, one loud config-error names the violated inequality (fail-safe — OFF
 * is byte-for-byte today's behavior, never a half-configured queue).
 */
export interface InboundQueueConfig {
    enabled: boolean;
    dryRun: boolean;
    maxPerSession: number;
    maxTotal: number;
    hardMaxTotal: number;
    maxHeldTotal: number;
    maxPayloadBytes: number;
    entryTtlMs: number;
    staleCustodyTtlMs: number;
    maxNapDeliveryAgeMs: number;
    deliveredRetentionMs: number;
    drainTickMs: number;
    drainBatchSize: number;
    drainConcurrency: number;
    minInterPassMs: number;
    passDeadlineMs: number;
    baseBackoffMs: number;
    maxBackoffMs: number;
    maxAttempts: number;
    claimStaleMs: number;
    refusalNegativeCacheMs: number;
    maxFailoverRespawns: number;
    maxFailoverReleasesPerTick: number;
    dispatchDeadlineMs: number;
    pauseMaxMs: number;
}
export interface HoldForStabilityConfig {
    enabled: boolean;
    holdMaxMs: number;
    holdRecheckMs: number;
    flapThresholdPerHour: number;
}
export declare const DEFAULT_INBOUND_QUEUE_CONFIG: InboundQueueConfig;
export declare const DEFAULT_HOLD_FOR_STABILITY_CONFIG: HoldForStabilityConfig;
/**
 * Cross-machine protocol anchor (spec §5 duplicate window 3, round-8): a CODE
 * CONSTANT, deliberately not operator-tunable. Every machine's seam validates
 * BOTH that its own redispatch horizon ≤ this AND its `deliveredRetentionMs`
 * ≥ this — so any two legally-tuned machines compose safely under ANY tuning.
 */
export declare const PROTOCOL_REDISPATCH_HORIZON_MAX_MS: number;
/**
 * The "boot-sweep window" term of invariant 3 — a conservative constant for
 * how long after a boot the sweep may still redispatch a recovered claimed
 * row (builder-pinned per the decision-completeness review; the seam fails
 * safe to queue-OFF on violation, so a generous constant only tightens).
 */
export declare const BOOT_SWEEP_WINDOW_MS: number;
/**
 * Resolve the Multi-Machine Session Pool rollout STAGE from a config block.
 * Returns the configured `stage` string only when the pool is BOTH enabled AND
 * carries a `stage`; otherwise 'dark' (the inert default). This is the single
 * source of truth for "is the session pool active, and at what stage?" — both
 * the boot-time inbound-queue construction gate AND the live `_sessionPoolStage`
 * getter in server.ts resolve through this one pure function, so the two can
 * never drift (the original divergence is exactly what let the construction gate
 * read a stale stub and keep the inbound queue dark forever — boot-order bug).
 *
 * @param cfg the resolved `multiMachine.sessionPool` block (liveConfig override
 *   merged over the static config block, or just the static block at boot).
 */
export declare function resolveSessionPoolStage(cfg: {
    enabled?: boolean;
    stage?: string;
} | null | undefined): string;
/** Σbackoff: total worst-case backoff across maxAttempts (capped curve). */
export declare function sumBackoffMs(cfg: Pick<InboundQueueConfig, 'baseBackoffMs' | 'maxBackoffMs' | 'maxAttempts'>): number;
/** The full redispatch horizon a receipt must outlive (§3.4 receipt floor). */
export declare function redispatchHorizonMs(cfg: InboundQueueConfig): number;
export interface InvariantViolation {
    invariant: number;
    name: string;
    message: string;
}
/**
 * The six config-seam invariants (spec §Config). Returns every violation —
 * the caller logs each by name, raises ONE attention item, and keeps the
 * queue OFF for the boot.
 */
export declare function validateInboundQueueInvariants(q: InboundQueueConfig, h: HoldForStabilityConfig): {
    ok: boolean;
    violations: InvariantViolation[];
};
//# sourceMappingURL=inboundQueueConfig.d.ts.map