Skip to main content

gestalt/public/generated/
agent.rs

1// Code generated by sdkgen. DO NOT EDIT.
2
3//! Generated native types and clients for agent.proto.
4
5use crate::agent::{
6    AgentExecutionStatus, AgentMessage, AgentOutput, AgentSessionStartConfig, AgentSessionState,
7    AgentToolConfig, AgentWorkspace, PreparedAgentWorkspace,
8};
9
10/// Native message type for `gestalt.provider.v1.CancelAgentProviderTurnRequest`.
11#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
12#[serde(rename_all = "camelCase")]
13pub struct CancelAgentProviderTurnRequest {
14    /// The `turn_id` field.
15    pub turn_id: String,
16    /// The `reason` field.
17    pub reason: String,
18    /// The `provider_name` field.
19    pub provider_name: String,
20    /// The `session_id` field.
21    pub session_id: String,
22}
23
24/// Native message type for `gestalt.provider.v1.CreateAgentProviderSessionRequest`.
25#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
26#[serde(rename_all = "camelCase")]
27pub struct CreateAgentProviderSessionRequest {
28    /// The provider mints the session id returned on AgentSession. Creation is
29    /// idempotent on idempotency_key scoped per caller (context.subject.id):
30    /// a replayed key returns the existing session, an empty key always creates.
31    /// Idempotency is scoped to the provider's session store.
32    ///
33    /// The `idempotency_key` field.
34    pub idempotency_key: String,
35    /// The `model` field.
36    pub model: String,
37    /// The `client_ref` field.
38    pub client_ref: String,
39    /// The `metadata` field; None when unset.
40    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
41    /// The `session_start` field; None when unset.
42    pub session_start: Option<AgentSessionStartConfig>,
43    /// The `prepared_workspace` field; None when unset.
44    pub prepared_workspace: Option<PreparedAgentWorkspace>,
45    /// The `provider_name` field.
46    pub provider_name: String,
47    /// The `workspace` field; None when unset.
48    pub workspace: Option<AgentWorkspace>,
49    /// The `tools` field; None when unset.
50    pub tools: Option<AgentToolConfig>,
51}
52
53/// Native message type for `gestalt.provider.v1.CreateAgentProviderTurnRequest`.
54#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
55#[serde(rename_all = "camelCase")]
56pub struct CreateAgentProviderTurnRequest {
57    /// The `turn_id` field.
58    pub turn_id: String,
59    /// The `session_id` field.
60    pub session_id: String,
61    /// The `idempotency_key` field.
62    pub idempotency_key: String,
63    /// The `model` field.
64    pub model: String,
65    /// The `messages` field.
66    pub messages: Vec<AgentMessage>,
67    /// The `metadata` field; None when unset.
68    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
69    /// The `execution_ref` field.
70    pub execution_ref: String,
71    /// The `model_options` field; None when unset.
72    pub model_options: Option<serde_json::Map<String, serde_json::Value>>,
73    /// Optional provider-owned turn execution budget, in seconds.
74    /// If unset or zero, the provider chooses its own execution timeout. This does
75    /// not control the CreateTurn RPC deadline.
76    ///
77    /// The `timeout_seconds` field.
78    pub timeout_seconds: i32,
79    /// The `output` field; None when unset.
80    pub output: Option<AgentOutput>,
81    /// The `provider_name` field.
82    pub provider_name: String,
83}
84
85/// Native message type for `gestalt.provider.v1.GetAgentProviderSessionRequest`.
86#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
87#[serde(rename_all = "camelCase")]
88pub struct GetAgentProviderSessionRequest {
89    /// The `session_id` field.
90    pub session_id: String,
91    /// The `provider_name` field.
92    pub provider_name: String,
93}
94
95/// Native message type for `gestalt.provider.v1.GetAgentProviderTurnRequest`.
96#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
97#[serde(rename_all = "camelCase")]
98pub struct GetAgentProviderTurnRequest {
99    /// The `turn_id` field.
100    pub turn_id: String,
101    /// The `provider_name` field.
102    pub provider_name: String,
103    /// The `session_id` field.
104    pub session_id: String,
105}
106
107/// Native message type for `gestalt.provider.v1.ListAgentProviderInteractionsRequest`.
108#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
109#[serde(rename_all = "camelCase")]
110pub struct ListAgentProviderInteractionsRequest {
111    /// The `turn_id` field.
112    pub turn_id: String,
113    /// The `provider_name` field.
114    pub provider_name: String,
115}
116
117/// Native message type for `gestalt.provider.v1.ListAgentProviderSessionsRequest`.
118#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
119#[serde(rename_all = "camelCase")]
120pub struct ListAgentProviderSessionsRequest {
121    /// The `session_ids` field.
122    pub session_ids: Vec<String>,
123    /// The `state` field.
124    pub state: AgentSessionState,
125    /// When non-zero and bounded_list_hydration is supported, cap results after
126    /// ordering sessions newest-first by last_turn_at, updated_at, then created_at.
127    ///
128    /// The `limit` field.
129    pub limit: i32,
130    /// When true and bounded_list_hydration is supported, omit heavy fields such as
131    /// metadata unless exact session_ids require direct lookup.
132    ///
133    /// The `summary_only` field.
134    pub summary_only: bool,
135    /// The `provider_name` field.
136    pub provider_name: String,
137}
138
139/// Native message type for `gestalt.provider.v1.ListAgentProviderTurnEventsRequest`.
140#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
141#[serde(rename_all = "camelCase")]
142pub struct ListAgentProviderTurnEventsRequest {
143    /// The `turn_id` field.
144    pub turn_id: String,
145    /// The `after_seq` field.
146    pub after_seq: i64,
147    /// The `limit` field.
148    pub limit: i32,
149    /// The `provider_name` field.
150    pub provider_name: String,
151    /// The `session_id` field.
152    pub session_id: String,
153}
154
155/// Native message type for `gestalt.provider.v1.ListAgentProviderTurnsRequest`.
156#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
157#[serde(rename_all = "camelCase")]
158pub struct ListAgentProviderTurnsRequest {
159    /// The `session_id` field.
160    pub session_id: String,
161    /// The `turn_ids` field.
162    pub turn_ids: Vec<String>,
163    /// The `status` field.
164    pub status: AgentExecutionStatus,
165    /// When non-zero and bounded_list_hydration is supported, cap results after
166    /// ordering turns newest-first by created_at.
167    ///
168    /// The `limit` field.
169    pub limit: i32,
170    /// When true and bounded_list_hydration is supported, omit heavy fields such as
171    /// messages, output text, and structured output unless exact turn_ids require
172    /// direct lookup.
173    ///
174    /// The `summary_only` field.
175    pub summary_only: bool,
176    /// The `provider_name` field.
177    pub provider_name: String,
178}
179
180/// Native message type for `gestalt.provider.v1.ResolveAgentProviderInteractionRequest`.
181#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
182#[serde(rename_all = "camelCase")]
183pub struct ResolveAgentProviderInteractionRequest {
184    /// The `interaction_id` field.
185    pub interaction_id: String,
186    /// The `resolution` field; None when unset.
187    pub resolution: Option<serde_json::Map<String, serde_json::Value>>,
188    /// The `turn_id` field.
189    pub turn_id: String,
190    /// The `provider_name` field.
191    pub provider_name: String,
192}
193
194/// Native message type for `gestalt.provider.v1.UpdateAgentProviderSessionRequest`.
195#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
196#[serde(rename_all = "camelCase")]
197pub struct UpdateAgentProviderSessionRequest {
198    /// The `session_id` field.
199    pub session_id: String,
200    /// The `client_ref` field.
201    pub client_ref: String,
202    /// The `state` field.
203    pub state: AgentSessionState,
204    /// The `metadata` field; None when unset.
205    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
206    /// The `provider_name` field.
207    pub provider_name: String,
208}