Skip to main content

plexus_substrate/activations/bash/
types.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// Stream events from bash command execution
5#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
6#[serde(tag = "type", rename_all = "snake_case")]
7pub enum BashEvent {
8    /// Standard output line
9    Stdout { line: String },
10    /// Standard error line
11    Stderr { line: String },
12    /// Exit code when process completes
13    Exit { code: i32 },
14}
15
16// Keep the old name as an alias for backwards compatibility
17pub type BashOutput = BashEvent;
18
19/// Error events from bash execution
20#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
21pub struct BashError {
22    pub message: String,
23}