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.

fix(agents): the OpenCode 2 sign-in line for Windows assigns OPENCODE_DB with no spaces, as before ccf42b6, so the sign-in hints read OPENCODE_DB= on Windows too and their tests pass there

Shahriar4b7ebd316b9f
diff --git a/src/daemon/agent/runners/opencode.test.ts b/src/daemon/agent/runners/opencode.test.ts
index 249fe9a..562483f 100644
--- a/src/daemon/agent/runners/opencode.test.ts
+++ b/src/daemon/agent/runners/opencode.test.ts
@@ -610,8 +610,8 @@ describe('OpenCode 2 readiness', () => {
expect(signInLine('opencode', 'darwin')).toBe(`OPENCODE_DB='${db}' opencode auth login --standalone`);
expect(signInLine("/Users/o'neil/bin/opencode 2", 'darwin')).toBe(`OPENCODE_DB='${db}' '/Users/o'\\''neil/bin/opencode 2' auth login --standalone`);
expect(signInLine("C:\\Users\\o'neil\\opencode.cmd", 'win32')).toBe(
- `$before = $env:OPENCODE_DB; $env:OPENCODE_DB = '${db.replaceAll("'", "''")}'; ` +
- `try { & 'C:\\Users\\o''neil\\opencode.cmd' auth login --standalone } finally { $env:OPENCODE_DB = $before }`,
+ `$before=$env:OPENCODE_DB; $env:OPENCODE_DB='${db.replaceAll("'", "''")}'; ` +
+ `try { & 'C:\\Users\\o''neil\\opencode.cmd' auth login --standalone } finally { $env:OPENCODE_DB=$before }`,
);
});
});
diff --git a/src/daemon/agent/runners/opencode.ts b/src/daemon/agent/runners/opencode.ts
index 1c932e5..500907a 100644
--- a/src/daemon/agent/runners/opencode.ts
+++ b/src/daemon/agent/runners/opencode.ts
@@ -440,7 +440,7 @@ export function signInLine(bin: string, platform: NodeJS.Platform = process.plat
const db = database2();
if (platform === 'win32') {
const literal = (value: string) => `'${value.replaceAll("'", "''")}'`;
- return `$before = $env:OPENCODE_DB; $env:OPENCODE_DB = ${literal(db)}; try { & ${literal(bin)} auth login --standalone } finally { $env:OPENCODE_DB = $before }`;
+ return `$before=$env:OPENCODE_DB; $env:OPENCODE_DB=${literal(db)}; try { & ${literal(bin)} auth login --standalone } finally { $env:OPENCODE_DB=$before }`;
}
const quote = (value: string) => `'${value.replaceAll("'", `'\\''`)}'`;
return `OPENCODE_DB=${quote(db)} ${/^[\w./-]+$/.test(bin) ? bin : quote(bin)} auth login --standalone`;