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

adapter-acp

v0.1.3

Published

Universal ACP adapter that bridges native CLI agents into standard ACP agents

Readme

adapter-acp

中文

Universal ACP (Agent Client Protocol) adapter that bridges native CLI coding agents into standard ACP agents.

Why

Mainstream AI coding agents like Claude Code and Codex do not natively support the ACP protocol. adapter-acp bridges this gap, so any ACP-compatible client (such as Zed) can use them as coding agents.

Uses the user's existing CLI installation and subscription account — no API keys needed.

Supported Agents

| Agent | Integration | Features | |---|---|---| | Claude Code | @anthropic-ai/claude-agent-sdk (direct SDK) | Structured tool calls with proper kind classification, session resume/list/fork, token usage + cost tracking, MCP server propagation, plan mode | | Codex | codex app-server JSON-RPC (PTY) | Token usage tracking, tool kind classification, web search events, commentary/reasoning phases |

All models, commands, and modes are dynamically discovered at session creation.

Architecture

ACP Client (stdin/stdout, JSON-RPC 2.0 over ND-JSON)
    │
    ▼
┌──────────────────────────────────────┐
│           adapter-acp                │
│                                      │
│  ┌────────────────────────────────┐  │
│  │  @agentclientprotocol/sdk     │  │
│  │  (AgentSideConnection)        │  │
│  └──────────┬─────────────────────┘  │
│             │                        │
│     ┌───────┴────────┐               │
│     ▼                ▼               │
│  ClaudeAgent      CodexAgent         │
│  (SDK direct)     (PTY parser)       │
│     │                │               │
│     ▼                ▼               │
│  claude-agent-sdk  Session+Parser    │
│     │                │               │
└─────┼────────────────┼───────────────┘
      ▼                ▼
  Claude Code        Codex
  (subscription)     (subscription)

Quick Start

Install from npm

# Global install (recommended for ACP clients like Zed)
npm install -g adapter-acp

# Then run
adapter-acp claude
adapter-acp codex

Or run directly without installing:

npx adapter-acp claude
npx adapter-acp codex

From source

git clone https://github.com/snana7mi/adapter-acp.git
cd adapter-acp
bun install
bun run src/index.ts claude

Options

adapter-acp <agent> [options]

  --cwd <path>       Working directory
  --verbose          Enable debug logging (to stderr)
  --pass-env <key>   Pass environment variable to agent (repeatable)

Run Tests

bun test

ACP Protocol Support

| Method | Description | |---|---| | initialize | Handshake, returns agent capabilities | | session/new | Create session with dynamic discovery | | session/prompt | Send prompt, receive streaming updates | | session/cancel | Cancel current operation | | session/set_model | Switch model (Claude: live via SDK, Codex: next turn) | | session/set_mode | Switch mode | | session/set_config_option | Unified config (model/mode) | | session/update | Streaming: text, thoughts, tool calls, usage, plans | | session/request_permission | Permission flow (allow/always/reject) |

Claude Code only: | Method | Description | |---|---| | session/list | List existing sessions | | session/load | Resume a session | | session/fork | Fork a session | | session/close | Close a session |

Project Structure

src/
  index.ts                 # Entry point — routes to ClaudeAgent or CodexAgent
  agents/
    claude-agent.ts        # Claude Code via claude-agent-sdk
    codex-agent.ts         # Codex via Session + CodexParser
    shared.ts              # Shared types, Pushable, version detection
    tool-mapping.ts        # SDK tool name → ACP ToolKind mapping
  acp/
    cli.ts                 # CLI argument parsing
    session.ts             # PTY session lifecycle (Codex only)
  parsers/
    types.ts               # TUIParser interface, ParsedEvent
    registry.ts            # Parser registry (Codex only)
    codex.ts               # Codex app-server JSON-RPC parser
  utils/
    logger.ts              # stderr logger

License

Apache-2.0