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.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
Merge remote-tracking branch 'origin/main' into feat/scheduled-tasks
Shahriara70ed0930897
diff --cc docs/guide/troubleshooting.mdindex 6acfce1,44c008b..d1f03e7--- a/docs/guide/troubleshooting.md+++ b/docs/guide/troubleshooting.md@@@ -27,10 -27,12 +27,15 @@@ Those three answer most questions. The| "Browsentic has not been given the microphone yet" | A browser cannot show its microphone prompt inside a side panel or a popup, so a fresh install has never been asked | Press **Allow microphone** and choose **Allow** in the tab that opens || "Microphone access is blocked" | The microphone was refused for the extension | Press **Allow microphone**, then click the icon at the left of that tab's address bar and set **Microphone** to **Allow** || "This browser has no speech service" | Brave and some Chromium builds ship speech recognition without a transcription service behind it | Type instead, or use Chrome or Edge for dictation |+ | No detach button in the panel's header, and no `/hands-free` | Hands-free is offered only where speech can be transcribed — never in Firefox or Brave, and not in a browser whose speech service has failed before it ever worked | Use Chrome or Edge. If the service was only out of reach, dictate in the panel once: the first word it transcribes brings the button back |+ | "Hands-free is not available here", and the mic left the page | The speech service failed before it had ever transcribed a word in this browser | As above. Open Browsentic from the toolbar to carry on by typing |+ | The hands-free mic says speech recognition stopped | The recognizer stopped for a reason other than a missing service — a language the service does not take, a moment offline, or the page it listens from could not start | Press the mic to try again. Unlike "no speech service", this never hides hands-free |+ | The hands-free mic turns amber and says another page took the microphone | Chrome runs one speech recognizer at a time, and another page or the panel started one | Press the mic to take it back |+ | Holding Control does nothing | Hold to talk is off; the key went to a frame embedded in the page (some editors); another key or a click joined it; or the mic is muted | Turn **Hold to talk** on from the mic's menu, click the page outside the embedded editor, and hold left Control on its own || `EXTENSION_OFFLINE` | Browser closed, or not paired | Open the browser; `browsentic sessions` to check pairing |+| After a reboot the panel stays offline until you run a command | The browser has no helper registered to start the daemon | Run `browsentic setup` once. `browsentic status` then lists the browsers under `wake-up:` |+| The panel stays offline after `browsentic stop` | A stop holds the browser's wake-up, so the daemon stays down as asked | `browsentic start`. `browsentic status` says `held` while it lasts |+| A scheduled task shows **Missed** | The browser was closed, the computer asleep, or no daemon was running at that time | Nothing to fix — it runs once when things are back unless the task says **Skip it**. `browsentic status` shows whether the browser can start the daemon itself || "Load unpacked" cannot see `~/browsentic` | A Flatpak or Snap browser, sandboxed away from your home directory. Snap Chromium is the Ubuntu default | Grant it: `flatpak override --user --filesystem=~/browsentic com.google.Chrome`. Or install somewhere the sandbox can read: `browsentic setup --dir ~/snap/chromium/common/browsentic-extension` || The folder picker does not show `~/browsentic` | It is there; some pickers open elsewhere by default | macOS: press ⇧⌘G and paste the path. Linux: Ctrl+L || Updated with `npx`, but the browser still runs the old build | Chrome never auto-reloads an unpacked extension | `browsentic status` names both versions. Press ↻ on the Browsentic card |diff --cc src/extension/components/composer.tsxindex 8c263e3,e8a456e..ffc97bf--- a/src/extension/components/composer.tsx+++ b/src/extension/components/composer.tsx@@@ -31,9 -30,8 +30,10 @@@ export function Composer(focus,picking,liveTools,+ handsFree,onToggleLiveTools,+ scheduling,+ onToggleScheduling,onAttachSkill,onCommand,tools,@@@ -60,9 -58,9 +60,11 @@@focus: FocusedElement | null;picking: boolean;liveTools: boolean;+ /** Whether `/hands-free` is offered — never where the browser cannot transcribe speech. */+ handsFree: boolean;onToggleLiveTools: () => void;+ scheduling: boolean;+ onToggleScheduling: () => void;onAttachSkill: (skill: AttachedSkill | null) => void;onCommand: (command: string) => void;tools: SavedToolMeta[];diff --cc src/extension/entrypoints/background.tsindex d3f9215,60da0fa..a200e2e--- a/src/extension/entrypoints/background.ts+++ b/src/extension/entrypoints/background.ts@@@ -15,8 -15,9 +15,10 @@@ import { appendEvents, recordingStateFoimport { closePanels, onPanelPresence, serveRunPorts, serveTabSessions, sweepFiles } from '@/lib/bridge/run-port';import { clearStrandedRail, serveRail, setPanelCollapsed, syncRail } from '@/lib/bridge/rail';import { serveTimers } from '@/lib/bridge/timer';+import { serveTaskNotices } from '@/lib/bridge/task-notices';import { serveToast } from '@/lib/bridge/toast';+ import { serveHandsFree } from '@/lib/bridge/hands-free';+ import { endHandsFree } from '@/lib/bridge/panel-view';import { closeSidebar, openSidePanel } from '@/lib/bridge/side-panel';import { isAgentKind } from '@/lib/agents/catalog';import {diff --cc src/extension/entrypoints/sidepanel/App.tsxindex f0bd23d,e462c86..6acb0eb--- a/src/extension/entrypoints/sidepanel/App.tsx+++ b/src/extension/entrypoints/sidepanel/App.tsx@@@ -1,5 -1,5 +1,5 @@@-import { useEffect, useMemo, useRef, useState } from 'react';+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';- import { ArrowDown, PanelRightClose, SquarePen } from 'lucide-react';+ import { ArrowDown, PanelRightClose, PictureInPicture2, SquarePen } from 'lucide-react';import { browser } from 'wxt/browser';import { invokeInActiveTab } from '@/lib/actions/client';@@@ -42,9 -42,9 +44,10 @@@ import { useStoredFiles } from '@/lib/bimport { useStoredRecordings } from '@/lib/bridge/use-stored-recordings';import { useStoredSessions } from '@/lib/bridge/use-stored-sessions';import { useStoredSkills } from '@/lib/bridge/use-stored-skills';+import { useStoredTasks } from '@/lib/bridge/use-stored-tasks';import { useVoiceComposer } from '@/lib/bridge/use-voice-composer';- import { useVoiceEnabled } from '@/lib/bridge/use-speech';+ import { useHandsFreeSupported, useVoiceEnabled } from '@/lib/bridge/use-speech';+ import { cn } from '@/lib/utils';const PINNED_SLACK_PX = 56;@@@ -148,15 -155,29 +162,36 @@@ export default function App()void closeSidePanel(windowId.current);}+ /**+ * A side panel cannot be shrunk, only closed, so detaching is a close dressed as a fold: the+ * panel collapses into a mic at its foot and drops away, and the page’s own mic rises from+ * the bottom once the panel is gone.+ */+ function detach() {+ if (detaching || !handsFree) return;+ setConnectionOpen(false);+ voice.setInput('');+ setDetaching(true);+ window.setTimeout(() => {+ void startHandsFree();+ void closeSidePanel(windowId.current);+ }, DETACH_MS);+ window.setTimeout(() => setDetaching(false), DETACH_MS + DETACH_STUCK_MS);+ }+function handleSend() {+ if (handsFree && isHandsFreeCommand(voice.input)) {+ detach();+ return;+ }- if (run.running || !connected) return;+ if (!connected) return;+ if (scheduling) {+ schedule({ text: voice.input.trim(), url: tabUrl });+ voice.setInput('');+ setScheduling(false);+ return;+ }+ if (run.running) return;open('chat');voice.submitNow();}@@@ -236,15 -252,10 +271,15 @@@const runningCount = run.sessions.filter((session) => session.runId).length;const offChatRun = runningCount > 0 && tab !== 'chat';const hasBanners = offChatRun || !!run.recording || run.monitors.length > 0 || !!run.draft;- const counts = { history: sessions.length, skills: skills.length, recordings: recordings.length };+ const counts = {+ history: sessions.length,+ skills: skills.length,+ recordings: recordings.length,+ tasks: tasks?.tasks.filter((task) => task.enabled).length ?? 0,+ };return (- <div className="relative flex h-screen flex-col">+ <div className={cn('relative flex h-screen flex-col', detaching && 'detaching')}><header className="flex shrink-0 items-center gap-2 px-3 py-2.5"><Wordmark className="flex-1" /><StatusPill@@@ -408,10 -412,13 +454,15 @@@picking={picking}liveTools={liveTools}onToggleLiveTools={() => setLiveTools((on) => !on)}+ scheduling={scheduling}+ onToggleScheduling={() => setScheduling((on) => !on)}onAttachSkill={setAttachedSkill}+ handsFree={handsFree}onCommand={(command) => {+ if (handsFree && isHandsFreeCommand(command)) {+ detach();+ return;+ }if (isRemoveToolsCommand(command)) {setShowTools(true);return;diff --cc src/lib/bridge/run-port.tsindex 3391ae0,46ad26e..3b907f0--- a/src/lib/bridge/run-port.ts+++ b/src/lib/bridge/run-port.ts@@@ -381,17 -388,10 +404,19 @@@ function handle(command: RunCommand): v}}+async function answerApproval(sessionId: string, toolId: string, allow: boolean, remember?: boolean): Promise<void> {+ const session = (await readTabSessions())[sessionId];+ if (!session?.runId) return;+ buffers.set(sessionId, patchTool(await bufferFor(sessionId), toolId, { awaiting: false }));+ await patchSession(sessionId, { pendingApproval: undefined });+ sendDecision(session.runId, toolId, allow, remember);+ dropTaskApproval(toolId);+}++ type Attached = { ok: true } | { ok: false; error: string };+/** A file belongs to the conversation of the tab it was dropped on, which is started here if need be. */- async function attach(file: NewFile, anchor: TabAnchor): Promise<void> {+ async function attach(file: NewFile, anchor: TabAnchor): Promise<Attached> {const ensured = await ensureSessionForTab(anchor);if (!ensured.ok) {await removeFile(file.id);diff --cc src/lib/toast/host.tsindex 18eed98,4e91400..f04dcd3--- a/src/lib/toast/host.ts+++ b/src/lib/toast/host.ts@@@ -1,6 -1,7 +1,7 @@@import { browser } from 'wxt/browser';+ import { OVERLAY_ATTRIBUTE } from '@/lib/overlay';import { RAIL_PALETTES, RAIL_TONES } from '@/lib/rail/events';-import { MAX_TOASTS, TOAST_CHANNEL, isToastCommand, type ToastView } from './events';+import { APPROVAL_ARMED_AFTER_MS, MAX_TOASTS, TOAST_CHANNEL, isToastCommand, type ToastView } from './events';export { TOAST_CHANNEL } from './events';diff --cc wxt.config.tsindex 9c50ba2,4a3ef82..e078f34--- a/wxt.config.ts+++ b/wxt.config.ts@@@ -25,9 -25,10 +25,10 @@@ export default defineConfig(description: 'Reimagine browsing as agentic — driven by the AI agent you already run, in your own logged-in browser.',permissions: ['storage', 'unlimitedStorage', 'activeTab', 'contextMenus', 'alarms', 'scripting',- 'notifications', 'downloads',+ 'notifications', 'downloads', 'nativeMessaging',- // Firefox has no sidePanel or debugger permission, and addons.mozilla.org flags each name it does not know.- ...(browser === 'firefox' ? [] : ['sidePanel', 'debugger']),+ // Firefox has no sidePanel, debugger or offscreen permission, and addons.mozilla.org flags each name it does not know.+ // offscreen is the hidden page hands-free mode listens through once the side panel is closed.+ ...(browser === 'firefox' ? [] : ['sidePanel', 'debugger', 'offscreen']),],host_permissions: ['<all_urls>'],// Release Firefox installs only what addons.mozilla.org has signed, and signing needs a