pub struct GoalSlotRecord {
pub slot: usize,
pub text: String,
pub source: GoalSource,
pub updated_at: DateTime<Utc>,
}Expand description
A serialisable snapshot of one occupied goal slot, as
TranscriptRecord.goals and session.get_goals (#2350) expose it.
Why: agent_loop::goals::GoalSlot carries the slot’s content but not its
own index (it lives at a position in GoalSlots’s internal array); the
wire shape needs the 1-based slot alongside the content so a client can
refer back to it in a subsequent session.set_goal/session.clear_goal
call without re-deriving the index.
What: slot (1-based), text, source, updated_at — field-for-field
from GoalSlot plus the index GoalSlots::occupied pairs it with.
Test: session::registry_tests::get_transcript_round_trips_goal_state,
session::registry_tests::get_goals_returns_operator_and_model_sources.
Fields§
§slot: usize§text: String§source: GoalSource§updated_at: DateTime<Utc>Implementations§
Source§impl GoalSlotRecord
impl GoalSlotRecord
Sourcepub fn from_slot(slot: usize, goal: GoalSlot) -> Self
pub fn from_slot(slot: usize, goal: GoalSlot) -> Self
Build a GoalSlotRecord from an agent_loop::goals::GoalSlots::occupied
pair.
Why: the one place that maps the in-process GoalSlot shape onto the
wire DTO, so session::registry’s get_transcript/get_goals can
never independently drift on field mapping.
What: copies slot/text/source/updated_at verbatim.
Trait Implementations§
Source§impl Clone for GoalSlotRecord
impl Clone for GoalSlotRecord
Source§fn clone(&self) -> GoalSlotRecord
fn clone(&self) -> GoalSlotRecord
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 GoalSlotRecord
impl Debug for GoalSlotRecord
Source§impl<'de> Deserialize<'de> for GoalSlotRecord
impl<'de> Deserialize<'de> for GoalSlotRecord
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>,
Auto Trait Implementations§
impl Freeze for GoalSlotRecord
impl RefUnwindSafe for GoalSlotRecord
impl Send for GoalSlotRecord
impl Sync for GoalSlotRecord
impl Unpin for GoalSlotRecord
impl UnsafeUnpin for GoalSlotRecord
impl UnwindSafe for GoalSlotRecord
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>,
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