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 · 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§impl Serialize for ScriptConfig
impl Serialize for ScriptConfig
impl StructuralPartialEq for ScriptConfig
Auto Trait Implementations§
impl Freeze for ScriptConfig
impl RefUnwindSafe for ScriptConfig
impl Send for ScriptConfig
impl Sync for ScriptConfig
impl Unpin for ScriptConfig
impl UnsafeUnpin for ScriptConfig
impl UnwindSafe for ScriptConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more