import type { RuntimeStore } from '../runtime/store/index.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import type { WatcherKind, WatcherRecord } from '../runtime/store/domains/watchers.js';
import type { AutomationSourceRecord } from '../automation/sources.js';
import type { FeatureFlagReader } from '../runtime/feature-flags/index.js';
export interface RegisterWatcherInput {
    readonly id: string;
    readonly label: string;
    readonly kind?: WatcherKind | undefined;
    readonly source: AutomationSourceRecord;
    readonly intervalMs?: number | undefined;
    readonly metadata?: Record<string, unknown> | undefined;
    readonly run?: (() => Promise<string | void> | string | void) | undefined;
}
export interface RegisterPollingWatcherInput {
    readonly id: string;
    readonly label: string;
    readonly source: AutomationSourceRecord;
    readonly intervalMs: number;
    readonly run: () => Promise<string | void> | string | void;
}
export interface WatcherRegistryOptions {
    readonly storePath?: string | undefined;
    readonly featureFlags?: FeatureFlagReader | undefined;
}
export declare class WatcherRegistry {
    private readonly watchers;
    private readonly timers;
    private readonly inFlight;
    private readonly storePath;
    private runtimeDispatch;
    private runtimeBus;
    private readonly featureFlags;
    private loaded;
    constructor(options?: WatcherRegistryOptions);
    private isEnabled;
    private requireEnabled;
    private clearTimers;
    attachRuntime(config: {
        readonly runtimeStore?: RuntimeStore | null | undefined;
        readonly runtimeBus?: RuntimeEventBus | null | undefined;
    }): void;
    registerWatcher(input: RegisterWatcherInput): WatcherRecord;
    registerPollingWatcher(input: RegisterPollingWatcherInput): WatcherRecord;
    list(): WatcherRecord[];
    getWatcher(id: string): WatcherRecord | null;
    startWatcher(id: string): WatcherRecord | null;
    stopWatcher(id: string, reason?: string): WatcherRecord | null;
    runWatcherNow(id: string): Promise<WatcherRecord | null>;
    removeWatcher(id: string): boolean;
    private ensureLoaded;
    private normalizeRecord;
    private runWatcher;
    private buildRunStrategy;
    private persist;
}
//# sourceMappingURL=registry.d.ts.map