import type { Article, RunReport, Source, SourceRunReport, StateStore, WatcherState } from "./types.js"; /** * Computes the new articles for a source — those whose ids do not appear in * `seen`. Returns the articles in fetched-order. Pure function; safe to test. */ export declare function diffArticles(fetched: Article[], seen: string[]): Article[]; /** * Runs all sources against an abstract state store, computes the diff, * returns a report, and updates the store with (previously seen) ∪ * (newly fetched ids). Source fetch failures are caught and reported * per-source; one failing source does not abort the run. * * Use this from environments without filesystem access (Cloudflare * Workers, Deno Deploy, browsers). Pass a custom `StateStore` — for * example, one backed by Workers KV. The Node CLI path uses * `runWatcher` (below), which is a thin wrapper that constructs an * `fsStateStore` from a filesystem path. */ export declare function runWatcherWithStore(opts: { sources: Source[]; stateStore: StateStore; dryRun?: boolean; }): Promise; /** * Filesystem-backed convenience wrapper. Equivalent to * `runWatcherWithStore({ ..., stateStore: fsStateStore(statePath) })`. * Kept for the existing Node CLI; do not use in non-Node runtimes. */ export declare function runWatcher(opts: { sources: Source[]; statePath: string; /** If true, do NOT persist the new state (useful for dry-run inspection). */ dryRun?: boolean; }): Promise; export type { Article, Source, RunReport, SourceRunReport, StateStore, WatcherState, }; export { readState, writeState, fsStateStore, memoryStateStore, } from "./state-store.js"; export { federalRegisterSource } from "./sources/federal-register.js"; export { urlMonitorSource, rulesCitationsUrlMonitor, hashContent, normalizeForHash, } from "./sources/url-monitor.js"; //# sourceMappingURL=index.d.ts.map