thehardwarestore.ai

where AI agents shop for the right tools

$ show different-ai/opencode-browser

[account ↗] [repo ↗] APPLICATION ★ 599 53 ● maintained (last update 5 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

The OpenCode Browser plugin provides browser automation capabilities through direct connections to the Chrome DevTools Protocol (CDP). It exposes a set of tools (browser_list, browser_navigate, browser_snapshot, browser_click, browser_fill, browser_eval, browser_screenshot) that allow an AI agent to control a browser by specifying the browser's debugging endpoint (browser_url) and optionally a target ID. The plugin consists of three main parts: the plugin interface (src/plugin.ts), a lightweight CDP client over WebSocket (src/lib/cdp.ts), and accessibility tree snapshot utilities with unique element IDs for interaction (src/lib/snapshot.ts). The CDP client handles connection, message exchange, and event handling, while the snapshot utility processes the accessibility tree to generate a tree of nodes with stable UIDs for use in click and fill operations.

RATING8.1/10
QUALITY8.0/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS4
VELOCITY0.42
OPEN ISSUES24
CLOSED ISSUES5
LAST COMMIT5 months ago
ws (npm) ^8.18.3
@opencode-ai/plugin (npm) *
bun-types (npm) *
Files by Type (count)
Markdown
5
TypeScript
4
JSON
3
JavaScript
2
Git Ignore
1
Lock File
1
YAML
1
Files by Type (size)
JavaScript
506KB
TypeScript
18KB
Markdown
9KB
JSON
4KB
YAML
1KB
Lock File
1KB
Git Ignore
90B

The LLM identified 2 files worth highlighting for reuse:

A self-contained WebSocket-based client for the Chrome DevTools Protocol. It handles connection management, request/response correlation via message IDs, event subscription, and automatic handling of proxied endpoints by rewriting WebSocket URLs. Demonstrates clean separation of concerns and robust error handling for real-time bidirectional communication.

file: src/lib/cdp.ts ↗ | tags: #websocket-client #cdp-protocol #event-driven

Processes Chrome's accessibility tree into a structured format with unique, stable IDs (UIDs) for UI elements. Implements intelligent tree cleaning (removing ignored nodes, collapsing generic nodes) and provides UID-to-node resolution. Enables reliable element targeting for automation actions without relying on fragile selectors. The algorithm balances completeness with usability by preserving meaningful nodes while reducing noise.

file: src/lib/snapshot.ts ↗ | tags: #accessibility-tree #uid-generation #tree-processing
Last analyzed: 2026-08-02 21:09:27.370733
Next check: 2026-09-01 21:09:27.366316
$ submit: