Skip to main content

Module widget_handlers

Module widget_handlers 

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

WidgetCatalogResult
The widget catalog, checked, with what is installed here (SPEC_WIDGET_SHARING_2026_10_10.md §4.5).
WidgetIdReq
WidgetInstallReq
WidgetInstallResult
WidgetPackagesResult
WidgetReadFileReq
WidgetReadFileResult
WidgetSetEnabledReq

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.js and am-widget.css, which a widget’s iframe imports like its own files, and v1.d.ts and README.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
svc 🔒