The daemon JS files (daemon.js, server.js, browser.js, protocol.js,
snapshot.js, ipc.js) are now EMBEDDED in the compiled Rust binary via
include_dir! and extracted to ~/.gyandoot/daemon/ on first run.
This eliminates the need to npm install -g camoufox-browser@0.1.0,
which bundles an incompatible camoufox-js@0.9.3 that caused:
- 'Cannot open database' errors
- Re-downloading 298MB browser on every navigation
- Circular install/remove/install loops
Now the daemon imports camoufox-js from the global npm install (v0.11.0)
which is installed by install.sh. Clean, no bundled deps, no conflicts.
Also removed: is_npm_package_installed(), install_npm_package(),
find_daemon_js() — all replaced by gyandoot_browser::daemon::extract_daemon()
Bug 1 — writer.shutdown() kills Node socket before response:
Rust called shutdown() on the write half immediately after writing
the command. This sent EOF to the Node.js daemon, whose safeWrite()
checks socket.destroyed and silently bails. Fixed by dropping writer
instead.
Bug 2 — daemon has zero macro support:
The daemon's execute() never handles macro_name/query. Only url
matters for the navigate action. Fixed search() to resolve all 12
macros (@google_search, @youtube_search, etc.) to actual search URLs
in Rust before sending navigate with cmd.url set.
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
1. /quit and /help commands restored:
- /quit: exits the interactive loop
- /help: shows formatted help box with available commands & tips
- Unknown commands get a friendly error pointing to /help
- Slash commands intercepted before LLM processing (no token waste)
2. Zero warnings across entire workspace (13 files fixed):
- Fixed ambiguous glob re-exports in gyandoot-core
- Added #[allow(dead_code)] on intentional dead fields
- Fixed unused imports, variables, and macros
- Fixed unused assignments in subagents
- cleaned up service.rs, profile, kanban warnings
install.sh now produces a completely clean build with zero warnings.