Skip to main content

Module watch_session

Module watch_session 

Source
Expand description

A live session: an index, a watcher, and the query they answer together.

A watch run is the same query as a one-shot run, re-evaluated as changes arrive — there is no separate watch grammar. This module owns that composition so the CLI loop and the Python iterator are both thin consumers rather than two implementations of the same coordination.

§Detection is event-driven

Changes arrive from the operating system’s own notification backend, never from polling: FSEvents on macOS, inotify on Linux, ReadDirectoryChangesW on Windows. An idle tree costs no filesystem work at all. Events are hints, so each coalesced path is verified with one fresh stat before it becomes a delta, and the interval a caller passes throttles aggregate repaints and persistence — it plays no part in detection.

Structs§

Batch
One batch of applied changes.
Change
One effective change, already filtered through the run’s selection.
Session
An index paired with a watcher, answering one request continuously.

Enums§

ChangeKind
What happened to a path.
SaveOutcome
The result of a throttled attempt to persist a live session.