/**
 * Emitted Envelope Registry
 *
 * Session-scoped registry to track which DataEnvelopes have already been emitted.
 * Prevents duplicate data from being sent to frontend across multiple executors.
 *
 * Key insight: Multiple executors (Strategy, Hypothesis, DirectSkill) can run
 * in the same session and emit overlapping data. Without coordination, the same
 * frame/session analysis results get sent multiple times.
 *
 * This registry provides a single source of truth for "has this data been sent?"
 */
import { DataEnvelope } from '../../types/dataContract';
/**
 * Generate a deduplication key for a DataEnvelope.
 *
 * Key composition (in order of preference):
 * 1. skillId:stepId:contentHash (stable across different execution ids)
 * 2. normalized meta.source (strip volatile execution suffix)
 * 3. skillId:stepId:title (last resort)
 *
 * Content hash is computed from rows (including row count) to catch
 * identical data emitted in different stages/rounds.
 */
export declare function generateDeduplicationKey(envelope: DataEnvelope): string;
/**
 * Session-scoped registry for tracking emitted envelopes.
 */
export declare class EmittedEnvelopeRegistry {
    private emittedKeys;
    private emitLog;
    /**
     * Check if an envelope has already been emitted.
     */
    hasBeenEmitted(envelope: DataEnvelope): boolean;
    /**
     * Mark an envelope as emitted.
     * Returns the deduplication key used.
     */
    markAsEmitted(envelope: DataEnvelope): string;
    /**
     * Filter out envelopes that have already been emitted.
     * Returns only the new (non-duplicate) envelopes.
     */
    filterNewEnvelopes(envelopes: DataEnvelope[]): DataEnvelope[];
    /**
     * Get count of unique envelopes emitted.
     */
    get emittedCount(): number;
    /**
     * Get the emission log for debugging.
     */
    getEmitLog(): Array<{
        key: string;
        timestamp: number;
        skillId?: string;
    }>;
    /**
     * Clear the registry (for new analysis session).
     */
    clear(): void;
    /**
     * Get statistics for debugging.
     */
    getStats(): {
        totalEmitted: number;
        duplicatesBlocked: number;
    };
}
/**
 * Factory function to create a registry.
 * Typically one per analysis session.
 */
export declare function createEmittedEnvelopeRegistry(): EmittedEnvelopeRegistry;
//# sourceMappingURL=emittedEnvelopeRegistry.d.ts.map