mur_common/agent/
override_record.rs1use serde::{Deserialize, Serialize};
6
7use crate::startup_override::ConfirmedBy;
8
9#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq, Eq)]
11pub struct OverrideFlags {
12 pub no_hitl: bool,
13 pub net_unrestricted: bool,
14 pub full_perms: bool,
15}
16
17impl OverrideFlags {
18 pub fn cli_names(self) -> Vec<&'static str> {
21 [
22 (self.no_hitl, "--no-hitl"),
23 (self.net_unrestricted, "--net=unrestricted"),
24 (self.full_perms, "--full-perms"),
25 ]
26 .into_iter()
27 .filter_map(|(on, name)| on.then_some(name))
28 .collect()
29 }
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
35pub struct OverrideRecord {
36 pub nonce: String,
37 pub flags: OverrideFlags,
38 pub confirmed_by: ConfirmedBy,
39}
40
41#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
44pub struct OverrideRejection {
45 pub nonce: Option<String>,
46 pub reason: String,
47}