Documentation
¶
Overview ¶
Package notification provides lightweight team context change detection.
Design: CLI checks file mtimes directly. Git updates mtime when it writes files during pull, so no daemon-side touching is needed.
Cost: ~1μs per file (stat only). Safe to call on every command.
Index ¶
Constants ¶
const ClockSkewTolerance = 5 * time.Second
ClockSkewTolerance is the tolerance for clock skew between daemon and CLI. Files with mtime within this window of lastNotified are considered changed.
Variables ¶
var TeamContextFiles = []string{
"agent-context/distilled-discussions.md",
"coworkers/ai/claude/AGENTS.md",
"coworkers/ai/claude/CLAUDE.md",
}
TeamContextFiles lists files agents should re-read when updated. Paths are relative to team context root.
To add more files, edit this list and release ox.
Functions ¶
func CheckForUpdates ¶
CheckForUpdates checks if any team context files have been modified.
Returns: - latestMtime: the most recent mtime across all files (for updating session marker) - updatedFiles: full paths to files newer than lastNotified (for agent to re-read)
Cost: ~1μs per file (stat only, no disk reads). Safe to call on every command.
On first run (lastNotified.IsZero()), returns no updated files to avoid notification spam. The latestMtime is still returned for initialization.
Types ¶
This section is empty.