Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

12.9 KB
Raw Blame
{
  "schema_version": 1,
  "name": "linux",
  "aliases": [
    "cua-desktop-linux"
  ],
  "description": "Default recommended Spaces image: Ubuntu 24.04, XFCE on Xvfb :1, AT-SPI, headless PipeWire audio, Chromium, cua-spacesd (with the HTML5 viewer at /viewer), conformance fixtures. Tiers: slim (that, plus the cua CLI so an agent in a Space can make child Spaces), full (the default: slim plus developer tooling and Firefox) and docker (slim plus the Docker engine, a VM disk).",
  "repository": "ghcr.io/trycua/linux",
  "platforms": [
    "linux/amd64",
    "linux/arm64"
  ],
  "outputs": {
    "rootfs": {
      "tag_prefix": "docker-",
      "runtimes": [
        "docker",
        "gvisor"
      ],
      "init": "supervisord"
    },
    "containerdisk": {
      "tag_prefix": "",
      "runtimes": [
        "kubevirt",
        "qemu"
      ],
      "init": "systemd",
      "path": "/disk/disk.img",
      "firmware": {
        "amd64": [
          "bios",
          "efi"
        ],
        "arm64": [
          "efi"
        ]
      }
    }
  },
  "desktop": {
    "display": ":1",
    "resolution": "1280x800",
    "user": "cua",
    "uid": 1000,
    "runtime_dir": "/run/cua-desktop",
    "session_bus": "unix:path=/run/cua-desktop/bus"
  },
  "services": [
    {
      "name": "env",
      "port": 3211,
      "protocol": "grpc",
      "component": "cua-spacesd",
      "auth": "bearer token: CUA_ENV_TOKEN or /run/cua/env-token",
      "readiness": "tcp"
    },
    {
      "name": "viewer",
      "port": 3211,
      "protocol": "http",
      "component": "cua-spacesd",
      "readiness": "http:/viewer/"
    },
    {
      "name": "env-media",
      "port": 3212,
      "protocol": "udp",
      "component": "cua-spacesd"
    },
    {
      "name": "ssh",
      "port": 22,
      "protocol": "tcp",
      "variants": [
        "containerdisk"
      ]
    }
  ],
  "fixtures": {
    "root": "/opt/cua/fixtures",
    "launcher": "cua-fixtures start|stop|status [grid|form|http|tone|avsync|all]",
    "log_dir": "/tmp/cua-fixtures",
    "apps": [
      {
        "name": "grid",
        "title": "CUA Fixture Grid",
        "wm_class": "cua-fixture-grid",
        "color": "r=col*255//(cols-1), g=row*255//(rows-1), b=128; 8x6 cells of 80px"
      },
      {
        "name": "form",
        "title": "CUA Fixture Form",
        "wm_class": "cua-fixture-form",
        "a11y_names": [
          "Name",
          "Notes",
          "Subscribe",
          "Color",
          "Submit",
          "Status"
        ]
      },
      {
        "name": "http",
        "port": 18080,
        "routes": [
          "/",
          "/health",
          "/bytes/<n>",
          "POST /echo"
        ]
      },
      {
        "name": "tone",
        "path": "/opt/cua/fixtures/tone",
        "sequence_hz_ms": [
          [
            440,
            500
          ],
          [
            0,
            250
          ],
          [
            880,
            500
          ],
          [
            0,
            250
          ]
        ],
        "loop": true
      },
      {
        "name": "avsync",
        "title": "CUA Fixture AV Sync",
        "wm_class": "cua-fixture-avsync",
        "period_s": 1,
        "flash_ms": 100,
        "beep_hz": 1000,
        "skew_budget_ms": 40
      }
    ],
    "audio_probe": "/opt/cua/fixtures/audio_probe.py --source <pulse source> --seconds N --freq F..."
  },
  "audio": {
    "server": "pipewire + wireplumber + pipewire-pulse",
    "runtime_dir": "/run/cua-desktop",
    "default_sink": "cua_desktop",
    "desktop_capture": "cua_desktop.monitor",
    "default_source": "cua_mic",
    "uplink_input_sink": "cua_mic_in",
    "format": "48000 Hz stereo"
  },
  "claims": {
    "_doc": "What the image promises; cua-image-manifest turns this into /etc/cua-image/manifest.json and cua-spacesd doctor checks it (claimed = required).",
    "features_required": [
      "pty",
      "fs_watch",
      "tunnel.forward",
      "driver",
      "a11y",
      "background_input",
      "desktop_stream",
      "window_stream",
      "h264_sw",
      "quic_media",
      "windows",
      "launch_app",
      "clipboard.text",
      "presence",
      "presence.cursor_shape",
      "audio.desktop",
      "audio.uplink",
      "audio.opus",
      "process.exec_ledger",
      "spawn"
    ],
    "features_optional": [
      "hotspot",
      "exit",
      "host_ports",
      "process.services",
      "relay_attach",
      "h264_hw",
      "audio.per_app",
      "clipboard.files",
      "clipboard.image",
      "teleport.*",
      "volume.mount",
      "process.exec_ledger",
      "files.multipart",
      "fs.run_as",
      "fs.xattr",
      "process.run_as",
      "volume.binds"
    ],
    "feature_attributes": {
      "presence.cursor_shape": {
        "hit_test": "atspi",
        "system": "xfixes",
        "probe": "xtest"
      }
    },
    "codecs_required": [
      "openh264"
    ],
    "auth_modes": [
      "local",
      "pod-secret",
      "kubevirt-bridge"
    ],
    "units": {
      "supervisord": [
        "dbus-system",
        "desktop",
        "audio",
        "cua-env-token-sync",
        "cua-spacesd"
      ],
      "systemd": [
        "cua-desktop.service",
        "cua-audio.service",
        "cua-env-token-sync.service",
        "cua-spacesd.service"
      ]
    },
    "unit_processes": {
      "dbus-system": "dbus-daemon --system",
      "desktop": "Xvfb",
      "audio": "pipewire",
      "cua-env-token-sync": "token-sync",
      "cua-spacesd": "cua-spacesd"
    },
    "compat_links": [
      {
        "path": "/usr/local/bin/cua-env-driver",
        "target": "cua-spacesd"
      },
      {
        "path": "/usr/local/bin/cua-guestd",
        "target": "cua-spacesd"
      },
      {
        "path": "/opt/cua/bin/start-env-driver.sh",
        "target": "start-spacesd.sh"
      },
      {
        "path": "/opt/cua/bin/start-guestd.sh",
        "target": "start-spacesd.sh"
      },
      {
        "path": "/etc/cua-image/env-driver-source",
        "target": "spacesd-source"
      },
      {
        "path": "/etc/cua-image/guestd-source",
        "target": "spacesd-source"
      },
      {
        "unit_alias": "cua-env-driver.service",
        "unit": "cua-spacesd.service"
      },
      {
        "unit_alias": "cua-guestd.service",
        "unit": "cua-spacesd.service"
      }
    ],
    "apps": {
      "chromium": [
        "/usr/lib/chromium/chromium",
        "--version"
      ],
      "python3": [
        "python3",
        "--version"
      ]
    },
    "launch_app": {
      "app": "/opt/cua/bin/cua-chromium",
      "args": [
        "--no-first-run",
        "--no-default-browser-check",
        "--new-window",
        "about:blank"
      ],
      "window_match": "Chromium",
      "timeout_s": 60
    },
    "parity_expected_diff": [
      "kernel",
      "runtime",
      "init",
      "cpu_model",
      "cpu_count",
      "memory_mib",
      "clock_skew_ms",
      "gpu",
      "encoder"
    ],
    "resources": {
      "min_disk_gib": 2,
      "min_shm_mib": 256,
      "min_memory_mib": 1024
    },
    "tz": "Etc/UTC",
    "locale": "C.UTF-8",
    "dns_probe": "archive.ubuntu.com",
    "av_skew_budget_ms": {
      "container": 40,
      "gvisor": 80,
      "vm": 40
    }
  },
  "default_tier": "full",
  "tiers": {
    "slim": {
      "description": "The minimum for cua-spacesd doctor --strict with every feature: the desktop, audio, Chromium, cua-spacesd, the fixtures, and the cua CLI (a spawn-capable cua-spacesd plus `cua spaces create|ls|delete` reach the Space's own spawn channel, so an agent in the Space can make child Spaces). No Firefox, no developer tooling.",
      "claims": {
        "tools": {
          "cua": {
            "argv": [
              "cua",
              "--version"
            ],
            "expect": "^cua [0-9]"
          }
        }
      }
    },
    "docker": {
      "from": "slim",
      "description": "slim plus the Docker engine (docker-ce, containerd, the compose and buildx plugins, iptables) for VMs that run Docker Compose stacks: dockerd starts at boot and overlay and br_netfilter are loaded. Published as a VM disk (24.04-docker-disk); its rootfs never starts dockerd. iptables is checked in the VM by the tier's own gate (smoke-docker-vm.sh): a container's iptables depends on the runtime (gVisor has no nf_tables).",
      "claims": {
        "tools": {
          "docker": {
            "argv": [
              "docker",
              "--version"
            ],
            "expect": "^Docker version 29\\."
          },
          "docker-compose": {
            "argv": [
              "docker-compose",
              "version"
            ],
            "expect": "^Docker Compose version v5\\."
          },
          "containerd": {
            "argv": [
              "containerd",
              "--version"
            ],
            "expect": "^containerd "
          }
        }
      }
    },
    "full": {
      "from": "slim",
      "description": "slim plus developer tooling (build-essential, cmake, ninja, git, git-lfs, gh, jq, ripgrep, fd, Node LTS with pnpm, python3 with uv, rustup stable, Go, the Docker CLI) and Firefox. The default.",
      "claims": {
        "apps": {
          "firefox": [
            "firefox",
            "--version"
          ]
        },
        "tools": {
          "gcc": {
            "argv": [
              "gcc",
              "--version"
            ],
            "expect": "^gcc .* 13\\."
          },
          "make": {
            "argv": [
              "make",
              "--version"
            ],
            "expect": "^GNU Make 4\\."
          },
          "cmake": {
            "argv": [
              "cmake",
              "--version"
            ],
            "expect": "^cmake version 3\\."
          },
          "ninja": {
            "argv": [
              "ninja",
              "--version"
            ],
            "expect": "^1\\."
          },
          "pkg-config": {
            "argv": [
              "pkg-config",
              "--version"
            ],
            "expect": "^[0-9]"
          },
          "git": {
            "argv": [
              "git",
              "--version"
            ],
            "expect": "^git version 2\\."
          },
          "git-lfs": {
            "argv": [
              "git-lfs",
              "--version"
            ],
            "expect": "^git-lfs/3\\."
          },
          "gh": {
            "argv": [
              "gh",
              "--version"
            ],
            "expect": "^gh version 2\\.101\\.0 "
          },
          "jq": {
            "argv": [
              "jq",
              "--version"
            ],
            "expect": "^jq-1\\.7"
          },
          "ripgrep": {
            "argv": [
              "rg",
              "--version"
            ],
            "expect": "^ripgrep 14\\."
          },
          "fd": {
            "argv": [
              "fd",
              "--version"
            ],
            "expect": "^fd(find)? [0-9]"
          },
          "curl": {
            "argv": [
              "/bin/sh",
              "-c",
              "curl --version | cut -d' ' -f1-2"
            ],
            "expect": "^curl 8\\."
          },
          "zip": {
            "argv": [
              "/bin/sh",
              "-c",
              "zip -v | sed -n 2p"
            ],
            "expect": "Zip 3\\.0"
          },
          "unzip": {
            "argv": [
              "unzip",
              "-v"
            ],
            "expect": "^UnZip 6\\."
          },
          "node": {
            "argv": [
              "node",
              "--version"
            ],
            "expect": "^v24\\.21\\.0$"
          },
          "pnpm": {
            "argv": [
              "pnpm",
              "--version"
            ],
            "expect": "^12\\.6\\.0$"
          },
          "python3": {
            "argv": [
              "python3",
              "--version"
            ],
            "expect": "^Python 3\\.12\\."
          },
          "uv": {
            "argv": [
              "uv",
              "--version"
            ],
            "expect": "^uv 0\\.12\\.19"
          },
          "rustup": {
            "argv": [
              "rustup",
              "--version"
            ],
            "expect": "^rustup 1\\.29\\.1"
          },
          "rustc": {
            "argv": [
              "rustc",
              "--version"
            ],
            "expect": "^rustc 1\\.98\\.1 "
          },
          "cargo": {
            "argv": [
              "cargo",
              "--version"
            ],
            "expect": "^cargo 1\\.98\\.1 "
          },
          "go": {
            "argv": [
              "go",
              "version"
            ],
            "expect": "^go version go1\\.27\\.1 "
          },
          "docker": {
            "argv": [
              "docker",
              "--version"
            ],
            "expect": "^Docker version 29\\.8\\.1,"
          }
        },
        "resources": {
          "min_disk_gib": 6
        }
      }
    }
  }
}