1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! `acpx` is a thin Rust client for launching ACP-compatible agent servers and
//! talking to them through the official Agent Client Protocol (ACP) Rust SDK.
//!
//! The crate stays close to upstream ACP types and lifecycle rules. Its main
//! pieces are:
//!
//! - `Connection` for subprocess-backed ACP sessions over stdio,
//! - `AgentServer`, `CommandAgentServer`, and `CommandSpec` for launchable
//! agent definitions,
//! - `agent_servers` for the generated ACP registry catalog, and
//! - `RuntimeContext` for the upstream SDK's local `!Send` task model.
//!
//! The current scope is local subprocess agents over stdio. Registry entries
//! backed by `npx` or `uvx` are directly connectable. Binary-only registry
//! entries remain discoverable but are not launchable in v0.
//!
//! ```rust,no_run
//! use acpx::{
//! AgentServer, AgentServerMetadata, CommandAgentServer, CommandSpec, RuntimeContext,
//! };
//! use agent_client_protocol as acp;
//! use futures::executor::block_on;
//!
//! let runtime = RuntimeContext::new(|task| {
//! block_on(task);
//! });
//!
//! let server = CommandAgentServer::new(
//! AgentServerMetadata::new("codex-acp", "Codex CLI", "0.10.0")
//! .description("ACP adapter for OpenAI's coding assistant"),
//! CommandSpec::new("npx")
//! .arg("--yes")
//! .arg("@zed-industries/codex-acp@0.10.0"),
//! );
//!
//! block_on(async {
//! let connection = server.connect(&runtime).await?;
//! let _initialize = connection
//! .initialize(
//! acp::InitializeRequest::new(acp::ProtocolVersion::V1).client_info(
//! acp::Implementation::new("acpx-docs", "0.1.0").title("acpx Docs"),
//! ),
//! )
//! .await?;
//!
//! connection.close().await
//! })?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
pub use crateConnection;
pub use crate;
pub use crate;
pub use crate;
pub use crate;