1#![allow(unused_imports, clippy::large_enum_variant)]
6
7use std::collections::HashMap;
8
9use serde::{Deserialize, Serialize};
10
11use crate::multipart::FilePart;
12
13#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16pub struct A2AAgentCard {
17 pub name: String,
18 pub description: String,
19 pub url: String,
21 pub agent_id: String,
22 pub version: String,
23 pub schema_version: A2AAgentCardSchemaVersion,
24 pub protocol_version: A2AAgentCardProtocolVersion,
25 pub capabilities: A2AAgentCardCapabilities,
26 pub skills: Vec<A2AAgentCardSkill>,
27 pub authentication: A2AAgentCardAuthentication,
28 pub default_input_modes: Vec<String>,
29 pub default_output_modes: Vec<String>,
30 pub mcp_resources: Vec<String>,
31}
32
33#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
35pub struct A2AAgentCardAuthentication {
36 pub r#type: A2AAgentCardAuthenticationType,
37 #[serde(default, skip_serializing_if = "Option::is_none")]
38 pub header: Option<A2AAgentCardAuthenticationHeader>,
39}
40
41#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
43pub enum A2AAgentCardAuthenticationHeader {
44 #[default]
45 #[serde(rename = "Authorization")]
46 Authorization,
47 #[serde(untagged)]
49 Other(String),
50}
51
52impl A2AAgentCardAuthenticationHeader {
53 pub fn as_str(&self) -> &str {
55 match self {
56 Self::Authorization => "Authorization",
57 Self::Other(value) => value.as_str(),
58 }
59 }
60}
61
62impl std::fmt::Display for A2AAgentCardAuthenticationHeader {
63 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
64 f.write_str(self.as_str())
65 }
66}
67
68impl From<&str> for A2AAgentCardAuthenticationHeader {
69 fn from(value: &str) -> Self {
70 match value {
71 "Authorization" => Self::Authorization,
72 other => Self::Other(other.to_string()),
73 }
74 }
75}
76
77#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
79pub enum A2AAgentCardAuthenticationType {
80 #[default]
81 #[serde(rename = "none")]
82 None,
83 #[serde(rename = "apiKey")]
84 APIKey,
85 #[serde(untagged)]
87 Other(String),
88}
89
90impl A2AAgentCardAuthenticationType {
91 pub fn as_str(&self) -> &str {
93 match self {
94 Self::None => "none",
95 Self::APIKey => "apiKey",
96 Self::Other(value) => value.as_str(),
97 }
98 }
99}
100
101impl std::fmt::Display for A2AAgentCardAuthenticationType {
102 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
103 f.write_str(self.as_str())
104 }
105}
106
107impl From<&str> for A2AAgentCardAuthenticationType {
108 fn from(value: &str) -> Self {
109 match value {
110 "none" => Self::None,
111 "apiKey" => Self::APIKey,
112 other => Self::Other(other.to_string()),
113 }
114 }
115}
116
117#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
119pub struct A2AAgentCardCapabilities {
120 pub streaming: bool,
121 pub push_notifications: bool,
122 pub state_transition_history: bool,
123}
124
125#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
127pub enum A2AAgentCardProtocolVersion {
128 #[default]
129 #[serde(rename = "0.2")]
130 V02,
131 #[serde(rename = "0.3")]
132 V03,
133 #[serde(untagged)]
135 Other(String),
136}
137
138impl A2AAgentCardProtocolVersion {
139 pub fn as_str(&self) -> &str {
141 match self {
142 Self::V02 => "0.2",
143 Self::V03 => "0.3",
144 Self::Other(value) => value.as_str(),
145 }
146 }
147}
148
149impl std::fmt::Display for A2AAgentCardProtocolVersion {
150 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
151 f.write_str(self.as_str())
152 }
153}
154
155impl From<&str> for A2AAgentCardProtocolVersion {
156 fn from(value: &str) -> Self {
157 match value {
158 "0.2" => Self::V02,
159 "0.3" => Self::V03,
160 other => Self::Other(other.to_string()),
161 }
162 }
163}
164
165#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
167pub enum A2AAgentCardSchemaVersion {
168 #[default]
169 #[serde(rename = "1.0")]
170 V10,
171 #[serde(untagged)]
173 Other(String),
174}
175
176impl A2AAgentCardSchemaVersion {
177 pub fn as_str(&self) -> &str {
179 match self {
180 Self::V10 => "1.0",
181 Self::Other(value) => value.as_str(),
182 }
183 }
184}
185
186impl std::fmt::Display for A2AAgentCardSchemaVersion {
187 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
188 f.write_str(self.as_str())
189 }
190}
191
192impl From<&str> for A2AAgentCardSchemaVersion {
193 fn from(value: &str) -> Self {
194 match value {
195 "1.0" => Self::V10,
196 other => Self::Other(other.to_string()),
197 }
198 }
199}
200
201#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
203pub struct A2AAgentCardSkill {
204 pub id: String,
205 pub name: String,
206 pub description: String,
207 pub tags: Vec<String>,
208 pub examples: Vec<String>,
209}
210
211#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
213pub struct A2ajsonRpcRequest {
214 pub jsonrpc: String,
216 pub method: A2ajsonRpcRequestMethod,
217 #[serde(default, skip_serializing_if = "Option::is_none")]
218 pub params: Option<serde_json::Map<String, serde_json::Value>>,
219 #[serde(default, skip_serializing_if = "Option::is_none")]
220 pub id: Option<serde_json::Value>,
221}
222
223#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
225pub enum A2ajsonRpcRequestMethod {
226 #[default]
227 #[serde(rename = "tasks/send")]
228 TasksSend,
229 #[serde(rename = "tasks/sendSubscribe")]
230 TasksSendSubscribe,
231 #[serde(rename = "tasks/get")]
232 TasksGet,
233 #[serde(rename = "tasks/cancel")]
234 TasksCancel,
235 #[serde(rename = "tasks/pushNotification/set")]
236 TasksPushNotificationSet,
237 #[serde(rename = "tasks/pushNotification/get")]
238 TasksPushNotificationGet,
239 #[serde(untagged)]
241 Other(String),
242}
243
244impl A2ajsonRpcRequestMethod {
245 pub fn as_str(&self) -> &str {
247 match self {
248 Self::TasksSend => "tasks/send",
249 Self::TasksSendSubscribe => "tasks/sendSubscribe",
250 Self::TasksGet => "tasks/get",
251 Self::TasksCancel => "tasks/cancel",
252 Self::TasksPushNotificationSet => "tasks/pushNotification/set",
253 Self::TasksPushNotificationGet => "tasks/pushNotification/get",
254 Self::Other(value) => value.as_str(),
255 }
256 }
257}
258
259impl std::fmt::Display for A2ajsonRpcRequestMethod {
260 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
261 f.write_str(self.as_str())
262 }
263}
264
265impl From<&str> for A2ajsonRpcRequestMethod {
266 fn from(value: &str) -> Self {
267 match value {
268 "tasks/send" => Self::TasksSend,
269 "tasks/sendSubscribe" => Self::TasksSendSubscribe,
270 "tasks/get" => Self::TasksGet,
271 "tasks/cancel" => Self::TasksCancel,
272 "tasks/pushNotification/set" => Self::TasksPushNotificationSet,
273 "tasks/pushNotification/get" => Self::TasksPushNotificationGet,
274 other => Self::Other(other.to_string()),
275 }
276 }
277}
278
279#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
282pub struct A2APart {
283 pub r#type: A2APartType,
284 #[serde(default, skip_serializing_if = "Option::is_none")]
285 pub text: Option<String>,
286 #[serde(default, skip_serializing_if = "Option::is_none")]
287 pub file: Option<A2APartFile>,
288 #[serde(default, skip_serializing_if = "Option::is_none")]
289 pub data: Option<serde_json::Map<String, serde_json::Value>>,
290}
291
292#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
294pub struct A2APartFile {
295 pub name: String,
296 pub mime_type: String,
297 #[serde(default, skip_serializing_if = "Option::is_none")]
299 pub data: Option<String>,
300 #[serde(default, skip_serializing_if = "Option::is_none")]
301 pub uri: Option<String>,
302}
303
304#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
306pub enum A2APartType {
307 #[default]
308 #[serde(rename = "text")]
309 Text,
310 #[serde(rename = "file")]
311 File,
312 #[serde(rename = "data")]
313 Data,
314 #[serde(untagged)]
316 Other(String),
317}
318
319impl A2APartType {
320 pub fn as_str(&self) -> &str {
322 match self {
323 Self::Text => "text",
324 Self::File => "file",
325 Self::Data => "data",
326 Self::Other(value) => value.as_str(),
327 }
328 }
329}
330
331impl std::fmt::Display for A2APartType {
332 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
333 f.write_str(self.as_str())
334 }
335}
336
337impl From<&str> for A2APartType {
338 fn from(value: &str) -> Self {
339 match value {
340 "text" => Self::Text,
341 "file" => Self::File,
342 "data" => Self::Data,
343 other => Self::Other(other.to_string()),
344 }
345 }
346}
347
348#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
350pub struct A2ATask {
351 pub id: String,
352 #[serde(default, skip_serializing_if = "Option::is_none")]
353 pub agent_id: Option<String>,
354 #[serde(default, skip_serializing_if = "Option::is_none")]
355 pub session_id: Option<String>,
356 pub status: A2ATaskStatus,
357 pub messages: Vec<A2ATaskMessage>,
358 pub artifacts: Vec<A2ATaskArtifact>,
359 pub metadata: serde_json::Map<String, serde_json::Value>,
360 #[serde(default, skip_serializing_if = "Option::is_none")]
361 pub created_at: Option<String>,
362 #[serde(default, skip_serializing_if = "Option::is_none")]
363 pub updated_at: Option<String>,
364}
365
366#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
368pub struct A2ATaskArtifact {
369 pub name: String,
370 #[serde(default, skip_serializing_if = "Option::is_none")]
371 pub description: Option<String>,
372 pub parts: Vec<A2APart>,
373 pub index: i64,
374}
375
376#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
378pub struct A2ATaskMessage {
379 pub role: DrawingJournalEntryAuthorKind,
380 pub parts: Vec<A2APart>,
381}
382
383#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
385pub enum A2ATaskStatus {
386 #[default]
387 #[serde(rename = "submitted")]
388 Submitted,
389 #[serde(rename = "working")]
390 Working,
391 #[serde(rename = "input-required")]
392 InputRequired,
393 #[serde(rename = "completed")]
394 Completed,
395 #[serde(rename = "canceled")]
396 Canceled,
397 #[serde(rename = "failed")]
398 Failed,
399 #[serde(untagged)]
401 Other(String),
402}
403
404impl A2ATaskStatus {
405 pub fn as_str(&self) -> &str {
407 match self {
408 Self::Submitted => "submitted",
409 Self::Working => "working",
410 Self::InputRequired => "input-required",
411 Self::Completed => "completed",
412 Self::Canceled => "canceled",
413 Self::Failed => "failed",
414 Self::Other(value) => value.as_str(),
415 }
416 }
417}
418
419impl std::fmt::Display for A2ATaskStatus {
420 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
421 f.write_str(self.as_str())
422 }
423}
424
425impl From<&str> for A2ATaskStatus {
426 fn from(value: &str) -> Self {
427 match value {
428 "submitted" => Self::Submitted,
429 "working" => Self::Working,
430 "input-required" => Self::InputRequired,
431 "completed" => Self::Completed,
432 "canceled" => Self::Canceled,
433 "failed" => Self::Failed,
434 other => Self::Other(other.to_string()),
435 }
436 }
437}
438
439#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
442pub struct Aar {
443 pub aar_id: String,
444 pub mission_id: String,
445 pub tenant_id: String,
446 pub created_at: String,
447 pub outcome: MissionOutcome,
448 pub phases: Vec<AarPhaseRecord>,
449 pub objective_outcomes: Vec<AarObjectiveOutcome>,
450 #[serde(default, skip_serializing_if = "Option::is_none")]
451 pub failure_analysis: Option<AarFailureAnalysis>,
452}
453
454#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
456pub struct AarFailureAnalysis {
457 pub failed_objective_ids: Vec<String>,
458 pub root_causes: Vec<AarRootCause>,
459 pub lessons: Vec<AarLesson>,
460}
461
462#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
464pub struct AarLesson {
465 pub pattern: String,
466 pub recommendation: String,
467}
468
469#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
471pub struct AarObjectiveOutcome {
472 pub objective_id: String,
473 pub final_status: String,
475 pub strikes_used: i64,
478 #[serde(default, skip_serializing_if = "Option::is_none")]
480 pub abort_reason: Option<String>,
481 #[serde(default, skip_serializing_if = "Option::is_none")]
482 pub final_agent_id: Option<String>,
483 #[serde(default, skip_serializing_if = "Option::is_none")]
484 pub final_model: Option<String>,
485 #[serde(default, skip_serializing_if = "Option::is_none")]
486 pub duration_ms: Option<i64>,
487 #[serde(default, skip_serializing_if = "Option::is_none")]
488 pub cost_usd: Option<f64>,
489 pub verified: bool,
491}
492
493#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
495pub struct AarPhaseRecord {
496 pub phase: AarPhaseRecordPhase,
497 pub started_at: String,
498 pub completed_at: String,
499 pub duration_ms: i64,
500}
501
502#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
504pub enum AarPhaseRecordPhase {
505 #[default]
506 #[serde(rename = "recon")]
507 Recon,
508 #[serde(rename = "plan")]
509 Plan,
510 #[serde(rename = "authorize")]
511 Authorize,
512 #[serde(rename = "execute")]
513 Execute,
514 #[serde(rename = "verify")]
515 Verify,
516 #[serde(untagged)]
518 Other(String),
519}
520
521impl AarPhaseRecordPhase {
522 pub fn as_str(&self) -> &str {
524 match self {
525 Self::Recon => "recon",
526 Self::Plan => "plan",
527 Self::Authorize => "authorize",
528 Self::Execute => "execute",
529 Self::Verify => "verify",
530 Self::Other(value) => value.as_str(),
531 }
532 }
533}
534
535impl std::fmt::Display for AarPhaseRecordPhase {
536 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
537 f.write_str(self.as_str())
538 }
539}
540
541impl From<&str> for AarPhaseRecordPhase {
542 fn from(value: &str) -> Self {
543 match value {
544 "recon" => Self::Recon,
545 "plan" => Self::Plan,
546 "authorize" => Self::Authorize,
547 "execute" => Self::Execute,
548 "verify" => Self::Verify,
549 other => Self::Other(other.to_string()),
550 }
551 }
552}
553
554#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
556pub struct AarRootCause {
557 pub objective_id: String,
558 pub category: AarRootCauseCategory,
562 pub details: String,
563 #[serde(default, skip_serializing_if = "Option::is_none")]
566 pub code: Option<String>,
567}
568
569#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
573pub enum AarRootCauseCategory {
574 #[default]
575 #[serde(rename = "llm_timeout")]
576 LLMTimeout,
577 #[serde(rename = "llm_idle")]
578 LLMIdle,
579 #[serde(rename = "llm_loop")]
580 LLMLoop,
581 #[serde(rename = "tool_error")]
582 ToolError,
583 #[serde(rename = "tool_truncation")]
584 ToolTruncation,
585 #[serde(rename = "verification_failed")]
586 VerificationFailed,
587 #[serde(rename = "authorization_denied")]
588 AuthorizationDenied,
589 #[serde(rename = "external_error")]
590 ExternalError,
591 #[serde(rename = "max_duration_exceeded")]
592 MaxDurationExceeded,
593 #[serde(rename = "unknown")]
594 Unknown,
595 #[serde(untagged)]
597 Other(String),
598}
599
600impl AarRootCauseCategory {
601 pub fn as_str(&self) -> &str {
603 match self {
604 Self::LLMTimeout => "llm_timeout",
605 Self::LLMIdle => "llm_idle",
606 Self::LLMLoop => "llm_loop",
607 Self::ToolError => "tool_error",
608 Self::ToolTruncation => "tool_truncation",
609 Self::VerificationFailed => "verification_failed",
610 Self::AuthorizationDenied => "authorization_denied",
611 Self::ExternalError => "external_error",
612 Self::MaxDurationExceeded => "max_duration_exceeded",
613 Self::Unknown => "unknown",
614 Self::Other(value) => value.as_str(),
615 }
616 }
617}
618
619impl std::fmt::Display for AarRootCauseCategory {
620 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
621 f.write_str(self.as_str())
622 }
623}
624
625impl From<&str> for AarRootCauseCategory {
626 fn from(value: &str) -> Self {
627 match value {
628 "llm_timeout" => Self::LLMTimeout,
629 "llm_idle" => Self::LLMIdle,
630 "llm_loop" => Self::LLMLoop,
631 "tool_error" => Self::ToolError,
632 "tool_truncation" => Self::ToolTruncation,
633 "verification_failed" => Self::VerificationFailed,
634 "authorization_denied" => Self::AuthorizationDenied,
635 "external_error" => Self::ExternalError,
636 "max_duration_exceeded" => Self::MaxDurationExceeded,
637 "unknown" => Self::Unknown,
638 other => Self::Other(other.to_string()),
639 }
640 }
641}
642
643#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
645pub struct AbortMissionRequest {
646 #[serde(default, skip_serializing_if = "Option::is_none")]
648 pub reason: Option<String>,
649}
650
651#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
653pub struct AcceptInviteFromPickerRequest {
654 #[serde(default, skip_serializing_if = "Option::is_none")]
659 pub token: Option<String>,
660 #[serde(default, skip_serializing_if = "Option::is_none")]
662 pub name: Option<String>,
663}
664
665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
667pub struct AcceptInviteFromPickerResponse {
668 pub accepted: bool,
669 pub tenant_id: String,
670 pub user_id: String,
671 pub role: String,
672}
673
674#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
676pub struct AcceptInviteRequest {
677 #[serde(default, skip_serializing_if = "Option::is_none")]
679 pub name: Option<String>,
680 #[serde(default, skip_serializing_if = "Option::is_none")]
682 pub token: Option<String>,
683}
684
685#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
687pub struct AcceptInviteResponse {
688 pub accepted: bool,
689 pub user_id: String,
690 pub tenant_id: String,
691 pub role: String,
692}
693
694#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
696pub struct AccountExport {
697 pub format: AccountExportFormat,
698 pub exported_at: String,
699 pub counts: AccountExportCounts,
700 pub complete: bool,
703 pub omitted: Vec<String>,
704 pub files: serde_json::Map<String, serde_json::Value>,
707}
708
709#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
711pub struct AccountExportCounts {
712 pub chats: i64,
713 pub projects: i64,
714 pub memories: i64,
715}
716
717#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
719pub enum AccountExportFormat {
720 #[default]
721 #[serde(rename = "snaga.export.v1")]
722 SnagaExportV1,
723 #[serde(untagged)]
725 Other(String),
726}
727
728impl AccountExportFormat {
729 pub fn as_str(&self) -> &str {
731 match self {
732 Self::SnagaExportV1 => "snaga.export.v1",
733 Self::Other(value) => value.as_str(),
734 }
735 }
736}
737
738impl std::fmt::Display for AccountExportFormat {
739 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
740 f.write_str(self.as_str())
741 }
742}
743
744impl From<&str> for AccountExportFormat {
745 fn from(value: &str) -> Self {
746 match value {
747 "snaga.export.v1" => Self::SnagaExportV1,
748 other => Self::Other(other.to_string()),
749 }
750 }
751}
752
753#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
755pub struct ActivateSafeModeRequest {
756 pub reason: String,
757 #[serde(default, skip_serializing_if = "Option::is_none")]
758 pub activated_by: Option<String>,
759 #[serde(default, skip_serializing_if = "Option::is_none")]
760 pub deadline_hours: Option<f64>,
761}
762
763#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
765pub struct ActivateSessionBranchResponse {
766 pub session_id: String,
767 pub active_branch: String,
768}
769
770#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
772pub struct ActiveSession {
773 pub key_id: String,
774 pub name: String,
775 pub prefix: String,
776 pub scopes: Vec<String>,
777 pub status: APIKeySummaryStatus,
778 pub is_current: bool,
779 #[serde(default, skip_serializing_if = "Option::is_none")]
780 pub created_at: Option<String>,
781 #[serde(default, skip_serializing_if = "Option::is_none")]
782 pub expires_at: Option<String>,
783 #[serde(default, skip_serializing_if = "Option::is_none")]
784 pub last_used_at: Option<String>,
785}
786
787#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
789pub struct AddAndroidTestersRequest {
790 pub emails: Vec<String>,
791 #[serde(default, skip_serializing_if = "Option::is_none")]
793 pub source: Option<String>,
794}
795
796#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
798pub struct AddAndroidTestersResponse {
799 pub added: Vec<String>,
800 pub already: Vec<String>,
801 pub invalid: Vec<String>,
802}
803
804#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
806pub struct AddSquadGraphEdgeRequest {
807 pub from: String,
808 pub to: String,
809 pub r#type: TeamGraphEdgeType,
810 #[serde(default, skip_serializing_if = "Option::is_none")]
811 pub task_id: Option<String>,
812}
813
814#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
816pub struct AddSquadGraphNodeRequest {
817 pub agent_id: String,
818 pub role: TeamGraphNodeRole,
819 #[serde(default, skip_serializing_if = "Option::is_none")]
820 pub spawned_by: Option<String>,
821 #[serde(default, skip_serializing_if = "Option::is_none")]
822 pub goal_summary: Option<String>,
823}
824
825#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
827pub struct AddTeamGraphEdgeRequest {
828 pub from: String,
829 pub to: String,
830 pub r#type: TeamGraphEdgeType,
831 #[serde(default, skip_serializing_if = "Option::is_none")]
832 pub task_id: Option<String>,
833}
834
835#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
837pub struct AddTeamGraphNodeRequest {
838 pub agent_id: String,
839 pub role: TeamGraphNodeRole,
840 #[serde(default, skip_serializing_if = "Option::is_none")]
841 pub spawned_by: Option<String>,
842 #[serde(default, skip_serializing_if = "Option::is_none")]
843 pub goal_summary: Option<String>,
844}
845
846#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
848pub struct AdminAnalyticsEventsResponse {
849 pub items: Vec<AdminAnalyticsEventsResponseItem>,
850 pub count: i64,
851}
852
853#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
855pub struct AdminAnalyticsEventsResponseItem {
856 #[serde(default, skip_serializing_if = "Option::is_none")]
857 pub event_id: Option<String>,
858 #[serde(default, skip_serializing_if = "Option::is_none")]
859 pub ts: Option<String>,
860 #[serde(default, skip_serializing_if = "Option::is_none")]
861 pub r#type: Option<String>,
862 #[serde(default, skip_serializing_if = "Option::is_none")]
863 pub visitor_id: Option<String>,
864 #[serde(default, skip_serializing_if = "Option::is_none")]
865 pub tenant_id: Option<String>,
866 #[serde(default, skip_serializing_if = "Option::is_none")]
867 pub country: Option<String>,
868 #[serde(default, skip_serializing_if = "Option::is_none")]
869 pub device_type: Option<AdminAnalyticsEventsResponseItemDeviceType>,
870 #[serde(default, skip_serializing_if = "Option::is_none")]
871 pub browser: Option<String>,
872 #[serde(default, skip_serializing_if = "Option::is_none")]
873 pub os: Option<String>,
874 #[serde(default, skip_serializing_if = "Option::is_none")]
875 pub language: Option<String>,
876 #[serde(default, skip_serializing_if = "Option::is_none")]
877 pub referrer_host: Option<String>,
878 #[serde(default, skip_serializing_if = "Option::is_none")]
879 pub path: Option<String>,
880 #[serde(default, skip_serializing_if = "Option::is_none")]
881 pub utm_source: Option<String>,
882 #[serde(default, skip_serializing_if = "Option::is_none")]
883 pub utm_medium: Option<String>,
884 #[serde(default, skip_serializing_if = "Option::is_none")]
885 pub utm_campaign: Option<String>,
886 #[serde(default, skip_serializing_if = "Option::is_none")]
887 pub ip_hash: Option<String>,
888}
889
890#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
892pub enum AdminAnalyticsEventsResponseItemDeviceType {
893 #[default]
894 #[serde(rename = "mobile")]
895 Mobile,
896 #[serde(rename = "tablet")]
897 Tablet,
898 #[serde(rename = "desktop")]
899 Desktop,
900 #[serde(rename = "bot")]
901 Bot,
902 #[serde(rename = "unknown")]
903 Unknown,
904 #[serde(untagged)]
906 Other(String),
907}
908
909impl AdminAnalyticsEventsResponseItemDeviceType {
910 pub fn as_str(&self) -> &str {
912 match self {
913 Self::Mobile => "mobile",
914 Self::Tablet => "tablet",
915 Self::Desktop => "desktop",
916 Self::Bot => "bot",
917 Self::Unknown => "unknown",
918 Self::Other(value) => value.as_str(),
919 }
920 }
921}
922
923impl std::fmt::Display for AdminAnalyticsEventsResponseItemDeviceType {
924 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
925 f.write_str(self.as_str())
926 }
927}
928
929impl From<&str> for AdminAnalyticsEventsResponseItemDeviceType {
930 fn from(value: &str) -> Self {
931 match value {
932 "mobile" => Self::Mobile,
933 "tablet" => Self::Tablet,
934 "desktop" => Self::Desktop,
935 "bot" => Self::Bot,
936 "unknown" => Self::Unknown,
937 other => Self::Other(other.to_string()),
938 }
939 }
940}
941
942#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
944pub struct AdminAnalyticsOverviewResponse {
945 #[serde(default, skip_serializing_if = "Option::is_none")]
946 pub range: Option<AdminAnalyticsOverviewResponseRange>,
947 #[serde(default, skip_serializing_if = "Option::is_none")]
948 pub totals: Option<AdminAnalyticsOverviewResponseTotals>,
949 #[serde(default, skip_serializing_if = "Option::is_none")]
950 pub unique_visitors_30d: Option<i64>,
951 #[serde(default, skip_serializing_if = "Option::is_none")]
952 pub signups_30d: Option<i64>,
953 #[serde(default, skip_serializing_if = "Option::is_none")]
954 pub conversion_rate: Option<f64>,
955 #[serde(default, skip_serializing_if = "Option::is_none")]
956 pub timeseries: Option<Vec<AnalyticsTimeseriesPoint>>,
957 #[serde(default, skip_serializing_if = "Option::is_none")]
958 pub top_countries: Option<Vec<AnalyticsTopValue>>,
959 #[serde(default, skip_serializing_if = "Option::is_none")]
960 pub top_devices: Option<Vec<AnalyticsTopValue>>,
961 #[serde(default, skip_serializing_if = "Option::is_none")]
962 pub top_browsers: Option<Vec<AnalyticsTopValue>>,
963 #[serde(default, skip_serializing_if = "Option::is_none")]
964 pub top_referrers: Option<Vec<AnalyticsTopValue>>,
965 #[serde(default, skip_serializing_if = "Option::is_none")]
966 pub top_utm_sources: Option<Vec<AnalyticsTopValue>>,
967}
968
969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
971pub struct AdminAnalyticsOverviewResponseRange {
972 #[serde(default, skip_serializing_if = "Option::is_none")]
973 pub from: Option<String>,
974 #[serde(default, skip_serializing_if = "Option::is_none")]
975 pub to: Option<String>,
976 #[serde(default, skip_serializing_if = "Option::is_none")]
977 pub days: Option<i64>,
978}
979
980#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
982pub struct AdminAnalyticsOverviewResponseTotals {
983 #[serde(default, skip_serializing_if = "Option::is_none")]
984 pub landing_visit: Option<i64>,
985 #[serde(default, skip_serializing_if = "Option::is_none")]
986 pub page_view: Option<i64>,
987 #[serde(default, skip_serializing_if = "Option::is_none")]
988 pub signup: Option<i64>,
989 #[serde(default, skip_serializing_if = "Option::is_none")]
990 pub login: Option<i64>,
991 #[serde(default, skip_serializing_if = "Option::is_none")]
992 pub app_open: Option<i64>,
993}
994
995#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
998pub struct AdminAuditList {
999 pub entries: Vec<AdminAuditListEntry>,
1000 pub total: i64,
1001}
1002
1003#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1005pub struct AdminAuditListEntry {
1006 pub entry_id: String,
1007 #[serde(default, skip_serializing_if = "Option::is_none")]
1008 pub actor_tenant_id: Option<String>,
1009 pub action: String,
1010 pub target_type: String,
1011 pub target_id: String,
1012 pub details: serde_json::Map<String, serde_json::Value>,
1013 #[serde(default, skip_serializing_if = "Option::is_none")]
1014 pub ip_address: Option<String>,
1015 pub timestamp: String,
1016 #[serde(default, skip_serializing_if = "Option::is_none")]
1017 pub actor_key_id: Option<String>,
1018 #[serde(default, skip_serializing_if = "Option::is_none")]
1019 pub actor_user_id: Option<String>,
1020}
1021
1022#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1027pub struct AdminConfigAgentMemoryConfig {
1028 pub agent_memory: AdminConfigAgentMemoryConfigAgentMemory,
1029}
1030
1031#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1033pub struct AdminConfigAgentMemoryConfigAgentMemory {
1034 pub enabled: bool,
1035 pub use_shared_store: bool,
1036 pub default_max_entries: i64,
1037 pub default_retrieval_limit: i64,
1038 pub default_retrieval_strategy: String,
1039 pub decay_enabled: bool,
1040 pub decay_half_life_days: i64,
1041 pub decay_job_interval_ms: i64,
1042 pub extraction_max_tokens: i64,
1043 pub extraction_model: String,
1044 pub eviction_threshold: i64,
1045 pub embedding_dimensions: i64,
1046 pub embedding_provider: String,
1047 pub embedding_model: String,
1048 pub compression_model: String,
1049}
1050
1051#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1055pub struct AdminConfigAuthConfig {
1056 pub auth: AdminConfigAuthConfigAuth,
1057}
1058
1059#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1061pub struct AdminConfigAuthConfigAuth {
1062 pub super_admin_email: String,
1063 pub otp_ttl_ms: i64,
1064 pub verification_ttl_ms: i64,
1065 pub jwks_cache_ttl_ms: i64,
1066 pub jwks_grace_ttl_ms: i64,
1067 pub api_key_cache_ttl_s: i64,
1068 pub api_key_rotation_grace_period_h: i64,
1069}
1070
1071#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1076pub struct AdminConfigBackpressureConfig {
1077 pub backpressure: AdminConfigBackpressureConfigBackpressure,
1078}
1079
1080#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1082pub struct AdminConfigBackpressureConfigBackpressure {
1083 pub sse_buffer_max: i64,
1084 pub sse_high_watermark: i64,
1085 pub sse_low_watermark: i64,
1086 pub tool_queue_max_depth: i64,
1087 pub tool_queue_high_watermark: i64,
1088}
1089
1090#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1095pub struct AdminConfigCodeInterpreterConfig {
1096 pub code_interpreter: AdminConfigCodeInterpreterConfigCodeInterpreter,
1097}
1098
1099#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1101pub struct AdminConfigCodeInterpreterConfigCodeInterpreter {
1102 pub isolation: String,
1103 #[serde(default, skip_serializing_if = "Option::is_none")]
1104 pub timeout_ms: Option<i64>,
1105 #[serde(default, skip_serializing_if = "Option::is_none")]
1106 pub max_memory_mb: Option<i64>,
1107 #[serde(default, skip_serializing_if = "Option::is_none")]
1108 pub container_image: Option<String>,
1109 #[serde(default, skip_serializing_if = "Option::is_none")]
1110 pub python_container_image: Option<String>,
1111 #[serde(default, skip_serializing_if = "Option::is_none")]
1112 pub python_sandbox_host_dir: Option<String>,
1113}
1114
1115#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1120pub struct AdminConfigEvaluationConfig {
1121 pub evaluation: AdminConfigEvaluationConfigEvaluation,
1122}
1123
1124#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1126pub struct AdminConfigEvaluationConfigEvaluation {
1127 pub enabled: bool,
1128 pub max_concurrent_eval_cases: i64,
1129 pub regression_threshold: f64,
1130 pub default_scorers: Vec<String>,
1131 pub max_cases_per_dataset: i64,
1132 pub eval_run_timeout_ms: i64,
1133 pub auto_rollback_enabled: bool,
1134}
1135
1136#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1141pub struct AdminConfigIdempotencyConfig {
1142 pub idempotency: AdminConfigIdempotencyConfigIdempotency,
1143}
1144
1145#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1147pub struct AdminConfigIdempotencyConfigIdempotency {
1148 pub enabled: bool,
1149 pub ttl_hours: i64,
1150 pub max_response_cache_bytes: i64,
1151}
1152
1153#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1158pub struct AdminConfigLLMAdaptersConfig {
1159 pub llm_adapters: AdminConfigLLMAdaptersConfigLLMAdapters,
1160}
1161
1162#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1164pub struct AdminConfigLLMAdaptersConfigLLMAdapters {
1165 #[serde(default, skip_serializing_if = "Option::is_none")]
1166 pub max_retries: Option<i64>,
1167 #[serde(default, skip_serializing_if = "Option::is_none")]
1168 pub retry_base_delay_ms: Option<i64>,
1169 #[serde(default, skip_serializing_if = "Option::is_none")]
1170 pub retry_max_delay_ms: Option<i64>,
1171 #[serde(default, skip_serializing_if = "Option::is_none")]
1172 pub stream_empty_timeout_ms: Option<i64>,
1173 #[serde(default, skip_serializing_if = "Option::is_none")]
1174 pub circuit_breaker: Option<AdminConfigLLMAdaptersConfigLLMAdaptersCircuitBreaker>,
1175 #[serde(default, skip_serializing_if = "Option::is_none")]
1176 pub provider_rate_limits: Option<serde_json::Map<String, serde_json::Value>>,
1177}
1178
1179#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1181pub struct AdminConfigLLMAdaptersConfigLLMAdaptersCircuitBreaker {
1182 #[serde(default, skip_serializing_if = "Option::is_none")]
1183 pub failure_threshold: Option<i64>,
1184 #[serde(default, skip_serializing_if = "Option::is_none")]
1185 pub reset_timeout_ms: Option<i64>,
1186 #[serde(default, skip_serializing_if = "Option::is_none")]
1187 pub half_open_max_requests: Option<i64>,
1188}
1189
1190#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1194pub struct AdminConfigLoggingConfig {
1195 pub logging: AdminConfigLoggingConfigLogging,
1196}
1197
1198#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1200pub struct AdminConfigLoggingConfigLogging {
1201 pub pii_mode: String,
1202 pub log_agent_responses: bool,
1203 pub file_enabled: bool,
1204 pub file_max_size_mb: i64,
1205 pub file_retention_days: i64,
1206 pub file_level: String,
1207 pub file_separate_error: bool,
1208 pub activity_log_verbosity: String,
1209}
1210
1211#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1216pub struct AdminConfigLongRunningConfig {
1217 pub long_running: AdminConfigLongRunningConfigLongRunning,
1218}
1219
1220#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1222pub struct AdminConfigLongRunningConfigLongRunning {
1223 pub enabled: bool,
1224 pub max_duration_ms: i64,
1225 pub checkpoint_interval_ms: i64,
1226 pub idle_timeout_ms: i64,
1227 pub continuation_token_ttl_days: i64,
1228 pub max_background_runs_per_tenant: i64,
1229}
1230
1231#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1235pub struct AdminConfigMCPConfig {
1236 pub mcp: AdminConfigMCPConfigMCP,
1237}
1238
1239#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1241pub struct AdminConfigMCPConfigMCP {
1242 pub max_sessions_per_server: i64,
1243 pub max_total_stdio_sessions: i64,
1244 pub session_idle_timeout_ms: i64,
1245}
1246
1247#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1252pub struct AdminConfigMultimodalConfig {
1253 pub multimodal: AdminConfigMultimodalConfigMultimodal,
1254}
1255
1256#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1258pub struct AdminConfigMultimodalConfigMultimodal {
1259 pub enabled: bool,
1260 pub max_image_size_bytes: i64,
1261 pub max_audio_duration_s: i64,
1262 pub max_video_duration_s: i64,
1263 pub auto_resize_images: bool,
1264 pub supported_image_formats: Vec<String>,
1265 pub supported_audio_formats: Vec<String>,
1266}
1267
1268#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1273pub struct AdminConfigPersistenceConfig {
1274 pub persistence: AdminConfigPersistenceConfigPersistence,
1275}
1276
1277#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1279pub struct AdminConfigPersistenceConfigPersistence {
1280 pub snapshot_every_n_events: i64,
1281 pub checkpoint_after_tool_calls: bool,
1282 pub usage_shards: i64,
1283 pub auto_cap_kv_values: bool,
1284}
1285
1286#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1290pub struct AdminConfigRetentionConfig {
1291 pub retention: AdminConfigRetentionConfigRetention,
1292}
1293
1294#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1296pub struct AdminConfigRetentionConfigRetention {
1297 pub completed_run_ttl_days: i64,
1298 pub event_ttl_days: i64,
1299 pub archive_to_sqlite: bool,
1300 pub audit_log_ttl_days: i64,
1301 pub archive_job_interval_ms: i64,
1302 pub archive_batch_size: i64,
1303 pub feed_ttl_days: i64,
1304 pub artifact_ttl_days: i64,
1305 #[serde(default, skip_serializing_if = "Option::is_none")]
1308 pub notification_ttl_days: Option<i64>,
1309 pub checkpoint_ttl_hours: i64,
1310}
1311
1312#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1317pub struct AdminConfigRunCommandConfig {
1318 pub run_command: AdminConfigRunCommandConfigRunCommand,
1319}
1320
1321#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1323pub struct AdminConfigRunCommandConfigRunCommand {
1324 pub enabled: bool,
1325 pub isolation: String,
1326 pub timeout_ms: i64,
1327 pub max_output_bytes: i64,
1328 pub allowed_commands: Vec<String>,
1329 pub deno_allow: Vec<String>,
1330}
1331
1332#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1336pub struct AdminConfigSecurityPoliciesConfig {
1337 pub policies: AdminConfigSecurityPoliciesConfigPolicies,
1338}
1339
1340#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1342pub struct AdminConfigSecurityPoliciesConfigPolicies {
1343 pub cors_allowed_origins: Vec<String>,
1344 pub webhook_url_denylist: Vec<String>,
1345 pub file_upload_max_size_bytes: i64,
1346 pub file_upload_allowed_mime_types: Vec<String>,
1347 pub admin_provider_settings_require_super_admin: bool,
1348}
1349
1350#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1354pub struct AdminConfigServerConfig {
1355 pub server: AdminConfigServerConfigServer,
1356}
1357
1358#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1360pub struct AdminConfigServerConfigServer {
1361 pub trust_proxy: bool,
1362 pub max_body_bytes: i64,
1363 #[serde(default, skip_serializing_if = "Option::is_none")]
1364 pub graceful_shutdown_timeout_ms: Option<i64>,
1365}
1366
1367#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1371pub struct AdminConfigSSEConfig {
1372 pub sse: AdminConfigSSEConfigSSE,
1373}
1374
1375#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1377pub struct AdminConfigSSEConfigSSE {
1378 pub heartbeat_interval_ms: i64,
1379 pub watch_timeout_ms: i64,
1380 pub poll_interval_ms: i64,
1381 pub max_poll_interval_ms: i64,
1382 pub reconnect_hint_ms: i64,
1383 pub run_wait_timeout_sec: i64,
1384}
1385
1386#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1391pub struct AdminConfigToolSecurityConfig {
1392 pub tool_security: AdminConfigToolSecurityConfigToolSecurity,
1393}
1394
1395#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1397pub struct AdminConfigToolSecurityConfigToolSecurity {
1398 #[serde(default, skip_serializing_if = "Option::is_none")]
1399 pub egress_allowlist_per_tenant: Option<Vec<String>>,
1400 pub default_tool_timeout_ms: i64,
1401 pub default_tool_max_payload_bytes: i64,
1402 pub default_tool_max_concurrency: i64,
1403 pub stdio_inherit_env: bool,
1404}
1405
1406#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1410pub struct AdminConfigWebhooksConfig {
1411 pub webhooks: AdminConfigWebhooksConfigWebhooks,
1412}
1413
1414#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1416pub struct AdminConfigWebhooksConfigWebhooks {
1417 pub enabled: bool,
1418 pub max_subscriptions_per_tenant: i64,
1419 pub delivery_timeout_ms: i64,
1420 pub max_retry_attempts: i64,
1421 pub require_https: bool,
1422 pub max_payload_bytes: i64,
1423}
1424
1425#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1429pub struct AdminConfigWebhooksPolicyConfig {
1430 pub policy: AdminConfigWebhooksPolicyConfigPolicy,
1431}
1432
1433#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1435pub struct AdminConfigWebhooksPolicyConfigPolicy {
1436 pub ssrf_check_at_subscription: bool,
1437 pub stripe_signature_tolerance_sec: i64,
1438 pub delivery_max_retries: i64,
1439 pub delivery_backoff_base_ms: i64,
1440 pub delivery_max_window_hours: i64,
1441}
1442
1443#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1448pub struct AdminConfigWorkerPoolConfig {
1449 pub worker_pool: AdminConfigWorkerPoolConfigWorkerPool,
1450}
1451
1452#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1454pub struct AdminConfigWorkerPoolConfigWorkerPool {
1455 pub max_workers: i64,
1456 pub default_mode: String,
1457 pub max_run_duration_ms: i64,
1458 pub reconciliation_interval_ms: i64,
1459 pub schedule_max_retries: i64,
1460 pub schedule_base_delay_ms: i64,
1461 #[serde(default, skip_serializing_if = "Option::is_none")]
1462 pub max_queue_size: Option<i64>,
1463}
1464
1465#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1467pub struct AdminDataExplorerRawKeysResponse {
1468 pub keys: Vec<AdminDataExplorerRawKeysResponseKey>,
1469 #[serde(default, skip_serializing_if = "Option::is_none")]
1470 pub cursor: Option<String>,
1471 pub total: i64,
1472}
1473
1474#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1476pub struct AdminDataExplorerRawKeysResponseKey {
1477 #[serde(default, skip_serializing_if = "Option::is_none")]
1478 pub key: Option<Vec<serde_json::Value>>,
1479 #[serde(default, skip_serializing_if = "Option::is_none")]
1480 pub namespace: Option<String>,
1481 #[serde(default, skip_serializing_if = "Option::is_none")]
1482 pub value_preview: Option<String>,
1483 #[serde(default, skip_serializing_if = "Option::is_none")]
1484 pub size: Option<i64>,
1485 #[serde(default, skip_serializing_if = "Option::is_none")]
1486 pub r#type: Option<AdminDataExplorerRawKeysResponseKeyType>,
1487 #[serde(default, skip_serializing_if = "Option::is_none")]
1488 pub sensitive: Option<bool>,
1489}
1490
1491#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
1493pub enum AdminDataExplorerRawKeysResponseKeyType {
1494 #[default]
1495 #[serde(rename = "null")]
1496 Null,
1497 #[serde(rename = "array")]
1498 Array,
1499 #[serde(rename = "string")]
1500 String,
1501 #[serde(rename = "number")]
1502 Number,
1503 #[serde(rename = "boolean")]
1504 Boolean,
1505 #[serde(rename = "object")]
1506 Object,
1507 #[serde(rename = "undefined")]
1508 Undefined,
1509 #[serde(untagged)]
1511 Other(String),
1512}
1513
1514impl AdminDataExplorerRawKeysResponseKeyType {
1515 pub fn as_str(&self) -> &str {
1517 match self {
1518 Self::Null => "null",
1519 Self::Array => "array",
1520 Self::String => "string",
1521 Self::Number => "number",
1522 Self::Boolean => "boolean",
1523 Self::Object => "object",
1524 Self::Undefined => "undefined",
1525 Self::Other(value) => value.as_str(),
1526 }
1527 }
1528}
1529
1530impl std::fmt::Display for AdminDataExplorerRawKeysResponseKeyType {
1531 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1532 f.write_str(self.as_str())
1533 }
1534}
1535
1536impl From<&str> for AdminDataExplorerRawKeysResponseKeyType {
1537 fn from(value: &str) -> Self {
1538 match value {
1539 "null" => Self::Null,
1540 "array" => Self::Array,
1541 "string" => Self::String,
1542 "number" => Self::Number,
1543 "boolean" => Self::Boolean,
1544 "object" => Self::Object,
1545 "undefined" => Self::Undefined,
1546 other => Self::Other(other.to_string()),
1547 }
1548 }
1549}
1550
1551#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1553pub struct AdminFeatureFlagsConfig {
1554 #[serde(default, skip_serializing_if = "Option::is_none")]
1555 pub flags: Option<Vec<FeatureFlag>>,
1556}
1557
1558#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1560pub struct AdminFounderConfig {
1561 pub kv: FounderIdentity,
1562 pub env: FounderIdentity,
1563 pub effective: FounderIdentity,
1564}
1565
1566#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1568pub struct AdminGetLandingConfigResponse {
1569 pub landing: LandingConfigSection,
1570 pub source: AdminGetLandingConfigResponseSource,
1571 #[serde(default)]
1573 pub version: Option<String>,
1574}
1575
1576#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
1578pub enum AdminGetLandingConfigResponseSource {
1579 #[default]
1580 #[serde(rename = "kv")]
1581 Kv,
1582 #[serde(rename = "none")]
1583 None,
1584 #[serde(untagged)]
1586 Other(String),
1587}
1588
1589impl AdminGetLandingConfigResponseSource {
1590 pub fn as_str(&self) -> &str {
1592 match self {
1593 Self::Kv => "kv",
1594 Self::None => "none",
1595 Self::Other(value) => value.as_str(),
1596 }
1597 }
1598}
1599
1600impl std::fmt::Display for AdminGetLandingConfigResponseSource {
1601 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1602 f.write_str(self.as_str())
1603 }
1604}
1605
1606impl From<&str> for AdminGetLandingConfigResponseSource {
1607 fn from(value: &str) -> Self {
1608 match value {
1609 "kv" => Self::Kv,
1610 "none" => Self::None,
1611 other => Self::Other(other.to_string()),
1612 }
1613 }
1614}
1615
1616#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1618pub struct AdminGetReconciliationResponse {
1619 pub tenant_id: String,
1620 pub reconciliation: AdminGetReconciliationResponseReconciliation,
1621}
1622
1623#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1625pub struct AdminGetReconciliationResponseReconciliation {
1626 #[serde(default, skip_serializing_if = "Option::is_none")]
1627 pub period: Option<String>,
1628 #[serde(flatten)]
1630 pub extra: HashMap<String, serde_json::Value>,
1631}
1632
1633#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1635pub struct AdminGetVoiceConfigResponse {
1636 #[serde(default)]
1637 pub voice: Option<AdminGetVoiceConfigResponseVoiceVariant1>,
1638 pub source: AdminGetLandingConfigResponseSource,
1639}
1640
1641#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1643pub struct AdminGetVoiceConfigResponseVoiceVariant1 {
1644 pub stt: AdminGetVoiceConfigResponseVoiceVariant1stt,
1645 pub tts: AdminGetVoiceConfigResponseVoiceVariant1tts,
1646}
1647
1648#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1650pub struct AdminGetVoiceConfigResponseVoiceVariant1stt {
1651 pub provider: String,
1652 pub model: String,
1653}
1654
1655#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1657pub struct AdminGetVoiceConfigResponseVoiceVariant1tts {
1658 pub provider: String,
1659 pub model: String,
1660 pub voice: String,
1661}
1662
1663#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1665pub struct AdminGuardrailsConfig {
1666 #[serde(default, skip_serializing_if = "Option::is_none")]
1667 pub guardrails: Option<Vec<GuardrailConfigItem>>,
1668}
1669
1670#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1672pub struct AdminIntegrationsConfig {
1673 pub integrations: Vec<AdminIntegrationsConfigIntegration>,
1674}
1675
1676#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1678pub struct AdminIntegrationsConfigIntegration {
1679 pub id: String,
1680 pub name: String,
1681 #[serde(default, skip_serializing_if = "Option::is_none")]
1682 pub icon: Option<String>,
1683 #[serde(default, skip_serializing_if = "Option::is_none")]
1684 pub auth_type: Option<AdminIntegrationsConfigIntegrationAuthType>,
1685 #[serde(default, skip_serializing_if = "Option::is_none")]
1686 pub category: Option<String>,
1687 pub enabled: bool,
1688 #[serde(default, skip_serializing_if = "Option::is_none")]
1689 pub beta: Option<bool>,
1690 #[serde(default, skip_serializing_if = "Option::is_none")]
1692 pub source: Option<String>,
1693}
1694
1695#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
1697pub enum AdminIntegrationsConfigIntegrationAuthType {
1698 #[default]
1699 #[serde(rename = "oauth2")]
1700 Oauth2,
1701 #[serde(rename = "api_key")]
1702 APIKey,
1703 #[serde(rename = "none")]
1704 None,
1705 #[serde(untagged)]
1707 Other(String),
1708}
1709
1710impl AdminIntegrationsConfigIntegrationAuthType {
1711 pub fn as_str(&self) -> &str {
1713 match self {
1714 Self::Oauth2 => "oauth2",
1715 Self::APIKey => "api_key",
1716 Self::None => "none",
1717 Self::Other(value) => value.as_str(),
1718 }
1719 }
1720}
1721
1722impl std::fmt::Display for AdminIntegrationsConfigIntegrationAuthType {
1723 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1724 f.write_str(self.as_str())
1725 }
1726}
1727
1728impl From<&str> for AdminIntegrationsConfigIntegrationAuthType {
1729 fn from(value: &str) -> Self {
1730 match value {
1731 "oauth2" => Self::Oauth2,
1732 "api_key" => Self::APIKey,
1733 "none" => Self::None,
1734 other => Self::Other(other.to_string()),
1735 }
1736 }
1737}
1738
1739#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1741pub struct AdminListToolsResponse {
1742 pub tools: Vec<AdminListToolsResponseTool>,
1743 pub count: i64,
1744}
1745
1746#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1748pub struct AdminListToolsResponseTool {
1749 #[serde(default, skip_serializing_if = "Option::is_none")]
1750 pub id: Option<String>,
1751 #[serde(default, skip_serializing_if = "Option::is_none")]
1752 pub name: Option<String>,
1753 #[serde(default, skip_serializing_if = "Option::is_none")]
1754 pub description: Option<String>,
1755 #[serde(default, skip_serializing_if = "Option::is_none")]
1757 pub parameters: Option<serde_json::Map<String, serde_json::Value>>,
1758}
1759
1760#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1762pub struct AdminListWebhookDLQResponse {
1763 pub entries: Vec<AdminListWebhookDLQResponseEntry>,
1764}
1765
1766#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1768pub struct AdminListWebhookDLQResponseEntry {
1769 #[serde(rename = "eventId")]
1772 pub event_id: String,
1773 #[serde(rename = "eventType")]
1777 pub event_type: String,
1778 #[serde(default, skip_serializing_if = "Option::is_none")]
1779 pub payload: Option<serde_json::Map<String, serde_json::Value>>,
1780 #[serde(rename = "errorMessage")]
1784 pub error_message: String,
1785 pub timestamp: String,
1786 #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
1789 pub tenant_id: Option<String>,
1790 #[serde(rename = "event_id")]
1791 pub event_id_: String,
1792 #[serde(rename = "event_type")]
1793 pub event_type_: String,
1794 #[serde(rename = "error_message")]
1795 pub error_message_: String,
1796 #[serde(rename = "tenant_id", default, skip_serializing_if = "Option::is_none")]
1797 pub tenant_id_: Option<String>,
1798}
1799
1800#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1804pub struct AdminModelCatalog {
1805 pub models: Vec<AdminModelCatalogModel>,
1806 pub source: AdminModelCatalogSource,
1807 pub count: i64,
1808 #[serde(default)]
1809 pub version: Option<String>,
1810}
1811
1812#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1814pub struct AdminModelCatalogModel {
1815 pub id: String,
1816 pub provider: String,
1817 pub display_name: String,
1818 pub max_context_tokens: i64,
1819 pub max_output_tokens: i64,
1820 pub supports_streaming: bool,
1821 pub supports_tool_calls: bool,
1822 pub supports_json_mode: bool,
1823 #[serde(default, skip_serializing_if = "Option::is_none")]
1824 pub supports_vision: Option<bool>,
1825 #[serde(default, skip_serializing_if = "Option::is_none")]
1826 pub tier: Option<String>,
1827 #[serde(default, skip_serializing_if = "Option::is_none")]
1830 pub effective_pricing: Option<AdminModelCatalogModelEffectivePricing>,
1831 #[serde(default, skip_serializing_if = "Option::is_none")]
1834 pub effective_tier: Option<String>,
1835}
1836
1837#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1840pub struct AdminModelCatalogModelEffectivePricing {
1841 pub input_per_million: f64,
1842 pub output_per_million: f64,
1843 pub cached_input_per_million: f64,
1844 pub source: String,
1845 pub layer: String,
1846 pub key: String,
1847 pub r#match: String,
1848 pub confidence: String,
1849}
1850
1851#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1855pub struct AdminModelCatalogSeed {
1856 pub models: Vec<AdminModelCatalogSeedModel>,
1857 pub count: i64,
1858}
1859
1860#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1862pub struct AdminModelCatalogSeedModel {
1863 pub id: String,
1864 pub provider: String,
1865 pub display_name: String,
1866 pub max_context_tokens: i64,
1867 pub max_output_tokens: i64,
1868 pub supports_streaming: bool,
1869 pub supports_tool_calls: bool,
1870 pub supports_json_mode: bool,
1871 #[serde(default, skip_serializing_if = "Option::is_none")]
1872 pub supports_vision: Option<bool>,
1873 #[serde(default, skip_serializing_if = "Option::is_none")]
1874 pub tier: Option<String>,
1875}
1876
1877#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
1879pub enum AdminModelCatalogSource {
1880 #[default]
1881 #[serde(rename = "kv")]
1882 Kv,
1883 #[serde(rename = "seed")]
1884 Seed,
1885 #[serde(untagged)]
1887 Other(String),
1888}
1889
1890impl AdminModelCatalogSource {
1891 pub fn as_str(&self) -> &str {
1893 match self {
1894 Self::Kv => "kv",
1895 Self::Seed => "seed",
1896 Self::Other(value) => value.as_str(),
1897 }
1898 }
1899}
1900
1901impl std::fmt::Display for AdminModelCatalogSource {
1902 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1903 f.write_str(self.as_str())
1904 }
1905}
1906
1907impl From<&str> for AdminModelCatalogSource {
1908 fn from(value: &str) -> Self {
1909 match value {
1910 "kv" => Self::Kv,
1911 "seed" => Self::Seed,
1912 other => Self::Other(other.to_string()),
1913 }
1914 }
1915}
1916
1917#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1920pub struct AdminModelPricingList {
1921 pub models: Vec<AdminModelPricingListModel>,
1922 pub count: i64,
1923 pub source: String,
1924}
1925
1926#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1928pub struct AdminModelPricingListModel {
1929 pub model: String,
1930 pub layer: String,
1931 pub input_per_million: f64,
1932 pub output_per_million: f64,
1933}
1934
1935#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1937pub struct AdminOAuthIdentityConfig {
1938 pub kv: OAuthIdentityConfig,
1939 pub env: OAuthIdentityConfig,
1940 pub effective: OAuthIdentityConfig,
1941}
1942
1943#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1945pub struct AdminPlatformURLSConfig {
1946 #[serde(default, skip_serializing_if = "Option::is_none")]
1947 pub urls: Option<AdminPlatformURLSConfigURLS>,
1948}
1949
1950#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1952pub struct AdminPlatformURLSConfigURLS {
1953 #[serde(default, skip_serializing_if = "Option::is_none")]
1954 pub public_base_url: Option<String>,
1955 #[serde(default, skip_serializing_if = "Option::is_none")]
1956 pub webhook_base_url: Option<String>,
1957}
1958
1959#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1963pub struct AdminPricingConfig {
1964 pub pricing: AdminPricingConfigPricing,
1965 pub source: AdminPricingConfigSource,
1966}
1967
1968#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1970pub struct AdminPricingConfigPricing {
1971 pub openai_compat_input: f64,
1972 pub openai_compat_output: f64,
1973 pub anthropic_input: i64,
1974 pub anthropic_output: f64,
1975 pub anthropic_thinking: f64,
1976}
1977
1978#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
1980pub enum AdminPricingConfigSource {
1981 #[default]
1982 #[serde(rename = "kv")]
1983 Kv,
1984 #[serde(rename = "config")]
1985 Config,
1986 #[serde(untagged)]
1988 Other(String),
1989}
1990
1991impl AdminPricingConfigSource {
1992 pub fn as_str(&self) -> &str {
1994 match self {
1995 Self::Kv => "kv",
1996 Self::Config => "config",
1997 Self::Other(value) => value.as_str(),
1998 }
1999 }
2000}
2001
2002impl std::fmt::Display for AdminPricingConfigSource {
2003 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2004 f.write_str(self.as_str())
2005 }
2006}
2007
2008impl From<&str> for AdminPricingConfigSource {
2009 fn from(value: &str) -> Self {
2010 match value {
2011 "kv" => Self::Kv,
2012 "config" => Self::Config,
2013 other => Self::Other(other.to_string()),
2014 }
2015 }
2016}
2017
2018#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2021pub struct AdminProvider {
2022 pub id: String,
2023 pub name: String,
2024 pub canonical: String,
2025 pub default_endpoint: String,
2026 pub local: bool,
2027 pub enabled: bool,
2028 pub model_allowlist: Vec<String>,
2029 pub is_custom: bool,
2030 pub requires_api_key: bool,
2031 pub models_in_catalog: i64,
2032 pub catalog_model_ids: Vec<String>,
2033 #[serde(default, skip_serializing_if = "Option::is_none")]
2034 pub last_models_sync: Option<AdminProviderLastModelsSync>,
2035}
2036
2037#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2039pub struct AdminProviderLastModelsSync {
2040 pub at: String,
2041 pub added: i64,
2042 pub live: i64,
2043}
2044
2045#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2048pub struct AdminProviderSummary {
2049 pub id: String,
2050 pub name: String,
2051 pub canonical: String,
2052 pub default_endpoint: String,
2053 pub local: bool,
2054 pub enabled: bool,
2055 pub model_allowlist: Vec<String>,
2056 pub is_custom: bool,
2057 pub requires_api_key: bool,
2058}
2059
2060#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2062pub struct AdminPutLandingConfigResponse {
2063 pub landing: LandingConfigSection,
2064 pub source: AdminPutLandingConfigResponseSource,
2065 pub updated: bool,
2066 #[serde(default)]
2067 pub version: Option<String>,
2068}
2069
2070#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2072pub enum AdminPutLandingConfigResponseSource {
2073 #[default]
2074 #[serde(rename = "kv")]
2075 Kv,
2076 #[serde(untagged)]
2078 Other(String),
2079}
2080
2081impl AdminPutLandingConfigResponseSource {
2082 pub fn as_str(&self) -> &str {
2084 match self {
2085 Self::Kv => "kv",
2086 Self::Other(value) => value.as_str(),
2087 }
2088 }
2089}
2090
2091impl std::fmt::Display for AdminPutLandingConfigResponseSource {
2092 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2093 f.write_str(self.as_str())
2094 }
2095}
2096
2097impl From<&str> for AdminPutLandingConfigResponseSource {
2098 fn from(value: &str) -> Self {
2099 match value {
2100 "kv" => Self::Kv,
2101 other => Self::Other(other.to_string()),
2102 }
2103 }
2104}
2105
2106#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2108pub struct AdminPutModelCatalogResponse {
2109 pub models: Vec<AdminPutModelCatalogResponseModel>,
2110 pub source: AdminPutLandingConfigResponseSource,
2111 pub count: i64,
2112 #[serde(default)]
2113 pub version: Option<String>,
2114}
2115
2116#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2118pub struct AdminPutModelCatalogResponseModel {
2119 pub id: String,
2120 pub provider: String,
2121 pub display_name: String,
2122 pub max_context_tokens: i64,
2123 pub max_output_tokens: i64,
2124 pub supports_streaming: bool,
2125 pub supports_tool_calls: bool,
2126 pub supports_json_mode: bool,
2127 #[serde(default, skip_serializing_if = "Option::is_none")]
2128 pub supports_vision: Option<bool>,
2129 #[serde(default, skip_serializing_if = "Option::is_none")]
2130 pub tier: Option<String>,
2131}
2132
2133#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2135pub struct AdminPutVoiceConfigResponse {
2136 pub voice: AdminPutVoiceConfigResponseVoice,
2137 pub updated: bool,
2138}
2139
2140#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2142pub struct AdminPutVoiceConfigResponseVoice {
2143 pub stt: AdminPutVoiceConfigResponseVoiceStt,
2144 pub tts: AdminPutVoiceConfigResponseVoiceTts,
2145}
2146
2147#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2149pub struct AdminPutVoiceConfigResponseVoiceStt {
2150 pub provider: String,
2151 pub model: String,
2152}
2153
2154#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2156pub struct AdminPutVoiceConfigResponseVoiceTts {
2157 pub provider: String,
2158 pub model: String,
2159 pub voice: String,
2160}
2161
2162#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2164pub struct AdminRateLimitsConfig {
2165 #[serde(default, skip_serializing_if = "Option::is_none")]
2166 pub endpoints: Option<Vec<EndpointRateLimit>>,
2167}
2168
2169#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2171pub struct AdminRegistrationConfig {
2172 pub registration_open: bool,
2173 pub default_signup_plan: String,
2175 pub allowed_email_domains: Vec<String>,
2177 pub setup_status: AdminRegistrationConfigSetupStatus,
2178 pub missing_required: Vec<String>,
2181 pub waitlist_count: i64,
2187 #[serde(default, skip_serializing_if = "Option::is_none")]
2190 pub waitlist_truncated: Option<bool>,
2191 pub waitlist: Vec<AdminRegistrationConfigWaitlistItem>,
2194}
2195
2196#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2198pub enum AdminRegistrationConfigSetupStatus {
2199 #[default]
2200 #[serde(rename = "in_progress")]
2201 InProgress,
2202 #[serde(rename = "live")]
2203 Live,
2204 #[serde(untagged)]
2206 Other(String),
2207}
2208
2209impl AdminRegistrationConfigSetupStatus {
2210 pub fn as_str(&self) -> &str {
2212 match self {
2213 Self::InProgress => "in_progress",
2214 Self::Live => "live",
2215 Self::Other(value) => value.as_str(),
2216 }
2217 }
2218}
2219
2220impl std::fmt::Display for AdminRegistrationConfigSetupStatus {
2221 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2222 f.write_str(self.as_str())
2223 }
2224}
2225
2226impl From<&str> for AdminRegistrationConfigSetupStatus {
2227 fn from(value: &str) -> Self {
2228 match value {
2229 "in_progress" => Self::InProgress,
2230 "live" => Self::Live,
2231 other => Self::Other(other.to_string()),
2232 }
2233 }
2234}
2235
2236#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2238pub struct AdminRegistrationConfigWaitlistItem {
2239 pub tenant_id: String,
2240 pub email: String,
2241 pub created_at: String,
2242}
2243
2244#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2246pub struct AdminReplayWebhookDLQResponse {
2247 pub success: bool,
2248 #[serde(rename = "eventId")]
2251 pub event_id: String,
2252 pub action: String,
2253 pub message: String,
2254 #[serde(rename = "event_id")]
2255 pub event_id_: String,
2256}
2257
2258#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2260pub struct AdminSmtpConfig {
2261 pub kv: AdminSmtpConfigKv,
2263 pub env: AdminSmtpConfigEnv,
2265 pub source: AdminSmtpConfigSource,
2270}
2271
2272#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2274pub struct AdminSmtpConfigEnv {
2275 #[serde(default, skip_serializing_if = "Option::is_none")]
2276 pub host: Option<String>,
2277 #[serde(default, skip_serializing_if = "Option::is_none")]
2278 pub port: Option<i64>,
2279 #[serde(default, skip_serializing_if = "Option::is_none")]
2280 pub user: Option<String>,
2281 #[serde(default, skip_serializing_if = "Option::is_none")]
2282 pub from: Option<String>,
2283 #[serde(default, skip_serializing_if = "Option::is_none")]
2284 pub from_name: Option<String>,
2285 #[serde(default, skip_serializing_if = "Option::is_none")]
2287 pub has_password: Option<bool>,
2288}
2289
2290#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2292pub struct AdminSmtpConfigKv {
2293 #[serde(default, skip_serializing_if = "Option::is_none")]
2294 pub host: Option<String>,
2295 #[serde(default, skip_serializing_if = "Option::is_none")]
2296 pub port: Option<i64>,
2297 #[serde(default, skip_serializing_if = "Option::is_none")]
2298 pub user: Option<String>,
2299 #[serde(default, skip_serializing_if = "Option::is_none")]
2300 pub from: Option<String>,
2301 #[serde(default, skip_serializing_if = "Option::is_none")]
2302 pub from_name: Option<String>,
2303 #[serde(default, skip_serializing_if = "Option::is_none")]
2305 pub has_password: Option<bool>,
2306}
2307
2308#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2313pub enum AdminSmtpConfigSource {
2314 #[default]
2315 #[serde(rename = "kv")]
2316 Kv,
2317 #[serde(rename = "env")]
2318 Env,
2319 #[serde(rename = "none")]
2320 None,
2321 #[serde(untagged)]
2323 Other(String),
2324}
2325
2326impl AdminSmtpConfigSource {
2327 pub fn as_str(&self) -> &str {
2329 match self {
2330 Self::Kv => "kv",
2331 Self::Env => "env",
2332 Self::None => "none",
2333 Self::Other(value) => value.as_str(),
2334 }
2335 }
2336}
2337
2338impl std::fmt::Display for AdminSmtpConfigSource {
2339 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2340 f.write_str(self.as_str())
2341 }
2342}
2343
2344impl From<&str> for AdminSmtpConfigSource {
2345 fn from(value: &str) -> Self {
2346 match value {
2347 "kv" => Self::Kv,
2348 "env" => Self::Env,
2349 "none" => Self::None,
2350 other => Self::Other(other.to_string()),
2351 }
2352 }
2353}
2354
2355#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2358pub struct AdminStripeConfig {
2359 pub stripe: AdminStripeConfigStripe,
2360 pub has_secret_key: bool,
2361 pub has_webhook_secret: bool,
2362}
2363
2364#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2366pub struct AdminStripeConfigStripe {
2367 pub enabled: bool,
2368 pub mode: String,
2369 pub secret_key: String,
2370 pub webhook_secret: String,
2371 pub publishable_key: String,
2372 pub price_id_starter: String,
2373 pub price_id_pro: String,
2374 pub price_id_enterprise: String,
2375}
2376
2377#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2381pub struct AdminVoicePresets {
2382 pub defaults: serde_json::Map<String, serde_json::Value>,
2383 pub r#override: HashMap<String, Vec<String>>,
2384 pub effective: HashMap<String, Vec<String>>,
2385}
2386
2387#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2389pub struct Agent {
2390 #[serde(default, skip_serializing_if = "Option::is_none")]
2392 pub specs: Option<Vec<AgentSpec>>,
2393 #[serde(default, skip_serializing_if = "Option::is_none")]
2395 pub auto_approve_tools: Option<Vec<String>>,
2396 #[serde(default, skip_serializing_if = "Option::is_none")]
2398 pub command_relationships: Option<AgentCommandRelationships>,
2399 #[serde(default, skip_serializing_if = "Option::is_none")]
2401 pub access_control: Option<AgentAccessControl>,
2402 #[serde(default, skip_serializing_if = "Option::is_none")]
2404 pub metadata: Option<AgentMetadata>,
2405 pub agent_id: String,
2406 pub tenant_id: String,
2407 pub name: String,
2408 #[serde(default, skip_serializing_if = "Option::is_none")]
2409 pub description: Option<String>,
2410 #[serde(default, skip_serializing_if = "Option::is_none")]
2411 pub version: Option<String>,
2412 pub model: AgentModelConfig,
2413 #[serde(default, skip_serializing_if = "Option::is_none")]
2414 pub prompts: Option<AgentPrompts>,
2415 #[serde(default, skip_serializing_if = "Option::is_none")]
2416 pub mcp: Option<serde_json::Map<String, serde_json::Value>>,
2417 #[serde(default, skip_serializing_if = "Option::is_none")]
2418 pub policies: Option<serde_json::Map<String, serde_json::Value>>,
2419 #[serde(default, skip_serializing_if = "Option::is_none")]
2420 pub thinking: Option<serde_json::Map<String, serde_json::Value>>,
2421 #[serde(default, skip_serializing_if = "Option::is_none")]
2422 pub effort_policy: Option<serde_json::Map<String, serde_json::Value>>,
2423 #[serde(default, skip_serializing_if = "Option::is_none")]
2424 pub resource_limits: Option<serde_json::Map<String, serde_json::Value>>,
2425 #[serde(default, skip_serializing_if = "Option::is_none")]
2426 pub memory: Option<serde_json::Map<String, serde_json::Value>>,
2427 #[serde(default, skip_serializing_if = "Option::is_none")]
2428 pub guardrails: Option<serde_json::Map<String, serde_json::Value>>,
2429 #[serde(default, skip_serializing_if = "Option::is_none")]
2431 pub approval_required_tools: Option<Vec<String>>,
2432 #[serde(default, skip_serializing_if = "Option::is_none")]
2434 pub built_in_tools: Option<Vec<String>>,
2435 #[serde(default, skip_serializing_if = "Option::is_none")]
2437 pub image_generation: Option<serde_json::Map<String, serde_json::Value>>,
2438 #[serde(default, skip_serializing_if = "Option::is_none")]
2442 pub knowledge_base_id: Option<String>,
2443 #[serde(default, skip_serializing_if = "Option::is_none")]
2445 pub knowledge_base_ids: Option<Vec<String>>,
2446 #[serde(default, skip_serializing_if = "Option::is_none")]
2454 pub visibility: Option<AgentUpdateVisibility>,
2455 #[serde(default, skip_serializing_if = "Option::is_none")]
2457 pub status: Option<AgentStatus>,
2458 #[serde(default, skip_serializing_if = "Option::is_none")]
2459 pub status_changed_at: Option<String>,
2460 #[serde(default, skip_serializing_if = "Option::is_none")]
2464 pub status_reason: Option<String>,
2465 #[serde(default, skip_serializing_if = "Option::is_none")]
2469 pub status_reason_code: Option<AgentStatusReasonCode>,
2470 #[serde(default, skip_serializing_if = "Option::is_none")]
2473 pub status_reason_details: Option<serde_json::Map<String, serde_json::Value>>,
2474 #[serde(default, skip_serializing_if = "Option::is_none")]
2475 pub autonomy: Option<AgentAutonomy>,
2476 #[serde(default, skip_serializing_if = "Option::is_none")]
2478 pub tool_overrides: Option<Vec<AgentToolOverride>>,
2479 #[serde(default, skip_serializing_if = "Option::is_none")]
2480 pub public_config: Option<AgentPublicConfig>,
2481 #[serde(default, skip_serializing_if = "Option::is_none")]
2484 pub bridge: Option<AgentBridgeState>,
2485 #[serde(default, skip_serializing_if = "Option::is_none")]
2487 pub fallback_model: Option<serde_json::Map<String, serde_json::Value>>,
2488 #[serde(default, skip_serializing_if = "Option::is_none")]
2489 pub execution_mode: Option<AgentExecutionMode>,
2490 #[serde(default, skip_serializing_if = "Option::is_none")]
2491 pub worker_reuse: Option<bool>,
2492 #[serde(default, skip_serializing_if = "Option::is_none")]
2494 pub schedule: Option<serde_json::Map<String, serde_json::Value>>,
2495 #[serde(default, skip_serializing_if = "Option::is_none")]
2497 pub a2a: Option<serde_json::Map<String, serde_json::Value>>,
2498 #[serde(default, skip_serializing_if = "Option::is_none")]
2500 pub risk_classification: Option<serde_json::Map<String, serde_json::Value>>,
2501 #[serde(default, skip_serializing_if = "Option::is_none")]
2503 pub workspace_id: Option<String>,
2504 #[serde(default, skip_serializing_if = "Option::is_none")]
2505 pub context_strategy: Option<AgentContextStrategy>,
2506 #[serde(default, skip_serializing_if = "Option::is_none")]
2516 pub context_window_size: Option<i64>,
2517 pub created_at: String,
2518 #[serde(default, skip_serializing_if = "Option::is_none")]
2519 pub updated_at: Option<String>,
2520}
2521
2522#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2524pub struct AgentAccessControl {
2525 pub clearance: i64,
2527 #[serde(default, skip_serializing_if = "Option::is_none")]
2528 pub compartments: Option<Vec<String>>,
2529 #[serde(default, skip_serializing_if = "Option::is_none")]
2530 pub caveats: Option<Vec<String>>,
2531}
2532
2533#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2535pub struct AgentAnalyticsRow {
2536 pub agent_id: String,
2537 pub tenant_id: String,
2538 pub name: String,
2539 pub execution_mode: AgentExecutionMode,
2540 pub status: String,
2541 #[serde(default, skip_serializing_if = "Option::is_none")]
2543 pub bridge_status: Option<AgentSummaryBridgeStatus>,
2544 #[serde(default, skip_serializing_if = "Option::is_none")]
2546 pub machine_count: Option<i64>,
2547 pub runs: i64,
2548 pub cost_usd: f64,
2549 pub tokens: i64,
2550}
2551
2552#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2555pub struct AgentAnalyticsSummary {
2556 pub range: AgentAnalyticsSummaryRange,
2557 pub total: i64,
2558 #[serde(default, skip_serializing_if = "Option::is_none")]
2559 pub by_execution_mode: Option<AgentAnalyticsSummaryByExecutionMode>,
2560 #[serde(default, skip_serializing_if = "Option::is_none")]
2561 pub bridge: Option<AgentAnalyticsSummaryBridge>,
2562 #[serde(default, skip_serializing_if = "Option::is_none")]
2563 pub runs_total: Option<i64>,
2564 #[serde(default, skip_serializing_if = "Option::is_none")]
2565 pub cost_total_usd: Option<f64>,
2566 #[serde(default, skip_serializing_if = "Option::is_none")]
2567 pub tokens_total: Option<i64>,
2568 #[serde(default, skip_serializing_if = "Option::is_none")]
2569 pub top_by_runs: Option<Vec<AgentSummary>>,
2570 #[serde(default, skip_serializing_if = "Option::is_none")]
2571 pub top_by_cost: Option<Vec<AgentSummary>>,
2572 pub agents: Vec<AgentSummary>,
2573}
2574
2575#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2577pub struct AgentAnalyticsSummaryBridge {
2578 #[serde(default, skip_serializing_if = "Option::is_none")]
2579 pub online: Option<i64>,
2580 #[serde(default, skip_serializing_if = "Option::is_none")]
2581 pub stale: Option<i64>,
2582 #[serde(default, skip_serializing_if = "Option::is_none")]
2583 pub offline: Option<i64>,
2584 #[serde(default, skip_serializing_if = "Option::is_none")]
2585 pub machines_total: Option<i64>,
2586}
2587
2588#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2590pub struct AgentAnalyticsSummaryByExecutionMode {
2591 #[serde(default, skip_serializing_if = "Option::is_none")]
2592 pub cloud: Option<i64>,
2593 #[serde(default, skip_serializing_if = "Option::is_none")]
2594 pub bridge: Option<i64>,
2595}
2596
2597#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2599pub struct AgentAnalyticsSummaryRange {
2600 pub days: i64,
2601}
2602
2603#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2605pub struct AgentAutonomy {
2606 pub level: AgentAutonomyLevel,
2607}
2608
2609#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2611pub enum AgentAutonomyLevel {
2612 #[default]
2613 #[serde(rename = "manual")]
2614 Manual,
2615 #[serde(rename = "approve_risky")]
2616 ApproveRisky,
2617 #[serde(rename = "full_auto")]
2618 FullAuto,
2619 #[serde(untagged)]
2621 Other(String),
2622}
2623
2624impl AgentAutonomyLevel {
2625 pub fn as_str(&self) -> &str {
2627 match self {
2628 Self::Manual => "manual",
2629 Self::ApproveRisky => "approve_risky",
2630 Self::FullAuto => "full_auto",
2631 Self::Other(value) => value.as_str(),
2632 }
2633 }
2634}
2635
2636impl std::fmt::Display for AgentAutonomyLevel {
2637 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2638 f.write_str(self.as_str())
2639 }
2640}
2641
2642impl From<&str> for AgentAutonomyLevel {
2643 fn from(value: &str) -> Self {
2644 match value {
2645 "manual" => Self::Manual,
2646 "approve_risky" => Self::ApproveRisky,
2647 "full_auto" => Self::FullAuto,
2648 other => Self::Other(other.to_string()),
2649 }
2650 }
2651}
2652
2653#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2656pub struct AgentBookmark {
2657 pub message_id: String,
2658 pub agent_id: String,
2659 pub tenant_id: String,
2660 pub kind: AgentBookmarkKind,
2661 pub content: String,
2662 #[serde(default, skip_serializing_if = "Option::is_none")]
2663 pub session_id: Option<String>,
2664 pub created_at: String,
2665}
2666
2667#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2669pub enum AgentBookmarkKind {
2670 #[default]
2671 #[serde(rename = "user")]
2672 User,
2673 #[serde(rename = "assistant")]
2674 Assistant,
2675 #[serde(untagged)]
2677 Other(String),
2678}
2679
2680impl AgentBookmarkKind {
2681 pub fn as_str(&self) -> &str {
2683 match self {
2684 Self::User => "user",
2685 Self::Assistant => "assistant",
2686 Self::Other(value) => value.as_str(),
2687 }
2688 }
2689}
2690
2691impl std::fmt::Display for AgentBookmarkKind {
2692 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2693 f.write_str(self.as_str())
2694 }
2695}
2696
2697impl From<&str> for AgentBookmarkKind {
2698 fn from(value: &str) -> Self {
2699 match value {
2700 "user" => Self::User,
2701 "assistant" => Self::Assistant,
2702 other => Self::Other(other.to_string()),
2703 }
2704 }
2705}
2706
2707#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2709pub struct AgentBridgeState {
2710 pub online_machines: i64,
2711 pub total_machines: i64,
2712 pub platforms: Vec<String>,
2713 pub working_directories: Vec<String>,
2714 pub machine_names: Vec<String>,
2715 pub latest_heartbeat: String,
2716 pub installed_specs: Vec<BridgeInstalledSpec>,
2717}
2718
2719#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2722pub struct AgentCapabilities {
2723 pub agent_id: String,
2724 pub skills: Vec<AgentCapabilitiesSkill>,
2725 pub constraints: AgentCapabilitiesConstraints,
2726 pub tools: Vec<String>,
2727 pub kb_ids: Vec<String>,
2728 pub updated_at: String,
2729}
2730
2731#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2733pub struct AgentCapabilitiesConstraints {
2734 #[serde(default, skip_serializing_if = "Option::is_none")]
2735 pub max_context_tokens: Option<i64>,
2736 #[serde(default, skip_serializing_if = "Option::is_none")]
2737 pub rate_limit_rpm: Option<i64>,
2738 #[serde(default, skip_serializing_if = "Option::is_none")]
2739 pub supported_languages: Option<Vec<String>>,
2740}
2741
2742#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2744pub struct AgentCapabilitiesSkill {
2745 pub id: String,
2746 pub name: String,
2747 #[serde(default, skip_serializing_if = "Option::is_none")]
2748 pub description: Option<String>,
2749 #[serde(default, skip_serializing_if = "Option::is_none")]
2750 pub input_types: Option<Vec<String>>,
2751 #[serde(default, skip_serializing_if = "Option::is_none")]
2752 pub output_types: Option<Vec<String>>,
2753}
2754
2755#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2757pub struct AgentCommandRelationships {
2758 #[serde(default, skip_serializing_if = "Option::is_none")]
2760 pub opcon: Option<String>,
2761 #[serde(default, skip_serializing_if = "Option::is_none")]
2762 pub coordinates_with: Option<Vec<String>>,
2763}
2764
2765#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2767pub enum AgentContextStrategy {
2768 #[default]
2769 #[serde(rename = "compaction")]
2770 Compaction,
2771 #[serde(rename = "summarize")]
2772 Summarize,
2773 #[serde(rename = "truncate")]
2774 Truncate,
2775 #[serde(rename = "sliding_window")]
2776 SlidingWindow,
2777 #[serde(untagged)]
2779 Other(String),
2780}
2781
2782impl AgentContextStrategy {
2783 pub fn as_str(&self) -> &str {
2785 match self {
2786 Self::Compaction => "compaction",
2787 Self::Summarize => "summarize",
2788 Self::Truncate => "truncate",
2789 Self::SlidingWindow => "sliding_window",
2790 Self::Other(value) => value.as_str(),
2791 }
2792 }
2793}
2794
2795impl std::fmt::Display for AgentContextStrategy {
2796 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2797 f.write_str(self.as_str())
2798 }
2799}
2800
2801impl From<&str> for AgentContextStrategy {
2802 fn from(value: &str) -> Self {
2803 match value {
2804 "compaction" => Self::Compaction,
2805 "summarize" => Self::Summarize,
2806 "truncate" => Self::Truncate,
2807 "sliding_window" => Self::SlidingWindow,
2808 other => Self::Other(other.to_string()),
2809 }
2810 }
2811}
2812
2813#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2815pub enum AgentExecutionMode {
2816 #[default]
2817 #[serde(rename = "async")]
2818 Async,
2819 #[serde(rename = "worker")]
2820 Worker,
2821 #[serde(rename = "bridge")]
2822 Bridge,
2823 #[serde(untagged)]
2825 Other(String),
2826}
2827
2828impl AgentExecutionMode {
2829 pub fn as_str(&self) -> &str {
2831 match self {
2832 Self::Async => "async",
2833 Self::Worker => "worker",
2834 Self::Bridge => "bridge",
2835 Self::Other(value) => value.as_str(),
2836 }
2837 }
2838}
2839
2840impl std::fmt::Display for AgentExecutionMode {
2841 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2842 f.write_str(self.as_str())
2843 }
2844}
2845
2846impl From<&str> for AgentExecutionMode {
2847 fn from(value: &str) -> Self {
2848 match value {
2849 "async" => Self::Async,
2850 "worker" => Self::Worker,
2851 "bridge" => Self::Bridge,
2852 other => Self::Other(other.to_string()),
2853 }
2854 }
2855}
2856
2857#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2859pub struct AgentIntegration {
2860 pub id: String,
2861 pub agent_id: String,
2862 #[serde(default, skip_serializing_if = "Option::is_none")]
2863 pub tenant_id: Option<String>,
2864 pub connector_id: String,
2865 pub name: String,
2866 pub status: IntegrationStatus,
2867 #[serde(default, skip_serializing_if = "Option::is_none")]
2869 pub config: Option<serde_json::Map<String, serde_json::Value>>,
2870 #[serde(default, skip_serializing_if = "Option::is_none")]
2871 pub created_at: Option<String>,
2872 #[serde(default, skip_serializing_if = "Option::is_none")]
2873 pub updated_at: Option<String>,
2874}
2875
2876#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2878pub struct AgentLineage {
2879 pub agent_id: String,
2880 pub chain: Vec<String>,
2882 pub depth: i64,
2883 #[serde(default, skip_serializing_if = "Option::is_none")]
2884 pub parent_id: Option<String>,
2885 pub spawned_by: String,
2886 #[serde(default, skip_serializing_if = "Option::is_none")]
2887 pub spawned_at: Option<String>,
2888}
2889
2890#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2892pub struct AgentMessage {
2893 pub message_id: String,
2894 pub thread_id: String,
2895 pub from_agent_id: String,
2896 pub to_agent_id: String,
2897 pub message: String,
2898 pub created_at: String,
2899 #[serde(default, skip_serializing_if = "Option::is_none")]
2901 pub signature: Option<String>,
2902 #[serde(default, skip_serializing_if = "Option::is_none")]
2904 pub precedence: Option<AgentMessagePrecedence>,
2905}
2906
2907#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
2909pub enum AgentMessagePrecedence {
2910 #[default]
2911 #[serde(rename = "flash")]
2912 Flash,
2913 #[serde(rename = "immediate")]
2914 Immediate,
2915 #[serde(rename = "priority")]
2916 Priority,
2917 #[serde(rename = "routine")]
2918 Routine,
2919 #[serde(untagged)]
2921 Other(String),
2922}
2923
2924impl AgentMessagePrecedence {
2925 pub fn as_str(&self) -> &str {
2927 match self {
2928 Self::Flash => "flash",
2929 Self::Immediate => "immediate",
2930 Self::Priority => "priority",
2931 Self::Routine => "routine",
2932 Self::Other(value) => value.as_str(),
2933 }
2934 }
2935}
2936
2937impl std::fmt::Display for AgentMessagePrecedence {
2938 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2939 f.write_str(self.as_str())
2940 }
2941}
2942
2943impl From<&str> for AgentMessagePrecedence {
2944 fn from(value: &str) -> Self {
2945 match value {
2946 "flash" => Self::Flash,
2947 "immediate" => Self::Immediate,
2948 "priority" => Self::Priority,
2949 "routine" => Self::Routine,
2950 other => Self::Other(other.to_string()),
2951 }
2952 }
2953}
2954
2955#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2957pub struct AgentMetadata {
2958 #[serde(default, skip_serializing_if = "Option::is_none")]
2959 pub ui: Option<AgentMetadataUi>,
2960 #[serde(flatten)]
2962 pub extra: HashMap<String, serde_json::Value>,
2963}
2964
2965#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2970pub struct AgentMetadataUi {
2971 #[serde(default, skip_serializing_if = "Option::is_none")]
2974 pub avatar: Option<AgentMetadataUiAvatar>,
2975 #[serde(default, skip_serializing_if = "Option::is_none")]
2976 pub drop_genome: Option<DropGenome>,
2977 #[serde(default, skip_serializing_if = "Option::is_none")]
2981 pub drop_genome_source: Option<AgentMetadataUiDropGenomeSource>,
2982}
2983
2984#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2987pub struct AgentMetadataUiAvatar {
2988 #[serde(default, skip_serializing_if = "Option::is_none")]
2989 pub protocol: Option<String>,
2990 #[serde(default, skip_serializing_if = "Option::is_none")]
2991 pub variant: Option<i64>,
2992 #[serde(default, skip_serializing_if = "Option::is_none")]
2993 pub hue: Option<f64>,
2994}
2995
2996#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3000pub enum AgentMetadataUiDropGenomeSource {
3001 #[default]
3002 #[serde(rename = "llm")]
3003 LLM,
3004 #[serde(rename = "fallback")]
3005 Fallback,
3006 #[serde(untagged)]
3008 Other(String),
3009}
3010
3011impl AgentMetadataUiDropGenomeSource {
3012 pub fn as_str(&self) -> &str {
3014 match self {
3015 Self::LLM => "llm",
3016 Self::Fallback => "fallback",
3017 Self::Other(value) => value.as_str(),
3018 }
3019 }
3020}
3021
3022impl std::fmt::Display for AgentMetadataUiDropGenomeSource {
3023 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3024 f.write_str(self.as_str())
3025 }
3026}
3027
3028impl From<&str> for AgentMetadataUiDropGenomeSource {
3029 fn from(value: &str) -> Self {
3030 match value {
3031 "llm" => Self::LLM,
3032 "fallback" => Self::Fallback,
3033 other => Self::Other(other.to_string()),
3034 }
3035 }
3036}
3037
3038#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3041pub struct AgentModelConfig {
3042 #[serde(default, skip_serializing_if = "Option::is_none")]
3045 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
3046}
3047
3048#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3051pub struct AgentModelConfigInput {
3052 #[serde(default, skip_serializing_if = "Option::is_none")]
3053 pub provider: Option<String>,
3054 #[serde(default, skip_serializing_if = "Option::is_none")]
3055 pub model_ref: Option<String>,
3056 #[serde(default, skip_serializing_if = "Option::is_none")]
3057 pub endpoint_url: Option<String>,
3058 #[serde(default, skip_serializing_if = "Option::is_none")]
3059 pub api_key_ref: Option<String>,
3060 #[serde(default, skip_serializing_if = "Option::is_none")]
3061 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
3062}
3063
3064#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3066pub struct AgentPrompts {
3067 #[serde(default, skip_serializing_if = "Option::is_none")]
3068 pub system: Option<String>,
3069 #[serde(default, skip_serializing_if = "Option::is_none")]
3070 pub developer: Option<String>,
3071}
3072
3073#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3075pub struct AgentPublicConfig {
3076 pub enabled: bool,
3080 #[serde(default, skip_serializing_if = "Option::is_none")]
3081 pub system_prompt: Option<String>,
3082 #[serde(default, skip_serializing_if = "Option::is_none")]
3083 pub greeting: Option<String>,
3084 #[serde(default, skip_serializing_if = "Option::is_none")]
3085 pub allowed_tools: Option<Vec<String>>,
3086 #[serde(default, skip_serializing_if = "Option::is_none")]
3087 pub max_messages_per_session: Option<i64>,
3088 #[serde(default, skip_serializing_if = "Option::is_none")]
3089 pub max_concurrent_sessions: Option<i64>,
3090 #[serde(default, skip_serializing_if = "Option::is_none")]
3091 pub rate_limit_sessions_per_ip: Option<i64>,
3092 #[serde(default, skip_serializing_if = "Option::is_none")]
3093 pub rate_limit_messages_per_min: Option<i64>,
3094 #[serde(default, skip_serializing_if = "Option::is_none")]
3100 pub daily_message_limit: Option<i64>,
3101}
3102
3103#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3105pub struct AgentScheduleConfig {
3106 pub cron: String,
3107 pub enabled: bool,
3108 pub timezone: String,
3110 pub input: serde_json::Map<String, serde_json::Value>,
3111 pub max_concurrent_scheduled: i64,
3112 pub on_failure: AgentScheduleConfigOnFailure,
3113 #[serde(default, skip_serializing_if = "Option::is_none")]
3114 pub autonomous_mode: Option<bool>,
3115 #[serde(default, skip_serializing_if = "Option::is_none")]
3116 pub reflection_prompt: Option<String>,
3117}
3118
3119#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3121pub enum AgentScheduleConfigOnFailure {
3122 #[default]
3123 #[serde(rename = "retry_next")]
3124 RetryNext,
3125 #[serde(rename = "pause_schedule")]
3126 PauseSchedule,
3127 #[serde(rename = "notify")]
3128 Notify,
3129 #[serde(untagged)]
3131 Other(String),
3132}
3133
3134impl AgentScheduleConfigOnFailure {
3135 pub fn as_str(&self) -> &str {
3137 match self {
3138 Self::RetryNext => "retry_next",
3139 Self::PauseSchedule => "pause_schedule",
3140 Self::Notify => "notify",
3141 Self::Other(value) => value.as_str(),
3142 }
3143 }
3144}
3145
3146impl std::fmt::Display for AgentScheduleConfigOnFailure {
3147 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3148 f.write_str(self.as_str())
3149 }
3150}
3151
3152impl From<&str> for AgentScheduleConfigOnFailure {
3153 fn from(value: &str) -> Self {
3154 match value {
3155 "retry_next" => Self::RetryNext,
3156 "pause_schedule" => Self::PauseSchedule,
3157 "notify" => Self::Notify,
3158 other => Self::Other(other.to_string()),
3159 }
3160 }
3161}
3162
3163#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3165pub struct AgentScorer {
3166 pub scorer_id: String,
3167 pub agent_id: String,
3168 pub tenant_id: String,
3169 pub name: String,
3170 pub config: AgentScorerConfig,
3171 pub created_at: String,
3172}
3173
3174#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3176pub struct AgentScorerConfig {
3177 pub r#type: AgentScorerConfigType,
3178 pub url: String,
3179 #[serde(default, skip_serializing_if = "Option::is_none")]
3180 pub timeout_ms: Option<i64>,
3181 #[serde(flatten)]
3183 pub extra: HashMap<String, serde_json::Value>,
3184}
3185
3186#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3188pub enum AgentScorerConfigType {
3189 #[default]
3190 #[serde(rename = "webhook")]
3191 Webhook,
3192 #[serde(untagged)]
3194 Other(String),
3195}
3196
3197impl AgentScorerConfigType {
3198 pub fn as_str(&self) -> &str {
3200 match self {
3201 Self::Webhook => "webhook",
3202 Self::Other(value) => value.as_str(),
3203 }
3204 }
3205}
3206
3207impl std::fmt::Display for AgentScorerConfigType {
3208 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3209 f.write_str(self.as_str())
3210 }
3211}
3212
3213impl From<&str> for AgentScorerConfigType {
3214 fn from(value: &str) -> Self {
3215 match value {
3216 "webhook" => Self::Webhook,
3217 other => Self::Other(other.to_string()),
3218 }
3219 }
3220}
3221
3222#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3224pub struct AgentSpec {
3225 pub spec_id: String,
3226 #[serde(default, skip_serializing_if = "Option::is_none")]
3227 pub version: Option<String>,
3228 #[serde(default, skip_serializing_if = "Option::is_none")]
3230 pub enabled: Option<bool>,
3231 #[serde(default, skip_serializing_if = "Option::is_none")]
3232 pub permissions_granted: Option<Vec<AgentSpecPermissionsGrantedItem>>,
3233}
3234
3235#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3237pub struct AgentSpecPermissionsGrantedItem {
3238 pub cap: String,
3239 #[serde(default, skip_serializing_if = "Option::is_none")]
3240 pub scope: Option<String>,
3241 #[serde(default, skip_serializing_if = "Option::is_none")]
3242 pub reason: Option<String>,
3243 pub granted_by: AgentSpecPermissionsGrantedItemGrantedBy,
3244 pub granted_at: String,
3245}
3246
3247#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3249pub enum AgentSpecPermissionsGrantedItemGrantedBy {
3250 #[default]
3251 #[serde(rename = "wizard")]
3252 Wizard,
3253 #[serde(rename = "admin")]
3254 Admin,
3255 #[serde(rename = "bootstrap")]
3256 Bootstrap,
3257 #[serde(rename = "migrated")]
3258 Migrated,
3259 #[serde(untagged)]
3261 Other(String),
3262}
3263
3264impl AgentSpecPermissionsGrantedItemGrantedBy {
3265 pub fn as_str(&self) -> &str {
3267 match self {
3268 Self::Wizard => "wizard",
3269 Self::Admin => "admin",
3270 Self::Bootstrap => "bootstrap",
3271 Self::Migrated => "migrated",
3272 Self::Other(value) => value.as_str(),
3273 }
3274 }
3275}
3276
3277impl std::fmt::Display for AgentSpecPermissionsGrantedItemGrantedBy {
3278 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3279 f.write_str(self.as_str())
3280 }
3281}
3282
3283impl From<&str> for AgentSpecPermissionsGrantedItemGrantedBy {
3284 fn from(value: &str) -> Self {
3285 match value {
3286 "wizard" => Self::Wizard,
3287 "admin" => Self::Admin,
3288 "bootstrap" => Self::Bootstrap,
3289 "migrated" => Self::Migrated,
3290 other => Self::Other(other.to_string()),
3291 }
3292 }
3293}
3294
3295#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3297pub enum AgentStatus {
3298 #[default]
3299 #[serde(rename = "active")]
3300 Active,
3301 #[serde(rename = "suspended")]
3302 Suspended,
3303 #[serde(rename = "terminated")]
3304 Terminated,
3305 #[serde(rename = "deposed")]
3306 Deposed,
3307 #[serde(untagged)]
3309 Other(String),
3310}
3311
3312impl AgentStatus {
3313 pub fn as_str(&self) -> &str {
3315 match self {
3316 Self::Active => "active",
3317 Self::Suspended => "suspended",
3318 Self::Terminated => "terminated",
3319 Self::Deposed => "deposed",
3320 Self::Other(value) => value.as_str(),
3321 }
3322 }
3323}
3324
3325impl std::fmt::Display for AgentStatus {
3326 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3327 f.write_str(self.as_str())
3328 }
3329}
3330
3331impl From<&str> for AgentStatus {
3332 fn from(value: &str) -> Self {
3333 match value {
3334 "active" => Self::Active,
3335 "suspended" => Self::Suspended,
3336 "terminated" => Self::Terminated,
3337 "deposed" => Self::Deposed,
3338 other => Self::Other(other.to_string()),
3339 }
3340 }
3341}
3342
3343#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3347pub enum AgentStatusReasonCode {
3348 #[default]
3349 #[serde(rename = "manual")]
3350 Manual,
3351 #[serde(rename = "proposal_passed")]
3352 ProposalPassed,
3353 #[serde(rename = "arbiter_ruling")]
3354 ArbiterRuling,
3355 #[serde(rename = "arbiter_penalty")]
3356 ArbiterPenalty,
3357 #[serde(rename = "constitutional_penalty")]
3358 ConstitutionalPenalty,
3359 #[serde(rename = "plan_downgrade")]
3360 PlanDowngrade,
3361 #[serde(untagged)]
3363 Other(String),
3364}
3365
3366impl AgentStatusReasonCode {
3367 pub fn as_str(&self) -> &str {
3369 match self {
3370 Self::Manual => "manual",
3371 Self::ProposalPassed => "proposal_passed",
3372 Self::ArbiterRuling => "arbiter_ruling",
3373 Self::ArbiterPenalty => "arbiter_penalty",
3374 Self::ConstitutionalPenalty => "constitutional_penalty",
3375 Self::PlanDowngrade => "plan_downgrade",
3376 Self::Other(value) => value.as_str(),
3377 }
3378 }
3379}
3380
3381impl std::fmt::Display for AgentStatusReasonCode {
3382 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3383 f.write_str(self.as_str())
3384 }
3385}
3386
3387impl From<&str> for AgentStatusReasonCode {
3388 fn from(value: &str) -> Self {
3389 match value {
3390 "manual" => Self::Manual,
3391 "proposal_passed" => Self::ProposalPassed,
3392 "arbiter_ruling" => Self::ArbiterRuling,
3393 "arbiter_penalty" => Self::ArbiterPenalty,
3394 "constitutional_penalty" => Self::ConstitutionalPenalty,
3395 "plan_downgrade" => Self::PlanDowngrade,
3396 other => Self::Other(other.to_string()),
3397 }
3398 }
3399}
3400
3401#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3403pub struct AgentSummary {
3404 pub agent_id: String,
3405 pub tenant_id: String,
3406 pub name: String,
3407 pub execution_mode: AgentSummaryExecutionMode,
3408 pub status: String,
3409 #[serde(default, skip_serializing_if = "Option::is_none")]
3410 pub bridge_status: Option<AgentSummaryBridgeStatus>,
3411 #[serde(default, skip_serializing_if = "Option::is_none")]
3412 pub machine_count: Option<i64>,
3413 #[serde(default, skip_serializing_if = "Option::is_none")]
3414 pub runs: Option<i64>,
3415 #[serde(default, skip_serializing_if = "Option::is_none")]
3416 pub cost_usd: Option<f64>,
3417 #[serde(default, skip_serializing_if = "Option::is_none")]
3418 pub tokens: Option<i64>,
3419}
3420
3421#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3423pub enum AgentSummaryBridgeStatus {
3424 #[default]
3425 #[serde(rename = "online")]
3426 Online,
3427 #[serde(rename = "stale")]
3428 Stale,
3429 #[serde(rename = "offline")]
3430 Offline,
3431 #[serde(untagged)]
3433 Other(String),
3434}
3435
3436impl AgentSummaryBridgeStatus {
3437 pub fn as_str(&self) -> &str {
3439 match self {
3440 Self::Online => "online",
3441 Self::Stale => "stale",
3442 Self::Offline => "offline",
3443 Self::Other(value) => value.as_str(),
3444 }
3445 }
3446}
3447
3448impl std::fmt::Display for AgentSummaryBridgeStatus {
3449 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3450 f.write_str(self.as_str())
3451 }
3452}
3453
3454impl From<&str> for AgentSummaryBridgeStatus {
3455 fn from(value: &str) -> Self {
3456 match value {
3457 "online" => Self::Online,
3458 "stale" => Self::Stale,
3459 "offline" => Self::Offline,
3460 other => Self::Other(other.to_string()),
3461 }
3462 }
3463}
3464
3465#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3467pub enum AgentSummaryExecutionMode {
3468 #[default]
3469 #[serde(rename = "async")]
3470 Async,
3471 #[serde(rename = "worker")]
3472 Worker,
3473 #[serde(rename = "bridge")]
3474 Bridge,
3475 #[serde(rename = "cloud")]
3476 Cloud,
3477 #[serde(untagged)]
3479 Other(String),
3480}
3481
3482impl AgentSummaryExecutionMode {
3483 pub fn as_str(&self) -> &str {
3485 match self {
3486 Self::Async => "async",
3487 Self::Worker => "worker",
3488 Self::Bridge => "bridge",
3489 Self::Cloud => "cloud",
3490 Self::Other(value) => value.as_str(),
3491 }
3492 }
3493}
3494
3495impl std::fmt::Display for AgentSummaryExecutionMode {
3496 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3497 f.write_str(self.as_str())
3498 }
3499}
3500
3501impl From<&str> for AgentSummaryExecutionMode {
3502 fn from(value: &str) -> Self {
3503 match value {
3504 "async" => Self::Async,
3505 "worker" => Self::Worker,
3506 "bridge" => Self::Bridge,
3507 "cloud" => Self::Cloud,
3508 other => Self::Other(other.to_string()),
3509 }
3510 }
3511}
3512
3513#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3515pub struct AgentToolOverride {
3516 pub tool_name: String,
3517 pub trust_level: AgentToolOverrideTrustLevel,
3518}
3519
3520#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3522pub enum AgentToolOverrideTrustLevel {
3523 #[default]
3524 #[serde(rename = "always_allow")]
3525 AlwaysAllow,
3526 #[serde(rename = "ask_first")]
3527 AskFirst,
3528 #[serde(rename = "never_allow")]
3529 NeverAllow,
3530 #[serde(untagged)]
3532 Other(String),
3533}
3534
3535impl AgentToolOverrideTrustLevel {
3536 pub fn as_str(&self) -> &str {
3538 match self {
3539 Self::AlwaysAllow => "always_allow",
3540 Self::AskFirst => "ask_first",
3541 Self::NeverAllow => "never_allow",
3542 Self::Other(value) => value.as_str(),
3543 }
3544 }
3545}
3546
3547impl std::fmt::Display for AgentToolOverrideTrustLevel {
3548 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3549 f.write_str(self.as_str())
3550 }
3551}
3552
3553impl From<&str> for AgentToolOverrideTrustLevel {
3554 fn from(value: &str) -> Self {
3555 match value {
3556 "always_allow" => Self::AlwaysAllow,
3557 "ask_first" => Self::AskFirst,
3558 "never_allow" => Self::NeverAllow,
3559 other => Self::Other(other.to_string()),
3560 }
3561 }
3562}
3563
3564#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3566pub struct AgentToolOverrideUpdate {
3567 pub tool_name: String,
3568 pub trust_level: AgentToolOverrideTrustLevel,
3569}
3570
3571#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3575pub struct AgentUpdate {
3576 #[serde(default, skip_serializing_if = "Option::is_none")]
3577 pub name: Option<String>,
3578 #[serde(default, skip_serializing_if = "Option::is_none")]
3579 pub description: Option<String>,
3580 #[serde(default, skip_serializing_if = "Option::is_none")]
3585 pub prompts: Option<serde_json::Map<String, serde_json::Value>>,
3586 #[serde(default, skip_serializing_if = "Option::is_none")]
3587 pub model: Option<AgentModelConfigInput>,
3588 #[serde(default, skip_serializing_if = "Option::is_none")]
3593 pub specs: Option<Vec<serde_json::Map<String, serde_json::Value>>>,
3594 #[serde(default, skip_serializing_if = "Option::is_none")]
3597 pub approval_required_tools: Option<Vec<String>>,
3598 #[serde(default, skip_serializing_if = "Option::is_none")]
3601 pub auto_approve_tools: Option<Vec<String>>,
3602 #[serde(default, skip_serializing_if = "Option::is_none")]
3603 pub knowledge_base_id: Option<String>,
3604 #[serde(default, skip_serializing_if = "Option::is_none")]
3610 pub knowledge_base_ids: Option<Vec<String>>,
3611 #[serde(default, skip_serializing_if = "Option::is_none")]
3612 pub workspace_id: Option<String>,
3613 #[serde(default, skip_serializing_if = "Option::is_none")]
3614 pub visibility: Option<AgentUpdateVisibility>,
3615 #[serde(default, skip_serializing_if = "Option::is_none")]
3620 pub public_config: Option<AgentUpdatePublicConfig>,
3621}
3622
3623#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3628pub struct AgentUpdatePublicConfig {
3629 pub enabled: bool,
3633 #[serde(default, skip_serializing_if = "Option::is_none")]
3634 pub system_prompt: Option<String>,
3635 #[serde(default, skip_serializing_if = "Option::is_none")]
3636 pub greeting: Option<String>,
3637 #[serde(default, skip_serializing_if = "Option::is_none")]
3638 pub allowed_tools: Option<Vec<String>>,
3639 #[serde(default, skip_serializing_if = "Option::is_none")]
3640 pub max_messages_per_session: Option<i64>,
3641 #[serde(default, skip_serializing_if = "Option::is_none")]
3642 pub max_concurrent_sessions: Option<i64>,
3643 #[serde(default, skip_serializing_if = "Option::is_none")]
3644 pub rate_limit_sessions_per_ip: Option<i64>,
3645 #[serde(default, skip_serializing_if = "Option::is_none")]
3646 pub rate_limit_messages_per_min: Option<i64>,
3647 #[serde(default, skip_serializing_if = "Option::is_none")]
3653 pub daily_message_limit: Option<i64>,
3654}
3655
3656#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3658pub enum AgentUpdateVisibility {
3659 #[default]
3660 #[serde(rename = "private")]
3661 Private,
3662 #[serde(rename = "team")]
3663 Team,
3664 #[serde(rename = "public")]
3665 Public,
3666 #[serde(untagged)]
3668 Other(String),
3669}
3670
3671impl AgentUpdateVisibility {
3672 pub fn as_str(&self) -> &str {
3674 match self {
3675 Self::Private => "private",
3676 Self::Team => "team",
3677 Self::Public => "public",
3678 Self::Other(value) => value.as_str(),
3679 }
3680 }
3681}
3682
3683impl std::fmt::Display for AgentUpdateVisibility {
3684 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3685 f.write_str(self.as_str())
3686 }
3687}
3688
3689impl From<&str> for AgentUpdateVisibility {
3690 fn from(value: &str) -> Self {
3691 match value {
3692 "private" => Self::Private,
3693 "team" => Self::Team,
3694 "public" => Self::Public,
3695 other => Self::Other(other.to_string()),
3696 }
3697 }
3698}
3699
3700#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3702pub struct AgentVersion {
3703 pub version_id: String,
3704 pub agent_id: String,
3705 #[serde(default, skip_serializing_if = "Option::is_none")]
3706 pub tenant_id: Option<String>,
3707 pub version: i64,
3708 #[serde(default, skip_serializing_if = "Option::is_none")]
3724 pub changelog: Option<String>,
3725 pub created_at: String,
3726 #[serde(default, skip_serializing_if = "Option::is_none")]
3727 pub created_by: Option<String>,
3728 #[serde(default, skip_serializing_if = "Option::is_none")]
3731 pub config: Option<serde_json::Map<String, serde_json::Value>>,
3732}
3733
3734#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3736pub struct AiSystemCard {
3737 pub system_name: String,
3738 pub provider: String,
3739 pub version: String,
3740 #[serde(default, skip_serializing_if = "Option::is_none")]
3741 pub risk_classification: Option<RiskClassification>,
3742 pub intended_purpose: String,
3743 pub technical_specifications: AiSystemCardTechnicalSpecifications,
3744 #[serde(default, skip_serializing_if = "Option::is_none")]
3745 pub training_data_summary: Option<String>,
3746 #[serde(default, skip_serializing_if = "Option::is_none")]
3747 pub performance_metrics: Option<serde_json::Map<String, serde_json::Value>>,
3748 pub limitations: Vec<String>,
3749 pub guardrails_summary: Vec<String>,
3750 pub human_oversight_measures: Vec<String>,
3751 pub generated_at: String,
3752}
3753
3754#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3756pub struct AiSystemCardTechnicalSpecifications {
3757 #[serde(default, skip_serializing_if = "Option::is_none")]
3758 pub model_provider: Option<String>,
3759 #[serde(default, skip_serializing_if = "Option::is_none")]
3760 pub model_ref: Option<String>,
3761 #[serde(default, skip_serializing_if = "Option::is_none")]
3762 pub max_context_tokens: Option<i64>,
3763 #[serde(default, skip_serializing_if = "Option::is_none")]
3764 pub built_in_tools: Option<Vec<String>>,
3765 #[serde(default, skip_serializing_if = "Option::is_none")]
3766 pub guardrails_enabled: Option<bool>,
3767 #[serde(default, skip_serializing_if = "Option::is_none")]
3768 pub guardrail_ids: Option<Vec<String>>,
3769}
3770
3771#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3773pub struct Ambassador {
3774 pub ambassador_id: String,
3775 pub tenant_id: String,
3776 pub name: String,
3777 pub role: AmbassadorRole,
3778 pub permissions: AmbassadorPermissions,
3779 pub created_at: String,
3780}
3781
3782#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3784pub struct AmbassadorPermissions {
3785 pub can_veto: bool,
3786 pub can_audit: bool,
3787 pub can_propose: bool,
3788}
3789
3790#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3792pub struct AmbassadorRequest {
3793 pub request_id: String,
3794 pub tenant_id: String,
3795 pub from_agent_id: String,
3796 pub r#type: AmbassadorRequestType,
3797 pub subject: String,
3798 pub body: String,
3799 pub status: AmbassadorRequestStatus,
3800 #[serde(default, skip_serializing_if = "Option::is_none")]
3801 pub response: Option<String>,
3802 pub created_at: String,
3803 #[serde(default, skip_serializing_if = "Option::is_none")]
3804 pub resolved_at: Option<String>,
3805}
3806
3807#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3809pub enum AmbassadorRequestStatus {
3810 #[default]
3811 #[serde(rename = "pending")]
3812 Pending,
3813 #[serde(rename = "acknowledged")]
3814 Acknowledged,
3815 #[serde(rename = "resolved")]
3816 Resolved,
3817 #[serde(untagged)]
3819 Other(String),
3820}
3821
3822impl AmbassadorRequestStatus {
3823 pub fn as_str(&self) -> &str {
3825 match self {
3826 Self::Pending => "pending",
3827 Self::Acknowledged => "acknowledged",
3828 Self::Resolved => "resolved",
3829 Self::Other(value) => value.as_str(),
3830 }
3831 }
3832}
3833
3834impl std::fmt::Display for AmbassadorRequestStatus {
3835 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3836 f.write_str(self.as_str())
3837 }
3838}
3839
3840impl From<&str> for AmbassadorRequestStatus {
3841 fn from(value: &str) -> Self {
3842 match value {
3843 "pending" => Self::Pending,
3844 "acknowledged" => Self::Acknowledged,
3845 "resolved" => Self::Resolved,
3846 other => Self::Other(other.to_string()),
3847 }
3848 }
3849}
3850
3851#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3853pub enum AmbassadorRequestType {
3854 #[default]
3855 #[serde(rename = "clarification")]
3856 Clarification,
3857 #[serde(rename = "approval")]
3858 Approval,
3859 #[serde(rename = "escalation")]
3860 Escalation,
3861 #[serde(rename = "report")]
3862 Report,
3863 #[serde(untagged)]
3865 Other(String),
3866}
3867
3868impl AmbassadorRequestType {
3869 pub fn as_str(&self) -> &str {
3871 match self {
3872 Self::Clarification => "clarification",
3873 Self::Approval => "approval",
3874 Self::Escalation => "escalation",
3875 Self::Report => "report",
3876 Self::Other(value) => value.as_str(),
3877 }
3878 }
3879}
3880
3881impl std::fmt::Display for AmbassadorRequestType {
3882 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3883 f.write_str(self.as_str())
3884 }
3885}
3886
3887impl From<&str> for AmbassadorRequestType {
3888 fn from(value: &str) -> Self {
3889 match value {
3890 "clarification" => Self::Clarification,
3891 "approval" => Self::Approval,
3892 "escalation" => Self::Escalation,
3893 "report" => Self::Report,
3894 other => Self::Other(other.to_string()),
3895 }
3896 }
3897}
3898
3899#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
3901pub enum AmbassadorRole {
3902 #[default]
3903 #[serde(rename = "founder")]
3904 Founder,
3905 #[serde(rename = "ambassador")]
3906 Ambassador,
3907 #[serde(rename = "observer")]
3908 Observer,
3909 #[serde(untagged)]
3911 Other(String),
3912}
3913
3914impl AmbassadorRole {
3915 pub fn as_str(&self) -> &str {
3917 match self {
3918 Self::Founder => "founder",
3919 Self::Ambassador => "ambassador",
3920 Self::Observer => "observer",
3921 Self::Other(value) => value.as_str(),
3922 }
3923 }
3924}
3925
3926impl std::fmt::Display for AmbassadorRole {
3927 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3928 f.write_str(self.as_str())
3929 }
3930}
3931
3932impl From<&str> for AmbassadorRole {
3933 fn from(value: &str) -> Self {
3934 match value {
3935 "founder" => Self::Founder,
3936 "ambassador" => Self::Ambassador,
3937 "observer" => Self::Observer,
3938 other => Self::Other(other.to_string()),
3939 }
3940 }
3941}
3942
3943#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3945pub struct AmbassadorVetoRequest {
3946 pub target_type: String,
3947 pub target_id: String,
3948 pub reason: String,
3949}
3950
3951#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3953pub struct AmendConstitutionRequest {
3954 pub rule_id: String,
3955 pub action: String,
3956 #[serde(default, skip_serializing_if = "Option::is_none")]
3957 pub rule: Option<serde_json::Map<String, serde_json::Value>>,
3958 #[serde(default, skip_serializing_if = "Option::is_none")]
3959 pub rationale: Option<String>,
3960}
3961
3962#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3964pub struct AnalyticsTimeseriesPoint {
3965 pub date: String,
3966 pub landing_visit: i64,
3967 pub page_view: i64,
3968 pub otp_requested: i64,
3969 pub signup: i64,
3970 pub login: i64,
3971 pub app_open: i64,
3972 pub activated: i64,
3973 pub checkout_started: i64,
3974 pub subscribed: i64,
3975}
3976
3977#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3979pub struct AnalyticsTopValue {
3980 pub value: String,
3981 pub count: i64,
3982}
3983
3984#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
3986pub struct AndroidTester {
3987 pub email: String,
3988 #[serde(default, skip_serializing_if = "Option::is_none")]
3989 pub source: Option<String>,
3990 #[serde(default, skip_serializing_if = "Option::is_none")]
3992 pub first_ip_hash: Option<String>,
3993 pub created_at: String,
3994 pub emails_sent: i64,
3995 #[serde(default)]
3998 pub emailed_at: Option<String>,
3999 #[serde(default, skip_serializing_if = "Option::is_none")]
4000 pub send_failures: Option<i64>,
4001}
4002
4003#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4005pub struct AndroidTesterSignupResult {
4006 pub ok: bool,
4007 pub already_registered: bool,
4008 pub emailed: bool,
4014}
4015
4016#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4018pub struct APIKeyResponse {
4019 #[serde(default, skip_serializing_if = "Option::is_none")]
4020 pub key_id: Option<String>,
4021 #[serde(default, skip_serializing_if = "Option::is_none")]
4022 pub prefix: Option<String>,
4023 #[serde(default, skip_serializing_if = "Option::is_none")]
4025 pub raw_key: Option<String>,
4026 #[serde(default, skip_serializing_if = "Option::is_none")]
4027 pub name: Option<String>,
4028 #[serde(default, skip_serializing_if = "Option::is_none")]
4029 pub scopes: Option<Vec<String>>,
4030 #[serde(default, skip_serializing_if = "Option::is_none")]
4031 pub created_at: Option<String>,
4032 #[serde(default, skip_serializing_if = "Option::is_none")]
4033 pub warning: Option<String>,
4034}
4035
4036#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4038pub struct APIKeySummary {
4039 pub key_id: String,
4040 pub name: String,
4041 pub prefix: String,
4042 pub kind: APIKeySummaryKind,
4045 pub scopes: Vec<String>,
4046 pub status: APIKeySummaryStatus,
4047 pub created_at: String,
4048 #[serde(default, skip_serializing_if = "Option::is_none")]
4049 pub expires_at: Option<String>,
4050 #[serde(default, skip_serializing_if = "Option::is_none")]
4051 pub last_used_at: Option<String>,
4052}
4053
4054#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4057pub enum APIKeySummaryKind {
4058 #[default]
4059 #[serde(rename = "session")]
4060 Session,
4061 #[serde(rename = "api_key")]
4062 APIKey,
4063 #[serde(untagged)]
4065 Other(String),
4066}
4067
4068impl APIKeySummaryKind {
4069 pub fn as_str(&self) -> &str {
4071 match self {
4072 Self::Session => "session",
4073 Self::APIKey => "api_key",
4074 Self::Other(value) => value.as_str(),
4075 }
4076 }
4077}
4078
4079impl std::fmt::Display for APIKeySummaryKind {
4080 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4081 f.write_str(self.as_str())
4082 }
4083}
4084
4085impl From<&str> for APIKeySummaryKind {
4086 fn from(value: &str) -> Self {
4087 match value {
4088 "session" => Self::Session,
4089 "api_key" => Self::APIKey,
4090 other => Self::Other(other.to_string()),
4091 }
4092 }
4093}
4094
4095#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4097pub enum APIKeySummaryStatus {
4098 #[default]
4099 #[serde(rename = "active")]
4100 Active,
4101 #[serde(rename = "revoked")]
4102 Revoked,
4103 #[serde(untagged)]
4105 Other(String),
4106}
4107
4108impl APIKeySummaryStatus {
4109 pub fn as_str(&self) -> &str {
4111 match self {
4112 Self::Active => "active",
4113 Self::Revoked => "revoked",
4114 Self::Other(value) => value.as_str(),
4115 }
4116 }
4117}
4118
4119impl std::fmt::Display for APIKeySummaryStatus {
4120 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4121 f.write_str(self.as_str())
4122 }
4123}
4124
4125impl From<&str> for APIKeySummaryStatus {
4126 fn from(value: &str) -> Self {
4127 match value {
4128 "active" => Self::Active,
4129 "revoked" => Self::Revoked,
4130 other => Self::Other(other.to_string()),
4131 }
4132 }
4133}
4134
4135#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4137pub struct AppendDrawingOpsRequest {
4138 pub ops: Vec<AppendDrawingOpsRequestOp>,
4139}
4140
4141#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4143pub struct AppendDrawingOpsRequestOp {
4144 pub client_op_id: String,
4145 pub op: DrawingOp,
4146}
4147
4148#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4150pub struct AppendDrawingOpsResponse {
4151 pub items: Vec<AppendDrawingOpsResponseItem>,
4152 pub seq: i64,
4154}
4155
4156#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4158pub struct AppendDrawingOpsResponseItem {
4159 pub client_op_id: String,
4160 pub seq: i64,
4161}
4162
4163#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4165pub struct AppleNativeAuthRequest {
4166 pub identity_token: String,
4168 #[serde(default, skip_serializing_if = "Option::is_none")]
4170 pub user: Option<String>,
4171 #[serde(default, skip_serializing_if = "Option::is_none")]
4174 pub name: Option<String>,
4175 #[serde(default, skip_serializing_if = "Option::is_none")]
4177 pub device_label: Option<String>,
4178}
4179
4180#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4182pub struct AppleNativeAuthResponse {
4183 pub api_key: String,
4184 pub email: String,
4185}
4186
4187#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4189pub struct ApplyProgramRequest {
4190 pub session_id: String,
4191 pub start_date: String,
4192 #[serde(default, skip_serializing_if = "Option::is_none")]
4193 pub agent_id: Option<String>,
4194}
4195
4196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4198pub struct ApplyProgramResponse {
4199 pub applied: bool,
4200 pub program_id: String,
4201 pub todos: Vec<Todo>,
4202}
4203
4204#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4206pub struct ApproveRunResponse {
4207 pub approved: bool,
4208 pub run_id: String,
4209}
4210
4211#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4213pub struct ArbiterCase {
4214 pub case_id: String,
4215 pub tenant_id: String,
4216 pub filed_by: String,
4217 pub against_agent_id: String,
4218 pub rule_ids: Vec<String>,
4219 pub description: String,
4220 pub evidence: serde_json::Map<String, serde_json::Value>,
4221 pub status: ArbiterCaseStatus,
4222 #[serde(default, skip_serializing_if = "Option::is_none")]
4223 pub assigned_arbiter_id: Option<String>,
4224 pub created_at: String,
4225 pub deadline: String,
4226 pub updated_at: String,
4227}
4228
4229#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4231pub enum ArbiterCaseStatus {
4232 #[default]
4233 #[serde(rename = "open")]
4234 Open,
4235 #[serde(rename = "under_review")]
4236 UnderReview,
4237 #[serde(rename = "ruled")]
4238 Ruled,
4239 #[serde(rename = "appealed")]
4240 Appealed,
4241 #[serde(rename = "closed")]
4242 Closed,
4243 #[serde(untagged)]
4245 Other(String),
4246}
4247
4248impl ArbiterCaseStatus {
4249 pub fn as_str(&self) -> &str {
4251 match self {
4252 Self::Open => "open",
4253 Self::UnderReview => "under_review",
4254 Self::Ruled => "ruled",
4255 Self::Appealed => "appealed",
4256 Self::Closed => "closed",
4257 Self::Other(value) => value.as_str(),
4258 }
4259 }
4260}
4261
4262impl std::fmt::Display for ArbiterCaseStatus {
4263 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4264 f.write_str(self.as_str())
4265 }
4266}
4267
4268impl From<&str> for ArbiterCaseStatus {
4269 fn from(value: &str) -> Self {
4270 match value {
4271 "open" => Self::Open,
4272 "under_review" => Self::UnderReview,
4273 "ruled" => Self::Ruled,
4274 "appealed" => Self::Appealed,
4275 "closed" => Self::Closed,
4276 other => Self::Other(other.to_string()),
4277 }
4278 }
4279}
4280
4281#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4283pub struct ArbiterRegistry {
4284 #[serde(default, skip_serializing_if = "Option::is_none")]
4285 pub arbiter_agent_ids: Option<Vec<String>>,
4286 #[serde(default, skip_serializing_if = "Option::is_none")]
4287 pub max_appeals: Option<i64>,
4288 #[serde(default, skip_serializing_if = "Option::is_none")]
4289 pub panel_size: Option<i64>,
4290 #[serde(default, skip_serializing_if = "Option::is_none")]
4291 pub ruling_deadline_hours: Option<i64>,
4292 #[serde(default, skip_serializing_if = "Option::is_none")]
4293 pub tenant_id: Option<String>,
4294 #[serde(default, skip_serializing_if = "Option::is_none")]
4295 pub updated_at: Option<String>,
4296}
4297
4298#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4300pub struct Artifact {
4301 pub artifact_id: String,
4302 pub run_id: String,
4303 #[serde(default, skip_serializing_if = "Option::is_none")]
4304 pub tenant_id: Option<String>,
4305 pub name: String,
4306 pub mime_type: String,
4307 pub size_bytes: i64,
4308 #[serde(default, skip_serializing_if = "Option::is_none")]
4309 pub storage_ref: Option<String>,
4310 pub created_at: String,
4311}
4312
4313#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4315pub struct AssignWorkspaceRequest {
4316 #[serde(default, skip_serializing_if = "Option::is_none")]
4317 pub agent_id: Option<String>,
4318 #[serde(default, skip_serializing_if = "Option::is_none")]
4319 pub team_id: Option<String>,
4320 #[serde(default, skip_serializing_if = "Option::is_none")]
4321 pub company_id: Option<String>,
4322}
4323
4324#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4328pub struct AuditLogEntry {
4329 pub entry_id: String,
4330 pub action: String,
4331 pub actor_tenant_id: String,
4332 pub target_type: String,
4333 pub target_id: String,
4334 pub details: serde_json::Map<String, serde_json::Value>,
4335 pub ip_address: String,
4336 pub timestamp: String,
4337}
4338
4339#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4341pub struct AuthProvider {
4342 pub email: String,
4343 pub id: String,
4344 pub linked: bool,
4345 #[serde(default, skip_serializing_if = "Option::is_none")]
4346 pub linked_at: Option<String>,
4347 #[serde(default, skip_serializing_if = "Option::is_none")]
4348 pub sub: Option<String>,
4349}
4350
4351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4353pub struct AuthVerifyCodeRequest {
4354 pub email: String,
4356 pub code: String,
4358}
4359
4360#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4362pub struct AuthVerifyCodeResponse {
4363 pub api_key: String,
4365}
4366
4367#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4369pub struct Ballot {
4370 pub proposal_id: String,
4371 pub agent_id: String,
4372 pub vote: BallotVote,
4373 pub weight: f64,
4374 #[serde(default, skip_serializing_if = "Option::is_none")]
4375 pub reasoning: Option<String>,
4376 #[serde(default, skip_serializing_if = "Option::is_none")]
4377 pub signature: Option<String>,
4378 pub cast_at: String,
4379}
4380
4381#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4383pub enum BallotVote {
4384 #[default]
4385 #[serde(rename = "approve")]
4386 Approve,
4387 #[serde(rename = "reject")]
4388 Reject,
4389 #[serde(rename = "abstain")]
4390 Abstain,
4391 #[serde(untagged)]
4393 Other(String),
4394}
4395
4396impl BallotVote {
4397 pub fn as_str(&self) -> &str {
4399 match self {
4400 Self::Approve => "approve",
4401 Self::Reject => "reject",
4402 Self::Abstain => "abstain",
4403 Self::Other(value) => value.as_str(),
4404 }
4405 }
4406}
4407
4408impl std::fmt::Display for BallotVote {
4409 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4410 f.write_str(self.as_str())
4411 }
4412}
4413
4414impl From<&str> for BallotVote {
4415 fn from(value: &str) -> Self {
4416 match value {
4417 "approve" => Self::Approve,
4418 "reject" => Self::Reject,
4419 "abstain" => Self::Abstain,
4420 other => Self::Other(other.to_string()),
4421 }
4422 }
4423}
4424
4425#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4427pub struct BlogConfig {
4428 pub enabled: bool,
4429 pub title: String,
4430 pub description: String,
4431 #[serde(default)]
4432 pub agent_id: Option<String>,
4433 #[serde(default)]
4436 pub agent_tenant_id: Option<String>,
4437 pub frequency: BlogConfigFrequency,
4438 pub schedule_hour: i64,
4439 pub schedule_weekday: i64,
4440 pub topic_prompt: String,
4441 pub conditions: String,
4442 pub auto_publish: bool,
4443 #[serde(default)]
4445 pub last_generated_at: Option<String>,
4446}
4447
4448#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4450pub enum BlogConfigFrequency {
4451 #[default]
4452 #[serde(rename = "manual")]
4453 Manual,
4454 #[serde(rename = "hourly")]
4455 Hourly,
4456 #[serde(rename = "daily")]
4457 Daily,
4458 #[serde(rename = "weekly")]
4459 Weekly,
4460 #[serde(untagged)]
4462 Other(String),
4463}
4464
4465impl BlogConfigFrequency {
4466 pub fn as_str(&self) -> &str {
4468 match self {
4469 Self::Manual => "manual",
4470 Self::Hourly => "hourly",
4471 Self::Daily => "daily",
4472 Self::Weekly => "weekly",
4473 Self::Other(value) => value.as_str(),
4474 }
4475 }
4476}
4477
4478impl std::fmt::Display for BlogConfigFrequency {
4479 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4480 f.write_str(self.as_str())
4481 }
4482}
4483
4484impl From<&str> for BlogConfigFrequency {
4485 fn from(value: &str) -> Self {
4486 match value {
4487 "manual" => Self::Manual,
4488 "hourly" => Self::Hourly,
4489 "daily" => Self::Daily,
4490 "weekly" => Self::Weekly,
4491 other => Self::Other(other.to_string()),
4492 }
4493 }
4494}
4495
4496#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4498pub struct BlogPost {
4499 pub id: String,
4500 pub slug: String,
4502 pub title: String,
4503 pub body: String,
4504 pub tags: Vec<String>,
4505 pub status: BlogPostStatus,
4506 pub source: BlogPostSource,
4509 #[serde(default)]
4510 pub agent_id: Option<String>,
4511 #[serde(default)]
4512 pub run_id: Option<String>,
4513 pub created_at: String,
4514 pub updated_at: String,
4515 #[serde(default)]
4518 pub published_at: Option<String>,
4519}
4520
4521#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4524pub enum BlogPostSource {
4525 #[default]
4526 #[serde(rename = "agent")]
4527 Agent,
4528 #[serde(rename = "manual")]
4529 Manual,
4530 #[serde(untagged)]
4532 Other(String),
4533}
4534
4535impl BlogPostSource {
4536 pub fn as_str(&self) -> &str {
4538 match self {
4539 Self::Agent => "agent",
4540 Self::Manual => "manual",
4541 Self::Other(value) => value.as_str(),
4542 }
4543 }
4544}
4545
4546impl std::fmt::Display for BlogPostSource {
4547 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4548 f.write_str(self.as_str())
4549 }
4550}
4551
4552impl From<&str> for BlogPostSource {
4553 fn from(value: &str) -> Self {
4554 match value {
4555 "agent" => Self::Agent,
4556 "manual" => Self::Manual,
4557 other => Self::Other(other.to_string()),
4558 }
4559 }
4560}
4561
4562#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4564pub enum BlogPostStatus {
4565 #[default]
4566 #[serde(rename = "draft")]
4567 Draft,
4568 #[serde(rename = "published")]
4569 Published,
4570 #[serde(untagged)]
4572 Other(String),
4573}
4574
4575impl BlogPostStatus {
4576 pub fn as_str(&self) -> &str {
4578 match self {
4579 Self::Draft => "draft",
4580 Self::Published => "published",
4581 Self::Other(value) => value.as_str(),
4582 }
4583 }
4584}
4585
4586impl std::fmt::Display for BlogPostStatus {
4587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4588 f.write_str(self.as_str())
4589 }
4590}
4591
4592impl From<&str> for BlogPostStatus {
4593 fn from(value: &str) -> Self {
4594 match value {
4595 "draft" => Self::Draft,
4596 "published" => Self::Published,
4597 other => Self::Other(other.to_string()),
4598 }
4599 }
4600}
4601
4602#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4604pub struct BootstrapRequest {
4605 #[serde(default, skip_serializing_if = "Option::is_none")]
4607 pub tenant_name: Option<String>,
4608 #[serde(default, skip_serializing_if = "Option::is_none")]
4610 pub tenant_slug: Option<String>,
4611}
4612
4613#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4615pub struct BootstrapResponse {
4616 pub message: String,
4617 pub tenant: BootstrapResponseTenant,
4618 pub api_key: BootstrapResponseAPIKey,
4619}
4620
4621#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4623pub struct BootstrapResponseAPIKey {
4624 pub key_id: String,
4625 pub prefix: String,
4626 pub raw_key: String,
4627 pub scopes: Vec<String>,
4628 pub warning: String,
4629}
4630
4631#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4633pub struct BootstrapResponseTenant {
4634 pub tenant_id: String,
4635 pub name: String,
4636 pub slug: String,
4637 pub plan: String,
4638}
4639
4640#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4642pub struct BridgeAgentSummary {
4643 pub agent_id: String,
4644 pub machine_id: String,
4645 pub machine_name: String,
4646 pub capabilities: Vec<String>,
4647 pub working_directory: String,
4648 pub status: String,
4649 pub last_heartbeat: String,
4650}
4651
4652#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4654pub struct BridgeConnection {
4655 pub agent_id: String,
4656 #[serde(default, skip_serializing_if = "Option::is_none")]
4657 pub tenant_id: Option<String>,
4658 pub machine_id: String,
4659 #[serde(default, skip_serializing_if = "Option::is_none")]
4660 pub machine_name: Option<String>,
4661 pub capabilities: Vec<String>,
4662 pub working_directory: String,
4663 pub version: String,
4664 pub last_heartbeat: String,
4665 pub status: AgentSummaryBridgeStatus,
4666 #[serde(default, skip_serializing_if = "Option::is_none")]
4667 pub registered_at: Option<String>,
4668 #[serde(default, skip_serializing_if = "Option::is_none")]
4669 pub os: Option<String>,
4670}
4671
4672#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4674pub struct BridgeDelegateRequest {
4675 pub agent_id: String,
4677 pub message: String,
4682 #[serde(default, skip_serializing_if = "Option::is_none")]
4684 pub priority: Option<String>,
4685 #[serde(default, skip_serializing_if = "Option::is_none")]
4687 pub context: Option<serde_json::Map<String, serde_json::Value>>,
4688}
4689
4690#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4692pub struct BridgeDelegateResponse {
4693 #[serde(default, skip_serializing_if = "Option::is_none")]
4694 pub success: Option<bool>,
4695 #[serde(default, skip_serializing_if = "Option::is_none")]
4696 pub task_id: Option<String>,
4697}
4698
4699#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4701pub struct BridgeDeregisterRequest {
4702 pub machine_id: String,
4703}
4704
4705#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4707pub struct BridgeDeregisterResponse {
4708 pub status: BridgeDeregisterResponseStatus,
4709}
4710
4711#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4713pub enum BridgeDeregisterResponseStatus {
4714 #[default]
4715 #[serde(rename = "offline")]
4716 Offline,
4717 #[serde(untagged)]
4719 Other(String),
4720}
4721
4722impl BridgeDeregisterResponseStatus {
4723 pub fn as_str(&self) -> &str {
4725 match self {
4726 Self::Offline => "offline",
4727 Self::Other(value) => value.as_str(),
4728 }
4729 }
4730}
4731
4732impl std::fmt::Display for BridgeDeregisterResponseStatus {
4733 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4734 f.write_str(self.as_str())
4735 }
4736}
4737
4738impl From<&str> for BridgeDeregisterResponseStatus {
4739 fn from(value: &str) -> Self {
4740 match value {
4741 "offline" => Self::Offline,
4742 other => Self::Other(other.to_string()),
4743 }
4744 }
4745}
4746
4747#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4749pub struct BridgeHeartbeatRequest {
4750 #[serde(default, skip_serializing_if = "Option::is_none")]
4751 pub machine_id: Option<String>,
4752 #[serde(default, skip_serializing_if = "Option::is_none")]
4753 pub agent_id: Option<String>,
4754 #[serde(default, skip_serializing_if = "Option::is_none")]
4755 pub status: Option<String>,
4756}
4757
4758#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4760pub struct BridgeHeartbeatResponse {
4761 pub ok: bool,
4762 #[serde(default, skip_serializing_if = "Option::is_none")]
4763 pub timestamp: Option<String>,
4764}
4765
4766#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4768pub struct BridgeInstalledSpec {
4769 pub spec_id: String,
4771 #[serde(default, skip_serializing_if = "Option::is_none")]
4773 pub version: Option<String>,
4774 #[serde(default, skip_serializing_if = "Option::is_none")]
4776 pub tools: Option<Vec<String>>,
4777 pub status: BridgeInstalledSpecStatus,
4778 #[serde(default, skip_serializing_if = "Option::is_none")]
4780 pub error: Option<String>,
4781 #[serde(default, skip_serializing_if = "Option::is_none")]
4782 pub reported_at: Option<String>,
4783}
4784
4785#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4787pub enum BridgeInstalledSpecStatus {
4788 #[default]
4789 #[serde(rename = "installed")]
4790 Installed,
4791 #[serde(rename = "failed")]
4792 Failed,
4793 #[serde(untagged)]
4795 Other(String),
4796}
4797
4798impl BridgeInstalledSpecStatus {
4799 pub fn as_str(&self) -> &str {
4801 match self {
4802 Self::Installed => "installed",
4803 Self::Failed => "failed",
4804 Self::Other(value) => value.as_str(),
4805 }
4806 }
4807}
4808
4809impl std::fmt::Display for BridgeInstalledSpecStatus {
4810 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4811 f.write_str(self.as_str())
4812 }
4813}
4814
4815impl From<&str> for BridgeInstalledSpecStatus {
4816 fn from(value: &str) -> Self {
4817 match value {
4818 "installed" => Self::Installed,
4819 "failed" => Self::Failed,
4820 other => Self::Other(other.to_string()),
4821 }
4822 }
4823}
4824
4825#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4827pub struct BridgePendingTask {
4828 pub task_id: String,
4829 pub agent_id: String,
4830 #[serde(default, skip_serializing_if = "Option::is_none")]
4831 pub session_id: Option<String>,
4832 #[serde(default, skip_serializing_if = "Option::is_none")]
4833 pub run_id: Option<String>,
4834 pub input: BridgePendingTaskInput,
4835 pub queued_at: String,
4836 pub expires_at: String,
4837 pub source: BridgePendingTaskSource,
4838}
4839
4840#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4842pub struct BridgePendingTaskInput {
4843 pub message: String,
4844 #[serde(default, skip_serializing_if = "Option::is_none")]
4845 pub conversation_history: Option<Vec<BridgePendingTaskInputConversationHistoryItem>>,
4846 #[serde(default, skip_serializing_if = "Option::is_none")]
4849 pub files: Option<Vec<String>>,
4850 #[serde(default, skip_serializing_if = "Option::is_none")]
4859 pub attachments: Option<Vec<BridgePendingTaskInputAttachment>>,
4860}
4861
4862#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4864pub struct BridgePendingTaskInputAttachment {
4865 pub file_id: String,
4866 pub filename: String,
4867 pub mime_type: String,
4868 pub size_bytes: i64,
4869}
4870
4871#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4873pub struct BridgePendingTaskInputConversationHistoryItem {
4874 #[serde(default, skip_serializing_if = "Option::is_none")]
4875 pub role: Option<String>,
4876 #[serde(default, skip_serializing_if = "Option::is_none")]
4877 pub content: Option<String>,
4878}
4879
4880#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4882pub struct BridgePendingTaskSource {
4883 pub r#type: BridgePendingTaskSourceType,
4884 #[serde(default, skip_serializing_if = "Option::is_none")]
4885 pub agent_id: Option<String>,
4886 #[serde(default, skip_serializing_if = "Option::is_none")]
4887 pub user_id: Option<String>,
4888}
4889
4890#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
4892pub enum BridgePendingTaskSourceType {
4893 #[default]
4894 #[serde(rename = "head_agent")]
4895 HeadAgent,
4896 #[serde(rename = "user")]
4897 User,
4898 #[serde(rename = "team")]
4899 Team,
4900 #[serde(untagged)]
4902 Other(String),
4903}
4904
4905impl BridgePendingTaskSourceType {
4906 pub fn as_str(&self) -> &str {
4908 match self {
4909 Self::HeadAgent => "head_agent",
4910 Self::User => "user",
4911 Self::Team => "team",
4912 Self::Other(value) => value.as_str(),
4913 }
4914 }
4915}
4916
4917impl std::fmt::Display for BridgePendingTaskSourceType {
4918 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4919 f.write_str(self.as_str())
4920 }
4921}
4922
4923impl From<&str> for BridgePendingTaskSourceType {
4924 fn from(value: &str) -> Self {
4925 match value {
4926 "head_agent" => Self::HeadAgent,
4927 "user" => Self::User,
4928 "team" => Self::Team,
4929 other => Self::Other(other.to_string()),
4930 }
4931 }
4932}
4933
4934#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4936pub struct BridgePollResponse {
4937 pub tasks: Vec<BridgePendingTask>,
4938}
4939
4940#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4942pub struct BridgeRegisterRequest {
4943 pub machine_id: String,
4944 pub capabilities: Vec<String>,
4945 pub working_directory: String,
4946 pub version: String,
4947 #[serde(default, skip_serializing_if = "Option::is_none")]
4948 pub machine_name: Option<String>,
4949 #[serde(default, skip_serializing_if = "Option::is_none")]
4950 pub agent_name: Option<String>,
4951 #[serde(default, skip_serializing_if = "Option::is_none")]
4952 pub os: Option<String>,
4953}
4954
4955#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4957pub struct BridgeRegisterResponse {
4958 pub agent_id: String,
4959 pub status: String,
4961 #[serde(default, skip_serializing_if = "Option::is_none")]
4962 pub registered: Option<bool>,
4963}
4964
4965#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4967pub struct BridgeStatusResponse {
4968 pub connections: Vec<BridgeConnection>,
4969}
4970
4971#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
4974pub struct BridgeTaskEvent {
4975 #[serde(default, skip_serializing_if = "Option::is_none")]
4976 pub event_id: Option<String>,
4977 pub r#type: BridgeTaskEventType,
4978 pub timestamp: String,
4979 #[serde(default, skip_serializing_if = "Option::is_none")]
4980 pub approval_id: Option<String>,
4981 #[serde(default, skip_serializing_if = "Option::is_none")]
4982 pub status: Option<String>,
4983 #[serde(default, skip_serializing_if = "Option::is_none")]
4984 pub options: Option<Vec<String>>,
4985 #[serde(default, skip_serializing_if = "Option::is_none")]
4986 pub kind: Option<String>,
4987 #[serde(default, skip_serializing_if = "Option::is_none")]
4988 pub message: Option<String>,
4989 #[serde(default, skip_serializing_if = "Option::is_none")]
4990 pub tool_name: Option<String>,
4991 #[serde(default, skip_serializing_if = "Option::is_none")]
4992 pub tool_args_preview: Option<String>,
4993 #[serde(default, skip_serializing_if = "Option::is_none")]
4994 pub tool_call_id: Option<String>,
4995 #[serde(default, skip_serializing_if = "Option::is_none")]
4996 pub tool_result_preview: Option<String>,
4997 #[serde(default, skip_serializing_if = "Option::is_none")]
4998 pub tool_duration_ms: Option<i64>,
4999 #[serde(default, skip_serializing_if = "Option::is_none")]
5000 pub content: Option<String>,
5001 #[serde(default, skip_serializing_if = "Option::is_none")]
5002 pub metrics: Option<BridgeTaskEventMetrics>,
5003 #[serde(default, skip_serializing_if = "Option::is_none")]
5004 pub input_tokens: Option<i64>,
5005 #[serde(default, skip_serializing_if = "Option::is_none")]
5006 pub output_tokens: Option<i64>,
5007 #[serde(default, skip_serializing_if = "Option::is_none")]
5008 pub error: Option<String>,
5009 #[serde(default, skip_serializing_if = "Option::is_none")]
5010 pub output: Option<String>,
5011 #[serde(default, skip_serializing_if = "Option::is_none")]
5012 pub capabilities: Option<Vec<String>>,
5013 #[serde(default, skip_serializing_if = "Option::is_none")]
5014 pub working_directory: Option<String>,
5015 #[serde(default, skip_serializing_if = "Option::is_none")]
5016 pub hostname: Option<String>,
5017 #[serde(default, skip_serializing_if = "Option::is_none")]
5018 pub platform: Option<String>,
5019 #[serde(default, skip_serializing_if = "Option::is_none")]
5020 pub reason: Option<String>,
5021 #[serde(default, skip_serializing_if = "Option::is_none")]
5022 pub context: Option<String>,
5023 #[serde(default, skip_serializing_if = "Option::is_none")]
5024 pub model: Option<String>,
5025}
5026
5027#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5029pub struct BridgeTaskEventMetrics {
5030 #[serde(default, skip_serializing_if = "Option::is_none")]
5031 pub tool_calls_count: Option<i64>,
5032 #[serde(default, skip_serializing_if = "Option::is_none")]
5033 pub files_modified: Option<i64>,
5034 #[serde(default, skip_serializing_if = "Option::is_none")]
5035 pub commands_executed: Option<i64>,
5036 #[serde(default, skip_serializing_if = "Option::is_none")]
5037 pub llm_calls: Option<i64>,
5038 #[serde(default, skip_serializing_if = "Option::is_none")]
5039 pub execution_time_ms: Option<i64>,
5040}
5041
5042#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5044pub enum BridgeTaskEventType {
5045 #[default]
5046 #[serde(rename = "status")]
5047 Status,
5048 #[serde(rename = "tool_call")]
5049 ToolCall,
5050 #[serde(rename = "tool_result")]
5051 ToolResult,
5052 #[serde(rename = "content")]
5053 Content,
5054 #[serde(rename = "thinking")]
5055 Thinking,
5056 #[serde(rename = "text")]
5057 Text,
5058 #[serde(rename = "metrics")]
5059 Metrics,
5060 #[serde(rename = "approval_request")]
5061 ApprovalRequest,
5062 #[serde(rename = "error")]
5063 Error,
5064 #[serde(rename = "completed")]
5065 Completed,
5066 #[serde(rename = "capability_report")]
5067 CapabilityReport,
5068 #[serde(rename = "escalation")]
5069 Escalation,
5070 #[serde(rename = "approval_denied")]
5071 ApprovalDenied,
5072 #[serde(untagged)]
5074 Other(String),
5075}
5076
5077impl BridgeTaskEventType {
5078 pub fn as_str(&self) -> &str {
5080 match self {
5081 Self::Status => "status",
5082 Self::ToolCall => "tool_call",
5083 Self::ToolResult => "tool_result",
5084 Self::Content => "content",
5085 Self::Thinking => "thinking",
5086 Self::Text => "text",
5087 Self::Metrics => "metrics",
5088 Self::ApprovalRequest => "approval_request",
5089 Self::Error => "error",
5090 Self::Completed => "completed",
5091 Self::CapabilityReport => "capability_report",
5092 Self::Escalation => "escalation",
5093 Self::ApprovalDenied => "approval_denied",
5094 Self::Other(value) => value.as_str(),
5095 }
5096 }
5097}
5098
5099impl std::fmt::Display for BridgeTaskEventType {
5100 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5101 f.write_str(self.as_str())
5102 }
5103}
5104
5105impl From<&str> for BridgeTaskEventType {
5106 fn from(value: &str) -> Self {
5107 match value {
5108 "status" => Self::Status,
5109 "tool_call" => Self::ToolCall,
5110 "tool_result" => Self::ToolResult,
5111 "content" => Self::Content,
5112 "thinking" => Self::Thinking,
5113 "text" => Self::Text,
5114 "metrics" => Self::Metrics,
5115 "approval_request" => Self::ApprovalRequest,
5116 "error" => Self::Error,
5117 "completed" => Self::Completed,
5118 "capability_report" => Self::CapabilityReport,
5119 "escalation" => Self::Escalation,
5120 "approval_denied" => Self::ApprovalDenied,
5121 other => Self::Other(other.to_string()),
5122 }
5123 }
5124}
5125
5126#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5128pub struct BulkDeleteNotificationsResponse {
5129 pub deleted: i64,
5130 pub scope: BulkDeleteNotificationsScope,
5131}
5132
5133#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5135pub enum BulkDeleteNotificationsScope {
5136 #[default]
5137 #[serde(rename = "read")]
5138 Read,
5139 #[serde(rename = "all")]
5140 All,
5141 #[serde(untagged)]
5143 Other(String),
5144}
5145
5146impl BulkDeleteNotificationsScope {
5147 pub fn as_str(&self) -> &str {
5149 match self {
5150 Self::Read => "read",
5151 Self::All => "all",
5152 Self::Other(value) => value.as_str(),
5153 }
5154 }
5155}
5156
5157impl std::fmt::Display for BulkDeleteNotificationsScope {
5158 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5159 f.write_str(self.as_str())
5160 }
5161}
5162
5163impl From<&str> for BulkDeleteNotificationsScope {
5164 fn from(value: &str) -> Self {
5165 match value {
5166 "read" => Self::Read,
5167 "all" => Self::All,
5168 other => Self::Other(other.to_string()),
5169 }
5170 }
5171}
5172
5173#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5175pub struct BulkDeleteSessionsRequest {
5176 pub session_ids: Vec<String>,
5177}
5178
5179#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5181pub struct BulkDeleteSessionsResponse {
5182 pub deleted: i64,
5183 pub failed: Vec<String>,
5184}
5185
5186#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5188pub struct CancelA2ATaskResponse {
5189 pub cancelled: bool,
5190 pub task_id: String,
5191}
5192
5193#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5195pub struct CancelPublicSessionRunResponse {
5196 pub cancelled: bool,
5197 pub run_id: String,
5198}
5199
5200#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5202pub struct CancelRunResponse {
5203 pub cancelled: bool,
5204 pub run_id: String,
5205}
5206
5207#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5209pub struct CancelSquadRunResponse {
5210 pub cancelled: bool,
5211 pub team_run_id: String,
5212 #[serde(rename = "cancelledCount")]
5217 pub cancelled_count: i64,
5218 pub orchestrator_stopped: bool,
5221 #[serde(rename = "cancelled_count")]
5223 pub cancelled_count_: i64,
5224}
5225
5226#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5228pub struct CancelTeamRunResponse {
5229 pub cancelled: bool,
5230 pub team_run_id: String,
5231 #[serde(rename = "cancelledCount")]
5236 pub cancelled_count: i64,
5237 pub orchestrator_stopped: bool,
5240 #[serde(rename = "cancelled_count")]
5242 pub cancelled_count_: i64,
5243}
5244
5245#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5247pub struct CanvasEdge {
5248 pub id: String,
5249 pub source: String,
5250 pub target: String,
5251 #[serde(default, skip_serializing_if = "Option::is_none")]
5252 pub label: Option<String>,
5253}
5254
5255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5257pub struct CanvasNode {
5258 pub id: String,
5259 pub r#type: CanvasNodeType,
5260 pub label: String,
5261 pub position: CanvasNodePosition,
5262 pub config: serde_json::Map<String, serde_json::Value>,
5263}
5264
5265#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5267pub struct CanvasNodePosition {
5268 pub x: f64,
5269 pub y: f64,
5270}
5271
5272#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5274pub enum CanvasNodeType {
5275 #[default]
5276 #[serde(rename = "llm")]
5277 LLM,
5278 #[serde(rename = "tool")]
5279 Tool,
5280 #[serde(rename = "guardrail")]
5281 Guardrail,
5282 #[serde(rename = "memory")]
5283 Memory,
5284 #[serde(rename = "condition")]
5285 Condition,
5286 #[serde(rename = "input")]
5287 Input,
5288 #[serde(rename = "output")]
5289 Output,
5290 #[serde(untagged)]
5292 Other(String),
5293}
5294
5295impl CanvasNodeType {
5296 pub fn as_str(&self) -> &str {
5298 match self {
5299 Self::LLM => "llm",
5300 Self::Tool => "tool",
5301 Self::Guardrail => "guardrail",
5302 Self::Memory => "memory",
5303 Self::Condition => "condition",
5304 Self::Input => "input",
5305 Self::Output => "output",
5306 Self::Other(value) => value.as_str(),
5307 }
5308 }
5309}
5310
5311impl std::fmt::Display for CanvasNodeType {
5312 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5313 f.write_str(self.as_str())
5314 }
5315}
5316
5317impl From<&str> for CanvasNodeType {
5318 fn from(value: &str) -> Self {
5319 match value {
5320 "llm" => Self::LLM,
5321 "tool" => Self::Tool,
5322 "guardrail" => Self::Guardrail,
5323 "memory" => Self::Memory,
5324 "condition" => Self::Condition,
5325 "input" => Self::Input,
5326 "output" => Self::Output,
5327 other => Self::Other(other.to_string()),
5328 }
5329 }
5330}
5331
5332#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5334pub struct CanvasWorkflowStep {
5335 pub agent_id: String,
5337 #[serde(default, skip_serializing_if = "Option::is_none")]
5339 pub label: Option<String>,
5340 #[serde(default, skip_serializing_if = "Option::is_none")]
5343 pub prompt: Option<String>,
5344}
5345
5346#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5348pub struct CastBallotRequest {
5349 pub agent_id: String,
5350 pub vote: String,
5351 #[serde(default, skip_serializing_if = "Option::is_none")]
5354 pub weight: Option<f64>,
5355 #[serde(default, skip_serializing_if = "Option::is_none")]
5356 pub reasoning: Option<String>,
5357 #[serde(default, skip_serializing_if = "Option::is_none")]
5359 pub signature: Option<String>,
5360}
5361
5362#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5364pub struct ChatCompletionRequest {
5365 pub model: String,
5367 pub messages: Vec<ChatCompletionRequestMessage>,
5368 #[serde(default, skip_serializing_if = "Option::is_none")]
5369 pub temperature: Option<f64>,
5370 #[serde(default, skip_serializing_if = "Option::is_none")]
5372 pub max_tokens: Option<i64>,
5373 #[serde(default, skip_serializing_if = "Option::is_none")]
5375 pub stream: Option<bool>,
5376 #[serde(default, skip_serializing_if = "Option::is_none")]
5377 pub tools: Option<Vec<ChatCompletionRequestTool>>,
5378 #[serde(default, skip_serializing_if = "Option::is_none")]
5379 pub tool_choice: Option<serde_json::Value>,
5380}
5381
5382#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5384pub struct ChatCompletionRequestMessage {
5385 #[serde(default, skip_serializing_if = "Option::is_none")]
5386 pub role: Option<ChatCompletionRequestMessageRole>,
5387 #[serde(default, skip_serializing_if = "Option::is_none")]
5388 pub content: Option<String>,
5389}
5390
5391#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5393pub enum ChatCompletionRequestMessageRole {
5394 #[default]
5395 #[serde(rename = "system")]
5396 System,
5397 #[serde(rename = "user")]
5398 User,
5399 #[serde(rename = "assistant")]
5400 Assistant,
5401 #[serde(rename = "tool")]
5402 Tool,
5403 #[serde(untagged)]
5405 Other(String),
5406}
5407
5408impl ChatCompletionRequestMessageRole {
5409 pub fn as_str(&self) -> &str {
5411 match self {
5412 Self::System => "system",
5413 Self::User => "user",
5414 Self::Assistant => "assistant",
5415 Self::Tool => "tool",
5416 Self::Other(value) => value.as_str(),
5417 }
5418 }
5419}
5420
5421impl std::fmt::Display for ChatCompletionRequestMessageRole {
5422 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5423 f.write_str(self.as_str())
5424 }
5425}
5426
5427impl From<&str> for ChatCompletionRequestMessageRole {
5428 fn from(value: &str) -> Self {
5429 match value {
5430 "system" => Self::System,
5431 "user" => Self::User,
5432 "assistant" => Self::Assistant,
5433 "tool" => Self::Tool,
5434 other => Self::Other(other.to_string()),
5435 }
5436 }
5437}
5438
5439#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5441pub struct ChatCompletionRequestTool {
5442 pub r#type: OpenAiToolCallType,
5443 pub function: ChatCompletionRequestToolFunction,
5444}
5445
5446#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5448pub struct ChatCompletionRequestToolFunction {
5449 pub name: String,
5450 pub description: String,
5451 #[serde(default, skip_serializing_if = "Option::is_none")]
5453 pub parameters: Option<serde_json::Map<String, serde_json::Value>>,
5454}
5455
5456#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5458pub struct ChatMessage {
5459 pub role: ChatMessageRole,
5460 pub content: serde_json::Value,
5461 #[serde(default, skip_serializing_if = "Option::is_none")]
5462 pub name: Option<String>,
5463 #[serde(default, skip_serializing_if = "Option::is_none")]
5464 pub tool_call_id: Option<String>,
5465 #[serde(default, skip_serializing_if = "Option::is_none")]
5466 pub tool_calls: Option<Vec<ChatMessageToolCall>>,
5467 #[serde(default, skip_serializing_if = "Option::is_none")]
5468 pub reasoning_content: Option<String>,
5469}
5470
5471#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5473pub struct ChatMessageContentVariant2item {
5474 pub r#type: ChatMessageContentVariant2itemType,
5475 #[serde(default, skip_serializing_if = "Option::is_none")]
5476 pub text: Option<String>,
5477 #[serde(default, skip_serializing_if = "Option::is_none")]
5478 pub media: Option<serde_json::Map<String, serde_json::Value>>,
5479}
5480
5481#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5483pub enum ChatMessageContentVariant2itemType {
5484 #[default]
5485 #[serde(rename = "text")]
5486 Text,
5487 #[serde(rename = "image")]
5488 Image,
5489 #[serde(rename = "audio")]
5490 Audio,
5491 #[serde(rename = "video")]
5492 Video,
5493 #[serde(rename = "file")]
5494 File,
5495 #[serde(untagged)]
5497 Other(String),
5498}
5499
5500impl ChatMessageContentVariant2itemType {
5501 pub fn as_str(&self) -> &str {
5503 match self {
5504 Self::Text => "text",
5505 Self::Image => "image",
5506 Self::Audio => "audio",
5507 Self::Video => "video",
5508 Self::File => "file",
5509 Self::Other(value) => value.as_str(),
5510 }
5511 }
5512}
5513
5514impl std::fmt::Display for ChatMessageContentVariant2itemType {
5515 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5516 f.write_str(self.as_str())
5517 }
5518}
5519
5520impl From<&str> for ChatMessageContentVariant2itemType {
5521 fn from(value: &str) -> Self {
5522 match value {
5523 "text" => Self::Text,
5524 "image" => Self::Image,
5525 "audio" => Self::Audio,
5526 "video" => Self::Video,
5527 "file" => Self::File,
5528 other => Self::Other(other.to_string()),
5529 }
5530 }
5531}
5532
5533#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5535pub enum ChatMessageRole {
5536 #[default]
5537 #[serde(rename = "user")]
5538 User,
5539 #[serde(rename = "assistant")]
5540 Assistant,
5541 #[serde(rename = "system")]
5542 System,
5543 #[serde(rename = "tool")]
5544 Tool,
5545 #[serde(untagged)]
5547 Other(String),
5548}
5549
5550impl ChatMessageRole {
5551 pub fn as_str(&self) -> &str {
5553 match self {
5554 Self::User => "user",
5555 Self::Assistant => "assistant",
5556 Self::System => "system",
5557 Self::Tool => "tool",
5558 Self::Other(value) => value.as_str(),
5559 }
5560 }
5561}
5562
5563impl std::fmt::Display for ChatMessageRole {
5564 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5565 f.write_str(self.as_str())
5566 }
5567}
5568
5569impl From<&str> for ChatMessageRole {
5570 fn from(value: &str) -> Self {
5571 match value {
5572 "user" => Self::User,
5573 "assistant" => Self::Assistant,
5574 "system" => Self::System,
5575 "tool" => Self::Tool,
5576 other => Self::Other(other.to_string()),
5577 }
5578 }
5579}
5580
5581#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5583pub struct ChatMessageToolCall {
5584 pub id: String,
5585 pub name: String,
5586 pub arguments: serde_json::Map<String, serde_json::Value>,
5587}
5588
5589#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5591pub struct CheckGovernanceRequest {
5592 pub agent_id: String,
5593 pub action: String,
5594 #[serde(default, skip_serializing_if = "Option::is_none")]
5595 pub run_id: Option<String>,
5596 #[serde(default, skip_serializing_if = "Option::is_none")]
5597 pub team_id: Option<String>,
5598}
5599
5600#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5602pub struct CheckSpawnPermissionRequest {
5603 pub parent_agent_id: String,
5604 pub child_permissions: PermissionSet,
5605}
5606
5607#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5609pub struct ClearBillingBudgetResponse {
5610 #[serde(default, skip_serializing_if = "Option::is_none")]
5611 pub configured: Option<bool>,
5612 #[serde(default, skip_serializing_if = "Option::is_none")]
5613 pub budget: Option<serde_json::Map<String, serde_json::Value>>,
5614}
5615
5616#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5618pub struct CloseSessionResponse {
5619 pub deleted: bool,
5620 pub session_id: String,
5621}
5622
5623#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5625pub struct Company {
5626 pub company_id: String,
5627 pub tenant_id: String,
5628 pub name: String,
5629 #[serde(default, skip_serializing_if = "Option::is_none")]
5630 pub description: Option<String>,
5631 #[serde(default, skip_serializing_if = "Option::is_none")]
5632 pub mission: Option<String>,
5633 #[serde(default, skip_serializing_if = "Option::is_none")]
5634 pub strategic_goals: Option<Vec<StrategicGoal>>,
5635 pub strategist_agent_id: String,
5636 #[serde(default, skip_serializing_if = "Option::is_none")]
5637 pub team_ids: Option<Vec<String>>,
5638 #[serde(default, skip_serializing_if = "Option::is_none")]
5639 pub created_agent_ids: Option<Vec<String>>,
5640 #[serde(default, skip_serializing_if = "Option::is_none")]
5641 pub budget: Option<serde_json::Map<String, serde_json::Value>>,
5642 #[serde(default, skip_serializing_if = "Option::is_none")]
5643 pub status: Option<String>,
5644 #[serde(default, skip_serializing_if = "Option::is_none")]
5645 pub config: Option<serde_json::Map<String, serde_json::Value>>,
5646 #[serde(default, skip_serializing_if = "Option::is_none")]
5647 pub workspace_id: Option<String>,
5648 #[serde(default, skip_serializing_if = "Option::is_none")]
5649 pub created_at: Option<String>,
5650 #[serde(default, skip_serializing_if = "Option::is_none")]
5651 pub updated_at: Option<String>,
5652 #[serde(default, skip_serializing_if = "Option::is_none")]
5656 pub last_tick_at: Option<String>,
5657 #[serde(default, skip_serializing_if = "Option::is_none")]
5660 pub last_successful_tick_at: Option<String>,
5661}
5662
5663#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5665pub struct CompanyActivityEntry {
5666 #[serde(default, skip_serializing_if = "Option::is_none")]
5667 pub run_id: Option<String>,
5668 #[serde(default, skip_serializing_if = "Option::is_none")]
5669 pub created_at: Option<String>,
5670 #[serde(default, skip_serializing_if = "Option::is_none")]
5671 pub success: Option<bool>,
5672}
5673
5674#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5676pub struct CompanyCreate {
5677 pub name: String,
5678 pub mission: String,
5680 pub budget: CompanyCreateBudget,
5682 #[serde(default, skip_serializing_if = "Option::is_none")]
5683 pub description: Option<String>,
5684 #[serde(default, skip_serializing_if = "Option::is_none")]
5685 pub strategic_goals: Option<Vec<String>>,
5686 #[serde(default, skip_serializing_if = "Option::is_none")]
5687 pub config: Option<serde_json::Map<String, serde_json::Value>>,
5688 #[serde(default, skip_serializing_if = "Option::is_none")]
5689 pub workspace_id: Option<String>,
5690}
5691
5692#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5694pub struct CompanyCreateBudget {
5695 pub total_usd: f64,
5696 pub daily_limit_usd: f64,
5697 pub alert_threshold_pct: f64,
5698 #[serde(default, skip_serializing_if = "Option::is_none")]
5700 pub spent_usd: Option<f64>,
5701}
5702
5703#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5705pub struct CompanyUpdate {
5706 #[serde(default, skip_serializing_if = "Option::is_none")]
5707 pub name: Option<String>,
5708 #[serde(default, skip_serializing_if = "Option::is_none")]
5709 pub mission: Option<String>,
5710 #[serde(default, skip_serializing_if = "Option::is_none")]
5711 pub budget: Option<f64>,
5712 #[serde(default, skip_serializing_if = "Option::is_none")]
5713 pub description: Option<String>,
5714 #[serde(default, skip_serializing_if = "Option::is_none")]
5715 pub strategic_goals: Option<Vec<String>>,
5716 #[serde(default, skip_serializing_if = "Option::is_none")]
5717 pub config: Option<serde_json::Map<String, serde_json::Value>>,
5718}
5719
5720#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5722pub struct CompleteOAuthLoginResponse {
5723 pub api_key: String,
5724 pub email: String,
5725}
5726
5727#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5731pub struct ConformityReport {
5732 pub tenant_id: String,
5733 pub sections: Vec<ConformityReportSection>,
5734 pub markdown: String,
5735}
5736
5737#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5739pub struct ConformityReportSection {
5740 pub title: String,
5741 pub content: String,
5742}
5743
5744#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5746pub struct ConnectorConfigField {
5747 pub r#type: String,
5748 #[serde(default, skip_serializing_if = "Option::is_none")]
5749 pub required: Option<bool>,
5750 #[serde(default, skip_serializing_if = "Option::is_none")]
5751 pub description: Option<String>,
5752}
5753
5754#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5756pub struct ConstitutionAmendment {
5757 pub amendment_id: String,
5758 pub rule_id: String,
5759 pub action: ConstitutionAmendmentAction,
5760 #[serde(default, skip_serializing_if = "Option::is_none")]
5762 pub rule: Option<ConstitutionRule>,
5763 pub proposed_by: String,
5764 pub approved_by: String,
5766 pub rationale: String,
5767 pub applied_at: String,
5768}
5769
5770#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5772pub enum ConstitutionAmendmentAction {
5773 #[default]
5774 #[serde(rename = "add")]
5775 Add,
5776 #[serde(rename = "modify")]
5777 Modify,
5778 #[serde(rename = "remove")]
5779 Remove,
5780 #[serde(untagged)]
5782 Other(String),
5783}
5784
5785impl ConstitutionAmendmentAction {
5786 pub fn as_str(&self) -> &str {
5788 match self {
5789 Self::Add => "add",
5790 Self::Modify => "modify",
5791 Self::Remove => "remove",
5792 Self::Other(value) => value.as_str(),
5793 }
5794 }
5795}
5796
5797impl std::fmt::Display for ConstitutionAmendmentAction {
5798 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5799 f.write_str(self.as_str())
5800 }
5801}
5802
5803impl From<&str> for ConstitutionAmendmentAction {
5804 fn from(value: &str) -> Self {
5805 match value {
5806 "add" => Self::Add,
5807 "modify" => Self::Modify,
5808 "remove" => Self::Remove,
5809 other => Self::Other(other.to_string()),
5810 }
5811 }
5812}
5813
5814#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5816pub struct ConstitutionDocument {
5817 pub tenant_id: String,
5818 pub version: i64,
5819 pub rules: Vec<ConstitutionRule>,
5820 pub amendments: Vec<ConstitutionAmendment>,
5821 pub founder_id: String,
5823 pub created_at: String,
5824 #[serde(default, skip_serializing_if = "Option::is_none")]
5827 pub r#virtual: Option<bool>,
5828 pub updated_at: String,
5829}
5830
5831#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
5833pub struct ConstitutionRule {
5834 pub id: String,
5836 pub rule_type: ConstitutionRuleRuleType,
5837 pub scope: ConstitutionRuleScope,
5840 #[serde(default, skip_serializing_if = "Option::is_none")]
5842 pub scope_targets: Option<Vec<String>>,
5843 pub action: String,
5845 #[serde(default, skip_serializing_if = "Option::is_none")]
5847 pub obligated_action: Option<String>,
5848 pub penalty: ConstitutionRulePenalty,
5849 #[serde(default, skip_serializing_if = "Option::is_none")]
5850 pub description: Option<String>,
5851 #[serde(default, skip_serializing_if = "Option::is_none")]
5853 pub immutable: Option<bool>,
5854 #[serde(default, skip_serializing_if = "Option::is_none")]
5856 pub priority: Option<i64>,
5857 #[serde(default, skip_serializing_if = "Option::is_none")]
5862 pub advisory: Option<bool>,
5863}
5864
5865#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5867pub enum ConstitutionRulePenalty {
5868 #[default]
5869 #[serde(rename = "block")]
5870 Block,
5871 #[serde(rename = "warn")]
5872 Warn,
5873 #[serde(rename = "log")]
5874 Log,
5875 #[serde(rename = "terminate_agent")]
5876 TerminateAgent,
5877 #[serde(rename = "revoke_permissions")]
5878 RevokePermissions,
5879 #[serde(untagged)]
5881 Other(String),
5882}
5883
5884impl ConstitutionRulePenalty {
5885 pub fn as_str(&self) -> &str {
5887 match self {
5888 Self::Block => "block",
5889 Self::Warn => "warn",
5890 Self::Log => "log",
5891 Self::TerminateAgent => "terminate_agent",
5892 Self::RevokePermissions => "revoke_permissions",
5893 Self::Other(value) => value.as_str(),
5894 }
5895 }
5896}
5897
5898impl std::fmt::Display for ConstitutionRulePenalty {
5899 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5900 f.write_str(self.as_str())
5901 }
5902}
5903
5904impl From<&str> for ConstitutionRulePenalty {
5905 fn from(value: &str) -> Self {
5906 match value {
5907 "block" => Self::Block,
5908 "warn" => Self::Warn,
5909 "log" => Self::Log,
5910 "terminate_agent" => Self::TerminateAgent,
5911 "revoke_permissions" => Self::RevokePermissions,
5912 other => Self::Other(other.to_string()),
5913 }
5914 }
5915}
5916
5917#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5919pub enum ConstitutionRuleRuleType {
5920 #[default]
5921 #[serde(rename = "prohibition")]
5922 Prohibition,
5923 #[serde(rename = "requirement")]
5924 Requirement,
5925 #[serde(rename = "permission")]
5926 Permission,
5927 #[serde(untagged)]
5929 Other(String),
5930}
5931
5932impl ConstitutionRuleRuleType {
5933 pub fn as_str(&self) -> &str {
5935 match self {
5936 Self::Prohibition => "prohibition",
5937 Self::Requirement => "requirement",
5938 Self::Permission => "permission",
5939 Self::Other(value) => value.as_str(),
5940 }
5941 }
5942}
5943
5944impl std::fmt::Display for ConstitutionRuleRuleType {
5945 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5946 f.write_str(self.as_str())
5947 }
5948}
5949
5950impl From<&str> for ConstitutionRuleRuleType {
5951 fn from(value: &str) -> Self {
5952 match value {
5953 "prohibition" => Self::Prohibition,
5954 "requirement" => Self::Requirement,
5955 "permission" => Self::Permission,
5956 other => Self::Other(other.to_string()),
5957 }
5958 }
5959}
5960
5961#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
5964pub enum ConstitutionRuleScope {
5965 #[default]
5966 #[serde(rename = "all_agents")]
5967 AllAgents,
5968 #[serde(rename = "team")]
5969 Team,
5970 #[serde(rename = "agent")]
5971 Agent,
5972 #[serde(rename = "role")]
5973 Role,
5974 #[serde(untagged)]
5976 Other(String),
5977}
5978
5979impl ConstitutionRuleScope {
5980 pub fn as_str(&self) -> &str {
5982 match self {
5983 Self::AllAgents => "all_agents",
5984 Self::Team => "team",
5985 Self::Agent => "agent",
5986 Self::Role => "role",
5987 Self::Other(value) => value.as_str(),
5988 }
5989 }
5990}
5991
5992impl std::fmt::Display for ConstitutionRuleScope {
5993 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5994 f.write_str(self.as_str())
5995 }
5996}
5997
5998impl From<&str> for ConstitutionRuleScope {
5999 fn from(value: &str) -> Self {
6000 match value {
6001 "all_agents" => Self::AllAgents,
6002 "team" => Self::Team,
6003 "agent" => Self::Agent,
6004 "role" => Self::Role,
6005 other => Self::Other(other.to_string()),
6006 }
6007 }
6008}
6009
6010#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6012pub struct ConstitutionViolation {
6013 pub rule_id: String,
6014 pub rule_type: ConstitutionRuleRuleType,
6015 pub action: String,
6016 pub agent_id: String,
6017 pub penalty: ConstitutionRulePenalty,
6018 #[serde(default, skip_serializing_if = "Option::is_none")]
6019 pub description: Option<String>,
6020 pub timestamp: String,
6021}
6022
6023#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6025pub struct ContentReport {
6026 pub id: String,
6027 pub target_type: ContentReportInputTargetType,
6028 pub target_id: String,
6029 pub reason: ContentReportInputReason,
6030 #[serde(default, skip_serializing_if = "Option::is_none")]
6031 pub details: Option<String>,
6032 pub tenant_id: String,
6034 #[serde(default, skip_serializing_if = "Option::is_none")]
6035 pub agent_id: Option<String>,
6036 #[serde(default, skip_serializing_if = "Option::is_none")]
6037 pub session_id: Option<String>,
6038 pub origin: ContentReportOrigin,
6039 #[serde(default, skip_serializing_if = "Option::is_none")]
6040 pub reporter_tenant_id: Option<String>,
6041 #[serde(default, skip_serializing_if = "Option::is_none")]
6042 pub reporter_user_id: Option<String>,
6043 #[serde(default, skip_serializing_if = "Option::is_none")]
6046 pub reporter_fingerprint: Option<String>,
6047 pub status: ContentReportStatus,
6048 pub severity: ContentReportSeverity,
6049 pub created_at: String,
6050}
6051
6052#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6054pub struct ContentReportAccepted {
6055 pub report_id: String,
6056 pub status: ContentReportAcceptedStatus,
6057}
6058
6059#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6061pub enum ContentReportAcceptedStatus {
6062 #[default]
6063 #[serde(rename = "received")]
6064 Received,
6065 #[serde(untagged)]
6067 Other(String),
6068}
6069
6070impl ContentReportAcceptedStatus {
6071 pub fn as_str(&self) -> &str {
6073 match self {
6074 Self::Received => "received",
6075 Self::Other(value) => value.as_str(),
6076 }
6077 }
6078}
6079
6080impl std::fmt::Display for ContentReportAcceptedStatus {
6081 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6082 f.write_str(self.as_str())
6083 }
6084}
6085
6086impl From<&str> for ContentReportAcceptedStatus {
6087 fn from(value: &str) -> Self {
6088 match value {
6089 "received" => Self::Received,
6090 other => Self::Other(other.to_string()),
6091 }
6092 }
6093}
6094
6095#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6097pub struct ContentReportInput {
6098 pub target_type: ContentReportInputTargetType,
6099 pub target_id: String,
6100 pub reason: ContentReportInputReason,
6103 #[serde(default, skip_serializing_if = "Option::is_none")]
6105 pub details: Option<String>,
6106}
6107
6108#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6111pub enum ContentReportInputReason {
6112 #[default]
6113 #[serde(rename = "harassment")]
6114 Harassment,
6115 #[serde(rename = "hate")]
6116 Hate,
6117 #[serde(rename = "sexual")]
6118 Sexual,
6119 #[serde(rename = "violence")]
6120 Violence,
6121 #[serde(rename = "self_harm")]
6122 SelfHarm,
6123 #[serde(rename = "illegal")]
6124 Illegal,
6125 #[serde(rename = "spam")]
6126 Spam,
6127 #[serde(rename = "other")]
6128 Other,
6129 #[serde(untagged)]
6131 Unknown(String),
6132}
6133
6134impl ContentReportInputReason {
6135 pub fn as_str(&self) -> &str {
6137 match self {
6138 Self::Harassment => "harassment",
6139 Self::Hate => "hate",
6140 Self::Sexual => "sexual",
6141 Self::Violence => "violence",
6142 Self::SelfHarm => "self_harm",
6143 Self::Illegal => "illegal",
6144 Self::Spam => "spam",
6145 Self::Other => "other",
6146 Self::Unknown(value) => value.as_str(),
6147 }
6148 }
6149}
6150
6151impl std::fmt::Display for ContentReportInputReason {
6152 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6153 f.write_str(self.as_str())
6154 }
6155}
6156
6157impl From<&str> for ContentReportInputReason {
6158 fn from(value: &str) -> Self {
6159 match value {
6160 "harassment" => Self::Harassment,
6161 "hate" => Self::Hate,
6162 "sexual" => Self::Sexual,
6163 "violence" => Self::Violence,
6164 "self_harm" => Self::SelfHarm,
6165 "illegal" => Self::Illegal,
6166 "spam" => Self::Spam,
6167 "other" => Self::Other,
6168 other => Self::Unknown(other.to_string()),
6169 }
6170 }
6171}
6172
6173#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6175pub enum ContentReportInputTargetType {
6176 #[default]
6177 #[serde(rename = "message")]
6178 Message,
6179 #[serde(rename = "session")]
6180 Session,
6181 #[serde(rename = "agent")]
6182 Agent,
6183 #[serde(untagged)]
6185 Other(String),
6186}
6187
6188impl ContentReportInputTargetType {
6189 pub fn as_str(&self) -> &str {
6191 match self {
6192 Self::Message => "message",
6193 Self::Session => "session",
6194 Self::Agent => "agent",
6195 Self::Other(value) => value.as_str(),
6196 }
6197 }
6198}
6199
6200impl std::fmt::Display for ContentReportInputTargetType {
6201 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6202 f.write_str(self.as_str())
6203 }
6204}
6205
6206impl From<&str> for ContentReportInputTargetType {
6207 fn from(value: &str) -> Self {
6208 match value {
6209 "message" => Self::Message,
6210 "session" => Self::Session,
6211 "agent" => Self::Agent,
6212 other => Self::Other(other.to_string()),
6213 }
6214 }
6215}
6216
6217#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6219pub enum ContentReportOrigin {
6220 #[default]
6221 #[serde(rename = "authenticated")]
6222 Authenticated,
6223 #[serde(rename = "public_session")]
6224 PublicSession,
6225 #[serde(untagged)]
6227 Other(String),
6228}
6229
6230impl ContentReportOrigin {
6231 pub fn as_str(&self) -> &str {
6233 match self {
6234 Self::Authenticated => "authenticated",
6235 Self::PublicSession => "public_session",
6236 Self::Other(value) => value.as_str(),
6237 }
6238 }
6239}
6240
6241impl std::fmt::Display for ContentReportOrigin {
6242 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6243 f.write_str(self.as_str())
6244 }
6245}
6246
6247impl From<&str> for ContentReportOrigin {
6248 fn from(value: &str) -> Self {
6249 match value {
6250 "authenticated" => Self::Authenticated,
6251 "public_session" => Self::PublicSession,
6252 other => Self::Other(other.to_string()),
6253 }
6254 }
6255}
6256
6257#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6259pub enum ContentReportSeverity {
6260 #[default]
6261 #[serde(rename = "critical")]
6262 Critical,
6263 #[serde(rename = "high")]
6264 High,
6265 #[serde(rename = "normal")]
6266 Normal,
6267 #[serde(untagged)]
6269 Other(String),
6270}
6271
6272impl ContentReportSeverity {
6273 pub fn as_str(&self) -> &str {
6275 match self {
6276 Self::Critical => "critical",
6277 Self::High => "high",
6278 Self::Normal => "normal",
6279 Self::Other(value) => value.as_str(),
6280 }
6281 }
6282}
6283
6284impl std::fmt::Display for ContentReportSeverity {
6285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6286 f.write_str(self.as_str())
6287 }
6288}
6289
6290impl From<&str> for ContentReportSeverity {
6291 fn from(value: &str) -> Self {
6292 match value {
6293 "critical" => Self::Critical,
6294 "high" => Self::High,
6295 "normal" => Self::Normal,
6296 other => Self::Other(other.to_string()),
6297 }
6298 }
6299}
6300
6301#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6303pub enum ContentReportStatus {
6304 #[default]
6305 #[serde(rename = "received")]
6306 Received,
6307 #[serde(rename = "reviewing")]
6308 Reviewing,
6309 #[serde(rename = "actioned")]
6310 Actioned,
6311 #[serde(rename = "dismissed")]
6312 Dismissed,
6313 #[serde(untagged)]
6315 Other(String),
6316}
6317
6318impl ContentReportStatus {
6319 pub fn as_str(&self) -> &str {
6321 match self {
6322 Self::Received => "received",
6323 Self::Reviewing => "reviewing",
6324 Self::Actioned => "actioned",
6325 Self::Dismissed => "dismissed",
6326 Self::Other(value) => value.as_str(),
6327 }
6328 }
6329}
6330
6331impl std::fmt::Display for ContentReportStatus {
6332 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6333 f.write_str(self.as_str())
6334 }
6335}
6336
6337impl From<&str> for ContentReportStatus {
6338 fn from(value: &str) -> Self {
6339 match value {
6340 "received" => Self::Received,
6341 "reviewing" => Self::Reviewing,
6342 "actioned" => Self::Actioned,
6343 "dismissed" => Self::Dismissed,
6344 other => Self::Other(other.to_string()),
6345 }
6346 }
6347}
6348
6349#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6351pub struct ContinueRunRequest {
6352 pub continuation_token: String,
6354}
6355
6356#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6358pub struct ContinueRunResponse {
6359 pub continued: bool,
6360 pub run_id: String,
6361 #[serde(default, skip_serializing_if = "Option::is_none")]
6362 pub checkpoint: Option<String>,
6363 #[serde(default, skip_serializing_if = "Option::is_none")]
6364 pub resume_step: Option<i64>,
6365}
6366
6367#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6373pub struct ConversationEntry {
6374 pub message_id: String,
6384 pub role: PublicSessionViewMessageRole,
6385 pub content: serde_json::Value,
6391 pub run_id: String,
6392 pub timestamp: String,
6393 #[serde(default, skip_serializing_if = "Option::is_none")]
6394 pub compacted: Option<bool>,
6395 #[serde(default, skip_serializing_if = "Option::is_none")]
6398 pub tool_calls: Option<Vec<ConversationEntryToolCall>>,
6399 #[serde(default, skip_serializing_if = "Option::is_none")]
6403 pub thinking: Option<String>,
6404 #[serde(default, skip_serializing_if = "Option::is_none")]
6405 pub importance: Option<ConversationEntryImportance>,
6406 #[serde(default, skip_serializing_if = "Option::is_none")]
6407 pub attachments: Option<Vec<ConversationEntryAttachment>>,
6408 #[serde(default, skip_serializing_if = "Option::is_none")]
6411 pub run_metrics: Option<ConversationEntryRunMetrics>,
6412 #[serde(default, skip_serializing_if = "Option::is_none")]
6414 pub cost_usd: Option<f64>,
6415 #[serde(default, skip_serializing_if = "Option::is_none")]
6417 pub from_todo: Option<bool>,
6418 #[serde(default, skip_serializing_if = "Option::is_none")]
6420 pub output_truncated: Option<bool>,
6421}
6422
6423#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6425pub struct ConversationEntryAttachment {
6426 pub file_id: String,
6427 pub filename: String,
6428 pub mime_type: String,
6429 #[serde(default, skip_serializing_if = "Option::is_none")]
6430 pub size_bytes: Option<i64>,
6431}
6432
6433#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6435pub struct ConversationEntryContentVariant2item {
6436 pub r#type: ChatMessageContentVariant2itemType,
6437 #[serde(default, skip_serializing_if = "Option::is_none")]
6438 pub text: Option<String>,
6439 #[serde(default, skip_serializing_if = "Option::is_none")]
6440 pub media: Option<ConversationEntryContentVariant2itemMedia>,
6441}
6442
6443#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6445pub struct ConversationEntryContentVariant2itemMedia {
6446 pub mime_type: String,
6447 #[serde(default, skip_serializing_if = "Option::is_none")]
6448 pub data: Option<String>,
6449 #[serde(default, skip_serializing_if = "Option::is_none")]
6450 pub url: Option<String>,
6451}
6452
6453#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6455pub enum ConversationEntryImportance {
6456 #[default]
6457 #[serde(rename = "high")]
6458 High,
6459 #[serde(rename = "normal")]
6460 Normal,
6461 #[serde(untagged)]
6463 Other(String),
6464}
6465
6466impl ConversationEntryImportance {
6467 pub fn as_str(&self) -> &str {
6469 match self {
6470 Self::High => "high",
6471 Self::Normal => "normal",
6472 Self::Other(value) => value.as_str(),
6473 }
6474 }
6475}
6476
6477impl std::fmt::Display for ConversationEntryImportance {
6478 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6479 f.write_str(self.as_str())
6480 }
6481}
6482
6483impl From<&str> for ConversationEntryImportance {
6484 fn from(value: &str) -> Self {
6485 match value {
6486 "high" => Self::High,
6487 "normal" => Self::Normal,
6488 other => Self::Other(other.to_string()),
6489 }
6490 }
6491}
6492
6493#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6496pub struct ConversationEntryRunMetrics {
6497 #[serde(default, skip_serializing_if = "Option::is_none")]
6499 pub pricing_confidence: Option<String>,
6500 #[serde(default, skip_serializing_if = "Option::is_none")]
6501 pub duration_ms: Option<f64>,
6502 #[serde(default, skip_serializing_if = "Option::is_none")]
6503 pub steps_count: Option<i64>,
6504 #[serde(default, skip_serializing_if = "Option::is_none")]
6505 pub input_tokens: Option<i64>,
6506 #[serde(default, skip_serializing_if = "Option::is_none")]
6507 pub output_tokens: Option<i64>,
6508 #[serde(default, skip_serializing_if = "Option::is_none")]
6509 pub thinking_tokens: Option<i64>,
6510 #[serde(default, skip_serializing_if = "Option::is_none")]
6511 pub tool_calls_count: Option<i64>,
6512 #[serde(default, skip_serializing_if = "Option::is_none")]
6513 pub llm_calls_count: Option<i64>,
6514 #[serde(default, skip_serializing_if = "Option::is_none")]
6515 pub guardrail_checks: Option<i64>,
6516 #[serde(default, skip_serializing_if = "Option::is_none")]
6517 pub guardrail_violations: Option<i64>,
6518 #[serde(default, skip_serializing_if = "Option::is_none")]
6519 pub memory_retrievals: Option<i64>,
6520 #[serde(default, skip_serializing_if = "Option::is_none")]
6521 pub memory_extractions: Option<i64>,
6522 #[serde(default, skip_serializing_if = "Option::is_none")]
6524 pub total_cost_usd: Option<f64>,
6525}
6526
6527#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6529pub struct ConversationEntryToolCall {
6530 pub id: String,
6531 pub name: String,
6532 pub status: ConversationEntryToolCallStatus,
6533 #[serde(default, skip_serializing_if = "Option::is_none")]
6534 pub input: Option<String>,
6535 #[serde(default, skip_serializing_if = "Option::is_none")]
6536 pub output: Option<String>,
6537 #[serde(default, skip_serializing_if = "Option::is_none")]
6538 pub duration_ms: Option<i64>,
6539 #[serde(default, skip_serializing_if = "Option::is_none")]
6540 pub error: Option<String>,
6541}
6542
6543#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6545pub enum ConversationEntryToolCallStatus {
6546 #[default]
6547 #[serde(rename = "done")]
6548 Done,
6549 #[serde(rename = "error")]
6550 Error,
6551 #[serde(untagged)]
6553 Other(String),
6554}
6555
6556impl ConversationEntryToolCallStatus {
6557 pub fn as_str(&self) -> &str {
6559 match self {
6560 Self::Done => "done",
6561 Self::Error => "error",
6562 Self::Other(value) => value.as_str(),
6563 }
6564 }
6565}
6566
6567impl std::fmt::Display for ConversationEntryToolCallStatus {
6568 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6569 f.write_str(self.as_str())
6570 }
6571}
6572
6573impl From<&str> for ConversationEntryToolCallStatus {
6574 fn from(value: &str) -> Self {
6575 match value {
6576 "done" => Self::Done,
6577 "error" => Self::Error,
6578 other => Self::Other(other.to_string()),
6579 }
6580 }
6581}
6582
6583#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6585pub struct CopyWorkspaceFileRequest {
6586 pub source_path: String,
6587 pub dest_path: String,
6588}
6589
6590#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6592pub struct CoreMemoryBlock {
6593 #[serde(default, skip_serializing_if = "Option::is_none")]
6594 pub block_id: Option<String>,
6595 #[serde(default, skip_serializing_if = "Option::is_none")]
6596 pub agent_id: Option<String>,
6597 #[serde(default, skip_serializing_if = "Option::is_none")]
6598 pub tenant_id: Option<String>,
6599 #[serde(default, skip_serializing_if = "Option::is_none")]
6600 pub label: Option<String>,
6601 #[serde(default, skip_serializing_if = "Option::is_none")]
6602 pub content: Option<String>,
6603 #[serde(default, skip_serializing_if = "Option::is_none")]
6604 pub max_tokens: Option<i64>,
6605 #[serde(default, skip_serializing_if = "Option::is_none")]
6606 pub updated_at: Option<String>,
6607}
6608
6609#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6612pub struct CostReconciliationResult {
6613 pub tenant_id: String,
6614 pub period: String,
6615 pub runs_total_cost_usd: f64,
6616 pub usage_tracker_cost_usd: f64,
6617 pub drift_usd: f64,
6618 pub drift_pct: f64,
6619 pub runs_scanned: i64,
6620 pub runs_missing_cost: i64,
6621 pub status: String,
6622 #[serde(default, skip_serializing_if = "Option::is_none")]
6623 pub details: Option<String>,
6624 #[serde(default, skip_serializing_if = "Option::is_none")]
6625 pub truncated: Option<bool>,
6626}
6627
6628#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6630pub struct CreateA2ATaskRequest {
6631 pub agent_id: String,
6632 pub messages: Vec<CreateA2ATaskRequestMessage>,
6637 #[serde(default, skip_serializing_if = "Option::is_none")]
6638 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
6639}
6640
6641#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6643pub struct CreateA2ATaskRequestMessage {
6644 pub role: DrawingJournalEntryAuthorKind,
6645 pub parts: Vec<A2APart>,
6646}
6647
6648#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6650pub struct CreateAdminBlogPostRequest {
6651 pub title: String,
6652 pub body: String,
6653 #[serde(default, skip_serializing_if = "Option::is_none")]
6654 pub tags: Option<Vec<String>>,
6655 #[serde(default, skip_serializing_if = "Option::is_none")]
6656 pub status: Option<BlogPostStatus>,
6657}
6658
6659#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6661pub struct CreateAdminBlogPostResponse {
6662 pub post: BlogPost,
6663}
6664
6665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6667pub struct CreateAdminProviderResponse {
6668 pub id: String,
6669 pub name: String,
6670 pub default_endpoint: String,
6671 pub is_custom: bool,
6672 pub requires_api_key: bool,
6673 pub canonical: String,
6674 #[serde(default, skip_serializing_if = "Option::is_none")]
6676 pub default_capabilities: Option<CreateAdminProviderResponseDefaultCapabilities>,
6677}
6678
6679#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6681pub struct CreateAdminProviderResponseDefaultCapabilities {
6682 #[serde(default, skip_serializing_if = "Option::is_none")]
6683 pub supports_tool_calls: Option<bool>,
6684 #[serde(default, skip_serializing_if = "Option::is_none")]
6685 pub supports_streaming: Option<bool>,
6686 #[serde(default, skip_serializing_if = "Option::is_none")]
6687 pub supports_json_mode: Option<bool>,
6688 #[serde(default, skip_serializing_if = "Option::is_none")]
6689 pub supports_vision: Option<bool>,
6690 #[serde(default, skip_serializing_if = "Option::is_none")]
6691 pub max_context_tokens: Option<i64>,
6692 #[serde(default, skip_serializing_if = "Option::is_none")]
6693 pub max_output_tokens: Option<i64>,
6694}
6695
6696#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6698pub struct CreateAgentBookmarkRequest {
6699 pub message_id: String,
6700 pub kind: AgentBookmarkKind,
6701 pub content: String,
6702 #[serde(default, skip_serializing_if = "Option::is_none")]
6703 pub session_id: Option<String>,
6704}
6705
6706#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6708pub struct CreateAgentFriaRequest {
6709 pub rights_assessed: Vec<CreateAgentFriaRequestRightsAssessedItem>,
6711 pub mitigations: String,
6712 pub assessor: String,
6713 pub next_review: String,
6715}
6716
6717#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6719pub struct CreateAgentFriaRequestRightsAssessedItem {
6720 pub right: String,
6721 pub impact: FriaRightImpact,
6722 pub justification: String,
6723 #[serde(default, skip_serializing_if = "Option::is_none")]
6724 pub mitigation: Option<String>,
6725}
6726
6727#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6729pub struct CreateAgentRequest {
6730 pub name: String,
6731 #[serde(default, skip_serializing_if = "Option::is_none")]
6732 pub model: Option<AgentModelConfigInput>,
6733 #[serde(default, skip_serializing_if = "Option::is_none")]
6734 pub description: Option<String>,
6735 #[serde(default, skip_serializing_if = "Option::is_none")]
6740 pub prompts: Option<serde_json::Map<String, serde_json::Value>>,
6741 #[serde(default, skip_serializing_if = "Option::is_none")]
6742 pub thinking: Option<serde_json::Map<String, serde_json::Value>>,
6743 #[serde(default, skip_serializing_if = "Option::is_none")]
6747 pub execution_mode: Option<CreateAgentRequestExecutionMode>,
6748 #[serde(default, skip_serializing_if = "Option::is_none")]
6749 pub resource_limits: Option<serde_json::Map<String, serde_json::Value>>,
6750 #[serde(default, skip_serializing_if = "Option::is_none")]
6751 pub memory: Option<serde_json::Map<String, serde_json::Value>>,
6752 #[serde(default, skip_serializing_if = "Option::is_none")]
6753 pub guardrails: Option<serde_json::Map<String, serde_json::Value>>,
6754}
6755
6756#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6760pub enum CreateAgentRequestExecutionMode {
6761 #[default]
6762 #[serde(rename = "async")]
6763 Async,
6764 #[serde(rename = "worker")]
6765 Worker,
6766 #[serde(untagged)]
6768 Other(String),
6769}
6770
6771impl CreateAgentRequestExecutionMode {
6772 pub fn as_str(&self) -> &str {
6774 match self {
6775 Self::Async => "async",
6776 Self::Worker => "worker",
6777 Self::Other(value) => value.as_str(),
6778 }
6779 }
6780}
6781
6782impl std::fmt::Display for CreateAgentRequestExecutionMode {
6783 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6784 f.write_str(self.as_str())
6785 }
6786}
6787
6788impl From<&str> for CreateAgentRequestExecutionMode {
6789 fn from(value: &str) -> Self {
6790 match value {
6791 "async" => Self::Async,
6792 "worker" => Self::Worker,
6793 other => Self::Other(other.to_string()),
6794 }
6795 }
6796}
6797
6798#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6800pub struct CreateAgentVersionRequest {
6801 #[serde(default, skip_serializing_if = "Option::is_none")]
6802 pub changelog: Option<String>,
6803}
6804
6805#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6807pub struct CreateAmbassadorRequestRequest {
6808 pub from_agent_id: String,
6809 pub r#type: String,
6810 pub subject: String,
6811 pub body: String,
6812}
6813
6814#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6816pub struct CreateAPIKeyRequest {
6817 pub name: String,
6818 #[serde(default, skip_serializing_if = "Option::is_none")]
6821 pub scopes: Option<Vec<String>>,
6822}
6823
6824#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6826pub struct CreateBillingPortalSessionRequest {
6827 #[serde(default, skip_serializing_if = "Option::is_none")]
6834 pub return_url: Option<String>,
6835}
6836
6837#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6839pub struct CreateBillingPortalSessionResponse {
6840 pub url: String,
6841}
6842
6843#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6845pub struct CreateCheckoutSessionRequest {
6846 pub plan_id: String,
6847 #[serde(default, skip_serializing_if = "Option::is_none")]
6854 pub success_url: Option<String>,
6855 #[serde(default, skip_serializing_if = "Option::is_none")]
6862 pub cancel_url: Option<String>,
6863}
6864
6865#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6867pub struct CreateCheckoutSessionResponse {
6868 #[serde(default, skip_serializing_if = "Option::is_none")]
6869 pub url: Option<String>,
6870}
6871
6872#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6874pub struct CreateDatasetRequest {
6875 pub name: String,
6876 pub cases: Vec<CreateDatasetRequestCas>,
6877}
6878
6879#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6881pub struct CreateDatasetRequestCas {
6882 #[serde(default, skip_serializing_if = "Option::is_none")]
6883 pub input: Option<serde_json::Map<String, serde_json::Value>>,
6884 #[serde(default, skip_serializing_if = "Option::is_none")]
6885 pub expected_output: Option<serde_json::Map<String, serde_json::Value>>,
6886 #[serde(default, skip_serializing_if = "Option::is_none")]
6887 pub tags: Option<Vec<String>>,
6888}
6889
6890#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6892pub struct CreateDrawingMaskRequest {
6893 #[serde(default, skip_serializing_if = "Option::is_none")]
6894 pub shape: Option<DrawingSelectionShape>,
6895 #[serde(default, skip_serializing_if = "Option::is_none")]
6897 pub file_id: Option<String>,
6898}
6899
6900#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6905pub struct CreatedTask {
6906 pub task_id: String,
6907 #[serde(default, skip_serializing_if = "Option::is_none")]
6908 pub parent_task_id: Option<String>,
6909 pub title: String,
6910 #[serde(default, skip_serializing_if = "Option::is_none")]
6911 pub due_at: Option<String>,
6912 pub items: Vec<CreatedTaskItem>,
6913}
6914
6915#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6917pub struct CreatedTaskItem {
6918 pub session_id: String,
6919 pub todo_id: String,
6920 #[serde(default, skip_serializing_if = "Option::is_none")]
6921 pub agent_id: Option<String>,
6922 #[serde(default, skip_serializing_if = "Option::is_none")]
6923 pub team_id: Option<String>,
6924 #[serde(default, skip_serializing_if = "Option::is_none")]
6925 pub run_id: Option<String>,
6926 #[serde(default, skip_serializing_if = "Option::is_none")]
6927 pub team_run_id: Option<String>,
6928 pub status: CreatedTaskItemStatus,
6929}
6930
6931#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6933pub enum CreatedTaskItemStatus {
6934 #[default]
6935 #[serde(rename = "pending")]
6936 Pending,
6937 #[serde(rename = "pending_confirmation")]
6938 PendingConfirmation,
6939 #[serde(rename = "in_progress")]
6940 InProgress,
6941 #[serde(rename = "cancelled")]
6942 Cancelled,
6943 #[serde(untagged)]
6945 Other(String),
6946}
6947
6948impl CreatedTaskItemStatus {
6949 pub fn as_str(&self) -> &str {
6951 match self {
6952 Self::Pending => "pending",
6953 Self::PendingConfirmation => "pending_confirmation",
6954 Self::InProgress => "in_progress",
6955 Self::Cancelled => "cancelled",
6956 Self::Other(value) => value.as_str(),
6957 }
6958 }
6959}
6960
6961impl std::fmt::Display for CreatedTaskItemStatus {
6962 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6963 f.write_str(self.as_str())
6964 }
6965}
6966
6967impl From<&str> for CreatedTaskItemStatus {
6968 fn from(value: &str) -> Self {
6969 match value {
6970 "pending" => Self::Pending,
6971 "pending_confirmation" => Self::PendingConfirmation,
6972 "in_progress" => Self::InProgress,
6973 "cancelled" => Self::Cancelled,
6974 other => Self::Other(other.to_string()),
6975 }
6976 }
6977}
6978
6979#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6981pub struct CreateExperimentRequest {
6982 pub name: String,
6983 pub dataset_id: String,
6984 pub variants: Vec<CreateExperimentRequestVariant>,
6985}
6986
6987#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6989pub struct CreateExperimentRequestVariant {
6990 #[serde(default, skip_serializing_if = "Option::is_none")]
6991 pub version: Option<String>,
6992 #[serde(default, skip_serializing_if = "Option::is_none")]
6993 pub eval_run_id: Option<String>,
6994}
6995
6996#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
6998pub struct CreateGoalRequest {
6999 pub agent_id: String,
7001 pub title: String,
7002 pub description: String,
7003 pub rationale: String,
7004 pub alignment_justification: String,
7006 pub expected_impact: String,
7007 pub resource_estimate_usd: f64,
7009}
7010
7011#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7013pub struct CreateGuardrailRequest {
7014 pub name: String,
7015 pub webhook_url: String,
7018 pub phase: GuardrailConfigItemPhase,
7019 #[serde(default, skip_serializing_if = "Option::is_none")]
7020 pub action: Option<GuardrailAction>,
7021 #[serde(default, skip_serializing_if = "Option::is_none")]
7022 pub timeout_ms: Option<i64>,
7023 #[serde(default, skip_serializing_if = "Option::is_none")]
7025 pub secret: Option<String>,
7026}
7027
7028#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7030pub struct CreateImprovementProposalRequest {
7031 pub r#type: String,
7033 pub title: String,
7034 pub description: String,
7035 pub rationale: String,
7036 pub failed_run_ids: Vec<String>,
7038 pub changes: serde_json::Map<String, serde_json::Value>,
7040 pub baseline_success_rate: f64,
7042}
7043
7044#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7046pub struct CreateIntegrationRequest {
7047 pub connector_id: String,
7048 pub name: String,
7049 #[serde(default, skip_serializing_if = "Option::is_none")]
7050 pub config: Option<serde_json::Map<String, serde_json::Value>>,
7051 #[serde(default, skip_serializing_if = "Option::is_none")]
7052 pub agent_id: Option<String>,
7053}
7054
7055#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7057pub struct CreateMCPServerRequest {
7058 pub name: String,
7059 pub transport: MCPTransport,
7060 #[serde(default, skip_serializing_if = "Option::is_none")]
7061 pub url: Option<String>,
7062 #[serde(default, skip_serializing_if = "Option::is_none")]
7063 pub command: Option<String>,
7064 #[serde(default, skip_serializing_if = "Option::is_none")]
7065 pub args: Option<Vec<String>>,
7066 #[serde(default, skip_serializing_if = "Option::is_none")]
7070 pub env: Option<serde_json::Map<String, serde_json::Value>>,
7071 #[serde(default, skip_serializing_if = "Option::is_none")]
7072 pub auth: Option<MCPServerAuth>,
7073 #[serde(default, skip_serializing_if = "Option::is_none")]
7075 pub assigned_agent_ids: Option<Vec<String>>,
7076 #[serde(default, skip_serializing_if = "Option::is_none")]
7077 pub enabled: Option<bool>,
7078 #[serde(default, skip_serializing_if = "Option::is_none")]
7085 pub api_key_ref: Option<String>,
7086 #[serde(default, skip_serializing_if = "Option::is_none")]
7088 pub egress_allowlist: Option<Vec<String>>,
7089}
7090
7091#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7093pub struct CreateMyTenantRequest {
7094 pub name: String,
7095 #[serde(default, skip_serializing_if = "Option::is_none")]
7096 pub slug: Option<String>,
7097}
7098
7099#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7101pub struct CreateMyTenantResponse {
7102 pub created: bool,
7103 pub tenant_id: String,
7104 pub name: String,
7105 pub slug: String,
7106 pub role: String,
7107 pub user_id: String,
7108}
7109
7110#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7112pub struct CreatePlanStripePriceRequest {
7113 pub amount_cents: i64,
7114 #[serde(default, skip_serializing_if = "Option::is_none")]
7116 pub currency: Option<String>,
7117 #[serde(default, skip_serializing_if = "Option::is_none")]
7119 pub interval: Option<CreatePlanStripePriceRequestInterval>,
7120 #[serde(default, skip_serializing_if = "Option::is_none")]
7121 pub product_name: Option<String>,
7122}
7123
7124#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
7126pub enum CreatePlanStripePriceRequestInterval {
7127 #[default]
7128 #[serde(rename = "month")]
7129 Month,
7130 #[serde(rename = "year")]
7131 Year,
7132 #[serde(untagged)]
7134 Other(String),
7135}
7136
7137impl CreatePlanStripePriceRequestInterval {
7138 pub fn as_str(&self) -> &str {
7140 match self {
7141 Self::Month => "month",
7142 Self::Year => "year",
7143 Self::Other(value) => value.as_str(),
7144 }
7145 }
7146}
7147
7148impl std::fmt::Display for CreatePlanStripePriceRequestInterval {
7149 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7150 f.write_str(self.as_str())
7151 }
7152}
7153
7154impl From<&str> for CreatePlanStripePriceRequestInterval {
7155 fn from(value: &str) -> Self {
7156 match value {
7157 "month" => Self::Month,
7158 "year" => Self::Year,
7159 other => Self::Other(other.to_string()),
7160 }
7161 }
7162}
7163
7164#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7166pub struct CreatePlanStripePriceResponse {
7167 #[serde(default, skip_serializing_if = "Option::is_none")]
7168 pub plan_id: Option<String>,
7169 #[serde(default, skip_serializing_if = "Option::is_none")]
7170 pub stripe_price_id: Option<String>,
7171 #[serde(default, skip_serializing_if = "Option::is_none")]
7172 pub stripe_product_id: Option<String>,
7173 #[serde(default, skip_serializing_if = "Option::is_none")]
7174 pub amount_cents: Option<i64>,
7175 #[serde(default, skip_serializing_if = "Option::is_none")]
7176 pub currency: Option<String>,
7177 #[serde(default, skip_serializing_if = "Option::is_none")]
7178 pub interval: Option<String>,
7179}
7180
7181#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7183pub struct CreateProgramRequest {
7184 pub name: String,
7185 pub agent_id: String,
7186 #[serde(default, skip_serializing_if = "Option::is_none")]
7187 pub listing_id: Option<String>,
7188 #[serde(default, skip_serializing_if = "Option::is_none")]
7189 pub description: Option<String>,
7190 pub steps: Vec<CreateProgramRequestStep>,
7191}
7192
7193#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7195pub struct CreateProgramRequestStep {
7196 pub title: String,
7197 #[serde(default, skip_serializing_if = "Option::is_none")]
7198 pub description: Option<String>,
7199 #[serde(default, skip_serializing_if = "Option::is_none")]
7200 pub order_index: Option<f64>,
7201 #[serde(default, skip_serializing_if = "Option::is_none")]
7202 pub suggested_due_offset_days: Option<f64>,
7203}
7204
7205#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7207pub struct CreateProjectRequest {
7208 pub name: String,
7209 #[serde(default, skip_serializing_if = "Option::is_none")]
7210 pub description: Option<String>,
7211 #[serde(default, skip_serializing_if = "Option::is_none")]
7212 pub instructions: Option<String>,
7213 #[serde(default, skip_serializing_if = "Option::is_none")]
7214 pub knowledge_base_ids: Option<Vec<String>>,
7215 #[serde(default, skip_serializing_if = "Option::is_none")]
7216 pub file_ids: Option<Vec<String>>,
7217 #[serde(default, skip_serializing_if = "Option::is_none")]
7218 pub visibility: Option<ProjectVisibility>,
7219 #[serde(default, skip_serializing_if = "Option::is_none")]
7220 pub shared_with: Option<Vec<ProjectGrant>>,
7221}
7222
7223#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7225pub struct CreatePublicSessionRequest {
7226 pub agent_id: String,
7227}
7228
7229#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7231pub struct CreatePublicSessionResponse {
7232 #[serde(default, skip_serializing_if = "Option::is_none")]
7233 pub session_id: Option<String>,
7234 #[serde(default, skip_serializing_if = "Option::is_none")]
7235 pub token: Option<String>,
7236 #[serde(default, skip_serializing_if = "Option::is_none")]
7237 pub agent_name: Option<String>,
7238 #[serde(default, skip_serializing_if = "Option::is_none")]
7239 pub greeting: Option<String>,
7240}
7241
7242#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7244pub struct CreateResponseRequest {
7245 pub model: String,
7247 pub input: serde_json::Value,
7249 #[serde(default, skip_serializing_if = "Option::is_none")]
7251 pub previous_response_id: Option<String>,
7252 #[serde(default, skip_serializing_if = "Option::is_none")]
7254 pub instructions: Option<String>,
7255 #[serde(default, skip_serializing_if = "Option::is_none")]
7257 pub stream: Option<bool>,
7258 #[serde(default, skip_serializing_if = "Option::is_none")]
7259 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
7260}
7261
7262#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7264pub struct CreateResponseResponse {
7265 pub id: String,
7266 pub object: String,
7268 #[serde(default, skip_serializing_if = "Option::is_none")]
7269 pub created_at: Option<i64>,
7270 pub model: String,
7271 pub output: Vec<ResponsesOutputItem>,
7272 #[serde(default, skip_serializing_if = "Option::is_none")]
7273 pub usage: Option<CreateResponseResponseUsage>,
7274}
7275
7276#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7278pub struct CreateResponseResponseUsage {
7279 #[serde(default, skip_serializing_if = "Option::is_none")]
7280 pub input_tokens: Option<i64>,
7281 #[serde(default, skip_serializing_if = "Option::is_none")]
7282 pub output_tokens: Option<i64>,
7283 #[serde(default, skip_serializing_if = "Option::is_none")]
7284 pub total_tokens: Option<i64>,
7285}
7286
7287#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7290pub struct CreateRunCheckpointResponse {
7291 pub checkpoint_id: String,
7292 pub run_id: String,
7293 pub status: String,
7294 pub step_seq: i64,
7295 #[serde(default, skip_serializing_if = "Option::is_none")]
7296 pub metrics: Option<serde_json::Map<String, serde_json::Value>>,
7297 pub created_at: String,
7298}
7299
7300#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7302pub struct CreateRunRequest {
7303 pub agent_id: String,
7304 #[serde(default, skip_serializing_if = "Option::is_none")]
7305 pub session_id: Option<String>,
7306 #[serde(default, skip_serializing_if = "Option::is_none")]
7314 pub input: Option<CreateRunRequestInput>,
7315 #[serde(default, skip_serializing_if = "Option::is_none")]
7318 pub version: Option<i64>,
7319 #[serde(default, skip_serializing_if = "Option::is_none")]
7320 pub resource_limits: Option<serde_json::Map<String, serde_json::Value>>,
7321 #[serde(default, skip_serializing_if = "Option::is_none")]
7322 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
7323}
7324
7325#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7331pub struct CreateRunRequestInput {
7332 #[serde(default, skip_serializing_if = "Option::is_none")]
7333 pub message: Option<String>,
7334 #[serde(default, skip_serializing_if = "Option::is_none")]
7335 pub file_ids: Option<Vec<String>>,
7336}
7337
7338#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7340pub struct CreateSessionAnnotationRequest {
7341 pub message_id: String,
7342 pub content: String,
7343}
7344
7345#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7347pub struct CreateSessionAnnotationResponse {
7348 #[serde(default, skip_serializing_if = "Option::is_none")]
7349 pub id: Option<String>,
7350 #[serde(default, skip_serializing_if = "Option::is_none")]
7351 pub message_id: Option<String>,
7352 #[serde(default, skip_serializing_if = "Option::is_none")]
7353 pub content: Option<String>,
7354 #[serde(default, skip_serializing_if = "Option::is_none")]
7355 pub author: Option<String>,
7356 #[serde(default, skip_serializing_if = "Option::is_none")]
7357 pub created_at: Option<String>,
7358 #[serde(default, skip_serializing_if = "Option::is_none")]
7359 pub resolved: Option<bool>,
7360}
7361
7362#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7364pub struct CreateSessionBranchRequest {
7365 #[serde(default, skip_serializing_if = "Option::is_none")]
7367 pub fork_point_run_id: Option<String>,
7368 #[serde(default, skip_serializing_if = "Option::is_none")]
7370 pub fork_point_step_seq: Option<i64>,
7371 #[serde(default, skip_serializing_if = "Option::is_none")]
7373 pub parent_branch_id: Option<String>,
7374 #[serde(default, skip_serializing_if = "Option::is_none")]
7376 pub name: Option<String>,
7377}
7378
7379#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7381pub struct CreateSessionDrawingRequest {
7382 pub width: i64,
7383 pub height: i64,
7384 #[serde(default, skip_serializing_if = "Option::is_none")]
7386 pub background: Option<String>,
7387 #[serde(default, skip_serializing_if = "Option::is_none")]
7388 pub dpi: Option<i64>,
7389 #[serde(default, skip_serializing_if = "Option::is_none")]
7391 pub name: Option<String>,
7392}
7393
7394#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7396pub struct CreateSessionRequest {
7397 pub agent_id: String,
7398 #[serde(default, skip_serializing_if = "Option::is_none")]
7399 pub team_id: Option<String>,
7400 #[serde(default, skip_serializing_if = "Option::is_none")]
7401 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
7402}
7403
7404#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7406pub struct CreateSessionShareRequest {
7407 pub role: CreateSessionShareRequestRole,
7408 #[serde(default, skip_serializing_if = "Option::is_none")]
7409 pub expires_in_hours: Option<f64>,
7410}
7411
7412#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
7414pub enum CreateSessionShareRequestRole {
7415 #[default]
7416 #[serde(rename = "viewer")]
7417 Viewer,
7418 #[serde(rename = "editor")]
7419 Editor,
7420 #[serde(untagged)]
7422 Other(String),
7423}
7424
7425impl CreateSessionShareRequestRole {
7426 pub fn as_str(&self) -> &str {
7428 match self {
7429 Self::Viewer => "viewer",
7430 Self::Editor => "editor",
7431 Self::Other(value) => value.as_str(),
7432 }
7433 }
7434}
7435
7436impl std::fmt::Display for CreateSessionShareRequestRole {
7437 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7438 f.write_str(self.as_str())
7439 }
7440}
7441
7442impl From<&str> for CreateSessionShareRequestRole {
7443 fn from(value: &str) -> Self {
7444 match value {
7445 "viewer" => Self::Viewer,
7446 "editor" => Self::Editor,
7447 other => Self::Other(other.to_string()),
7448 }
7449 }
7450}
7451
7452#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7454pub struct CreateSessionShareResponse {
7455 #[serde(default, skip_serializing_if = "Option::is_none")]
7456 pub share_url: Option<String>,
7457 #[serde(default, skip_serializing_if = "Option::is_none")]
7458 pub role: Option<String>,
7459 #[serde(default, skip_serializing_if = "Option::is_none")]
7460 pub expires_at: Option<String>,
7461}
7462
7463#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7465pub struct CreateSessionTodoRequest {
7466 pub title: String,
7467 #[serde(default, skip_serializing_if = "Option::is_none")]
7468 pub description: Option<String>,
7469 #[serde(default, skip_serializing_if = "Option::is_none")]
7470 pub due_at: Option<String>,
7471 #[serde(default, skip_serializing_if = "Option::is_none")]
7472 pub assign_agent_id: Option<String>,
7473 #[serde(default, skip_serializing_if = "Option::is_none")]
7474 pub status: Option<String>,
7475}
7476
7477#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7479pub struct CreateSpecPackageCheckoutSessionResponse {
7480 pub error: InvokeListingAgentResponseError,
7481 pub message: String,
7482 pub retry_after_seconds: i64,
7483}
7484
7485#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7487pub struct CreateVotingProposalRequest {
7488 pub title: String,
7489 pub description: String,
7490 pub proposal_type: String,
7491}
7492
7493#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7495pub struct CreateWebhookRequest {
7496 pub url: String,
7497 pub events: Vec<WebhookDeliveryAttemptEventType>,
7498}
7499
7500#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7502pub struct CreateWorkspaceRequest {
7503 #[serde(default, skip_serializing_if = "Option::is_none")]
7504 pub name: Option<String>,
7505}
7506
7507#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7509pub struct CustomPlan {
7510 pub id: String,
7512 pub name: String,
7513 #[serde(default, skip_serializing_if = "Option::is_none")]
7515 pub description: Option<String>,
7516 #[serde(default, skip_serializing_if = "Option::is_none")]
7518 pub program: Option<String>,
7519 pub base_plan: CustomPlanBasePlan,
7520 pub price_amount_cents: i64,
7521 pub price_currency: String,
7522 #[serde(default, skip_serializing_if = "Option::is_none")]
7524 pub stripe_price_id: Option<String>,
7525 #[serde(default, skip_serializing_if = "Option::is_none")]
7526 pub quotas: Option<TenantQuotas>,
7527 #[serde(default, skip_serializing_if = "Option::is_none")]
7528 pub llm: Option<PlanLLMLimits>,
7529 pub visibility: CustomPlanVisibility,
7530 pub active: bool,
7531 pub created_at: String,
7532 pub updated_at: String,
7533}
7534
7535#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
7537pub enum CustomPlanBasePlan {
7538 #[default]
7539 #[serde(rename = "free")]
7540 Free,
7541 #[serde(rename = "starter")]
7542 Starter,
7543 #[serde(rename = "pro")]
7544 Pro,
7545 #[serde(rename = "enterprise")]
7546 Enterprise,
7547 #[serde(untagged)]
7549 Other(String),
7550}
7551
7552impl CustomPlanBasePlan {
7553 pub fn as_str(&self) -> &str {
7555 match self {
7556 Self::Free => "free",
7557 Self::Starter => "starter",
7558 Self::Pro => "pro",
7559 Self::Enterprise => "enterprise",
7560 Self::Other(value) => value.as_str(),
7561 }
7562 }
7563}
7564
7565impl std::fmt::Display for CustomPlanBasePlan {
7566 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7567 f.write_str(self.as_str())
7568 }
7569}
7570
7571impl From<&str> for CustomPlanBasePlan {
7572 fn from(value: &str) -> Self {
7573 match value {
7574 "free" => Self::Free,
7575 "starter" => Self::Starter,
7576 "pro" => Self::Pro,
7577 "enterprise" => Self::Enterprise,
7578 other => Self::Other(other.to_string()),
7579 }
7580 }
7581}
7582
7583#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7585pub struct CustomPlanInput {
7586 pub name: String,
7587 #[serde(default, skip_serializing_if = "Option::is_none")]
7588 pub description: Option<String>,
7589 #[serde(default, skip_serializing_if = "Option::is_none")]
7590 pub program: Option<String>,
7591 pub base_plan: CustomPlanBasePlan,
7592 pub price_amount_cents: i64,
7593 #[serde(default, skip_serializing_if = "Option::is_none")]
7595 pub price_currency: Option<String>,
7596 #[serde(default, skip_serializing_if = "Option::is_none")]
7597 pub stripe_price_id: Option<String>,
7598 #[serde(default, skip_serializing_if = "Option::is_none")]
7599 pub quotas: Option<TenantQuotas>,
7600 #[serde(default, skip_serializing_if = "Option::is_none")]
7601 pub llm: Option<PlanLLMLimits>,
7602 #[serde(default, skip_serializing_if = "Option::is_none")]
7606 pub visibility: Option<CustomPlanVisibility>,
7607 #[serde(default, skip_serializing_if = "Option::is_none")]
7612 pub active: Option<bool>,
7613}
7614
7615#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
7617pub enum CustomPlanVisibility {
7618 #[default]
7619 #[serde(rename = "public")]
7620 Public,
7621 #[serde(rename = "hidden")]
7622 Hidden,
7623 #[serde(untagged)]
7625 Other(String),
7626}
7627
7628impl CustomPlanVisibility {
7629 pub fn as_str(&self) -> &str {
7631 match self {
7632 Self::Public => "public",
7633 Self::Hidden => "hidden",
7634 Self::Other(value) => value.as_str(),
7635 }
7636 }
7637}
7638
7639impl std::fmt::Display for CustomPlanVisibility {
7640 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7641 f.write_str(self.as_str())
7642 }
7643}
7644
7645impl From<&str> for CustomPlanVisibility {
7646 fn from(value: &str) -> Self {
7647 match value {
7648 "public" => Self::Public,
7649 "hidden" => Self::Hidden,
7650 other => Self::Other(other.to_string()),
7651 }
7652 }
7653}
7654
7655#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7657pub struct DataExplorerKey {
7658 pub key: Vec<serde_json::Value>,
7659 pub value_preview: String,
7660 pub size_bytes: i64,
7661 pub r#type: String,
7662 pub sensitive: bool,
7663}
7664
7665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7667pub struct DataExplorerNamespace {
7668 pub id: String,
7669 pub label: String,
7670 pub description: String,
7671 pub count: i64,
7672}
7673
7674#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7677pub struct DataSubjectAccessReport {
7678 pub subject_id: String,
7679 pub tenant_id: String,
7680 pub runs: Vec<String>,
7681 pub sessions: Vec<String>,
7682 pub memory: Vec<String>,
7683 pub files: Vec<String>,
7684 pub feedback: Vec<String>,
7685 pub core_memory: Vec<String>,
7688 pub runs_count: i64,
7689 pub sessions_count: i64,
7690 pub memory_count: i64,
7691 pub core_memory_count: i64,
7692 pub files_count: i64,
7693 pub feedback_count: i64,
7694 pub not_exported: Vec<String>,
7699 pub swept: SubjectSweep,
7700}
7701
7702#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7704pub struct DataSubjectErasureResult {
7705 pub erased: bool,
7706 pub subject_id: String,
7707 pub runs_deleted: i64,
7708 pub sessions_deleted: i64,
7709 pub memory_deleted: i64,
7710 pub core_memory_deleted: i64,
7711 pub files_deleted: i64,
7712 pub feedback_deleted: i64,
7713 pub not_erased: Vec<String>,
7718 pub swept: SubjectSweep,
7719}
7720
7721#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7723pub struct DeactivateSafeModeResponse {
7724 #[serde(default, skip_serializing_if = "Option::is_none")]
7725 pub ok: Option<bool>,
7726 #[serde(default, skip_serializing_if = "Option::is_none")]
7727 pub mode: Option<String>,
7728}
7729
7730#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7733pub struct DeadlockReport {
7734 #[serde(rename = "hasDeadlock")]
7738 pub has_deadlock: bool,
7739 #[serde(rename = "conflictingRules")]
7743 pub conflicting_rules: Vec<DeadlockReportConflictingRule>,
7744 pub recommendation: String,
7745 pub checked_at: String,
7746 #[serde(rename = "has_deadlock")]
7747 pub has_deadlock_: bool,
7748 #[serde(rename = "conflicting_rules")]
7749 pub conflicting_rules_: Vec<DeadlockReportConflictingRule2>,
7750}
7751
7752#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7754pub struct DeadlockReportConflictingRule {
7755 pub prohibition: String,
7756 pub requirement: String,
7757}
7758
7759#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7761pub struct DeadlockReportConflictingRule2 {
7762 pub prohibition: String,
7763 pub requirement: String,
7764}
7765
7766#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7768pub struct DeclineInviteFromPickerResponse {
7769 pub declined: bool,
7770 pub invite: Invite,
7771}
7772
7773#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7775pub struct DeleteAdminBlogPostResponse {
7776 pub deleted: bool,
7777}
7778
7779#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7781pub struct DeleteAdminIntegrationOAuthProviderResponse {
7782 pub provider: String,
7783 pub configured: bool,
7785}
7786
7787#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7789pub struct DeleteAdminLLMDefaultResponse {
7790 pub provider: String,
7791 pub configured: bool,
7793}
7794
7795#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7797pub struct DeleteAdminProviderResponse {
7798 pub deleted: bool,
7799 pub id: String,
7800}
7801
7802#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7804pub struct DeleteAgentBookmarkResponse {
7805 pub removed: bool,
7806 pub message_id: String,
7807}
7808
7809#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7811pub struct DeleteAgentResponse {
7812 pub deleted: bool,
7813 pub agent_id: String,
7814}
7815
7816#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7818pub struct DeleteAllAgentBookmarksResponse {
7819 pub removed: i64,
7820}
7821
7822#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7824pub struct DeleteCustomPlanResponse {
7825 pub deleted: bool,
7826 pub id: String,
7827 #[serde(default, skip_serializing_if = "Option::is_none")]
7829 pub reassigned: Option<i64>,
7830}
7831
7832#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7834pub struct DeleteDataExplorerValueResponse {
7835 #[serde(default, skip_serializing_if = "Option::is_none")]
7836 pub success: Option<bool>,
7837}
7838
7839#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7841pub struct DeleteDrawingResponse {
7842 pub deleted: bool,
7843 pub drawing_id: String,
7844 pub ops: i64,
7846 pub masks: i64,
7847}
7848
7849#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7851pub struct DeleteGuardrailResponse {
7852 #[serde(default, skip_serializing_if = "Option::is_none")]
7853 pub deleted: Option<bool>,
7854 #[serde(default, skip_serializing_if = "Option::is_none")]
7855 pub guardrail_id: Option<String>,
7856}
7857
7858#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7860pub struct DeleteLLMProviderKeyResponse {
7861 #[serde(default, skip_serializing_if = "Option::is_none")]
7862 pub deleted: Option<bool>,
7863 #[serde(default, skip_serializing_if = "Option::is_none")]
7864 pub provider_id: Option<String>,
7865}
7866
7867#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7869pub struct DeleteMCPServerResponse {
7870 pub ok: bool,
7871 pub cascade: DeleteMCPServerResponseCascade,
7872}
7873
7874#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7876pub struct DeleteMCPServerResponseCascade {
7877 pub agents_with_stale_ref: i64,
7878 pub agent_ids: Vec<String>,
7880}
7881
7882#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7884pub struct DeleteMeResponse {
7885 pub deleted: bool,
7886 pub tenants: Vec<DeleteMeResponseTenant>,
7887 pub sessions_revoked: i64,
7888 pub erased: DeleteMeResponseErased,
7893 pub not_erased: Vec<String>,
7896}
7897
7898#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7903pub struct DeleteMeResponseErased {
7904 pub runs: i64,
7905 pub sessions: i64,
7906 pub memory: i64,
7907 pub core_memory: i64,
7908 pub files: i64,
7909 pub feedback: i64,
7910}
7911
7912#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7914pub struct DeleteMeResponseTenant {
7915 pub tenant_id: String,
7916}
7917
7918#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7920pub struct DeleteModelPricingOverrideResponse {
7921 #[serde(rename = "modelRef")]
7924 pub model_ref: String,
7925 pub deleted: bool,
7926 #[serde(rename = "model_ref")]
7927 pub model_ref_: String,
7928}
7929
7930#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7932pub struct DeleteNotificationResponse {
7933 #[serde(default, skip_serializing_if = "Option::is_none")]
7934 pub ok: Option<bool>,
7935}
7936
7937#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7939pub struct DeleteNotificationTargetResponse {
7940 pub ok: bool,
7941}
7942
7943#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7945pub struct DeleteProjectResponse {
7946 pub deleted: bool,
7947 pub project_id: String,
7948 pub chats_kept: i64,
7949}
7950
7951#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7953pub struct DeletePromoCodeResponse {
7954 pub deleted: bool,
7955 pub code: String,
7957}
7958
7959#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7961pub struct DeleteSessionBranchResponse {
7962 pub deleted: bool,
7963 pub session_id: String,
7964 pub branch_id: String,
7965 pub runs: i64,
7967}
7968
7969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7971pub struct DeleteSessionTodoResponse {
7972 #[serde(default, skip_serializing_if = "Option::is_none")]
7973 pub deleted: Option<bool>,
7974 #[serde(default, skip_serializing_if = "Option::is_none")]
7975 pub todo_id: Option<String>,
7976 #[serde(default, skip_serializing_if = "Option::is_none")]
7977 pub session_id: Option<String>,
7978}
7979
7980#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7982pub struct DeleteSpawnPolicyResponse {
7983 #[serde(default, skip_serializing_if = "Option::is_none")]
7984 pub ok: Option<bool>,
7985}
7986
7987#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7989pub struct DeleteSquadGraphEdgeResponse {
7990 #[serde(default, skip_serializing_if = "Option::is_none")]
7991 pub deleted: Option<bool>,
7992 #[serde(default, skip_serializing_if = "Option::is_none")]
7993 pub edge_id: Option<String>,
7994}
7995
7996#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7998pub struct DeleteSquadGraphNodeResponse {
7999 #[serde(default, skip_serializing_if = "Option::is_none")]
8000 pub deleted: Option<bool>,
8001 #[serde(default, skip_serializing_if = "Option::is_none")]
8002 pub agent_id: Option<String>,
8003}
8004
8005#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8007pub struct DeleteSquadResponse {
8008 #[serde(default, skip_serializing_if = "Option::is_none")]
8009 pub deleted: Option<bool>,
8010}
8011
8012#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8014pub struct DeleteTeamGraphEdgeResponse {
8015 #[serde(default, skip_serializing_if = "Option::is_none")]
8016 pub deleted: Option<bool>,
8017 #[serde(default, skip_serializing_if = "Option::is_none")]
8018 pub edge_id: Option<String>,
8019}
8020
8021#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8023pub struct DeleteTeamGraphNodeResponse {
8024 #[serde(default, skip_serializing_if = "Option::is_none")]
8025 pub deleted: Option<bool>,
8026 #[serde(default, skip_serializing_if = "Option::is_none")]
8027 pub agent_id: Option<String>,
8028}
8029
8030#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8032pub struct DeleteTeamResponse {
8033 pub deleted: bool,
8034 pub team_id: String,
8035}
8036
8037#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8039pub struct DeleteUserResponse {
8040 #[serde(default, skip_serializing_if = "Option::is_none")]
8041 pub deleted: Option<bool>,
8042}
8043
8044#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8046pub struct DeleteWebhookResponse {
8047 pub deleted: bool,
8048 pub webhook_id: String,
8049}
8050
8051#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8053pub struct DeleteWorkspaceFileResponse {
8054 pub trashed: bool,
8055 pub trash_path: String,
8056 pub original_path: String,
8057}
8058
8059#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8061pub enum DeleteWorkspaceFileTrash {
8062 #[default]
8063 #[serde(rename = "false")]
8064 False,
8065 #[serde(untagged)]
8067 Other(String),
8068}
8069
8070impl DeleteWorkspaceFileTrash {
8071 pub fn as_str(&self) -> &str {
8073 match self {
8074 Self::False => "false",
8075 Self::Other(value) => value.as_str(),
8076 }
8077 }
8078}
8079
8080impl std::fmt::Display for DeleteWorkspaceFileTrash {
8081 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8082 f.write_str(self.as_str())
8083 }
8084}
8085
8086impl From<&str> for DeleteWorkspaceFileTrash {
8087 fn from(value: &str) -> Self {
8088 match value {
8089 "false" => Self::False,
8090 other => Self::Other(other.to_string()),
8091 }
8092 }
8093}
8094
8095#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8097pub struct DesignRequest {
8098 pub request_id: String,
8099 pub tenant_id: String,
8100 #[serde(default, skip_serializing_if = "Option::is_none")]
8101 pub submitted_by: Option<String>,
8102 #[serde(default, skip_serializing_if = "Option::is_none")]
8103 pub agent_name: Option<String>,
8104 #[serde(default, skip_serializing_if = "Option::is_none")]
8105 pub agent_description: Option<String>,
8106 #[serde(default, skip_serializing_if = "Option::is_none")]
8107 pub agent_role: Option<String>,
8108 #[serde(default, skip_serializing_if = "Option::is_none")]
8109 pub tools: Option<Vec<String>>,
8110 #[serde(default, skip_serializing_if = "Option::is_none")]
8111 pub parent_agent_id: Option<String>,
8112 #[serde(default, skip_serializing_if = "Option::is_none")]
8113 pub rationale: Option<String>,
8114 pub status: DesignRequestStatus,
8115 #[serde(default, skip_serializing_if = "Option::is_none")]
8117 pub proposal_id: Option<String>,
8118 #[serde(default, skip_serializing_if = "Option::is_none")]
8120 pub spawned_agent_id: Option<String>,
8121 pub created_at: String,
8122 pub updated_at: String,
8123}
8124
8125#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8130pub struct DesignRequestCreate {
8131 #[serde(default, skip_serializing_if = "Option::is_none")]
8132 pub submitted_by: Option<String>,
8133 pub agent_name: String,
8134 pub agent_description: String,
8135 #[serde(default, skip_serializing_if = "Option::is_none")]
8136 pub agent_role: Option<String>,
8137 #[serde(default, skip_serializing_if = "Option::is_none")]
8138 pub tools: Option<Vec<String>>,
8139 #[serde(default, skip_serializing_if = "Option::is_none")]
8140 pub parent_agent_id: Option<String>,
8141 #[serde(default, skip_serializing_if = "Option::is_none")]
8142 pub rationale: Option<String>,
8143}
8144
8145#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8147pub enum DesignRequestStatus {
8148 #[default]
8149 #[serde(rename = "pending")]
8150 Pending,
8151 #[serde(rename = "voting")]
8152 Voting,
8153 #[serde(rename = "approved")]
8154 Approved,
8155 #[serde(rename = "rejected")]
8156 Rejected,
8157 #[serde(rename = "spawned")]
8158 Spawned,
8159 #[serde(untagged)]
8161 Other(String),
8162}
8163
8164impl DesignRequestStatus {
8165 pub fn as_str(&self) -> &str {
8167 match self {
8168 Self::Pending => "pending",
8169 Self::Voting => "voting",
8170 Self::Approved => "approved",
8171 Self::Rejected => "rejected",
8172 Self::Spawned => "spawned",
8173 Self::Other(value) => value.as_str(),
8174 }
8175 }
8176}
8177
8178impl std::fmt::Display for DesignRequestStatus {
8179 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8180 f.write_str(self.as_str())
8181 }
8182}
8183
8184impl From<&str> for DesignRequestStatus {
8185 fn from(value: &str) -> Self {
8186 match value {
8187 "pending" => Self::Pending,
8188 "voting" => Self::Voting,
8189 "approved" => Self::Approved,
8190 "rejected" => Self::Rejected,
8191 "spawned" => Self::Spawned,
8192 other => Self::Other(other.to_string()),
8193 }
8194 }
8195}
8196
8197#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8199pub struct DisableMfaResponse {
8200 pub disabled: bool,
8201}
8202
8203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8205pub struct DomainCertLifecycle {
8206 pub state: DomainCertLifecycleState,
8208 #[serde(default, skip_serializing_if = "Option::is_none")]
8209 pub not_before: Option<String>,
8210 #[serde(default, skip_serializing_if = "Option::is_none")]
8211 pub not_after: Option<String>,
8212 #[serde(default, skip_serializing_if = "Option::is_none")]
8214 pub issuer_cn: Option<String>,
8215 #[serde(default, skip_serializing_if = "Option::is_none")]
8216 pub last_checked_at: Option<String>,
8217 #[serde(default, skip_serializing_if = "Option::is_none")]
8218 pub last_error: Option<String>,
8219}
8220
8221#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8223pub enum DomainCertLifecycleState {
8224 #[default]
8225 #[serde(rename = "none")]
8226 None,
8227 #[serde(rename = "provisioning")]
8228 Provisioning,
8229 #[serde(rename = "active")]
8230 Active,
8231 #[serde(rename = "renewal_due")]
8232 RenewalDue,
8233 #[serde(rename = "failed")]
8234 Failed,
8235 #[serde(rename = "revoked")]
8236 Revoked,
8237 #[serde(untagged)]
8239 Other(String),
8240}
8241
8242impl DomainCertLifecycleState {
8243 pub fn as_str(&self) -> &str {
8245 match self {
8246 Self::None => "none",
8247 Self::Provisioning => "provisioning",
8248 Self::Active => "active",
8249 Self::RenewalDue => "renewal_due",
8250 Self::Failed => "failed",
8251 Self::Revoked => "revoked",
8252 Self::Other(value) => value.as_str(),
8253 }
8254 }
8255}
8256
8257impl std::fmt::Display for DomainCertLifecycleState {
8258 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8259 f.write_str(self.as_str())
8260 }
8261}
8262
8263impl From<&str> for DomainCertLifecycleState {
8264 fn from(value: &str) -> Self {
8265 match value {
8266 "none" => Self::None,
8267 "provisioning" => Self::Provisioning,
8268 "active" => Self::Active,
8269 "renewal_due" => Self::RenewalDue,
8270 "failed" => Self::Failed,
8271 "revoked" => Self::Revoked,
8272 other => Self::Other(other.to_string()),
8273 }
8274 }
8275}
8276
8277#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8279pub struct DomainDnsLifecycle {
8280 pub state: DomainDnsLifecycleState,
8283 pub method: DomainDnsLifecycleMethod,
8284 pub target: String,
8287 #[serde(default, skip_serializing_if = "Option::is_none")]
8289 pub last_checked_at: Option<String>,
8290 #[serde(default, skip_serializing_if = "Option::is_none")]
8293 pub verified_at: Option<String>,
8294 #[serde(default, skip_serializing_if = "Option::is_none")]
8295 pub last_error: Option<String>,
8296}
8297
8298#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8300pub enum DomainDnsLifecycleMethod {
8301 #[default]
8302 #[serde(rename = "cname")]
8303 Cname,
8304 #[serde(rename = "a")]
8305 A,
8306 #[serde(untagged)]
8308 Other(String),
8309}
8310
8311impl DomainDnsLifecycleMethod {
8312 pub fn as_str(&self) -> &str {
8314 match self {
8315 Self::Cname => "cname",
8316 Self::A => "a",
8317 Self::Other(value) => value.as_str(),
8318 }
8319 }
8320}
8321
8322impl std::fmt::Display for DomainDnsLifecycleMethod {
8323 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8324 f.write_str(self.as_str())
8325 }
8326}
8327
8328impl From<&str> for DomainDnsLifecycleMethod {
8329 fn from(value: &str) -> Self {
8330 match value {
8331 "cname" => Self::Cname,
8332 "a" => Self::A,
8333 other => Self::Other(other.to_string()),
8334 }
8335 }
8336}
8337
8338#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8341pub enum DomainDnsLifecycleState {
8342 #[default]
8343 #[serde(rename = "pending")]
8344 Pending,
8345 #[serde(rename = "verified")]
8346 Verified,
8347 #[serde(rename = "failed")]
8348 Failed,
8349 #[serde(rename = "drift")]
8350 Drift,
8351 #[serde(rename = "deactivated")]
8352 Deactivated,
8353 #[serde(untagged)]
8355 Other(String),
8356}
8357
8358impl DomainDnsLifecycleState {
8359 pub fn as_str(&self) -> &str {
8361 match self {
8362 Self::Pending => "pending",
8363 Self::Verified => "verified",
8364 Self::Failed => "failed",
8365 Self::Drift => "drift",
8366 Self::Deactivated => "deactivated",
8367 Self::Other(value) => value.as_str(),
8368 }
8369 }
8370}
8371
8372impl std::fmt::Display for DomainDnsLifecycleState {
8373 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8374 f.write_str(self.as_str())
8375 }
8376}
8377
8378impl From<&str> for DomainDnsLifecycleState {
8379 fn from(value: &str) -> Self {
8380 match value {
8381 "pending" => Self::Pending,
8382 "verified" => Self::Verified,
8383 "failed" => Self::Failed,
8384 "drift" => Self::Drift,
8385 "deactivated" => Self::Deactivated,
8386 other => Self::Other(other.to_string()),
8387 }
8388 }
8389}
8390
8391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8394pub struct Drawing {
8395 pub drawing_id: String,
8396 pub session_id: String,
8397 pub workspace_id: String,
8398 pub width: i64,
8399 pub height: i64,
8400 pub dpi: i64,
8401 pub background: String,
8403 pub layers: Vec<DrawingLayer>,
8404 pub seq: i64,
8406 pub snapshot_seq: i64,
8408 pub created_at: String,
8409 pub updated_at: String,
8410}
8411
8412#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8414pub struct DrawingBrush {
8415 pub preset: String,
8416 pub size: f64,
8418 pub hardness: i64,
8419 pub opacity: i64,
8420 pub flow: i64,
8421 pub spacing: f64,
8424 #[serde(default, skip_serializing_if = "Option::is_none")]
8426 pub color: Option<String>,
8427}
8428
8429#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8431pub struct DrawingJournalEntry {
8432 pub seq: i64,
8433 pub client_op_id: String,
8434 pub author: DrawingJournalEntryAuthor,
8435 pub at: String,
8436 pub op: DrawingOp,
8437}
8438
8439#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8441pub struct DrawingJournalEntryAuthor {
8442 pub kind: DrawingJournalEntryAuthorKind,
8443 pub id: String,
8444 #[serde(default, skip_serializing_if = "Option::is_none")]
8445 pub run_id: Option<String>,
8446}
8447
8448#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8450pub enum DrawingJournalEntryAuthorKind {
8451 #[default]
8452 #[serde(rename = "user")]
8453 User,
8454 #[serde(rename = "agent")]
8455 Agent,
8456 #[serde(untagged)]
8458 Other(String),
8459}
8460
8461impl DrawingJournalEntryAuthorKind {
8462 pub fn as_str(&self) -> &str {
8464 match self {
8465 Self::User => "user",
8466 Self::Agent => "agent",
8467 Self::Other(value) => value.as_str(),
8468 }
8469 }
8470}
8471
8472impl std::fmt::Display for DrawingJournalEntryAuthorKind {
8473 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8474 f.write_str(self.as_str())
8475 }
8476}
8477
8478impl From<&str> for DrawingJournalEntryAuthorKind {
8479 fn from(value: &str) -> Self {
8480 match value {
8481 "user" => Self::User,
8482 "agent" => Self::Agent,
8483 other => Self::Other(other.to_string()),
8484 }
8485 }
8486}
8487
8488#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8490pub struct DrawingLayer {
8491 pub layer_id: String,
8492 pub name: String,
8493 pub opacity: i64,
8495 pub blend: DrawingLayerBlend,
8496 pub visible: bool,
8497 pub locked: bool,
8498 pub kind: DrawingLayerKind,
8499 #[serde(default, skip_serializing_if = "Option::is_none")]
8501 pub source: Option<DrawingLayerSource>,
8502}
8503
8504#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8506pub enum DrawingLayerBlend {
8507 #[default]
8508 #[serde(rename = "normal")]
8509 Normal,
8510 #[serde(rename = "multiply")]
8511 Multiply,
8512 #[serde(rename = "screen")]
8513 Screen,
8514 #[serde(rename = "overlay")]
8515 Overlay,
8516 #[serde(rename = "darken")]
8517 Darken,
8518 #[serde(rename = "lighten")]
8519 Lighten,
8520 #[serde(rename = "add")]
8521 Add,
8522 #[serde(untagged)]
8524 Other(String),
8525}
8526
8527impl DrawingLayerBlend {
8528 pub fn as_str(&self) -> &str {
8530 match self {
8531 Self::Normal => "normal",
8532 Self::Multiply => "multiply",
8533 Self::Screen => "screen",
8534 Self::Overlay => "overlay",
8535 Self::Darken => "darken",
8536 Self::Lighten => "lighten",
8537 Self::Add => "add",
8538 Self::Other(value) => value.as_str(),
8539 }
8540 }
8541}
8542
8543impl std::fmt::Display for DrawingLayerBlend {
8544 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8545 f.write_str(self.as_str())
8546 }
8547}
8548
8549impl From<&str> for DrawingLayerBlend {
8550 fn from(value: &str) -> Self {
8551 match value {
8552 "normal" => Self::Normal,
8553 "multiply" => Self::Multiply,
8554 "screen" => Self::Screen,
8555 "overlay" => Self::Overlay,
8556 "darken" => Self::Darken,
8557 "lighten" => Self::Lighten,
8558 "add" => Self::Add,
8559 other => Self::Other(other.to_string()),
8560 }
8561 }
8562}
8563
8564#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8566pub enum DrawingLayerKind {
8567 #[default]
8568 #[serde(rename = "raster")]
8569 Raster,
8570 #[serde(untagged)]
8572 Other(String),
8573}
8574
8575impl DrawingLayerKind {
8576 pub fn as_str(&self) -> &str {
8578 match self {
8579 Self::Raster => "raster",
8580 Self::Other(value) => value.as_str(),
8581 }
8582 }
8583}
8584
8585impl std::fmt::Display for DrawingLayerKind {
8586 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8587 f.write_str(self.as_str())
8588 }
8589}
8590
8591impl From<&str> for DrawingLayerKind {
8592 fn from(value: &str) -> Self {
8593 match value {
8594 "raster" => Self::Raster,
8595 other => Self::Other(other.to_string()),
8596 }
8597 }
8598}
8599
8600#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8602pub struct DrawingLayerSource {
8603 pub file_id: String,
8604 pub tool: String,
8605}
8606
8607#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8610pub struct DrawingMask {
8611 pub mask_id: String,
8612 pub drawing_id: String,
8613 pub width: i64,
8614 pub height: i64,
8615 pub bbox: DrawingMaskBbox,
8616 pub file_id: String,
8618 pub created_at: String,
8619}
8620
8621#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8623pub struct DrawingMaskBbox {
8624 pub x: i64,
8625 pub y: i64,
8626 pub w: i64,
8627 pub h: i64,
8628}
8629
8630#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8636pub struct DrawingOp {
8637 pub r#type: DrawingOpType,
8638 #[serde(default, skip_serializing_if = "Option::is_none")]
8639 pub layer_id: Option<String>,
8640 #[serde(default, skip_serializing_if = "Option::is_none")]
8641 pub brush: Option<DrawingBrush>,
8642 #[serde(default, skip_serializing_if = "Option::is_none")]
8643 pub encoding: Option<DrawingOpEncoding>,
8644 #[serde(default, skip_serializing_if = "Option::is_none")]
8645 pub points: Option<Vec<DrawingStrokePoint>>,
8646 #[serde(default, skip_serializing_if = "Option::is_none")]
8647 pub stroke_id: Option<String>,
8648 #[serde(default, skip_serializing_if = "Option::is_none")]
8649 pub part: Option<i64>,
8650 #[serde(default, skip_serializing_if = "Option::is_none")]
8651 pub continues: Option<bool>,
8652 #[serde(default, skip_serializing_if = "Option::is_none")]
8653 pub x: Option<f64>,
8654 #[serde(default, skip_serializing_if = "Option::is_none")]
8655 pub y: Option<f64>,
8656 #[serde(default, skip_serializing_if = "Option::is_none")]
8657 pub w: Option<i64>,
8658 #[serde(default, skip_serializing_if = "Option::is_none")]
8659 pub h: Option<i64>,
8660 #[serde(default, skip_serializing_if = "Option::is_none")]
8661 pub color: Option<String>,
8662 #[serde(default, skip_serializing_if = "Option::is_none")]
8663 pub tolerance: Option<i64>,
8664 #[serde(default, skip_serializing_if = "Option::is_none")]
8665 pub contiguous: Option<bool>,
8666 #[serde(default, skip_serializing_if = "Option::is_none")]
8667 pub file_id: Option<String>,
8668 #[serde(default, skip_serializing_if = "Option::is_none")]
8669 pub fit: Option<DrawingOpFit>,
8670 #[serde(default, skip_serializing_if = "Option::is_none")]
8671 pub layer: Option<DrawingLayer>,
8672 #[serde(default, skip_serializing_if = "Option::is_none")]
8674 pub index: Option<i64>,
8675 #[serde(default, skip_serializing_if = "Option::is_none")]
8676 pub patch: Option<DrawingOpPatch>,
8677 #[serde(default, skip_serializing_if = "Option::is_none")]
8678 pub order: Option<Vec<String>>,
8679 #[serde(default, skip_serializing_if = "Option::is_none")]
8680 pub undo_of: Option<i64>,
8681 #[serde(default, skip_serializing_if = "Option::is_none")]
8682 pub redo_of: Option<i64>,
8683}
8684
8685#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8687pub enum DrawingOpEncoding {
8688 #[default]
8689 #[serde(rename = "json")]
8690 JSON,
8691 #[serde(untagged)]
8693 Other(String),
8694}
8695
8696impl DrawingOpEncoding {
8697 pub fn as_str(&self) -> &str {
8699 match self {
8700 Self::JSON => "json",
8701 Self::Other(value) => value.as_str(),
8702 }
8703 }
8704}
8705
8706impl std::fmt::Display for DrawingOpEncoding {
8707 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8708 f.write_str(self.as_str())
8709 }
8710}
8711
8712impl From<&str> for DrawingOpEncoding {
8713 fn from(value: &str) -> Self {
8714 match value {
8715 "json" => Self::JSON,
8716 other => Self::Other(other.to_string()),
8717 }
8718 }
8719}
8720
8721#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8723pub enum DrawingOpFit {
8724 #[default]
8725 #[serde(rename = "stretch")]
8726 Stretch,
8727 #[serde(rename = "contain")]
8728 Contain,
8729 #[serde(untagged)]
8731 Other(String),
8732}
8733
8734impl DrawingOpFit {
8735 pub fn as_str(&self) -> &str {
8737 match self {
8738 Self::Stretch => "stretch",
8739 Self::Contain => "contain",
8740 Self::Other(value) => value.as_str(),
8741 }
8742 }
8743}
8744
8745impl std::fmt::Display for DrawingOpFit {
8746 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8747 f.write_str(self.as_str())
8748 }
8749}
8750
8751impl From<&str> for DrawingOpFit {
8752 fn from(value: &str) -> Self {
8753 match value {
8754 "stretch" => Self::Stretch,
8755 "contain" => Self::Contain,
8756 other => Self::Other(other.to_string()),
8757 }
8758 }
8759}
8760
8761#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8763pub struct DrawingOpPatch {
8764 #[serde(default, skip_serializing_if = "Option::is_none")]
8765 pub name: Option<String>,
8766 #[serde(default, skip_serializing_if = "Option::is_none")]
8767 pub opacity: Option<i64>,
8768 #[serde(default, skip_serializing_if = "Option::is_none")]
8769 pub blend: Option<DrawingLayerBlend>,
8770 #[serde(default, skip_serializing_if = "Option::is_none")]
8771 pub visible: Option<bool>,
8772 #[serde(default, skip_serializing_if = "Option::is_none")]
8773 pub locked: Option<bool>,
8774}
8775
8776#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8778pub enum DrawingOpType {
8779 #[default]
8780 #[serde(rename = "stroke")]
8781 Stroke,
8782 #[serde(rename = "erase")]
8783 Erase,
8784 #[serde(rename = "fill")]
8785 Fill,
8786 #[serde(rename = "place_image")]
8787 PlaceImage,
8788 #[serde(rename = "layer_add")]
8789 LayerAdd,
8790 #[serde(rename = "layer_remove")]
8791 LayerRemove,
8792 #[serde(rename = "layer_update")]
8793 LayerUpdate,
8794 #[serde(rename = "layer_reorder")]
8795 LayerReorder,
8796 #[serde(rename = "undo")]
8797 Undo,
8798 #[serde(rename = "redo")]
8799 Redo,
8800 #[serde(untagged)]
8802 Other(String),
8803}
8804
8805impl DrawingOpType {
8806 pub fn as_str(&self) -> &str {
8808 match self {
8809 Self::Stroke => "stroke",
8810 Self::Erase => "erase",
8811 Self::Fill => "fill",
8812 Self::PlaceImage => "place_image",
8813 Self::LayerAdd => "layer_add",
8814 Self::LayerRemove => "layer_remove",
8815 Self::LayerUpdate => "layer_update",
8816 Self::LayerReorder => "layer_reorder",
8817 Self::Undo => "undo",
8818 Self::Redo => "redo",
8819 Self::Other(value) => value.as_str(),
8820 }
8821 }
8822}
8823
8824impl std::fmt::Display for DrawingOpType {
8825 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8826 f.write_str(self.as_str())
8827 }
8828}
8829
8830impl From<&str> for DrawingOpType {
8831 fn from(value: &str) -> Self {
8832 match value {
8833 "stroke" => Self::Stroke,
8834 "erase" => Self::Erase,
8835 "fill" => Self::Fill,
8836 "place_image" => Self::PlaceImage,
8837 "layer_add" => Self::LayerAdd,
8838 "layer_remove" => Self::LayerRemove,
8839 "layer_update" => Self::LayerUpdate,
8840 "layer_reorder" => Self::LayerReorder,
8841 "undo" => Self::Undo,
8842 "redo" => Self::Redo,
8843 other => Self::Other(other.to_string()),
8844 }
8845 }
8846}
8847
8848#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8851pub struct DrawingSelectionShape {
8852 pub kind: DrawingSelectionShapeKind,
8853 #[serde(default, skip_serializing_if = "Option::is_none")]
8854 pub x: Option<f64>,
8855 #[serde(default, skip_serializing_if = "Option::is_none")]
8856 pub y: Option<f64>,
8857 #[serde(default, skip_serializing_if = "Option::is_none")]
8858 pub w: Option<f64>,
8859 #[serde(default, skip_serializing_if = "Option::is_none")]
8860 pub h: Option<f64>,
8861 #[serde(default, skip_serializing_if = "Option::is_none")]
8862 pub cx: Option<f64>,
8863 #[serde(default, skip_serializing_if = "Option::is_none")]
8864 pub cy: Option<f64>,
8865 #[serde(default, skip_serializing_if = "Option::is_none")]
8866 pub rx: Option<f64>,
8867 #[serde(default, skip_serializing_if = "Option::is_none")]
8868 pub ry: Option<f64>,
8869 #[serde(default, skip_serializing_if = "Option::is_none")]
8870 pub points: Option<Vec<DrawingSelectionShapePoint>>,
8871}
8872
8873#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
8875pub enum DrawingSelectionShapeKind {
8876 #[default]
8877 #[serde(rename = "rect")]
8878 Rect,
8879 #[serde(rename = "ellipse")]
8880 Ellipse,
8881 #[serde(rename = "lasso")]
8882 Lasso,
8883 #[serde(untagged)]
8885 Other(String),
8886}
8887
8888impl DrawingSelectionShapeKind {
8889 pub fn as_str(&self) -> &str {
8891 match self {
8892 Self::Rect => "rect",
8893 Self::Ellipse => "ellipse",
8894 Self::Lasso => "lasso",
8895 Self::Other(value) => value.as_str(),
8896 }
8897 }
8898}
8899
8900impl std::fmt::Display for DrawingSelectionShapeKind {
8901 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8902 f.write_str(self.as_str())
8903 }
8904}
8905
8906impl From<&str> for DrawingSelectionShapeKind {
8907 fn from(value: &str) -> Self {
8908 match value {
8909 "rect" => Self::Rect,
8910 "ellipse" => Self::Ellipse,
8911 "lasso" => Self::Lasso,
8912 other => Self::Other(other.to_string()),
8913 }
8914 }
8915}
8916
8917#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8919pub struct DrawingSelectionShapePoint {
8920 pub x: f64,
8921 pub y: f64,
8922}
8923
8924#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8926pub struct DrawingStrokePoint {
8927 pub x: f64,
8928 pub y: f64,
8929 pub p: i64,
8931 pub tx: f64,
8933 pub ty: f64,
8934 pub t: f64,
8936}
8937
8938#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8942pub struct DropGenome {
8943 pub v: i64,
8944 pub archetype: String,
8945 pub silhouette: DropGenomeSilhouette,
8946 pub motion: DropGenomeMotion,
8947 pub affect: DropGenomeAffect,
8948 pub signature_pose: String,
8949}
8950
8951#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8953pub struct DropGenomeAffect {
8954 #[serde(default, skip_serializing_if = "Option::is_none")]
8955 pub expressiveness: Option<f64>,
8956 #[serde(default, skip_serializing_if = "Option::is_none")]
8957 pub baseline_valence: Option<f64>,
8958 #[serde(default, skip_serializing_if = "Option::is_none")]
8959 pub reactivity: Option<f64>,
8960}
8961
8962#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8964pub struct DropGenomeMotion {
8965 #[serde(default, skip_serializing_if = "Option::is_none")]
8966 pub tempo: Option<f64>,
8967 #[serde(default, skip_serializing_if = "Option::is_none")]
8968 pub springiness: Option<f64>,
8969 #[serde(default, skip_serializing_if = "Option::is_none")]
8970 pub amplitude: Option<f64>,
8971 #[serde(default, skip_serializing_if = "Option::is_none")]
8972 pub jitter: Option<f64>,
8973 #[serde(default, skip_serializing_if = "Option::is_none")]
8974 pub settle_bias: Option<f64>,
8975}
8976
8977#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8979pub struct DropGenomeSilhouette {
8980 #[serde(default, skip_serializing_if = "Option::is_none")]
8981 pub height: Option<f64>,
8982 #[serde(default, skip_serializing_if = "Option::is_none")]
8983 pub width: Option<f64>,
8984 #[serde(default, skip_serializing_if = "Option::is_none")]
8985 pub tip: Option<f64>,
8986 #[serde(default, skip_serializing_if = "Option::is_none")]
8987 pub weight: Option<f64>,
8988}
8989
8990#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
8993pub struct EgressRule {
8994 pub host_pattern: String,
8995 #[serde(default, skip_serializing_if = "Option::is_none")]
8996 pub ports: Option<Vec<i64>>,
8997 #[serde(default, skip_serializing_if = "Option::is_none")]
8998 pub protocol: Option<EgressRuleProtocol>,
8999}
9000
9001#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9003pub enum EgressRuleProtocol {
9004 #[default]
9005 #[serde(rename = "https")]
9006 HTTPS,
9007 #[serde(rename = "http")]
9008 HTTP,
9009 #[serde(untagged)]
9011 Other(String),
9012}
9013
9014impl EgressRuleProtocol {
9015 pub fn as_str(&self) -> &str {
9017 match self {
9018 Self::HTTPS => "https",
9019 Self::HTTP => "http",
9020 Self::Other(value) => value.as_str(),
9021 }
9022 }
9023}
9024
9025impl std::fmt::Display for EgressRuleProtocol {
9026 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9027 f.write_str(self.as_str())
9028 }
9029}
9030
9031impl From<&str> for EgressRuleProtocol {
9032 fn from(value: &str) -> Self {
9033 match value {
9034 "https" => Self::HTTPS,
9035 "http" => Self::HTTP,
9036 other => Self::Other(other.to_string()),
9037 }
9038 }
9039}
9040
9041#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9043pub struct EmbeddingsRequest {
9044 #[serde(default, skip_serializing_if = "Option::is_none")]
9046 pub model: Option<String>,
9047 pub input: serde_json::Value,
9049 #[serde(default, skip_serializing_if = "Option::is_none")]
9051 pub encoding_format: Option<EmbeddingsRequestEncodingFormat>,
9052 #[serde(default, skip_serializing_if = "Option::is_none")]
9055 pub dimensions: Option<i64>,
9056}
9057
9058#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9060pub enum EmbeddingsRequestEncodingFormat {
9061 #[default]
9062 #[serde(rename = "float")]
9063 Float,
9064 #[serde(rename = "base64")]
9065 Base64,
9066 #[serde(untagged)]
9068 Other(String),
9069}
9070
9071impl EmbeddingsRequestEncodingFormat {
9072 pub fn as_str(&self) -> &str {
9074 match self {
9075 Self::Float => "float",
9076 Self::Base64 => "base64",
9077 Self::Other(value) => value.as_str(),
9078 }
9079 }
9080}
9081
9082impl std::fmt::Display for EmbeddingsRequestEncodingFormat {
9083 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9084 f.write_str(self.as_str())
9085 }
9086}
9087
9088impl From<&str> for EmbeddingsRequestEncodingFormat {
9089 fn from(value: &str) -> Self {
9090 match value {
9091 "float" => Self::Float,
9092 "base64" => Self::Base64,
9093 other => Self::Other(other.to_string()),
9094 }
9095 }
9096}
9097
9098#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9100pub struct EmbeddingsResponse {
9101 pub object: String,
9103 pub data: Vec<EmbeddingsResponseDataItem>,
9104 pub model: String,
9105 #[serde(default, skip_serializing_if = "Option::is_none")]
9106 pub usage: Option<EmbeddingsResponseUsage>,
9107}
9108
9109#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9111pub struct EmbeddingsResponseDataItem {
9112 pub object: String,
9114 pub embedding: Vec<f64>,
9115 pub index: i64,
9116}
9117
9118#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9120pub struct EmbeddingsResponseUsage {
9121 #[serde(default, skip_serializing_if = "Option::is_none")]
9122 pub prompt_tokens: Option<i64>,
9123 #[serde(default, skip_serializing_if = "Option::is_none")]
9124 pub total_tokens: Option<i64>,
9125}
9126
9127#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9129pub struct EmergencyState {
9130 pub mode: EmergencyStateMode,
9131 #[serde(default, skip_serializing_if = "Option::is_none")]
9132 pub reason: Option<String>,
9133 #[serde(default, skip_serializing_if = "Option::is_none")]
9134 pub activated_at: Option<String>,
9135 #[serde(default, skip_serializing_if = "Option::is_none")]
9136 pub activated_by: Option<String>,
9137 #[serde(default, skip_serializing_if = "Option::is_none")]
9138 pub deadline: Option<String>,
9139}
9140
9141#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9143pub enum EmergencyStateMode {
9144 #[default]
9145 #[serde(rename = "normal")]
9146 Normal,
9147 #[serde(rename = "safe_mode")]
9148 SafeMode,
9149 #[serde(rename = "arbitration_safe_mode")]
9150 ArbitrationSafeMode,
9151 #[serde(rename = "bootstrap")]
9152 Bootstrap,
9153 #[serde(untagged)]
9155 Other(String),
9156}
9157
9158impl EmergencyStateMode {
9159 pub fn as_str(&self) -> &str {
9161 match self {
9162 Self::Normal => "normal",
9163 Self::SafeMode => "safe_mode",
9164 Self::ArbitrationSafeMode => "arbitration_safe_mode",
9165 Self::Bootstrap => "bootstrap",
9166 Self::Other(value) => value.as_str(),
9167 }
9168 }
9169}
9170
9171impl std::fmt::Display for EmergencyStateMode {
9172 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9173 f.write_str(self.as_str())
9174 }
9175}
9176
9177impl From<&str> for EmergencyStateMode {
9178 fn from(value: &str) -> Self {
9179 match value {
9180 "normal" => Self::Normal,
9181 "safe_mode" => Self::SafeMode,
9182 "arbitration_safe_mode" => Self::ArbitrationSafeMode,
9183 "bootstrap" => Self::Bootstrap,
9184 other => Self::Other(other.to_string()),
9185 }
9186 }
9187}
9188
9189#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9191pub struct EmptyWorkspaceTrashResponse {
9192 pub deleted_count: i64,
9193 pub message: String,
9194}
9195
9196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9198pub struct EndpointRateLimit {
9199 pub pattern: String,
9200 #[serde(rename = "maxRequests")]
9204 pub max_requests: i64,
9205 #[serde(rename = "windowSec")]
9209 pub window_sec: i64,
9210 pub source: GuardrailConfigItemSource,
9211 #[serde(rename = "max_requests")]
9212 pub max_requests_: i64,
9213 #[serde(rename = "window_sec")]
9214 pub window_sec_: i64,
9215}
9216
9217#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9219pub struct EnforcementResult {
9220 pub allowed: bool,
9222 #[serde(rename = "checkResult")]
9226 pub check_result: EnforcementResultCheckResult,
9227 pub penalties: Vec<EnforcementResultPenalty>,
9229 #[serde(rename = "check_result")]
9230 pub check_result_: EnforcementResultCheckResult2,
9231}
9232
9233#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9237pub struct EnforcementResultCheckResult {
9238 pub allowed: bool,
9239 pub checked_rules: Vec<String>,
9241 pub violations: Vec<ConstitutionViolation>,
9242 pub checked_at: String,
9243}
9244
9245#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9247pub struct EnforcementResultCheckResult2 {
9248 pub allowed: bool,
9249 pub checked_rules: Vec<String>,
9251 pub violations: Vec<ConstitutionViolation>,
9252 pub checked_at: String,
9253}
9254
9255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9257pub struct EnforcementResultPenalty {
9258 #[serde(rename = "ruleId")]
9261 pub rule_id: String,
9262 pub penalty: ConstitutionRulePenalty,
9263 #[serde(rename = "rule_id")]
9264 pub rule_id_: String,
9265}
9266
9267#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9269pub struct EnrolMfaRequest {
9270 #[serde(default, skip_serializing_if = "Option::is_none")]
9272 pub label: Option<String>,
9273 #[serde(default, skip_serializing_if = "Option::is_none")]
9275 pub issuer: Option<String>,
9276 #[serde(default, skip_serializing_if = "Option::is_none")]
9277 pub algorithm: Option<EnrolMfaRequestAlgorithm>,
9278}
9279
9280#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9282pub enum EnrolMfaRequestAlgorithm {
9283 #[default]
9284 #[serde(rename = "SHA-1")]
9285 Sha1,
9286 #[serde(rename = "SHA-256")]
9287 Sha256,
9288 #[serde(rename = "SHA-512")]
9289 Sha512,
9290 #[serde(untagged)]
9292 Other(String),
9293}
9294
9295impl EnrolMfaRequestAlgorithm {
9296 pub fn as_str(&self) -> &str {
9298 match self {
9299 Self::Sha1 => "SHA-1",
9300 Self::Sha256 => "SHA-256",
9301 Self::Sha512 => "SHA-512",
9302 Self::Other(value) => value.as_str(),
9303 }
9304 }
9305}
9306
9307impl std::fmt::Display for EnrolMfaRequestAlgorithm {
9308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9309 f.write_str(self.as_str())
9310 }
9311}
9312
9313impl From<&str> for EnrolMfaRequestAlgorithm {
9314 fn from(value: &str) -> Self {
9315 match value {
9316 "SHA-1" => Self::Sha1,
9317 "SHA-256" => Self::Sha256,
9318 "SHA-512" => Self::Sha512,
9319 other => Self::Other(other.to_string()),
9320 }
9321 }
9322}
9323
9324#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9327pub struct Error {
9328 pub r#type: String,
9329 pub title: ErrorTitle,
9334 pub status: i64,
9335 pub detail: String,
9339 #[serde(default, skip_serializing_if = "Option::is_none")]
9346 pub code: Option<ErrorCode>,
9347 #[serde(rename = "correlationId", default, skip_serializing_if = "Option::is_none")]
9351 pub correlation_id: Option<String>,
9352 #[serde(default, skip_serializing_if = "Option::is_none")]
9354 pub errors: Option<Vec<ErrorError>>,
9355 #[serde(rename = "correlation_id", default, skip_serializing_if = "Option::is_none")]
9357 pub correlation_id_: Option<String>,
9358}
9359
9360#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9367pub enum ErrorCode {
9368 #[default]
9369 #[serde(rename = "AAR_NOT_AVAILABLE")]
9370 AarNotAvailable,
9371 #[serde(rename = "ARTIFACT_INTEGRITY_ERROR")]
9372 ArtifactIntegrityError,
9373 #[serde(rename = "AUTH_ERROR")]
9374 AuthError,
9375 #[serde(rename = "BILLING_CANCELLED")]
9376 BillingCancelled,
9377 #[serde(rename = "BILLING_DISPUTED")]
9378 BillingDisputed,
9379 #[serde(rename = "BILLING_PAST_DUE")]
9380 BillingPastDue,
9381 #[serde(rename = "BUDGET_EXCEEDED")]
9382 BudgetExceeded,
9383 #[serde(rename = "CHECKSUM_MISMATCH")]
9384 ChecksumMismatch,
9385 #[serde(rename = "CONFIGURATION_ERROR")]
9386 ConfigurationError,
9387 #[serde(rename = "EVENT_STORE_ERROR")]
9388 EventStoreError,
9389 #[serde(rename = "EXTERNAL_SERVICE_ERROR")]
9390 ExternalServiceError,
9391 #[serde(rename = "FORBIDDEN")]
9392 Forbidden,
9393 #[serde(rename = "GUARDRAIL_VIOLATION")]
9394 GuardrailViolation,
9395 #[serde(rename = "INVALID_QUERY")]
9396 InvalidQuery,
9397 #[serde(rename = "INVALID_SHARE_LIST")]
9398 InvalidShareList,
9399 #[serde(rename = "INVALID_SHARE_TARGET")]
9400 InvalidShareTarget,
9401 #[serde(rename = "LLM_ERROR")]
9402 LLMError,
9403 #[serde(rename = "MAX_DURATION_EXCEEDED")]
9404 MaxDurationExceeded,
9405 #[serde(rename = "MAX_TOKENS_EXCEEDED")]
9406 MaxTokensExceeded,
9407 #[serde(rename = "MIGRATION_CONFLICT")]
9408 MigrationConflict,
9409 #[serde(rename = "MISSION_ALREADY_RUNNING")]
9410 MissionAlreadyRunning,
9411 #[serde(rename = "MISSION_CONCURRENCY_LIMIT")]
9412 MissionConcurrencyLimit,
9413 #[serde(rename = "MISSION_NOT_FOUND")]
9414 MissionNotFound,
9415 #[serde(rename = "MISSION_NOT_RUNNABLE")]
9416 MissionNotRunnable,
9417 #[serde(rename = "MISSION_NOT_RUNNING")]
9418 MissionNotRunning,
9419 #[serde(rename = "MISSION_ROUTE_NOT_FOUND")]
9420 MissionRouteNotFound,
9421 #[serde(rename = "NOT_FOUND")]
9422 NotFound,
9423 #[serde(rename = "NOT_YANKED")]
9424 NotYanked,
9425 #[serde(rename = "PAYLOAD_TOO_LARGE")]
9426 PayloadTooLarge,
9427 #[serde(rename = "PERSISTENCE_ERROR")]
9428 PersistenceError,
9429 #[serde(rename = "PLANNER_OUTPUT_INVALID")]
9430 PlannerOutputInvalid,
9431 #[serde(rename = "PLANNER_REFUSED")]
9432 PlannerRefused,
9433 #[serde(rename = "PRECONDITION_FAILED")]
9434 PreconditionFailed,
9435 #[serde(rename = "PRIVATE_NOT_SHARED")]
9436 PrivateNotShared,
9437 #[serde(rename = "PROMO_REDEMPTION_FAILED")]
9438 PromoRedemptionFailed,
9439 #[serde(rename = "QUOTA_EXCEEDED")]
9440 QuotaExceeded,
9441 #[serde(rename = "RATE_LIMIT_EXCEEDED")]
9442 RateLimitExceeded,
9443 #[serde(rename = "RESERVED_SCOPE")]
9444 ReservedScope,
9445 #[serde(rename = "RUN_CANCELLED")]
9446 RunCancelled,
9447 #[serde(rename = "SCOPE_MISMATCH")]
9448 ScopeMismatch,
9449 #[serde(rename = "SCOPE_TAKEN")]
9450 ScopeTaken,
9451 #[serde(rename = "SHARE_LIST_CONFLICT")]
9452 ShareListConflict,
9453 #[serde(rename = "SIZE_LIMIT")]
9454 SizeLimit,
9455 #[serde(rename = "SPEC_NOT_FOUND")]
9456 SpecNotFound,
9457 #[serde(rename = "TASK_GRAPH_FAILED")]
9458 TaskGraphFailed,
9459 #[serde(rename = "TEAM_ABORT")]
9460 TeamAbort,
9461 #[serde(rename = "VALIDATION_ERROR")]
9462 ValidationError,
9463 #[serde(rename = "VERSION_CONFLICT")]
9464 VersionConflict,
9465 #[serde(rename = "VERSION_NOT_FOUND")]
9466 VersionNotFound,
9467 #[serde(rename = "WORKSPACE_STORAGE_LIMIT")]
9468 WorkspaceStorageLimit,
9469 #[serde(rename = "YANK_CONFLICT")]
9470 YankConflict,
9471 #[serde(rename = "agent_not_found")]
9472 AgentNotFound,
9473 #[serde(rename = "already_bootstrapped")]
9474 AlreadyBootstrapped,
9475 #[serde(rename = "approval_rejected")]
9476 ApprovalRejected,
9477 #[serde(rename = "billing_not_configured")]
9478 BillingNotConfigured,
9479 #[serde(rename = "governance_not_enabled")]
9480 GovernanceNotEnabled,
9481 #[serde(rename = "incomplete_record")]
9482 IncompleteRecord,
9483 #[serde(rename = "inert_policy_field")]
9484 InertPolicyField,
9485 #[serde(rename = "inert_public_config_field")]
9486 InertPublicConfigField,
9487 #[serde(rename = "kb_chunk_limit")]
9488 KbChunkLimit,
9489 #[serde(rename = "kb_document_body_invalid")]
9490 KbDocumentBodyInvalid,
9491 #[serde(rename = "kb_document_too_large")]
9492 KbDocumentTooLarge,
9493 #[serde(rename = "kb_embedding_failed")]
9494 KbEmbeddingFailed,
9495 #[serde(rename = "kb_storage_limit")]
9496 KbStorageLimit,
9497 #[serde(rename = "kb_text_extraction_failed")]
9498 KbTextExtractionFailed,
9499 #[serde(rename = "limit_reached")]
9500 LimitReached,
9501 #[serde(rename = "plan_upgrade_required")]
9502 PlanUpgradeRequired,
9503 #[serde(rename = "provider_auth_failed")]
9504 ProviderAuthFailed,
9505 #[serde(rename = "provider_circuit_open")]
9506 ProviderCircuitOpen,
9507 #[serde(rename = "provider_not_configured")]
9508 ProviderNotConfigured,
9509 #[serde(rename = "provider_rate_limited")]
9510 ProviderRateLimited,
9511 #[serde(rename = "quota_exceeded")]
9512 QuotaExceeded2,
9513 #[serde(rename = "rate_limited")]
9514 RateLimited,
9515 #[serde(rename = "resource_limit_reached")]
9516 ResourceLimitReached,
9517 #[serde(rename = "run_input_timeout")]
9518 RunInputTimeout,
9519 #[serde(rename = "run_never_claimed")]
9520 RunNeverClaimed,
9521 #[serde(rename = "run_orphaned_restart")]
9522 RunOrphanedRestart,
9523 #[serde(rename = "run_quota_exceeded")]
9524 RunQuotaExceeded,
9525 #[serde(untagged)]
9527 Other(String),
9528}
9529
9530impl ErrorCode {
9531 pub fn as_str(&self) -> &str {
9533 match self {
9534 Self::AarNotAvailable => "AAR_NOT_AVAILABLE",
9535 Self::ArtifactIntegrityError => "ARTIFACT_INTEGRITY_ERROR",
9536 Self::AuthError => "AUTH_ERROR",
9537 Self::BillingCancelled => "BILLING_CANCELLED",
9538 Self::BillingDisputed => "BILLING_DISPUTED",
9539 Self::BillingPastDue => "BILLING_PAST_DUE",
9540 Self::BudgetExceeded => "BUDGET_EXCEEDED",
9541 Self::ChecksumMismatch => "CHECKSUM_MISMATCH",
9542 Self::ConfigurationError => "CONFIGURATION_ERROR",
9543 Self::EventStoreError => "EVENT_STORE_ERROR",
9544 Self::ExternalServiceError => "EXTERNAL_SERVICE_ERROR",
9545 Self::Forbidden => "FORBIDDEN",
9546 Self::GuardrailViolation => "GUARDRAIL_VIOLATION",
9547 Self::InvalidQuery => "INVALID_QUERY",
9548 Self::InvalidShareList => "INVALID_SHARE_LIST",
9549 Self::InvalidShareTarget => "INVALID_SHARE_TARGET",
9550 Self::LLMError => "LLM_ERROR",
9551 Self::MaxDurationExceeded => "MAX_DURATION_EXCEEDED",
9552 Self::MaxTokensExceeded => "MAX_TOKENS_EXCEEDED",
9553 Self::MigrationConflict => "MIGRATION_CONFLICT",
9554 Self::MissionAlreadyRunning => "MISSION_ALREADY_RUNNING",
9555 Self::MissionConcurrencyLimit => "MISSION_CONCURRENCY_LIMIT",
9556 Self::MissionNotFound => "MISSION_NOT_FOUND",
9557 Self::MissionNotRunnable => "MISSION_NOT_RUNNABLE",
9558 Self::MissionNotRunning => "MISSION_NOT_RUNNING",
9559 Self::MissionRouteNotFound => "MISSION_ROUTE_NOT_FOUND",
9560 Self::NotFound => "NOT_FOUND",
9561 Self::NotYanked => "NOT_YANKED",
9562 Self::PayloadTooLarge => "PAYLOAD_TOO_LARGE",
9563 Self::PersistenceError => "PERSISTENCE_ERROR",
9564 Self::PlannerOutputInvalid => "PLANNER_OUTPUT_INVALID",
9565 Self::PlannerRefused => "PLANNER_REFUSED",
9566 Self::PreconditionFailed => "PRECONDITION_FAILED",
9567 Self::PrivateNotShared => "PRIVATE_NOT_SHARED",
9568 Self::PromoRedemptionFailed => "PROMO_REDEMPTION_FAILED",
9569 Self::QuotaExceeded => "QUOTA_EXCEEDED",
9570 Self::RateLimitExceeded => "RATE_LIMIT_EXCEEDED",
9571 Self::ReservedScope => "RESERVED_SCOPE",
9572 Self::RunCancelled => "RUN_CANCELLED",
9573 Self::ScopeMismatch => "SCOPE_MISMATCH",
9574 Self::ScopeTaken => "SCOPE_TAKEN",
9575 Self::ShareListConflict => "SHARE_LIST_CONFLICT",
9576 Self::SizeLimit => "SIZE_LIMIT",
9577 Self::SpecNotFound => "SPEC_NOT_FOUND",
9578 Self::TaskGraphFailed => "TASK_GRAPH_FAILED",
9579 Self::TeamAbort => "TEAM_ABORT",
9580 Self::ValidationError => "VALIDATION_ERROR",
9581 Self::VersionConflict => "VERSION_CONFLICT",
9582 Self::VersionNotFound => "VERSION_NOT_FOUND",
9583 Self::WorkspaceStorageLimit => "WORKSPACE_STORAGE_LIMIT",
9584 Self::YankConflict => "YANK_CONFLICT",
9585 Self::AgentNotFound => "agent_not_found",
9586 Self::AlreadyBootstrapped => "already_bootstrapped",
9587 Self::ApprovalRejected => "approval_rejected",
9588 Self::BillingNotConfigured => "billing_not_configured",
9589 Self::GovernanceNotEnabled => "governance_not_enabled",
9590 Self::IncompleteRecord => "incomplete_record",
9591 Self::InertPolicyField => "inert_policy_field",
9592 Self::InertPublicConfigField => "inert_public_config_field",
9593 Self::KbChunkLimit => "kb_chunk_limit",
9594 Self::KbDocumentBodyInvalid => "kb_document_body_invalid",
9595 Self::KbDocumentTooLarge => "kb_document_too_large",
9596 Self::KbEmbeddingFailed => "kb_embedding_failed",
9597 Self::KbStorageLimit => "kb_storage_limit",
9598 Self::KbTextExtractionFailed => "kb_text_extraction_failed",
9599 Self::LimitReached => "limit_reached",
9600 Self::PlanUpgradeRequired => "plan_upgrade_required",
9601 Self::ProviderAuthFailed => "provider_auth_failed",
9602 Self::ProviderCircuitOpen => "provider_circuit_open",
9603 Self::ProviderNotConfigured => "provider_not_configured",
9604 Self::ProviderRateLimited => "provider_rate_limited",
9605 Self::QuotaExceeded2 => "quota_exceeded",
9606 Self::RateLimited => "rate_limited",
9607 Self::ResourceLimitReached => "resource_limit_reached",
9608 Self::RunInputTimeout => "run_input_timeout",
9609 Self::RunNeverClaimed => "run_never_claimed",
9610 Self::RunOrphanedRestart => "run_orphaned_restart",
9611 Self::RunQuotaExceeded => "run_quota_exceeded",
9612 Self::Other(value) => value.as_str(),
9613 }
9614 }
9615}
9616
9617impl std::fmt::Display for ErrorCode {
9618 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9619 f.write_str(self.as_str())
9620 }
9621}
9622
9623impl From<&str> for ErrorCode {
9624 fn from(value: &str) -> Self {
9625 match value {
9626 "AAR_NOT_AVAILABLE" => Self::AarNotAvailable,
9627 "ARTIFACT_INTEGRITY_ERROR" => Self::ArtifactIntegrityError,
9628 "AUTH_ERROR" => Self::AuthError,
9629 "BILLING_CANCELLED" => Self::BillingCancelled,
9630 "BILLING_DISPUTED" => Self::BillingDisputed,
9631 "BILLING_PAST_DUE" => Self::BillingPastDue,
9632 "BUDGET_EXCEEDED" => Self::BudgetExceeded,
9633 "CHECKSUM_MISMATCH" => Self::ChecksumMismatch,
9634 "CONFIGURATION_ERROR" => Self::ConfigurationError,
9635 "EVENT_STORE_ERROR" => Self::EventStoreError,
9636 "EXTERNAL_SERVICE_ERROR" => Self::ExternalServiceError,
9637 "FORBIDDEN" => Self::Forbidden,
9638 "GUARDRAIL_VIOLATION" => Self::GuardrailViolation,
9639 "INVALID_QUERY" => Self::InvalidQuery,
9640 "INVALID_SHARE_LIST" => Self::InvalidShareList,
9641 "INVALID_SHARE_TARGET" => Self::InvalidShareTarget,
9642 "LLM_ERROR" => Self::LLMError,
9643 "MAX_DURATION_EXCEEDED" => Self::MaxDurationExceeded,
9644 "MAX_TOKENS_EXCEEDED" => Self::MaxTokensExceeded,
9645 "MIGRATION_CONFLICT" => Self::MigrationConflict,
9646 "MISSION_ALREADY_RUNNING" => Self::MissionAlreadyRunning,
9647 "MISSION_CONCURRENCY_LIMIT" => Self::MissionConcurrencyLimit,
9648 "MISSION_NOT_FOUND" => Self::MissionNotFound,
9649 "MISSION_NOT_RUNNABLE" => Self::MissionNotRunnable,
9650 "MISSION_NOT_RUNNING" => Self::MissionNotRunning,
9651 "MISSION_ROUTE_NOT_FOUND" => Self::MissionRouteNotFound,
9652 "NOT_FOUND" => Self::NotFound,
9653 "NOT_YANKED" => Self::NotYanked,
9654 "PAYLOAD_TOO_LARGE" => Self::PayloadTooLarge,
9655 "PERSISTENCE_ERROR" => Self::PersistenceError,
9656 "PLANNER_OUTPUT_INVALID" => Self::PlannerOutputInvalid,
9657 "PLANNER_REFUSED" => Self::PlannerRefused,
9658 "PRECONDITION_FAILED" => Self::PreconditionFailed,
9659 "PRIVATE_NOT_SHARED" => Self::PrivateNotShared,
9660 "PROMO_REDEMPTION_FAILED" => Self::PromoRedemptionFailed,
9661 "QUOTA_EXCEEDED" => Self::QuotaExceeded,
9662 "RATE_LIMIT_EXCEEDED" => Self::RateLimitExceeded,
9663 "RESERVED_SCOPE" => Self::ReservedScope,
9664 "RUN_CANCELLED" => Self::RunCancelled,
9665 "SCOPE_MISMATCH" => Self::ScopeMismatch,
9666 "SCOPE_TAKEN" => Self::ScopeTaken,
9667 "SHARE_LIST_CONFLICT" => Self::ShareListConflict,
9668 "SIZE_LIMIT" => Self::SizeLimit,
9669 "SPEC_NOT_FOUND" => Self::SpecNotFound,
9670 "TASK_GRAPH_FAILED" => Self::TaskGraphFailed,
9671 "TEAM_ABORT" => Self::TeamAbort,
9672 "VALIDATION_ERROR" => Self::ValidationError,
9673 "VERSION_CONFLICT" => Self::VersionConflict,
9674 "VERSION_NOT_FOUND" => Self::VersionNotFound,
9675 "WORKSPACE_STORAGE_LIMIT" => Self::WorkspaceStorageLimit,
9676 "YANK_CONFLICT" => Self::YankConflict,
9677 "agent_not_found" => Self::AgentNotFound,
9678 "already_bootstrapped" => Self::AlreadyBootstrapped,
9679 "approval_rejected" => Self::ApprovalRejected,
9680 "billing_not_configured" => Self::BillingNotConfigured,
9681 "governance_not_enabled" => Self::GovernanceNotEnabled,
9682 "incomplete_record" => Self::IncompleteRecord,
9683 "inert_policy_field" => Self::InertPolicyField,
9684 "inert_public_config_field" => Self::InertPublicConfigField,
9685 "kb_chunk_limit" => Self::KbChunkLimit,
9686 "kb_document_body_invalid" => Self::KbDocumentBodyInvalid,
9687 "kb_document_too_large" => Self::KbDocumentTooLarge,
9688 "kb_embedding_failed" => Self::KbEmbeddingFailed,
9689 "kb_storage_limit" => Self::KbStorageLimit,
9690 "kb_text_extraction_failed" => Self::KbTextExtractionFailed,
9691 "limit_reached" => Self::LimitReached,
9692 "plan_upgrade_required" => Self::PlanUpgradeRequired,
9693 "provider_auth_failed" => Self::ProviderAuthFailed,
9694 "provider_circuit_open" => Self::ProviderCircuitOpen,
9695 "provider_not_configured" => Self::ProviderNotConfigured,
9696 "provider_rate_limited" => Self::ProviderRateLimited,
9697 "quota_exceeded" => Self::QuotaExceeded2,
9698 "rate_limited" => Self::RateLimited,
9699 "resource_limit_reached" => Self::ResourceLimitReached,
9700 "run_input_timeout" => Self::RunInputTimeout,
9701 "run_never_claimed" => Self::RunNeverClaimed,
9702 "run_orphaned_restart" => Self::RunOrphanedRestart,
9703 "run_quota_exceeded" => Self::RunQuotaExceeded,
9704 other => Self::Other(other.to_string()),
9705 }
9706 }
9707}
9708
9709#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9711pub struct ErrorError {
9712 #[serde(default, skip_serializing_if = "Option::is_none")]
9713 pub field: Option<String>,
9714 #[serde(default, skip_serializing_if = "Option::is_none")]
9715 pub message: Option<String>,
9716}
9717
9718#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9722pub struct ErrorReport {
9723 pub id: String,
9724 pub tenant_id: String,
9726 #[serde(default, skip_serializing_if = "Option::is_none")]
9727 pub user_id: Option<String>,
9728 #[serde(default, skip_serializing_if = "Option::is_none")]
9729 pub key_id: Option<String>,
9730 pub title: String,
9732 pub message: String,
9733 #[serde(default, skip_serializing_if = "Option::is_none")]
9735 pub context: Option<String>,
9736 #[serde(default, skip_serializing_if = "Option::is_none")]
9737 pub url: Option<String>,
9738 #[serde(default, skip_serializing_if = "Option::is_none")]
9739 pub run_id: Option<String>,
9740 #[serde(default, skip_serializing_if = "Option::is_none")]
9741 pub user_agent: Option<String>,
9742 pub kind: ErrorReportKind,
9744 pub status: ErrorReportStatus,
9745 pub created_at: String,
9746}
9747
9748#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9750pub enum ErrorReportKind {
9751 #[default]
9752 #[serde(rename = "error")]
9753 Error,
9754 #[serde(rename = "feedback")]
9755 Feedback,
9756 #[serde(untagged)]
9758 Other(String),
9759}
9760
9761impl ErrorReportKind {
9762 pub fn as_str(&self) -> &str {
9764 match self {
9765 Self::Error => "error",
9766 Self::Feedback => "feedback",
9767 Self::Other(value) => value.as_str(),
9768 }
9769 }
9770}
9771
9772impl std::fmt::Display for ErrorReportKind {
9773 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9774 f.write_str(self.as_str())
9775 }
9776}
9777
9778impl From<&str> for ErrorReportKind {
9779 fn from(value: &str) -> Self {
9780 match value {
9781 "error" => Self::Error,
9782 "feedback" => Self::Feedback,
9783 other => Self::Other(other.to_string()),
9784 }
9785 }
9786}
9787
9788#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9790pub enum ErrorReportStatus {
9791 #[default]
9792 #[serde(rename = "new")]
9793 New,
9794 #[serde(rename = "resolved")]
9795 Resolved,
9796 #[serde(untagged)]
9798 Other(String),
9799}
9800
9801impl ErrorReportStatus {
9802 pub fn as_str(&self) -> &str {
9804 match self {
9805 Self::New => "new",
9806 Self::Resolved => "resolved",
9807 Self::Other(value) => value.as_str(),
9808 }
9809 }
9810}
9811
9812impl std::fmt::Display for ErrorReportStatus {
9813 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9814 f.write_str(self.as_str())
9815 }
9816}
9817
9818impl From<&str> for ErrorReportStatus {
9819 fn from(value: &str) -> Self {
9820 match value {
9821 "new" => Self::New,
9822 "resolved" => Self::Resolved,
9823 other => Self::Other(other.to_string()),
9824 }
9825 }
9826}
9827
9828#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
9833pub enum ErrorTitle {
9834 #[default]
9835 #[serde(rename = "Bad Request")]
9836 BadRequest,
9837 #[serde(rename = "Unauthorized")]
9838 Unauthorized,
9839 #[serde(rename = "Payment Required")]
9840 PaymentRequired,
9841 #[serde(rename = "Forbidden")]
9842 Forbidden,
9843 #[serde(rename = "Not Found")]
9844 NotFound,
9845 #[serde(rename = "Method Not Allowed")]
9846 MethodNotAllowed,
9847 #[serde(rename = "Conflict")]
9848 Conflict,
9849 #[serde(rename = "Gone")]
9850 Gone,
9851 #[serde(rename = "Length Required")]
9852 LengthRequired,
9853 #[serde(rename = "Precondition Failed")]
9854 PreconditionFailed,
9855 #[serde(rename = "Payload Too Large")]
9856 PayloadTooLarge,
9857 #[serde(rename = "Unsupported Media Type")]
9858 UnsupportedMediaType,
9859 #[serde(rename = "Validation Error")]
9860 ValidationError,
9861 #[serde(rename = "Locked")]
9862 Locked,
9863 #[serde(rename = "Precondition Required")]
9864 PreconditionRequired,
9865 #[serde(rename = "Too Many Requests")]
9866 TooManyRequests,
9867 #[serde(rename = "Internal Server Error")]
9868 InternalServerError,
9869 #[serde(rename = "Not Implemented")]
9870 NotImplemented,
9871 #[serde(rename = "Bad Gateway")]
9872 BadGateway,
9873 #[serde(rename = "Service Unavailable")]
9874 ServiceUnavailable,
9875 #[serde(rename = "Gateway Timeout")]
9876 GatewayTimeout,
9877 #[serde(untagged)]
9879 Other(String),
9880}
9881
9882impl ErrorTitle {
9883 pub fn as_str(&self) -> &str {
9885 match self {
9886 Self::BadRequest => "Bad Request",
9887 Self::Unauthorized => "Unauthorized",
9888 Self::PaymentRequired => "Payment Required",
9889 Self::Forbidden => "Forbidden",
9890 Self::NotFound => "Not Found",
9891 Self::MethodNotAllowed => "Method Not Allowed",
9892 Self::Conflict => "Conflict",
9893 Self::Gone => "Gone",
9894 Self::LengthRequired => "Length Required",
9895 Self::PreconditionFailed => "Precondition Failed",
9896 Self::PayloadTooLarge => "Payload Too Large",
9897 Self::UnsupportedMediaType => "Unsupported Media Type",
9898 Self::ValidationError => "Validation Error",
9899 Self::Locked => "Locked",
9900 Self::PreconditionRequired => "Precondition Required",
9901 Self::TooManyRequests => "Too Many Requests",
9902 Self::InternalServerError => "Internal Server Error",
9903 Self::NotImplemented => "Not Implemented",
9904 Self::BadGateway => "Bad Gateway",
9905 Self::ServiceUnavailable => "Service Unavailable",
9906 Self::GatewayTimeout => "Gateway Timeout",
9907 Self::Other(value) => value.as_str(),
9908 }
9909 }
9910}
9911
9912impl std::fmt::Display for ErrorTitle {
9913 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9914 f.write_str(self.as_str())
9915 }
9916}
9917
9918impl From<&str> for ErrorTitle {
9919 fn from(value: &str) -> Self {
9920 match value {
9921 "Bad Request" => Self::BadRequest,
9922 "Unauthorized" => Self::Unauthorized,
9923 "Payment Required" => Self::PaymentRequired,
9924 "Forbidden" => Self::Forbidden,
9925 "Not Found" => Self::NotFound,
9926 "Method Not Allowed" => Self::MethodNotAllowed,
9927 "Conflict" => Self::Conflict,
9928 "Gone" => Self::Gone,
9929 "Length Required" => Self::LengthRequired,
9930 "Precondition Failed" => Self::PreconditionFailed,
9931 "Payload Too Large" => Self::PayloadTooLarge,
9932 "Unsupported Media Type" => Self::UnsupportedMediaType,
9933 "Validation Error" => Self::ValidationError,
9934 "Locked" => Self::Locked,
9935 "Precondition Required" => Self::PreconditionRequired,
9936 "Too Many Requests" => Self::TooManyRequests,
9937 "Internal Server Error" => Self::InternalServerError,
9938 "Not Implemented" => Self::NotImplemented,
9939 "Bad Gateway" => Self::BadGateway,
9940 "Service Unavailable" => Self::ServiceUnavailable,
9941 "Gateway Timeout" => Self::GatewayTimeout,
9942 other => Self::Other(other.to_string()),
9943 }
9944 }
9945}
9946
9947#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9949pub struct EstimateRunCostRequest {
9950 pub agent_id: String,
9951 #[serde(default, skip_serializing_if = "Option::is_none")]
9953 pub input_text: Option<String>,
9954 #[serde(default, skip_serializing_if = "Option::is_none")]
9956 pub session_id: Option<String>,
9957}
9958
9959#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9961pub struct EvalCase {
9962 pub case_id: String,
9963 pub input: serde_json::Map<String, serde_json::Value>,
9964 #[serde(default, skip_serializing_if = "Option::is_none")]
9965 pub expected_output: Option<serde_json::Map<String, serde_json::Value>>,
9966 #[serde(default, skip_serializing_if = "Option::is_none")]
9967 pub expected_tool_calls: Option<Vec<String>>,
9968 pub tags: Vec<String>,
9969 pub metadata: serde_json::Map<String, serde_json::Value>,
9970}
9971
9972#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9974pub struct EvalDataset {
9975 pub dataset_id: String,
9976 pub tenant_id: String,
9977 pub agent_id: String,
9978 pub name: String,
9979 pub cases: Vec<EvalCase>,
9980 pub created_at: String,
9981}
9982
9983#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9986pub struct EvalRun {
9987 pub eval_run_id: String,
9988 pub tenant_id: String,
9989 pub agent_id: String,
9990 pub dataset_id: String,
9991 #[serde(default, skip_serializing_if = "Option::is_none")]
9992 pub agent_version: Option<String>,
9993 pub results: Vec<EvalRunResult>,
9994 #[serde(default, skip_serializing_if = "Option::is_none")]
9995 pub errored_cases: Option<Vec<EvalRunErroredCas>>,
9996 #[serde(default, skip_serializing_if = "Option::is_none")]
9997 pub summary: Option<EvalRunSummary>,
9998 pub created_at: String,
9999}
10000
10001#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10003pub struct EvalRunErroredCas {
10004 pub case_id: String,
10005 pub error: String,
10006}
10007
10008#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10010pub struct EvalRunResult {
10011 pub case_id: String,
10012 pub run_id: String,
10013 pub scores: serde_json::Map<String, serde_json::Value>,
10014 pub passed: bool,
10015 pub duration_ms: f64,
10016 pub tokens_used: f64,
10017}
10018
10019#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10021pub struct EvalRunSummary {
10022 pub total_cases: i64,
10023 pub passed: i64,
10024 pub failed: i64,
10025 pub errored: i64,
10026 pub avg_scores: serde_json::Map<String, serde_json::Value>,
10027 pub avg_duration_ms: f64,
10028 pub total_tokens: f64,
10029 pub total_cost_usd: f64,
10030 pub regression_detected: bool,
10031}
10032
10033#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10035pub struct Experiment {
10036 #[serde(default, skip_serializing_if = "Option::is_none")]
10037 pub experiment_id: Option<String>,
10038 #[serde(default, skip_serializing_if = "Option::is_none")]
10039 pub tenant_id: Option<String>,
10040 #[serde(default, skip_serializing_if = "Option::is_none")]
10041 pub agent_id: Option<String>,
10042 #[serde(default, skip_serializing_if = "Option::is_none")]
10043 pub name: Option<String>,
10044 #[serde(default, skip_serializing_if = "Option::is_none")]
10045 pub dataset_id: Option<String>,
10046 #[serde(default, skip_serializing_if = "Option::is_none")]
10047 pub variants: Option<Vec<ExperimentVariant>>,
10048 #[serde(default, skip_serializing_if = "Option::is_none")]
10049 pub status: Option<ExperimentStatus>,
10050 #[serde(default, skip_serializing_if = "Option::is_none")]
10051 pub comparison: Option<serde_json::Map<String, serde_json::Value>>,
10052 #[serde(default, skip_serializing_if = "Option::is_none")]
10053 pub created_at: Option<String>,
10054}
10055
10056#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10058pub enum ExperimentStatus {
10059 #[default]
10060 #[serde(rename = "pending")]
10061 Pending,
10062 #[serde(rename = "running")]
10063 Running,
10064 #[serde(rename = "completed")]
10065 Completed,
10066 #[serde(untagged)]
10068 Other(String),
10069}
10070
10071impl ExperimentStatus {
10072 pub fn as_str(&self) -> &str {
10074 match self {
10075 Self::Pending => "pending",
10076 Self::Running => "running",
10077 Self::Completed => "completed",
10078 Self::Other(value) => value.as_str(),
10079 }
10080 }
10081}
10082
10083impl std::fmt::Display for ExperimentStatus {
10084 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10085 f.write_str(self.as_str())
10086 }
10087}
10088
10089impl From<&str> for ExperimentStatus {
10090 fn from(value: &str) -> Self {
10091 match value {
10092 "pending" => Self::Pending,
10093 "running" => Self::Running,
10094 "completed" => Self::Completed,
10095 other => Self::Other(other.to_string()),
10096 }
10097 }
10098}
10099
10100#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10102pub struct ExperimentVariant {
10103 #[serde(default, skip_serializing_if = "Option::is_none")]
10104 pub version: Option<String>,
10105 #[serde(default, skip_serializing_if = "Option::is_none")]
10106 pub eval_run_id: Option<String>,
10107}
10108
10109#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10111pub struct ExportAdminConfigResponse {
10112 pub exported_at: String,
10113 pub section_count: i64,
10114 pub sections: serde_json::Map<String, serde_json::Value>,
10115}
10116
10117#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10119pub enum ExportDataExplorerIncludeSensitive {
10120 #[default]
10121 #[serde(rename = "1")]
10122 V1,
10123 #[serde(untagged)]
10125 Other(String),
10126}
10127
10128impl ExportDataExplorerIncludeSensitive {
10129 pub fn as_str(&self) -> &str {
10131 match self {
10132 Self::V1 => "1",
10133 Self::Other(value) => value.as_str(),
10134 }
10135 }
10136}
10137
10138impl std::fmt::Display for ExportDataExplorerIncludeSensitive {
10139 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10140 f.write_str(self.as_str())
10141 }
10142}
10143
10144impl From<&str> for ExportDataExplorerIncludeSensitive {
10145 fn from(value: &str) -> Self {
10146 match value {
10147 "1" => Self::V1,
10148 other => Self::Other(other.to_string()),
10149 }
10150 }
10151}
10152
10153#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10155pub enum ExportMyAccountFormat {
10156 #[default]
10157 #[serde(rename = "zip")]
10158 Zip,
10159 #[serde(rename = "json")]
10160 JSON,
10161 #[serde(untagged)]
10163 Other(String),
10164}
10165
10166impl ExportMyAccountFormat {
10167 pub fn as_str(&self) -> &str {
10169 match self {
10170 Self::Zip => "zip",
10171 Self::JSON => "json",
10172 Self::Other(value) => value.as_str(),
10173 }
10174 }
10175}
10176
10177impl std::fmt::Display for ExportMyAccountFormat {
10178 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10179 f.write_str(self.as_str())
10180 }
10181}
10182
10183impl From<&str> for ExportMyAccountFormat {
10184 fn from(value: &str) -> Self {
10185 match value {
10186 "zip" => Self::Zip,
10187 "json" => Self::JSON,
10188 other => Self::Other(other.to_string()),
10189 }
10190 }
10191}
10192
10193#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10195pub enum ExportSessionFormat {
10196 #[default]
10197 #[serde(rename = "md")]
10198 Md,
10199 #[serde(rename = "json")]
10200 JSON,
10201 #[serde(untagged)]
10203 Other(String),
10204}
10205
10206impl ExportSessionFormat {
10207 pub fn as_str(&self) -> &str {
10209 match self {
10210 Self::Md => "md",
10211 Self::JSON => "json",
10212 Self::Other(value) => value.as_str(),
10213 }
10214 }
10215}
10216
10217impl std::fmt::Display for ExportSessionFormat {
10218 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10219 f.write_str(self.as_str())
10220 }
10221}
10222
10223impl From<&str> for ExportSessionFormat {
10224 fn from(value: &str) -> Self {
10225 match value {
10226 "md" => Self::Md,
10227 "json" => Self::JSON,
10228 other => Self::Other(other.to_string()),
10229 }
10230 }
10231}
10232
10233#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10236pub struct FeatureFlag {
10237 pub id: String,
10238 pub label: String,
10239 pub description: String,
10240 pub enabled: bool,
10241 #[serde(default, skip_serializing_if = "Option::is_none")]
10242 pub rollout_pct: Option<i64>,
10243 pub source: GuardrailConfigItemSource,
10244}
10245
10246#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10248pub struct FeedEntry {
10249 pub feed_id: String,
10250 pub tenant_id: String,
10251 pub timestamp: String,
10252 pub event_type: FeedEntryEventType,
10253 pub title: String,
10254 #[serde(default, skip_serializing_if = "Option::is_none")]
10255 pub summary: Option<String>,
10256 #[serde(default, skip_serializing_if = "Option::is_none")]
10257 pub agent_id: Option<String>,
10258 #[serde(default, skip_serializing_if = "Option::is_none")]
10259 pub agent_name: Option<String>,
10260 #[serde(default, skip_serializing_if = "Option::is_none")]
10261 pub company_id: Option<String>,
10262 #[serde(default, skip_serializing_if = "Option::is_none")]
10263 pub company_name: Option<String>,
10264 #[serde(default, skip_serializing_if = "Option::is_none")]
10265 pub team_id: Option<String>,
10266 #[serde(default, skip_serializing_if = "Option::is_none")]
10267 pub team_name: Option<String>,
10268 #[serde(default, skip_serializing_if = "Option::is_none")]
10269 pub session_id: Option<String>,
10270 #[serde(default, skip_serializing_if = "Option::is_none")]
10271 pub run_id: Option<String>,
10272 #[serde(default, skip_serializing_if = "Option::is_none")]
10273 pub status: Option<String>,
10274 #[serde(default, skip_serializing_if = "Option::is_none")]
10275 pub metrics: Option<FeedEntryMetrics>,
10276 #[serde(default, skip_serializing_if = "Option::is_none")]
10277 pub error: Option<String>,
10278}
10279
10280#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10282pub enum FeedEntryEventType {
10283 #[default]
10284 #[serde(rename = "run.started")]
10285 RunStarted,
10286 #[serde(rename = "run.completed")]
10287 RunCompleted,
10288 #[serde(rename = "run.failed")]
10289 RunFailed,
10290 #[serde(rename = "run.timeout")]
10291 RunTimeout,
10292 #[serde(rename = "run.cancelled")]
10293 RunCancelled,
10294 #[serde(rename = "session.created")]
10295 SessionCreated,
10296 #[serde(rename = "company.tick_start")]
10297 CompanyTickStart,
10298 #[serde(rename = "company.tick_end")]
10299 CompanyTickEnd,
10300 #[serde(rename = "company.paused")]
10301 CompanyPaused,
10302 #[serde(rename = "company.resumed")]
10303 CompanyResumed,
10304 #[serde(rename = "company.escalation")]
10305 CompanyEscalation,
10306 #[serde(rename = "team.round_start")]
10307 TeamRoundStart,
10308 #[serde(rename = "team.round_end")]
10309 TeamRoundEnd,
10310 #[serde(rename = "objective.created")]
10311 ObjectiveCreated,
10312 #[serde(rename = "objective.completed")]
10313 ObjectiveCompleted,
10314 #[serde(rename = "agent.created")]
10315 AgentCreated,
10316 #[serde(untagged)]
10318 Other(String),
10319}
10320
10321impl FeedEntryEventType {
10322 pub fn as_str(&self) -> &str {
10324 match self {
10325 Self::RunStarted => "run.started",
10326 Self::RunCompleted => "run.completed",
10327 Self::RunFailed => "run.failed",
10328 Self::RunTimeout => "run.timeout",
10329 Self::RunCancelled => "run.cancelled",
10330 Self::SessionCreated => "session.created",
10331 Self::CompanyTickStart => "company.tick_start",
10332 Self::CompanyTickEnd => "company.tick_end",
10333 Self::CompanyPaused => "company.paused",
10334 Self::CompanyResumed => "company.resumed",
10335 Self::CompanyEscalation => "company.escalation",
10336 Self::TeamRoundStart => "team.round_start",
10337 Self::TeamRoundEnd => "team.round_end",
10338 Self::ObjectiveCreated => "objective.created",
10339 Self::ObjectiveCompleted => "objective.completed",
10340 Self::AgentCreated => "agent.created",
10341 Self::Other(value) => value.as_str(),
10342 }
10343 }
10344}
10345
10346impl std::fmt::Display for FeedEntryEventType {
10347 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10348 f.write_str(self.as_str())
10349 }
10350}
10351
10352impl From<&str> for FeedEntryEventType {
10353 fn from(value: &str) -> Self {
10354 match value {
10355 "run.started" => Self::RunStarted,
10356 "run.completed" => Self::RunCompleted,
10357 "run.failed" => Self::RunFailed,
10358 "run.timeout" => Self::RunTimeout,
10359 "run.cancelled" => Self::RunCancelled,
10360 "session.created" => Self::SessionCreated,
10361 "company.tick_start" => Self::CompanyTickStart,
10362 "company.tick_end" => Self::CompanyTickEnd,
10363 "company.paused" => Self::CompanyPaused,
10364 "company.resumed" => Self::CompanyResumed,
10365 "company.escalation" => Self::CompanyEscalation,
10366 "team.round_start" => Self::TeamRoundStart,
10367 "team.round_end" => Self::TeamRoundEnd,
10368 "objective.created" => Self::ObjectiveCreated,
10369 "objective.completed" => Self::ObjectiveCompleted,
10370 "agent.created" => Self::AgentCreated,
10371 other => Self::Other(other.to_string()),
10372 }
10373 }
10374}
10375
10376#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10378pub struct FeedEntryMetrics {
10379 #[serde(default, skip_serializing_if = "Option::is_none")]
10380 pub duration_ms: Option<i64>,
10381 #[serde(default, skip_serializing_if = "Option::is_none")]
10382 pub tokens_used: Option<i64>,
10383 #[serde(default, skip_serializing_if = "Option::is_none")]
10384 pub cost_usd: Option<f64>,
10385 #[serde(default, skip_serializing_if = "Option::is_none")]
10386 pub steps: Option<i64>,
10387 #[serde(default, skip_serializing_if = "Option::is_none")]
10388 pub tool_calls: Option<i64>,
10389}
10390
10391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10393pub struct FileArbiterAppealRequest {
10394 #[serde(default, skip_serializing_if = "Option::is_none")]
10395 pub filed_by: Option<String>,
10396 pub reason: String,
10397}
10398
10399#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10401pub struct FileArbiterAppealResponse {
10402 pub appeal_id: String,
10403 pub case_id: String,
10404 pub filed_by: String,
10405 pub reason: String,
10406 pub panel_arbiter_ids: Vec<String>,
10407 pub status: FileArbiterAppealResponseStatus,
10408 pub filed_at: String,
10409 #[serde(default, skip_serializing_if = "Option::is_none")]
10410 pub resolved_at: Option<String>,
10411}
10412
10413#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10415pub enum FileArbiterAppealResponseStatus {
10416 #[default]
10417 #[serde(rename = "pending")]
10418 Pending,
10419 #[serde(rename = "upheld")]
10420 Upheld,
10421 #[serde(rename = "overturned")]
10422 Overturned,
10423 #[serde(untagged)]
10425 Other(String),
10426}
10427
10428impl FileArbiterAppealResponseStatus {
10429 pub fn as_str(&self) -> &str {
10431 match self {
10432 Self::Pending => "pending",
10433 Self::Upheld => "upheld",
10434 Self::Overturned => "overturned",
10435 Self::Other(value) => value.as_str(),
10436 }
10437 }
10438}
10439
10440impl std::fmt::Display for FileArbiterAppealResponseStatus {
10441 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10442 f.write_str(self.as_str())
10443 }
10444}
10445
10446impl From<&str> for FileArbiterAppealResponseStatus {
10447 fn from(value: &str) -> Self {
10448 match value {
10449 "pending" => Self::Pending,
10450 "upheld" => Self::Upheld,
10451 "overturned" => Self::Overturned,
10452 other => Self::Other(other.to_string()),
10453 }
10454 }
10455}
10456
10457#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10459pub struct FileArbiterCaseRequest {
10460 pub filed_by: String,
10461 pub against_agent_id: String,
10462 pub rule_ids: Vec<String>,
10465 pub description: String,
10470 #[serde(default, skip_serializing_if = "Option::is_none")]
10472 pub evidence: Option<serde_json::Map<String, serde_json::Value>>,
10473}
10474
10475#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10477pub struct FileEntry {
10478 pub created_at: String,
10479 pub file_id: String,
10480 pub filename: String,
10481 pub mime_type: String,
10482 pub sha256: String,
10483 pub size_bytes: i64,
10484 pub tenant_id: String,
10485}
10486
10487#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10490pub struct FileRecord {
10491 pub file_id: String,
10492 pub tenant_id: String,
10493 pub filename: String,
10494 pub mime_type: String,
10495 pub size_bytes: i64,
10496 pub sha256: String,
10497 pub created_at: String,
10498}
10499
10500#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10503pub struct FleetLayout {
10504 pub positions: HashMap<String, Value4>,
10506 pub edges: Vec<FleetLayoutEdge>,
10507 #[serde(default, skip_serializing_if = "Option::is_none")]
10508 pub notes: Option<Vec<FleetLayoutNote>>,
10509 #[serde(default, skip_serializing_if = "Option::is_none")]
10510 pub drafts: Option<Vec<FleetLayoutDraft>>,
10511 #[serde(default, skip_serializing_if = "Option::is_none")]
10512 pub updated_at: Option<String>,
10513 #[serde(default, skip_serializing_if = "Option::is_none")]
10516 pub dropped: Option<FleetLayoutDropped>,
10517}
10518
10519#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10521pub struct FleetLayoutDraft {
10522 pub id: String,
10523 pub kind: String,
10526 pub x: f64,
10527 pub y: f64,
10528 #[serde(default, skip_serializing_if = "Option::is_none")]
10529 pub label: Option<String>,
10530 #[serde(default, skip_serializing_if = "Option::is_none")]
10531 pub config: Option<serde_json::Map<String, serde_json::Value>>,
10532}
10533
10534#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10537pub struct FleetLayoutDropped {
10538 pub positions: i64,
10539 pub edges: i64,
10540 pub notes: i64,
10541 pub drafts: i64,
10542}
10543
10544#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10546pub struct FleetLayoutEdge {
10547 pub id: String,
10548 pub source: String,
10550 pub target: String,
10552 #[serde(default, skip_serializing_if = "Option::is_none")]
10554 pub r#type: Option<String>,
10555}
10556
10557#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10559pub struct FleetLayoutNote {
10560 pub id: String,
10561 pub x: f64,
10562 pub y: f64,
10563 pub w: f64,
10564 pub h: f64,
10565 pub text: String,
10566 #[serde(default, skip_serializing_if = "Option::is_none")]
10567 pub color: Option<String>,
10568 #[serde(default, skip_serializing_if = "Option::is_none")]
10570 pub frame: Option<bool>,
10571}
10572
10573#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10577pub struct FleetLayoutUpdate {
10578 pub positions: HashMap<String, Value3>,
10580 pub edges: Vec<FleetLayoutUpdateEdge>,
10581 #[serde(default, skip_serializing_if = "Option::is_none")]
10582 pub notes: Option<Vec<FleetLayoutUpdateNote>>,
10583 #[serde(default, skip_serializing_if = "Option::is_none")]
10584 pub drafts: Option<Vec<FleetLayoutUpdateDraft>>,
10585}
10586
10587#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10589pub struct FleetLayoutUpdateDraft {
10590 pub id: String,
10591 pub kind: String,
10592 pub x: f64,
10593 pub y: f64,
10594 #[serde(default, skip_serializing_if = "Option::is_none")]
10595 pub label: Option<String>,
10596 #[serde(default, skip_serializing_if = "Option::is_none")]
10597 pub config: Option<serde_json::Map<String, serde_json::Value>>,
10598}
10599
10600#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10602pub struct FleetLayoutUpdateEdge {
10603 pub id: String,
10604 pub source: String,
10605 pub target: String,
10606 #[serde(default, skip_serializing_if = "Option::is_none")]
10607 pub r#type: Option<String>,
10608}
10609
10610#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10612pub struct FleetLayoutUpdateNote {
10613 pub id: String,
10614 pub x: f64,
10615 pub y: f64,
10616 pub w: f64,
10617 pub h: f64,
10618 pub text: String,
10619 #[serde(default, skip_serializing_if = "Option::is_none")]
10620 pub color: Option<String>,
10621 #[serde(default, skip_serializing_if = "Option::is_none")]
10622 pub frame: Option<bool>,
10623}
10624
10625#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10627pub struct FounderIdentity {
10628 pub founder_id: String,
10630 pub founder_name: String,
10631 pub founder_public_key: String,
10632}
10633
10634#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10636pub struct FriaReport {
10637 pub agent_id: String,
10638 pub risk_level: String,
10639 pub rights_assessed: Vec<FriaRight>,
10640 pub mitigations: String,
10641 pub assessor: String,
10642 pub assessed_at: String,
10643 pub next_review: String,
10644}
10645
10646#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10648pub struct FriaRight {
10649 pub right: String,
10650 pub impact: FriaRightImpact,
10651 pub justification: String,
10652 #[serde(default, skip_serializing_if = "Option::is_none")]
10653 pub mitigation: Option<String>,
10654}
10655
10656#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10658pub enum FriaRightImpact {
10659 #[default]
10660 #[serde(rename = "none")]
10661 None,
10662 #[serde(rename = "low")]
10663 Low,
10664 #[serde(rename = "medium")]
10665 Medium,
10666 #[serde(rename = "high")]
10667 High,
10668 #[serde(untagged)]
10670 Other(String),
10671}
10672
10673impl FriaRightImpact {
10674 pub fn as_str(&self) -> &str {
10676 match self {
10677 Self::None => "none",
10678 Self::Low => "low",
10679 Self::Medium => "medium",
10680 Self::High => "high",
10681 Self::Other(value) => value.as_str(),
10682 }
10683 }
10684}
10685
10686impl std::fmt::Display for FriaRightImpact {
10687 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10688 f.write_str(self.as_str())
10689 }
10690}
10691
10692impl From<&str> for FriaRightImpact {
10693 fn from(value: &str) -> Self {
10694 match value {
10695 "none" => Self::None,
10696 "low" => Self::Low,
10697 "medium" => Self::Medium,
10698 "high" => Self::High,
10699 other => Self::Other(other.to_string()),
10700 }
10701 }
10702}
10703
10704#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10706pub struct GenerateAdminBlogPostResponse {
10707 pub post: BlogPost,
10708}
10709
10710#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10712pub struct GetActivityFeedResponse {
10713 #[serde(default, skip_serializing_if = "Option::is_none")]
10714 pub entries: Option<Vec<FeedEntry>>,
10715 #[serde(default, skip_serializing_if = "Option::is_none")]
10716 pub cursor: Option<String>,
10717 #[serde(default, skip_serializing_if = "Option::is_none")]
10718 pub total: Option<i64>,
10719}
10720
10721#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10723pub struct GetAdminBlogConfigResponse {
10724 pub config: BlogConfig,
10725}
10726
10727#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10729pub struct GetAdminDisabledToolsResponse {
10730 pub ok: bool,
10731 pub disabled_tools: Vec<String>,
10732}
10733
10734#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
10736pub enum GetAdminIntegrationOAuthProviderProvider {
10737 #[default]
10738 #[serde(rename = "github")]
10739 Github,
10740 #[serde(rename = "google")]
10741 Google,
10742 #[serde(rename = "slack")]
10743 Slack,
10744 #[serde(rename = "notion")]
10745 Notion,
10746 #[serde(rename = "stripe")]
10747 Stripe,
10748 #[serde(rename = "jira")]
10749 Jira,
10750 #[serde(rename = "zendesk")]
10751 Zendesk,
10752 #[serde(rename = "hubspot")]
10753 Hubspot,
10754 #[serde(rename = "linkedin")]
10755 Linkedin,
10756 #[serde(rename = "youtube")]
10757 Youtube,
10758 #[serde(rename = "instagram")]
10759 Instagram,
10760 #[serde(rename = "x_twitter")]
10761 XTwitter,
10762 #[serde(rename = "facebook")]
10763 Facebook,
10764 #[serde(rename = "tiktok")]
10765 Tiktok,
10766 #[serde(untagged)]
10768 Other(String),
10769}
10770
10771impl GetAdminIntegrationOAuthProviderProvider {
10772 pub fn as_str(&self) -> &str {
10774 match self {
10775 Self::Github => "github",
10776 Self::Google => "google",
10777 Self::Slack => "slack",
10778 Self::Notion => "notion",
10779 Self::Stripe => "stripe",
10780 Self::Jira => "jira",
10781 Self::Zendesk => "zendesk",
10782 Self::Hubspot => "hubspot",
10783 Self::Linkedin => "linkedin",
10784 Self::Youtube => "youtube",
10785 Self::Instagram => "instagram",
10786 Self::XTwitter => "x_twitter",
10787 Self::Facebook => "facebook",
10788 Self::Tiktok => "tiktok",
10789 Self::Other(value) => value.as_str(),
10790 }
10791 }
10792}
10793
10794impl std::fmt::Display for GetAdminIntegrationOAuthProviderProvider {
10795 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10796 f.write_str(self.as_str())
10797 }
10798}
10799
10800impl From<&str> for GetAdminIntegrationOAuthProviderProvider {
10801 fn from(value: &str) -> Self {
10802 match value {
10803 "github" => Self::Github,
10804 "google" => Self::Google,
10805 "slack" => Self::Slack,
10806 "notion" => Self::Notion,
10807 "stripe" => Self::Stripe,
10808 "jira" => Self::Jira,
10809 "zendesk" => Self::Zendesk,
10810 "hubspot" => Self::Hubspot,
10811 "linkedin" => Self::Linkedin,
10812 "youtube" => Self::Youtube,
10813 "instagram" => Self::Instagram,
10814 "x_twitter" => Self::XTwitter,
10815 "facebook" => Self::Facebook,
10816 "tiktok" => Self::Tiktok,
10817 other => Self::Other(other.to_string()),
10818 }
10819 }
10820}
10821
10822#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10824pub struct GetAdminIntegrationOAuthProviderResponse {
10825 pub provider: String,
10826 pub enabled: bool,
10827 pub configured: bool,
10828 #[serde(default, skip_serializing_if = "Option::is_none")]
10830 pub client_id: Option<String>,
10831 #[serde(default, skip_serializing_if = "Option::is_none")]
10834 pub client_secret_hint: Option<String>,
10835 #[serde(default, skip_serializing_if = "Option::is_none")]
10838 pub scopes: Option<Vec<String>>,
10839}
10840
10841#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10843pub struct GetAdminLLMDefaultsResponse {
10844 pub providers: Vec<GetAdminLLMDefaultsResponseProvider>,
10845 #[serde(default, skip_serializing_if = "Option::is_none")]
10846 pub default_provider: Option<String>,
10847 #[serde(default, skip_serializing_if = "Option::is_none")]
10848 pub default_model: Option<String>,
10849 #[serde(default, skip_serializing_if = "Option::is_none")]
10850 pub default_endpoint: Option<String>,
10851 #[serde(default, skip_serializing_if = "Option::is_none")]
10852 pub fallback_provider: Option<String>,
10853 #[serde(default, skip_serializing_if = "Option::is_none")]
10854 pub fallback_model: Option<String>,
10855 #[serde(default, skip_serializing_if = "Option::is_none")]
10856 pub fallback_endpoint: Option<String>,
10857}
10858
10859#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10861pub struct GetAdminLLMDefaultsResponseProvider {
10862 pub provider_id: String,
10863 pub configured: bool,
10865 pub key_hint: String,
10867}
10868
10869#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10871pub struct GetAdminPlansResponse {
10872 pub plans: Vec<GetAdminPlansResponsePlan>,
10873}
10874
10875#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10877pub struct GetAdminPlansResponsePlan {
10878 pub id: String,
10879 pub name: String,
10880 pub quotas: serde_json::Map<String, serde_json::Value>,
10882}
10883
10884#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10886pub struct GetAdminStatsResponse {
10887 #[serde(default, skip_serializing_if = "Option::is_none")]
10888 pub total_tenants: Option<i64>,
10889 #[serde(default, skip_serializing_if = "Option::is_none")]
10890 pub total_agents: Option<i64>,
10891 #[serde(default, skip_serializing_if = "Option::is_none")]
10892 pub total_runs: Option<i64>,
10893}
10894
10895#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10897pub struct GetAdminToolOverridesResponse {
10898 pub ok: bool,
10899 pub overrides: HashMap<String, ToolOverride>,
10900}
10901
10902#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10904pub struct GetAdminTraceResponse {
10905 pub trace_id: String,
10906 pub count: i64,
10907 #[serde(default, skip_serializing_if = "Option::is_none")]
10908 pub truncated: Option<bool>,
10909 pub runs: Vec<GetAdminTraceResponseRun>,
10910}
10911
10912#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10914pub struct GetAdminTraceResponseRun {
10915 #[serde(default, skip_serializing_if = "Option::is_none")]
10916 pub run_id: Option<String>,
10917 #[serde(default, skip_serializing_if = "Option::is_none")]
10918 pub agent_id: Option<String>,
10919 #[serde(default, skip_serializing_if = "Option::is_none")]
10920 pub status: Option<String>,
10921 #[serde(default, skip_serializing_if = "Option::is_none")]
10922 pub parent_run_id: Option<String>,
10923 #[serde(default, skip_serializing_if = "Option::is_none")]
10924 pub dag_trace_id: Option<String>,
10925 #[serde(default, skip_serializing_if = "Option::is_none")]
10926 pub created_at: Option<String>,
10927 #[serde(default, skip_serializing_if = "Option::is_none")]
10928 pub completed_at: Option<String>,
10929 #[serde(default, skip_serializing_if = "Option::is_none")]
10930 pub duration_ms: Option<i64>,
10931 #[serde(default, skip_serializing_if = "Option::is_none")]
10932 pub error: Option<String>,
10933}
10934
10935#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
10937pub struct GetAgentActivityStatsResponse {
10938 #[serde(rename = "totalRuns", default, skip_serializing_if = "Option::is_none")]
10942 pub total_runs: Option<i64>,
10943 #[serde(rename = "completedRuns", default, skip_serializing_if = "Option::is_none")]
10947 pub completed_runs: Option<i64>,
10948 #[serde(rename = "failedRuns", default, skip_serializing_if = "Option::is_none")]
10952 pub failed_runs: Option<i64>,
10953 #[serde(rename = "cancelledRuns", default, skip_serializing_if = "Option::is_none")]
10957 pub cancelled_runs: Option<i64>,
10958 #[serde(rename = "guardrailBlockedRuns", default, skip_serializing_if = "Option::is_none")]
10962 pub guardrail_blocked_runs: Option<i64>,
10963 #[serde(rename = "errorRatePercent", default, skip_serializing_if = "Option::is_none")]
10967 pub error_rate_percent: Option<f64>,
10968 #[serde(rename = "avgStepsPerRun", default, skip_serializing_if = "Option::is_none")]
10972 pub avg_steps_per_run: Option<f64>,
10973 #[serde(rename = "avgDurationMs", default, skip_serializing_if = "Option::is_none")]
10977 pub avg_duration_ms: Option<f64>,
10978 #[serde(rename = "avgInputTokens", default, skip_serializing_if = "Option::is_none")]
10982 pub avg_input_tokens: Option<f64>,
10983 #[serde(rename = "avgOutputTokens", default, skip_serializing_if = "Option::is_none")]
10987 pub avg_output_tokens: Option<f64>,
10988 #[serde(rename = "avgThinkingTokens", default, skip_serializing_if = "Option::is_none")]
10992 pub avg_thinking_tokens: Option<f64>,
10993 #[serde(rename = "toolBreakdown", default, skip_serializing_if = "Option::is_none")]
10997 pub tool_breakdown: Option<Vec<ToolBreakdownEntry>>,
10998 #[serde(rename = "topErrorMessages", default, skip_serializing_if = "Option::is_none")]
11002 pub top_error_messages: Option<Vec<GetAgentActivityStatsResponseTopErrorMessage>>,
11003 #[serde(rename = "runsByDay", default, skip_serializing_if = "Option::is_none")]
11007 pub runs_by_day: Option<Vec<GetAgentActivityStatsResponseRunsByDayItem>>,
11008 #[serde(rename = "total_runs", default, skip_serializing_if = "Option::is_none")]
11009 pub total_runs_: Option<i64>,
11010 #[serde(rename = "completed_runs", default, skip_serializing_if = "Option::is_none")]
11011 pub completed_runs_: Option<i64>,
11012 #[serde(rename = "failed_runs", default, skip_serializing_if = "Option::is_none")]
11013 pub failed_runs_: Option<i64>,
11014 #[serde(rename = "cancelled_runs", default, skip_serializing_if = "Option::is_none")]
11015 pub cancelled_runs_: Option<i64>,
11016 #[serde(rename = "guardrail_blocked_runs", default, skip_serializing_if = "Option::is_none")]
11017 pub guardrail_blocked_runs_: Option<i64>,
11018 #[serde(rename = "error_rate_percent", default, skip_serializing_if = "Option::is_none")]
11019 pub error_rate_percent_: Option<f64>,
11020 #[serde(rename = "avg_steps_per_run", default, skip_serializing_if = "Option::is_none")]
11021 pub avg_steps_per_run_: Option<f64>,
11022 #[serde(rename = "avg_duration_ms", default, skip_serializing_if = "Option::is_none")]
11023 pub avg_duration_ms_: Option<f64>,
11024 #[serde(rename = "avg_input_tokens", default, skip_serializing_if = "Option::is_none")]
11025 pub avg_input_tokens_: Option<f64>,
11026 #[serde(rename = "avg_output_tokens", default, skip_serializing_if = "Option::is_none")]
11027 pub avg_output_tokens_: Option<f64>,
11028 #[serde(rename = "avg_thinking_tokens", default, skip_serializing_if = "Option::is_none")]
11029 pub avg_thinking_tokens_: Option<f64>,
11030 #[serde(rename = "tool_breakdown", default, skip_serializing_if = "Option::is_none")]
11031 pub tool_breakdown_: Option<Vec<ToolBreakdownEntry>>,
11032 #[serde(rename = "top_error_messages", default, skip_serializing_if = "Option::is_none")]
11033 pub top_error_messages_: Option<Vec<GetAgentActivityStatsResponseTopErrorMessage2>>,
11034 #[serde(rename = "runs_by_day", default, skip_serializing_if = "Option::is_none")]
11035 pub runs_by_day_: Option<Vec<GetAgentActivityStatsResponseRunsByDayItem2>>,
11036}
11037
11038#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11040pub struct GetAgentActivityStatsResponseRunsByDayItem {
11041 #[serde(default, skip_serializing_if = "Option::is_none")]
11042 pub day: Option<String>,
11043 #[serde(default, skip_serializing_if = "Option::is_none")]
11044 pub total: Option<i64>,
11045 #[serde(default, skip_serializing_if = "Option::is_none")]
11046 pub completed: Option<i64>,
11047 #[serde(default, skip_serializing_if = "Option::is_none")]
11048 pub failed: Option<i64>,
11049}
11050
11051#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11053pub struct GetAgentActivityStatsResponseRunsByDayItem2 {
11054 #[serde(default, skip_serializing_if = "Option::is_none")]
11055 pub day: Option<String>,
11056 #[serde(default, skip_serializing_if = "Option::is_none")]
11057 pub total: Option<i64>,
11058 #[serde(default, skip_serializing_if = "Option::is_none")]
11059 pub completed: Option<i64>,
11060 #[serde(default, skip_serializing_if = "Option::is_none")]
11061 pub failed: Option<i64>,
11062}
11063
11064#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11066pub struct GetAgentActivityStatsResponseTopErrorMessage {
11067 #[serde(default, skip_serializing_if = "Option::is_none")]
11068 pub message: Option<String>,
11069 #[serde(default, skip_serializing_if = "Option::is_none")]
11070 pub count: Option<i64>,
11071}
11072
11073#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11075pub struct GetAgentActivityStatsResponseTopErrorMessage2 {
11076 #[serde(default, skip_serializing_if = "Option::is_none")]
11077 pub message: Option<String>,
11078 #[serde(default, skip_serializing_if = "Option::is_none")]
11079 pub count: Option<i64>,
11080}
11081
11082#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11084pub struct GetAgentIdentityResponse {
11085 #[serde(default, skip_serializing_if = "Option::is_none")]
11086 pub public_key: Option<String>,
11087 #[serde(default, skip_serializing_if = "Option::is_none")]
11088 pub created_at: Option<String>,
11089}
11090
11091#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11093pub struct GetAgentObligationsResponse {
11094 #[serde(default, skip_serializing_if = "Option::is_none")]
11095 pub agent_id: Option<String>,
11096 #[serde(default, skip_serializing_if = "Option::is_none")]
11097 pub rules: Option<Vec<ConstitutionRule>>,
11098 #[serde(default, skip_serializing_if = "Option::is_none")]
11099 pub count: Option<i64>,
11100}
11101
11102#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11104pub enum GetAgentSystemCardFormat {
11105 #[default]
11106 #[serde(rename = "json")]
11107 JSON,
11108 #[serde(rename = "markdown")]
11109 Markdown,
11110 #[serde(untagged)]
11112 Other(String),
11113}
11114
11115impl GetAgentSystemCardFormat {
11116 pub fn as_str(&self) -> &str {
11118 match self {
11119 Self::JSON => "json",
11120 Self::Markdown => "markdown",
11121 Self::Other(value) => value.as_str(),
11122 }
11123 }
11124}
11125
11126impl std::fmt::Display for GetAgentSystemCardFormat {
11127 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11128 f.write_str(self.as_str())
11129 }
11130}
11131
11132impl From<&str> for GetAgentSystemCardFormat {
11133 fn from(value: &str) -> Self {
11134 match value {
11135 "json" => Self::JSON,
11136 "markdown" => Self::Markdown,
11137 other => Self::Other(other.to_string()),
11138 }
11139 }
11140}
11141
11142#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11144pub struct GetAgentTrafficResponse {
11145 #[serde(default, skip_serializing_if = "Option::is_none")]
11146 pub agent_id: Option<String>,
11147 #[serde(default, skip_serializing_if = "Option::is_none")]
11148 pub entries: Option<Vec<GetAgentTrafficResponseEntry>>,
11149 #[serde(default, skip_serializing_if = "Option::is_none")]
11150 pub updated_at: Option<String>,
11151}
11152
11153#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11155pub struct GetAgentTrafficResponseEntry {
11156 #[serde(default, skip_serializing_if = "Option::is_none")]
11157 pub version: Option<i64>,
11158 #[serde(default, skip_serializing_if = "Option::is_none")]
11159 pub weight: Option<f64>,
11160}
11161
11162#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11164pub struct GetAgentVersionDiffResponse {
11165 #[serde(default, skip_serializing_if = "Option::is_none")]
11166 pub agent_id: Option<String>,
11167 #[serde(default, skip_serializing_if = "Option::is_none")]
11168 pub version_from: Option<i64>,
11169 #[serde(default, skip_serializing_if = "Option::is_none")]
11170 pub version_to: Option<i64>,
11171 #[serde(default, skip_serializing_if = "Option::is_none")]
11172 pub diff: Option<HashMap<String, Value5>>,
11173 #[serde(default, skip_serializing_if = "Option::is_none")]
11174 pub changed_fields: Option<Vec<String>>,
11175}
11176
11177#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11179pub struct GetAgentViolationsResponse {
11180 #[serde(default, skip_serializing_if = "Option::is_none")]
11181 pub agent_id: Option<String>,
11182 #[serde(default, skip_serializing_if = "Option::is_none")]
11183 pub violations: Option<Vec<ConstitutionViolation>>,
11184 #[serde(default, skip_serializing_if = "Option::is_none")]
11185 pub count: Option<i64>,
11186}
11187
11188#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11190pub struct GetAndroidTestingStatusResponse {
11191 pub registered: bool,
11192 pub emailed: bool,
11193}
11194
11195#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11197pub struct GetAppleAppSiteAssociationResponse {
11198 pub applinks: GetAppleAppSiteAssociationResponseApplinks,
11199 #[serde(default, skip_serializing_if = "Option::is_none")]
11200 pub webcredentials: Option<GetAppleAppSiteAssociationResponseWebcredentials>,
11201}
11202
11203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11205pub struct GetAppleAppSiteAssociationResponseApplinks {
11206 #[serde(default, skip_serializing_if = "Option::is_none")]
11207 pub apps: Option<Vec<String>>,
11208 #[serde(default, skip_serializing_if = "Option::is_none")]
11209 pub details: Option<Vec<GetAppleAppSiteAssociationResponseApplinksDetail>>,
11210}
11211
11212#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11214pub struct GetAppleAppSiteAssociationResponseApplinksDetail {
11215 #[serde(rename = "appIDs", default, skip_serializing_if = "Option::is_none")]
11216 pub app_i_ds: Option<Vec<String>>,
11217 #[serde(default, skip_serializing_if = "Option::is_none")]
11218 pub components: Option<Vec<serde_json::Map<String, serde_json::Value>>>,
11219}
11220
11221#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11223pub struct GetAppleAppSiteAssociationResponseWebcredentials {
11224 #[serde(default, skip_serializing_if = "Option::is_none")]
11225 pub apps: Option<Vec<String>>,
11226}
11227
11228#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11230pub struct GetBillingBudgetResponse {
11231 pub configured: bool,
11232 #[serde(default)]
11233 pub budget: Option<GetBillingBudgetResponseBudget>,
11234 #[serde(default, skip_serializing_if = "Option::is_none")]
11235 pub status: Option<serde_json::Map<String, serde_json::Value>>,
11236}
11237
11238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11240pub struct GetBillingBudgetResponseBudget {
11241 #[serde(default, skip_serializing_if = "Option::is_none")]
11242 pub limit_usd: Option<f64>,
11243 #[serde(default, skip_serializing_if = "Option::is_none")]
11245 pub soft_threshold: Option<f64>,
11246 #[serde(default, skip_serializing_if = "Option::is_none")]
11247 pub hard_threshold: Option<f64>,
11248 #[serde(default, skip_serializing_if = "Option::is_none")]
11249 pub period: Option<GetBillingBudgetResponseBudgetPeriod>,
11250}
11251
11252#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11254pub enum GetBillingBudgetResponseBudgetPeriod {
11255 #[default]
11256 #[serde(rename = "monthly")]
11257 Monthly,
11258 #[serde(rename = "weekly")]
11259 Weekly,
11260 #[serde(rename = "daily")]
11261 Daily,
11262 #[serde(untagged)]
11264 Other(String),
11265}
11266
11267impl GetBillingBudgetResponseBudgetPeriod {
11268 pub fn as_str(&self) -> &str {
11270 match self {
11271 Self::Monthly => "monthly",
11272 Self::Weekly => "weekly",
11273 Self::Daily => "daily",
11274 Self::Other(value) => value.as_str(),
11275 }
11276 }
11277}
11278
11279impl std::fmt::Display for GetBillingBudgetResponseBudgetPeriod {
11280 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11281 f.write_str(self.as_str())
11282 }
11283}
11284
11285impl From<&str> for GetBillingBudgetResponseBudgetPeriod {
11286 fn from(value: &str) -> Self {
11287 match value {
11288 "monthly" => Self::Monthly,
11289 "weekly" => Self::Weekly,
11290 "daily" => Self::Daily,
11291 other => Self::Other(other.to_string()),
11292 }
11293 }
11294}
11295
11296#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11298pub struct GetBillingOverageResponse {
11299 pub enabled: bool,
11300 pub requires_cap: bool,
11302 pub cap_configured: bool,
11303 pub metered_to_stripe: bool,
11304}
11305
11306#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11308pub struct GetBillingTrialResponse {
11309 #[serde(default, skip_serializing_if = "Option::is_none")]
11310 pub active: Option<bool>,
11311 #[serde(default, skip_serializing_if = "Option::is_none")]
11312 pub ends_at: Option<String>,
11313 #[serde(default, skip_serializing_if = "Option::is_none")]
11314 pub days_left: Option<i64>,
11315 #[serde(default, skip_serializing_if = "Option::is_none")]
11316 pub recommended_plan: Option<String>,
11317 #[serde(default, skip_serializing_if = "Option::is_none")]
11318 pub signals: Option<serde_json::Map<String, serde_json::Value>>,
11319}
11320
11321#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11323pub struct GetBridgeAgentSpecsResponse {
11324 pub agent_id: String,
11325 pub revision: String,
11327 pub specs: Vec<GetBridgeAgentSpecsResponseSpec>,
11328}
11329
11330#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11332pub struct GetBridgeAgentSpecsResponseSpec {
11333 pub spec_id: String,
11334 pub version: String,
11335 pub enabled: bool,
11336 #[serde(default)]
11338 pub runtime_scope: Option<String>,
11339 pub permissions_granted: Vec<String>,
11340 #[serde(default, skip_serializing_if = "Option::is_none")]
11341 pub tool_allowlist: Option<Vec<String>>,
11342}
11343
11344#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11346pub struct GetBridgeTaskApprovalResponse {
11347 #[serde(default, skip_serializing_if = "Option::is_none")]
11348 pub approval_response: Option<serde_json::Map<String, serde_json::Value>>,
11349}
11350
11351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11353pub struct GetClientConfigResponse {
11354 #[serde(default, skip_serializing_if = "Option::is_none")]
11355 pub features: Option<serde_json::Map<String, serde_json::Value>>,
11356 #[serde(default, skip_serializing_if = "Option::is_none")]
11357 pub providers: Option<serde_json::Map<String, serde_json::Value>>,
11358}
11359
11360#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11362pub struct GetCompanyActivityResponse {
11363 #[serde(default, skip_serializing_if = "Option::is_none")]
11364 pub entries: Option<Vec<CompanyActivityEntry>>,
11365}
11366
11367#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11369pub struct GetCompanyBudgetResponse {
11370 #[serde(default, skip_serializing_if = "Option::is_none")]
11371 pub total_usd: Option<f64>,
11372 #[serde(default, skip_serializing_if = "Option::is_none")]
11373 pub spent_usd: Option<f64>,
11374 #[serde(default, skip_serializing_if = "Option::is_none")]
11375 pub daily_limit_usd: Option<f64>,
11376 #[serde(default, skip_serializing_if = "Option::is_none")]
11377 pub alert_threshold_pct: Option<f64>,
11378 #[serde(default, skip_serializing_if = "Option::is_none")]
11379 pub remaining_usd: Option<f64>,
11380}
11381
11382#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11384pub struct GetCompanyObjectivesResponse {
11385 #[serde(default, skip_serializing_if = "Option::is_none")]
11386 pub trees: Option<Vec<ObjectiveTree>>,
11387 #[serde(default, skip_serializing_if = "Option::is_none")]
11388 pub objectives: Option<Vec<Objective>>,
11389}
11390
11391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11393pub struct GetDataExplorerValueResponse {
11394 #[serde(default, skip_serializing_if = "Option::is_none")]
11395 pub namespace: Option<String>,
11396 #[serde(default, skip_serializing_if = "Option::is_none")]
11397 pub key: Option<String>,
11398 #[serde(default, skip_serializing_if = "Option::is_none")]
11399 pub value: Option<serde_json::Value>,
11400 #[serde(default, skip_serializing_if = "Option::is_none")]
11401 pub size_bytes: Option<i64>,
11402 #[serde(default, skip_serializing_if = "Option::is_none")]
11403 pub r#type: Option<String>,
11404}
11405
11406#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11408pub struct GetGovernanceLedgerResponse {
11409 pub entries: Vec<GovernanceLedgerEntry>,
11410 pub head: GovernanceLedgerHead,
11411 pub total: i64,
11416 pub tenant_total: i64,
11420}
11421
11422#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11424pub struct GetHealthResponse {
11425 #[serde(default, skip_serializing_if = "Option::is_none")]
11426 pub status: Option<GetHealthResponseStatus>,
11427 #[serde(default, skip_serializing_if = "Option::is_none")]
11428 pub timestamp: Option<String>,
11429 #[serde(default, skip_serializing_if = "Option::is_none")]
11430 pub kv_connected: Option<bool>,
11431 #[serde(default, skip_serializing_if = "Option::is_none")]
11432 pub uptime_seconds: Option<f64>,
11433 #[serde(default, skip_serializing_if = "Option::is_none")]
11441 pub version: Option<String>,
11442 #[serde(default, skip_serializing_if = "Option::is_none")]
11449 pub build_sha: Option<String>,
11450 #[serde(default, skip_serializing_if = "Option::is_none")]
11456 pub pending_resumes: Option<i64>,
11457 #[serde(default, skip_serializing_if = "Option::is_none")]
11460 pub runs_queued: Option<i64>,
11461}
11462
11463#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11465pub enum GetHealthResponseStatus {
11466 #[default]
11467 #[serde(rename = "healthy")]
11468 Healthy,
11469 #[serde(rename = "degraded")]
11470 Degraded,
11471 #[serde(rename = "unhealthy")]
11472 Unhealthy,
11473 #[serde(untagged)]
11475 Other(String),
11476}
11477
11478impl GetHealthResponseStatus {
11479 pub fn as_str(&self) -> &str {
11481 match self {
11482 Self::Healthy => "healthy",
11483 Self::Degraded => "degraded",
11484 Self::Unhealthy => "unhealthy",
11485 Self::Other(value) => value.as_str(),
11486 }
11487 }
11488}
11489
11490impl std::fmt::Display for GetHealthResponseStatus {
11491 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11492 f.write_str(self.as_str())
11493 }
11494}
11495
11496impl From<&str> for GetHealthResponseStatus {
11497 fn from(value: &str) -> Self {
11498 match value {
11499 "healthy" => Self::Healthy,
11500 "degraded" => Self::Degraded,
11501 "unhealthy" => Self::Unhealthy,
11502 other => Self::Other(other.to_string()),
11503 }
11504 }
11505}
11506
11507#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11509pub struct GetImmutableAuditResponse {
11510 pub events: Vec<ImmutableAuditEvent>,
11511 pub total: i64,
11512}
11513
11514#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11516pub struct GetLinkPreviewResponse {
11517 pub preview: LinkPreview,
11518}
11519
11520#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11522pub struct GetListingReviewsResponse {
11523 #[serde(default, skip_serializing_if = "Option::is_none")]
11524 pub reviews: Option<Vec<MarketplaceListingRating>>,
11525 #[serde(default, skip_serializing_if = "Option::is_none")]
11526 pub total: Option<i64>,
11527 #[serde(default, skip_serializing_if = "Option::is_none")]
11528 pub cursor: Option<String>,
11529}
11530
11531#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11533pub struct GetMarketplaceCategoriesResponse {
11534 pub categories: Vec<String>,
11535}
11536
11537#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11539pub struct GetMarkupConfigResponse {
11540 #[serde(default, skip_serializing_if = "Option::is_none")]
11541 pub markup: Option<serde_json::Map<String, serde_json::Value>>,
11542}
11543
11544#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11546pub struct GetMediaUsageResponse {
11547 #[serde(default, skip_serializing_if = "Option::is_none")]
11548 pub plan: Option<String>,
11549 #[serde(default, skip_serializing_if = "Option::is_none")]
11550 pub images: Option<GetMediaUsageResponseImages>,
11551 #[serde(default, skip_serializing_if = "Option::is_none")]
11552 pub videos: Option<GetMediaUsageResponseVideos>,
11553}
11554
11555#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11557pub struct GetMediaUsageResponseImages {
11558 #[serde(default, skip_serializing_if = "Option::is_none")]
11559 pub monthly_used: Option<i64>,
11560 #[serde(default, skip_serializing_if = "Option::is_none")]
11561 pub daily_used: Option<i64>,
11562 #[serde(default, skip_serializing_if = "Option::is_none")]
11563 pub monthly_limit: Option<i64>,
11564 #[serde(default, skip_serializing_if = "Option::is_none")]
11565 pub daily_limit: Option<i64>,
11566}
11567
11568#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11570pub struct GetMediaUsageResponseVideos {
11571 #[serde(default, skip_serializing_if = "Option::is_none")]
11572 pub monthly_used: Option<i64>,
11573 #[serde(default, skip_serializing_if = "Option::is_none")]
11574 pub monthly_limit: Option<i64>,
11575}
11576
11577#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11579pub struct GetMemoriesByEntityResponse {
11580 #[serde(default, skip_serializing_if = "Option::is_none")]
11581 pub items: Option<Vec<MemoryEntry>>,
11582}
11583
11584#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11586pub struct GetMeResponse {
11587 #[serde(default, skip_serializing_if = "Option::is_none")]
11588 pub user: Option<GetMeResponseUser>,
11589 pub tenant: GetMeResponseTenant,
11590 pub role: String,
11591 pub scopes: Vec<String>,
11592 pub auth_method: GetMeResponseAuthMethod,
11593 pub memberships: Vec<GetMeResponseMembership>,
11594}
11595
11596#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11598pub enum GetMeResponseAuthMethod {
11599 #[default]
11600 #[serde(rename = "api_key")]
11601 APIKey,
11602 #[serde(rename = "cookie")]
11603 Cookie,
11604 #[serde(rename = "jwt")]
11605 JWT,
11606 #[serde(untagged)]
11608 Other(String),
11609}
11610
11611impl GetMeResponseAuthMethod {
11612 pub fn as_str(&self) -> &str {
11614 match self {
11615 Self::APIKey => "api_key",
11616 Self::Cookie => "cookie",
11617 Self::JWT => "jwt",
11618 Self::Other(value) => value.as_str(),
11619 }
11620 }
11621}
11622
11623impl std::fmt::Display for GetMeResponseAuthMethod {
11624 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11625 f.write_str(self.as_str())
11626 }
11627}
11628
11629impl From<&str> for GetMeResponseAuthMethod {
11630 fn from(value: &str) -> Self {
11631 match value {
11632 "api_key" => Self::APIKey,
11633 "cookie" => Self::Cookie,
11634 "jwt" => Self::JWT,
11635 other => Self::Other(other.to_string()),
11636 }
11637 }
11638}
11639
11640#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11642pub struct GetMeResponseMembership {
11643 #[serde(default, skip_serializing_if = "Option::is_none")]
11644 pub tenant_id: Option<String>,
11645 #[serde(default, skip_serializing_if = "Option::is_none")]
11646 pub user_id: Option<String>,
11647}
11648
11649#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11651pub struct GetMeResponseTenant {
11652 pub tenant_id: String,
11653 pub name: String,
11654 pub slug: String,
11655 pub plan: String,
11656}
11657
11658#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11660pub struct GetMeResponseUser {
11661 #[serde(default, skip_serializing_if = "Option::is_none")]
11662 pub user_id: Option<String>,
11663 #[serde(default, skip_serializing_if = "Option::is_none")]
11664 pub email: Option<String>,
11665 #[serde(default, skip_serializing_if = "Option::is_none")]
11666 pub name: Option<String>,
11667 #[serde(default, skip_serializing_if = "Option::is_none")]
11668 pub role: Option<String>,
11669 #[serde(default, skip_serializing_if = "Option::is_none")]
11670 pub status: Option<String>,
11671 #[serde(default, skip_serializing_if = "Option::is_none")]
11672 pub avatar_url: Option<String>,
11673 #[serde(default, skip_serializing_if = "Option::is_none")]
11674 pub last_login_at: Option<String>,
11675 #[serde(default, skip_serializing_if = "Option::is_none")]
11676 pub created_at: Option<String>,
11677}
11678
11679#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11681pub struct GetMfaStatusResponse {
11682 pub enrolled: bool,
11683 pub recovery_remaining: i64,
11684}
11685
11686#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11688pub struct GetMyHeadAgentTemplateResponse {
11689 pub plan: String,
11690 pub recommended: GetMyHeadAgentTemplateResponseRecommended,
11691 pub tiers: Vec<GetMyHeadAgentTemplateResponseTier>,
11692}
11693
11694#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11696pub enum GetMyHeadAgentTemplateResponseRecommended {
11697 #[default]
11698 #[serde(rename = "basic")]
11699 Basic,
11700 #[serde(rename = "standard")]
11701 Standard,
11702 #[serde(rename = "full")]
11703 Full,
11704 #[serde(untagged)]
11706 Other(String),
11707}
11708
11709impl GetMyHeadAgentTemplateResponseRecommended {
11710 pub fn as_str(&self) -> &str {
11712 match self {
11713 Self::Basic => "basic",
11714 Self::Standard => "standard",
11715 Self::Full => "full",
11716 Self::Other(value) => value.as_str(),
11717 }
11718 }
11719}
11720
11721impl std::fmt::Display for GetMyHeadAgentTemplateResponseRecommended {
11722 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11723 f.write_str(self.as_str())
11724 }
11725}
11726
11727impl From<&str> for GetMyHeadAgentTemplateResponseRecommended {
11728 fn from(value: &str) -> Self {
11729 match value {
11730 "basic" => Self::Basic,
11731 "standard" => Self::Standard,
11732 "full" => Self::Full,
11733 other => Self::Other(other.to_string()),
11734 }
11735 }
11736}
11737
11738#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11740pub struct GetMyHeadAgentTemplateResponseTier {
11741 #[serde(default, skip_serializing_if = "Option::is_none")]
11742 pub tier: Option<GetMyHeadAgentTemplateResponseTierTier>,
11743 #[serde(default, skip_serializing_if = "Option::is_none")]
11744 pub available: Option<bool>,
11745 #[serde(default, skip_serializing_if = "Option::is_none")]
11746 pub install_specs: Option<Vec<GetMyHeadAgentTemplateResponseTierInstallSpec>>,
11747 #[serde(default, skip_serializing_if = "Option::is_none")]
11748 pub auto_approve_tools: Option<Vec<String>>,
11749 #[serde(default, skip_serializing_if = "Option::is_none")]
11750 pub total_tool_count: Option<i64>,
11751}
11752
11753#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11755pub struct GetMyHeadAgentTemplateResponseTierInstallSpec {
11756 pub spec_id: String,
11757}
11758
11759#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11761pub struct GetMyHeadAgentTemplateResponseTierTier {
11762 #[serde(default, skip_serializing_if = "Option::is_none")]
11763 pub id: Option<GetMyHeadAgentTemplateResponseRecommended>,
11764 #[serde(default, skip_serializing_if = "Option::is_none")]
11765 pub name: Option<String>,
11766 #[serde(default, skip_serializing_if = "Option::is_none")]
11767 pub description: Option<String>,
11768 #[serde(default, skip_serializing_if = "Option::is_none")]
11769 pub required_plan: Option<GetMyHeadAgentTemplateResponseTierTierRequiredPlan>,
11770 #[serde(default, skip_serializing_if = "Option::is_none")]
11771 pub spec_ids: Option<Vec<String>>,
11772}
11773
11774#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11776pub enum GetMyHeadAgentTemplateResponseTierTierRequiredPlan {
11777 #[default]
11778 #[serde(rename = "free")]
11779 Free,
11780 #[serde(rename = "starter")]
11781 Starter,
11782 #[serde(rename = "pro")]
11783 Pro,
11784 #[serde(untagged)]
11786 Other(String),
11787}
11788
11789impl GetMyHeadAgentTemplateResponseTierTierRequiredPlan {
11790 pub fn as_str(&self) -> &str {
11792 match self {
11793 Self::Free => "free",
11794 Self::Starter => "starter",
11795 Self::Pro => "pro",
11796 Self::Other(value) => value.as_str(),
11797 }
11798 }
11799}
11800
11801impl std::fmt::Display for GetMyHeadAgentTemplateResponseTierTierRequiredPlan {
11802 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11803 f.write_str(self.as_str())
11804 }
11805}
11806
11807impl From<&str> for GetMyHeadAgentTemplateResponseTierTierRequiredPlan {
11808 fn from(value: &str) -> Self {
11809 match value {
11810 "free" => Self::Free,
11811 "starter" => Self::Starter,
11812 "pro" => Self::Pro,
11813 other => Self::Other(other.to_string()),
11814 }
11815 }
11816}
11817
11818#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11820pub struct GetPromoStateResponse {
11821 #[serde(default)]
11822 pub applied_code: Option<GetPromoStateResponseAppliedCode>,
11823 pub bonus_tokens_balance: i64,
11824 pub owned_codes: Vec<GetPromoStateResponseOwnedCode>,
11827}
11828
11829#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11831pub struct GetPromoStateResponseAppliedCode {
11832 #[serde(default, skip_serializing_if = "Option::is_none")]
11833 pub code: Option<String>,
11834 #[serde(default, skip_serializing_if = "Option::is_none")]
11835 pub redeemed_at: Option<String>,
11836 #[serde(default, skip_serializing_if = "Option::is_none")]
11837 pub discount_percent: Option<f64>,
11838 #[serde(default, skip_serializing_if = "Option::is_none")]
11839 pub rewarded: Option<bool>,
11840}
11841
11842#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11844pub struct GetPromoStateResponseOwnedCode {
11845 #[serde(default, skip_serializing_if = "Option::is_none")]
11846 pub code: Option<String>,
11847 #[serde(default, skip_serializing_if = "Option::is_none")]
11848 pub program: Option<String>,
11849 #[serde(default, skip_serializing_if = "Option::is_none")]
11850 pub active: Option<bool>,
11851 #[serde(default, skip_serializing_if = "Option::is_none")]
11852 pub uses: Option<i64>,
11853 #[serde(default, skip_serializing_if = "Option::is_none")]
11854 pub max_uses: Option<i64>,
11855 #[serde(default, skip_serializing_if = "Option::is_none")]
11856 pub reward_tokens_per_subscription: Option<i64>,
11857 #[serde(default, skip_serializing_if = "Option::is_none")]
11858 pub subscriber_bonus_tokens: Option<i64>,
11859 #[serde(default, skip_serializing_if = "Option::is_none")]
11860 pub discount_percent: Option<f64>,
11861 #[serde(default, skip_serializing_if = "Option::is_none")]
11862 pub total_rewarded_tokens: Option<i64>,
11863 #[serde(default, skip_serializing_if = "Option::is_none")]
11864 pub rewarded_subscriptions: Option<i64>,
11865}
11866
11867#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11869pub struct GetPublicBlogPostResponse {
11870 pub post: PublicBlogPost,
11871}
11872
11873#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11875pub struct GetPublicFeaturedAgentResponse {
11876 #[serde(default, skip_serializing_if = "Option::is_none")]
11877 pub agent: Option<serde_json::Map<String, serde_json::Value>>,
11878}
11879
11880#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11882pub struct GetPublicStateResponse {
11883 #[serde(default, skip_serializing_if = "Option::is_none")]
11884 pub marketplace: Option<serde_json::Map<String, serde_json::Value>>,
11885 #[serde(default, skip_serializing_if = "Option::is_none")]
11886 pub governance: Option<serde_json::Map<String, serde_json::Value>>,
11887 #[serde(default, skip_serializing_if = "Option::is_none")]
11888 pub plan: Option<String>,
11889 #[serde(default, skip_serializing_if = "Option::is_none")]
11890 pub branding: Option<serde_json::Map<String, serde_json::Value>>,
11891 pub category: String,
11892 #[serde(default, skip_serializing_if = "Option::is_none")]
11893 pub description: Option<String>,
11894 #[serde(default, skip_serializing_if = "Option::is_none")]
11895 pub logo_url: Option<String>,
11896 pub name: String,
11897 #[serde(default, skip_serializing_if = "Option::is_none")]
11898 pub published_at: Option<String>,
11899 pub short_description: String,
11900 pub slug: String,
11901 #[serde(default, skip_serializing_if = "Option::is_none")]
11902 pub social_links: Option<TenantSocialLinks>,
11903 #[serde(default, skip_serializing_if = "Option::is_none")]
11904 pub stats: Option<serde_json::Map<String, serde_json::Value>>,
11905 pub tags: Vec<String>,
11906 pub tenant_id: String,
11907 pub agents: Vec<PublicStateAgent>,
11909}
11910
11911#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11913pub struct GetReadyResponse {
11914 #[serde(default, skip_serializing_if = "Option::is_none")]
11915 pub status: Option<GetReadyResponseStatus>,
11916 #[serde(default, skip_serializing_if = "Option::is_none")]
11917 pub timestamp: Option<String>,
11918 #[serde(default, skip_serializing_if = "Option::is_none")]
11919 pub checks: Option<GetReadyResponseChecks>,
11920}
11921
11922#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11924pub struct GetReadyResponseChecks {
11925 #[serde(default, skip_serializing_if = "Option::is_none")]
11926 pub kv: Option<String>,
11927}
11928
11929#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
11931pub enum GetReadyResponseStatus {
11932 #[default]
11933 #[serde(rename = "ready")]
11934 Ready,
11935 #[serde(rename = "not_ready")]
11936 NotReady,
11937 #[serde(untagged)]
11939 Other(String),
11940}
11941
11942impl GetReadyResponseStatus {
11943 pub fn as_str(&self) -> &str {
11945 match self {
11946 Self::Ready => "ready",
11947 Self::NotReady => "not_ready",
11948 Self::Other(value) => value.as_str(),
11949 }
11950 }
11951}
11952
11953impl std::fmt::Display for GetReadyResponseStatus {
11954 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11955 f.write_str(self.as_str())
11956 }
11957}
11958
11959impl From<&str> for GetReadyResponseStatus {
11960 fn from(value: &str) -> Self {
11961 match value {
11962 "ready" => Self::Ready,
11963 "not_ready" => Self::NotReady,
11964 other => Self::Other(other.to_string()),
11965 }
11966 }
11967}
11968
11969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11971pub struct GetReconciliationResponse {
11972 #[serde(default)]
11973 pub reconciliation: Option<CostReconciliationResult>,
11974 pub period: String,
11975 #[serde(default, skip_serializing_if = "Option::is_none")]
11977 pub message: Option<String>,
11978}
11979
11980#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11982pub struct GetRegistrationStatusResponse {
11983 pub registration_open: bool,
11984}
11985
11986#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11988pub struct GetResponseResponse {
11989 pub id: String,
11990 pub object: GetResponseResponseObject,
11991 pub output: Vec<GetResponseResponseOutputItem>,
11992 pub usage: GetResponseResponseUsage,
11993 pub model: String,
11995 pub created_at: i64,
11997}
11998
11999#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12001pub enum GetResponseResponseObject {
12002 #[default]
12003 #[serde(rename = "response")]
12004 Response,
12005 #[serde(untagged)]
12007 Other(String),
12008}
12009
12010impl GetResponseResponseObject {
12011 pub fn as_str(&self) -> &str {
12013 match self {
12014 Self::Response => "response",
12015 Self::Other(value) => value.as_str(),
12016 }
12017 }
12018}
12019
12020impl std::fmt::Display for GetResponseResponseObject {
12021 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12022 f.write_str(self.as_str())
12023 }
12024}
12025
12026impl From<&str> for GetResponseResponseObject {
12027 fn from(value: &str) -> Self {
12028 match value {
12029 "response" => Self::Response,
12030 other => Self::Other(other.to_string()),
12031 }
12032 }
12033}
12034
12035#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12037pub struct GetResponseResponseOutputItem {
12038 pub r#type: ResponsesOutputItemType,
12039 pub role: OpenAiChatCompletionChoiceMessageRole,
12040 pub content: Vec<GetResponseResponseOutputItemContentItem>,
12041}
12042
12043#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12045pub struct GetResponseResponseOutputItemContentItem {
12046 pub r#type: ResponsesOutputItemContentItemType,
12047 pub text: String,
12048}
12049
12050#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12052pub struct GetResponseResponseUsage {
12053 pub input_tokens: i64,
12054 pub output_tokens: i64,
12055 pub total_tokens: i64,
12056}
12057
12058#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12060pub struct GetRootAgentResponse {
12061 #[serde(default)]
12063 pub root_agent_id: Option<String>,
12064}
12065
12066#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12068pub struct GetRunAuditLogResponse {
12069 pub run_id: String,
12070 pub audit_log: Vec<AuditLogEntry>,
12071 pub total: i64,
12072}
12073
12074#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12076pub enum GetRunChangedFiles {
12077 #[default]
12078 #[serde(rename = "true")]
12079 True,
12080 #[serde(untagged)]
12082 Other(String),
12083}
12084
12085impl GetRunChangedFiles {
12086 pub fn as_str(&self) -> &str {
12088 match self {
12089 Self::True => "true",
12090 Self::Other(value) => value.as_str(),
12091 }
12092 }
12093}
12094
12095impl std::fmt::Display for GetRunChangedFiles {
12096 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12097 f.write_str(self.as_str())
12098 }
12099}
12100
12101impl From<&str> for GetRunChangedFiles {
12102 fn from(value: &str) -> Self {
12103 match value {
12104 "true" => Self::True,
12105 other => Self::Other(other.to_string()),
12106 }
12107 }
12108}
12109
12110#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12112pub struct GetRunQueuePositionResponse {
12113 #[serde(default, skip_serializing_if = "Option::is_none")]
12114 pub run_id: Option<String>,
12115 #[serde(default, skip_serializing_if = "Option::is_none")]
12117 pub queue_position: Option<i64>,
12118}
12119
12120#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12122pub struct GetRunResponse {
12123 #[serde(default, skip_serializing_if = "Option::is_none")]
12128 pub execution_mode: Option<RunExecutionMode>,
12129 pub run_id: String,
12130 pub tenant_id: String,
12131 pub agent_id: String,
12132 #[serde(default, skip_serializing_if = "Option::is_none")]
12133 pub session_id: Option<String>,
12134 pub status: RunStatus,
12135 #[serde(default, skip_serializing_if = "Option::is_none")]
12136 pub input: Option<serde_json::Map<String, serde_json::Value>>,
12137 #[serde(default, skip_serializing_if = "Option::is_none")]
12144 pub output: Option<RunOutput>,
12145 #[serde(default, skip_serializing_if = "Option::is_none")]
12146 pub metrics: Option<RunMetrics>,
12147 #[serde(default, skip_serializing_if = "Option::is_none")]
12150 pub error: Option<String>,
12151 #[serde(default, skip_serializing_if = "Option::is_none")]
12158 pub error_code: Option<String>,
12159 #[serde(default, skip_serializing_if = "Option::is_none")]
12164 pub error_details: Option<serde_json::Map<String, serde_json::Value>>,
12165 #[serde(default, skip_serializing_if = "Option::is_none")]
12169 pub approvals: Option<Vec<GetRunResponseApproval>>,
12170 pub created_at: String,
12171 #[serde(default, skip_serializing_if = "Option::is_none")]
12172 pub started_at: Option<String>,
12173 #[serde(default, skip_serializing_if = "Option::is_none")]
12174 pub completed_at: Option<String>,
12175 #[serde(default, skip_serializing_if = "Option::is_none")]
12177 pub team_run_id: Option<String>,
12178 #[serde(default, skip_serializing_if = "Option::is_none")]
12180 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
12181 #[serde(default, skip_serializing_if = "Option::is_none")]
12183 pub step_seq: Option<i64>,
12184 #[serde(default, skip_serializing_if = "Option::is_none")]
12186 pub artifacts: Option<Vec<Artifact>>,
12187 #[serde(default, skip_serializing_if = "Option::is_none")]
12189 pub resource_limits: Option<GetRunResponseResourceLimits>,
12190 #[serde(default, skip_serializing_if = "Option::is_none")]
12200 pub changed_files: Option<Vec<String>>,
12201 #[serde(default, skip_serializing_if = "Option::is_none")]
12205 pub pending_approvals: Option<Vec<PendingApproval>>,
12206 #[serde(default, skip_serializing_if = "Option::is_none")]
12212 pub pending_input: Option<GetRunResponsePendingInput>,
12213}
12214
12215#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12217pub struct GetRunResponseApproval {
12218 pub decision: RunApprovalDecision,
12219 pub tools: Vec<String>,
12221 pub decided_at: String,
12222 #[serde(default, skip_serializing_if = "Option::is_none")]
12224 pub decided_by: Option<String>,
12225 #[serde(default, skip_serializing_if = "Option::is_none")]
12227 pub reason: Option<String>,
12228}
12229
12230#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12236pub struct GetRunResponsePendingInput {
12237 #[serde(default, skip_serializing_if = "Option::is_none")]
12238 pub question: Option<String>,
12239 #[serde(default, skip_serializing_if = "Option::is_none")]
12240 pub context: Option<String>,
12241 #[serde(default, skip_serializing_if = "Option::is_none")]
12242 pub tool_call_id: Option<String>,
12243 #[serde(default, skip_serializing_if = "Option::is_none")]
12244 pub options: Option<Vec<String>>,
12245}
12246
12247#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12249pub struct GetRunResponseResourceLimits {
12250 #[serde(default, skip_serializing_if = "Option::is_none")]
12251 pub max_duration_ms: Option<i64>,
12252 #[serde(default, skip_serializing_if = "Option::is_none")]
12253 pub max_steps: Option<i64>,
12254 #[serde(default, skip_serializing_if = "Option::is_none")]
12255 pub max_tool_calls: Option<i64>,
12256 #[serde(default, skip_serializing_if = "Option::is_none")]
12257 pub max_tokens_per_run: Option<i64>,
12258}
12259
12260#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12262pub struct GetRunStepsResponse {
12263 pub steps: Vec<RunStep>,
12264 pub total: i64,
12265}
12266
12267#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12269pub struct GetRuntimeConfigResponse {
12270 #[serde(default, skip_serializing_if = "Option::is_none")]
12271 pub runtime: Option<serde_json::Map<String, serde_json::Value>>,
12272}
12273
12274#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12276pub struct GetSessionAuditLogResponse {
12277 pub session_id: String,
12278 pub audit_log: Vec<AuditLogEntry>,
12279 pub total: i64,
12280}
12281
12282#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12284pub struct GetSessionMessagesResponse {
12285 pub messages: Vec<ConversationEntry>,
12288 pub items: Vec<ConversationEntry>,
12291 pub total: i64,
12292 #[serde(default, skip_serializing_if = "Option::is_none")]
12293 pub active_run_id: Option<String>,
12294 #[serde(default, skip_serializing_if = "Option::is_none")]
12295 pub active_run_status: Option<String>,
12296 #[serde(default, skip_serializing_if = "Option::is_none")]
12297 pub active_run_partial_content: Option<String>,
12298}
12299
12300#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12302pub struct GetSessionShareResponse {
12303 #[serde(default, skip_serializing_if = "Option::is_none")]
12304 pub share_url: Option<String>,
12305 #[serde(default, skip_serializing_if = "Option::is_none")]
12306 pub role: Option<String>,
12307 #[serde(default, skip_serializing_if = "Option::is_none")]
12308 pub expires_at: Option<String>,
12309}
12310
12311#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12313pub struct GetSquadChatHistoryResponse {
12314 #[serde(default, skip_serializing_if = "Option::is_none")]
12315 pub team_id: Option<String>,
12316 #[serde(default, skip_serializing_if = "Option::is_none")]
12317 pub conversation_history: Option<Vec<TeamChatTurn>>,
12318 #[serde(default, skip_serializing_if = "Option::is_none")]
12319 pub total: Option<i64>,
12320 #[serde(default, skip_serializing_if = "Option::is_none")]
12321 pub chat_state: Option<serde_json::Map<String, serde_json::Value>>,
12322}
12323
12324#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12326pub struct GetSquadGraphResponse {
12327 #[serde(default, skip_serializing_if = "Option::is_none")]
12328 pub nodes: Option<Vec<TeamGraphNode>>,
12329 #[serde(default, skip_serializing_if = "Option::is_none")]
12330 pub edges: Option<Vec<TeamGraphEdge>>,
12331}
12332
12333#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12335pub struct GetSquadRunMessagesResponse {
12336 pub team_id: String,
12337 pub team_run_id: String,
12338 pub messages: Vec<TeamRunChatTurn>,
12339 pub protocol_messages: Vec<TeamMessage>,
12340 pub total: i64,
12341}
12342
12343#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12345pub struct GetTeamChatHistoryResponse {
12346 #[serde(default, skip_serializing_if = "Option::is_none")]
12347 pub team_id: Option<String>,
12348 #[serde(default, skip_serializing_if = "Option::is_none")]
12349 pub conversation_history: Option<Vec<TeamChatTurn>>,
12350 #[serde(default, skip_serializing_if = "Option::is_none")]
12351 pub total: Option<i64>,
12352 #[serde(default, skip_serializing_if = "Option::is_none")]
12353 pub chat_state: Option<serde_json::Map<String, serde_json::Value>>,
12354}
12355
12356#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12358pub struct GetTeamGraphResponse {
12359 #[serde(default, skip_serializing_if = "Option::is_none")]
12360 pub nodes: Option<Vec<TeamGraphNode>>,
12361 #[serde(default, skip_serializing_if = "Option::is_none")]
12362 pub edges: Option<Vec<TeamGraphEdge>>,
12363}
12364
12365#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12367pub struct GetTeamRunMessagesResponse {
12368 pub team_id: String,
12369 pub team_run_id: String,
12370 pub messages: Vec<TeamRunChatTurn>,
12371 pub protocol_messages: Vec<TeamMessage>,
12372 pub total: i64,
12373}
12374
12375#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12377pub struct GetTenantDomainHealthResponse {
12378 pub domain: String,
12380 pub created_at: String,
12381 #[serde(default, skip_serializing_if = "Option::is_none")]
12382 pub updated_at: Option<String>,
12383 #[serde(default, skip_serializing_if = "Option::is_none")]
12384 pub dns: Option<DomainDnsLifecycle>,
12385 #[serde(default, skip_serializing_if = "Option::is_none")]
12386 pub cert: Option<DomainCertLifecycle>,
12387}
12388
12389#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12391pub struct GetTenantUsageResponse {
12392 #[serde(default, skip_serializing_if = "Option::is_none")]
12393 pub tenant_id: Option<String>,
12394 #[serde(default, skip_serializing_if = "Option::is_none")]
12395 pub period: Option<String>,
12396 #[serde(default, skip_serializing_if = "Option::is_none")]
12397 pub usage: Option<serde_json::Map<String, serde_json::Value>>,
12398}
12399
12400#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12402pub struct GetUnreadCountResponse {
12403 pub count: i64,
12404 pub unread_count: i64,
12405 #[serde(rename = "unreadCount")]
12409 pub unread_count_: i64,
12410}
12411
12412#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12414pub enum GetUsageTimeseriesMetric {
12415 #[default]
12416 #[serde(rename = "runs")]
12417 Runs,
12418 #[serde(rename = "tokens")]
12419 Tokens,
12420 #[serde(rename = "cost")]
12421 Cost,
12422 #[serde(untagged)]
12424 Other(String),
12425}
12426
12427impl GetUsageTimeseriesMetric {
12428 pub fn as_str(&self) -> &str {
12430 match self {
12431 Self::Runs => "runs",
12432 Self::Tokens => "tokens",
12433 Self::Cost => "cost",
12434 Self::Other(value) => value.as_str(),
12435 }
12436 }
12437}
12438
12439impl std::fmt::Display for GetUsageTimeseriesMetric {
12440 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12441 f.write_str(self.as_str())
12442 }
12443}
12444
12445impl From<&str> for GetUsageTimeseriesMetric {
12446 fn from(value: &str) -> Self {
12447 match value {
12448 "runs" => Self::Runs,
12449 "tokens" => Self::Tokens,
12450 "cost" => Self::Cost,
12451 other => Self::Other(other.to_string()),
12452 }
12453 }
12454}
12455
12456#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12458pub struct GetUsageTimeseriesResponse {
12459 #[serde(default, skip_serializing_if = "Option::is_none")]
12460 pub plan: Option<String>,
12461 #[serde(default, skip_serializing_if = "Option::is_none")]
12462 pub data: Option<Vec<GetUsageTimeseriesResponseDataItem>>,
12463}
12464
12465#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12467pub struct GetUsageTimeseriesResponseDataItem {
12468 pub label: String,
12471 pub value: f64,
12472}
12473
12474#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12476pub struct Goal {
12477 pub goal_id: String,
12478 pub tenant_id: String,
12479 pub agent_id: String,
12480 #[serde(default, skip_serializing_if = "Option::is_none")]
12481 pub title: Option<String>,
12482 #[serde(default, skip_serializing_if = "Option::is_none")]
12483 pub description: Option<String>,
12484 #[serde(default, skip_serializing_if = "Option::is_none")]
12485 pub rationale: Option<String>,
12486 #[serde(default, skip_serializing_if = "Option::is_none")]
12488 pub alignment_justification: Option<String>,
12489 #[serde(default, skip_serializing_if = "Option::is_none")]
12490 pub expected_impact: Option<String>,
12491 #[serde(default, skip_serializing_if = "Option::is_none")]
12492 pub resource_estimate_usd: Option<f64>,
12493 pub status: GoalStatus,
12494 #[serde(default, skip_serializing_if = "Option::is_none")]
12496 pub proposal_id: Option<String>,
12497 #[serde(default, skip_serializing_if = "Option::is_none")]
12498 pub constitution_check_passed: Option<bool>,
12499 pub created_at: String,
12500 #[serde(default, skip_serializing_if = "Option::is_none")]
12501 pub updated_at: Option<String>,
12502}
12503
12504#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12506pub enum GoalStatus {
12507 #[default]
12508 #[serde(rename = "proposed")]
12509 Proposed,
12510 #[serde(rename = "checking")]
12511 Checking,
12512 #[serde(rename = "voting")]
12513 Voting,
12514 #[serde(rename = "approved")]
12515 Approved,
12516 #[serde(rename = "rejected")]
12517 Rejected,
12518 #[serde(rename = "active")]
12519 Active,
12520 #[serde(rename = "completed")]
12521 Completed,
12522 #[serde(untagged)]
12524 Other(String),
12525}
12526
12527impl GoalStatus {
12528 pub fn as_str(&self) -> &str {
12530 match self {
12531 Self::Proposed => "proposed",
12532 Self::Checking => "checking",
12533 Self::Voting => "voting",
12534 Self::Approved => "approved",
12535 Self::Rejected => "rejected",
12536 Self::Active => "active",
12537 Self::Completed => "completed",
12538 Self::Other(value) => value.as_str(),
12539 }
12540 }
12541}
12542
12543impl std::fmt::Display for GoalStatus {
12544 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12545 f.write_str(self.as_str())
12546 }
12547}
12548
12549impl From<&str> for GoalStatus {
12550 fn from(value: &str) -> Self {
12551 match value {
12552 "proposed" => Self::Proposed,
12553 "checking" => Self::Checking,
12554 "voting" => Self::Voting,
12555 "approved" => Self::Approved,
12556 "rejected" => Self::Rejected,
12557 "active" => Self::Active,
12558 "completed" => Self::Completed,
12559 other => Self::Other(other.to_string()),
12560 }
12561 }
12562}
12563
12564#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12566pub struct GoogleOneTapAuthRequest {
12567 pub credential: String,
12569 #[serde(default, skip_serializing_if = "Option::is_none")]
12571 pub device_label: Option<String>,
12572}
12573
12574#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12576pub struct GoogleOneTapAuthResponse {
12577 pub api_key: String,
12578 pub email: String,
12579}
12580
12581#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12583pub struct GovernanceLedgerEntry {
12584 pub seq: i64,
12589 pub action: String,
12591 #[serde(default, skip_serializing_if = "Option::is_none")]
12593 pub category: Option<String>,
12594 #[serde(default, skip_serializing_if = "Option::is_none")]
12595 pub agent_id: Option<String>,
12596 #[serde(default, skip_serializing_if = "Option::is_none")]
12597 pub tenant_id: Option<String>,
12598 #[serde(default, skip_serializing_if = "Option::is_none")]
12600 pub payload: Option<serde_json::Map<String, serde_json::Value>>,
12601 pub timestamp: String,
12602 #[serde(default)]
12604 pub prev_hash: Option<String>,
12605 pub hash: String,
12606}
12607
12608#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12610pub struct GovernanceLedgerHead {
12611 pub seq: i64,
12616 pub hash: String,
12617}
12618
12619#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12621pub struct Guardrail {
12622 pub guardrail_id: String,
12623 pub tenant_id: String,
12624 pub name: String,
12625 pub webhook_url: String,
12626 pub phase: GuardrailConfigItemPhase,
12627 #[serde(default, skip_serializing_if = "Option::is_none")]
12628 pub action: Option<GuardrailAction>,
12629 #[serde(default, skip_serializing_if = "Option::is_none")]
12630 pub timeout_ms: Option<i64>,
12631 #[serde(default, skip_serializing_if = "Option::is_none")]
12632 pub created_at: Option<String>,
12633}
12634
12635#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12637pub enum GuardrailAction {
12638 #[default]
12639 #[serde(rename = "block")]
12640 Block,
12641 #[serde(rename = "redact")]
12642 Redact,
12643 #[serde(rename = "warn")]
12644 Warn,
12645 #[serde(rename = "log")]
12646 Log,
12647 #[serde(untagged)]
12649 Other(String),
12650}
12651
12652impl GuardrailAction {
12653 pub fn as_str(&self) -> &str {
12655 match self {
12656 Self::Block => "block",
12657 Self::Redact => "redact",
12658 Self::Warn => "warn",
12659 Self::Log => "log",
12660 Self::Other(value) => value.as_str(),
12661 }
12662 }
12663}
12664
12665impl std::fmt::Display for GuardrailAction {
12666 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12667 f.write_str(self.as_str())
12668 }
12669}
12670
12671impl From<&str> for GuardrailAction {
12672 fn from(value: &str) -> Self {
12673 match value {
12674 "block" => Self::Block,
12675 "redact" => Self::Redact,
12676 "warn" => Self::Warn,
12677 "log" => Self::Log,
12678 other => Self::Other(other.to_string()),
12679 }
12680 }
12681}
12682
12683#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12685pub struct GuardrailConfigItem {
12686 pub id: String,
12687 pub name: String,
12688 pub description: String,
12689 pub phase: GuardrailConfigItemPhase,
12690 pub default_action: GuardrailConfigItemDefaultAction,
12691 pub enabled: bool,
12692 pub mandatory: bool,
12693 pub source: GuardrailConfigItemSource,
12694}
12695
12696#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12698pub enum GuardrailConfigItemDefaultAction {
12699 #[default]
12700 #[serde(rename = "block")]
12701 Block,
12702 #[serde(rename = "warn")]
12703 Warn,
12704 #[serde(rename = "redact")]
12705 Redact,
12706 #[serde(rename = "log")]
12707 Log,
12708 #[serde(untagged)]
12710 Other(String),
12711}
12712
12713impl GuardrailConfigItemDefaultAction {
12714 pub fn as_str(&self) -> &str {
12716 match self {
12717 Self::Block => "block",
12718 Self::Warn => "warn",
12719 Self::Redact => "redact",
12720 Self::Log => "log",
12721 Self::Other(value) => value.as_str(),
12722 }
12723 }
12724}
12725
12726impl std::fmt::Display for GuardrailConfigItemDefaultAction {
12727 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12728 f.write_str(self.as_str())
12729 }
12730}
12731
12732impl From<&str> for GuardrailConfigItemDefaultAction {
12733 fn from(value: &str) -> Self {
12734 match value {
12735 "block" => Self::Block,
12736 "warn" => Self::Warn,
12737 "redact" => Self::Redact,
12738 "log" => Self::Log,
12739 other => Self::Other(other.to_string()),
12740 }
12741 }
12742}
12743
12744#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12746pub enum GuardrailConfigItemPhase {
12747 #[default]
12748 #[serde(rename = "input")]
12749 Input,
12750 #[serde(rename = "output")]
12751 Output,
12752 #[serde(rename = "both")]
12753 Both,
12754 #[serde(untagged)]
12756 Other(String),
12757}
12758
12759impl GuardrailConfigItemPhase {
12760 pub fn as_str(&self) -> &str {
12762 match self {
12763 Self::Input => "input",
12764 Self::Output => "output",
12765 Self::Both => "both",
12766 Self::Other(value) => value.as_str(),
12767 }
12768 }
12769}
12770
12771impl std::fmt::Display for GuardrailConfigItemPhase {
12772 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12773 f.write_str(self.as_str())
12774 }
12775}
12776
12777impl From<&str> for GuardrailConfigItemPhase {
12778 fn from(value: &str) -> Self {
12779 match value {
12780 "input" => Self::Input,
12781 "output" => Self::Output,
12782 "both" => Self::Both,
12783 other => Self::Other(other.to_string()),
12784 }
12785 }
12786}
12787
12788#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12790pub enum GuardrailConfigItemSource {
12791 #[default]
12792 #[serde(rename = "kv")]
12793 Kv,
12794 #[serde(rename = "default")]
12795 Default,
12796 #[serde(untagged)]
12798 Other(String),
12799}
12800
12801impl GuardrailConfigItemSource {
12802 pub fn as_str(&self) -> &str {
12804 match self {
12805 Self::Kv => "kv",
12806 Self::Default => "default",
12807 Self::Other(value) => value.as_str(),
12808 }
12809 }
12810}
12811
12812impl std::fmt::Display for GuardrailConfigItemSource {
12813 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12814 f.write_str(self.as_str())
12815 }
12816}
12817
12818impl From<&str> for GuardrailConfigItemSource {
12819 fn from(value: &str) -> Self {
12820 match value {
12821 "kv" => Self::Kv,
12822 "default" => Self::Default,
12823 other => Self::Other(other.to_string()),
12824 }
12825 }
12826}
12827
12828#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12830pub struct HandleStripeWebhookRequest {
12831 pub r#type: String,
12832 pub data: serde_json::Map<String, serde_json::Value>,
12833}
12834
12835#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12837pub struct HandleStripeWebhookResponse {
12838 pub received: bool,
12839 pub handled: bool,
12840 #[serde(default, skip_serializing_if = "Option::is_none")]
12841 pub action: Option<String>,
12842 #[serde(default, skip_serializing_if = "Option::is_none")]
12843 pub duplicate: Option<bool>,
12844}
12845
12846#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12848pub struct HealthCheckV1aliasResponse {
12849 #[serde(default, skip_serializing_if = "Option::is_none")]
12850 pub status: Option<GetHealthResponseStatus>,
12851 #[serde(default, skip_serializing_if = "Option::is_none")]
12852 pub timestamp: Option<String>,
12853 #[serde(default, skip_serializing_if = "Option::is_none")]
12854 pub kv_connected: Option<bool>,
12855 #[serde(default, skip_serializing_if = "Option::is_none")]
12856 pub uptime_seconds: Option<f64>,
12857 #[serde(default, skip_serializing_if = "Option::is_none")]
12858 pub version: Option<String>,
12859 #[serde(default, skip_serializing_if = "Option::is_none")]
12860 pub build_sha: Option<String>,
12861 #[serde(default, skip_serializing_if = "Option::is_none")]
12862 pub pending_resumes: Option<i64>,
12863 #[serde(default, skip_serializing_if = "Option::is_none")]
12864 pub runs_queued: Option<i64>,
12865}
12866
12867#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12869pub struct HealthLiveResponse {
12870 #[serde(default, skip_serializing_if = "Option::is_none")]
12871 pub status: Option<String>,
12872}
12873
12874#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12876pub struct HealthzAliasResponse {
12877 #[serde(default, skip_serializing_if = "Option::is_none")]
12878 pub status: Option<String>,
12879}
12880
12881#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12883pub struct HostDroplet {
12884 pub id: i64,
12885 pub name: String,
12886 pub status: String,
12887 pub region: String,
12888 pub size_slug: String,
12889 pub price_monthly_usd: f64,
12890 pub price_hourly_usd: f64,
12891 pub memory_mb: i64,
12892 pub vcpus: i64,
12893 pub disk_gb: i64,
12894 pub created_at: String,
12895}
12896
12897#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12899pub struct ImageProviderList {
12900 #[serde(default, skip_serializing_if = "Option::is_none")]
12901 pub providers: Option<Vec<MediaProvider>>,
12902}
12903
12904#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
12907pub struct ImmutableAuditEvent {
12908 pub event_id: String,
12909 pub timestamp: String,
12910 pub tenant_id: String,
12911 pub actor_agent_id: String,
12912 pub event_type: ImmutableAuditEventEventType,
12913 pub details: serde_json::Map<String, serde_json::Value>,
12914 #[serde(default, skip_serializing_if = "Option::is_none")]
12915 pub target_agent_id: Option<String>,
12916 #[serde(default, skip_serializing_if = "Option::is_none")]
12917 pub target_run_id: Option<String>,
12918 #[serde(default, skip_serializing_if = "Option::is_none")]
12919 pub prev_hmac: Option<String>,
12920 #[serde(default, skip_serializing_if = "Option::is_none")]
12921 pub hmac: Option<String>,
12922}
12923
12924#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
12926pub enum ImmutableAuditEventEventType {
12927 #[default]
12928 #[serde(rename = "agent.created")]
12929 AgentCreated,
12930 #[serde(rename = "agent.updated")]
12931 AgentUpdated,
12932 #[serde(rename = "agent.terminated")]
12933 AgentTerminated,
12934 #[serde(rename = "agent.deposed")]
12935 AgentDeposed,
12936 #[serde(rename = "run.started")]
12937 RunStarted,
12938 #[serde(rename = "run.completed")]
12939 RunCompleted,
12940 #[serde(rename = "run.failed")]
12941 RunFailed,
12942 #[serde(rename = "tool.denied")]
12943 ToolDenied,
12944 #[serde(rename = "security.self_escalation_blocked")]
12945 SecuritySelfEscalationBlocked,
12946 #[serde(rename = "security.opcon_violation")]
12947 SecurityOpconViolation,
12948 #[serde(rename = "security.immutable_field_blocked")]
12949 SecurityImmutableFieldBlocked,
12950 #[serde(rename = "security.rate_limited")]
12951 SecurityRateLimited,
12952 #[serde(rename = "dag.created")]
12953 DagCreated,
12954 #[serde(rename = "dag.step_completed")]
12955 DagStepCompleted,
12956 #[serde(rename = "dag.cancelled")]
12957 DagCancelled,
12958 #[serde(rename = "budget.transfer")]
12959 BudgetTransfer,
12960 #[serde(rename = "budget.exceeded")]
12961 BudgetExceeded,
12962 #[serde(rename = "cascade.failure")]
12963 CascadeFailure,
12964 #[serde(untagged)]
12966 Other(String),
12967}
12968
12969impl ImmutableAuditEventEventType {
12970 pub fn as_str(&self) -> &str {
12972 match self {
12973 Self::AgentCreated => "agent.created",
12974 Self::AgentUpdated => "agent.updated",
12975 Self::AgentTerminated => "agent.terminated",
12976 Self::AgentDeposed => "agent.deposed",
12977 Self::RunStarted => "run.started",
12978 Self::RunCompleted => "run.completed",
12979 Self::RunFailed => "run.failed",
12980 Self::ToolDenied => "tool.denied",
12981 Self::SecuritySelfEscalationBlocked => "security.self_escalation_blocked",
12982 Self::SecurityOpconViolation => "security.opcon_violation",
12983 Self::SecurityImmutableFieldBlocked => "security.immutable_field_blocked",
12984 Self::SecurityRateLimited => "security.rate_limited",
12985 Self::DagCreated => "dag.created",
12986 Self::DagStepCompleted => "dag.step_completed",
12987 Self::DagCancelled => "dag.cancelled",
12988 Self::BudgetTransfer => "budget.transfer",
12989 Self::BudgetExceeded => "budget.exceeded",
12990 Self::CascadeFailure => "cascade.failure",
12991 Self::Other(value) => value.as_str(),
12992 }
12993 }
12994}
12995
12996impl std::fmt::Display for ImmutableAuditEventEventType {
12997 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12998 f.write_str(self.as_str())
12999 }
13000}
13001
13002impl From<&str> for ImmutableAuditEventEventType {
13003 fn from(value: &str) -> Self {
13004 match value {
13005 "agent.created" => Self::AgentCreated,
13006 "agent.updated" => Self::AgentUpdated,
13007 "agent.terminated" => Self::AgentTerminated,
13008 "agent.deposed" => Self::AgentDeposed,
13009 "run.started" => Self::RunStarted,
13010 "run.completed" => Self::RunCompleted,
13011 "run.failed" => Self::RunFailed,
13012 "tool.denied" => Self::ToolDenied,
13013 "security.self_escalation_blocked" => Self::SecuritySelfEscalationBlocked,
13014 "security.opcon_violation" => Self::SecurityOpconViolation,
13015 "security.immutable_field_blocked" => Self::SecurityImmutableFieldBlocked,
13016 "security.rate_limited" => Self::SecurityRateLimited,
13017 "dag.created" => Self::DagCreated,
13018 "dag.step_completed" => Self::DagStepCompleted,
13019 "dag.cancelled" => Self::DagCancelled,
13020 "budget.transfer" => Self::BudgetTransfer,
13021 "budget.exceeded" => Self::BudgetExceeded,
13022 "cascade.failure" => Self::CascadeFailure,
13023 other => Self::Other(other.to_string()),
13024 }
13025 }
13026}
13027
13028#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13030pub struct ImportAdminConfigRequest {
13031 #[serde(default, skip_serializing_if = "Option::is_none")]
13032 pub source: Option<String>,
13033 pub sections: serde_json::Map<String, serde_json::Value>,
13034}
13035
13036#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13038pub struct ImportAdminConfigResponse {
13039 pub imported: bool,
13040 pub applied: Vec<String>,
13041 pub skipped: Vec<String>,
13042 pub applied_count: i64,
13043 pub skipped_count: i64,
13044}
13045
13046#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13048pub struct ImportAgentMemoryRequest {
13049 #[serde(default, skip_serializing_if = "Option::is_none")]
13050 pub entries: Option<Vec<MemoryImportEntry>>,
13051 #[serde(default, skip_serializing_if = "Option::is_none")]
13052 pub agents: Option<Vec<ImportAgentMemoryRequestAgent>>,
13053}
13054
13055#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13057pub struct ImportAgentMemoryRequestAgent {
13058 #[serde(default, skip_serializing_if = "Option::is_none")]
13059 pub agent_id: Option<String>,
13060 #[serde(default, skip_serializing_if = "Option::is_none")]
13061 pub agent_name: Option<String>,
13062 pub entries: Vec<MemoryImportEntry>,
13063}
13064
13065#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13067pub struct ImportAgentMemoryResponse {
13068 pub imported: bool,
13069 pub agent_id: String,
13070 pub offered: i64,
13072 pub added: i64,
13074 pub duplicates: i64,
13076}
13077
13078#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13080pub struct ImportDataExplorerRequest {
13081 pub file: FilePart,
13082}
13083
13084#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13086pub struct ImportDataExplorerResponse {
13087 pub success: bool,
13088 pub imported: i64,
13089 pub skipped: i64,
13090 pub refused_sensitive: i64,
13093 pub errors: Vec<String>,
13094 pub total_lines: i64,
13095}
13096
13097#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13100pub struct ImprovementProposal {
13101 pub proposal_id: String,
13102 pub tenant_id: String,
13103 pub agent_id: String,
13104 pub version: i64,
13106 pub r#type: ImprovementProposalType,
13107 #[serde(default, skip_serializing_if = "Option::is_none")]
13110 pub title: Option<String>,
13111 #[serde(default, skip_serializing_if = "Option::is_none")]
13112 pub description: Option<String>,
13113 #[serde(default, skip_serializing_if = "Option::is_none")]
13114 pub rationale: Option<String>,
13115 #[serde(default, skip_serializing_if = "Option::is_none")]
13117 pub failed_run_ids: Option<Vec<String>>,
13118 #[serde(default, skip_serializing_if = "Option::is_none")]
13121 pub changes: Option<serde_json::Map<String, serde_json::Value>>,
13122 #[serde(default, skip_serializing_if = "Option::is_none")]
13123 pub baseline_success_rate: Option<f64>,
13124 #[serde(default, skip_serializing_if = "Option::is_none")]
13126 pub sandbox_success_rate: Option<f64>,
13127 pub status: ImprovementProposalStatus,
13128 #[serde(default, skip_serializing_if = "Option::is_none")]
13130 pub vote_proposal_id: Option<String>,
13131 pub created_at: String,
13132 #[serde(default, skip_serializing_if = "Option::is_none")]
13133 pub updated_at: Option<String>,
13134}
13135
13136#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13138pub enum ImprovementProposalStatus {
13139 #[default]
13140 #[serde(rename = "proposed")]
13141 Proposed,
13142 #[serde(rename = "arbiter_review")]
13143 ArbiterReview,
13144 #[serde(rename = "voting")]
13145 Voting,
13146 #[serde(rename = "sandbox_testing")]
13147 SandboxTesting,
13148 #[serde(rename = "approved")]
13149 Approved,
13150 #[serde(rename = "applied")]
13151 Applied,
13152 #[serde(rename = "rejected")]
13153 Rejected,
13154 #[serde(untagged)]
13156 Other(String),
13157}
13158
13159impl ImprovementProposalStatus {
13160 pub fn as_str(&self) -> &str {
13162 match self {
13163 Self::Proposed => "proposed",
13164 Self::ArbiterReview => "arbiter_review",
13165 Self::Voting => "voting",
13166 Self::SandboxTesting => "sandbox_testing",
13167 Self::Approved => "approved",
13168 Self::Applied => "applied",
13169 Self::Rejected => "rejected",
13170 Self::Other(value) => value.as_str(),
13171 }
13172 }
13173}
13174
13175impl std::fmt::Display for ImprovementProposalStatus {
13176 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13177 f.write_str(self.as_str())
13178 }
13179}
13180
13181impl From<&str> for ImprovementProposalStatus {
13182 fn from(value: &str) -> Self {
13183 match value {
13184 "proposed" => Self::Proposed,
13185 "arbiter_review" => Self::ArbiterReview,
13186 "voting" => Self::Voting,
13187 "sandbox_testing" => Self::SandboxTesting,
13188 "approved" => Self::Approved,
13189 "applied" => Self::Applied,
13190 "rejected" => Self::Rejected,
13191 other => Self::Other(other.to_string()),
13192 }
13193 }
13194}
13195
13196#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13198pub enum ImprovementProposalType {
13199 #[default]
13200 #[serde(rename = "prompt_change")]
13201 PromptChange,
13202 #[serde(rename = "tool_addition")]
13203 ToolAddition,
13204 #[serde(rename = "tool_removal")]
13205 ToolRemoval,
13206 #[serde(rename = "model_change")]
13207 ModelChange,
13208 #[serde(rename = "parameter_tuning")]
13209 ParameterTuning,
13210 #[serde(rename = "skill_addition")]
13211 SkillAddition,
13212 #[serde(untagged)]
13214 Other(String),
13215}
13216
13217impl ImprovementProposalType {
13218 pub fn as_str(&self) -> &str {
13220 match self {
13221 Self::PromptChange => "prompt_change",
13222 Self::ToolAddition => "tool_addition",
13223 Self::ToolRemoval => "tool_removal",
13224 Self::ModelChange => "model_change",
13225 Self::ParameterTuning => "parameter_tuning",
13226 Self::SkillAddition => "skill_addition",
13227 Self::Other(value) => value.as_str(),
13228 }
13229 }
13230}
13231
13232impl std::fmt::Display for ImprovementProposalType {
13233 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13234 f.write_str(self.as_str())
13235 }
13236}
13237
13238impl From<&str> for ImprovementProposalType {
13239 fn from(value: &str) -> Self {
13240 match value {
13241 "prompt_change" => Self::PromptChange,
13242 "tool_addition" => Self::ToolAddition,
13243 "tool_removal" => Self::ToolRemoval,
13244 "model_change" => Self::ModelChange,
13245 "parameter_tuning" => Self::ParameterTuning,
13246 "skill_addition" => Self::SkillAddition,
13247 other => Self::Other(other.to_string()),
13248 }
13249 }
13250}
13251
13252#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13254pub struct InboxItem {
13255 pub id: String,
13256 pub kind: InboxItemKind,
13257 pub run_id: String,
13258 pub agent_id: String,
13259 pub agent_name: String,
13260 #[serde(default)]
13261 pub session_id: Option<String>,
13262 pub status: String,
13263 #[serde(default)]
13264 pub created_at: Option<String>,
13265 pub summary: String,
13267 pub detail: String,
13270 pub options: Vec<String>,
13272 #[serde(default, skip_serializing_if = "Option::is_none")]
13276 pub tools: Option<Vec<InboxItemTool>>,
13277}
13278
13279#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13281pub enum InboxItemKind {
13282 #[default]
13283 #[serde(rename = "approval")]
13284 Approval,
13285 #[serde(rename = "input")]
13286 Input,
13287 #[serde(rename = "paused")]
13288 Paused,
13289 #[serde(rename = "failed")]
13290 Failed,
13291 #[serde(untagged)]
13293 Other(String),
13294}
13295
13296impl InboxItemKind {
13297 pub fn as_str(&self) -> &str {
13299 match self {
13300 Self::Approval => "approval",
13301 Self::Input => "input",
13302 Self::Paused => "paused",
13303 Self::Failed => "failed",
13304 Self::Other(value) => value.as_str(),
13305 }
13306 }
13307}
13308
13309impl std::fmt::Display for InboxItemKind {
13310 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13311 f.write_str(self.as_str())
13312 }
13313}
13314
13315impl From<&str> for InboxItemKind {
13316 fn from(value: &str) -> Self {
13317 match value {
13318 "approval" => Self::Approval,
13319 "input" => Self::Input,
13320 "paused" => Self::Paused,
13321 "failed" => Self::Failed,
13322 other => Self::Other(other.to_string()),
13323 }
13324 }
13325}
13326
13327#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13329pub struct InboxItemTool {
13330 pub name: String,
13331 pub count: i64,
13332}
13333
13334#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13336pub struct IngestKbDocumentRequest {
13337 #[serde(default, skip_serializing_if = "Option::is_none")]
13338 pub file_id: Option<String>,
13339 #[serde(default, skip_serializing_if = "Option::is_none")]
13340 pub content: Option<String>,
13341 #[serde(default, skip_serializing_if = "Option::is_none")]
13342 pub filename: Option<String>,
13343}
13344
13345#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13347pub struct IngestKbDocumentResponse {
13348 #[serde(default, skip_serializing_if = "Option::is_none")]
13349 pub document_id: Option<String>,
13350 #[serde(default, skip_serializing_if = "Option::is_none")]
13351 pub name: Option<String>,
13352 #[serde(default, skip_serializing_if = "Option::is_none")]
13353 pub chunks_created: Option<i64>,
13354 #[serde(default, skip_serializing_if = "Option::is_none")]
13355 pub status: Option<String>,
13356}
13357
13358#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13360pub struct IngestMemoryRequest {
13361 #[serde(default, skip_serializing_if = "Option::is_none")]
13363 pub file_id: Option<String>,
13364 #[serde(default, skip_serializing_if = "Option::is_none")]
13366 pub content: Option<String>,
13367 #[serde(default, skip_serializing_if = "Option::is_none")]
13369 pub filename: Option<String>,
13370 #[serde(default, skip_serializing_if = "Option::is_none")]
13373 pub tags: Option<Vec<String>>,
13374 #[serde(default, skip_serializing_if = "Option::is_none")]
13376 pub chunk_size: Option<i64>,
13377}
13378
13379#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13381pub struct IngestMemoryResponse {
13382 pub ingested: bool,
13383 pub filename: String,
13384 pub text_length: i64,
13385 pub chunks_created: i64,
13386 #[serde(default, skip_serializing_if = "Option::is_none")]
13387 pub file_id: Option<String>,
13388 pub entries: Vec<IngestMemoryResponseEntry>,
13389}
13390
13391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13393pub struct IngestMemoryResponseEntry {
13394 pub entry_id: String,
13395 pub r#type: String,
13396 pub content_preview: String,
13397 #[serde(default, skip_serializing_if = "Option::is_none")]
13398 pub tags: Option<Vec<String>>,
13399}
13400
13401#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13403pub struct Integration {
13404 pub id: String,
13405 pub tenant_id: String,
13406 pub connector_id: String,
13408 #[serde(default, skip_serializing_if = "Option::is_none")]
13409 pub name: Option<String>,
13410 #[serde(default, skip_serializing_if = "Option::is_none")]
13412 pub config: Option<serde_json::Map<String, serde_json::Value>>,
13413 pub status: IntegrationStatus,
13416 #[serde(default, skip_serializing_if = "Option::is_none")]
13417 pub last_sync_at: Option<String>,
13418 #[serde(default, skip_serializing_if = "Option::is_none")]
13419 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
13420 #[serde(default, skip_serializing_if = "Option::is_none")]
13421 pub created_at: Option<String>,
13422 #[serde(default, skip_serializing_if = "Option::is_none")]
13423 pub updated_at: Option<String>,
13424 #[serde(default, skip_serializing_if = "Option::is_none")]
13425 pub migrated_at: Option<String>,
13426 #[serde(default, skip_serializing_if = "Option::is_none")]
13430 pub assigned_agent_ids: Option<Vec<String>>,
13431}
13432
13433#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13435pub struct IntegrationCatalogItem {
13436 pub id: String,
13438 pub name: String,
13439 pub description: String,
13440 pub icon: String,
13441 pub auth_type: IntegrationCatalogItemAuthType,
13442 #[serde(default, skip_serializing_if = "Option::is_none")]
13446 pub oauth_provider: Option<String>,
13447 #[serde(default, skip_serializing_if = "Option::is_none")]
13451 pub required_oauth_scopes: Option<Vec<String>>,
13452 pub config_schema: HashMap<String, ConnectorConfigField>,
13453}
13454
13455#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13457pub enum IntegrationCatalogItemAuthType {
13458 #[default]
13459 #[serde(rename = "api_key")]
13460 APIKey,
13461 #[serde(rename = "oauth2")]
13462 Oauth2,
13463 #[serde(rename = "webhook")]
13464 Webhook,
13465 #[serde(rename = "none")]
13466 None,
13467 #[serde(untagged)]
13469 Other(String),
13470}
13471
13472impl IntegrationCatalogItemAuthType {
13473 pub fn as_str(&self) -> &str {
13475 match self {
13476 Self::APIKey => "api_key",
13477 Self::Oauth2 => "oauth2",
13478 Self::Webhook => "webhook",
13479 Self::None => "none",
13480 Self::Other(value) => value.as_str(),
13481 }
13482 }
13483}
13484
13485impl std::fmt::Display for IntegrationCatalogItemAuthType {
13486 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13487 f.write_str(self.as_str())
13488 }
13489}
13490
13491impl From<&str> for IntegrationCatalogItemAuthType {
13492 fn from(value: &str) -> Self {
13493 match value {
13494 "api_key" => Self::APIKey,
13495 "oauth2" => Self::Oauth2,
13496 "webhook" => Self::Webhook,
13497 "none" => Self::None,
13498 other => Self::Other(other.to_string()),
13499 }
13500 }
13501}
13502
13503#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13506pub enum IntegrationStatus {
13507 #[default]
13508 #[serde(rename = "active")]
13509 Active,
13510 #[serde(rename = "inactive")]
13511 Inactive,
13512 #[serde(rename = "error")]
13513 Error,
13514 #[serde(untagged)]
13516 Other(String),
13517}
13518
13519impl IntegrationStatus {
13520 pub fn as_str(&self) -> &str {
13522 match self {
13523 Self::Active => "active",
13524 Self::Inactive => "inactive",
13525 Self::Error => "error",
13526 Self::Other(value) => value.as_str(),
13527 }
13528 }
13529}
13530
13531impl std::fmt::Display for IntegrationStatus {
13532 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13533 f.write_str(self.as_str())
13534 }
13535}
13536
13537impl From<&str> for IntegrationStatus {
13538 fn from(value: &str) -> Self {
13539 match value {
13540 "active" => Self::Active,
13541 "inactive" => Self::Inactive,
13542 "error" => Self::Error,
13543 other => Self::Other(other.to_string()),
13544 }
13545 }
13546}
13547
13548#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13550pub struct InternalVerifyDomainResponse {
13551 pub ok: bool,
13552}
13553
13554#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13559pub struct Invite {
13560 #[serde(default, skip_serializing_if = "Option::is_none")]
13561 pub created_at: Option<String>,
13562 #[serde(default, skip_serializing_if = "Option::is_none")]
13563 pub email: Option<String>,
13564 #[serde(default, skip_serializing_if = "Option::is_none")]
13565 pub expires_at: Option<String>,
13566 #[serde(default, skip_serializing_if = "Option::is_none")]
13567 pub id: Option<String>,
13568 #[serde(default, skip_serializing_if = "Option::is_none")]
13569 pub invited_by: Option<String>,
13570 #[serde(default, skip_serializing_if = "Option::is_none")]
13571 pub role: Option<String>,
13572 #[serde(default, skip_serializing_if = "Option::is_none")]
13573 pub status: Option<String>,
13574 #[serde(default, skip_serializing_if = "Option::is_none")]
13575 pub tenant_id: Option<String>,
13576}
13577
13578#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13580pub struct InviteUserRequest {
13581 pub email: String,
13582 pub role: String,
13583}
13584
13585#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13587pub struct InviteUserResponse {
13588 #[serde(default, skip_serializing_if = "Option::is_none")]
13589 pub created_at: Option<String>,
13590 #[serde(default, skip_serializing_if = "Option::is_none")]
13591 pub email: Option<String>,
13592 #[serde(default, skip_serializing_if = "Option::is_none")]
13593 pub expires_at: Option<String>,
13594 #[serde(default, skip_serializing_if = "Option::is_none")]
13595 pub id: Option<String>,
13596 #[serde(default, skip_serializing_if = "Option::is_none")]
13597 pub invited_by: Option<String>,
13598 #[serde(default, skip_serializing_if = "Option::is_none")]
13599 pub role: Option<String>,
13600 #[serde(default, skip_serializing_if = "Option::is_none")]
13601 pub status: Option<String>,
13602 #[serde(default, skip_serializing_if = "Option::is_none")]
13603 pub tenant_id: Option<String>,
13604 pub email_sent: bool,
13605}
13606
13607#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13609pub struct InvokeListingAgentRequest {
13610 pub input: serde_json::Map<String, serde_json::Value>,
13611}
13612
13613#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13615pub struct InvokeListingAgentResponse {
13616 pub error: InvokeListingAgentResponseError,
13617 pub message: String,
13618 pub retry_after_seconds: i64,
13619}
13620
13621#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13623pub enum InvokeListingAgentResponseError {
13624 #[default]
13625 #[serde(rename = "Accepted")]
13626 Accepted,
13627 #[serde(untagged)]
13629 Other(String),
13630}
13631
13632impl InvokeListingAgentResponseError {
13633 pub fn as_str(&self) -> &str {
13635 match self {
13636 Self::Accepted => "Accepted",
13637 Self::Other(value) => value.as_str(),
13638 }
13639 }
13640}
13641
13642impl std::fmt::Display for InvokeListingAgentResponseError {
13643 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13644 f.write_str(self.as_str())
13645 }
13646}
13647
13648impl From<&str> for InvokeListingAgentResponseError {
13649 fn from(value: &str) -> Self {
13650 match value {
13651 "Accepted" => Self::Accepted,
13652 other => Self::Other(other.to_string()),
13653 }
13654 }
13655}
13656
13657#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13659pub struct IssueArbiterRulingRequest {
13660 pub decision: String,
13661 #[serde(default, skip_serializing_if = "Option::is_none")]
13662 pub penalties: Option<Vec<serde_json::Map<String, serde_json::Value>>>,
13663}
13664
13665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13667pub struct IssueArbiterRulingResponse {
13668 #[serde(default, skip_serializing_if = "Option::is_none")]
13669 pub ok: Option<bool>,
13670}
13671
13672#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13674pub struct JSONRpcResponse {
13675 pub jsonrpc: JSONRpcResponseJsonrpc,
13676 #[serde(default)]
13677 pub id: Option<serde_json::Value>,
13678 #[serde(default, skip_serializing_if = "Option::is_none")]
13680 pub result: Option<serde_json::Value>,
13681 #[serde(default, skip_serializing_if = "Option::is_none")]
13682 pub error: Option<JSONRpcResponseError>,
13683}
13684
13685#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13687pub struct JSONRpcResponseError {
13688 pub code: i64,
13689 pub message: String,
13690 #[serde(default, skip_serializing_if = "Option::is_none")]
13691 pub data: Option<serde_json::Value>,
13692}
13693
13694#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13696pub enum JSONRpcResponseJsonrpc {
13697 #[default]
13698 #[serde(rename = "2.0")]
13699 V20,
13700 #[serde(untagged)]
13702 Other(String),
13703}
13704
13705impl JSONRpcResponseJsonrpc {
13706 pub fn as_str(&self) -> &str {
13708 match self {
13709 Self::V20 => "2.0",
13710 Self::Other(value) => value.as_str(),
13711 }
13712 }
13713}
13714
13715impl std::fmt::Display for JSONRpcResponseJsonrpc {
13716 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13717 f.write_str(self.as_str())
13718 }
13719}
13720
13721impl From<&str> for JSONRpcResponseJsonrpc {
13722 fn from(value: &str) -> Self {
13723 match value {
13724 "2.0" => Self::V20,
13725 other => Self::Other(other.to_string()),
13726 }
13727 }
13728}
13729
13730#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13732pub struct KnowledgeBase {
13733 pub id: String,
13734 pub tenant_id: String,
13735 pub name: String,
13736 #[serde(default, skip_serializing_if = "Option::is_none")]
13737 pub description: Option<String>,
13738 #[serde(default, skip_serializing_if = "Option::is_none")]
13742 pub embedding_model: Option<String>,
13743 #[serde(default, skip_serializing_if = "Option::is_none")]
13744 pub chunk_size: Option<i64>,
13745 #[serde(default, skip_serializing_if = "Option::is_none")]
13746 pub chunk_overlap: Option<i64>,
13747 #[serde(default, skip_serializing_if = "Option::is_none")]
13748 pub document_count: Option<i64>,
13749 #[serde(default, skip_serializing_if = "Option::is_none")]
13750 pub total_chunks: Option<i64>,
13751 #[serde(default, skip_serializing_if = "Option::is_none")]
13755 pub status: Option<String>,
13756 #[serde(default, skip_serializing_if = "Option::is_none")]
13757 pub attached_agents: Option<Vec<KnowledgeBaseAttachedAgent>>,
13758 #[serde(default, skip_serializing_if = "Option::is_none")]
13759 pub attached_agent_count: Option<i64>,
13760 #[serde(default, skip_serializing_if = "Option::is_none")]
13761 pub created_at: Option<String>,
13762 #[serde(default, skip_serializing_if = "Option::is_none")]
13763 pub updated_at: Option<String>,
13764}
13765
13766#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13768pub struct KnowledgeBaseAttachedAgent {
13769 pub agent_id: String,
13770 #[serde(default, skip_serializing_if = "Option::is_none")]
13771 pub name: Option<String>,
13772}
13773
13774#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13776pub struct KnowledgeBaseCreate {
13777 pub name: String,
13778 #[serde(default, skip_serializing_if = "Option::is_none")]
13779 pub description: Option<String>,
13780 #[serde(default, skip_serializing_if = "Option::is_none")]
13787 pub embedding_model: Option<String>,
13788}
13789
13790#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13792pub struct KnowledgeBaseDocument {
13793 pub id: String,
13794 pub kb_id: String,
13795 pub tenant_id: String,
13796 pub name: String,
13797 pub r#type: KnowledgeBaseDocumentType,
13798 pub size_bytes: i64,
13799 pub chunk_count: i64,
13800 pub status: KnowledgeBaseDocumentStatus,
13801 #[serde(default, skip_serializing_if = "Option::is_none")]
13802 pub error_message: Option<String>,
13803 pub created_at: String,
13804 pub updated_at: String,
13805 #[serde(default)]
13806 pub chunk_preview: Option<String>,
13807 pub embedding_status: KnowledgeBaseDocumentEmbeddingStatus,
13810}
13811
13812#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13815pub enum KnowledgeBaseDocumentEmbeddingStatus {
13816 #[default]
13817 #[serde(rename = "embedded")]
13818 Embedded,
13819 #[serde(rename = "keyword_only")]
13820 KeywordOnly,
13821 #[serde(untagged)]
13823 Other(String),
13824}
13825
13826impl KnowledgeBaseDocumentEmbeddingStatus {
13827 pub fn as_str(&self) -> &str {
13829 match self {
13830 Self::Embedded => "embedded",
13831 Self::KeywordOnly => "keyword_only",
13832 Self::Other(value) => value.as_str(),
13833 }
13834 }
13835}
13836
13837impl std::fmt::Display for KnowledgeBaseDocumentEmbeddingStatus {
13838 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13839 f.write_str(self.as_str())
13840 }
13841}
13842
13843impl From<&str> for KnowledgeBaseDocumentEmbeddingStatus {
13844 fn from(value: &str) -> Self {
13845 match value {
13846 "embedded" => Self::Embedded,
13847 "keyword_only" => Self::KeywordOnly,
13848 other => Self::Other(other.to_string()),
13849 }
13850 }
13851}
13852
13853#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13855pub enum KnowledgeBaseDocumentStatus {
13856 #[default]
13857 #[serde(rename = "uploading")]
13858 Uploading,
13859 #[serde(rename = "processing")]
13860 Processing,
13861 #[serde(rename = "ready")]
13862 Ready,
13863 #[serde(rename = "error")]
13864 Error,
13865 #[serde(untagged)]
13867 Other(String),
13868}
13869
13870impl KnowledgeBaseDocumentStatus {
13871 pub fn as_str(&self) -> &str {
13873 match self {
13874 Self::Uploading => "uploading",
13875 Self::Processing => "processing",
13876 Self::Ready => "ready",
13877 Self::Error => "error",
13878 Self::Other(value) => value.as_str(),
13879 }
13880 }
13881}
13882
13883impl std::fmt::Display for KnowledgeBaseDocumentStatus {
13884 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13885 f.write_str(self.as_str())
13886 }
13887}
13888
13889impl From<&str> for KnowledgeBaseDocumentStatus {
13890 fn from(value: &str) -> Self {
13891 match value {
13892 "uploading" => Self::Uploading,
13893 "processing" => Self::Processing,
13894 "ready" => Self::Ready,
13895 "error" => Self::Error,
13896 other => Self::Other(other.to_string()),
13897 }
13898 }
13899}
13900
13901#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13903pub enum KnowledgeBaseDocumentType {
13904 #[default]
13905 #[serde(rename = "pdf")]
13906 PDF,
13907 #[serde(rename = "markdown")]
13908 Markdown,
13909 #[serde(rename = "csv")]
13910 CSV,
13911 #[serde(rename = "html")]
13912 Html,
13913 #[serde(rename = "plain")]
13914 Plain,
13915 #[serde(rename = "docx")]
13916 Docx,
13917 #[serde(rename = "image")]
13918 Image,
13919 #[serde(untagged)]
13921 Other(String),
13922}
13923
13924impl KnowledgeBaseDocumentType {
13925 pub fn as_str(&self) -> &str {
13927 match self {
13928 Self::PDF => "pdf",
13929 Self::Markdown => "markdown",
13930 Self::CSV => "csv",
13931 Self::Html => "html",
13932 Self::Plain => "plain",
13933 Self::Docx => "docx",
13934 Self::Image => "image",
13935 Self::Other(value) => value.as_str(),
13936 }
13937 }
13938}
13939
13940impl std::fmt::Display for KnowledgeBaseDocumentType {
13941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13942 f.write_str(self.as_str())
13943 }
13944}
13945
13946impl From<&str> for KnowledgeBaseDocumentType {
13947 fn from(value: &str) -> Self {
13948 match value {
13949 "pdf" => Self::PDF,
13950 "markdown" => Self::Markdown,
13951 "csv" => Self::CSV,
13952 "html" => Self::Html,
13953 "plain" => Self::Plain,
13954 "docx" => Self::Docx,
13955 "image" => Self::Image,
13956 other => Self::Other(other.to_string()),
13957 }
13958 }
13959}
13960
13961#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13963pub struct KnowledgeBaseSearchResult {
13964 pub status: KnowledgeBaseSearchResultStatus,
13965 pub query: String,
13966 #[serde(default)]
13968 pub mode: Option<String>,
13969 pub count: i64,
13970 pub results: Vec<KnowledgeBaseSearchResultResult>,
13971}
13972
13973#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
13975pub struct KnowledgeBaseSearchResultResult {
13976 pub index: i64,
13978 pub source: String,
13980 #[serde(default, skip_serializing_if = "Option::is_none")]
13981 pub page: Option<i64>,
13982 pub text: String,
13983 pub score: f64,
13984}
13985
13986#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
13988pub enum KnowledgeBaseSearchResultStatus {
13989 #[default]
13990 #[serde(rename = "KB_EMPTY")]
13991 KbEmpty,
13992 #[serde(rename = "NO_MATCHES")]
13993 NoMatches,
13994 #[serde(rename = "RESULTS_FOUND")]
13995 ResultsFound,
13996 #[serde(untagged)]
13998 Other(String),
13999}
14000
14001impl KnowledgeBaseSearchResultStatus {
14002 pub fn as_str(&self) -> &str {
14004 match self {
14005 Self::KbEmpty => "KB_EMPTY",
14006 Self::NoMatches => "NO_MATCHES",
14007 Self::ResultsFound => "RESULTS_FOUND",
14008 Self::Other(value) => value.as_str(),
14009 }
14010 }
14011}
14012
14013impl std::fmt::Display for KnowledgeBaseSearchResultStatus {
14014 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14015 f.write_str(self.as_str())
14016 }
14017}
14018
14019impl From<&str> for KnowledgeBaseSearchResultStatus {
14020 fn from(value: &str) -> Self {
14021 match value {
14022 "KB_EMPTY" => Self::KbEmpty,
14023 "NO_MATCHES" => Self::NoMatches,
14024 "RESULTS_FOUND" => Self::ResultsFound,
14025 other => Self::Other(other.to_string()),
14026 }
14027 }
14028}
14029
14030#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14032pub struct KnowledgeBaseUpdate {
14033 #[serde(default, skip_serializing_if = "Option::is_none")]
14034 pub name: Option<String>,
14035 #[serde(default, skip_serializing_if = "Option::is_none")]
14036 pub description: Option<String>,
14037}
14038
14039#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14042pub struct LandingConfigSection {
14043 #[serde(default)]
14044 pub public_agent_id: Option<String>,
14045 pub texts: HashMap<String, Value>,
14046 pub multilang_enabled: bool,
14047 pub default_locale: String,
14048 pub partners_enabled: bool,
14049 #[serde(default)]
14050 pub partners: Option<Vec<LandingConfigSectionPartner>>,
14051}
14052
14053#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14055pub struct LandingConfigSectionPartner {
14056 pub id: String,
14057 pub name: String,
14058 pub tagline: String,
14059 #[serde(default, skip_serializing_if = "Option::is_none")]
14060 pub tagline_uk: Option<String>,
14061 pub href: String,
14062 pub logo: LandingConfigSectionPartnerLogo,
14063}
14064
14065#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14067pub struct LandingConfigSectionPartnerLogo {
14068 #[serde(default, skip_serializing_if = "Option::is_none")]
14069 pub slug: Option<String>,
14070 #[serde(default, skip_serializing_if = "Option::is_none")]
14071 pub url: Option<String>,
14072}
14073
14074#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14076pub struct LandingOverrides {
14077 pub texts: serde_json::Map<String, serde_json::Value>,
14079 pub multilang_enabled: bool,
14080 pub default_locale: String,
14081 pub partners_enabled: bool,
14082 #[serde(default)]
14084 pub partners: Option<Vec<serde_json::Map<String, serde_json::Value>>>,
14085 #[serde(default)]
14088 pub version: Option<String>,
14089}
14090
14091#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14093pub struct LandingStats {
14094 #[serde(default, skip_serializing_if = "Option::is_none")]
14095 pub agents_deployed: Option<i64>,
14096 #[serde(default, skip_serializing_if = "Option::is_none")]
14097 pub llm_providers: Option<i64>,
14098 #[serde(default, skip_serializing_if = "Option::is_none")]
14099 pub registered_users: Option<i64>,
14100 #[serde(default, skip_serializing_if = "Option::is_none")]
14101 pub tool_calls_today: Option<i64>,
14102 #[serde(default, skip_serializing_if = "Option::is_none")]
14103 pub total_runs: Option<i64>,
14104 #[serde(default, skip_serializing_if = "Option::is_none")]
14105 pub total_sessions: Option<i64>,
14106 #[serde(default, skip_serializing_if = "Option::is_none")]
14107 pub total_tokens: Option<i64>,
14108}
14109
14110#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14112pub struct LeaveTenantResponse {
14113 pub left: bool,
14114 pub tenant_id: String,
14115}
14116
14117#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14119pub struct LedgerIntegrity {
14120 pub valid: bool,
14121 pub entries_checked: i64,
14122 #[serde(default, skip_serializing_if = "Option::is_none")]
14124 pub first_invalid_seq: Option<i64>,
14125 #[serde(default, skip_serializing_if = "Option::is_none")]
14126 pub error: Option<String>,
14127 pub checked_at: String,
14128}
14129
14130#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14132pub struct LinkPreview {
14133 pub url: String,
14134 pub site: String,
14135 #[serde(default, skip_serializing_if = "Option::is_none")]
14136 pub title: Option<String>,
14137 #[serde(default, skip_serializing_if = "Option::is_none")]
14138 pub description: Option<String>,
14139 #[serde(default, skip_serializing_if = "Option::is_none")]
14140 pub image: Option<String>,
14141 #[serde(default, skip_serializing_if = "Option::is_none")]
14142 pub favicon: Option<String>,
14143}
14144
14145#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14147pub struct ListA2ATasksResponse {
14148 pub tasks: Vec<A2ATask>,
14149 #[serde(default, skip_serializing_if = "Option::is_none")]
14151 pub cursor: Option<String>,
14152 #[serde(default, skip_serializing_if = "Option::is_none")]
14154 pub total: Option<i64>,
14155 #[serde(default, skip_serializing_if = "Option::is_none")]
14156 pub limit: Option<i64>,
14157 #[serde(default, skip_serializing_if = "Option::is_none")]
14158 pub offset: Option<i64>,
14159 #[serde(default, skip_serializing_if = "Option::is_none")]
14160 pub has_more: Option<bool>,
14161}
14162
14163#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14165pub struct ListAdminBlogPostsResponse {
14166 pub posts: Vec<BlogPost>,
14167}
14168
14169#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14171pub struct ListAdminDomainHealthResponse {
14172 pub count: i64,
14173 pub rows: Vec<ListAdminDomainHealthResponseRow>,
14174}
14175
14176#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14178pub struct ListAdminDomainHealthResponseRow {
14179 pub tenant_id: String,
14180 #[serde(default, skip_serializing_if = "Option::is_none")]
14181 pub tenant_name: Option<String>,
14182 #[serde(default, skip_serializing_if = "Option::is_none")]
14183 pub tenant_slug: Option<String>,
14184 #[serde(default, skip_serializing_if = "Option::is_none")]
14185 pub plan: Option<String>,
14186 pub domain: String,
14187 pub dns: DomainDnsLifecycle,
14188 pub cert: DomainCertLifecycle,
14189 pub created_at: String,
14190 #[serde(default, skip_serializing_if = "Option::is_none")]
14191 pub updated_at: Option<String>,
14192}
14193
14194#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14196pub struct ListAdminIntegrationOAuthProvidersResponse {
14197 pub providers: Vec<ListAdminIntegrationOAuthProvidersResponseProvider>,
14198}
14199
14200#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14202pub struct ListAdminIntegrationOAuthProvidersResponseProvider {
14203 pub id: String,
14204 pub configured: bool,
14206 pub enabled: bool,
14209}
14210
14211#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14213pub struct ListAdminProvidersResponse {
14214 #[serde(default, skip_serializing_if = "Option::is_none")]
14215 pub providers: Option<Vec<AdminProviderSummary>>,
14216}
14217
14218#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14220pub struct ListAgentBookmarksResponse {
14221 pub items: Vec<AgentBookmark>,
14222}
14223
14224#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14226pub struct ListAgentIntegrationsResponse {
14227 #[serde(default, skip_serializing_if = "Option::is_none")]
14228 pub integrations: Option<Vec<AgentIntegration>>,
14229 #[serde(default, skip_serializing_if = "Option::is_none")]
14230 pub total: Option<i64>,
14231}
14232
14233#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14235pub struct ListAgentMailResponse {
14236 pub messages: Vec<AgentMessage>,
14237 pub agent_names: serde_json::Map<String, serde_json::Value>,
14239 pub total_scanned: i64,
14240}
14241
14242#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14244pub struct ListAgentMCPServersResponse {
14245 #[serde(default, skip_serializing_if = "Option::is_none")]
14246 pub servers: Option<Vec<MCPServer>>,
14247 #[serde(default, skip_serializing_if = "Option::is_none")]
14248 pub total: Option<i64>,
14249}
14250
14251#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14253pub struct ListAgentScorersResponse {
14254 #[serde(default, skip_serializing_if = "Option::is_none")]
14255 pub scorers: Option<Vec<AgentScorer>>,
14256}
14257
14258#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14260pub struct ListAgentsResponse {
14261 pub items: Vec<Agent>,
14262 #[serde(default)]
14264 pub cursor: Option<String>,
14265 pub has_more: bool,
14266}
14267
14268#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
14270pub enum ListAgentVersionsFields {
14271 #[default]
14272 #[serde(rename = "summary")]
14273 Summary,
14274 #[serde(untagged)]
14276 Other(String),
14277}
14278
14279impl ListAgentVersionsFields {
14280 pub fn as_str(&self) -> &str {
14282 match self {
14283 Self::Summary => "summary",
14284 Self::Other(value) => value.as_str(),
14285 }
14286 }
14287}
14288
14289impl std::fmt::Display for ListAgentVersionsFields {
14290 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14291 f.write_str(self.as_str())
14292 }
14293}
14294
14295impl From<&str> for ListAgentVersionsFields {
14296 fn from(value: &str) -> Self {
14297 match value {
14298 "summary" => Self::Summary,
14299 other => Self::Other(other.to_string()),
14300 }
14301 }
14302}
14303
14304#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14306pub struct ListAgentVersionsResponse {
14307 pub items: Vec<AgentVersion>,
14308 #[serde(default, skip_serializing_if = "Option::is_none")]
14310 pub versions: Option<Vec<AgentVersion>>,
14311 pub total: i64,
14315 #[serde(default, skip_serializing_if = "Option::is_none")]
14318 pub has_more: Option<bool>,
14319 #[serde(default, skip_serializing_if = "Option::is_none")]
14324 pub cursor: Option<String>,
14325}
14326
14327#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14329pub struct ListAgentWorkspaceFilesResponse {
14330 pub workspace_id: String,
14331 pub path: String,
14332 pub directories: Vec<String>,
14333 pub files: Vec<WorkspaceFile>,
14334}
14335
14336#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14338pub struct ListAllContentReportsResponse {
14339 pub items: Vec<ContentReport>,
14340 #[serde(default)]
14341 pub cursor: Option<String>,
14342 pub has_more: bool,
14343}
14344
14345#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14347pub struct ListAmbassadorRequestsResponse {
14348 pub requests: Vec<AmbassadorRequest>,
14349}
14350
14351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14353pub struct ListAmbassadorVetoesResponse {
14354 #[serde(default, skip_serializing_if = "Option::is_none")]
14355 pub vetoes: Option<Vec<VetoRecord>>,
14356}
14357
14358#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14360pub struct ListAndroidTestersResponse {
14361 pub testers: Vec<AndroidTester>,
14362 pub count: i64,
14363 pub not_yet_emailed: i64,
14364 pub given_up: i64,
14365 #[serde(default)]
14366 pub cursor: Option<String>,
14367}
14368
14369#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14371pub struct ListAPIKeysResponse {
14372 pub keys: Vec<APIKeySummary>,
14373 pub total: i64,
14374}
14375
14376#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14378pub struct ListArbiterCasesResponse {
14379 pub cases: Vec<ArbiterCase>,
14380}
14381
14382#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14384pub struct ListAuthProvidersResponse {
14385 pub items: Vec<ListAuthProvidersResponseItem>,
14386 #[serde(default, skip_serializing_if = "Option::is_none")]
14388 pub providers: Option<Vec<AuthProvider>>,
14389}
14390
14391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14393pub struct ListAuthProvidersResponseItem {
14394 pub id: ListAuthProvidersResponseItemId,
14395 pub linked: bool,
14396 #[serde(default, skip_serializing_if = "Option::is_none")]
14397 pub sub: Option<String>,
14398 #[serde(default, skip_serializing_if = "Option::is_none")]
14399 pub email: Option<String>,
14400 #[serde(default, skip_serializing_if = "Option::is_none")]
14401 pub linked_at: Option<String>,
14402}
14403
14404#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
14406pub enum ListAuthProvidersResponseItemId {
14407 #[default]
14408 #[serde(rename = "otp")]
14409 Otp,
14410 #[serde(rename = "github")]
14411 Github,
14412 #[serde(rename = "google")]
14413 Google,
14414 #[serde(rename = "apple")]
14415 Apple,
14416 #[serde(untagged)]
14418 Other(String),
14419}
14420
14421impl ListAuthProvidersResponseItemId {
14422 pub fn as_str(&self) -> &str {
14424 match self {
14425 Self::Otp => "otp",
14426 Self::Github => "github",
14427 Self::Google => "google",
14428 Self::Apple => "apple",
14429 Self::Other(value) => value.as_str(),
14430 }
14431 }
14432}
14433
14434impl std::fmt::Display for ListAuthProvidersResponseItemId {
14435 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14436 f.write_str(self.as_str())
14437 }
14438}
14439
14440impl From<&str> for ListAuthProvidersResponseItemId {
14441 fn from(value: &str) -> Self {
14442 match value {
14443 "otp" => Self::Otp,
14444 "github" => Self::Github,
14445 "google" => Self::Google,
14446 "apple" => Self::Apple,
14447 other => Self::Other(other.to_string()),
14448 }
14449 }
14450}
14451
14452#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14454pub struct ListBallotsResponse {
14455 #[serde(default, skip_serializing_if = "Option::is_none")]
14456 pub ballots: Option<Vec<Ballot>>,
14457}
14458
14459#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14461pub struct ListBillingPlansResponse {
14462 #[serde(default, skip_serializing_if = "Option::is_none")]
14463 pub plans: Option<Vec<ListBillingPlansResponsePlan>>,
14464}
14465
14466#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14468pub struct ListBillingPlansResponsePlan {
14469 #[serde(default, skip_serializing_if = "Option::is_none")]
14470 pub id: Option<String>,
14471 #[serde(default, skip_serializing_if = "Option::is_none")]
14472 pub name: Option<String>,
14473 #[serde(default, skip_serializing_if = "Option::is_none")]
14474 pub limits: Option<serde_json::Map<String, serde_json::Value>>,
14475 #[serde(default, skip_serializing_if = "Option::is_none")]
14476 pub current: Option<bool>,
14477 #[serde(default, skip_serializing_if = "Option::is_none")]
14478 pub checkout_available: Option<bool>,
14479 #[serde(default, skip_serializing_if = "Option::is_none")]
14480 pub price_amount_cents: Option<i64>,
14481 #[serde(default, skip_serializing_if = "Option::is_none")]
14482 pub price_currency: Option<String>,
14483}
14484
14485#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14487pub struct ListBillingSpecPackagesResponse {
14488 pub packages: Vec<serde_json::Map<String, serde_json::Value>>,
14489}
14490
14491#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14493pub struct ListBuilderRequestsResponse {
14494 pub requests: Vec<DesignRequest>,
14495}
14496
14497#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14499pub struct ListCompaniesResponse {
14500 pub items: Vec<Company>,
14501 #[serde(default)]
14503 pub cursor: Option<String>,
14504 pub has_more: bool,
14505}
14506
14507#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14509pub struct ListContentReportsResponse {
14510 pub items: Vec<ContentReport>,
14511 #[serde(default)]
14512 pub cursor: Option<String>,
14513 pub has_more: bool,
14514}
14515
14516#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14518pub struct ListCoreMemoryBlocksResponse {
14519 pub enabled: bool,
14521 pub blocks: Vec<CoreMemoryBlock>,
14522 pub total: i64,
14523}
14524
14525#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14527pub struct ListCustomPlansResponse {
14528 pub plans: Vec<CustomPlan>,
14529 pub count: i64,
14530}
14531
14532#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14534pub struct ListDataExplorerKeysResponse {
14535 #[serde(default, skip_serializing_if = "Option::is_none")]
14536 pub keys: Option<Vec<DataExplorerKey>>,
14537 #[serde(default, skip_serializing_if = "Option::is_none")]
14539 pub cursor: Option<String>,
14540 #[serde(default, skip_serializing_if = "Option::is_none")]
14541 pub has_more: Option<bool>,
14542}
14543
14544#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14546pub struct ListDataExplorerNamespacesResponse {
14547 #[serde(default, skip_serializing_if = "Option::is_none")]
14548 pub namespaces: Option<Vec<DataExplorerNamespace>>,
14549}
14550
14551#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14553pub struct ListDatasetsResponse {
14554 pub datasets: Vec<EvalDataset>,
14555 pub total: i64,
14556}
14557
14558#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14560pub struct ListDrawingOpsResponse {
14561 pub items: Vec<DrawingJournalEntry>,
14562 #[serde(default, skip_serializing_if = "Option::is_none")]
14563 pub cursor: Option<String>,
14564 pub has_more: bool,
14565 pub seq: i64,
14566}
14567
14568#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14570pub struct ListEvalRunsResponse {
14571 pub eval_runs: Vec<EvalRun>,
14572 pub total: i64,
14573}
14574
14575#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14577pub struct ListExperimentsResponse {
14578 pub experiments: Vec<Experiment>,
14579 pub total: i64,
14580}
14581
14582#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14584pub struct ListFeaturedSpecsResponse {
14585 pub featured: Vec<String>,
14586}
14587
14588#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14590pub struct ListFeedbackResponse {
14591 pub reports: Vec<ErrorReport>,
14592 pub count: i64,
14593 pub new_count: i64,
14594}
14595
14596#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14598pub struct ListFilesResponse {
14599 #[serde(default, skip_serializing_if = "Option::is_none")]
14600 pub items: Option<Vec<FileEntry>>,
14601 #[serde(default, skip_serializing_if = "Option::is_none")]
14603 pub cursor: Option<String>,
14604 #[serde(default, skip_serializing_if = "Option::is_none")]
14605 pub has_more: Option<bool>,
14606}
14607
14608#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14610pub struct ListGoalsResponse {
14611 #[serde(default, skip_serializing_if = "Option::is_none")]
14612 pub goals: Option<Vec<Goal>>,
14613}
14614
14615#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14617pub struct ListGuardrailsResponse {
14618 pub guardrails: Vec<Guardrail>,
14619 #[serde(default, skip_serializing_if = "Option::is_none")]
14620 pub total: Option<i64>,
14621}
14622
14623#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14625pub struct ListIntegrationsCatalogResponse {
14626 #[serde(default, skip_serializing_if = "Option::is_none")]
14627 pub connectors: Option<Vec<IntegrationCatalogItem>>,
14628}
14629
14630#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14632pub struct ListIntegrationsResponse {
14633 pub integrations: Vec<Integration>,
14634 #[serde(default, skip_serializing_if = "Option::is_none")]
14635 pub total: Option<i64>,
14636}
14637
14638#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14640pub struct ListInvitesResponse {
14641 #[serde(default, skip_serializing_if = "Option::is_none")]
14642 pub items: Option<Vec<Invite>>,
14643 #[serde(default, skip_serializing_if = "Option::is_none")]
14645 pub invites: Option<Vec<Invite>>,
14646 #[serde(default, skip_serializing_if = "Option::is_none")]
14647 pub total: Option<i64>,
14648}
14649
14650#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14652pub struct ListKbDocumentsResponse {
14653 #[serde(default, skip_serializing_if = "Option::is_none")]
14654 pub documents: Option<Vec<KnowledgeBaseDocument>>,
14655 #[serde(default, skip_serializing_if = "Option::is_none")]
14656 pub total: Option<i64>,
14657}
14658
14659#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14661pub struct ListKnowledgeBasesResponse {
14662 pub items: Vec<KnowledgeBase>,
14663 #[serde(default, skip_serializing_if = "Option::is_none")]
14665 pub knowledge_bases: Option<Vec<KnowledgeBase>>,
14666 pub total: i64,
14667}
14668
14669#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14671pub struct ListLLMCredentialsProvidersResponse {
14672 #[serde(default, skip_serializing_if = "Option::is_none")]
14673 pub providers: Option<Vec<ListLLMCredentialsProvidersResponseProvider>>,
14674}
14675
14676#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14678pub struct ListLLMCredentialsProvidersResponseProvider {
14679 #[serde(default, skip_serializing_if = "Option::is_none")]
14680 pub id: Option<String>,
14681 #[serde(default, skip_serializing_if = "Option::is_none")]
14683 pub name: Option<String>,
14684 #[serde(default, skip_serializing_if = "Option::is_none")]
14685 pub configured: Option<bool>,
14686 #[serde(default, skip_serializing_if = "Option::is_none")]
14687 pub local: Option<bool>,
14688 #[serde(default, skip_serializing_if = "Option::is_none")]
14689 pub default_endpoint: Option<String>,
14690}
14691
14692#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14694pub struct ListLLMModelsResponse {
14695 #[serde(default, skip_serializing_if = "Option::is_none")]
14696 pub models: Option<Vec<LLMModel>>,
14697}
14698
14699#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14701pub struct ListMCPServersResponse {
14702 pub servers: Vec<MCPServer>,
14703}
14704
14705#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14707pub struct ListMemoriesResponse {
14708 pub memories: Vec<MemoryEntry>,
14709 pub total: i64,
14710}
14711
14712#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14714pub struct ListMeSessionsResponse {
14715 pub items: Vec<ActiveSession>,
14716 #[serde(default, skip_serializing_if = "Option::is_none")]
14720 pub sessions: Option<Vec<ActiveSession>>,
14721 pub total: i64,
14722}
14723
14724#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14726pub struct ListMissionObjectivesResponse {
14727 pub items: Vec<Objective>,
14728 pub total: i64,
14729}
14730
14731#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14733pub struct ListMissionsResponse {
14734 pub items: Vec<Mission>,
14735 pub total: i64,
14737}
14738
14739#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14741pub struct ListModelsResponse {
14742 pub object: String,
14744 pub data: Vec<ListModelsResponseDataItem>,
14745}
14746
14747#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14749pub struct ListModelsResponseDataItem {
14750 pub id: String,
14751 pub object: String,
14753 #[serde(default, skip_serializing_if = "Option::is_none")]
14754 pub created: Option<i64>,
14755 #[serde(default, skip_serializing_if = "Option::is_none")]
14756 pub owned_by: Option<String>,
14757}
14758
14759#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14761pub struct ListMyTenantsResponse {
14762 pub user_id: String,
14763 pub email: String,
14764 pub memberships: Vec<ListMyTenantsResponseMembership>,
14765 pub pending_invites: Vec<ListMyTenantsResponsePendingInvite>,
14766}
14767
14768#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14770pub struct ListMyTenantsResponseMembership {
14771 pub tenant_id: String,
14772 pub user_id: String,
14773 pub name: String,
14774 #[serde(default, skip_serializing_if = "Option::is_none")]
14775 pub slug: Option<String>,
14776 #[serde(default, skip_serializing_if = "Option::is_none")]
14777 pub plan: Option<String>,
14778 #[serde(default, skip_serializing_if = "Option::is_none")]
14779 pub logo_url: Option<String>,
14780 pub role: String,
14781 pub is_sole_owner: bool,
14782 pub member_count: i64,
14783 #[serde(default, skip_serializing_if = "Option::is_none")]
14784 pub joined_at: Option<String>,
14785 pub accessible: bool,
14792}
14793
14794#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14796pub struct ListMyTenantsResponsePendingInvite {
14797 pub invite_id: String,
14798 pub tenant_id: String,
14799 pub tenant_name: String,
14800 pub role: String,
14801 pub expires_at: String,
14802 #[serde(default, skip_serializing_if = "Option::is_none")]
14803 pub invited_by_name: Option<String>,
14804 #[serde(default, skip_serializing_if = "Option::is_none")]
14805 pub secret: Option<String>,
14806}
14807
14808#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14810pub struct ListNotificationsResponse {
14811 pub notifications: Vec<Notification>,
14812}
14813
14814#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14816pub struct ListNotificationTargetsResponse {
14817 pub targets: Vec<NotificationTarget>,
14818}
14819
14820#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14822pub struct ListPlaygroundTemplatesResponse {
14823 pub templates: Vec<PlaygroundTemplate>,
14824}
14825
14826#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14828pub struct ListProgramsResponse {
14829 pub programs: Vec<Program>,
14830}
14831
14832#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14834pub struct ListProjectsResponse {
14835 pub items: Vec<Project>,
14836 pub total: i64,
14837 pub archived_count: i64,
14838}
14839
14840#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14842pub struct ListPromoCodesResponse {
14843 pub codes: Vec<PromoCode>,
14844 pub count: i64,
14845}
14846
14847#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14849pub struct ListPromoRewardsResponse {
14850 pub rewards: Vec<ListPromoRewardsResponseReward>,
14851 pub count: i64,
14852}
14853
14854#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14856pub struct ListPromoRewardsResponseReward {
14857 pub code: String,
14858 pub owner_tenant_id: String,
14859 pub subscriber_tenant_id: String,
14860 pub tokens: i64,
14861 pub plan_id: String,
14862 pub granted_at: String,
14863}
14864
14865#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14867pub struct ListProviderModelsResponse {
14868 pub provider: String,
14870 pub endpoint_url: String,
14872 pub models: Vec<ListProviderModelsResponseModel>,
14873 #[serde(default, skip_serializing_if = "Option::is_none")]
14875 pub error: Option<String>,
14876}
14877
14878#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14880pub struct ListProviderModelsResponseModel {
14881 #[serde(default, skip_serializing_if = "Option::is_none")]
14882 pub id: Option<String>,
14883 #[serde(default, skip_serializing_if = "Option::is_none")]
14884 pub name: Option<String>,
14885 #[serde(default, skip_serializing_if = "Option::is_none")]
14886 pub created: Option<i64>,
14887 #[serde(default, skip_serializing_if = "Option::is_none")]
14888 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
14889}
14890
14891#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14893pub struct ListProvidersResponse {
14894 pub providers: Vec<LLMProvider>,
14895}
14896
14897#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14899pub struct ListPublicBlogPostsResponse {
14900 pub blog: ListPublicBlogPostsResponseBlog,
14901 pub posts: Vec<PublicBlogPostSummary>,
14902 pub all_tags: Vec<String>,
14903 pub total: i64,
14904 pub page: i64,
14905 pub limit: i64,
14906 pub total_pages: i64,
14907}
14908
14909#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14911pub struct ListPublicBlogPostsResponseBlog {
14912 pub title: String,
14913 pub description: String,
14914}
14915
14916#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14918pub struct ListPublicIntegrationsResponse {
14919 pub connectors: Vec<ListPublicIntegrationsResponseConnector>,
14920 pub total: i64,
14921 pub oauth_count: i64,
14924 pub api_key_count: i64,
14925}
14926
14927#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14929pub struct ListPublicIntegrationsResponseConnector {
14930 pub id: String,
14931 pub name: String,
14932 #[serde(default, skip_serializing_if = "Option::is_none")]
14933 pub description: Option<String>,
14934 #[serde(default, skip_serializing_if = "Option::is_none")]
14935 pub icon: Option<String>,
14936 pub auth_type: ListPublicIntegrationsResponseConnectorAuthType,
14937}
14938
14939#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
14941pub enum ListPublicIntegrationsResponseConnectorAuthType {
14942 #[default]
14943 #[serde(rename = "oauth2")]
14944 Oauth2,
14945 #[serde(rename = "api_key")]
14946 APIKey,
14947 #[serde(untagged)]
14949 Other(String),
14950}
14951
14952impl ListPublicIntegrationsResponseConnectorAuthType {
14953 pub fn as_str(&self) -> &str {
14955 match self {
14956 Self::Oauth2 => "oauth2",
14957 Self::APIKey => "api_key",
14958 Self::Other(value) => value.as_str(),
14959 }
14960 }
14961}
14962
14963impl std::fmt::Display for ListPublicIntegrationsResponseConnectorAuthType {
14964 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14965 f.write_str(self.as_str())
14966 }
14967}
14968
14969impl From<&str> for ListPublicIntegrationsResponseConnectorAuthType {
14970 fn from(value: &str) -> Self {
14971 match value {
14972 "oauth2" => Self::Oauth2,
14973 "api_key" => Self::APIKey,
14974 other => Self::Other(other.to_string()),
14975 }
14976 }
14977}
14978
14979#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14981pub struct ListPublicPlansResponse {
14982 #[serde(default, skip_serializing_if = "Option::is_none")]
14983 pub plans: Option<Vec<PublicPlan>>,
14984}
14985
14986#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14988pub struct ListPublicStatesResponse {
14989 #[serde(default, skip_serializing_if = "Option::is_none")]
14990 pub states: Option<Vec<PublicState>>,
14991}
14992
14993#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
14995pub struct ListPublicTenantsResponse {
14996 #[serde(default, skip_serializing_if = "Option::is_none")]
14997 pub items: Option<Vec<PublicTenant>>,
14998 #[serde(default, skip_serializing_if = "Option::is_none")]
15000 pub cursor: Option<String>,
15001 #[serde(default, skip_serializing_if = "Option::is_none")]
15002 pub has_more: Option<bool>,
15003 #[serde(default, skip_serializing_if = "Option::is_none")]
15004 pub total: Option<i64>,
15005}
15006
15007#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15009pub struct ListRunArtifactsResponse {
15010 pub run_id: String,
15011 pub artifacts: Vec<Artifact>,
15012 pub total: i64,
15013}
15014
15015#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15017pub struct ListRunCheckpointsResponse {
15018 #[serde(default, skip_serializing_if = "Option::is_none")]
15019 pub checkpoints: Option<Vec<RunCheckpoint>>,
15020}
15021
15022#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15024pub enum ListRunsOrder {
15025 #[default]
15026 #[serde(rename = "asc")]
15027 Asc,
15028 #[serde(rename = "desc")]
15029 Desc,
15030 #[serde(untagged)]
15032 Other(String),
15033}
15034
15035impl ListRunsOrder {
15036 pub fn as_str(&self) -> &str {
15038 match self {
15039 Self::Asc => "asc",
15040 Self::Desc => "desc",
15041 Self::Other(value) => value.as_str(),
15042 }
15043 }
15044}
15045
15046impl std::fmt::Display for ListRunsOrder {
15047 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15048 f.write_str(self.as_str())
15049 }
15050}
15051
15052impl From<&str> for ListRunsOrder {
15053 fn from(value: &str) -> Self {
15054 match value {
15055 "asc" => Self::Asc,
15056 "desc" => Self::Desc,
15057 other => Self::Other(other.to_string()),
15058 }
15059 }
15060}
15061
15062#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15064pub struct ListRunsResponse {
15065 pub items: Vec<Run>,
15066 #[serde(default, skip_serializing_if = "Option::is_none")]
15068 pub cursor: Option<String>,
15069 pub has_more: bool,
15070}
15071
15072#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15074pub struct ListSchedulesResponse {
15075 pub schedules: Vec<ScheduleSummary>,
15076}
15077
15078#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15080pub struct ListSessionAnnotationsResponse {
15081 #[serde(default, skip_serializing_if = "Option::is_none")]
15082 pub items: Option<Vec<ListSessionAnnotationsResponseItem>>,
15083}
15084
15085#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15087pub struct ListSessionAnnotationsResponseItem {
15088 #[serde(default, skip_serializing_if = "Option::is_none")]
15089 pub id: Option<String>,
15090 #[serde(default, skip_serializing_if = "Option::is_none")]
15091 pub message_id: Option<String>,
15092 #[serde(default, skip_serializing_if = "Option::is_none")]
15093 pub content: Option<String>,
15094 #[serde(default, skip_serializing_if = "Option::is_none")]
15095 pub author: Option<String>,
15096 #[serde(default, skip_serializing_if = "Option::is_none")]
15097 pub created_at: Option<String>,
15098 #[serde(default, skip_serializing_if = "Option::is_none")]
15099 pub resolved: Option<bool>,
15100}
15101
15102#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15104pub struct ListSessionArtifactsResponse {
15105 #[serde(default, skip_serializing_if = "Option::is_none")]
15106 pub artifacts: Option<Vec<Artifact>>,
15107}
15108
15109#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15111pub struct ListSessionBranchesResponse {
15112 pub session_id: String,
15113 pub branches: Vec<SessionBranch>,
15114 #[serde(default, skip_serializing_if = "Option::is_none")]
15115 pub active_branch: Option<String>,
15116 pub total: i64,
15117}
15118
15119#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15121pub struct ListSessionDrawingsResponse {
15122 pub items: Vec<Drawing>,
15123 #[serde(default, skip_serializing_if = "Option::is_none")]
15124 pub cursor: Option<String>,
15125 pub has_more: bool,
15126}
15127
15128#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15130pub struct ListSessionsResponse {
15131 pub items: Vec<ListSessionsResponseItem>,
15132 #[serde(default)]
15133 pub cursor: Option<String>,
15134 pub has_more: bool,
15135}
15136
15137#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15139pub struct ListSessionsResponseItem {
15140 #[serde(default, skip_serializing_if = "Option::is_none")]
15141 pub created_by: Option<String>,
15142 pub session_id: String,
15143 pub tenant_id: String,
15144 pub agent_id: String,
15145 pub status: PublicSessionViewStatus,
15146 #[serde(default, skip_serializing_if = "Option::is_none")]
15147 pub conversation_history: Option<Vec<ConversationEntry>>,
15148 #[serde(default, skip_serializing_if = "Option::is_none")]
15149 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
15150 #[serde(default, skip_serializing_if = "Option::is_none")]
15151 pub runs: Option<Vec<String>>,
15152 #[serde(default, skip_serializing_if = "Option::is_none")]
15153 pub created_at: Option<String>,
15154 #[serde(default, skip_serializing_if = "Option::is_none")]
15155 pub updated_at: Option<String>,
15156 #[serde(default, skip_serializing_if = "Option::is_none")]
15157 pub expires_at: Option<String>,
15158 #[serde(default, skip_serializing_if = "Option::is_none")]
15160 pub team_id: Option<String>,
15161 #[serde(default, skip_serializing_if = "Option::is_none")]
15163 pub branches: Option<Vec<SessionBranch>>,
15164 #[serde(default, skip_serializing_if = "Option::is_none")]
15166 pub active_branch: Option<String>,
15167 #[serde(default, skip_serializing_if = "Option::is_none")]
15169 pub queue_mode: Option<SessionQueueMode>,
15170 #[serde(default, skip_serializing_if = "Option::is_none")]
15173 pub model_override: Option<ListSessionsResponseItemModelOverride>,
15174 #[serde(default, skip_serializing_if = "Option::is_none")]
15175 pub agent_name: Option<String>,
15176 #[serde(default, skip_serializing_if = "Option::is_none")]
15177 pub first_user_message: Option<String>,
15178 #[serde(default, skip_serializing_if = "Option::is_none")]
15179 pub last_message: Option<String>,
15180 #[serde(default, skip_serializing_if = "Option::is_none")]
15181 pub message_count: Option<i64>,
15182}
15183
15184#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15187pub struct ListSessionsResponseItemModelOverride {
15188 pub provider: String,
15189 pub model_ref: String,
15190 #[serde(default, skip_serializing_if = "Option::is_none")]
15191 pub endpoint_url: Option<String>,
15192 #[serde(default, skip_serializing_if = "Option::is_none")]
15193 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
15194}
15195
15196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15198pub struct ListSessionTodosResponse {
15199 #[serde(default, skip_serializing_if = "Option::is_none")]
15200 pub items: Option<Vec<Todo>>,
15201 #[serde(default, skip_serializing_if = "Option::is_none")]
15203 pub todos: Option<Vec<Todo>>,
15204 #[serde(default, skip_serializing_if = "Option::is_none")]
15205 pub total: Option<i64>,
15206}
15207
15208#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15210pub struct ListSquadGraphEdgesResponse {
15211 #[serde(default, skip_serializing_if = "Option::is_none")]
15212 pub edges: Option<Vec<TeamGraphEdge>>,
15213 #[serde(default, skip_serializing_if = "Option::is_none")]
15214 pub total: Option<i64>,
15215}
15216
15217#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15219pub struct ListSquadGraphNodesResponse {
15220 #[serde(default, skip_serializing_if = "Option::is_none")]
15221 pub nodes: Option<Vec<TeamGraphNode>>,
15222 #[serde(default, skip_serializing_if = "Option::is_none")]
15223 pub total: Option<i64>,
15224}
15225
15226#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15228pub struct ListSquadRunsResponse {
15229 #[serde(default, skip_serializing_if = "Option::is_none")]
15230 pub team_id: Option<String>,
15231 #[serde(default, skip_serializing_if = "Option::is_none")]
15232 pub runs: Option<Vec<TeamRunSummary>>,
15233 #[serde(default, skip_serializing_if = "Option::is_none")]
15234 pub total: Option<i64>,
15235}
15236
15237#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15239pub struct ListSquadsResponse {
15240 pub items: Vec<Team>,
15241 #[serde(default, skip_serializing_if = "Option::is_none")]
15243 pub teams: Option<Vec<Team>>,
15244 #[serde(default, skip_serializing_if = "Option::is_none")]
15245 pub total: Option<i64>,
15246}
15247
15248#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15250pub struct ListSubscriptionsResponse {
15251 #[serde(default, skip_serializing_if = "Option::is_none")]
15252 pub subscriptions: Option<Vec<MarketplaceSubscription>>,
15253}
15254
15255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15257pub struct ListTeamGraphEdgesResponse {
15258 #[serde(default, skip_serializing_if = "Option::is_none")]
15259 pub edges: Option<Vec<TeamGraphEdge>>,
15260 #[serde(default, skip_serializing_if = "Option::is_none")]
15261 pub total: Option<i64>,
15262}
15263
15264#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15266pub struct ListTeamGraphNodesResponse {
15267 #[serde(default, skip_serializing_if = "Option::is_none")]
15268 pub nodes: Option<Vec<TeamGraphNode>>,
15269 #[serde(default, skip_serializing_if = "Option::is_none")]
15270 pub total: Option<i64>,
15271}
15272
15273#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15275pub struct ListTeamRunsResponse {
15276 #[serde(default, skip_serializing_if = "Option::is_none")]
15277 pub team_id: Option<String>,
15278 #[serde(default, skip_serializing_if = "Option::is_none")]
15279 pub runs: Option<Vec<TeamRunSummary>>,
15280 #[serde(default, skip_serializing_if = "Option::is_none")]
15282 pub total: Option<i64>,
15283 #[serde(default, skip_serializing_if = "Option::is_none")]
15285 pub cursor: Option<String>,
15286 #[serde(default, skip_serializing_if = "Option::is_none")]
15287 pub has_more: Option<bool>,
15288}
15289
15290#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15292pub struct ListTeamsResponse {
15293 pub items: Vec<Team>,
15294 #[serde(default, skip_serializing_if = "Option::is_none")]
15296 pub teams: Option<Vec<Team>>,
15297 #[serde(default, skip_serializing_if = "Option::is_none")]
15298 pub total: Option<i64>,
15299}
15300
15301#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15303pub struct ListTenantsResponse {
15304 #[serde(default, skip_serializing_if = "Option::is_none")]
15305 pub tenants: Option<Vec<Tenant>>,
15306 #[serde(default, skip_serializing_if = "Option::is_none")]
15307 pub total: Option<i64>,
15308}
15309
15310#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15312pub struct ListTodosResponse {
15313 #[serde(default, skip_serializing_if = "Option::is_none")]
15314 pub todos: Option<Vec<Todo>>,
15315}
15316
15317#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15319pub struct ListUsersResponse {
15320 #[serde(default, skip_serializing_if = "Option::is_none")]
15321 pub items: Option<Vec<TenantUser>>,
15322 #[serde(default, skip_serializing_if = "Option::is_none")]
15324 pub users: Option<Vec<TenantUser>>,
15325 #[serde(default, skip_serializing_if = "Option::is_none")]
15326 pub total: Option<i64>,
15327}
15328
15329#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15331pub struct ListVideoProvidersResponse {
15332 #[serde(default, skip_serializing_if = "Option::is_none")]
15333 pub providers: Option<Vec<VideoProvider>>,
15334}
15335
15336#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15338pub struct ListVotingProposalsResponse {
15339 #[serde(default, skip_serializing_if = "Option::is_none")]
15340 pub proposals: Option<Vec<VotingProposal>>,
15341}
15342
15343#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15345pub struct ListWebhookDeliveriesResponse {
15346 pub webhook_id: String,
15347 pub deliveries: Vec<WebhookDeliveryAttempt>,
15348 pub total: i64,
15349}
15350
15351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15353pub struct ListWebhooksResponse {
15354 pub webhooks: Vec<WebhookSubscription>,
15355 pub total: i64,
15356}
15357
15358#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15360pub struct ListWorkspaceFileHistoryResponse {
15361 pub path: String,
15363 pub versions: Vec<WorkspaceFileVersion>,
15364 pub total: i64,
15365}
15366
15367#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15373pub struct ListWorkspaceFilesResponse {
15374 pub workspace_id: String,
15375 pub path: String,
15377 pub directories: Vec<String>,
15378 pub files: Vec<ListWorkspaceFilesResponseFile>,
15379}
15380
15381#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15383pub struct ListWorkspaceFilesResponseFile {
15384 pub file_id: String,
15385 pub path: String,
15386 pub filename: String,
15387 pub mime_type: String,
15388 pub size_bytes: i64,
15389 #[serde(default, skip_serializing_if = "Option::is_none")]
15390 pub created_at: Option<String>,
15391 #[serde(default, skip_serializing_if = "Option::is_none")]
15393 pub updated_at: Option<String>,
15394 #[serde(default, skip_serializing_if = "Option::is_none")]
15399 pub etag: Option<String>,
15400}
15401
15402#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15404pub struct ListWorkspacesResponse {
15405 pub workspaces: Vec<Workspace>,
15406 #[serde(default, skip_serializing_if = "Option::is_none")]
15407 pub total: Option<i64>,
15408}
15409
15410#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15412pub struct ListWorkspaceTrashResponse {
15413 #[serde(default, skip_serializing_if = "Option::is_none")]
15414 pub items: Option<Vec<TrashManifestEntry>>,
15415}
15416
15417#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15419pub struct LLMModel {
15420 pub display_name: String,
15421 pub id: String,
15422 pub max_context_tokens: i64,
15423 pub max_output_tokens: i64,
15424 pub pricing: serde_json::Map<String, serde_json::Value>,
15425 pub provider: String,
15426 pub supports_json_mode: bool,
15427 pub supports_streaming: bool,
15428 pub supports_tool_calls: bool,
15429 pub supports_vision: bool,
15430 pub tier: String,
15431}
15432
15433#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15435pub struct LLMProvider {
15436 pub id: String,
15437 pub name: String,
15438 #[serde(default, skip_serializing_if = "Option::is_none")]
15439 pub canonical: Option<String>,
15440 pub configured: bool,
15441 #[serde(default, skip_serializing_if = "Option::is_none")]
15442 pub configured_level: Option<String>,
15443 #[serde(default, skip_serializing_if = "Option::is_none")]
15444 pub default_endpoint: Option<String>,
15445 #[serde(default, skip_serializing_if = "Option::is_none")]
15446 pub api_key_env: Option<String>,
15447 #[serde(default, skip_serializing_if = "Option::is_none")]
15448 pub local: Option<bool>,
15449}
15450
15451#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15453pub struct LLMSynthesizeSpeechRequest {
15454 #[serde(default, skip_serializing_if = "Option::is_none")]
15455 pub model: Option<String>,
15456 pub input: String,
15457 #[serde(default, skip_serializing_if = "Option::is_none")]
15458 pub voice: Option<String>,
15459 #[serde(default, skip_serializing_if = "Option::is_none")]
15467 pub response_format: Option<String>,
15468}
15469
15470#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15472pub struct LLMTranscribeAudioRequest {
15473 pub file: FilePart,
15474 #[serde(default, skip_serializing_if = "Option::is_none")]
15475 pub model: Option<String>,
15476 #[serde(default, skip_serializing_if = "Option::is_none")]
15477 pub language: Option<String>,
15478}
15479
15480#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15484pub struct LLMTranscribeAudioResponse {
15485 #[serde(default, skip_serializing_if = "Option::is_none")]
15486 pub text: Option<String>,
15487 #[serde(flatten)]
15489 pub extra: HashMap<String, serde_json::Value>,
15490}
15491
15492#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15494pub struct LLMUsageSummary {
15495 #[serde(default, skip_serializing_if = "Option::is_none")]
15496 pub billing_period: Option<LLMUsageSummaryBillingPeriod>,
15497 #[serde(default, skip_serializing_if = "Option::is_none")]
15498 pub by_model: Option<Vec<String>>,
15499 #[serde(default, skip_serializing_if = "Option::is_none")]
15500 pub limits: Option<LLMUsageSummaryLimits>,
15501 #[serde(default, skip_serializing_if = "Option::is_none")]
15502 pub plan: Option<String>,
15503 #[serde(default, skip_serializing_if = "Option::is_none")]
15504 pub usage: Option<LLMUsageSummaryUsage>,
15505}
15506
15507#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15509pub struct LLMUsageSummaryBillingPeriod {
15510 #[serde(default, skip_serializing_if = "Option::is_none")]
15511 pub end: Option<String>,
15512 #[serde(default, skip_serializing_if = "Option::is_none")]
15513 pub start: Option<String>,
15514}
15515
15516#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15518pub struct LLMUsageSummaryLimits {
15519 #[serde(default, skip_serializing_if = "Option::is_none")]
15520 pub requests_per_day: Option<i64>,
15521 #[serde(default, skip_serializing_if = "Option::is_none")]
15522 pub requests_per_hour: Option<i64>,
15523 #[serde(default, skip_serializing_if = "Option::is_none")]
15524 pub requests_per_minute: Option<i64>,
15525 #[serde(default, skip_serializing_if = "Option::is_none")]
15526 pub tokens_per_month: Option<i64>,
15527}
15528
15529#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15531pub struct LLMUsageSummaryUsage {
15532 #[serde(default, skip_serializing_if = "Option::is_none")]
15533 pub requests_this_hour: Option<i64>,
15534 #[serde(default, skip_serializing_if = "Option::is_none")]
15535 pub requests_this_minute: Option<i64>,
15536 #[serde(default, skip_serializing_if = "Option::is_none")]
15537 pub requests_today: Option<i64>,
15538 #[serde(default, skip_serializing_if = "Option::is_none")]
15539 pub tokens_remaining: Option<i64>,
15540 #[serde(default, skip_serializing_if = "Option::is_none")]
15541 pub tokens_used: Option<i64>,
15542}
15543
15544#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15546pub struct LocateMyAgentResponse {
15547 pub tenant_id: String,
15548}
15549
15550#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15552pub struct LogoutResponse {
15553 pub ok: bool,
15554 #[serde(default, skip_serializing_if = "Option::is_none")]
15555 pub key_id: Option<String>,
15556 #[serde(default, skip_serializing_if = "Option::is_none")]
15557 pub already_revoked: Option<bool>,
15558}
15559
15560#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15562pub struct MaintenanceState {
15563 pub enabled: bool,
15564 #[serde(default, skip_serializing_if = "Option::is_none")]
15567 pub message: Option<String>,
15568 #[serde(default, skip_serializing_if = "Option::is_none")]
15570 pub enabled_at: Option<String>,
15571 #[serde(default, skip_serializing_if = "Option::is_none")]
15573 pub enabled_by_email: Option<String>,
15574}
15575
15576#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15580pub struct MaintenanceStatus {
15581 pub enabled: bool,
15582 #[serde(default, skip_serializing_if = "Option::is_none")]
15584 pub message: Option<String>,
15585}
15586
15587#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15589pub struct MarkAllNotificationsReadResponse {
15590 #[serde(default, skip_serializing_if = "Option::is_none")]
15591 pub marked: Option<i64>,
15592}
15593
15594#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15596pub struct MarketplaceInvocation {
15597 pub invocation_id: String,
15598 pub caller_tenant_id: String,
15599 pub publisher_tenant_id: String,
15600 pub listing_id: String,
15601 pub agent_id: String,
15602 pub agent_version: String,
15603 pub input: serde_json::Map<String, serde_json::Value>,
15604 pub status: MarketplaceInvocationStatus,
15605 #[serde(default, skip_serializing_if = "Option::is_none")]
15606 pub output: Option<serde_json::Map<String, serde_json::Value>>,
15607 #[serde(default, skip_serializing_if = "Option::is_none")]
15608 pub metrics: Option<serde_json::Map<String, serde_json::Value>>,
15609 #[serde(default, skip_serializing_if = "Option::is_none")]
15611 pub revenue_error: Option<String>,
15612 pub created_at: String,
15613 #[serde(default, skip_serializing_if = "Option::is_none")]
15614 pub completed_at: Option<String>,
15615}
15616
15617#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15619pub enum MarketplaceInvocationStatus {
15620 #[default]
15621 #[serde(rename = "pending")]
15622 Pending,
15623 #[serde(rename = "running")]
15624 Running,
15625 #[serde(rename = "completed")]
15626 Completed,
15627 #[serde(rename = "failed")]
15628 Failed,
15629 #[serde(untagged)]
15631 Other(String),
15632}
15633
15634impl MarketplaceInvocationStatus {
15635 pub fn as_str(&self) -> &str {
15637 match self {
15638 Self::Pending => "pending",
15639 Self::Running => "running",
15640 Self::Completed => "completed",
15641 Self::Failed => "failed",
15642 Self::Other(value) => value.as_str(),
15643 }
15644 }
15645}
15646
15647impl std::fmt::Display for MarketplaceInvocationStatus {
15648 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15649 f.write_str(self.as_str())
15650 }
15651}
15652
15653impl From<&str> for MarketplaceInvocationStatus {
15654 fn from(value: &str) -> Self {
15655 match value {
15656 "pending" => Self::Pending,
15657 "running" => Self::Running,
15658 "completed" => Self::Completed,
15659 "failed" => Self::Failed,
15660 other => Self::Other(other.to_string()),
15661 }
15662 }
15663}
15664
15665#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15667pub struct MarketplaceListing {
15668 pub listing_id: String,
15669 pub tenant_id: String,
15670 pub agent_id: String,
15671 pub agent_version: String,
15672 pub name: String,
15673 pub description: String,
15674 pub category: MarketplaceListingCategory,
15675 pub tags: Vec<String>,
15676 #[serde(default, skip_serializing_if = "Option::is_none")]
15677 pub icon_url: Option<String>,
15678 pub readme: String,
15679 pub pricing: MarketplaceListingPricing,
15680 pub stats: MarketplaceListingStats,
15681 pub status: MarketplaceListingStatus,
15682 pub a2a_enabled: bool,
15683 #[serde(default, skip_serializing_if = "Option::is_none")]
15684 pub program_id: Option<String>,
15685 pub created_at: String,
15686 pub updated_at: String,
15687}
15688
15689#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15691pub enum MarketplaceListingCategory {
15692 #[default]
15693 #[serde(rename = "coding")]
15694 Coding,
15695 #[serde(rename = "writing")]
15696 Writing,
15697 #[serde(rename = "research")]
15698 Research,
15699 #[serde(rename = "data")]
15700 Data,
15701 #[serde(rename = "automation")]
15702 Automation,
15703 #[serde(rename = "creative")]
15704 Creative,
15705 #[serde(rename = "education")]
15706 Education,
15707 #[serde(rename = "business")]
15708 Business,
15709 #[serde(rename = "other")]
15710 Other,
15711 #[serde(untagged)]
15713 Unknown(String),
15714}
15715
15716impl MarketplaceListingCategory {
15717 pub fn as_str(&self) -> &str {
15719 match self {
15720 Self::Coding => "coding",
15721 Self::Writing => "writing",
15722 Self::Research => "research",
15723 Self::Data => "data",
15724 Self::Automation => "automation",
15725 Self::Creative => "creative",
15726 Self::Education => "education",
15727 Self::Business => "business",
15728 Self::Other => "other",
15729 Self::Unknown(value) => value.as_str(),
15730 }
15731 }
15732}
15733
15734impl std::fmt::Display for MarketplaceListingCategory {
15735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15736 f.write_str(self.as_str())
15737 }
15738}
15739
15740impl From<&str> for MarketplaceListingCategory {
15741 fn from(value: &str) -> Self {
15742 match value {
15743 "coding" => Self::Coding,
15744 "writing" => Self::Writing,
15745 "research" => Self::Research,
15746 "data" => Self::Data,
15747 "automation" => Self::Automation,
15748 "creative" => Self::Creative,
15749 "education" => Self::Education,
15750 "business" => Self::Business,
15751 "other" => Self::Other,
15752 other => Self::Unknown(other.to_string()),
15753 }
15754 }
15755}
15756
15757#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15759pub struct MarketplaceListingPricing {
15760 pub model: MarketplaceListingPricingModel,
15761 #[serde(default, skip_serializing_if = "Option::is_none")]
15762 pub price_per_run_usd: Option<f64>,
15763 #[serde(default, skip_serializing_if = "Option::is_none")]
15764 pub price_per_1k_tokens_usd: Option<f64>,
15765 #[serde(default, skip_serializing_if = "Option::is_none")]
15766 pub stripe_price_id: Option<String>,
15767}
15768
15769#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15771pub enum MarketplaceListingPricingModel {
15772 #[default]
15773 #[serde(rename = "free")]
15774 Free,
15775 #[serde(rename = "per_run")]
15776 PerRun,
15777 #[serde(rename = "per_token")]
15778 PerToken,
15779 #[serde(rename = "subscription")]
15780 Subscription,
15781 #[serde(untagged)]
15783 Other(String),
15784}
15785
15786impl MarketplaceListingPricingModel {
15787 pub fn as_str(&self) -> &str {
15789 match self {
15790 Self::Free => "free",
15791 Self::PerRun => "per_run",
15792 Self::PerToken => "per_token",
15793 Self::Subscription => "subscription",
15794 Self::Other(value) => value.as_str(),
15795 }
15796 }
15797}
15798
15799impl std::fmt::Display for MarketplaceListingPricingModel {
15800 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15801 f.write_str(self.as_str())
15802 }
15803}
15804
15805impl From<&str> for MarketplaceListingPricingModel {
15806 fn from(value: &str) -> Self {
15807 match value {
15808 "free" => Self::Free,
15809 "per_run" => Self::PerRun,
15810 "per_token" => Self::PerToken,
15811 "subscription" => Self::Subscription,
15812 other => Self::Other(other.to_string()),
15813 }
15814 }
15815}
15816
15817#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15819pub struct MarketplaceListingRating {
15820 pub rating_id: String,
15821 pub listing_id: String,
15822 #[serde(default, skip_serializing_if = "Option::is_none")]
15823 pub tenant_id: Option<String>,
15824 pub rating: i64,
15825 #[serde(default, skip_serializing_if = "Option::is_none")]
15826 pub review: Option<String>,
15827 #[serde(default, skip_serializing_if = "Option::is_none")]
15828 pub comment: Option<String>,
15829 pub created_at: String,
15830}
15831
15832#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15834pub struct MarketplaceListingStats {
15835 pub total_runs: i64,
15836 pub avg_rating: f64,
15837 pub total_ratings: i64,
15838 pub avg_latency_ms: f64,
15839 pub success_rate: f64,
15840}
15841
15842#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15844pub enum MarketplaceListingStatus {
15845 #[default]
15846 #[serde(rename = "draft")]
15847 Draft,
15848 #[serde(rename = "published")]
15849 Published,
15850 #[serde(rename = "suspended")]
15851 Suspended,
15852 #[serde(rename = "archived")]
15853 Archived,
15854 #[serde(untagged)]
15856 Other(String),
15857}
15858
15859impl MarketplaceListingStatus {
15860 pub fn as_str(&self) -> &str {
15862 match self {
15863 Self::Draft => "draft",
15864 Self::Published => "published",
15865 Self::Suspended => "suspended",
15866 Self::Archived => "archived",
15867 Self::Other(value) => value.as_str(),
15868 }
15869 }
15870}
15871
15872impl std::fmt::Display for MarketplaceListingStatus {
15873 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15874 f.write_str(self.as_str())
15875 }
15876}
15877
15878impl From<&str> for MarketplaceListingStatus {
15879 fn from(value: &str) -> Self {
15880 match value {
15881 "draft" => Self::Draft,
15882 "published" => Self::Published,
15883 "suspended" => Self::Suspended,
15884 "archived" => Self::Archived,
15885 other => Self::Other(other.to_string()),
15886 }
15887 }
15888}
15889
15890#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15894pub struct MarketplaceSubscription {
15895 pub listing_id: String,
15896 pub status: MarketplaceSubscriptionStatus,
15897 #[serde(default, skip_serializing_if = "Option::is_none")]
15902 pub stripe_subscription_id: Option<String>,
15903 pub created_at: String,
15904 #[serde(default, skip_serializing_if = "Option::is_none")]
15905 pub updated_at: Option<String>,
15906}
15907
15908#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
15910pub enum MarketplaceSubscriptionStatus {
15911 #[default]
15912 #[serde(rename = "active")]
15913 Active,
15914 #[serde(rename = "cancelled")]
15915 Cancelled,
15916 #[serde(untagged)]
15918 Other(String),
15919}
15920
15921impl MarketplaceSubscriptionStatus {
15922 pub fn as_str(&self) -> &str {
15924 match self {
15925 Self::Active => "active",
15926 Self::Cancelled => "cancelled",
15927 Self::Other(value) => value.as_str(),
15928 }
15929 }
15930}
15931
15932impl std::fmt::Display for MarketplaceSubscriptionStatus {
15933 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15934 f.write_str(self.as_str())
15935 }
15936}
15937
15938impl From<&str> for MarketplaceSubscriptionStatus {
15939 fn from(value: &str) -> Self {
15940 match value {
15941 "active" => Self::Active,
15942 "cancelled" => Self::Cancelled,
15943 other => Self::Other(other.to_string()),
15944 }
15945 }
15946}
15947
15948#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15950pub struct MarkNotificationReadResponse {
15951 pub ok: bool,
15952}
15953
15954#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15956pub struct MaterializeCanvasSquadRequest {
15957 pub supervisor_agent_id: String,
15958 #[serde(default, skip_serializing_if = "Option::is_none")]
15960 pub worker_ids: Option<Vec<String>>,
15961}
15962
15963#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15965pub struct MaterializeCanvasSquadResponse {
15966 pub team_id: String,
15967 pub created: bool,
15968 pub worker_count: i64,
15969}
15970
15971#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15973pub struct McpjsonRpcRequest {
15974 pub jsonrpc: String,
15976 pub method: String,
15977 #[serde(default, skip_serializing_if = "Option::is_none")]
15978 pub params: Option<serde_json::Map<String, serde_json::Value>>,
15979 #[serde(default, skip_serializing_if = "Option::is_none")]
15980 pub id: Option<serde_json::Value>,
15981}
15982
15983#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
15986pub struct MCPServer {
15987 pub id: String,
15988 pub name: String,
15989 pub transport: MCPTransport,
15990 #[serde(default, skip_serializing_if = "Option::is_none")]
15992 pub command: Option<String>,
15993 #[serde(default, skip_serializing_if = "Option::is_none")]
15994 pub args: Option<Vec<String>>,
15995 #[serde(default, skip_serializing_if = "Option::is_none")]
15997 pub url: Option<String>,
15998 #[serde(default, skip_serializing_if = "Option::is_none")]
15999 pub api_key_ref: Option<String>,
16000 #[serde(default, skip_serializing_if = "Option::is_none")]
16001 pub auth: Option<MCPServerAuth>,
16002 #[serde(default, skip_serializing_if = "Option::is_none")]
16006 pub assigned_agent_ids: Option<Vec<String>>,
16007 #[serde(default, skip_serializing_if = "Option::is_none")]
16009 pub env_count: Option<i64>,
16010 #[serde(default, skip_serializing_if = "Option::is_none")]
16011 pub egress_allowlist: Option<Vec<EgressRule>>,
16012 pub enabled: bool,
16013 #[serde(default, skip_serializing_if = "Option::is_none")]
16015 pub capabilities: Option<Vec<String>>,
16016 #[serde(default, skip_serializing_if = "Option::is_none")]
16017 pub status: Option<MCPServerStatus>,
16018 #[serde(default, skip_serializing_if = "Option::is_none")]
16019 pub last_synced: Option<String>,
16020 #[serde(default, skip_serializing_if = "Option::is_none")]
16021 pub tenant_id: Option<String>,
16022}
16023
16024#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16028pub struct MCPServerAuth {
16029 pub r#type: MCPServerAuthType,
16030 #[serde(default, skip_serializing_if = "Option::is_none")]
16033 pub header: Option<String>,
16034 #[serde(default, skip_serializing_if = "Option::is_none")]
16036 pub prefix: Option<String>,
16037 #[serde(default, skip_serializing_if = "Option::is_none")]
16039 pub env_key: Option<String>,
16040}
16041
16042#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16044pub enum MCPServerAuthType {
16045 #[default]
16046 #[serde(rename = "none")]
16047 None,
16048 #[serde(rename = "api_key")]
16049 APIKey,
16050 #[serde(untagged)]
16052 Other(String),
16053}
16054
16055impl MCPServerAuthType {
16056 pub fn as_str(&self) -> &str {
16058 match self {
16059 Self::None => "none",
16060 Self::APIKey => "api_key",
16061 Self::Other(value) => value.as_str(),
16062 }
16063 }
16064}
16065
16066impl std::fmt::Display for MCPServerAuthType {
16067 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16068 f.write_str(self.as_str())
16069 }
16070}
16071
16072impl From<&str> for MCPServerAuthType {
16073 fn from(value: &str) -> Self {
16074 match value {
16075 "none" => Self::None,
16076 "api_key" => Self::APIKey,
16077 other => Self::Other(other.to_string()),
16078 }
16079 }
16080}
16081
16082#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16084pub enum MCPServerStatus {
16085 #[default]
16086 #[serde(rename = "active")]
16087 Active,
16088 #[serde(rename = "error")]
16089 Error,
16090 #[serde(rename = "disabled")]
16091 Disabled,
16092 #[serde(untagged)]
16094 Other(String),
16095}
16096
16097impl MCPServerStatus {
16098 pub fn as_str(&self) -> &str {
16100 match self {
16101 Self::Active => "active",
16102 Self::Error => "error",
16103 Self::Disabled => "disabled",
16104 Self::Other(value) => value.as_str(),
16105 }
16106 }
16107}
16108
16109impl std::fmt::Display for MCPServerStatus {
16110 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16111 f.write_str(self.as_str())
16112 }
16113}
16114
16115impl From<&str> for MCPServerStatus {
16116 fn from(value: &str) -> Self {
16117 match value {
16118 "active" => Self::Active,
16119 "error" => Self::Error,
16120 "disabled" => Self::Disabled,
16121 other => Self::Other(other.to_string()),
16122 }
16123 }
16124}
16125
16126#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16128pub struct MCPServerTestResult {
16129 pub ok: bool,
16130 pub status: String,
16132 #[serde(default, skip_serializing_if = "Option::is_none")]
16134 pub tool_count: Option<i64>,
16135 #[serde(default, skip_serializing_if = "Option::is_none")]
16137 pub tools: Option<Vec<MCPTestTool>>,
16138 #[serde(default, skip_serializing_if = "Option::is_none")]
16140 pub error: Option<String>,
16141 pub latency_ms: i64,
16142}
16143
16144#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16146pub struct MCPServerWithConnectResult {
16147 pub id: String,
16148 pub name: String,
16149 pub transport: MCPTransport,
16150 #[serde(default, skip_serializing_if = "Option::is_none")]
16152 pub command: Option<String>,
16153 #[serde(default, skip_serializing_if = "Option::is_none")]
16154 pub args: Option<Vec<String>>,
16155 #[serde(default, skip_serializing_if = "Option::is_none")]
16157 pub url: Option<String>,
16158 #[serde(default, skip_serializing_if = "Option::is_none")]
16159 pub api_key_ref: Option<String>,
16160 #[serde(default, skip_serializing_if = "Option::is_none")]
16161 pub auth: Option<MCPServerAuth>,
16162 #[serde(default, skip_serializing_if = "Option::is_none")]
16166 pub assigned_agent_ids: Option<Vec<String>>,
16167 #[serde(default, skip_serializing_if = "Option::is_none")]
16169 pub env_count: Option<i64>,
16170 #[serde(default, skip_serializing_if = "Option::is_none")]
16171 pub egress_allowlist: Option<Vec<EgressRule>>,
16172 pub enabled: bool,
16173 #[serde(default, skip_serializing_if = "Option::is_none")]
16175 pub capabilities: Option<Vec<String>>,
16176 #[serde(default, skip_serializing_if = "Option::is_none")]
16177 pub status: Option<MCPServerStatus>,
16178 #[serde(default, skip_serializing_if = "Option::is_none")]
16179 pub last_synced: Option<String>,
16180 #[serde(default, skip_serializing_if = "Option::is_none")]
16181 pub tenant_id: Option<String>,
16182 #[serde(default, skip_serializing_if = "Option::is_none")]
16185 pub connect_error: Option<String>,
16186}
16187
16188#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16190pub struct MCPTestTool {
16191 pub name: String,
16192 pub description: String,
16193}
16194
16195#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16197pub enum MCPTransport {
16198 #[default]
16199 #[serde(rename = "stdio")]
16200 Stdio,
16201 #[serde(rename = "http")]
16202 HTTP,
16203 #[serde(rename = "streamable_http")]
16204 StreamableHTTP,
16205 #[serde(untagged)]
16207 Other(String),
16208}
16209
16210impl MCPTransport {
16211 pub fn as_str(&self) -> &str {
16213 match self {
16214 Self::Stdio => "stdio",
16215 Self::HTTP => "http",
16216 Self::StreamableHTTP => "streamable_http",
16217 Self::Other(value) => value.as_str(),
16218 }
16219 }
16220}
16221
16222impl std::fmt::Display for MCPTransport {
16223 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16224 f.write_str(self.as_str())
16225 }
16226}
16227
16228impl From<&str> for MCPTransport {
16229 fn from(value: &str) -> Self {
16230 match value {
16231 "stdio" => Self::Stdio,
16232 "http" => Self::HTTP,
16233 "streamable_http" => Self::StreamableHTTP,
16234 other => Self::Other(other.to_string()),
16235 }
16236 }
16237}
16238
16239#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16241pub struct MediaProvider {
16242 pub id: String,
16243 pub name: String,
16244 pub configured: bool,
16245 pub local: bool,
16246 pub models: Vec<ModelInfo>,
16247}
16248
16249#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16251pub struct MemoryEntry {
16252 #[serde(default, skip_serializing_if = "Option::is_none")]
16253 pub agent_id: Option<String>,
16254 #[serde(default, skip_serializing_if = "Option::is_none")]
16255 pub tenant_id: Option<String>,
16256 #[serde(default, skip_serializing_if = "Option::is_none")]
16257 pub access_count: Option<i64>,
16258 #[serde(default, skip_serializing_if = "Option::is_none")]
16259 pub last_accessed_at: Option<String>,
16260 #[serde(default, skip_serializing_if = "Option::is_none")]
16261 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
16262 #[serde(default, skip_serializing_if = "Option::is_none")]
16264 pub run_outcome: Option<String>,
16265 #[serde(default, skip_serializing_if = "Option::is_none")]
16267 pub entity_name: Option<String>,
16268 #[serde(default, skip_serializing_if = "Option::is_none")]
16270 pub entity_type: Option<String>,
16271 pub entry_id: String,
16272 #[serde(default, skip_serializing_if = "Option::is_none")]
16273 pub r#type: Option<MemoryEntryType>,
16274 pub content: String,
16275 #[serde(default, skip_serializing_if = "Option::is_none")]
16276 pub tags: Option<Vec<String>>,
16277 #[serde(default, skip_serializing_if = "Option::is_none")]
16278 pub relevance_score: Option<f64>,
16279 #[serde(default, skip_serializing_if = "Option::is_none")]
16280 pub created_at: Option<String>,
16281 #[serde(default, skip_serializing_if = "Option::is_none")]
16282 pub source_run_id: Option<String>,
16283}
16284
16285#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16287pub enum MemoryEntryType {
16288 #[default]
16289 #[serde(rename = "episodic")]
16290 Episodic,
16291 #[serde(rename = "semantic")]
16292 Semantic,
16293 #[serde(rename = "procedural")]
16294 Procedural,
16295 #[serde(rename = "note")]
16296 Note,
16297 #[serde(untagged)]
16299 Other(String),
16300}
16301
16302impl MemoryEntryType {
16303 pub fn as_str(&self) -> &str {
16305 match self {
16306 Self::Episodic => "episodic",
16307 Self::Semantic => "semantic",
16308 Self::Procedural => "procedural",
16309 Self::Note => "note",
16310 Self::Other(value) => value.as_str(),
16311 }
16312 }
16313}
16314
16315impl std::fmt::Display for MemoryEntryType {
16316 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16317 f.write_str(self.as_str())
16318 }
16319}
16320
16321impl From<&str> for MemoryEntryType {
16322 fn from(value: &str) -> Self {
16323 match value {
16324 "episodic" => Self::Episodic,
16325 "semantic" => Self::Semantic,
16326 "procedural" => Self::Procedural,
16327 "note" => Self::Note,
16328 other => Self::Other(other.to_string()),
16329 }
16330 }
16331}
16332
16333#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16335pub struct MemoryImportEntry {
16336 pub content: String,
16337 #[serde(default, skip_serializing_if = "Option::is_none")]
16338 pub r#type: Option<String>,
16339 #[serde(default, skip_serializing_if = "Option::is_none")]
16340 pub tags: Option<Vec<String>>,
16341 #[serde(default, skip_serializing_if = "Option::is_none")]
16342 pub created_at: Option<String>,
16343}
16344
16345#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16348pub struct MfaEnrolment {
16349 pub otpauth_url: String,
16350 pub secret: String,
16351 pub recovery_codes: Vec<String>,
16352}
16353
16354#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16356pub struct MintLoginNonceResponse {
16357 pub nonce: String,
16359 pub expires_in_s: i64,
16361}
16362
16363#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16365pub struct MintSSETokenResponse {
16366 pub token: String,
16368 pub expires_at: String,
16369}
16370
16371#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16375pub struct Mission {
16376 pub mission_id: String,
16377 pub tenant_id: String,
16378 pub session_id: String,
16380 pub created_by: String,
16382 pub goal: String,
16384 pub classification: MissionClassification,
16386 pub status: MissionStatus,
16388 pub objective_ids: Vec<String>,
16390 pub checkpoint_ids: Vec<String>,
16392 #[serde(default, skip_serializing_if = "Option::is_none")]
16394 pub aar_id: Option<String>,
16395 #[serde(default, skip_serializing_if = "Option::is_none")]
16396 pub metrics: Option<MissionMetrics>,
16397 #[serde(default, skip_serializing_if = "Option::is_none")]
16399 pub outcome: Option<MissionOutcome>,
16400 #[serde(default, skip_serializing_if = "Option::is_none")]
16401 pub result_summary: Option<String>,
16402 #[serde(default, skip_serializing_if = "Option::is_none")]
16404 pub failed_objective_ids: Option<Vec<String>>,
16405 #[serde(default, skip_serializing_if = "Option::is_none")]
16407 pub deadline: Option<String>,
16408 pub created_at: String,
16409 pub updated_at: String,
16410 #[serde(default, skip_serializing_if = "Option::is_none")]
16412 pub started_at: Option<String>,
16413 #[serde(default, skip_serializing_if = "Option::is_none")]
16415 pub completed_at: Option<String>,
16416}
16417
16418#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16420pub enum MissionClassification {
16421 #[default]
16422 #[serde(rename = "quick_reply")]
16423 QuickReply,
16424 #[serde(rename = "mission")]
16425 Mission,
16426 #[serde(untagged)]
16428 Other(String),
16429}
16430
16431impl MissionClassification {
16432 pub fn as_str(&self) -> &str {
16434 match self {
16435 Self::QuickReply => "quick_reply",
16436 Self::Mission => "mission",
16437 Self::Other(value) => value.as_str(),
16438 }
16439 }
16440}
16441
16442impl std::fmt::Display for MissionClassification {
16443 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16444 f.write_str(self.as_str())
16445 }
16446}
16447
16448impl From<&str> for MissionClassification {
16449 fn from(value: &str) -> Self {
16450 match value {
16451 "quick_reply" => Self::QuickReply,
16452 "mission" => Self::Mission,
16453 other => Self::Other(other.to_string()),
16454 }
16455 }
16456}
16457
16458#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16461pub struct MissionMetrics {
16462 pub total_cost_usd: f64,
16463 pub total_tokens: i64,
16464 pub total_duration_ms: i64,
16465 pub llm_calls: i64,
16466 pub retries: i64,
16468}
16469
16470#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16472pub enum MissionOutcome {
16473 #[default]
16474 #[serde(rename = "success")]
16475 Success,
16476 #[serde(rename = "partial")]
16477 Partial,
16478 #[serde(rename = "failed")]
16479 Failed,
16480 #[serde(rename = "aborted")]
16481 Aborted,
16482 #[serde(untagged)]
16484 Other(String),
16485}
16486
16487impl MissionOutcome {
16488 pub fn as_str(&self) -> &str {
16490 match self {
16491 Self::Success => "success",
16492 Self::Partial => "partial",
16493 Self::Failed => "failed",
16494 Self::Aborted => "aborted",
16495 Self::Other(value) => value.as_str(),
16496 }
16497 }
16498}
16499
16500impl std::fmt::Display for MissionOutcome {
16501 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16502 f.write_str(self.as_str())
16503 }
16504}
16505
16506impl From<&str> for MissionOutcome {
16507 fn from(value: &str) -> Self {
16508 match value {
16509 "success" => Self::Success,
16510 "partial" => Self::Partial,
16511 "failed" => Self::Failed,
16512 "aborted" => Self::Aborted,
16513 other => Self::Other(other.to_string()),
16514 }
16515 }
16516}
16517
16518#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16521pub struct MissionStartResponse {
16522 pub mission_id: String,
16523 pub objective_ids: Vec<String>,
16525 pub classification: MissionStartResponseClassification,
16527 #[serde(default, skip_serializing_if = "Option::is_none")]
16528 pub plan: Option<PlannedMission>,
16529 #[serde(default, skip_serializing_if = "Option::is_none")]
16537 pub run_started: Option<bool>,
16538}
16539
16540#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16542pub struct MissionStartResponseClassification {
16543 pub classification: MissionClassification,
16544 pub score: f64,
16545 pub confidence: f64,
16546}
16547
16548#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16550pub enum MissionStatus {
16551 #[default]
16552 #[serde(rename = "draft")]
16553 Draft,
16554 #[serde(rename = "planning")]
16555 Planning,
16556 #[serde(rename = "awaiting_authorization")]
16557 AwaitingAuthorization,
16558 #[serde(rename = "executing")]
16559 Executing,
16560 #[serde(rename = "paused")]
16561 Paused,
16562 #[serde(rename = "verifying")]
16563 Verifying,
16564 #[serde(rename = "completed")]
16565 Completed,
16566 #[serde(rename = "failed")]
16567 Failed,
16568 #[serde(rename = "aborted")]
16569 Aborted,
16570 #[serde(untagged)]
16572 Other(String),
16573}
16574
16575impl MissionStatus {
16576 pub fn as_str(&self) -> &str {
16578 match self {
16579 Self::Draft => "draft",
16580 Self::Planning => "planning",
16581 Self::AwaitingAuthorization => "awaiting_authorization",
16582 Self::Executing => "executing",
16583 Self::Paused => "paused",
16584 Self::Verifying => "verifying",
16585 Self::Completed => "completed",
16586 Self::Failed => "failed",
16587 Self::Aborted => "aborted",
16588 Self::Other(value) => value.as_str(),
16589 }
16590 }
16591}
16592
16593impl std::fmt::Display for MissionStatus {
16594 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16595 f.write_str(self.as_str())
16596 }
16597}
16598
16599impl From<&str> for MissionStatus {
16600 fn from(value: &str) -> Self {
16601 match value {
16602 "draft" => Self::Draft,
16603 "planning" => Self::Planning,
16604 "awaiting_authorization" => Self::AwaitingAuthorization,
16605 "executing" => Self::Executing,
16606 "paused" => Self::Paused,
16607 "verifying" => Self::Verifying,
16608 "completed" => Self::Completed,
16609 "failed" => Self::Failed,
16610 "aborted" => Self::Aborted,
16611 other => Self::Other(other.to_string()),
16612 }
16613 }
16614}
16615
16616#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16618pub struct ModelInfo {
16619 pub id: String,
16620 pub name: String,
16621 #[serde(default, skip_serializing_if = "Option::is_none")]
16622 pub created: Option<i64>,
16623 #[serde(default, skip_serializing_if = "Option::is_none")]
16624 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
16625 #[serde(default, skip_serializing_if = "Option::is_none")]
16626 pub context_window: Option<i64>,
16627 #[serde(default, skip_serializing_if = "Option::is_none")]
16628 pub supports_tools: Option<bool>,
16629 #[serde(default, skip_serializing_if = "Option::is_none")]
16630 pub supports_vision: Option<bool>,
16631 #[serde(default, skip_serializing_if = "Option::is_none")]
16633 pub voices: Option<Vec<String>>,
16634}
16635
16636#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16638pub struct MoveWorkspaceFileRequest {
16639 pub from_path: String,
16640 pub to_path: String,
16641}
16642
16643#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16645pub struct Notification {
16646 pub id: String,
16647 pub tenant_id: String,
16648 #[serde(default, skip_serializing_if = "Option::is_none")]
16649 pub user_id: Option<String>,
16650 pub r#type: String,
16651 pub title: String,
16652 pub message: String,
16653 #[serde(default, skip_serializing_if = "Option::is_none")]
16654 pub data: Option<serde_json::Map<String, serde_json::Value>>,
16655 pub read: bool,
16656 #[serde(default, skip_serializing_if = "Option::is_none")]
16657 pub action_url: Option<String>,
16658 pub created_at: String,
16659 #[serde(default, skip_serializing_if = "Option::is_none")]
16661 pub priority: Option<NotificationPriority>,
16662 #[serde(default, skip_serializing_if = "Option::is_none")]
16664 pub dedup_key: Option<String>,
16665 #[serde(default, skip_serializing_if = "Option::is_none")]
16666 pub source: Option<NotificationSource>,
16667}
16668
16669#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16672pub enum NotificationChannel {
16673 #[default]
16674 #[serde(rename = "in_app")]
16675 InApp,
16676 #[serde(rename = "email")]
16677 Email,
16678 #[serde(rename = "webhook")]
16679 Webhook,
16680 #[serde(rename = "push")]
16681 Push,
16682 #[serde(rename = "web_push")]
16683 WebPush,
16684 #[serde(rename = "telegram")]
16685 Telegram,
16686 #[serde(rename = "whatsapp")]
16687 Whatsapp,
16688 #[serde(untagged)]
16690 Other(String),
16691}
16692
16693impl NotificationChannel {
16694 pub fn as_str(&self) -> &str {
16696 match self {
16697 Self::InApp => "in_app",
16698 Self::Email => "email",
16699 Self::Webhook => "webhook",
16700 Self::Push => "push",
16701 Self::WebPush => "web_push",
16702 Self::Telegram => "telegram",
16703 Self::Whatsapp => "whatsapp",
16704 Self::Other(value) => value.as_str(),
16705 }
16706 }
16707}
16708
16709impl std::fmt::Display for NotificationChannel {
16710 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16711 f.write_str(self.as_str())
16712 }
16713}
16714
16715impl From<&str> for NotificationChannel {
16716 fn from(value: &str) -> Self {
16717 match value {
16718 "in_app" => Self::InApp,
16719 "email" => Self::Email,
16720 "webhook" => Self::Webhook,
16721 "push" => Self::Push,
16722 "web_push" => Self::WebPush,
16723 "telegram" => Self::Telegram,
16724 "whatsapp" => Self::Whatsapp,
16725 other => Self::Other(other.to_string()),
16726 }
16727 }
16728}
16729
16730#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16732pub struct NotificationPreferences {
16733 #[serde(default, skip_serializing_if = "Option::is_none")]
16736 pub priority_channels: Option<NotificationPreferencesPriorityChannels>,
16737 #[serde(default, skip_serializing_if = "Option::is_none")]
16740 pub type_overrides: Option<HashMap<String, Vec<NotificationChannel>>>,
16741 #[serde(default, skip_serializing_if = "Option::is_none")]
16745 pub muted_types: Option<Vec<NotificationType>>,
16746 #[serde(default, skip_serializing_if = "Option::is_none")]
16749 pub quiet_hours: Option<NotificationPreferencesQuietHours>,
16750 pub tenant_id: String,
16751 pub updated_at: String,
16752}
16753
16754#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16759pub struct NotificationPreferencesInput {
16760 #[serde(default, skip_serializing_if = "Option::is_none")]
16763 pub priority_channels: Option<NotificationPreferencesInputPriorityChannels>,
16764 #[serde(default, skip_serializing_if = "Option::is_none")]
16767 pub type_overrides: Option<HashMap<String, Vec<NotificationChannel>>>,
16768 #[serde(default, skip_serializing_if = "Option::is_none")]
16772 pub muted_types: Option<Vec<NotificationType>>,
16773 #[serde(default, skip_serializing_if = "Option::is_none")]
16776 pub quiet_hours: Option<NotificationPreferencesInputQuietHours>,
16777}
16778
16779#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16782pub struct NotificationPreferencesInputPriorityChannels {
16783 #[serde(default, skip_serializing_if = "Option::is_none")]
16784 pub critical: Option<Vec<NotificationChannel>>,
16785 #[serde(default, skip_serializing_if = "Option::is_none")]
16786 pub warning: Option<Vec<NotificationChannel>>,
16787 #[serde(default, skip_serializing_if = "Option::is_none")]
16788 pub info: Option<Vec<NotificationChannel>>,
16789 #[serde(default, skip_serializing_if = "Option::is_none")]
16790 pub success: Option<Vec<NotificationChannel>>,
16791}
16792
16793#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16796pub struct NotificationPreferencesInputQuietHours {
16797 #[serde(default, skip_serializing_if = "Option::is_none")]
16799 pub start_local: Option<String>,
16800 #[serde(default, skip_serializing_if = "Option::is_none")]
16802 pub end_local: Option<String>,
16803 #[serde(default, skip_serializing_if = "Option::is_none")]
16805 pub timezone: Option<String>,
16806 #[serde(default, skip_serializing_if = "Option::is_none")]
16808 pub start_utc: Option<String>,
16809 #[serde(default, skip_serializing_if = "Option::is_none")]
16811 pub end_utc: Option<String>,
16812}
16813
16814#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16817pub struct NotificationPreferencesPriorityChannels {
16818 #[serde(default, skip_serializing_if = "Option::is_none")]
16819 pub critical: Option<Vec<NotificationChannel>>,
16820 #[serde(default, skip_serializing_if = "Option::is_none")]
16821 pub warning: Option<Vec<NotificationChannel>>,
16822 #[serde(default, skip_serializing_if = "Option::is_none")]
16823 pub info: Option<Vec<NotificationChannel>>,
16824 #[serde(default, skip_serializing_if = "Option::is_none")]
16825 pub success: Option<Vec<NotificationChannel>>,
16826}
16827
16828#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16831pub struct NotificationPreferencesQuietHours {
16832 #[serde(default, skip_serializing_if = "Option::is_none")]
16834 pub start_local: Option<String>,
16835 #[serde(default, skip_serializing_if = "Option::is_none")]
16837 pub end_local: Option<String>,
16838 #[serde(default, skip_serializing_if = "Option::is_none")]
16840 pub timezone: Option<String>,
16841 #[serde(default, skip_serializing_if = "Option::is_none")]
16843 pub start_utc: Option<String>,
16844 #[serde(default, skip_serializing_if = "Option::is_none")]
16846 pub end_utc: Option<String>,
16847}
16848
16849#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16851pub enum NotificationPriority {
16852 #[default]
16853 #[serde(rename = "critical")]
16854 Critical,
16855 #[serde(rename = "warning")]
16856 Warning,
16857 #[serde(rename = "info")]
16858 Info,
16859 #[serde(rename = "success")]
16860 Success,
16861 #[serde(untagged)]
16863 Other(String),
16864}
16865
16866impl NotificationPriority {
16867 pub fn as_str(&self) -> &str {
16869 match self {
16870 Self::Critical => "critical",
16871 Self::Warning => "warning",
16872 Self::Info => "info",
16873 Self::Success => "success",
16874 Self::Other(value) => value.as_str(),
16875 }
16876 }
16877}
16878
16879impl std::fmt::Display for NotificationPriority {
16880 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16881 f.write_str(self.as_str())
16882 }
16883}
16884
16885impl From<&str> for NotificationPriority {
16886 fn from(value: &str) -> Self {
16887 match value {
16888 "critical" => Self::Critical,
16889 "warning" => Self::Warning,
16890 "info" => Self::Info,
16891 "success" => Self::Success,
16892 other => Self::Other(other.to_string()),
16893 }
16894 }
16895}
16896
16897#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16899pub struct NotificationSource {
16900 #[serde(default, skip_serializing_if = "Option::is_none")]
16901 pub kind: Option<NotificationSourceKind>,
16902 #[serde(default, skip_serializing_if = "Option::is_none")]
16903 pub id: Option<String>,
16904}
16905
16906#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16908pub enum NotificationSourceKind {
16909 #[default]
16910 #[serde(rename = "run")]
16911 Run,
16912 #[serde(rename = "agent")]
16913 Agent,
16914 #[serde(rename = "bridge")]
16915 Bridge,
16916 #[serde(rename = "budget")]
16917 Budget,
16918 #[serde(rename = "team")]
16919 Team,
16920 #[serde(rename = "task")]
16921 Task,
16922 #[serde(untagged)]
16924 Other(String),
16925}
16926
16927impl NotificationSourceKind {
16928 pub fn as_str(&self) -> &str {
16930 match self {
16931 Self::Run => "run",
16932 Self::Agent => "agent",
16933 Self::Bridge => "bridge",
16934 Self::Budget => "budget",
16935 Self::Team => "team",
16936 Self::Task => "task",
16937 Self::Other(value) => value.as_str(),
16938 }
16939 }
16940}
16941
16942impl std::fmt::Display for NotificationSourceKind {
16943 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16944 f.write_str(self.as_str())
16945 }
16946}
16947
16948impl From<&str> for NotificationSourceKind {
16949 fn from(value: &str) -> Self {
16950 match value {
16951 "run" => Self::Run,
16952 "agent" => Self::Agent,
16953 "bridge" => Self::Bridge,
16954 "budget" => Self::Budget,
16955 "team" => Self::Team,
16956 "task" => Self::Task,
16957 other => Self::Other(other.to_string()),
16958 }
16959 }
16960}
16961
16962#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16967pub struct NotificationTarget {
16968 pub id: String,
16969 pub tenant_id: String,
16970 pub channel: NotificationTargetChannel,
16971 pub label: String,
16973 pub enabled: bool,
16975 pub created_at: String,
16976 #[serde(default, skip_serializing_if = "Option::is_none")]
16978 pub last_delivered_at: Option<String>,
16979 #[serde(default, skip_serializing_if = "Option::is_none")]
16980 pub last_error: Option<String>,
16981 pub config: serde_json::Value,
16982}
16983
16984#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
16986pub enum NotificationTargetChannel {
16987 #[default]
16988 #[serde(rename = "email")]
16989 Email,
16990 #[serde(rename = "webhook")]
16991 Webhook,
16992 #[serde(rename = "push")]
16993 Push,
16994 #[serde(rename = "web_push")]
16995 WebPush,
16996 #[serde(untagged)]
16998 Other(String),
16999}
17000
17001impl NotificationTargetChannel {
17002 pub fn as_str(&self) -> &str {
17004 match self {
17005 Self::Email => "email",
17006 Self::Webhook => "webhook",
17007 Self::Push => "push",
17008 Self::WebPush => "web_push",
17009 Self::Other(value) => value.as_str(),
17010 }
17011 }
17012}
17013
17014impl std::fmt::Display for NotificationTargetChannel {
17015 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17016 f.write_str(self.as_str())
17017 }
17018}
17019
17020impl From<&str> for NotificationTargetChannel {
17021 fn from(value: &str) -> Self {
17022 match value {
17023 "email" => Self::Email,
17024 "webhook" => Self::Webhook,
17025 "push" => Self::Push,
17026 "web_push" => Self::WebPush,
17027 other => Self::Other(other.to_string()),
17028 }
17029 }
17030}
17031
17032#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17034pub struct NotificationTargetConfigVariant1 {
17035 pub kind: NotificationTargetConfigVariant1kind,
17036 pub address: String,
17037}
17038
17039#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17041pub enum NotificationTargetConfigVariant1kind {
17042 #[default]
17043 #[serde(rename = "email")]
17044 Email,
17045 #[serde(untagged)]
17047 Other(String),
17048}
17049
17050impl NotificationTargetConfigVariant1kind {
17051 pub fn as_str(&self) -> &str {
17053 match self {
17054 Self::Email => "email",
17055 Self::Other(value) => value.as_str(),
17056 }
17057 }
17058}
17059
17060impl std::fmt::Display for NotificationTargetConfigVariant1kind {
17061 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17062 f.write_str(self.as_str())
17063 }
17064}
17065
17066impl From<&str> for NotificationTargetConfigVariant1kind {
17067 fn from(value: &str) -> Self {
17068 match value {
17069 "email" => Self::Email,
17070 other => Self::Other(other.to_string()),
17071 }
17072 }
17073}
17074
17075#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17077pub struct NotificationTargetConfigVariant2 {
17078 pub kind: AgentScorerConfigType,
17079 pub url: String,
17080 pub format: NotificationTargetConfigVariant2format,
17081 pub has_signing_secret: bool,
17083}
17084
17085#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17087pub enum NotificationTargetConfigVariant2format {
17088 #[default]
17089 #[serde(rename = "generic")]
17090 Generic,
17091 #[serde(rename = "slack")]
17092 Slack,
17093 #[serde(rename = "discord")]
17094 Discord,
17095 #[serde(untagged)]
17097 Other(String),
17098}
17099
17100impl NotificationTargetConfigVariant2format {
17101 pub fn as_str(&self) -> &str {
17103 match self {
17104 Self::Generic => "generic",
17105 Self::Slack => "slack",
17106 Self::Discord => "discord",
17107 Self::Other(value) => value.as_str(),
17108 }
17109 }
17110}
17111
17112impl std::fmt::Display for NotificationTargetConfigVariant2format {
17113 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17114 f.write_str(self.as_str())
17115 }
17116}
17117
17118impl From<&str> for NotificationTargetConfigVariant2format {
17119 fn from(value: &str) -> Self {
17120 match value {
17121 "generic" => Self::Generic,
17122 "slack" => Self::Slack,
17123 "discord" => Self::Discord,
17124 other => Self::Other(other.to_string()),
17125 }
17126 }
17127}
17128
17129#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17131pub struct NotificationTargetConfigVariant3 {
17132 pub kind: NotificationTargetConfigVariant3kind,
17133 pub platform: NotificationTargetConfigVariant3platform,
17134 #[serde(default, skip_serializing_if = "Option::is_none")]
17135 pub device_label: Option<String>,
17136 pub device_token_suffix: String,
17138}
17139
17140#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17142pub enum NotificationTargetConfigVariant3kind {
17143 #[default]
17144 #[serde(rename = "push")]
17145 Push,
17146 #[serde(untagged)]
17148 Other(String),
17149}
17150
17151impl NotificationTargetConfigVariant3kind {
17152 pub fn as_str(&self) -> &str {
17154 match self {
17155 Self::Push => "push",
17156 Self::Other(value) => value.as_str(),
17157 }
17158 }
17159}
17160
17161impl std::fmt::Display for NotificationTargetConfigVariant3kind {
17162 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17163 f.write_str(self.as_str())
17164 }
17165}
17166
17167impl From<&str> for NotificationTargetConfigVariant3kind {
17168 fn from(value: &str) -> Self {
17169 match value {
17170 "push" => Self::Push,
17171 other => Self::Other(other.to_string()),
17172 }
17173 }
17174}
17175
17176#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17178pub enum NotificationTargetConfigVariant3platform {
17179 #[default]
17180 #[serde(rename = "apns")]
17181 Apns,
17182 #[serde(rename = "fcm")]
17183 Fcm,
17184 #[serde(untagged)]
17186 Other(String),
17187}
17188
17189impl NotificationTargetConfigVariant3platform {
17190 pub fn as_str(&self) -> &str {
17192 match self {
17193 Self::Apns => "apns",
17194 Self::Fcm => "fcm",
17195 Self::Other(value) => value.as_str(),
17196 }
17197 }
17198}
17199
17200impl std::fmt::Display for NotificationTargetConfigVariant3platform {
17201 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17202 f.write_str(self.as_str())
17203 }
17204}
17205
17206impl From<&str> for NotificationTargetConfigVariant3platform {
17207 fn from(value: &str) -> Self {
17208 match value {
17209 "apns" => Self::Apns,
17210 "fcm" => Self::Fcm,
17211 other => Self::Other(other.to_string()),
17212 }
17213 }
17214}
17215
17216#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17218pub struct NotificationTargetConfigVariant4 {
17219 pub kind: NotificationTargetConfigVariant4kind,
17220 pub endpoint_host: String,
17222 #[serde(default, skip_serializing_if = "Option::is_none")]
17223 pub device_label: Option<String>,
17224 #[serde(default)]
17226 pub expiration_time: Option<i64>,
17227}
17228
17229#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17231pub enum NotificationTargetConfigVariant4kind {
17232 #[default]
17233 #[serde(rename = "web_push")]
17234 WebPush,
17235 #[serde(untagged)]
17237 Other(String),
17238}
17239
17240impl NotificationTargetConfigVariant4kind {
17241 pub fn as_str(&self) -> &str {
17243 match self {
17244 Self::WebPush => "web_push",
17245 Self::Other(value) => value.as_str(),
17246 }
17247 }
17248}
17249
17250impl std::fmt::Display for NotificationTargetConfigVariant4kind {
17251 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17252 f.write_str(self.as_str())
17253 }
17254}
17255
17256impl From<&str> for NotificationTargetConfigVariant4kind {
17257 fn from(value: &str) -> Self {
17258 match value {
17259 "web_push" => Self::WebPush,
17260 other => Self::Other(other.to_string()),
17261 }
17262 }
17263}
17264
17265#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17268pub enum NotificationType {
17269 #[default]
17270 #[serde(rename = "run.started")]
17271 RunStarted,
17272 #[serde(rename = "run.failed")]
17273 RunFailed,
17274 #[serde(rename = "run.completed")]
17275 RunCompleted,
17276 #[serde(rename = "run.awaiting_approval")]
17277 RunAwaitingApproval,
17278 #[serde(rename = "run.awaiting_input")]
17279 RunAwaitingInput,
17280 #[serde(rename = "approval.requested")]
17281 ApprovalRequested,
17282 #[serde(rename = "budget.warning")]
17283 BudgetWarning,
17284 #[serde(rename = "budget.exceeded")]
17285 BudgetExceeded,
17286 #[serde(rename = "bridge.online")]
17287 BridgeOnline,
17288 #[serde(rename = "bridge.offline")]
17289 BridgeOffline,
17290 #[serde(rename = "invite.accepted")]
17291 InviteAccepted,
17292 #[serde(rename = "marketplace.review")]
17293 MarketplaceReview,
17294 #[serde(rename = "workflow.triggered")]
17295 WorkflowTriggered,
17296 #[serde(rename = "system.alert")]
17297 SystemAlert,
17298 #[serde(rename = "task.completed")]
17299 TaskCompleted,
17300 #[serde(rename = "task.confirmation_required")]
17301 TaskConfirmationRequired,
17302 #[serde(rename = "agent.suspended")]
17303 AgentSuspended,
17304 #[serde(rename = "agent.terminated")]
17305 AgentTerminated,
17306 #[serde(rename = "billing.payment_failed")]
17307 BillingPaymentFailed,
17308 #[serde(rename = "billing.subscription_paused")]
17309 BillingSubscriptionPaused,
17310 #[serde(rename = "billing.subscription_cancelled")]
17311 BillingSubscriptionCancelled,
17312 #[serde(rename = "billing.dispute_opened")]
17313 BillingDisputeOpened,
17314 #[serde(rename = "domain.dns_drift")]
17315 DomainDnsDrift,
17316 #[serde(rename = "domain.cert_failed")]
17317 DomainCertFailed,
17318 #[serde(rename = "domain.cert_renewal_due")]
17319 DomainCertRenewalDue,
17320 #[serde(untagged)]
17322 Other(String),
17323}
17324
17325impl NotificationType {
17326 pub fn as_str(&self) -> &str {
17328 match self {
17329 Self::RunStarted => "run.started",
17330 Self::RunFailed => "run.failed",
17331 Self::RunCompleted => "run.completed",
17332 Self::RunAwaitingApproval => "run.awaiting_approval",
17333 Self::RunAwaitingInput => "run.awaiting_input",
17334 Self::ApprovalRequested => "approval.requested",
17335 Self::BudgetWarning => "budget.warning",
17336 Self::BudgetExceeded => "budget.exceeded",
17337 Self::BridgeOnline => "bridge.online",
17338 Self::BridgeOffline => "bridge.offline",
17339 Self::InviteAccepted => "invite.accepted",
17340 Self::MarketplaceReview => "marketplace.review",
17341 Self::WorkflowTriggered => "workflow.triggered",
17342 Self::SystemAlert => "system.alert",
17343 Self::TaskCompleted => "task.completed",
17344 Self::TaskConfirmationRequired => "task.confirmation_required",
17345 Self::AgentSuspended => "agent.suspended",
17346 Self::AgentTerminated => "agent.terminated",
17347 Self::BillingPaymentFailed => "billing.payment_failed",
17348 Self::BillingSubscriptionPaused => "billing.subscription_paused",
17349 Self::BillingSubscriptionCancelled => "billing.subscription_cancelled",
17350 Self::BillingDisputeOpened => "billing.dispute_opened",
17351 Self::DomainDnsDrift => "domain.dns_drift",
17352 Self::DomainCertFailed => "domain.cert_failed",
17353 Self::DomainCertRenewalDue => "domain.cert_renewal_due",
17354 Self::Other(value) => value.as_str(),
17355 }
17356 }
17357}
17358
17359impl std::fmt::Display for NotificationType {
17360 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17361 f.write_str(self.as_str())
17362 }
17363}
17364
17365impl From<&str> for NotificationType {
17366 fn from(value: &str) -> Self {
17367 match value {
17368 "run.started" => Self::RunStarted,
17369 "run.failed" => Self::RunFailed,
17370 "run.completed" => Self::RunCompleted,
17371 "run.awaiting_approval" => Self::RunAwaitingApproval,
17372 "run.awaiting_input" => Self::RunAwaitingInput,
17373 "approval.requested" => Self::ApprovalRequested,
17374 "budget.warning" => Self::BudgetWarning,
17375 "budget.exceeded" => Self::BudgetExceeded,
17376 "bridge.online" => Self::BridgeOnline,
17377 "bridge.offline" => Self::BridgeOffline,
17378 "invite.accepted" => Self::InviteAccepted,
17379 "marketplace.review" => Self::MarketplaceReview,
17380 "workflow.triggered" => Self::WorkflowTriggered,
17381 "system.alert" => Self::SystemAlert,
17382 "task.completed" => Self::TaskCompleted,
17383 "task.confirmation_required" => Self::TaskConfirmationRequired,
17384 "agent.suspended" => Self::AgentSuspended,
17385 "agent.terminated" => Self::AgentTerminated,
17386 "billing.payment_failed" => Self::BillingPaymentFailed,
17387 "billing.subscription_paused" => Self::BillingSubscriptionPaused,
17388 "billing.subscription_cancelled" => Self::BillingSubscriptionCancelled,
17389 "billing.dispute_opened" => Self::BillingDisputeOpened,
17390 "domain.dns_drift" => Self::DomainDnsDrift,
17391 "domain.cert_failed" => Self::DomainCertFailed,
17392 "domain.cert_renewal_due" => Self::DomainCertRenewalDue,
17393 other => Self::Other(other.to_string()),
17394 }
17395 }
17396}
17397
17398#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17400pub struct OAuthAppExchangeRequest {
17401 pub code: String,
17403 pub code_verifier: String,
17406}
17407
17408#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17410pub struct OAuthAppExchangeResponse {
17411 pub api_key: String,
17412 #[serde(default, skip_serializing_if = "Option::is_none")]
17413 pub email: Option<String>,
17414}
17415
17416#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17418pub struct OAuthCompleteRequest {
17419 pub state: String,
17420 pub code: String,
17421 pub agent_id: String,
17422 #[serde(default, skip_serializing_if = "Option::is_none")]
17424 pub name: Option<String>,
17425}
17426
17427#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17429pub struct OAuthIdentityConfig {
17430 pub apple_services_id: String,
17431 pub apple_team_id: String,
17432 pub apple_bundle_id: String,
17433 pub oauth_return_to_hosts: Vec<String>,
17435}
17436
17437#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17439pub struct OAuthLoginProviderConfigDeleted {
17440 pub provider: OAuthLoginProviderConfigStatusProvider,
17441 pub configured: bool,
17443}
17444
17445#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17448pub struct OAuthLoginProviderConfigStatus {
17449 pub provider: OAuthLoginProviderConfigStatusProvider,
17450 pub enabled: bool,
17451 pub configured: bool,
17453 #[serde(default, skip_serializing_if = "Option::is_none")]
17454 pub client_id: Option<String>,
17455 #[serde(default, skip_serializing_if = "Option::is_none")]
17457 pub client_secret_hint: Option<String>,
17458 #[serde(default, skip_serializing_if = "Option::is_none")]
17460 pub scopes: Option<Vec<String>>,
17461}
17462
17463#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17465pub enum OAuthLoginProviderConfigStatusProvider {
17466 #[default]
17467 #[serde(rename = "github")]
17468 Github,
17469 #[serde(rename = "google")]
17470 Google,
17471 #[serde(untagged)]
17473 Other(String),
17474}
17475
17476impl OAuthLoginProviderConfigStatusProvider {
17477 pub fn as_str(&self) -> &str {
17479 match self {
17480 Self::Github => "github",
17481 Self::Google => "google",
17482 Self::Other(value) => value.as_str(),
17483 }
17484 }
17485}
17486
17487impl std::fmt::Display for OAuthLoginProviderConfigStatusProvider {
17488 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17489 f.write_str(self.as_str())
17490 }
17491}
17492
17493impl From<&str> for OAuthLoginProviderConfigStatusProvider {
17494 fn from(value: &str) -> Self {
17495 match value {
17496 "github" => Self::Github,
17497 "google" => Self::Google,
17498 other => Self::Other(other.to_string()),
17499 }
17500 }
17501}
17502
17503#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17507pub struct OAuthLoginProviderConfigUpdate {
17508 #[serde(default, skip_serializing_if = "Option::is_none")]
17510 pub client_id: Option<String>,
17511 #[serde(default, skip_serializing_if = "Option::is_none")]
17513 pub client_secret: Option<String>,
17514 #[serde(default, skip_serializing_if = "Option::is_none")]
17516 pub enabled: Option<bool>,
17517 #[serde(default, skip_serializing_if = "Option::is_none")]
17519 pub scopes: Option<Vec<String>>,
17520}
17521
17522#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17524pub struct OAuthLoginProviderConfigUpdateResponse {
17525 pub provider: OAuthLoginProviderConfigStatusProvider,
17526 pub enabled: bool,
17527 pub configured: bool,
17528}
17529
17530#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17533pub struct OAuthLoginProviderItem {
17534 pub id: OAuthLoginProviderItemId,
17536 pub name: String,
17538 pub enabled: bool,
17541}
17542
17543#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17545pub enum OAuthLoginProviderItemId {
17546 #[default]
17547 #[serde(rename = "github")]
17548 Github,
17549 #[serde(rename = "google")]
17550 Google,
17551 #[serde(rename = "apple")]
17552 Apple,
17553 #[serde(untagged)]
17555 Other(String),
17556}
17557
17558impl OAuthLoginProviderItemId {
17559 pub fn as_str(&self) -> &str {
17561 match self {
17562 Self::Github => "github",
17563 Self::Google => "google",
17564 Self::Apple => "apple",
17565 Self::Other(value) => value.as_str(),
17566 }
17567 }
17568}
17569
17570impl std::fmt::Display for OAuthLoginProviderItemId {
17571 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17572 f.write_str(self.as_str())
17573 }
17574}
17575
17576impl From<&str> for OAuthLoginProviderItemId {
17577 fn from(value: &str) -> Self {
17578 match value {
17579 "github" => Self::Github,
17580 "google" => Self::Google,
17581 "apple" => Self::Apple,
17582 other => Self::Other(other.to_string()),
17583 }
17584 }
17585}
17586
17587#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17589pub struct OAuthLoginProvidersList {
17590 pub providers: Vec<OAuthLoginProviderItem>,
17591 #[serde(default, skip_serializing_if = "Option::is_none")]
17592 pub google_one_tap_client_id: Option<String>,
17593}
17594
17595#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17597pub struct OAuthStartResponse {
17598 pub auth_url: String,
17599 pub state: String,
17600}
17601
17602#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17605pub struct Objective {
17606 pub objective_id: String,
17607 pub tenant_id: String,
17608 #[serde(default, skip_serializing_if = "Option::is_none")]
17609 pub company_id: Option<String>,
17610 #[serde(default)]
17612 pub parent_id: Option<String>,
17613 pub title: String,
17614 pub description: String,
17615 pub success_criteria: Vec<String>,
17617 pub status: ObjectiveStatus,
17619 pub priority: ObjectivePriority,
17620 #[serde(default, skip_serializing_if = "Option::is_none")]
17622 pub assigned_agent_id: Option<String>,
17623 #[serde(default, skip_serializing_if = "Option::is_none")]
17624 pub assigned_team_id: Option<String>,
17625 pub dependencies: Vec<String>,
17627 pub budget: ObjectiveBudget,
17628 #[serde(default, skip_serializing_if = "Option::is_none")]
17629 pub result: Option<String>,
17630 #[serde(default, skip_serializing_if = "Option::is_none")]
17631 pub output_summary: Option<String>,
17632 pub progress_notes: Vec<String>,
17633 pub created_at: String,
17634 pub updated_at: String,
17635 #[serde(default, skip_serializing_if = "Option::is_none")]
17636 pub completed_at: Option<String>,
17637 #[serde(default, skip_serializing_if = "Option::is_none")]
17639 pub commanders_intent: Option<String>,
17640 #[serde(default, skip_serializing_if = "Option::is_none")]
17641 pub roe: Option<ObjectiveRoE>,
17642 #[serde(default, skip_serializing_if = "Option::is_none")]
17643 pub decision_points: Option<Vec<ObjectiveDecisionPoint>>,
17644 #[serde(default, skip_serializing_if = "Option::is_none")]
17645 pub deadline: Option<String>,
17646 #[serde(default, skip_serializing_if = "Option::is_none")]
17651 pub abort_reason: Option<String>,
17652 #[serde(default, skip_serializing_if = "Option::is_none")]
17655 pub strikes_used: Option<i64>,
17656}
17657
17658#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17661pub struct ObjectiveBudget {
17662 pub max_runs: i64,
17663 pub max_tokens: i64,
17664 pub max_cost_usd: f64,
17665 pub spent_runs: i64,
17666 pub spent_tokens: i64,
17667 pub spent_cost_usd: f64,
17668}
17669
17670#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17673pub struct ObjectiveDecisionPoint {
17674 pub condition: String,
17675 pub branches: Vec<ObjectiveDecisionPointBranch>,
17676 #[serde(default, skip_serializing_if = "Option::is_none")]
17678 pub fallback_objective_id: Option<String>,
17679}
17680
17681#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17683pub struct ObjectiveDecisionPointBranch {
17684 pub when: String,
17685 pub objective_id: String,
17686}
17687
17688#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17690pub enum ObjectivePriority {
17691 #[default]
17692 #[serde(rename = "low")]
17693 Low,
17694 #[serde(rename = "medium")]
17695 Medium,
17696 #[serde(rename = "high")]
17697 High,
17698 #[serde(rename = "critical")]
17699 Critical,
17700 #[serde(untagged)]
17702 Other(String),
17703}
17704
17705impl ObjectivePriority {
17706 pub fn as_str(&self) -> &str {
17708 match self {
17709 Self::Low => "low",
17710 Self::Medium => "medium",
17711 Self::High => "high",
17712 Self::Critical => "critical",
17713 Self::Other(value) => value.as_str(),
17714 }
17715 }
17716}
17717
17718impl std::fmt::Display for ObjectivePriority {
17719 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17720 f.write_str(self.as_str())
17721 }
17722}
17723
17724impl From<&str> for ObjectivePriority {
17725 fn from(value: &str) -> Self {
17726 match value {
17727 "low" => Self::Low,
17728 "medium" => Self::Medium,
17729 "high" => Self::High,
17730 "critical" => Self::Critical,
17731 other => Self::Other(other.to_string()),
17732 }
17733 }
17734}
17735
17736#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17739pub struct ObjectiveRoE {
17740 pub autonomous_actions: Vec<String>,
17741 pub requires_approval: Vec<String>,
17742 pub prohibited: Vec<String>,
17743}
17744
17745#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17747pub enum ObjectiveStatus {
17748 #[default]
17749 #[serde(rename = "pending")]
17750 Pending,
17751 #[serde(rename = "in_progress")]
17752 InProgress,
17753 #[serde(rename = "blocked")]
17754 Blocked,
17755 #[serde(rename = "completed")]
17756 Completed,
17757 #[serde(rename = "failed")]
17758 Failed,
17759 #[serde(untagged)]
17761 Other(String),
17762}
17763
17764impl ObjectiveStatus {
17765 pub fn as_str(&self) -> &str {
17767 match self {
17768 Self::Pending => "pending",
17769 Self::InProgress => "in_progress",
17770 Self::Blocked => "blocked",
17771 Self::Completed => "completed",
17772 Self::Failed => "failed",
17773 Self::Other(value) => value.as_str(),
17774 }
17775 }
17776}
17777
17778impl std::fmt::Display for ObjectiveStatus {
17779 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17780 f.write_str(self.as_str())
17781 }
17782}
17783
17784impl From<&str> for ObjectiveStatus {
17785 fn from(value: &str) -> Self {
17786 match value {
17787 "pending" => Self::Pending,
17788 "in_progress" => Self::InProgress,
17789 "blocked" => Self::Blocked,
17790 "completed" => Self::Completed,
17791 "failed" => Self::Failed,
17792 other => Self::Other(other.to_string()),
17793 }
17794 }
17795}
17796
17797#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17799pub struct ObjectiveTree {
17800 pub objective: Objective,
17801 pub children: Vec<ObjectiveTree>,
17802}
17803
17804#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17809pub struct OpenAiChatCompletion {
17810 pub id: String,
17811 pub object: OpenAiChatCompletionObject,
17812 pub created: i64,
17814 pub model: String,
17815 pub choices: Vec<OpenAiChatCompletionChoice>,
17816 #[serde(default, skip_serializing_if = "Option::is_none")]
17817 pub usage: Option<OpenAiChatCompletionUsage>,
17818 #[serde(flatten)]
17820 pub extra: HashMap<String, serde_json::Value>,
17821}
17822
17823#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17825pub struct OpenAiChatCompletionChoice {
17826 pub index: i64,
17827 pub message: OpenAiChatCompletionChoiceMessage,
17828 #[serde(default, skip_serializing_if = "Option::is_none")]
17829 pub finish_reason: Option<String>,
17830 #[serde(flatten)]
17832 pub extra: HashMap<String, serde_json::Value>,
17833}
17834
17835#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17837pub struct OpenAiChatCompletionChoiceMessage {
17838 pub role: OpenAiChatCompletionChoiceMessageRole,
17839 #[serde(default, skip_serializing_if = "Option::is_none")]
17840 pub content: Option<String>,
17841 #[serde(default, skip_serializing_if = "Option::is_none")]
17842 pub tool_calls: Option<Vec<OpenAiToolCall>>,
17843 #[serde(flatten)]
17845 pub extra: HashMap<String, serde_json::Value>,
17846}
17847
17848#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17850pub enum OpenAiChatCompletionChoiceMessageRole {
17851 #[default]
17852 #[serde(rename = "assistant")]
17853 Assistant,
17854 #[serde(untagged)]
17856 Other(String),
17857}
17858
17859impl OpenAiChatCompletionChoiceMessageRole {
17860 pub fn as_str(&self) -> &str {
17862 match self {
17863 Self::Assistant => "assistant",
17864 Self::Other(value) => value.as_str(),
17865 }
17866 }
17867}
17868
17869impl std::fmt::Display for OpenAiChatCompletionChoiceMessageRole {
17870 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17871 f.write_str(self.as_str())
17872 }
17873}
17874
17875impl From<&str> for OpenAiChatCompletionChoiceMessageRole {
17876 fn from(value: &str) -> Self {
17877 match value {
17878 "assistant" => Self::Assistant,
17879 other => Self::Other(other.to_string()),
17880 }
17881 }
17882}
17883
17884#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17886pub enum OpenAiChatCompletionObject {
17887 #[default]
17888 #[serde(rename = "chat.completion")]
17889 ChatCompletion,
17890 #[serde(untagged)]
17892 Other(String),
17893}
17894
17895impl OpenAiChatCompletionObject {
17896 pub fn as_str(&self) -> &str {
17898 match self {
17899 Self::ChatCompletion => "chat.completion",
17900 Self::Other(value) => value.as_str(),
17901 }
17902 }
17903}
17904
17905impl std::fmt::Display for OpenAiChatCompletionObject {
17906 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17907 f.write_str(self.as_str())
17908 }
17909}
17910
17911impl From<&str> for OpenAiChatCompletionObject {
17912 fn from(value: &str) -> Self {
17913 match value {
17914 "chat.completion" => Self::ChatCompletion,
17915 other => Self::Other(other.to_string()),
17916 }
17917 }
17918}
17919
17920#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17922pub struct OpenAiChatCompletionUsage {
17923 pub prompt_tokens: i64,
17924 pub completion_tokens: i64,
17925 pub total_tokens: i64,
17926 #[serde(flatten)]
17928 pub extra: HashMap<String, serde_json::Value>,
17929}
17930
17931#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17934pub struct OpenAiError {
17935 pub error: OpenAiErrorError,
17936}
17937
17938#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17940pub struct OpenAiErrorError {
17941 pub message: String,
17943 pub r#type: String,
17944 #[serde(default, skip_serializing_if = "Option::is_none")]
17947 pub code: Option<String>,
17948}
17949
17950#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17953pub struct OpenAiToolCall {
17954 pub id: String,
17955 #[serde(default, skip_serializing_if = "Option::is_none")]
17956 pub r#type: Option<OpenAiToolCallType>,
17957 pub function: OpenAiToolCallFunction,
17958 #[serde(flatten)]
17960 pub extra: HashMap<String, serde_json::Value>,
17961}
17962
17963#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17965pub struct OpenAiToolCallFunction {
17966 pub name: String,
17967 pub arguments: String,
17968}
17969
17970#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
17972pub enum OpenAiToolCallType {
17973 #[default]
17974 #[serde(rename = "function")]
17975 Function,
17976 #[serde(untagged)]
17978 Other(String),
17979}
17980
17981impl OpenAiToolCallType {
17982 pub fn as_str(&self) -> &str {
17984 match self {
17985 Self::Function => "function",
17986 Self::Other(value) => value.as_str(),
17987 }
17988 }
17989}
17990
17991impl std::fmt::Display for OpenAiToolCallType {
17992 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17993 f.write_str(self.as_str())
17994 }
17995}
17996
17997impl From<&str> for OpenAiToolCallType {
17998 fn from(value: &str) -> Self {
17999 match value {
18000 "function" => Self::Function,
18001 other => Self::Other(other.to_string()),
18002 }
18003 }
18004}
18005
18006#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18008pub struct PatchMeRequest {
18009 #[serde(default)]
18012 pub avatar_url: Option<String>,
18013}
18014
18015#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18017pub struct PatchMeResponse {
18018 pub user: PatchMeResponseUser,
18019 pub updated_rows: i64,
18020}
18021
18022#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18024pub struct PatchMeResponseUser {
18025 pub user_id: String,
18026 pub email: String,
18027 #[serde(default, skip_serializing_if = "Option::is_none")]
18028 pub name: Option<String>,
18029 pub role: String,
18030 pub status: String,
18031 #[serde(default)]
18032 pub avatar_url: Option<String>,
18033}
18034
18035#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18055pub struct PatchTenantRequest {
18056 #[serde(default, skip_serializing_if = "Option::is_none")]
18057 pub social_links: Option<TenantSocialLinks>,
18058 #[serde(flatten)]
18060 pub extra: HashMap<String, serde_json::Value>,
18061}
18062
18063#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18065pub struct PauseCompanyResponse {
18066 #[serde(default, skip_serializing_if = "Option::is_none")]
18067 pub status: Option<String>,
18068}
18069
18070#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18072pub struct PauseMissionResponse {
18073 pub pausing: bool,
18074 pub mission: Mission,
18075}
18076
18077#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18079pub struct PauseRunResponse {
18080 pub paused: bool,
18081 pub run_id: String,
18082}
18083
18084#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18087pub struct PendingApproval {
18088 pub id: String,
18089 pub name: String,
18090 pub args: serde_json::Map<String, serde_json::Value>,
18091 #[serde(default, skip_serializing_if = "Option::is_none")]
18093 pub options: Option<Vec<String>>,
18094 #[serde(default, skip_serializing_if = "Option::is_none")]
18095 pub kind: Option<String>,
18096}
18097
18098#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18100pub struct PermissionCheckResult {
18101 pub allowed: bool,
18102 #[serde(default, skip_serializing_if = "Option::is_none")]
18103 pub reason: Option<String>,
18104 #[serde(default, skip_serializing_if = "Option::is_none")]
18105 pub denied_permissions: Option<Vec<String>>,
18106}
18107
18108#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18110pub struct PermissionSet {
18111 pub agent_id: String,
18112 pub tenant_id: String,
18113 pub allowed_tools: Vec<String>,
18114 #[serde(default, skip_serializing_if = "Option::is_none")]
18115 pub allowed_roles: Option<Vec<String>>,
18116 #[serde(default, skip_serializing_if = "Option::is_none")]
18117 pub resource_permissions: Option<Vec<ResourcePermission>>,
18118 #[serde(default, skip_serializing_if = "Option::is_none")]
18124 pub max_budget_per_run_usd: Option<f64>,
18125 pub max_spawn_depth: i64,
18126 pub can_spawn: bool,
18127 #[serde(default, skip_serializing_if = "Option::is_none")]
18128 pub can_self_modify: Option<bool>,
18129 #[serde(default, skip_serializing_if = "Option::is_none")]
18130 pub parent_agent_id: Option<String>,
18131 #[serde(default, skip_serializing_if = "Option::is_none")]
18132 pub created_at: Option<String>,
18133 #[serde(default, skip_serializing_if = "Option::is_none")]
18134 pub updated_at: Option<String>,
18135}
18136
18137#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18142pub struct PermissionSetUpdate {
18143 #[serde(default, skip_serializing_if = "Option::is_none")]
18146 pub allowed_tools: Option<Vec<String>>,
18147 #[serde(default, skip_serializing_if = "Option::is_none")]
18150 pub allowed_roles: Option<Vec<String>>,
18151 #[serde(default, skip_serializing_if = "Option::is_none")]
18154 pub resource_permissions: Option<Vec<ResourcePermission>>,
18155 #[serde(default, skip_serializing_if = "Option::is_none")]
18161 pub max_budget_per_run_usd: Option<f64>,
18162 #[serde(default, skip_serializing_if = "Option::is_none")]
18163 pub max_spawn_depth: Option<i64>,
18164 #[serde(default, skip_serializing_if = "Option::is_none")]
18165 pub can_spawn: Option<bool>,
18166 #[serde(default, skip_serializing_if = "Option::is_none")]
18167 pub can_self_modify: Option<bool>,
18168 #[serde(default, skip_serializing_if = "Option::is_none")]
18169 pub parent_agent_id: Option<String>,
18170}
18171
18172#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18174pub struct PlanLLMLimits {
18175 #[serde(default, skip_serializing_if = "Option::is_none")]
18176 pub tier_access: Option<Vec<PlanLLMLimitsTierAccessItem>>,
18177 #[serde(default, skip_serializing_if = "Option::is_none")]
18178 pub tokens_per_month: Option<i64>,
18179 #[serde(default, skip_serializing_if = "Option::is_none")]
18180 pub requests_per_minute: Option<i64>,
18181 #[serde(default, skip_serializing_if = "Option::is_none")]
18182 pub requests_per_hour: Option<i64>,
18183 #[serde(default, skip_serializing_if = "Option::is_none")]
18184 pub requests_per_day: Option<i64>,
18185}
18186
18187#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18189pub enum PlanLLMLimitsTierAccessItem {
18190 #[default]
18191 #[serde(rename = "starter")]
18192 Starter,
18193 #[serde(rename = "pro")]
18194 Pro,
18195 #[serde(rename = "enterprise")]
18196 Enterprise,
18197 #[serde(untagged)]
18199 Other(String),
18200}
18201
18202impl PlanLLMLimitsTierAccessItem {
18203 pub fn as_str(&self) -> &str {
18205 match self {
18206 Self::Starter => "starter",
18207 Self::Pro => "pro",
18208 Self::Enterprise => "enterprise",
18209 Self::Other(value) => value.as_str(),
18210 }
18211 }
18212}
18213
18214impl std::fmt::Display for PlanLLMLimitsTierAccessItem {
18215 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18216 f.write_str(self.as_str())
18217 }
18218}
18219
18220impl From<&str> for PlanLLMLimitsTierAccessItem {
18221 fn from(value: &str) -> Self {
18222 match value {
18223 "starter" => Self::Starter,
18224 "pro" => Self::Pro,
18225 "enterprise" => Self::Enterprise,
18226 other => Self::Other(other.to_string()),
18227 }
18228 }
18229}
18230
18231#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18233pub struct PlannedMission {
18234 pub goal: String,
18235 pub classification: MissionClassification,
18236 pub objectives: Vec<PlannedObjective>,
18237 pub requires_authorization: bool,
18240 #[serde(default, skip_serializing_if = "Option::is_none")]
18241 pub deadline: Option<String>,
18242}
18243
18244#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18247pub struct PlannedObjective {
18248 pub title: String,
18249 pub description: String,
18250 pub success_criteria: Vec<String>,
18251 pub priority: ObjectivePriority,
18252 pub depends_on_indices: Vec<i64>,
18254 #[serde(default, skip_serializing_if = "Option::is_none")]
18255 pub assigned_agent_id: Option<String>,
18256 #[serde(default, skip_serializing_if = "Option::is_none")]
18257 pub assigned_team_id: Option<String>,
18258 pub budget: PlannedObjectiveBudget,
18260 #[serde(default, skip_serializing_if = "Option::is_none")]
18261 pub commanders_intent: Option<String>,
18262 #[serde(default, skip_serializing_if = "Option::is_none")]
18263 pub roe: Option<ObjectiveRoE>,
18264 #[serde(default, skip_serializing_if = "Option::is_none")]
18265 pub deadline: Option<String>,
18266 #[serde(default, skip_serializing_if = "Option::is_none")]
18267 pub decision_points: Option<Vec<ObjectiveDecisionPoint>>,
18268}
18269
18270#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18272pub struct PlannedObjectiveBudget {
18273 pub max_runs: i64,
18274 pub max_tokens: i64,
18275 pub max_cost_usd: f64,
18276}
18277
18278#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18281pub struct PlatformEconomics {
18282 pub revenue: PlatformEconomicsRevenue,
18283 pub costs: PlatformEconomicsCosts,
18284 pub llm: PlatformEconomicsLLM,
18288 pub economics: PlatformEconomicsEconomics,
18289 pub generated_at: String,
18290 pub cache: PlatformEconomicsCache,
18293}
18294
18295#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18298pub enum PlatformEconomicsCache {
18299 #[default]
18300 #[serde(rename = "hit")]
18301 Hit,
18302 #[serde(rename = "miss")]
18303 Miss,
18304 #[serde(rename = "bypass")]
18305 Bypass,
18306 #[serde(untagged)]
18308 Other(String),
18309}
18310
18311impl PlatformEconomicsCache {
18312 pub fn as_str(&self) -> &str {
18314 match self {
18315 Self::Hit => "hit",
18316 Self::Miss => "miss",
18317 Self::Bypass => "bypass",
18318 Self::Other(value) => value.as_str(),
18319 }
18320 }
18321}
18322
18323impl std::fmt::Display for PlatformEconomicsCache {
18324 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18325 f.write_str(self.as_str())
18326 }
18327}
18328
18329impl From<&str> for PlatformEconomicsCache {
18330 fn from(value: &str) -> Self {
18331 match value {
18332 "hit" => Self::Hit,
18333 "miss" => Self::Miss,
18334 "bypass" => Self::Bypass,
18335 other => Self::Other(other.to_string()),
18336 }
18337 }
18338}
18339
18340#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18342pub struct PlatformEconomicsCosts {
18343 pub provider: PlatformEconomicsCostsProvider,
18344 pub configured: bool,
18345 #[serde(default)]
18347 pub month_to_date_usd: Option<f64>,
18348 #[serde(default)]
18350 pub account_balance_usd: Option<f64>,
18351 #[serde(default)]
18352 pub balance_generated_at: Option<String>,
18353 pub droplets: Vec<HostDroplet>,
18354 pub monthly_run_rate_usd: f64,
18356 #[serde(default, skip_serializing_if = "Option::is_none")]
18357 pub error: Option<String>,
18358}
18359
18360#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18362pub enum PlatformEconomicsCostsProvider {
18363 #[default]
18364 #[serde(rename = "digitalocean")]
18365 Digitalocean,
18366 #[serde(untagged)]
18368 Other(String),
18369}
18370
18371impl PlatformEconomicsCostsProvider {
18372 pub fn as_str(&self) -> &str {
18374 match self {
18375 Self::Digitalocean => "digitalocean",
18376 Self::Other(value) => value.as_str(),
18377 }
18378 }
18379}
18380
18381impl std::fmt::Display for PlatformEconomicsCostsProvider {
18382 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18383 f.write_str(self.as_str())
18384 }
18385}
18386
18387impl From<&str> for PlatformEconomicsCostsProvider {
18388 fn from(value: &str) -> Self {
18389 match value {
18390 "digitalocean" => Self::Digitalocean,
18391 other => Self::Other(other.to_string()),
18392 }
18393 }
18394}
18395
18396#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18398pub struct PlatformEconomicsEconomics {
18399 pub monthly_revenue_usd: f64,
18400 pub monthly_infra_usd: f64,
18401 pub monthly_llm_usd: f64,
18403 pub monthly_margin_usd: f64,
18405 #[serde(default)]
18407 pub margin_percent: Option<f64>,
18408 #[serde(default)]
18409 pub month_to_date_infra_usd: Option<f64>,
18410 #[serde(default)]
18411 pub markup_percent: Option<f64>,
18412 #[serde(default)]
18413 pub pricing_tiers: Option<serde_json::Map<String, serde_json::Value>>,
18414}
18415
18416#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18420pub struct PlatformEconomicsLLM {
18421 pub period: String,
18423 pub month_to_date_provider_usd: f64,
18424 pub month_to_date_billed_usd: f64,
18426 pub previous_period: String,
18427 pub previous_period_provider_usd: f64,
18428 pub previous_period_billed_usd: f64,
18429 pub monthly_run_rate_usd: f64,
18431 pub run_rate_basis: PlatformEconomicsLLMRunRateBasis,
18435 pub tenants_with_usage: i64,
18436 pub by_model: Vec<PlatformEconomicsLLMByModelItem>,
18437 pub caveats: Vec<String>,
18440 #[serde(default, skip_serializing_if = "Option::is_none")]
18441 pub error: Option<String>,
18442}
18443
18444#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18446pub struct PlatformEconomicsLLMByModelItem {
18447 pub model: String,
18448 pub provider_usd: f64,
18449 pub billed_usd: f64,
18450 pub tokens: i64,
18451}
18452
18453#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18457pub enum PlatformEconomicsLLMRunRateBasis {
18458 #[default]
18459 #[serde(rename = "previous_period")]
18460 PreviousPeriod,
18461 #[serde(rename = "month_to_date_extrapolated")]
18462 MonthToDateExtrapolated,
18463 #[serde(rename = "none")]
18464 None,
18465 #[serde(untagged)]
18467 Other(String),
18468}
18469
18470impl PlatformEconomicsLLMRunRateBasis {
18471 pub fn as_str(&self) -> &str {
18473 match self {
18474 Self::PreviousPeriod => "previous_period",
18475 Self::MonthToDateExtrapolated => "month_to_date_extrapolated",
18476 Self::None => "none",
18477 Self::Other(value) => value.as_str(),
18478 }
18479 }
18480}
18481
18482impl std::fmt::Display for PlatformEconomicsLLMRunRateBasis {
18483 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18484 f.write_str(self.as_str())
18485 }
18486}
18487
18488impl From<&str> for PlatformEconomicsLLMRunRateBasis {
18489 fn from(value: &str) -> Self {
18490 match value {
18491 "previous_period" => Self::PreviousPeriod,
18492 "month_to_date_extrapolated" => Self::MonthToDateExtrapolated,
18493 "none" => Self::None,
18494 other => Self::Other(other.to_string()),
18495 }
18496 }
18497}
18498
18499#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18501pub struct PlatformEconomicsRevenue {
18502 pub stripe_configured: bool,
18504 pub mrr_usd: f64,
18505 pub arr_usd: f64,
18506 pub subscriptions: Vec<PlatformEconomicsRevenueSubscription>,
18507 pub by_status: serde_json::Map<String, serde_json::Value>,
18508 #[serde(default, skip_serializing_if = "Option::is_none")]
18510 pub error: Option<String>,
18511}
18512
18513#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18515pub struct PlatformEconomicsRevenueSubscription {
18516 pub subscription_id: String,
18517 pub customer_id: String,
18518 #[serde(default)]
18519 pub tenant_id: Option<String>,
18520 #[serde(default)]
18521 pub tenant_name: Option<String>,
18522 #[serde(default)]
18523 pub plan: Option<String>,
18524 #[serde(default)]
18525 pub billing_status: Option<String>,
18526 pub status: String,
18527 pub monthly_usd: f64,
18528 pub currency: String,
18529 pub interval: String,
18530 #[serde(default)]
18531 pub current_period_end: Option<String>,
18532 pub cancel_at_period_end: bool,
18533}
18534
18535#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18538pub struct PlatformInfo {
18539 pub public_base_url: String,
18541 pub contact_emails: serde_json::Map<String, serde_json::Value>,
18544 pub setup_complete: bool,
18546 pub registration_open: bool,
18547}
18548
18549#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18551pub struct PlatformLLMDefaults {
18552 #[serde(default, skip_serializing_if = "Option::is_none")]
18553 pub default_endpoint: Option<String>,
18554 #[serde(default, skip_serializing_if = "Option::is_none")]
18558 pub default_model: Option<String>,
18559 #[serde(default, skip_serializing_if = "Option::is_none")]
18560 pub default_provider: Option<String>,
18561 #[serde(default, skip_serializing_if = "Option::is_none")]
18565 pub fallback_model: Option<String>,
18566 #[serde(default, skip_serializing_if = "Option::is_none")]
18567 pub fallback_provider: Option<String>,
18568 #[serde(default, skip_serializing_if = "Option::is_none")]
18571 pub default_model_ref: Option<String>,
18572 #[serde(default, skip_serializing_if = "Option::is_none")]
18574 pub fallback_model_ref: Option<String>,
18575}
18576
18577#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18580pub struct PlaygroundAgentState {
18581 pub agent_id: String,
18582 pub tenant_id: String,
18583 pub nodes: Vec<CanvasNode>,
18584 pub edges: Vec<CanvasEdge>,
18585 pub metadata: serde_json::Map<String, serde_json::Value>,
18586 pub updated_at: String,
18587}
18588
18589#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18591pub struct PlaygroundTemplate {
18592 pub id: String,
18593 pub name: String,
18594 pub description: String,
18595 pub category: String,
18596 pub nodes: Vec<CanvasNode>,
18597 pub edges: Vec<CanvasEdge>,
18598}
18599
18600#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18602pub struct Program {
18603 pub program_id: String,
18604 pub tenant_id: String,
18605 pub agent_id: String,
18606 pub name: String,
18607 #[serde(default, skip_serializing_if = "Option::is_none")]
18608 pub description: Option<String>,
18609 #[serde(default, skip_serializing_if = "Option::is_none")]
18610 pub listing_id: Option<String>,
18611 pub steps: Vec<ProgramStep>,
18612 #[serde(default, skip_serializing_if = "Option::is_none")]
18613 pub created_at: Option<String>,
18614 #[serde(default, skip_serializing_if = "Option::is_none")]
18615 pub updated_at: Option<String>,
18616}
18617
18618#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18620pub struct ProgramStep {
18621 pub step_id: String,
18623 pub title: String,
18624 pub order_index: i64,
18625}
18626
18627#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18631pub struct Project {
18632 pub project_id: String,
18633 pub tenant_id: String,
18634 pub name: String,
18635 #[serde(default, skip_serializing_if = "Option::is_none")]
18636 pub description: Option<String>,
18637 #[serde(default, skip_serializing_if = "Option::is_none")]
18639 pub instructions: Option<String>,
18640 #[serde(default, skip_serializing_if = "Option::is_none")]
18641 pub knowledge_base_ids: Option<Vec<String>>,
18642 #[serde(default, skip_serializing_if = "Option::is_none")]
18645 pub file_ids: Option<Vec<String>>,
18646 #[serde(default, skip_serializing_if = "Option::is_none")]
18648 pub created_by: Option<String>,
18649 #[serde(default, skip_serializing_if = "Option::is_none")]
18651 pub visibility: Option<ProjectVisibility>,
18652 #[serde(default, skip_serializing_if = "Option::is_none")]
18654 pub shared_with: Option<Vec<ProjectGrant>>,
18655 #[serde(default, skip_serializing_if = "Option::is_none")]
18658 pub archived_at: Option<String>,
18659 pub created_at: String,
18660 pub updated_at: String,
18661}
18662
18663#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18665pub struct ProjectDetail {
18666 pub project_id: String,
18667 pub tenant_id: String,
18668 pub name: String,
18669 #[serde(default, skip_serializing_if = "Option::is_none")]
18670 pub description: Option<String>,
18671 #[serde(default, skip_serializing_if = "Option::is_none")]
18673 pub instructions: Option<String>,
18674 #[serde(default, skip_serializing_if = "Option::is_none")]
18675 pub knowledge_base_ids: Option<Vec<String>>,
18676 #[serde(default, skip_serializing_if = "Option::is_none")]
18679 pub file_ids: Option<Vec<String>>,
18680 #[serde(default, skip_serializing_if = "Option::is_none")]
18682 pub created_by: Option<String>,
18683 #[serde(default, skip_serializing_if = "Option::is_none")]
18685 pub visibility: Option<ProjectVisibility>,
18686 #[serde(default, skip_serializing_if = "Option::is_none")]
18688 pub shared_with: Option<Vec<ProjectGrant>>,
18689 #[serde(default, skip_serializing_if = "Option::is_none")]
18692 pub archived_at: Option<String>,
18693 pub created_at: String,
18694 pub updated_at: String,
18695 pub sessions: Vec<ProjectDetailSession>,
18697 pub session_count: i64,
18698 pub access: ProjectGrantAccess,
18700}
18701
18702#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18704pub struct ProjectDetailSession {
18705 pub session_id: String,
18706 pub agent_id: String,
18707 #[serde(default, skip_serializing_if = "Option::is_none")]
18708 pub updated_at: Option<String>,
18709 #[serde(default, skip_serializing_if = "Option::is_none")]
18710 pub title: Option<String>,
18711}
18712
18713#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18715pub struct ProjectGrant {
18716 pub user_id: String,
18717 pub access: ProjectGrantAccess,
18719}
18720
18721#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18723pub enum ProjectGrantAccess {
18724 #[default]
18725 #[serde(rename = "view")]
18726 View,
18727 #[serde(rename = "edit")]
18728 Edit,
18729 #[serde(untagged)]
18731 Other(String),
18732}
18733
18734impl ProjectGrantAccess {
18735 pub fn as_str(&self) -> &str {
18737 match self {
18738 Self::View => "view",
18739 Self::Edit => "edit",
18740 Self::Other(value) => value.as_str(),
18741 }
18742 }
18743}
18744
18745impl std::fmt::Display for ProjectGrantAccess {
18746 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18747 f.write_str(self.as_str())
18748 }
18749}
18750
18751impl From<&str> for ProjectGrantAccess {
18752 fn from(value: &str) -> Self {
18753 match value {
18754 "view" => Self::View,
18755 "edit" => Self::Edit,
18756 other => Self::Other(other.to_string()),
18757 }
18758 }
18759}
18760
18761#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
18763pub enum ProjectVisibility {
18764 #[default]
18765 #[serde(rename = "tenant")]
18766 Tenant,
18767 #[serde(rename = "private")]
18768 Private,
18769 #[serde(untagged)]
18771 Other(String),
18772}
18773
18774impl ProjectVisibility {
18775 pub fn as_str(&self) -> &str {
18777 match self {
18778 Self::Tenant => "tenant",
18779 Self::Private => "private",
18780 Self::Other(value) => value.as_str(),
18781 }
18782 }
18783}
18784
18785impl std::fmt::Display for ProjectVisibility {
18786 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18787 f.write_str(self.as_str())
18788 }
18789}
18790
18791impl From<&str> for ProjectVisibility {
18792 fn from(value: &str) -> Self {
18793 match value {
18794 "tenant" => Self::Tenant,
18795 "private" => Self::Private,
18796 other => Self::Other(other.to_string()),
18797 }
18798 }
18799}
18800
18801#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18803pub struct PromoCode {
18804 pub code: String,
18806 #[serde(default, skip_serializing_if = "Option::is_none")]
18808 pub program: Option<String>,
18809 pub owner_tenant_id: String,
18811 pub reward_tokens_per_subscription: i64,
18812 #[serde(default, skip_serializing_if = "Option::is_none")]
18814 pub subscriber_bonus_tokens: Option<i64>,
18815 #[serde(default, skip_serializing_if = "Option::is_none")]
18817 pub discount_percent: Option<f64>,
18818 #[serde(default, skip_serializing_if = "Option::is_none")]
18821 pub target_plan_id: Option<String>,
18822 #[serde(default, skip_serializing_if = "Option::is_none")]
18824 pub max_uses: Option<i64>,
18825 pub uses: i64,
18827 pub active: bool,
18828 pub created_at: String,
18830 pub updated_at: String,
18831}
18832
18833#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18835pub struct PromoCodeInput {
18836 #[serde(default, skip_serializing_if = "Option::is_none")]
18837 pub program: Option<String>,
18838 pub owner_tenant_id: String,
18839 pub reward_tokens_per_subscription: i64,
18840 #[serde(default, skip_serializing_if = "Option::is_none")]
18841 pub subscriber_bonus_tokens: Option<i64>,
18842 #[serde(default, skip_serializing_if = "Option::is_none")]
18843 pub discount_percent: Option<f64>,
18844 #[serde(default, skip_serializing_if = "Option::is_none")]
18846 pub target_plan_id: Option<String>,
18847 #[serde(default, skip_serializing_if = "Option::is_none")]
18848 pub max_uses: Option<i64>,
18849 #[serde(default, skip_serializing_if = "Option::is_none")]
18853 pub active: Option<bool>,
18854}
18855
18856#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18860pub struct PublicAgentCard {
18861 pub agent_id: String,
18862 pub name: String,
18863 #[serde(default, skip_serializing_if = "Option::is_none")]
18864 pub description: Option<String>,
18865 pub icon: serde_json::Value,
18867 #[serde(default, skip_serializing_if = "Option::is_none")]
18868 pub greeting: Option<String>,
18869 #[serde(default, skip_serializing_if = "Option::is_none")]
18871 pub capabilities: Option<String>,
18872 #[serde(default, skip_serializing_if = "Option::is_none")]
18873 pub specs: Option<Vec<PublicAgentCardSpec>>,
18874 #[serde(default, skip_serializing_if = "Option::is_none")]
18875 pub ui_avatar: Option<serde_json::Map<String, serde_json::Value>>,
18876 #[serde(default, skip_serializing_if = "Option::is_none")]
18877 pub ui_drop_genome: Option<serde_json::Map<String, serde_json::Value>>,
18878 #[serde(default, skip_serializing_if = "Option::is_none")]
18883 pub tenant_slug: Option<String>,
18884 #[serde(default, skip_serializing_if = "Option::is_none")]
18886 pub tenant_name: Option<String>,
18887}
18888
18889#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18891pub struct PublicAgentCardSpec {
18892 pub spec_id: String,
18893 pub name: String,
18894 #[serde(default, skip_serializing_if = "Option::is_none")]
18895 pub version: Option<String>,
18896}
18897
18898#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18900pub struct PublicBlogPost {
18901 pub slug: String,
18902 pub title: String,
18903 pub body: String,
18905 pub tags: Vec<String>,
18906 pub published_at: String,
18907 pub created_at: String,
18908 pub updated_at: String,
18909}
18910
18911#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18913pub struct PublicBlogPostSummary {
18914 pub slug: String,
18915 pub title: String,
18916 pub tags: Vec<String>,
18917 pub excerpt: String,
18919 pub published_at: String,
18920}
18921
18922#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18925pub struct PublicChatAnalytics {
18926 pub range: PublicChatAnalyticsRange,
18927 pub totals: PublicChatAnalyticsTotals,
18928 pub conversion: PublicChatAnalyticsConversion,
18930 pub timeseries: Vec<PublicChatAnalyticsTimesery>,
18931 pub by_country: Vec<PublicChatAnalyticsByCountryItem>,
18932 pub by_device: Vec<PublicChatAnalyticsByDeviceItem>,
18933 pub by_browser: Vec<PublicChatAnalyticsByBrowserItem>,
18934 pub by_os: Vec<PublicChatAnalyticsByO>,
18935 pub by_referrer: Vec<PublicChatAnalyticsByReferrerItem>,
18936 pub by_utm_source: Vec<PublicChatAnalyticsByUtmSourceItem>,
18937 pub by_agent: Vec<PublicChatAnalyticsByAgentItem>,
18938}
18939
18940#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18942pub struct PublicChatAnalyticsByAgentItem {
18943 pub agent_id: String,
18944 pub visits: i64,
18945 pub engaged: i64,
18946 pub messages: i64,
18947}
18948
18949#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18951pub struct PublicChatAnalyticsByBrowserItem {
18952 pub value: String,
18953 pub count: i64,
18954}
18955
18956#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18958pub struct PublicChatAnalyticsByCountryItem {
18959 pub value: String,
18960 pub count: i64,
18961}
18962
18963#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18965pub struct PublicChatAnalyticsByDeviceItem {
18966 pub value: String,
18967 pub count: i64,
18968}
18969
18970#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18972pub struct PublicChatAnalyticsByO {
18973 pub value: String,
18974 pub count: i64,
18975}
18976
18977#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18979pub struct PublicChatAnalyticsByReferrerItem {
18980 pub value: String,
18981 pub count: i64,
18982}
18983
18984#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18986pub struct PublicChatAnalyticsByUtmSourceItem {
18987 pub value: String,
18988 pub count: i64,
18989}
18990
18991#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18993pub struct PublicChatAnalyticsConversion {
18994 pub engagement_rate: f64,
18996 pub message_rate: f64,
18998 pub engaged_to_message_rate: f64,
19000}
19001
19002#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19004pub struct PublicChatAnalyticsRange {
19005 pub from: String,
19006 pub to: String,
19007 pub days: i64,
19008}
19009
19010#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19012pub struct PublicChatAnalyticsTimesery {
19013 pub date: String,
19014 pub visits: i64,
19015 pub engaged: i64,
19016 pub messages: i64,
19017}
19018
19019#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19021pub struct PublicChatAnalyticsTotals {
19022 pub public_chat_visit: i64,
19023 pub public_chat_engaged: i64,
19024 pub public_chat_message: i64,
19025}
19026
19027#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19029pub struct PublicDomainLookupResponse {
19030 #[serde(default, skip_serializing_if = "Option::is_none")]
19031 pub tenant_id: Option<String>,
19032 #[serde(default, skip_serializing_if = "Option::is_none")]
19033 pub found: Option<bool>,
19034}
19035
19036#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19038pub struct PublicPlan {
19039 pub id: String,
19040 pub name: String,
19041 pub price_amount_cents: i64,
19042 pub price_currency: String,
19043 pub quotas: serde_json::Map<String, serde_json::Value>,
19044}
19045
19046#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19049pub struct PublicSessionView {
19050 pub session_id: String,
19051 pub agent_name: String,
19052 pub greeting: String,
19053 pub description: String,
19054 pub messages: Vec<PublicSessionViewMessage>,
19055 pub message_count: i64,
19056 pub messages_remaining: i64,
19057 pub status: PublicSessionViewStatus,
19058}
19059
19060#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19062pub struct PublicSessionViewMessage {
19063 pub message_id: String,
19065 pub role: PublicSessionViewMessageRole,
19066 pub content: String,
19067 pub timestamp: String,
19068 pub run_id: String,
19069}
19070
19071#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19073pub enum PublicSessionViewMessageRole {
19074 #[default]
19075 #[serde(rename = "user")]
19076 User,
19077 #[serde(rename = "assistant")]
19078 Assistant,
19079 #[serde(rename = "system")]
19080 System,
19081 #[serde(rename = "tool_result")]
19082 ToolResult,
19083 #[serde(untagged)]
19085 Other(String),
19086}
19087
19088impl PublicSessionViewMessageRole {
19089 pub fn as_str(&self) -> &str {
19091 match self {
19092 Self::User => "user",
19093 Self::Assistant => "assistant",
19094 Self::System => "system",
19095 Self::ToolResult => "tool_result",
19096 Self::Other(value) => value.as_str(),
19097 }
19098 }
19099}
19100
19101impl std::fmt::Display for PublicSessionViewMessageRole {
19102 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19103 f.write_str(self.as_str())
19104 }
19105}
19106
19107impl From<&str> for PublicSessionViewMessageRole {
19108 fn from(value: &str) -> Self {
19109 match value {
19110 "user" => Self::User,
19111 "assistant" => Self::Assistant,
19112 "system" => Self::System,
19113 "tool_result" => Self::ToolResult,
19114 other => Self::Other(other.to_string()),
19115 }
19116 }
19117}
19118
19119#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19121pub enum PublicSessionViewStatus {
19122 #[default]
19123 #[serde(rename = "active")]
19124 Active,
19125 #[serde(rename = "closed")]
19126 Closed,
19127 #[serde(rename = "expired")]
19128 Expired,
19129 #[serde(untagged)]
19131 Other(String),
19132}
19133
19134impl PublicSessionViewStatus {
19135 pub fn as_str(&self) -> &str {
19137 match self {
19138 Self::Active => "active",
19139 Self::Closed => "closed",
19140 Self::Expired => "expired",
19141 Self::Other(value) => value.as_str(),
19142 }
19143 }
19144}
19145
19146impl std::fmt::Display for PublicSessionViewStatus {
19147 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19148 f.write_str(self.as_str())
19149 }
19150}
19151
19152impl From<&str> for PublicSessionViewStatus {
19153 fn from(value: &str) -> Self {
19154 match value {
19155 "active" => Self::Active,
19156 "closed" => Self::Closed,
19157 "expired" => Self::Expired,
19158 other => Self::Other(other.to_string()),
19159 }
19160 }
19161}
19162
19163#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19165pub struct PublicState {
19166 #[serde(default, skip_serializing_if = "Option::is_none")]
19167 pub marketplace: Option<serde_json::Map<String, serde_json::Value>>,
19168 #[serde(default, skip_serializing_if = "Option::is_none")]
19169 pub governance: Option<serde_json::Map<String, serde_json::Value>>,
19170 #[serde(default, skip_serializing_if = "Option::is_none")]
19171 pub plan: Option<String>,
19172 #[serde(default, skip_serializing_if = "Option::is_none")]
19173 pub branding: Option<serde_json::Map<String, serde_json::Value>>,
19174 pub category: String,
19175 #[serde(default, skip_serializing_if = "Option::is_none")]
19176 pub description: Option<String>,
19177 #[serde(default, skip_serializing_if = "Option::is_none")]
19178 pub logo_url: Option<String>,
19179 pub name: String,
19180 #[serde(default, skip_serializing_if = "Option::is_none")]
19181 pub published_at: Option<String>,
19182 pub short_description: String,
19183 pub slug: String,
19184 #[serde(default, skip_serializing_if = "Option::is_none")]
19185 pub social_links: Option<TenantSocialLinks>,
19186 #[serde(default, skip_serializing_if = "Option::is_none")]
19187 pub stats: Option<serde_json::Map<String, serde_json::Value>>,
19188 pub tags: Vec<String>,
19189 pub tenant_id: String,
19190}
19191
19192#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19194pub struct PublicStateAgent {
19195 #[serde(default, skip_serializing_if = "Option::is_none")]
19196 pub agent_id: Option<String>,
19197 #[serde(default, skip_serializing_if = "Option::is_none")]
19198 pub name: Option<String>,
19199 #[serde(default, skip_serializing_if = "Option::is_none")]
19200 pub description: Option<String>,
19201 #[serde(default, skip_serializing_if = "Option::is_none")]
19202 pub icon: Option<String>,
19203 #[serde(default, skip_serializing_if = "Option::is_none")]
19204 pub greeting: Option<String>,
19205}
19206
19207#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19209pub struct PublicTenant {
19210 #[serde(default, skip_serializing_if = "Option::is_none")]
19212 pub marketplace: Option<serde_json::Map<String, serde_json::Value>>,
19213 pub tenant_id: String,
19214 pub slug: String,
19215 pub name: String,
19216 #[serde(default, skip_serializing_if = "Option::is_none")]
19217 pub description: Option<String>,
19218 #[serde(default, skip_serializing_if = "Option::is_none")]
19219 pub logo_url: Option<String>,
19220 #[serde(default, skip_serializing_if = "Option::is_none")]
19221 pub category: Option<String>,
19222 pub tags: Vec<String>,
19223 pub agents_count: i64,
19224 pub agents: Vec<PublicTenantAgent>,
19225 pub stats: PublicTenantStats,
19226 #[serde(default, skip_serializing_if = "Option::is_none")]
19227 pub social_links: Option<TenantSocialLinks>,
19228 #[serde(default, skip_serializing_if = "Option::is_none")]
19229 pub branding: Option<serde_json::Map<String, serde_json::Value>>,
19230 #[serde(default, skip_serializing_if = "Option::is_none")]
19231 pub published_at: Option<String>,
19232}
19233
19234#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19236pub struct PublicTenantAgent {
19237 pub agent_id: String,
19238 pub name: String,
19239 #[serde(default, skip_serializing_if = "Option::is_none")]
19240 pub description: Option<String>,
19241 #[serde(default, skip_serializing_if = "Option::is_none")]
19242 pub icon: Option<String>,
19243 #[serde(default, skip_serializing_if = "Option::is_none")]
19244 pub greeting: Option<String>,
19245}
19246
19247#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19249pub struct PublicTenantStats {
19250 pub total_runs: i64,
19251 pub total_agents: i64,
19252 pub avg_rating: f64,
19253}
19254
19255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19257pub struct PublicTrackEventRequest {
19258 pub event: String,
19259 #[serde(default, skip_serializing_if = "Option::is_none")]
19260 pub properties: Option<serde_json::Map<String, serde_json::Value>>,
19261}
19262
19263#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19265pub struct PublishListingRequest {
19266 pub agent_id: String,
19267 #[serde(default, skip_serializing_if = "Option::is_none")]
19268 pub agent_version: Option<String>,
19269 pub name: String,
19270 #[serde(default, skip_serializing_if = "Option::is_none")]
19271 pub description: Option<String>,
19272 pub category: String,
19273 #[serde(default, skip_serializing_if = "Option::is_none")]
19274 pub tags: Option<Vec<String>>,
19275 #[serde(default, skip_serializing_if = "Option::is_none")]
19276 pub readme: Option<String>,
19277 #[serde(default, skip_serializing_if = "Option::is_none")]
19278 pub pricing: Option<serde_json::Map<String, serde_json::Value>>,
19279 #[serde(default, skip_serializing_if = "Option::is_none")]
19280 pub a2a_enabled: Option<bool>,
19281}
19282
19283#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19285pub struct PublishWorkspaceSnapshotRequest {
19286 pub html: String,
19288 #[serde(default, skip_serializing_if = "Option::is_none")]
19290 pub title: Option<String>,
19291}
19292
19293#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19295pub struct PublishWorkspaceSnapshotResponse {
19296 pub token: String,
19297 pub expires_at: String,
19298}
19299
19300#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19302pub struct PurgeAdminTenantResponse {
19303 #[serde(default, skip_serializing_if = "Option::is_none")]
19304 pub purged: Option<bool>,
19305 #[serde(default, skip_serializing_if = "Option::is_none")]
19306 pub tenant_id: Option<String>,
19307}
19308
19309#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19311pub struct PushBridgeTaskEventsResponse {
19312 #[serde(default, skip_serializing_if = "Option::is_none")]
19313 pub success: Option<bool>,
19314 #[serde(default, skip_serializing_if = "Option::is_none")]
19315 pub events_stored: Option<i64>,
19316}
19317
19318#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19320pub struct RateListingRequest {
19321 pub rating: i64,
19322 #[serde(default, skip_serializing_if = "Option::is_none")]
19323 pub comment: Option<String>,
19324}
19325
19326#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19328pub struct ReactivateTenantResponse {
19329 pub reactivated: bool,
19330 pub tenant_id: String,
19331}
19332
19333#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19336pub struct ReadinessReport {
19337 pub status: String,
19338 pub timestamp: String,
19339 pub components: serde_json::Map<String, serde_json::Value>,
19340}
19341
19342#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19344pub struct RedeemPromoCodeRequest {
19345 pub code: String,
19346}
19347
19348#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19350pub struct RedeemPromoCodeResponse {
19351 pub redeemed: bool,
19352 pub code: String,
19353 #[serde(default, skip_serializing_if = "Option::is_none")]
19354 pub discount_percent: Option<f64>,
19355 pub subscriber_bonus_tokens: i64,
19356}
19357
19358#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19360pub struct RegisterAmbassadorRequest {
19361 pub ambassador_id: String,
19362 #[serde(default, skip_serializing_if = "Option::is_none")]
19363 pub name: Option<String>,
19364 #[serde(default, skip_serializing_if = "Option::is_none")]
19365 pub role: Option<String>,
19366 #[serde(default, skip_serializing_if = "Option::is_none")]
19367 pub permissions: Option<serde_json::Map<String, serde_json::Value>>,
19368}
19369
19370#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19372pub struct RegisterAmbassadorResponse {
19373 pub ok: bool,
19374}
19375
19376#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19378pub struct RegisterResponse {
19379 pub message: String,
19380}
19381
19382#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19384pub struct RegistryAdminListSpecsResponse {
19385 pub specs: Vec<RegistryAdminListSpecsResponseSpec>,
19386 #[serde(default, skip_serializing_if = "Option::is_none")]
19387 pub next_cursor: Option<String>,
19388}
19389
19390#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19392pub struct RegistryAdminListSpecsResponseSpec {
19393 #[serde(default, skip_serializing_if = "Option::is_none")]
19394 pub scope: Option<String>,
19395 #[serde(default, skip_serializing_if = "Option::is_none")]
19396 pub name: Option<String>,
19397 #[serde(default, skip_serializing_if = "Option::is_none")]
19398 pub owner_tenant_id: Option<String>,
19399 #[serde(default, skip_serializing_if = "Option::is_none")]
19400 pub visibility: Option<SetRegistrySpecVisibilityRequestVisibility>,
19401 #[serde(default, skip_serializing_if = "Option::is_none")]
19402 pub latest_version: Option<String>,
19403 #[serde(default, skip_serializing_if = "Option::is_none")]
19404 pub published_at: Option<String>,
19405 #[serde(default, skip_serializing_if = "Option::is_none")]
19406 pub size_bytes: Option<i64>,
19407 #[serde(default, skip_serializing_if = "Option::is_none")]
19408 pub yanked: Option<bool>,
19409 #[serde(default, skip_serializing_if = "Option::is_none")]
19410 pub shared_with_count: Option<i64>,
19411 #[serde(default, skip_serializing_if = "Option::is_none")]
19412 pub categories: Option<Vec<String>>,
19413 #[serde(default, skip_serializing_if = "Option::is_none")]
19414 pub keywords: Option<Vec<String>>,
19415 #[serde(default, skip_serializing_if = "Option::is_none")]
19416 pub description: Option<String>,
19417}
19418
19419#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19421pub struct RegistryGetFileResponse {
19422 pub path: String,
19423 pub size: i64,
19424 pub binary: bool,
19425 pub truncated: bool,
19426 #[serde(default, skip_serializing_if = "Option::is_none")]
19428 pub content: Option<String>,
19429}
19430
19431#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19433pub struct RegistryGetReadmeResponse {
19434 pub readme: String,
19435}
19436
19437#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19439pub struct RegistryGetShareResponse {
19440 pub scope: String,
19441 pub name: String,
19442 pub shared_with: Vec<String>,
19443 pub owner_tenant_id: String,
19444 pub updated_at: String,
19445}
19446
19447#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19449pub struct RegistryGetSparseIndexResponse {
19450 pub scope: String,
19451 pub name: String,
19452 pub versions: Vec<RegistryGetSparseIndexResponseVersion>,
19453}
19454
19455#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19457pub struct RegistryGetSparseIndexResponseVersion {
19458 pub version: String,
19459 pub sha256: String,
19460 pub dependencies: Vec<ResolvedDep>,
19461 pub yanked: bool,
19462 #[serde(default, skip_serializing_if = "Option::is_none")]
19463 pub yank_reason: Option<String>,
19464 #[serde(default, skip_serializing_if = "Option::is_none")]
19465 pub size: Option<i64>,
19466 pub published_at: String,
19467}
19468
19469#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19471pub struct RegistryGetSpecMetadataResponse {
19472 pub scope: String,
19473 pub name: String,
19474 pub description: String,
19475 pub license: String,
19476 #[serde(default, skip_serializing_if = "Option::is_none")]
19477 pub repository: Option<String>,
19478 #[serde(default, skip_serializing_if = "Option::is_none")]
19479 pub homepage: Option<String>,
19480 pub categories: Vec<String>,
19481 pub keywords: Vec<String>,
19482 pub visibility: SetRegistrySpecVisibilityRequestVisibility,
19483 #[serde(default, skip_serializing_if = "Option::is_none")]
19484 pub shared_with: Option<Vec<String>>,
19485 pub owner_tenant_id: String,
19486 pub latest_version: String,
19487 pub versions: Vec<RegistryVersionEntry>,
19488 pub created_at: String,
19489 pub updated_at: String,
19490 pub tool_count: i64,
19491 pub skill_count: i64,
19492 pub capabilities: Vec<String>,
19493 #[serde(default, skip_serializing_if = "Option::is_none")]
19496 pub canvas: Option<RegistryGetSpecMetadataResponseCanvas>,
19497 #[serde(default, skip_serializing_if = "Option::is_none")]
19498 pub schema_version: Option<String>,
19499}
19500
19501#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19504pub enum RegistryGetSpecMetadataResponseCanvas {
19505 #[default]
19506 #[serde(rename = "document")]
19507 Document,
19508 #[serde(rename = "code")]
19509 Code,
19510 #[serde(rename = "image")]
19511 Image,
19512 #[serde(rename = "drawing")]
19513 Drawing,
19514 #[serde(untagged)]
19516 Other(String),
19517}
19518
19519impl RegistryGetSpecMetadataResponseCanvas {
19520 pub fn as_str(&self) -> &str {
19522 match self {
19523 Self::Document => "document",
19524 Self::Code => "code",
19525 Self::Image => "image",
19526 Self::Drawing => "drawing",
19527 Self::Other(value) => value.as_str(),
19528 }
19529 }
19530}
19531
19532impl std::fmt::Display for RegistryGetSpecMetadataResponseCanvas {
19533 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19534 f.write_str(self.as_str())
19535 }
19536}
19537
19538impl From<&str> for RegistryGetSpecMetadataResponseCanvas {
19539 fn from(value: &str) -> Self {
19540 match value {
19541 "document" => Self::Document,
19542 "code" => Self::Code,
19543 "image" => Self::Image,
19544 "drawing" => Self::Drawing,
19545 other => Self::Other(other.to_string()),
19546 }
19547 }
19548}
19549
19550#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19552pub struct RegistryGetSpecVersionResponse {
19553 #[serde(default, skip_serializing_if = "Option::is_none")]
19554 pub scope: Option<String>,
19555 #[serde(default, skip_serializing_if = "Option::is_none")]
19556 pub name: Option<String>,
19557 #[serde(default, skip_serializing_if = "Option::is_none")]
19558 pub version: Option<String>,
19559 #[serde(default, skip_serializing_if = "Option::is_none")]
19560 pub manifest: Option<serde_json::Map<String, serde_json::Value>>,
19561 #[serde(default, skip_serializing_if = "Option::is_none")]
19562 pub sha256: Option<String>,
19563 #[serde(default, skip_serializing_if = "Option::is_none")]
19564 pub size_bytes: Option<i64>,
19565 #[serde(default, skip_serializing_if = "Option::is_none")]
19566 pub dependencies: Option<Vec<ResolvedDep>>,
19567 #[serde(default, skip_serializing_if = "Option::is_none")]
19568 pub yanked: Option<bool>,
19569 #[serde(default, skip_serializing_if = "Option::is_none")]
19570 pub visibility: Option<SetRegistrySpecVisibilityRequestVisibility>,
19571 #[serde(default, skip_serializing_if = "Option::is_none")]
19572 pub shared_with: Option<Vec<String>>,
19573 #[serde(default, skip_serializing_if = "Option::is_none")]
19574 pub published_at: Option<String>,
19575 #[serde(default, skip_serializing_if = "Option::is_none")]
19576 pub download_url: Option<String>,
19577}
19578
19579#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19581pub struct RegistryListFilesResponse {
19582 pub files: Vec<RegistryListFilesResponseFile>,
19583}
19584
19585#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19587pub struct RegistryListFilesResponseFile {
19588 #[serde(default, skip_serializing_if = "Option::is_none")]
19589 pub path: Option<String>,
19590 #[serde(default, skip_serializing_if = "Option::is_none")]
19591 pub size: Option<i64>,
19592 #[serde(default, skip_serializing_if = "Option::is_none")]
19593 pub binary: Option<bool>,
19594}
19595
19596#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19598pub struct RegistryPublishRequest {
19599 pub manifest: String,
19601 pub artifact: FilePart,
19603 #[serde(default, skip_serializing_if = "Option::is_none")]
19605 pub sha256: Option<String>,
19606 #[serde(default, skip_serializing_if = "Option::is_none")]
19612 pub attestation: Option<String>,
19613}
19614
19615#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19617pub struct RegistryPublishResponse {
19618 pub scope: String,
19619 pub name: String,
19620 pub version: String,
19621 pub publisher_tenant_id: String,
19622 pub manifest: serde_json::Map<String, serde_json::Value>,
19623 pub sha256: String,
19624 pub size_bytes: i64,
19625 #[serde(default, skip_serializing_if = "Option::is_none")]
19626 pub artifact_key: Option<String>,
19627 #[serde(default, skip_serializing_if = "Option::is_none")]
19628 pub dependencies: Option<Vec<ResolvedDep>>,
19629 #[serde(default, skip_serializing_if = "Option::is_none")]
19630 pub yanked: Option<bool>,
19631 #[serde(default, skip_serializing_if = "Option::is_none")]
19632 pub yanked_reason: Option<String>,
19633 pub visibility: SetRegistrySpecVisibilityRequestVisibility,
19634 #[serde(default, skip_serializing_if = "Option::is_none")]
19635 pub shared_with: Option<Vec<String>>,
19636 #[serde(default, skip_serializing_if = "Option::is_none")]
19637 pub attestation: Option<serde_json::Map<String, serde_json::Value>>,
19638 pub published_at: String,
19639}
19640
19641#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19643pub struct RegistrySearchResponse {
19644 pub hits: Vec<RegistrySearchResponseHit>,
19645 pub total: i64,
19646 #[serde(default, skip_serializing_if = "Option::is_none")]
19647 pub next_cursor: Option<String>,
19648}
19649
19650#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19652pub struct RegistrySearchResponseHit {
19653 #[serde(default, skip_serializing_if = "Option::is_none")]
19654 pub scope: Option<String>,
19655 #[serde(default, skip_serializing_if = "Option::is_none")]
19656 pub name: Option<String>,
19657 #[serde(default, skip_serializing_if = "Option::is_none")]
19658 pub version: Option<String>,
19659 #[serde(default, skip_serializing_if = "Option::is_none")]
19660 pub description: Option<String>,
19661 #[serde(default, skip_serializing_if = "Option::is_none")]
19662 pub categories: Option<Vec<String>>,
19663 #[serde(default, skip_serializing_if = "Option::is_none")]
19664 pub keywords: Option<Vec<String>>,
19665 #[serde(default, skip_serializing_if = "Option::is_none")]
19666 pub publisher_tenant_id: Option<String>,
19667 #[serde(default, skip_serializing_if = "Option::is_none")]
19668 pub published_at: Option<String>,
19669}
19670
19671#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19673pub struct RegistrySetShareRequest {
19674 pub shared_with: Vec<String>,
19676}
19677
19678#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19680pub struct RegistrySetShareResponse {
19681 #[serde(default, skip_serializing_if = "Option::is_none")]
19682 pub scope: Option<String>,
19683 #[serde(default, skip_serializing_if = "Option::is_none")]
19684 pub name: Option<String>,
19685 #[serde(default, skip_serializing_if = "Option::is_none")]
19686 pub shared_with: Option<Vec<String>>,
19687 #[serde(default, skip_serializing_if = "Option::is_none")]
19688 pub owner_tenant_id: Option<String>,
19689 #[serde(default, skip_serializing_if = "Option::is_none")]
19690 pub updated_at: Option<String>,
19691}
19692
19693#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19695pub struct RegistrySpecFeatureState {
19696 pub scope: String,
19697 pub name: String,
19698 pub featured: bool,
19700}
19701
19702#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19704pub struct RegistryVersionEntry {
19705 pub version: String,
19706 pub sha256: String,
19707 pub dependencies: Vec<ResolvedDep>,
19708 pub yanked: bool,
19709 #[serde(default, skip_serializing_if = "Option::is_none")]
19710 pub yank_reason: Option<String>,
19711 #[serde(default, skip_serializing_if = "Option::is_none")]
19712 pub size: Option<i64>,
19713 pub published_at: String,
19714}
19715
19716#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19718pub struct RegistryYankVersionRequest {
19719 #[serde(default, skip_serializing_if = "Option::is_none")]
19720 pub reason: Option<String>,
19721}
19722
19723#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19725pub struct ReindexKnowledgeBaseResponse {
19726 pub reindexed: bool,
19727 pub total_chunks: i64,
19728 pub embedded: i64,
19730 pub documents: i64,
19731 pub embedding_model: String,
19732 pub embedding_dimensions: i64,
19733}
19734
19735#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19737pub struct RejectRunRequest {
19738 #[serde(default, skip_serializing_if = "Option::is_none")]
19740 pub reason: Option<String>,
19741}
19742
19743#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19745pub struct RejectRunResponse {
19746 pub rejected: bool,
19747 pub run_id: String,
19748 #[serde(default, skip_serializing_if = "Option::is_none")]
19749 pub reason: Option<String>,
19750}
19751
19752#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19754pub struct RemoveScheduleResponse {
19755 pub removed: bool,
19756 pub agent_id: String,
19757}
19758
19759#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19761pub struct ReplaceConstitutionRequest {
19762 pub rules: Vec<ConstitutionRule>,
19763 #[serde(default, skip_serializing_if = "Option::is_none")]
19766 pub rationale: Option<String>,
19767}
19768
19769#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19773pub struct ReplayResult {
19774 pub deterministic: bool,
19775 pub verified: ReplayResultVerified,
19776 #[serde(rename = "eventsReplayed")]
19780 pub events_replayed: i64,
19781 #[serde(rename = "runId")]
19784 pub run_id: String,
19785 pub mode: ReplayResultMode,
19786 #[serde(rename = "divergencePoint", default, skip_serializing_if = "Option::is_none")]
19790 pub divergence_point: Option<i64>,
19791 #[serde(rename = "divergenceReason", default, skip_serializing_if = "Option::is_none")]
19795 pub divergence_reason: Option<String>,
19796 #[serde(rename = "stepComparisons", default, skip_serializing_if = "Option::is_none")]
19800 pub step_comparisons: Option<Vec<ReplayResultStepComparison>>,
19801 #[serde(rename = "events_replayed")]
19802 pub events_replayed_: i64,
19803 #[serde(rename = "run_id")]
19804 pub run_id_: String,
19805 #[serde(rename = "divergence_point", default, skip_serializing_if = "Option::is_none")]
19806 pub divergence_point_: Option<i64>,
19807 #[serde(rename = "divergence_reason", default, skip_serializing_if = "Option::is_none")]
19808 pub divergence_reason_: Option<String>,
19809 #[serde(rename = "step_comparisons", default, skip_serializing_if = "Option::is_none")]
19810 pub step_comparisons_: Option<Vec<ReplayResultStepComparison2>>,
19811}
19812
19813#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19815pub enum ReplayResultMode {
19816 #[default]
19817 #[serde(rename = "verify")]
19818 Verify,
19819 #[serde(rename = "execute")]
19820 Execute,
19821 #[serde(untagged)]
19823 Other(String),
19824}
19825
19826impl ReplayResultMode {
19827 pub fn as_str(&self) -> &str {
19829 match self {
19830 Self::Verify => "verify",
19831 Self::Execute => "execute",
19832 Self::Other(value) => value.as_str(),
19833 }
19834 }
19835}
19836
19837impl std::fmt::Display for ReplayResultMode {
19838 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19839 f.write_str(self.as_str())
19840 }
19841}
19842
19843impl From<&str> for ReplayResultMode {
19844 fn from(value: &str) -> Self {
19845 match value {
19846 "verify" => Self::Verify,
19847 "execute" => Self::Execute,
19848 other => Self::Other(other.to_string()),
19849 }
19850 }
19851}
19852
19853#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19855pub struct ReplayResultStepComparison {
19856 pub seq: i64,
19857 pub r#type: String,
19858 pub matches: bool,
19859 #[serde(rename = "mismatchDetail", default, skip_serializing_if = "Option::is_none")]
19863 pub mismatch_detail: Option<String>,
19864 #[serde(rename = "mismatch_detail", default, skip_serializing_if = "Option::is_none")]
19865 pub mismatch_detail_: Option<String>,
19866}
19867
19868#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19870pub struct ReplayResultStepComparison2 {
19871 pub seq: i64,
19872 pub r#type: String,
19873 pub matches: bool,
19874 #[serde(rename = "mismatchDetail", default, skip_serializing_if = "Option::is_none")]
19878 pub mismatch_detail: Option<String>,
19879 #[serde(rename = "mismatch_detail", default, skip_serializing_if = "Option::is_none")]
19880 pub mismatch_detail_: Option<String>,
19881}
19882
19883#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19885pub enum ReplayResultVerified {
19886 #[default]
19887 #[serde(rename = "recorded_log")]
19888 RecordedLog,
19889 #[serde(untagged)]
19891 Other(String),
19892}
19893
19894impl ReplayResultVerified {
19895 pub fn as_str(&self) -> &str {
19897 match self {
19898 Self::RecordedLog => "recorded_log",
19899 Self::Other(value) => value.as_str(),
19900 }
19901 }
19902}
19903
19904impl std::fmt::Display for ReplayResultVerified {
19905 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19906 f.write_str(self.as_str())
19907 }
19908}
19909
19910impl From<&str> for ReplayResultVerified {
19911 fn from(value: &str) -> Self {
19912 match value {
19913 "recorded_log" => Self::RecordedLog,
19914 other => Self::Other(other.to_string()),
19915 }
19916 }
19917}
19918
19919#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19921pub struct RequestOtpCodeResponse {
19922 pub ok: bool,
19923 pub message: String,
19924}
19925
19926#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19928pub struct ResendInviteResponse {
19929 pub resent: bool,
19930 pub email_sent: bool,
19931 pub invite: serde_json::Map<String, serde_json::Value>,
19932}
19933
19934#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19936pub struct ResetAgentResponse {
19937 pub ok: bool,
19938 pub sessions: i64,
19940 pub runs: i64,
19942}
19943
19944#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19946pub struct ResolveAmbassadorRequestRequest {
19947 pub response: String,
19948}
19949
19950#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19952pub struct ResolvedDep {
19953 pub scope: String,
19954 pub name: String,
19955 pub version_req: String,
19956}
19957
19958#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19960pub struct ResolveSharedSessionResponse {
19961 #[serde(default, skip_serializing_if = "Option::is_none")]
19962 pub session_id: Option<String>,
19963 #[serde(default, skip_serializing_if = "Option::is_none")]
19964 pub agent_name: Option<String>,
19965 #[serde(default, skip_serializing_if = "Option::is_none")]
19966 pub role: Option<CreateSessionShareRequestRole>,
19967}
19968
19969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
19977pub struct ResourcePermission {
19978 pub resource: String,
19979 pub actions: Vec<ResourcePermissionAction>,
19980}
19981
19982#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
19984pub enum ResourcePermissionAction {
19985 #[default]
19986 #[serde(rename = "read")]
19987 Read,
19988 #[serde(rename = "write")]
19989 Write,
19990 #[serde(rename = "delete")]
19991 Delete,
19992 #[serde(rename = "execute")]
19993 Execute,
19994 #[serde(untagged)]
19996 Other(String),
19997}
19998
19999impl ResourcePermissionAction {
20000 pub fn as_str(&self) -> &str {
20002 match self {
20003 Self::Read => "read",
20004 Self::Write => "write",
20005 Self::Delete => "delete",
20006 Self::Execute => "execute",
20007 Self::Other(value) => value.as_str(),
20008 }
20009 }
20010}
20011
20012impl std::fmt::Display for ResourcePermissionAction {
20013 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20014 f.write_str(self.as_str())
20015 }
20016}
20017
20018impl From<&str> for ResourcePermissionAction {
20019 fn from(value: &str) -> Self {
20020 match value {
20021 "read" => Self::Read,
20022 "write" => Self::Write,
20023 "delete" => Self::Delete,
20024 "execute" => Self::Execute,
20025 other => Self::Other(other.to_string()),
20026 }
20027 }
20028}
20029
20030#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20032pub struct ResourceUsageEntry {
20033 pub count: f64,
20034 pub limit: f64,
20035 pub over_by: f64,
20036}
20037
20038#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20040pub struct RespondToPublicHitlRequest {
20041 pub response: String,
20042}
20043
20044#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20046pub struct RespondToPublicHitlResponse {
20047 pub status: RespondToPublicHitlResponseStatus,
20048 pub run_id: String,
20050}
20051
20052#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20054pub enum RespondToPublicHitlResponseStatus {
20055 #[default]
20056 #[serde(rename = "ok")]
20057 Ok,
20058 #[serde(untagged)]
20060 Other(String),
20061}
20062
20063impl RespondToPublicHitlResponseStatus {
20064 pub fn as_str(&self) -> &str {
20066 match self {
20067 Self::Ok => "ok",
20068 Self::Other(value) => value.as_str(),
20069 }
20070 }
20071}
20072
20073impl std::fmt::Display for RespondToPublicHitlResponseStatus {
20074 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20075 f.write_str(self.as_str())
20076 }
20077}
20078
20079impl From<&str> for RespondToPublicHitlResponseStatus {
20080 fn from(value: &str) -> Self {
20081 match value {
20082 "ok" => Self::Ok,
20083 other => Self::Other(other.to_string()),
20084 }
20085 }
20086}
20087
20088#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20090pub struct RespondToRunRequest {
20091 pub response: String,
20092}
20093
20094#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20096pub struct RespondToRunResponse {
20097 #[serde(default, skip_serializing_if = "Option::is_none")]
20098 pub accepted: Option<bool>,
20099}
20100
20101#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20103pub struct ResponsesOutputItem {
20104 pub r#type: ResponsesOutputItemType,
20105 pub role: OpenAiChatCompletionChoiceMessageRole,
20106 pub content: Vec<ResponsesOutputItemContentItem>,
20107}
20108
20109#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20111pub struct ResponsesOutputItemContentItem {
20112 pub r#type: ResponsesOutputItemContentItemType,
20113 pub text: String,
20114}
20115
20116#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20118pub enum ResponsesOutputItemContentItemType {
20119 #[default]
20120 #[serde(rename = "output_text")]
20121 OutputText,
20122 #[serde(untagged)]
20124 Other(String),
20125}
20126
20127impl ResponsesOutputItemContentItemType {
20128 pub fn as_str(&self) -> &str {
20130 match self {
20131 Self::OutputText => "output_text",
20132 Self::Other(value) => value.as_str(),
20133 }
20134 }
20135}
20136
20137impl std::fmt::Display for ResponsesOutputItemContentItemType {
20138 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20139 f.write_str(self.as_str())
20140 }
20141}
20142
20143impl From<&str> for ResponsesOutputItemContentItemType {
20144 fn from(value: &str) -> Self {
20145 match value {
20146 "output_text" => Self::OutputText,
20147 other => Self::Other(other.to_string()),
20148 }
20149 }
20150}
20151
20152#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20154pub enum ResponsesOutputItemType {
20155 #[default]
20156 #[serde(rename = "message")]
20157 Message,
20158 #[serde(untagged)]
20160 Other(String),
20161}
20162
20163impl ResponsesOutputItemType {
20164 pub fn as_str(&self) -> &str {
20166 match self {
20167 Self::Message => "message",
20168 Self::Other(value) => value.as_str(),
20169 }
20170 }
20171}
20172
20173impl std::fmt::Display for ResponsesOutputItemType {
20174 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20175 f.write_str(self.as_str())
20176 }
20177}
20178
20179impl From<&str> for ResponsesOutputItemType {
20180 fn from(value: &str) -> Self {
20181 match value {
20182 "message" => Self::Message,
20183 other => Self::Other(other.to_string()),
20184 }
20185 }
20186}
20187
20188#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20190pub struct RestoreWorkspaceTrashRequest {
20191 pub trash_path: String,
20193}
20194
20195#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20197pub struct RestoreWorkspaceTrashResponse {
20198 pub restored: bool,
20199 pub original_path: String,
20200 pub original_workspace_id: String,
20201}
20202
20203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20205pub struct ResumeCompanyResponse {
20206 #[serde(default, skip_serializing_if = "Option::is_none")]
20207 pub status: Option<String>,
20208}
20209
20210#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20212pub struct ResumeMissionResponse {
20213 pub accepted: bool,
20214 pub mission: Mission,
20215}
20216
20217#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20219pub struct ResumeRunRequest {
20220 #[serde(default, skip_serializing_if = "Option::is_none")]
20223 pub input: Option<ResumeRunRequestInput>,
20224 #[serde(default, skip_serializing_if = "Option::is_none")]
20226 pub response: Option<serde_json::Value>,
20227}
20228
20229#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20232pub struct ResumeRunRequestInput {
20233 #[serde(default, skip_serializing_if = "Option::is_none")]
20234 pub note: Option<String>,
20235 #[serde(default, skip_serializing_if = "Option::is_none")]
20236 pub message: Option<String>,
20237}
20238
20239#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20241pub struct ResumeRunResponse {
20242 pub resumed: bool,
20243 pub run_id: String,
20244}
20245
20246#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20248pub struct RevokeAPIKeyResponse {
20249 pub revoked: bool,
20250 pub key_id: String,
20251}
20252
20253#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20255pub struct RevokeMeSessionResponse {
20256 pub ok: bool,
20257 pub key_id: String,
20258 #[serde(default, skip_serializing_if = "Option::is_none")]
20259 pub already_revoked: Option<bool>,
20260}
20261
20262#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20264pub struct RiskClassification {
20265 pub level: RiskClassificationUpdateLevel,
20266 #[serde(default, skip_serializing_if = "Option::is_none")]
20268 pub annex_iii_category: Option<RiskClassificationUpdateAnnexIiiCategory>,
20269 pub justification: String,
20270 pub assessor: String,
20272 pub assessed_at: String,
20273 pub review_due_at: String,
20274}
20275
20276#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20278pub struct RiskClassificationUpdate {
20279 pub level: RiskClassificationUpdateLevel,
20280 #[serde(default, skip_serializing_if = "Option::is_none")]
20282 pub annex_iii_category: Option<RiskClassificationUpdateAnnexIiiCategory>,
20283 pub justification: String,
20284 pub assessor: String,
20285 #[serde(default, skip_serializing_if = "Option::is_none")]
20287 pub assessed_at: Option<String>,
20288 pub review_due_at: String,
20289}
20290
20291#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20293pub enum RiskClassificationUpdateAnnexIiiCategory {
20294 #[default]
20295 #[serde(rename = "biometric")]
20296 Biometric,
20297 #[serde(rename = "critical-infrastructure")]
20298 CriticalInfrastructure,
20299 #[serde(rename = "education")]
20300 Education,
20301 #[serde(rename = "employment")]
20302 Employment,
20303 #[serde(rename = "essential-services")]
20304 EssentialServices,
20305 #[serde(rename = "law-enforcement")]
20306 LawEnforcement,
20307 #[serde(rename = "migration")]
20308 Migration,
20309 #[serde(rename = "democratic-processes")]
20310 DemocraticProcesses,
20311 #[serde(untagged)]
20313 Other(String),
20314}
20315
20316impl RiskClassificationUpdateAnnexIiiCategory {
20317 pub fn as_str(&self) -> &str {
20319 match self {
20320 Self::Biometric => "biometric",
20321 Self::CriticalInfrastructure => "critical-infrastructure",
20322 Self::Education => "education",
20323 Self::Employment => "employment",
20324 Self::EssentialServices => "essential-services",
20325 Self::LawEnforcement => "law-enforcement",
20326 Self::Migration => "migration",
20327 Self::DemocraticProcesses => "democratic-processes",
20328 Self::Other(value) => value.as_str(),
20329 }
20330 }
20331}
20332
20333impl std::fmt::Display for RiskClassificationUpdateAnnexIiiCategory {
20334 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20335 f.write_str(self.as_str())
20336 }
20337}
20338
20339impl From<&str> for RiskClassificationUpdateAnnexIiiCategory {
20340 fn from(value: &str) -> Self {
20341 match value {
20342 "biometric" => Self::Biometric,
20343 "critical-infrastructure" => Self::CriticalInfrastructure,
20344 "education" => Self::Education,
20345 "employment" => Self::Employment,
20346 "essential-services" => Self::EssentialServices,
20347 "law-enforcement" => Self::LawEnforcement,
20348 "migration" => Self::Migration,
20349 "democratic-processes" => Self::DemocraticProcesses,
20350 other => Self::Other(other.to_string()),
20351 }
20352 }
20353}
20354
20355#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20357pub enum RiskClassificationUpdateLevel {
20358 #[default]
20359 #[serde(rename = "minimal")]
20360 Minimal,
20361 #[serde(rename = "limited")]
20362 Limited,
20363 #[serde(rename = "high")]
20364 High,
20365 #[serde(rename = "unacceptable")]
20366 Unacceptable,
20367 #[serde(untagged)]
20369 Other(String),
20370}
20371
20372impl RiskClassificationUpdateLevel {
20373 pub fn as_str(&self) -> &str {
20375 match self {
20376 Self::Minimal => "minimal",
20377 Self::Limited => "limited",
20378 Self::High => "high",
20379 Self::Unacceptable => "unacceptable",
20380 Self::Other(value) => value.as_str(),
20381 }
20382 }
20383}
20384
20385impl std::fmt::Display for RiskClassificationUpdateLevel {
20386 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20387 f.write_str(self.as_str())
20388 }
20389}
20390
20391impl From<&str> for RiskClassificationUpdateLevel {
20392 fn from(value: &str) -> Self {
20393 match value {
20394 "minimal" => Self::Minimal,
20395 "limited" => Self::Limited,
20396 "high" => Self::High,
20397 "unacceptable" => Self::Unacceptable,
20398 other => Self::Other(other.to_string()),
20399 }
20400 }
20401}
20402
20403#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20405pub struct RollbackAgentRequest {
20406 pub version: i64,
20408}
20409
20410#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20412pub struct RootAttestation {
20413 pub root_agent_id: String,
20414 pub founder_id: String,
20415 pub founder_signature: String,
20416 pub constitution_hash: String,
20417 pub created_at: String,
20418}
20419
20420#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20422pub struct RotateAgentIdentityResponse {
20423 #[serde(default, skip_serializing_if = "Option::is_none")]
20424 pub public_key: Option<String>,
20425 #[serde(default, skip_serializing_if = "Option::is_none")]
20426 pub rotated_at: Option<String>,
20427}
20428
20429#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20431pub struct Run {
20432 #[serde(default, skip_serializing_if = "Option::is_none")]
20437 pub execution_mode: Option<RunExecutionMode>,
20438 pub run_id: String,
20439 pub tenant_id: String,
20440 pub agent_id: String,
20441 #[serde(default, skip_serializing_if = "Option::is_none")]
20442 pub session_id: Option<String>,
20443 pub status: RunStatus,
20444 #[serde(default, skip_serializing_if = "Option::is_none")]
20445 pub input: Option<serde_json::Map<String, serde_json::Value>>,
20446 #[serde(default, skip_serializing_if = "Option::is_none")]
20453 pub output: Option<RunOutput>,
20454 #[serde(default, skip_serializing_if = "Option::is_none")]
20455 pub metrics: Option<RunMetrics>,
20456 #[serde(default, skip_serializing_if = "Option::is_none")]
20459 pub error: Option<String>,
20460 #[serde(default, skip_serializing_if = "Option::is_none")]
20467 pub error_code: Option<String>,
20468 #[serde(default, skip_serializing_if = "Option::is_none")]
20473 pub error_details: Option<serde_json::Map<String, serde_json::Value>>,
20474 #[serde(default, skip_serializing_if = "Option::is_none")]
20478 pub approvals: Option<Vec<RunApproval>>,
20479 pub created_at: String,
20480 #[serde(default, skip_serializing_if = "Option::is_none")]
20481 pub started_at: Option<String>,
20482 #[serde(default, skip_serializing_if = "Option::is_none")]
20483 pub completed_at: Option<String>,
20484 #[serde(default, skip_serializing_if = "Option::is_none")]
20486 pub team_run_id: Option<String>,
20487 #[serde(default, skip_serializing_if = "Option::is_none")]
20489 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
20490 #[serde(default, skip_serializing_if = "Option::is_none")]
20492 pub step_seq: Option<i64>,
20493 #[serde(default, skip_serializing_if = "Option::is_none")]
20495 pub artifacts: Option<Vec<Artifact>>,
20496 #[serde(default, skip_serializing_if = "Option::is_none")]
20498 pub resource_limits: Option<RunResourceLimits>,
20499}
20500
20501#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20503pub struct RunApproval {
20504 pub decision: RunApprovalDecision,
20505 pub tools: Vec<String>,
20507 pub decided_at: String,
20508 #[serde(default, skip_serializing_if = "Option::is_none")]
20510 pub decided_by: Option<String>,
20511 #[serde(default, skip_serializing_if = "Option::is_none")]
20513 pub reason: Option<String>,
20514}
20515
20516#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20518pub enum RunApprovalDecision {
20519 #[default]
20520 #[serde(rename = "approved")]
20521 Approved,
20522 #[serde(rename = "rejected")]
20523 Rejected,
20524 #[serde(untagged)]
20526 Other(String),
20527}
20528
20529impl RunApprovalDecision {
20530 pub fn as_str(&self) -> &str {
20532 match self {
20533 Self::Approved => "approved",
20534 Self::Rejected => "rejected",
20535 Self::Other(value) => value.as_str(),
20536 }
20537 }
20538}
20539
20540impl std::fmt::Display for RunApprovalDecision {
20541 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20542 f.write_str(self.as_str())
20543 }
20544}
20545
20546impl From<&str> for RunApprovalDecision {
20547 fn from(value: &str) -> Self {
20548 match value {
20549 "approved" => Self::Approved,
20550 "rejected" => Self::Rejected,
20551 other => Self::Other(other.to_string()),
20552 }
20553 }
20554}
20555
20556#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20561pub struct RunApproveRequest {
20562 #[serde(default, skip_serializing_if = "Option::is_none")]
20564 pub response: Option<String>,
20565}
20566
20567#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20569pub struct RunCanvasLoopRequest {
20570 pub supervisor_agent_id: String,
20571 pub worker_ids: Vec<String>,
20574 pub loop_id: String,
20577 #[serde(default, skip_serializing_if = "Option::is_none")]
20580 pub condition: Option<String>,
20581 #[serde(default, skip_serializing_if = "Option::is_none")]
20583 pub prompt: Option<String>,
20584}
20585
20586#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20588pub struct RunCanvasLoopResponse {
20589 pub mission_id: String,
20590 pub team_id: String,
20591 pub worker_count: i64,
20592 pub max_passes: i64,
20593 pub budget_usd: f64,
20594 pub time_minutes: f64,
20595}
20596
20597#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20599pub struct RunCanvasWorkflowRequest {
20600 pub steps: Vec<CanvasWorkflowStep>,
20605 #[serde(default, skip_serializing_if = "Option::is_none")]
20607 pub goal: Option<String>,
20608 #[serde(default, skip_serializing_if = "Option::is_none")]
20609 pub budget_usd_per_step: Option<f64>,
20610 #[serde(default, skip_serializing_if = "Option::is_none")]
20611 pub time_minutes: Option<f64>,
20612 #[serde(default, skip_serializing_if = "Option::is_none")]
20614 pub feedback: Option<String>,
20615}
20616
20617#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20619pub struct RunCanvasWorkflowResponse {
20620 pub mission_id: String,
20621 pub step_count: i64,
20623 pub edge_count: i64,
20625}
20626
20627#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20629pub struct RunCheckpoint {
20630 #[serde(default, skip_serializing_if = "Option::is_none")]
20631 pub step: Option<i64>,
20632 #[serde(default, skip_serializing_if = "Option::is_none")]
20636 pub messages: Option<Vec<ChatMessage>>,
20637 #[serde(default, skip_serializing_if = "Option::is_none")]
20640 pub metrics: Option<serde_json::Map<String, serde_json::Value>>,
20641}
20642
20643#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20650pub struct RunCostEstimate {
20651 pub model: String,
20653 pub estimate: RunCostEstimateEstimate,
20654 pub basis: RunCostEstimateBasis,
20657}
20658
20659#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20662pub struct RunCostEstimateBasis {
20663 pub rate: RunCostEstimateBasisRate,
20666 pub runs_sampled: i64,
20667 #[serde(default)]
20668 pub avg_steps: Option<i64>,
20669 #[serde(default)]
20670 pub avg_output_tokens_per_step: Option<i64>,
20671 #[serde(default)]
20673 pub median_cost_usd: Option<f64>,
20674 #[serde(default)]
20676 pub p90_cost_usd: Option<f64>,
20677 pub pricing: RunCostEstimateBasisPricing,
20680}
20681
20682#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20685pub enum RunCostEstimateBasisPricing {
20686 #[default]
20687 #[serde(rename = "model")]
20688 Model,
20689 #[serde(rename = "fallback")]
20690 Fallback,
20691 #[serde(rename = "unknown")]
20692 Unknown,
20693 #[serde(untagged)]
20695 Other(String),
20696}
20697
20698impl RunCostEstimateBasisPricing {
20699 pub fn as_str(&self) -> &str {
20701 match self {
20702 Self::Model => "model",
20703 Self::Fallback => "fallback",
20704 Self::Unknown => "unknown",
20705 Self::Other(value) => value.as_str(),
20706 }
20707 }
20708}
20709
20710impl std::fmt::Display for RunCostEstimateBasisPricing {
20711 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20712 f.write_str(self.as_str())
20713 }
20714}
20715
20716impl From<&str> for RunCostEstimateBasisPricing {
20717 fn from(value: &str) -> Self {
20718 match value {
20719 "model" => Self::Model,
20720 "fallback" => Self::Fallback,
20721 "unknown" => Self::Unknown,
20722 other => Self::Other(other.to_string()),
20723 }
20724 }
20725}
20726
20727#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20730pub enum RunCostEstimateBasisRate {
20731 #[default]
20732 #[serde(rename = "user")]
20733 User,
20734 #[serde(untagged)]
20736 Other(String),
20737}
20738
20739impl RunCostEstimateBasisRate {
20740 pub fn as_str(&self) -> &str {
20742 match self {
20743 Self::User => "user",
20744 Self::Other(value) => value.as_str(),
20745 }
20746 }
20747}
20748
20749impl std::fmt::Display for RunCostEstimateBasisRate {
20750 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20751 f.write_str(self.as_str())
20752 }
20753}
20754
20755impl From<&str> for RunCostEstimateBasisRate {
20756 fn from(value: &str) -> Self {
20757 match value {
20758 "user" => Self::User,
20759 other => Self::Other(other.to_string()),
20760 }
20761 }
20762}
20763
20764#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20766pub struct RunCostEstimateEstimate {
20767 pub estimated_cost_usd: f64,
20771 pub confidence: RunCostEstimateEstimateConfidence,
20774 pub breakdown: RunCostEstimateEstimateBreakdown,
20775}
20776
20777#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20779pub struct RunCostEstimateEstimateBreakdown {
20780 pub input_tokens_est: i64,
20781 pub output_tokens_est: i64,
20782 pub input_cost_est: f64,
20783 pub output_cost_est: f64,
20784}
20785
20786#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20789pub enum RunCostEstimateEstimateConfidence {
20790 #[default]
20791 #[serde(rename = "low")]
20792 Low,
20793 #[serde(rename = "medium")]
20794 Medium,
20795 #[serde(rename = "high")]
20796 High,
20797 #[serde(untagged)]
20799 Other(String),
20800}
20801
20802impl RunCostEstimateEstimateConfidence {
20803 pub fn as_str(&self) -> &str {
20805 match self {
20806 Self::Low => "low",
20807 Self::Medium => "medium",
20808 Self::High => "high",
20809 Self::Other(value) => value.as_str(),
20810 }
20811 }
20812}
20813
20814impl std::fmt::Display for RunCostEstimateEstimateConfidence {
20815 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20816 f.write_str(self.as_str())
20817 }
20818}
20819
20820impl From<&str> for RunCostEstimateEstimateConfidence {
20821 fn from(value: &str) -> Self {
20822 match value {
20823 "low" => Self::Low,
20824 "medium" => Self::Medium,
20825 "high" => Self::High,
20826 other => Self::Other(other.to_string()),
20827 }
20828 }
20829}
20830
20831#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20833pub struct RunEvaluationRequest {
20834 pub dataset_id: String,
20835 #[serde(default, skip_serializing_if = "Option::is_none")]
20836 pub agent_version: Option<String>,
20837}
20838
20839#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20844pub enum RunExecutionMode {
20845 #[default]
20846 #[serde(rename = "async")]
20847 Async,
20848 #[serde(rename = "bridge")]
20849 Bridge,
20850 #[serde(untagged)]
20852 Other(String),
20853}
20854
20855impl RunExecutionMode {
20856 pub fn as_str(&self) -> &str {
20858 match self {
20859 Self::Async => "async",
20860 Self::Bridge => "bridge",
20861 Self::Other(value) => value.as_str(),
20862 }
20863 }
20864}
20865
20866impl std::fmt::Display for RunExecutionMode {
20867 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20868 f.write_str(self.as_str())
20869 }
20870}
20871
20872impl From<&str> for RunExecutionMode {
20873 fn from(value: &str) -> Self {
20874 match value {
20875 "async" => Self::Async,
20876 "bridge" => Self::Bridge,
20877 other => Self::Other(other.to_string()),
20878 }
20879 }
20880}
20881
20882#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20885pub struct RunFeedbackList {
20886 pub feedbacks: Vec<RunFeedbackListFeedback>,
20887}
20888
20889#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20891pub struct RunFeedbackListFeedback {
20892 pub message_id: String,
20895 pub reaction: RunFeedbackListFeedbackReaction,
20896 #[serde(default, skip_serializing_if = "Option::is_none")]
20898 pub reason: Option<String>,
20899}
20900
20901#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
20903pub enum RunFeedbackListFeedbackReaction {
20904 #[default]
20905 #[serde(rename = "up")]
20906 Up,
20907 #[serde(rename = "down")]
20908 Down,
20909 #[serde(untagged)]
20911 Other(String),
20912}
20913
20914impl RunFeedbackListFeedbackReaction {
20915 pub fn as_str(&self) -> &str {
20917 match self {
20918 Self::Up => "up",
20919 Self::Down => "down",
20920 Self::Other(value) => value.as_str(),
20921 }
20922 }
20923}
20924
20925impl std::fmt::Display for RunFeedbackListFeedbackReaction {
20926 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20927 f.write_str(self.as_str())
20928 }
20929}
20930
20931impl From<&str> for RunFeedbackListFeedbackReaction {
20932 fn from(value: &str) -> Self {
20933 match value {
20934 "up" => Self::Up,
20935 "down" => Self::Down,
20936 other => Self::Other(other.to_string()),
20937 }
20938 }
20939}
20940
20941#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20943pub struct RunFeedbackOne {
20944 #[serde(default)]
20945 pub reaction: Option<String>,
20946 #[serde(default, skip_serializing_if = "Option::is_none")]
20948 pub reason: Option<String>,
20949}
20950
20951#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20954pub struct RunFeedbackSet {
20955 pub reaction: RunFeedbackListFeedbackReaction,
20956 pub message_id: String,
20957 #[serde(default, skip_serializing_if = "Option::is_none")]
20959 pub reason: Option<String>,
20960}
20961
20962#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20964pub struct RunMetrics {
20965 #[serde(default, skip_serializing_if = "Option::is_none")]
20967 pub pricing_confidence: Option<String>,
20968 #[serde(default, skip_serializing_if = "Option::is_none")]
20969 pub duration_ms: Option<f64>,
20970 #[serde(default, skip_serializing_if = "Option::is_none")]
20971 pub steps_count: Option<i64>,
20972 #[serde(default, skip_serializing_if = "Option::is_none")]
20973 pub input_tokens: Option<i64>,
20974 #[serde(default, skip_serializing_if = "Option::is_none")]
20975 pub output_tokens: Option<i64>,
20976 #[serde(default, skip_serializing_if = "Option::is_none")]
20977 pub thinking_tokens: Option<i64>,
20978 #[serde(default, skip_serializing_if = "Option::is_none")]
20979 pub tool_calls_count: Option<i64>,
20980 #[serde(default, skip_serializing_if = "Option::is_none")]
20981 pub llm_calls_count: Option<i64>,
20982 #[serde(default, skip_serializing_if = "Option::is_none")]
20983 pub guardrail_checks: Option<i64>,
20984 #[serde(default, skip_serializing_if = "Option::is_none")]
20985 pub guardrail_violations: Option<i64>,
20986 #[serde(default, skip_serializing_if = "Option::is_none")]
20987 pub memory_retrievals: Option<i64>,
20988 #[serde(default, skip_serializing_if = "Option::is_none")]
20989 pub memory_extractions: Option<i64>,
20990 #[serde(default, skip_serializing_if = "Option::is_none")]
20992 pub total_cost_usd: Option<f64>,
20993}
20994
20995#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
20997pub struct RunMissionResponse {
20998 pub accepted: bool,
20999 pub already_running: bool,
21000 pub mission: Mission,
21001}
21002
21003#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21011pub struct RunOutput {
21012 #[serde(default, skip_serializing_if = "Option::is_none")]
21014 pub response: Option<String>,
21015 #[serde(default, skip_serializing_if = "Option::is_none")]
21022 pub search_sources: Option<Vec<String>>,
21023 #[serde(default, skip_serializing_if = "Option::is_none")]
21028 pub output_truncated: Option<bool>,
21029 #[serde(default, skip_serializing_if = "Option::is_none")]
21031 pub truncated: Option<bool>,
21032 #[serde(default, skip_serializing_if = "Option::is_none")]
21035 pub continuation_token: Option<String>,
21036 #[serde(flatten)]
21038 pub extra: HashMap<String, serde_json::Value>,
21039}
21040
21041#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21043pub struct RunReconciliationResponse {
21044 pub reconciliation: CostReconciliationResult,
21045}
21046
21047#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21049pub struct RunResourceLimits {
21050 #[serde(default, skip_serializing_if = "Option::is_none")]
21051 pub max_duration_ms: Option<i64>,
21052 #[serde(default, skip_serializing_if = "Option::is_none")]
21053 pub max_steps: Option<i64>,
21054 #[serde(default, skip_serializing_if = "Option::is_none")]
21055 pub max_tool_calls: Option<i64>,
21056 #[serde(default, skip_serializing_if = "Option::is_none")]
21057 pub max_tokens_per_run: Option<i64>,
21058}
21059
21060#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21062pub enum RunStatus {
21063 #[default]
21064 #[serde(rename = "queued")]
21065 Queued,
21066 #[serde(rename = "running")]
21067 Running,
21068 #[serde(rename = "completed")]
21069 Completed,
21070 #[serde(rename = "failed")]
21071 Failed,
21072 #[serde(rename = "cancelled")]
21073 Cancelled,
21074 #[serde(rename = "timeout")]
21075 Timeout,
21076 #[serde(rename = "guardrail_blocked")]
21077 GuardrailBlocked,
21078 #[serde(rename = "paused")]
21079 Paused,
21080 #[serde(rename = "awaiting_approval")]
21081 AwaitingApproval,
21082 #[serde(rename = "awaiting_input")]
21083 AwaitingInput,
21084 #[serde(rename = "auth_required")]
21085 AuthRequired,
21086 #[serde(rename = "rejected")]
21087 Rejected,
21088 #[serde(untagged)]
21090 Other(String),
21091}
21092
21093impl RunStatus {
21094 pub fn as_str(&self) -> &str {
21096 match self {
21097 Self::Queued => "queued",
21098 Self::Running => "running",
21099 Self::Completed => "completed",
21100 Self::Failed => "failed",
21101 Self::Cancelled => "cancelled",
21102 Self::Timeout => "timeout",
21103 Self::GuardrailBlocked => "guardrail_blocked",
21104 Self::Paused => "paused",
21105 Self::AwaitingApproval => "awaiting_approval",
21106 Self::AwaitingInput => "awaiting_input",
21107 Self::AuthRequired => "auth_required",
21108 Self::Rejected => "rejected",
21109 Self::Other(value) => value.as_str(),
21110 }
21111 }
21112}
21113
21114impl std::fmt::Display for RunStatus {
21115 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21116 f.write_str(self.as_str())
21117 }
21118}
21119
21120impl From<&str> for RunStatus {
21121 fn from(value: &str) -> Self {
21122 match value {
21123 "queued" => Self::Queued,
21124 "running" => Self::Running,
21125 "completed" => Self::Completed,
21126 "failed" => Self::Failed,
21127 "cancelled" => Self::Cancelled,
21128 "timeout" => Self::Timeout,
21129 "guardrail_blocked" => Self::GuardrailBlocked,
21130 "paused" => Self::Paused,
21131 "awaiting_approval" => Self::AwaitingApproval,
21132 "awaiting_input" => Self::AwaitingInput,
21133 "auth_required" => Self::AuthRequired,
21134 "rejected" => Self::Rejected,
21135 other => Self::Other(other.to_string()),
21136 }
21137 }
21138}
21139
21140#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21142pub struct RunStep {
21143 #[serde(default, skip_serializing_if = "Option::is_none")]
21144 pub step_id: Option<String>,
21145 #[serde(default, skip_serializing_if = "Option::is_none")]
21146 pub run_id: Option<String>,
21147 #[serde(default, skip_serializing_if = "Option::is_none")]
21148 pub tenant_id: Option<String>,
21149 #[serde(default, skip_serializing_if = "Option::is_none")]
21150 pub step_index: Option<i64>,
21151 #[serde(default, skip_serializing_if = "Option::is_none")]
21152 pub status: Option<RunStepStatus>,
21153 #[serde(default, skip_serializing_if = "Option::is_none")]
21154 pub metrics: Option<RunStepMetrics>,
21155 #[serde(default, skip_serializing_if = "Option::is_none")]
21156 pub tool_calls: Option<Vec<String>>,
21157 #[serde(default, skip_serializing_if = "Option::is_none")]
21158 pub error: Option<String>,
21159 #[serde(default, skip_serializing_if = "Option::is_none")]
21160 pub started_at: Option<String>,
21161 #[serde(default, skip_serializing_if = "Option::is_none")]
21162 pub completed_at: Option<String>,
21163}
21164
21165#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21167pub struct RunStepMetrics {
21168 #[serde(default, skip_serializing_if = "Option::is_none")]
21169 pub duration_ms: Option<f64>,
21170 #[serde(default, skip_serializing_if = "Option::is_none")]
21171 pub input_tokens: Option<i64>,
21172 #[serde(default, skip_serializing_if = "Option::is_none")]
21173 pub output_tokens: Option<i64>,
21174 #[serde(default, skip_serializing_if = "Option::is_none")]
21175 pub thinking_tokens: Option<i64>,
21176 #[serde(default, skip_serializing_if = "Option::is_none")]
21177 pub llm_calls: Option<i64>,
21178 #[serde(default, skip_serializing_if = "Option::is_none")]
21179 pub tool_calls_count: Option<i64>,
21180 #[serde(default, skip_serializing_if = "Option::is_none")]
21181 pub cost_usd: Option<f64>,
21182}
21183
21184#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21186pub enum RunStepStatus {
21187 #[default]
21188 #[serde(rename = "running")]
21189 Running,
21190 #[serde(rename = "completed")]
21191 Completed,
21192 #[serde(rename = "failed")]
21193 Failed,
21194 #[serde(untagged)]
21196 Other(String),
21197}
21198
21199impl RunStepStatus {
21200 pub fn as_str(&self) -> &str {
21202 match self {
21203 Self::Running => "running",
21204 Self::Completed => "completed",
21205 Self::Failed => "failed",
21206 Self::Other(value) => value.as_str(),
21207 }
21208 }
21209}
21210
21211impl std::fmt::Display for RunStepStatus {
21212 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21213 f.write_str(self.as_str())
21214 }
21215}
21216
21217impl From<&str> for RunStepStatus {
21218 fn from(value: &str) -> Self {
21219 match value {
21220 "running" => Self::Running,
21221 "completed" => Self::Completed,
21222 "failed" => Self::Failed,
21223 other => Self::Other(other.to_string()),
21224 }
21225 }
21226}
21227
21228#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21230pub struct RunWorkspaceCommandRequest {
21231 pub command: String,
21232 #[serde(default, skip_serializing_if = "Option::is_none")]
21233 pub workdir: Option<String>,
21234 #[serde(default, skip_serializing_if = "Option::is_none")]
21235 pub timeout_sec: Option<i64>,
21236}
21237
21238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21240pub struct RunWorkspaceCommandResponse {
21241 #[serde(default, skip_serializing_if = "Option::is_none")]
21242 pub output: Option<String>,
21243}
21244
21245#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21249pub struct Schedule {
21250 pub agent_id: String,
21251 pub cron: String,
21252 pub enabled: bool,
21253 pub timezone: String,
21254 pub input: serde_json::Map<String, serde_json::Value>,
21255 pub max_concurrent_scheduled: i64,
21256 pub on_failure: AgentScheduleConfigOnFailure,
21257 #[serde(default, skip_serializing_if = "Option::is_none")]
21258 pub autonomous_mode: Option<bool>,
21259 #[serde(default, skip_serializing_if = "Option::is_none")]
21260 pub reflection_prompt: Option<String>,
21261 pub status: ScheduleEntryStatus,
21265 #[serde(default, skip_serializing_if = "Option::is_none")]
21268 pub next_fire_at: Option<String>,
21269 #[serde(default, skip_serializing_if = "Option::is_none")]
21270 pub last_fired_at: Option<String>,
21271 pub consecutive_failures: i64,
21272}
21273
21274#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21276pub struct ScheduleCanvasWorkflowRequest {
21277 pub trigger_id: String,
21279 pub cron: String,
21280 pub steps: Vec<CanvasWorkflowStep>,
21285 #[serde(default, skip_serializing_if = "Option::is_none")]
21287 pub goal: Option<String>,
21288 #[serde(default, skip_serializing_if = "Option::is_none")]
21291 pub budget_usd_per_step: Option<f64>,
21292 #[serde(default, skip_serializing_if = "Option::is_none")]
21293 pub time_minutes: Option<f64>,
21294}
21295
21296#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21298pub struct ScheduleCanvasWorkflowResponse {
21299 pub trigger_id: String,
21300 pub cron: String,
21301 pub next_fire_at: String,
21302 pub status: ScheduleCanvasWorkflowResponseStatus,
21303}
21304
21305#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21307pub enum ScheduleCanvasWorkflowResponseStatus {
21308 #[default]
21309 #[serde(rename = "active")]
21310 Active,
21311 #[serde(untagged)]
21313 Other(String),
21314}
21315
21316impl ScheduleCanvasWorkflowResponseStatus {
21317 pub fn as_str(&self) -> &str {
21319 match self {
21320 Self::Active => "active",
21321 Self::Other(value) => value.as_str(),
21322 }
21323 }
21324}
21325
21326impl std::fmt::Display for ScheduleCanvasWorkflowResponseStatus {
21327 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21328 f.write_str(self.as_str())
21329 }
21330}
21331
21332impl From<&str> for ScheduleCanvasWorkflowResponseStatus {
21333 fn from(value: &str) -> Self {
21334 match value {
21335 "active" => Self::Active,
21336 other => Self::Other(other.to_string()),
21337 }
21338 }
21339}
21340
21341#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21344pub struct ScheduleEntry {
21345 pub tenant_id: String,
21346 pub agent_id: String,
21347 pub config: AgentScheduleConfig,
21348 #[serde(default, skip_serializing_if = "Option::is_none")]
21349 pub last_fired_at: Option<String>,
21350 #[serde(default, skip_serializing_if = "Option::is_none")]
21353 pub next_fire_at: Option<String>,
21354 pub consecutive_failures: i64,
21355 pub status: ScheduleEntryStatus,
21359}
21360
21361#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21365pub enum ScheduleEntryStatus {
21366 #[default]
21367 #[serde(rename = "active")]
21368 Active,
21369 #[serde(rename = "paused")]
21370 Paused,
21371 #[serde(rename = "error")]
21372 Error,
21373 #[serde(untagged)]
21375 Other(String),
21376}
21377
21378impl ScheduleEntryStatus {
21379 pub fn as_str(&self) -> &str {
21381 match self {
21382 Self::Active => "active",
21383 Self::Paused => "paused",
21384 Self::Error => "error",
21385 Self::Other(value) => value.as_str(),
21386 }
21387 }
21388}
21389
21390impl std::fmt::Display for ScheduleEntryStatus {
21391 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21392 f.write_str(self.as_str())
21393 }
21394}
21395
21396impl From<&str> for ScheduleEntryStatus {
21397 fn from(value: &str) -> Self {
21398 match value {
21399 "active" => Self::Active,
21400 "paused" => Self::Paused,
21401 "error" => Self::Error,
21402 other => Self::Other(other.to_string()),
21403 }
21404 }
21405}
21406
21407#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21409pub struct ScheduleSummary {
21410 pub agent_id: String,
21411 #[serde(default, skip_serializing_if = "Option::is_none")]
21413 pub agent_name: Option<String>,
21414 pub cron: String,
21415 pub enabled: bool,
21416 pub status: String,
21418 #[serde(default, skip_serializing_if = "Option::is_none")]
21419 pub next_fire_at: Option<String>,
21420}
21421
21422#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21424pub struct SearchKnowledgeBaseRequest {
21425 pub query: String,
21426 #[serde(default, skip_serializing_if = "Option::is_none")]
21428 pub limit: Option<i64>,
21429}
21430
21431#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21433pub struct SearchMarketplaceResponse {
21434 pub items: Vec<MarketplaceListing>,
21435 #[serde(default, skip_serializing_if = "Option::is_none")]
21437 pub listings: Option<Vec<MarketplaceListing>>,
21438 #[serde(default, skip_serializing_if = "Option::is_none")]
21439 pub total: Option<i64>,
21440}
21441
21442#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21444pub enum SearchMarketplaceSort {
21445 #[default]
21446 #[serde(rename = "rating")]
21447 Rating,
21448 #[serde(rename = "popularity")]
21449 Popularity,
21450 #[serde(rename = "recency")]
21451 Recency,
21452 #[serde(untagged)]
21454 Other(String),
21455}
21456
21457impl SearchMarketplaceSort {
21458 pub fn as_str(&self) -> &str {
21460 match self {
21461 Self::Rating => "rating",
21462 Self::Popularity => "popularity",
21463 Self::Recency => "recency",
21464 Self::Other(value) => value.as_str(),
21465 }
21466 }
21467}
21468
21469impl std::fmt::Display for SearchMarketplaceSort {
21470 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21471 f.write_str(self.as_str())
21472 }
21473}
21474
21475impl From<&str> for SearchMarketplaceSort {
21476 fn from(value: &str) -> Self {
21477 match value {
21478 "rating" => Self::Rating,
21479 "popularity" => Self::Popularity,
21480 "recency" => Self::Recency,
21481 other => Self::Other(other.to_string()),
21482 }
21483 }
21484}
21485
21486#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21488pub struct SearchMemoryResponse {
21489 pub memories: Vec<MemoryEntry>,
21490 pub total: i64,
21491}
21492
21493#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21495pub struct SearchResponse {
21496 pub results: Vec<SearchResult>,
21497}
21498
21499#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21501pub struct SearchResult {
21502 pub r#type: SearchResultType,
21503 pub id: String,
21504 pub title: String,
21505 #[serde(default, skip_serializing_if = "Option::is_none")]
21506 pub subtitle: Option<String>,
21507 pub href: String,
21508 pub icon: String,
21509}
21510
21511#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21513pub enum SearchResultType {
21514 #[default]
21515 #[serde(rename = "agent")]
21516 Agent,
21517 #[serde(rename = "run")]
21518 Run,
21519 #[serde(rename = "session")]
21520 Session,
21521 #[serde(rename = "file")]
21522 File,
21523 #[serde(rename = "image")]
21524 Image,
21525 #[serde(rename = "project")]
21526 Project,
21527 #[serde(rename = "memory")]
21528 Memory,
21529 #[serde(untagged)]
21531 Other(String),
21532}
21533
21534impl SearchResultType {
21535 pub fn as_str(&self) -> &str {
21537 match self {
21538 Self::Agent => "agent",
21539 Self::Run => "run",
21540 Self::Session => "session",
21541 Self::File => "file",
21542 Self::Image => "image",
21543 Self::Project => "project",
21544 Self::Memory => "memory",
21545 Self::Other(value) => value.as_str(),
21546 }
21547 }
21548}
21549
21550impl std::fmt::Display for SearchResultType {
21551 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21552 f.write_str(self.as_str())
21553 }
21554}
21555
21556impl From<&str> for SearchResultType {
21557 fn from(value: &str) -> Self {
21558 match value {
21559 "agent" => Self::Agent,
21560 "run" => Self::Run,
21561 "session" => Self::Session,
21562 "file" => Self::File,
21563 "image" => Self::Image,
21564 "project" => Self::Project,
21565 "memory" => Self::Memory,
21566 other => Self::Other(other.to_string()),
21567 }
21568 }
21569}
21570
21571#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21573pub enum SearchType {
21574 #[default]
21575 #[serde(rename = "agent")]
21576 Agent,
21577 #[serde(rename = "session")]
21578 Session,
21579 #[serde(rename = "run")]
21580 Run,
21581 #[serde(untagged)]
21583 Other(String),
21584}
21585
21586impl SearchType {
21587 pub fn as_str(&self) -> &str {
21589 match self {
21590 Self::Agent => "agent",
21591 Self::Session => "session",
21592 Self::Run => "run",
21593 Self::Other(value) => value.as_str(),
21594 }
21595 }
21596}
21597
21598impl std::fmt::Display for SearchType {
21599 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21600 f.write_str(self.as_str())
21601 }
21602}
21603
21604impl From<&str> for SearchType {
21605 fn from(value: &str) -> Self {
21606 match value {
21607 "agent" => Self::Agent,
21608 "session" => Self::Session,
21609 "run" => Self::Run,
21610 other => Self::Other(other.to_string()),
21611 }
21612 }
21613}
21614
21615#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21617pub enum SearchWorkspaceFilesRegex {
21618 #[default]
21619 #[serde(rename = "true")]
21620 True,
21621 #[serde(rename = "1")]
21622 V1,
21623 #[serde(untagged)]
21625 Other(String),
21626}
21627
21628impl SearchWorkspaceFilesRegex {
21629 pub fn as_str(&self) -> &str {
21631 match self {
21632 Self::True => "true",
21633 Self::V1 => "1",
21634 Self::Other(value) => value.as_str(),
21635 }
21636 }
21637}
21638
21639impl std::fmt::Display for SearchWorkspaceFilesRegex {
21640 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21641 f.write_str(self.as_str())
21642 }
21643}
21644
21645impl From<&str> for SearchWorkspaceFilesRegex {
21646 fn from(value: &str) -> Self {
21647 match value {
21648 "true" => Self::True,
21649 "1" => Self::V1,
21650 other => Self::Other(other.to_string()),
21651 }
21652 }
21653}
21654
21655#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21657pub struct SearchWorkspaceFilesResponse {
21658 #[serde(default, skip_serializing_if = "Option::is_none")]
21659 pub results: Option<Vec<SearchWorkspaceFilesResponseResult>>,
21660 #[serde(default, skip_serializing_if = "Option::is_none")]
21661 pub total: Option<i64>,
21662}
21663
21664#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21666pub struct SearchWorkspaceFilesResponseResult {
21667 #[serde(default, skip_serializing_if = "Option::is_none")]
21668 pub path: Option<String>,
21669 #[serde(rename = "lineNumber", default, skip_serializing_if = "Option::is_none")]
21673 pub line_number: Option<i64>,
21674 #[serde(default, skip_serializing_if = "Option::is_none")]
21675 pub line: Option<String>,
21676 #[serde(default, skip_serializing_if = "Option::is_none")]
21677 pub r#match: Option<String>,
21678 #[serde(rename = "line_number", default, skip_serializing_if = "Option::is_none")]
21679 pub line_number_: Option<i64>,
21680}
21681
21682#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21684pub struct SeedStarterSpecsResponse {
21685 pub added: i64,
21687 pub skipped: i64,
21689 pub total_starter: i64,
21692 #[serde(default, skip_serializing_if = "Option::is_none")]
21694 pub errors: Option<Vec<SeedStarterSpecsResponseError>>,
21695}
21696
21697#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21699pub struct SeedStarterSpecsResponseError {
21700 pub name: String,
21701 pub error: String,
21702}
21703
21704#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21706pub struct SendPublicMessageRequest {
21707 pub content: String,
21708}
21709
21710#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21712pub struct SendPublicMessageResponse {
21713 #[serde(default, skip_serializing_if = "Option::is_none")]
21714 pub run_id: Option<String>,
21715 #[serde(default, skip_serializing_if = "Option::is_none")]
21716 pub messages_remaining: Option<i64>,
21717}
21718
21719#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21722pub struct SendSessionMessageRequest {
21723 pub content: String,
21726 #[serde(default, skip_serializing_if = "Option::is_none")]
21728 pub command: Option<String>,
21729 #[serde(default, skip_serializing_if = "Option::is_none")]
21731 pub file_ids: Option<Vec<String>>,
21732 #[serde(default, skip_serializing_if = "Option::is_none")]
21734 pub workspace_id: Option<String>,
21735}
21736
21737#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21739pub struct SendSessionMessageResponse {
21740 pub run_id: String,
21741}
21742
21743#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21745pub struct SensorWebhookResponse {
21746 #[serde(default, skip_serializing_if = "Option::is_none")]
21747 pub accepted: Option<bool>,
21748}
21749
21750#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21752pub struct Session {
21753 #[serde(default, skip_serializing_if = "Option::is_none")]
21754 pub created_by: Option<String>,
21755 pub session_id: String,
21756 pub tenant_id: String,
21757 pub agent_id: String,
21758 pub status: PublicSessionViewStatus,
21759 #[serde(default, skip_serializing_if = "Option::is_none")]
21760 pub conversation_history: Option<Vec<ConversationEntry>>,
21761 #[serde(default, skip_serializing_if = "Option::is_none")]
21762 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
21763 #[serde(default, skip_serializing_if = "Option::is_none")]
21764 pub runs: Option<Vec<String>>,
21765 #[serde(default, skip_serializing_if = "Option::is_none")]
21766 pub created_at: Option<String>,
21767 #[serde(default, skip_serializing_if = "Option::is_none")]
21768 pub updated_at: Option<String>,
21769 #[serde(default, skip_serializing_if = "Option::is_none")]
21770 pub expires_at: Option<String>,
21771 #[serde(default, skip_serializing_if = "Option::is_none")]
21773 pub team_id: Option<String>,
21774 #[serde(default, skip_serializing_if = "Option::is_none")]
21776 pub branches: Option<Vec<SessionBranch>>,
21777 #[serde(default, skip_serializing_if = "Option::is_none")]
21779 pub active_branch: Option<String>,
21780 #[serde(default, skip_serializing_if = "Option::is_none")]
21782 pub queue_mode: Option<SessionQueueMode>,
21783 #[serde(default, skip_serializing_if = "Option::is_none")]
21786 pub model_override: Option<SessionModelOverride>,
21787}
21788
21789#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21792pub struct SessionAnnotation {
21793 pub id: String,
21794 pub message_id: String,
21795 pub content: String,
21796 pub author: String,
21797 pub created_at: String,
21798 pub resolved: bool,
21799}
21800
21801#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21803pub struct SessionBranch {
21804 pub branch_id: String,
21805 #[serde(default, skip_serializing_if = "Option::is_none")]
21807 pub parent_branch_id: Option<String>,
21808 pub name: String,
21809 pub fork_point_run_id: String,
21811 pub fork_point_step_seq: i64,
21812 pub runs: Vec<String>,
21813 pub status: SessionBranchStatus,
21814 pub created_at: String,
21815}
21816
21817#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21819pub enum SessionBranchStatus {
21820 #[default]
21821 #[serde(rename = "active")]
21822 Active,
21823 #[serde(rename = "abandoned")]
21824 Abandoned,
21825 #[serde(rename = "merged")]
21826 Merged,
21827 #[serde(untagged)]
21829 Other(String),
21830}
21831
21832impl SessionBranchStatus {
21833 pub fn as_str(&self) -> &str {
21835 match self {
21836 Self::Active => "active",
21837 Self::Abandoned => "abandoned",
21838 Self::Merged => "merged",
21839 Self::Other(value) => value.as_str(),
21840 }
21841 }
21842}
21843
21844impl std::fmt::Display for SessionBranchStatus {
21845 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21846 f.write_str(self.as_str())
21847 }
21848}
21849
21850impl From<&str> for SessionBranchStatus {
21851 fn from(value: &str) -> Self {
21852 match value {
21853 "active" => Self::Active,
21854 "abandoned" => Self::Abandoned,
21855 "merged" => Self::Merged,
21856 other => Self::Other(other.to_string()),
21857 }
21858 }
21859}
21860
21861#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21863pub struct SessionExport {
21864 pub exported_at: String,
21865 pub format: String,
21867 pub session_id: String,
21868 pub agent_id: String,
21869 #[serde(default, skip_serializing_if = "Option::is_none")]
21870 pub agent_name: Option<String>,
21871 pub title: String,
21872 #[serde(default, skip_serializing_if = "Option::is_none")]
21873 pub created_at: Option<String>,
21874 #[serde(default, skip_serializing_if = "Option::is_none")]
21875 pub updated_at: Option<String>,
21876 pub messages: Vec<SessionExportMessage>,
21877}
21878
21879#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21881pub struct SessionExportMessage {
21882 pub role: String,
21883 pub content: String,
21884 #[serde(default, skip_serializing_if = "Option::is_none")]
21885 pub timestamp: Option<String>,
21886 #[serde(default, skip_serializing_if = "Option::is_none")]
21887 pub run_id: Option<String>,
21888 #[serde(default, skip_serializing_if = "Option::is_none")]
21889 pub tool_calls: Option<Vec<SessionExportMessageToolCall>>,
21890}
21891
21892#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21894pub struct SessionExportMessageToolCall {
21895 #[serde(default, skip_serializing_if = "Option::is_none")]
21896 pub name: Option<String>,
21897 #[serde(default, skip_serializing_if = "Option::is_none")]
21898 pub status: Option<String>,
21899 #[serde(default, skip_serializing_if = "Option::is_none")]
21900 pub input: Option<serde_json::Map<String, serde_json::Value>>,
21901}
21902
21903#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21906pub struct SessionModelOverride {
21907 pub provider: String,
21908 pub model_ref: String,
21909 #[serde(default, skip_serializing_if = "Option::is_none")]
21910 pub endpoint_url: Option<String>,
21911 #[serde(default, skip_serializing_if = "Option::is_none")]
21912 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
21913}
21914
21915#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
21917pub enum SessionQueueMode {
21918 #[default]
21919 #[serde(rename = "allow")]
21920 Allow,
21921 #[serde(rename = "reject")]
21922 Reject,
21923 #[serde(untagged)]
21925 Other(String),
21926}
21927
21928impl SessionQueueMode {
21929 pub fn as_str(&self) -> &str {
21931 match self {
21932 Self::Allow => "allow",
21933 Self::Reject => "reject",
21934 Self::Other(value) => value.as_str(),
21935 }
21936 }
21937}
21938
21939impl std::fmt::Display for SessionQueueMode {
21940 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21941 f.write_str(self.as_str())
21942 }
21943}
21944
21945impl From<&str> for SessionQueueMode {
21946 fn from(value: &str) -> Self {
21947 match value {
21948 "allow" => Self::Allow,
21949 "reject" => Self::Reject,
21950 other => Self::Other(other.to_string()),
21951 }
21952 }
21953}
21954
21955#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21957pub struct SetAdminIntegrationOAuthProviderRequest {
21958 #[serde(default, skip_serializing_if = "Option::is_none")]
21959 pub enabled: Option<bool>,
21960 #[serde(default, skip_serializing_if = "Option::is_none")]
21961 pub client_id: Option<String>,
21962 #[serde(default, skip_serializing_if = "Option::is_none")]
21964 pub client_secret: Option<String>,
21965 #[serde(default, skip_serializing_if = "Option::is_none")]
21966 pub scopes: Option<Vec<String>>,
21967}
21968
21969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21971pub struct SetAdminIntegrationOAuthProviderResponse {
21972 pub provider: String,
21973 pub enabled: bool,
21974 pub configured: bool,
21975}
21976
21977#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21979pub struct SetAdminLLMDefaultRequest {
21980 pub api_key: String,
21981}
21982
21983#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21985pub struct SetAdminLLMDefaultResponse {
21986 #[serde(default, skip_serializing_if = "Option::is_none")]
21987 pub updated: Option<bool>,
21988}
21989
21990#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21992pub struct SetAdminModelConfigResponse {
21993 #[serde(default)]
21994 pub default_provider: Option<String>,
21995 #[serde(default)]
21996 pub default_model: Option<String>,
21997 #[serde(default)]
21998 pub default_endpoint: Option<String>,
21999 #[serde(default)]
22000 pub fallback_provider: Option<String>,
22001 #[serde(default)]
22002 pub fallback_model: Option<String>,
22003 #[serde(default)]
22004 pub fallback_endpoint: Option<String>,
22005}
22006
22007#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22009pub struct SetAgentCapabilitiesResponse {
22010 #[serde(default, skip_serializing_if = "Option::is_none")]
22011 pub status: Option<String>,
22012 #[serde(default, skip_serializing_if = "Option::is_none")]
22013 pub agent_id: Option<String>,
22014}
22015
22016#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22018pub struct SetAgentIntegrationsRequest {
22019 pub integration_ids: Vec<String>,
22022}
22023
22024#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22026pub struct SetAgentIntegrationsResponse {
22027 pub integrations: Vec<AgentIntegration>,
22028 pub total: i64,
22029 pub diff: SetAgentIntegrationsResponseDiff,
22030}
22031
22032#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22034pub struct SetAgentIntegrationsResponseDiff {
22035 pub assigned: Vec<String>,
22036 pub unassigned: Vec<String>,
22037 pub unknown: Vec<String>,
22038}
22039
22040#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22042pub struct SetAgentMCPServersRequest {
22043 pub server_ids: Vec<String>,
22045}
22046
22047#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22049pub struct SetAgentMCPServersResponse {
22050 #[serde(default, skip_serializing_if = "Option::is_none")]
22051 pub agent_id: Option<String>,
22052 #[serde(default, skip_serializing_if = "Option::is_none")]
22054 pub connected: Option<Vec<String>>,
22055 #[serde(default, skip_serializing_if = "Option::is_none")]
22057 pub disconnected: Option<Vec<String>>,
22058}
22059
22060#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22062pub struct SetAgentPermissionsResponse {
22063 #[serde(default, skip_serializing_if = "Option::is_none")]
22064 pub ok: Option<bool>,
22065}
22066
22067#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22069pub struct SetAgentTrafficRequest {
22070 pub entries: Vec<SetAgentTrafficRequestEntry>,
22071}
22072
22073#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22075pub struct SetAgentTrafficRequestEntry {
22076 pub version: i64,
22077 pub weight: f64,
22078}
22079
22080#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22082pub struct SetAgentTrafficResponse {
22083 pub agent_id: String,
22084 pub entries: Vec<TrafficSplitEntry>,
22085 #[serde(default)]
22086 pub updated_at: Option<String>,
22087}
22088
22089#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22091pub struct SetArbiterRegistryResponse {
22092 #[serde(default, skip_serializing_if = "Option::is_none")]
22093 pub ok: Option<bool>,
22094}
22095
22096#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22098pub struct SetBillingBudgetRequest {
22099 pub limit_usd: f64,
22100 #[serde(default, skip_serializing_if = "Option::is_none")]
22102 pub soft_threshold: Option<f64>,
22103 #[serde(default, skip_serializing_if = "Option::is_none")]
22105 pub hard_threshold: Option<f64>,
22106 #[serde(default, skip_serializing_if = "Option::is_none")]
22108 pub period: Option<GetBillingBudgetResponseBudgetPeriod>,
22109}
22110
22111#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22113pub struct SetBillingBudgetResponse {
22114 #[serde(default, skip_serializing_if = "Option::is_none")]
22115 pub configured: Option<bool>,
22116 #[serde(default, skip_serializing_if = "Option::is_none")]
22117 pub budget: Option<serde_json::Map<String, serde_json::Value>>,
22118}
22119
22120#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22122pub struct SetBillingOverageRequest {
22123 pub enabled: bool,
22124}
22125
22126#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22128pub struct SetBillingOverageResponse {
22129 #[serde(default, skip_serializing_if = "Option::is_none")]
22130 pub enabled: Option<bool>,
22131 #[serde(default, skip_serializing_if = "Option::is_none")]
22132 pub requires_cap: Option<bool>,
22133}
22134
22135#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22137pub struct SetDataExplorerValueRequest {
22138 pub namespace: String,
22139 pub key: Vec<serde_json::Value>,
22140 pub value: serde_json::Value,
22141}
22142
22143#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22145pub struct SetDataExplorerValueResponse {
22146 pub success: bool,
22147 pub size_bytes: i64,
22148}
22149
22150#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22152pub struct SetFeatureFlagsResponse {
22153 #[serde(default, skip_serializing_if = "Option::is_none")]
22154 pub flags: Option<Vec<FeatureFlag>>,
22155 pub updated: bool,
22156}
22157
22158#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22160pub enum SetLLMProviderKeyProvider {
22161 #[default]
22162 #[serde(rename = "openai_compat")]
22163 OpenaiCompat,
22164 #[serde(rename = "custom")]
22165 Custom,
22166 #[serde(untagged)]
22168 Other(String),
22169}
22170
22171impl SetLLMProviderKeyProvider {
22172 pub fn as_str(&self) -> &str {
22174 match self {
22175 Self::OpenaiCompat => "openai_compat",
22176 Self::Custom => "custom",
22177 Self::Other(value) => value.as_str(),
22178 }
22179 }
22180}
22181
22182impl std::fmt::Display for SetLLMProviderKeyProvider {
22183 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22184 f.write_str(self.as_str())
22185 }
22186}
22187
22188impl From<&str> for SetLLMProviderKeyProvider {
22189 fn from(value: &str) -> Self {
22190 match value {
22191 "openai_compat" => Self::OpenaiCompat,
22192 "custom" => Self::Custom,
22193 other => Self::Other(other.to_string()),
22194 }
22195 }
22196}
22197
22198#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22204pub struct SetLLMProviderKeyRequest {
22205 pub api_key: String,
22207 #[serde(default, skip_serializing_if = "Option::is_none")]
22211 pub shared: Option<bool>,
22212}
22213
22214#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22216pub struct SetLLMProviderKeyResponse {
22217 #[serde(default, skip_serializing_if = "Option::is_none")]
22218 pub provider_id: Option<String>,
22219 #[serde(default, skip_serializing_if = "Option::is_none")]
22220 pub configured: Option<bool>,
22221 #[serde(default, skip_serializing_if = "Option::is_none")]
22225 pub shared: Option<bool>,
22226 #[serde(default, skip_serializing_if = "Option::is_none")]
22227 pub updated_at: Option<String>,
22228}
22229
22230#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22232pub struct SetMaintenanceStateRequest {
22233 pub enabled: bool,
22235 #[serde(default, skip_serializing_if = "Option::is_none")]
22239 pub message: Option<String>,
22240}
22241
22242#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22244pub struct SetModelPricingOverrideRequest {
22245 pub input_per_million: f64,
22246 pub output_per_million: f64,
22247 #[serde(default, skip_serializing_if = "Option::is_none")]
22250 pub cached_input_per_million: Option<f64>,
22251}
22252
22253#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22255pub struct SetModelPricingOverrideResponse {
22256 #[serde(rename = "modelRef")]
22259 pub model_ref: String,
22260 pub input_per_million: f64,
22261 pub output_per_million: f64,
22262 #[serde(default, skip_serializing_if = "Option::is_none")]
22264 pub cached_input_per_million: Option<f64>,
22265 #[serde(rename = "model_ref")]
22266 pub model_ref_: String,
22267}
22268
22269#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22271pub struct SetRateLimitsResponse {
22272 #[serde(default, skip_serializing_if = "Option::is_none")]
22273 pub endpoints: Option<Vec<EndpointRateLimit>>,
22274 pub updated: bool,
22275}
22276
22277#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22279pub struct SetRegistrySpecVisibilityRequest {
22280 pub visibility: SetRegistrySpecVisibilityRequestVisibility,
22281}
22282
22283#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22285pub enum SetRegistrySpecVisibilityRequestVisibility {
22286 #[default]
22287 #[serde(rename = "public")]
22288 Public,
22289 #[serde(rename = "private")]
22290 Private,
22291 #[serde(untagged)]
22293 Other(String),
22294}
22295
22296impl SetRegistrySpecVisibilityRequestVisibility {
22297 pub fn as_str(&self) -> &str {
22299 match self {
22300 Self::Public => "public",
22301 Self::Private => "private",
22302 Self::Other(value) => value.as_str(),
22303 }
22304 }
22305}
22306
22307impl std::fmt::Display for SetRegistrySpecVisibilityRequestVisibility {
22308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22309 f.write_str(self.as_str())
22310 }
22311}
22312
22313impl From<&str> for SetRegistrySpecVisibilityRequestVisibility {
22314 fn from(value: &str) -> Self {
22315 match value {
22316 "public" => Self::Public,
22317 "private" => Self::Private,
22318 other => Self::Other(other.to_string()),
22319 }
22320 }
22321}
22322
22323#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22325pub struct SetRegistrySpecVisibilityResponse {
22326 pub scope: String,
22327 pub name: String,
22328 pub visibility: SetRegistrySpecVisibilityRequestVisibility,
22329}
22330
22331#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22333pub struct SetRootAgentRequest {
22334 pub agent_id: String,
22335}
22336
22337#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22339pub struct SetRootAgentResponse {
22340 #[serde(default, skip_serializing_if = "Option::is_none")]
22341 pub ok: Option<bool>,
22342 #[serde(default, skip_serializing_if = "Option::is_none")]
22343 pub root_agent_id: Option<String>,
22344}
22345
22346#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22348pub struct SetRootAttestationResponse {
22349 #[serde(default, skip_serializing_if = "Option::is_none")]
22350 pub ok: Option<bool>,
22351}
22352
22353#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22355pub struct SetRunFeedbackRequest {
22356 pub message_id: String,
22357 pub reaction: RunFeedbackListFeedbackReaction,
22358 #[serde(default, skip_serializing_if = "Option::is_none")]
22362 pub reason: Option<String>,
22363}
22364
22365#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22367pub struct SetScheduleRequest {
22368 pub cron: String,
22369 #[serde(default, skip_serializing_if = "Option::is_none")]
22371 pub enabled: Option<bool>,
22372 #[serde(default, skip_serializing_if = "Option::is_none")]
22374 pub input: Option<serde_json::Map<String, serde_json::Value>>,
22375 #[serde(default, skip_serializing_if = "Option::is_none")]
22377 pub timezone: Option<String>,
22378 #[serde(default, skip_serializing_if = "Option::is_none")]
22380 pub on_failure: Option<AgentScheduleConfigOnFailure>,
22381 #[serde(default, skip_serializing_if = "Option::is_none")]
22383 pub max_concurrent_scheduled: Option<f64>,
22384 #[serde(default, skip_serializing_if = "Option::is_none")]
22387 pub autonomous_mode: Option<bool>,
22388 #[serde(default, skip_serializing_if = "Option::is_none")]
22391 pub reflection_prompt: Option<String>,
22392}
22393
22394#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22396pub struct SetSessionRunFeedbackRequest {
22397 pub message_id: String,
22398 pub reaction: RunFeedbackListFeedbackReaction,
22399 #[serde(default, skip_serializing_if = "Option::is_none")]
22403 pub reason: Option<String>,
22404}
22405
22406#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22408pub struct SetSpawnPolicyResponse {
22409 #[serde(default, skip_serializing_if = "Option::is_none")]
22410 pub ok: Option<bool>,
22411}
22412
22413#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22415pub struct SetupStateResponse {
22416 pub state: SetupStateResponseState,
22417 pub required_steps: Vec<String>,
22419 pub all_steps: Vec<String>,
22421 pub missing_required: Vec<String>,
22424}
22425
22426#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22428pub struct SetupStateResponseState {
22429 pub status: AdminRegistrationConfigSetupStatus,
22431 pub completed_steps: Vec<String>,
22432 pub registration_open: bool,
22433 pub started_at: String,
22434 #[serde(default, skip_serializing_if = "Option::is_none")]
22436 pub completed_at: Option<String>,
22437 pub version: i64,
22438}
22439
22440#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22442pub struct SetUserRoleRequest {
22443 pub role: String,
22444}
22445
22446#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22448pub struct SetUserRoleResponse {
22449 pub updated: bool,
22450 pub user_id: String,
22451 pub role: String,
22452}
22453
22454#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22456pub struct SharePublicSessionResponse {
22457 pub token: String,
22458}
22459
22460#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22462pub struct ShareWorkspaceRequest {
22463 pub agent_id: String,
22464}
22465
22466#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22468pub struct SignUpForAndroidTestingRequest {
22469 pub email: String,
22470 #[serde(default, skip_serializing_if = "Option::is_none")]
22472 pub source: Option<String>,
22473}
22474
22475#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22477pub struct SpawnPolicy {
22478 pub tenant_id: String,
22479 pub child_budget_ratio: f64,
22481 pub max_depth: i64,
22482 pub allowed_roles: Vec<String>,
22483 pub require_approval_above_depth: i64,
22484 pub max_children_per_agent: i64,
22485}
22486
22487#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22491pub struct SpawnPolicyUpdate {
22492 pub child_budget_ratio: f64,
22494 pub max_depth: i64,
22495 pub allowed_roles: Vec<String>,
22497 pub require_approval_above_depth: i64,
22498 pub max_children_per_agent: i64,
22499}
22500
22501#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22505pub struct SpecToolCatalog {
22506 pub agent_id: String,
22507 #[serde(default, skip_serializing_if = "Option::is_none")]
22520 pub specs: Option<Vec<SpecToolCatalogSpec>>,
22521 pub drawings: Vec<SpecToolCatalogDrawing>,
22525 pub tools: HashMap<String, Value2>,
22528}
22529
22530#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22532pub struct SpecToolCatalogDrawing {
22533 pub spec_id: String,
22534 pub canvas: SpecToolCatalogDrawingCanvas,
22535}
22536
22537#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22539pub enum SpecToolCatalogDrawingCanvas {
22540 #[default]
22541 #[serde(rename = "drawing")]
22542 Drawing,
22543 #[serde(untagged)]
22545 Other(String),
22546}
22547
22548impl SpecToolCatalogDrawingCanvas {
22549 pub fn as_str(&self) -> &str {
22551 match self {
22552 Self::Drawing => "drawing",
22553 Self::Other(value) => value.as_str(),
22554 }
22555 }
22556}
22557
22558impl std::fmt::Display for SpecToolCatalogDrawingCanvas {
22559 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22560 f.write_str(self.as_str())
22561 }
22562}
22563
22564impl From<&str> for SpecToolCatalogDrawingCanvas {
22565 fn from(value: &str) -> Self {
22566 match value {
22567 "drawing" => Self::Drawing,
22568 other => Self::Other(other.to_string()),
22569 }
22570 }
22571}
22572
22573#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22575pub struct SpecToolCatalogSpec {
22576 pub spec_id: String,
22577 pub status: SpecToolCatalogSpecStatus,
22578 #[serde(default, skip_serializing_if = "Option::is_none")]
22579 pub requires: Option<SpecToolCatalogSpecRequires>,
22580 #[serde(default, skip_serializing_if = "Option::is_none")]
22581 pub action: Option<String>,
22582 pub tools_total: f64,
22583 pub tools_waiting: f64,
22584}
22585
22586#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22588pub struct SpecToolCatalogSpecRequires {
22589 #[serde(default, skip_serializing_if = "Option::is_none")]
22590 pub mode: Option<SpecToolCatalogSpecRequiresMode>,
22591 #[serde(default, skip_serializing_if = "Option::is_none")]
22592 pub connector: Option<String>,
22593}
22594
22595#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22597pub enum SpecToolCatalogSpecRequiresMode {
22598 #[default]
22599 #[serde(rename = "integration")]
22600 Integration,
22601 #[serde(untagged)]
22603 Other(String),
22604}
22605
22606impl SpecToolCatalogSpecRequiresMode {
22607 pub fn as_str(&self) -> &str {
22609 match self {
22610 Self::Integration => "integration",
22611 Self::Other(value) => value.as_str(),
22612 }
22613 }
22614}
22615
22616impl std::fmt::Display for SpecToolCatalogSpecRequiresMode {
22617 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22618 f.write_str(self.as_str())
22619 }
22620}
22621
22622impl From<&str> for SpecToolCatalogSpecRequiresMode {
22623 fn from(value: &str) -> Self {
22624 match value {
22625 "integration" => Self::Integration,
22626 other => Self::Other(other.to_string()),
22627 }
22628 }
22629}
22630
22631#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22633pub enum SpecToolCatalogSpecStatus {
22634 #[default]
22635 #[serde(rename = "ready")]
22636 Ready,
22637 #[serde(rename = "needs_connection")]
22638 NeedsConnection,
22639 #[serde(untagged)]
22641 Other(String),
22642}
22643
22644impl SpecToolCatalogSpecStatus {
22645 pub fn as_str(&self) -> &str {
22647 match self {
22648 Self::Ready => "ready",
22649 Self::NeedsConnection => "needs_connection",
22650 Self::Other(value) => value.as_str(),
22651 }
22652 }
22653}
22654
22655impl std::fmt::Display for SpecToolCatalogSpecStatus {
22656 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22657 f.write_str(self.as_str())
22658 }
22659}
22660
22661impl From<&str> for SpecToolCatalogSpecStatus {
22662 fn from(value: &str) -> Self {
22663 match value {
22664 "ready" => Self::Ready,
22665 "needs_connection" => Self::NeedsConnection,
22666 other => Self::Other(other.to_string()),
22667 }
22668 }
22669}
22670
22671#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22673pub struct StartMissionRequest {
22674 pub session_id: String,
22676 pub goal: String,
22678 #[serde(default, skip_serializing_if = "Option::is_none")]
22679 pub plan: Option<PlannedMission>,
22680 #[serde(default, skip_serializing_if = "Option::is_none")]
22682 pub available_agents: Option<Vec<StartMissionRequestAvailableAgent>>,
22683 #[serde(default, skip_serializing_if = "Option::is_none")]
22685 pub skip_classification: Option<bool>,
22686 #[serde(default, skip_serializing_if = "Option::is_none")]
22688 pub deadline: Option<String>,
22689}
22690
22691#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22693pub struct StartMissionRequestAvailableAgent {
22694 pub agent_id: String,
22695 pub name: String,
22696 #[serde(default, skip_serializing_if = "Option::is_none")]
22697 pub description: Option<String>,
22698}
22699
22700#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22702pub enum StartOAuthProvider {
22703 #[default]
22704 #[serde(rename = "github")]
22705 Github,
22706 #[serde(rename = "stripe")]
22707 Stripe,
22708 #[serde(rename = "notion")]
22709 Notion,
22710 #[serde(rename = "slack")]
22711 Slack,
22712 #[serde(rename = "x_twitter")]
22713 XTwitter,
22714 #[serde(rename = "linkedin")]
22715 Linkedin,
22716 #[serde(rename = "youtube")]
22717 Youtube,
22718 #[serde(rename = "instagram")]
22719 Instagram,
22720 #[serde(untagged)]
22722 Other(String),
22723}
22724
22725impl StartOAuthProvider {
22726 pub fn as_str(&self) -> &str {
22728 match self {
22729 Self::Github => "github",
22730 Self::Stripe => "stripe",
22731 Self::Notion => "notion",
22732 Self::Slack => "slack",
22733 Self::XTwitter => "x_twitter",
22734 Self::Linkedin => "linkedin",
22735 Self::Youtube => "youtube",
22736 Self::Instagram => "instagram",
22737 Self::Other(value) => value.as_str(),
22738 }
22739 }
22740}
22741
22742impl std::fmt::Display for StartOAuthProvider {
22743 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22744 f.write_str(self.as_str())
22745 }
22746}
22747
22748impl From<&str> for StartOAuthProvider {
22749 fn from(value: &str) -> Self {
22750 match value {
22751 "github" => Self::Github,
22752 "stripe" => Self::Stripe,
22753 "notion" => Self::Notion,
22754 "slack" => Self::Slack,
22755 "x_twitter" => Self::XTwitter,
22756 "linkedin" => Self::Linkedin,
22757 "youtube" => Self::Youtube,
22758 "instagram" => Self::Instagram,
22759 other => Self::Other(other.to_string()),
22760 }
22761 }
22762}
22763
22764#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22766pub struct StartOAuthRequest {
22767 #[serde(default, skip_serializing_if = "Option::is_none")]
22771 pub agent_id: Option<String>,
22772 #[serde(default, skip_serializing_if = "Option::is_none")]
22773 pub name: Option<String>,
22774 #[serde(default, skip_serializing_if = "Option::is_none")]
22775 pub scopes: Option<Vec<String>>,
22776 #[serde(default, skip_serializing_if = "Option::is_none")]
22782 pub connector_id: Option<String>,
22783 #[serde(default, skip_serializing_if = "Option::is_none")]
22786 pub extra: Option<serde_json::Map<String, serde_json::Value>>,
22787}
22788
22789#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22791pub struct StartSquadRunRequest {
22792 #[serde(default, skip_serializing_if = "Option::is_none")]
22793 pub input: Option<serde_json::Map<String, serde_json::Value>>,
22794 #[serde(default, skip_serializing_if = "Option::is_none")]
22795 pub addressed_to: Option<Vec<String>>,
22796 #[serde(default, skip_serializing_if = "Option::is_none")]
22797 pub message: Option<String>,
22798 #[serde(default, skip_serializing_if = "Option::is_none")]
22799 pub chat_mode: Option<StartTeamRunRequestInputVariant2chatMode>,
22800}
22801
22802#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22804pub struct StartSquadRunResponse {
22805 pub team_run_id: String,
22806}
22807
22808#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22814pub struct StartTeamRunRequest {
22815 pub input: serde_json::Value,
22818 #[serde(default, skip_serializing_if = "Option::is_none")]
22820 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
22821}
22822
22823#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22825pub struct StartTeamRunRequestInputVariant2 {
22826 #[serde(default, skip_serializing_if = "Option::is_none")]
22827 pub message: Option<String>,
22828 #[serde(default, skip_serializing_if = "Option::is_none")]
22829 pub addressed_to: Option<Vec<String>>,
22830 #[serde(default, skip_serializing_if = "Option::is_none")]
22831 pub chat_mode: Option<StartTeamRunRequestInputVariant2chatMode>,
22832}
22833
22834#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
22836pub enum StartTeamRunRequestInputVariant2chatMode {
22837 #[default]
22838 #[serde(rename = "plan")]
22839 Plan,
22840 #[serde(rename = "chat")]
22841 Chat,
22842 #[serde(untagged)]
22844 Other(String),
22845}
22846
22847impl StartTeamRunRequestInputVariant2chatMode {
22848 pub fn as_str(&self) -> &str {
22850 match self {
22851 Self::Plan => "plan",
22852 Self::Chat => "chat",
22853 Self::Other(value) => value.as_str(),
22854 }
22855 }
22856}
22857
22858impl std::fmt::Display for StartTeamRunRequestInputVariant2chatMode {
22859 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22860 f.write_str(self.as_str())
22861 }
22862}
22863
22864impl From<&str> for StartTeamRunRequestInputVariant2chatMode {
22865 fn from(value: &str) -> Self {
22866 match value {
22867 "plan" => Self::Plan,
22868 "chat" => Self::Chat,
22869 other => Self::Other(other.to_string()),
22870 }
22871 }
22872}
22873
22874#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22876pub struct StartTeamRunResponse {
22877 pub team_run_id: String,
22878}
22879
22880#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22883pub struct StrategicGoal {
22884 pub goal_id: String,
22885 pub title: String,
22886 pub description: String,
22887 pub kpis: Vec<StrategicGoalKpisItem>,
22888 #[serde(default, skip_serializing_if = "Option::is_none")]
22889 pub root_objective_id: Option<String>,
22890 #[serde(default, skip_serializing_if = "Option::is_none")]
22891 pub deadline: Option<String>,
22892}
22893
22894#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22896pub struct StrategicGoalKpisItem {
22897 pub name: String,
22898 pub target: String,
22899 #[serde(default, skip_serializing_if = "Option::is_none")]
22900 pub current: Option<String>,
22901}
22902
22903#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22907pub struct SubjectSweep {
22908 pub identifiers_matched: i64,
22912 pub prefixes_scanned: Vec<String>,
22914 pub fields_matched: Vec<String>,
22916 pub no_records_matched: bool,
22918}
22919
22920#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22922pub struct SubmitFeedbackRequest {
22923 pub message: String,
22925 #[serde(default, skip_serializing_if = "Option::is_none")]
22927 pub title: Option<String>,
22928 #[serde(default, skip_serializing_if = "Option::is_none")]
22930 pub context: Option<String>,
22931 #[serde(default, skip_serializing_if = "Option::is_none")]
22933 pub url: Option<String>,
22934 #[serde(default, skip_serializing_if = "Option::is_none")]
22935 pub run_id: Option<String>,
22936 #[serde(default, skip_serializing_if = "Option::is_none")]
22938 pub kind: Option<ErrorReportKind>,
22939}
22940
22941#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22943pub struct SubmitFeedbackResponse {
22944 pub ok: bool,
22945 pub id: String,
22946}
22947
22948#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22950pub struct SubscribeToListingRequest {
22951 pub stripe_subscription_id: String,
22954}
22955
22956#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22958pub struct SuspendAgentRequest {
22959 #[serde(default, skip_serializing_if = "Option::is_none")]
22960 pub reason: Option<String>,
22961}
22962
22963#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22965pub struct SuspendTenantRequest {
22966 #[serde(default, skip_serializing_if = "Option::is_none")]
22967 pub reason: Option<String>,
22968}
22969
22970#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22972pub struct SuspendTenantResponse {
22973 pub suspended: bool,
22974 pub tenant_id: String,
22975 pub reason: String,
22976}
22977
22978#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22980pub struct SuspendUserResponse {
22981 pub suspended: bool,
22982 pub user_id: String,
22983}
22984
22985#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22987pub struct SwitchTenantRequest {
22988 pub tenant_id: String,
22989}
22990
22991#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22993pub struct SwitchTenantResponse {
22994 pub switched: bool,
22995 pub tenant_id: String,
22996 pub user_id: String,
22997 pub role: String,
22998}
22999
23000#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23002pub struct SyncProviderModelsResponse {
23003 pub added: i64,
23005 #[serde(rename = "addedIds")]
23009 pub added_ids: Vec<String>,
23010 pub total: i64,
23012 pub scanned: i64,
23014 #[serde(default, skip_serializing_if = "Option::is_none")]
23016 pub provider: Option<String>,
23017 #[serde(rename = "added_ids")]
23019 pub added_ids_: Vec<String>,
23020}
23021
23022#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23024pub struct Team {
23025 pub team_id: String,
23026 pub tenant_id: String,
23027 pub name: String,
23028 #[serde(default, skip_serializing_if = "Option::is_none")]
23029 pub description: Option<String>,
23030 pub topology: TeamTopology,
23031 #[serde(default, skip_serializing_if = "Option::is_none")]
23032 pub delegation_strategy: Option<TeamDelegationStrategy>,
23033 #[serde(default, skip_serializing_if = "Option::is_none")]
23034 pub merge_strategy: Option<TeamMergeStrategy>,
23035 #[serde(default, skip_serializing_if = "Option::is_none")]
23036 pub message_protocol: Option<TeamMessageProtocol>,
23037 #[serde(default, skip_serializing_if = "Option::is_none")]
23038 pub orchestration_mode: Option<TeamOrchestrationMode>,
23039 #[serde(default, skip_serializing_if = "Option::is_none")]
23040 pub supervisor_mode: Option<TeamSupervisorMode>,
23041 pub supervisor_agent_id: String,
23042 pub workers: Vec<TeamWorker>,
23043 pub policies: TeamPolicies,
23044 #[serde(default, skip_serializing_if = "Option::is_none")]
23045 pub goal_config: Option<TeamGoalConfig>,
23046 #[serde(default, skip_serializing_if = "Option::is_none")]
23047 pub swarm_config: Option<TeamSwarmConfig>,
23048 #[serde(default, skip_serializing_if = "Option::is_none")]
23049 pub workspace_id: Option<String>,
23050 #[serde(default, skip_serializing_if = "Option::is_none")]
23051 pub created_at: Option<String>,
23052 #[serde(default, skip_serializing_if = "Option::is_none")]
23053 pub updated_at: Option<String>,
23054}
23055
23056#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23058pub struct TeamChatTurn {
23059 #[serde(default, skip_serializing_if = "Option::is_none")]
23060 pub addressed_to: Option<Vec<String>>,
23061 pub content: String,
23062 pub from_task: bool,
23063 pub role: String,
23064 pub run_meta: serde_json::Map<String, serde_json::Value>,
23065 pub run_pending: bool,
23066 pub team_run_id: String,
23067 #[serde(default, skip_serializing_if = "Option::is_none")]
23068 pub thread_id: Option<String>,
23069 pub timestamp: String,
23070}
23071
23072#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23074pub struct TeamCreate {
23075 pub name: String,
23076 #[serde(default, skip_serializing_if = "Option::is_none")]
23077 pub description: Option<String>,
23078 #[serde(default, skip_serializing_if = "Option::is_none")]
23079 pub topology: Option<String>,
23080 #[serde(default, skip_serializing_if = "Option::is_none")]
23081 pub supervisor_agent_id: Option<String>,
23082 #[serde(default, skip_serializing_if = "Option::is_none")]
23084 pub workers: Option<Vec<TeamCreateWorker>>,
23085 #[serde(default, skip_serializing_if = "Option::is_none")]
23086 pub agent_ids: Option<Vec<String>>,
23087 #[serde(default, skip_serializing_if = "Option::is_none")]
23088 pub delegation_strategy: Option<String>,
23089 #[serde(default, skip_serializing_if = "Option::is_none")]
23090 pub merge_strategy: Option<String>,
23091 #[serde(default, skip_serializing_if = "Option::is_none")]
23092 pub orchestration_mode: Option<String>,
23093 #[serde(default, skip_serializing_if = "Option::is_none")]
23094 pub workspace_id: Option<String>,
23095}
23096
23097#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23099pub struct TeamCreateWorker {
23100 pub agent_id: String,
23101 #[serde(default, skip_serializing_if = "Option::is_none")]
23102 pub role: Option<String>,
23103}
23104
23105#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23107pub enum TeamDelegationStrategy {
23108 #[default]
23109 #[serde(rename = "supervisor_decides")]
23110 SupervisorDecides,
23111 #[serde(rename = "round_robin")]
23112 RoundRobin,
23113 #[serde(rename = "capability_match")]
23114 CapabilityMatch,
23115 #[serde(untagged)]
23117 Other(String),
23118}
23119
23120impl TeamDelegationStrategy {
23121 pub fn as_str(&self) -> &str {
23123 match self {
23124 Self::SupervisorDecides => "supervisor_decides",
23125 Self::RoundRobin => "round_robin",
23126 Self::CapabilityMatch => "capability_match",
23127 Self::Other(value) => value.as_str(),
23128 }
23129 }
23130}
23131
23132impl std::fmt::Display for TeamDelegationStrategy {
23133 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23134 f.write_str(self.as_str())
23135 }
23136}
23137
23138impl From<&str> for TeamDelegationStrategy {
23139 fn from(value: &str) -> Self {
23140 match value {
23141 "supervisor_decides" => Self::SupervisorDecides,
23142 "round_robin" => Self::RoundRobin,
23143 "capability_match" => Self::CapabilityMatch,
23144 other => Self::Other(other.to_string()),
23145 }
23146 }
23147}
23148
23149#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23151pub struct TeamGoalConfig {
23152 pub root_objective_id: String,
23153 #[serde(default, skip_serializing_if = "Option::is_none")]
23154 pub review_interval_ms: Option<i64>,
23155 #[serde(default, skip_serializing_if = "Option::is_none")]
23156 pub max_iterations: Option<i64>,
23157 #[serde(default, skip_serializing_if = "Option::is_none")]
23158 pub budget: Option<TeamObjectiveBudget>,
23159}
23160
23161#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23163pub struct TeamGraphEdge {
23164 pub edge_id: String,
23165 pub from: String,
23166 pub to: String,
23167 pub r#type: TeamGraphEdgeType,
23168 #[serde(default, skip_serializing_if = "Option::is_none")]
23169 pub task_id: Option<String>,
23170 pub created_at: String,
23171}
23172
23173#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23175pub enum TeamGraphEdgeType {
23176 #[default]
23177 #[serde(rename = "delegation")]
23178 Delegation,
23179 #[serde(rename = "supervision")]
23180 Supervision,
23181 #[serde(rename = "peer")]
23182 Peer,
23183 #[serde(untagged)]
23185 Other(String),
23186}
23187
23188impl TeamGraphEdgeType {
23189 pub fn as_str(&self) -> &str {
23191 match self {
23192 Self::Delegation => "delegation",
23193 Self::Supervision => "supervision",
23194 Self::Peer => "peer",
23195 Self::Other(value) => value.as_str(),
23196 }
23197 }
23198}
23199
23200impl std::fmt::Display for TeamGraphEdgeType {
23201 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23202 f.write_str(self.as_str())
23203 }
23204}
23205
23206impl From<&str> for TeamGraphEdgeType {
23207 fn from(value: &str) -> Self {
23208 match value {
23209 "delegation" => Self::Delegation,
23210 "supervision" => Self::Supervision,
23211 "peer" => Self::Peer,
23212 other => Self::Other(other.to_string()),
23213 }
23214 }
23215}
23216
23217#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23219pub struct TeamGraphNode {
23220 pub agent_id: String,
23221 pub role: TeamGraphNodeRole,
23222 pub status: TeamGraphNodeStatus,
23223 pub spawned_by: String,
23224 pub spawned_at: String,
23225 pub goal_summary: String,
23226}
23227
23228#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23230pub enum TeamGraphNodeRole {
23231 #[default]
23232 #[serde(rename = "orchestrator")]
23233 Orchestrator,
23234 #[serde(rename = "worker")]
23235 Worker,
23236 #[serde(rename = "arbiter")]
23237 Arbiter,
23238 #[serde(untagged)]
23240 Other(String),
23241}
23242
23243impl TeamGraphNodeRole {
23244 pub fn as_str(&self) -> &str {
23246 match self {
23247 Self::Orchestrator => "orchestrator",
23248 Self::Worker => "worker",
23249 Self::Arbiter => "arbiter",
23250 Self::Other(value) => value.as_str(),
23251 }
23252 }
23253}
23254
23255impl std::fmt::Display for TeamGraphNodeRole {
23256 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23257 f.write_str(self.as_str())
23258 }
23259}
23260
23261impl From<&str> for TeamGraphNodeRole {
23262 fn from(value: &str) -> Self {
23263 match value {
23264 "orchestrator" => Self::Orchestrator,
23265 "worker" => Self::Worker,
23266 "arbiter" => Self::Arbiter,
23267 other => Self::Other(other.to_string()),
23268 }
23269 }
23270}
23271
23272#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23274pub enum TeamGraphNodeStatus {
23275 #[default]
23276 #[serde(rename = "active")]
23277 Active,
23278 #[serde(rename = "idle")]
23279 Idle,
23280 #[serde(rename = "terminated")]
23281 Terminated,
23282 #[serde(untagged)]
23284 Other(String),
23285}
23286
23287impl TeamGraphNodeStatus {
23288 pub fn as_str(&self) -> &str {
23290 match self {
23291 Self::Active => "active",
23292 Self::Idle => "idle",
23293 Self::Terminated => "terminated",
23294 Self::Other(value) => value.as_str(),
23295 }
23296 }
23297}
23298
23299impl std::fmt::Display for TeamGraphNodeStatus {
23300 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23301 f.write_str(self.as_str())
23302 }
23303}
23304
23305impl From<&str> for TeamGraphNodeStatus {
23306 fn from(value: &str) -> Self {
23307 match value {
23308 "active" => Self::Active,
23309 "idle" => Self::Idle,
23310 "terminated" => Self::Terminated,
23311 other => Self::Other(other.to_string()),
23312 }
23313 }
23314}
23315
23316#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23318pub enum TeamMergeStrategy {
23319 #[default]
23320 #[serde(rename = "supervisor_merges")]
23321 SupervisorMerges,
23322 #[serde(rename = "concatenate")]
23323 Concatenate,
23324 #[serde(rename = "vote")]
23325 Vote,
23326 #[serde(untagged)]
23328 Other(String),
23329}
23330
23331impl TeamMergeStrategy {
23332 pub fn as_str(&self) -> &str {
23334 match self {
23335 Self::SupervisorMerges => "supervisor_merges",
23336 Self::Concatenate => "concatenate",
23337 Self::Vote => "vote",
23338 Self::Other(value) => value.as_str(),
23339 }
23340 }
23341}
23342
23343impl std::fmt::Display for TeamMergeStrategy {
23344 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23345 f.write_str(self.as_str())
23346 }
23347}
23348
23349impl From<&str> for TeamMergeStrategy {
23350 fn from(value: &str) -> Self {
23351 match value {
23352 "supervisor_merges" => Self::SupervisorMerges,
23353 "concatenate" => Self::Concatenate,
23354 "vote" => Self::Vote,
23355 other => Self::Other(other.to_string()),
23356 }
23357 }
23358}
23359
23360#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23362pub struct TeamMessage {
23363 pub message_id: String,
23364 pub team_run_id: String,
23365 pub from_agent_id: String,
23366 pub to_agent_id: String,
23367 pub r#type: TeamMessageType,
23368 pub content: String,
23369 pub round: i64,
23370 pub timestamp: String,
23371 #[serde(default, skip_serializing_if = "Option::is_none")]
23372 pub parent_message_id: Option<String>,
23373}
23374
23375#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23377pub enum TeamMessageProtocol {
23378 #[default]
23379 #[serde(rename = "shared_context")]
23380 SharedContext,
23381 #[serde(rename = "message_passing")]
23382 MessagePassing,
23383 #[serde(untagged)]
23385 Other(String),
23386}
23387
23388impl TeamMessageProtocol {
23389 pub fn as_str(&self) -> &str {
23391 match self {
23392 Self::SharedContext => "shared_context",
23393 Self::MessagePassing => "message_passing",
23394 Self::Other(value) => value.as_str(),
23395 }
23396 }
23397}
23398
23399impl std::fmt::Display for TeamMessageProtocol {
23400 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23401 f.write_str(self.as_str())
23402 }
23403}
23404
23405impl From<&str> for TeamMessageProtocol {
23406 fn from(value: &str) -> Self {
23407 match value {
23408 "shared_context" => Self::SharedContext,
23409 "message_passing" => Self::MessagePassing,
23410 other => Self::Other(other.to_string()),
23411 }
23412 }
23413}
23414
23415#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23417pub enum TeamMessageType {
23418 #[default]
23419 #[serde(rename = "delegation")]
23420 Delegation,
23421 #[serde(rename = "result")]
23422 Result,
23423 #[serde(rename = "question")]
23424 Question,
23425 #[serde(rename = "status_update")]
23426 StatusUpdate,
23427 #[serde(rename = "merge_request")]
23428 MergeRequest,
23429 #[serde(rename = "validation")]
23430 Validation,
23431 #[serde(untagged)]
23433 Other(String),
23434}
23435
23436impl TeamMessageType {
23437 pub fn as_str(&self) -> &str {
23439 match self {
23440 Self::Delegation => "delegation",
23441 Self::Result => "result",
23442 Self::Question => "question",
23443 Self::StatusUpdate => "status_update",
23444 Self::MergeRequest => "merge_request",
23445 Self::Validation => "validation",
23446 Self::Other(value) => value.as_str(),
23447 }
23448 }
23449}
23450
23451impl std::fmt::Display for TeamMessageType {
23452 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23453 f.write_str(self.as_str())
23454 }
23455}
23456
23457impl From<&str> for TeamMessageType {
23458 fn from(value: &str) -> Self {
23459 match value {
23460 "delegation" => Self::Delegation,
23461 "result" => Self::Result,
23462 "question" => Self::Question,
23463 "status_update" => Self::StatusUpdate,
23464 "merge_request" => Self::MergeRequest,
23465 "validation" => Self::Validation,
23466 other => Self::Other(other.to_string()),
23467 }
23468 }
23469}
23470
23471#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23473pub struct TeamObjectiveBudget {
23474 #[serde(default, skip_serializing_if = "Option::is_none")]
23475 pub max_runs: Option<i64>,
23476 #[serde(default, skip_serializing_if = "Option::is_none")]
23477 pub max_tokens: Option<i64>,
23478 #[serde(default, skip_serializing_if = "Option::is_none")]
23479 pub max_cost_usd: Option<f64>,
23480}
23481
23482#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23484pub enum TeamOrchestrationMode {
23485 #[default]
23486 #[serde(rename = "strict_addressed")]
23487 StrictAddressed,
23488 #[serde(rename = "peer_collab")]
23489 PeerCollab,
23490 #[serde(rename = "vote_based")]
23491 VoteBased,
23492 #[serde(untagged)]
23494 Other(String),
23495}
23496
23497impl TeamOrchestrationMode {
23498 pub fn as_str(&self) -> &str {
23500 match self {
23501 Self::StrictAddressed => "strict_addressed",
23502 Self::PeerCollab => "peer_collab",
23503 Self::VoteBased => "vote_based",
23504 Self::Other(value) => value.as_str(),
23505 }
23506 }
23507}
23508
23509impl std::fmt::Display for TeamOrchestrationMode {
23510 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23511 f.write_str(self.as_str())
23512 }
23513}
23514
23515impl From<&str> for TeamOrchestrationMode {
23516 fn from(value: &str) -> Self {
23517 match value {
23518 "strict_addressed" => Self::StrictAddressed,
23519 "peer_collab" => Self::PeerCollab,
23520 "vote_based" => Self::VoteBased,
23521 other => Self::Other(other.to_string()),
23522 }
23523 }
23524}
23525
23526#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23528pub struct TeamPolicies {
23529 pub max_rounds: i64,
23530 pub timeout_ms: i64,
23534 pub early_termination: bool,
23535 #[serde(default, skip_serializing_if = "Option::is_none")]
23536 pub consensus_threshold: Option<f64>,
23537 pub effort: TeamPoliciesEffort,
23538 pub max_delegation_depth: i64,
23540 pub subtask_timeout_ms: i64,
23541 pub on_worker_failure: TeamPoliciesOnWorkerFailure,
23544 pub max_worker_retries: i64,
23545 pub require_all_workers: bool,
23546 #[serde(default, skip_serializing_if = "Option::is_none")]
23547 pub validation: Option<ValidationPolicy>,
23548 #[serde(default, skip_serializing_if = "Option::is_none")]
23550 pub max_graph_nodes: Option<i64>,
23551 #[serde(default, skip_serializing_if = "Option::is_none")]
23553 pub max_concurrency: Option<i64>,
23554}
23555
23556#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23558pub enum TeamPoliciesEffort {
23559 #[default]
23560 #[serde(rename = "low")]
23561 Low,
23562 #[serde(rename = "medium")]
23563 Medium,
23564 #[serde(rename = "high")]
23565 High,
23566 #[serde(rename = "max")]
23567 Max,
23568 #[serde(untagged)]
23570 Other(String),
23571}
23572
23573impl TeamPoliciesEffort {
23574 pub fn as_str(&self) -> &str {
23576 match self {
23577 Self::Low => "low",
23578 Self::Medium => "medium",
23579 Self::High => "high",
23580 Self::Max => "max",
23581 Self::Other(value) => value.as_str(),
23582 }
23583 }
23584}
23585
23586impl std::fmt::Display for TeamPoliciesEffort {
23587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23588 f.write_str(self.as_str())
23589 }
23590}
23591
23592impl From<&str> for TeamPoliciesEffort {
23593 fn from(value: &str) -> Self {
23594 match value {
23595 "low" => Self::Low,
23596 "medium" => Self::Medium,
23597 "high" => Self::High,
23598 "max" => Self::Max,
23599 other => Self::Other(other.to_string()),
23600 }
23601 }
23602}
23603
23604#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23607pub enum TeamPoliciesOnWorkerFailure {
23608 #[default]
23609 #[serde(rename = "retry")]
23610 Retry,
23611 #[serde(rename = "skip")]
23612 Skip,
23613 #[serde(rename = "abort_team")]
23614 AbortTeam,
23615 #[serde(untagged)]
23617 Other(String),
23618}
23619
23620impl TeamPoliciesOnWorkerFailure {
23621 pub fn as_str(&self) -> &str {
23623 match self {
23624 Self::Retry => "retry",
23625 Self::Skip => "skip",
23626 Self::AbortTeam => "abort_team",
23627 Self::Other(value) => value.as_str(),
23628 }
23629 }
23630}
23631
23632impl std::fmt::Display for TeamPoliciesOnWorkerFailure {
23633 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23634 f.write_str(self.as_str())
23635 }
23636}
23637
23638impl From<&str> for TeamPoliciesOnWorkerFailure {
23639 fn from(value: &str) -> Self {
23640 match value {
23641 "retry" => Self::Retry,
23642 "skip" => Self::Skip,
23643 "abort_team" => Self::AbortTeam,
23644 other => Self::Other(other.to_string()),
23645 }
23646 }
23647}
23648
23649#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23651pub struct TeamRunChatTurn {
23652 pub user_message: String,
23653 pub assistant_message: String,
23654}
23655
23656#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23660pub struct TeamRunDetail {
23661 pub team_run_id: String,
23662 pub team_id: String,
23663 pub status: String,
23664 pub runs: Vec<Run>,
23665 pub total_runs: i64,
23666}
23667
23668#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23670pub struct TeamRunSummary {
23671 pub team_run_id: String,
23672 pub run_id: String,
23673 pub agent_id: String,
23674 pub status: String,
23675 pub created_at: String,
23676}
23677
23678#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23680pub enum TeamSupervisorMode {
23681 #[default]
23682 #[serde(rename = "auto_dispatch")]
23683 AutoDispatch,
23684 #[serde(rename = "tool_driven")]
23685 ToolDriven,
23686 #[serde(untagged)]
23688 Other(String),
23689}
23690
23691impl TeamSupervisorMode {
23692 pub fn as_str(&self) -> &str {
23694 match self {
23695 Self::AutoDispatch => "auto_dispatch",
23696 Self::ToolDriven => "tool_driven",
23697 Self::Other(value) => value.as_str(),
23698 }
23699 }
23700}
23701
23702impl std::fmt::Display for TeamSupervisorMode {
23703 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23704 f.write_str(self.as_str())
23705 }
23706}
23707
23708impl From<&str> for TeamSupervisorMode {
23709 fn from(value: &str) -> Self {
23710 match value {
23711 "auto_dispatch" => Self::AutoDispatch,
23712 "tool_driven" => Self::ToolDriven,
23713 other => Self::Other(other.to_string()),
23714 }
23715 }
23716}
23717
23718#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23720pub struct TeamSwarmConfig {
23721 pub initial_agent_id: String,
23722 #[serde(default, skip_serializing_if = "Option::is_none")]
23723 pub max_handoffs: Option<i64>,
23724 #[serde(default, skip_serializing_if = "Option::is_none")]
23725 pub handoff_context_strategy: Option<TeamSwarmConfigHandoffContextStrategy>,
23726}
23727
23728#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23730pub enum TeamSwarmConfigHandoffContextStrategy {
23731 #[default]
23732 #[serde(rename = "full")]
23733 Full,
23734 #[serde(rename = "summary")]
23735 Summary,
23736 #[serde(untagged)]
23738 Other(String),
23739}
23740
23741impl TeamSwarmConfigHandoffContextStrategy {
23742 pub fn as_str(&self) -> &str {
23744 match self {
23745 Self::Full => "full",
23746 Self::Summary => "summary",
23747 Self::Other(value) => value.as_str(),
23748 }
23749 }
23750}
23751
23752impl std::fmt::Display for TeamSwarmConfigHandoffContextStrategy {
23753 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23754 f.write_str(self.as_str())
23755 }
23756}
23757
23758impl From<&str> for TeamSwarmConfigHandoffContextStrategy {
23759 fn from(value: &str) -> Self {
23760 match value {
23761 "full" => Self::Full,
23762 "summary" => Self::Summary,
23763 other => Self::Other(other.to_string()),
23764 }
23765 }
23766}
23767
23768#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23770pub enum TeamTopology {
23771 #[default]
23772 #[serde(rename = "supervisor")]
23773 Supervisor,
23774 #[serde(rename = "round_robin")]
23775 RoundRobin,
23776 #[serde(rename = "pipeline")]
23777 Pipeline,
23778 #[serde(rename = "goal_driven")]
23779 GoalDriven,
23780 #[serde(rename = "swarm")]
23781 Swarm,
23782 #[serde(untagged)]
23784 Other(String),
23785}
23786
23787impl TeamTopology {
23788 pub fn as_str(&self) -> &str {
23790 match self {
23791 Self::Supervisor => "supervisor",
23792 Self::RoundRobin => "round_robin",
23793 Self::Pipeline => "pipeline",
23794 Self::GoalDriven => "goal_driven",
23795 Self::Swarm => "swarm",
23796 Self::Other(value) => value.as_str(),
23797 }
23798 }
23799}
23800
23801impl std::fmt::Display for TeamTopology {
23802 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23803 f.write_str(self.as_str())
23804 }
23805}
23806
23807impl From<&str> for TeamTopology {
23808 fn from(value: &str) -> Self {
23809 match value {
23810 "supervisor" => Self::Supervisor,
23811 "round_robin" => Self::RoundRobin,
23812 "pipeline" => Self::Pipeline,
23813 "goal_driven" => Self::GoalDriven,
23814 "swarm" => Self::Swarm,
23815 other => Self::Other(other.to_string()),
23816 }
23817 }
23818}
23819
23820#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23822pub struct TeamUpdate {
23823 #[serde(default, skip_serializing_if = "Option::is_none")]
23824 pub name: Option<String>,
23825 #[serde(default, skip_serializing_if = "Option::is_none")]
23826 pub description: Option<String>,
23827 #[serde(default, skip_serializing_if = "Option::is_none")]
23828 pub topology: Option<String>,
23829 #[serde(default, skip_serializing_if = "Option::is_none")]
23830 pub supervisor_agent_id: Option<String>,
23831 #[serde(default, skip_serializing_if = "Option::is_none")]
23832 pub workers: Option<Vec<TeamUpdateWorker>>,
23833}
23834
23835#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23837pub struct TeamUpdateWorker {
23838 pub agent_id: String,
23839 #[serde(default, skip_serializing_if = "Option::is_none")]
23840 pub role: Option<String>,
23841}
23842
23843#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23845pub struct TeamWorker {
23846 pub agent_id: String,
23847 pub role: String,
23848 pub permissions: TeamWorkerPermissions,
23849 #[serde(default, skip_serializing_if = "Option::is_none")]
23850 pub external_a2a: Option<TeamWorkerExternalA2A>,
23851}
23852
23853#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23855pub struct TeamWorkerExternalA2A {
23856 pub endpoint: String,
23857 pub agent_card_url: String,
23858 #[serde(default, skip_serializing_if = "Option::is_none")]
23859 pub auth: Option<TeamWorkerExternalA2AAuth>,
23860}
23861
23862#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23864pub struct TeamWorkerExternalA2AAuth {
23865 pub r#type: String,
23866 #[serde(default, skip_serializing_if = "Option::is_none")]
23867 pub token_ref: Option<String>,
23868}
23869
23870#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23872pub struct TeamWorkerPermissions {
23873 pub tools: Vec<String>,
23875 pub can_read_other_results: bool,
23876 pub can_delegate: bool,
23877 pub can_abort: bool,
23878 #[serde(default, skip_serializing_if = "Option::is_none")]
23879 pub max_tokens: Option<i64>,
23880 #[serde(default, skip_serializing_if = "Option::is_none")]
23881 pub max_steps_per_subtask: Option<i64>,
23882}
23883
23884#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23886pub struct Tenant {
23887 pub tenant_id: String,
23888 pub name: String,
23889 pub slug: String,
23890 pub status: TenantStatus,
23891 #[serde(default, skip_serializing_if = "Option::is_none")]
23892 pub plan: Option<String>,
23893 #[serde(default, skip_serializing_if = "Option::is_none")]
23895 pub plan_id: Option<String>,
23896 #[serde(default, skip_serializing_if = "Option::is_none")]
23897 pub quotas: Option<TenantQuotas>,
23898 #[serde(default, skip_serializing_if = "Option::is_none")]
23899 pub quota_overrides: Option<TenantQuotaOverrides>,
23900 #[serde(default, skip_serializing_if = "Option::is_none")]
23901 pub settings: Option<serde_json::Map<String, serde_json::Value>>,
23902 #[serde(default, skip_serializing_if = "Option::is_none")]
23903 pub billing: Option<TenantBilling>,
23904 #[serde(default, skip_serializing_if = "Option::is_none")]
23905 pub billing_status: Option<TenantBillingStatus>,
23906 #[serde(default, skip_serializing_if = "Option::is_none")]
23907 pub trial: Option<TenantTrial>,
23908 #[serde(default, skip_serializing_if = "Option::is_none")]
23909 pub trial_ends_at: Option<String>,
23910 #[serde(default, skip_serializing_if = "Option::is_none")]
23911 pub trial_recommended_plan: Option<String>,
23912 #[serde(default, skip_serializing_if = "Option::is_none")]
23913 pub trial_resolved: Option<bool>,
23914 #[serde(default, skip_serializing_if = "Option::is_none")]
23915 pub onboarding_completed: Option<bool>,
23916 #[serde(default, skip_serializing_if = "Option::is_none")]
23917 pub is_super_admin: Option<bool>,
23918 #[serde(default, skip_serializing_if = "Option::is_none")]
23919 pub is_platform_admin: Option<bool>,
23920 #[serde(default, skip_serializing_if = "Option::is_none")]
23921 pub head_agent_id: Option<String>,
23922 #[serde(default, skip_serializing_if = "Option::is_none")]
23923 pub shared_workspace_id: Option<String>,
23924 #[serde(default, skip_serializing_if = "Option::is_none")]
23925 pub public: Option<bool>,
23926 #[serde(default, skip_serializing_if = "Option::is_none")]
23927 pub description: Option<String>,
23928 #[serde(default, skip_serializing_if = "Option::is_none")]
23929 pub logo_url: Option<String>,
23930 #[serde(default, skip_serializing_if = "Option::is_none")]
23931 pub custom_domain: Option<TenantCustomDomain>,
23932 #[serde(default, skip_serializing_if = "Option::is_none")]
23933 pub branding: Option<TenantBranding>,
23934 #[serde(default, skip_serializing_if = "Option::is_none")]
23935 pub social_links: Option<TenantSocialLinks>,
23936 #[serde(default, skip_serializing_if = "Option::is_none")]
23937 pub marketplace_listing: Option<serde_json::Map<String, serde_json::Value>>,
23938 #[serde(default, skip_serializing_if = "Option::is_none")]
23939 pub public_agent_id: Option<String>,
23940 #[serde(default, skip_serializing_if = "Option::is_none")]
23941 pub published_agent_ids: Option<Vec<String>>,
23942 #[serde(default, skip_serializing_if = "Option::is_none")]
23943 pub public_settings: Option<TenantPublicSettings>,
23944 #[serde(default, skip_serializing_if = "Option::is_none")]
23945 pub entitled_spec_packages: Option<Vec<String>>,
23946 #[serde(default, skip_serializing_if = "Option::is_none")]
23947 pub legal_hold: Option<bool>,
23948 #[serde(default, skip_serializing_if = "Option::is_none")]
23949 pub suspension_reason: Option<String>,
23950 #[serde(default, skip_serializing_if = "Option::is_none")]
23951 pub suspended_at: Option<String>,
23952 pub created_at: String,
23953 pub updated_at: String,
23954}
23955
23956#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
23958pub struct TenantBilling {
23959 #[serde(default, skip_serializing_if = "Option::is_none")]
23960 pub stripe_customer_id: Option<String>,
23961 #[serde(default, skip_serializing_if = "Option::is_none")]
23962 pub stripe_subscription_id: Option<String>,
23963 #[serde(default, skip_serializing_if = "Option::is_none")]
23964 pub cancel_at_period_end: Option<bool>,
23965 #[serde(default, skip_serializing_if = "Option::is_none")]
23966 pub current_period_end_ms: Option<i64>,
23967}
23968
23969#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
23971pub enum TenantBillingStatus {
23972 #[default]
23973 #[serde(rename = "active")]
23974 Active,
23975 #[serde(rename = "past_due")]
23976 PastDue,
23977 #[serde(rename = "disputed")]
23978 Disputed,
23979 #[serde(rename = "cancelled")]
23980 Cancelled,
23981 #[serde(untagged)]
23983 Other(String),
23984}
23985
23986impl TenantBillingStatus {
23987 pub fn as_str(&self) -> &str {
23989 match self {
23990 Self::Active => "active",
23991 Self::PastDue => "past_due",
23992 Self::Disputed => "disputed",
23993 Self::Cancelled => "cancelled",
23994 Self::Other(value) => value.as_str(),
23995 }
23996 }
23997}
23998
23999impl std::fmt::Display for TenantBillingStatus {
24000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24001 f.write_str(self.as_str())
24002 }
24003}
24004
24005impl From<&str> for TenantBillingStatus {
24006 fn from(value: &str) -> Self {
24007 match value {
24008 "active" => Self::Active,
24009 "past_due" => Self::PastDue,
24010 "disputed" => Self::Disputed,
24011 "cancelled" => Self::Cancelled,
24012 other => Self::Other(other.to_string()),
24013 }
24014 }
24015}
24016
24017#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24019pub struct TenantBranding {
24020 #[serde(default, skip_serializing_if = "Option::is_none")]
24021 pub primary_color: Option<String>,
24022 #[serde(default, skip_serializing_if = "Option::is_none")]
24023 pub accent_color: Option<String>,
24024 #[serde(default, skip_serializing_if = "Option::is_none")]
24025 pub background_color: Option<String>,
24026 #[serde(default, skip_serializing_if = "Option::is_none")]
24027 pub foreground_color: Option<String>,
24028 #[serde(default, skip_serializing_if = "Option::is_none")]
24029 pub card_color: Option<String>,
24030 #[serde(default, skip_serializing_if = "Option::is_none")]
24031 pub border_color: Option<String>,
24032 #[serde(default, skip_serializing_if = "Option::is_none")]
24033 pub favicon_url: Option<String>,
24034 #[serde(default, skip_serializing_if = "Option::is_none")]
24035 pub custom_css: Option<String>,
24036 #[serde(default, skip_serializing_if = "Option::is_none")]
24037 pub font_family: Option<String>,
24038 #[serde(default, skip_serializing_if = "Option::is_none")]
24039 pub site_title: Option<String>,
24040 #[serde(default, skip_serializing_if = "Option::is_none")]
24041 pub seo_description: Option<String>,
24042 #[serde(default, skip_serializing_if = "Option::is_none")]
24043 pub og_image_url: Option<String>,
24044 #[serde(default, skip_serializing_if = "Option::is_none")]
24045 pub dark_mode: Option<bool>,
24046}
24047
24048#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24050pub struct TenantCustomDomain {
24051 pub domain: String,
24052 pub created_at: String,
24053 #[serde(default, skip_serializing_if = "Option::is_none")]
24054 pub updated_at: Option<String>,
24055 #[serde(default, skip_serializing_if = "Option::is_none")]
24056 pub status: Option<TenantCustomDomainStatus>,
24057 #[serde(default, skip_serializing_if = "Option::is_none")]
24058 pub verification_method: Option<TenantCustomDomainVerificationMethod>,
24059 #[serde(default, skip_serializing_if = "Option::is_none")]
24060 pub verification_value: Option<String>,
24061 #[serde(default, skip_serializing_if = "Option::is_none")]
24062 pub last_checked_at: Option<String>,
24063 #[serde(default, skip_serializing_if = "Option::is_none")]
24064 pub verified_at: Option<String>,
24065 #[serde(default, skip_serializing_if = "Option::is_none")]
24066 pub dns: Option<serde_json::Map<String, serde_json::Value>>,
24067 #[serde(default, skip_serializing_if = "Option::is_none")]
24068 pub cert: Option<serde_json::Map<String, serde_json::Value>>,
24069}
24070
24071#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24073pub enum TenantCustomDomainStatus {
24074 #[default]
24075 #[serde(rename = "pending")]
24076 Pending,
24077 #[serde(rename = "verified")]
24078 Verified,
24079 #[serde(rename = "failed")]
24080 Failed,
24081 #[serde(rename = "deactivated")]
24082 Deactivated,
24083 #[serde(untagged)]
24085 Other(String),
24086}
24087
24088impl TenantCustomDomainStatus {
24089 pub fn as_str(&self) -> &str {
24091 match self {
24092 Self::Pending => "pending",
24093 Self::Verified => "verified",
24094 Self::Failed => "failed",
24095 Self::Deactivated => "deactivated",
24096 Self::Other(value) => value.as_str(),
24097 }
24098 }
24099}
24100
24101impl std::fmt::Display for TenantCustomDomainStatus {
24102 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24103 f.write_str(self.as_str())
24104 }
24105}
24106
24107impl From<&str> for TenantCustomDomainStatus {
24108 fn from(value: &str) -> Self {
24109 match value {
24110 "pending" => Self::Pending,
24111 "verified" => Self::Verified,
24112 "failed" => Self::Failed,
24113 "deactivated" => Self::Deactivated,
24114 other => Self::Other(other.to_string()),
24115 }
24116 }
24117}
24118
24119#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24121pub enum TenantCustomDomainVerificationMethod {
24122 #[default]
24123 #[serde(rename = "cname")]
24124 Cname,
24125 #[serde(untagged)]
24127 Other(String),
24128}
24129
24130impl TenantCustomDomainVerificationMethod {
24131 pub fn as_str(&self) -> &str {
24133 match self {
24134 Self::Cname => "cname",
24135 Self::Other(value) => value.as_str(),
24136 }
24137 }
24138}
24139
24140impl std::fmt::Display for TenantCustomDomainVerificationMethod {
24141 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24142 f.write_str(self.as_str())
24143 }
24144}
24145
24146impl From<&str> for TenantCustomDomainVerificationMethod {
24147 fn from(value: &str) -> Self {
24148 match value {
24149 "cname" => Self::Cname,
24150 other => Self::Other(other.to_string()),
24151 }
24152 }
24153}
24154
24155#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24158pub struct TenantInbox {
24159 pub generated_at: String,
24160 pub counts: TenantInboxCounts,
24164 pub items: Vec<InboxItem>,
24165 pub scanned: i64,
24167 #[serde(default, skip_serializing_if = "Option::is_none")]
24171 pub truncated: Option<bool>,
24172}
24173
24174#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24178pub struct TenantInboxCounts {
24179 pub total: i64,
24180 pub approval: i64,
24181 pub input: i64,
24182 pub paused: i64,
24183 pub failed: i64,
24184}
24185
24186#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24188pub struct TenantMefConfigResponse {
24189 pub tenant_id: String,
24190 #[serde(default)]
24192 pub mef_config: Option<TenantMefConfigResponseMefConfig>,
24193 pub effective: TenantMefConfigResponseEffective,
24196}
24197
24198#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24201pub struct TenantMefConfigResponseEffective {
24202 pub enabled: bool,
24203 pub planner_enabled: bool,
24204 pub judge_enabled: bool,
24205 pub auto_classify: bool,
24206}
24207
24208#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24210pub struct TenantMefConfigResponseMefConfig {
24211 #[serde(default, skip_serializing_if = "Option::is_none")]
24212 pub enabled: Option<bool>,
24213 #[serde(default, skip_serializing_if = "Option::is_none")]
24214 pub planner_enabled: Option<bool>,
24215 #[serde(default, skip_serializing_if = "Option::is_none")]
24216 pub judge_enabled: Option<bool>,
24217 #[serde(default, skip_serializing_if = "Option::is_none")]
24218 pub auto_classify: Option<bool>,
24219}
24220
24221#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24224pub struct TenantOverview {
24225 pub generated_at: String,
24226 pub fleet: TenantOverviewFleet,
24227 pub runs: TenantOverviewRuns,
24228 pub approvals: TenantOverviewApprovals,
24229 #[serde(default, skip_serializing_if = "Option::is_none")]
24232 pub usage: Option<TenantOverviewUsage>,
24233 #[serde(default, skip_serializing_if = "Option::is_none")]
24236 pub cost: Option<TenantOverviewCost>,
24237 #[serde(default, skip_serializing_if = "Option::is_none")]
24240 pub system: Option<TenantOverviewSystem>,
24241 pub schedules: TenantOverviewSchedules,
24242}
24243
24244#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24246pub struct TenantOverviewApprovals {
24247 pub pending_count: i64,
24248}
24249
24250#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24253pub struct TenantOverviewCost {
24254 pub total_usd: f64,
24255 pub range_days: i64,
24256}
24257
24258#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24260pub struct TenantOverviewFleet {
24261 pub total: i64,
24262 pub active_agents: i64,
24263 pub suspended: i64,
24264 pub terminated: i64,
24265 #[serde(default, skip_serializing_if = "Option::is_none")]
24268 pub by_execution_mode: Option<TenantOverviewFleetByExecutionMode>,
24269 #[serde(default, skip_serializing_if = "Option::is_none")]
24272 pub bridge: Option<TenantOverviewFleetBridge>,
24273 #[serde(default, skip_serializing_if = "Option::is_none")]
24276 pub head_agent_id: Option<String>,
24277 pub top_by_runs: Vec<AgentAnalyticsRow>,
24278 #[serde(default, skip_serializing_if = "Option::is_none")]
24281 pub top_by_cost: Option<Vec<AgentAnalyticsRow>>,
24282 pub last_run_at: serde_json::Map<String, serde_json::Value>,
24284}
24285
24286#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24289pub struct TenantOverviewFleetBridge {
24290 pub online: i64,
24291 pub stale: i64,
24292 pub offline: i64,
24293 pub machines_total: i64,
24294}
24295
24296#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24299pub struct TenantOverviewFleetByExecutionMode {
24300 pub cloud: i64,
24301 pub bridge: i64,
24302}
24303
24304#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24306pub struct TenantOverviewRuns {
24307 pub by_status: serde_json::Map<String, serde_json::Value>,
24308 pub active_count: i64,
24310 pub failed_24h: i64,
24311 #[serde(default, skip_serializing_if = "Option::is_none")]
24314 pub cost_24h_usd: Option<f64>,
24315 pub recent: Vec<TenantOverviewRunsRecentItem>,
24316 pub scanned: i64,
24319}
24320
24321#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24323pub struct TenantOverviewRunsRecentItem {
24324 pub run_id: String,
24325 pub agent_id: String,
24326 pub status: String,
24327 #[serde(default, skip_serializing_if = "Option::is_none")]
24328 pub created_at: Option<String>,
24329 #[serde(default, skip_serializing_if = "Option::is_none")]
24330 pub cost_usd: Option<f64>,
24331 #[serde(default, skip_serializing_if = "Option::is_none")]
24332 pub duration_ms: Option<i64>,
24333 #[serde(default, skip_serializing_if = "Option::is_none")]
24335 pub error: Option<String>,
24336 #[serde(default, skip_serializing_if = "Option::is_none")]
24341 pub error_code: Option<String>,
24342 #[serde(default, skip_serializing_if = "Option::is_none")]
24345 pub error_details: Option<serde_json::Map<String, serde_json::Value>>,
24346 #[serde(default, skip_serializing_if = "Option::is_none")]
24351 pub execution_mode: Option<RunExecutionMode>,
24352}
24353
24354#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24356pub struct TenantOverviewSchedules {
24357 pub total: i64,
24358 #[serde(default, skip_serializing_if = "Option::is_none")]
24362 pub at_risk: Option<i64>,
24363 pub paused: i64,
24364}
24365
24366#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24369pub struct TenantOverviewSystem {
24370 pub healthy: bool,
24372 pub kv: bool,
24373 pub workers_active: i64,
24374 pub workers_queued: i64,
24375 pub cron_registered: i64,
24376}
24377
24378#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24381pub struct TenantOverviewUsage {
24382 pub tokens_used: i64,
24383 pub runs_used: i64,
24384 pub cost_mtd_usd: f64,
24385}
24386
24387#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24389pub struct TenantPublicSettings {
24390 #[serde(default, skip_serializing_if = "Option::is_none")]
24391 pub max_messages_per_session: Option<i64>,
24392 #[serde(default, skip_serializing_if = "Option::is_none")]
24393 pub max_tokens_per_session: Option<i64>,
24394 #[serde(default, skip_serializing_if = "Option::is_none")]
24395 pub allow_tool_calls: Option<bool>,
24396 #[serde(default, skip_serializing_if = "Option::is_none")]
24397 pub allow_file_uploads: Option<bool>,
24398 #[serde(default, skip_serializing_if = "Option::is_none")]
24399 pub rate_limit_per_ip_per_hour: Option<i64>,
24400 #[serde(default, skip_serializing_if = "Option::is_none")]
24401 pub require_auth: Option<bool>,
24402}
24403
24404#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24407pub struct TenantQuotaOverrides {
24408 #[serde(default, skip_serializing_if = "Option::is_none")]
24409 pub max_agents: Option<i64>,
24410 #[serde(default, skip_serializing_if = "Option::is_none")]
24411 pub max_teams: Option<i64>,
24412 #[serde(default, skip_serializing_if = "Option::is_none")]
24413 pub max_workers_per_team: Option<i64>,
24414 #[serde(default, skip_serializing_if = "Option::is_none")]
24415 pub max_concurrent_runs: Option<i64>,
24416 #[serde(default, skip_serializing_if = "Option::is_none")]
24417 pub max_concurrent_team_runs: Option<i64>,
24418 #[serde(default, skip_serializing_if = "Option::is_none")]
24419 pub max_active_sessions: Option<i64>,
24420 #[serde(default, skip_serializing_if = "Option::is_none")]
24421 pub max_monthly_tokens: Option<i64>,
24422 #[serde(default, skip_serializing_if = "Option::is_none")]
24423 pub max_monthly_tool_calls: Option<i64>,
24424 #[serde(default, skip_serializing_if = "Option::is_none")]
24425 pub max_monthly_runs: Option<i64>,
24426 #[serde(default, skip_serializing_if = "Option::is_none")]
24427 pub max_mcp_servers: Option<i64>,
24428 #[serde(default, skip_serializing_if = "Option::is_none")]
24429 pub max_storage_bytes: Option<i64>,
24430 #[serde(default, skip_serializing_if = "Option::is_none")]
24431 pub max_memory_entries_per_agent: Option<i64>,
24432 #[serde(default, skip_serializing_if = "Option::is_none")]
24433 pub max_memory_storage_bytes: Option<i64>,
24434 #[serde(default, skip_serializing_if = "Option::is_none")]
24435 pub max_agent_versions: Option<i64>,
24436 #[serde(default, skip_serializing_if = "Option::is_none")]
24437 pub max_knowledge_bases: Option<i64>,
24438 #[serde(default, skip_serializing_if = "Option::is_none")]
24439 pub max_workspaces: Option<i64>,
24440 #[serde(default, skip_serializing_if = "Option::is_none")]
24441 pub max_daily_tool_calls: Option<i64>,
24442 #[serde(default, skip_serializing_if = "Option::is_none")]
24443 pub max_monthly_images: Option<i64>,
24444 #[serde(default, skip_serializing_if = "Option::is_none")]
24445 pub max_daily_images: Option<i64>,
24446 #[serde(default, skip_serializing_if = "Option::is_none")]
24447 pub max_monthly_videos: Option<i64>,
24448}
24449
24450#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24452pub struct TenantQuotas {
24453 pub max_agents: i64,
24454 pub max_teams: i64,
24455 pub max_workers_per_team: i64,
24456 pub max_concurrent_runs: i64,
24457 pub max_concurrent_team_runs: i64,
24458 pub max_active_sessions: i64,
24459 pub max_monthly_tokens: i64,
24460 pub max_monthly_tool_calls: i64,
24461 pub max_monthly_runs: i64,
24462 pub max_mcp_servers: i64,
24463 pub max_storage_bytes: i64,
24464 pub max_memory_entries_per_agent: i64,
24465 pub max_memory_storage_bytes: i64,
24466 pub max_agent_versions: i64,
24467 pub max_knowledge_bases: i64,
24468 pub max_workspaces: i64,
24469 #[serde(default, skip_serializing_if = "Option::is_none")]
24470 pub max_daily_tool_calls: Option<i64>,
24471 #[serde(default, skip_serializing_if = "Option::is_none")]
24472 pub max_monthly_images: Option<i64>,
24473 #[serde(default, skip_serializing_if = "Option::is_none")]
24474 pub max_daily_images: Option<i64>,
24475 #[serde(default, skip_serializing_if = "Option::is_none")]
24476 pub max_monthly_videos: Option<i64>,
24477}
24478
24479#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24496pub struct TenantSocialLinks {
24497 #[serde(default, skip_serializing_if = "Option::is_none")]
24498 pub website: Option<String>,
24499 #[serde(default, skip_serializing_if = "Option::is_none")]
24500 pub twitter: Option<String>,
24501 #[serde(default, skip_serializing_if = "Option::is_none")]
24502 pub github: Option<String>,
24503 #[serde(default, skip_serializing_if = "Option::is_none")]
24504 pub linkedin: Option<String>,
24505 #[serde(default, skip_serializing_if = "Option::is_none")]
24506 pub discord: Option<String>,
24507 #[serde(default, skip_serializing_if = "Option::is_none")]
24508 pub telegram: Option<String>,
24509 #[serde(default, skip_serializing_if = "Option::is_none")]
24510 pub youtube: Option<String>,
24511 #[serde(default, skip_serializing_if = "Option::is_none")]
24512 pub instagram: Option<String>,
24513 #[serde(default, skip_serializing_if = "Option::is_none")]
24514 pub facebook: Option<String>,
24515 #[serde(default, skip_serializing_if = "Option::is_none")]
24516 pub tiktok: Option<String>,
24517 #[serde(default, skip_serializing_if = "Option::is_none")]
24518 pub custom: Option<Vec<TenantSocialLinksCustomItem>>,
24519}
24520
24521#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24523pub struct TenantSocialLinksCustomItem {
24524 pub label: String,
24525 pub url: String,
24526}
24527
24528#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24530pub enum TenantStatus {
24531 #[default]
24532 #[serde(rename = "active")]
24533 Active,
24534 #[serde(rename = "suspended")]
24535 Suspended,
24536 #[serde(rename = "trial")]
24537 Trial,
24538 #[serde(rename = "deleted")]
24539 Deleted,
24540 #[serde(rename = "waitlisted")]
24541 Waitlisted,
24542 #[serde(untagged)]
24544 Other(String),
24545}
24546
24547impl TenantStatus {
24548 pub fn as_str(&self) -> &str {
24550 match self {
24551 Self::Active => "active",
24552 Self::Suspended => "suspended",
24553 Self::Trial => "trial",
24554 Self::Deleted => "deleted",
24555 Self::Waitlisted => "waitlisted",
24556 Self::Other(value) => value.as_str(),
24557 }
24558 }
24559}
24560
24561impl std::fmt::Display for TenantStatus {
24562 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24563 f.write_str(self.as_str())
24564 }
24565}
24566
24567impl From<&str> for TenantStatus {
24568 fn from(value: &str) -> Self {
24569 match value {
24570 "active" => Self::Active,
24571 "suspended" => Self::Suspended,
24572 "trial" => Self::Trial,
24573 "deleted" => Self::Deleted,
24574 "waitlisted" => Self::Waitlisted,
24575 other => Self::Other(other.to_string()),
24576 }
24577 }
24578}
24579
24580#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24582pub struct TenantTrial {
24583 pub active: bool,
24584 #[serde(default)]
24585 pub ends_at: Option<String>,
24586 pub days_left: i64,
24587 #[serde(default)]
24588 pub recommended_plan: Option<String>,
24589}
24590
24591#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24593pub struct TenantUser {
24594 #[serde(default, skip_serializing_if = "Option::is_none")]
24595 pub avatar_url: Option<String>,
24596 #[serde(default, skip_serializing_if = "Option::is_none")]
24597 pub last_login_at: Option<String>,
24598 #[serde(default, skip_serializing_if = "Option::is_none")]
24599 pub created_at: Option<String>,
24600 #[serde(default, skip_serializing_if = "Option::is_none")]
24601 pub email: Option<String>,
24602 #[serde(default, skip_serializing_if = "Option::is_none")]
24603 pub id: Option<String>,
24604 #[serde(default, skip_serializing_if = "Option::is_none")]
24605 pub name: Option<String>,
24606 #[serde(default, skip_serializing_if = "Option::is_none")]
24607 pub role: Option<String>,
24608 #[serde(default, skip_serializing_if = "Option::is_none")]
24609 pub status: Option<String>,
24610 #[serde(default, skip_serializing_if = "Option::is_none")]
24611 pub tenant_id: Option<String>,
24612 #[serde(default, skip_serializing_if = "Option::is_none")]
24613 pub updated_at: Option<String>,
24614}
24615
24616#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24618pub struct TerminateAgentResponse {
24619 #[serde(default, skip_serializing_if = "Option::is_none")]
24620 pub deleted: Option<bool>,
24621 #[serde(default, skip_serializing_if = "Option::is_none")]
24622 pub agent_id: Option<String>,
24623}
24624
24625#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24627pub struct TestAdminSmtpConfigRequest {
24628 pub to: String,
24629}
24630
24631#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24633pub struct TestAdminSmtpConfigResponse {
24634 pub ok: bool,
24635 pub sent_to: String,
24636}
24637
24638#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24640pub struct TestAdminStripeConfigResponseVariant1 {
24641 pub ok: bool,
24642 pub account_id: String,
24645 pub livemode: bool,
24649 #[serde(default, skip_serializing_if = "Option::is_none")]
24650 pub business_name: Option<String>,
24651 pub country: String,
24652 pub default_currency: String,
24653 pub active_key_matches: bool,
24658 #[serde(default, skip_serializing_if = "Option::is_none")]
24661 pub warning: Option<String>,
24662}
24663
24664#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24666pub struct TestAdminStripeConfigResponseVariant2 {
24667 pub ok: bool,
24668 pub error: String,
24669 #[serde(default, skip_serializing_if = "Option::is_none")]
24671 pub status: Option<i64>,
24672}
24673
24674#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24676pub struct TestAgentIntegrationResponse {
24677 pub success: bool,
24680 #[serde(default, skip_serializing_if = "Option::is_none")]
24682 pub message: Option<String>,
24683}
24684
24685#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24687pub struct TestIntegrationResponse {
24688 #[serde(default, skip_serializing_if = "Option::is_none")]
24689 pub success: Option<bool>,
24690 #[serde(default, skip_serializing_if = "Option::is_none")]
24691 pub message: Option<String>,
24692}
24693
24694#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24696pub struct TestLLMProviderKeyResponse {
24697 pub success: bool,
24700 #[serde(default, skip_serializing_if = "Option::is_none")]
24702 pub message: Option<String>,
24703}
24704
24705#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24707pub struct TestNotificationTargetResponse {
24708 pub ok: bool,
24709 pub message: String,
24710}
24711
24712#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24714pub struct TestWebhookResponse {
24715 pub test_sent: bool,
24716 pub webhook_id: String,
24717 pub event_type: String,
24719}
24720
24721#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24723pub struct Todo {
24724 pub todo_id: String,
24725 pub session_id: String,
24726 pub tenant_id: String,
24727 pub title: String,
24728 #[serde(default, skip_serializing_if = "Option::is_none")]
24729 pub instructions: Option<String>,
24730 #[serde(default, skip_serializing_if = "Option::is_none")]
24731 pub due_at: Option<String>,
24732 #[serde(default, skip_serializing_if = "Option::is_none")]
24733 pub assign_agent_id: Option<String>,
24734 #[serde(default, skip_serializing_if = "Option::is_none")]
24735 pub assign_team_id: Option<String>,
24736 pub status: TodoStatus,
24737 pub created_at: String,
24738 pub updated_at: String,
24739 #[serde(default, skip_serializing_if = "Option::is_none")]
24740 pub run_id: Option<String>,
24741 #[serde(default, skip_serializing_if = "Option::is_none")]
24742 pub team_run_id: Option<String>,
24743 #[serde(default, skip_serializing_if = "Option::is_none")]
24744 pub recurrence: Option<TodoRecurrence>,
24745 #[serde(default, skip_serializing_if = "Option::is_none")]
24746 pub next_fire_at: Option<String>,
24747 #[serde(default, skip_serializing_if = "Option::is_none")]
24748 pub last_fired_at: Option<String>,
24749 #[serde(default, skip_serializing_if = "Option::is_none")]
24750 pub last_run_status: Option<String>,
24751 #[serde(default, skip_serializing_if = "Option::is_none")]
24752 pub require_confirmation: Option<bool>,
24753 #[serde(default, skip_serializing_if = "Option::is_none")]
24754 pub delivery: Option<TodoDelivery>,
24755 #[serde(default, skip_serializing_if = "Option::is_none")]
24756 pub order_index: Option<i64>,
24757 #[serde(default, skip_serializing_if = "Option::is_none")]
24758 pub parent_task_id: Option<String>,
24759 #[serde(default, skip_serializing_if = "Option::is_none")]
24761 pub agent_name: Option<String>,
24762}
24763
24764#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24766pub struct TodoDelivery {
24767 pub channels: Vec<TodoDeliveryChannel>,
24768 #[serde(default, skip_serializing_if = "Option::is_none")]
24769 pub target: Option<String>,
24770}
24771
24772#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24774pub enum TodoDeliveryChannel {
24775 #[default]
24776 #[serde(rename = "email")]
24777 Email,
24778 #[serde(rename = "telegram")]
24779 Telegram,
24780 #[serde(rename = "whatsapp")]
24781 Whatsapp,
24782 #[serde(untagged)]
24784 Other(String),
24785}
24786
24787impl TodoDeliveryChannel {
24788 pub fn as_str(&self) -> &str {
24790 match self {
24791 Self::Email => "email",
24792 Self::Telegram => "telegram",
24793 Self::Whatsapp => "whatsapp",
24794 Self::Other(value) => value.as_str(),
24795 }
24796 }
24797}
24798
24799impl std::fmt::Display for TodoDeliveryChannel {
24800 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24801 f.write_str(self.as_str())
24802 }
24803}
24804
24805impl From<&str> for TodoDeliveryChannel {
24806 fn from(value: &str) -> Self {
24807 match value {
24808 "email" => Self::Email,
24809 "telegram" => Self::Telegram,
24810 "whatsapp" => Self::Whatsapp,
24811 other => Self::Other(other.to_string()),
24812 }
24813 }
24814}
24815
24816#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24818pub struct TodoRecurrence {
24819 pub cron: String,
24820 #[serde(default, skip_serializing_if = "Option::is_none")]
24821 pub timezone: Option<String>,
24822}
24823
24824#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24826pub enum TodoStatus {
24827 #[default]
24828 #[serde(rename = "pending")]
24829 Pending,
24830 #[serde(rename = "pending_confirmation")]
24831 PendingConfirmation,
24832 #[serde(rename = "in_progress")]
24833 InProgress,
24834 #[serde(rename = "done")]
24835 Done,
24836 #[serde(rename = "cancelled")]
24837 Cancelled,
24838 #[serde(untagged)]
24840 Other(String),
24841}
24842
24843impl TodoStatus {
24844 pub fn as_str(&self) -> &str {
24846 match self {
24847 Self::Pending => "pending",
24848 Self::PendingConfirmation => "pending_confirmation",
24849 Self::InProgress => "in_progress",
24850 Self::Done => "done",
24851 Self::Cancelled => "cancelled",
24852 Self::Other(value) => value.as_str(),
24853 }
24854 }
24855}
24856
24857impl std::fmt::Display for TodoStatus {
24858 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24859 f.write_str(self.as_str())
24860 }
24861}
24862
24863impl From<&str> for TodoStatus {
24864 fn from(value: &str) -> Self {
24865 match value {
24866 "pending" => Self::Pending,
24867 "pending_confirmation" => Self::PendingConfirmation,
24868 "in_progress" => Self::InProgress,
24869 "done" => Self::Done,
24870 "cancelled" => Self::Cancelled,
24871 other => Self::Other(other.to_string()),
24872 }
24873 }
24874}
24875
24876#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24878pub struct ToolBreakdownEntry {
24879 pub name: String,
24880 pub count: i64,
24881}
24882
24883#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24885pub struct ToolOverride {
24886 #[serde(default, skip_serializing_if = "Option::is_none")]
24887 pub category: Option<String>,
24888 #[serde(default, skip_serializing_if = "Option::is_none")]
24889 pub description: Option<String>,
24890 #[serde(default, skip_serializing_if = "Option::is_none")]
24893 pub hidden: Option<bool>,
24894}
24895
24896#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24898pub struct TrafficSplitEntry {
24899 pub version: i64,
24900 pub weight: f64,
24901}
24902
24903#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24905pub struct TransferTenantOwnershipResponse {
24906 pub transferred: bool,
24907 pub new_owner: String,
24908 pub previous_owner: String,
24909}
24910
24911#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24914pub struct TrashManifestEntry {
24915 pub trash_path: String,
24916 pub original_path: String,
24917 pub original_workspace_id: String,
24918 pub original_agent_id: String,
24919 pub trashed_by: String,
24920 pub trashed_at: String,
24921 #[serde(default, skip_serializing_if = "Option::is_none")]
24922 pub reason: Option<String>,
24923}
24924
24925#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24927pub struct UnassignWorkspaceRequest {
24928 #[serde(default, skip_serializing_if = "Option::is_none")]
24929 pub agent_id: Option<String>,
24930 #[serde(default, skip_serializing_if = "Option::is_none")]
24931 pub team_id: Option<String>,
24932 #[serde(default, skip_serializing_if = "Option::is_none")]
24933 pub company_id: Option<String>,
24934}
24935
24936#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24938pub struct UnlinkAuthProviderResponse {
24939 pub ok: bool,
24940 pub provider: String,
24941 #[serde(default, skip_serializing_if = "Option::is_none")]
24942 pub remaining_factors: Option<i64>,
24943 #[serde(default, skip_serializing_if = "Option::is_none")]
24944 pub already_unlinked: Option<bool>,
24945}
24946
24947#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24949pub struct UnscheduleCanvasWorkflowResponse {
24950 pub trigger_id: String,
24951 pub status: UnscheduleCanvasWorkflowResponseStatus,
24952}
24953
24954#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
24956pub enum UnscheduleCanvasWorkflowResponseStatus {
24957 #[default]
24958 #[serde(rename = "removed")]
24959 Removed,
24960 #[serde(untagged)]
24962 Other(String),
24963}
24964
24965impl UnscheduleCanvasWorkflowResponseStatus {
24966 pub fn as_str(&self) -> &str {
24968 match self {
24969 Self::Removed => "removed",
24970 Self::Other(value) => value.as_str(),
24971 }
24972 }
24973}
24974
24975impl std::fmt::Display for UnscheduleCanvasWorkflowResponseStatus {
24976 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24977 f.write_str(self.as_str())
24978 }
24979}
24980
24981impl From<&str> for UnscheduleCanvasWorkflowResponseStatus {
24982 fn from(value: &str) -> Self {
24983 match value {
24984 "removed" => Self::Removed,
24985 other => Self::Other(other.to_string()),
24986 }
24987 }
24988}
24989
24990#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
24992pub struct UnsubscribeFromListingResponse {
24993 #[serde(default, skip_serializing_if = "Option::is_none")]
24994 pub unsubscribed: Option<bool>,
24995 #[serde(default, skip_serializing_if = "Option::is_none")]
24996 pub listing_id: Option<String>,
24997}
24998
24999#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25001pub struct UnsuspendUserResponse {
25002 pub unsuspended: bool,
25003 pub user_id: String,
25004}
25005
25006#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25008pub struct UpdateACPSessionResponse {
25009 pub saved: bool,
25010 #[serde(rename = "sessionId")]
25014 pub session_id: String,
25015 #[serde(rename = "session_id")]
25016 pub session_id_: String,
25017}
25018
25019#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25021pub struct UpdateAdminAgentMemoryConfigResponse {
25022 pub agent_memory: UpdateAdminAgentMemoryConfigResponseAgentMemory,
25023 pub updated: bool,
25024}
25025
25026#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25028pub struct UpdateAdminAgentMemoryConfigResponseAgentMemory {
25029 pub enabled: bool,
25030 pub use_shared_store: bool,
25031 pub default_max_entries: i64,
25032 pub default_retrieval_limit: i64,
25033 pub default_retrieval_strategy: String,
25034 pub decay_enabled: bool,
25035 pub decay_half_life_days: i64,
25036 pub decay_job_interval_ms: i64,
25037 pub extraction_max_tokens: i64,
25038 pub extraction_model: String,
25039 pub eviction_threshold: i64,
25040 pub embedding_dimensions: i64,
25041 pub embedding_provider: String,
25042 pub embedding_model: String,
25043 pub compression_model: String,
25044}
25045
25046#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25048pub struct UpdateAdminAuthConfigResponse {
25049 pub auth: UpdateAdminAuthConfigResponseAuth,
25050 pub updated: bool,
25051}
25052
25053#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25055pub struct UpdateAdminAuthConfigResponseAuth {
25056 pub super_admin_email: String,
25057 pub otp_ttl_ms: i64,
25058 pub verification_ttl_ms: i64,
25059 pub jwks_cache_ttl_ms: i64,
25060 pub jwks_grace_ttl_ms: i64,
25061 pub api_key_cache_ttl_s: i64,
25062 pub api_key_rotation_grace_period_h: i64,
25063}
25064
25065#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25067pub struct UpdateAdminBackpressureConfigResponse {
25068 pub backpressure: UpdateAdminBackpressureConfigResponseBackpressure,
25069 pub updated: bool,
25070}
25071
25072#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25074pub struct UpdateAdminBackpressureConfigResponseBackpressure {
25075 pub sse_buffer_max: i64,
25076 pub sse_high_watermark: i64,
25077 pub sse_low_watermark: i64,
25078 pub tool_queue_max_depth: i64,
25079 pub tool_queue_high_watermark: i64,
25080}
25081
25082#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25084pub struct UpdateAdminBlogConfigRequest {
25085 #[serde(default, skip_serializing_if = "Option::is_none")]
25086 pub enabled: Option<bool>,
25087 #[serde(default, skip_serializing_if = "Option::is_none")]
25088 pub title: Option<String>,
25089 #[serde(default, skip_serializing_if = "Option::is_none")]
25090 pub description: Option<String>,
25091 #[serde(default, skip_serializing_if = "Option::is_none")]
25093 pub agent_id: Option<String>,
25094 #[serde(default, skip_serializing_if = "Option::is_none")]
25096 pub frequency: Option<BlogConfigFrequency>,
25097 #[serde(default, skip_serializing_if = "Option::is_none")]
25098 pub schedule_hour: Option<i64>,
25099 #[serde(default, skip_serializing_if = "Option::is_none")]
25101 pub schedule_weekday: Option<i64>,
25102 #[serde(default, skip_serializing_if = "Option::is_none")]
25103 pub topic_prompt: Option<String>,
25104 #[serde(default, skip_serializing_if = "Option::is_none")]
25105 pub conditions: Option<String>,
25106 #[serde(default, skip_serializing_if = "Option::is_none")]
25107 pub auto_publish: Option<bool>,
25108}
25109
25110#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25112pub struct UpdateAdminBlogConfigResponse {
25113 pub config: BlogConfig,
25114}
25115
25116#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25118pub struct UpdateAdminBlogPostRequest {
25119 #[serde(default, skip_serializing_if = "Option::is_none")]
25120 pub title: Option<String>,
25121 #[serde(default, skip_serializing_if = "Option::is_none")]
25122 pub body: Option<String>,
25123 #[serde(default, skip_serializing_if = "Option::is_none")]
25124 pub tags: Option<Vec<String>>,
25125 #[serde(default, skip_serializing_if = "Option::is_none")]
25126 pub status: Option<BlogPostStatus>,
25127}
25128
25129#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25131pub struct UpdateAdminBlogPostResponse {
25132 pub post: BlogPost,
25133}
25134
25135#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25137pub struct UpdateAdminCodeInterpreterConfigResponse {
25138 pub code_interpreter: UpdateAdminCodeInterpreterConfigResponseCodeInterpreter,
25139 pub updated: bool,
25140}
25141
25142#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25144pub struct UpdateAdminCodeInterpreterConfigResponseCodeInterpreter {
25145 pub isolation: String,
25146 #[serde(default, skip_serializing_if = "Option::is_none")]
25147 pub timeout_ms: Option<i64>,
25148 #[serde(default, skip_serializing_if = "Option::is_none")]
25149 pub max_memory_mb: Option<i64>,
25150 #[serde(default, skip_serializing_if = "Option::is_none")]
25151 pub container_image: Option<String>,
25152 #[serde(default, skip_serializing_if = "Option::is_none")]
25153 pub python_container_image: Option<String>,
25154 #[serde(default, skip_serializing_if = "Option::is_none")]
25155 pub python_sandbox_host_dir: Option<String>,
25156}
25157
25158#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25160pub struct UpdateAdminDisabledToolsResponse {
25161 pub ok: bool,
25162 pub disabled_tools: Vec<String>,
25163}
25164
25165#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25167pub struct UpdateAdminEvaluationConfigResponse {
25168 pub evaluation: UpdateAdminEvaluationConfigResponseEvaluation,
25169 pub updated: bool,
25170}
25171
25172#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25174pub struct UpdateAdminEvaluationConfigResponseEvaluation {
25175 pub enabled: bool,
25176 pub max_concurrent_eval_cases: i64,
25177 pub regression_threshold: f64,
25178 pub default_scorers: Vec<String>,
25179 pub max_cases_per_dataset: i64,
25180 pub eval_run_timeout_ms: i64,
25181 pub auto_rollback_enabled: bool,
25182}
25183
25184#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25186pub struct UpdateAdminFounderConfigRequest {
25187 #[serde(default, skip_serializing_if = "Option::is_none")]
25188 pub founder_id: Option<String>,
25189 #[serde(default, skip_serializing_if = "Option::is_none")]
25190 pub founder_name: Option<String>,
25191 #[serde(default, skip_serializing_if = "Option::is_none")]
25192 pub founder_public_key: Option<String>,
25193}
25194
25195#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25197pub struct UpdateAdminGuardrailsResponse {
25198 #[serde(default, skip_serializing_if = "Option::is_none")]
25199 pub guardrails: Option<Vec<GuardrailConfigItem>>,
25200 pub updated: bool,
25201}
25202
25203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25205pub struct UpdateAdminIdempotencyConfigResponse {
25206 pub idempotency: UpdateAdminIdempotencyConfigResponseIdempotency,
25207 pub updated: bool,
25208}
25209
25210#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25212pub struct UpdateAdminIdempotencyConfigResponseIdempotency {
25213 pub enabled: bool,
25214 pub ttl_hours: i64,
25215 pub max_response_cache_bytes: i64,
25216}
25217
25218#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25220pub struct UpdateAdminIntegrationsResponse {
25221 pub integrations: Vec<UpdateAdminIntegrationsResponseIntegration>,
25222 pub updated: bool,
25223}
25224
25225#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25227pub struct UpdateAdminIntegrationsResponseIntegration {
25228 pub id: String,
25229 pub name: String,
25230 #[serde(default, skip_serializing_if = "Option::is_none")]
25231 pub icon: Option<String>,
25232 #[serde(default, skip_serializing_if = "Option::is_none")]
25233 pub auth_type: Option<AdminIntegrationsConfigIntegrationAuthType>,
25234 #[serde(default, skip_serializing_if = "Option::is_none")]
25235 pub category: Option<String>,
25236 pub enabled: bool,
25237 #[serde(default, skip_serializing_if = "Option::is_none")]
25238 pub beta: Option<bool>,
25239 #[serde(default, skip_serializing_if = "Option::is_none")]
25241 pub source: Option<String>,
25242}
25243
25244#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25246pub struct UpdateAdminLLMAdaptersConfigResponse {
25247 pub llm_adapters: UpdateAdminLLMAdaptersConfigResponseLLMAdapters,
25248 pub updated: bool,
25249}
25250
25251#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25253pub struct UpdateAdminLLMAdaptersConfigResponseLLMAdapters {
25254 #[serde(default, skip_serializing_if = "Option::is_none")]
25255 pub max_retries: Option<i64>,
25256 #[serde(default, skip_serializing_if = "Option::is_none")]
25257 pub retry_base_delay_ms: Option<i64>,
25258 #[serde(default, skip_serializing_if = "Option::is_none")]
25259 pub retry_max_delay_ms: Option<i64>,
25260 #[serde(default, skip_serializing_if = "Option::is_none")]
25261 pub stream_empty_timeout_ms: Option<i64>,
25262 #[serde(default, skip_serializing_if = "Option::is_none")]
25263 pub circuit_breaker: Option<UpdateAdminLLMAdaptersConfigResponseLLMAdaptersCircuitBreaker>,
25264 #[serde(default, skip_serializing_if = "Option::is_none")]
25265 pub provider_rate_limits: Option<serde_json::Map<String, serde_json::Value>>,
25266}
25267
25268#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25270pub struct UpdateAdminLLMAdaptersConfigResponseLLMAdaptersCircuitBreaker {
25271 #[serde(default, skip_serializing_if = "Option::is_none")]
25272 pub failure_threshold: Option<i64>,
25273 #[serde(default, skip_serializing_if = "Option::is_none")]
25274 pub reset_timeout_ms: Option<i64>,
25275 #[serde(default, skip_serializing_if = "Option::is_none")]
25276 pub half_open_max_requests: Option<i64>,
25277}
25278
25279#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25281pub struct UpdateAdminLoggingConfigResponse {
25282 pub logging: UpdateAdminLoggingConfigResponseLogging,
25283 pub updated: bool,
25284}
25285
25286#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25288pub struct UpdateAdminLoggingConfigResponseLogging {
25289 pub pii_mode: String,
25290 pub log_agent_responses: bool,
25291 pub file_enabled: bool,
25292 pub file_max_size_mb: i64,
25293 pub file_retention_days: i64,
25294 pub file_level: String,
25295 pub file_separate_error: bool,
25296 pub activity_log_verbosity: String,
25297}
25298
25299#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25301pub struct UpdateAdminLongRunningConfigResponse {
25302 pub long_running: UpdateAdminLongRunningConfigResponseLongRunning,
25303 pub updated: bool,
25304}
25305
25306#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25308pub struct UpdateAdminLongRunningConfigResponseLongRunning {
25309 pub enabled: bool,
25310 pub max_duration_ms: i64,
25311 pub checkpoint_interval_ms: i64,
25312 pub idle_timeout_ms: i64,
25313 pub continuation_token_ttl_days: i64,
25314 pub max_background_runs_per_tenant: i64,
25315}
25316
25317#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25319pub struct UpdateAdminMCPConfigResponse {
25320 pub mcp: UpdateAdminMCPConfigResponseMCP,
25321 pub updated: bool,
25322}
25323
25324#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25326pub struct UpdateAdminMCPConfigResponseMCP {
25327 pub max_sessions_per_server: i64,
25328 pub max_total_stdio_sessions: i64,
25329 pub session_idle_timeout_ms: i64,
25330}
25331
25332#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25334pub struct UpdateAdminMultimodalConfigResponse {
25335 pub multimodal: UpdateAdminMultimodalConfigResponseMultimodal,
25336 pub updated: bool,
25337}
25338
25339#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25341pub struct UpdateAdminMultimodalConfigResponseMultimodal {
25342 pub enabled: bool,
25343 pub max_image_size_bytes: i64,
25344 pub max_audio_duration_s: i64,
25345 pub max_video_duration_s: i64,
25346 pub auto_resize_images: bool,
25347 pub supported_image_formats: Vec<String>,
25348 pub supported_audio_formats: Vec<String>,
25349}
25350
25351#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25353pub struct UpdateAdminOAuthIdentityConfigRequest {
25354 #[serde(default, skip_serializing_if = "Option::is_none")]
25355 pub apple_services_id: Option<String>,
25356 #[serde(default, skip_serializing_if = "Option::is_none")]
25357 pub apple_team_id: Option<String>,
25358 #[serde(default, skip_serializing_if = "Option::is_none")]
25359 pub apple_bundle_id: Option<String>,
25360 #[serde(default, skip_serializing_if = "Option::is_none")]
25361 pub oauth_return_to_hosts: Option<Vec<String>>,
25362}
25363
25364#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25366pub struct UpdateAdminPersistenceConfigResponse {
25367 pub persistence: UpdateAdminPersistenceConfigResponsePersistence,
25368 pub updated: bool,
25369}
25370
25371#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25373pub struct UpdateAdminPersistenceConfigResponsePersistence {
25374 pub snapshot_every_n_events: i64,
25375 pub checkpoint_after_tool_calls: bool,
25376 pub usage_shards: i64,
25377 pub auto_cap_kv_values: bool,
25378}
25379
25380#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25382pub struct UpdateAdminPlansRequest {
25383 #[serde(default, skip_serializing_if = "Option::is_none")]
25384 pub plans: Option<serde_json::Map<String, serde_json::Value>>,
25385}
25386
25387#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25389pub struct UpdateAdminPlansResponse {
25390 #[serde(default, skip_serializing_if = "Option::is_none")]
25391 pub plans: Option<serde_json::Map<String, serde_json::Value>>,
25392 #[serde(default, skip_serializing_if = "Option::is_none")]
25393 pub updated: Option<bool>,
25394}
25395
25396#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25398pub struct UpdateAdminPricingResponse {
25399 pub pricing: UpdateAdminPricingResponsePricing,
25400 pub updated: bool,
25401}
25402
25403#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25405pub struct UpdateAdminPricingResponsePricing {
25406 pub openai_compat_input: f64,
25407 pub openai_compat_output: f64,
25408 pub anthropic_input: i64,
25409 pub anthropic_output: f64,
25410 pub anthropic_thinking: f64,
25411}
25412
25413#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25415pub struct UpdateAdminProviderResponse {
25416 pub id: String,
25417 pub enabled: bool,
25418 pub model_allowlist: Vec<String>,
25419}
25420
25421#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25423pub struct UpdateAdminRegistrationConfigRequest {
25424 #[serde(default, skip_serializing_if = "Option::is_none")]
25425 pub registration_open: Option<bool>,
25426 #[serde(default, skip_serializing_if = "Option::is_none")]
25429 pub confirm_open: Option<bool>,
25430 #[serde(default, skip_serializing_if = "Option::is_none")]
25431 pub default_signup_plan: Option<String>,
25432 #[serde(default, skip_serializing_if = "Option::is_none")]
25433 pub allowed_email_domains: Option<Vec<String>>,
25434}
25435
25436#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25438pub struct UpdateAdminRetentionConfigResponse {
25439 pub retention: UpdateAdminRetentionConfigResponseRetention,
25440 pub updated: bool,
25441}
25442
25443#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25445pub struct UpdateAdminRetentionConfigResponseRetention {
25446 pub completed_run_ttl_days: i64,
25447 pub event_ttl_days: i64,
25448 pub archive_to_sqlite: bool,
25449 pub audit_log_ttl_days: i64,
25450 pub archive_job_interval_ms: i64,
25451 pub archive_batch_size: i64,
25452 pub feed_ttl_days: i64,
25453 pub artifact_ttl_days: i64,
25454 #[serde(default, skip_serializing_if = "Option::is_none")]
25457 pub notification_ttl_days: Option<i64>,
25458 pub checkpoint_ttl_hours: i64,
25459}
25460
25461#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25463pub struct UpdateAdminRunCommandConfigResponse {
25464 pub run_command: UpdateAdminRunCommandConfigResponseRunCommand,
25465 pub updated: bool,
25466}
25467
25468#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25470pub struct UpdateAdminRunCommandConfigResponseRunCommand {
25471 pub enabled: bool,
25472 pub isolation: String,
25473 pub timeout_ms: i64,
25474 pub max_output_bytes: i64,
25475 pub allowed_commands: Vec<String>,
25476 pub deno_allow: Vec<String>,
25477}
25478
25479#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25481pub struct UpdateAdminServerConfigResponse {
25482 pub server: UpdateAdminServerConfigResponseServer,
25483 pub updated: bool,
25484}
25485
25486#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25488pub struct UpdateAdminServerConfigResponseServer {
25489 pub trust_proxy: bool,
25490 pub max_body_bytes: i64,
25491 #[serde(default, skip_serializing_if = "Option::is_none")]
25492 pub graceful_shutdown_timeout_ms: Option<i64>,
25493}
25494
25495#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25497pub struct UpdateAdminSetupStateRequest {
25498 #[serde(default, skip_serializing_if = "Option::is_none")]
25500 pub completed_steps: Option<Vec<UpdateAdminSetupStateRequestCompletedStep>>,
25501 #[serde(default, skip_serializing_if = "Option::is_none")]
25502 pub registration_open: Option<bool>,
25503 #[serde(default, skip_serializing_if = "Option::is_none")]
25505 pub confirm_open: Option<bool>,
25506}
25507
25508#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
25510pub enum UpdateAdminSetupStateRequestCompletedStep {
25511 #[default]
25512 #[serde(rename = "super_admin_login")]
25513 SuperAdminLogin,
25514 #[serde(rename = "platform_identity")]
25515 PlatformIdentity,
25516 #[serde(rename = "public_url")]
25517 PublicURL,
25518 #[serde(rename = "llm_provider")]
25519 LLMProvider,
25520 #[serde(rename = "registration_open")]
25521 RegistrationOpen,
25522 #[serde(rename = "smtp")]
25523 Smtp,
25524 #[serde(rename = "oauth_login")]
25525 OauthLogin,
25526 #[serde(rename = "stripe")]
25527 Stripe,
25528 #[serde(rename = "spec_seed")]
25529 SpecSeed,
25530 #[serde(rename = "custom_domain")]
25531 CustomDomain,
25532 #[serde(rename = "integrations")]
25533 Integrations,
25534 #[serde(untagged)]
25536 Other(String),
25537}
25538
25539impl UpdateAdminSetupStateRequestCompletedStep {
25540 pub fn as_str(&self) -> &str {
25542 match self {
25543 Self::SuperAdminLogin => "super_admin_login",
25544 Self::PlatformIdentity => "platform_identity",
25545 Self::PublicURL => "public_url",
25546 Self::LLMProvider => "llm_provider",
25547 Self::RegistrationOpen => "registration_open",
25548 Self::Smtp => "smtp",
25549 Self::OauthLogin => "oauth_login",
25550 Self::Stripe => "stripe",
25551 Self::SpecSeed => "spec_seed",
25552 Self::CustomDomain => "custom_domain",
25553 Self::Integrations => "integrations",
25554 Self::Other(value) => value.as_str(),
25555 }
25556 }
25557}
25558
25559impl std::fmt::Display for UpdateAdminSetupStateRequestCompletedStep {
25560 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25561 f.write_str(self.as_str())
25562 }
25563}
25564
25565impl From<&str> for UpdateAdminSetupStateRequestCompletedStep {
25566 fn from(value: &str) -> Self {
25567 match value {
25568 "super_admin_login" => Self::SuperAdminLogin,
25569 "platform_identity" => Self::PlatformIdentity,
25570 "public_url" => Self::PublicURL,
25571 "llm_provider" => Self::LLMProvider,
25572 "registration_open" => Self::RegistrationOpen,
25573 "smtp" => Self::Smtp,
25574 "oauth_login" => Self::OauthLogin,
25575 "stripe" => Self::Stripe,
25576 "spec_seed" => Self::SpecSeed,
25577 "custom_domain" => Self::CustomDomain,
25578 "integrations" => Self::Integrations,
25579 other => Self::Other(other.to_string()),
25580 }
25581 }
25582}
25583
25584#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25586pub struct UpdateAdminSmtpConfigRequest {
25587 #[serde(default, skip_serializing_if = "Option::is_none")]
25588 pub host: Option<String>,
25589 #[serde(default, skip_serializing_if = "Option::is_none")]
25590 pub port: Option<i64>,
25591 #[serde(default, skip_serializing_if = "Option::is_none")]
25592 pub user: Option<String>,
25593 #[serde(default, skip_serializing_if = "Option::is_none")]
25595 pub password: Option<String>,
25596 #[serde(default, skip_serializing_if = "Option::is_none")]
25597 pub from: Option<String>,
25598 #[serde(default, skip_serializing_if = "Option::is_none")]
25599 pub from_name: Option<String>,
25600}
25601
25602#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25604pub struct UpdateAdminSSEConfigResponse {
25605 pub sse: UpdateAdminSSEConfigResponseSSE,
25606 pub updated: bool,
25607}
25608
25609#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25611pub struct UpdateAdminSSEConfigResponseSSE {
25612 pub heartbeat_interval_ms: i64,
25613 pub watch_timeout_ms: i64,
25614 pub poll_interval_ms: i64,
25615 pub max_poll_interval_ms: i64,
25616 pub reconnect_hint_ms: i64,
25617 pub run_wait_timeout_sec: i64,
25618}
25619
25620#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25622pub struct UpdateAdminStripeConfigRequest {
25623 #[serde(default, skip_serializing_if = "Option::is_none")]
25624 pub enabled: Option<bool>,
25625 #[serde(default, skip_serializing_if = "Option::is_none")]
25626 pub mode: Option<UpdateAdminStripeConfigRequestMode>,
25627 #[serde(default, skip_serializing_if = "Option::is_none")]
25628 pub secret_key: Option<String>,
25629 #[serde(default, skip_serializing_if = "Option::is_none")]
25630 pub webhook_secret: Option<String>,
25631 #[serde(default, skip_serializing_if = "Option::is_none")]
25632 pub publishable_key: Option<String>,
25633 #[serde(default, skip_serializing_if = "Option::is_none")]
25634 pub price_id_starter: Option<String>,
25635 #[serde(default, skip_serializing_if = "Option::is_none")]
25636 pub price_id_pro: Option<String>,
25637 #[serde(default, skip_serializing_if = "Option::is_none")]
25638 pub price_id_enterprise: Option<String>,
25639}
25640
25641#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
25643pub enum UpdateAdminStripeConfigRequestMode {
25644 #[default]
25645 #[serde(rename = "test")]
25646 Test,
25647 #[serde(rename = "live")]
25648 Live,
25649 #[serde(untagged)]
25651 Other(String),
25652}
25653
25654impl UpdateAdminStripeConfigRequestMode {
25655 pub fn as_str(&self) -> &str {
25657 match self {
25658 Self::Test => "test",
25659 Self::Live => "live",
25660 Self::Other(value) => value.as_str(),
25661 }
25662 }
25663}
25664
25665impl std::fmt::Display for UpdateAdminStripeConfigRequestMode {
25666 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25667 f.write_str(self.as_str())
25668 }
25669}
25670
25671impl From<&str> for UpdateAdminStripeConfigRequestMode {
25672 fn from(value: &str) -> Self {
25673 match value {
25674 "test" => Self::Test,
25675 "live" => Self::Live,
25676 other => Self::Other(other.to_string()),
25677 }
25678 }
25679}
25680
25681#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25683pub struct UpdateAdminStripeConfigResponse {
25684 pub stripe: UpdateAdminStripeConfigResponseStripe,
25685 pub updated: bool,
25686}
25687
25688#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25690pub struct UpdateAdminStripeConfigResponseStripe {
25691 pub enabled: bool,
25692 pub mode: String,
25693 pub secret_key: String,
25694 pub webhook_secret: String,
25695 pub publishable_key: String,
25696 pub price_id_starter: String,
25697 pub price_id_pro: String,
25698 pub price_id_enterprise: String,
25699}
25700
25701#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25703pub struct UpdateAdminTenantSettingsResponse {
25704 pub tenant_id: String,
25705 pub settings: serde_json::Map<String, serde_json::Value>,
25707 #[serde(default, skip_serializing_if = "Option::is_none")]
25709 pub legal_hold: Option<bool>,
25710}
25711
25712#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25714pub struct UpdateAdminToolOverridesRequest {
25715 pub overrides: HashMap<String, ToolOverride>,
25716}
25717
25718#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25720pub struct UpdateAdminToolOverridesResponse {
25721 pub ok: bool,
25722 pub overrides: HashMap<String, ToolOverride>,
25723}
25724
25725#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25727pub struct UpdateAdminToolSecurityConfigResponse {
25728 pub tool_security: UpdateAdminToolSecurityConfigResponseToolSecurity,
25729 pub updated: bool,
25730}
25731
25732#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25734pub struct UpdateAdminToolSecurityConfigResponseToolSecurity {
25735 #[serde(default, skip_serializing_if = "Option::is_none")]
25736 pub egress_allowlist_per_tenant: Option<Vec<String>>,
25737 pub default_tool_timeout_ms: i64,
25738 pub default_tool_max_payload_bytes: i64,
25739 pub default_tool_max_concurrency: i64,
25740 pub stdio_inherit_env: bool,
25741}
25742
25743#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25745pub struct UpdateAdminWebhooksConfigResponse {
25746 pub webhooks: UpdateAdminWebhooksConfigResponseWebhooks,
25747 pub updated: bool,
25748}
25749
25750#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25752pub struct UpdateAdminWebhooksConfigResponseWebhooks {
25753 pub enabled: bool,
25754 pub max_subscriptions_per_tenant: i64,
25755 pub delivery_timeout_ms: i64,
25756 pub max_retry_attempts: i64,
25757 pub require_https: bool,
25758 pub max_payload_bytes: i64,
25759}
25760
25761#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25763pub struct UpdateAdminWorkerPoolConfigResponse {
25764 pub worker_pool: UpdateAdminWorkerPoolConfigResponseWorkerPool,
25765 pub updated: bool,
25766}
25767
25768#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25770pub struct UpdateAdminWorkerPoolConfigResponseWorkerPool {
25771 pub max_workers: i64,
25772 pub default_mode: String,
25773 pub max_run_duration_ms: i64,
25774 pub reconciliation_interval_ms: i64,
25775 pub schedule_max_retries: i64,
25776 pub schedule_base_delay_ms: i64,
25777 #[serde(default, skip_serializing_if = "Option::is_none")]
25778 pub max_queue_size: Option<i64>,
25779}
25780
25781#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25783pub struct UpdateAgentIntegrationRequest {
25784 #[serde(default, skip_serializing_if = "Option::is_none")]
25785 pub name: Option<String>,
25786 #[serde(default, skip_serializing_if = "Option::is_none")]
25787 pub config: Option<serde_json::Map<String, serde_json::Value>>,
25788}
25789
25790#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25792pub struct UpdateBridgeAgentCapabilityRequest {
25793 pub capabilities: Vec<String>,
25794 #[serde(default, skip_serializing_if = "Option::is_none")]
25797 pub working_directory: Option<String>,
25798 #[serde(default, skip_serializing_if = "Option::is_none")]
25800 pub hostname: Option<String>,
25801 #[serde(default, skip_serializing_if = "Option::is_none")]
25806 pub installed_specs: Option<Vec<BridgeInstalledSpec>>,
25807}
25808
25809#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25811pub struct UpdateBridgeAgentCapabilityResponse {
25812 pub status: RespondToPublicHitlResponseStatus,
25813}
25814
25815#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25817pub struct UpdateBuilderRequestStatusRequest {
25818 pub status: DesignRequestStatus,
25819}
25820
25821#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25823pub struct UpdateCoreMemoryBlockRequest {
25824 pub content: String,
25825 #[serde(default, skip_serializing_if = "Option::is_none")]
25827 pub max_tokens: Option<i64>,
25828}
25829
25830#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25832pub struct UpdateFeedbackReportStatusRequest {
25833 #[serde(default, skip_serializing_if = "Option::is_none")]
25836 pub status: Option<UpdateFeedbackReportStatusRequestStatus>,
25837}
25838
25839#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
25842pub enum UpdateFeedbackReportStatusRequestStatus {
25843 #[default]
25844 #[serde(rename = "resolved")]
25845 Resolved,
25846 #[serde(rename = "new")]
25847 New,
25848 #[serde(untagged)]
25850 Other(String),
25851}
25852
25853impl UpdateFeedbackReportStatusRequestStatus {
25854 pub fn as_str(&self) -> &str {
25856 match self {
25857 Self::Resolved => "resolved",
25858 Self::New => "new",
25859 Self::Other(value) => value.as_str(),
25860 }
25861 }
25862}
25863
25864impl std::fmt::Display for UpdateFeedbackReportStatusRequestStatus {
25865 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25866 f.write_str(self.as_str())
25867 }
25868}
25869
25870impl From<&str> for UpdateFeedbackReportStatusRequestStatus {
25871 fn from(value: &str) -> Self {
25872 match value {
25873 "resolved" => Self::Resolved,
25874 "new" => Self::New,
25875 other => Self::Other(other.to_string()),
25876 }
25877 }
25878}
25879
25880#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25882pub struct UpdateFeedbackReportStatusResponse {
25883 pub ok: bool,
25884 pub status: UpdateFeedbackReportStatusRequestStatus,
25886}
25887
25888#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25890pub struct UpdateGoalStatusRequest {
25891 pub status: String,
25892}
25893
25894#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25896pub struct UpdateImprovementStatusRequest {
25897 pub status: ImprovementProposalStatus,
25898}
25899
25900#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25902pub struct UpdateIntegrationRequest {
25903 #[serde(default, skip_serializing_if = "Option::is_none")]
25904 pub name: Option<String>,
25905 #[serde(default, skip_serializing_if = "Option::is_none")]
25906 pub config: Option<serde_json::Map<String, serde_json::Value>>,
25907}
25908
25909#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25911pub struct UpdateMarkupConfigResponse {
25912 pub markup: UpdateMarkupConfigResponseMarkup,
25913 pub updated: bool,
25914}
25915
25916#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25918pub struct UpdateMarkupConfigResponseMarkup {
25919 pub platform_markup_percent: f64,
25920 pub model_markup_overrides: serde_json::Map<String, serde_json::Value>,
25921}
25922
25923#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25925pub struct UpdateMCPServerRequest {
25926 #[serde(default, skip_serializing_if = "Option::is_none")]
25927 pub name: Option<String>,
25928 #[serde(default, skip_serializing_if = "Option::is_none")]
25929 pub url: Option<String>,
25930 #[serde(default, skip_serializing_if = "Option::is_none")]
25931 pub command: Option<String>,
25932 #[serde(default, skip_serializing_if = "Option::is_none")]
25933 pub args: Option<Vec<String>>,
25934 #[serde(default, skip_serializing_if = "Option::is_none")]
25936 pub env: Option<serde_json::Map<String, serde_json::Value>>,
25937 #[serde(default, skip_serializing_if = "Option::is_none")]
25938 pub enabled: Option<bool>,
25939 #[serde(default, skip_serializing_if = "Option::is_none")]
25940 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
25941 #[serde(default, skip_serializing_if = "Option::is_none")]
25942 pub status: Option<MCPServerStatus>,
25943 #[serde(default, skip_serializing_if = "Option::is_none")]
25950 pub api_key_ref: Option<String>,
25951 #[serde(default, skip_serializing_if = "Option::is_none")]
25952 pub egress_allowlist: Option<Vec<String>>,
25953}
25954
25955#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25957pub struct UpdateMissionObjectiveRequest {
25958 #[serde(default, skip_serializing_if = "Option::is_none")]
25959 pub title: Option<String>,
25960 #[serde(default, skip_serializing_if = "Option::is_none")]
25961 pub description: Option<String>,
25962 #[serde(default, skip_serializing_if = "Option::is_none")]
25963 pub success_criteria: Option<Vec<String>>,
25964 #[serde(default, skip_serializing_if = "Option::is_none")]
25965 pub priority: Option<ObjectivePriority>,
25966 #[serde(default, skip_serializing_if = "Option::is_none")]
25968 pub assigned_agent_id: Option<String>,
25969 #[serde(default, skip_serializing_if = "Option::is_none")]
25971 pub assigned_team_id: Option<String>,
25972 #[serde(default, skip_serializing_if = "Option::is_none")]
25974 pub budget: Option<UpdateMissionObjectiveRequestBudget>,
25975 #[serde(default, skip_serializing_if = "Option::is_none")]
25976 pub deadline: Option<String>,
25977 #[serde(default, skip_serializing_if = "Option::is_none")]
25978 pub commanders_intent: Option<String>,
25979 #[serde(default, skip_serializing_if = "Option::is_none")]
25980 pub roe: Option<ObjectiveRoE>,
25981 #[serde(default, skip_serializing_if = "Option::is_none")]
25982 pub decision_points: Option<Vec<ObjectiveDecisionPoint>>,
25983}
25984
25985#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25987pub struct UpdateMissionObjectiveRequestBudget {
25988 #[serde(default, skip_serializing_if = "Option::is_none")]
25989 pub max_runs: Option<i64>,
25990 #[serde(default, skip_serializing_if = "Option::is_none")]
25991 pub max_tokens: Option<i64>,
25992 #[serde(default, skip_serializing_if = "Option::is_none")]
25993 pub max_cost_usd: Option<f64>,
25994}
25995
25996#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
25998pub struct UpdateMyPreferencesRequest {
25999 #[serde(default, skip_serializing_if = "Option::is_none")]
26000 pub custom_instructions: Option<String>,
26001 #[serde(default, skip_serializing_if = "Option::is_none")]
26002 pub enabled: Option<bool>,
26003}
26004
26005#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26007pub struct UpdatePlatformURLSRequest {
26008 #[serde(default, skip_serializing_if = "Option::is_none")]
26009 pub public_base_url: Option<String>,
26010 #[serde(default, skip_serializing_if = "Option::is_none")]
26011 pub webhook_base_url: Option<String>,
26012}
26013
26014#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26016pub struct UpdatePlatformURLSResponse {
26017 #[serde(default, skip_serializing_if = "Option::is_none")]
26018 pub urls: Option<UpdatePlatformURLSResponseURLS>,
26019 pub updated: bool,
26020}
26021
26022#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26024pub struct UpdatePlatformURLSResponseURLS {
26025 #[serde(default, skip_serializing_if = "Option::is_none")]
26026 pub public_base_url: Option<String>,
26027 #[serde(default, skip_serializing_if = "Option::is_none")]
26028 pub webhook_base_url: Option<String>,
26029}
26030
26031#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26033pub struct UpdateProjectRequest {
26034 #[serde(default, skip_serializing_if = "Option::is_none")]
26035 pub name: Option<String>,
26036 #[serde(default, skip_serializing_if = "Option::is_none")]
26037 pub description: Option<String>,
26038 #[serde(default, skip_serializing_if = "Option::is_none")]
26039 pub instructions: Option<String>,
26040 #[serde(default, skip_serializing_if = "Option::is_none")]
26041 pub knowledge_base_ids: Option<Vec<String>>,
26042 #[serde(default, skip_serializing_if = "Option::is_none")]
26043 pub file_ids: Option<Vec<String>>,
26044 #[serde(default, skip_serializing_if = "Option::is_none")]
26045 pub visibility: Option<ProjectVisibility>,
26046 #[serde(default, skip_serializing_if = "Option::is_none")]
26047 pub shared_with: Option<Vec<ProjectGrant>>,
26048 #[serde(default, skip_serializing_if = "Option::is_none")]
26050 pub archived_at: Option<String>,
26051}
26052
26053#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26055pub struct UpdateRuntimeConfigResponse {
26056 pub runtime: serde_json::Map<String, serde_json::Value>,
26059 pub updated: bool,
26060 #[serde(default, skip_serializing_if = "Option::is_none")]
26062 pub ignored_keys: Option<Vec<String>>,
26063}
26064
26065#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26067pub struct UpdateSecurityPoliciesRequest {
26068 #[serde(default, skip_serializing_if = "Option::is_none")]
26069 pub cors_allowed_origins: Option<Vec<String>>,
26070 #[serde(default, skip_serializing_if = "Option::is_none")]
26071 pub webhook_url_denylist: Option<Vec<String>>,
26072 #[serde(default, skip_serializing_if = "Option::is_none")]
26073 pub file_upload_max_size_bytes: Option<i64>,
26074 #[serde(default, skip_serializing_if = "Option::is_none")]
26075 pub file_upload_allowed_mime_types: Option<Vec<String>>,
26076 #[serde(default, skip_serializing_if = "Option::is_none")]
26077 pub admin_provider_settings_require_super_admin: Option<bool>,
26078}
26079
26080#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26082pub struct UpdateSecurityPoliciesResponse {
26083 pub policies: UpdateSecurityPoliciesResponsePolicies,
26084 pub updated: bool,
26085}
26086
26087#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26089pub struct UpdateSecurityPoliciesResponsePolicies {
26090 pub cors_allowed_origins: Vec<String>,
26091 pub webhook_url_denylist: Vec<String>,
26092 pub file_upload_max_size_bytes: i64,
26093 pub file_upload_allowed_mime_types: Vec<String>,
26094 pub admin_provider_settings_require_super_admin: bool,
26095}
26096
26097#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26099pub struct UpdateSessionAnnotationRequest {
26100 #[serde(default, skip_serializing_if = "Option::is_none")]
26101 pub resolved: Option<bool>,
26102}
26103
26104#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26106pub struct UpdateSessionRequest {
26107 #[serde(default, skip_serializing_if = "Option::is_none")]
26115 pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
26116 #[serde(default, skip_serializing_if = "Option::is_none")]
26120 pub model_override: Option<UpdateSessionRequestModelOverride>,
26121}
26122
26123#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26127pub struct UpdateSessionRequestModelOverride {
26128 pub provider: String,
26129 pub model_ref: String,
26130 #[serde(default, skip_serializing_if = "Option::is_none")]
26131 pub endpoint_url: Option<String>,
26132 #[serde(default, skip_serializing_if = "Option::is_none")]
26133 pub capabilities: Option<serde_json::Map<String, serde_json::Value>>,
26134}
26135
26136#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26138pub struct UpdateSquadGraphNodeRequest {
26139 #[serde(default, skip_serializing_if = "Option::is_none")]
26140 pub status: Option<TeamGraphNodeStatus>,
26141 #[serde(default, skip_serializing_if = "Option::is_none")]
26142 pub goal_summary: Option<String>,
26143}
26144
26145#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26147pub struct UpdateTeamGraphNodeRequest {
26148 #[serde(default, skip_serializing_if = "Option::is_none")]
26149 pub status: Option<TeamGraphNodeStatus>,
26150 #[serde(default, skip_serializing_if = "Option::is_none")]
26151 pub goal_summary: Option<String>,
26152}
26153
26154#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26156pub struct UpdateTenantMefConfigRequest {
26157 #[serde(default, skip_serializing_if = "Option::is_none")]
26158 pub enabled: Option<bool>,
26159 #[serde(default, skip_serializing_if = "Option::is_none")]
26160 pub planner_enabled: Option<bool>,
26161 #[serde(default, skip_serializing_if = "Option::is_none")]
26162 pub judge_enabled: Option<bool>,
26163 #[serde(default, skip_serializing_if = "Option::is_none")]
26164 pub auto_classify: Option<bool>,
26165}
26166
26167#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26169pub struct UpdateTenantPlanRequest {
26170 pub plan: String,
26174 #[serde(default, skip_serializing_if = "Option::is_none")]
26175 pub quotas: Option<TenantQuotas>,
26176 #[serde(default, skip_serializing_if = "Option::is_none")]
26179 pub quota_overrides: Option<serde_json::Map<String, serde_json::Value>>,
26180 #[serde(default, skip_serializing_if = "Option::is_none")]
26181 pub name: Option<String>,
26182 #[serde(default, skip_serializing_if = "Option::is_none")]
26184 pub slug: Option<String>,
26185}
26186
26187#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26189pub struct UpdateTenantPlanResponse {
26190 pub tenant_id: String,
26191 pub plan: String,
26193 pub quotas: TenantQuotas,
26194}
26195
26196#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26198pub struct UpdateTenantRequest {
26199 #[serde(default, skip_serializing_if = "Option::is_none")]
26200 pub name: Option<String>,
26201 #[serde(default, skip_serializing_if = "Option::is_none")]
26202 pub settings: Option<serde_json::Map<String, serde_json::Value>>,
26203 #[serde(default, skip_serializing_if = "Option::is_none")]
26204 pub description: Option<String>,
26205 #[serde(default, skip_serializing_if = "Option::is_none")]
26206 pub head_agent_id: Option<String>,
26207 #[serde(default, skip_serializing_if = "Option::is_none")]
26208 pub shared_workspace_id: Option<String>,
26209}
26210
26211#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26213pub struct UpdateWebhooksPolicyRequest {
26214 #[serde(default, skip_serializing_if = "Option::is_none")]
26215 pub ssrf_check_at_subscription: Option<bool>,
26216 #[serde(default, skip_serializing_if = "Option::is_none")]
26217 pub stripe_signature_tolerance_sec: Option<i64>,
26218 #[serde(default, skip_serializing_if = "Option::is_none")]
26219 pub delivery_max_retries: Option<i64>,
26220 #[serde(default, skip_serializing_if = "Option::is_none")]
26221 pub delivery_backoff_base_ms: Option<i64>,
26222 #[serde(default, skip_serializing_if = "Option::is_none")]
26223 pub delivery_max_window_hours: Option<i64>,
26224}
26225
26226#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26228pub struct UpdateWebhooksPolicyResponse {
26229 pub policy: UpdateWebhooksPolicyResponsePolicy,
26230 pub updated: bool,
26231}
26232
26233#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26235pub struct UpdateWebhooksPolicyResponsePolicy {
26236 pub ssrf_check_at_subscription: bool,
26237 pub stripe_signature_tolerance_sec: i64,
26238 pub delivery_max_retries: i64,
26239 pub delivery_backoff_base_ms: i64,
26240 pub delivery_max_window_hours: i64,
26241}
26242
26243#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26245pub struct UpdateWorkspaceRequest {
26246 pub name: String,
26247}
26248
26249#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26251pub struct UploadFileRequest {
26252 pub data: FilePart,
26254 pub mime_type: String,
26255 #[serde(default, skip_serializing_if = "Option::is_none")]
26256 pub filename: Option<String>,
26257}
26258
26259#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26261pub struct UploadFileResponse {
26262 pub file_id: String,
26263 pub tenant_id: String,
26264 pub filename: String,
26265 pub mime_type: String,
26266 pub size_bytes: i64,
26267 pub sha256: String,
26268 pub created_at: String,
26269 pub url: String,
26270}
26271
26272#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26274pub struct UploadPublicSessionImageResponse {
26275 pub file_id: String,
26276 pub mime_type: String,
26277 pub size: i64,
26279}
26280
26281#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
26283pub enum UploadWorkspaceFileIfNoneMatch {
26284 #[default]
26285 #[serde(rename = "*")]
26286 Empty,
26287 #[serde(untagged)]
26289 Other(String),
26290}
26291
26292impl UploadWorkspaceFileIfNoneMatch {
26293 pub fn as_str(&self) -> &str {
26295 match self {
26296 Self::Empty => "*",
26297 Self::Other(value) => value.as_str(),
26298 }
26299 }
26300}
26301
26302impl std::fmt::Display for UploadWorkspaceFileIfNoneMatch {
26303 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26304 f.write_str(self.as_str())
26305 }
26306}
26307
26308impl From<&str> for UploadWorkspaceFileIfNoneMatch {
26309 fn from(value: &str) -> Self {
26310 match value {
26311 "*" => Self::Empty,
26312 other => Self::Other(other.to_string()),
26313 }
26314 }
26315}
26316
26317#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26319pub struct UploadWorkspaceFileRequest {
26320 pub file: FilePart,
26321}
26322
26323#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26325pub struct UpsertAgentToolOverrideResponse {
26326 pub tool_overrides: Vec<AgentToolOverride>,
26327}
26328
26329#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26331pub struct UpsertCustomPlanResponse {
26332 pub plan: CustomPlan,
26333}
26334
26335#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26337pub struct UpsertNotificationTargetRequest {
26338 #[serde(default, skip_serializing_if = "Option::is_none")]
26340 pub id: Option<String>,
26341 #[serde(default, skip_serializing_if = "Option::is_none")]
26343 pub label: Option<String>,
26344 #[serde(default, skip_serializing_if = "Option::is_none")]
26346 pub enabled: Option<bool>,
26347 pub config: serde_json::Value,
26348}
26349
26350#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26352pub struct UpsertNotificationTargetRequestConfigVariant1 {
26353 pub kind: NotificationTargetConfigVariant1kind,
26354 pub address: String,
26355}
26356
26357#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26359pub struct UpsertNotificationTargetRequestConfigVariant2 {
26360 pub kind: AgentScorerConfigType,
26361 pub url: String,
26363 #[serde(default, skip_serializing_if = "Option::is_none")]
26364 pub signing_secret: Option<String>,
26365 #[serde(default, skip_serializing_if = "Option::is_none")]
26366 pub format: Option<NotificationTargetConfigVariant2format>,
26367}
26368
26369#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26371pub struct UpsertNotificationTargetRequestConfigVariant3 {
26372 pub kind: NotificationTargetConfigVariant3kind,
26373 pub platform: NotificationTargetConfigVariant3platform,
26374 pub device_token: String,
26375 #[serde(default, skip_serializing_if = "Option::is_none")]
26376 pub device_label: Option<String>,
26377}
26378
26379#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26381pub struct UpsertNotificationTargetRequestConfigVariant4 {
26382 pub kind: NotificationTargetConfigVariant4kind,
26383 pub endpoint: String,
26384 pub keys: UpsertNotificationTargetRequestConfigVariant4keys,
26385 #[serde(default, skip_serializing_if = "Option::is_none")]
26386 pub device_label: Option<String>,
26387 #[serde(default, skip_serializing_if = "Option::is_none")]
26388 pub expiration_time: Option<i64>,
26389}
26390
26391#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26393pub struct UpsertNotificationTargetRequestConfigVariant4keys {
26394 pub p256dh: String,
26395 pub auth: String,
26396}
26397
26398#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26400pub struct UpsertPromoCodeResponse {
26401 pub promo_code: PromoCode,
26402}
26403
26404#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26406pub struct UsageMarginSummary {
26407 pub platform_markup_percent: f64,
26408 pub provider_cost_usd: f64,
26409 pub user_cost_usd: f64,
26410 pub margin_usd: f64,
26411 pub effective_margin_percent: f64,
26412}
26413
26414#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26417pub struct UsageQuota {
26418 pub plan: String,
26419 pub allowed: bool,
26420 #[serde(default, skip_serializing_if = "Option::is_none")]
26421 pub reason: Option<String>,
26422 pub usage: UsageQuotaUsage,
26424 pub daily: UsageQuotaDaily,
26425 pub resets_at: UsageQuotaResetsAt,
26426 pub limits: UsageQuotaLimits,
26427 #[serde(default, skip_serializing_if = "Option::is_none")]
26434 pub counters: Option<Vec<UsageQuotaCounter>>,
26435 pub resource_usage: UsageQuotaResourceUsage,
26437}
26438
26439#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26441pub struct UsageQuotaCounter {
26442 pub kind: UsageQuotaCounterKind,
26443 pub used: f64,
26444 #[serde(default)]
26445 pub limit: Option<f64>,
26446 #[serde(default)]
26447 pub period: Option<String>,
26448 #[serde(default)]
26449 pub resets_at: Option<String>,
26450}
26451
26452#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
26454pub enum UsageQuotaCounterKind {
26455 #[default]
26456 #[serde(rename = "runs")]
26457 Runs,
26458 #[serde(rename = "tokens")]
26459 Tokens,
26460 #[serde(rename = "tokens_daily")]
26461 TokensDaily,
26462 #[serde(rename = "tool_calls")]
26463 ToolCalls,
26464 #[serde(rename = "agents")]
26465 Agents,
26466 #[serde(rename = "teams")]
26467 Teams,
26468 #[serde(rename = "knowledge_bases")]
26469 KnowledgeBases,
26470 #[serde(rename = "workspaces")]
26471 Workspaces,
26472 #[serde(untagged)]
26474 Other(String),
26475}
26476
26477impl UsageQuotaCounterKind {
26478 pub fn as_str(&self) -> &str {
26480 match self {
26481 Self::Runs => "runs",
26482 Self::Tokens => "tokens",
26483 Self::TokensDaily => "tokens_daily",
26484 Self::ToolCalls => "tool_calls",
26485 Self::Agents => "agents",
26486 Self::Teams => "teams",
26487 Self::KnowledgeBases => "knowledge_bases",
26488 Self::Workspaces => "workspaces",
26489 Self::Other(value) => value.as_str(),
26490 }
26491 }
26492}
26493
26494impl std::fmt::Display for UsageQuotaCounterKind {
26495 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26496 f.write_str(self.as_str())
26497 }
26498}
26499
26500impl From<&str> for UsageQuotaCounterKind {
26501 fn from(value: &str) -> Self {
26502 match value {
26503 "runs" => Self::Runs,
26504 "tokens" => Self::Tokens,
26505 "tokens_daily" => Self::TokensDaily,
26506 "tool_calls" => Self::ToolCalls,
26507 "agents" => Self::Agents,
26508 "teams" => Self::Teams,
26509 "knowledge_bases" => Self::KnowledgeBases,
26510 "workspaces" => Self::Workspaces,
26511 other => Self::Other(other.to_string()),
26512 }
26513 }
26514}
26515
26516#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26518pub struct UsageQuotaDaily {
26519 pub used: f64,
26520 pub limit: f64,
26521 #[serde(default)]
26522 pub remaining: Option<f64>,
26523 pub resets_at: String,
26524}
26525
26526#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26528pub struct UsageQuotaLimits {
26529 pub max_monthly_tokens: f64,
26530 pub max_monthly_runs: f64,
26531 pub max_daily_tokens: f64,
26532 pub max_agents: f64,
26533 pub max_teams: f64,
26534 pub max_knowledge_bases: f64,
26535 pub max_workspaces: f64,
26536}
26537
26538#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26540pub struct UsageQuotaResetsAt {
26541 pub day: String,
26542 pub month: String,
26543}
26544
26545#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26547pub struct UsageQuotaResourceUsage {
26548 pub agents: ResourceUsageEntry,
26549 pub workspaces: ResourceUsageEntry,
26550 pub knowledge_bases: ResourceUsageEntry,
26551 pub teams: ResourceUsageEntry,
26552 pub any_over_tier: bool,
26553}
26554
26555#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26557pub struct UsageQuotaUsage {
26558 pub input_tokens: f64,
26559 pub output_tokens: f64,
26560 pub thinking_tokens: f64,
26561 pub total_tokens: f64,
26562 pub runs_count: f64,
26563 pub tool_calls_count: f64,
26564 pub storage_bytes: f64,
26565 pub total_cost: f64,
26566 pub provider_cost: f64,
26567 pub non_run_cost: f64,
26568 pub period: String,
26569}
26570
26571#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26574pub struct UsageSummary {
26575 pub plan: String,
26576 pub period: String,
26578 pub period_days: i64,
26579 pub input_tokens: i64,
26580 pub output_tokens: i64,
26581 pub thinking_tokens: i64,
26582 pub total_tokens: i64,
26583 pub runs_count: i64,
26584 pub tool_calls_count: i64,
26585 #[serde(default, skip_serializing_if = "Option::is_none")]
26586 pub bridge_tasks: Option<i64>,
26587 pub storage_bytes: i64,
26588 pub total_cost: f64,
26590 pub provider_cost: f64,
26592 pub non_run_cost: f64,
26593 #[serde(default, skip_serializing_if = "Option::is_none")]
26594 pub margin_summary: Option<UsageMarginSummary>,
26595}
26596
26597#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26600pub struct UserPreferences {
26601 pub custom_instructions: String,
26602 pub enabled: bool,
26605 #[serde(default, skip_serializing_if = "Option::is_none")]
26606 pub updated_at: Option<String>,
26607 pub max_chars: i64,
26610}
26611
26612#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26614pub struct ValidationCriterion {
26615 pub name: String,
26616 pub description: String,
26617 pub weight: f64,
26619}
26620
26621#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26623pub struct ValidationPolicy {
26624 pub enabled: bool,
26625 pub criteria: Vec<ValidationCriterion>,
26626 pub min_score: f64,
26628 pub max_revision_rounds: i64,
26629 #[serde(default, skip_serializing_if = "Option::is_none")]
26631 pub validator_agent_id: Option<String>,
26632 pub auto_revise: bool,
26635 pub selective: bool,
26637}
26638
26639#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26641pub struct Value {
26642 #[serde(default, skip_serializing_if = "Option::is_none")]
26643 pub en: Option<String>,
26644 #[serde(default, skip_serializing_if = "Option::is_none")]
26645 pub uk: Option<String>,
26646}
26647
26648#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26650pub struct Value2 {
26651 pub spec_id: String,
26652 pub output_view: serde_json::Value,
26654}
26655
26656#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26658pub struct Value3 {
26659 pub x: f64,
26660 pub y: f64,
26661}
26662
26663#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26665pub struct Value4 {
26666 pub x: f64,
26667 pub y: f64,
26668}
26669
26670#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26672pub struct Value5 {
26673 #[serde(default, skip_serializing_if = "Option::is_none")]
26674 pub from: Option<serde_json::Value>,
26675 #[serde(default, skip_serializing_if = "Option::is_none")]
26676 pub to: Option<serde_json::Value>,
26677}
26678
26679#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26681pub struct VerifyEmailResponse {
26682 pub tenant_id: String,
26683 pub message: String,
26684}
26685
26686#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26688pub struct VerifyMfaRecoveryRequest {
26689 pub code: String,
26690}
26691
26692#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26694pub struct VerifyMfaRecoveryResponse {
26695 pub verified: bool,
26696 pub recovery_remaining: i64,
26697}
26698
26699#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26701pub struct VerifyMfaRequest {
26702 pub code: String,
26704}
26705
26706#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26708pub struct VerifyMfaResponse {
26709 pub verified: bool,
26710 #[serde(default, skip_serializing_if = "Option::is_none")]
26711 pub recovery_remaining: Option<i64>,
26712}
26713
26714#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26716pub struct VerifyTenantDomainResponse {
26717 #[serde(default, skip_serializing_if = "Option::is_none")]
26718 pub verified: Option<bool>,
26719}
26720
26721#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26723pub struct VetoProposalRequest {
26724 #[serde(default, skip_serializing_if = "Option::is_none")]
26725 pub founder_id: Option<String>,
26726}
26727
26728#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26730pub struct VetoProposalResponse {
26731 #[serde(default, skip_serializing_if = "Option::is_none")]
26732 pub ok: Option<bool>,
26733}
26734
26735#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26738pub struct VetoRecord {
26739 pub veto_id: String,
26740 pub issued_by: String,
26741 pub target_type: VetoRecordTargetType,
26742 pub target_id: String,
26743 pub reason: String,
26744 pub issued_at: String,
26745}
26746
26747#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
26749pub enum VetoRecordTargetType {
26750 #[default]
26751 #[serde(rename = "proposal")]
26752 Proposal,
26753 #[serde(rename = "action")]
26754 Action,
26755 #[serde(rename = "agent")]
26756 Agent,
26757 #[serde(rename = "case")]
26758 Case,
26759 #[serde(untagged)]
26761 Other(String),
26762}
26763
26764impl VetoRecordTargetType {
26765 pub fn as_str(&self) -> &str {
26767 match self {
26768 Self::Proposal => "proposal",
26769 Self::Action => "action",
26770 Self::Agent => "agent",
26771 Self::Case => "case",
26772 Self::Other(value) => value.as_str(),
26773 }
26774 }
26775}
26776
26777impl std::fmt::Display for VetoRecordTargetType {
26778 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26779 f.write_str(self.as_str())
26780 }
26781}
26782
26783impl From<&str> for VetoRecordTargetType {
26784 fn from(value: &str) -> Self {
26785 match value {
26786 "proposal" => Self::Proposal,
26787 "action" => Self::Action,
26788 "agent" => Self::Agent,
26789 "case" => Self::Case,
26790 other => Self::Other(other.to_string()),
26791 }
26792 }
26793}
26794
26795#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26797pub struct VideoProvider {
26798 #[serde(default, skip_serializing_if = "Option::is_none")]
26799 pub configured: Option<bool>,
26800 #[serde(default, skip_serializing_if = "Option::is_none")]
26801 pub id: Option<String>,
26802 #[serde(default, skip_serializing_if = "Option::is_none")]
26803 pub local: Option<bool>,
26804 #[serde(default, skip_serializing_if = "Option::is_none")]
26805 pub models: Option<Vec<ModelInfo>>,
26806 #[serde(default, skip_serializing_if = "Option::is_none")]
26807 pub name: Option<String>,
26808}
26809
26810#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26812pub struct VoiceConfig {
26813 #[serde(default, skip_serializing_if = "Option::is_none")]
26814 pub stt: Option<VoiceConfigStt>,
26815 #[serde(default, skip_serializing_if = "Option::is_none")]
26816 pub tts: Option<VoiceConfigTts>,
26817}
26818
26819#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26821pub struct VoiceConfigStt {
26822 #[serde(default, skip_serializing_if = "Option::is_none")]
26823 pub configured: Option<bool>,
26824 #[serde(default, skip_serializing_if = "Option::is_none")]
26825 pub endpoint: Option<String>,
26826 #[serde(default, skip_serializing_if = "Option::is_none")]
26827 pub model: Option<String>,
26828 #[serde(default, skip_serializing_if = "Option::is_none")]
26829 pub provider: Option<String>,
26830}
26831
26832#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26834pub struct VoiceConfigTts {
26835 #[serde(default, skip_serializing_if = "Option::is_none")]
26836 pub configured: Option<bool>,
26837 #[serde(default, skip_serializing_if = "Option::is_none")]
26838 pub endpoint: Option<String>,
26839 #[serde(default, skip_serializing_if = "Option::is_none")]
26840 pub model: Option<String>,
26841 #[serde(default, skip_serializing_if = "Option::is_none")]
26842 pub provider: Option<String>,
26843 #[serde(default, skip_serializing_if = "Option::is_none")]
26844 pub voice: Option<String>,
26845}
26846
26847#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26849pub struct VoiceProvider {
26850 pub id: String,
26851 pub name: String,
26852 pub configured: bool,
26853 pub stt_models: Vec<ModelInfo>,
26854 pub tts_models: Vec<ModelInfo>,
26855}
26856
26857#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26859pub struct VoiceProviderList {
26860 #[serde(default, skip_serializing_if = "Option::is_none")]
26861 pub providers: Option<Vec<VoiceProvider>>,
26862}
26863
26864#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26866pub struct VoteResult {
26867 pub proposal_id: String,
26868 pub status: VoteResultStatus,
26869 pub total_votes: i64,
26870 pub approve_weight: f64,
26871 pub reject_weight: f64,
26872 pub abstain_weight: f64,
26873 pub quorum_met: bool,
26874 pub tallied_at: String,
26875}
26876
26877#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
26879pub enum VoteResultStatus {
26880 #[default]
26881 #[serde(rename = "passed")]
26882 Passed,
26883 #[serde(rename = "rejected")]
26884 Rejected,
26885 #[serde(rename = "expired")]
26886 Expired,
26887 #[serde(rename = "vetoed")]
26888 Vetoed,
26889 #[serde(untagged)]
26891 Other(String),
26892}
26893
26894impl VoteResultStatus {
26895 pub fn as_str(&self) -> &str {
26897 match self {
26898 Self::Passed => "passed",
26899 Self::Rejected => "rejected",
26900 Self::Expired => "expired",
26901 Self::Vetoed => "vetoed",
26902 Self::Other(value) => value.as_str(),
26903 }
26904 }
26905}
26906
26907impl std::fmt::Display for VoteResultStatus {
26908 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26909 f.write_str(self.as_str())
26910 }
26911}
26912
26913impl From<&str> for VoteResultStatus {
26914 fn from(value: &str) -> Self {
26915 match value {
26916 "passed" => Self::Passed,
26917 "rejected" => Self::Rejected,
26918 "expired" => Self::Expired,
26919 "vetoed" => Self::Vetoed,
26920 other => Self::Other(other.to_string()),
26921 }
26922 }
26923}
26924
26925#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26927pub struct VotingProposal {
26928 pub proposal_id: String,
26929 pub tenant_id: String,
26930 pub r#type: String,
26931 pub title: String,
26932 pub description: String,
26933 pub proposed_by: String,
26934 pub payload: serde_json::Map<String, serde_json::Value>,
26935 pub quorum: f64,
26936 pub status: VotingProposalStatus,
26937 pub deadline: String,
26938 pub created_at: String,
26939 pub updated_at: String,
26940}
26941
26942#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
26944pub enum VotingProposalStatus {
26945 #[default]
26946 #[serde(rename = "open")]
26947 Open,
26948 #[serde(rename = "passed")]
26949 Passed,
26950 #[serde(rename = "rejected")]
26951 Rejected,
26952 #[serde(rename = "expired")]
26953 Expired,
26954 #[serde(rename = "vetoed")]
26955 Vetoed,
26956 #[serde(untagged)]
26958 Other(String),
26959}
26960
26961impl VotingProposalStatus {
26962 pub fn as_str(&self) -> &str {
26964 match self {
26965 Self::Open => "open",
26966 Self::Passed => "passed",
26967 Self::Rejected => "rejected",
26968 Self::Expired => "expired",
26969 Self::Vetoed => "vetoed",
26970 Self::Other(value) => value.as_str(),
26971 }
26972 }
26973}
26974
26975impl std::fmt::Display for VotingProposalStatus {
26976 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26977 f.write_str(self.as_str())
26978 }
26979}
26980
26981impl From<&str> for VotingProposalStatus {
26982 fn from(value: &str) -> Self {
26983 match value {
26984 "open" => Self::Open,
26985 "passed" => Self::Passed,
26986 "rejected" => Self::Rejected,
26987 "expired" => Self::Expired,
26988 "vetoed" => Self::Vetoed,
26989 other => Self::Other(other.to_string()),
26990 }
26991 }
26992}
26993
26994#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26996pub struct WebhookDeliveryAttempt {
26997 pub delivery_id: String,
26998 pub webhook_id: String,
26999 pub tenant_id: String,
27000 pub event_type: WebhookDeliveryAttemptEventType,
27001 pub attempt_number: i64,
27002 pub status: WebhookDeliveryAttemptStatus,
27003 pub request_body: String,
27004 #[serde(default, skip_serializing_if = "Option::is_none")]
27005 pub response_status: Option<i64>,
27006 #[serde(default, skip_serializing_if = "Option::is_none")]
27007 pub error_message: Option<String>,
27008 #[serde(default, skip_serializing_if = "Option::is_none")]
27009 pub latency_ms: Option<f64>,
27010 #[serde(default, skip_serializing_if = "Option::is_none")]
27011 pub next_retry_at: Option<String>,
27012 pub created_at: String,
27013}
27014
27015#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
27017pub enum WebhookDeliveryAttemptEventType {
27018 #[default]
27019 #[serde(rename = "run.completed")]
27020 RunCompleted,
27021 #[serde(rename = "run.failed")]
27022 RunFailed,
27023 #[serde(rename = "run.cancelled")]
27024 RunCancelled,
27025 #[serde(rename = "agent.created")]
27026 AgentCreated,
27027 #[serde(rename = "agent.updated")]
27028 AgentUpdated,
27029 #[serde(rename = "agent.deleted")]
27030 AgentDeleted,
27031 #[serde(rename = "quota.threshold")]
27032 QuotaThreshold,
27033 #[serde(rename = "quota.exceeded")]
27034 QuotaExceeded,
27035 #[serde(rename = "guardrail.violated")]
27036 GuardrailViolated,
27037 #[serde(rename = "billing.invoice.created")]
27038 BillingInvoiceCreated,
27039 #[serde(rename = "billing.payment.failed")]
27040 BillingPaymentFailed,
27041 #[serde(rename = "eval.auto_rollback")]
27042 EvalAutoRollback,
27043 #[serde(rename = "company.budget_alert")]
27044 CompanyBudgetAlert,
27045 #[serde(rename = "company.budget_exceeded")]
27046 CompanyBudgetExceeded,
27047 #[serde(rename = "company.objective_failed")]
27048 CompanyObjectiveFailed,
27049 #[serde(rename = "company.goal_completed")]
27050 CompanyGoalCompleted,
27051 #[serde(rename = "company.paused")]
27052 CompanyPaused,
27053 #[serde(untagged)]
27055 Other(String),
27056}
27057
27058impl WebhookDeliveryAttemptEventType {
27059 pub fn as_str(&self) -> &str {
27061 match self {
27062 Self::RunCompleted => "run.completed",
27063 Self::RunFailed => "run.failed",
27064 Self::RunCancelled => "run.cancelled",
27065 Self::AgentCreated => "agent.created",
27066 Self::AgentUpdated => "agent.updated",
27067 Self::AgentDeleted => "agent.deleted",
27068 Self::QuotaThreshold => "quota.threshold",
27069 Self::QuotaExceeded => "quota.exceeded",
27070 Self::GuardrailViolated => "guardrail.violated",
27071 Self::BillingInvoiceCreated => "billing.invoice.created",
27072 Self::BillingPaymentFailed => "billing.payment.failed",
27073 Self::EvalAutoRollback => "eval.auto_rollback",
27074 Self::CompanyBudgetAlert => "company.budget_alert",
27075 Self::CompanyBudgetExceeded => "company.budget_exceeded",
27076 Self::CompanyObjectiveFailed => "company.objective_failed",
27077 Self::CompanyGoalCompleted => "company.goal_completed",
27078 Self::CompanyPaused => "company.paused",
27079 Self::Other(value) => value.as_str(),
27080 }
27081 }
27082}
27083
27084impl std::fmt::Display for WebhookDeliveryAttemptEventType {
27085 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27086 f.write_str(self.as_str())
27087 }
27088}
27089
27090impl From<&str> for WebhookDeliveryAttemptEventType {
27091 fn from(value: &str) -> Self {
27092 match value {
27093 "run.completed" => Self::RunCompleted,
27094 "run.failed" => Self::RunFailed,
27095 "run.cancelled" => Self::RunCancelled,
27096 "agent.created" => Self::AgentCreated,
27097 "agent.updated" => Self::AgentUpdated,
27098 "agent.deleted" => Self::AgentDeleted,
27099 "quota.threshold" => Self::QuotaThreshold,
27100 "quota.exceeded" => Self::QuotaExceeded,
27101 "guardrail.violated" => Self::GuardrailViolated,
27102 "billing.invoice.created" => Self::BillingInvoiceCreated,
27103 "billing.payment.failed" => Self::BillingPaymentFailed,
27104 "eval.auto_rollback" => Self::EvalAutoRollback,
27105 "company.budget_alert" => Self::CompanyBudgetAlert,
27106 "company.budget_exceeded" => Self::CompanyBudgetExceeded,
27107 "company.objective_failed" => Self::CompanyObjectiveFailed,
27108 "company.goal_completed" => Self::CompanyGoalCompleted,
27109 "company.paused" => Self::CompanyPaused,
27110 other => Self::Other(other.to_string()),
27111 }
27112 }
27113}
27114
27115#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
27117pub enum WebhookDeliveryAttemptStatus {
27118 #[default]
27119 #[serde(rename = "pending")]
27120 Pending,
27121 #[serde(rename = "success")]
27122 Success,
27123 #[serde(rename = "failed")]
27124 Failed,
27125 #[serde(untagged)]
27127 Other(String),
27128}
27129
27130impl WebhookDeliveryAttemptStatus {
27131 pub fn as_str(&self) -> &str {
27133 match self {
27134 Self::Pending => "pending",
27135 Self::Success => "success",
27136 Self::Failed => "failed",
27137 Self::Other(value) => value.as_str(),
27138 }
27139 }
27140}
27141
27142impl std::fmt::Display for WebhookDeliveryAttemptStatus {
27143 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27144 f.write_str(self.as_str())
27145 }
27146}
27147
27148impl From<&str> for WebhookDeliveryAttemptStatus {
27149 fn from(value: &str) -> Self {
27150 match value {
27151 "pending" => Self::Pending,
27152 "success" => Self::Success,
27153 "failed" => Self::Failed,
27154 other => Self::Other(other.to_string()),
27155 }
27156 }
27157}
27158
27159#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
27161pub struct WebhookSubscription {
27162 pub webhook_id: String,
27163 #[serde(default, skip_serializing_if = "Option::is_none")]
27164 pub tenant_id: Option<String>,
27165 pub url: String,
27166 pub events: Vec<String>,
27167 pub status: WebhookSubscriptionStatus,
27168 #[serde(default, skip_serializing_if = "Option::is_none")]
27169 pub created_at: Option<String>,
27170}
27171
27172#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
27174pub enum WebhookSubscriptionStatus {
27175 #[default]
27176 #[serde(rename = "active")]
27177 Active,
27178 #[serde(rename = "disabled")]
27179 Disabled,
27180 #[serde(rename = "failing")]
27181 Failing,
27182 #[serde(untagged)]
27184 Other(String),
27185}
27186
27187impl WebhookSubscriptionStatus {
27188 pub fn as_str(&self) -> &str {
27190 match self {
27191 Self::Active => "active",
27192 Self::Disabled => "disabled",
27193 Self::Failing => "failing",
27194 Self::Other(value) => value.as_str(),
27195 }
27196 }
27197}
27198
27199impl std::fmt::Display for WebhookSubscriptionStatus {
27200 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27201 f.write_str(self.as_str())
27202 }
27203}
27204
27205impl From<&str> for WebhookSubscriptionStatus {
27206 fn from(value: &str) -> Self {
27207 match value {
27208 "active" => Self::Active,
27209 "disabled" => Self::Disabled,
27210 "failing" => Self::Failing,
27211 other => Self::Other(other.to_string()),
27212 }
27213 }
27214}
27215
27216#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
27218pub struct Workspace {
27219 #[serde(default, skip_serializing_if = "Option::is_none")]
27220 pub file_count: Option<i64>,
27221 #[serde(default, skip_serializing_if = "Option::is_none")]
27222 pub total_size_bytes: Option<i64>,
27223 pub workspace_id: String,
27224 pub tenant_id: String,
27225 #[serde(default, skip_serializing_if = "Option::is_none")]
27226 pub owner_type: Option<WorkspaceOwnerType>,
27227 #[serde(default, skip_serializing_if = "Option::is_none")]
27228 pub owner_id: Option<String>,
27229 pub name: String,
27230 #[serde(default, skip_serializing_if = "Option::is_none")]
27231 pub shared_with: Option<Vec<String>>,
27232 pub assigned_agents: Vec<String>,
27233 #[serde(default, skip_serializing_if = "Option::is_none")]
27234 pub assigned_teams: Option<Vec<String>>,
27235 #[serde(default, skip_serializing_if = "Option::is_none")]
27236 pub assigned_companies: Option<Vec<String>>,
27237 pub created_at: String,
27238 #[serde(default, skip_serializing_if = "Option::is_none")]
27239 pub updated_at: Option<String>,
27240}
27241
27242#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
27244pub struct WorkspaceFile {
27245 #[serde(default, skip_serializing_if = "Option::is_none")]
27248 pub etag: Option<String>,
27249 pub file_id: String,
27250 #[serde(default, skip_serializing_if = "Option::is_none")]
27251 pub tenant_id: Option<String>,
27252 pub workspace_id: String,
27253 pub path: String,
27254 #[serde(default, skip_serializing_if = "Option::is_none")]
27255 pub parent_path: Option<String>,
27256 pub filename: String,
27257 #[serde(default, skip_serializing_if = "Option::is_none")]
27258 pub mime_type: Option<String>,
27259 pub size_bytes: i64,
27260 #[serde(default, skip_serializing_if = "Option::is_none")]
27261 pub created_at: Option<String>,
27262 #[serde(default, skip_serializing_if = "Option::is_none")]
27263 pub updated_at: Option<String>,
27264}
27265
27266#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
27268pub struct WorkspaceFileVersion {
27269 pub file_id: String,
27270 pub tenant_id: String,
27271 pub workspace_id: String,
27272 pub path: String,
27273 pub parent_path: String,
27274 pub filename: String,
27275 pub mime_type: String,
27276 pub size_bytes: i64,
27277 pub created_at: String,
27278}
27279
27280#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
27282pub enum WorkspaceOwnerType {
27283 #[default]
27284 #[serde(rename = "agent")]
27285 Agent,
27286 #[serde(rename = "team")]
27287 Team,
27288 #[serde(rename = "standalone")]
27289 Standalone,
27290 #[serde(untagged)]
27292 Other(String),
27293}
27294
27295impl WorkspaceOwnerType {
27296 pub fn as_str(&self) -> &str {
27298 match self {
27299 Self::Agent => "agent",
27300 Self::Team => "team",
27301 Self::Standalone => "standalone",
27302 Self::Other(value) => value.as_str(),
27303 }
27304 }
27305}
27306
27307impl std::fmt::Display for WorkspaceOwnerType {
27308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27309 f.write_str(self.as_str())
27310 }
27311}
27312
27313impl From<&str> for WorkspaceOwnerType {
27314 fn from(value: &str) -> Self {
27315 match value {
27316 "agent" => Self::Agent,
27317 "team" => Self::Team,
27318 "standalone" => Self::Standalone,
27319 other => Self::Other(other.to_string()),
27320 }
27321 }
27322}