Agent Zero AI framework
Pin Docker desktop package versions
Alessandrod52a1692c139
diff --git a/docker/run/AGENTS.md b/docker/run/AGENTS.mdindex bc07f5f5a..65b4c5ce9 100644--- a/docker/run/AGENTS.md+++ b/docker/run/AGENTS.md@@ -19,6 +19,7 @@- `BRANCH` is required for branch-based Docker builds.- Preserve exposed ports for SSH, HTTP, and tunneled services unless docs and workflows are updated together.- Keep the two-runtime Python model aligned with the root contract.+- Keep runtime desktop packages on `kali-last-snapshot`; pin the verified Python 3.13-compatible LibreOffice and Xpra versions in `fs/ins/install_additional.sh` for both published architectures.- Do not bake secrets, local `.env` values, or user data into the image.- Runtime startup must ensure `/a0/usr/uploads` exists before supervised services start.- Runtime startup raises the soft open-file limit toward `A0_NOFILE_LIMIT` (default `65535`) before supervisord starts, bounded by the container hard limit.diff --git a/docker/run/fs/ins/install_additional.sh b/docker/run/fs/ins/install_additional.shindex 257247d17..36c99c909 100644--- a/docker/run/fs/ins/install_additional.sh+++ b/docker/run/fs/ins/install_additional.sh@@ -12,80 +12,49 @@ if ! command -v apt-get >/dev/null 2>&1; thenexit 0fi-XPRA_PACKAGES=(xpra xpra-x11 xpra-html5)+KALI_SUITE="kali-last-snapshot"+LIBREOFFICE_VERSION="4:26.2.4.2-1"+XPRA_VERSION="6.5.2-r0-1"+arch="$(dpkg --print-architecture)"-install_xpra_repo() {- local os_id=""- local codename=""- local uri="https://xpra.org"- local suite="trixie"- local arch-- arch="$(dpkg --print-architecture 2>/dev/null || echo amd64)"-- if [ -r /etc/os-release ]; then- # shellcheck disable=SC1091- . /etc/os-release- os_id="${ID:-}"- codename="${VERSION_CODENAME:-}"- fi-- if [ "$os_id" = "kali" ]; then- uri="https://xpra.org/beta"- suite="sid"- elif [ "$codename" = "sid" ] || [ "$codename" = "forky" ]; then- uri="https://xpra.org/beta"- suite="$codename"- elif [ -n "$codename" ]; then- suite="$codename"- fi-- apt-get update- DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget- configure_xpra_repo "$uri" "$suite" "$arch"- apt-get update-- if ! xpra_install_check; then- echo "xpra packages are not installable from ${uri} ${suite} for ${arch}; falling back to https://xpra.org trixie"- XPRA_PACKAGES=(xpra-server xpra-x11 xpra-html5)- configure_xpra_repo "https://xpra.org" "trixie" "$arch"- apt-get update- if ! xpra_install_check; then- cat /tmp/xpra-install-check.log- exit 1- fi- fi-}+XPRA_HTML5_VERSION="19-r1-1"+if [ "$arch" = "arm64" ]; then+ XPRA_HTML5_VERSION="21-r1-1"+fi-xpra_install_check() {- DEBIAN_FRONTEND=noninteractive apt-get install -s --no-install-recommends "${XPRA_PACKAGES[@]}" >/tmp/xpra-install-check.log 2>&1-}+LIBREOFFICE_PACKAGES=(+ "libreoffice-core=$LIBREOFFICE_VERSION"+ "libreoffice-writer=$LIBREOFFICE_VERSION"+ "libreoffice-calc=$LIBREOFFICE_VERSION"+ "libreoffice-impress=$LIBREOFFICE_VERSION"+ "libreoffice-gtk3=$LIBREOFFICE_VERSION"+ "python3-uno=$LIBREOFFICE_VERSION"+)+XPRA_PACKAGES=(+ "xpra-common=$XPRA_VERSION"+ "xpra-server=$XPRA_VERSION"+ "xpra-x11=$XPRA_VERSION"+ "xpra-html5=$XPRA_HTML5_VERSION"+)-configure_xpra_repo() {- local uri="$1"- local suite="$2"- local arch="$3"+for source in /etc/apt/sources.list /etc/apt/sources.list.d/kali.sources; do+ [ ! -f "$source" ] || sed -i "s/kali-rolling/$KALI_SUITE/g" "$source"+done- wget -O /usr/share/keyrings/xpra.asc https://xpra.org/xpra.asc- cat >/etc/apt/sources.list.d/xpra.sources <<EOF+apt-get update+DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget+wget -O /usr/share/keyrings/xpra.asc https://xpra.org/xpra.asc+cat >/etc/apt/sources.list.d/xpra.sources <<EOFTypes: deb-URIs: ${uri}-Suites: ${suite}+URIs: https://xpra.org+Suites: trixieComponents: mainSigned-By: /usr/share/keyrings/xpra.asc-Architectures: ${arch}+Architectures: $archEOF-}--install_xpra_repoapt-get updateDEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \- libreoffice-core \- libreoffice-writer \- libreoffice-calc \- libreoffice-impress \- libreoffice-gtk3 \- python3-uno \+ "${LIBREOFFICE_PACKAGES[@]}" \"${XPRA_PACKAGES[@]}" \xfce4-session \xfwm4 \diff --git a/tests/test_browser_agent_regressions.py b/tests/test_browser_agent_regressions.pyindex 4bece6f9d..fa1687861 100644--- a/tests/test_browser_agent_regressions.py+++ b/tests/test_browser_agent_regressions.py@@ -2356,10 +2356,25 @@ def test_browser_docker_installs_full_chromium_to_tmp_cache():assert '"windowState": "fullscreen"' not in runtimeassert "self.interactive_view.ensure_display()" in runtimeassert " xvfb \\" in install_additional- assert "XPRA_PACKAGES=(xpra xpra-x11 xpra-html5)" in install_additionalassert " xdotool \\" in install_additional+def test_browser_docker_pins_python_313_compatible_desktop_packages():+ install_additional = (+ PROJECT_ROOT / "docker" / "run" / "fs" / "ins" / "install_additional.sh"+ ).read_text(encoding="utf-8")++ assert 'KALI_SUITE="kali-last-snapshot"' in install_additional+ assert 'LIBREOFFICE_VERSION="4:26.2.4.2-1"' in install_additional+ assert 'XPRA_VERSION="6.5.2-r0-1"' in install_additional+ assert 'XPRA_HTML5_VERSION="19-r1-1"' in install_additional+ assert 'XPRA_HTML5_VERSION="21-r1-1"' in install_additional+ assert '"python3-uno=$LIBREOFFICE_VERSION"' in install_additional+ assert '"xpra-server=$XPRA_VERSION"' in install_additional+ assert '"xpra-html5=$XPRA_HTML5_VERSION"' in install_additional+ assert "https://xpra.org/beta" not in install_additional++def test_browser_startup_migration_prepares_current_playwright_binary():extension = (PROJECT_ROOT