snapshot
Perceive the current terminal screen to verify actions. Returns visible text, alternate-screen status, and hashes for change detection.
Instructions
Read a semantic snapshot of the session's current screen.
Returns {"ok", "alive", "alt_screen", "text", "hash", "visual_hash"}:
alt_screen is true while a full-screen program (vim, less, htop, ...)
owns the screen — keys are commands to that program, not input to a
shell, and text is its frame rather than scrollback. text is the
rendered screen; json (the structured cell/cursor model) is included only
when as_json=true. hash covers text content only — use it as the
wait_change baseline; visual_hash also covers styling, selection and
cursor state — use it as the wait_visual_change baseline. Don't mix the
two. This is the 'perceive' step — always snapshot after acting rather
than assuming an action landed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| as_json | No |