pub struct ScriptConfig {Show 14 fields
pub name: String,
pub enabled: bool,
pub script_path: String,
pub args: Vec<String>,
pub auto_start: bool,
pub restart_policy: RestartPolicy,
pub restart_delay_ms: u64,
pub subscriptions: Vec<String>,
pub env_vars: HashMap<String, String>,
pub allow_write_text: bool,
pub allow_run_command: bool,
pub allow_change_config: bool,
pub write_text_rate_limit: u32,
pub run_command_rate_limit: u32,
}Expand description
Configuration for an external observer script that receives terminal events via JSON protocol.
Fields§
§name: StringHuman-readable name for this script
enabled: boolWhether this script is enabled (default: true)
script_path: StringPath to the script executable
args: Vec<String>Arguments to pass to the script
auto_start: boolWhether to start this script automatically when a tab opens
restart_policy: RestartPolicyPolicy for restarting the script when it exits
restart_delay_ms: u64Delay in milliseconds before restarting (when restart_policy is not Never)
subscriptions: Vec<String>Event types to subscribe to (empty = all events)
env_vars: HashMap<String, String>Additional environment variables to set for the script process
allow_write_text: boolAllow this script to inject text into the active PTY via WriteText.
Defaults to false. Must be explicitly set to true to enable.
When enabled, VT/ANSI escape sequences are stripped before writing
and a rate limit is applied (see write_text_rate_limit).
allow_run_command: boolAllow this script to spawn external processes via RunCommand.
Defaults to false. Must be explicitly set to true to enable.
When enabled, the command is checked against the denylist and a
rate limit is applied (see run_command_rate_limit).
allow_change_config: boolAllow this script to modify runtime configuration via ChangeConfig.
Defaults to false. Must be explicitly set to true to enable.
Only keys in the runtime allowlist may be changed.
write_text_rate_limit: u32Maximum WriteText writes per second (0 = use default of 10/s).
run_command_rate_limit: u32Maximum RunCommand executions per second (0 = use default of 1/s).
Trait Implementations§
Source§impl Clone for ScriptConfig
impl Clone for ScriptConfig
Source§fn clone(&self) -> ScriptConfig
fn clone(&self) -> ScriptConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScriptConfig
impl Debug for ScriptConfig
Source§impl<'de> Deserialize<'de> for ScriptConfig
impl<'de> Deserialize<'de> for ScriptConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ScriptConfig
impl PartialEq for ScriptConfig
Source§fn eq(&self, other: &ScriptConfig) -> bool
fn eq(&self, other: &ScriptConfig) -> bool
self and other values to be equal, and is used by ==.