import type { RuntimeStore } from '../runtime/store/index.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import type { WatcherKind, WatcherRecord } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/watchers';
import type { AutomationSourceRecord } from '@pellux/goodvibes-sdk/platform/automation/sources';
export interface RegisterWatcherInput {
    readonly id: string;
    readonly label: string;
    readonly kind?: WatcherKind;
    readonly source: AutomationSourceRecord;
    readonly intervalMs?: number;
    readonly metadata?: Record<string, unknown>;
    readonly run?: () => Promise<string | void> | string | void;
}
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;
}
export declare class WatcherRegistry {
    private readonly watchers;
    private readonly timers;
    private readonly inFlight;
    private readonly storePath;
    private runtimeDispatch;
    private runtimeBus;
    private loaded;
    constructor(options?: WatcherRegistryOptions);
    attachRuntime(config: {
        readonly runtimeStore?: RuntimeStore | null;
        readonly runtimeBus?: RuntimeEventBus | null;
    }): 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