AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
# AnyBot's own computer ("Bot 的電腦"): a Linux desktop the bots share, like the original's box
|
Bots click by number: every control on the screen is boxed and numbered, on every computer
A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates
from a picture, and the web tools' description told it they didn't work on its own computer.
- marks.rs: the picture a bot gets has every button, link, field and menu item boxed and
numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click /
typing / scroll / mouse_move take the number (ref) and land on the control's centre.
- Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's
computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's
box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets
no number (topmost window at its centre must be the app's; the Dock's invisible full-screen
window doesn't count). open_app waits until the app is really in front.
- No going round in circles: a step that changed nothing says so; the same step (clicks within
16 px) a third time in a turn comes with a warning, from the fourth time it isn't run.
- The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry
at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP,
renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look
(list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a
minute (files and logins stay); a new box is never made from an older image.
- Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the
per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt
says web work goes through browser_* by number, and never to read browser cookie or history
files.
Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new
image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed
into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on
TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28,
153 unit tests; Linux build + 157 tests + x11_live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
|
|
|
# (an X11 desktop driven by xdotool, watched through noVNC on port 6080). One TigerVNC server is
|
|
|
|
|
# the screen and the VNC server; AT-SPI is on, so every app's controls (web pages included) can
|
|
|
|
|
# be read with their places and numbered on the bot's picture (box/a11y, after XBot's box).
|
2026-11-16 02:55:05 +00:00
|
|
|
# The desktop is LazyBoy2's box (was fluxbox, a bare menu on a right click): a minimal XFCE
|
|
|
|
|
# (xfwm4 + xfdesktop + a panel with 應用程式, 瀏覽器, 終端機, the open windows and a clock),
|
|
|
|
|
# Arc-Dark + Papirus + jf open 粉圓, Traditional Chinese menus, Taipei time. Not on LazyBoy2's:
|
|
|
|
|
# 檔案管理員 (Thunar, with thumbnails), 文字編輯器 (Mousepad) and 影像檢視器 (Ristretto), so a
|
|
|
|
|
# file a bot made or downloaded opens with a double click.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
FROM debian:bookworm-slim
|
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model
Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before;
16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s.
Knowing the machine
- facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager,
tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the
instructions at the start of a turn.
- The box's sudo is the bot's: only what follows sudo is checked against the always-denied
list (it was refused outright, while the instructions said it could sudo), and commands with
sudo run as the box's root (setuid does nothing under gVisor).
- Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE /
ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one.
- Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run
outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do
shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the
sandbox broke says so, instead of looking like a broken program.
Reaching what it sees
- The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside
for the system's own), computer_use_zoom looks closer at full sharpness.
- Numbers stay with their controls from look to look (they were reassigned every look, so a
step's second click landed elsewhere); the box's front window is listed first; a control can
be named instead of numbered (name "4").
- Web page numbering walks open shadow DOM (Chromium settings, web components).
- A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry
without it came up with no network).
Working like a person
- Instructions: pick the route, know what done looks like, one route, check once, say what's
stuck instead of faking it with a substitute, ask before cutting the connection.
- StepPlan: the bot's model takes the first step, the step after trouble (failed, refused,
repeated, nothing changed on screen, the quick model switching routes), one in four, and the
final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does
the planned steps in between, falling back to the bot's model if it can't be used.
- Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does
them again with no model in between, finding each control again, handing back on a mismatch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
|
|
|
# No TZ here: a TZ variable overrides /etc/localtime for every program, so setting the timezone
|
2026-11-16 02:55:05 +00:00
|
|
|
# the normal way (/etc/localtime, /etc/timezone) seemed to do nothing. /etc/localtime is Taipei.
|
Bots work like someone who knows the computer: they know each machine, reach what they see, plan, and hand the planned steps to a quick model
Measured on the bot's own box (8 tasks x 2, grok-4.7): 14/16 done, 120 steps, 1114 s before;
16/16, 102 steps, 574 s after (model time 1015 -> 471 s). A replayed skill: 49 s -> 15 s.
Knowing the machine
- facts.rs: 電腦現況 per computer (system, desktop, systemd, sudo, network, package manager,
tools, apps, a fixed TZ), read once by a small read-only probe, kept 30 min, in the
instructions at the start of a turn.
- The box's sudo is the bot's: only what follows sudo is checked against the always-denied
list (it was refused outright, while the instructions said it could sudo), and commands with
sudo run as the box's root (setuid does nothing under gVisor).
- Box image v8 drops ENV TZ=UTC (it overrode /etc/localtime). ANYBOT_BOX_IMAGE /
ANYBOT_BOX_VOLUME give a throwaway box its own image and volume, never adopting the real one.
- Mac shell sandbox: App Store app CLIs (they carry their own app sandbox) and ps/top run
outside it; plain `osascript -e` too, asked the first time even in direct mode, refusing do
shell script, terminals, keystrokes, file reads, ObjC and the secret folders. A command the
sandbox broke says so, instead of looking like a broken program.
Reaching what it sees
- The Mac menu bar's status icons are numbered (each app's AXExtrasMenuBar, named from inside
for the system's own), computer_use_zoom looks closer at full sharpness.
- Numbers stay with their controls from look to look (they were reassigned every look, so a
step's second click landed elsewhere); the box's front window is listed first; a control can
be named instead of numbered (name "4").
- Web page numbering walks open shadow DOM (Chromium settings, web components).
- A box on a Docker host elsewhere retries the next port when the usual one is taken (a retry
without it came up with no network).
Working like a person
- Instructions: pick the route, know what done looks like, one route, check once, say what's
stuck instead of faking it with a substitute, ask before cutting the connection.
- StepPlan: the bot's model takes the first step, the step after trouble (failed, refused,
repeated, nothing changed on screen, the quick model switching routes), one in four, and the
final check; a quick model (Bot.step_model, auto: grok-4.20-0309-non-reasoning on xAI) does
the planned steps in between, falling back to the bot's model if it can't be used.
- Skills keep the steps that worked (with what each acted on, not numbers); replay_skill does
them again with no model in between, finding each control again, handing back on a mismatch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha5F5gJt93t3yEx3XcS
2026-11-09 01:01:03 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
|
2026-11-16 02:55:05 +00:00
|
|
|
# dpkg never unpacks docs, man pages or other languages' messages (zh_TW is kept: the XFCE menus
|
|
|
|
|
# are in Traditional Chinese).
|
|
|
|
|
RUN printf '%s\n' \
|
|
|
|
|
'path-exclude=/usr/share/doc/*' \
|
|
|
|
|
'path-include=/usr/share/doc/*/copyright' \
|
|
|
|
|
'path-exclude=/usr/share/man/*' \
|
|
|
|
|
'path-exclude=/usr/share/info/*' \
|
|
|
|
|
'path-exclude=/usr/share/gtk-doc/*' \
|
|
|
|
|
'path-exclude=/usr/share/backgrounds/*' \
|
|
|
|
|
'path-exclude=/usr/share/locale/*' \
|
|
|
|
|
'path-include=/usr/share/locale/locale.alias' \
|
|
|
|
|
'path-include=/usr/share/locale/zh_TW/*' \
|
|
|
|
|
'path-include=/usr/share/locale/zh/*' \
|
|
|
|
|
> /etc/dpkg/dpkg.cfg.d/zz-anybot-slim \
|
|
|
|
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
tigervnc-standalone-server tigervnc-tools xdotool x11-utils x11-xserver-utils imagemagick xterm \
|
|
|
|
|
dbus-x11 xfconf xfce4-panel xfwm4 xfdesktop4 xfce4-settings xfce4-terminal \
|
|
|
|
|
thunar tumbler mousepad ristretto xdg-utils \
|
|
|
|
|
arc-theme papirus-icon-theme adwaita-icon-theme gnome-themes-extra librsvg2-common \
|
Bots click by number: every control on the screen is boxed and numbered, on every computer
A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates
from a picture, and the web tools' description told it they didn't work on its own computer.
- marks.rs: the picture a bot gets has every button, link, field and menu item boxed and
numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click /
typing / scroll / mouse_move take the number (ref) and land on the control's centre.
- Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's
computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's
box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets
no number (topmost window at its centre must be the app's; the Dock's invisible full-screen
window doesn't count). open_app waits until the app is really in front.
- No going round in circles: a step that changed nothing says so; the same step (clicks within
16 px) a third time in a turn comes with a warning, from the fourth time it isn't run.
- The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry
at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP,
renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look
(list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a
minute (files and logins stay); a new box is never made from an older image.
- Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the
per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt
says web work goes through browser_* by number, and never to read browser cookie or history
files.
Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new
image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed
into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on
TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28,
153 unit tests; Linux build + 157 tests + x11_live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
|
|
|
at-spi2-core libatk-adaptor python3-gi gir1.2-atspi-2.0 libglib2.0-bin gsettings-desktop-schemas dconf-gsettings-backend \
|
2026-11-16 02:55:05 +00:00
|
|
|
novnc python3-websockify chromium chromium-l10n fonts-dejavu-core fonts-liberation fonts-noto-cjk fonts-noto-color-emoji \
|
|
|
|
|
locales tzdata \
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
ca-certificates curl wget git jq unzip zip less nano vim-tiny procps psmisc \
|
2026-11-16 02:55:05 +00:00
|
|
|
python3 python3-pip python3-venv nodejs npm sudo tini xclip poppler-utils \
|
|
|
|
|
&& echo "zh_TW.UTF-8 UTF-8" >> /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen \
|
|
|
|
|
&& ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime && echo "Asia/Taipei" > /etc/timezone \
|
|
|
|
|
&& rm -rf /usr/share/icons/ePapirus /usr/share/icons/ePapirus-Dark /usr/share/icons/Papirus-Light \
|
|
|
|
|
&& test -e /usr/share/icons/Papirus-Dark/48x48/apps/web-browser.svg \
|
|
|
|
|
&& test -d /usr/share/themes/Arc-Dark/xfwm4 \
|
|
|
|
|
&& test -f /usr/share/locale/zh_TW/LC_MESSAGES/xfce4-panel.mo \
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
|
|
|
|
&& useradd -m -s /bin/bash bot && echo 'bot ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/bot \
|
|
|
|
|
&& ln -sf /usr/share/novnc/vnc.html /usr/share/novnc/index.html
|
2026-11-16 02:55:05 +00:00
|
|
|
# jf open 粉圓 (OFL) as the desktop's font, pinned like LazyBoy2's.
|
|
|
|
|
RUN mkdir -p /usr/share/fonts/truetype/huninn \
|
|
|
|
|
&& curl -fsSL https://github.com/justfont/open-huninn-font/releases/download/v2.1/jf-openhuninn-2.1.ttf \
|
|
|
|
|
-o /usr/share/fonts/truetype/huninn/jf-openhuninn-2.1.ttf \
|
|
|
|
|
&& echo '9d5bf4932d31fe94c18cd8cfddc98bc1b14ce10f4e354c682179db290a99c825 /usr/share/fonts/truetype/huninn/jf-openhuninn-2.1.ttf' | sha256sum -c \
|
|
|
|
|
&& fc-cache -f
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
COPY start.sh /usr/local/bin/anybot-box-start
|
Bots click by number: every control on the screen is boxed and numbered, on every computer
A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates
from a picture, and the web tools' description told it they didn't work on its own computer.
- marks.rs: the picture a bot gets has every button, link, field and menu item boxed and
numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click /
typing / scroll / mouse_move take the number (ref) and land on the control's centre.
- Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's
computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's
box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets
no number (topmost window at its centre must be the app's; the Dock's invisible full-screen
window doesn't count). open_app waits until the app is really in front.
- No going round in circles: a step that changed nothing says so; the same step (clicks within
16 px) a third time in a turn comes with a warning, from the fourth time it isn't run.
- The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry
at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP,
renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look
(list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a
minute (files and logins stay); a new box is never made from an older image.
- Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the
per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt
says web work goes through browser_* by number, and never to read browser cookie or history
files.
Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new
image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed
into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on
TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28,
153 unit tests; Linux build + 157 tests + x11_live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
|
|
|
COPY a11y /usr/local/bin/anybot-a11y
|
|
|
|
|
COPY browser /usr/local/bin/anybot-browser
|
2026-11-15 08:12:09 +00:00
|
|
|
COPY screen /usr/local/bin/anybot-screen
|
2026-11-16 02:55:05 +00:00
|
|
|
COPY terminal /usr/local/bin/anybot-terminal
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
COPY Xresources /etc/anybot/Xresources
|
2026-11-16 02:55:05 +00:00
|
|
|
COPY welcome.html /usr/share/anybot/welcome.html
|
|
|
|
|
COPY xfce/wallpaper.svg /usr/share/anybot/wallpaper.svg
|
|
|
|
|
COPY xfce/xfce4-panel.xml /usr/share/anybot/xfce-skel/xfce4-panel.xml
|
|
|
|
|
COPY xfce/xfwm4.xml /usr/share/anybot/xfce-skel/xfwm4.xml
|
|
|
|
|
COPY xfce/xfce4-desktop.xml /usr/share/anybot/xfce-skel/xfce4-desktop.xml
|
|
|
|
|
COPY xfce/helpers.rc /etc/xdg/xfce4/helpers.rc
|
|
|
|
|
COPY xfce/mimeapps.list /etc/xdg/mimeapps.list
|
|
|
|
|
COPY xfce/menu.xml /etc/xdg/menus/xfce-applications.menu
|
|
|
|
|
COPY xfce/xfce4-panel-lock.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
|
|
|
|
|
COPY xfce/helper-browser.desktop /usr/share/xfce4/helpers/anybot-browser.desktop
|
|
|
|
|
COPY xfce/helper-terminal.desktop /usr/share/xfce4/helpers/anybot-terminal.desktop
|
|
|
|
|
COPY xfce/browser.desktop /usr/share/applications/anybot-browser.desktop
|
|
|
|
|
COPY xfce/terminal.desktop /usr/share/applications/anybot-terminal.desktop
|
|
|
|
|
COPY fonts.conf /etc/fonts/conf.d/99-anybot-cjk.conf
|
|
|
|
|
COPY gtk3-settings.ini /etc/gtk-3.0/settings.ini
|
|
|
|
|
COPY licenses/huninn-OFL.txt /usr/share/licenses/huninn/OFL.txt
|
|
|
|
|
RUN chmod +x /usr/local/bin/anybot-box-start /usr/local/bin/anybot-a11y /usr/local/bin/anybot-browser /usr/local/bin/anybot-screen /usr/local/bin/anybot-terminal \
|
|
|
|
|
# The menu shows 瀏覽器 and 終端機 once each: anybot-browser is the one way to start Chromium
|
|
|
|
|
# (the same profile and DevTools port as the browser tools), anybot-terminal the terminal.
|
|
|
|
|
# (Into [Desktop Entry]: chromium.desktop ends with its actions, where an appended line went.)
|
|
|
|
|
&& for f in chromium xfce4-terminal debian-xterm debian-uxterm xterm uxterm; do \
|
|
|
|
|
if [ -f "/usr/share/applications/$f.desktop" ]; then sed -i '/^\[Desktop Entry\]/a NoDisplay=true' "/usr/share/applications/$f.desktop"; fi; \
|
|
|
|
|
done \
|
|
|
|
|
# The menu's names in plain words (檔案管理員, not 「Thunar 檔案管理員」); the build stops if a
|
|
|
|
|
# new Debian says them differently.
|
|
|
|
|
&& sed -i 's/^Name\[zh_TW\]=Thunar 檔案管理員$/Name[zh_TW]=檔案管理員/' /usr/share/applications/thunar.desktop \
|
|
|
|
|
&& sed -i 's/^Name\[zh_TW\]=Mousepad$/Name[zh_TW]=文字編輯器/' /usr/share/applications/org.xfce.mousepad.desktop \
|
|
|
|
|
&& sed -i 's/^Name\[zh_TW\]=Ristretto 影像檢視器$/Name[zh_TW]=影像檢視器/' /usr/share/applications/org.xfce.ristretto.desktop \
|
|
|
|
|
&& grep -qx 'Name\[zh_TW\]=檔案管理員' /usr/share/applications/thunar.desktop \
|
|
|
|
|
&& grep -qx 'Name\[zh_TW\]=文字編輯器' /usr/share/applications/org.xfce.mousepad.desktop \
|
|
|
|
|
&& grep -qx 'Name\[zh_TW\]=影像檢視器' /usr/share/applications/org.xfce.ristretto.desktop \
|
|
|
|
|
# (Which program opens what: /etc/xdg/mimeapps.list; the browser's file says it takes web pages and PDFs.)
|
|
|
|
|
&& { ! command -v update-desktop-database >/dev/null || update-desktop-database -q /usr/share/applications; } \
|
Bot 的電腦 can run under gVisor: its own kernel, Chromium's sandbox back on
容器隔離 in 設定 › 電腦: standard (runc, the container is the only wall, Chromium runs
--no-sandbox) or hardened (runsc: a virtualized kernel, all capabilities dropped but the few
the desktop needs, ANYBOT_BOX_SANDBOX=1 turns Chromium's own sandbox back on). Box image v7.
deploy/mac/gvisor-vm.sh makes a Lima VM with Docker + gVisor for a Mac (started at login),
gvisor-migrate.sh moves the box's files and logins there.
Checked and finished before committing:
- the hardened choice is offered only on a Docker host that has runsc; a box set to it on a
host without it opens the standard way and says so (it used to not start at all)
- the settings row shows what the box really runs on, and when 更新 is needed
- no swap only under gVisor (a standard box keeps Docker's default)
- the migrate script sees the running Mac app ("AnyBot", not "anybot")
- the VM script starts an existing VM by name, checks runsc and the kernel from the Mac
- the version test says 7
Real run in the Lima VM: desktop, VNC, numbered controls, xdotool and screenshots work; no
Chromium process has --no-sandbox, renderers run with seccomp and their own namespaces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 16:03:25 +00:00
|
|
|
# Chromium has no sandbox inside a plain container (no user namespaces); the box itself is
|
|
|
|
|
# the sandbox. Under gVisor (容器隔離=runsc) the box has its own virtualized kernel and
|
|
|
|
|
# Chromium's sandbox works: AnyBot then starts the box with ANYBOT_BOX_SANDBOX=1 and the
|
|
|
|
|
# sandbox is switched back on (one more wall between a hostile web page and the machine).
|
|
|
|
|
# Debian's chromium wrapper reads these flags for every launch (menu, bots, xdg-open).
|
|
|
|
|
&& printf '%s\n' \
|
|
|
|
|
'if [ "${ANYBOT_BOX_SANDBOX:-0}" = 1 ]; then' \
|
|
|
|
|
' export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disable-dev-shm-usage --no-first-run --no-default-browser-check --disable-gpu --password-store=basic"' \
|
|
|
|
|
'else' \
|
|
|
|
|
' export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox --test-type --disable-dev-shm-usage --no-first-run --no-default-browser-check --disable-gpu --password-store=basic"' \
|
|
|
|
|
'fi' > /etc/chromium.d/anybot
|
Bots click by number: every control on the screen is boxed and numbered, on every computer
A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates
from a picture, and the web tools' description told it they didn't work on its own computer.
- marks.rs: the picture a bot gets has every button, link, field and menu item boxed and
numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click /
typing / scroll / mouse_move take the number (ref) and land on the control's centre.
- Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's
computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's
box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets
no number (topmost window at its centre must be the app's; the Dock's invisible full-screen
window doesn't count). open_app waits until the app is really in front.
- No going round in circles: a step that changed nothing says so; the same step (clicks within
16 px) a third time in a turn comes with a warning, from the fourth time it isn't run.
- The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry
at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP,
renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look
(list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a
minute (files and logins stay); a new box is never made from an older image.
- Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the
per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt
says web work goes through browser_* by number, and never to read browser cookie or history
files.
Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new
image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed
into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on
TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28,
153 unit tests; Linux build + 157 tests + x11_live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
|
|
|
# Accessibility on for every app, including those started over `docker exec`.
|
2026-11-09 04:53:06 +00:00
|
|
|
# gail too: GTK 2 apps (lxappearance, PCManFM, many older tools) offer no controls to AT-SPI
|
|
|
|
|
# without it — no numbers at all, only a picture to guess at. GTK 3 apps ignore it.
|
2026-11-16 02:55:05 +00:00
|
|
|
# Traditional Chinese for every program (menus, Chromium, a terminal's messages); LC_ALL stays
|
|
|
|
|
# unset, so one command can still ask for LANG=C.
|
|
|
|
|
ENV LANG=zh_TW.UTF-8 LANGUAGE=zh_TW:zh:en DISPLAY=:1 SCREEN_SIZE=1280x800x24 XDG_CURRENT_DESKTOP=XFCE GTK_MODULES=gail:atk-bridge GTK_A11Y=atspi GNOME_ACCESSIBILITY=1 NO_AT_BRIDGE=0
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
EXPOSE 6080
|
2026-11-16 02:55:05 +00:00
|
|
|
LABEL anybot.box.version="12"
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
|
|
|
CMD ["/usr/local/bin/anybot-box-start"]
|