Expand description
Canonical HTTP request/response DTOs shared between agentmux-srv, agentmux-mcp, and agentmux-bashwrap. Every struct here is the single source of truth for the corresponding wire shape; the three crates all import rather than redeclare these types.
Re-exports§
pub use crate::file_rename_types::FileRenameRequest;pub use crate::ui_record_types::UiRecordRequest;pub use crate::ui_record_types::UiRecordResponse;pub use crate::ui_screenshot_types::ScreenshotRegion;pub use crate::ui_screenshot_types::UiScreenshotRequest;pub use crate::ui_screenshot_types::UiScreenshotResponse;pub use crate::agent_create_types::ContainerAsk;pub use crate::agent_create_types::CreateAgentRequest;pub use crate::agent_create_types::ImportAgentRequest;pub use crate::agent_create_types::RouteAsk;pub use crate::agent_create_types::SpawnAgentRequest;pub use crate::agent_create_types::SpawnManyRequest;pub use crate::agent_create_types::SpawnWorkerSpec;pub use crate::browser_control_types::UiBrowserHandoffStatusRequest;pub use crate::browser_control_types::UiBrowserReleaseRequest;pub use crate::browser_control_types::UiBrowserRequestRequest;pub use crate::browser_control_types::UiBrowserRetakeRequest;pub use crate::browser_control_types::UiBrowserTakeControlRequest;pub use crate::browser_control_types::UiBrowserZoomRequest;pub use crate::browser_control_types::UiBrowserLocateRequest;pub use crate::place_args::PanePlaceRequest;pub use crate::place_args::PlaceArgs;
Structs§
- Agent
Workers Request POST /api/v1/agent/spawn— backs theAgentstool’sspawn(docs/specs/SPEC_AGENT_WORKERS_2026_10_15.md §3.1): the calling agent, the leader, opens a worker: a new agent built from its own definition (not a fork: no history), in its team tab.POST /api/v1/agent/workers— backs theAgentstool’sworkers(docs/specs/SPEC_AGENT_WORKERS_2026_10_15.md §3.4): the calling agent’s own workers, by its signed identity.- Capture
Into - A new entry (
kindandlabel), or an existing one byid, whose value is then replaced and the old one kept 7 days.partdefaults to the kind’s main value. - Capture
Rule - One value
Terminalruntakes out of a command’s output into the Vault (SPEC_VAULT_GENERATE_CAPTURE_AND_BROWSER_SIGNINS_2026_10_28.md §4.2). - Close
Pane Request - Desktop
Authorize Request POST /api/v1/agent/desktop/authorize— asked before everyDesktopaction butapps(§5.4); waits while the user is asked.- Desktop
Policy Request POST /api/v1/agent/desktop/policy— backsDesktop’sapps(docs/specs/SPEC_DESKTOP_DRIVING_2026_10_20.md §5.1): whether the tool is on, and for each window whether it is blocked or already granted.- Desktop
Record Request POST /api/v1/agent/desktop/record— what an authorized action did (§5.10). Typed text is never sent, only its length indetails.- Desktop
Release Request POST /api/v1/agent/desktop/release— the agent gives its grant back.- Desktop
Window Ref - A window as
Desktopnames it to srv: the idappsgave, the app’s executable (name or path), and the window’s title. - Inject
Request POST /agentmux/reactive/inject— deliver a message to an agent.- Pane
Open Request POST /api/v1/pane/open— open a new pane.- Pane
Open Response - Response from
POST /api/v1/pane/open - Pane
Title Request POST /api/v1/pane/title— set a pane’s display title.- PtyShell
Create Request POST /api/v1/ptyshell/create- PtyShell
Create Response - Response from
POST /api/v1/ptyshell/create.shell_idis the new sub-block’s id — the same value every otherPtyShell*call takes. - PtyShell
Input Request POST /api/v1/ptyshell/input— write raw text to the PTY, as if typed.- PtyShell
Input Response - Response from
POST /api/v1/ptyshell/input - PtyShell
Read Request POST /api/v1/ptyshell/read— read back the shell’s raw output tail.- PtyShell
Read Response - Response from
POST /api/v1/ptyshell/read - PtyShell
Resize Request POST /api/v1/ptyshell/resize— resize the PTY. Some TUIs render differently or wrap badly at the fallback geometry (25x200).- PtyShell
Resize Response - Response from
POST /api/v1/ptyshell/resize - PtyShell
Status Request POST /api/v1/ptyshell/status— query whether the shell is still running.- PtyShell
Status Response - Response from
POST /api/v1/ptyshell/status - PtyShell
Stop Request POST /api/v1/ptyshell/stop— release the agent’s lock on the shell now, without waiting forAGENT_LOCK_WINDOW_MSto lapse.- PtyShell
Stop Response - Response from
POST /api/v1/ptyshell/stop - Quit
Self Request POST /api/v1/agent/pane/close— backs theClosePaneMCP tool. See docs/specs/SPEC_AGENT_PANE_LIFECYCLE_CONTROL_2026_09_10.md.- Register
DevServer Request POST /api/v1/agent/dev_server/register— backs theRegisterDevServerMCP tool. See docs/specs/SPEC_NATIVE_CONTAINER_DEV_PROXY_2026_09_19.md.- Register
DevServer Response - Response for
POST /api/v1/agent/dev_server/register. - Request
Upgrade Request POST /api/v1/agent/self/upgrade— backs theApptool’supgrade(docs/specs/SPEC_UPGRADE_FOR_USERS_AND_AGENTS_2026_10_15.md §5.1).- Shell
Create Request POST /api/v1/shell/create- Shell
Create Response - Response from
POST /api/v1/shell/create - Shell
Input Request POST /api/v1/shell/input— write text to a running shell’s stdin.- Shell
Input Response - Response from
POST /api/v1/shell/input - Shell
Output Request POST /api/v1/shell/output- the cleaned output of a job that was given Vault secrets (ShellCreateRequest.secrets). Only such a job keeps its output, and only the agent whose pane started it may read it: the request carries the agent’s signed identity, and srv derives the pane from that, never from a field the caller fills in (every agent holds the instance auth key).- Shell
Output Response - Response from
POST /api/v1/shell/output - Shell
Status Request POST /api/v1/shell/status— query whether a shell is still running.- Shell
Status Response - Response from
POST /api/v1/shell/status - Shell
Stop Request POST /api/v1/shell/stop- Shell
Stop Response - Response from
POST /api/v1/shell/stop - TabActivate
Request POST /api/v1/tab/activate— switch the active tab.- TabName
Request POST /api/v1/tab/name— rename a tab.- TabNew
Request POST /api/v1/tab/new— create a new tab in a workspace.- UiAutomation
Auth - Identity proof shared by every
/api/v1/ui/*request.sigisjekt_sign::sign_jekt(key, "ui-automation-identity", agent_id, "__srv__", ts_secs, "")— the fixed msgid/target_agent/message values exist purely for domain separation from real jekt message signatures (no genuine jekt uses this literal msgid, and “srv” is not a spawnable agent name), not because those fields carry meaning here. - UiBrowser
ActRequest POST /api/v1/ui/browser/act— backsBrowserClick,BrowserFill,BrowserSelectandBrowserCheck(spec §4.2).- UiBrowser
Actions Request POST /api/v1/ui/browser/actions— backs Browser’slog: what the agent did in a browser pane it drives, as the pane’s action log records it (PLAN_BROWSER_DRIVER_FIXES_2026_10_17.md §5). Read-only, own panes only.- UiBrowser
Close Request POST /api/v1/ui/browser/close— backs Browser’sclose: the agent closes a browser pane it drives.paneis required: with none, the request would name the caller’s own pane.- UiBrowser
Dialogs Request POST /api/v1/ui/browser/dialogs— the page dialogs the caller’s browser panes showed since it last asked (SPEC_BROWSER_PANE_NATIVE_DIALOGS_2026_10_17.md §6.1).- UiBrowser
Dispatch KeyRequest POST /api/v1/ui/browser/dispatch_key- UiBrowser
Element Match - Elements by role and accessible name:
find’s query, and ascopegiven by name.roleis the role a snapshot line shows, in any case;namea part of the accessible name in any case, or withexactthe whole name as written. - UiBrowser
EndBypass Request POST /api/v1/ui/browser/end_bypass— backs Browser’send_bypass: the agent ends its own bypass when the job is done.- UiBrowser
Eval Request POST /api/v1/ui/browser/eval- UiBrowser
Find Request POST /api/v1/ui/browser/find— backs Browser’sfind: only the lines of the elements matching, each with a referenceclickand the rest take.- UiBrowser
Focus Element Request POST /api/v1/ui/browser/focus_element- UiBrowser
Focus Info Request POST /api/v1/ui/browser/focus_info- UiBrowser
Handoff Request POST /api/v1/ui/browser/handoff— backsBrowserHandoff(SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §5.2): show the user a banner in the pane and wait for Done or Cancel.- UiBrowser
History Request POST /api/v1/ui/browser/back,/forward,/reload— all three only need the target block id;ignore_cacheis meaningful for/reloadonly (ignored by back/forward, mirrorsbrowser_api::types::HistoryReq).- UiBrowser
Navigate Request POST /api/v1/ui/browser/navigate- UiBrowser
Open Request POST /api/v1/ui/browser/open— backsOpenBrowser. Opens a browser pane below the caller’s own pane and records the caller as its owner (SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §3).- UiBrowser
Open Response - Response for
POST /api/v1/ui/browser/open: the new pane’s block id, which theBrowser*andUI*tools take aspane. - UiBrowser
Request Bypass Request POST /api/v1/ui/browser/request_bypass— backs Browser’srequest_bypass(SPEC_BROWSER_PANE_BYPASS_2026_10_16.md §6): ask the user, in the pane, to let the agent act without asking first, and wait for their answer.- UiBrowser
SetFiles Request POST /api/v1/ui/browser/set_files— backsBrowserSetFiles(SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §5.3). srv allows only files inside the calling agent’s own workspace.- UiBrowser
Snapshot Request POST /api/v1/ui/browser/snapshot— backsBrowserSnapshot(SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §4.1).- UiBrowser
Terminal Request POST /api/v1/ui/browser/terminal— backs Browser’sterminalaction (SPEC_BROWSER_WEB_TERMINAL_TYPING_2026_10_23.md §4.2): type and run commands in a web terminal on a site the person granted.- UiBrowser
Wait ForRequest POST /api/v1/ui/browser/wait_for— backsBrowserWaitFor. At most one oftext,url_contains,gone,state.- UiClick
Request POST /api/v1/ui/click- UiPress
Keys Request POST /api/v1/ui/shortcuts/press- UiQuery
Request POST /api/v1/ui/query- UiReset
Shortcuts Request POST /api/v1/ui/shortcuts/reset— puts one command, or every command, back on its defaults.- UiRun
Command Request POST /api/v1/ui/shortcuts/run- UiSet
Shortcut Request POST /api/v1/ui/shortcuts/set— gives one command exactly these keys (docs/specs/SPEC_KEYBOARD_SHORTCUTS_SETTINGS_2026_11_06.md §10).- UiShortcuts
List Request POST /api/v1/ui/shortcuts/list- Window
Focus Request POST /api/v1/window/focus— bring a window to the foreground.- Window
Name Request POST /api/v1/window/name— set a window’s display name.- Workspace
Name Request POST /api/v1/workspace/name— rename a workspace.- WpsPublish
Request POST /agentmux/wps/publish— shared client/server envelope.
Enums§
- Capture
From - Where a captured value is in the command’s standard output.
- Shell
Input Failure - Reason a
ShellInputwrite did not happen.