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

@agents-js/acp

v0.4.0

Published

Low-level ACP client — spawns an agent process, communicates over stdio/NDJSON, and manages the ACP protocol lifecycle.

Readme

@agents-js/acp

Low-level ACP client — spawns an agent process, communicates over stdio/NDJSON, and manages the ACP protocol lifecycle.

Installation

bun add @agents-js/acp

API

Classes

  • ACPClientController — Low-level ACP client controller managing the full agent lifecycle. This is the Provider for ACP communication. It owns the connection state machine, sends protocol messages over a stdio/NDJSON ...
  • CwdResolutionError
  • ResilientACPProcess

Functions

  • buildSpawnEnv — Build the env map for the spawned child. When inheritedEnvKeys is supplied, parent env is filtered to those keys (everything else is dropped before overrides are layered on); otherwise the full `...
  • createErrorAwareReadable — Wrap a ReadableStreamDefaultReader in an error-aware ReadableStream that propagates child-process spawn/exit errors instead of silently closing. Attaches error and close event handlers to the c...
  • extractPromptText — Extract the concatenated textual representation of an ACP PromptRequest. Local-process agent adapters (pi-acp, droid-acp, trial-agent, ...) all need to flatten the structured prompt array into ...
  • extractRequestErrorDetails — Extract the most useful human-readable string from a JSON-RPC error's data field. Priority: 1. data.details (string) 2. data.message (string) 3. JSON-stringified data (non-empty, non-{} o...
  • formatRequestError — Format an error into a single human-readable string that includes both error.message AND any data.details / data.message context from a JSON-RPC RequestError. Falls back to error.message ...
  • resolveSessionCwd
  • runAcpWrapperBinary — Run an in-repo wrapper ACP binary. Returns once --help/--version exit paths fire; otherwise resolves immediately after the AgentSideConnection is wired up — the connection keeps the process a...
  • spawnACPAgent — Spawn an ACP agent as a subprocess and create an ndJSON stream for communication.

Interfaces

  • ACPClientControllerOptions
  • ACPClientState — State machine for the ACP client controller. Transitions follow this lifecycle: ``` idle -> initializing -> ready -> starting_session -> session_ready | ^ v | prompting --+ | v cancelling -> sessio...
  • ACPHostAdapters — Host platform callbacks injected into the ACP client controller at construction time. This is the primary Adapter interface in the Ports & Adapters architecture. The controller delegates all ho...
  • ACPProcess
  • ACPProcessOptions
  • AcpWrapperBinarySpec
  • ErrorAwareStreamOptions
  • ErrorSignal — Handle for signalling errors into an error-aware readable stream. Attach child-process event handlers that call signal() on failure.
  • LogSink
  • ResilientACPProcessOptions

Types

  • ACPControllerEvent
  • ACPWorkspaceRootPolicy
  • ExhaustionCallback
  • SessionNotification
  • SessionUpdate
  • Stream

Constants

  • consoleLogSink

Exports

  • CLIENT_METHODS
  • ClientSideConnection
  • ndJsonStream
  • PROTOCOL_VERSION
  • RequestError
  • type AcpWrapperBinarySpec
  • type LogSink

Dependencies

  • @agentclientprotocol/sdk
  • @agents-js/policy

License

MIT