/** * Data-directory watcher for the web server. * * Emits debounced, classified change events over the ARCS data dir so the web * UI can live-refresh when the CLI (or another agent) mutates the DAG. * Uses recursive fs.watch when available (Node >= 20 on Linux), falling back * to per-directory watchers otherwise. */ export interface ChangeEvent { type: "changed"; slug: string | null; area: "root" | "knowledge" | "tasks" | "plans" | "proposals" | "sessions" | "docs" | "meta" | "other"; path: string; at: string; } type Listener = (event: ChangeEvent) => void; export declare function onDataChange(listener: Listener): () => void; /** * Classifies a data-dir-relative path into a change area + project slug. * Returns null for paths outside the project DAG (e.g. tokens/, config.json). */ export declare function classifyChange(relativePath: string): { slug: string | null; area: ChangeEvent["area"]; } | null; /** * Starts watching the data dir. Idempotent — safe to call per app instance. */ export declare function startWatcher(dataDir: string, options?: { forceFallback?: boolean; }): "recursive" | "fallback"; /** * Stops all watchers (test cleanup). */ export declare function stopWatcher(): void; export {}; //# sourceMappingURL=watcher.d.ts.map