1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//! # webpuppet
//!
//! Browser automation library for AI provider web interfaces.
//!
//! This crate provides programmatic control of Chromium-based browsers to interact
//! with AI chat providers through their web UIs. It handles authentication, session
//! management, and response extraction for research and development workflows.
//!
//! ## Supported Browsers
//!
//! **Chromium-based (Full CDP automation)**:
//! Brave, Chrome, Chromium, Edge, Opera, Vivaldi
//!
//! **Detection only**: Firefox (Gecko), Safari (WebKit, macOS only)
//!
//! **Cross-platform**: Linux, macOS, Windows (including Flatpak/Snap on Linux)
//!
//! ## Features
//!
//! - **Multi-provider support**: Claude, Grok, Gemini, ChatGPT, Perplexity, NotebookLM, Kaggle
//! - **Browser automation**: CDP (Chrome DevTools Protocol) via chromiumoxide
//! - **Browser detection**: Automatic detection with platform-specific paths
//! - **Session persistence**: Secure credential and cookie storage with AES-256-GCM
//! - **Rate limiting**: Configurable request throttling with humanized delays
//! - **Content security**: Response screening for security threats
//! - **Permission controls**: Domain allowlisting and operation restrictions
//!
//! ## Security Considerations
//!
//! ⚠️ **IMPORTANT**: This library automates third-party web interfaces. Users must
//! comply with provider terms of service and applicable laws.
//!
//! - Credentials stored in OS keyring with AES-256-GCM encryption (never plaintext)
//! - Browser profiles sandboxed per provider
//! - Rate limiting prevents abuse detection
//! - All automation is local (no external API calls)
//! - Permission controls block unauthorized operations
//!
//! ## Example
//!
//! ```rust,ignore
//! use webpuppet::{WebPuppet, Provider, PromptRequest};
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let puppet = WebPuppet::new()
//! .with_provider(Provider::Claude)
//! .headless(true)
//! .build()
//! .await?;
//!
//! let response = puppet.prompt(PromptRequest {
//! message: "Explain io_uring async I/O in Rust".into(),
//! context: Some("Focus on memory safety".into()),
//! ..Default::default()
//! }).await?;
//!
//! println!("Response: {}", response.text);
//! Ok(())
//! }
//! ```
pub use ;
pub use Config;
pub use CredentialStore;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use RateLimiter;
pub use ;
pub use Session;