index.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Sync Module
  3. *
  4. * Provides synchronization functionality for keeping the code graph
  5. * up-to-date with file system changes.
  6. *
  7. * Components:
  8. * - FileWatcher: Debounced fs.watch that auto-triggers sync on file changes
  9. * - Watch policy: decides when the watcher must be disabled (e.g. WSL2 /mnt)
  10. * - Git sync hooks: opt-in commit/merge/checkout hooks when watching is off
  11. * - Git worktree awareness: detect when a query borrows another tree's index
  12. * - Content hashing for change detection (in extraction module)
  13. * - Incremental reindexing (in extraction module)
  14. */
  15. export { FileWatcher, WatchOptions, PendingFile, LockUnavailableError } from './watcher';
  16. export { watchDisabledReason, detectWsl } from './watch-policy';
  17. export {
  18. installGitSyncHook,
  19. removeGitSyncHook,
  20. isSyncHookInstalled,
  21. isGitRepo,
  22. DEFAULT_SYNC_HOOKS,
  23. type GitHookName,
  24. type GitHookResult,
  25. } from './git-hooks';
  26. export {
  27. gitWorktreeRoot,
  28. detectWorktreeIndexMismatch,
  29. worktreeMismatchWarning,
  30. worktreeMismatchNotice,
  31. type WorktreeIndexMismatch,
  32. } from './worktree';