Agent Zero AI framework
Remove Launcher Host access controls from Core
Alessandro4b0c575f010a
diff --git a/plugins/_a0_connector/AGENTS.md b/plugins/_a0_connector/AGENTS.mdindex ae5e17580..b74c5b726 100644--- a/plugins/_a0_connector/AGENTS.md+++ b/plugins/_a0_connector/AGENTS.md@@ -42,23 +42,11 @@- Launcher gateway scopes expose file reading and writing separately. Filewriting depends on reading, and Code execution depends on file writing. Keepolder gateway declarations without `file_write` read/write compatible.-- The `sync-status-end` Launcher gateway extension renders only when the user agent- includes `A0-Launcher/`. It may show status, master/scope controls,- preparation errors, and the connection action; standard browser sessions must- not expose it. Keep its trigger inside the existing sync indicator, render one- computer glyph per connected Launcher gateway, and retain one muted glyph- while disconnected so the control remains reachable. Do not add a native- tooltip, visible status label, count badge, or animated expansion.- Keep the open popover above the compact right-canvas rail and report control- failures through the shared notification system. Use the standard WebUI- border-radius tokens for its controls and popover. After Disconnect is- acknowledged, keep the popover open and turn that same action into Reconnect;- when Host access was turned off in Launcher settings, open that Launcher-owned- editor instead of silently re-granting access. Use only the narrow Launcher- WebContents bridge so both actions also work in a detached Instance window.- `/computer-use on` may use that same bounded bridge to request approval for- the current lease, while `/computer-use off` disables only the gateway scope.- Pausing remains the reversible master switch.+- Agent Zero WebUI exposes no Launcher gateway icon, menu, status, or control+ bridge. Host access settings, Disconnect/Reconnect, scope changes, and+ Computer Use approval belong only to attached or detached A0 Launcher chrome.+ Keep the authenticated gateway HTTP/WebSocket protocol available for the+ Launcher and connector runtime without adding a Core WebUI surface.- 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/extensions/webui/sync-status-end/launcher-gateway.html b/plugins/_a0_connector/extensions/webui/sync-status-end/launcher-gateway.htmldeleted file mode 100644index f2c5f23db..000000000--- a/plugins/_a0_connector/extensions/webui/sync-status-end/launcher-gateway.html+++ /dev/null@@ -1,167 +0,0 @@-<script type="module">- import { store } from "/plugins/_a0_connector/webui/launcher-gateway-store.js";-</script>--<div- x-data- class="launcher-gateway-root"- x-show="$store.launcherGateway?.visible"- x-create="$store.launcherGateway?.onMount()"- x-destroy="$store.launcherGateway?.cleanup()"- @click.outside="$store.launcherGateway.open = false"- @keydown.escape.window="$store.launcherGateway.open = false"- style="display: none;"->- <button- type="button"- class="launcher-gateway-trigger"- :class="`is-${$store.launcherGateway.state}${$store.launcherGateway.open ? ' is-open' : ''}`"- :aria-label="`Host access: ${$store.launcherGateway.stateLabel}`"- aria-haspopup="dialog"- :aria-expanded="$store.launcherGateway.open.toString()"- @click.stop="$store.launcherGateway.open = !$store.launcherGateway.open"- >- <template x-for="(gateway, index) in ($store.launcherGateway.status?.gateways || [])" :key="gateway.id || index">- <span class="material-symbols-outlined launcher-gateway-host-icon" aria-hidden="true">computer</span>- </template>- <span- class="material-symbols-outlined launcher-gateway-host-icon is-placeholder"- x-show="!($store.launcherGateway.status?.gateways || []).length"- aria-hidden="true"- >computer</span>- </button>-- <section- class="launcher-gateway-popover"- role="dialog"- aria-label="Launcher host access"- x-show="$store.launcherGateway.open"- x-transition.opacity.duration.120ms- @click.stop- style="display: none;"- >- <header class="launcher-gateway-header">- <div>- <strong x-text="$store.launcherGateway.hostLabel"></strong>- <span x-text="$store.launcherGateway.stateLabel"></span>- </div>- <button type="button" class="launcher-gateway-close" aria-label="Close host access" @click="$store.launcherGateway.open = false">- <span class="material-symbols-outlined" aria-hidden="true">close</span>- </button>- </header>-- <template x-if="$store.launcherGateway.gateway">- <div class="launcher-gateway-controls">- <div class="launcher-gateway-row is-master">- <span>Host access</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Host access" :checked="$store.launcherGateway.gateway.master_enabled" :disabled="$store.launcherGateway.saving" @change="$store.launcherGateway.setMaster($event.target.checked)">- <span class="toggler"></span>- </label>- </div>- <div class="launcher-gateway-row" :class="{ 'is-disabled': !$store.launcherGateway.gateway.master_enabled }">- <span>Files read</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Files read" :checked="$store.launcherGateway.gateway.scopes.files" :disabled="$store.launcherGateway.saving || !$store.launcherGateway.gateway.master_enabled" @change="$store.launcherGateway.setScope('files', $event.target.checked)">- <span class="toggler"></span>- </label>- </div>- <div class="launcher-gateway-row" :class="{ 'is-disabled': !$store.launcherGateway.gateway.master_enabled || !$store.launcherGateway.gateway.scopes.files }">- <span>Files write</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Files write" :checked="$store.launcherGateway.gateway.scopes.file_write" :disabled="$store.launcherGateway.saving || !$store.launcherGateway.gateway.master_enabled || !$store.launcherGateway.gateway.scopes.files" @change="$store.launcherGateway.setScope('file_write', $event.target.checked)">- <span class="toggler"></span>- </label>- </div>- <div class="launcher-gateway-row" :class="{ 'is-disabled': !$store.launcherGateway.gateway.master_enabled || !$store.launcherGateway.gateway.scopes.file_write }">- <span>Code execution</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Code execution" :checked="$store.launcherGateway.gateway.scopes.code_execution" :disabled="$store.launcherGateway.saving || !$store.launcherGateway.gateway.master_enabled || !$store.launcherGateway.gateway.scopes.file_write" @change="$store.launcherGateway.setScope('code_execution', $event.target.checked)">- <span class="toggler"></span>- </label>- </div>- <div class="launcher-gateway-row" :class="{ 'is-disabled': !$store.launcherGateway.gateway.master_enabled }">- <span>Use my Browser</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Use my Browser" :checked="$store.launcherGateway.gateway.scopes.browser" :disabled="$store.launcherGateway.saving || !$store.launcherGateway.gateway.master_enabled" @change="$store.launcherGateway.setScope('browser', $event.target.checked)">- <span class="toggler"></span>- </label>- </div>- <div class="launcher-gateway-row" :class="{ 'is-disabled': !$store.launcherGateway.gateway.master_enabled }">- <span>Computer Use</span>- <label class="toggle launcher-gateway-switch">- <input type="checkbox" aria-label="Computer Use" :checked="$store.launcherGateway.gateway.scopes.computer_use" :disabled="$store.launcherGateway.saving || !$store.launcherGateway.gateway.master_enabled" @change="$store.launcherGateway.setScope('computer_use', $event.target.checked)">- <span class="toggler"></span>- </label>- </div>- </div>- </template>-- <div class="launcher-gateway-notices" x-show="$store.launcherGateway.preparationMessages.length">- <template x-for="message in $store.launcherGateway.preparationMessages" :key="message">- <p><span class="material-symbols-outlined" aria-hidden="true">warning</span><span x-text="message"></span></p>- </template>- </div>-- <p- class="launcher-gateway-empty"- x-show="!$store.launcherGateway.gateway"- x-text="$store.launcherGateway.unavailableMessage"- ></p>-- <button- type="button"- class="launcher-gateway-connection-action"- :class="{ 'is-reconnect': !$store.launcherGateway.gateway }"- x-show="$store.launcherGateway.gateway || $store.launcherGateway.reconnectAvailable || $store.launcherGateway.canOpenSettings"- :disabled="$store.launcherGateway.saving"- @click="$store.launcherGateway.gateway ? $store.launcherGateway.emergencyDisconnect() : ($store.launcherGateway.reconnectAvailable ? $store.launcherGateway.reconnect() : $store.launcherGateway.openSettings())"- x-text="$store.launcherGateway.saving ? ($store.launcherGateway.gateway ? 'Disconnecting…' : ($store.launcherGateway.reconnectAvailable ? 'Reconnecting…' : 'Opening…')) : ($store.launcherGateway.gateway ? 'Disconnect' : ($store.launcherGateway.reconnectAvailable ? 'Reconnect' : 'Open Host access'))"- ></button>- </section>-</div>--<style>- #time-date-container:has(.launcher-gateway-trigger.is-open) { z-index: 3500; }- .launcher-gateway-root { position: relative; display: inline-flex; align-items: center; }- .launcher-gateway-trigger {- display: inline-flex; align-items: center; gap: .12rem; min-height: 1.4rem;- padding: .08rem; border: 0; border-radius: var(--border-radius-sm);- color: var(--color-text-secondary); background: transparent; cursor: pointer;- }- .launcher-gateway-trigger:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }- .launcher-gateway-host-icon { font-size: 1rem; }- .launcher-gateway-trigger.is-connected .launcher-gateway-host-icon { color: #00c340; }- .launcher-gateway-trigger.is-connecting .launcher-gateway-host-icon { color: #5b9cff; }- .launcher-gateway-trigger.is-paused .launcher-gateway-host-icon { color: #d6a43d; }- .launcher-gateway-trigger.is-needs_action .launcher-gateway-host-icon,- .launcher-gateway-trigger.is-multiple_hosts .launcher-gateway-host-icon { color: #e49a35; }- .launcher-gateway-trigger.is-error .launcher-gateway-host-icon { color: #db5b61; }- .launcher-gateway-host-icon.is-placeholder { opacity: .55; }- .launcher-gateway-popover {- position: absolute; top: calc(100% + .45rem); right: 0; z-index: 1200; width: min(20rem, calc(100vw - 2rem));- padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--border-radius-sm);- background: var(--color-panel); box-shadow: 0 16px 42px rgba(0, 0, 0, .24);- }- .launcher-gateway-header { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }- .launcher-gateway-header div { display: grid; gap: .1rem; }- .launcher-gateway-header span { color: var(--color-text-secondary); font-size: .75rem; }- .launcher-gateway-close { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; }- .launcher-gateway-close .material-symbols-outlined { font-size: 1.1rem; }- .launcher-gateway-controls { display: grid; gap: .15rem; margin-top: .7rem; }- .launcher-gateway-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2rem; font-size: .82rem; }- .launcher-gateway-row.is-master { padding-bottom: .35rem; margin-bottom: .2rem; border-bottom: 1px solid var(--color-border); font-weight: 650; }- .launcher-gateway-row.is-disabled { color: var(--color-text-secondary); opacity: .55; }- .launcher-gateway-switch { flex: 0 0 auto; width: 2.2rem; height: 1.25rem; }- .launcher-gateway-switch .toggler:before { width: .9rem; height: .9rem; left: .18rem; bottom: .18rem; }- .launcher-gateway-switch input:checked + .toggler:before { transform: translateX(.94rem); }- .launcher-gateway-switch input:focus-visible + .toggler { outline: 2px solid var(--color-primary); outline-offset: 2px; }- .launcher-gateway-switch input:disabled + .toggler { cursor: default; }- .launcher-gateway-notices { display: grid; gap: .35rem; margin-top: .55rem; }- .launcher-gateway-notices p { display: flex; gap: .35rem; margin: 0; color: #d79b35; font-size: .75rem; line-height: 1.3; }- .launcher-gateway-notices .material-symbols-outlined { font-size: .95rem; }- .launcher-gateway-empty { margin: .7rem 0 0; color: var(--color-text-secondary); font-size: .78rem; }- .launcher-gateway-connection-action { width: 100%; margin-top: .75rem; padding: .48rem .65rem; border: 1px solid color-mix(in srgb, #db5b61 55%, var(--color-border)); border-radius: var(--border-radius-sm); background: transparent; color: #db5b61; cursor: pointer; }- .launcher-gateway-connection-action.is-reconnect { border-color: var(--color-highlight); background: var(--color-highlight); color: #fff; }- .launcher-gateway-connection-action:disabled { opacity: .55; cursor: default; }-</style>diff --git a/plugins/_a0_connector/webui/launcher-gateway-store.js b/plugins/_a0_connector/webui/launcher-gateway-store.jsdeleted file mode 100644index e7cf5ec81..000000000--- a/plugins/_a0_connector/webui/launcher-gateway-store.js+++ /dev/null@@ -1,223 +0,0 @@-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";--const model = {- status: { state: "disconnected", gateway: null },- loading: false,- saving: false,- open: false,- intervalId: null,- reconnectAvailable: false,-- get visible() {- return /(?:^|\s)A0-Launcher\/[^\s]+/.test(navigator.userAgent);- },-- get canReconnect() {- return typeof window.a0LauncherHost?.reconnect === "function";- },-- get canOpenSettings() {- return typeof window.a0LauncherHost?.openSettings === "function";- },-- get gateway() {- return this.state === "disconnected" ? null : this.status?.gateway || null;- },-- get state() {- return this.status?.state || "disconnected";- },-- get stateLabel() {- const labels = {- connecting: "Connecting",- connected: "Connected",- paused: "Paused",- needs_action: "Needs action",- error: "Error",- multiple_hosts: "Multiple hosts",- disconnected: "Disconnected",- };- return labels[this.state] || "Disconnected";- },-- get hostLabel() {- return this.gateway?.host_label || "Launcher host";- },-- get preparationMessages() {- const status = this.gateway?.status || {};- const messages = [];- for (const key of ["browser", "computer_use"]) {- const value = status[key];- if (typeof value === "string" && value) messages.push(value);- else if (value?.message) messages.push(value.message);- else if (value?.error) messages.push(value.error);- }- if (this.status?.error) messages.push(this.status.error);- return [...new Set(messages)];- },-- get unavailableMessage() {- if (this.reconnectAvailable) return "Host access was disconnected for this Launcher tab.";- if (this.state === "disconnected") {- return this.canOpenSettings- ? "Host access is off in A0 Launcher."- : "Host access is off. Use the computer icon beside Reload in the Launcher header to turn it on.";- }- return "Open Host access in A0 Launcher for connection details.";- },-- onMount() {- if (!this.visible || this.intervalId) return;- void this.refresh();- this.intervalId = window.setInterval(() => this.refresh(), 2000);- },-- cleanup() {- if (this.intervalId) window.clearInterval(this.intervalId);- this.intervalId = null;- },-- async refresh() {- if (!this.visible || this.loading) return;- this.loading = true;- try {- this.status = await callJsonApi(STATUS_API, {});- } catch (error) {- console.error("Failed to load Launcher host status:", error);- this.status = { state: "error", gateway: null, error: error?.message || "Status unavailable" };- } finally {- this.loading = false;- await this.refreshReconnectState();- }- },-- async refreshReconnectState() {- try {- const state = await window.a0LauncherHost?.getState?.();- this.reconnectAvailable = state?.reconnectAvailable === true;- } catch {- this.reconnectAvailable = false;- }- },-- async setMaster(enabled) {- await this.control({ action: "set_master", enabled: Boolean(enabled) });- },-- async setScope(scope, enabled) {- const current = this.gateway?.scopes || {};- const scopes = {- files: Boolean(current.files),- file_write: Boolean(current.file_write ?? current.files),- code_execution: Boolean(current.code_execution),- browser: Boolean(current.browser),- computer_use: Boolean(current.computer_use),- [scope]: Boolean(enabled),- };- if (!scopes.files) scopes.file_write = false;- if (!scopes.file_write) scopes.code_execution = false;- return this.control({ action: "replace_scopes", scopes });- },-- async setComputerUse(enabled) {- if (!this.gateway) await this.refresh();- if (!this.gateway) throw new Error("Launcher Host access is not connected.");- if (!this.gateway.master_enabled) {- throw new Error("Launcher Host access is paused. Resume it first.");- }-- const requested = Boolean(enabled);- if (requested && typeof window.a0LauncherHost?.rearmComputerUse !== "function") {- throw new Error(- "This A0 Launcher cannot request Computer Use permission. Update it or use A0 CLI.",- );- }- if (Boolean(this.gateway.scopes?.computer_use) !== requested) {- if (!await this.setScope("computer_use", requested)) return false;- }- if (!requested) return true;-- const response = await window.a0LauncherHost.rearmComputerUse();- if (!response?.ok) {- throw new Error(- response?.message || "Computer Use permission could not be requested.",- );- }- return true;- },-- async emergencyDisconnect() {- if (await this.control({ action: "emergency_disconnect" })) {- this.reconnectAvailable = this.canReconnect;- this.status = { ...this.status, state: "disconnected", connected: false, gateway: null, gateways: [] };- if (!this.canReconnect) this.open = false;- }- },-- async reconnect() {- if (this.saving) return;- this.saving = true;- try {- const response = await window.a0LauncherHost?.reconnect?.();- if (!response?.ok) throw new Error(response?.message || "Host access could not reconnect.");- this.reconnectAvailable = false;- this.status = { ...this.status, state: "connecting", connected: false, gateway: null, gateways: [] };- } catch (error) {- console.error("Failed to reconnect Launcher host:", error);- void toastFrontendError(- error?.message || "Host access could not reconnect.",- "Host access",- );- await this.refreshReconnectState();- } finally {- this.saving = false;- }- },-- async openSettings() {- if (this.saving) return;- this.saving = true;- try {- const response = await window.a0LauncherHost?.openSettings?.();- if (!response?.ok) throw new Error(response?.message || "Host access settings could not open.");- this.open = false;- } catch (error) {- console.error("Failed to open Launcher host settings:", error);- void toastFrontendError(- error?.message || "Host access settings could not open.",- "Host access",- );- } finally {- this.saving = false;- }- },-- async control(payload) {- if (this.saving) return;- this.saving = true;- try {- const response = await callJsonApi(CONTROL_API, payload);- this.status = response?.status || this.status;- return true;- } catch (error) {- console.error("Failed to control Launcher host:", error);- void toastFrontendError(- error?.message || "Host access change failed.",- "Host access",- );- await this.refresh();- return false;- } finally {- this.saving = false;- }- },-};--export const store = createStore("launcherGateway", model);diff --git a/plugins/_commands/AGENTS.md b/plugins/_commands/AGENTS.mdindex 061f2ce02..ece1df787 100644--- a/plugins/_commands/AGENTS.md+++ b/plugins/_commands/AGENTS.md@@ -32,9 +32,9 @@- Script commands may emit `send_message` with `text` to submit the rendered composer text immediately after command resolution.- Commands accept prefix syntax (`/goal objective`) and exact postfix syntax (`objective /goal`); ordinary mid-sentence mentions are not invocations.- WebUI sends resolve through the picker effect path, while backend-originated messages resolve before reaching the agent.-- Built-in `/computer-use on|off` emits a bounded `computer_use` effect. A- Launcher-owned WebUI applies it to that tab's Host access lease; an ordinary- WebUI directs the user to run the same command in A0 CLI.+- Built-in `/computer-use on|off` emits a bounded `computer_use` effect. WebUI+ only directs the user to Host access in A0 Launcher or the same command in A0+ CLI; it never changes a Launcher gateway lease from Agent Zero page content.## Work Guidancediff --git a/plugins/_commands/commands/connector_commands.py b/plugins/_commands/commands/connector_commands.pyindex 72b957121..bbe29d676 100644--- a/plugins/_commands/commands/connector_commands.py+++ b/plugins/_commands/commands/connector_commands.py@@ -160,7 +160,8 @@ def _handle_computer_use(context_id: str, raw_args: str) -> dict[str, Any]:"enabled": enabled,"fallback": ("Computer Use permissions are controlled on the connected host. "- f"Run `/computer-use {command}` in the A0 CLI terminal."+ "Use Host access in A0 Launcher, or run "+ f"`/computer-use {command}` in the A0 CLI terminal."),})diff --git a/plugins/_commands/tests/test_commands_plugin.py b/plugins/_commands/tests/test_commands_plugin.pyindex a1799149b..e3ddfcf84 100644--- a/plugins/_commands/tests/test_commands_plugin.py+++ b/plugins/_commands/tests/test_commands_plugin.py@@ -268,7 +268,7 @@ def test_models_command_always_opens_modal():@pytest.mark.parametrize(("argument", "enabled"), [("on", True), ("off", False)])-def test_computer_use_command_dispatches_to_launcher_or_cli(+def test_computer_use_command_guides_launcher_or_cli(argument: str,enabled: bool,):@@ -289,7 +289,8 @@ def test_computer_use_command_dispatches_to_launcher_or_cli("enabled": enabled,"fallback": ("Computer Use permissions are controlled on the connected host. "- f"Run `/computer-use {argument}` in the A0 CLI terminal."+ "Use Host access in A0 Launcher, or run "+ f"`/computer-use {argument}` in the A0 CLI terminal."),}]diff --git a/plugins/_commands/webui/commands-slash-store.js b/plugins/_commands/webui/commands-slash-store.jsindex b33e945ef..0f005721d 100644--- a/plugins/_commands/webui/commands-slash-store.js+++ b/plugins/_commands/webui/commands-slash-store.js@@ -441,31 +441,10 @@ const model = {}if (type === "computer_use") {hadToast = true;- if (typeof window.a0LauncherHost?.getState !== "function") {- notifyInfo(- "Computer Use",- String(effect.fallback || "Run this command in A0 CLI."),- );- continue;- }- try {- const { store } = await import(- "/plugins/_a0_connector/webui/launcher-gateway-store.js"- );- const enabled = Boolean(effect.enabled);- if (!await store.setComputerUse(enabled)) {- hadError = true;- continue;- }- notifySuccess(- enabled- ? "Computer Use permission requested. Approve the system dialog."- : "Computer Use is off for this Launcher host.",- );- } catch (error) {- hadError = true;- notifyError(error?.message || "Computer Use could not be changed.");- }+ notifyInfo(+ "Computer Use",+ String(effect.fallback || "Use Host access in A0 Launcher, or run this command in A0 CLI."),+ );continue;}if (type === "goal_changed") {diff --git a/tests/test_a0_connector_launcher_gateway.py b/tests/test_a0_connector_launcher_gateway.pyindex 4c9eb11c8..04b87ced0 100644--- a/tests/test_a0_connector_launcher_gateway.py+++ b/tests/test_a0_connector_launcher_gateway.py@@ -45,21 +45,9 @@ 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_indicator_joins_sync_status_without_visual_noise() -> None:+def test_launcher_gateway_has_no_agent_zero_webui_controls() -> None:root = Path(__file__).parents[1]- source = (+ extension = (root/ "plugins"/ "_a0_connector"@@ -67,55 +55,22 @@ def test_launcher_gateway_indicator_joins_sync_status_without_visual_noise() ->/ "webui"/ "sync-status-end"/ "launcher-gateway.html"- ).read_text(encoding="utf-8")- sync_status = (root / "webui" / "components" / "sync" / "sync-status.html").read_text(- encoding="utf-8")-- assert '<x-extension id="sync-status-end"></x-extension>' in sync_status- assert sync_status.count("<circle") == 1- assert ":title=" not in sync_status- assert 'x-for="(gateway, index)' in source- assert "launcher-gateway-trigger-label" not in source- assert "launcher-gateway-dot" not in source- assert ":title=" not in source- assert "'Disconnect' : ($store.launcherGateway.reconnectAvailable ? 'Reconnect' : 'Open Host access')" in source- assert "$store.launcherGateway.reconnectAvailable ? $store.launcherGateway.reconnect() : $store.launcherGateway.openSettings()" in source- assert "'Reconnect' : 'Open Host access'" in source- assert "Emergency disconnect" not in source- popover_css = source.split(".launcher-gateway-popover {", 1)[1].split("}", 1)[0]- assert "border-radius: var(--border-radius-sm);" in popover_css---def test_launcher_gateway_disconnect_becomes_reconnect_through_the_launcher_bridge() -> None:- source = (- Path(__file__).parents[1]+ store = (+ root/ "plugins"/ "_a0_connector"/ "webui"/ "launcher-gateway-store.js"- ).read_text(encoding="utf-8")- assert "window.a0LauncherHost?.getState?.()" in source- assert "window.a0LauncherHost?.reconnect?.()" in source- assert "window.a0LauncherHost?.openSettings?.()" in source- assert 'typeof window.a0LauncherHost?.reconnect === "function"' in source- assert 'typeof window.a0LauncherHost?.openSettings === "function"' in source- assert "Host access is off in A0 Launcher." in source- assert 'state: "disconnected", connected: false, gateway: null' in source- assert 'state: "connecting", connected: false, gateway: null' in source---def test_launcher_computer_use_command_uses_the_bounded_approval_bridge() -> None:- root = Path(__file__).parents[1]- gateway_source = (- root / "plugins" / "_a0_connector" / "webui" / "launcher-gateway-store.js"- ).read_text(encoding="utf-8")+ )commands_source = (root / "plugins" / "_commands" / "webui" / "commands-slash-store.js").read_text(encoding="utf-8")- assert "async setComputerUse(enabled)" in gateway_source- assert "window.a0LauncherHost.rearmComputerUse()" in gateway_source+ assert not extension.exists()+ assert not store.exists()+ assert "a0LauncherHost" not in commands_source+ assert "launcher-gateway-store.js" not in commands_sourceassert 'type === "computer_use"' in commands_source