Skip to main content

muse_code_sdk/msp/view/item/object/
workflow.rs

1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use crate::msp::view::item_content::OutputRef;
4use crate::msp::view::item_content::WorkflowChild;
5use crate::msp::view::item_content::WorkflowTokenBudget;
6use serde::Deserialize;
7use serde::Serialize;
8
9/// `workflow` members, flattened into [`Item`](super::Item).
10#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
11#[serde(rename_all = "camelCase")]
12#[non_exhaustive]
13pub struct WorkflowMembers {
14    /// `workflow`: launched entry identity.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub entry_id: Option<String>,
17    /// `workflow`: launched script identity.
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub script_id: Option<String>,
20    /// `workflow`: camelCased `WorkflowLaunchTriggerSource`, verbatim
21    /// (durable runtime vocabulary, e.g. `"modelProposal"`).
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub trigger_source: Option<String>,
24    /// `workflow`: set on resumed launches.
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub resume_from_run_id: Option<String>,
27    /// `workflow`: `true` only while a durable pause fact is in force for the
28    /// run's generation; absent otherwise, never `false`.
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub paused: Option<bool>,
31    /// `workflow`: folded per-child state, keyed by `(childId, attempt)`,
32    /// re-emitted whole on every change — the item `revision` is the ordering
33    /// guard.
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub children: Option<Vec<WorkflowChild>>,
36    /// `workflow`: the reconciled terminal message, set on completion.
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub message: Option<String>,
39    /// `workflow`: the run's launch token budget, set from the launch fact;
40    /// absent when the launch carried none.
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub token_budget: Option<WorkflowTokenBudget>,
43    /// `workflow`: the run-level declared-phase label — the last `Phase`
44    /// detail-row label of the reconciled projection; terminal-only, absent
45    /// while live.
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub declared_phase: Option<String>,
48    /// `workflow`: the human terminal summary projected from the reconciled
49    /// Launch envelope, bounded at the 64 KiB surface budget; terminal-only.
50    #[serde(skip_serializing_if = "Option::is_none")]
51    pub final_summary: Option<String>,
52    /// `workflow`: display-only stop affordance — `true` while the run is open,
53    /// `false` once settled; stopping rides `workflow/cancel`. Authorizes
54    /// nothing.
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub stop_available: Option<bool>,
57    /// `workflow`: one `outputRef`-shaped link per recorded child spawn with an
58    /// objective (`kind: "workflow_child_prompt"`), fetched via
59    /// `item/readOutput`.
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub child_prompt_refs: Option<Vec<OutputRef>>,
62}