pub struct ObservationInput {
pub session_pid: u32,
pub project: String,
pub tool: Option<String>,
pub command: Option<String>,
pub observed_action: String,
}Expand description
What the TUI needs to record alongside a user action. Core-owned so the
trait doesn’t drag brain::decisions::log_observation’s argument list
upward into the TUI surface.
Fields§
§session_pid: u32PID of the session the observation belongs to.
project: StringProject label (usually the cwd basename).
tool: Option<String>Tool the action targeted, when applicable (“Bash”, “Write”, …).
command: Option<String>The command or input string the user ran/sent.
observed_action: StringClassification — "user_approve", "user_input", "rule_approve",
"rule_deny", and friends. Kept as a string so callers can introduce
new categories without a trait change.
Trait Implementations§
Source§impl Clone for ObservationInput
impl Clone for ObservationInput
Source§impl Debug for ObservationInput
impl Debug for ObservationInput
Source§impl<'de> Deserialize<'de> for ObservationInput
impl<'de> Deserialize<'de> for ObservationInput
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ObservationInput
Source§impl PartialEq for ObservationInput
impl PartialEq for ObservationInput
Auto Trait Implementations§
impl Freeze for ObservationInput
impl RefUnwindSafe for ObservationInput
impl Send for ObservationInput
impl Sync for ObservationInput
impl Unpin for ObservationInput
impl UnsafeUnpin for ObservationInput
impl UnwindSafe for ObservationInput
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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