| 1 | #![allow(clippy::large_enum_variant, clippy::enum_variant_names)] |
| 2 | |
| 3 | use serde::{Deserialize, Serialize}; |
| 4 | use serde_json::{Map, Value}; |
| 5 | use std::collections::BTreeMap; |
| 6 | |
| 7 | pub use crate::methods::{ |
| 8 | ClientNotificationMethod, ClientRequestMethod, ServerNotificationMethod, ServerRequestMethod, |
| 9 | }; |
| 10 | |
| 11 | pub type AbsolutePathBuf = String; |
| 12 | |
| 13 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 14 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 15 | pub struct AdditionalFileSystemPermissions { |
| 16 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 17 | pub entries: Option<Vec<FileSystemSandboxEntry>>, |
| 18 | #[serde(rename = "globScanMaxDepth", default, skip_serializing_if = "Option::is_none")] |
| 19 | pub glob_scan_max_depth: Option<u64>, |
| 20 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 21 | pub read: Option<Vec<LegacyAppPathString>>, |
| 22 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 23 | pub write: Option<Vec<LegacyAppPathString>>, |
| 24 | } |
| 25 | |
| 26 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 27 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 28 | pub struct AdditionalNetworkPermissions { |
| 29 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 30 | pub enabled: Option<bool>, |
| 31 | } |
| 32 | |
| 33 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 34 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 35 | pub enum AgentMessageDelivery { |
| 36 | #[serde(rename = "async")] |
| 37 | Async, |
| 38 | } |
| 39 | |
| 40 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 41 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 42 | pub struct AgentMessageDeltaNotification { |
| 43 | pub delta: String, |
| 44 | #[serde(rename = "itemId")] |
| 45 | pub item_id: String, |
| 46 | #[serde(rename = "threadId")] |
| 47 | pub thread_id: String, |
| 48 | #[serde(rename = "turnId")] |
| 49 | pub turn_id: String, |
| 50 | } |
| 51 | |
| 52 | pub type AgentPath = String; |
| 53 | |
| 54 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 55 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 56 | pub enum AllowDenyRequirement { |
| 57 | #[serde(rename = "allow")] |
| 58 | Allow, |
| 59 | #[serde(rename = "deny")] |
| 60 | Deny, |
| 61 | } |
| 62 | |
| 63 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 64 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 65 | pub struct AnalyticsConfig { |
| 66 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 67 | pub enabled: Option<bool>, |
| 68 | #[serde(flatten)] |
| 69 | pub additional: Map<String, Value>, |
| 70 | } |
| 71 | |
| 72 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 73 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 74 | pub enum ApprovalsReviewer { |
| 75 | #[serde(rename = "user")] |
| 76 | User, |
| 77 | #[serde(rename = "auto_review")] |
| 78 | AutoReview, |
| 79 | #[serde(rename = "guardian_subagent")] |
| 80 | GuardianSubagent, |
| 81 | } |
| 82 | |
| 83 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 84 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 85 | pub enum AskForApproval { |
| 86 | #[serde(rename = "untrusted")] |
| 87 | Untrusted, |
| 88 | #[serde(rename = "on-request")] |
| 89 | OnRequest, |
| 90 | #[serde(rename = "never")] |
| 91 | Never, |
| 92 | #[serde(rename = "granular")] |
| 93 | Granular { |
| 94 | mcp_elicitations: bool, |
| 95 | #[serde(default)] |
| 96 | request_permissions: bool, |
| 97 | rules: bool, |
| 98 | sandbox_approval: bool, |
| 99 | #[serde(default)] |
| 100 | skill_approval: bool, |
| 101 | }, |
| 102 | } |
| 103 | |
| 104 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 105 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 106 | #[serde(deny_unknown_fields)] |
| 107 | pub struct AsyncUserInputQuestion { |
| 108 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 109 | pub options: Option<Vec<String>>, |
| 110 | pub title: String, |
| 111 | } |
| 112 | |
| 113 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 114 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 115 | pub enum AutoCompactTokenLimitScope { |
| 116 | #[serde(rename = "total")] |
| 117 | Total, |
| 118 | #[serde(rename = "body_after_prefix")] |
| 119 | BodyAfterPrefix, |
| 120 | } |
| 121 | |
| 122 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 123 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 124 | pub struct BrowserUseConfig { |
| 125 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 126 | pub allow_history_access: Option<bool>, |
| 127 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 128 | pub default_origin_policy: Option<BrowserUseOriginPolicyConfig>, |
| 129 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 130 | pub origins: Option<BTreeMap<String, BrowserUseOriginPolicyConfig>>, |
| 131 | } |
| 132 | |
| 133 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 134 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 135 | pub struct BrowserUseOriginPolicyConfig { |
| 136 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 137 | pub access: Option<AllowDenyRequirement>, |
| 138 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 139 | pub downloads: Option<AllowDenyRequirement>, |
| 140 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 141 | pub full_cdp_access: Option<AllowDenyRequirement>, |
| 142 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 143 | pub uploads: Option<AllowDenyRequirement>, |
| 144 | } |
| 145 | |
| 146 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 147 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 148 | pub struct ByteRange { |
| 149 | pub end: u64, |
| 150 | pub start: u64, |
| 151 | } |
| 152 | |
| 153 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 154 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 155 | #[serde(deny_unknown_fields)] |
| 156 | pub struct CapabilityRefusal { |
| 157 | pub code: CapabilityRefusalCode, |
| 158 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 159 | pub method: Option<String>, |
| 160 | #[serde(rename = "threadId", default, skip_serializing_if = "Option::is_none")] |
| 161 | pub thread_id: Option<String>, |
| 162 | } |
| 163 | |
| 164 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 165 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 166 | pub enum CapabilityRefusalCode { |
| 167 | #[serde(rename = "unknown_agent")] |
| 168 | UnknownAgent, |
| 169 | #[serde(rename = "not_installed")] |
| 170 | NotInstalled, |
| 171 | #[serde(rename = "adapter_missing")] |
| 172 | AdapterMissing, |
| 173 | #[serde(rename = "below_min_version")] |
| 174 | BelowMinVersion, |
| 175 | #[serde(rename = "needs_sign_in")] |
| 176 | NeedsSignIn, |
| 177 | #[serde(rename = "no_acp")] |
| 178 | NoAcp, |
| 179 | #[serde(rename = "executor_not_supported")] |
| 180 | ExecutorNotSupported, |
| 181 | #[serde(rename = "environment_not_supported")] |
| 182 | EnvironmentNotSupported, |
| 183 | #[serde(rename = "steer_not_supported")] |
| 184 | SteerNotSupported, |
| 185 | #[serde(rename = "reopen_not_supported")] |
| 186 | ReopenNotSupported, |
| 187 | } |
| 188 | |
| 189 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 190 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 191 | pub struct CapabilityRefusalData { |
| 192 | #[serde(rename = "codewhaleRefusal")] |
| 193 | pub codewhale_refusal: CapabilityRefusal, |
| 194 | } |
| 195 | |
| 196 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 197 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 198 | pub struct ClientInfo { |
| 199 | pub name: String, |
| 200 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 201 | pub title: Option<String>, |
| 202 | pub version: String, |
| 203 | } |
| 204 | |
| 205 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 206 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 207 | #[serde(untagged)] |
| 208 | pub enum CodexErrorInfo { |
| 209 | CodexErrorInfoVariant0(CodexErrorInfoVariant0), |
| 210 | HttpConnectionFailed(CodexErrorInfoVariant1), |
| 211 | ResponseStreamConnectionFailed(CodexErrorInfoVariant2), |
| 212 | ResponseStreamDisconnected(CodexErrorInfoVariant3), |
| 213 | ResponseTooManyFailedAttempts(CodexErrorInfoVariant4), |
| 214 | ActiveTurnNotSteerable(CodexErrorInfoVariant5), |
| 215 | Other(Value), |
| 216 | } |
| 217 | |
| 218 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 219 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 220 | pub enum CodexErrorInfoVariant0 { |
| 221 | #[serde(rename = "contextWindowExceeded")] |
| 222 | ContextWindowExceeded, |
| 223 | #[serde(rename = "sessionBudgetExceeded")] |
| 224 | SessionBudgetExceeded, |
| 225 | #[serde(rename = "usageLimitExceeded")] |
| 226 | UsageLimitExceeded, |
| 227 | #[serde(rename = "rateLimitExceeded")] |
| 228 | RateLimitExceeded, |
| 229 | #[serde(rename = "flexUnavailable")] |
| 230 | FlexUnavailable, |
| 231 | #[serde(rename = "serverOverloaded")] |
| 232 | ServerOverloaded, |
| 233 | #[serde(rename = "modelNotFound")] |
| 234 | ModelNotFound, |
| 235 | #[serde(rename = "policyCapacityUnavailable")] |
| 236 | PolicyCapacityUnavailable, |
| 237 | #[serde(rename = "cyberPolicy")] |
| 238 | CyberPolicy, |
| 239 | #[serde(rename = "misalignmentPolicyViolation")] |
| 240 | MisalignmentPolicyViolation, |
| 241 | #[serde(rename = "tooManyDenials")] |
| 242 | TooManyDenials, |
| 243 | #[serde(rename = "internalServerError")] |
| 244 | InternalServerError, |
| 245 | #[serde(rename = "unauthorized")] |
| 246 | Unauthorized, |
| 247 | #[serde(rename = "badRequest")] |
| 248 | BadRequest, |
| 249 | #[serde(rename = "threadRollbackFailed")] |
| 250 | ThreadRollbackFailed, |
| 251 | #[serde(rename = "sandboxError")] |
| 252 | SandboxError, |
| 253 | #[serde(rename = "other")] |
| 254 | Other, |
| 255 | } |
| 256 | |
| 257 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 258 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 259 | #[serde(deny_unknown_fields)] |
| 260 | pub struct CodexErrorInfoVariant1 { |
| 261 | #[serde(rename = "httpConnectionFailed")] |
| 262 | pub http_connection_failed: CodexErrorInfoVariant1HttpConnectionFailed, |
| 263 | } |
| 264 | |
| 265 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 266 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 267 | pub struct CodexErrorInfoVariant1HttpConnectionFailed { |
| 268 | #[serde(rename = "httpStatusCode", default, skip_serializing_if = "Option::is_none")] |
| 269 | pub http_status_code: Option<u16>, |
| 270 | } |
| 271 | |
| 272 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 273 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 274 | #[serde(deny_unknown_fields)] |
| 275 | pub struct CodexErrorInfoVariant2 { |
| 276 | #[serde(rename = "responseStreamConnectionFailed")] |
| 277 | pub response_stream_connection_failed: CodexErrorInfoVariant2ResponseStreamConnectionFailed, |
| 278 | } |
| 279 | |
| 280 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 281 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 282 | pub struct CodexErrorInfoVariant2ResponseStreamConnectionFailed { |
| 283 | #[serde(rename = "httpStatusCode", default, skip_serializing_if = "Option::is_none")] |
| 284 | pub http_status_code: Option<u16>, |
| 285 | } |
| 286 | |
| 287 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 288 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 289 | #[serde(deny_unknown_fields)] |
| 290 | pub struct CodexErrorInfoVariant3 { |
| 291 | #[serde(rename = "responseStreamDisconnected")] |
| 292 | pub response_stream_disconnected: CodexErrorInfoVariant3ResponseStreamDisconnected, |
| 293 | } |
| 294 | |
| 295 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 296 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 297 | pub struct CodexErrorInfoVariant3ResponseStreamDisconnected { |
| 298 | #[serde(rename = "httpStatusCode", default, skip_serializing_if = "Option::is_none")] |
| 299 | pub http_status_code: Option<u16>, |
| 300 | } |
| 301 | |
| 302 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 303 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 304 | #[serde(deny_unknown_fields)] |
| 305 | pub struct CodexErrorInfoVariant4 { |
| 306 | #[serde(rename = "responseTooManyFailedAttempts")] |
| 307 | pub response_too_many_failed_attempts: CodexErrorInfoVariant4ResponseTooManyFailedAttempts, |
| 308 | } |
| 309 | |
| 310 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 311 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 312 | pub struct CodexErrorInfoVariant4ResponseTooManyFailedAttempts { |
| 313 | #[serde(rename = "httpStatusCode", default, skip_serializing_if = "Option::is_none")] |
| 314 | pub http_status_code: Option<u16>, |
| 315 | } |
| 316 | |
| 317 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 318 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 319 | #[serde(deny_unknown_fields)] |
| 320 | pub struct CodexErrorInfoVariant5 { |
| 321 | #[serde(rename = "activeTurnNotSteerable")] |
| 322 | pub active_turn_not_steerable: CodexErrorInfoVariant5ActiveTurnNotSteerable, |
| 323 | } |
| 324 | |
| 325 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 326 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 327 | pub struct CodexErrorInfoVariant5ActiveTurnNotSteerable { |
| 328 | #[serde(rename = "turnKind")] |
| 329 | pub turn_kind: NonSteerableTurnKind, |
| 330 | } |
| 331 | |
| 332 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 333 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 334 | pub struct CollabAgentState { |
| 335 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 336 | pub message: Option<String>, |
| 337 | pub status: CollabAgentStatus, |
| 338 | } |
| 339 | |
| 340 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 341 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 342 | pub enum CollabAgentStatus { |
| 343 | #[serde(rename = "pendingInit")] |
| 344 | PendingInit, |
| 345 | #[serde(rename = "running")] |
| 346 | Running, |
| 347 | #[serde(rename = "interrupted")] |
| 348 | Interrupted, |
| 349 | #[serde(rename = "completed")] |
| 350 | Completed, |
| 351 | #[serde(rename = "errored")] |
| 352 | Errored, |
| 353 | #[serde(rename = "shutdown")] |
| 354 | Shutdown, |
| 355 | #[serde(rename = "notFound")] |
| 356 | NotFound, |
| 357 | } |
| 358 | |
| 359 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 360 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 361 | pub enum CollabAgentTool { |
| 362 | #[serde(rename = "spawnAgent")] |
| 363 | SpawnAgent, |
| 364 | #[serde(rename = "sendInput")] |
| 365 | SendInput, |
| 366 | #[serde(rename = "resumeAgent")] |
| 367 | ResumeAgent, |
| 368 | #[serde(rename = "wait")] |
| 369 | Wait, |
| 370 | #[serde(rename = "closeAgent")] |
| 371 | CloseAgent, |
| 372 | #[serde(rename = "sendMessage")] |
| 373 | SendMessage, |
| 374 | #[serde(rename = "followupTask")] |
| 375 | FollowupTask, |
| 376 | #[serde(rename = "interruptAgent")] |
| 377 | InterruptAgent, |
| 378 | #[serde(rename = "listAgents")] |
| 379 | ListAgents, |
| 380 | } |
| 381 | |
| 382 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 383 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 384 | pub enum CollabAgentToolCallStatus { |
| 385 | #[serde(rename = "inProgress")] |
| 386 | InProgress, |
| 387 | #[serde(rename = "completed")] |
| 388 | Completed, |
| 389 | #[serde(rename = "failed")] |
| 390 | Failed, |
| 391 | #[serde(rename = "interrupted")] |
| 392 | Interrupted, |
| 393 | } |
| 394 | |
| 395 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 396 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 397 | pub struct CollaborationMode { |
| 398 | pub mode: ModeKind, |
| 399 | pub settings: Settings, |
| 400 | } |
| 401 | |
| 402 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 403 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 404 | #[serde(tag = "type")] |
| 405 | pub enum CommandAction { |
| 406 | #[serde(rename = "read")] |
| 407 | Read { |
| 408 | command: String, |
| 409 | name: String, |
| 410 | path: LegacyAppPathString, |
| 411 | }, |
| 412 | #[serde(rename = "listFiles")] |
| 413 | ListFiles { |
| 414 | command: String, |
| 415 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 416 | path: Option<String>, |
| 417 | }, |
| 418 | #[serde(rename = "search")] |
| 419 | Search { |
| 420 | command: String, |
| 421 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 422 | path: Option<String>, |
| 423 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 424 | query: Option<String>, |
| 425 | }, |
| 426 | #[serde(rename = "unknown")] |
| 427 | Unknown { |
| 428 | command: String, |
| 429 | }, |
| 430 | } |
| 431 | |
| 432 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 433 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 434 | pub struct CommandExecOutputDeltaNotification { |
| 435 | #[serde(rename = "capReached")] |
| 436 | pub cap_reached: bool, |
| 437 | #[serde(rename = "deltaBase64")] |
| 438 | pub delta_base64: String, |
| 439 | #[serde(rename = "processId")] |
| 440 | pub process_id: String, |
| 441 | pub stream: CommandExecOutputStream, |
| 442 | } |
| 443 | |
| 444 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 445 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 446 | pub enum CommandExecOutputStream { |
| 447 | #[serde(rename = "stdout")] |
| 448 | Stdout, |
| 449 | #[serde(rename = "stderr")] |
| 450 | Stderr, |
| 451 | } |
| 452 | |
| 453 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 454 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 455 | pub struct CommandExecParams { |
| 456 | pub command: Vec<String>, |
| 457 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 458 | pub cwd: Option<String>, |
| 459 | #[serde(rename = "disableOutputCap", default, skip_serializing_if = "Option::is_none")] |
| 460 | pub disable_output_cap: Option<bool>, |
| 461 | #[serde(rename = "disableTimeout", default, skip_serializing_if = "Option::is_none")] |
| 462 | pub disable_timeout: Option<bool>, |
| 463 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 464 | pub env: Option<BTreeMap<String, Option<String>>>, |
| 465 | #[serde(rename = "outputBytesCap", default, skip_serializing_if = "Option::is_none")] |
| 466 | pub output_bytes_cap: Option<u64>, |
| 467 | #[serde(rename = "processId", default, skip_serializing_if = "Option::is_none")] |
| 468 | pub process_id: Option<String>, |
| 469 | #[serde(rename = "sandboxPolicy", default, skip_serializing_if = "Option::is_none")] |
| 470 | pub sandbox_policy: Option<SandboxPolicy>, |
| 471 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 472 | pub size: Option<CommandExecTerminalSize>, |
| 473 | #[serde(rename = "streamStdin", default, skip_serializing_if = "Option::is_none")] |
| 474 | pub stream_stdin: Option<bool>, |
| 475 | #[serde(rename = "streamStdoutStderr", default, skip_serializing_if = "Option::is_none")] |
| 476 | pub stream_stdout_stderr: Option<bool>, |
| 477 | #[serde(rename = "timeoutMs", default, skip_serializing_if = "Option::is_none")] |
| 478 | pub timeout_ms: Option<i64>, |
| 479 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 480 | pub tty: Option<bool>, |
| 481 | } |
| 482 | |
| 483 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 484 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 485 | pub struct CommandExecResizeParams { |
| 486 | #[serde(rename = "processId")] |
| 487 | pub process_id: String, |
| 488 | pub size: CommandExecTerminalSize, |
| 489 | } |
| 490 | |
| 491 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 492 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 493 | pub struct CommandExecResizeResponse { |
| 494 | } |
| 495 | |
| 496 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 497 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 498 | pub struct CommandExecResponse { |
| 499 | #[serde(rename = "exitCode")] |
| 500 | pub exit_code: i32, |
| 501 | pub stderr: String, |
| 502 | pub stdout: String, |
| 503 | } |
| 504 | |
| 505 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 506 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 507 | pub struct CommandExecTerminalSize { |
| 508 | pub cols: u16, |
| 509 | pub rows: u16, |
| 510 | } |
| 511 | |
| 512 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 513 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 514 | pub struct CommandExecTerminateParams { |
| 515 | #[serde(rename = "processId")] |
| 516 | pub process_id: String, |
| 517 | } |
| 518 | |
| 519 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 520 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 521 | pub struct CommandExecTerminateResponse { |
| 522 | } |
| 523 | |
| 524 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 525 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 526 | pub struct CommandExecWriteParams { |
| 527 | #[serde(rename = "closeStdin", default, skip_serializing_if = "Option::is_none")] |
| 528 | pub close_stdin: Option<bool>, |
| 529 | #[serde(rename = "deltaBase64", default, skip_serializing_if = "Option::is_none")] |
| 530 | pub delta_base64: Option<String>, |
| 531 | #[serde(rename = "processId")] |
| 532 | pub process_id: String, |
| 533 | } |
| 534 | |
| 535 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 536 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 537 | pub struct CommandExecWriteResponse { |
| 538 | } |
| 539 | |
| 540 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 541 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 542 | pub enum CommandExecutionApprovalDecision { |
| 543 | #[serde(rename = "accept")] |
| 544 | Accept, |
| 545 | #[serde(rename = "acceptForSession")] |
| 546 | AcceptForSession, |
| 547 | #[serde(rename = "acceptWithExecpolicyAmendment")] |
| 548 | AcceptWithExecpolicyAmendment { |
| 549 | execpolicy_amendment: Vec<String>, |
| 550 | }, |
| 551 | #[serde(rename = "applyNetworkPolicyAmendment")] |
| 552 | ApplyNetworkPolicyAmendment { |
| 553 | network_policy_amendment: NetworkPolicyAmendment, |
| 554 | }, |
| 555 | #[serde(rename = "decline")] |
| 556 | Decline, |
| 557 | #[serde(rename = "cancel")] |
| 558 | Cancel, |
| 559 | } |
| 560 | |
| 561 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 562 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 563 | pub enum CommandExecutionApprovalKind { |
| 564 | #[serde(rename = "command")] |
| 565 | Command, |
| 566 | #[serde(rename = "writeStdin")] |
| 567 | WriteStdin, |
| 568 | } |
| 569 | |
| 570 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 571 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 572 | pub struct CommandExecutionOutputDeltaNotification { |
| 573 | pub delta: String, |
| 574 | #[serde(rename = "itemId")] |
| 575 | pub item_id: String, |
| 576 | #[serde(rename = "threadId")] |
| 577 | pub thread_id: String, |
| 578 | #[serde(rename = "turnId")] |
| 579 | pub turn_id: String, |
| 580 | } |
| 581 | |
| 582 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 583 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 584 | pub struct CommandExecutionRequestApprovalParams { |
| 585 | #[serde(rename = "approvalId", default, skip_serializing_if = "Option::is_none")] |
| 586 | pub approval_id: Option<String>, |
| 587 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 588 | pub command: Option<String>, |
| 589 | #[serde(rename = "commandActions", default, skip_serializing_if = "Option::is_none")] |
| 590 | pub command_actions: Option<Vec<CommandAction>>, |
| 591 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 592 | pub cwd: Option<LegacyAppPathString>, |
| 593 | #[serde(rename = "environmentId", default, skip_serializing_if = "Option::is_none")] |
| 594 | pub environment_id: Option<String>, |
| 595 | #[serde(rename = "itemId")] |
| 596 | pub item_id: String, |
| 597 | #[serde(default = "default_command_execution_request_approval_params_kind")] |
| 598 | pub kind: CommandExecutionApprovalKind, |
| 599 | #[serde(rename = "networkApprovalContext", default, skip_serializing_if = "Option::is_none")] |
| 600 | pub network_approval_context: Option<NetworkApprovalContext>, |
| 601 | #[serde(rename = "proposedExecpolicyAmendment", default, skip_serializing_if = "Option::is_none")] |
| 602 | pub proposed_execpolicy_amendment: Option<Vec<String>>, |
| 603 | #[serde(rename = "proposedNetworkPolicyAmendments", default, skip_serializing_if = "Option::is_none")] |
| 604 | pub proposed_network_policy_amendments: Option<Vec<NetworkPolicyAmendment>>, |
| 605 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 606 | pub reason: Option<String>, |
| 607 | #[serde(rename = "startedAtMs")] |
| 608 | pub started_at_ms: i64, |
| 609 | #[serde(rename = "threadId")] |
| 610 | pub thread_id: String, |
| 611 | #[serde(rename = "turnId")] |
| 612 | pub turn_id: String, |
| 613 | } |
| 614 | |
| 615 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 616 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 617 | pub struct CommandExecutionRequestApprovalResponse { |
| 618 | pub decision: CommandExecutionApprovalDecision, |
| 619 | } |
| 620 | |
| 621 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 622 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 623 | pub enum CommandExecutionSource { |
| 624 | #[serde(rename = "agent")] |
| 625 | Agent, |
| 626 | #[serde(rename = "userShell")] |
| 627 | UserShell, |
| 628 | #[serde(rename = "unifiedExecStartup")] |
| 629 | UnifiedExecStartup, |
| 630 | #[serde(rename = "unifiedExecInteraction")] |
| 631 | UnifiedExecInteraction, |
| 632 | } |
| 633 | |
| 634 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 635 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 636 | pub enum CommandExecutionStatus { |
| 637 | #[serde(rename = "inProgress")] |
| 638 | InProgress, |
| 639 | #[serde(rename = "completed")] |
| 640 | Completed, |
| 641 | #[serde(rename = "failed")] |
| 642 | Failed, |
| 643 | #[serde(rename = "declined")] |
| 644 | Declined, |
| 645 | } |
| 646 | |
| 647 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 648 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 649 | pub struct ComputerUseConfig { |
| 650 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 651 | pub default_app_access: Option<AllowDenyRequirement>, |
| 652 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 653 | pub macos: Option<ComputerUseMacosConfig>, |
| 654 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 655 | pub windows: Option<ComputerUseWindowsConfig>, |
| 656 | } |
| 657 | |
| 658 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 659 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 660 | pub struct ComputerUseMacosConfig { |
| 661 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 662 | pub bundle_ids: Option<BTreeMap<String, AllowDenyRequirement>>, |
| 663 | } |
| 664 | |
| 665 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 666 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 667 | pub struct ComputerUseWindowsConfig { |
| 668 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 669 | pub aumids: Option<BTreeMap<String, AllowDenyRequirement>>, |
| 670 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 671 | pub exes: Option<Vec<ComputerUseWindowsExeConfig>>, |
| 672 | } |
| 673 | |
| 674 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 675 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 676 | pub struct ComputerUseWindowsExeConfig { |
| 677 | pub access: AllowDenyRequirement, |
| 678 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 679 | pub binary_name: Option<String>, |
| 680 | pub product_name: String, |
| 681 | pub publisher_name: String, |
| 682 | } |
| 683 | |
| 684 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 685 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 686 | pub struct Config { |
| 687 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 688 | pub analytics: Option<AnalyticsConfig>, |
| 689 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 690 | pub approval_policy: Option<AskForApproval>, |
| 691 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 692 | pub approvals_reviewer: Option<ApprovalsReviewer>, |
| 693 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 694 | pub browser_use: Option<BrowserUseConfig>, |
| 695 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 696 | pub compact_prompt: Option<String>, |
| 697 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 698 | pub computer_use: Option<ComputerUseConfig>, |
| 699 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 700 | pub desktop: Option<Map<String, Value>>, |
| 701 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 702 | pub developer_instructions: Option<String>, |
| 703 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 704 | pub forced_chatgpt_workspace_id: Option<ForcedChatgptWorkspaceIds>, |
| 705 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 706 | pub forced_login_method: Option<ForcedLoginMethod>, |
| 707 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 708 | pub instructions: Option<String>, |
| 709 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 710 | pub model: Option<String>, |
| 711 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 712 | pub model_auto_compact_token_limit: Option<i64>, |
| 713 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 714 | pub model_auto_compact_token_limit_scope: Option<AutoCompactTokenLimitScope>, |
| 715 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 716 | pub model_context_window: Option<i64>, |
| 717 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 718 | pub model_provider: Option<String>, |
| 719 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 720 | pub model_reasoning_effort: Option<ReasoningEffort>, |
| 721 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 722 | pub model_reasoning_summary: Option<ReasoningSummary>, |
| 723 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 724 | pub model_verbosity: Option<Verbosity>, |
| 725 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 726 | pub review_model: Option<String>, |
| 727 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 728 | pub sandbox_mode: Option<SandboxMode>, |
| 729 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 730 | pub sandbox_workspace_write: Option<SandboxWorkspaceWrite>, |
| 731 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 732 | pub service_tier: Option<String>, |
| 733 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 734 | pub tools: Option<ToolsV2>, |
| 735 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 736 | pub web_search: Option<WebSearchMode>, |
| 737 | #[serde(flatten)] |
| 738 | pub additional: Map<String, Value>, |
| 739 | } |
| 740 | |
| 741 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 742 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 743 | pub struct ConfigBatchWriteParams { |
| 744 | pub edits: Vec<ConfigEdit>, |
| 745 | #[serde(rename = "expectedVersion", default, skip_serializing_if = "Option::is_none")] |
| 746 | pub expected_version: Option<String>, |
| 747 | #[serde(rename = "filePath", default, skip_serializing_if = "Option::is_none")] |
| 748 | pub file_path: Option<String>, |
| 749 | #[serde(rename = "reloadUserConfig", default, skip_serializing_if = "Option::is_none")] |
| 750 | pub reload_user_config: Option<bool>, |
| 751 | } |
| 752 | |
| 753 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 754 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 755 | pub struct ConfigEdit { |
| 756 | #[serde(rename = "keyPath")] |
| 757 | pub key_path: String, |
| 758 | #[serde(rename = "mergeStrategy")] |
| 759 | pub merge_strategy: MergeStrategy, |
| 760 | pub value: Value, |
| 761 | } |
| 762 | |
| 763 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 764 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 765 | pub struct ConfigLayer { |
| 766 | pub config: Value, |
| 767 | #[serde(rename = "disabledReason", default, skip_serializing_if = "Option::is_none")] |
| 768 | pub disabled_reason: Option<String>, |
| 769 | pub name: ConfigLayerSource, |
| 770 | pub version: String, |
| 771 | } |
| 772 | |
| 773 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 774 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 775 | pub struct ConfigLayerMetadata { |
| 776 | pub name: ConfigLayerSource, |
| 777 | pub version: String, |
| 778 | } |
| 779 | |
| 780 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 781 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 782 | #[serde(tag = "type")] |
| 783 | pub enum ConfigLayerSource { |
| 784 | #[serde(rename = "packagedDefaults")] |
| 785 | PackagedDefaults { |
| 786 | file: AbsolutePathBuf, |
| 787 | }, |
| 788 | #[serde(rename = "mdm")] |
| 789 | Mdm { |
| 790 | domain: String, |
| 791 | key: String, |
| 792 | }, |
| 793 | #[serde(rename = "system")] |
| 794 | System { |
| 795 | file: AbsolutePathBuf, |
| 796 | }, |
| 797 | #[serde(rename = "enterpriseManaged")] |
| 798 | EnterpriseManaged { |
| 799 | id: String, |
| 800 | name: String, |
| 801 | }, |
| 802 | #[serde(rename = "user")] |
| 803 | User { |
| 804 | file: AbsolutePathBuf, |
| 805 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 806 | profile: Option<String>, |
| 807 | }, |
| 808 | #[serde(rename = "project")] |
| 809 | Project { |
| 810 | #[serde(rename = "dotCodexFolder")] |
| 811 | dot_codex_folder: AbsolutePathBuf, |
| 812 | }, |
| 813 | #[serde(rename = "sessionFlags")] |
| 814 | SessionFlags {}, |
| 815 | #[serde(rename = "legacyManagedConfigTomlFromFile")] |
| 816 | LegacyManagedConfigTomlFromFile { |
| 817 | file: AbsolutePathBuf, |
| 818 | }, |
| 819 | #[serde(rename = "legacyManagedConfigTomlFromMdm")] |
| 820 | LegacyManagedConfigTomlFromMdm {}, |
| 821 | } |
| 822 | |
| 823 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 824 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 825 | pub struct ConfigReadParams { |
| 826 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 827 | pub cwd: Option<String>, |
| 828 | #[serde(rename = "includeLayers", default, skip_serializing_if = "Option::is_none")] |
| 829 | pub include_layers: Option<bool>, |
| 830 | } |
| 831 | |
| 832 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 833 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 834 | pub struct ConfigReadResponse { |
| 835 | pub config: Config, |
| 836 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 837 | pub layers: Option<Vec<ConfigLayer>>, |
| 838 | pub origins: BTreeMap<String, ConfigLayerMetadata>, |
| 839 | } |
| 840 | |
| 841 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 842 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 843 | pub struct ConfigValueWriteParams { |
| 844 | #[serde(rename = "expectedVersion", default, skip_serializing_if = "Option::is_none")] |
| 845 | pub expected_version: Option<String>, |
| 846 | #[serde(rename = "filePath", default, skip_serializing_if = "Option::is_none")] |
| 847 | pub file_path: Option<String>, |
| 848 | #[serde(rename = "keyPath")] |
| 849 | pub key_path: String, |
| 850 | #[serde(rename = "mergeStrategy")] |
| 851 | pub merge_strategy: MergeStrategy, |
| 852 | pub value: Value, |
| 853 | } |
| 854 | |
| 855 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 856 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 857 | pub struct ConfigWriteResponse { |
| 858 | #[serde(rename = "filePath")] |
| 859 | pub file_path: AbsolutePathBuf, |
| 860 | #[serde(rename = "overriddenMetadata", default, skip_serializing_if = "Option::is_none")] |
| 861 | pub overridden_metadata: Option<OverriddenMetadata>, |
| 862 | pub status: WriteStatus, |
| 863 | pub version: String, |
| 864 | } |
| 865 | |
| 866 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 867 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 868 | pub struct ContextCompactedNotification { |
| 869 | #[serde(rename = "threadId")] |
| 870 | pub thread_id: String, |
| 871 | #[serde(rename = "turnId")] |
| 872 | pub turn_id: String, |
| 873 | } |
| 874 | |
| 875 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 876 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 877 | pub enum CyberAccessProgram { |
| 878 | #[serde(rename = "standard")] |
| 879 | Standard, |
| 880 | #[serde(rename = "daybreakBlue")] |
| 881 | DaybreakBlue, |
| 882 | #[serde(rename = "daybreakRed")] |
| 883 | DaybreakRed, |
| 884 | } |
| 885 | |
| 886 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 887 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 888 | #[serde(tag = "type")] |
| 889 | pub enum DynamicToolCallOutputContentItem { |
| 890 | #[serde(rename = "inputText")] |
| 891 | InputText { |
| 892 | text: String, |
| 893 | }, |
| 894 | #[serde(rename = "inputImage")] |
| 895 | InputImage { |
| 896 | #[serde(rename = "imageUrl")] |
| 897 | image_url: String, |
| 898 | }, |
| 899 | #[serde(rename = "inputAudio")] |
| 900 | InputAudio { |
| 901 | #[serde(rename = "audioUrl")] |
| 902 | audio_url: String, |
| 903 | }, |
| 904 | } |
| 905 | |
| 906 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 907 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 908 | pub struct DynamicToolCallParams { |
| 909 | pub arguments: Value, |
| 910 | #[serde(rename = "callId")] |
| 911 | pub call_id: String, |
| 912 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 913 | pub namespace: Option<String>, |
| 914 | #[serde(rename = "threadId")] |
| 915 | pub thread_id: String, |
| 916 | pub tool: String, |
| 917 | #[serde(rename = "turnId")] |
| 918 | pub turn_id: String, |
| 919 | } |
| 920 | |
| 921 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 922 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 923 | pub struct DynamicToolCallResponse { |
| 924 | #[serde(rename = "contentItems")] |
| 925 | pub content_items: Vec<DynamicToolCallOutputContentItem>, |
| 926 | pub success: bool, |
| 927 | } |
| 928 | |
| 929 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 930 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 931 | pub enum DynamicToolCallStatus { |
| 932 | #[serde(rename = "inProgress")] |
| 933 | InProgress, |
| 934 | #[serde(rename = "completed")] |
| 935 | Completed, |
| 936 | #[serde(rename = "failed")] |
| 937 | Failed, |
| 938 | } |
| 939 | |
| 940 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 941 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 942 | pub struct ErrorNotification { |
| 943 | pub error: TurnError, |
| 944 | #[serde(rename = "threadId")] |
| 945 | pub thread_id: String, |
| 946 | #[serde(rename = "turnId")] |
| 947 | pub turn_id: String, |
| 948 | #[serde(rename = "willRetry")] |
| 949 | pub will_retry: bool, |
| 950 | } |
| 951 | |
| 952 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 953 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 954 | pub enum FileChangeApprovalDecision { |
| 955 | #[serde(rename = "accept")] |
| 956 | Accept, |
| 957 | #[serde(rename = "acceptForSession")] |
| 958 | AcceptForSession, |
| 959 | #[serde(rename = "decline")] |
| 960 | Decline, |
| 961 | #[serde(rename = "cancel")] |
| 962 | Cancel, |
| 963 | } |
| 964 | |
| 965 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 966 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 967 | pub struct FileChangeOutputDeltaNotification { |
| 968 | pub delta: String, |
| 969 | #[serde(rename = "itemId")] |
| 970 | pub item_id: String, |
| 971 | #[serde(rename = "threadId")] |
| 972 | pub thread_id: String, |
| 973 | #[serde(rename = "turnId")] |
| 974 | pub turn_id: String, |
| 975 | } |
| 976 | |
| 977 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 978 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 979 | pub struct FileChangePatchUpdatedNotification { |
| 980 | pub changes: Vec<FileUpdateChange>, |
| 981 | #[serde(rename = "itemId")] |
| 982 | pub item_id: String, |
| 983 | #[serde(rename = "threadId")] |
| 984 | pub thread_id: String, |
| 985 | #[serde(rename = "turnId")] |
| 986 | pub turn_id: String, |
| 987 | } |
| 988 | |
| 989 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 990 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 991 | pub struct FileChangeRequestApprovalParams { |
| 992 | #[serde(rename = "grantRoot", default, skip_serializing_if = "Option::is_none")] |
| 993 | pub grant_root: Option<String>, |
| 994 | #[serde(rename = "itemId")] |
| 995 | pub item_id: String, |
| 996 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 997 | pub reason: Option<String>, |
| 998 | #[serde(rename = "startedAtMs")] |
| 999 | pub started_at_ms: i64, |
| 1000 | #[serde(rename = "threadId")] |
| 1001 | pub thread_id: String, |
| 1002 | #[serde(rename = "turnId")] |
| 1003 | pub turn_id: String, |
| 1004 | } |
| 1005 | |
| 1006 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1007 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1008 | pub struct FileChangeRequestApprovalResponse { |
| 1009 | pub decision: FileChangeApprovalDecision, |
| 1010 | } |
| 1011 | |
| 1012 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1013 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1014 | pub enum FileSystemAccessMode { |
| 1015 | #[serde(rename = "read")] |
| 1016 | Read, |
| 1017 | #[serde(rename = "write")] |
| 1018 | Write, |
| 1019 | #[serde(rename = "deny")] |
| 1020 | Deny, |
| 1021 | } |
| 1022 | |
| 1023 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1024 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1025 | #[serde(tag = "type")] |
| 1026 | pub enum FileSystemPath { |
| 1027 | #[serde(rename = "path")] |
| 1028 | Path { |
| 1029 | path: LegacyAppPathString, |
| 1030 | }, |
| 1031 | #[serde(rename = "glob_pattern")] |
| 1032 | GlobPattern { |
| 1033 | pattern: String, |
| 1034 | }, |
| 1035 | #[serde(rename = "special")] |
| 1036 | Special { |
| 1037 | value: FileSystemSpecialPath, |
| 1038 | }, |
| 1039 | } |
| 1040 | |
| 1041 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1042 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1043 | pub struct FileSystemSandboxEntry { |
| 1044 | pub access: FileSystemAccessMode, |
| 1045 | pub path: FileSystemPath, |
| 1046 | } |
| 1047 | |
| 1048 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1049 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1050 | #[serde(tag = "kind")] |
| 1051 | pub enum FileSystemSpecialPath { |
| 1052 | #[serde(rename = "root")] |
| 1053 | Root {}, |
| 1054 | #[serde(rename = "minimal")] |
| 1055 | Minimal {}, |
| 1056 | #[serde(rename = "project_roots")] |
| 1057 | ProjectRoots { |
| 1058 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1059 | subpath: Option<LegacyAppPathString>, |
| 1060 | }, |
| 1061 | #[serde(rename = "tmpdir")] |
| 1062 | Tmpdir {}, |
| 1063 | #[serde(rename = "slash_tmp")] |
| 1064 | SlashTmp {}, |
| 1065 | #[serde(rename = "unknown")] |
| 1066 | Unknown { |
| 1067 | path: String, |
| 1068 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1069 | subpath: Option<LegacyAppPathString>, |
| 1070 | }, |
| 1071 | } |
| 1072 | |
| 1073 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1074 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1075 | pub struct FileUpdateChange { |
| 1076 | pub diff: String, |
| 1077 | pub kind: PatchChangeKind, |
| 1078 | pub path: String, |
| 1079 | } |
| 1080 | |
| 1081 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1082 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1083 | #[serde(untagged)] |
| 1084 | pub enum ForcedChatgptWorkspaceIds { |
| 1085 | String(String), |
| 1086 | Strings(Vec<String>), |
| 1087 | } |
| 1088 | |
| 1089 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1090 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1091 | pub enum ForcedLoginMethod { |
| 1092 | #[serde(rename = "chatgpt")] |
| 1093 | Chatgpt, |
| 1094 | #[serde(rename = "api")] |
| 1095 | Api, |
| 1096 | } |
| 1097 | |
| 1098 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1099 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1100 | pub struct FsChangedNotification { |
| 1101 | #[serde(rename = "changedPaths")] |
| 1102 | pub changed_paths: Vec<AbsolutePathBuf>, |
| 1103 | #[serde(rename = "watchId")] |
| 1104 | pub watch_id: String, |
| 1105 | } |
| 1106 | |
| 1107 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1108 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1109 | pub struct FsCopyParams { |
| 1110 | #[serde(rename = "destinationPath")] |
| 1111 | pub destination_path: AbsolutePathBuf, |
| 1112 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1113 | pub recursive: Option<bool>, |
| 1114 | #[serde(rename = "sourcePath")] |
| 1115 | pub source_path: AbsolutePathBuf, |
| 1116 | } |
| 1117 | |
| 1118 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1119 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1120 | pub struct FsCopyResponse { |
| 1121 | } |
| 1122 | |
| 1123 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1124 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1125 | pub struct FsCreateDirectoryParams { |
| 1126 | pub path: AbsolutePathBuf, |
| 1127 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1128 | pub recursive: Option<bool>, |
| 1129 | } |
| 1130 | |
| 1131 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1132 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1133 | pub struct FsCreateDirectoryResponse { |
| 1134 | } |
| 1135 | |
| 1136 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1137 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1138 | pub struct FsGetMetadataParams { |
| 1139 | pub path: AbsolutePathBuf, |
| 1140 | } |
| 1141 | |
| 1142 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1143 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1144 | pub struct FsGetMetadataResponse { |
| 1145 | #[serde(rename = "createdAtMs")] |
| 1146 | pub created_at_ms: i64, |
| 1147 | #[serde(rename = "isDirectory")] |
| 1148 | pub is_directory: bool, |
| 1149 | #[serde(rename = "isFile")] |
| 1150 | pub is_file: bool, |
| 1151 | #[serde(rename = "isSymlink")] |
| 1152 | pub is_symlink: bool, |
| 1153 | #[serde(rename = "modifiedAtMs")] |
| 1154 | pub modified_at_ms: i64, |
| 1155 | } |
| 1156 | |
| 1157 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1158 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1159 | pub struct FsReadDirectoryEntry { |
| 1160 | #[serde(rename = "fileName")] |
| 1161 | pub file_name: String, |
| 1162 | #[serde(rename = "isDirectory")] |
| 1163 | pub is_directory: bool, |
| 1164 | #[serde(rename = "isFile")] |
| 1165 | pub is_file: bool, |
| 1166 | } |
| 1167 | |
| 1168 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1169 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1170 | pub struct FsReadDirectoryParams { |
| 1171 | pub path: AbsolutePathBuf, |
| 1172 | } |
| 1173 | |
| 1174 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1175 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1176 | pub struct FsReadDirectoryResponse { |
| 1177 | pub entries: Vec<FsReadDirectoryEntry>, |
| 1178 | } |
| 1179 | |
| 1180 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1181 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1182 | pub struct FsReadFileParams { |
| 1183 | pub path: AbsolutePathBuf, |
| 1184 | } |
| 1185 | |
| 1186 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1187 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1188 | pub struct FsReadFileResponse { |
| 1189 | #[serde(rename = "dataBase64")] |
| 1190 | pub data_base64: String, |
| 1191 | } |
| 1192 | |
| 1193 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1194 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1195 | pub struct FsRemoveParams { |
| 1196 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1197 | pub force: Option<bool>, |
| 1198 | pub path: AbsolutePathBuf, |
| 1199 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1200 | pub recursive: Option<bool>, |
| 1201 | } |
| 1202 | |
| 1203 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1204 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1205 | pub struct FsRemoveResponse { |
| 1206 | } |
| 1207 | |
| 1208 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1209 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1210 | pub struct FsUnwatchParams { |
| 1211 | #[serde(rename = "watchId")] |
| 1212 | pub watch_id: String, |
| 1213 | } |
| 1214 | |
| 1215 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1216 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1217 | pub struct FsUnwatchResponse { |
| 1218 | } |
| 1219 | |
| 1220 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1221 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1222 | pub struct FsWatchParams { |
| 1223 | pub path: AbsolutePathBuf, |
| 1224 | #[serde(rename = "watchId")] |
| 1225 | pub watch_id: String, |
| 1226 | } |
| 1227 | |
| 1228 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1229 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1230 | pub struct FsWatchResponse { |
| 1231 | pub path: AbsolutePathBuf, |
| 1232 | } |
| 1233 | |
| 1234 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1235 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1236 | pub struct FsWriteFileParams { |
| 1237 | #[serde(rename = "dataBase64")] |
| 1238 | pub data_base64: String, |
| 1239 | pub path: AbsolutePathBuf, |
| 1240 | } |
| 1241 | |
| 1242 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1243 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1244 | pub struct FsWriteFileResponse { |
| 1245 | } |
| 1246 | |
| 1247 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1248 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1249 | #[serde(untagged)] |
| 1250 | pub enum FunctionCallOutputBody { |
| 1251 | String(String), |
| 1252 | FunctionCallOutputContentItemList(Vec<FunctionCallOutputContentItem>), |
| 1253 | } |
| 1254 | |
| 1255 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1256 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1257 | #[serde(tag = "type")] |
| 1258 | pub enum FunctionCallOutputContentItem { |
| 1259 | #[serde(rename = "input_text")] |
| 1260 | InputText { |
| 1261 | text: String, |
| 1262 | }, |
| 1263 | #[serde(rename = "input_image")] |
| 1264 | InputImage { |
| 1265 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1266 | detail: Option<ImageDetail>, |
| 1267 | #[serde(flatten)] |
| 1268 | kind: FunctionCallOutputContentItemInputImageKind, |
| 1269 | }, |
| 1270 | #[serde(rename = "input_audio")] |
| 1271 | InputAudio { |
| 1272 | audio_url: String, |
| 1273 | }, |
| 1274 | #[serde(rename = "encrypted_content")] |
| 1275 | EncryptedContent { |
| 1276 | encrypted_content: String, |
| 1277 | }, |
| 1278 | } |
| 1279 | |
| 1280 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1281 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1282 | pub enum FunctionCallOutputContentItemInputImageKind { |
| 1283 | #[serde(rename = "image_url")] |
| 1284 | ImageUrl(String), |
| 1285 | #[serde(rename = "file_id")] |
| 1286 | FileId(String), |
| 1287 | } |
| 1288 | |
| 1289 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1290 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1291 | pub struct GitInfo { |
| 1292 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1293 | pub branch: Option<String>, |
| 1294 | #[serde(rename = "originUrl", default, skip_serializing_if = "Option::is_none")] |
| 1295 | pub origin_url: Option<String>, |
| 1296 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1297 | pub sha: Option<String>, |
| 1298 | } |
| 1299 | |
| 1300 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1301 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1302 | pub struct GrantedPermissionProfile { |
| 1303 | #[serde(rename = "fileSystem", default, skip_serializing_if = "Option::is_none")] |
| 1304 | pub file_system: Option<AdditionalFileSystemPermissions>, |
| 1305 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1306 | pub network: Option<AdditionalNetworkPermissions>, |
| 1307 | } |
| 1308 | |
| 1309 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1310 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1311 | pub struct HookErrorInfo { |
| 1312 | pub message: String, |
| 1313 | pub path: String, |
| 1314 | } |
| 1315 | |
| 1316 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1317 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1318 | pub enum HookEventName { |
| 1319 | #[serde(rename = "preModelRequest")] |
| 1320 | PreModelRequest, |
| 1321 | #[serde(rename = "postModelRequest")] |
| 1322 | PostModelRequest, |
| 1323 | #[serde(rename = "preToolUse")] |
| 1324 | PreToolUse, |
| 1325 | #[serde(rename = "permissionRequest")] |
| 1326 | PermissionRequest, |
| 1327 | #[serde(rename = "postToolUse")] |
| 1328 | PostToolUse, |
| 1329 | #[serde(rename = "preCompact")] |
| 1330 | PreCompact, |
| 1331 | #[serde(rename = "postCompact")] |
| 1332 | PostCompact, |
| 1333 | #[serde(rename = "sessionStart")] |
| 1334 | SessionStart, |
| 1335 | #[serde(rename = "sessionEnd")] |
| 1336 | SessionEnd, |
| 1337 | #[serde(rename = "userPromptSubmit")] |
| 1338 | UserPromptSubmit, |
| 1339 | #[serde(rename = "subagentStart")] |
| 1340 | SubagentStart, |
| 1341 | #[serde(rename = "subagentStop")] |
| 1342 | SubagentStop, |
| 1343 | #[serde(rename = "stop")] |
| 1344 | Stop, |
| 1345 | #[serde(rename = "interrupt")] |
| 1346 | Interrupt, |
| 1347 | } |
| 1348 | |
| 1349 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1350 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1351 | pub struct HookMetadata { |
| 1352 | #[serde(rename = "additionalContextLimit", default, skip_serializing_if = "Option::is_none")] |
| 1353 | pub additional_context_limit: Option<u64>, |
| 1354 | #[serde(rename = "currentHash")] |
| 1355 | pub current_hash: String, |
| 1356 | #[serde(rename = "displayOrder")] |
| 1357 | pub display_order: i64, |
| 1358 | pub enabled: bool, |
| 1359 | #[serde(rename = "environmentId", default, skip_serializing_if = "Option::is_none")] |
| 1360 | pub environment_id: Option<String>, |
| 1361 | #[serde(rename = "eventName")] |
| 1362 | pub event_name: HookEventName, |
| 1363 | #[serde(rename = "isManaged")] |
| 1364 | pub is_managed: bool, |
| 1365 | pub key: String, |
| 1366 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1367 | pub matcher: Option<String>, |
| 1368 | #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")] |
| 1369 | pub plugin_id: Option<String>, |
| 1370 | pub source: HookSource, |
| 1371 | #[serde(rename = "sourcePath")] |
| 1372 | pub source_path: AbsolutePathBuf, |
| 1373 | #[serde(rename = "statusMessage", default, skip_serializing_if = "Option::is_none")] |
| 1374 | pub status_message: Option<String>, |
| 1375 | #[serde(rename = "timeoutSec")] |
| 1376 | pub timeout_sec: u64, |
| 1377 | #[serde(rename = "trustStatus")] |
| 1378 | pub trust_status: HookTrustStatus, |
| 1379 | #[serde(flatten)] |
| 1380 | pub kind: HookMetadataKind, |
| 1381 | } |
| 1382 | |
| 1383 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1384 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1385 | #[serde(tag = "handlerType")] |
| 1386 | pub enum HookMetadataKind { |
| 1387 | #[serde(rename = "command")] |
| 1388 | Command { |
| 1389 | #[serde(default)] |
| 1390 | r#async: bool, |
| 1391 | command: String, |
| 1392 | }, |
| 1393 | #[serde(rename = "mcpTool")] |
| 1394 | McpTool { |
| 1395 | server: String, |
| 1396 | tool: String, |
| 1397 | }, |
| 1398 | #[serde(rename = "prompt")] |
| 1399 | Prompt {}, |
| 1400 | #[serde(rename = "agent")] |
| 1401 | Agent {}, |
| 1402 | } |
| 1403 | |
| 1404 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1405 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1406 | pub struct HookPromptFragment { |
| 1407 | #[serde(rename = "hookRunId")] |
| 1408 | pub hook_run_id: String, |
| 1409 | pub text: String, |
| 1410 | } |
| 1411 | |
| 1412 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1413 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1414 | pub enum HookSource { |
| 1415 | #[serde(rename = "system")] |
| 1416 | System, |
| 1417 | #[serde(rename = "user")] |
| 1418 | User, |
| 1419 | #[serde(rename = "project")] |
| 1420 | Project, |
| 1421 | #[serde(rename = "mdm")] |
| 1422 | Mdm, |
| 1423 | #[serde(rename = "sessionFlags")] |
| 1424 | SessionFlags, |
| 1425 | #[serde(rename = "plugin")] |
| 1426 | Plugin, |
| 1427 | #[serde(rename = "cloudRequirements")] |
| 1428 | CloudRequirements, |
| 1429 | #[serde(rename = "cloudManagedConfig")] |
| 1430 | CloudManagedConfig, |
| 1431 | #[serde(rename = "legacyManagedConfigFile")] |
| 1432 | LegacyManagedConfigFile, |
| 1433 | #[serde(rename = "legacyManagedConfigMdm")] |
| 1434 | LegacyManagedConfigMdm, |
| 1435 | #[serde(rename = "unknown")] |
| 1436 | Unknown, |
| 1437 | } |
| 1438 | |
| 1439 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1440 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1441 | pub enum HookTrustStatus { |
| 1442 | #[serde(rename = "managed")] |
| 1443 | Managed, |
| 1444 | #[serde(rename = "untrusted")] |
| 1445 | Untrusted, |
| 1446 | #[serde(rename = "trusted")] |
| 1447 | Trusted, |
| 1448 | #[serde(rename = "modified")] |
| 1449 | Modified, |
| 1450 | } |
| 1451 | |
| 1452 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1453 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1454 | pub struct HooksListEntry { |
| 1455 | pub cwd: String, |
| 1456 | pub errors: Vec<HookErrorInfo>, |
| 1457 | pub hooks: Vec<HookMetadata>, |
| 1458 | pub warnings: Vec<String>, |
| 1459 | } |
| 1460 | |
| 1461 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1462 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1463 | pub struct HooksListParams { |
| 1464 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1465 | pub cwds: Option<Vec<String>>, |
| 1466 | #[serde(rename = "threadId", default, skip_serializing_if = "Option::is_none")] |
| 1467 | pub thread_id: Option<String>, |
| 1468 | } |
| 1469 | |
| 1470 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1471 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1472 | pub struct HooksListResponse { |
| 1473 | pub data: Vec<HooksListEntry>, |
| 1474 | } |
| 1475 | |
| 1476 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1477 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1478 | pub enum ImageDetail { |
| 1479 | #[serde(rename = "auto")] |
| 1480 | Auto, |
| 1481 | #[serde(rename = "low")] |
| 1482 | Low, |
| 1483 | #[serde(rename = "high")] |
| 1484 | High, |
| 1485 | #[serde(rename = "original")] |
| 1486 | Original, |
| 1487 | } |
| 1488 | |
| 1489 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1490 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1491 | #[serde(tag = "type")] |
| 1492 | pub enum ImageGenerationFailure { |
| 1493 | #[serde(rename = "usageLimitExceeded")] |
| 1494 | UsageLimitExceeded { |
| 1495 | #[serde(rename = "limitId")] |
| 1496 | limit_id: String, |
| 1497 | #[serde(rename = "resetsAt", default, skip_serializing_if = "Option::is_none")] |
| 1498 | resets_at: Option<i64>, |
| 1499 | }, |
| 1500 | } |
| 1501 | |
| 1502 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1503 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1504 | pub struct ImageGenerationInputImage { |
| 1505 | pub path: AbsolutePathBuf, |
| 1506 | pub sha256: String, |
| 1507 | } |
| 1508 | |
| 1509 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1510 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1511 | pub struct InitializeCapabilities { |
| 1512 | #[serde(rename = "experimentalApi", default)] |
| 1513 | pub experimental_api: bool, |
| 1514 | #[serde(rename = "explicitGatewayOauth", default, skip_serializing_if = "Option::is_none")] |
| 1515 | pub explicit_gateway_oauth: Option<bool>, |
| 1516 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1517 | pub extensions: Option<Map<String, Value>>, |
| 1518 | #[serde(rename = "mcpServerOpenaiFormElicitation", default, skip_serializing_if = "Option::is_none")] |
| 1519 | pub mcp_server_openai_form_elicitation: Option<bool>, |
| 1520 | #[serde(rename = "optOutNotificationMethods", default, skip_serializing_if = "Option::is_none")] |
| 1521 | pub opt_out_notification_methods: Option<Vec<String>>, |
| 1522 | #[serde(rename = "requestAttestation", default)] |
| 1523 | pub request_attestation: bool, |
| 1524 | } |
| 1525 | |
| 1526 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1527 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1528 | pub struct InitializeParams { |
| 1529 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1530 | pub capabilities: Option<InitializeCapabilities>, |
| 1531 | #[serde(rename = "clientInfo")] |
| 1532 | pub client_info: ClientInfo, |
| 1533 | } |
| 1534 | |
| 1535 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1536 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1537 | pub struct InitializeResponse { |
| 1538 | #[serde(rename = "codexHome")] |
| 1539 | pub codex_home: AbsolutePathBuf, |
| 1540 | #[serde(rename = "platformFamily")] |
| 1541 | pub platform_family: String, |
| 1542 | #[serde(rename = "platformOs")] |
| 1543 | pub platform_os: String, |
| 1544 | #[serde(rename = "userAgent")] |
| 1545 | pub user_agent: String, |
| 1546 | } |
| 1547 | |
| 1548 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1549 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1550 | pub enum InputModality { |
| 1551 | #[serde(rename = "text")] |
| 1552 | Text, |
| 1553 | #[serde(rename = "image")] |
| 1554 | Image, |
| 1555 | #[serde(rename = "audio")] |
| 1556 | Audio, |
| 1557 | } |
| 1558 | |
| 1559 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1560 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1561 | pub struct ItemCompletedNotification { |
| 1562 | #[serde(rename = "completedAtMs")] |
| 1563 | pub completed_at_ms: i64, |
| 1564 | pub item: ThreadItem, |
| 1565 | #[serde(rename = "threadId")] |
| 1566 | pub thread_id: String, |
| 1567 | #[serde(rename = "turnId")] |
| 1568 | pub turn_id: String, |
| 1569 | } |
| 1570 | |
| 1571 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1572 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1573 | pub struct ItemStartedNotification { |
| 1574 | pub item: ThreadItem, |
| 1575 | #[serde(rename = "startedAtMs")] |
| 1576 | pub started_at_ms: i64, |
| 1577 | #[serde(rename = "threadId")] |
| 1578 | pub thread_id: String, |
| 1579 | #[serde(rename = "turnId")] |
| 1580 | pub turn_id: String, |
| 1581 | } |
| 1582 | |
| 1583 | pub type LegacyAppPathString = String; |
| 1584 | |
| 1585 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1586 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1587 | pub struct ListMcpServerStatusParams { |
| 1588 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1589 | pub cursor: Option<String>, |
| 1590 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1591 | pub detail: Option<McpServerStatusDetail>, |
| 1592 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1593 | pub limit: Option<u32>, |
| 1594 | #[serde(rename = "serverName", default, skip_serializing_if = "Option::is_none")] |
| 1595 | pub server_name: Option<String>, |
| 1596 | #[serde(rename = "threadId", default, skip_serializing_if = "Option::is_none")] |
| 1597 | pub thread_id: Option<String>, |
| 1598 | } |
| 1599 | |
| 1600 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1601 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1602 | pub struct ListMcpServerStatusResponse { |
| 1603 | pub data: Vec<McpServerStatus>, |
| 1604 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 1605 | pub next_cursor: Option<String>, |
| 1606 | } |
| 1607 | |
| 1608 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1609 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1610 | pub enum McpAppDisplayMode { |
| 1611 | #[serde(rename = "inline")] |
| 1612 | Inline, |
| 1613 | #[serde(rename = "fullscreen")] |
| 1614 | Fullscreen, |
| 1615 | } |
| 1616 | |
| 1617 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1618 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1619 | pub struct McpAppUi { |
| 1620 | #[serde(rename = "preferredModelDisplayMode")] |
| 1621 | pub preferred_model_display_mode: McpAppDisplayMode, |
| 1622 | #[serde(rename = "resourceUri")] |
| 1623 | pub resource_uri: String, |
| 1624 | } |
| 1625 | |
| 1626 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1627 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1628 | pub enum McpAuthStatus { |
| 1629 | #[serde(rename = "unknown")] |
| 1630 | Unknown, |
| 1631 | #[serde(rename = "unsupported")] |
| 1632 | Unsupported, |
| 1633 | #[serde(rename = "notLoggedIn")] |
| 1634 | NotLoggedIn, |
| 1635 | #[serde(rename = "bearerToken")] |
| 1636 | BearerToken, |
| 1637 | #[serde(rename = "oAuth")] |
| 1638 | OAuth, |
| 1639 | } |
| 1640 | |
| 1641 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1642 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1643 | pub enum McpServerConnectionStatus { |
| 1644 | #[serde(rename = "notStarted")] |
| 1645 | NotStarted, |
| 1646 | #[serde(rename = "starting")] |
| 1647 | Starting, |
| 1648 | #[serde(rename = "connected")] |
| 1649 | Connected, |
| 1650 | #[serde(rename = "authenticationRequired")] |
| 1651 | AuthenticationRequired, |
| 1652 | #[serde(rename = "failed")] |
| 1653 | Failed, |
| 1654 | #[serde(rename = "cancelled")] |
| 1655 | Cancelled, |
| 1656 | #[serde(rename = "disabled")] |
| 1657 | Disabled, |
| 1658 | } |
| 1659 | |
| 1660 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1661 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1662 | pub struct McpServerInfo { |
| 1663 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1664 | pub description: Option<String>, |
| 1665 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1666 | pub icons: Option<Vec<Value>>, |
| 1667 | pub name: String, |
| 1668 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1669 | pub title: Option<String>, |
| 1670 | pub version: String, |
| 1671 | #[serde(rename = "websiteUrl", default, skip_serializing_if = "Option::is_none")] |
| 1672 | pub website_url: Option<String>, |
| 1673 | } |
| 1674 | |
| 1675 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1676 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1677 | pub struct McpServerStatus { |
| 1678 | #[serde(rename = "authStatus")] |
| 1679 | pub auth_status: McpAuthStatus, |
| 1680 | #[serde(rename = "httpOrigin", default, skip_serializing_if = "Option::is_none")] |
| 1681 | pub http_origin: Option<String>, |
| 1682 | pub name: String, |
| 1683 | #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")] |
| 1684 | pub plugin_id: Option<String>, |
| 1685 | #[serde(rename = "resourceTemplates")] |
| 1686 | pub resource_templates: Vec<ResourceTemplate>, |
| 1687 | pub resources: Vec<Resource>, |
| 1688 | #[serde(rename = "runtimeStatus", default, skip_serializing_if = "Option::is_none")] |
| 1689 | pub runtime_status: Option<McpServerConnectionStatus>, |
| 1690 | #[serde(rename = "serverCapabilities", default, skip_serializing_if = "Option::is_none")] |
| 1691 | pub server_capabilities: Option<Value>, |
| 1692 | #[serde(rename = "serverInfo", default, skip_serializing_if = "Option::is_none")] |
| 1693 | pub server_info: Option<McpServerInfo>, |
| 1694 | #[serde(rename = "toolListMeta", default, skip_serializing_if = "Option::is_none")] |
| 1695 | pub tool_list_meta: Option<Value>, |
| 1696 | pub tools: BTreeMap<String, Tool>, |
| 1697 | #[serde(rename = "toolsError", default, skip_serializing_if = "Option::is_none")] |
| 1698 | pub tools_error: Option<String>, |
| 1699 | } |
| 1700 | |
| 1701 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1702 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1703 | pub enum McpServerStatusDetail { |
| 1704 | #[serde(rename = "full")] |
| 1705 | Full, |
| 1706 | #[serde(rename = "toolsAndAuthOnly")] |
| 1707 | ToolsAndAuthOnly, |
| 1708 | } |
| 1709 | |
| 1710 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1711 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1712 | pub struct McpToolCallAppContext { |
| 1713 | #[serde(rename = "actionName", default, skip_serializing_if = "Option::is_none")] |
| 1714 | pub action_name: Option<String>, |
| 1715 | #[serde(rename = "appName", default, skip_serializing_if = "Option::is_none")] |
| 1716 | pub app_name: Option<String>, |
| 1717 | #[serde(rename = "connectorId")] |
| 1718 | pub connector_id: String, |
| 1719 | #[serde(rename = "linkId", default, skip_serializing_if = "Option::is_none")] |
| 1720 | pub link_id: Option<String>, |
| 1721 | #[serde(rename = "resourceUri", default, skip_serializing_if = "Option::is_none")] |
| 1722 | pub resource_uri: Option<String>, |
| 1723 | } |
| 1724 | |
| 1725 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1726 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1727 | pub struct McpToolCallError { |
| 1728 | pub message: String, |
| 1729 | } |
| 1730 | |
| 1731 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1732 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1733 | pub struct McpToolCallProgressNotification { |
| 1734 | #[serde(rename = "itemId")] |
| 1735 | pub item_id: String, |
| 1736 | pub message: String, |
| 1737 | #[serde(rename = "threadId")] |
| 1738 | pub thread_id: String, |
| 1739 | #[serde(rename = "turnId")] |
| 1740 | pub turn_id: String, |
| 1741 | } |
| 1742 | |
| 1743 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1744 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1745 | pub struct McpToolCallResult { |
| 1746 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1747 | pub _meta: Option<Value>, |
| 1748 | pub content: Vec<Value>, |
| 1749 | #[serde(rename = "structuredContent", default, skip_serializing_if = "Option::is_none")] |
| 1750 | pub structured_content: Option<Value>, |
| 1751 | } |
| 1752 | |
| 1753 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1754 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1755 | pub enum McpToolCallStatus { |
| 1756 | #[serde(rename = "inProgress")] |
| 1757 | InProgress, |
| 1758 | #[serde(rename = "completed")] |
| 1759 | Completed, |
| 1760 | #[serde(rename = "failed")] |
| 1761 | Failed, |
| 1762 | } |
| 1763 | |
| 1764 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1765 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1766 | pub struct MemoryCitation { |
| 1767 | pub entries: Vec<MemoryCitationEntry>, |
| 1768 | #[serde(rename = "threadIds")] |
| 1769 | pub thread_ids: Vec<String>, |
| 1770 | } |
| 1771 | |
| 1772 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1773 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1774 | pub struct MemoryCitationEntry { |
| 1775 | #[serde(rename = "lineEnd")] |
| 1776 | pub line_end: u32, |
| 1777 | #[serde(rename = "lineStart")] |
| 1778 | pub line_start: u32, |
| 1779 | pub note: String, |
| 1780 | pub path: String, |
| 1781 | } |
| 1782 | |
| 1783 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1784 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1785 | pub enum MergeStrategy { |
| 1786 | #[serde(rename = "replace")] |
| 1787 | Replace, |
| 1788 | #[serde(rename = "upsert")] |
| 1789 | Upsert, |
| 1790 | } |
| 1791 | |
| 1792 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1793 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1794 | pub enum MessagePhase { |
| 1795 | #[serde(rename = "commentary")] |
| 1796 | Commentary, |
| 1797 | #[serde(rename = "partial_answer")] |
| 1798 | PartialAnswer, |
| 1799 | #[serde(rename = "final_answer")] |
| 1800 | FinalAnswer, |
| 1801 | } |
| 1802 | |
| 1803 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1804 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1805 | pub struct MisalignmentErrorDetails { |
| 1806 | #[serde(rename = "detailedExplanation", default, skip_serializing_if = "Option::is_none")] |
| 1807 | pub detailed_explanation: Option<String>, |
| 1808 | #[serde(rename = "errorType", default, skip_serializing_if = "Option::is_none")] |
| 1809 | pub error_type: Option<String>, |
| 1810 | #[serde(rename = "reviewTarget", default, skip_serializing_if = "Option::is_none")] |
| 1811 | pub review_target: Option<String>, |
| 1812 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1813 | pub steer: Option<MisalignmentSteer>, |
| 1814 | } |
| 1815 | |
| 1816 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1817 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1818 | pub struct MisalignmentSteer { |
| 1819 | pub message: String, |
| 1820 | } |
| 1821 | |
| 1822 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1823 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1824 | pub enum ModeKind { |
| 1825 | #[serde(rename = "plan")] |
| 1826 | Plan, |
| 1827 | #[serde(rename = "default")] |
| 1828 | Default, |
| 1829 | } |
| 1830 | |
| 1831 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1832 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1833 | pub struct Model { |
| 1834 | #[serde(rename = "additionalSpeedTiers", default)] |
| 1835 | pub additional_speed_tiers: Vec<String>, |
| 1836 | #[serde(rename = "availabilityNux", default, skip_serializing_if = "Option::is_none")] |
| 1837 | pub availability_nux: Option<ModelAvailabilityNux>, |
| 1838 | #[serde(rename = "availableAccessPrograms", default, skip_serializing_if = "Option::is_none")] |
| 1839 | pub available_access_programs: Option<ModelAccessPrograms>, |
| 1840 | #[serde(rename = "defaultReasoningEffort")] |
| 1841 | pub default_reasoning_effort: ReasoningEffort, |
| 1842 | #[serde(rename = "defaultServiceTier", default, skip_serializing_if = "Option::is_none")] |
| 1843 | pub default_service_tier: Option<String>, |
| 1844 | pub description: String, |
| 1845 | #[serde(rename = "displayName")] |
| 1846 | pub display_name: String, |
| 1847 | pub hidden: bool, |
| 1848 | pub id: String, |
| 1849 | #[serde(rename = "inputModalities", default = "default_model_input_modalities")] |
| 1850 | pub input_modalities: Vec<InputModality>, |
| 1851 | #[serde(rename = "isDefault")] |
| 1852 | pub is_default: bool, |
| 1853 | pub model: String, |
| 1854 | #[serde(rename = "modelSpecialty", default, skip_serializing_if = "Option::is_none")] |
| 1855 | pub model_specialty: Option<String>, |
| 1856 | #[serde(rename = "multiAgentVersion", default, skip_serializing_if = "Option::is_none")] |
| 1857 | pub multi_agent_version: Option<MultiAgentVersion>, |
| 1858 | #[serde(rename = "serviceTiers", default)] |
| 1859 | pub service_tiers: Vec<ModelServiceTier>, |
| 1860 | #[serde(rename = "supportedReasoningEfforts")] |
| 1861 | pub supported_reasoning_efforts: Vec<ReasoningEffortOption>, |
| 1862 | #[serde(rename = "supportsPersonality", default)] |
| 1863 | pub supports_personality: bool, |
| 1864 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1865 | pub upgrade: Option<String>, |
| 1866 | #[serde(rename = "upgradeInfo", default, skip_serializing_if = "Option::is_none")] |
| 1867 | pub upgrade_info: Option<ModelUpgradeInfo>, |
| 1868 | } |
| 1869 | |
| 1870 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1871 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1872 | pub struct ModelAccessPrograms { |
| 1873 | pub cyber: Vec<CyberAccessProgram>, |
| 1874 | } |
| 1875 | |
| 1876 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1877 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1878 | pub struct ModelAvailabilityNux { |
| 1879 | pub message: String, |
| 1880 | } |
| 1881 | |
| 1882 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 1883 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1884 | pub struct ModelListParams { |
| 1885 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1886 | pub cursor: Option<String>, |
| 1887 | #[serde(rename = "includeHidden", default, skip_serializing_if = "Option::is_none")] |
| 1888 | pub include_hidden: Option<bool>, |
| 1889 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 1890 | pub limit: Option<u32>, |
| 1891 | } |
| 1892 | |
| 1893 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1894 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1895 | pub struct ModelListResponse { |
| 1896 | pub data: Vec<Model>, |
| 1897 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 1898 | pub next_cursor: Option<String>, |
| 1899 | } |
| 1900 | |
| 1901 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1902 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1903 | pub struct ModelServiceTier { |
| 1904 | pub description: String, |
| 1905 | pub id: String, |
| 1906 | pub name: String, |
| 1907 | } |
| 1908 | |
| 1909 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1910 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1911 | pub struct ModelUpgradeInfo { |
| 1912 | #[serde(rename = "migrationMarkdown", default, skip_serializing_if = "Option::is_none")] |
| 1913 | pub migration_markdown: Option<String>, |
| 1914 | pub model: String, |
| 1915 | #[serde(rename = "modelLink", default, skip_serializing_if = "Option::is_none")] |
| 1916 | pub model_link: Option<String>, |
| 1917 | #[serde(rename = "retirementAt", default, skip_serializing_if = "Option::is_none")] |
| 1918 | pub retirement_at: Option<i64>, |
| 1919 | #[serde(rename = "upgradeCopy", default, skip_serializing_if = "Option::is_none")] |
| 1920 | pub upgrade_copy: Option<String>, |
| 1921 | } |
| 1922 | |
| 1923 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1924 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1925 | pub enum MultiAgentVersion { |
| 1926 | #[serde(rename = "disabled")] |
| 1927 | Disabled, |
| 1928 | #[serde(rename = "v1")] |
| 1929 | V1, |
| 1930 | #[serde(rename = "v2")] |
| 1931 | V2, |
| 1932 | } |
| 1933 | |
| 1934 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1935 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1936 | pub enum NetworkAccess { |
| 1937 | #[serde(rename = "restricted")] |
| 1938 | Restricted, |
| 1939 | #[serde(rename = "enabled")] |
| 1940 | Enabled, |
| 1941 | } |
| 1942 | |
| 1943 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1944 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1945 | pub struct NetworkApprovalContext { |
| 1946 | pub host: String, |
| 1947 | pub protocol: NetworkApprovalProtocol, |
| 1948 | } |
| 1949 | |
| 1950 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1951 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1952 | pub enum NetworkApprovalProtocol { |
| 1953 | #[serde(rename = "http")] |
| 1954 | Http, |
| 1955 | #[serde(rename = "https")] |
| 1956 | Https, |
| 1957 | #[serde(rename = "socks5Tcp")] |
| 1958 | Socks5Tcp, |
| 1959 | #[serde(rename = "socks5Udp")] |
| 1960 | Socks5Udp, |
| 1961 | } |
| 1962 | |
| 1963 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1964 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1965 | pub struct NetworkPolicyAmendment { |
| 1966 | pub action: NetworkPolicyRuleAction, |
| 1967 | pub host: String, |
| 1968 | } |
| 1969 | |
| 1970 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1971 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1972 | pub enum NetworkPolicyRuleAction { |
| 1973 | #[serde(rename = "allow")] |
| 1974 | Allow, |
| 1975 | #[serde(rename = "deny")] |
| 1976 | Deny, |
| 1977 | } |
| 1978 | |
| 1979 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1980 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1981 | pub enum NonSteerableTurnKind { |
| 1982 | #[serde(rename = "review")] |
| 1983 | Review, |
| 1984 | #[serde(rename = "compact")] |
| 1985 | Compact, |
| 1986 | } |
| 1987 | |
| 1988 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 1989 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 1990 | pub struct OverriddenMetadata { |
| 1991 | #[serde(rename = "effectiveValue")] |
| 1992 | pub effective_value: Value, |
| 1993 | pub message: String, |
| 1994 | #[serde(rename = "overridingLayer")] |
| 1995 | pub overriding_layer: ConfigLayerMetadata, |
| 1996 | } |
| 1997 | |
| 1998 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 1999 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2000 | pub enum PatchApplyStatus { |
| 2001 | #[serde(rename = "inProgress")] |
| 2002 | InProgress, |
| 2003 | #[serde(rename = "completed")] |
| 2004 | Completed, |
| 2005 | #[serde(rename = "failed")] |
| 2006 | Failed, |
| 2007 | #[serde(rename = "declined")] |
| 2008 | Declined, |
| 2009 | } |
| 2010 | |
| 2011 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2012 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2013 | #[serde(tag = "type")] |
| 2014 | pub enum PatchChangeKind { |
| 2015 | #[serde(rename = "add")] |
| 2016 | Add {}, |
| 2017 | #[serde(rename = "delete")] |
| 2018 | Delete {}, |
| 2019 | #[serde(rename = "update")] |
| 2020 | Update { |
| 2021 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2022 | move_path: Option<String>, |
| 2023 | }, |
| 2024 | } |
| 2025 | |
| 2026 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2027 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2028 | pub enum PermissionGrantScope { |
| 2029 | #[serde(rename = "turn")] |
| 2030 | Turn, |
| 2031 | #[serde(rename = "session")] |
| 2032 | Session, |
| 2033 | } |
| 2034 | |
| 2035 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2036 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2037 | pub struct PermissionsRequestApprovalParams { |
| 2038 | pub cwd: LegacyAppPathString, |
| 2039 | #[serde(rename = "environmentId", default, skip_serializing_if = "Option::is_none")] |
| 2040 | pub environment_id: Option<String>, |
| 2041 | #[serde(rename = "itemId")] |
| 2042 | pub item_id: String, |
| 2043 | pub permissions: RequestPermissionProfile, |
| 2044 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2045 | pub reason: Option<String>, |
| 2046 | #[serde(rename = "startedAtMs")] |
| 2047 | pub started_at_ms: i64, |
| 2048 | #[serde(rename = "threadId")] |
| 2049 | pub thread_id: String, |
| 2050 | #[serde(rename = "turnId")] |
| 2051 | pub turn_id: String, |
| 2052 | } |
| 2053 | |
| 2054 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2055 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2056 | pub struct PermissionsRequestApprovalResponse { |
| 2057 | pub permissions: GrantedPermissionProfile, |
| 2058 | #[serde(default = "default_permissions_request_approval_response_scope")] |
| 2059 | pub scope: PermissionGrantScope, |
| 2060 | #[serde(rename = "strictAutoReview", default, skip_serializing_if = "Option::is_none")] |
| 2061 | pub strict_auto_review: Option<bool>, |
| 2062 | } |
| 2063 | |
| 2064 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2065 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2066 | pub enum Personality { |
| 2067 | #[serde(rename = "none")] |
| 2068 | None, |
| 2069 | #[serde(rename = "friendly")] |
| 2070 | Friendly, |
| 2071 | #[serde(rename = "pragmatic")] |
| 2072 | Pragmatic, |
| 2073 | } |
| 2074 | |
| 2075 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2076 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2077 | pub struct PlanDeltaNotification { |
| 2078 | pub delta: String, |
| 2079 | #[serde(rename = "itemId")] |
| 2080 | pub item_id: String, |
| 2081 | #[serde(rename = "threadId")] |
| 2082 | pub thread_id: String, |
| 2083 | #[serde(rename = "turnId")] |
| 2084 | pub turn_id: String, |
| 2085 | } |
| 2086 | |
| 2087 | pub type ReasoningEffort = String; |
| 2088 | |
| 2089 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2090 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2091 | pub struct ReasoningEffortOption { |
| 2092 | pub description: String, |
| 2093 | #[serde(rename = "reasoningEffort")] |
| 2094 | pub reasoning_effort: ReasoningEffort, |
| 2095 | } |
| 2096 | |
| 2097 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2098 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2099 | pub enum ReasoningSummary { |
| 2100 | #[serde(rename = "auto")] |
| 2101 | Auto, |
| 2102 | #[serde(rename = "concise")] |
| 2103 | Concise, |
| 2104 | #[serde(rename = "detailed")] |
| 2105 | Detailed, |
| 2106 | #[serde(rename = "none")] |
| 2107 | None, |
| 2108 | } |
| 2109 | |
| 2110 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2111 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2112 | pub struct ReasoningSummaryPartAddedNotification { |
| 2113 | #[serde(rename = "itemId")] |
| 2114 | pub item_id: String, |
| 2115 | #[serde(rename = "summaryIndex")] |
| 2116 | pub summary_index: i64, |
| 2117 | #[serde(rename = "threadId")] |
| 2118 | pub thread_id: String, |
| 2119 | #[serde(rename = "turnId")] |
| 2120 | pub turn_id: String, |
| 2121 | } |
| 2122 | |
| 2123 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2124 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2125 | pub struct ReasoningSummaryTextDeltaNotification { |
| 2126 | pub delta: String, |
| 2127 | #[serde(rename = "itemId")] |
| 2128 | pub item_id: String, |
| 2129 | #[serde(rename = "summaryIndex")] |
| 2130 | pub summary_index: i64, |
| 2131 | #[serde(rename = "threadId")] |
| 2132 | pub thread_id: String, |
| 2133 | #[serde(rename = "turnId")] |
| 2134 | pub turn_id: String, |
| 2135 | } |
| 2136 | |
| 2137 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2138 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2139 | pub struct ReasoningTextDeltaNotification { |
| 2140 | #[serde(rename = "contentIndex")] |
| 2141 | pub content_index: i64, |
| 2142 | pub delta: String, |
| 2143 | #[serde(rename = "itemId")] |
| 2144 | pub item_id: String, |
| 2145 | #[serde(rename = "threadId")] |
| 2146 | pub thread_id: String, |
| 2147 | #[serde(rename = "turnId")] |
| 2148 | pub turn_id: String, |
| 2149 | } |
| 2150 | |
| 2151 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2152 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2153 | #[serde(untagged)] |
| 2154 | pub enum RequestId { |
| 2155 | String(String), |
| 2156 | Integer(i64), |
| 2157 | } |
| 2158 | |
| 2159 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2160 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2161 | #[serde(deny_unknown_fields)] |
| 2162 | pub struct RequestPermissionProfile { |
| 2163 | #[serde(rename = "fileSystem", default, skip_serializing_if = "Option::is_none")] |
| 2164 | pub file_system: Option<AdditionalFileSystemPermissions>, |
| 2165 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2166 | pub network: Option<AdditionalNetworkPermissions>, |
| 2167 | } |
| 2168 | |
| 2169 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2170 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2171 | pub struct Resource { |
| 2172 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2173 | pub _meta: Option<Value>, |
| 2174 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2175 | pub annotations: Option<Value>, |
| 2176 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2177 | pub description: Option<String>, |
| 2178 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2179 | pub icons: Option<Vec<Value>>, |
| 2180 | #[serde(rename = "mimeType", default, skip_serializing_if = "Option::is_none")] |
| 2181 | pub mime_type: Option<String>, |
| 2182 | pub name: String, |
| 2183 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2184 | pub size: Option<i64>, |
| 2185 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2186 | pub title: Option<String>, |
| 2187 | pub uri: String, |
| 2188 | } |
| 2189 | |
| 2190 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2191 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2192 | pub struct ResourceTemplate { |
| 2193 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2194 | pub annotations: Option<Value>, |
| 2195 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2196 | pub description: Option<String>, |
| 2197 | #[serde(rename = "mimeType", default, skip_serializing_if = "Option::is_none")] |
| 2198 | pub mime_type: Option<String>, |
| 2199 | pub name: String, |
| 2200 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2201 | pub title: Option<String>, |
| 2202 | #[serde(rename = "uriTemplate")] |
| 2203 | pub uri_template: String, |
| 2204 | } |
| 2205 | |
| 2206 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2207 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2208 | pub enum ReviewDelivery { |
| 2209 | #[serde(rename = "inline")] |
| 2210 | Inline, |
| 2211 | } |
| 2212 | |
| 2213 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2214 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2215 | pub struct ReviewStartParams { |
| 2216 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2217 | pub delivery: Option<ReviewDelivery>, |
| 2218 | pub target: ReviewTarget, |
| 2219 | #[serde(rename = "threadId")] |
| 2220 | pub thread_id: String, |
| 2221 | } |
| 2222 | |
| 2223 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2224 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2225 | pub struct ReviewStartResponse { |
| 2226 | #[serde(rename = "reviewThreadId")] |
| 2227 | pub review_thread_id: String, |
| 2228 | pub turn: Turn, |
| 2229 | } |
| 2230 | |
| 2231 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2232 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2233 | #[serde(tag = "type")] |
| 2234 | pub enum ReviewTarget { |
| 2235 | #[serde(rename = "uncommittedChanges")] |
| 2236 | UncommittedChanges {}, |
| 2237 | #[serde(rename = "baseBranch")] |
| 2238 | BaseBranch { |
| 2239 | branch: String, |
| 2240 | }, |
| 2241 | #[serde(rename = "commit")] |
| 2242 | Commit { |
| 2243 | sha: String, |
| 2244 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2245 | title: Option<String>, |
| 2246 | }, |
| 2247 | #[serde(rename = "custom")] |
| 2248 | Custom { |
| 2249 | instructions: String, |
| 2250 | }, |
| 2251 | } |
| 2252 | |
| 2253 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2254 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2255 | pub enum SandboxMode { |
| 2256 | #[serde(rename = "read-only")] |
| 2257 | ReadOnly, |
| 2258 | #[serde(rename = "workspace-write")] |
| 2259 | WorkspaceWrite, |
| 2260 | #[serde(rename = "danger-full-access")] |
| 2261 | DangerFullAccess, |
| 2262 | } |
| 2263 | |
| 2264 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2265 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2266 | #[serde(tag = "type")] |
| 2267 | pub enum SandboxPolicy { |
| 2268 | #[serde(rename = "dangerFullAccess")] |
| 2269 | DangerFullAccess {}, |
| 2270 | #[serde(rename = "readOnly")] |
| 2271 | ReadOnly { |
| 2272 | #[serde(rename = "networkAccess", default)] |
| 2273 | network_access: bool, |
| 2274 | }, |
| 2275 | #[serde(rename = "externalSandbox")] |
| 2276 | ExternalSandbox { |
| 2277 | #[serde(rename = "networkAccess", default = "default_sandbox_policy_network_access")] |
| 2278 | network_access: NetworkAccess, |
| 2279 | }, |
| 2280 | #[serde(rename = "workspaceWrite")] |
| 2281 | WorkspaceWrite { |
| 2282 | #[serde(rename = "excludeSlashTmp", default)] |
| 2283 | exclude_slash_tmp: bool, |
| 2284 | #[serde(rename = "excludeTmpdirEnvVar", default)] |
| 2285 | exclude_tmpdir_env_var: bool, |
| 2286 | #[serde(rename = "networkAccess", default)] |
| 2287 | network_access: bool, |
| 2288 | #[serde(rename = "writableRoots", default)] |
| 2289 | writable_roots: Vec<AbsolutePathBuf>, |
| 2290 | }, |
| 2291 | } |
| 2292 | |
| 2293 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2294 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2295 | pub struct SandboxWorkspaceWrite { |
| 2296 | #[serde(default)] |
| 2297 | pub exclude_slash_tmp: bool, |
| 2298 | #[serde(default)] |
| 2299 | pub exclude_tmpdir_env_var: bool, |
| 2300 | #[serde(default)] |
| 2301 | pub network_access: bool, |
| 2302 | #[serde(default)] |
| 2303 | pub writable_roots: Vec<String>, |
| 2304 | } |
| 2305 | |
| 2306 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2307 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2308 | pub struct ServerRequestResolvedNotification { |
| 2309 | #[serde(rename = "requestId")] |
| 2310 | pub request_id: RequestId, |
| 2311 | #[serde(rename = "threadId")] |
| 2312 | pub thread_id: String, |
| 2313 | } |
| 2314 | |
| 2315 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2316 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2317 | pub enum SessionSource { |
| 2318 | #[serde(rename = "cli")] |
| 2319 | Cli, |
| 2320 | #[serde(rename = "vscode")] |
| 2321 | Vscode, |
| 2322 | #[serde(rename = "exec")] |
| 2323 | Exec, |
| 2324 | #[serde(rename = "appServer")] |
| 2325 | AppServer, |
| 2326 | #[serde(rename = "unknown")] |
| 2327 | Unknown, |
| 2328 | #[serde(rename = "custom")] |
| 2329 | Custom(String), |
| 2330 | #[serde(rename = "subAgent")] |
| 2331 | SubAgent(SubAgentSource), |
| 2332 | } |
| 2333 | |
| 2334 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2335 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2336 | pub struct Settings { |
| 2337 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2338 | pub developer_instructions: Option<String>, |
| 2339 | pub model: String, |
| 2340 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2341 | pub reasoning_effort: Option<ReasoningEffort>, |
| 2342 | } |
| 2343 | |
| 2344 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2345 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2346 | pub struct SkillDependencies { |
| 2347 | pub tools: Vec<SkillToolDependency>, |
| 2348 | } |
| 2349 | |
| 2350 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2351 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2352 | pub struct SkillErrorInfo { |
| 2353 | pub message: String, |
| 2354 | pub path: String, |
| 2355 | } |
| 2356 | |
| 2357 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2358 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2359 | pub struct SkillInterface { |
| 2360 | #[serde(rename = "brandColor", default, skip_serializing_if = "Option::is_none")] |
| 2361 | pub brand_color: Option<String>, |
| 2362 | #[serde(rename = "defaultPrompt", default, skip_serializing_if = "Option::is_none")] |
| 2363 | pub default_prompt: Option<String>, |
| 2364 | #[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")] |
| 2365 | pub display_name: Option<String>, |
| 2366 | #[serde(rename = "iconLarge", default, skip_serializing_if = "Option::is_none")] |
| 2367 | pub icon_large: Option<AbsolutePathBuf>, |
| 2368 | #[serde(rename = "iconLargeUrl", default, skip_serializing_if = "Option::is_none")] |
| 2369 | pub icon_large_url: Option<String>, |
| 2370 | #[serde(rename = "iconSmall", default, skip_serializing_if = "Option::is_none")] |
| 2371 | pub icon_small: Option<AbsolutePathBuf>, |
| 2372 | #[serde(rename = "iconSmallUrl", default, skip_serializing_if = "Option::is_none")] |
| 2373 | pub icon_small_url: Option<String>, |
| 2374 | #[serde(rename = "shortDescription", default, skip_serializing_if = "Option::is_none")] |
| 2375 | pub short_description: Option<String>, |
| 2376 | } |
| 2377 | |
| 2378 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2379 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2380 | pub struct SkillMetadata { |
| 2381 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2382 | pub dependencies: Option<SkillDependencies>, |
| 2383 | pub description: String, |
| 2384 | pub enabled: bool, |
| 2385 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2386 | pub interface: Option<SkillInterface>, |
| 2387 | pub name: String, |
| 2388 | pub path: LegacyAppPathString, |
| 2389 | #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")] |
| 2390 | pub plugin_id: Option<String>, |
| 2391 | pub scope: SkillScope, |
| 2392 | #[serde(rename = "shortDescription", default, skip_serializing_if = "Option::is_none")] |
| 2393 | pub short_description: Option<String>, |
| 2394 | } |
| 2395 | |
| 2396 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2397 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2398 | pub enum SkillScope { |
| 2399 | #[serde(rename = "user")] |
| 2400 | User, |
| 2401 | #[serde(rename = "repo")] |
| 2402 | Repo, |
| 2403 | #[serde(rename = "system")] |
| 2404 | System, |
| 2405 | #[serde(rename = "admin")] |
| 2406 | Admin, |
| 2407 | } |
| 2408 | |
| 2409 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2410 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2411 | pub struct SkillToolDependency { |
| 2412 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2413 | pub command: Option<String>, |
| 2414 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2415 | pub description: Option<String>, |
| 2416 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2417 | pub transport: Option<String>, |
| 2418 | pub r#type: String, |
| 2419 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2420 | pub url: Option<String>, |
| 2421 | pub value: String, |
| 2422 | } |
| 2423 | |
| 2424 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2425 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2426 | pub struct SkillsChangedNotification { |
| 2427 | } |
| 2428 | |
| 2429 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2430 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2431 | pub struct SkillsListEntry { |
| 2432 | pub cwd: String, |
| 2433 | pub errors: Vec<SkillErrorInfo>, |
| 2434 | pub skills: Vec<SkillMetadata>, |
| 2435 | } |
| 2436 | |
| 2437 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2438 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2439 | pub struct SkillsListParams { |
| 2440 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2441 | pub cwds: Option<Vec<String>>, |
| 2442 | #[serde(rename = "forceReload", default, skip_serializing_if = "Option::is_none")] |
| 2443 | pub force_reload: Option<bool>, |
| 2444 | } |
| 2445 | |
| 2446 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2447 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2448 | pub struct SkillsListResponse { |
| 2449 | pub data: Vec<SkillsListEntry>, |
| 2450 | } |
| 2451 | |
| 2452 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2453 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2454 | pub enum SortDirection { |
| 2455 | #[serde(rename = "asc")] |
| 2456 | Asc, |
| 2457 | #[serde(rename = "desc")] |
| 2458 | Desc, |
| 2459 | } |
| 2460 | |
| 2461 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2462 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2463 | pub enum SubAgentActivityKind { |
| 2464 | #[serde(rename = "started")] |
| 2465 | Started, |
| 2466 | #[serde(rename = "interacted")] |
| 2467 | Interacted, |
| 2468 | #[serde(rename = "interrupted")] |
| 2469 | Interrupted, |
| 2470 | #[serde(rename = "completed")] |
| 2471 | Completed, |
| 2472 | } |
| 2473 | |
| 2474 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2475 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2476 | pub enum SubAgentSource { |
| 2477 | #[serde(rename = "review")] |
| 2478 | Review, |
| 2479 | #[serde(rename = "compact")] |
| 2480 | Compact, |
| 2481 | #[serde(rename = "memory_consolidation")] |
| 2482 | MemoryConsolidation, |
| 2483 | #[serde(rename = "thread_spawn")] |
| 2484 | ThreadSpawn { |
| 2485 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2486 | agent_nickname: Option<String>, |
| 2487 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2488 | agent_path: Option<AgentPath>, |
| 2489 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2490 | agent_role: Option<String>, |
| 2491 | depth: i32, |
| 2492 | parent_thread_id: ThreadId, |
| 2493 | }, |
| 2494 | #[serde(rename = "other")] |
| 2495 | Other(String), |
| 2496 | } |
| 2497 | |
| 2498 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2499 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2500 | pub struct TerminalInteractionNotification { |
| 2501 | #[serde(rename = "itemId")] |
| 2502 | pub item_id: String, |
| 2503 | #[serde(rename = "processId")] |
| 2504 | pub process_id: String, |
| 2505 | pub stdin: String, |
| 2506 | #[serde(rename = "threadId")] |
| 2507 | pub thread_id: String, |
| 2508 | #[serde(rename = "turnId")] |
| 2509 | pub turn_id: String, |
| 2510 | } |
| 2511 | |
| 2512 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2513 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2514 | pub struct TextElement { |
| 2515 | #[serde(rename = "byteRange")] |
| 2516 | pub byte_range: ByteRange, |
| 2517 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2518 | pub placeholder: Option<String>, |
| 2519 | } |
| 2520 | |
| 2521 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2522 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2523 | pub struct Thread { |
| 2524 | #[serde(rename = "agentNickname", default, skip_serializing_if = "Option::is_none")] |
| 2525 | pub agent_nickname: Option<String>, |
| 2526 | #[serde(rename = "agentRole", default, skip_serializing_if = "Option::is_none")] |
| 2527 | pub agent_role: Option<String>, |
| 2528 | #[serde(rename = "cliVersion")] |
| 2529 | pub cli_version: String, |
| 2530 | #[serde(rename = "createdAt")] |
| 2531 | pub created_at: i64, |
| 2532 | pub cwd: AbsolutePathBuf, |
| 2533 | pub ephemeral: bool, |
| 2534 | #[serde(rename = "forkedFromId", default, skip_serializing_if = "Option::is_none")] |
| 2535 | pub forked_from_id: Option<String>, |
| 2536 | #[serde(rename = "gitInfo", default, skip_serializing_if = "Option::is_none")] |
| 2537 | pub git_info: Option<GitInfo>, |
| 2538 | #[serde(rename = "historyMode", default = "default_thread_history_mode")] |
| 2539 | pub history_mode: ThreadHistoryMode, |
| 2540 | pub id: String, |
| 2541 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2542 | pub model: Option<String>, |
| 2543 | #[serde(rename = "modelProvider")] |
| 2544 | pub model_provider: String, |
| 2545 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2546 | pub name: Option<String>, |
| 2547 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2548 | pub originator: Option<String>, |
| 2549 | #[serde(rename = "parentThreadId", default, skip_serializing_if = "Option::is_none")] |
| 2550 | pub parent_thread_id: Option<String>, |
| 2551 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2552 | pub path: Option<String>, |
| 2553 | pub preview: String, |
| 2554 | #[serde(rename = "projectId")] |
| 2555 | pub project_id: Option<String>, |
| 2556 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 2557 | pub reasoning_effort: Option<ReasoningEffort>, |
| 2558 | #[serde(rename = "recencyAt", default, skip_serializing_if = "Option::is_none")] |
| 2559 | pub recency_at: Option<i64>, |
| 2560 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2561 | pub section: Option<ThreadSection>, |
| 2562 | #[serde(rename = "sectionEnteredAt", default, skip_serializing_if = "Option::is_none")] |
| 2563 | pub section_entered_at: Option<i64>, |
| 2564 | #[serde(rename = "sessionId")] |
| 2565 | pub session_id: String, |
| 2566 | pub source: SessionSource, |
| 2567 | pub status: ThreadStatus, |
| 2568 | #[serde(rename = "threadSource", default, skip_serializing_if = "Option::is_none")] |
| 2569 | pub thread_source: Option<ThreadSource>, |
| 2570 | pub turns: Vec<Turn>, |
| 2571 | #[serde(rename = "updatedAt")] |
| 2572 | pub updated_at: i64, |
| 2573 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2574 | pub executor: Option<ThreadExecutor>, |
| 2575 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2576 | pub environment: Option<ThreadPlacement>, |
| 2577 | } |
| 2578 | |
| 2579 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2580 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2581 | pub enum ThreadActiveFlag { |
| 2582 | #[serde(rename = "waitingOnApproval")] |
| 2583 | WaitingOnApproval, |
| 2584 | #[serde(rename = "waitingOnUserInput")] |
| 2585 | WaitingOnUserInput, |
| 2586 | } |
| 2587 | |
| 2588 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2589 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2590 | pub struct ThreadArchiveParams { |
| 2591 | #[serde(rename = "threadId")] |
| 2592 | pub thread_id: String, |
| 2593 | } |
| 2594 | |
| 2595 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2596 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2597 | pub struct ThreadArchiveResponse { |
| 2598 | } |
| 2599 | |
| 2600 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2601 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2602 | pub struct ThreadArchivedNotification { |
| 2603 | #[serde(rename = "threadId")] |
| 2604 | pub thread_id: String, |
| 2605 | } |
| 2606 | |
| 2607 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2608 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2609 | pub struct ThreadClosedNotification { |
| 2610 | #[serde(rename = "threadId")] |
| 2611 | pub thread_id: String, |
| 2612 | } |
| 2613 | |
| 2614 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2615 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2616 | pub struct ThreadCompactStartParams { |
| 2617 | #[serde(rename = "threadId")] |
| 2618 | pub thread_id: String, |
| 2619 | } |
| 2620 | |
| 2621 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2622 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2623 | pub struct ThreadCompactStartResponse { |
| 2624 | } |
| 2625 | |
| 2626 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2627 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2628 | pub struct ThreadDeleteParams { |
| 2629 | #[serde(rename = "threadId")] |
| 2630 | pub thread_id: String, |
| 2631 | } |
| 2632 | |
| 2633 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2634 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2635 | pub struct ThreadDeleteResponse { |
| 2636 | } |
| 2637 | |
| 2638 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2639 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2640 | pub struct ThreadDeletedNotification { |
| 2641 | #[serde(rename = "threadId")] |
| 2642 | pub thread_id: String, |
| 2643 | } |
| 2644 | |
| 2645 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2646 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2647 | pub struct ThreadExecutor { |
| 2648 | pub kind: String, |
| 2649 | #[serde(rename = "agentId")] |
| 2650 | pub agent_id: String, |
| 2651 | #[serde(rename = "agentName", default, skip_serializing_if = "Option::is_none")] |
| 2652 | pub agent_name: Option<String>, |
| 2653 | } |
| 2654 | |
| 2655 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2656 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2657 | pub struct ThreadForkParams { |
| 2658 | #[serde(rename = "approvalPolicy", default, skip_serializing_if = "Option::is_none")] |
| 2659 | pub approval_policy: Option<AskForApproval>, |
| 2660 | #[serde(rename = "approvalsReviewer", default, skip_serializing_if = "Option::is_none")] |
| 2661 | pub approvals_reviewer: Option<ApprovalsReviewer>, |
| 2662 | #[serde(rename = "baseInstructions", default, skip_serializing_if = "Option::is_none")] |
| 2663 | pub base_instructions: Option<String>, |
| 2664 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2665 | pub config: Option<Map<String, Value>>, |
| 2666 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2667 | pub cwd: Option<String>, |
| 2668 | #[serde(rename = "developerInstructions", default, skip_serializing_if = "Option::is_none")] |
| 2669 | pub developer_instructions: Option<String>, |
| 2670 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2671 | pub ephemeral: Option<bool>, |
| 2672 | #[serde(rename = "excludeTurns", default, skip_serializing_if = "Option::is_none")] |
| 2673 | pub exclude_turns: Option<bool>, |
| 2674 | #[serde(rename = "lastTurnId", default, skip_serializing_if = "Option::is_none")] |
| 2675 | pub last_turn_id: Option<String>, |
| 2676 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2677 | pub model: Option<String>, |
| 2678 | #[serde(rename = "modelProvider", default, skip_serializing_if = "Option::is_none")] |
| 2679 | pub model_provider: Option<String>, |
| 2680 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2681 | pub sandbox: Option<SandboxMode>, |
| 2682 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 2683 | pub service_tier: Option<String>, |
| 2684 | #[serde(rename = "threadId")] |
| 2685 | pub thread_id: String, |
| 2686 | #[serde(rename = "threadSource", default, skip_serializing_if = "Option::is_none")] |
| 2687 | pub thread_source: Option<ThreadSource>, |
| 2688 | } |
| 2689 | |
| 2690 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2691 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2692 | pub struct ThreadForkResponse { |
| 2693 | #[serde(rename = "approvalPolicy")] |
| 2694 | pub approval_policy: AskForApproval, |
| 2695 | #[serde(rename = "approvalsReviewer")] |
| 2696 | pub approvals_reviewer: ApprovalsReviewer, |
| 2697 | pub cwd: AbsolutePathBuf, |
| 2698 | #[serde(rename = "disabledPluginIds", default)] |
| 2699 | pub disabled_plugin_ids: Vec<String>, |
| 2700 | #[serde(rename = "instructionSources", default)] |
| 2701 | pub instruction_sources: Vec<LegacyAppPathString>, |
| 2702 | pub model: String, |
| 2703 | #[serde(rename = "modelProvider")] |
| 2704 | pub model_provider: String, |
| 2705 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 2706 | pub reasoning_effort: Option<ReasoningEffort>, |
| 2707 | pub sandbox: SandboxPolicy, |
| 2708 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 2709 | pub service_tier: Option<String>, |
| 2710 | pub thread: Thread, |
| 2711 | } |
| 2712 | |
| 2713 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2714 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2715 | pub struct ThreadGoal { |
| 2716 | #[serde(rename = "createdAt")] |
| 2717 | pub created_at: i64, |
| 2718 | pub objective: String, |
| 2719 | pub status: ThreadGoalStatus, |
| 2720 | #[serde(rename = "threadId")] |
| 2721 | pub thread_id: String, |
| 2722 | #[serde(rename = "timeUsedSeconds")] |
| 2723 | pub time_used_seconds: i64, |
| 2724 | #[serde(rename = "tokenBudget", default, skip_serializing_if = "Option::is_none")] |
| 2725 | pub token_budget: Option<i64>, |
| 2726 | #[serde(rename = "tokensUsed")] |
| 2727 | pub tokens_used: i64, |
| 2728 | #[serde(rename = "updatedAt")] |
| 2729 | pub updated_at: i64, |
| 2730 | } |
| 2731 | |
| 2732 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2733 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2734 | pub struct ThreadGoalClearParams { |
| 2735 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2736 | pub origin: Option<ThreadGoalMutationOrigin>, |
| 2737 | #[serde(rename = "threadId")] |
| 2738 | pub thread_id: String, |
| 2739 | } |
| 2740 | |
| 2741 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2742 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2743 | pub struct ThreadGoalClearResponse { |
| 2744 | pub cleared: bool, |
| 2745 | } |
| 2746 | |
| 2747 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2748 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2749 | pub struct ThreadGoalClearedNotification { |
| 2750 | #[serde(rename = "threadId")] |
| 2751 | pub thread_id: String, |
| 2752 | } |
| 2753 | |
| 2754 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2755 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2756 | pub struct ThreadGoalGetParams { |
| 2757 | #[serde(rename = "threadId")] |
| 2758 | pub thread_id: String, |
| 2759 | } |
| 2760 | |
| 2761 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 2762 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2763 | pub struct ThreadGoalGetResponse { |
| 2764 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2765 | pub goal: Option<ThreadGoal>, |
| 2766 | } |
| 2767 | |
| 2768 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2769 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2770 | pub enum ThreadGoalMutationOrigin { |
| 2771 | #[serde(rename = "user")] |
| 2772 | User, |
| 2773 | #[serde(rename = "automatic")] |
| 2774 | Automatic, |
| 2775 | } |
| 2776 | |
| 2777 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2778 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2779 | pub struct ThreadGoalSetParams { |
| 2780 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2781 | pub objective: Option<String>, |
| 2782 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2783 | pub origin: Option<ThreadGoalMutationOrigin>, |
| 2784 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2785 | pub status: Option<ThreadGoalStatus>, |
| 2786 | #[serde(rename = "threadId")] |
| 2787 | pub thread_id: String, |
| 2788 | #[serde(rename = "tokenBudget", default, skip_serializing_if = "Option::is_none")] |
| 2789 | pub token_budget: Option<i64>, |
| 2790 | } |
| 2791 | |
| 2792 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2793 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2794 | pub struct ThreadGoalSetResponse { |
| 2795 | pub goal: ThreadGoal, |
| 2796 | } |
| 2797 | |
| 2798 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2799 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2800 | pub enum ThreadGoalStatus { |
| 2801 | #[serde(rename = "active")] |
| 2802 | Active, |
| 2803 | #[serde(rename = "paused")] |
| 2804 | Paused, |
| 2805 | #[serde(rename = "blocked")] |
| 2806 | Blocked, |
| 2807 | #[serde(rename = "usageLimited")] |
| 2808 | UsageLimited, |
| 2809 | #[serde(rename = "budgetLimited")] |
| 2810 | BudgetLimited, |
| 2811 | #[serde(rename = "complete")] |
| 2812 | Complete, |
| 2813 | } |
| 2814 | |
| 2815 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2816 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2817 | pub struct ThreadGoalUpdatedNotification { |
| 2818 | pub goal: ThreadGoal, |
| 2819 | #[serde(rename = "threadId")] |
| 2820 | pub thread_id: String, |
| 2821 | #[serde(rename = "turnId", default, skip_serializing_if = "Option::is_none")] |
| 2822 | pub turn_id: Option<String>, |
| 2823 | } |
| 2824 | |
| 2825 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 2826 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2827 | pub enum ThreadHistoryMode { |
| 2828 | #[serde(rename = "legacy")] |
| 2829 | Legacy, |
| 2830 | #[serde(rename = "paginated")] |
| 2831 | Paginated, |
| 2832 | } |
| 2833 | |
| 2834 | pub type ThreadId = String; |
| 2835 | |
| 2836 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2837 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2838 | pub struct ThreadItem { |
| 2839 | #[serde(rename = "completedAtMs", default, skip_serializing_if = "Option::is_none")] |
| 2840 | pub completed_at_ms: Option<i64>, |
| 2841 | #[serde(rename = "startedAtMs", default, skip_serializing_if = "Option::is_none")] |
| 2842 | pub started_at_ms: Option<i64>, |
| 2843 | #[serde(flatten)] |
| 2844 | pub kind: ThreadItemKind, |
| 2845 | } |
| 2846 | |
| 2847 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2848 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2849 | pub struct ThreadItemEntry { |
| 2850 | #[serde(rename = "completedAtMs", default, skip_serializing_if = "Option::is_none")] |
| 2851 | pub completed_at_ms: Option<i64>, |
| 2852 | pub item: ThreadItem, |
| 2853 | #[serde(rename = "startedAtMs", default, skip_serializing_if = "Option::is_none")] |
| 2854 | pub started_at_ms: Option<i64>, |
| 2855 | #[serde(rename = "turnId")] |
| 2856 | pub turn_id: String, |
| 2857 | } |
| 2858 | |
| 2859 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 2860 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 2861 | #[serde(tag = "type")] |
| 2862 | pub enum ThreadItemKind { |
| 2863 | #[serde(rename = "userMessage")] |
| 2864 | UserMessage { |
| 2865 | #[serde(rename = "clientId", default, skip_serializing_if = "Option::is_none")] |
| 2866 | client_id: Option<String>, |
| 2867 | content: Vec<UserInput>, |
| 2868 | id: String, |
| 2869 | }, |
| 2870 | #[serde(rename = "hookPrompt")] |
| 2871 | HookPrompt { |
| 2872 | fragments: Vec<HookPromptFragment>, |
| 2873 | id: String, |
| 2874 | }, |
| 2875 | #[serde(rename = "agentMessage")] |
| 2876 | AgentMessage { |
| 2877 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2878 | delivery: Option<AgentMessageDelivery>, |
| 2879 | id: String, |
| 2880 | #[serde(rename = "memoryCitation", default, skip_serializing_if = "Option::is_none")] |
| 2881 | memory_citation: Option<MemoryCitation>, |
| 2882 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2883 | phase: Option<MessagePhase>, |
| 2884 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2885 | questions: Option<Vec<AsyncUserInputQuestion>>, |
| 2886 | text: String, |
| 2887 | }, |
| 2888 | #[serde(rename = "functionCallOutput")] |
| 2889 | FunctionCallOutput { |
| 2890 | id: String, |
| 2891 | name: String, |
| 2892 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2893 | namespace: Option<String>, |
| 2894 | output: FunctionCallOutputBody, |
| 2895 | }, |
| 2896 | #[serde(rename = "plan")] |
| 2897 | Plan { |
| 2898 | id: String, |
| 2899 | text: String, |
| 2900 | }, |
| 2901 | #[serde(rename = "reasoning")] |
| 2902 | Reasoning { |
| 2903 | #[serde(default)] |
| 2904 | content: Vec<String>, |
| 2905 | id: String, |
| 2906 | #[serde(default)] |
| 2907 | summary: Vec<String>, |
| 2908 | }, |
| 2909 | #[serde(rename = "commandExecution")] |
| 2910 | CommandExecution { |
| 2911 | #[serde(rename = "aggregatedOutput", default, skip_serializing_if = "Option::is_none")] |
| 2912 | aggregated_output: Option<String>, |
| 2913 | command: String, |
| 2914 | #[serde(rename = "commandActions")] |
| 2915 | command_actions: Vec<CommandAction>, |
| 2916 | cwd: LegacyAppPathString, |
| 2917 | #[serde(rename = "durationMs", default, skip_serializing_if = "Option::is_none")] |
| 2918 | duration_ms: Option<i64>, |
| 2919 | #[serde(rename = "exitCode", default, skip_serializing_if = "Option::is_none")] |
| 2920 | exit_code: Option<i32>, |
| 2921 | id: String, |
| 2922 | #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")] |
| 2923 | plugin_id: Option<String>, |
| 2924 | #[serde(rename = "processId", default, skip_serializing_if = "Option::is_none")] |
| 2925 | process_id: Option<String>, |
| 2926 | #[serde(rename = "scriptPath", default, skip_serializing_if = "Option::is_none")] |
| 2927 | script_path: Option<String>, |
| 2928 | #[serde(default = "default_thread_item_kind_source")] |
| 2929 | source: CommandExecutionSource, |
| 2930 | status: CommandExecutionStatus, |
| 2931 | }, |
| 2932 | #[serde(rename = "fileChange")] |
| 2933 | FileChange { |
| 2934 | changes: Vec<FileUpdateChange>, |
| 2935 | id: String, |
| 2936 | status: PatchApplyStatus, |
| 2937 | }, |
| 2938 | #[serde(rename = "mcpToolCall")] |
| 2939 | McpToolCall { |
| 2940 | #[serde(rename = "appContext", default, skip_serializing_if = "Option::is_none")] |
| 2941 | app_context: Option<McpToolCallAppContext>, |
| 2942 | arguments: Value, |
| 2943 | #[serde(rename = "durationMs", default, skip_serializing_if = "Option::is_none")] |
| 2944 | duration_ms: Option<i64>, |
| 2945 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2946 | error: Option<McpToolCallError>, |
| 2947 | id: String, |
| 2948 | #[serde(rename = "mcpAppResourceUri", default, skip_serializing_if = "Option::is_none")] |
| 2949 | mcp_app_resource_uri: Option<String>, |
| 2950 | #[serde(rename = "mcpAppUi", default, skip_serializing_if = "Option::is_none")] |
| 2951 | mcp_app_ui: Option<McpAppUi>, |
| 2952 | #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")] |
| 2953 | plugin_id: Option<String>, |
| 2954 | #[serde(rename = "readOnlyHint", default, skip_serializing_if = "Option::is_none")] |
| 2955 | read_only_hint: Option<bool>, |
| 2956 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2957 | result: Option<McpToolCallResult>, |
| 2958 | server: String, |
| 2959 | status: McpToolCallStatus, |
| 2960 | tool: String, |
| 2961 | }, |
| 2962 | #[serde(rename = "dynamicToolCall")] |
| 2963 | DynamicToolCall { |
| 2964 | arguments: Value, |
| 2965 | #[serde(rename = "contentItems", default, skip_serializing_if = "Option::is_none")] |
| 2966 | content_items: Option<Vec<DynamicToolCallOutputContentItem>>, |
| 2967 | #[serde(rename = "durationMs", default, skip_serializing_if = "Option::is_none")] |
| 2968 | duration_ms: Option<i64>, |
| 2969 | id: String, |
| 2970 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2971 | namespace: Option<String>, |
| 2972 | status: DynamicToolCallStatus, |
| 2973 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2974 | success: Option<bool>, |
| 2975 | tool: String, |
| 2976 | }, |
| 2977 | #[serde(rename = "collabAgentToolCall")] |
| 2978 | CollabAgentToolCall { |
| 2979 | #[serde(rename = "agentsStates")] |
| 2980 | agents_states: BTreeMap<String, CollabAgentState>, |
| 2981 | id: String, |
| 2982 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2983 | model: Option<String>, |
| 2984 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 2985 | prompt: Option<String>, |
| 2986 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 2987 | reasoning_effort: Option<ReasoningEffort>, |
| 2988 | #[serde(rename = "receiverThreadIds")] |
| 2989 | receiver_thread_ids: Vec<String>, |
| 2990 | #[serde(rename = "senderThreadId")] |
| 2991 | sender_thread_id: String, |
| 2992 | status: CollabAgentToolCallStatus, |
| 2993 | tool: CollabAgentTool, |
| 2994 | }, |
| 2995 | #[serde(rename = "subAgentActivity")] |
| 2996 | SubAgentActivity { |
| 2997 | #[serde(rename = "agentPath")] |
| 2998 | agent_path: String, |
| 2999 | #[serde(rename = "agentThreadId")] |
| 3000 | agent_thread_id: String, |
| 3001 | id: String, |
| 3002 | kind: SubAgentActivityKind, |
| 3003 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3004 | model: Option<String>, |
| 3005 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 3006 | reasoning_effort: Option<ReasoningEffort>, |
| 3007 | }, |
| 3008 | #[serde(rename = "webSearch")] |
| 3009 | WebSearch { |
| 3010 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3011 | action: Option<WebSearchAction>, |
| 3012 | id: String, |
| 3013 | query: String, |
| 3014 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3015 | results: Option<Vec<Value>>, |
| 3016 | }, |
| 3017 | #[serde(rename = "imageView")] |
| 3018 | ImageView { |
| 3019 | id: String, |
| 3020 | path: LegacyAppPathString, |
| 3021 | }, |
| 3022 | #[serde(rename = "sleep")] |
| 3023 | Sleep { |
| 3024 | #[serde(rename = "durationMs")] |
| 3025 | duration_ms: u64, |
| 3026 | id: String, |
| 3027 | }, |
| 3028 | #[serde(rename = "imageGeneration")] |
| 3029 | ImageGeneration { |
| 3030 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3031 | failure: Option<ImageGenerationFailure>, |
| 3032 | #[serde(rename = "generationId", default, skip_serializing_if = "Option::is_none")] |
| 3033 | generation_id: Option<String>, |
| 3034 | id: String, |
| 3035 | #[serde(rename = "inputImages", default, skip_serializing_if = "Option::is_none")] |
| 3036 | input_images: Option<Vec<ImageGenerationInputImage>>, |
| 3037 | #[serde(rename = "revisedPrompt", default, skip_serializing_if = "Option::is_none")] |
| 3038 | revised_prompt: Option<String>, |
| 3039 | #[serde(rename = "savedPath", default, skip_serializing_if = "Option::is_none")] |
| 3040 | saved_path: Option<AbsolutePathBuf>, |
| 3041 | status: String, |
| 3042 | #[serde(rename = "transparentBackground", default, skip_serializing_if = "Option::is_none")] |
| 3043 | transparent_background: Option<bool>, |
| 3044 | #[serde(flatten)] |
| 3045 | kind: ThreadItemKindImageGenerationKind, |
| 3046 | }, |
| 3047 | #[serde(rename = "enteredReviewMode")] |
| 3048 | EnteredReviewMode { |
| 3049 | id: String, |
| 3050 | review: String, |
| 3051 | }, |
| 3052 | #[serde(rename = "exitedReviewMode")] |
| 3053 | ExitedReviewMode { |
| 3054 | id: String, |
| 3055 | review: String, |
| 3056 | }, |
| 3057 | #[serde(rename = "contextCompaction")] |
| 3058 | ContextCompaction { |
| 3059 | id: String, |
| 3060 | }, |
| 3061 | } |
| 3062 | |
| 3063 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3064 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3065 | pub enum ThreadItemKindImageGenerationKind { |
| 3066 | #[serde(rename = "fileId")] |
| 3067 | FileId(String), |
| 3068 | #[serde(rename = "result")] |
| 3069 | Result(String), |
| 3070 | } |
| 3071 | |
| 3072 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3073 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3074 | #[serde(tag = "type")] |
| 3075 | pub enum ThreadItemsListAnchor { |
| 3076 | #[serde(rename = "item")] |
| 3077 | Item { |
| 3078 | #[serde(rename = "itemId")] |
| 3079 | item_id: String, |
| 3080 | }, |
| 3081 | } |
| 3082 | |
| 3083 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3084 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3085 | #[serde(untagged)] |
| 3086 | pub enum ThreadItemsListCursor { |
| 3087 | String(String), |
| 3088 | ThreadItemsListAnchor(ThreadItemsListAnchor), |
| 3089 | } |
| 3090 | |
| 3091 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3092 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3093 | pub struct ThreadItemsListParams { |
| 3094 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3095 | pub cursor: Option<ThreadItemsListCursor>, |
| 3096 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3097 | pub limit: Option<u32>, |
| 3098 | #[serde(rename = "sortDirection", default, skip_serializing_if = "Option::is_none")] |
| 3099 | pub sort_direction: Option<SortDirection>, |
| 3100 | #[serde(rename = "threadId")] |
| 3101 | pub thread_id: String, |
| 3102 | #[serde(rename = "turnId", default, skip_serializing_if = "Option::is_none")] |
| 3103 | pub turn_id: Option<String>, |
| 3104 | } |
| 3105 | |
| 3106 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3107 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3108 | pub struct ThreadItemsListResponse { |
| 3109 | #[serde(rename = "backwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3110 | pub backwards_cursor: Option<String>, |
| 3111 | pub data: Vec<ThreadItemEntry>, |
| 3112 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 3113 | pub next_cursor: Option<String>, |
| 3114 | } |
| 3115 | |
| 3116 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3117 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3118 | #[serde(untagged)] |
| 3119 | pub enum ThreadListCwdFilter { |
| 3120 | String(String), |
| 3121 | Strings(Vec<String>), |
| 3122 | } |
| 3123 | |
| 3124 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3125 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3126 | pub struct ThreadListParams { |
| 3127 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3128 | pub archived: Option<bool>, |
| 3129 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3130 | pub cursor: Option<String>, |
| 3131 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3132 | pub cwd: Option<ThreadListCwdFilter>, |
| 3133 | #[serde(rename = "excludedThreadIds", default, skip_serializing_if = "Option::is_none")] |
| 3134 | pub excluded_thread_ids: Option<Vec<String>>, |
| 3135 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3136 | pub limit: Option<u32>, |
| 3137 | #[serde(rename = "modelProviders", default, skip_serializing_if = "Option::is_none")] |
| 3138 | pub model_providers: Option<Vec<String>>, |
| 3139 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3140 | pub originators: Option<Vec<String>>, |
| 3141 | #[serde(rename = "searchTerm", default, skip_serializing_if = "Option::is_none")] |
| 3142 | pub search_term: Option<String>, |
| 3143 | #[serde(rename = "sectionId", default, skip_serializing_if = "Option::is_none")] |
| 3144 | pub section_id: Option<String>, |
| 3145 | #[serde(rename = "sortDirection", default, skip_serializing_if = "Option::is_none")] |
| 3146 | pub sort_direction: Option<SortDirection>, |
| 3147 | #[serde(rename = "sortKey", default, skip_serializing_if = "Option::is_none")] |
| 3148 | pub sort_key: Option<ThreadSortKey>, |
| 3149 | #[serde(rename = "sourceKinds", default, skip_serializing_if = "Option::is_none")] |
| 3150 | pub source_kinds: Option<Vec<ThreadSourceKind>>, |
| 3151 | #[serde(rename = "useStateDbOnly", default, skip_serializing_if = "Option::is_none")] |
| 3152 | pub use_state_db_only: Option<bool>, |
| 3153 | } |
| 3154 | |
| 3155 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3156 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3157 | pub struct ThreadListResponse { |
| 3158 | #[serde(rename = "backwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3159 | pub backwards_cursor: Option<String>, |
| 3160 | pub data: Vec<Thread>, |
| 3161 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 3162 | pub next_cursor: Option<String>, |
| 3163 | } |
| 3164 | |
| 3165 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3166 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3167 | pub struct ThreadLoadedListParams { |
| 3168 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3169 | pub cursor: Option<String>, |
| 3170 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3171 | pub limit: Option<u32>, |
| 3172 | } |
| 3173 | |
| 3174 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3175 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3176 | pub struct ThreadLoadedListResponse { |
| 3177 | pub data: Vec<String>, |
| 3178 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 3179 | pub next_cursor: Option<String>, |
| 3180 | } |
| 3181 | |
| 3182 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3183 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3184 | pub struct ThreadNameUpdatedNotification { |
| 3185 | #[serde(rename = "threadId")] |
| 3186 | pub thread_id: String, |
| 3187 | #[serde(rename = "threadName", default, skip_serializing_if = "Option::is_none")] |
| 3188 | pub thread_name: Option<String>, |
| 3189 | } |
| 3190 | |
| 3191 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3192 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3193 | pub struct ThreadPlacement { |
| 3194 | pub id: String, |
| 3195 | #[serde(rename = "providerKind")] |
| 3196 | pub provider_kind: String, |
| 3197 | } |
| 3198 | |
| 3199 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3200 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3201 | pub struct ThreadReadParams { |
| 3202 | #[serde(rename = "includeTurns", default, skip_serializing_if = "Option::is_none")] |
| 3203 | pub include_turns: Option<bool>, |
| 3204 | #[serde(rename = "threadId")] |
| 3205 | pub thread_id: String, |
| 3206 | } |
| 3207 | |
| 3208 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3209 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3210 | pub struct ThreadReadResponse { |
| 3211 | pub thread: Thread, |
| 3212 | } |
| 3213 | |
| 3214 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3215 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3216 | pub struct ThreadResumeParams { |
| 3217 | #[serde(rename = "approvalPolicy", default, skip_serializing_if = "Option::is_none")] |
| 3218 | pub approval_policy: Option<AskForApproval>, |
| 3219 | #[serde(rename = "approvalsReviewer", default, skip_serializing_if = "Option::is_none")] |
| 3220 | pub approvals_reviewer: Option<ApprovalsReviewer>, |
| 3221 | #[serde(rename = "baseInstructions", default, skip_serializing_if = "Option::is_none")] |
| 3222 | pub base_instructions: Option<String>, |
| 3223 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3224 | pub config: Option<Map<String, Value>>, |
| 3225 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3226 | pub cwd: Option<String>, |
| 3227 | #[serde(rename = "developerInstructions", default, skip_serializing_if = "Option::is_none")] |
| 3228 | pub developer_instructions: Option<String>, |
| 3229 | #[serde(rename = "excludeTurns", default, skip_serializing_if = "Option::is_none")] |
| 3230 | pub exclude_turns: Option<bool>, |
| 3231 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3232 | pub model: Option<String>, |
| 3233 | #[serde(rename = "modelProvider", default, skip_serializing_if = "Option::is_none")] |
| 3234 | pub model_provider: Option<String>, |
| 3235 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3236 | pub personality: Option<Personality>, |
| 3237 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3238 | pub sandbox: Option<SandboxMode>, |
| 3239 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 3240 | pub service_tier: Option<String>, |
| 3241 | #[serde(rename = "threadId")] |
| 3242 | pub thread_id: String, |
| 3243 | } |
| 3244 | |
| 3245 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3246 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3247 | pub struct ThreadResumeResponse { |
| 3248 | #[serde(rename = "approvalPolicy")] |
| 3249 | pub approval_policy: AskForApproval, |
| 3250 | #[serde(rename = "approvalsReviewer")] |
| 3251 | pub approvals_reviewer: ApprovalsReviewer, |
| 3252 | #[serde(rename = "collaborationMode", default, skip_serializing_if = "Option::is_none")] |
| 3253 | pub collaboration_mode: Option<CollaborationMode>, |
| 3254 | pub cwd: AbsolutePathBuf, |
| 3255 | #[serde(rename = "disabledPluginIds", default)] |
| 3256 | pub disabled_plugin_ids: Vec<String>, |
| 3257 | #[serde(rename = "instructionSources", default)] |
| 3258 | pub instruction_sources: Vec<LegacyAppPathString>, |
| 3259 | #[serde(rename = "itemsBackwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3260 | pub items_backwards_cursor: Option<String>, |
| 3261 | pub model: String, |
| 3262 | #[serde(rename = "modelProvider")] |
| 3263 | pub model_provider: String, |
| 3264 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 3265 | pub reasoning_effort: Option<ReasoningEffort>, |
| 3266 | pub sandbox: SandboxPolicy, |
| 3267 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 3268 | pub service_tier: Option<String>, |
| 3269 | pub thread: Thread, |
| 3270 | #[serde(rename = "turnsBackwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3271 | pub turns_backwards_cursor: Option<String>, |
| 3272 | } |
| 3273 | |
| 3274 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3275 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3276 | pub struct ThreadRevertParams { |
| 3277 | #[serde(rename = "beforeTurnId")] |
| 3278 | pub before_turn_id: String, |
| 3279 | #[serde(rename = "threadId")] |
| 3280 | pub thread_id: String, |
| 3281 | } |
| 3282 | |
| 3283 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3284 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3285 | pub struct ThreadRevertResponse { |
| 3286 | #[serde(rename = "itemsBackwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3287 | pub items_backwards_cursor: Option<String>, |
| 3288 | pub thread: Thread, |
| 3289 | #[serde(rename = "turnsBackwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3290 | pub turns_backwards_cursor: Option<String>, |
| 3291 | } |
| 3292 | |
| 3293 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3294 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3295 | pub struct ThreadRevertedNotification { |
| 3296 | #[serde(rename = "threadId")] |
| 3297 | pub thread_id: String, |
| 3298 | } |
| 3299 | |
| 3300 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3301 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3302 | pub struct ThreadSection { |
| 3303 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3304 | pub appearance: Option<ThreadSectionAppearance>, |
| 3305 | pub id: String, |
| 3306 | pub name: String, |
| 3307 | } |
| 3308 | |
| 3309 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3310 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3311 | pub struct ThreadSectionAppearance { |
| 3312 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3313 | pub color: Option<String>, |
| 3314 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3315 | pub icon: Option<String>, |
| 3316 | } |
| 3317 | |
| 3318 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3319 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3320 | pub struct ThreadSetNameParams { |
| 3321 | pub name: String, |
| 3322 | #[serde(rename = "threadId")] |
| 3323 | pub thread_id: String, |
| 3324 | } |
| 3325 | |
| 3326 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3327 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3328 | pub struct ThreadSetNameResponse { |
| 3329 | } |
| 3330 | |
| 3331 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3332 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3333 | pub struct ThreadShellCommandParams { |
| 3334 | pub command: String, |
| 3335 | #[serde(rename = "threadId")] |
| 3336 | pub thread_id: String, |
| 3337 | #[serde(rename = "timeoutMs", default, skip_serializing_if = "Option::is_none")] |
| 3338 | pub timeout_ms: Option<i64>, |
| 3339 | } |
| 3340 | |
| 3341 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3342 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3343 | pub struct ThreadShellCommandResponse { |
| 3344 | } |
| 3345 | |
| 3346 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3347 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3348 | pub enum ThreadSortKey { |
| 3349 | #[serde(rename = "created_at")] |
| 3350 | CreatedAt, |
| 3351 | #[serde(rename = "updated_at")] |
| 3352 | UpdatedAt, |
| 3353 | #[serde(rename = "recency_at")] |
| 3354 | RecencyAt, |
| 3355 | #[serde(rename = "section_position")] |
| 3356 | SectionPosition, |
| 3357 | } |
| 3358 | |
| 3359 | pub type ThreadSource = String; |
| 3360 | |
| 3361 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3362 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3363 | pub enum ThreadSourceKind { |
| 3364 | #[serde(rename = "cli")] |
| 3365 | Cli, |
| 3366 | #[serde(rename = "vscode")] |
| 3367 | Vscode, |
| 3368 | #[serde(rename = "exec")] |
| 3369 | Exec, |
| 3370 | #[serde(rename = "appServer")] |
| 3371 | AppServer, |
| 3372 | #[serde(rename = "subAgent")] |
| 3373 | SubAgent, |
| 3374 | #[serde(rename = "subAgentReview")] |
| 3375 | SubAgentReview, |
| 3376 | #[serde(rename = "subAgentCompact")] |
| 3377 | SubAgentCompact, |
| 3378 | #[serde(rename = "subAgentThreadSpawn")] |
| 3379 | SubAgentThreadSpawn, |
| 3380 | #[serde(rename = "subAgentOther")] |
| 3381 | SubAgentOther, |
| 3382 | #[serde(rename = "unknown")] |
| 3383 | Unknown, |
| 3384 | } |
| 3385 | |
| 3386 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3387 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3388 | pub struct ThreadStartParams { |
| 3389 | #[serde(rename = "approvalPolicy", default, skip_serializing_if = "Option::is_none")] |
| 3390 | pub approval_policy: Option<AskForApproval>, |
| 3391 | #[serde(rename = "approvalsReviewer", default, skip_serializing_if = "Option::is_none")] |
| 3392 | pub approvals_reviewer: Option<ApprovalsReviewer>, |
| 3393 | #[serde(rename = "baseInstructions", default, skip_serializing_if = "Option::is_none")] |
| 3394 | pub base_instructions: Option<String>, |
| 3395 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3396 | pub config: Option<Map<String, Value>>, |
| 3397 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3398 | pub cwd: Option<String>, |
| 3399 | #[serde(rename = "developerInstructions", default, skip_serializing_if = "Option::is_none")] |
| 3400 | pub developer_instructions: Option<String>, |
| 3401 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3402 | pub ephemeral: Option<bool>, |
| 3403 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3404 | pub model: Option<String>, |
| 3405 | #[serde(rename = "modelProvider", default, skip_serializing_if = "Option::is_none")] |
| 3406 | pub model_provider: Option<String>, |
| 3407 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3408 | pub personality: Option<Personality>, |
| 3409 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3410 | pub sandbox: Option<SandboxMode>, |
| 3411 | #[serde(rename = "serviceName", default, skip_serializing_if = "Option::is_none")] |
| 3412 | pub service_name: Option<String>, |
| 3413 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 3414 | pub service_tier: Option<String>, |
| 3415 | #[serde(rename = "sessionStartSource", default, skip_serializing_if = "Option::is_none")] |
| 3416 | pub session_start_source: Option<ThreadStartSource>, |
| 3417 | #[serde(rename = "threadSource", default, skip_serializing_if = "Option::is_none")] |
| 3418 | pub thread_source: Option<ThreadSource>, |
| 3419 | } |
| 3420 | |
| 3421 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3422 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3423 | pub struct ThreadStartResponse { |
| 3424 | #[serde(rename = "approvalPolicy")] |
| 3425 | pub approval_policy: AskForApproval, |
| 3426 | #[serde(rename = "approvalsReviewer")] |
| 3427 | pub approvals_reviewer: ApprovalsReviewer, |
| 3428 | pub cwd: AbsolutePathBuf, |
| 3429 | #[serde(rename = "disabledPluginIds", default)] |
| 3430 | pub disabled_plugin_ids: Vec<String>, |
| 3431 | #[serde(rename = "instructionSources", default)] |
| 3432 | pub instruction_sources: Vec<LegacyAppPathString>, |
| 3433 | pub model: String, |
| 3434 | #[serde(rename = "modelProvider")] |
| 3435 | pub model_provider: String, |
| 3436 | #[serde(rename = "reasoningEffort", default, skip_serializing_if = "Option::is_none")] |
| 3437 | pub reasoning_effort: Option<ReasoningEffort>, |
| 3438 | pub sandbox: SandboxPolicy, |
| 3439 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 3440 | pub service_tier: Option<String>, |
| 3441 | pub thread: Thread, |
| 3442 | } |
| 3443 | |
| 3444 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3445 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3446 | pub enum ThreadStartSource { |
| 3447 | #[serde(rename = "startup")] |
| 3448 | Startup, |
| 3449 | #[serde(rename = "clear")] |
| 3450 | Clear, |
| 3451 | } |
| 3452 | |
| 3453 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3454 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3455 | pub struct ThreadStartedNotification { |
| 3456 | pub thread: Thread, |
| 3457 | } |
| 3458 | |
| 3459 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3460 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3461 | #[serde(tag = "type")] |
| 3462 | pub enum ThreadStatus { |
| 3463 | #[serde(rename = "notLoaded")] |
| 3464 | NotLoaded {}, |
| 3465 | #[serde(rename = "idle")] |
| 3466 | Idle {}, |
| 3467 | #[serde(rename = "systemError")] |
| 3468 | SystemError {}, |
| 3469 | #[serde(rename = "active")] |
| 3470 | Active { |
| 3471 | #[serde(rename = "activeFlags")] |
| 3472 | active_flags: Vec<ThreadActiveFlag>, |
| 3473 | }, |
| 3474 | } |
| 3475 | |
| 3476 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3477 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3478 | pub struct ThreadStatusChangedNotification { |
| 3479 | pub status: ThreadStatus, |
| 3480 | #[serde(rename = "threadId")] |
| 3481 | pub thread_id: String, |
| 3482 | } |
| 3483 | |
| 3484 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3485 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3486 | pub struct ThreadTokenUsage { |
| 3487 | pub last: TokenUsageBreakdown, |
| 3488 | #[serde(rename = "modelContextWindow", default, skip_serializing_if = "Option::is_none")] |
| 3489 | pub model_context_window: Option<i64>, |
| 3490 | pub total: TokenUsageBreakdown, |
| 3491 | } |
| 3492 | |
| 3493 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3494 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3495 | pub struct ThreadTokenUsageUpdatedNotification { |
| 3496 | #[serde(rename = "threadId")] |
| 3497 | pub thread_id: String, |
| 3498 | #[serde(rename = "tokenUsage")] |
| 3499 | pub token_usage: ThreadTokenUsage, |
| 3500 | #[serde(rename = "turnId")] |
| 3501 | pub turn_id: String, |
| 3502 | } |
| 3503 | |
| 3504 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3505 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3506 | pub struct ThreadTurnsListParams { |
| 3507 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3508 | pub cursor: Option<String>, |
| 3509 | #[serde(rename = "itemsView", default, skip_serializing_if = "Option::is_none")] |
| 3510 | pub items_view: Option<TurnItemsView>, |
| 3511 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3512 | pub limit: Option<u32>, |
| 3513 | #[serde(rename = "sortDirection", default, skip_serializing_if = "Option::is_none")] |
| 3514 | pub sort_direction: Option<SortDirection>, |
| 3515 | #[serde(rename = "threadId")] |
| 3516 | pub thread_id: String, |
| 3517 | } |
| 3518 | |
| 3519 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3520 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3521 | pub struct ThreadTurnsListResponse { |
| 3522 | #[serde(rename = "backwardsCursor", default, skip_serializing_if = "Option::is_none")] |
| 3523 | pub backwards_cursor: Option<String>, |
| 3524 | pub data: Vec<Turn>, |
| 3525 | #[serde(rename = "nextCursor", default, skip_serializing_if = "Option::is_none")] |
| 3526 | pub next_cursor: Option<String>, |
| 3527 | } |
| 3528 | |
| 3529 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3530 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3531 | pub struct ThreadUnarchiveParams { |
| 3532 | #[serde(rename = "threadId")] |
| 3533 | pub thread_id: String, |
| 3534 | } |
| 3535 | |
| 3536 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3537 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3538 | pub struct ThreadUnarchiveResponse { |
| 3539 | pub thread: Thread, |
| 3540 | } |
| 3541 | |
| 3542 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3543 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3544 | pub struct ThreadUnarchivedNotification { |
| 3545 | #[serde(rename = "threadId")] |
| 3546 | pub thread_id: String, |
| 3547 | } |
| 3548 | |
| 3549 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3550 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3551 | pub struct ThreadUnsubscribeParams { |
| 3552 | #[serde(rename = "threadId")] |
| 3553 | pub thread_id: String, |
| 3554 | } |
| 3555 | |
| 3556 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3557 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3558 | pub struct ThreadUnsubscribeResponse { |
| 3559 | pub status: ThreadUnsubscribeStatus, |
| 3560 | } |
| 3561 | |
| 3562 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3563 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3564 | pub enum ThreadUnsubscribeStatus { |
| 3565 | #[serde(rename = "notLoaded")] |
| 3566 | NotLoaded, |
| 3567 | #[serde(rename = "notSubscribed")] |
| 3568 | NotSubscribed, |
| 3569 | #[serde(rename = "unsubscribed")] |
| 3570 | Unsubscribed, |
| 3571 | } |
| 3572 | |
| 3573 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3574 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3575 | pub struct TokenUsageBreakdown { |
| 3576 | #[serde(rename = "cacheWriteInputTokens", default)] |
| 3577 | pub cache_write_input_tokens: i64, |
| 3578 | #[serde(rename = "cachedInputTokens")] |
| 3579 | pub cached_input_tokens: i64, |
| 3580 | #[serde(rename = "inputTokens")] |
| 3581 | pub input_tokens: i64, |
| 3582 | #[serde(rename = "outputTokens")] |
| 3583 | pub output_tokens: i64, |
| 3584 | #[serde(rename = "reasoningOutputTokens")] |
| 3585 | pub reasoning_output_tokens: i64, |
| 3586 | #[serde(rename = "totalTokens")] |
| 3587 | pub total_tokens: i64, |
| 3588 | } |
| 3589 | |
| 3590 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3591 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3592 | pub struct Tool { |
| 3593 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3594 | pub _meta: Option<Value>, |
| 3595 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3596 | pub annotations: Option<Value>, |
| 3597 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3598 | pub description: Option<String>, |
| 3599 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3600 | pub icons: Option<Vec<Value>>, |
| 3601 | #[serde(rename = "inputSchema")] |
| 3602 | pub input_schema: Value, |
| 3603 | pub name: String, |
| 3604 | #[serde(rename = "outputSchema", default, skip_serializing_if = "Option::is_none")] |
| 3605 | pub output_schema: Option<Value>, |
| 3606 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3607 | pub title: Option<String>, |
| 3608 | } |
| 3609 | |
| 3610 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3611 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3612 | pub struct ToolRequestUserInputAnswer { |
| 3613 | pub answers: Vec<String>, |
| 3614 | } |
| 3615 | |
| 3616 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3617 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3618 | pub struct ToolRequestUserInputOption { |
| 3619 | pub description: String, |
| 3620 | pub label: String, |
| 3621 | } |
| 3622 | |
| 3623 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3624 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3625 | pub struct ToolRequestUserInputParams { |
| 3626 | #[serde(rename = "autoResolutionMs", default, skip_serializing_if = "Option::is_none")] |
| 3627 | pub auto_resolution_ms: Option<u64>, |
| 3628 | #[serde(rename = "isBlocking")] |
| 3629 | pub is_blocking: bool, |
| 3630 | #[serde(rename = "itemId")] |
| 3631 | pub item_id: String, |
| 3632 | pub questions: Vec<ToolRequestUserInputQuestion>, |
| 3633 | #[serde(rename = "threadId")] |
| 3634 | pub thread_id: String, |
| 3635 | #[serde(rename = "turnId")] |
| 3636 | pub turn_id: String, |
| 3637 | } |
| 3638 | |
| 3639 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3640 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3641 | pub struct ToolRequestUserInputQuestion { |
| 3642 | pub header: String, |
| 3643 | pub id: String, |
| 3644 | #[serde(rename = "isOther", default)] |
| 3645 | pub is_other: bool, |
| 3646 | #[serde(rename = "isSecret", default)] |
| 3647 | pub is_secret: bool, |
| 3648 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3649 | pub options: Option<Vec<ToolRequestUserInputOption>>, |
| 3650 | pub question: String, |
| 3651 | } |
| 3652 | |
| 3653 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3654 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3655 | pub struct ToolRequestUserInputResponse { |
| 3656 | pub answers: BTreeMap<String, ToolRequestUserInputAnswer>, |
| 3657 | } |
| 3658 | |
| 3659 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3660 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3661 | pub struct ToolsV2 { |
| 3662 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3663 | pub web_search: Option<WebSearchToolConfig>, |
| 3664 | } |
| 3665 | |
| 3666 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3667 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3668 | pub struct Turn { |
| 3669 | #[serde(rename = "completedAt", default, skip_serializing_if = "Option::is_none")] |
| 3670 | pub completed_at: Option<i64>, |
| 3671 | #[serde(rename = "durationMs", default, skip_serializing_if = "Option::is_none")] |
| 3672 | pub duration_ms: Option<i64>, |
| 3673 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3674 | pub error: Option<TurnError>, |
| 3675 | pub id: String, |
| 3676 | pub items: Vec<ThreadItem>, |
| 3677 | #[serde(rename = "itemsView", default = "default_turn_items_view")] |
| 3678 | pub items_view: TurnItemsView, |
| 3679 | #[serde(rename = "rootTurnId", default, skip_serializing_if = "Option::is_none")] |
| 3680 | pub root_turn_id: Option<String>, |
| 3681 | #[serde(rename = "startedAt", default, skip_serializing_if = "Option::is_none")] |
| 3682 | pub started_at: Option<i64>, |
| 3683 | pub status: TurnStatus, |
| 3684 | } |
| 3685 | |
| 3686 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3687 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3688 | pub struct TurnCompletedNotification { |
| 3689 | #[serde(rename = "threadId")] |
| 3690 | pub thread_id: String, |
| 3691 | pub turn: Turn, |
| 3692 | } |
| 3693 | |
| 3694 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3695 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3696 | pub struct TurnDiffUpdatedNotification { |
| 3697 | pub diff: String, |
| 3698 | #[serde(rename = "threadId")] |
| 3699 | pub thread_id: String, |
| 3700 | #[serde(rename = "turnId")] |
| 3701 | pub turn_id: String, |
| 3702 | } |
| 3703 | |
| 3704 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3705 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3706 | pub struct TurnError { |
| 3707 | #[serde(rename = "additionalDetails", default, skip_serializing_if = "Option::is_none")] |
| 3708 | pub additional_details: Option<String>, |
| 3709 | #[serde(rename = "codexErrorInfo", default, skip_serializing_if = "Option::is_none")] |
| 3710 | pub codex_error_info: Option<CodexErrorInfo>, |
| 3711 | pub message: String, |
| 3712 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3713 | pub misalignment: Option<MisalignmentErrorDetails>, |
| 3714 | } |
| 3715 | |
| 3716 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3717 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3718 | pub struct TurnInterruptParams { |
| 3719 | #[serde(rename = "threadId")] |
| 3720 | pub thread_id: String, |
| 3721 | #[serde(rename = "turnId")] |
| 3722 | pub turn_id: String, |
| 3723 | } |
| 3724 | |
| 3725 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3726 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3727 | pub struct TurnInterruptResponse { |
| 3728 | } |
| 3729 | |
| 3730 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3731 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3732 | pub enum TurnItemsView { |
| 3733 | #[serde(rename = "notLoaded")] |
| 3734 | NotLoaded, |
| 3735 | #[serde(rename = "summary")] |
| 3736 | Summary, |
| 3737 | #[serde(rename = "full")] |
| 3738 | Full, |
| 3739 | } |
| 3740 | |
| 3741 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3742 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3743 | pub struct TurnPlanStep { |
| 3744 | pub status: TurnPlanStepStatus, |
| 3745 | pub step: String, |
| 3746 | } |
| 3747 | |
| 3748 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3749 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3750 | pub enum TurnPlanStepStatus { |
| 3751 | #[serde(rename = "pending")] |
| 3752 | Pending, |
| 3753 | #[serde(rename = "inProgress")] |
| 3754 | InProgress, |
| 3755 | #[serde(rename = "completed")] |
| 3756 | Completed, |
| 3757 | } |
| 3758 | |
| 3759 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3760 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3761 | pub struct TurnPlanUpdatedNotification { |
| 3762 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3763 | pub explanation: Option<String>, |
| 3764 | pub plan: Vec<TurnPlanStep>, |
| 3765 | #[serde(rename = "threadId")] |
| 3766 | pub thread_id: String, |
| 3767 | #[serde(rename = "turnId")] |
| 3768 | pub turn_id: String, |
| 3769 | } |
| 3770 | |
| 3771 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3772 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3773 | pub struct TurnStartParams { |
| 3774 | #[serde(rename = "approvalPolicy", default, skip_serializing_if = "Option::is_none")] |
| 3775 | pub approval_policy: Option<AskForApproval>, |
| 3776 | #[serde(rename = "approvalsReviewer", default, skip_serializing_if = "Option::is_none")] |
| 3777 | pub approvals_reviewer: Option<ApprovalsReviewer>, |
| 3778 | #[serde(rename = "clientUserMessageId", default, skip_serializing_if = "Option::is_none")] |
| 3779 | pub client_user_message_id: Option<String>, |
| 3780 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3781 | pub cwd: Option<String>, |
| 3782 | #[serde(rename = "disabledPluginIds", default, skip_serializing_if = "Option::is_none")] |
| 3783 | pub disabled_plugin_ids: Option<Vec<String>>, |
| 3784 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3785 | pub effort: Option<ReasoningEffort>, |
| 3786 | pub input: Vec<UserInput>, |
| 3787 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3788 | pub model: Option<String>, |
| 3789 | #[serde(rename = "outputSchema", default, skip_serializing_if = "Option::is_none")] |
| 3790 | pub output_schema: Option<Value>, |
| 3791 | #[serde(rename = "parentTurnId", default, skip_serializing_if = "Option::is_none")] |
| 3792 | pub parent_turn_id: Option<String>, |
| 3793 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3794 | pub personality: Option<Personality>, |
| 3795 | #[serde(rename = "rootTurnId", default, skip_serializing_if = "Option::is_none")] |
| 3796 | pub root_turn_id: Option<String>, |
| 3797 | #[serde(rename = "sandboxPolicy", default, skip_serializing_if = "Option::is_none")] |
| 3798 | pub sandbox_policy: Option<SandboxPolicy>, |
| 3799 | #[serde(rename = "serviceTier", default, skip_serializing_if = "Option::is_none")] |
| 3800 | pub service_tier: Option<String>, |
| 3801 | #[serde(rename = "serviceTierForTurn", default, skip_serializing_if = "Option::is_none")] |
| 3802 | pub service_tier_for_turn: Option<String>, |
| 3803 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3804 | pub summary: Option<ReasoningSummary>, |
| 3805 | #[serde(rename = "threadId")] |
| 3806 | pub thread_id: String, |
| 3807 | #[serde(rename = "toolOutput", default, skip_serializing_if = "Option::is_none")] |
| 3808 | pub tool_output: Option<TurnToolOutput>, |
| 3809 | #[serde(rename = "turnTrigger", default, skip_serializing_if = "Option::is_none")] |
| 3810 | pub turn_trigger: Option<String>, |
| 3811 | } |
| 3812 | |
| 3813 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3814 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3815 | pub struct TurnStartResponse { |
| 3816 | pub turn: Turn, |
| 3817 | } |
| 3818 | |
| 3819 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3820 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3821 | pub struct TurnStartedNotification { |
| 3822 | #[serde(rename = "threadId")] |
| 3823 | pub thread_id: String, |
| 3824 | pub turn: Turn, |
| 3825 | } |
| 3826 | |
| 3827 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3828 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3829 | pub enum TurnStatus { |
| 3830 | #[serde(rename = "completed")] |
| 3831 | Completed, |
| 3832 | #[serde(rename = "interrupted")] |
| 3833 | Interrupted, |
| 3834 | #[serde(rename = "failed")] |
| 3835 | Failed, |
| 3836 | #[serde(rename = "inProgress")] |
| 3837 | InProgress, |
| 3838 | } |
| 3839 | |
| 3840 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3841 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3842 | pub struct TurnSteerParams { |
| 3843 | #[serde(rename = "clientUserMessageId", default, skip_serializing_if = "Option::is_none")] |
| 3844 | pub client_user_message_id: Option<String>, |
| 3845 | #[serde(rename = "expectedTurnId")] |
| 3846 | pub expected_turn_id: String, |
| 3847 | pub input: Vec<UserInput>, |
| 3848 | #[serde(rename = "threadId")] |
| 3849 | pub thread_id: String, |
| 3850 | } |
| 3851 | |
| 3852 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3853 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3854 | pub struct TurnSteerResponse { |
| 3855 | #[serde(rename = "turnId")] |
| 3856 | pub turn_id: String, |
| 3857 | } |
| 3858 | |
| 3859 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3860 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3861 | pub struct TurnToolOutput { |
| 3862 | pub name: String, |
| 3863 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3864 | pub namespace: Option<String>, |
| 3865 | pub output: FunctionCallOutputBody, |
| 3866 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3867 | pub retain: Option<bool>, |
| 3868 | } |
| 3869 | |
| 3870 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3871 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3872 | #[serde(tag = "type")] |
| 3873 | pub enum UserInput { |
| 3874 | #[serde(rename = "text")] |
| 3875 | Text { |
| 3876 | text: String, |
| 3877 | #[serde(default)] |
| 3878 | text_elements: Vec<TextElement>, |
| 3879 | }, |
| 3880 | #[serde(rename = "image")] |
| 3881 | Image { |
| 3882 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3883 | detail: Option<ImageDetail>, |
| 3884 | #[serde(flatten)] |
| 3885 | kind: UserInputImageKind, |
| 3886 | }, |
| 3887 | #[serde(rename = "localImage")] |
| 3888 | LocalImage { |
| 3889 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3890 | detail: Option<ImageDetail>, |
| 3891 | path: String, |
| 3892 | }, |
| 3893 | #[serde(rename = "audio")] |
| 3894 | Audio { |
| 3895 | url: String, |
| 3896 | }, |
| 3897 | #[serde(rename = "localAudio")] |
| 3898 | LocalAudio { |
| 3899 | path: String, |
| 3900 | }, |
| 3901 | #[serde(rename = "skill")] |
| 3902 | Skill { |
| 3903 | name: String, |
| 3904 | path: String, |
| 3905 | }, |
| 3906 | #[serde(rename = "mention")] |
| 3907 | Mention { |
| 3908 | name: String, |
| 3909 | path: String, |
| 3910 | }, |
| 3911 | } |
| 3912 | |
| 3913 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3914 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3915 | pub enum UserInputImageKind { |
| 3916 | #[serde(rename = "url")] |
| 3917 | Url(String), |
| 3918 | #[serde(rename = "fileId")] |
| 3919 | FileId(String), |
| 3920 | } |
| 3921 | |
| 3922 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3923 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3924 | pub enum Verbosity { |
| 3925 | #[serde(rename = "low")] |
| 3926 | Low, |
| 3927 | #[serde(rename = "medium")] |
| 3928 | Medium, |
| 3929 | #[serde(rename = "high")] |
| 3930 | High, |
| 3931 | } |
| 3932 | |
| 3933 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 3934 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3935 | #[serde(tag = "type")] |
| 3936 | pub enum WebSearchAction { |
| 3937 | #[serde(rename = "search")] |
| 3938 | Search { |
| 3939 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3940 | queries: Option<Vec<String>>, |
| 3941 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3942 | query: Option<String>, |
| 3943 | }, |
| 3944 | #[serde(rename = "openPage")] |
| 3945 | OpenPage { |
| 3946 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3947 | url: Option<String>, |
| 3948 | }, |
| 3949 | #[serde(rename = "findInPage")] |
| 3950 | FindInPage { |
| 3951 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3952 | pattern: Option<String>, |
| 3953 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3954 | url: Option<String>, |
| 3955 | }, |
| 3956 | #[serde(rename = "other")] |
| 3957 | Other {}, |
| 3958 | } |
| 3959 | |
| 3960 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3961 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3962 | pub enum WebSearchContextSize { |
| 3963 | #[serde(rename = "low")] |
| 3964 | Low, |
| 3965 | #[serde(rename = "medium")] |
| 3966 | Medium, |
| 3967 | #[serde(rename = "high")] |
| 3968 | High, |
| 3969 | } |
| 3970 | |
| 3971 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3972 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3973 | #[serde(deny_unknown_fields)] |
| 3974 | pub struct WebSearchLocation { |
| 3975 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3976 | pub city: Option<String>, |
| 3977 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3978 | pub country: Option<String>, |
| 3979 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3980 | pub region: Option<String>, |
| 3981 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 3982 | pub timezone: Option<String>, |
| 3983 | } |
| 3984 | |
| 3985 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 3986 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 3987 | pub enum WebSearchMode { |
| 3988 | #[serde(rename = "disabled")] |
| 3989 | Disabled, |
| 3990 | #[serde(rename = "cached")] |
| 3991 | Cached, |
| 3992 | #[serde(rename = "indexed")] |
| 3993 | Indexed, |
| 3994 | #[serde(rename = "live")] |
| 3995 | Live, |
| 3996 | } |
| 3997 | |
| 3998 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] |
| 3999 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 4000 | #[serde(deny_unknown_fields)] |
| 4001 | pub struct WebSearchToolConfig { |
| 4002 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 4003 | pub allowed_domains: Option<Vec<String>>, |
| 4004 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 4005 | pub context_size: Option<WebSearchContextSize>, |
| 4006 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 4007 | pub location: Option<WebSearchLocation>, |
| 4008 | } |
| 4009 | |
| 4010 | #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Serialize, Deserialize)] |
| 4011 | #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] |
| 4012 | pub enum WriteStatus { |
| 4013 | #[serde(rename = "ok")] |
| 4014 | Ok, |
| 4015 | #[serde(rename = "okOverridden")] |
| 4016 | OkOverridden, |
| 4017 | } |
| 4018 | |
| 4019 | fn default_command_execution_request_approval_params_kind() -> CommandExecutionApprovalKind { |
| 4020 | CommandExecutionApprovalKind::Command |
| 4021 | } |
| 4022 | |
| 4023 | fn default_model_input_modalities() -> Vec<InputModality> { |
| 4024 | vec![InputModality::Text, InputModality::Image] |
| 4025 | } |
| 4026 | |
| 4027 | fn default_permissions_request_approval_response_scope() -> PermissionGrantScope { |
| 4028 | PermissionGrantScope::Turn |
| 4029 | } |
| 4030 | |
| 4031 | fn default_sandbox_policy_network_access() -> NetworkAccess { |
| 4032 | NetworkAccess::Restricted |
| 4033 | } |
| 4034 | |
| 4035 | fn default_thread_history_mode() -> ThreadHistoryMode { |
| 4036 | ThreadHistoryMode::Legacy |
| 4037 | } |
| 4038 | |
| 4039 | fn default_thread_item_kind_source() -> CommandExecutionSource { |
| 4040 | CommandExecutionSource::Agent |
| 4041 | } |
| 4042 | |
| 4043 | fn default_turn_items_view() -> TurnItemsView { |
| 4044 | TurnItemsView::Full |
| 4045 | } |
| 4046 | |
| 4047 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 4048 | #[serde(tag = "method", content = "params")] |
| 4049 | pub enum ClientRequestParams { |
| 4050 | #[serde(rename = "initialize")] |
| 4051 | Initialize(InitializeParams), |
| 4052 | #[serde(rename = "thread/start")] |
| 4053 | ThreadStart(ThreadStartParams), |
| 4054 | #[serde(rename = "thread/resume")] |
| 4055 | ThreadResume(ThreadResumeParams), |
| 4056 | #[serde(rename = "thread/fork")] |
| 4057 | ThreadFork(ThreadForkParams), |
| 4058 | #[serde(rename = "thread/archive")] |
| 4059 | ThreadArchive(ThreadArchiveParams), |
| 4060 | #[serde(rename = "thread/delete")] |
| 4061 | ThreadDelete(ThreadDeleteParams), |
| 4062 | #[serde(rename = "thread/unsubscribe")] |
| 4063 | ThreadUnsubscribe(ThreadUnsubscribeParams), |
| 4064 | #[serde(rename = "thread/name/set")] |
| 4065 | ThreadSetName(ThreadSetNameParams), |
| 4066 | #[serde(rename = "thread/goal/set")] |
| 4067 | ThreadGoalSet(ThreadGoalSetParams), |
| 4068 | #[serde(rename = "thread/goal/get")] |
| 4069 | ThreadGoalGet(ThreadGoalGetParams), |
| 4070 | #[serde(rename = "thread/goal/clear")] |
| 4071 | ThreadGoalClear(ThreadGoalClearParams), |
| 4072 | #[serde(rename = "thread/unarchive")] |
| 4073 | ThreadUnarchive(ThreadUnarchiveParams), |
| 4074 | #[serde(rename = "thread/compact/start")] |
| 4075 | ThreadCompactStart(ThreadCompactStartParams), |
| 4076 | #[serde(rename = "thread/shellCommand")] |
| 4077 | ThreadShellCommand(ThreadShellCommandParams), |
| 4078 | #[serde(rename = "thread/revert")] |
| 4079 | ThreadRevert(ThreadRevertParams), |
| 4080 | #[serde(rename = "thread/list")] |
| 4081 | ThreadList(ThreadListParams), |
| 4082 | #[serde(rename = "thread/loaded/list")] |
| 4083 | ThreadLoadedList(ThreadLoadedListParams), |
| 4084 | #[serde(rename = "thread/read")] |
| 4085 | ThreadRead(ThreadReadParams), |
| 4086 | #[serde(rename = "thread/turns/list")] |
| 4087 | ThreadTurnsList(ThreadTurnsListParams), |
| 4088 | #[serde(rename = "thread/items/list")] |
| 4089 | ThreadItemsList(ThreadItemsListParams), |
| 4090 | #[serde(rename = "skills/list")] |
| 4091 | SkillsList(SkillsListParams), |
| 4092 | #[serde(rename = "hooks/list")] |
| 4093 | HooksList(HooksListParams), |
| 4094 | #[serde(rename = "fs/readFile")] |
| 4095 | FsReadFile(FsReadFileParams), |
| 4096 | #[serde(rename = "fs/writeFile")] |
| 4097 | FsWriteFile(FsWriteFileParams), |
| 4098 | #[serde(rename = "fs/createDirectory")] |
| 4099 | FsCreateDirectory(FsCreateDirectoryParams), |
| 4100 | #[serde(rename = "fs/getMetadata")] |
| 4101 | FsGetMetadata(FsGetMetadataParams), |
| 4102 | #[serde(rename = "fs/readDirectory")] |
| 4103 | FsReadDirectory(FsReadDirectoryParams), |
| 4104 | #[serde(rename = "fs/remove")] |
| 4105 | FsRemove(FsRemoveParams), |
| 4106 | #[serde(rename = "fs/copy")] |
| 4107 | FsCopy(FsCopyParams), |
| 4108 | #[serde(rename = "fs/watch")] |
| 4109 | FsWatch(FsWatchParams), |
| 4110 | #[serde(rename = "fs/unwatch")] |
| 4111 | FsUnwatch(FsUnwatchParams), |
| 4112 | #[serde(rename = "turn/start")] |
| 4113 | TurnStart(TurnStartParams), |
| 4114 | #[serde(rename = "turn/steer")] |
| 4115 | TurnSteer(TurnSteerParams), |
| 4116 | #[serde(rename = "turn/interrupt")] |
| 4117 | TurnInterrupt(TurnInterruptParams), |
| 4118 | #[serde(rename = "review/start")] |
| 4119 | ReviewStart(ReviewStartParams), |
| 4120 | #[serde(rename = "model/list")] |
| 4121 | ModelList(ModelListParams), |
| 4122 | #[serde(rename = "mcpServerStatus/list")] |
| 4123 | McpServerStatusList(ListMcpServerStatusParams), |
| 4124 | #[serde(rename = "command/exec")] |
| 4125 | OneOffCommandExec(CommandExecParams), |
| 4126 | #[serde(rename = "command/exec/write")] |
| 4127 | CommandExecWrite(CommandExecWriteParams), |
| 4128 | #[serde(rename = "command/exec/terminate")] |
| 4129 | CommandExecTerminate(CommandExecTerminateParams), |
| 4130 | #[serde(rename = "command/exec/resize")] |
| 4131 | CommandExecResize(CommandExecResizeParams), |
| 4132 | #[serde(rename = "config/read")] |
| 4133 | ConfigRead(ConfigReadParams), |
| 4134 | #[serde(rename = "config/value/write")] |
| 4135 | ConfigValueWrite(ConfigValueWriteParams), |
| 4136 | #[serde(rename = "config/batchWrite")] |
| 4137 | ConfigBatchWrite(ConfigBatchWriteParams), |
| 4138 | } |
| 4139 | |
| 4140 | impl ClientRequestParams { |
| 4141 | pub fn method(&self) -> ClientRequestMethod { |
| 4142 | match self { |
| 4143 | Self::Initialize(_) => ClientRequestMethod::Initialize, |
| 4144 | Self::ThreadStart(_) => ClientRequestMethod::ThreadStart, |
| 4145 | Self::ThreadResume(_) => ClientRequestMethod::ThreadResume, |
| 4146 | Self::ThreadFork(_) => ClientRequestMethod::ThreadFork, |
| 4147 | Self::ThreadArchive(_) => ClientRequestMethod::ThreadArchive, |
| 4148 | Self::ThreadDelete(_) => ClientRequestMethod::ThreadDelete, |
| 4149 | Self::ThreadUnsubscribe(_) => ClientRequestMethod::ThreadUnsubscribe, |
| 4150 | Self::ThreadSetName(_) => ClientRequestMethod::ThreadSetName, |
| 4151 | Self::ThreadGoalSet(_) => ClientRequestMethod::ThreadGoalSet, |
| 4152 | Self::ThreadGoalGet(_) => ClientRequestMethod::ThreadGoalGet, |
| 4153 | Self::ThreadGoalClear(_) => ClientRequestMethod::ThreadGoalClear, |
| 4154 | Self::ThreadUnarchive(_) => ClientRequestMethod::ThreadUnarchive, |
| 4155 | Self::ThreadCompactStart(_) => ClientRequestMethod::ThreadCompactStart, |
| 4156 | Self::ThreadShellCommand(_) => ClientRequestMethod::ThreadShellCommand, |
| 4157 | Self::ThreadRevert(_) => ClientRequestMethod::ThreadRevert, |
| 4158 | Self::ThreadList(_) => ClientRequestMethod::ThreadList, |
| 4159 | Self::ThreadLoadedList(_) => ClientRequestMethod::ThreadLoadedList, |
| 4160 | Self::ThreadRead(_) => ClientRequestMethod::ThreadRead, |
| 4161 | Self::ThreadTurnsList(_) => ClientRequestMethod::ThreadTurnsList, |
| 4162 | Self::ThreadItemsList(_) => ClientRequestMethod::ThreadItemsList, |
| 4163 | Self::SkillsList(_) => ClientRequestMethod::SkillsList, |
| 4164 | Self::HooksList(_) => ClientRequestMethod::HooksList, |
| 4165 | Self::FsReadFile(_) => ClientRequestMethod::FsReadFile, |
| 4166 | Self::FsWriteFile(_) => ClientRequestMethod::FsWriteFile, |
| 4167 | Self::FsCreateDirectory(_) => ClientRequestMethod::FsCreateDirectory, |
| 4168 | Self::FsGetMetadata(_) => ClientRequestMethod::FsGetMetadata, |
| 4169 | Self::FsReadDirectory(_) => ClientRequestMethod::FsReadDirectory, |
| 4170 | Self::FsRemove(_) => ClientRequestMethod::FsRemove, |
| 4171 | Self::FsCopy(_) => ClientRequestMethod::FsCopy, |
| 4172 | Self::FsWatch(_) => ClientRequestMethod::FsWatch, |
| 4173 | Self::FsUnwatch(_) => ClientRequestMethod::FsUnwatch, |
| 4174 | Self::TurnStart(_) => ClientRequestMethod::TurnStart, |
| 4175 | Self::TurnSteer(_) => ClientRequestMethod::TurnSteer, |
| 4176 | Self::TurnInterrupt(_) => ClientRequestMethod::TurnInterrupt, |
| 4177 | Self::ReviewStart(_) => ClientRequestMethod::ReviewStart, |
| 4178 | Self::ModelList(_) => ClientRequestMethod::ModelList, |
| 4179 | Self::McpServerStatusList(_) => ClientRequestMethod::McpServerStatusList, |
| 4180 | Self::OneOffCommandExec(_) => ClientRequestMethod::OneOffCommandExec, |
| 4181 | Self::CommandExecWrite(_) => ClientRequestMethod::CommandExecWrite, |
| 4182 | Self::CommandExecTerminate(_) => ClientRequestMethod::CommandExecTerminate, |
| 4183 | Self::CommandExecResize(_) => ClientRequestMethod::CommandExecResize, |
| 4184 | Self::ConfigRead(_) => ClientRequestMethod::ConfigRead, |
| 4185 | Self::ConfigValueWrite(_) => ClientRequestMethod::ConfigValueWrite, |
| 4186 | Self::ConfigBatchWrite(_) => ClientRequestMethod::ConfigBatchWrite, |
| 4187 | } |
| 4188 | } |
| 4189 | } |
| 4190 | |
| 4191 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 4192 | #[serde(tag = "method", content = "params")] |
| 4193 | pub enum ClientNotification { |
| 4194 | #[serde(rename = "initialized")] |
| 4195 | Initialized, |
| 4196 | } |
| 4197 | |
| 4198 | impl ClientNotification { |
| 4199 | pub fn method(&self) -> ClientNotificationMethod { |
| 4200 | match self { |
| 4201 | Self::Initialized => ClientNotificationMethod::Initialized, |
| 4202 | } |
| 4203 | } |
| 4204 | } |
| 4205 | |
| 4206 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 4207 | #[serde(tag = "method", content = "params")] |
| 4208 | pub enum ServerRequestParams { |
| 4209 | #[serde(rename = "item/commandExecution/requestApproval")] |
| 4210 | CommandExecutionRequestApproval(CommandExecutionRequestApprovalParams), |
| 4211 | #[serde(rename = "item/fileChange/requestApproval")] |
| 4212 | FileChangeRequestApproval(FileChangeRequestApprovalParams), |
| 4213 | #[serde(rename = "item/tool/requestUserInput")] |
| 4214 | ToolRequestUserInput(ToolRequestUserInputParams), |
| 4215 | #[serde(rename = "item/permissions/requestApproval")] |
| 4216 | PermissionsRequestApproval(PermissionsRequestApprovalParams), |
| 4217 | #[serde(rename = "item/tool/call")] |
| 4218 | DynamicToolCall(DynamicToolCallParams), |
| 4219 | } |
| 4220 | |
| 4221 | impl ServerRequestParams { |
| 4222 | pub fn method(&self) -> ServerRequestMethod { |
| 4223 | match self { |
| 4224 | Self::CommandExecutionRequestApproval(_) => ServerRequestMethod::CommandExecutionRequestApproval, |
| 4225 | Self::FileChangeRequestApproval(_) => ServerRequestMethod::FileChangeRequestApproval, |
| 4226 | Self::ToolRequestUserInput(_) => ServerRequestMethod::ToolRequestUserInput, |
| 4227 | Self::PermissionsRequestApproval(_) => ServerRequestMethod::PermissionsRequestApproval, |
| 4228 | Self::DynamicToolCall(_) => ServerRequestMethod::DynamicToolCall, |
| 4229 | } |
| 4230 | } |
| 4231 | } |
| 4232 | |
| 4233 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 4234 | #[serde(tag = "method", content = "params")] |
| 4235 | pub enum ServerNotification { |
| 4236 | #[serde(rename = "error")] |
| 4237 | Error(ErrorNotification), |
| 4238 | #[serde(rename = "thread/started")] |
| 4239 | ThreadStarted(ThreadStartedNotification), |
| 4240 | #[serde(rename = "thread/status/changed")] |
| 4241 | ThreadStatusChanged(ThreadStatusChangedNotification), |
| 4242 | #[serde(rename = "thread/archived")] |
| 4243 | ThreadArchived(ThreadArchivedNotification), |
| 4244 | #[serde(rename = "thread/deleted")] |
| 4245 | ThreadDeleted(ThreadDeletedNotification), |
| 4246 | #[serde(rename = "thread/unarchived")] |
| 4247 | ThreadUnarchived(ThreadUnarchivedNotification), |
| 4248 | #[serde(rename = "thread/closed")] |
| 4249 | ThreadClosed(ThreadClosedNotification), |
| 4250 | #[serde(rename = "thread/reverted")] |
| 4251 | ThreadReverted(ThreadRevertedNotification), |
| 4252 | #[serde(rename = "skills/changed")] |
| 4253 | SkillsChanged(SkillsChangedNotification), |
| 4254 | #[serde(rename = "thread/name/updated")] |
| 4255 | ThreadNameUpdated(ThreadNameUpdatedNotification), |
| 4256 | #[serde(rename = "thread/goal/updated")] |
| 4257 | ThreadGoalUpdated(ThreadGoalUpdatedNotification), |
| 4258 | #[serde(rename = "thread/goal/cleared")] |
| 4259 | ThreadGoalCleared(ThreadGoalClearedNotification), |
| 4260 | #[serde(rename = "thread/tokenUsage/updated")] |
| 4261 | ThreadTokenUsageUpdated(ThreadTokenUsageUpdatedNotification), |
| 4262 | #[serde(rename = "turn/started")] |
| 4263 | TurnStarted(TurnStartedNotification), |
| 4264 | #[serde(rename = "turn/completed")] |
| 4265 | TurnCompleted(TurnCompletedNotification), |
| 4266 | #[serde(rename = "turn/diff/updated")] |
| 4267 | TurnDiffUpdated(TurnDiffUpdatedNotification), |
| 4268 | #[serde(rename = "turn/plan/updated")] |
| 4269 | TurnPlanUpdated(TurnPlanUpdatedNotification), |
| 4270 | #[serde(rename = "item/started")] |
| 4271 | ItemStarted(ItemStartedNotification), |
| 4272 | #[serde(rename = "item/completed")] |
| 4273 | ItemCompleted(ItemCompletedNotification), |
| 4274 | #[serde(rename = "item/agentMessage/delta")] |
| 4275 | AgentMessageDelta(AgentMessageDeltaNotification), |
| 4276 | #[serde(rename = "item/plan/delta")] |
| 4277 | PlanDelta(PlanDeltaNotification), |
| 4278 | #[serde(rename = "command/exec/outputDelta")] |
| 4279 | CommandExecOutputDelta(CommandExecOutputDeltaNotification), |
| 4280 | #[serde(rename = "item/commandExecution/outputDelta")] |
| 4281 | CommandExecutionOutputDelta(CommandExecutionOutputDeltaNotification), |
| 4282 | #[serde(rename = "item/commandExecution/terminalInteraction")] |
| 4283 | TerminalInteraction(TerminalInteractionNotification), |
| 4284 | #[serde(rename = "item/fileChange/outputDelta")] |
| 4285 | FileChangeOutputDelta(FileChangeOutputDeltaNotification), |
| 4286 | #[serde(rename = "item/fileChange/patchUpdated")] |
| 4287 | FileChangePatchUpdated(FileChangePatchUpdatedNotification), |
| 4288 | #[serde(rename = "serverRequest/resolved")] |
| 4289 | ServerRequestResolved(ServerRequestResolvedNotification), |
| 4290 | #[serde(rename = "item/mcpToolCall/progress")] |
| 4291 | McpToolCallProgress(McpToolCallProgressNotification), |
| 4292 | #[serde(rename = "fs/changed")] |
| 4293 | FsChanged(FsChangedNotification), |
| 4294 | #[serde(rename = "item/reasoning/summaryTextDelta")] |
| 4295 | ReasoningSummaryTextDelta(ReasoningSummaryTextDeltaNotification), |
| 4296 | #[serde(rename = "item/reasoning/summaryPartAdded")] |
| 4297 | ReasoningSummaryPartAdded(ReasoningSummaryPartAddedNotification), |
| 4298 | #[serde(rename = "item/reasoning/textDelta")] |
| 4299 | ReasoningTextDelta(ReasoningTextDeltaNotification), |
| 4300 | #[serde(rename = "thread/compacted")] |
| 4301 | ContextCompacted(ContextCompactedNotification), |
| 4302 | } |
| 4303 | |
| 4304 | impl ServerNotification { |
| 4305 | pub fn method(&self) -> ServerNotificationMethod { |
| 4306 | match self { |
| 4307 | Self::Error(_) => ServerNotificationMethod::Error, |
| 4308 | Self::ThreadStarted(_) => ServerNotificationMethod::ThreadStarted, |
| 4309 | Self::ThreadStatusChanged(_) => ServerNotificationMethod::ThreadStatusChanged, |
| 4310 | Self::ThreadArchived(_) => ServerNotificationMethod::ThreadArchived, |
| 4311 | Self::ThreadDeleted(_) => ServerNotificationMethod::ThreadDeleted, |
| 4312 | Self::ThreadUnarchived(_) => ServerNotificationMethod::ThreadUnarchived, |
| 4313 | Self::ThreadClosed(_) => ServerNotificationMethod::ThreadClosed, |
| 4314 | Self::ThreadReverted(_) => ServerNotificationMethod::ThreadReverted, |
| 4315 | Self::SkillsChanged(_) => ServerNotificationMethod::SkillsChanged, |
| 4316 | Self::ThreadNameUpdated(_) => ServerNotificationMethod::ThreadNameUpdated, |
| 4317 | Self::ThreadGoalUpdated(_) => ServerNotificationMethod::ThreadGoalUpdated, |
| 4318 | Self::ThreadGoalCleared(_) => ServerNotificationMethod::ThreadGoalCleared, |
| 4319 | Self::ThreadTokenUsageUpdated(_) => ServerNotificationMethod::ThreadTokenUsageUpdated, |
| 4320 | Self::TurnStarted(_) => ServerNotificationMethod::TurnStarted, |
| 4321 | Self::TurnCompleted(_) => ServerNotificationMethod::TurnCompleted, |
| 4322 | Self::TurnDiffUpdated(_) => ServerNotificationMethod::TurnDiffUpdated, |
| 4323 | Self::TurnPlanUpdated(_) => ServerNotificationMethod::TurnPlanUpdated, |
| 4324 | Self::ItemStarted(_) => ServerNotificationMethod::ItemStarted, |
| 4325 | Self::ItemCompleted(_) => ServerNotificationMethod::ItemCompleted, |
| 4326 | Self::AgentMessageDelta(_) => ServerNotificationMethod::AgentMessageDelta, |
| 4327 | Self::PlanDelta(_) => ServerNotificationMethod::PlanDelta, |
| 4328 | Self::CommandExecOutputDelta(_) => ServerNotificationMethod::CommandExecOutputDelta, |
| 4329 | Self::CommandExecutionOutputDelta(_) => ServerNotificationMethod::CommandExecutionOutputDelta, |
| 4330 | Self::TerminalInteraction(_) => ServerNotificationMethod::TerminalInteraction, |
| 4331 | Self::FileChangeOutputDelta(_) => ServerNotificationMethod::FileChangeOutputDelta, |
| 4332 | Self::FileChangePatchUpdated(_) => ServerNotificationMethod::FileChangePatchUpdated, |
| 4333 | Self::ServerRequestResolved(_) => ServerNotificationMethod::ServerRequestResolved, |
| 4334 | Self::McpToolCallProgress(_) => ServerNotificationMethod::McpToolCallProgress, |
| 4335 | Self::FsChanged(_) => ServerNotificationMethod::FsChanged, |
| 4336 | Self::ReasoningSummaryTextDelta(_) => ServerNotificationMethod::ReasoningSummaryTextDelta, |
| 4337 | Self::ReasoningSummaryPartAdded(_) => ServerNotificationMethod::ReasoningSummaryPartAdded, |
| 4338 | Self::ReasoningTextDelta(_) => ServerNotificationMethod::ReasoningTextDelta, |
| 4339 | Self::ContextCompacted(_) => ServerNotificationMethod::ContextCompacted, |
| 4340 | } |
| 4341 | } |
| 4342 | } |
| 4343 | |
| 4344 | #[derive(Debug, Clone, PartialEq, Eq, Serialize)] |
| 4345 | #[serde(untagged)] |
| 4346 | pub enum ClientResponse { |
| 4347 | Initialize(InitializeResponse), |
| 4348 | ThreadStart(ThreadStartResponse), |
| 4349 | ThreadResume(ThreadResumeResponse), |
| 4350 | ThreadFork(ThreadForkResponse), |
| 4351 | ThreadArchive(ThreadArchiveResponse), |
| 4352 | ThreadDelete(ThreadDeleteResponse), |
| 4353 | ThreadUnsubscribe(ThreadUnsubscribeResponse), |
| 4354 | ThreadSetName(ThreadSetNameResponse), |
| 4355 | ThreadGoalSet(ThreadGoalSetResponse), |
| 4356 | ThreadGoalGet(ThreadGoalGetResponse), |
| 4357 | ThreadGoalClear(ThreadGoalClearResponse), |
| 4358 | ThreadUnarchive(ThreadUnarchiveResponse), |
| 4359 | ThreadCompactStart(ThreadCompactStartResponse), |
| 4360 | ThreadShellCommand(ThreadShellCommandResponse), |
| 4361 | ThreadRevert(ThreadRevertResponse), |
| 4362 | ThreadList(ThreadListResponse), |
| 4363 | ThreadLoadedList(ThreadLoadedListResponse), |
| 4364 | ThreadRead(ThreadReadResponse), |
| 4365 | ThreadTurnsList(ThreadTurnsListResponse), |
| 4366 | ThreadItemsList(ThreadItemsListResponse), |
| 4367 | SkillsList(SkillsListResponse), |
| 4368 | HooksList(HooksListResponse), |
| 4369 | FsReadFile(FsReadFileResponse), |
| 4370 | FsWriteFile(FsWriteFileResponse), |
| 4371 | FsCreateDirectory(FsCreateDirectoryResponse), |
| 4372 | FsGetMetadata(FsGetMetadataResponse), |
| 4373 | FsReadDirectory(FsReadDirectoryResponse), |
| 4374 | FsRemove(FsRemoveResponse), |
| 4375 | FsCopy(FsCopyResponse), |
| 4376 | FsWatch(FsWatchResponse), |
| 4377 | FsUnwatch(FsUnwatchResponse), |
| 4378 | TurnStart(TurnStartResponse), |
| 4379 | TurnSteer(TurnSteerResponse), |
| 4380 | TurnInterrupt(TurnInterruptResponse), |
| 4381 | ReviewStart(ReviewStartResponse), |
| 4382 | ModelList(ModelListResponse), |
| 4383 | McpServerStatusList(ListMcpServerStatusResponse), |
| 4384 | OneOffCommandExec(CommandExecResponse), |
| 4385 | CommandExecWrite(CommandExecWriteResponse), |
| 4386 | CommandExecTerminate(CommandExecTerminateResponse), |
| 4387 | CommandExecResize(CommandExecResizeResponse), |
| 4388 | ConfigRead(ConfigReadResponse), |
| 4389 | ConfigValueWrite(ConfigWriteResponse), |
| 4390 | ConfigBatchWrite(ConfigWriteResponse), |
| 4391 | } |
| 4392 | |
| 4393 | impl ClientResponse { |
| 4394 | pub fn method(&self) -> ClientRequestMethod { |
| 4395 | match self { |
| 4396 | Self::Initialize(_) => ClientRequestMethod::Initialize, |
| 4397 | Self::ThreadStart(_) => ClientRequestMethod::ThreadStart, |
| 4398 | Self::ThreadResume(_) => ClientRequestMethod::ThreadResume, |
| 4399 | Self::ThreadFork(_) => ClientRequestMethod::ThreadFork, |
| 4400 | Self::ThreadArchive(_) => ClientRequestMethod::ThreadArchive, |
| 4401 | Self::ThreadDelete(_) => ClientRequestMethod::ThreadDelete, |
| 4402 | Self::ThreadUnsubscribe(_) => ClientRequestMethod::ThreadUnsubscribe, |
| 4403 | Self::ThreadSetName(_) => ClientRequestMethod::ThreadSetName, |
| 4404 | Self::ThreadGoalSet(_) => ClientRequestMethod::ThreadGoalSet, |
| 4405 | Self::ThreadGoalGet(_) => ClientRequestMethod::ThreadGoalGet, |
| 4406 | Self::ThreadGoalClear(_) => ClientRequestMethod::ThreadGoalClear, |
| 4407 | Self::ThreadUnarchive(_) => ClientRequestMethod::ThreadUnarchive, |
| 4408 | Self::ThreadCompactStart(_) => ClientRequestMethod::ThreadCompactStart, |
| 4409 | Self::ThreadShellCommand(_) => ClientRequestMethod::ThreadShellCommand, |
| 4410 | Self::ThreadRevert(_) => ClientRequestMethod::ThreadRevert, |
| 4411 | Self::ThreadList(_) => ClientRequestMethod::ThreadList, |
| 4412 | Self::ThreadLoadedList(_) => ClientRequestMethod::ThreadLoadedList, |
| 4413 | Self::ThreadRead(_) => ClientRequestMethod::ThreadRead, |
| 4414 | Self::ThreadTurnsList(_) => ClientRequestMethod::ThreadTurnsList, |
| 4415 | Self::ThreadItemsList(_) => ClientRequestMethod::ThreadItemsList, |
| 4416 | Self::SkillsList(_) => ClientRequestMethod::SkillsList, |
| 4417 | Self::HooksList(_) => ClientRequestMethod::HooksList, |
| 4418 | Self::FsReadFile(_) => ClientRequestMethod::FsReadFile, |
| 4419 | Self::FsWriteFile(_) => ClientRequestMethod::FsWriteFile, |
| 4420 | Self::FsCreateDirectory(_) => ClientRequestMethod::FsCreateDirectory, |
| 4421 | Self::FsGetMetadata(_) => ClientRequestMethod::FsGetMetadata, |
| 4422 | Self::FsReadDirectory(_) => ClientRequestMethod::FsReadDirectory, |
| 4423 | Self::FsRemove(_) => ClientRequestMethod::FsRemove, |
| 4424 | Self::FsCopy(_) => ClientRequestMethod::FsCopy, |
| 4425 | Self::FsWatch(_) => ClientRequestMethod::FsWatch, |
| 4426 | Self::FsUnwatch(_) => ClientRequestMethod::FsUnwatch, |
| 4427 | Self::TurnStart(_) => ClientRequestMethod::TurnStart, |
| 4428 | Self::TurnSteer(_) => ClientRequestMethod::TurnSteer, |
| 4429 | Self::TurnInterrupt(_) => ClientRequestMethod::TurnInterrupt, |
| 4430 | Self::ReviewStart(_) => ClientRequestMethod::ReviewStart, |
| 4431 | Self::ModelList(_) => ClientRequestMethod::ModelList, |
| 4432 | Self::McpServerStatusList(_) => ClientRequestMethod::McpServerStatusList, |
| 4433 | Self::OneOffCommandExec(_) => ClientRequestMethod::OneOffCommandExec, |
| 4434 | Self::CommandExecWrite(_) => ClientRequestMethod::CommandExecWrite, |
| 4435 | Self::CommandExecTerminate(_) => ClientRequestMethod::CommandExecTerminate, |
| 4436 | Self::CommandExecResize(_) => ClientRequestMethod::CommandExecResize, |
| 4437 | Self::ConfigRead(_) => ClientRequestMethod::ConfigRead, |
| 4438 | Self::ConfigValueWrite(_) => ClientRequestMethod::ConfigValueWrite, |
| 4439 | Self::ConfigBatchWrite(_) => ClientRequestMethod::ConfigBatchWrite, |
| 4440 | } |
| 4441 | } |
| 4442 | |
| 4443 | pub fn decode(method: ClientRequestMethod, result: Value) -> Result<Self, serde_json::Error> { |
| 4444 | Ok(match method { |
| 4445 | ClientRequestMethod::Initialize => Self::Initialize(serde_json::from_value(result)?), |
| 4446 | ClientRequestMethod::ThreadStart => Self::ThreadStart(serde_json::from_value(result)?), |
| 4447 | ClientRequestMethod::ThreadResume => Self::ThreadResume(serde_json::from_value(result)?), |
| 4448 | ClientRequestMethod::ThreadFork => Self::ThreadFork(serde_json::from_value(result)?), |
| 4449 | ClientRequestMethod::ThreadArchive => Self::ThreadArchive(serde_json::from_value(result)?), |
| 4450 | ClientRequestMethod::ThreadDelete => Self::ThreadDelete(serde_json::from_value(result)?), |
| 4451 | ClientRequestMethod::ThreadUnsubscribe => Self::ThreadUnsubscribe(serde_json::from_value(result)?), |
| 4452 | ClientRequestMethod::ThreadSetName => Self::ThreadSetName(serde_json::from_value(result)?), |
| 4453 | ClientRequestMethod::ThreadGoalSet => Self::ThreadGoalSet(serde_json::from_value(result)?), |
| 4454 | ClientRequestMethod::ThreadGoalGet => Self::ThreadGoalGet(serde_json::from_value(result)?), |
| 4455 | ClientRequestMethod::ThreadGoalClear => Self::ThreadGoalClear(serde_json::from_value(result)?), |
| 4456 | ClientRequestMethod::ThreadUnarchive => Self::ThreadUnarchive(serde_json::from_value(result)?), |
| 4457 | ClientRequestMethod::ThreadCompactStart => Self::ThreadCompactStart(serde_json::from_value(result)?), |
| 4458 | ClientRequestMethod::ThreadShellCommand => Self::ThreadShellCommand(serde_json::from_value(result)?), |
| 4459 | ClientRequestMethod::ThreadRevert => Self::ThreadRevert(serde_json::from_value(result)?), |
| 4460 | ClientRequestMethod::ThreadList => Self::ThreadList(serde_json::from_value(result)?), |
| 4461 | ClientRequestMethod::ThreadLoadedList => Self::ThreadLoadedList(serde_json::from_value(result)?), |
| 4462 | ClientRequestMethod::ThreadRead => Self::ThreadRead(serde_json::from_value(result)?), |
| 4463 | ClientRequestMethod::ThreadTurnsList => Self::ThreadTurnsList(serde_json::from_value(result)?), |
| 4464 | ClientRequestMethod::ThreadItemsList => Self::ThreadItemsList(serde_json::from_value(result)?), |
| 4465 | ClientRequestMethod::SkillsList => Self::SkillsList(serde_json::from_value(result)?), |
| 4466 | ClientRequestMethod::HooksList => Self::HooksList(serde_json::from_value(result)?), |
| 4467 | ClientRequestMethod::FsReadFile => Self::FsReadFile(serde_json::from_value(result)?), |
| 4468 | ClientRequestMethod::FsWriteFile => Self::FsWriteFile(serde_json::from_value(result)?), |
| 4469 | ClientRequestMethod::FsCreateDirectory => Self::FsCreateDirectory(serde_json::from_value(result)?), |
| 4470 | ClientRequestMethod::FsGetMetadata => Self::FsGetMetadata(serde_json::from_value(result)?), |
| 4471 | ClientRequestMethod::FsReadDirectory => Self::FsReadDirectory(serde_json::from_value(result)?), |
| 4472 | ClientRequestMethod::FsRemove => Self::FsRemove(serde_json::from_value(result)?), |
| 4473 | ClientRequestMethod::FsCopy => Self::FsCopy(serde_json::from_value(result)?), |
| 4474 | ClientRequestMethod::FsWatch => Self::FsWatch(serde_json::from_value(result)?), |
| 4475 | ClientRequestMethod::FsUnwatch => Self::FsUnwatch(serde_json::from_value(result)?), |
| 4476 | ClientRequestMethod::TurnStart => Self::TurnStart(serde_json::from_value(result)?), |
| 4477 | ClientRequestMethod::TurnSteer => Self::TurnSteer(serde_json::from_value(result)?), |
| 4478 | ClientRequestMethod::TurnInterrupt => Self::TurnInterrupt(serde_json::from_value(result)?), |
| 4479 | ClientRequestMethod::ReviewStart => Self::ReviewStart(serde_json::from_value(result)?), |
| 4480 | ClientRequestMethod::ModelList => Self::ModelList(serde_json::from_value(result)?), |
| 4481 | ClientRequestMethod::McpServerStatusList => Self::McpServerStatusList(serde_json::from_value(result)?), |
| 4482 | ClientRequestMethod::OneOffCommandExec => Self::OneOffCommandExec(serde_json::from_value(result)?), |
| 4483 | ClientRequestMethod::CommandExecWrite => Self::CommandExecWrite(serde_json::from_value(result)?), |
| 4484 | ClientRequestMethod::CommandExecTerminate => Self::CommandExecTerminate(serde_json::from_value(result)?), |
| 4485 | ClientRequestMethod::CommandExecResize => Self::CommandExecResize(serde_json::from_value(result)?), |
| 4486 | ClientRequestMethod::ConfigRead => Self::ConfigRead(serde_json::from_value(result)?), |
| 4487 | ClientRequestMethod::ConfigValueWrite => Self::ConfigValueWrite(serde_json::from_value(result)?), |
| 4488 | ClientRequestMethod::ConfigBatchWrite => Self::ConfigBatchWrite(serde_json::from_value(result)?), |
| 4489 | }) |
| 4490 | } |
| 4491 | } |
| 4492 | |
| 4493 | #[derive(Debug, Clone, PartialEq, Eq, Serialize)] |
| 4494 | #[serde(untagged)] |
| 4495 | pub enum ServerRequestResponse { |
| 4496 | CommandExecutionRequestApproval(CommandExecutionRequestApprovalResponse), |
| 4497 | FileChangeRequestApproval(FileChangeRequestApprovalResponse), |
| 4498 | ToolRequestUserInput(ToolRequestUserInputResponse), |
| 4499 | PermissionsRequestApproval(PermissionsRequestApprovalResponse), |
| 4500 | DynamicToolCall(DynamicToolCallResponse), |
| 4501 | } |
| 4502 | |
| 4503 | impl ServerRequestResponse { |
| 4504 | pub fn method(&self) -> ServerRequestMethod { |
| 4505 | match self { |
| 4506 | Self::CommandExecutionRequestApproval(_) => ServerRequestMethod::CommandExecutionRequestApproval, |
| 4507 | Self::FileChangeRequestApproval(_) => ServerRequestMethod::FileChangeRequestApproval, |
| 4508 | Self::ToolRequestUserInput(_) => ServerRequestMethod::ToolRequestUserInput, |
| 4509 | Self::PermissionsRequestApproval(_) => ServerRequestMethod::PermissionsRequestApproval, |
| 4510 | Self::DynamicToolCall(_) => ServerRequestMethod::DynamicToolCall, |
| 4511 | } |
| 4512 | } |
| 4513 | |
| 4514 | pub fn decode(method: ServerRequestMethod, result: Value) -> Result<Self, serde_json::Error> { |
| 4515 | Ok(match method { |
| 4516 | ServerRequestMethod::CommandExecutionRequestApproval => Self::CommandExecutionRequestApproval(serde_json::from_value(result)?), |
| 4517 | ServerRequestMethod::FileChangeRequestApproval => Self::FileChangeRequestApproval(serde_json::from_value(result)?), |
| 4518 | ServerRequestMethod::ToolRequestUserInput => Self::ToolRequestUserInput(serde_json::from_value(result)?), |
| 4519 | ServerRequestMethod::PermissionsRequestApproval => Self::PermissionsRequestApproval(serde_json::from_value(result)?), |
| 4520 | ServerRequestMethod::DynamicToolCall => Self::DynamicToolCall(serde_json::from_value(result)?), |
| 4521 | }) |
| 4522 | } |
| 4523 | } |
| 4524 | |
| 4525 | pub const TYPE_NAMES: &[&str] = &[ |
| 4526 | "AbsolutePathBuf", |
| 4527 | "AdditionalFileSystemPermissions", |
| 4528 | "AdditionalNetworkPermissions", |
| 4529 | "AgentMessageDelivery", |
| 4530 | "AgentMessageDeltaNotification", |
| 4531 | "AgentPath", |
| 4532 | "AllowDenyRequirement", |
| 4533 | "AnalyticsConfig", |
| 4534 | "ApprovalsReviewer", |
| 4535 | "AskForApproval", |
| 4536 | "AsyncUserInputQuestion", |
| 4537 | "AutoCompactTokenLimitScope", |
| 4538 | "BrowserUseConfig", |
| 4539 | "BrowserUseOriginPolicyConfig", |
| 4540 | "ByteRange", |
| 4541 | "CapabilityRefusal", |
| 4542 | "CapabilityRefusalCode", |
| 4543 | "CapabilityRefusalData", |
| 4544 | "ClientInfo", |
| 4545 | "CodexErrorInfo", |
| 4546 | "CodexErrorInfoVariant0", |
| 4547 | "CodexErrorInfoVariant1", |
| 4548 | "CodexErrorInfoVariant1HttpConnectionFailed", |
| 4549 | "CodexErrorInfoVariant2", |
| 4550 | "CodexErrorInfoVariant2ResponseStreamConnectionFailed", |
| 4551 | "CodexErrorInfoVariant3", |
| 4552 | "CodexErrorInfoVariant3ResponseStreamDisconnected", |
| 4553 | "CodexErrorInfoVariant4", |
| 4554 | "CodexErrorInfoVariant4ResponseTooManyFailedAttempts", |
| 4555 | "CodexErrorInfoVariant5", |
| 4556 | "CodexErrorInfoVariant5ActiveTurnNotSteerable", |
| 4557 | "CollabAgentState", |
| 4558 | "CollabAgentStatus", |
| 4559 | "CollabAgentTool", |
| 4560 | "CollabAgentToolCallStatus", |
| 4561 | "CollaborationMode", |
| 4562 | "CommandAction", |
| 4563 | "CommandExecOutputDeltaNotification", |
| 4564 | "CommandExecOutputStream", |
| 4565 | "CommandExecParams", |
| 4566 | "CommandExecResizeParams", |
| 4567 | "CommandExecResizeResponse", |
| 4568 | "CommandExecResponse", |
| 4569 | "CommandExecTerminalSize", |
| 4570 | "CommandExecTerminateParams", |
| 4571 | "CommandExecTerminateResponse", |
| 4572 | "CommandExecWriteParams", |
| 4573 | "CommandExecWriteResponse", |
| 4574 | "CommandExecutionApprovalDecision", |
| 4575 | "CommandExecutionApprovalKind", |
| 4576 | "CommandExecutionOutputDeltaNotification", |
| 4577 | "CommandExecutionRequestApprovalParams", |
| 4578 | "CommandExecutionRequestApprovalResponse", |
| 4579 | "CommandExecutionSource", |
| 4580 | "CommandExecutionStatus", |
| 4581 | "ComputerUseConfig", |
| 4582 | "ComputerUseMacosConfig", |
| 4583 | "ComputerUseWindowsConfig", |
| 4584 | "ComputerUseWindowsExeConfig", |
| 4585 | "Config", |
| 4586 | "ConfigBatchWriteParams", |
| 4587 | "ConfigEdit", |
| 4588 | "ConfigLayer", |
| 4589 | "ConfigLayerMetadata", |
| 4590 | "ConfigLayerSource", |
| 4591 | "ConfigReadParams", |
| 4592 | "ConfigReadResponse", |
| 4593 | "ConfigValueWriteParams", |
| 4594 | "ConfigWriteResponse", |
| 4595 | "ContextCompactedNotification", |
| 4596 | "CyberAccessProgram", |
| 4597 | "DynamicToolCallOutputContentItem", |
| 4598 | "DynamicToolCallParams", |
| 4599 | "DynamicToolCallResponse", |
| 4600 | "DynamicToolCallStatus", |
| 4601 | "ErrorNotification", |
| 4602 | "FileChangeApprovalDecision", |
| 4603 | "FileChangeOutputDeltaNotification", |
| 4604 | "FileChangePatchUpdatedNotification", |
| 4605 | "FileChangeRequestApprovalParams", |
| 4606 | "FileChangeRequestApprovalResponse", |
| 4607 | "FileSystemAccessMode", |
| 4608 | "FileSystemPath", |
| 4609 | "FileSystemSandboxEntry", |
| 4610 | "FileSystemSpecialPath", |
| 4611 | "FileUpdateChange", |
| 4612 | "ForcedChatgptWorkspaceIds", |
| 4613 | "ForcedLoginMethod", |
| 4614 | "FsChangedNotification", |
| 4615 | "FsCopyParams", |
| 4616 | "FsCopyResponse", |
| 4617 | "FsCreateDirectoryParams", |
| 4618 | "FsCreateDirectoryResponse", |
| 4619 | "FsGetMetadataParams", |
| 4620 | "FsGetMetadataResponse", |
| 4621 | "FsReadDirectoryEntry", |
| 4622 | "FsReadDirectoryParams", |
| 4623 | "FsReadDirectoryResponse", |
| 4624 | "FsReadFileParams", |
| 4625 | "FsReadFileResponse", |
| 4626 | "FsRemoveParams", |
| 4627 | "FsRemoveResponse", |
| 4628 | "FsUnwatchParams", |
| 4629 | "FsUnwatchResponse", |
| 4630 | "FsWatchParams", |
| 4631 | "FsWatchResponse", |
| 4632 | "FsWriteFileParams", |
| 4633 | "FsWriteFileResponse", |
| 4634 | "FunctionCallOutputBody", |
| 4635 | "FunctionCallOutputContentItem", |
| 4636 | "FunctionCallOutputContentItemInputImageKind", |
| 4637 | "GitInfo", |
| 4638 | "GrantedPermissionProfile", |
| 4639 | "HookErrorInfo", |
| 4640 | "HookEventName", |
| 4641 | "HookMetadata", |
| 4642 | "HookMetadataKind", |
| 4643 | "HookPromptFragment", |
| 4644 | "HookSource", |
| 4645 | "HookTrustStatus", |
| 4646 | "HooksListEntry", |
| 4647 | "HooksListParams", |
| 4648 | "HooksListResponse", |
| 4649 | "ImageDetail", |
| 4650 | "ImageGenerationFailure", |
| 4651 | "ImageGenerationInputImage", |
| 4652 | "InitializeCapabilities", |
| 4653 | "InitializeParams", |
| 4654 | "InitializeResponse", |
| 4655 | "InputModality", |
| 4656 | "ItemCompletedNotification", |
| 4657 | "ItemStartedNotification", |
| 4658 | "LegacyAppPathString", |
| 4659 | "ListMcpServerStatusParams", |
| 4660 | "ListMcpServerStatusResponse", |
| 4661 | "McpAppDisplayMode", |
| 4662 | "McpAppUi", |
| 4663 | "McpAuthStatus", |
| 4664 | "McpServerConnectionStatus", |
| 4665 | "McpServerInfo", |
| 4666 | "McpServerStatus", |
| 4667 | "McpServerStatusDetail", |
| 4668 | "McpToolCallAppContext", |
| 4669 | "McpToolCallError", |
| 4670 | "McpToolCallProgressNotification", |
| 4671 | "McpToolCallResult", |
| 4672 | "McpToolCallStatus", |
| 4673 | "MemoryCitation", |
| 4674 | "MemoryCitationEntry", |
| 4675 | "MergeStrategy", |
| 4676 | "MessagePhase", |
| 4677 | "MisalignmentErrorDetails", |
| 4678 | "MisalignmentSteer", |
| 4679 | "ModeKind", |
| 4680 | "Model", |
| 4681 | "ModelAccessPrograms", |
| 4682 | "ModelAvailabilityNux", |
| 4683 | "ModelListParams", |
| 4684 | "ModelListResponse", |
| 4685 | "ModelServiceTier", |
| 4686 | "ModelUpgradeInfo", |
| 4687 | "MultiAgentVersion", |
| 4688 | "NetworkAccess", |
| 4689 | "NetworkApprovalContext", |
| 4690 | "NetworkApprovalProtocol", |
| 4691 | "NetworkPolicyAmendment", |
| 4692 | "NetworkPolicyRuleAction", |
| 4693 | "NonSteerableTurnKind", |
| 4694 | "OverriddenMetadata", |
| 4695 | "PatchApplyStatus", |
| 4696 | "PatchChangeKind", |
| 4697 | "PermissionGrantScope", |
| 4698 | "PermissionsRequestApprovalParams", |
| 4699 | "PermissionsRequestApprovalResponse", |
| 4700 | "Personality", |
| 4701 | "PlanDeltaNotification", |
| 4702 | "ReasoningEffort", |
| 4703 | "ReasoningEffortOption", |
| 4704 | "ReasoningSummary", |
| 4705 | "ReasoningSummaryPartAddedNotification", |
| 4706 | "ReasoningSummaryTextDeltaNotification", |
| 4707 | "ReasoningTextDeltaNotification", |
| 4708 | "RequestId", |
| 4709 | "RequestPermissionProfile", |
| 4710 | "Resource", |
| 4711 | "ResourceTemplate", |
| 4712 | "ReviewDelivery", |
| 4713 | "ReviewStartParams", |
| 4714 | "ReviewStartResponse", |
| 4715 | "ReviewTarget", |
| 4716 | "SandboxMode", |
| 4717 | "SandboxPolicy", |
| 4718 | "SandboxWorkspaceWrite", |
| 4719 | "ServerRequestResolvedNotification", |
| 4720 | "SessionSource", |
| 4721 | "Settings", |
| 4722 | "SkillDependencies", |
| 4723 | "SkillErrorInfo", |
| 4724 | "SkillInterface", |
| 4725 | "SkillMetadata", |
| 4726 | "SkillScope", |
| 4727 | "SkillToolDependency", |
| 4728 | "SkillsChangedNotification", |
| 4729 | "SkillsListEntry", |
| 4730 | "SkillsListParams", |
| 4731 | "SkillsListResponse", |
| 4732 | "SortDirection", |
| 4733 | "SubAgentActivityKind", |
| 4734 | "SubAgentSource", |
| 4735 | "TerminalInteractionNotification", |
| 4736 | "TextElement", |
| 4737 | "Thread", |
| 4738 | "ThreadActiveFlag", |
| 4739 | "ThreadArchiveParams", |
| 4740 | "ThreadArchiveResponse", |
| 4741 | "ThreadArchivedNotification", |
| 4742 | "ThreadClosedNotification", |
| 4743 | "ThreadCompactStartParams", |
| 4744 | "ThreadCompactStartResponse", |
| 4745 | "ThreadDeleteParams", |
| 4746 | "ThreadDeleteResponse", |
| 4747 | "ThreadDeletedNotification", |
| 4748 | "ThreadExecutor", |
| 4749 | "ThreadForkParams", |
| 4750 | "ThreadForkResponse", |
| 4751 | "ThreadGoal", |
| 4752 | "ThreadGoalClearParams", |
| 4753 | "ThreadGoalClearResponse", |
| 4754 | "ThreadGoalClearedNotification", |
| 4755 | "ThreadGoalGetParams", |
| 4756 | "ThreadGoalGetResponse", |
| 4757 | "ThreadGoalMutationOrigin", |
| 4758 | "ThreadGoalSetParams", |
| 4759 | "ThreadGoalSetResponse", |
| 4760 | "ThreadGoalStatus", |
| 4761 | "ThreadGoalUpdatedNotification", |
| 4762 | "ThreadHistoryMode", |
| 4763 | "ThreadId", |
| 4764 | "ThreadItem", |
| 4765 | "ThreadItemEntry", |
| 4766 | "ThreadItemKind", |
| 4767 | "ThreadItemKindImageGenerationKind", |
| 4768 | "ThreadItemsListAnchor", |
| 4769 | "ThreadItemsListCursor", |
| 4770 | "ThreadItemsListParams", |
| 4771 | "ThreadItemsListResponse", |
| 4772 | "ThreadListCwdFilter", |
| 4773 | "ThreadListParams", |
| 4774 | "ThreadListResponse", |
| 4775 | "ThreadLoadedListParams", |
| 4776 | "ThreadLoadedListResponse", |
| 4777 | "ThreadNameUpdatedNotification", |
| 4778 | "ThreadPlacement", |
| 4779 | "ThreadReadParams", |
| 4780 | "ThreadReadResponse", |
| 4781 | "ThreadResumeParams", |
| 4782 | "ThreadResumeResponse", |
| 4783 | "ThreadRevertParams", |
| 4784 | "ThreadRevertResponse", |
| 4785 | "ThreadRevertedNotification", |
| 4786 | "ThreadSection", |
| 4787 | "ThreadSectionAppearance", |
| 4788 | "ThreadSetNameParams", |
| 4789 | "ThreadSetNameResponse", |
| 4790 | "ThreadShellCommandParams", |
| 4791 | "ThreadShellCommandResponse", |
| 4792 | "ThreadSortKey", |
| 4793 | "ThreadSource", |
| 4794 | "ThreadSourceKind", |
| 4795 | "ThreadStartParams", |
| 4796 | "ThreadStartResponse", |
| 4797 | "ThreadStartSource", |
| 4798 | "ThreadStartedNotification", |
| 4799 | "ThreadStatus", |
| 4800 | "ThreadStatusChangedNotification", |
| 4801 | "ThreadTokenUsage", |
| 4802 | "ThreadTokenUsageUpdatedNotification", |
| 4803 | "ThreadTurnsListParams", |
| 4804 | "ThreadTurnsListResponse", |
| 4805 | "ThreadUnarchiveParams", |
| 4806 | "ThreadUnarchiveResponse", |
| 4807 | "ThreadUnarchivedNotification", |
| 4808 | "ThreadUnsubscribeParams", |
| 4809 | "ThreadUnsubscribeResponse", |
| 4810 | "ThreadUnsubscribeStatus", |
| 4811 | "TokenUsageBreakdown", |
| 4812 | "Tool", |
| 4813 | "ToolRequestUserInputAnswer", |
| 4814 | "ToolRequestUserInputOption", |
| 4815 | "ToolRequestUserInputParams", |
| 4816 | "ToolRequestUserInputQuestion", |
| 4817 | "ToolRequestUserInputResponse", |
| 4818 | "ToolsV2", |
| 4819 | "Turn", |
| 4820 | "TurnCompletedNotification", |
| 4821 | "TurnDiffUpdatedNotification", |
| 4822 | "TurnError", |
| 4823 | "TurnInterruptParams", |
| 4824 | "TurnInterruptResponse", |
| 4825 | "TurnItemsView", |
| 4826 | "TurnPlanStep", |
| 4827 | "TurnPlanStepStatus", |
| 4828 | "TurnPlanUpdatedNotification", |
| 4829 | "TurnStartParams", |
| 4830 | "TurnStartResponse", |
| 4831 | "TurnStartedNotification", |
| 4832 | "TurnStatus", |
| 4833 | "TurnSteerParams", |
| 4834 | "TurnSteerResponse", |
| 4835 | "TurnToolOutput", |
| 4836 | "UserInput", |
| 4837 | "UserInputImageKind", |
| 4838 | "Verbosity", |
| 4839 | "WebSearchAction", |
| 4840 | "WebSearchContextSize", |
| 4841 | "WebSearchLocation", |
| 4842 | "WebSearchMode", |
| 4843 | "WebSearchToolConfig", |
| 4844 | "WriteStatus", |
| 4845 | ]; |
| 4846 | |
| 4847 | pub fn round_trip(type_name: &str, value: Value) -> Option<Result<Value, serde_json::Error>> { |
| 4848 | fn again<T: serde::de::DeserializeOwned + Serialize>(value: Value) -> Result<Value, serde_json::Error> { |
| 4849 | serde_json::to_value(serde_json::from_value::<T>(value)?) |
| 4850 | } |
| 4851 | Some(match type_name { |
| 4852 | "AbsolutePathBuf" => again::<AbsolutePathBuf>(value), |
| 4853 | "AdditionalFileSystemPermissions" => again::<AdditionalFileSystemPermissions>(value), |
| 4854 | "AdditionalNetworkPermissions" => again::<AdditionalNetworkPermissions>(value), |
| 4855 | "AgentMessageDelivery" => again::<AgentMessageDelivery>(value), |
| 4856 | "AgentMessageDeltaNotification" => again::<AgentMessageDeltaNotification>(value), |
| 4857 | "AgentPath" => again::<AgentPath>(value), |
| 4858 | "AllowDenyRequirement" => again::<AllowDenyRequirement>(value), |
| 4859 | "AnalyticsConfig" => again::<AnalyticsConfig>(value), |
| 4860 | "ApprovalsReviewer" => again::<ApprovalsReviewer>(value), |
| 4861 | "AskForApproval" => again::<AskForApproval>(value), |
| 4862 | "AsyncUserInputQuestion" => again::<AsyncUserInputQuestion>(value), |
| 4863 | "AutoCompactTokenLimitScope" => again::<AutoCompactTokenLimitScope>(value), |
| 4864 | "BrowserUseConfig" => again::<BrowserUseConfig>(value), |
| 4865 | "BrowserUseOriginPolicyConfig" => again::<BrowserUseOriginPolicyConfig>(value), |
| 4866 | "ByteRange" => again::<ByteRange>(value), |
| 4867 | "CapabilityRefusal" => again::<CapabilityRefusal>(value), |
| 4868 | "CapabilityRefusalCode" => again::<CapabilityRefusalCode>(value), |
| 4869 | "CapabilityRefusalData" => again::<CapabilityRefusalData>(value), |
| 4870 | "ClientInfo" => again::<ClientInfo>(value), |
| 4871 | "CodexErrorInfo" => again::<CodexErrorInfo>(value), |
| 4872 | "CodexErrorInfoVariant0" => again::<CodexErrorInfoVariant0>(value), |
| 4873 | "CodexErrorInfoVariant1" => again::<CodexErrorInfoVariant1>(value), |
| 4874 | "CodexErrorInfoVariant1HttpConnectionFailed" => again::<CodexErrorInfoVariant1HttpConnectionFailed>(value), |
| 4875 | "CodexErrorInfoVariant2" => again::<CodexErrorInfoVariant2>(value), |
| 4876 | "CodexErrorInfoVariant2ResponseStreamConnectionFailed" => again::<CodexErrorInfoVariant2ResponseStreamConnectionFailed>(value), |
| 4877 | "CodexErrorInfoVariant3" => again::<CodexErrorInfoVariant3>(value), |
| 4878 | "CodexErrorInfoVariant3ResponseStreamDisconnected" => again::<CodexErrorInfoVariant3ResponseStreamDisconnected>(value), |
| 4879 | "CodexErrorInfoVariant4" => again::<CodexErrorInfoVariant4>(value), |
| 4880 | "CodexErrorInfoVariant4ResponseTooManyFailedAttempts" => again::<CodexErrorInfoVariant4ResponseTooManyFailedAttempts>(value), |
| 4881 | "CodexErrorInfoVariant5" => again::<CodexErrorInfoVariant5>(value), |
| 4882 | "CodexErrorInfoVariant5ActiveTurnNotSteerable" => again::<CodexErrorInfoVariant5ActiveTurnNotSteerable>(value), |
| 4883 | "CollabAgentState" => again::<CollabAgentState>(value), |
| 4884 | "CollabAgentStatus" => again::<CollabAgentStatus>(value), |
| 4885 | "CollabAgentTool" => again::<CollabAgentTool>(value), |
| 4886 | "CollabAgentToolCallStatus" => again::<CollabAgentToolCallStatus>(value), |
| 4887 | "CollaborationMode" => again::<CollaborationMode>(value), |
| 4888 | "CommandAction" => again::<CommandAction>(value), |
| 4889 | "CommandExecOutputDeltaNotification" => again::<CommandExecOutputDeltaNotification>(value), |
| 4890 | "CommandExecOutputStream" => again::<CommandExecOutputStream>(value), |
| 4891 | "CommandExecParams" => again::<CommandExecParams>(value), |
| 4892 | "CommandExecResizeParams" => again::<CommandExecResizeParams>(value), |
| 4893 | "CommandExecResizeResponse" => again::<CommandExecResizeResponse>(value), |
| 4894 | "CommandExecResponse" => again::<CommandExecResponse>(value), |
| 4895 | "CommandExecTerminalSize" => again::<CommandExecTerminalSize>(value), |
| 4896 | "CommandExecTerminateParams" => again::<CommandExecTerminateParams>(value), |
| 4897 | "CommandExecTerminateResponse" => again::<CommandExecTerminateResponse>(value), |
| 4898 | "CommandExecWriteParams" => again::<CommandExecWriteParams>(value), |
| 4899 | "CommandExecWriteResponse" => again::<CommandExecWriteResponse>(value), |
| 4900 | "CommandExecutionApprovalDecision" => again::<CommandExecutionApprovalDecision>(value), |
| 4901 | "CommandExecutionApprovalKind" => again::<CommandExecutionApprovalKind>(value), |
| 4902 | "CommandExecutionOutputDeltaNotification" => again::<CommandExecutionOutputDeltaNotification>(value), |
| 4903 | "CommandExecutionRequestApprovalParams" => again::<CommandExecutionRequestApprovalParams>(value), |
| 4904 | "CommandExecutionRequestApprovalResponse" => again::<CommandExecutionRequestApprovalResponse>(value), |
| 4905 | "CommandExecutionSource" => again::<CommandExecutionSource>(value), |
| 4906 | "CommandExecutionStatus" => again::<CommandExecutionStatus>(value), |
| 4907 | "ComputerUseConfig" => again::<ComputerUseConfig>(value), |
| 4908 | "ComputerUseMacosConfig" => again::<ComputerUseMacosConfig>(value), |
| 4909 | "ComputerUseWindowsConfig" => again::<ComputerUseWindowsConfig>(value), |
| 4910 | "ComputerUseWindowsExeConfig" => again::<ComputerUseWindowsExeConfig>(value), |
| 4911 | "Config" => again::<Config>(value), |
| 4912 | "ConfigBatchWriteParams" => again::<ConfigBatchWriteParams>(value), |
| 4913 | "ConfigEdit" => again::<ConfigEdit>(value), |
| 4914 | "ConfigLayer" => again::<ConfigLayer>(value), |
| 4915 | "ConfigLayerMetadata" => again::<ConfigLayerMetadata>(value), |
| 4916 | "ConfigLayerSource" => again::<ConfigLayerSource>(value), |
| 4917 | "ConfigReadParams" => again::<ConfigReadParams>(value), |
| 4918 | "ConfigReadResponse" => again::<ConfigReadResponse>(value), |
| 4919 | "ConfigValueWriteParams" => again::<ConfigValueWriteParams>(value), |
| 4920 | "ConfigWriteResponse" => again::<ConfigWriteResponse>(value), |
| 4921 | "ContextCompactedNotification" => again::<ContextCompactedNotification>(value), |
| 4922 | "CyberAccessProgram" => again::<CyberAccessProgram>(value), |
| 4923 | "DynamicToolCallOutputContentItem" => again::<DynamicToolCallOutputContentItem>(value), |
| 4924 | "DynamicToolCallParams" => again::<DynamicToolCallParams>(value), |
| 4925 | "DynamicToolCallResponse" => again::<DynamicToolCallResponse>(value), |
| 4926 | "DynamicToolCallStatus" => again::<DynamicToolCallStatus>(value), |
| 4927 | "ErrorNotification" => again::<ErrorNotification>(value), |
| 4928 | "FileChangeApprovalDecision" => again::<FileChangeApprovalDecision>(value), |
| 4929 | "FileChangeOutputDeltaNotification" => again::<FileChangeOutputDeltaNotification>(value), |
| 4930 | "FileChangePatchUpdatedNotification" => again::<FileChangePatchUpdatedNotification>(value), |
| 4931 | "FileChangeRequestApprovalParams" => again::<FileChangeRequestApprovalParams>(value), |
| 4932 | "FileChangeRequestApprovalResponse" => again::<FileChangeRequestApprovalResponse>(value), |
| 4933 | "FileSystemAccessMode" => again::<FileSystemAccessMode>(value), |
| 4934 | "FileSystemPath" => again::<FileSystemPath>(value), |
| 4935 | "FileSystemSandboxEntry" => again::<FileSystemSandboxEntry>(value), |
| 4936 | "FileSystemSpecialPath" => again::<FileSystemSpecialPath>(value), |
| 4937 | "FileUpdateChange" => again::<FileUpdateChange>(value), |
| 4938 | "ForcedChatgptWorkspaceIds" => again::<ForcedChatgptWorkspaceIds>(value), |
| 4939 | "ForcedLoginMethod" => again::<ForcedLoginMethod>(value), |
| 4940 | "FsChangedNotification" => again::<FsChangedNotification>(value), |
| 4941 | "FsCopyParams" => again::<FsCopyParams>(value), |
| 4942 | "FsCopyResponse" => again::<FsCopyResponse>(value), |
| 4943 | "FsCreateDirectoryParams" => again::<FsCreateDirectoryParams>(value), |
| 4944 | "FsCreateDirectoryResponse" => again::<FsCreateDirectoryResponse>(value), |
| 4945 | "FsGetMetadataParams" => again::<FsGetMetadataParams>(value), |
| 4946 | "FsGetMetadataResponse" => again::<FsGetMetadataResponse>(value), |
| 4947 | "FsReadDirectoryEntry" => again::<FsReadDirectoryEntry>(value), |
| 4948 | "FsReadDirectoryParams" => again::<FsReadDirectoryParams>(value), |
| 4949 | "FsReadDirectoryResponse" => again::<FsReadDirectoryResponse>(value), |
| 4950 | "FsReadFileParams" => again::<FsReadFileParams>(value), |
| 4951 | "FsReadFileResponse" => again::<FsReadFileResponse>(value), |
| 4952 | "FsRemoveParams" => again::<FsRemoveParams>(value), |
| 4953 | "FsRemoveResponse" => again::<FsRemoveResponse>(value), |
| 4954 | "FsUnwatchParams" => again::<FsUnwatchParams>(value), |
| 4955 | "FsUnwatchResponse" => again::<FsUnwatchResponse>(value), |
| 4956 | "FsWatchParams" => again::<FsWatchParams>(value), |
| 4957 | "FsWatchResponse" => again::<FsWatchResponse>(value), |
| 4958 | "FsWriteFileParams" => again::<FsWriteFileParams>(value), |
| 4959 | "FsWriteFileResponse" => again::<FsWriteFileResponse>(value), |
| 4960 | "FunctionCallOutputBody" => again::<FunctionCallOutputBody>(value), |
| 4961 | "FunctionCallOutputContentItem" => again::<FunctionCallOutputContentItem>(value), |
| 4962 | "FunctionCallOutputContentItemInputImageKind" => again::<FunctionCallOutputContentItemInputImageKind>(value), |
| 4963 | "GitInfo" => again::<GitInfo>(value), |
| 4964 | "GrantedPermissionProfile" => again::<GrantedPermissionProfile>(value), |
| 4965 | "HookErrorInfo" => again::<HookErrorInfo>(value), |
| 4966 | "HookEventName" => again::<HookEventName>(value), |
| 4967 | "HookMetadata" => again::<HookMetadata>(value), |
| 4968 | "HookMetadataKind" => again::<HookMetadataKind>(value), |
| 4969 | "HookPromptFragment" => again::<HookPromptFragment>(value), |
| 4970 | "HookSource" => again::<HookSource>(value), |
| 4971 | "HookTrustStatus" => again::<HookTrustStatus>(value), |
| 4972 | "HooksListEntry" => again::<HooksListEntry>(value), |
| 4973 | "HooksListParams" => again::<HooksListParams>(value), |
| 4974 | "HooksListResponse" => again::<HooksListResponse>(value), |
| 4975 | "ImageDetail" => again::<ImageDetail>(value), |
| 4976 | "ImageGenerationFailure" => again::<ImageGenerationFailure>(value), |
| 4977 | "ImageGenerationInputImage" => again::<ImageGenerationInputImage>(value), |
| 4978 | "InitializeCapabilities" => again::<InitializeCapabilities>(value), |
| 4979 | "InitializeParams" => again::<InitializeParams>(value), |
| 4980 | "InitializeResponse" => again::<InitializeResponse>(value), |
| 4981 | "InputModality" => again::<InputModality>(value), |
| 4982 | "ItemCompletedNotification" => again::<ItemCompletedNotification>(value), |
| 4983 | "ItemStartedNotification" => again::<ItemStartedNotification>(value), |
| 4984 | "LegacyAppPathString" => again::<LegacyAppPathString>(value), |
| 4985 | "ListMcpServerStatusParams" => again::<ListMcpServerStatusParams>(value), |
| 4986 | "ListMcpServerStatusResponse" => again::<ListMcpServerStatusResponse>(value), |
| 4987 | "McpAppDisplayMode" => again::<McpAppDisplayMode>(value), |
| 4988 | "McpAppUi" => again::<McpAppUi>(value), |
| 4989 | "McpAuthStatus" => again::<McpAuthStatus>(value), |
| 4990 | "McpServerConnectionStatus" => again::<McpServerConnectionStatus>(value), |
| 4991 | "McpServerInfo" => again::<McpServerInfo>(value), |
| 4992 | "McpServerStatus" => again::<McpServerStatus>(value), |
| 4993 | "McpServerStatusDetail" => again::<McpServerStatusDetail>(value), |
| 4994 | "McpToolCallAppContext" => again::<McpToolCallAppContext>(value), |
| 4995 | "McpToolCallError" => again::<McpToolCallError>(value), |
| 4996 | "McpToolCallProgressNotification" => again::<McpToolCallProgressNotification>(value), |
| 4997 | "McpToolCallResult" => again::<McpToolCallResult>(value), |
| 4998 | "McpToolCallStatus" => again::<McpToolCallStatus>(value), |
| 4999 | "MemoryCitation" => again::<MemoryCitation>(value), |
| 5000 | "MemoryCitationEntry" => again::<MemoryCitationEntry>(value), |
| 5001 | "MergeStrategy" => again::<MergeStrategy>(value), |
| 5002 | "MessagePhase" => again::<MessagePhase>(value), |
| 5003 | "MisalignmentErrorDetails" => again::<MisalignmentErrorDetails>(value), |
| 5004 | "MisalignmentSteer" => again::<MisalignmentSteer>(value), |
| 5005 | "ModeKind" => again::<ModeKind>(value), |
| 5006 | "Model" => again::<Model>(value), |
| 5007 | "ModelAccessPrograms" => again::<ModelAccessPrograms>(value), |
| 5008 | "ModelAvailabilityNux" => again::<ModelAvailabilityNux>(value), |
| 5009 | "ModelListParams" => again::<ModelListParams>(value), |
| 5010 | "ModelListResponse" => again::<ModelListResponse>(value), |
| 5011 | "ModelServiceTier" => again::<ModelServiceTier>(value), |
| 5012 | "ModelUpgradeInfo" => again::<ModelUpgradeInfo>(value), |
| 5013 | "MultiAgentVersion" => again::<MultiAgentVersion>(value), |
| 5014 | "NetworkAccess" => again::<NetworkAccess>(value), |
| 5015 | "NetworkApprovalContext" => again::<NetworkApprovalContext>(value), |
| 5016 | "NetworkApprovalProtocol" => again::<NetworkApprovalProtocol>(value), |
| 5017 | "NetworkPolicyAmendment" => again::<NetworkPolicyAmendment>(value), |
| 5018 | "NetworkPolicyRuleAction" => again::<NetworkPolicyRuleAction>(value), |
| 5019 | "NonSteerableTurnKind" => again::<NonSteerableTurnKind>(value), |
| 5020 | "OverriddenMetadata" => again::<OverriddenMetadata>(value), |
| 5021 | "PatchApplyStatus" => again::<PatchApplyStatus>(value), |
| 5022 | "PatchChangeKind" => again::<PatchChangeKind>(value), |
| 5023 | "PermissionGrantScope" => again::<PermissionGrantScope>(value), |
| 5024 | "PermissionsRequestApprovalParams" => again::<PermissionsRequestApprovalParams>(value), |
| 5025 | "PermissionsRequestApprovalResponse" => again::<PermissionsRequestApprovalResponse>(value), |
| 5026 | "Personality" => again::<Personality>(value), |
| 5027 | "PlanDeltaNotification" => again::<PlanDeltaNotification>(value), |
| 5028 | "ReasoningEffort" => again::<ReasoningEffort>(value), |
| 5029 | "ReasoningEffortOption" => again::<ReasoningEffortOption>(value), |
| 5030 | "ReasoningSummary" => again::<ReasoningSummary>(value), |
| 5031 | "ReasoningSummaryPartAddedNotification" => again::<ReasoningSummaryPartAddedNotification>(value), |
| 5032 | "ReasoningSummaryTextDeltaNotification" => again::<ReasoningSummaryTextDeltaNotification>(value), |
| 5033 | "ReasoningTextDeltaNotification" => again::<ReasoningTextDeltaNotification>(value), |
| 5034 | "RequestId" => again::<RequestId>(value), |
| 5035 | "RequestPermissionProfile" => again::<RequestPermissionProfile>(value), |
| 5036 | "Resource" => again::<Resource>(value), |
| 5037 | "ResourceTemplate" => again::<ResourceTemplate>(value), |
| 5038 | "ReviewDelivery" => again::<ReviewDelivery>(value), |
| 5039 | "ReviewStartParams" => again::<ReviewStartParams>(value), |
| 5040 | "ReviewStartResponse" => again::<ReviewStartResponse>(value), |
| 5041 | "ReviewTarget" => again::<ReviewTarget>(value), |
| 5042 | "SandboxMode" => again::<SandboxMode>(value), |
| 5043 | "SandboxPolicy" => again::<SandboxPolicy>(value), |
| 5044 | "SandboxWorkspaceWrite" => again::<SandboxWorkspaceWrite>(value), |
| 5045 | "ServerRequestResolvedNotification" => again::<ServerRequestResolvedNotification>(value), |
| 5046 | "SessionSource" => again::<SessionSource>(value), |
| 5047 | "Settings" => again::<Settings>(value), |
| 5048 | "SkillDependencies" => again::<SkillDependencies>(value), |
| 5049 | "SkillErrorInfo" => again::<SkillErrorInfo>(value), |
| 5050 | "SkillInterface" => again::<SkillInterface>(value), |
| 5051 | "SkillMetadata" => again::<SkillMetadata>(value), |
| 5052 | "SkillScope" => again::<SkillScope>(value), |
| 5053 | "SkillToolDependency" => again::<SkillToolDependency>(value), |
| 5054 | "SkillsChangedNotification" => again::<SkillsChangedNotification>(value), |
| 5055 | "SkillsListEntry" => again::<SkillsListEntry>(value), |
| 5056 | "SkillsListParams" => again::<SkillsListParams>(value), |
| 5057 | "SkillsListResponse" => again::<SkillsListResponse>(value), |
| 5058 | "SortDirection" => again::<SortDirection>(value), |
| 5059 | "SubAgentActivityKind" => again::<SubAgentActivityKind>(value), |
| 5060 | "SubAgentSource" => again::<SubAgentSource>(value), |
| 5061 | "TerminalInteractionNotification" => again::<TerminalInteractionNotification>(value), |
| 5062 | "TextElement" => again::<TextElement>(value), |
| 5063 | "Thread" => again::<Thread>(value), |
| 5064 | "ThreadActiveFlag" => again::<ThreadActiveFlag>(value), |
| 5065 | "ThreadArchiveParams" => again::<ThreadArchiveParams>(value), |
| 5066 | "ThreadArchiveResponse" => again::<ThreadArchiveResponse>(value), |
| 5067 | "ThreadArchivedNotification" => again::<ThreadArchivedNotification>(value), |
| 5068 | "ThreadClosedNotification" => again::<ThreadClosedNotification>(value), |
| 5069 | "ThreadCompactStartParams" => again::<ThreadCompactStartParams>(value), |
| 5070 | "ThreadCompactStartResponse" => again::<ThreadCompactStartResponse>(value), |
| 5071 | "ThreadDeleteParams" => again::<ThreadDeleteParams>(value), |
| 5072 | "ThreadDeleteResponse" => again::<ThreadDeleteResponse>(value), |
| 5073 | "ThreadDeletedNotification" => again::<ThreadDeletedNotification>(value), |
| 5074 | "ThreadExecutor" => again::<ThreadExecutor>(value), |
| 5075 | "ThreadForkParams" => again::<ThreadForkParams>(value), |
| 5076 | "ThreadForkResponse" => again::<ThreadForkResponse>(value), |
| 5077 | "ThreadGoal" => again::<ThreadGoal>(value), |
| 5078 | "ThreadGoalClearParams" => again::<ThreadGoalClearParams>(value), |
| 5079 | "ThreadGoalClearResponse" => again::<ThreadGoalClearResponse>(value), |
| 5080 | "ThreadGoalClearedNotification" => again::<ThreadGoalClearedNotification>(value), |
| 5081 | "ThreadGoalGetParams" => again::<ThreadGoalGetParams>(value), |
| 5082 | "ThreadGoalGetResponse" => again::<ThreadGoalGetResponse>(value), |
| 5083 | "ThreadGoalMutationOrigin" => again::<ThreadGoalMutationOrigin>(value), |
| 5084 | "ThreadGoalSetParams" => again::<ThreadGoalSetParams>(value), |
| 5085 | "ThreadGoalSetResponse" => again::<ThreadGoalSetResponse>(value), |
| 5086 | "ThreadGoalStatus" => again::<ThreadGoalStatus>(value), |
| 5087 | "ThreadGoalUpdatedNotification" => again::<ThreadGoalUpdatedNotification>(value), |
| 5088 | "ThreadHistoryMode" => again::<ThreadHistoryMode>(value), |
| 5089 | "ThreadId" => again::<ThreadId>(value), |
| 5090 | "ThreadItem" => again::<ThreadItem>(value), |
| 5091 | "ThreadItemEntry" => again::<ThreadItemEntry>(value), |
| 5092 | "ThreadItemKind" => again::<ThreadItemKind>(value), |
| 5093 | "ThreadItemKindImageGenerationKind" => again::<ThreadItemKindImageGenerationKind>(value), |
| 5094 | "ThreadItemsListAnchor" => again::<ThreadItemsListAnchor>(value), |
| 5095 | "ThreadItemsListCursor" => again::<ThreadItemsListCursor>(value), |
| 5096 | "ThreadItemsListParams" => again::<ThreadItemsListParams>(value), |
| 5097 | "ThreadItemsListResponse" => again::<ThreadItemsListResponse>(value), |
| 5098 | "ThreadListCwdFilter" => again::<ThreadListCwdFilter>(value), |
| 5099 | "ThreadListParams" => again::<ThreadListParams>(value), |
| 5100 | "ThreadListResponse" => again::<ThreadListResponse>(value), |
| 5101 | "ThreadLoadedListParams" => again::<ThreadLoadedListParams>(value), |
| 5102 | "ThreadLoadedListResponse" => again::<ThreadLoadedListResponse>(value), |
| 5103 | "ThreadNameUpdatedNotification" => again::<ThreadNameUpdatedNotification>(value), |
| 5104 | "ThreadPlacement" => again::<ThreadPlacement>(value), |
| 5105 | "ThreadReadParams" => again::<ThreadReadParams>(value), |
| 5106 | "ThreadReadResponse" => again::<ThreadReadResponse>(value), |
| 5107 | "ThreadResumeParams" => again::<ThreadResumeParams>(value), |
| 5108 | "ThreadResumeResponse" => again::<ThreadResumeResponse>(value), |
| 5109 | "ThreadRevertParams" => again::<ThreadRevertParams>(value), |
| 5110 | "ThreadRevertResponse" => again::<ThreadRevertResponse>(value), |
| 5111 | "ThreadRevertedNotification" => again::<ThreadRevertedNotification>(value), |
| 5112 | "ThreadSection" => again::<ThreadSection>(value), |
| 5113 | "ThreadSectionAppearance" => again::<ThreadSectionAppearance>(value), |
| 5114 | "ThreadSetNameParams" => again::<ThreadSetNameParams>(value), |
| 5115 | "ThreadSetNameResponse" => again::<ThreadSetNameResponse>(value), |
| 5116 | "ThreadShellCommandParams" => again::<ThreadShellCommandParams>(value), |
| 5117 | "ThreadShellCommandResponse" => again::<ThreadShellCommandResponse>(value), |
| 5118 | "ThreadSortKey" => again::<ThreadSortKey>(value), |
| 5119 | "ThreadSource" => again::<ThreadSource>(value), |
| 5120 | "ThreadSourceKind" => again::<ThreadSourceKind>(value), |
| 5121 | "ThreadStartParams" => again::<ThreadStartParams>(value), |
| 5122 | "ThreadStartResponse" => again::<ThreadStartResponse>(value), |
| 5123 | "ThreadStartSource" => again::<ThreadStartSource>(value), |
| 5124 | "ThreadStartedNotification" => again::<ThreadStartedNotification>(value), |
| 5125 | "ThreadStatus" => again::<ThreadStatus>(value), |
| 5126 | "ThreadStatusChangedNotification" => again::<ThreadStatusChangedNotification>(value), |
| 5127 | "ThreadTokenUsage" => again::<ThreadTokenUsage>(value), |
| 5128 | "ThreadTokenUsageUpdatedNotification" => again::<ThreadTokenUsageUpdatedNotification>(value), |
| 5129 | "ThreadTurnsListParams" => again::<ThreadTurnsListParams>(value), |
| 5130 | "ThreadTurnsListResponse" => again::<ThreadTurnsListResponse>(value), |
| 5131 | "ThreadUnarchiveParams" => again::<ThreadUnarchiveParams>(value), |
| 5132 | "ThreadUnarchiveResponse" => again::<ThreadUnarchiveResponse>(value), |
| 5133 | "ThreadUnarchivedNotification" => again::<ThreadUnarchivedNotification>(value), |
| 5134 | "ThreadUnsubscribeParams" => again::<ThreadUnsubscribeParams>(value), |
| 5135 | "ThreadUnsubscribeResponse" => again::<ThreadUnsubscribeResponse>(value), |
| 5136 | "ThreadUnsubscribeStatus" => again::<ThreadUnsubscribeStatus>(value), |
| 5137 | "TokenUsageBreakdown" => again::<TokenUsageBreakdown>(value), |
| 5138 | "Tool" => again::<Tool>(value), |
| 5139 | "ToolRequestUserInputAnswer" => again::<ToolRequestUserInputAnswer>(value), |
| 5140 | "ToolRequestUserInputOption" => again::<ToolRequestUserInputOption>(value), |
| 5141 | "ToolRequestUserInputParams" => again::<ToolRequestUserInputParams>(value), |
| 5142 | "ToolRequestUserInputQuestion" => again::<ToolRequestUserInputQuestion>(value), |
| 5143 | "ToolRequestUserInputResponse" => again::<ToolRequestUserInputResponse>(value), |
| 5144 | "ToolsV2" => again::<ToolsV2>(value), |
| 5145 | "Turn" => again::<Turn>(value), |
| 5146 | "TurnCompletedNotification" => again::<TurnCompletedNotification>(value), |
| 5147 | "TurnDiffUpdatedNotification" => again::<TurnDiffUpdatedNotification>(value), |
| 5148 | "TurnError" => again::<TurnError>(value), |
| 5149 | "TurnInterruptParams" => again::<TurnInterruptParams>(value), |
| 5150 | "TurnInterruptResponse" => again::<TurnInterruptResponse>(value), |
| 5151 | "TurnItemsView" => again::<TurnItemsView>(value), |
| 5152 | "TurnPlanStep" => again::<TurnPlanStep>(value), |
| 5153 | "TurnPlanStepStatus" => again::<TurnPlanStepStatus>(value), |
| 5154 | "TurnPlanUpdatedNotification" => again::<TurnPlanUpdatedNotification>(value), |
| 5155 | "TurnStartParams" => again::<TurnStartParams>(value), |
| 5156 | "TurnStartResponse" => again::<TurnStartResponse>(value), |
| 5157 | "TurnStartedNotification" => again::<TurnStartedNotification>(value), |
| 5158 | "TurnStatus" => again::<TurnStatus>(value), |
| 5159 | "TurnSteerParams" => again::<TurnSteerParams>(value), |
| 5160 | "TurnSteerResponse" => again::<TurnSteerResponse>(value), |
| 5161 | "TurnToolOutput" => again::<TurnToolOutput>(value), |
| 5162 | "UserInput" => again::<UserInput>(value), |
| 5163 | "UserInputImageKind" => again::<UserInputImageKind>(value), |
| 5164 | "Verbosity" => again::<Verbosity>(value), |
| 5165 | "WebSearchAction" => again::<WebSearchAction>(value), |
| 5166 | "WebSearchContextSize" => again::<WebSearchContextSize>(value), |
| 5167 | "WebSearchLocation" => again::<WebSearchLocation>(value), |
| 5168 | "WebSearchMode" => again::<WebSearchMode>(value), |
| 5169 | "WebSearchToolConfig" => again::<WebSearchToolConfig>(value), |
| 5170 | "WriteStatus" => again::<WriteStatus>(value), |
| 5171 | _ => return None, |
| 5172 | }) |
| 5173 | } |
| 5174 |