muse_code_sdk/msp/view/item_background_terminal_completion.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `backgroundTerminalCompletion`: the facts the Finished cell renders. The
7/// fold reads them from the inbox terminal record and the backgrounded call it
8/// names; every member is required (empty output serializes as `""`, never
9/// absent) except `exit_code` and `reason`, each absent when the terminal
10/// carries none.
11#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
12#[serde(rename_all = "camelCase")]
13#[non_exhaustive]
14pub struct BackgroundTerminalCompletion {
15 /// The backgrounded call's call id: the live/history correlation key behind
16 /// the skip-when-minted rule.
17 pub tool_call_id: String,
18 /// The title text gate-off shows for the backgrounded command.
19 pub command: String,
20 /// One of `completed`, `failed`, `cancelled`, `timedOut`, `rejected`.
21 pub terminal_status: String,
22 /// The completion text; empty when the terminal carries none.
23 pub output: String,
24 /// True when `output` is a prefix of the terminal text.
25 pub output_truncated: bool,
26 /// The process exit code from the terminal record's `exit_code: ` line;
27 /// absent when the terminal carries none. `i32`, the gate-off frozen-header
28 /// twin's width (`BackgroundTerminalTailTerminal.exit_code`). Old clients
29 /// ignore the unknown member.
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub exit_code: Option<i32>,
32 /// The terminal's reason from the terminal record's `reason: ` line,
33 /// trimmed like gate-off's parse; absent when the terminal carries none or
34 /// an empty one. Old clients ignore the unknown member.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub reason: Option<String>,
37}