Skip to main content

Module devtools

Module devtools 

Source
Expand description

Human-facing devtools inspector for the UITree.

Reuses the AI-agent AgentState/ElementSummary snapshot (see crate::agent) plus a pretty-printed view of the tree itself, so a developer can inspect the structure, the interactive/data elements an AI agent would see, and — when signals are named via crate::signal::Signal::labeled — which signals have been firing.

The output is plain text (ideal for a terminal/console devtools panel) and also renderable to a self-contained HTML snippet via to_html.

Structs§

DevtoolsReport
A complete devtools report: the tree view, the agent-state view, and the signal-activity view.

Functions§

inspect_state
Renders an AgentState snapshot as a readable listing of the interactive and data elements an AI agent would observe.
inspect_tree
Pretty-prints a UITree as an indented tree, annotating each node with its meta (class, key, dynamic flag, AI action, on_click presence, assigned id).
render
Builds a full DevtoolsReport from a UITree and its AgentState.
to_html
Renders a DevtoolsReport as a self-contained HTML snippet suitable for embedding in a devtools panel (no external CSS/JS).