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——避免机器上躺着一个旧版把新包顶掉:
- 环境变量
ACP_HOST_BIN ~/.cache/acp-host/<版本>/acp-host(本包下的,版本与包对齐)- PATH 上的
acp-host - 都没有就下载(带 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.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| acp_host_client-0.1.7.tar.gz | 4.5 kB | Without provenance | Details for acp_host_client-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| acp_host_client-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for acp_host_client-0.1.7-py3-none-any.whl |
Total release size: 9.4 kB
Release files / acp_host_client-0.1.7.tar.gz
| Download URL | acp_host_client-0.1.7.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4de2160a32b0967fa87e0fede7ba148ad2abca25f55994b7349e530f9605a8f7
|
|
BLAKE2b-256 checksum How to use checksums |
f8ddc3fea6581e0accb3cc4fb9b7b8265049807e98edeaf6d787fdfbb93fa0d5
|
| 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.7-py3-none-any.whl
| Download URL | acp_host_client-0.1.7-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f5450d16714d6b9585a4128f0614099b9e3495ed152571ff876285ac71f1407
|
|
BLAKE2b-256 checksum How to use checksums |
2307a7649c74716624dacd2030eb8898eb1d9a06d73808d3f1486aacf633735f
|
| 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.7
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.