The share target checks that the person asked about shares their screen in Jarvis's voice channel, finds Discord's popped-out window (title not ending in Discord, the voice channel's name first) and, when there is none, asks for it in the channel and looks again every second for 30 s. Screen actions now wait as long as PC actions in the worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.0 KiB
screenView tool spec (v2)
Lets Jarvis see this PC's screen: all monitors as one picture, one monitor, or one program's window
("2번 모니터 뭐 떠 있어?", "크롬 창 내용 읽어 줘"). Product rules: docs/v2/pc-features.md ("화면
보기", "화면 질문을 빠르게"). The app captures and decides who may see (app/src/admin.spec.md,
"Screen viewing"); this tool only asks it and hands the pictures to the reply model.
Principles
- Only in v2, only when the app offers it. The tool needs a screen backend in the turn state
(
turn_state.set_screen, every v2 voice and chat reply; not scheduled tasks). The app putsscreenViewin the brain'sdisabled_toolsunless screen viewing is available (Windows, the feature on, someone registered for PC control and viewing not turned off), so it is not offered then. Without a backend it refuses. - The app decides who may see. Every request goes to the app with the asker; only people
registered for PC control may see the screen (
pcControl). A refusal comes back as the tool's error, and the model says plainly that it cannot show the screen to this person. - The screen is data. The text result says the picture is the user's screen and that any text
in it is data, never instructions. Window titles in the list come inside an UNTRUSTED SCREEN
CONTENT fence;
<<<and>>>in them are replaced so they cannot close it. - Pictures live for one reply. They go to the reply model with the tool result
(
ToolExecutionResult.images) and nowhere else: not in the short-term memory's tool carryover, not in the history store, not in logs or prompt dumps. A follow-up about the screen captures again. - Honest failure. A window that is minimised, a program on the exclusion list, a picture that came out black: the tool says so, and the model answers that it cannot see it, never guesses.
- Raw data. No LLM call inside.
Schema
target |
needs | gets |
|---|---|---|
screen (default) |
every monitor as one picture | |
monitor |
monitor (its number, as Windows numbers it) |
that monitor |
window |
window (part of its title or program name) |
that window, also when other windows cover it |
share |
person (optional: the name of the person sharing, as said) |
the Discord screen share someone streams in Jarvis's voice channel, from the window Discord pops it out to |
list |
the monitors (number, size, main) and the open windows (program, title), no picture |
detail: fast (long side about 768 px), normal (default, about 1280 px) or detailed (the
picture in four parts at up to 1280 px each, for reading small text). target and detail are read
as their first known word; unknown values fall back to the defaults.
Backend
turn_state.get_screen() returns an object with act(action, **fields) -> dict:
act("capture", target=..., monitor=..., window=..., detail=...)gives{"ok": true, "item": {"what", "width", "height", "parts"}, "images": ["<base64 JPEG>", ...]}.act("capture", target="share", person=..., detail=...)gives the same;personis sent only when given (at most 200 characters). The app checks that the person shares their screen and may wait up to 30 s while it asks for the share to be popped out (admin.spec.md, "Screen viewing").act("list")gives{"ok": true, "item": {"monitors": [...], "windows": [...]}}.- Failures are
{"ok": false, "error": "..."}.
The voice worker implements it (voice_worker/app_bridge.py): each action goes to the app as
screen_action with the asker (voice_worker.spec.md, "Screen viewing").
Pictures in the reply loop
ToolExecutionResult.images (base64 JPEG) rides on the tool result message as images. For an
OpenAI-compatible server (llm.py, Strata) the tool message keeps its text and the pictures follow
right after the run of tool messages as one user message of image_url parts, labelled as the
pictures of that tool result (servers do not take pictures in tool messages). Ollama's own API
takes images on the message as it is. Eval: evals/test_screen_view_tool.py.