Expand description
The connection RPCs the frontend’s connection UI already calls
(conntypeahead.tsx, blockframe.tsx’s ConnStatusOverlay), which had no
handler until now (P0 of SPEC_REMOTE_TERMINALS_AND_DURABLE_SESSIONS_2026_10_02.md).
A connection AgentMux cannot run is refused with a status the pane shows,
instead of the pane silently starting a local shell under a remote name:
WSL off Windows or for a distro that is not installed (P1), and SSH where
there is no ssh (P2).
Structs§
- Askpass
Request 🔒 POST /api/v1/askpassbody, fromagentmux-bashwrapas ssh’s askpass.- Conn
Entry 🔒 - One row of the agent
ConnListtool. - User
Answer 🔒 - The user’s answer to
ask_user.answeredis false when the window was closed, timed out, or could not be opened.
Enums§
- Agent
Target 🔒 - Where an agent’s
ShellorPtyShellruns.
Constants§
- DIALOG_
TIMEOUT_ 🔒MS - How long the user has to answer a consent or askpass dialog.
- NOT_SSH 🔒
- SSH_
WITH_ 🔒PROMPTS - How long an ssh run whose prompts go to the approval window may take: the dialog’s own wait, and some to spare.
Functions§
- add_
remote 🔒 - Add a host to the user’s ssh config (§4.4 of SPEC_REMOTES_PANE_2026_10_05.md),
once they confirm the exact block in the window of pane
cmd.blockid. - agent_
label 🔒 - How a dialog names an agent: its id, as one plain capped line.
- ask_
user 🔒 - Ask the user a question about the agent in
agent_block_id, in an approval subwindow the host opens over the window showing it (crates/cefssh_approval), and wait for the answer. - confirm_
session_ 🔒end - The user’s yes to ending session
idonconn, asked in the window of paneblock.Errunless they said yes. - connect 🔒
- What
connconnectdoes (a Remotes row’s Connect, a pane’s Reconnect): log in to an SSH host; for anything else, whatconnensuredoes. - consent_
for_ 🔒ssh - The user’s consent for the agent
agent_id(verified,verified_agent) inagent_block_idto runwhaton the SSHconnectionwith the user’s identity (spec §8.2).connectionis the canonical name (ConnTarget::name), so one host is one consent however it is spelled. “Always” for that agent and host is remembered (remote::agent_access) and asks nothing again; otherwise the user is asked (ask_user). - ensure 🔒
- What
connensuredoes: acceptlocal; accept a WSL distro that is installed (Windows only), which is then connected; accept an SSH destination where the systemsshis, claiming nothing (only a login connects it: a pane’s ssh, orconnconnect); refuse a bad name with the reason, recorded as the status the pane’s overlay shows. - ensure_
with 🔒 ensurewith the installed distros, the platform and whethersshwas found given, so it is testable anywhere.- for_
agent 🔒 - The connection an agent’s
ShellorPtyShellcall asked for, checked the same way a pane’s is (ensure),Errwith the reason when it cannot run. - handle_
askpass 🔒 POST /api/v1/askpass: show an ssh prompt to the user (ask_user) and return the answer (remote::askpass). Only a live secret is answered, and the secret, not anything in the request, says which agent and host the question names.- handle_
conn_ 🔒list GET /api/v1/conn/list: the agentConnListtool (spec §8.1).- host_
to_ 🔒ask_ user - The host that can put a question to the user and relay their answer. Only
the host can: agents hold the key srv’s own routes take (see
ask_user). With none connected (headless) there is no one to ask, and whatever needs the answer must not happen, nor wait for one. - install_
helper_ consent - Give the helper install its question (SPEC_REMOTES_PANE_2026_10_05.md
§4.9): the approval window, and
conn:helperfrom the settings. - known_
ssh_ 🔒host ssh_hostfor a host AgentMux already lists (the user’s ssh config, settings, or a connection they made), for what logs in with the user’s keys: never to one an RPC names, since anything holding srv’s key can send one, an agent included.- list 🔒
- The connections there are: this machine, each installed WSL distro, the user’s ssh config hosts, and any other connection a pane has used this session, with its status and whether an agent can use it.
- log_in 🔒
- Log in to SSH host
name(aknown_ssh_host) and runtrue, with ssh’s prompts going to the user in the window of paneblock, if any. The connection’s status follows (link::login), and the connection stays up a while after (ControlPersist), so the next pane on it asks nothing. - one_
line 🔒 - One line of agent-supplied text for a dialog: shown as plain text, newlines folded and length capped, so it cannot lay out a message of its own.
- register
- remote_
name 🔒 - A connection the Remotes commands may act on: a WSL distribution or an SSH
destination, never
localor somethingConnTargetrefuses. - remote_
names 🔒 - The picker’s remote names: the ssh config hosts, then any other SSH connection known this session, each once.
- remove_
helper 🔒 - Remove AgentMux’s helper from SSH host
connection(Remotes, §4.9 of SPEC_REMOTES_PANE_2026_10_05.md), once the user confirms in the window of paneblock, naming the sessions that will end. - ssh_
host 🔒 connection’s canonical name if it is an SSH host; otherwise “otherwise”.- str_
field 🔒 - test_
remote 🔒 - Log in to
connectionand runtrue(§4.4): success, or ssh’s message. - verified_
agent 🔒 - The agent an SSH request comes from, proven: its signed identity
(
UiAutomationAuth, made with its own jekt key, which no other agent holds) verified, and the pane derived from it, never taken from the request.Errunless that pane isagent_block_id: every agent holds srv’s auth key, so a request body alone could name another agent’s pane and borrow its “Always allow”.