Expand description
Reading the JSONL spool: full replay scans and incremental tailing.
Structs§
- CwdInfo
- What git reports for a directory, both canonicalized.
- CwdMatcher
same_cwdwith the target canonicalized once and each distinct eventcwdanswered from a cache: a replay scan sees the same handful of strings tens of thousands of times. In repo mode a cwd that is not the monitor’s is asked of git once and accepted when it shares the repository.- Replay
- Spool
Tailer - Incremental reader that survives rotation (inode change or shrink).
Enums§
Constants§
- NO_
BOUNDARY_ TAIL - Events shown when no SessionStart boundary exists for the cwd.
Functions§
- git_
info - One
git rev-parse --git-common-dir --show-toplevelrun indir. None when git is not on PATH,diris outside a repository, or the output is unusable. - parse_
complete_ lines - Split a byte buffer into complete lines, returning the parsed events and the number of bytes consumed (everything up to and including the last newline). Malformed lines are skipped.
- same_
cwd - Compare an event’s
cwdagainst the monitor’s directory, tolerating symlinks and trailing slashes. Falls back to string comparison when a path cannot be canonicalized. - scan_
replay - Read the spool (and the rotated
<spool>.1that precedes it) and return the eventsmatcheraccepts belonging to the sessions still in play. - select_
session - Pure selection step shared by the replay scan and tests.