# Remote-control mode allowance matrix — when is each of direct CDP, Browser Use, extension mode, and desktop fallback allowed?

**Phase:** 180.C.20.09
**Status:** Decision matrix.
**Scope:** The four ways Bellona can touch a remote browser/desktop, and the
exact conditions under which each is **allowed**, **conditionally allowed**, or
**refused**. This is the operator- and planner-facing rule for *which surface a
task may use*, consolidating the decisions in
`browser-use-vs-direct-cdp-evaluation.md` (180.C.20.01),
`chrome-extension-value-evaluation.md` (180.C.20.06), the 180.C.20.04 policy
gate, and the desktop-fallback rollback policy
(`desktop-compensating-actions.md`).

The governing principle, unchanged across all four: **direct CDP is the verified
default; everything else is opt-in, narrower, and policy-gated. No surface is
ever auto-selected to be "more capable," and the deterministic browser MVP never
requires anything but direct CDP** (180.C.20.10).

---

## 0. The four surfaces in one line each

| Surface | What it is | Determinism | Where it runs |
| --- | --- | --- | --- |
| **Direct CDP** | First-party Playwright-over-CDP host adapter; the plan fully determines the actions, no LLM in the loop | Deterministic | On-box, loopback CDP, isolated managed profile |
| **Browser Use** (local / cloud) | An LLM agent loop that decides each browser action; behind the provider interface | Non-deterministic | Local: on-box browser, model context off-box; Cloud: **browser + page content off-box** |
| **Extension mode** (MV3) | An optional trust-surface layer (indicator / consent popup / per-origin grant); **not** an automation backend | n/a (does not drive tasks) | In-page isolated world + extension service worker |
| **Desktop fallback** | Coordinate-based native input (click/type/focus) when no browser/API path exists; **no trustworthy undo** | Deterministic dispatch, **irreversible effects** | On-box OS input |

---

## 1. The allowance matrix

Legend: ✅ allowed · ⚠️ conditionally allowed (gate must pass) · ⛔ refused.

| Situation | Direct CDP | Browser Use (local) | Browser Use (cloud) | Extension mode | Desktop fallback |
| --- | :--: | :--: | :--: | :--: | :--: |
| A task expressible as a deterministic plan (the 180.C.19.09 templates) | ✅ **default** | ⛔ (no silent downgrade) | ⛔ | n/a backend | ⛔ (use the browser) |
| All regression / CI runs | ✅ | ⛔ | ⛔ | n/a | ⛔ |
| An under-specified / exploratory objective the templates can't pre-express | ⚠️ if it can be planned | ✅ (explicit select) | ⚠️ explicit select + approval | n/a | ⛔ |
| Touching credentials / a sensitive origin / upload / form submit | ✅ (host gates: 19.04/.06) | ⚠️ **plan-bound operator approval** (20.04) | ⚠️ **plan-bound approval** (20.04) | ⚠️ explicit capability grant + approval token + allow-listed origin | ⛔ unless no browser path AND operator approval |
| Page content must NOT leave the box | ✅ | ⚠️ only model context leaves | ⛔ (page DOM leaves the box) | ✅ (stays in-page) | ✅ |
| An authenticated / granted personal profile | ✅ (privileged, consented, visible-stream session) | ⛔ without 20.04 approval | ⛔ | ⚠️ per-origin grant surface only; no wholesale profile hand-off | ⛔ |
| Need a tamper-resistant "automation is active" indicator a page can't remove | (CDP overlay is removable) | — | — | ✅ **this is its job** | — |
| Need a spoof-proof consent/approval prompt in browser chrome | (Control Room dialog) | — | — | ✅ (action popup) refines Control Room + 20.04 | — |
| Need a human-visible, revocable per-origin grant | (host config) | — | — | ✅ (`host_permissions` model) | — |
| A target with **no** CDP/browser/API path (native app dialog, OS-level UI) | ⛔ | ⛔ | ⛔ | ⛔ | ⚠️ **last resort**, rollback-declared, operator-approved |
| `<all_urls>` / unrestricted origin scope | ⛔ (origin allow-list) | ⛔ | ⛔ | ⛔ **forbidden by construction** | ⛔ |

---

## 2. Per-surface allowance rules (the conditions behind the ⚠️/⛔)

### 2.1 Direct CDP — allowed by default, refused only by origin/profile gates

- **Allowed:** any task that can be expressed as a deterministic plan; every CI
  and regression run; any credential/sensitive-origin/upload/submit work (it is
  the only backend trusted with these by default, behind the 180.C.19.04/.06
  upload + credential guards and the origin allow-list).
- **Refused:** an origin outside the session's allow-list; a real personal
  profile without the explicit human-consent + visible-stream + restricted-origin
  preconditions (`browser-profile-isolation.md`); `<all_urls>`.
- **Never:** silently downgraded to a third-party agent
  (`selectRemoteBrowserAgentProvider` → `no_silent_downgrade`).

### 2.2 Browser Use (local) — opt-in, explicit, for under-specified objectives

- **Allowed:** only by **explicit** provider id/mode, for objectives the
  templates cannot pre-express, where a local model is available and page
  context staying on-box matters.
- **Conditional (⚠️):** any guarded exposure (authenticated/granted profile,
  sensitive origin, upload, form submit) requires a **plan-bound, single-use,
  unexpired operator approval** that matches the exact plan hash + provider and
  enumerates every detected reason/origin (180.C.20.04). Unconfigured → fails
  loud `provider_not_configured` (never fabricated).
- **Refused:** as a substitute for a deterministic plan; in CI.

### 2.3 Browser Use (cloud) — last-choice agent, page content leaves the box

- **Allowed:** only when neither direct CDP nor local Browser Use is viable,
  **with explicit operator approval**, accepting that **page DOM/screenshots
  leave the box** (`offBoxExecution: true`).
- **Conditional (⚠️):** the 180.C.20.04 gate applies with the highest blast
  radius; same plan-bound approval discipline as local, plus the off-box-privacy
  acceptance.
- **Refused:** any task where page content must not leave the box; CI;
  deterministic tasks.

### 2.4 Extension mode — optional trust surface, never an automation backend

- **Allowed (✅):** for the three value gaps it exists to fill (180.C.20.06):
  the tamper-resistant visible-automation indicator, the browser-chrome
  consent/approval popup, and the per-origin profile-grant surface. It runs only
  on its **explicit `host_permissions` origin allow-list**.
- **Conditional (⚠️):** any sensitive action it mediates (clipboard, file
  upload, form submission) is closed-by-default — refused unless the matching
  capability was explicitly granted **and** a single-use approval token +
  allow-listed origin match (`evaluateClipboardAccess` / `evaluateFileUpload` /
  `evaluateFormSubmission`). Page-world messages must pass
  `verifyExtensionMessageOrigin` (per-session token; malicious iframes rejected).
- **Refused (⛔):** as a task-driving backend (that is CDP); wholesale personal
  profile access; `<all_urls>` (rejected fail-loud by
  `compileExtensionOriginAllowList` / `assertManifestDomainScoped`); any
  authority after disable/uninstall (`runExtensionTeardown` revokes everything).
- **Never required:** the deterministic browser MVP runs entirely without the
  extension (180.C.20.10).

### 2.5 Desktop fallback — genuine last resort, irreversible, always approved

- **Allowed (⚠️ only):** when there is **no** browser/CDP/API path to the target
  (a native app dialog, OS-level UI a browser cannot reach), AND the mutation is
  **rollback-declared** with a compensating-action descriptor, AND the operator
  has approved it. Desktop input has **no trustworthy native undo** — every
  mutating desktop command is `manual_remediation_only`
  (`desktop-compensating-actions.md`).
- **Refused (⛔):** anything reachable via the browser (use CDP); any mutation
  without a declared compensating action; unattended/auto use. `desktop.emergency_stop`
  interrupts dispatch but does **not** undo already-sent input — so the bar to
  start is high.

---

## 3. Selection order (how a task picks a surface)

1. **Can it be a deterministic plan?** → **Direct CDP.** (Stop here for the
   templates, CI, and anything touching credentials/uploads/submits.)
2. **Is it under-specified / needs an agent, and can stay on-box?** → **Browser
   Use local**, by explicit selection, gated by 180.C.20.04 for any exposure.
3. **Under-specified, on-box not viable, off-box acceptable?** → **Browser Use
   cloud**, explicit + approved, accepting page content leaves the box.
4. **Is the need a trust surface (indicator / consent / per-origin grant), not
   driving the task?** → **Extension mode**, additive on top of (1).
5. **Is the target unreachable by any browser/API path?** → **Desktop
   fallback**, last resort, rollback-declared, approved.

At no step is a more-capable surface chosen to be "nicer"; each step is reached
only when the prior, more-trusted surface genuinely cannot do the job.

---

## 4. Evidence pointers

- Backend tradeoffs + the "direct CDP default, no silent downgrade" decision:
  `browser-use-vs-direct-cdp-evaluation.md` (180.C.20.01),
  `libs/bellona/remote-protocol/src/browser-agent-provider.ts`.
- The third-party exposure policy gate (authenticated profile / sensitive origin
  / upload / submit need plan-bound approval): same file, 180.C.20.04.
- Extension value, scope, and trust posture: `chrome-extension-value-evaluation.md`
  (180.C.20.06); extension security primitives
  `apps/bellona/remote-extension/src/`.
- Profile isolation / personal-profile preconditions:
  `browser-profile-isolation.md`.
- Desktop fallback irreversibility + rollback declarations:
  `desktop-compensating-actions.md`, `libs/bellona/remote-protocol/src/desktop.ts`.
