Skip to main content

acp-host-client(Python)

acp-host 的薄客户端:起一个进程、按行收发 JSON。 不需要装 Rust——首次调用时会自动下载对应平台的二进制。

pip install acp-host-client
from acp_host import AcpHost

host = AcpHost()
for piece in host.ask("你好", agent="workbuddy"):
    print(piece, end="")
host.close()

需要人工批准工具调用时:

for piece in host.ask("看一下 README", on_permission=lambda event: "allow"):
    print(piece, end="")

二进制从哪来

按这个顺序找,先看自己的缓存再看 PATH——避免机器上躺着一个旧版把新包顶掉:

  1. 环境变量 ACP_HOST_BIN
  2. ~/.cache/acp-host/<版本>/acp-host(本包下的,版本与包对齐)
  3. PATH 上的 acp-host
  4. 都没有就下载(带 sha256 校验)

想用别的版本:ACP_HOST_VERSION=0.1.4 或直接设 ACP_HOST_BIN。

其它安装方式

brew tap thatwzzh/acp-host && brew install acp-host   # macOS / Linux
npm i acp-host-client                                 # Node / TypeScript

协议细节、agent 配置、许可(MIT)见主仓库:https://github.com/thatwzzh/acp-host

Metadata

Release files for acp-host-client 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acp-host-client 0.1.6
File Size Uploaded Provenance Actions
acp_host_client-0.1.6.tar.gz 4.5 kB Without provenance Details for acp_host_client-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acp-host-client 0.1.6
File Interpreter ABI Platform Actions
acp_host_client-0.1.6-py3-none-any.whl Python 3 none any Details for acp_host_client-0.1.6-py3-none-any.whl

Total release size: 9.5 kB

Release files / acp_host_client-0.1.6.tar.gz

Download URL acp_host_client-0.1.6.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b169191e0830ee048fe238964c65c6b0fffb273641f64968c753a9d8b7478e
BLAKE2b-256 checksum
How to use checksums
983c62723c768f163c25d0b9aa6873abacec915057ec3ec604c48cb63e2e69e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / acp_host_client-0.1.6-py3-none-any.whl

Download URL acp_host_client-0.1.6-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4fc78de3973f78cfb2111bd188dcbb680a5be1efb1833606f56b4010dd6f9bf
BLAKE2b-256 checksum
How to use checksums
630a8fff0e60f0c759f529d7dfe0cbbe33167d14bbb62bfa4cff24bdf941d4a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for acp-host-client 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page