stdio
- Protocol
- stdio://
- Default model
- None
Hands the navigator’s decisions, or a formatter’s output, to an external agent, a program or a person at a terminal, in place of a model. Each turn ZShot writes a plain-text frame and reads back the agent’s reply.
| Endpoint | Channel |
|---|---|
stdio | Replies on stdin, prompts on stdout |
stdio:/ | One bidirectional file descriptor, such as a socketpair the parent passes in |
stdio:/ | Separate inherited read and write descriptors |
stdio:/ | Named pipes. A plain file gives the reader EOF instead of blocking for the reply |
Frames
ZShot writes the rendered prompt, then any screenshot as an <img src="file://…"> line pointing at a per-session temp file, then a <<END>> line. The first frame carries a short protocol preamble. The temp directory is removed when the session ends.
The endpoint’s ?vision= sets when frames carry a screenshot. The agent replies VISION to see the page, and every later frame on that page carries one.
Replies
The agent replies in the navigator action language, ending with a <<END>> line or a blank line:
CLICK @e7, FILL @e7: text, SELECT @e7: Blue, PRESS_KEY Escape, NOTE the total is $42.10, SCROLL DOWN 600 @e12, SCROLL TO @e7, POINTER_DOWN @e5, POINTER_MOVE @e7 TOP, POINTER_MOVE 640:412, POINTER_UP, WAIT 5, READ, VISION, NAVIGATE_TO_TAB 1, ACCEPT, DISMISS, ESCALATE opus, DONE, IMPOSSIBLE, RESTART
An action that names its ref, and its value or options, takes one frame; one that leaves them out gets a follow-up frame asking for them. A fill value stays on one line; write a line break as \n.
Limits
- Rejected in server mode. In MCP server mode it must use an inherited descriptor rather than fd 0 or 1.
- Bare
stdiowrites to stdout, so it cannot be combined with-f -. - Exactly one URL.
- A navigator and formatter both on
stdioshare one channel, one atomic exchange at a time.
Options
| Option | On stdio |
|---|---|
fd, rfd, wfd, read, write | The channel, as the endpoint table gives it |
vision | stall:3 unless set |
timeout | 60 seconds unless set; 0 waits without limit |
frames | As listed |
| Navigator options | Every one |
Example
zshot --navigate "Open the formats page" \
--navigator-type "stdio" \
-f shot.png https://zshot-cli.com/