import { EventEmitter } from 'node:events'; import type { CheckResult, MatchResult } from './types.js'; import type { PlukEvent, PlukEventType } from '@kubestellar/pluk'; export interface WatcherDetection { event: PlukEvent; result: CheckResult; matches: MatchResult[]; timestamp: string; sentRebuttals?: string[]; } export interface WatcherOptions { session: string; cli?: string; runDir?: string; patternsDir?: string; mode: 'subscribe' | 'watch'; filter?: PlukEventType[]; rebuttal?: 'log' | 'send' | 'inject'; quiet?: boolean; verbose?: boolean; onDetection?: (detection: WatcherDetection) => void; } export declare class Watcher extends EventEmitter { private excuses; private opts; private buffer; private flushTimer; private subscriber; private watchHandle; private verbose; private flushCount; private rebuttalCooldowns; private lastRebuttalSentAt; constructor(opts: WatcherOptions); private log; start(): Promise; stop(): void; private handleEvent; private scheduleFlush; private flushBuffer; } export declare function createWatcher(opts: WatcherOptions): Watcher;