Skip to main content

Module http_open

Module http_open 

Source
Expand description

Pane and agent open. Split out of server/mod.rs unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md §4.1).

Functions§

announce_agent_open 🔒
Tell the windows an agent opened a pane. The one the person is in offers to show it; the agent’s own open took neither their tab nor their focus.
check_meta 🔒
The caller’s meta, with srv’s own keys taken out: a named browser profile only if the user lets the agent use it.
handle_agent_open 🔒
POST /api/v1/agent/open — launch an agent into a pane (idempotent: an agent already open in the target tab returns its existing block with created: false, same as the RPC path).
handle_pane_open 🔒
POST /api/v1/pane/open — open a pane (editor/term/browser/…).
is_agent 🔒
Whether the caller is an agent AgentMux knows by its token. A person’s own shell (muxopen, muxsh) calls the same routes and keeps its focus.
open_error_status 🔒
The HTTP status for agent.open’s own error vocabulary. AGENT_NOT_FOUND / TEMPLATE_NOT_OPENABLE / INVALID_PROVIDER / CLI_NOT_AVAILABLE are the caller’s problem (a bad target, or a CLI that could not be installed); CLI_INSTALLING is neither — the CLI is on its way, so the same request will succeed shortly (503, retryable); anything else is a server-side failure.
open_pane_for 🔒
handle_pane_open’s work. built_by_srv is true only for a request srv itself built from checked facts (the view of a paired computer’s agent, whose meta no caller wrote): a container agent’s snapshot step, which exists to confine what a request can read from its workspace, has nothing to confine there and would refuse the view.
pane_open_error_status 🔒
The HTTP status for a pane.open that failed: the caller’s own mistake (a missing or invalid argument, a view that does not exist) is 400, an agent already at its floating-pane limit is 429, anything else is srv’s (500).
quiet_agent_open 🔒
quiet_pane_open for agent.open, single or in a batch.
quiet_pane_open 🔒
What an agent’s open does about focus: nothing. An agent’s open never takes the person’s tab, focus or caret, whatever focus it sent (docs/reports/REPORT_ACTION_RESULTS_ALWAYS_VISIBLE_ACROSS_WINDOWS_2026_10_31.md §4 item 9); a person’s open (agent false) is left as sent.
ssh_connection_of 🔒
The SSH connection a pane.open names (the field, or connection in a caller-supplied meta), in its canonical form; None for this computer or WSL.