opencode

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OpenCode V2 adapter

This directory is Orch's npm-native OpenCode V2 adapter. Its package ID is @kninetimmy/orch-opencode (version 0.8.0) and its running plugin ID is orch.delivery. It is not the Codex marketplace adapter: that is adapters/codex/, installed as orch@orch from the shared marketplace.

Compatibility

The OpenCode V2 plugin API is beta. The live smoke check exercises exactly opencode2 v0.0.0-beta-17498 with @opencode-ai/plugin 0.0.0-beta-17498; that exact beta is the current compatibility floor, not a claim of compatibility with other V2 builds.

Install order

The adapter is not published to npm and releases do not publish an npm artifact. Install the checked-out adapters/opencode/ package — the same directory CI installs with npm ci --prefix adapters/opencode — then load its plugin module from an absolute path.

  1. Install the orch binary first, then clone the repository somewhere persistent (not into a project it will orchestrate):

    git clone https://github.com/kninetimmy/orch.git ~/src/orch
    cd ~/src/orch
    npm ci --prefix adapters/opencode
    
  2. Add the absolute plugin module path to OpenCode V2's opencode.json. Keep any existing configuration and plugins:

    {
      "plugins": ["/absolute/path/to/orch/adapters/opencode/src/index.js"]
    }
    

    The module is supplied by the local @kninetimmy/orch-opencode package; npm install @kninetimmy/orch-opencode is not an installation path because that package is not published.

  3. Restart the OpenCode V2 service, then verify both the pinned runtime and the active plugin ID before relying on enforcement:

    opencode2 --version
    opencode2 api get /api/plugin
    opencode2 api get /api/plugin | node -e 'let s=""; process.stdin.on("data", d => s += d).on("end", () => { if (JSON.parse(s).data.filter(p => p.id === "orch.delivery").length !== 1) throw new Error("orch.delivery is not active exactly once") })'
    

    The first command must print opencode2 v0.0.0-beta-17498. The JSON from the second must contain exactly one data entry whose id is orch.delivery; the third command fails otherwise. orch doctor performs the same runtime and plugin-ID checks for a repository with hosts.opencode enabled; it cannot check an OpenCode adapter version because the beta API does not expose one.

  4. In each repository, run orch init, review and merge its bootstrap PR, then run orch render-agents. It writes the five OpenCode role definitions under .opencode/agents/; run it again after changing hosts.opencode.roles or upgrading Orch.

Upgrade

Do not reinstall as though this were a first install. In the existing checkout, update the same local adapter package CI exercises, then restart OpenCode V2 and repeat the plugin-ID verification:

git -C ~/src/orch pull --ff-only
npm ci --prefix ~/src/orch/adapters/opencode
opencode2 api get /api/plugin
opencode2 api get /api/plugin | node -e 'let s=""; process.stdin.on("data", d => s += d).on("end", () => { if (JSON.parse(s).data.filter(p => p.id === "orch.delivery").length !== 1) throw new Error("orch.delivery is not active exactly once") })'

The configured absolute module path stays the same. If the checkout path changes, update opencode.json to the new absolute adapters/opencode/src/index.js path before restarting.

Limitations

  • The beta API only proves the active plugin ID, not its adapter version.
  • The plugin guards OpenCode's edit, write, and patch tools. Shell writes bypass Orch's guard and remain subject to OpenCode's own permissions.
  • The plugin needs orch on PATH. If it is absent, OpenCode cannot receive an Orch guard verdict.

Documentation

Overview

Package opencode embeds the native OpenCode V2 adapter assets used by Orch.

Index

Constants

This section is empty.

Variables

View Source
var AgentDefinitions embed.FS

AgentDefinitions contains the canonical native V2 role definitions.

View Source
var PackageJSON string

PackageJSON is the shipped adapter manifest and version source.

View Source
var Skills embed.FS

Skills contains the native V2 Orch workflows.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL