Skip to main content

Module api_types

Module api_types 

Source
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.

Structs§

ClosePaneRequest
InjectRequest
POST /agentmux/reactive/inject — deliver a message to an agent.
PaneOpenRequest
POST /api/v1/pane/open — open a new pane.
PaneOpenResponse
Response from POST /api/v1/pane/open
PaneTitleRequest
POST /api/v1/pane/title — set a pane’s display title.
PtyShellCreateRequest
POST /api/v1/ptyshell/create
PtyShellCreateResponse
Response from POST /api/v1/ptyshell/create. shell_id is the new sub-block’s id — the same value every other PtyShell* call takes.
PtyShellInputRequest
POST /api/v1/ptyshell/input — write raw text to the PTY, as if typed.
PtyShellInputResponse
Response from POST /api/v1/ptyshell/input
PtyShellReadRequest
POST /api/v1/ptyshell/read — read back the shell’s raw output tail.
PtyShellReadResponse
Response from POST /api/v1/ptyshell/read
PtyShellResizeRequest
POST /api/v1/ptyshell/resize — resize the PTY. Some TUIs render differently or wrap badly at the fallback geometry (25x200).
PtyShellResizeResponse
Response from POST /api/v1/ptyshell/resize
PtyShellStatusRequest
POST /api/v1/ptyshell/status — query whether the shell is still running.
PtyShellStatusResponse
Response from POST /api/v1/ptyshell/status
PtyShellStopRequest
POST /api/v1/ptyshell/stop — release the agent’s lock on the shell now, without waiting for AGENT_LOCK_WINDOW_MS to lapse.
PtyShellStopResponse
Response from POST /api/v1/ptyshell/stop
QuitSelfRequest
POST /api/v1/agent/pane/close — backs the ClosePane MCP tool. See docs/specs/SPEC_AGENT_PANE_LIFECYCLE_CONTROL_2026_09_10.md.
RegisterDevServerRequest
POST /api/v1/agent/dev_server/register — backs the RegisterDevServer MCP tool. See docs/specs/SPEC_NATIVE_CONTAINER_DEV_PROXY_2026_09_19.md.
RegisterDevServerResponse
Response for POST /api/v1/agent/dev_server/register.
ShellCreateRequest
POST /api/v1/shell/create
ShellCreateResponse
Response from POST /api/v1/shell/create
ShellInputRequest
POST /api/v1/shell/input — write text to a running shell’s stdin.
ShellInputResponse
Response from POST /api/v1/shell/input
ShellStatusRequest
POST /api/v1/shell/status — query whether a shell is still running.
ShellStatusResponse
Response from POST /api/v1/shell/status
ShellStopRequest
POST /api/v1/shell/stop
ShellStopResponse
Response from POST /api/v1/shell/stop
TabActivateRequest
POST /api/v1/tab/activate — switch the active tab.
TabNameRequest
POST /api/v1/tab/name — rename a tab.
TabNewRequest
POST /api/v1/tab/new — create a new tab in a workspace.
UiAutomationAuth
Identity proof shared by every /api/v1/ui/* request. sig is jekt_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.
UiBrowserActRequest
POST /api/v1/ui/browser/act — backs BrowserClick, BrowserFill, BrowserSelect and BrowserCheck (spec §4.2).
UiBrowserDispatchKeyRequest
POST /api/v1/ui/browser/dispatch_key
UiBrowserEvalRequest
POST /api/v1/ui/browser/eval
UiBrowserFocusElementRequest
POST /api/v1/ui/browser/focus_element
UiBrowserFocusInfoRequest
POST /api/v1/ui/browser/focus_info
UiBrowserHandoffRequest
POST /api/v1/ui/browser/handoff — backs BrowserHandoff (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.
UiBrowserHistoryRequest
POST /api/v1/ui/browser/back, /forward, /reload — all three only need the target block id; ignore_cache is meaningful for /reload only (ignored by back/forward, mirrors browser_api::types::HistoryReq).
UiBrowserNavigateRequest
POST /api/v1/ui/browser/navigate
UiBrowserOpenRequest
POST /api/v1/ui/browser/open — backs OpenBrowser. Opens a browser pane next to the caller’s own pane and records the caller as its owner (SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §3).
UiBrowserOpenResponse
Response for POST /api/v1/ui/browser/open: the new pane’s block id, which the Browser* and UI* tools take as pane.
UiBrowserSetFilesRequest
POST /api/v1/ui/browser/set_files — backs BrowserSetFiles (SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §5.3). srv allows only files inside the calling agent’s own workspace.
UiBrowserSnapshotRequest
POST /api/v1/ui/browser/snapshot — backs BrowserSnapshot (SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §4.1).
UiBrowserWaitForRequest
POST /api/v1/ui/browser/wait_for — backs BrowserWaitFor. Exactly one of text, url_contains, gone.
UiClickRequest
POST /api/v1/ui/click
UiPressKeysRequest
POST /api/v1/ui/shortcuts/press
UiQueryRequest
POST /api/v1/ui/query
UiRunCommandRequest
POST /api/v1/ui/shortcuts/run
UiScreenshotRequest
POST /api/v1/ui/screenshot
UiScreenshotResponse
Response for POST /api/v1/ui/screenshot. path is a file already written to disk (openable via the OpenMedia tool); png_base64 is the same image inline, for a caller that can render an MCP ImageContent block directly without a second round trip.
UiShortcutsListRequest
POST /api/v1/ui/shortcuts/list
WindowFocusRequest
POST /api/v1/window/focus — bring a window to the foreground.
WindowNameRequest
POST /api/v1/window/name — set a window’s display name.
WorkspaceNameRequest
POST /api/v1/workspace/name — rename a workspace.
WpsPublishRequest
POST /agentmux/wps/publish — shared client/server envelope.

Enums§

ShellInputFailure
Reason a ShellInput write did not happen.