Skip to content

An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.

Merge branch 'feat/blocked-sites'

Shahriar5695ef1004b6
diff --cc docs/internals/extension.md
index 420d7c9,e79d935..90108e4
--- a/docs/internals/extension.md
+++ b/docs/internals/extension.md
@@@ -103,7 -103,7 +103,7 @@@ lists it as **Options** on the toolbar
The panel's header, the popup's header and the connection sheet open it with
`runtime.openOptionsPage()`, which focuses a settings tab already open rather than adding another.
- The page is a sidebar of six sections — **Extension**, **Profile**, **Guardrails**, **Agent**, **Connection**, **About** —
-The page is a sidebar of six sections — **Extension**, **Profile**, **Guardrails**, **Blocked sites**, **Agent**, **Connection** —
++The page is a sidebar of seven sections — **Extension**, **Profile**, **Guardrails**, **Blocked sites**, **Agent**, **Connection**, **About** —
with the open one in the URL hash, so a reload or a link lands on it; an unknown hash,
such as the old `#appearance`, lands on **Extension**. **Agent** and **Connection** are the same
`AgentPicker` and `DaemonLink` the popup and the connection sheet show; those keep theirs, so a
@@@ -117,14 -117,32 +117,40 @@@ page lists them with `commands.getAll()
browser owns the keys and only its own page changes them — `chrome://extensions/shortcuts`
(`edge://` on Edge), or `commands.openShortcutSettings()` on Firefox.
+ **Blocked sites** is the one section the daemon never sees. Its list is `browsentic/blockedSites` in
+ `storage.local`, written only by `useBlockedSites()` on this page, and no socket frame carries it in
+ either direction — the point of it is to bind the agent, so it cannot live on the agent's side of the
+ socket. It is enforced here, in three layers:
+
+ - **The gate** at the top of `invokeForHarness` ([invoke.ts](../../src/lib/bridge/invoke.ts)) checks the
+ target tab's `url` and `pendingUrl`, every frame on the focused path, and where the action would send
+ the browser (`navigate`, `captureDownload`). It is written as a list of exemptions — actions that touch
+ no tab, and `openTab`/`switchTab`/`closeTab`, which check the tab they pick in
+ [tabs.ts](../../src/lib/bridge/tabs.ts) — so an action added later is gated without anyone remembering
+ to. It also refuses any tab that is not an http(s) page, which is what keeps the debugger-backed
+ actions off the extension's own pages. After the action, the tab is checked again, and a result from a
+ tab that landed somewhere blocked is replaced by the refusal.
+ - **The content script** re-checks its own frame's `location.href` before dispatching
+ ([host.ts](../../src/lib/actions/host.ts)).
+ - **Everything that does not pass through the gate** checks for itself through
+ [site-guard.ts](../../src/lib/bridge/site-guard.ts): the scheduled-task tab, saved tools and their user
+ scripts, A-Eye, the recorder, monitors and diagnostics (which also end when their tab moves onto a
+ blocked site, or the list changes under them), recordings offered to the agent, and the run start,
+ which drops the tab's URL and the picked element.
+
+ The list is read from storage on every check — a woken worker's memory is not the truth — and a value
+ that is not a list refuses every web page rather than none. The pattern grammar is in
+ [blocked-sites.ts](../../src/lib/settings/blocked-sites.ts), one RegExp per pattern so that a user
+ script can carry the ones for its own origin.
+
+**About** reads, writes and sends nothing. Its links and the bug report's URL come from
+[src/lib/about.ts](../../src/lib/about.ts), which the Windows app shares; the Mac app keeps the same
+in `About.swift`. The versions are the manifest's, the build target (`import.meta.env.FIREFOX`), the
+daemon's from `DaemonState`, `SOCKET_PROTOCOL_VERSION`, the active agent, the browser's release
+(`userAgentData.brands`, or `runtime.getBrowserInfo()` on Firefox) and `runtime.getPlatformInfo()`.
+**Report a bug** opens the `bug_report.yml` issue form with those in its `environment` and `agent`
+fields; nothing leaves the browser until the reader submits it on GitHub.
+
**The theme and Guardrails are shared with the Mac app**, and the daemon keeps both in
`~/.browsentic/config.json`:
diff --cc src/extension/entrypoints/options/App.tsx
index c699483,d53b9da..8c39067
--- a/src/extension/entrypoints/options/App.tsx
+++ b/src/extension/entrypoints/options/App.tsx
@@@ -1,9 -1,9 +1,10 @@@
import { useEffect, useState, type ComponentType, type ReactNode } from 'react';
- import { Info, Link2, Puzzle, ShieldCheck, Sparkles, UserRound, type LucideIcon } from 'lucide-react';
-import { Ban, Link2, Puzzle, ShieldCheck, Sparkles, UserRound, type LucideIcon } from 'lucide-react';
++import { Ban, Info, Link2, Puzzle, ShieldCheck, Sparkles, UserRound, type LucideIcon } from 'lucide-react';
import { browser } from 'wxt/browser';
+import { About } from '@/extension/components/about';
import { AgentPicker } from '@/extension/components/agent-picker';
+ import { BlockedSitesSettings } from '@/extension/components/blocked-sites-settings';
import { Wordmark } from '@/extension/components/brand';
import { DaemonLink } from '@/extension/components/daemon-link';
import { ExtensionSettings, SettingsGroup } from '@/extension/components/extension-settings';
@@@ -15,7 -15,7 +16,7 @@@ import { useDaemonState } from '@/lib/b
import { useTheme } from '@/lib/bridge/use-theme';
import { cn } from '@/lib/utils';
- type SectionId = 'extension' | 'profile' | 'guardrails' | 'agent' | 'connection' | 'about';
-type SectionId = 'extension' | 'profile' | 'guardrails' | 'blocked' | 'agent' | 'connection';
++type SectionId = 'extension' | 'profile' | 'guardrails' | 'blocked' | 'agent' | 'connection' | 'about';
const SECTIONS: { id: SectionId; label: string; icon: LucideIcon; blurb: string; View: ComponentType }[] = [
{