Commit Graph
1374 Commits
Author SHA1 Message Date
Ryan Vogel 27c09b4d3a feat(browser-extension): sidebar as a plain client, browse tools, and pairing setup
The side panel no longer brings its own browser tools into opencode. It is an
opencode client like the desktop app and TUI; agents drive the browser through
the `browse` MCP server (renamed from opencode-browser), and setup pairs the
extension with opencode instead of using a native messaging host.

Removed / replaced:
- The per-session browser attachment (session-browser, page, cdp, files,
  profiling, analysis, diagnostics, preview): the panel no longer attaches
  `browser.*` tools or writes instruction entries. Instead, each prompt sent
  from the panel is preceded by a synthetic "Browser context" message
  (resume: false) naming the page; a tab shared with agents comes with its
  Chrome tab id. Sent only when the page or its sharing changed.
- The opencode plugin (site_scripts, browsing, browser.tabs.request) and its
  relay-link: these are browse MCP tools now (site_scripts_*, browsing_*,
  tabs_request), sent through the relay as `extension.request`
  (POST /extension/request, 10-minute timeout for the user's answer).
  tabs_request adopts the approved tab into the session.
- The native messaging host and service discovery: the extension keeps a list
  of paired servers (background/servers.ts, chrome.storage.local). connect.html
  redeems a one-time code from opencode's own pairing (POST /api/pair,
  GET /auth/connect/:code -> 30-day token used as the password) and renews the
  token a week before expiry. Loopback links pair right away; others ask.
  Servers can also be added by hand with a code or the service password; the
  directory menu switches, adds, and forgets servers.
- Permissions nativeMessaging, downloads, webNavigation.

Setup (cli/src/setup.ts):
- `install` writes the `browse` MCP entry (renaming the old one), removes the
  old host and plugin, then runs `connect`.
- `connect` finds browsers/profiles with the extension (default browser
  first; macOS-protected profiles are reported as unknown and asked about),
  opens connect.html#server=&code= there via the browser's executable and
  --profile-directory, opens the Web Store listing when missing, and prints
  the link and code when headless (no TTY, SSH, no display, --no-open).
- The relay reports the extension's build in /extension/status; install
  checks the build changed after asking for a reload, and says so (and skips
  connect) when it didn't.

Fixed: the extension's runtime.reload closed its socket with code 1001,
which browsers reject (only 1000 or 3000-4999), so the reload threw and never
ran; every install since reported "Reloaded" while Helium kept the old
build. It closes with 1000 now.

Also: session_adopt / `session adopt --tab-id` adopt a tab by Chrome tab id;
"Share tab" above the composer lets agents use the current tab; agent guide
renamed to skills/browse; store listing and privacy policy updated.

Verified in the user's Helium: `connect --yes` detected Helium/Ryan (default),
Chrome unreadable (macOS privacy), Arc without the extension, opened the
connect page, which showed "Connected · This computer · 4102". Through the
browse MCP server: site_scripts_list, tabs_request (returned the tab id and
adopted it), session_adopt({ tabId }) (success, exclusivity error, unknown-tab
error). The synthetic message with metadata was accepted and stayed queued
(resume: false). A clean headless Chromium loads the build and the connect
page answers. Install now reports a stale reload instead of claiming success.
Typecheck (extension, cli), lint. Upstream relay suite: 871/888; the new
failures are the 9 MCP tests asserting the old server name.
Not yet verified: the panel UI (server menu, Share tab, composer flow).
2026-10-06 16:39:48 -04:00
Ryan Vogel 2ba1f4e05c feat: rename Open Extension to opencode Browser and set up Browser Control in install
The extension becomes "opencode Browser", the product that will also take over
Browser Control's extension, and the CLI command follows it.

Renamed:
- packages/open-extension -> packages/browser-extension (@opencode/browser-extension),
  manifest name, panel copy, README, and agent-facing text.
- `opencode sidepanel` -> `opencode browser` (install/status/uninstall/host);
  services/sidepanel.ts -> services/browser-extension.ts.
- Native host ai.opencode.sidepanel -> ai.opencode.browser; plugin id, file
  (plugins/opencode-browser.ts), relay RPC (opencode-browser.relay), panel port,
  session context keys, and cursor element id use "opencode-browser".

Install now:
- adds the Browser Control MCP server to opencode's global config (browser-control
  on PATH, else npx @opencode-ai/browser-control), with
  BROWSER_CONTROL_EXTENSION_ORIGINS so existing relays accept this extension;
  skips it when a browser-control server is already configured;
- uses clack steps and, in a terminal, waits up to 3 minutes for the extension's
  first connection; status also reports the Browser Control MCP server.

Verified: cli and extension typecheck, extension build, and root lint pass; in a
temp HOME/XDG, `opencode browser install` registered Helium, wrote the MCP entry
to opencode.json, started the service, and `status` reported all three.
2026-10-02 13:08:23 -04:00
Ryan Vogel 05f5563672 chore(open-extension): align package metadata with the workspace
Use the shared workspace version (2.0.22) like the other packages and drop the
test script: the package has no test files, and CI runs `turbo test
--affected`, where `bun test` with no tests would fail the job.

Verified: bun install leaves the lockfile consistent; typecheck and build pass.
2026-10-02 12:23:38 -04:00
Ryan Vogel 9390e9a3b8 feat(open-extension): add site scripts managed by the extension
Agents (and the user) can now extend websites with scripts that Open Extension
injects itself through chrome.userScripts, the API Tampermonkey uses, instead
of asking the user to install a userscript manager.

- Background stores scripts in chrome.storage.local, registers them in the
  isolated USER_SCRIPT world, and reconciles registrations on startup. Drafts
  may carry a // ==UserScript== header (@name, @description, @match,
  @exclude-match, @run-at); unsupported keys become warnings.
- New opencode plugin (plugin/open-extension.ts) adds site_scripts.install /
  list / get / set_enabled / remove tools. It relays each call over a new
  open-extension.scripts RPC: the plugin emits a control event, the extension
  claims the command once (so two browser profiles never both ask), runs it,
  and returns the result. Without an open side panel the tools fail fast
  after 8 seconds with instructions.
- Agent installs wait for the user's approval in any open side panel
  (approvals message / approval.reply); a cancelled tool call withdraws it.
- Manifest gains the userScripts permission and <all_urls> host access,
  which userScripts needs to inject into matched sites.
- host:install also bundles the plugin into ~/.config/opencode/plugins.

Verified: typecheck and build pass; the live server loaded the plugin and
exposed the site_scripts namespace; with no panel, list failed after 8s with
the instruction; in Chrome for Testing with user scripts allowed, an agent
install was approved, registered, and ran on example.com (data attribute set).
Side panel UI for approvals and script management follows separately.
2026-10-02 12:21:54 -04:00
Ryan Vogel fe5895e57d feat(open-extension): add browser host, service discovery, and native helper
Adds packages/open-extension, a Chromium MV3 extension ("Open Extension") that
lets opencode agents use real browser tabs from a side panel, modeled on the
ChatGPT extension's side chat.

- Background service worker implements the browser end of the built-in
  opencode.browser plugin's experimental.browser RPC (attach v4, state,
  command, result), the same contract the desktop pane implements with
  Electron. Agents' browser.* tools now drive Chrome tabs via chrome.debugger.
- Tab access is limited to tabs the agent opens (grouped as "opencode") and
  tabs the user explicitly shares; closing a shared tab only releases it.
- Page operations are ported from gui-extensions/src/browser/chromium.ts;
  file uploads become page-side File objects. Downloads, traces, CPU/heap
  profiles, Lighthouse, and preview report "unsupported" for now.
- Native messaging host (ai.opencode.open_extension) returns the background
  service URL and password via `opencode service start/get password`;
  `bun run host:install` registers it for installed Chromium browsers.
- The side panel is a placeholder; its UI lands separately.

Verified: bun typecheck and vite build pass; a live attach handshake against
the running service returned the attached control event and accepted state;
the installed host answered {ok,url,password} under a minimal environment.
2026-10-02 12:21:54 -04:00
Shoubhit Dash 134d0ede4d fix(acp): align permission requests with the tool call spec (#52565) 2026-10-02 16:51:36 +05:30
opencode d259ae7163 sync release versions for v2.0.22 2026-10-02 04:23:05 +00:00
Shoubhit Dash 31a683f5ca chore(acp): bump @agentclientprotocol/sdk to 1.6.0 (#52559) 2026-10-02 00:38:00 +05:30
Luke Parker f406d93a66 refactor(app): move GUI features into built-in extensions (#52369) 2026-10-01 15:17:55 +10:00
opencode dd2af0e5fc sync release versions for v2.0.21 2026-09-30 23:02:16 +00:00
Simon Klee 0159356be6 tui: upgrade OpenTUI to 0.5.14 (#52316) 2026-09-30 15:16:51 +00:00
Simon Klee 1243d09dbc tui: update OpenTUI to 0.5.13 (#52233) 2026-09-30 06:13:28 +00:00
opencode 8d8a7bc844 sync release versions for v2.0.20 2026-09-29 21:08:02 +00:00
Aiden Cline 4d9090790b feat(core): add separate ChatGPT token-sharing OAuth method (#52147) 2026-09-29 14:48:51 -05:00
Luke Parker a604b7f773 fix(ui): calm diff word highlights with @pierre/diffs 1.5.1 (#51236) 2026-09-29 14:58:24 +10:00
Luke Parker 293d60a89f chore(desktop): bump electron to 44.4.5 (#52005) 2026-09-29 14:50:04 +10:00
opencode f02c30eb55 sync release versions for v2.0.19 2026-09-29 04:31:02 +00:00
1d4e1233e5 feat(cli): share grouped auth picker with MCP auth (#51006)
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: thdxr <[email protected]>
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: Filip Hejmowski <[email protected]>
2026-09-26 11:42:04 +02:00
opencode 39021dfd67 sync release versions for v2.0.18 2026-09-25 23:57:39 +00:00
Aiden Cline 29ce49db0f refactor(util): share a browser opener across cli, tui, and core (#51412) 2026-09-25 18:00:32 -05:00
opencode 00738c5b2d sync release versions for v2.0.17 2026-09-25 21:09:12 +00:00
Simon Klee 917d904f18 tui: update OpenTUI v0.5.12 (#50567) 2026-09-25 08:17:14 +00:00
opencode ac2426e103 sync release versions for v2.0.16 2026-09-24 06:34:17 +00:00
Vladimir GlafirovandAiden Cline f0aff6cfe8 feat(core): restore GitLab workflow discovery and add OAuth login (#50422)
Co-authored-by: Aiden Cline <[email protected]>
2026-09-23 23:00:52 -05:00
opencode-agent[bot]andnexxeln dddb5eb96f fix(util): update OpenTelemetry to patched core (#50867)
Co-authored-by: nexxeln <[email protected]>
2026-09-23 20:57:16 +05:30
opencode a25d304201 sync release versions for v2.0.15 2026-09-23 07:15:55 +00:00
Vladimir Glafirov d5d4461e67 chore: bump gitlab-ai-provider to 6.16.0 (#50318) 2026-09-22 23:13:04 -05:00
Shoubhit Dash 3a2203eaac fix(core): install git plugins from branch subdirectories (#50754) 2026-09-23 04:21:36 +05:30
opencode 8864eb507e sync release versions for v2.0.14 2026-09-22 13:13:11 +00:00
opencode be4e5a6d06 sync release versions for v2.0.13 2026-09-22 10:08:00 +00:00
Brendan AllanandBrendonovich 080b7671de feat(desktop): add local device pairing (#49291)
Co-authored-by: Brendonovich <[email protected]>
2026-09-22 16:24:56 +08:00
Luke Parker 932c12ad1d chore(desktop): upgrade Electron to 44.4.3 (#50327) 2026-09-21 21:33:49 +10:00
opencode 6f655dcbab sync release versions for v2.0.12 2026-09-21 09:57:01 +00:00
opencode 991b727eb8 sync release versions for v2.0.11 2026-09-20 08:57:41 +00:00
opencode cb6d95b7ef sync release versions for v2.0.10 2026-09-19 13:40:59 +00:00
opencode 45a13af0ee sync release versions for v2.0.9 2026-09-19 05:13:01 +00:00
004583d598 refactor(codemode): remove TypeScript stripping (#49870)
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
2026-09-18 21:24:11 -05:00
Luke Parker 1c90e8f01c perf(app): drop luxon for the three date operations that used it (#49876) 2026-09-19 12:00:32 +10:00
Luke Parker f6353a48b5 perf(desktop): replace electron-store with a plain JSON settings store (#49791) 2026-09-19 09:41:44 +10:00
Luke Parker 4facc03371 perf(desktop): remember window bounds without electron-window-state (#49792) 2026-09-19 09:41:15 +10:00
opencode c076066c33 sync release versions for v2.0.8 2026-09-18 09:12:33 +00:00
Luke Parker 0a6111291e refactor(desktop): send IPC messages by structured clone (#49701) 2026-09-18 18:28:20 +10:00
opencode 0fa881efd0 sync release versions for v2.0.7 2026-09-17 19:29:59 +00:00
opencode 040d2ffb48 sync release versions for v2.0.6 2026-09-17 11:17:33 +00:00
opencode 4d73b40e59 sync release versions for v2.0.5 2026-09-16 16:35:05 +00:00
opencode 7c3c50bac2 sync release versions for v2.0.4 2026-09-16 04:41:12 +00:00
Aiden Cline b693c222da feat(core): configure MCP OAuth authorization server metadata (#49126) 2026-09-15 14:52:30 -05:00
Aiden Cline 2226afaea5 refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
Aiden Cline cbe8823671 feat(core): rework MCP client for SDK v2 and the 2026-07-28 revision (#48937) 2026-09-14 01:42:53 -05:00
Dax Raad 48c9a0a8de feat(release): add interactive review 2026-09-13 22:22:27 -04:00