feat(brain): botBrowser tool drives the bot's own Chrome over CDP
open, read, click (label or [n]), type (optionally Enter) and back; page content comes back fenced as untrusted data; only http(s) addresses; no LLM call. Offered only when the app started the bot browser (JARVIS_BROWSER_CDP) and the browser feature is on; meanwhile fetchWebPage, which has no address guard, is not offered. Eval evals/test_bot_browser_tool.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,8 @@ manages the MCP servers it connects.
|
||||
|
||||
- `features` (new section): `weather` (`getWeather`), `webSearch` (`webSearch`, `fetchWebPage`) and
|
||||
`meals` (`logMeal`, `fetchMeals`, `deleteMeal`), each on by default; `collect` (background
|
||||
collection, below; no brain tool) and `browser` (the bot browser, below "Bot browser"; its brain
|
||||
tool comes with it), also on by default. The tools of a feature that
|
||||
collection, below; no brain tool) and `browser` (the bot browser, below "Bot browser", and its
|
||||
brain tool `botBrowser`, `src/jarvis/tools/builtin/bot_browser.spec.md`), also on by default. The tools of a feature that
|
||||
is off go into the brain's `disabled_tools`: they are neither offered nor run
|
||||
(`voice_worker.spec.md`, "Tools"). The other features of the 기능 screen (PC control, screen
|
||||
viewing) come with their milestone (M7).
|
||||
|
||||
@@ -16,6 +16,7 @@ pub const FEATURE_TOOLS: &[(&str, &[&str])] = &[
|
||||
("weather", &["getWeather"]),
|
||||
("webSearch", &["webSearch", "fetchWebPage"]),
|
||||
("meals", &["logMeal", "fetchMeals", "deleteMeal"]),
|
||||
("browser", &["botBrowser"]),
|
||||
];
|
||||
|
||||
/// The built-in tools of the features that are off.
|
||||
@@ -23,6 +24,7 @@ pub fn disabled_tools(f: &FeatureSettings) -> Vec<&'static str> {
|
||||
let on = |key: &str| match key {
|
||||
"weather" => f.weather,
|
||||
"webSearch" => f.web_search,
|
||||
"browser" => f.browser,
|
||||
_ => f.meals,
|
||||
};
|
||||
FEATURE_TOOLS.iter().filter(|(k, _)| !on(k)).flat_map(|(_, tools)| tools.iter().copied()).collect()
|
||||
@@ -103,7 +105,7 @@ mod tests {
|
||||
let all_on = FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true };
|
||||
assert!(disabled_tools(&all_on).is_empty());
|
||||
let off = disabled_tools(&FeatureSettings { weather: false, web_search: true, meals: false, collect: false, browser: false });
|
||||
assert_eq!(off, vec!["getWeather", "logMeal", "fetchMeals", "deleteMeal"]);
|
||||
assert_eq!(off, vec!["getWeather", "logMeal", "fetchMeals", "deleteMeal", "botBrowser"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user