fix(docker+brain): make container Chrome search work, harden, improve toggle
Addresses review findings on the dockerized stack: - Container Chrome search was dead: add --remote-debugging-port + a non-default --user-data-dir (Chrome 136+ refuses CDP on the default profile), add the playwright dep (browse-search.mjs connectOverCDP) with browser download skipped, and connect to 127.0.0.1 not "localhost" (container localhost -> ::1 while Chrome binds IPv4). Verified: browse-search returns real results. - Broadcast toggle reliability: always offer setBroadcast in screen-share mode (the embedding/keyword router dropped it for non-English utterances) and make its description force a tool call. "방송 꺼줘"->stop now 5/5; no false triggers. - Stop the broadcast on voice leave (no orphaned stream). - Security: bind VNC/noVNC to loopback by default (VNC_BIND override) and the bridge to the container loopback (BRIDGE_HOST=127.0.0.1), not published. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ set -euo pipefail
|
||||
: "${WHISPER_DEVICE:=cuda}"
|
||||
: "${WHISPER_COMPUTE_TYPE:=float16}"
|
||||
: "${JARVIS_DB_PATH:=/data/jarvis.db}"
|
||||
: "${BRIDGE_HOST:=0.0.0.0}"
|
||||
: "${BRIDGE_HOST:=127.0.0.1}"
|
||||
: "${BRIDGE_PORT:=8765}"
|
||||
: "${PIPER_VOICE:=en_GB-alan-medium}"
|
||||
: "${PIPER_VOICE_DIR:=/opt/piper-voices}"
|
||||
|
||||
@@ -8,7 +8,13 @@ for i in $(seq 1 40); do
|
||||
done
|
||||
sleep 3
|
||||
export DISPLAY=:1
|
||||
# --remote-debugging-port exposes CDP so the brain's browse-search.mjs
|
||||
# (playwright connectOverCDP) can drive this on-screen Chrome for the
|
||||
# broadcast-visible Google/YouTube search. Bound to loopback (same container).
|
||||
exec google-chrome \
|
||||
--no-sandbox --no-first-run --disable-dev-shm-usage \
|
||||
--remote-debugging-port="${CDP_PORT:-9222}" \
|
||||
--remote-debugging-address=127.0.0.1 \
|
||||
--user-data-dir="${CHROME_PROFILE_DIR:-/root/chrome-profile}" \
|
||||
--password-store=basic --start-maximized \
|
||||
"${CHROME_START_URL:-about:blank}"
|
||||
|
||||
Reference in New Issue
Block a user