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.5

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.5
File Size Uploaded Provenance Actions
acp_host_client-0.1.5.tar.gz 4.5 kB Without provenance Details for acp_host_client-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 9.5 kB

Release files / acp_host_client-0.1.5.tar.gz

Download URL acp_host_client-0.1.5.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0f1349adf7bea3552997852917c4278e8de79dc4c7f80a1abc31891b088a6faa
BLAKE2b-256 checksum
How to use checksums
2b6da8eed094651d394250cd667c6cdf338c8784fb40dbcd647574eb64fc67f1
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.5-py3-none-any.whl

Download URL acp_host_client-0.1.5-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51a63569d0513b39afa106cfe033ddc69b279817c4f59fb080e68bb7e73c5956
BLAKE2b-256 checksum
How to use checksums
b60d8194ca23a1fcea3c040848567d06d109433795ae1e0ef624c25250ec5756
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.5

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