Repository navigation
feat(computers): run computers on the cli image and install Firefox with user_data - #484
Merged
Merged
Conversation
…ith user_data The local cluster's computers ran an image the app built on the user's machine: Xvfb, openbox and Firefox, so closing the browser left a black screen with nothing to click, and the image never had the opentask extension. Computers now run the CLI's published Ubuntu desktop, ghcr.io/inference-gateway/computer at the installed infer version, with a wallpaper and a taskbar, and the app no longer builds or imports an image. What a computer needs comes from its workspace's user data, a cloud-init script it runs as root when it boots. The local cluster's workspace starts with one that installs Firefox ESR, force-installs the opentask extension and configures it through Firefox's enterprise policy with a token it also writes to the computer's browser_use.yaml, so the extension connects to the daemon on its own and agents browse with the browser tools. Settings > Workspaces edits the user data (workspace-user-data), the local cluster installs operator v0.35.0, which boots user-data, and the computer-use example registers the same script plus its mock scenarios.
Contributor
|
🎉 This PR is included in version 0.61.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Closing the browser on a computer left a black screen. The image the app built locally was Ubuntu plus Xvfb, openbox and Firefox, so once Firefox exited the agent saw the bare X root window with nothing to click. That image also never had the opentask extension, so agents on a computer could only drive the browser pixel by pixel.
Computers now run the CLI's published Ubuntu desktop,
ghcr.io/inference-gateway/computer(inference-gateway/cli#1778), with a wallpaper and a taskbar. The app no longer builds or imports an image, which resolves the TODO inlocal_cluster.rs. What a computer needs comes from its workspace's User data: a cloud-init script it runs as root when it boots, the same contract a cloud VM or a later KubeVirt runtime takes.The local cluster's workspace starts with a script that:
policies.jsonExtensionSettings, with signature enforcement off through thePreferencespolicy (ESR honours it)3rdparty.Extensionsand to the computer's daemon throughbrowser_use.yaml(port 52790)The extension then attaches on its own, and agents use the browser tools. The user can edit the script in Settings > Workspaces to install Chrome or anything else.
Changes
backend/src/computer_user_data.sh: the default user data. Its steps are small named functions.backend/src/workspace_settings.rs:WorkspaceConfig.user_datais read from and written todaemon.yaml.ghcr.io/inference-gateway/computer:<installed infer version>with the default user data.of_installed_versionis shared with the default CLI image.daemon.yaml.backend/src/local_cluster.rs: removesDESKTOP_BUILD,build_desktop_image,import_desktop_imageand the TODO.provisionno longer takes the infer version. The operator moves to v0.35.0, which boots user-data.#workspace-user-datain the workspace form.WorkspaceConfig.user_data.draftProblemasks for a#!script, with a test.AGENTS.md:workspace-user-datajoins the workspace form's DOM contract.examples/computer-use:desktop/is gone. The workspace uses the published image.workspace:registercomposesuser_datafrom the app's script plusmock-scenarios.sh, which writes the scenarios that used to be baked in. It uses a yq merge, because assigning a new key insideload()does not stick underyq -i.docs/agents.mdanddocs/browser-use.md("On an agent's computer").Verified:
cargo fmt/clippy/check/test: 265 passed).bun testpasses.cargo test -p desktop-e2epasses.ollama_cloud/glm-5.3-flash.browser extension attached. In that Firefox, opentask has its host permission andscripting.executeScripton example.com returned its title.Depends on
Merge after these are released:
spec.userDatawith user namespaces. The local cluster installs v0.35.0.user_dataon workspaces.opentask-firefox.xpias a release asset, which the script downloads fromreleases/latest.