You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Repository navigation
Commit c89cbe2
Browse filesBrowse the repository at this point in the historyBrowse files
5.**Browser tooling** (required for the `/agent-browser` skill — details in [Browser automation](#browser-automation)):
38
+
- Install the CLI: `bun add -g agent-browser && agent-browser install` — `agent-browser install` provisions only the **Chrome fallback** engine.
39
+
- Lightpanda is **optional** and **headless-only**: install via the official user-level installer (not `cargo`) — `curl -fsSL https://pkg.lightpanda.io/install.sh | bash` (site: https://lightpanda.io).
40
+
- Engine rules: Lightpanda is auto-preferred when its binary is installed; Chrome is the fallback; an explicit `AGENT_BROWSER_ENGINE=chrome|lightpanda` overrides auto-selection.
41
+
6.**Verify**: `opencode debug config`, `hiai-opencode doctor`, `hiai-opencode mcp-status`; for browser tooling confirm `agent-browser --version` and, if Lightpanda was installed, `lightpanda version`.
38
42
39
43
Operating rules: keep OpenCode plugins separate from MCP servers; never add MCP server packages to the `plugin` array; never print/invent/commit API keys; prefer user-level or project-local installs (no sudo).
40
44
@@ -101,7 +105,7 @@ Use [bob.env.example](bob.env.example) as the canonical template. Model provider
|`AGENT_BROWSER_ENGINE`| Browser engine — auto-selects `lightpanda` when its binary is installed; `chrome`is the fallback; an explicit `chrome`\|`lightpanda`value overrides auto-selection|
105
109
|`GREP_APP_API_KEY`| Optional grep.app search |
106
110
|`OLLAMA_BASE_URL`, `OLLAMA_MODEL`| Local Ollama models |
@@ -153,17 +157,23 @@ The plugin can't find its bundled config. Run `bun run build` to populate `dist/
153
157
Firecrawl is a CLI skill, not an MCP server. The env var must be in the shell that runs the CLI skill — `export FIRECRAWL_API_KEY=fc-...` before starting OpenCode, or set it in `bob.env`. It is NOT configured in the `mcp` block.
154
158
155
159
### Browser automation
156
-
Use the `/agent-browser` skill (not MCP). Install: `bun add -g agent-browser && agent-browser install`. Uses native Chrome via CDP — no Playwright. Key env: `AGENT_BROWSER_HEADED=1`, `AGENT_BROWSER_SESSION=name`. Pattern: `snapshot -i --json` → @eN refs → `click @e2`. Repo: https://github.com/vercel-labs/agent-browser
160
+
Use the `/agent-browser` skill (not MCP). Install: `bun add -g agent-browser && agent-browser install`. Uses CDP against Lightpanda (preferred when installed) or Chrome (fallback) — no Playwright. Key env: `AGENT_BROWSER_HEADED=1`, `AGENT_BROWSER_SESSION=name`. Pattern: `snapshot -i --json` → @eN refs → `click @e2`. Repo: https://github.com/vercel-labs/agent-browser
157
161
158
-
`agent-browser install` only sets up the **default engine (Chrome)** — it does **not** install Lightpanda.
162
+
`agent-browser install` only provisions the **fallback engine (Chrome)** — it does **not** install Lightpanda, and neither does the npm plugin (no binary auto-download).
159
163
160
-
**Lightpanda (optional, headless-only):** install via the official one-liner (not `cargo`):
164
+
**Engine auto-selection:** if the `lightpanda` binary is installed and `AGENT_BROWSER_ENGINE` is **not** set, the runtime prefers **Lightpanda** (headless-only). **Chrome is the fallback** — used when Lightpanda is absent, or when an explicit override forces it.
165
+
166
+
**Lightpanda (optional, headless-only):** separate user-level install via the official installer (not `cargo`):
Select it per-run with the CLI flag `agent-browser --engine lightpanda open <url>`, or set `AGENT_BROWSER_ENGINE=lightpanda` for the whole session. Headed mode (`AGENT_BROWSER_HEADED=1`) works only with Chrome — Lightpanda is headless-only. Chrome remains the default and fallback engine.
172
+
**Explicit override** (beats auto-selection) — env var for the whole session, or CLI flag per run:
173
+
-`AGENT_BROWSER_ENGINE=chrome` / `agent-browser --engine chrome open <url>` — force Chrome
174
+
-`AGENT_BROWSER_ENGINE=lightpanda` / `agent-browser --engine lightpanda open <url>` — force Lightpanda
175
+
176
+
Headed mode (`AGENT_BROWSER_HEADED=1`) works only with Chrome — Lightpanda is headless-only.
167
177
168
178
### Agent prompt correct in source but wrong at runtime
169
179
The runtime prompt is assembled in layers: (1) `src/agents/<agent>.ts`, (2) `src/prompt-library/*.ts` imports, (3) runtime hooks (closure-injector, caveman-system-injector), (4) `hooks.config` in [src/index.ts](src/index.ts) applies model/visibility/permissions. Inspect `hooks.config` first when runtime output diverges from source.
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,18 @@ CLI skills (not MCP, invoked via `skill("...")` or shell):
186
186
187
187
-`firecrawl` — web scraping (requires `FIRECRAWL_API_KEY`)
188
188
-`context7` — on-demand library docs via `skill("explore/context7")`
189
-
-`agent-browser` — browser automation via Chrome CDP (uses `/agent-browser` skill)
189
+
-`agent-browser` — browser automation via CDP on Lightpanda (preferred when installed) or Chrome (fallback) (uses `/agent-browser` skill)
190
+
191
+
### Browser engine selection
192
+
193
+
The external `agent-browser` CLI owns launching the browser engine — the plugin never starts, downloads, or embeds one. The plugin's only engine logic is a small availability-aware selection step in [src/shared/agent-browser-engine.ts](src/shared/agent-browser-engine.ts): `applyAgentBrowserEngineDefault()` (invoked from [src/index.ts](src/index.ts) before agent creation) checks whether a `lightpanda` binary exists on `$PATH` and, if so while `AGENT_BROWSER_ENGINE` is unset, sets the variable to `lightpanda`. Otherwise the variable is left **unset** so upstream `agent-browser` falls back to its own default engine, **Chrome** — the plugin never hardcodes Chrome, and the Chrome fallback remains.
194
+
195
+
-**Auto-selection:** if the `lightpanda` binary is on `$PATH` and `AGENT_BROWSER_ENGINE` is **not** set, the plugin sets `AGENT_BROWSER_ENGINE=lightpanda`, so upstream prefers **Lightpanda** (headless-only).
196
+
-**Fallback:****Chrome**, `agent-browser`'s own default engine, provisioned by `agent-browser install`.
197
+
-**Explicit override** beats auto-selection: `AGENT_BROWSER_ENGINE=chrome|lightpanda` (env, whole session) or `agent-browser --engine chrome|lightpanda open <url>` (CLI flag, per run). An explicit value is always honored verbatim.
198
+
-**Install boundary:** Lightpanda is a separate **user-level** install via its official installer (`curl -fsSL https://pkg.lightpanda.io/install.sh | bash`, not `cargo`). Neither the npm plugin nor `agent-browser install` downloads the Lightpanda binary — the plugin only detects an already-installed binary on `$PATH`.
199
+
200
+
Headed mode (`AGENT_BROWSER_HEADED=1`) works only with Chrome.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.6.1] — 2026-08-13
9
+
10
+
### 🌐 Runtime Lightpanda auto-selection
11
+
12
+
-**New availability-aware engine default.**`applyAgentBrowserEngineDefault()` (`src/shared/agent-browser-engine.ts`), invoked from the plugin entry before agents are created, checks whether a `lightpanda` binary is on `$PATH` and — while `AGENT_BROWSER_ENGINE` is unset — sets the variable to `lightpanda`. Otherwise the variable stays **unset** so upstream `agent-browser` falls back to its own default engine, **Chrome**; the plugin never hardcodes Chrome.
13
+
-**Explicit override always wins:**`AGENT_BROWSER_ENGINE=chrome|lightpanda` (env, whole session) or `agent-browser --engine chrome|lightpanda open <url>` (CLI flag, per run) beats auto-selection; `chrome` forces the fallback engine even when Lightpanda is installed.
14
+
-**Install boundary clarified:** Lightpanda is a separate **user-level** install via its official installer (`curl -fsSL https://pkg.lightpanda.io/install.sh | bash`, not `cargo`). Neither the npm plugin nor `agent-browser install` downloads the Lightpanda binary — `agent-browser install` provisions Chrome only; the plugin detects an already-installed binary on `$PATH`, it never downloads or embeds an engine.
15
+
- New unit tests for PATH discovery and the auto-selection default (`src/shared/agent-browser-engine.test.ts`).
16
+
17
+
### 🖥️ CLI doctor diagnostics
18
+
19
+
-**`hiai-opencode mcp-status` now reports the browser-engine state:** a **Lightpanda engine** check (ok when the binary is on PATH; info when missing, with the install one-liner hint) and an **Agent-browser effective engine** check that traces the resolution chain — explicit `AGENT_BROWSER_ENGINE` → auto-selected Lightpanda on PATH → Chrome fallback.
20
+
-**New info status level (ℹ️)** for non-blocking diagnostics alongside ok/warn/error.
21
+
-**`hiai-opencode diagnose` now includes `AGENT_BROWSER_ENGINE`** in the environment snapshot.
22
+
23
+
### 📚 Docs & install guidance
24
+
25
+
-**Engine auto-selection documented consistently** across `README.md`, `ARCHITECTURE.md`, `AGENTS.md`, `bob.env.example`, and the vision skills: the runtime prefers **Lightpanda** (headless-only) when its binary is installed and `AGENT_BROWSER_ENGINE` is unset; **Chrome** is the fallback.
26
+
-**README gains a dedicated "Install browser automation" step** (optional): `bun add -g agent-browser && agent-browser install` provisions the Chrome fallback, Lightpanda installs via its official one-liner, and engine overrides plus the headed-mode caveat (`AGENT_BROWSER_HEADED=1` is Chrome-only) are spelled out.
27
+
-**`AGENTS.md` bootstrap checklist and browser-automation troubleshooting** now cover Lightpanda installation, engine auto-selection rules, and explicit overrides; **`ARCHITECTURE.md`** gains a "Browser engine selection" section describing the plugin's engine boundary (detect, never launch/download/embed).
28
+
-`bob.env.example` now shows `AGENT_BROWSER_ENGINE` as an explicit override example (both `lightpanda` and `chrome`), with no secrets added.
Copy file name to clipboardExpand all lines: README.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Most AI coding tools drop you into one big context window and hope the model sel
22
22
- 🔍 **Diagnostics are mandatory, not optional.** Edit a file and the completion gate blocks until `lsp_diagnostics` has run clean and any failing `test` / `lint` / `typecheck` passes.
23
23
- 🧠 **A real team, not a monologue.** Bob routes by category — quick work to a cheap executor, hard implementation to a Senior Engineer, architecture to a Principal Architect, UI to a Designer, docs to a Writer.
24
24
- 🗜️ **Context that survives compaction.** Long sessions compact gracefully — in-memory gate state (failed quality check, pending diagnostics, unreviewed changes) is re-injected into the compaction context so the post-compaction agent still knows what blocks completion.
25
-
- ⚡ **No external services.** Everything is local: SQLite memory (Bun), LSP via `npx`, browser via Chrome CDP. Zero cloud dependencies, zero data leaves your machine.
25
+
- ⚡ **No external services.** Everything is local: SQLite memory (Bun), LSP via `npx`, browser via local Lightpanda/Chrome CDP. Zero cloud dependencies, zero data leaves your machine.
26
26
- 🪝 **One line to install.** No separate MCP server config, no manual wiring — `opencode plugin @hiai-gg/hiai-opencode@latest --global`.
27
27
28
28
---
@@ -54,7 +54,25 @@ cp bob.env.example bob.env
54
54
# Edit bob.env — add FIRECRAWL_API_KEY for web scraping (optional)
55
55
```
56
56
57
-
### 4. Verify
57
+
### 4. (Optional) Install browser automation
58
+
59
+
Vision's browser tools talk to a local engine over CDP. Engine selection is automatic: **Lightpanda** when its binary is on your PATH, **Chrome** otherwise.
60
+
61
+
Install the CLI and provision the Chrome fallback:
62
+
63
+
```bash
64
+
bun add -g agent-browser && agent-browser install
65
+
```
66
+
67
+
**Lightpanda** ([lightpanda.io](https://lightpanda.io)) — optional, preferred when installed, headless-only. Separate user-level install via the official installer, not `cargo`:
Force an engine per session with `AGENT_BROWSER_ENGINE=chrome|lightpanda`, or per run with `agent-browser --engine chrome|lightpanda open <url>`. Headed mode (`AGENT_BROWSER_HEADED=1`) works only with Chrome.
74
+
75
+
### 5. Verify
58
76
59
77
```bash
60
78
opencode debug config
@@ -72,7 +90,12 @@ Paste this into a fresh session:
72
90
Read AGENTS.md and finish hiai-opencode setup for this workspace.
73
91
Check that @hiai-gg/hiai-opencode is registered, enable MCP services that can run here
74
92
(sequential-thinking: node/npx; grep_app: no key), verify with opencode debug config
75
-
and hiai-opencode doctor. Report missing keys without printing secret values.
93
+
and hiai-opencode doctor.
94
+
Install and configure browser automation for Vision as documented in AGENTS.md:
95
+
bun add -g agent-browser && agent-browser install, plus Lightpanda via its official
96
+
installer when possible. Verify with agent-browser --version and lightpanda version
97
+
(if installed), then run hiai-opencode doctor again.
98
+
Report missing keys without printing secret values.
76
99
```
77
100
78
101
---
@@ -99,13 +122,15 @@ Bob routes work; the rest execute. Three are visible in the picker (you can invo
-**Agent Browser (14)** — Navigate, snapshot, click, fill, screenshot, eval, console, and more. Native Chrome via CDP — no Playwright. Restricted to Vision/General agents.
125
+
-**Agent Browser (14)** — Navigate, snapshot, click, fill, screenshot, eval, console, and more. CDP via Lightpanda (preferred when installed) or Chrome (fallback) — no Playwright. Restricted to Vision/General agents.
103
126
-**Memory (1)** — `hiai_memory_search`: BM25-ranked SQLite FTS5 search over MEMORY.md, checkpoints, notes, and task progress.
104
127
-**Session Manager (4)** — List, read, search, and inspect sessions.
105
128
-**Worktree (4)** — `hiai_worktree_create`/`_list`/`_remove`/`_status` for isolated parallel work.
106
129
-**Skills (1)** — `skill("build/shadcn-ui")`, `skill("explore/context7")`, etc.
**Browser engines (auto-selected):** the runtime prefers **Lightpanda** ([lightpanda.io](https://lightpanda.io); headless-only) when its binary is on your PATH and `AGENT_BROWSER_ENGINE` is unset; **Chrome** is the fallback. Override per session with `AGENT_BROWSER_ENGINE=chrome|lightpanda`, or per run with `agent-browser --engine chrome|lightpanda open <url>`. Headed mode (`AGENT_BROWSER_HEADED=1`) works only with Chrome. Lightpanda installs separately via its official installer (not `cargo`) — neither the npm plugin nor `agent-browser install` downloads it. See [Install](#install).
0 commit comments