npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-acp-bridge

v0.0.0

Published

Bridge Agent Client Protocol (ACP) agents into opencode as model providers.

Readme

opencode-acp-bridge

Bridge Agent Client Protocol (ACP) agents into opencode as model providers.

This plugin starts configured ACP agent processes, discovers the models they expose, registers them under opencode provider IDs like acp-gemini or acp-copilot, and streams prompts/responses through the ACP session.

What It Does

  • Registers each configured ACP agent as an opencode provider.
  • Discovers models from ACP session config options, with legacy models.availableModels fallback.
  • Selects models through standard ACP session/set_config_option when available.
  • Falls back to legacy session/set_model only for agents that still expose model switching that way.
  • Forwards opencode MCP servers into the ACP session.
  • Streams ACP agent_message_chunk text back through AI SDK v3.

Requirements

  • Bun
  • opencode
  • One or more ACP-capable agent CLIs, for example:
    • Gemini CLI with --acp
    • GitHub Copilot CLI with --acp

Install

Install dependencies:

bun install

Register the plugin in your opencode config:

// ~/.config/opencode/opencode.jsonc
{
  "plugin": [
    "/absolute/path/to/opencode-acp-bridge"
  ]
}

During local development, the absolute path can be this repository path.

Configure ACP Agents

Create:

~/.config/opencode/opencode-acp-bridge.jsonc

Example:

{
  "agents": {
    "gemini": {
      "command": ["gemini", "--acp"]
    },
    "copilot": {
      "command": ["copilot", "--acp"]
    }
  }
}

Agent IDs become provider IDs:

gemini  -> acp-gemini
copilot -> acp-copilot

You can disable an agent without deleting it:

{
  "agents": {
    "copilot": {
      "enabled": false,
      "command": ["copilot", "--acp"]
    }
  }
}

command must be an array. The first item is the executable, and the rest are arguments.

Config Lookup

The loader follows the same broad convention as oh-my-openagent:

  1. User config:

    ~/.config/opencode/opencode-acp-bridge.jsonc
    ~/.config/opencode/opencode-acp-bridge.json
  2. Project config, walking from the current workspace toward $HOME:

    .opencode/opencode-acp-bridge.jsonc
    .opencode/opencode-acp-bridge.json

User config loads first. Project configs are merged on top, and the closest project config wins. A project config can override a single field without repeating the whole agent block.

OPENCODE_CONFIG_DIR overrides the user config directory, which is useful for tests or isolated installs.

JSONC files are parsed with Bun's built-in JSON5.parse, so comments and trailing commas are supported.

Verify

List models discovered from an ACP agent:

opencode models acp-gemini --verbose
opencode models acp-copilot --verbose

Run a prompt with an explicit ACP-backed model:

opencode run --model acp-gemini/gemini-2.5-flash "Say hi in one short sentence."

Development

Run tests:

bun test

Typecheck:

bun run tsc --noEmit

Format and lint:

bunx biome check --write .

Notes

This package is intentionally a bridge, not a model provider by itself. The real model list, model switching behavior, permission prompts, and output stream come from the ACP agent process you configure.