import { type ProvenanceTable } from '../model/source-provenance.js'; export interface FileWatcher { close(): void; } /** Options for the project watcher's scope. */ export interface ProjectWatcherOptions { debounceMs?: number; usePolling?: boolean; /** * Absolute roots of installed ontology packages. SysML inside them is * watched by the ontology watcher, which requires a restart rather than a * hot rebuild — so the project watcher must not claim them too. */ ontologyRoots?: string[]; /** Authoritative ownership classification from the resolved package graph. */ provenance?: ProvenanceTable; } /** * Watch project source files — triggers hot rebuild. * * The scope deliberately matches what the build ingests: every project-local * `.sysml` file, wherever it sits, plus the per-project YAML config files. A * narrower scope (model/ only) leaves views and catalogs outside that directory * silently stale, which is exactly the class of bug this watcher exists to * prevent. * * The callback receives the project-relative paths that changed, so callers can * tell clients what moved rather than only that something did. */ export declare function createProjectWatcher(projectDir: string, onChange: (changedFiles: string[]) => void | Promise, debounceMs?: number, usePolling?: boolean, options?: ProjectWatcherOptions): FileWatcher; /** * Watch ontology package files — triggers restart-required notification. * Covers: ontology sysml/, memo.package.yaml, memo.rendering.yaml in each root, * plus the project-level memo.config.yaml and model/ontology-selection.sysml. */ export declare function createOntologyWatcher(projectDir: string, ontologyRoots: string[], onChange: (changedFile: string) => void | Promise, debounceMs?: number, provenance?: ProvenanceTable): FileWatcher; /** * @deprecated Use createProjectWatcher + createOntologyWatcher instead. * Kept for backward compatibility. */ export declare function createFileWatcher(projectDir: string, onChange: () => void | Promise, debounceMs?: number): FileWatcher; /** * Watch both dashboard directories — `dashboards/` and `dashboards/user/`. * * Dashboards are not model source, so they are outside the project watcher's * scope and never trigger a rebuild. They still need a watcher: a page edited * in an external editor or arriving by `git pull` must reach open clients. * * The project root is watched with everything but those two paths ignored, * because either directory may not exist yet and chokidar does not pick up a * watched path that is created later. */ export declare function createDashboardWatcher(projectDir: string, onChange: () => void | Promise, debounceMs?: number): FileWatcher; //# sourceMappingURL=file-watcher.d.ts.map