@kritchoff/agent-browser 0.9.38 → 0.9.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ services:
3
3
  # Android Emulator Service (The "Body")
4
4
  # ---------------------------------------------------------------------------
5
5
  android-service:
6
- image: kritchoff/agent-android:v1.0.5
6
+ image: kritchoff/agent-android:v1.0.6
7
7
  platform: linux/amd64
8
8
  privileged: true # Required for KVM
9
9
  restart: always # Auto-restart on crash
@@ -11,6 +11,7 @@ services:
11
11
  - "5566:5555" # ADB (Host access)
12
12
  - "9235:9224" # CDP (Host access)
13
13
  - "6091:6080" # NoVNC
14
+ - "3001:3000" # Agent Control Port (Exposed from shared namespace)
14
15
  environment:
15
16
  - EMULATOR_NAME=Pixel_6_API_34
16
17
  - BROWSER=wootzapp
@@ -30,18 +31,15 @@ services:
30
31
  # Agent Browser Service (The "Brain")
31
32
  # ---------------------------------------------------------------------------
32
33
  agent-service:
33
- image: kritchoff/agent-daemon:v1.0.5
34
+ image: kritchoff/agent-daemon:v1.0.6
34
35
  platform: linux/amd64
35
36
  restart: always
36
37
  depends_on:
37
38
  - android-service
38
- ports:
39
- - "3001:3000" # Agent Control Port
39
+ network_mode: "service:android-service"
40
40
  environment:
41
41
  - AGENT_DEBUG=false
42
42
  - AGENT_BROWSER_SOCKET_DIR=/tmp/agent-browser
43
- links:
44
- - android-service
45
43
 
46
44
  volumes:
47
45
  avd-data:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kritchoff/agent-browser",
3
- "version": "0.9.38",
3
+ "version": "0.9.40",
4
4
  "description": "Headless browser automation CLI for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -6,18 +6,9 @@ mkdir -p $AGENT_BROWSER_SOCKET_DIR
6
6
 
7
7
  echo "[Agent] Starting Agent Browser Service"
8
8
 
9
- # Resolve IP of android-service to avoid Chrome Host header security block
10
- echo "[Agent] Resolving android-service IP..."
11
- ANDROID_IP=""
12
- until [ -n "$ANDROID_IP" ]; do
13
- # Try /etc/hosts (Fastest, reliable with Docker links)
14
- ANDROID_IP=$(grep "android-service" /etc/hosts | awk '{print $1}' | head -n 1)
15
-
16
- if [ -z "$ANDROID_IP" ]; then
17
- echo "[Agent] Waiting for DNS resolution..."
18
- sleep 2
19
- fi
20
- done
9
+ # We share the network namespace with android-service, so it's on localhost
10
+ echo "[Agent] Using shared network namespace (localhost)..."
11
+ ANDROID_IP="127.0.0.1"
21
12
  echo "[Agent] Android IP: $ANDROID_IP"
22
13
 
23
14
  # Wait for CDP Bridge (Port 9224)
package/sdk.sh CHANGED
@@ -88,6 +88,11 @@ cmd_start() {
88
88
  # Ensure images are present (Production robustness)
89
89
  pull_images_with_retry
90
90
 
91
+ # --- ALWAYS CLEAN UP PREVIOUS STATE ---
92
+ # This prevents network namespace corruption and port binding failures on warm boots
93
+ log_info "Cleaning up previous container state..."
94
+ docker compose -f "$COMPOSE_FILE" down -v --remove-orphans >/dev/null 2>&1 || true
95
+
91
96
  if [ -f "$SNAPSHOT_FILE" ]; then
92
97
  # === WARM START ===
93
98
  log_success "Found cached baseline snapshot. Performing WARM BOOT..."