Repository navigation
feat(computer): take over a session's screen from the web terminal - #1699
Conversation
The take-over invariant lives in the computer context: the person claims the screen, drives it directly with frame-space inputs, and hands it back. The executor parks input actions on Held() until the hand-back, the panel unit answers screen_control and screen_input frames, and a take-over resolves the open Computer-call approval and queues the hand-back continue message. Daemon and web delivery relay both directions beside read_frame.
The Screen view's Take over button claims the session's screen: the image takes focus, pointer clicks, wheel and keys inside it POST to /screen/ and land on the worker's display in frame coordinates, the poll drops to 250 ms while held, and Done or a second Esc hands it back, which resets the poll and queues the agent's continue message. The page hands a closed tab's screen back fire-and-forget. The counterfeiter fake for the ScreenControl contract is generated and its domain listed among the mock sources.
…T route and relay
|
@infer CI is failing - can you fix this? |
|
Model: Todos
Pull Request✅ Infer Result: SuccessWorking tree is clean and everything is pushed. Closing out the todos. CI lint is fixed and pushed to PR #1699 (commit What was failingThe
What I changed
Verification
Commit: Not checked: I verified against the current state only; no re-review of the take-over feature itself beyond the lint scope. Risk: CI's golangci-lint is v2.14.0 vs my local v2.12.2 - the gci/gocyclo checks are config-driven and identical here, but if 2.14.0 adds new linter findings it could surface others on the next run. Model: Tokens: 1,082,755 in · 16,116 out · 1,098,871 total (22 requests) Tool calls: 36 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
…within the complexity cap
…held invariant - Build the screen control only when computer_use.enabled is set, so the POST /screen/ route cannot drive the host with computer use disabled. - Drive refuses an unheld screen with ErrScreenNotHeld and HandBack reports whether it released, so the panel no longer checks then acts. - The Screen view sends inputs one at a time in order, hands back when the view is hidden and adopts a hold another tab left behind. - Relay the input as raw JSON instead of a duplicate web.ScreenInput, and drop the defaults and checks the display dispatch already applies. - The daemon relay test uses the generated fake worker without a hand-written launcher or a sleep loop.
|
🎉 This PR is included in version 0.245.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #1697
Summary
The web terminal's Screen view gains a take-over mode shaped like the handoff in agent computer: the person claims the session's screen with a Take over button, drives it directly (pointer clicks, double click, wheel, typed text, key combos inside the image), and hands it back with Done (or Esc twice). The agent is held while the person holds the screen and resumes from a fresh screenshot of what the person left behind. The invariant - exactly one actor drives a screen at a time - lives in the computer context, and everything upstream stays a relay on the existing read_frame path, so a teleported session works unchanged.
Changes
Tests
Docs
Out of scope (per the issue)