tool | no | string | — | — | Curated read-only built-in or the name of a custom type:code tool on this agent. |
params | no | object | — | — | Owner-fixed parameters for the tool. The browser never supplies these. |
code | no | string | — | — | Sandboxed code body (alternative to tool). |
language | no | enum | one of python, javascript | — | |
url | no | string | — | — | HTTPS pull: an endpoint returning JSON/XML/text that the SERVER fetches directly (SSRF-guarded, redirect-validated, size-capped) and parses — ideal for REST APIs and status endpoints. Use with optional headers and format. Set exactly ONE of tool/code/url/file/db per source. |
headers | no | object | — | — | Owner-fixed request headers for url (e.g. {“Authorization”: “Bearer …”}). Server-side only — stripped before anything ships to a browser. |
format | no | enum | one of auto, json, xml, text | — | Body parsing for url. auto (default) follows the response content-type: JSON is parsed, XML/RSS/Atom is converted to JSON (attributes under ”@”), anything else is JSON-sniffed then served as raw text. |
file | no | string | — | — | Local-file pull: a bare filename like “metrics.json” or “report.xml” read from the agent’s own dashboard_data/ directory on every (cached) request. The agent keeps it current with the write_dashboard_file tool (code tools: ctx.tools.write_dashboard_file); on self-hosted installs any external process may write it. XML is converted to JSON (attributes under ”@”). |
db | no | object | — | — | Read-only database pull; returns the rows as an array of objects. Connects to the owner’s own Postgres with the supplied connection string and runs the query inside a READ ONLY transaction with a statement timeout (writes fail; private/loopback hosts are refused unless the operator allows them in widget-security.json). Connection string + query never leave the server. Item fields below. |
result_target | no | string | — | — | JSON Pointer into the spec state to write the result into (e.g. “/data”). The spec then reads it with { “$state”: “/data/…” }. |
result_path | no | string | — | — | Optional dotted path into the tool result to extract before writing (e.g. “rows”). |
refresh_interval_sec | no | number | — | — | Optional auto-refresh cadence in seconds; clamped to [60, 86400]. |
action_id | no | string | — | — | Minted at save time — the only field shipped to the browser. |