Official

opencode-v2

OpenCode 2 agent provider: runs opencode serve (2.x) and talks to its /api over HTTP and server-sent events.

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/opencode-v2@0.1.4

Permissions in 0.1.4

  • Provide agents agents.provideMediumAdds agents to the app.Provide the OpenCode 2 agent, and serve plugin tools to it through the host's loopback MCP server
  • Run named programs processMediumStarts the listed programs.Run the OpenCode 2 server (`opencode serve`, or the binary you choose in Settings), read its version and update it (`opencode upgrade`), and ask npm for the newest versionPrograms: opencode${settings.binaryPath}npm
  • Network access netMediumConnects to the listed hosts.Talk to the OpenCode server it starts on this computer, at the port it picks for each launch, to the OpenCode background service on this computer, and to the external server you choose in SettingsHosts: localhost:*${settings.serverUrl}
  • Environment variables envMediumReads the listed environment variables.Read the user name and password of the OpenCode server, and where OpenCode keeps its background service recordVariables: OPENCODE_SERVER_USERNAMEOPENCODE_SERVER_PASSWORDDIVERGENCE_OPENCODE_SERVER_PASSWORDXDG_STATE_HOMEHOME
  • Read files fs.readMediumReads files in the listed places.Read the record of the OpenCode background service (its address and password) so chats use the service you already run instead of starting another serverPlaces: ~/.local/state/opencode/service.json

Files

permission.test.ts798 B
// The approval card's title. Run with
// `node --import ./testing/register.mjs --test opencode-v2/permission.test.ts`.
import assert from "node:assert/strict";
import { test } from "node:test";
import { approvalTitle } from "./permission.ts";

const shell = { id: "per_1", sessionID: "ses_1", action: "shell", resources: ["ls plugins", "head -4"] } as Parameters<
  typeof approvalTitle
>[0];

test("a shell approval names the whole command, not its parts", () => {
  assert.equal(approvalTitle(shell, { command: "ls plugins | head -4" }), "Run ls plugins | head -4");
  // Without the call, the parts are all there is.
  assert.equal(approvalTitle(shell), "Run ls plugins, head -4");
  assert.equal(approvalTitle({ ...shell, message: "Run the tests?" }, { command: "x" }), "Run the tests?");
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.1.5latestNov 21, 2026>=5 <672.4 KB5 permissionsListed
0.1.4Nov 16, 2026>=5 <672 KB5 permissionsListed
0.1.3Nov 11, 2026>=5 <662.4 KB5 permissionsListed
0.1.2Nov 9, 2026>=5 <659.2 KB5 permissionsListed
0.1.1Oct 27, 2026>=2 <458.4 KB5 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.