feat(browser): add optional rust-native backend via fantoccini
* feat(browser): add optional rust-native automation backend * style: align channels module with stable rustfmt * fix(browser): switch rust-native backend to fantoccini Replace headless_chrome with fantoccini to satisfy license checks and keep browser-native optional. Adds native_webdriver_url wiring, migrates native backend session/actions to WebDriver, updates docs/config defaults, and keeps backend auto-resolution behavior intact. * test(config): serialize env override tests with lock Prevent flaky CI failures caused by concurrent environment variable mutation across config env-override tests. * style: apply rustfmt 1.92 for CI parity * chore(ci): sync lockfile and rustfmt with current main Resolve feature table drift after rebasing onto latest main, refresh Cargo.lock for browser-native fantoccini, and apply rustfmt 1.92 formatting required by CI.
This commit is contained in:
parent
9d29f30a31
commit
85fc12bcf7
7 changed files with 1412 additions and 64 deletions
|
|
@ -55,6 +55,7 @@ pub fn default_tools_with_runtime(
|
|||
}
|
||||
|
||||
/// Create full tool registry including memory tools and optional Composio
|
||||
#[allow(clippy::implicit_hasher)]
|
||||
pub fn all_tools(
|
||||
security: &Arc<SecurityPolicy>,
|
||||
memory: Arc<dyn Memory>,
|
||||
|
|
@ -77,6 +78,7 @@ pub fn all_tools(
|
|||
}
|
||||
|
||||
/// Create full tool registry including memory tools and optional Composio.
|
||||
#[allow(clippy::implicit_hasher)]
|
||||
pub fn all_tools_with_runtime(
|
||||
security: &Arc<SecurityPolicy>,
|
||||
runtime: Arc<dyn RuntimeAdapter>,
|
||||
|
|
@ -102,11 +104,15 @@ pub fn all_tools_with_runtime(
|
|||
security.clone(),
|
||||
browser_config.allowed_domains.clone(),
|
||||
)));
|
||||
// Add full browser automation tool (agent-browser)
|
||||
tools.push(Box::new(BrowserTool::new(
|
||||
// Add full browser automation tool (pluggable backend)
|
||||
tools.push(Box::new(BrowserTool::new_with_backend(
|
||||
security.clone(),
|
||||
browser_config.allowed_domains.clone(),
|
||||
browser_config.session_name.clone(),
|
||||
browser_config.backend.clone(),
|
||||
browser_config.native_headless,
|
||||
browser_config.native_webdriver_url.clone(),
|
||||
browser_config.native_chrome_path.clone(),
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
@ -168,6 +174,7 @@ mod tests {
|
|||
enabled: false,
|
||||
allowed_domains: vec!["example.com".into()],
|
||||
session_name: None,
|
||||
..BrowserConfig::default()
|
||||
};
|
||||
let http = crate::config::HttpRequestConfig::default();
|
||||
|
||||
|
|
@ -191,6 +198,7 @@ mod tests {
|
|||
enabled: true,
|
||||
allowed_domains: vec!["example.com".into()],
|
||||
session_name: None,
|
||||
..BrowserConfig::default()
|
||||
};
|
||||
let http = crate::config::HttpRequestConfig::default();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue