Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
#!/usr/bin/env python3
# SPDX-License-Identifier: FSL-1.1-MIT
# Copyright (c) 2026 Cua AI, Inc.
"""Writes the Cua Spaces menu bar and onboarding marks from the Cua mark.
The app / Dock icon (the terracotta koala keycap) is not drawn here:
apps/cua-spaces-macos/scripts/dmg-art/render.sh builds it into
src-tauri/icons/app-icon.png and the icon set beside it.
- src-tauri/icons/tray-template.svg: the menu bar item, the same stack as a
black-on-transparent template image (macOS tints it).
- ../cua-spaces-macos/Sources/CuaSpacesMacKit/Resources/stack-mark.svg: the
SwiftUI app's onboarding mark, the white Cua mark in three stacked,
overlapping rounded squares. (That app's bundle also copies
tray-template*.png from src-tauri/icons.)
Then rasterize (resvg, via the Tauri CLI), from apps/cua-spaces:
python3 scripts/icons/gen-icon-svgs.py
pnpm tauri icon src-tauri/icons/tray-template.svg -o <tmp> -p 18 -p 36
# copy <tmp>/18x18.png and 36x36.png to tray-template.png / [email protected]
"""
import pathlib
import re
HERE = pathlib.Path(__file__).resolve().parent
APP = HERE.parent.parent
MARK = APP / "src/assets/brand/cua-mark-white.svg"
ICONS = APP / "src-tauri/icons"
MARK_VIEW = "0 0 1117.09 1117.09"
paths = re.findall(r'\sd="([^"]+)"', MARK.read_text(), re.S)
assert paths, "no paths in the Cua mark"
def mark(x, y, size, fill):
body = "".join(f'<path d="{" ".join(d.split())}"/>' for d in paths)
return (f'<svg x="{x:g}" y="{y:g}" width="{size:g}" height="{size:g}" viewBox="{MARK_VIEW}">'
f'<g fill="{fill}">{body}</g></svg>')
# The SpacesStackMark geometry (SIDE 84, RADIUS 20, LOGO 50, offsets 0/18/36).
SIDE, RADIUS, LOGO, OFFSETS = 84, 20, 50, (0, 18, 36)
def stack_mark():
s = 2.4
side, r, logo = SIDE * s, RADIUS * s, LOGO * s
extent = side + OFFSETS[-1] * s
fills = ("#3a3d45", "#4d515a", "#626772")
out = [f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="-12 -12 {extent + 24:g} {extent + 24:g}">',
"<!-- Generated by apps/cua-spaces/scripts/icons/gen-icon-svgs.py; edit that, not this. -->"]
for i, off in enumerate(OFFSETS):
x = y = off * s
out.append(f'<rect x="{x:g}" y="{y:g}" width="{side:g}" height="{side:g}" rx="{r:g}" '
f'fill="{fills[i]}" stroke="#ffffff" stroke-opacity=".14" stroke-width="1.5"/>')
out.append(mark(x + (side - logo) / 2, y + (side - logo) / 2, logo, "#ffffff"))
out.append("</svg>")
return "\n".join(out) + "\n"
def tray_icon():
# 36 x 36 canvas (18 pt @2x). Each square cuts a gap into the one behind
# it, and the front square cuts out the mark, so it reads at 18 pt.
side, r, gap, logo = 22.0, 5.5, 1.6, 15.5
offs = (1.0, 7.0, 13.0)
out = ['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">',
"<!-- Generated by scripts/icons/gen-icon-svgs.py; edit that, not this. -->",
"<defs>"]
for i in range(2):
n = offs[i + 1]
out.append(f'<mask id="m{i}" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36">'
'<rect width="36" height="36" fill="#fff"/>'
f'<rect x="{n - gap:g}" y="{n - gap:g}" width="{side + 2 * gap:g}" height="{side + 2 * gap:g}" '
f'rx="{r + gap:g}" fill="#000"/></mask>')
f = offs[2]
out.append('<mask id="m2" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36">'
'<rect width="36" height="36" fill="#fff"/>'
+ mark(f + (side - logo) / 2, f + (side - logo) / 2 + 0.5, logo, "#000") + "</mask>")
out.append("</defs>")
for i, o in enumerate(offs):
out.append(f'<rect x="{o:g}" y="{o:g}" width="{side:g}" height="{side:g}" rx="{r:g}" fill="#000" mask="url(#m{i})"/>')
out.append("</svg>")
return "\n".join(out) + "\n"
(ICONS / "tray-template.svg").write_text(tray_icon())
MAC = APP.parent / "cua-spaces-macos/Sources/CuaSpacesMacKit/Resources"
if MAC.is_dir():
(MAC / "stack-mark.svg").write_text(stack_mark())
print("wrote", ICONS / "tray-template.svg", "and", MAC / "stack-mark.svg")