import type { AppSignal, SignalSource, SignalUrgency } from "@loomic/types"; /** * Normalizes an incoming event from any source into a standard AppSignal envelope. * Deduplication, coalescing, and routing are handled downstream. */ export declare function normalizeSignal(raw: { source: SignalSource; name: string; payload?: Record; urgency?: SignalUrgency; userVisible?: boolean; id?: string; timestamp?: string; }): AppSignal; /** * Configuration for signal deduplication. */ export type SignalDedupConfig = { /** Enable deduplication. Default: false. */ enabled?: boolean; /** Time window in ms — duplicate signals with the same name+source within this window are dropped. Default: 200. */ windowMs?: number; /** Maximum queue depth. If exceeded, oldest signals are evicted. Default: 100. */ maxQueueSize?: number; }; /** * Signal queue — buffers signals before the run loop picks them up. * Supports configurable deduplication to prevent duplicate processing. */ export declare class SignalQueue { private readonly queue; private readonly dedupConfig; /** Tracks recent signal keys for deduplication: key -> timestamp */ private readonly recentSignals; constructor(dedupConfig?: SignalDedupConfig); /** * Generate a dedup key from a signal. * Signals with the same name and source are considered duplicates. */ private dedupKey; /** * Check if a signal is a duplicate within the dedup window. */ private isDuplicate; /** * Enqueue a signal. Returns true if enqueued, false if deduplicated. */ enqueue(signal: AppSignal): boolean; dequeue(): AppSignal | undefined; peek(): AppSignal | undefined; get size(): number; drain(): AppSignal[]; clear(): void; } //# sourceMappingURL=signal-intake.d.ts.map