Skip to main content

acp_utils/client/
event.rs

1use acp::Responder;
2use acp::schema::v1::{SessionUpdate, StopReason};
3use agent_client_protocol as acp;
4use agent_client_protocol::schema::v1::{CreateElicitationRequest, CreateElicitationResponse, SessionId};
5
6use crate::notifications::{
7    AuthMethodsUpdatedParams, ContextClearedParams, ContextCompactionParams, McpNotification, SubAgentProgressParams,
8};
9
10/// Events forwarded from the ACP connection to the main event loop.
11pub enum AcpEvent {
12    SessionUpdate { session_id: SessionId, update: Box<SessionUpdate> },
13    ContextCleared(ContextClearedParams),
14    ContextCompaction(ContextCompactionParams),
15    SubAgentProgress(SubAgentProgressParams),
16    AuthMethodsUpdated(AuthMethodsUpdatedParams),
17    McpNotification(McpNotification),
18    ElicitationRequest { params: Box<CreateElicitationRequest>, responder: Responder<CreateElicitationResponse> },
19    PromptCompleted(StopReason),
20    ConnectionClosed,
21}