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

@gotong/acp-agent

v0.1.0

Published

Gotong outbound ACP adapter — spawns a coding agent (Claude Code / Codex via their ACP bridges) ONCE and holds a long-lived Agent Client Protocol session (JSON-RPC over NDJSON on stdio), dispatching many tasks to the SAME session with context preserved. T

Readme

@gotong/acp-agent

Outbound ACP (Agent Client Protocol) adapter — the OpenClaw-style way for the hub to directly manage the full lifecycle of a coding agent: spawn it once, hold a long-lived session, and dispatch many tasks to the same session with context preserved.

It is the complement (not a replacement) to the one-shot @gotong/cli-agent:

| | @gotong/cli-agent | @gotong/acp-agent (this package) | |---|---|---| | process model | spawn('claude', ['-p', prompt]) per task, exits | spawn once, stdin/stdout held open, dispatch many | | protocol | none (argv + stdout text) | ACP = JSON-RPC 2.0 over NDJSON on the child's stdio | | context between tasks | none (fresh process each time) | preserved (same ACP session) | | takeover tier | T2 via pre-spawn regex gate | T2 via session/request_permission (natural per-action seam) |

ACP is Zed's open standard ("LSP for coding agents"). Real bridges: Claude Code via npx @zed-industries/claude-code-acp, Codex via codex-acp (each needs its own CLI login — non-hermetic, so they are used only in the examples/acp-coding-bridge runbook, never in tests).

Five control seams (AGENT-ADAPTER-CONTRACT)

  • observesession/update streaming notifications → onChunk(taskId, …).
  • interceptsession/request_permission reverse requests → a fail-closed dangerousToolGate (auto-allow read-only, escalate destructive).
  • handoff — an escalated permission throws SuspendTaskError carrying the tool context; the host maps it into the /me inbox for a human.
  • resumehandleResume answers the pending permission and the held turn continues with no drift (the subprocess never restarted).
  • terminatesession/cancel + the kill ladder (SIGTERM → SIGKILL).

Durability boundary (honest MVP scope)

The escalate-to-human path is in-memory-coupled: while a permission is parked, the agent subprocess stays alive blocked on the open reverse request, and the parked state references that in-memory handle. This does not survive a hub restart — if the hub dies, the subprocess dies with it and the in-flight permission is lost. On resume of a stale handle the task fails loudly ("permission handle no longer live — re-dispatch") rather than hanging. Durable mid-permission resume (needing ACP session/load + re-establishing the request) is out of MVP scope.

Most permissions resolve inline through the synchronous gate (no park), so the fragile parked path is the exception, not the rule.

This is a core-only leaf package (@gotong/core is its only dependency).