feat: Add file watcher with debounced auto-sync and comprehensive test coverage

Addresses the need for automatic graph synchronization on file changes. Implements FileWatcher using native OS file events (FSEvents/inotify/ReadDirectoryChangesW) with 2-second debouncing to prevent thrashing on rapid saves. Filters changes against include/exclude patterns and ignores .codegraph directory modifications. Integrates with CodeGraph API (watch/unwatch/isWatching methods) and MCP server for automatic activation. Updates documentation to reflect shift from semantic to full-text search and removal of manual hook installation requirements.
This commit is contained in:
Colby McHenry
2026-04-07 16:02:15 -05:00
parent 453c39d774
commit 3da5c96a0b
6 changed files with 599 additions and 30 deletions
+2 -6
View File
@@ -4,14 +4,10 @@
* Provides synchronization functionality for keeping the code graph
* up-to-date with file system changes.
*
* Note: Git hooks functionality has been removed. CodeGraph sync is now
* triggered through codegraph's Claude Code hooks integration instead.
*
* Components:
* - FileWatcher: Debounced fs.watch that auto-triggers sync on file changes
* - Content hashing for change detection (in extraction module)
* - Incremental reindexing (in extraction module)
*/
// This module is kept for potential future sync-related exports
// Currently all sync functionality is in the extraction module
export {};
export { FileWatcher, WatchOptions } from './watcher';