Repository navigation
a Bot can be told to use its own screen on a computer it shares, and its clicks, keys, pages and fills land there - #383
Merged
Merged
Conversation
…its clicks, keys, pages and fills land there
…le, and the wire corpus records the screen
hexuria
added a commit
that referenced
this pull request
Oct 13, 2026
main already carries this branch's work as 1097916 (#383's squash) plus 9c0935a's (#385) follow-on — every Bot on a shared computer now gets a screen of its own without being asked — so the merge answers theirs everywhere. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #376 (server half). The box half is hexuria/box#40, merged and pinned here (
grok-box→c8ba740).Why
Bots that share a computer share its one screen, browser and keyboard. On 10 Oct, Bot A opened Facebook and Bot B's screen showed it. The owner chose this behaviour:
What
The choice:
botrowown-screenincomputer_sharing: the same row asper-bot(own computer), so a Bot can never have both. No store change.provision::screen_forreads it. It isSharedfor a computer of its own.provision::set_own_screenwrites it, refuses a computer of its own or a group, and on switching back stops the Bot's own screen (Computer::close_screen, i.e.box-screen down).per-bot, so it no longer wipes an own-screen choice.Screenon every screen call:opengrok_box::Screen { Shared, Own(bot) }is a parameter ofact,screenshot,screen_url,active_tab_url,focused_field,open_url,run_recipeanddevtools.Ownby runningbox-screen up <bot>, which is idempotent: a screen a restart stopped comes back on the next call. It then uses that display:GrokBox::on(":N"), the box-chromium env and the pipe env.screen_urladds the slot's viewer token, and the screen proxy dialswebsockify?token=sN._and-before any shell word is built.Where the screen comes from:
ToolContext::screenis a cell shared by the turn's copies, so a switch mid-turn applies to the next action.computer,open_urlandrun_recipe, the user-form fill, passkeys, the screenshot, the status (screen: "own" | "shared"), recipes and workflows.Passkeys: the pipe is held per (box, screen). Restarting the browser now stops that profile's Chromium only (
pkill -f --user-data-dir=<profile>). Before,pkill -x chromiumclosed every Bot's browser on the computer.Tool:
use_own_screen {own}is a new computer tool, in themanage_computerrow.Route:
PUT /coworkers/{id}/computer/screen {own}→{screen}, added to the route map.Crate ceilings (none raised):
opengrok-serverwas 5 lines under its ceiling, so pure box-side code moved toopengrok-box, unchanged in behaviour:viewer.rs: the viewer's port and path, the storage shim, the handshake read and the websocket dial;devtools::held: the pipe registry.opengrok-harnessstays at 8000 through theopengrok_box::Targetalias.Tests
a_bot_on_its_own_screen_works_there_while_the_others_stay_on_the_shared_one. Bea is switched on and her fill's actions are allOwn(bea); Ada's are allShared. Each computer reports its screen. Switching back stops Bea's screen, and a computer of its own gets a 409. Fails without the feature: withscreen_forforced toShared, it fails at Bea's screen.an_own_screen_is_read_from_box_screen(its answer, its refusal, an image withoutbox-screen),only_a_plain_bot_id_names_a_screen,the_socket_path_is_the_shared_screens_or_one_bots_token, anduse_own_screenreading incomputer_desk.-D warningsand the crate-size check. The full workspace run is left to CI, because the shared machine was too loaded to finish it here.