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
feat(guardrails): let a pinned run reach the tabs it opened itself
Shahriarf554cc6e8131
diff --git a/mcp/src/guardrails/scope.ts b/mcp/src/guardrails/scope.tsindex 0dc826f..7a53362 100644--- a/mcp/src/guardrails/scope.ts+++ b/mcp/src/guardrails/scope.ts@@ -21,6 +21,8 @@ export interface Scope {readonly hosts: readonly string[];/** Tab the run is pinned to. Undefined means the run may roam between tabs. */readonly tabId?: number;+ /** Tabs the run opened itself, which count as its own for the pinned-tab rule. */+ readonly ownedTabIds?: readonly number[];}/** No confinement. What an external MCP client gets: it has no run to be scoped to. */@@ -119,6 +121,8 @@ export function urlPayloadBytes(url: URL): number {export function targetsAnotherTab(action: string, input: unknown, scope: Scope): boolean {if (scope.tabId === undefined || !TAB_MOVES.has(action)) return false;const args = (input ?? {}) as { tabId?: unknown; match?: unknown };- if (typeof args.tabId === 'number') return args.tabId !== scope.tabId;+ if (typeof args.tabId === 'number') {+ return args.tabId !== scope.tabId && !scope.ownedTabIds?.includes(args.tabId);+ }return typeof args.match === 'string' && args.match.length > 0;}