Skip to main content

car_browser/
lib.rs

1//! Browser automation and perception pipeline for the Common Agent Runtime.
2//!
3//! This crate provides:
4//! - `BrowserBackend` trait: abstract interface for browser automation
5//! - Perception pipeline: converts raw browser state (screenshots + a11y trees) into structured `UiMap` data
6//! - Browser tool registration: registers `browse_*` tools with `car-engine`
7//!
8//! # Architecture
9//!
10//! `car-browser` is backend-agnostic. Consumers provide a `BrowserBackend` implementation:
11//! - **Hydra** provides `TauriBackend` (drives Tauri's WebView)
12//! - **Headless** uses `ChromiumBackend` (chromiumoxide, behind `chromium` feature)
13//! - **Tests** use `MockBackend`
14
15pub mod backend;
16pub mod models;
17pub mod perception;
18pub mod tools;
19
20pub use backend::{BrowserBackend, BrowserError};
21pub use models::{A11yNode, Bounds, Modifier, Viewport, WaitCondition};
22pub use tools::BrowserToolExecutor;