Expand description
Tower: what each of AgentMux’s own processes is — “GPU”, “Renderer”, “Network service”, “Server”, “Launcher” — so the AgentMux task’s rows say more than one executable name repeated a dozen times.
Every CEF subprocess runs the host executable, so its name can’t tell them
apart (on Windows every one reads “AgentMux”); its command line can, with
--type= and --utility-sub-type=. A command line can hold secrets, so it
is read here only to pick a label and never leaves this module. On macOS the
helper apps are already named per type (“AgentMux Helper (GPU)”), which is
the fallback when a command line can’t be read.
The window host and the launcher carry no --type; they are told apart by
the tree: the host is the parent of CEF subprocesses, the launcher an
ancestor of this backend.
A renderer also says what it serves — a window, a browser pane, an idle
pool window (renderer_serves). Only the window host knows that: each
renderer reports its PID to it (crates/cef/src/renderer_map.rs), and
Tower asks it for the map while sampling.
Structs§
- Describer
- Remembers each process’s
Kind, so a command line is read once per process rather than once per sample. Forgets processes that are gone. - Renderer
Entry - One browser and the renderer serving it, as the window host reports it
(
crates/cef/src/renderer_map.rs,POST /agentmux/browser/renderer_map).
Enums§
- Kind 🔒
- What a process’s own command line (or, failing that, its name) says.
Constants§
- READ_
ATTEMPTS 🔒 - How many times a command line that couldn’t be read is tried. A process the OS never lets us read (another user’s) is given up on after that.
Functions§
- args 🔒
- cef_
label 🔒 - has_arg 🔒
- innermost_
ns_ 🔒pid - The last PID on a
/proc/<pid>/statusNSpid:line. - kind_of 🔒
- mac_
helper_ 🔒type - macOS helper apps are named per type: “AgentMux Helper (GPU)” → “GPU”. The plain “AgentMux Helper” runs utility processes.
- own_
view_ pid - The PID a process sees for itself, which is what a renderer reports.
- page_
host - A page URL’s host, for a browser pane’s renderer row: never its user,
password, port, path or query (
https://user:pass@host:8080/x→host). - parse_
renderer_ map - The host’s
renderer_mapanswer ({ok, data: {renderers}}) as entries; none for anything else, so an older host just leaves renderers unnamed. - renderer_
serves - What the renderer
pidserves, for its row: “window Main”, “browser pane github.com”, “pool window (idle)”, joined when one renderer serves several (Chromium may share one between same-site browsers).pagenames a browser pane by its block id,workspacea window by its srv id. - switch 🔒
--name=value→value. Chromium writes its switches in that form, and none of the values read here contain spaces.- utility_
label 🔒 network.mojom.NetworkService→ “Network service”.