Skip to main content

preview

Lets an agent see and drive the app running in the user's Preview pane. Use it after a build, when the user says something is broken, or to walk a UI flow end to end.

PropertyValue
Module idpreview
Version2.0.0
Toolsinspect, snapshot (LLM-visible)

Built preview assets are served by the daemon over HTTP under the session preview surface in the Digitorn UI. This module talks to the live iframe (agent shim + runtime endpoint), not to a separate web_preview tool module.

Tools

preview.inspect

Look at the running preview and optionally run UI actions first.

Useful returns: whether the page rendered or came up blank, the route on screen, runtime failures (crashes, rejected promises, console errors with file/line), failed network calls, console logs, viewport size, visible text, and actionable elements with refs.

ParamNotes
actionsOptional ordered interactions (navigate, click, type, press, hover, check, select, scroll, viewport, wait_for, detail, wait). Prefer match (visible label) over stale refs inside a sequence.
fullReturn everything (default false).
textInclude visible text (default true).

Requires an open Preview pane for the session. If the pane is still loading after a build, inspect waits briefly for it to come live.

preview.snapshot

Pixel / layout capture for visual checks (positions, overlaps, polish). Use together with inspect when console/DOM alone is not enough.