@kritchoff/agent-browser 0.9.26 → 0.9.28
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.
- package/package.json +1 -1
- package/sdk.sh +22 -2
- package/start.sh +1 -1
package/package.json
CHANGED
package/sdk.sh
CHANGED
|
@@ -92,6 +92,16 @@ cmd_start() {
|
|
|
92
92
|
# === WARM START ===
|
|
93
93
|
log_success "Found cached baseline snapshot. Performing WARM BOOT..."
|
|
94
94
|
"$SDK_ROOT/start.sh" --snapshot "$SNAPSHOT_FILE"
|
|
95
|
+
|
|
96
|
+
# Verify port mapping for warm start too
|
|
97
|
+
cd "$SDK_ROOT"
|
|
98
|
+
CONTAINER=$(docker compose ps -q android-service)
|
|
99
|
+
if [ -n "$CONTAINER" ] && ! docker port "$CONTAINER" 3000 >/dev/null 2>&1; then
|
|
100
|
+
log_warn "Port 3000 is not mapped! Container config is stale."
|
|
101
|
+
log_info "Forcing full restart to apply network settings..."
|
|
102
|
+
docker compose -f "$COMPOSE_FILE" down
|
|
103
|
+
"$SDK_ROOT/start.sh" --snapshot "$SNAPSHOT_FILE"
|
|
104
|
+
fi
|
|
95
105
|
else
|
|
96
106
|
# === COLD START & FREEZE ===
|
|
97
107
|
log_warn "No baseline found. Performing FIRST RUN SETUP (Cold Boot)..."
|
|
@@ -108,8 +118,6 @@ cmd_start() {
|
|
|
108
118
|
exit 1
|
|
109
119
|
fi
|
|
110
120
|
|
|
111
|
-
log_info "Creating 'Golden' Baseline Snapshot for future runs..."
|
|
112
|
-
|
|
113
121
|
# We need to find the container ID to send the adb command
|
|
114
122
|
# We use docker compose to find it reliably
|
|
115
123
|
cd "$SDK_ROOT"
|
|
@@ -120,6 +128,18 @@ cmd_start() {
|
|
|
120
128
|
exit 1
|
|
121
129
|
fi
|
|
122
130
|
|
|
131
|
+
# SELF-HEAL: Verify port 3000 is actually mapped
|
|
132
|
+
# If the container was created with an old config, it might be running without ports.
|
|
133
|
+
if ! docker port "$CONTAINER" 3000 >/dev/null 2>&1; then
|
|
134
|
+
log_warn "Port 3000 is not mapped! Container config is stale."
|
|
135
|
+
log_info "Forcing full restart to apply network settings..."
|
|
136
|
+
docker compose -f "$COMPOSE_FILE" down
|
|
137
|
+
"$SDK_ROOT/start.sh"
|
|
138
|
+
|
|
139
|
+
# Re-fetch container ID after restart
|
|
140
|
+
CONTAINER=$(docker compose ps -q android-service)
|
|
141
|
+
fi
|
|
142
|
+
|
|
123
143
|
# 1. Save snapshot inside emulator
|
|
124
144
|
log_info "Saving emulator state (quickboot)..."
|
|
125
145
|
if docker exec "$CONTAINER" adb emu avd snapshot save quickboot; then
|
package/start.sh
CHANGED
|
@@ -46,7 +46,7 @@ fi
|
|
|
46
46
|
echo -e "\n${YELLOW}[2/4] Starting Docker Stack...${NC}"
|
|
47
47
|
echo " (First run may take a few minutes to download images)"
|
|
48
48
|
|
|
49
|
-
docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" up -d --build --remove-orphans
|
|
49
|
+
docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" up -d --build --remove-orphans
|
|
50
50
|
|
|
51
51
|
# Find actual container names
|
|
52
52
|
ANDROID_CONTAINER=$(docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" ps -q android-service)
|