@bastani/atomic-acp

中文文档
0.0.16发布于 2026/11/04MITES Module构建来源已验证近 30 天下载 2306

ACP adapter for Atomic coding agent

原始使用文档
文档目录13 节
  1. How it works
  2. Get started
  3. Add it to Zed
  4. What works
  5. Workflows
  6. Slash commands
  7. Configuration
  8. Headless clients
  9. Limitations
  10. Development
  11. Releasing
  12. Credits
  13. License

atomic-acp

Use the Atomic coding agent inside Zed and other editors that speak the Agent Client Protocol.

Get started →  ·  What works  ·  Workflows  ·  Configuration  ·  Atomic docs

Tests ACP v1 Docs Discord License: MIT

How it works

Your editor starts atomic-acp and talks to it over stdio with ACP. For each chat thread, atomic-acp starts an atomic --mode rpc process and translates between the two.

Zed (ACP client) ⇄ atomic-acp ⇄ atomic --mode rpc

Atomic reads files, edits code and runs commands on your machine, exactly as it does in a terminal. Only open workspaces you trust.

Get started

You need Node.js 20 or newer and Atomic 0.9.39 or newer, signed in to at least one model provider:

npm install -g @bastani/atomic @bastani/atomic-acp
atomic   # sign in, then quit

atomic-acp uses the atomic on your PATH. Run atomic-acp --help for its options.

Add it to Zed

In Zed's settings.json:

{
  "agent_servers": {
    "Atomic": {
      "type": "custom",
      "command": "atomic-acp",
      "args": [],
      "env": {}
    }
  }
}

Open the agent panel, pick Atomic and start a thread. If Atomic has no working login, Zed shows an Authenticate banner that opens Atomic in a terminal. atomic-acp --terminal-login does the same.

Without a global install, use "command": "npx", "args": ["-y", "@bastani/atomic-acp"].

What works

  • Text and reasoning stream into the thread. Tool calls show their status and files, edits show a diff, and shell commands show their output.
  • Threads are Atomic sessions. They appear in the editor's history and in atomic --resume, keep their title and survive an adapter restart. Deleting a thread deletes its session.
  • The model and thinking pickers list what your Atomic setup offers, and the context indicator shows how full the context is.
  • Prompt templates, skills (/skill:name) and extension commands such as /workflow appear in the slash menu.
  • When Atomic asks you to pick, confirm or type something, the editor shows a form.
  • ask_user_question shows all of its questions in one form, multi-select included.
  • MCP servers the editor configures reach the thread's Atomic process, and their tools are callable as mcp__<server>__<tool>. Stdio and HTTP servers work, SSE servers are skipped. atomic-acp never writes to your Atomic MCP config, and a server you define there under the same name wins.
  • If Atomic exits during a message, the message fails with the reason, and the next message starts Atomic again on the same session.

Workflows

Atomic workflows run from the editor as they do in the terminal:

/workflow list
/workflow ralph prompt="Add rate limiting to the API"
/workflow status

A message that starts a workflow stays open until every run it started ends, so the editor doesn't report the agent as done while work is still going. Each run appears as a tool call with its stages and result.

  • Cancelling the message quits its runs. Resume one with /workflow resume <runId>.
  • A run that waits for your input stops holding the message. Reply in the thread and the agent answers the prompt.
  • Set ATOMIC_ACP_WAIT_FOR_WORKFLOWS=0 to end the message as soon as a run starts.

/workflow-runs [status] lists the project's recent runs, and /workflow-run <runId> shows one run's saved summary.

Slash commands

Besides your Atomic prompts, skills and extension commands:

CommandWhat it does
/compact [instructions]Compact the context
/autocompact on|off|toggleTurn automatic compaction on or off
/sessionSession ID, tokens, messages and cost
/name <name>Rename the session
/exportExport the session as HTML to the working folder
/steering, /follow-upShow or set how queued messages are delivered
/changelogShow Atomic's changelog

Use the editor's pickers instead of /model and /thinking, and a new thread instead of /clear.

Configuration

Set these in the env of your agent server entry:

VariableDefaultPurpose
ATOMIC_ACP_ATOMIC_COMMANDatomicPath or name of the Atomic executable
ATOMIC_ACP_ATOMIC_ARGSunsetJSON array of extra arguments for every Atomic process
ATOMIC_ACP_WAIT_FOR_WORKFLOWS10 ends a message without waiting for the runs it started
ATOMIC_ACP_HEADLESSunset1 when no person can answer questions (see below)
ATOMIC_ACP_ENABLE_EMBEDDED_CONTEXTunsettrue lets the editor attach file contents directly to prompts

Arguments after -- also go to every Atomic process, for example "args": ["--", "--model", "openai/gpt-6.1-sol"]. Flags the adapter manages itself, such as --mode and the session flags, are refused at startup.

Everything else, including logins, models, skills, extensions and the session store, comes from your normal Atomic settings.

Headless clients

With ATOMIC_ACP_HEADLESS=1, questions end at once instead of waiting. ask_user_question tells the model that no person is available, extension dialogs are cancelled, and a workflow that stops for input is quit. It stays resumable.

Limitations

  • ask_user_question needs Atomic 0.9.50 or newer and an editor that supports ACP forms (elicitation). Without them, the question can't be answered.
  • Atomic reads, writes and runs commands itself. The editor's file and terminal APIs aren't used.
  • Messages sent while Atomic is busy are queued and sent one at a time.
  • Zed is the tested client. Other ACP clients should work but may render some updates differently.

Development

npm install
npm run dev     # run from source
npm test
npm run lint
npm run build

src/acp/ holds the ACP side and src/atomic-rpc/ the Atomic process wrapper. The npm run smoke:* scripts drive a real, signed-in Atomic and spend model tokens, so they aren't part of npm test.

Releasing

Merge a commit titled Release X.Y.Z (or Release X.Y.Z-alpha.N) that sets that version in package.json, then push the tag X.Y.Z on it. The publish workflow checks the tag, runs the tests and publishes to npm with trusted publishing. Stable versions go to latest and alphas to next.

Credits

License

MIT

版本与发布记录

@bastani/atomic-acp 共发布 17 个版本,首次发布于 2026/10/13;过去 12 个月发布了 17 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.16latest2026/11/043 天前
0.0.152026/10/2910 天前
0.0.142026/10/2810 天前
0.0.132026/10/2810 天前
0.0.122026/10/2612 天前
0.0.112026/10/2613 天前

关于 @bastani/atomic-acp 的常见问题

@bastani/atomic-acp 是什么?

ACP adapter for Atomic coding agent

如何安装 @bastani/atomic-acp?

在项目目录运行 npm install @bastani/atomic-acp,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@bastani/atomic(>=0.9.39)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 atomic-acp,可以用 npx atomic-acp 直接运行。

@bastani/atomic-acp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bastani__atomic-acp 是否存在。

@bastani/atomic-acp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bastani/atomic-acp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bastani/atomic-acp 可以商用吗?

@bastani/atomic-acp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bastani/atomic-acp 的下载量有多少?

根据 npm 官方下载统计,@bastani/atomic-acp 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,306 次,日均约 77 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bastani/atomic-acp 还在维护吗?

最新版本 0.0.16 发布于 2026/11/04(3 天前);至今共发布 17 个版本,其中过去 12 个月发布了 17 个;首次发布于 2026/10/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。