Skip to content

Agent Zero AI framework

Refresh BYOB browser inventory

Alessandro7168f0984e78
diff --git a/plugins/_browser/AGENTS.md b/plugins/_browser/AGENTS.md
index 504c46962..c8f8a8c09 100644
--- a/plugins/_browser/AGENTS.md
+++ b/plugins/_browser/AGENTS.md
@@ -25,6 +25,7 @@
- Keep WebUI Browser tabs scoped to the active chat context by default; aggregate tabs from other AgentContext runtimes only when the Browser settings tab scope is `shared`.
- Keep narrow WebUI Browser controls usable by grouping navigation with Annotate/settings above a full-width address bar.
- For Bring Your Own Browser with an existing host profile, `host_browser_selection` may target automatic CLI selection, a browser family/id, or an explicit CDP endpoint and must be forwarded to the connector runtime as `browser_selection`.
+- Browser Settings must refresh connected A0 CLI host-browser inventory while the settings view is open so newly authorized endpoints appear without saving or reopening.
- Browser URL-intent handling must only claim web URL schemes and leave custom Agent Zero schemes to their owning surfaces.
- Prefer DOM/CDP browser actions with refs, selectors, frame-chain refs, and screenshots over viewport coordinate input. Coordinates remain a visual fallback.
- Do not hardcode user-specific browser paths or secrets.
diff --git a/plugins/_browser/helpers/connector_runtime.py b/plugins/_browser/helpers/connector_runtime.py
index 3eb19b063..d5f05cb71 100644
--- a/plugins/_browser/helpers/connector_runtime.py
+++ b/plugins/_browser/helpers/connector_runtime.py
@@ -83,7 +83,8 @@ _REQUIRED_API_NAMES_RE = re.compile(
re.S,
)
_HOST_BROWSER_REMOTE_DEBUGGING_HELP = (
- 'For an already-open Chrome-family browser, open `chrome://inspect/#remote-debugging`, '
+ "For an already-open Chromium-family browser, open its inspect page, such as "
+ "`chrome://inspect/#remote-debugging` or `opera://inspect/#remote-debugging`, "
'enable "Allow remote debugging for this browser instance", run `/browser host on`, '
"and retry."
)
@@ -519,7 +520,10 @@ class ConnectorBrowserRuntime:
if not message:
message = "Host browser operation failed"
normalized = message.lower()
- if "chrome://inspect/#remote-debugging" in normalized:
+ if (
+ "chrome://inspect/#remote-debugging" in normalized
+ or "opera://inspect/#remote-debugging" in normalized
+ ):
return _append_docker_browser_recovery(message)
if any(token in normalized for token in _REMOTE_DEBUGGING_ERROR_TOKENS):
return _append_docker_browser_recovery(
diff --git a/plugins/_browser/prompts/agent.system.tool.browser.md b/plugins/_browser/prompts/agent.system.tool.browser.md
index 21cd8279a..402ef6efa 100644
--- a/plugins/_browser/prompts/agent.system.tool.browser.md
+++ b/plugins/_browser/prompts/agent.system.tool.browser.md
@@ -3,7 +3,7 @@ Rendered browser automation for pages that need interaction, JavaScript, forms,
Prefer `search_engine` or `document_query` for plain text research. The tool must not open a Browser surface automatically. Use the tool headlessly unless the user opens the Browser surface or asks for the optional visible WebUI viewer.
-When the user asks for "my browser", "host browser", "local browser", local Chrome, or opening a URL in their host browser, use this `browser` tool. Do not substitute `computer_use_remote`, `code_execution_remote`, `xdg-open`, `sensible-browser`, or Python `webbrowser.open`. If setup fails and mentions remote debugging, tell the user to open `chrome://inspect/#remote-debugging`, enable "Allow remote debugging for this browser instance", run `/browser host on`, and retry.
+When the user asks for "my browser", "host browser", "local browser", a local Chromium browser, or opening a URL in their host browser, use this `browser` tool. Do not substitute `computer_use_remote`, `code_execution_remote`, `xdg-open`, `sensible-browser`, or Python `webbrowser.open`. If setup fails and mentions remote debugging, tell the user to open the browser inspect page, such as `chrome://inspect/#remote-debugging` or `opera://inspect/#remote-debugging`, enable "Allow remote debugging for this browser instance", run `/browser host on`, and retry.
For rendered browsing workflows, multi-step interaction, screenshots, downloads, uploads, forms, or host/container mode decisions, first load `browser-automation` with `skills_tool:load`, then call this tool using the loaded instructions. For fragile forms, `browser-automation` links to `browser-form-workflows`; load it when selects, checkboxes, radios, uploads, contenteditable fields, validation, or submission state are central.
diff --git a/plugins/_browser/webui/browser-config-store.js b/plugins/_browser/webui/browser-config-store.js
index 9779e8bb2..1f385430b 100644
--- a/plugins/_browser/webui/browser-config-store.js
+++ b/plugins/_browser/webui/browser-config-store.js
@@ -10,6 +10,7 @@ const HOST_PROFILE_MODES = new Set(["existing", "agent"]);
const DEFAULT_MAX_OPEN_TABS = 32;
const MIN_MAX_OPEN_TABS = 1;
const HARD_MAX_OPEN_TABS = 50;
+const HOST_BROWSER_STATUS_REFRESH_MS = 3000;
function normalizePathList(value) {
const source = Array.isArray(value)
@@ -91,6 +92,9 @@ function hostBrowserFamilyLabel(value) {
chromium: "Chromium",
edge: "Edge",
"edge-dev": "Edge Dev",
+ brave: "Brave",
+ opera: "Opera",
+ vivaldi: "Vivaldi",
};
const label = labels[base] || "Host browser";
if (remoteDebugging) return `${label} (allowed)`;
@@ -116,13 +120,16 @@ export const store = createStore("browserConfig", {
extensionDeleteLoadingPath: "",
hostBrowserStatus: null,
hostBrowserStatusLoading: false,
+ hostBrowserStatusRefreshTimer: null,
async init(config) {
this.bindConfig(config);
await Promise.all([this.loadExtensionsList(), this.loadHostBrowserStatus()]);
+ this.startHostBrowserStatusRefresh();
},
cleanup() {
+ this.stopHostBrowserStatusRefresh();
this.config = null;
this.extensionsList = [];
this.extensionsError = "";
@@ -132,6 +139,20 @@ export const store = createStore("browserConfig", {
this.hostBrowserStatusLoading = false;
},
+ startHostBrowserStatusRefresh() {
+ this.stopHostBrowserStatusRefresh();
+ this.hostBrowserStatusRefreshTimer = window.setInterval(
+ () => this.loadHostBrowserStatus(),
+ HOST_BROWSER_STATUS_REFRESH_MS,
+ );
+ },
+
+ stopHostBrowserStatusRefresh() {
+ if (!this.hostBrowserStatusRefreshTimer) return;
+ window.clearInterval(this.hostBrowserStatusRefreshTimer);
+ this.hostBrowserStatusRefreshTimer = null;
+ },
+
bindConfig(config) {
const safeConfig = ensureConfig(config);
if (!safeConfig) return;
diff --git a/plugins/_browser/webui/config.html b/plugins/_browser/webui/config.html
index f01588f25..48348bdb1 100644
--- a/plugins/_browser/webui/config.html
+++ b/plugins/_browser/webui/config.html
@@ -37,7 +37,7 @@
class="browser-config-field-help"
x-show="$store.browserConfig.config.runtime_backend === 'host_required'"
>
- Uses Chrome, Edge, or Chromium on the A0 CLI host. Keep A0 CLI connected; the browser opens when the agent first needs it. For an already-open browser, use chrome://inspect/#remote-debugging and enable "Allow remote debugging for this browser instance".
+ Uses Chrome, Edge, Brave, Opera, Vivaldi, or Chromium on the A0 CLI host. Keep A0 CLI connected; the browser opens when the agent first needs it. For an already-open browser, use its inspect page, such as chrome://inspect/#remote-debugging or opera://inspect/#remote-debugging, and enable "Allow remote debugging for this browser instance".
</span>
</label>
diff --git a/tests/test_a0_connector_prompt_gating.py b/tests/test_a0_connector_prompt_gating.py
index 0c6afc34c..64456877f 100644
--- a/tests/test_a0_connector_prompt_gating.py
+++ b/tests/test_a0_connector_prompt_gating.py
@@ -624,6 +624,7 @@ def test_host_browser_requests_route_to_browser_tool_not_desktop_or_shell_fallba
assert "code_execution_remote" in browser_prompt
assert "Python `webbrowser.open`" in browser_prompt
assert "chrome://inspect/#remote-debugging" in browser_prompt
+ assert "opera://inspect/#remote-debugging" in browser_prompt
assert "Do not start `computer_use_remote` for web-page navigation" in computer_skill
assert (
"Do not fall back to `code_execution_remote`, `xdg-open`, `sensible-browser`, "
diff --git a/tests/test_browser_agent_regressions.py b/tests/test_browser_agent_regressions.py
index c02de2899..f0a6dc17f 100644
--- a/tests/test_browser_agent_regressions.py
+++ b/tests/test_browser_agent_regressions.py
@@ -995,10 +995,12 @@ def test_browser_tool_does_not_auto_open_canvas_policy_is_documented():
assert "`browser-automation` links to `browser-form-workflows`" in prompt
assert "does not automatically load screenshots" in prompt
assert "chrome://inspect/#remote-debugging" in prompt
+ assert "opera://inspect/#remote-debugging" in prompt
assert tokens.approximate_tokens(prompt) <= 650
assert "already open" in config
assert "already-open Browser surface" in config_html
assert "chrome://inspect/#remote-debugging" in config_html
+ assert "opera://inspect/#remote-debugging" in config_html
def test_browser_skills_are_plugin_owned_and_progressively_linked():
diff --git a/tests/test_host_browser_connector.py b/tests/test_host_browser_connector.py
index 20ff61fb5..d7e17bf98 100644
--- a/tests/test_host_browser_connector.py
+++ b/tests/test_host_browser_connector.py
@@ -308,6 +308,7 @@ def test_connector_runtime_adds_remote_debugging_help_to_cdp_errors():
)
assert "chrome://inspect/#remote-debugging" in message
+ assert "opera://inspect/#remote-debugging" in message
assert "Allow remote debugging for this browser instance" in message
assert "/browser host on" in message
assert "Internal Docker browser" in message