Files
gyandoot-v2/crates/gyandoot-browser/src/lib.rs
Tara Menon 605747023b Add camofox-browser integration: gyandoot-browser crate + agent tools
New crate: crates/gyandoot-browser/
  - client.rs: Full REST client for camofox-browser API (health, tabs,
    navigation, snapshots, click/type/scroll, search macros)
  - macros.rs: 14 SearchMacro enum (Google, YouTube, Amazon, Reddit,
    Wikipedia, Twitter, Yelp, Spotify, Netflix, LinkedIn, Instagram,
    TikTok, Twitch) with parse/display
  - snapshot.rs: PageSnapshot, PageLinks, NavigationResult, HealthResponse
  - session.rs: BrowserSession, SessionManager with idle cleanup

New module: crates/gyandoot-agent/src/browser_tools.rs
  - WebSearchTool: Search the web using anti-detection browser
  - WebBrowseTool: Browse URLs, click, type, scroll with element refs
  - register_browser_tools(): Wire both tools into ToolExecutor

CLI: Added
                                 o
                                 |
               - - - - - -     .---.     - - - - - -
          - - - - - - - - -  [ ^   ^ ]  - - - - - - - - -
             - - - - - - -   |  ___  |   - - - - - - -
                              `-----'
           ____ __   __  ___   _   _  ____   ___   ___  _____
          / ___|\ \ / / / _ \ | \ | ||  _ \ / _ \ / _ \|_   _|
         | |  _  \ V / / /_\ \|  \| || | | | | | | | | | | |
         | |_| |  | |  |  _  || |\  || |_| | |_| | |_| | | |
          \____/  |_|  |_| |_||_| \_||____/ \___/ \___/  |_|

        o - - - - - - -  knowledge. delivered. - - - - - - - o

Unknown command: browser
Run 'gyandoot help' for usage. subcommand with health/search/browse actions

Installer: Updated install.sh with camofox-browser cloning, Node.js
detection, npm dependency install, and systemd service setup

Camofox-browser running at http://localhost:9377 (Docker, verified working)

Workspace: 12 crates + CLI binary — cargo check passes with 0 errors.
2026-06-11 20:23:35 +05:30

39 lines
1.3 KiB
Rust

//! # GyanDoot Browser — Anti-Detection Browsing
//!
//! A Rust client for [camofox-browser](https://github.com/jo-inc/camofox-browser),
//! an anti-detection browser server for AI agents powered by Camoufox.
//!
//! Camoufox is a Firefox fork with C++-level fingerprint spoofing —
//! no JavaScript shims, no detectable differences from a real browser.
//! This crate wraps its REST API with typed Rust interfaces.
//!
//! ## Features
//!
//! - 14 built-in search macros (`@google_search`, `@youtube_search`, etc.)
//! - Token-efficient accessibility snapshots (~90% smaller than HTML)
//! - Stable element refs (`e1`, `e2`) for reliable interaction
//! - Session isolation per user
//! - Proxy + GeoIP support
//! - Automatic idle session cleanup
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use gyandoot_browser::BrowserClient;
//!
//! let client = BrowserClient::new();
//! let health = client.health().await.unwrap();
//! println!("Browser engine: {}", health.engine);
//! ```
pub mod client;
pub mod macros;
pub mod session;
pub mod snapshot;
pub use client::{BrowserClient, BrowserError, BrowserResult, DEFAULT_CAMOFOX_URL};
pub use macros::SearchMacro;
pub use session::{BrowserSession, SessionManager, TabInfo};
pub use snapshot::{
HealthResponse, InteractionResult, LinkItem, NavigationResult, PageLinks, PageSnapshot,
};