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.2
Permissions in 0.1.2
Files
plugin.json2.5 KB
{
"id": "divergence/opencode-v2",
"name": "opencode-v2",
"version": "0.1.2",
"description": "OpenCode 2 agent provider: runs `opencode serve` (2.x) and talks to its /api over HTTP and server-sent events.",
"pluginApi": ">=5 <6",
"main": "main.ts",
"contributes": {
"agents": [
{
"id": "opencode-v2",
"name": "OpenCode",
"qualifier": "2",
"icon": "icon.svg"
}
],
"settings": {
"title": "OpenCode 2",
"properties": {
"binaryPath": {
"type": "path",
"kind": "file",
"title": "OpenCode 2 binary",
"description": "The opencode 2.x program to run for the local server. Empty runs the one your login PATH finds first; choose one when that is a 1.x install.",
"placeholder": "~/.local/bin/opencode"
},
"serverUrl": {
"type": "url",
"title": "External server",
"description": "The address of an OpenCode 2 server you run yourself (opencode serve). Empty starts a local server. Saving an address asks you to allow the connection.",
"placeholder": "http://127.0.0.1:4096"
}
}
}
},
"permissions": {
"agents.provide": {
"reason": "Provide the OpenCode 2 agent, and serve plugin tools to it through the host's loopback MCP server"
},
"process": {
"programs": [
"opencode",
"${settings.binaryPath}",
"npm"
],
"reason": "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 version"
},
"net": {
"hosts": [
"localhost:*",
"${settings.serverUrl}"
],
"reason": "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 Settings"
},
"env": {
"vars": [
"OPENCODE_SERVER_USERNAME",
"OPENCODE_SERVER_PASSWORD",
"DIVERGENCE_OPENCODE_SERVER_PASSWORD",
"XDG_STATE_HOME",
"HOME"
],
"reason": "Read the user name and password of the OpenCode server, and where OpenCode keeps its background service record"
},
"fs.read": {
"scopes": [
"~/.local/state/opencode/service.json"
],
"reason": "Read the record of the OpenCode background service (its address and password) so chats use the service you already run instead of starting another server"
}
}
}
No comments yet.