fix(browser): dual transport — Unix socket + HTTP Docker + binary corruption detection

Root cause on macOS: camoufox-browser@0.1.0 downloads an alpha binary
(v150.0.2-alpha.26) from daijro/camoufox that has a broken macOS build
(missing libmozglue.dylib). Binary crashes with SIGABRT/SIGKILL.

Changes:
1. gyandoot-browser client now supports TWO transports:
   - Transport::UnixSocket (existing — daemon IPC)
   - Transport::Http (new — Docker REST API on port 9377)
2. init_browser() tries Docker HTTP first, falls back to npx daemon
3. HTTP transport maps browser actions to Docker REST endpoints
   (/navigate, /tabs, /health, etc.) with correct userId params
4. check_known_errors() detects libmozglue.dylib + SIGKILL patterns
5. Browser cache check works for both macOS and Linux paths
6. Error messages correctly say 'Use Docker' on corrupted binary
7. Added reqwest dep to gyandoot-agent for Docker health check

Clean build: 0 errors
This commit is contained in:
2026-06-12 19:49:16 +05:30
parent 495893c1de
commit 71cf7c8830
5 changed files with 394 additions and 299 deletions

2
Cargo.lock generated
View File

@@ -684,6 +684,7 @@ dependencies = [
"gyandoot-security",
"gyandoot-skills",
"rand 0.8.6",
"reqwest",
"serde",
"serde_json",
"thiserror",
@@ -700,6 +701,7 @@ dependencies = [
"chrono",
"dirs",
"gyandoot-core",
"reqwest",
"serde",
"serde_json",
"thiserror",