Skip to main content

objectiveai_cli_sdk/output/notification/functions/inventions/recursive/
create.rs

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