use clap::Subcommand;
#[derive(Subcommand)]
#[command(rename_all = "verbatim")]
pub enum GetCommand {
#[command(name = "get")]
Get,
}
#[derive(Subcommand)]
#[command(rename_all = "verbatim")]
pub enum Commands {
#[command(name = "list")]
List,
AlphaScalarBranchState {
#[command(subcommand)]
command: GetCommand,
},
AlphaScalarLeafState {
#[command(subcommand)]
command: GetCommand,
},
AlphaScalarState {
#[command(subcommand)]
command: GetCommand,
},
AlphaVectorBranchState {
#[command(subcommand)]
command: GetCommand,
},
AlphaVectorLeafState {
#[command(subcommand)]
command: GetCommand,
},
AlphaVectorState {
#[command(subcommand)]
command: GetCommand,
},
GetFunctionInventionStateResponse {
#[command(subcommand)]
command: GetCommand,
},
InputSchema {
#[command(subcommand)]
command: GetCommand,
},
Params {
#[command(subcommand)]
command: GetCommand,
},
ParamsState {
#[command(subcommand)]
command: GetCommand,
},
ParamsStateOrRemoteCommitOptional {
#[command(subcommand)]
command: GetCommand,
},
State {
#[command(subcommand)]
command: GetCommand,
},
}
impl Commands {
pub async fn handle(self, handle: &objectiveai_cli_sdk::output::Handle) -> Result<(), crate::error::Error> {
match self {
Commands::List => {
const NAMES: &[&str] = &["AlphaScalarBranchState", "AlphaScalarLeafState", "AlphaScalarState", "AlphaVectorBranchState", "AlphaVectorLeafState", "AlphaVectorState", "GetFunctionInventionStateResponse", "InputSchema", "Params", "ParamsState", "ParamsStateOrRemoteCommitOptional", "State"];
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schemas>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schemas {
schemas: NAMES.iter().map(|s| s.to_string()).collect(),
},
},
).emit(handle).await;
Ok(())
}
Commands::AlphaScalarBranchState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaScalarBranchState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::AlphaScalarLeafState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaScalarLeafState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::AlphaScalarState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaScalarState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::AlphaVectorBranchState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaVectorBranchState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::AlphaVectorLeafState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaVectorLeafState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::AlphaVectorState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.AlphaVectorState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::GetFunctionInventionStateResponse { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.GetFunctionInventionStateResponse.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::InputSchema { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.InputSchema.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::Params { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.Params.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::ParamsState { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.ParamsState.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::ParamsStateOrRemoteCommitOptional { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.ParamsStateOrRemoteCommitOptional.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
Commands::State { .. } => {
let schema: serde_json::Value = serde_json::from_str(
include_str!("../../../../../../objectiveai-json-schema/functions.inventions.state.State.json"),
).expect("embedded JSON Schema must parse");
objectiveai_cli_sdk::output::Output::<objectiveai_cli_sdk::output::Schema>::Notification(
objectiveai_cli_sdk::output::Notification {
value: objectiveai_cli_sdk::output::Schema { schema },
},
).emit(handle).await;
Ok(())
}
}
}
}