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
//! Coding Agent Integration subsystem.
//!
//! Provides lifecycle management for external coding agents (Kiro CLI, Claude Code,
//! OpenCode, Pi Agent, Hermes, GitHub Copilot CLI). Extends the existing
//! ACP scaffolding with registration, monitoring, task orchestration, cost tracking,
//! and multi-channel result delivery.
//!
//! ## ACP Integration
//!
//! This module provides two ACP client implementations:
//!
//! - **`acp_client`**: Basic session-based client that blocks until completion.
//! Good for simple fire-and-forget tasks.
//!
//! - **`acp_streaming`**: Streaming client that yields real-time updates as the
//! agent works. Provides visibility into tool calls, thoughts, permissions, and
//! status changes. Use this for transparent agent interactions.
//!
//! ## Example: Streaming Updates
//!
//! ```rust,ignore
//! use adk_gateway::coding_agent::acp_streaming::{StreamingAcpClient, CodingAgentUpdate};
//!
//! let client = StreamingAcpClient::new();
//! let mut stream = client.execute_streaming("kiro", &config, &request).await?;
//!
//! while let Some(update) = stream.recv().await {
//! match update {
//! CodingAgentUpdate::Text(text) => print!("{}", text),
//! CodingAgentUpdate::ToolCallStarted { title } => println!("🔧 {}", title),
//! CodingAgentUpdate::Done { success, .. } => break,
//! _ => {}
//! }
//! }
//! ```