Root cause: camoufox-browser@0.1.0 bundles camoufox-js@0.9.3.
When the daemon does 'import("camoufox-js")', Node.js resolves
the BUNDLED version (0.9.3) FIRST — not the global one.
Version 0.9.3 doesn't recognize the version.json format from
0.11.0, so it re-downloads the 298MB browser binary on EVERY
navigation command, causing timeout -> 'Empty response'.
Fix: instead of 'npm install -g camoufox-js@0.11.0' (which
Node ignores because bundled takes priority), use:
npm install --prefix "$(npm root -g)/camoufox-browser" camoufox-js@0.11.0
This installs v0.11.0 INSIDE the daemon's own node_modules,
overriding the bundled 0.9.3.
Even with info/ok/warn fixed to stderr, raw command output
from git clone and cargo build was still leaking to stdout
through 2>&1 | tail -5.
Fix: added >&2 after tail -5 so ALL intermediate command output
goes to stderr, leaving only the final echo on stdout.
Same fix as gyandoot-release: ensure_gyandoot_binary() detects
whether we're in source repo, binary repo, or need to clone.
install_binary() now takes a path parameter.
The old banner was a handwritten ASCII art that didn't actually
spell 'GYANDOOT'. Replaced with proper figlet 'standard' font
output so the banner is readable and correct.
install_binary() now:
1. Automatically picks best location per platform:
- macOS: ~/.cargo/bin/ (no sudo, in PATH for Rust users)
- Linux: ~/.cargo/bin/ → /usr/local/bin → ~/.local/bin/
- Windows: /usr/local/bin (Git Bash/MSYS2)
2. Detects if old binary exists at a different PATH location
and warns the user: 'There is ANOTHER gyandoot at ...'
3. Verifies 'command -v gyandoot' resolves correctly after install
4. Shows shell profile instructions if PATH needs updating
Previous issue: always installed to /usr/local/bin with sudo,
overwriting the old binary from install.sh but not warning if
another copy existed elsewhere in PATH.
Root cause: 'npx camoufox-js@0.11.0 fetch' on a fresh install prompts
'Ok to proceed? (y/N)' and pipes it through 'tail -5', hiding it. User
sees nothing happening while script waits for input.
Fix:
1. npx --yes — auto-confirms the install prompt, no more silent hang
2. Removed | tail -5 — full output visible so user sees progress bar
3. macOS cache path (~/Library/Caches/) vs Linux (~/.cache/) in verify step
4. Also checks version.json as fallback (binary can be named differently)
The Camoufox browser (Playwright-based) needs ~30 Linux system libraries
to run. On fresh WSL/Ubuntu, these are not pre-installed, causing the
browser daemon to crash silently with only a cryptic 'No such file or
directory' error.
Changes:
1. Add detect_wsl() — reads /proc/version for 'microsoft'/'wsl'
2. Add install_linux_deps() — installs all 30+ Playwright deps via
apt-get/dnf/yum before installing camoufox-browser
3. Handles t64 package name variants (libasound2t64 vs libasound2)
4. Shows WSL-specific note at end of install
5. npm install -g camoufox-browser + install now run with better output
6. Verifies browser binary exists at ~/.cache/camoufox/ post-install
7. Install now fully automatic on fresh WSL — no manual apt-get needed
- Create systemd + launchd service templates in resources/
- Add gyandoot-core/src/service.rs module with full lifecycle
- systemd: user service, daemon-reload, enable, start, stop, disable
- launchd: macOS plist, load/unload, start/stop (launchctl)
- Add 'gyandoot service install|remove|status' CLI subcommand
- Update setup wizard: prompts 'Install system service? [y/N]'
- Update install.sh: prompts user for service install after binary
- Browser auto-starts at runtime (browser_manager), no separate service needed
- Camoufox installed via npm, auto-started by GyanDoot agent loop
Full integration:
- install.sh now installs camoufox-browser via npm (preferred) or Docker
- install.sh creates systemd/launchd auto-start service on Linux/macOS
- New browser_manager.rs — health-check, auto-start, wait-for-ready
- AgentLoop::run() auto-inits Camoufox and registers web_search/web_browse
- System prompt tells LLM to use web_search/web_browse as PRIMARY tools
- Graceful fallback: if Camoufox unavailable, logs warning, uses bash tools
- ToolExecutor is now Arc<Mutex<>> for runtime tool registration
GyanDoot v2 now: install → Camoufox auto-starts → web tools available →
"search NSE India" uses Camoufox with anti-detection 🎯