Skip to main content

objectiveai_sdk/cli/output/notification/functions/inventions/recursive/
create.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// Result of `functions inventions recursive create`.
5///
6/// Wire: `{"type":"notification","inventions":[...InventionResultItem...]}`.
7#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
8#[schemars(rename = "cli.output.notification.functions.inventions.recursive.Inventions")]
9pub struct Inventions {
10    pub inventions: Vec<InventionResultItem>,
11}
12
13/// One entry per invention produced. `name` is the human-readable
14/// state label (e.g. `"alpha_scalar_leaf"`); `path` is set only when
15/// the invention successfully resolved to a remote definition
16/// (`None` if it failed). Per-invention failures surface live via
17/// `Output::Error` notifications during streaming, not on this struct.
18#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
19#[schemars(rename = "cli.output.notification.functions.inventions.recursive.InventionResultItem")]
20pub struct InventionResultItem {
21    pub name: String,
22    #[serde(default, skip_serializing_if = "Option::is_none")]
23    #[schemars(extend("omitempty" = true))]
24    pub path: Option<crate::RemotePath>,
25}