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
test(agents): the OpenCode refusal tests expect the sign-in line the platform writes, so they pass on Windows, where it is a PowerShell line
Shahriardc56fd576912
diff --git a/src/daemon/agent/runners/opencode-acp.test.ts b/src/daemon/agent/runners/opencode-acp.test.tsindex e5b77d0..97411c1 100644--- a/src/daemon/agent/runners/opencode-acp.test.ts+++ b/src/daemon/agent/runners/opencode-acp.test.ts@@ -1,5 +1,5 @@import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';-import { opencodeRunner } from './opencode';+import { opencodeRunner, signInLine } from './opencode';import { streamContext, transcript, type Call } from './fixtures/support';import type { Conversation, StreamContext, StreamSink } from './types';@@ -193,15 +193,9 @@ describe('a turn', () => {// Recorded against the real Zen endpoint with no sign-in: ACP passes on only "Authentication required".test('a refused model OpenCode chose itself is named, with the paid model to pick instead', () => {- expect(through('free-tier')).toEqual([- [- 'fail',- 'AGENT_FAILED',- expect.stringMatching(- /^OpenCode Zen refused opencode\/big-pickle, which OpenCode chose because no model is picked in Browsentic\. .*Pick a paid model in the side panel, .*OPENCODE_DB=.*auth login --standalone\. \(Authentication required/,- ),- ],- ]);+ const failed = through('free-tier');+ expect(failed).toEqual([['fail', 'AGENT_FAILED', expect.stringMatching(/^OpenCode Zen refused opencode\/big-pickle, which OpenCode chose because no model is picked in Browsentic\. /)]]);+ expect(failed[0][2]).toContain(`Pick a paid model in the side panel, or sign Browsentic's OpenCode in to another provider with ${signInLine('opencode')}. (Authentication required`);});test('a refused model picked in Browsentic is named as picked, and one of another provider names the sign-in it lacks', () => {@@ -212,8 +206,9 @@ describe('a turn', () => {};expect(refusedFor('opencode/big-pickle')).toEqual([['fail', 'AGENT_FAILED', expect.stringMatching(/^OpenCode Zen refused opencode\/big-pickle\. Zen's free models/)]]);expect(refusedFor('mock/m1')).toEqual([- ['fail', 'AGENT_FAILED', expect.stringMatching(/^Browsentic's OpenCode has no working sign-in for mock, so it could not run mock\/m1\. Sign it in with OPENCODE_DB=/)],+ ['fail', 'AGENT_FAILED', expect.stringMatching(/^Browsentic's OpenCode has no working sign-in for mock, so it could not run mock\/m1\. /)],]);+ expect(refusedFor('mock/m1')[0][2]).toContain(`Sign it in with ${signInLine('opencode')}, or pick another model in the side panel.`);});test("another session's updates are not this turn's", () => {diff --git a/src/daemon/agent/runners/opencode.test.ts b/src/daemon/agent/runners/opencode.test.tsindex 99a5173..f1c1b91 100644--- a/src/daemon/agent/runners/opencode.test.ts+++ b/src/daemon/agent/runners/opencode.test.ts@@ -529,7 +529,9 @@ describe('reading an OpenCode 2 stream', () => {// Recorded against the real Zen endpoint, which still serves its free models only to OpenCode's own tools.test("Zen's free tier refusing a contained run says to pick a paid model, or sign Browsentic in to another provider", () => {const [[, , message]] = read2('2.0.32-free-tier.jsonl', 'fail');- expect(message).toMatch(/narrowed to the browser\. Pick a paid model in the side panel, .* another provider with OPENCODE_DB=/);+ expect(message).toContain(+ `narrowed to the browser. Pick a paid model in the side panel, which Zen bills to your OpenCode account, or sign Browsentic's OpenCode in to another provider with ${signInLine('opencode')}.`,+ );});test('a model, or an effort, OpenCode does not have says which to change', () => {