Skip to content

feat(computers): run computers on the cli image and install Firefox with user_data - #484

Merged
edenreich merged 1 commit into
mainfrom
feat/computer-user-data
Nov 9, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/computer-user-data

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

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 in local_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:

  • installs Firefox ESR from Mozilla's apt repo
  • force-installs the opentask XPI through policies.json ExtensionSettings, with signature enforcement off through the Preferences policy (ESR honours it)
  • generates a token and hands it to opentask through 3rdparty.Extensions and to the computer's daemon through browser_use.yaml (port 52790)
  • autostarts Firefox

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_data is read from and written to daemon.yaml.
    • The local workspace runs ghcr.io/inference-gateway/computer:<installed infer version> with the default user data. of_installed_version is shared with the default CLI image.
    • Tests cover the image, the script and the round trip through daemon.yaml.
  • backend/src/local_cluster.rs: removes DESKTOP_BUILD, build_desktop_image, import_desktop_image and the TODO. provision no longer takes the infer version. The operator moves to v0.35.0, which boots user-data.
  • Frontend:
    • User data textarea #workspace-user-data in the workspace form.
    • WorkspaceConfig.user_data.
    • draftProblem asks for a #! script, with a test.
  • AGENTS.md: workspace-user-data joins the workspace form's DOM contract.
  • examples/computer-use:
    • desktop/ is gone. The workspace uses the published image.
    • workspace:register composes user_data from the app's script plus mock-scenarios.sh, which writes the scenarios that used to be baked in. It uses a yq merge, because assigning a new key inside load() does not stick under yq -i.
    • The operator moves to v0.35.0.
  • Docs: docs/agents.md and docs/browser-use.md ("On an agent's computer").

Verified:

  • Checks: the pre-commit hook passes (frontend build, cargo fmt/clippy/check/test: 265 passed). bun test passes. cargo test -p desktop-e2e passes.
  • Example registration: run against a scratch home for both the mock model and ollama_cloud/glm-5.3-flash.
  • End to end in Docker: this script on the computer image took about a minute to install. Firefox then opened maximized with a Firefox launcher on the taskbar, and the daemon logged browser extension attached. In that Firefox, opentask has its host permission and scripting.executeScript on example.com returned its title.
  • Not run: the macOS UI e2e suite.

Depends on

Merge after these are released:

…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.
@edenreich
edenreich marked this pull request as ready for review November 9, 2026 17:16
@edenreich
edenreich merged commit 71a8897 into main Nov 9, 2026
1 check passed
@edenreich
edenreich deleted the feat/computer-user-data branch November 9, 2026 19:00
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.61.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant