gestalt-sdk 0.0.1-alpha.25

Rust SDK scaffolding and generated protocol bindings for Gestalt executable providers
Documentation
// Code generated by sdkgen. DO NOT EDIT.

//! Generated native types and clients for agent.proto.

use crate::agent::{
    AgentExecutionStatus, AgentMessage, AgentOutput, AgentSessionStartConfig, AgentSessionState,
    AgentToolConfig, AgentWorkspace, PreparedAgentWorkspace,
};

/// Native message type for `gestalt.provider.v1.CancelAgentProviderTurnRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CancelAgentProviderTurnRequest {
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `reason` field.
    pub reason: String,
    /// The `provider_name` field.
    pub provider_name: String,
    /// The `session_id` field.
    pub session_id: String,
}

/// Native message type for `gestalt.provider.v1.CreateAgentProviderSessionRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateAgentProviderSessionRequest {
    /// The provider mints the session id returned on AgentSession. Creation is
    /// idempotent on idempotency_key scoped per caller (context.subject.id):
    /// a replayed key returns the existing session, an empty key always creates.
    /// Idempotency is scoped to the provider's session store.
    ///
    /// The `idempotency_key` field.
    pub idempotency_key: String,
    /// The `model` field.
    pub model: String,
    /// The `client_ref` field.
    pub client_ref: String,
    /// The `metadata` field; None when unset.
    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
    /// The `session_start` field; None when unset.
    pub session_start: Option<AgentSessionStartConfig>,
    /// The `prepared_workspace` field; None when unset.
    pub prepared_workspace: Option<PreparedAgentWorkspace>,
    /// The `provider_name` field.
    pub provider_name: String,
    /// The `workspace` field; None when unset.
    pub workspace: Option<AgentWorkspace>,
    /// The `tools` field; None when unset.
    pub tools: Option<AgentToolConfig>,
}

/// Native message type for `gestalt.provider.v1.CreateAgentProviderTurnRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateAgentProviderTurnRequest {
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `session_id` field.
    pub session_id: String,
    /// The `idempotency_key` field.
    pub idempotency_key: String,
    /// The `model` field.
    pub model: String,
    /// The `messages` field.
    pub messages: Vec<AgentMessage>,
    /// The `metadata` field; None when unset.
    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
    /// The `execution_ref` field.
    pub execution_ref: String,
    /// The `model_options` field; None when unset.
    pub model_options: Option<serde_json::Map<String, serde_json::Value>>,
    /// Optional provider-owned turn execution budget, in seconds.
    /// If unset or zero, the provider chooses its own execution timeout. This does
    /// not control the CreateTurn RPC deadline.
    ///
    /// The `timeout_seconds` field.
    pub timeout_seconds: i32,
    /// The `output` field; None when unset.
    pub output: Option<AgentOutput>,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.GetAgentProviderSessionRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetAgentProviderSessionRequest {
    /// The `session_id` field.
    pub session_id: String,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.GetAgentProviderTurnRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetAgentProviderTurnRequest {
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `provider_name` field.
    pub provider_name: String,
    /// The `session_id` field.
    pub session_id: String,
}

/// Native message type for `gestalt.provider.v1.ListAgentProviderInteractionsRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListAgentProviderInteractionsRequest {
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.ListAgentProviderSessionsRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListAgentProviderSessionsRequest {
    /// The `session_ids` field.
    pub session_ids: Vec<String>,
    /// The `state` field.
    pub state: AgentSessionState,
    /// When non-zero and bounded_list_hydration is supported, cap results after
    /// ordering sessions newest-first by last_turn_at, updated_at, then created_at.
    ///
    /// The `limit` field.
    pub limit: i32,
    /// When true and bounded_list_hydration is supported, omit heavy fields such as
    /// metadata unless exact session_ids require direct lookup.
    ///
    /// The `summary_only` field.
    pub summary_only: bool,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.ListAgentProviderTurnEventsRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListAgentProviderTurnEventsRequest {
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `after_seq` field.
    pub after_seq: i64,
    /// The `limit` field.
    pub limit: i32,
    /// The `provider_name` field.
    pub provider_name: String,
    /// The `session_id` field.
    pub session_id: String,
}

/// Native message type for `gestalt.provider.v1.ListAgentProviderTurnsRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ListAgentProviderTurnsRequest {
    /// The `session_id` field.
    pub session_id: String,
    /// The `turn_ids` field.
    pub turn_ids: Vec<String>,
    /// The `status` field.
    pub status: AgentExecutionStatus,
    /// When non-zero and bounded_list_hydration is supported, cap results after
    /// ordering turns newest-first by created_at.
    ///
    /// The `limit` field.
    pub limit: i32,
    /// When true and bounded_list_hydration is supported, omit heavy fields such as
    /// messages, output text, and structured output unless exact turn_ids require
    /// direct lookup.
    ///
    /// The `summary_only` field.
    pub summary_only: bool,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.ResolveAgentProviderInteractionRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ResolveAgentProviderInteractionRequest {
    /// The `interaction_id` field.
    pub interaction_id: String,
    /// The `resolution` field; None when unset.
    pub resolution: Option<serde_json::Map<String, serde_json::Value>>,
    /// The `turn_id` field.
    pub turn_id: String,
    /// The `provider_name` field.
    pub provider_name: String,
}

/// Native message type for `gestalt.provider.v1.UpdateAgentProviderSessionRequest`.
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateAgentProviderSessionRequest {
    /// The `session_id` field.
    pub session_id: String,
    /// The `client_ref` field.
    pub client_ref: String,
    /// The `state` field.
    pub state: AgentSessionState,
    /// The `metadata` field; None when unset.
    pub metadata: Option<serde_json::Map<String, serde_json::Value>>,
    /// The `provider_name` field.
    pub provider_name: String,
}