Agent Zero AI framework
Report Host access control failures
Alessandro3271ff43e351
diff --git a/plugins/_a0_connector/AGENTS.md b/plugins/_a0_connector/AGENTS.mdindex 5dfed0a96..649f41f21 100644--- a/plugins/_a0_connector/AGENTS.md+++ b/plugins/_a0_connector/AGENTS.md@@ -42,7 +42,8 @@not expose it. Keep its trigger icon-only at rest and reveal the status labelon hover, keyboard focus, or while open. Connected and disconnected statesshare the computer glyph; the adjacent status dot communicates connectivity.- Keep the open popover above the compact right-canvas rail.+ Keep the open popover above the compact right-canvas rail and report control+ failures through the shared notification system.- File operation results may arrive as chunked JSON/base64`connector_file_op_result` frames; resolve the pending file operation onlyafter all chunks for the `op_id` are assembled.diff --git a/plugins/_a0_connector/webui/launcher-gateway-store.js b/plugins/_a0_connector/webui/launcher-gateway-store.jsindex d5512f332..503655462 100644--- a/plugins/_a0_connector/webui/launcher-gateway-store.js+++ b/plugins/_a0_connector/webui/launcher-gateway-store.js@@ -1,5 +1,6 @@import { createStore } from "/js/AlpineStore.js";import { callJsonApi } from "/js/api.js";+import { toastFrontendError } from "/components/notifications/notification-store.js";const STATUS_API = "/plugins/_a0_connector/v1/launcher_gateway_status";const CONTROL_API = "/plugins/_a0_connector/v1/launcher_gateway_control";@@ -120,6 +121,10 @@ const model = {this.status = response?.status || this.status;} catch (error) {console.error("Failed to control Launcher host:", error);+ void toastFrontendError(+ error?.message || "Host access change failed.",+ "Host access",+ );await this.refresh();} finally {this.saving = false;diff --git a/tests/test_a0_connector_launcher_gateway.py b/tests/test_a0_connector_launcher_gateway.pyindex b78fa088e..b52ca56dc 100644--- a/tests/test_a0_connector_launcher_gateway.py+++ b/tests/test_a0_connector_launcher_gateway.py@@ -1,6 +1,7 @@from __future__ import annotationsimport asyncio+from pathlib import Pathimport uuidfrom plugins._a0_connector.api.v1 import launcher_gateway_control@@ -37,6 +38,18 @@ def test_launcher_gateway_features_are_negotiated_on_http_and_websocket() -> Nonassert LauncherGatewayStatus.requires_auth() is True+def test_launcher_gateway_control_errors_use_webui_notifications() -> None:+ source = (+ Path(__file__).parents[1]+ / "plugins"+ / "_a0_connector"+ / "webui"+ / "launcher-gateway-store.js"+ ).read_text(encoding="utf-8")+ assert 'import { toastFrontendError }' in source+ assert 'void toastFrontendError(' in source++def test_launcher_gateway_is_fallback_after_context_bound_cli() -> None:context_id = f"ctx-{uuid.uuid4()}"cli_sid = _sid("cli")