Expand description
The routes of the Zoom tool (docs/specs/SPEC_MUXAPI_ZOOM_2026_11_24.md): an agent reads and sets the zoom of the
panes in its own tab and of its own window’s chrome.
POST /api/v1/ui/zoom/{get,set,reset,undo,fit,check} { agent_id, scope?, target?, block?, blocks?, value?, token?, chrome?, max?, min_text_px?, axis?, apply? }
The agent’s token decides who acts and which pane is its own; nothing in the body can say “my pane”. A block in the body is a target, checked against the tab that holds the caller’s own pane (a pinned pane’s tab is the one showing, and the pinned panes count as in it). The window that holds that pane applies the change and tells the person (frontend/app/store/zoom-agent.ts), so these routes only carry the call: they never take focus.
Structs§
- Scope 🔒
- Whose call it is and where: the pane that routes it to a window, that pane’s tab, the name the notice shows, and the
write limit. A remote caller has no pane here:
own_idis only a pane of the tab it was told it was zooming.
Constants§
- PANE_
FLOOR 🔒 - The least a pane may be zoomed to: a
maxbelow it names no zoom a pane can have. - WRITES_
PER_ 🔒MINUTE - The most writes (
set,reset) one agent makes in a minute.
Statics§
- WRITES 🔒
- The write times of each agent in the last minute.
Functions§
- act 🔒
- browser_
pane_ 🔒call - A browser pane the caller drives is zoomed by emulation, whichever tab it is in (spec 4.2):
Some(answer)when the call names one,Nonefor every other call. - fit_
options 🔒 - The options of a
fitorcheck, refused when they are not what the search can use: anaxisother than x, y or both would skip every scroller and call a pane clean; amaxthat is not a number from the pane floor up would be searched as NaN or refused as “too narrow”; amin_text_pxthat is not above zero would pass any text. - fit_
request 🔒 fit_options, then the panes afitorchecknames (panes_asked).- handle_
zoom 🔒 - names_
one_ 🔒pane - Whether a
get,setorresetselects the one pane inblock: agetof the window (scope: "window"), asetorresetof the chrome or ofallpanes name more than a pane, so a browser block beside them does not take the call over. - panes_
asked 🔒 - The panes a
fitorchecknames:blocks(a list), orblock(one pane, or “all” for every pane of the tab, which is none named).Nonemeans every pane of the tab. - refuse 🔒
- A refusal: HTTP 200 with the spec’s
{ok:false, error, message}shape, so the agent reads it as an answer. - run_
in_ 🔒tab - An action on the panes of
scope.own_tab, asscope.agent. - send_
to_ 🔒window - Counts a write against the caller’s limit, then has the window that holds the scope’s pane do
op. - stack_
of 🔒 - Every tab of the pane that holds
block_id(a stack),block_idfirst; justblock_idwhen its layout does not say. - tab_
panes 🔒 - The panes on screen with tab
own_tab: its own, and the window’s pinned pane when that is a pane of another tab (it is drawn over this one), with every tab of its stack. Returns the tab’s id too. - take_
write 🔒 - Counts a write by
agentatnow; over the limit it says in how many milliseconds one is free again. - text 🔒