Expand description
Process enumeration and classification.
sysinfo gives us the flat process table; this module decides which
processes are agent roots, which are MCP servers, and folds the table into
per-agent trees. Everything here is heuristic and documented as such in
ADR-002; the harness registry (see harness::claude) is preferred when it
exists.
Structs§
Functions§
- build_
forest - Fold the flat table into a forest of agent trees plus the orphaned MCP list.
- classify_
agent - Is this process the root of a coding agent? Which harness?
- classify_
child - Classify a non-root process by what it looks like.
- looks_
like_ mcp - MCP servers have no wire-level marker visible from the process table, so this is purely a naming heuristic. False negatives are expected; ADR-002 lists the known ones and RFC-102 proposes a registry-based replacement.
- session_
id_ from_ args - Extract
--resume <id>/-r <id>style session ids from a command line.