1use super::wire::present_nullable;
6use crate::Rest;
7use serde::{Deserialize, Serialize};
8
9#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
11#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
12#[derive(gproxy_protocol_macros::DeclaredFields)]
13#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
14pub struct McpListToolsInProgress {
15 pub event_id: String,
16 pub item_id: String,
17 #[serde(rename = "type")]
18 pub type_: McpListToolsInProgressType,
19 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
20 pub rest: Rest,
21}
22
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
25#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
26#[derive(gproxy_protocol_macros::DeclaredFields)]
27#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
28pub struct McpListToolsCompleted {
29 pub event_id: String,
30 pub item_id: String,
31 #[serde(rename = "type")]
32 pub type_: McpListToolsCompletedType,
33 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
34 pub rest: Rest,
35}
36
37#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
39#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
40#[derive(gproxy_protocol_macros::DeclaredFields)]
41#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
42pub struct McpListToolsFailed {
43 pub event_id: String,
44 pub item_id: String,
45 #[serde(rename = "type")]
46 pub type_: McpListToolsFailedType,
47 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
48 pub rest: Rest,
49}
50
51#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
53#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
54#[derive(gproxy_protocol_macros::DeclaredFields)]
55#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
56pub struct ResponseMcpCallArgumentsDelta {
57 pub delta: String,
58 pub event_id: String,
59 pub item_id: String,
60 pub output_index: i64,
61 pub response_id: String,
62 #[serde(rename = "type")]
63 pub type_: ResponseMcpCallArgumentsDeltaType,
64 #[serde(
65 default,
66 deserialize_with = "present_nullable",
67 skip_serializing_if = "Option::is_none"
68 )]
69 pub obfuscation: Option<Option<String>>,
70 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
71 pub rest: Rest,
72}
73
74#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
76#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
77#[derive(gproxy_protocol_macros::DeclaredFields)]
78#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
79pub struct ResponseMcpCallArgumentsDone {
80 pub arguments: String,
81 pub event_id: String,
82 pub item_id: String,
83 pub output_index: i64,
84 pub response_id: String,
85 #[serde(rename = "type")]
86 pub type_: ResponseMcpCallArgumentsDoneType,
87 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
88 pub rest: Rest,
89}
90
91#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
93#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
94#[derive(gproxy_protocol_macros::DeclaredFields)]
95#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
96pub struct ResponseMcpCallInProgress {
97 pub event_id: String,
98 pub item_id: String,
99 pub output_index: i64,
100 #[serde(rename = "type")]
101 pub type_: ResponseMcpCallInProgressType,
102 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
103 pub rest: Rest,
104}
105
106#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
108#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
109#[derive(gproxy_protocol_macros::DeclaredFields)]
110#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
111pub struct ResponseMcpCallCompleted {
112 pub event_id: String,
113 pub item_id: String,
114 pub output_index: i64,
115 #[serde(rename = "type")]
116 pub type_: ResponseMcpCallCompletedType,
117 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
118 pub rest: Rest,
119}
120
121#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
123#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
124#[derive(gproxy_protocol_macros::DeclaredFields)]
125#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
126pub struct ResponseMcpCallFailed {
127 pub event_id: String,
128 pub item_id: String,
129 pub output_index: i64,
130 #[serde(rename = "type")]
131 pub type_: ResponseMcpCallFailedType,
132 #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
133 pub rest: Rest,
134}
135
136#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
137#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
138#[derive(gproxy_protocol_macros::DeclaredFields)]
139#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
140pub enum McpListToolsInProgressType {
141 #[serde(rename = "mcp_list_tools.in_progress")]
142 McpListToolsInProgress,
143}
144
145#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
146#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
147#[derive(gproxy_protocol_macros::DeclaredFields)]
148#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
149pub enum McpListToolsCompletedType {
150 #[serde(rename = "mcp_list_tools.completed")]
151 McpListToolsCompleted,
152}
153
154#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
155#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
156#[derive(gproxy_protocol_macros::DeclaredFields)]
157#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
158pub enum McpListToolsFailedType {
159 #[serde(rename = "mcp_list_tools.failed")]
160 McpListToolsFailed,
161}
162
163#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
164#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
165#[derive(gproxy_protocol_macros::DeclaredFields)]
166#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
167pub enum ResponseMcpCallArgumentsDeltaType {
168 #[serde(rename = "response.mcp_call_arguments.delta")]
169 ResponseMcpCallArgumentsDelta,
170}
171
172#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
173#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
174#[derive(gproxy_protocol_macros::DeclaredFields)]
175#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
176pub enum ResponseMcpCallArgumentsDoneType {
177 #[serde(rename = "response.mcp_call_arguments.done")]
178 ResponseMcpCallArgumentsDone,
179}
180
181#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
182#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
183#[derive(gproxy_protocol_macros::DeclaredFields)]
184#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
185pub enum ResponseMcpCallInProgressType {
186 #[serde(rename = "response.mcp_call.in_progress")]
187 ResponseMcpCallInProgress,
188}
189
190#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
191#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
192#[derive(gproxy_protocol_macros::DeclaredFields)]
193#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
194pub enum ResponseMcpCallCompletedType {
195 #[serde(rename = "response.mcp_call.completed")]
196 ResponseMcpCallCompleted,
197}
198
199#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
200#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
201#[derive(gproxy_protocol_macros::DeclaredFields)]
202#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
203pub enum ResponseMcpCallFailedType {
204 #[serde(rename = "response.mcp_call.failed")]
205 ResponseMcpCallFailed,
206}