Skip to main content

Module tower_agentmux

Module tower_agentmux 

Source
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.
RendererEntry
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>/status NSpid: 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_map answer ({ok, data: {renderers}}) as entries; none for anything else, so an older host just leaves renderers unnamed.
renderer_serves
What the renderer pid serves, 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). page names a browser pane by its block id, workspace a 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”.