pub fn lastseen_path(root: &Path, project: &str, agent: &str) -> PathBufExpand 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.