Repository navigation
Give each Bot its own files on a computer many Bots share - #846
Closed
guidovizoso wants to merge 1 commit into
Closed
guidovizoso wants to merge 1 commit into
guidovizoso wants to merge 1 commit into
Conversation
Collaborator
Author
|
Landed in #847. |
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.
What this changes
A computer that serves many Bots (Helm's default
computers.mode: shared, and the docker-composeagent-computerwhen there is no supervisor) kept browser profiles apart per Bot, but files and the shell shared one folder. A note one Bot saved was a file every other Bot could list and read.With
COMPUTER_SEPARATE_WORKSPACES=on, each Bot (the id inx-openbot-bot-id) getscomputers/<id>on the workspace volume. Its file tools stay inside that folder, and its shell starts there withHOMEpointing at it. The id goes through the same allow-list as profile directories (bot-id.ts).It is on for the Helm shared StatefulSet and the compose
agent-computer. It is off for computers that serve one Bot (supervisor, sandbox) and for the desktop's computer, so their files do not move. The all-in-one image passes the variable through, so turning it on there is opt-in.This keeps
sharedas Helm's default (it needs nothing installed in the cluster) and makes it safer to share. It is not isolation: a command can still read another Bot's folder.computers.mode: sandboxis still the answer for keeping people apart. Docs,values.yamland the changelog say so.When
COMPUTER_SCOPE(per-person/per-bot-per-person) lands, the server will send a computer key in place of the Bot id, and this split follows it.Where it runs
Maponly caches the file and shell helpers for a folder; it holds no state.Boundary and audit
Changelog
Unreleased: a new section, plus a "Before upgrading" item. Files saved before the upgrade stay at the root of the volume, where no Bot sees them. An operator moves them into a Bot's folder to give them back.Proof
agent-computer/tests/workspaces.test.ts: two Bots cannot see each other's files; a command's working directory andHOMEare the Bot's folder; with separation off, files stay where they were; an id that is not a plain name is refused.bun testinagent-computer: 436 pass, 55 skip, 0 fail.tsc --noEmitclean.helm templatewithci/self-hosted-values.yamlrendersCOMPUTER_SEPARATE_WORKSPACES: "on"on the computer StatefulSet.