use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use crate::agent::RemoteAgentBaseWithFallbacks;
use crate::functions::{FullRemoteFunction, RemoteProfile};
use crate::swarm::RemoteSwarmBase;
use crate::{RemotePath, RemotePathCommitOptional};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "client_objectiveai_mcp.retrieve.Kind")]
#[serde(rename_all = "snake_case")]
pub enum Kind {
Agents,
Swarms,
Functions,
Profiles,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "client_objectiveai_mcp.retrieve.Request")]
#[serde(tag = "op", rename_all = "snake_case")]
pub enum Request {
#[schemars(title = "GetAgent")]
GetAgent { path: RemotePath },
#[schemars(title = "GetSwarm")]
GetSwarm { path: RemotePath },
#[schemars(title = "GetFunction")]
GetFunction { path: RemotePath },
#[schemars(title = "GetProfile")]
GetProfile { path: RemotePath },
#[schemars(title = "ResolveLatest")]
ResolveLatest {
kind: Kind,
path: RemotePathCommitOptional,
},
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "client_objectiveai_mcp.retrieve.Response")]
#[serde(tag = "op", rename_all = "snake_case")]
pub enum Response {
#[schemars(title = "GetAgent")]
GetAgent {
agent: Option<RemoteAgentBaseWithFallbacks>,
},
#[schemars(title = "GetSwarm")]
GetSwarm { swarm: Option<RemoteSwarmBase> },
#[schemars(title = "GetFunction")]
GetFunction {
function: Option<FullRemoteFunction>,
},
#[schemars(title = "GetProfile")]
GetProfile { profile: Option<RemoteProfile> },
#[schemars(title = "ResolveLatest")]
ResolveLatest { path: Option<RemotePath> },
}