/** * @fileoverview Pure core for FOREIGN tmux sessions — the ones a human started * by hand, which Codeman neither created nor owns. * * Everything here is a string in / structure out, so all three locations (local, * inside a container, across ssh) go through ONE probe script, ONE parser and ONE * classifier. Writing a second copy per location is exactly how the two would * drift into disagreeing about what a session is. * * ## Why the probe script is dumb * * It runs two commands and prints them: `tmux list-panes` per socket, and one * `ps` snapshot. No filtering, no logic. All judgement happens in Node, where it * is pure and unit-testable, instead of in a shell string that is embedded three * different ways and can only be debugged against a real host. * * ⚠️ The script MUST NOT contain a single quote. It is wrapped in single quotes * to cross `ssh '