pub struct PendingSuggestion {
pub pid: u32,
pub action: String,
pub message: Option<String>,
pub reasoning: String,
pub confidence: f64,
pub suggested_at: u64,
}Expand description
One pending brain suggestion the user can accept or reject. Mirrors the
binary’s brain::client::BrainSuggestion without exposing brain types.
Fields§
§pid: u32PID of the session this suggestion applies to.
action: StringString label of the suggested action — "approve", "deny",
"send", "terminate". String to avoid pulling RuleAction’s enum
shape into the contract (it’s already in claudectl-core::rules but
callers may want to add new categories without bumping the trait).
message: Option<String>Suggested message body (a prompt to inject, a rationale to surface).
reasoning: StringWhy the brain suggested this — used for the detail panel and the rejection log.
confidence: f640.0–1.0 confidence the brain assigned.
suggested_at: u64Epoch seconds when the suggestion was created. Drives time-to-correct telemetry.
Trait Implementations§
Source§impl Clone for PendingSuggestion
impl Clone for PendingSuggestion
Source§impl Debug for PendingSuggestion
impl Debug for PendingSuggestion
Source§impl<'de> Deserialize<'de> for PendingSuggestion
impl<'de> Deserialize<'de> for PendingSuggestion
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
Auto Trait Implementations§
impl Freeze for PendingSuggestion
impl RefUnwindSafe for PendingSuggestion
impl Send for PendingSuggestion
impl Sync for PendingSuggestion
impl Unpin for PendingSuggestion
impl UnsafeUnpin for PendingSuggestion
impl UnwindSafe for PendingSuggestion
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<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