Repository navigation
feat(observe): act tools observe by default; the settled screen is kept in memory and sent only when asked - #134
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ptured, kept in memory and sent only when asked for leo: after every step take the screenshot and read the tree so the AI has the data ready and makes fewer calls — but do not hand it the image (tokens); give it only when the AI wants to look, and leave no junk behind. - MCP single-step act tools now default observe:true and name the last snapshot they saw as the baseline (?since=), so the result is the settled change, not a whole tree; observe:false keeps the bare action. - The daemon keeps the settled screen in memory: the frame the settle check already took when the screen was stable, else one captured in the background right after the response. GET /agent/screenshot (and phone_screenshot) returns it with no capture (X-Screenshot-Source: settled-after-action) while nothing was sent since and it is under 30 s old; ?fresh=1 always captures. - Nothing touches disk; the next screen-changing POST drops the frame.
3de5b97 to
99edb0d
Compare
Hardware (iPhone 17 Pro Max, USB, Calculator: tap label 7 with return=delta, then screenshot?max_side=1200, 5 runs)The screenshot after an observed action drops from 174–236 ms (a new capture) to 32–49 ms (the settled frame, |
leo asked for this: after every step, capture the screen and read the tree so the AI has the data ready and needs fewer calls. The screenshot is not handed to the AI unless it asks, to save tokens, and nothing is left behind.
MCP
phone_tap,phone_tap_element,phone_tap_label,phone_type,phone_key,phone_scrollandphone_shortcut.?since=. The result is therefore the settled change, not the whole tree. Field names match batch observe in feat: batch-first agents, Jev on the phone, and a quieter setup #133.observe:falsekeeps the bare action.phone_screenshotis described as instant right after an observed action.Daemon
WdaClient::settled_frame.GET /agent/screenshotreturns the kept frame with no WDA capture while nothing was sent since and the frame is under 30 s old. The response carriesX-Screenshot-Source: settled-after-action. The wireframe andmax_sidestill apply.?fresh=1always captures, andraw=1always goes to WDA.Tests
the_settled_screen_answers_the_next_screenshot_without_a_capture: zero captures after an observed action;fresh=1captures; an action sent in between invalidates the frame.Hardware validation will run once the phone is free (the local daemon is on #133 right now). I'll add the numbers here: tap with observe, then
phone_screenshotlatency, cached vs fresh.