Skip to main content

lastseen_path

Function lastseen_path 

Source
pub fn lastseen_path(root: &Path, project: &str, agent: &str) -> PathBuf
Expand description

Per-agent “last seen” marker, a sibling of heartbeat_path (#439). The boot-context hook touches it at clean turn-end — alongside rm-ing the heartbeat marker — so a freshly woken session can compute how long the agent was down. Unlike the heartbeat marker (removed at every turn-end, so present at boot only after an unclean shutdown), this one persists across the gap, making its mtime the agent’s last activity. Same compound <project>-<agent> stem as every sibling so cross-project name clashes can’t collide, with a .lastseen suffix so it never shadows the marker the TUI stats for Working/Idle.