pub struct LearningPayload {
pub id: String,
pub agent_id: String,
pub branch_id: Option<String>,
pub category: String,
pub title: String,
pub body: Value,
pub timestamp: String,
}Expand description
Payload for agent.learning messages.
Carries one structured learning record produced by the broker’s learnings
aggregator (see crate::broker::learnings). The shape is fixed across
all categories: category is an open string tag (consumers filter on
it; descendant changes may add values without a broker change), and body
is a category-specific structured object typed as serde_json::Value.
branch_id is optional and omitted from the wire bytes when None
(cross-cutting records such as permission patterns and conflict pairs are
not scoped to a single branch). The id is the deterministic dedup hash
produced by crate::broker::learnings::LearningRecord::deterministic_id.
Note: unlike the other agent.* variants, the sender agent_id lives in
the payload rather than the envelope (this variant has no separate
envelope agent_id). BrokerMessage::agent_id resolves it from here.
Fields§
§id: StringDeterministic dedup id — a stable 16-hex-char (64-bit) hash over the record’s canonical serialisation. Stable for the same logical record within a UTC hour.
agent_id: StringThe publishing agent id (typically "supervisor", since the
aggregator runs in the broker/supervisor context).
branch_id: Option<String>Branch the learning is scoped to; None (and omitted on the wire) for
cross-cutting records.
category: StringOpen category tag — one of conflict_event, stuck_duration,
recovery_cycles, permission_pattern, or any value added by a
descendant change.
title: StringShort human-readable summary.
body: ValueCategory-specific structured body.
timestamp: StringISO 8601 UTC timestamp.
Trait Implementations§
Source§impl Clone for LearningPayload
impl Clone for LearningPayload
Source§fn clone(&self) -> LearningPayload
fn clone(&self) -> LearningPayload
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 LearningPayload
impl Debug for LearningPayload
Source§impl<'de> Deserialize<'de> for LearningPayload
impl<'de> Deserialize<'de> for LearningPayload
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 LearningPayload
impl PartialEq for LearningPayload
Source§fn eq(&self, other: &LearningPayload) -> bool
fn eq(&self, other: &LearningPayload) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LearningPayload
impl Serialize for LearningPayload
impl StructuralPartialEq for LearningPayload
Auto Trait Implementations§
impl Freeze for LearningPayload
impl RefUnwindSafe for LearningPayload
impl Send for LearningPayload
impl Sync for LearningPayload
impl Unpin for LearningPayload
impl UnsafeUnpin for LearningPayload
impl UnwindSafe for LearningPayload
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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