Expand description
UI blocks: rich visual output (cards, charts, tables, stat tiles) that any node or tool can emit for a host to render.
A UI block is a plain object whose "$ui" key names its kind, for example
{"$ui": "chart", "version": 1, ...}. The engine treats blocks as ordinary values;
this module only finds them, so hosts and nodes agree on one envelope. The block
kinds, their schemas and their validation live in the graphrt-ui crate: hosts must
validate a block there before rendering it.
Constants§
- MAX_
COLLECTED_ BLOCKS - Most blocks
collect_ui_blocksreturns for one value. - UI_KEY
- Key that marks an object as a UI block; its value is the block kind.
Functions§
- collect_
ui_ blocks - UI blocks in
value, in document order: the value itself when it is a block, otherwise blocks found in its array items and object fields, at most three levels down (a node’sdataoutput, a list of results, a{"chart": {...}}wrapper). The inside of a block is not searched, and at mostMAX_COLLECTED_BLOCKSblocks are returned. - ui_
block_ kind - The kind of a UI block (
"chart","adaptive_card"…), orNonewhenvalueis not one.