Kinds
prompt — proposes a message the user reviews and sends from their composer (works with any key); http — a server-side GET/POST to a fixed https URL with an input schema (GET → query, POST → JSON body) and an output schema the response must satisfy; headers/query values may reference the user’s secrets by name ({ “secret”: “<name>” }).Binding from a template
- ACTION — an element may carry “action”: { “ref”: “<shared action name>” } or an inline { “definition”: { “kind”: “prompt”, “text”: [“Show the forecast for ”, { “bind”: “city” }] } } / { “definition”: { “kind”: “http”, “method”: “GET”, “url”: “https://…”, “input”: <schema>, “output”: <schema> } }, plus “input”: { “<field>”: “<path>” | { “const”: <value> } } and “output”: { “mode”?: “replace”|“merge”|“patch”, “path”?, “map”? }. An output map projects the response before the mode applies; when the response is an ARRAY the map entries resolve against EACH ITEM and the projection is the array of per-item results, so a list response can be reshaped without replacing it raw — a per-item projection is a LIST, so pair it with mode replace or patch (merge needs an object). A ”.” target SELECTS first: alone it is the whole projection (e.g. { ”.”: “0” }); beside other entries it names the value they map, so an enveloped list projects per item ({ ”.”: “data”, “ask”: “ask” }). Any source that starts with an index (“0.ask”) addresses the list itself, not its items. Bindings resolve at render time; buttons and links (never both href and action) become activatable in Apps hosts. A widget-level “load” (http GET only) runs once when the widget first renders