From 30b5cab808ed4419296ba6bb04addeec16cedfb5 Mon Sep 17 00:00:00 2001 From: Robert Helewka Date: Thu, 28 May 2026 13:30:17 -0400 Subject: [PATCH] feat(rommie): add JPEG quality and size cap for get_screenshot - Add ROMMIE_SCREENSHOT_JPEG_QUALITY and ROMMIE_SCREENSHOT_MAX_KB env vars to control parent-agent screenshot output encoding and size limit - Configure defaults (quality 80, 512KB cap) in caliban.incus host vars - Trigger rommie service restart when .env file changes --- ansible/inventory/host_vars/caliban.incus.yml | 3 +++ ansible/rommie/.env.j2 | 7 +++++++ ansible/rommie/deploy.yml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/ansible/inventory/host_vars/caliban.incus.yml b/ansible/inventory/host_vars/caliban.incus.yml index 4b773f7..0ad8bba 100644 --- a/ansible/inventory/host_vars/caliban.incus.yml +++ b/ansible/inventory/host_vars/caliban.incus.yml @@ -32,6 +32,9 @@ rommie_ground_url: "http://pan.helu.ca:22076" rommie_ground_model: "UI-TARS-7B-DPO-Q6_K_L.gguf" rommie_grounding_width: 1024 rommie_grounding_height: 1024 +# get_screenshot output for the parent agent (Agent S autonomous capture unaffected) +rommie_screenshot_jpeg_quality: 80 +rommie_screenshot_max_kb: 512 # FreeCAD Robust MCP Server Configuration freecad_mcp_user: harper diff --git a/ansible/rommie/.env.j2 b/ansible/rommie/.env.j2 index 9ea08df..90f5e2b 100644 --- a/ansible/rommie/.env.j2 +++ b/ansible/rommie/.env.j2 @@ -30,3 +30,10 @@ ROMMIE_GROUNDING_HEIGHT={{ rommie_grounding_height | default(1024) }} ROMMIE_HOST={{ rommie_host | default('0.0.0.0') }} ROMMIE_PORT={{ rommie_port }} ROMMIE_ALLOWED_HOSTS={{ rommie_allowed_hosts }} + +# ============================================================================ +# get_screenshot (parent-agent) output +# JPEG-encode and refuse if over the cap (asks operator to lower RDP resolution) +# ============================================================================ +ROMMIE_SCREENSHOT_JPEG_QUALITY={{ rommie_screenshot_jpeg_quality | default(80) }} +ROMMIE_SCREENSHOT_MAX_KB={{ rommie_screenshot_max_kb | default(512) }} diff --git a/ansible/rommie/deploy.yml b/ansible/rommie/deploy.yml index cf4d1a4..e27f861 100644 --- a/ansible/rommie/deploy.yml +++ b/ansible/rommie/deploy.yml @@ -52,6 +52,8 @@ src: .env.j2 dest: "{{rommie_repo}}/.env" mode: '0600' + notify: + - Restart rommie - name: Deploy Rommie systemd service template: