/**
 * guardPostureView — honest effective-state derivation + strict output
 * projection for GET /guards (GUARD-POSTURE-ENDPOINT-SPEC §2.2).
 *
 * Pure logic, no I/O: callers hand in the one-read resolved-config snapshot,
 * the tripwire's boot posture snapshot, and a GuardRegistry; this module
 * derives one closed-vocabulary state per guard via the spec's NORMATIVE
 * PRECEDENCE TABLE (first match wins) and emits ONLY the closed field set —
 * the route never spreads source config/runtime objects (several guard
 * config blocks carry operationally sensitive values; getters are untrusted
 * producers, this projection is the authority).
 */
import { type GuardManifestEntry } from './guardManifest.js';
import { type GuardPostureBootSnapshot, type ResolvedGuardConfigSnapshot } from './guardPosture.js';
import type { GuardRegistry, GuardRuntimeRead } from './GuardRegistry.js';
export type GuardEffectiveState = 'on-confirmed' | 'on-unverified' | 'on-stale' | 'on-dry-run' | 'off' | 'diverged-pending-restart' | 'errored' | 'missing' | 'off-runtime-divergent';
export type GuardOffClass = 'dark-default' | 'diverged-from-default' | null;
export type GuardDivergence = 'none' | 'diverged' | 'not-applicable' | 'snapshot-unavailable';
/** Staleness multiplier over a guard's self-declared cadence (spec §2.2, N=5). */
export declare const STALE_TICK_MULTIPLIER = 5;
/** The CLOSED projection — every field a /guards row may carry. Anything not
 *  named here never leaves the server (Tier-1 allowlist test). */
export interface GuardRuntimeProjection {
    enabled: boolean;
    dryRun?: boolean;
    lastTickAt?: number;
    tickAgeMs?: number;
    stale?: boolean;
    jobCount?: number;
    pausedJobCount?: number;
}
export interface GuardRow {
    key: string;
    configEnabled: boolean | null;
    defaultEnabled: boolean | null;
    effective: GuardEffectiveState;
    offClass: GuardOffClass;
    divergence: GuardDivergence;
    runtime: GuardRuntimeProjection | null;
    runtimeReason?: 'not-instrumented' | 'status-error' | 'out-of-process' | 'not-registered';
    /** Normalized getter-error message (errored state only). */
    error?: string;
    process: 'server' | 'lifeline';
}
export interface GuardsSummary {
    onConfirmed: number;
    onUnverified: number;
    onStale: number;
    onDryRun: number;
    off: number;
    offDeviant: number;
    offDarkDefault: number;
    divergedPendingRestart: number;
    errored: number;
    missing: number;
    offRuntimeDivergent: number;
    runtimeEnriched: string;
}
export interface GuardInventoryResult {
    guards: GuardRow[];
    summary: GuardsSummary;
}
declare const ROW_FIELD_ALLOWLIST: ReadonlySet<string>;
declare const RUNTIME_FIELD_ALLOWLIST: ReadonlySet<string>;
export { ROW_FIELD_ALLOWLIST, RUNTIME_FIELD_ALLOWLIST };
interface DeriveInput {
    key: string;
    manifest: GuardManifestEntry | undefined;
    configEnabled: boolean | undefined;
    defaultEnabled: boolean | undefined;
    configDryRun: boolean | undefined;
    bootValue: boolean | undefined;
    bootSnapshotAvailable: boolean;
    runtime: GuardRuntimeRead;
    now: number;
}
/**
 * The normative precedence table (spec §2.2) — ONE state per guard, first
 * match wins:
 *   errored → missing → off-runtime-divergent → diverged-pending-restart →
 *   off → on-dry-run → on-stale → on-confirmed → on-unverified
 */
export declare function deriveGuardRow(input: DeriveInput): GuardRow;
/**
 * Assemble the full inventory: shared extractor (config-derived) ∪ declared
 * manifest, deduped by key, each row derived through the precedence table.
 */
export declare function buildGuardInventory(opts: {
    snapshot: ResolvedGuardConfigSnapshot;
    bootSnapshot: GuardPostureBootSnapshot | null;
    registry: GuardRegistry;
    now?: number;
}): GuardInventoryResult;
/** Compact posture block that rides the capacity heartbeat (spec §2.3).
 *  The wire shape lives in core/types.ts (GuardPostureSummary) so the
 *  heartbeat/pool layers don't import from monitoring; this alias keeps the
 *  spec's name for monitoring-side consumers. */
export type HeartbeatGuardPosture = import('../core/types.js').GuardPostureSummary;
export declare function buildHeartbeatPostureBlock(inventory: GuardInventoryResult, generatedAt: string): HeartbeatGuardPosture;
//# sourceMappingURL=guardPostureView.d.ts.map