/**
 * Verification Registry - Tracks runtime verification checks and transition traces
 *
 * Provides:
 * 1. A checklist of pass/fail checks (INIT has fetch, bridge connected, etc.)
 * 2. A full transition timeline with effect execution results
 * 3. ServerBridge health snapshot
 * 4. window.__orbitalVerification for Playwright/automation
 *
 * @packageDocumentation
 */
import type { AssetLoadStatus, BridgeHealth, BusEvent, CheckStatus, EffectTrace, EventLogEntry, EventPayload, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary } from '@almadar/core';
export type { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary, };
type ChangeListener = () => void;
/**
 * Per-trait snapshot getter. Each generated trait logic hook (or
 * `useTraitStateMachine` trait binding) registers one on mount so the
 * verifier can read the live reducer state for that trait.
 */
export type TraitSnapshotGetter = () => TraitStateSnapshot;
export declare function registerCheck(id: string, label: string, status?: CheckStatus, details?: string): void;
export declare function updateCheck(id: string, status: CheckStatus, details?: string): void;
export declare function getAllChecks(): VerificationCheck[];
export declare function recordTransition(trace: Omit<TransitionTrace, "id">): void;
export declare function getTransitions(): TransitionTrace[];
export declare function getTransitionsForTrait(traitName: string): TransitionTrace[];
/**
 * Record a server response as a timeline entry.
 * Creates a synthetic transition entry with type "server-response" to show
 * what the server returned (clientEffects, data counts, emitted events).
 */
export declare function recordServerResponse(orbitalName: string, event: string, response: Omit<ServerResponseTrace, "orbitalName" | "timestamp">): void;
export declare function updateBridgeHealth(health: BridgeHealth): void;
export declare function getBridgeHealth(): BridgeHealth | null;
export declare function getSummary(): VerificationSummary;
export declare function getSnapshot(): VerificationSnapshot;
/**
 * Per-trait snapshot for the verifier.
 *
 * Iterates every registered trait getter and collects the live reducer
 * state. Empty until at least one trait hook calls `registerTraitSnapshot`.
 * A getter that throws is logged and skipped — one broken trait must not
 * poison the rest of the snapshot.
 */
export declare function getTraitSnapshots(): TraitStateSnapshot[];
export declare function subscribeToVerification(listener: ChangeListener): () => void;
declare global {
    interface Window {
        __orbitalVerification?: OrbitalVerificationAPI;
    }
}
/**
 * Wait for a transition matching the given event to appear.
 * Returns the trace or null on timeout.
 */
export declare function waitForTransition(event: string, timeoutMs?: number): Promise<TransitionTrace | null>;
/**
 * Bind the EventBus so automation can send events and log emissions.
 * Call this during app initialization.
 */
export declare function bindEventBus(eventBus: {
    emit: (type: string, payload?: EventPayload) => void;
    onAny?: (listener: (event: BusEvent) => void) => () => void;
}): void;
/**
 * Bind a trait state getter so automation can query current states.
 */
export declare function bindTraitStateGetter(getter: (traitName: string) => string | undefined): void;
/**
 * Register a per-trait snapshot provider. The generated trait logic hook
 * (or `useTraitStateMachine`) calls this once on mount, passing a getter
 * that reads the current reducer state via a ref. Returns an unregister
 * function for cleanup on unmount.
 *
 * Calling this twice for the same `traitName` replaces the previous
 * getter (e.g. page navigation remounts the trait; the new registration
 * wins).
 */
export declare function registerTraitSnapshot(traitName: string, getter: TraitSnapshotGetter): () => void;
/**
 * Register a canvas frame capture function.
 * Called by game organisms (IsometricCanvas, PlatformerCanvas, SimulationCanvas)
 * so the verifier can snapshot canvas content at checkpoints.
 */
export declare function bindCanvasCapture(captureFn: () => string | null): void;
/**
 * Update asset load status for canvas verification.
 * Game organisms call this when images load or fail.
 */
export declare function updateAssetStatus(url: string, status: AssetLoadStatus): void;
export declare function clearVerification(): void;
