Expand description
The widget packages’ RPCs and routes (docs/specs/SPEC_USER_WIDGETS_AND_WIDGET_API_2026_10_09.md §5.2, §8): listing and managing packages, serving an approved package’s files, and the user’s approval, which only the host can carry.
Structs§
- Widget
Catalog Result - The widget catalog, checked, with what is installed here (SPEC_WIDGET_SHARING_2026_10_10.md §4.5).
- Widget
IdReq - Widget
Install Req - Widget
Install Result - Widget
Packages Result - Widget
Read File Req - Widget
Read File Result - Widget
Section Entry Req - “Pin this section to the widget bar”: the section’s widget-bar entry, added to the user’s widgets.json when no entry opens that section yet (pane-sections.ts).
- Widget
Section Entry Result - Widget
SetEnabled Req
Constants§
- SDK_
README 🔒 - SDK_
V1_ 🔒CSS - SDK_
V1_ 🔒JS - The widget SDK and its stylesheet (spec §7), served next to the widgets.
- SDK_
V1_ 🔒TYPES
Functions§
- handle_
host_ 🔒widget_ approval POST /api/v1/host/widget_approval: the user’s answer to an install prompt (spec §8.3), relayed by the CEF host with its own token. The instance auth key, which every agent has, isn’t enough.- handle_
widget_ 🔒file GET /agentmux/widget-files/<id>/<hash>/<key>/<path>: an approved, enabled package’s file, as approved (spec §5.2). No auth key: an iframe loads these, and the key segment is what keeps other web pages out.- handle_
widget_ 🔒sdk GET /agentmux/widget-sdk/<file>:v1.jsandam-widget.css, which a widget’s iframe imports like its own files, andv1.d.tsandREADME.md, the reference an agent writing a widget reads. No auth.- packages_
result 🔒 - The list, with the publishers this instance has pinned.
- register_
widget_ handlers - section_
entry_ key - The widgets.json key for a section’s entry, or why the request can’t make one. Names are
lowercase letters, digits and
-, with at most one/in the section. - svc 🔒
- widgets_
catalog 🔒 - widgets.catalog: the catalog’s widgets, its signature checked against the key pinned in this AgentMux, each with what is installed here.
- widgets_
catalog_ 🔒install - widgets.catalog.install: download a catalog widget, check it against the (freshly fetched and checked) index, and copy it in. Like any install, it doesn’t run until the user approves it.
- widgets_
install 🔒 - widgets.install: copy a package in. It doesn’t run until the user approves it in the UI (the host-only route below).
- widgets_
list 🔒 - widgets.list: every package and its state.
- widgets_
read_ 🔒file - widgets.readfile: a trusted widget’s module, for the loader. Only the approved version’s bytes, checked like the files route.
- widgets_
rescan 🔒 - widgets.rescan.
- widgets_
section_ 🔒entry - widgets.sectionentry: “Pin this section to the widget bar”. Adds the section’s entry to the user’s widgets.json and applies it before answering, so the bar can pin it at once.
- widgets_
set_ 🔒enabled - widgets.setenabled.
- widgets_
uninstall 🔒 - widgets.uninstall: delete the package folder and its approval. A v1 widget is a widgets.json entry, which stays the user’s to edit.