Find the VcsManager that owns the given normalized file path. Uses longest-prefix-match against resolved watch roots.
Normalized absolute path (forward slashes).
The matching VcsManager, or undefined.
Get all managers as [root, manager] pairs.
Get the sorted root paths (longest-first).
Route a file event to the correct root's VcsManager.
Absolute path of the changed file.
The event type: add, change, or unlink.
Signal that the initial filesystem scan is complete.
Flushes each manager's throttle buffer before ending baseline mode, ensuring
any files still pending in the VCS throttle are committed with a
"baseline:" prefix rather than "watcher:". AI generation is not enabled
until all managers have completed their flush.
Start all VcsManager instances. Runs startup orphan detection/recovery for each root.
Flush all managers and clean up.
Orchestrates VCS across all VCS-enabled watch roots.