Expand description
Other AgentMux computers on the LAN in Tower (SPEC_TOWER_TASK_MANAGER_PANE_2026_10_08.md §8.3): this computer pairs as a viewer device of the other one, the way a phone does, and reads its processes from the viewer listener.
- Pairing: the other computer’s pairing link (
agentmux://pair?…, its “Pair a device” panel) carries its address, viewer port, certificate fingerprint and a one-time code.pairredeems the code for a viewer token over TLS pinned to that fingerprint (viewer::client). - What is kept: the peer’s address, port and fingerprint in
tower-peers.jsonin the data directory; the token in the secret store (the OS keychain), never in the file. - Reading:
GET /agentmux/viewer/procswith the token. The other computer answers only if its user turned sharing on, and its user can revoke this device from their paired-device list. - A moved peer: the fingerprint, not the address, is what is trusted, so when the stored address doesn’t answer, the address LAN discovery now has for that hostname is tried, and kept if it answers.
Structs§
- Link
- What a pairing link says.
- Peer
- One paired computer, as kept on disk (no secret here).
- Peers
- The kept peers, from
dir(the data directory).
Constants§
- FILE
- PEER_
PREFIX TowerSampleReq::connectionfor a paired computer:peer:<id>.
Traits§
- Tokens
- Where peers’ tokens are kept: the secret store (the OS keychain) in the app; in memory in tests, which must not touch the user’s keychain.
Functions§
- pair
- Pair with the computer the link names, as
device_name(this computer), for Tower. - parse_
link - Parse an
agentmux://pair?v=1&host=…&port=…&fp=…&code=…&hostname=…link. - sample
- A paired computer’s snapshot.
moved: the addresses LAN discovery has for its hostname, tried in turn when the kept one doesn’t answer.