pub struct AdvertisedContext {
pub plan_path: Option<PathBuf>,
pub safety_mode: SafetyMode,
pub model_id: String,
}Expand description
The mode-defining facts the model was last told about, snapshotted at
each dispatch by the context-delta injector
(reducer::advertise_context_changes): the reducer diffs live state
against this and injects one persistent history marker per change, then
re-stamps it. One un-bypassable announcement path for plan entry/exit,
safety-mode flips, and model swaps — transitions themselves stay
message-log-free (the codex snapshot+diff pattern).
Lives on ConversationHistory (persisted with the transcript) so a
resumed session diffs against what THAT conversation’s model last saw,
and /clear/fresh forks start from None (= seed silently, announce
nothing). Plan permissions stay out: a /plan config retune is already
reflected live in the system prompt and never contradicts history.
Fields§
§plan_path: Option<PathBuf>Some(plan_path) while the model has been told it is planning.
safety_mode: SafetyMode§model_id: StringImplementations§
Trait Implementations§
Source§impl Clone for AdvertisedContext
impl Clone for AdvertisedContext
Source§fn clone(&self) -> AdvertisedContext
fn clone(&self) -> AdvertisedContext
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 AdvertisedContext
impl Debug for AdvertisedContext
Source§impl<'de> Deserialize<'de> for AdvertisedContext
impl<'de> Deserialize<'de> for AdvertisedContext
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>,
impl Eq for AdvertisedContext
Source§impl PartialEq for AdvertisedContext
impl PartialEq for AdvertisedContext
Source§impl Serialize for AdvertisedContext
impl Serialize for AdvertisedContext
impl StructuralPartialEq for AdvertisedContext
Auto Trait Implementations§
impl Freeze for AdvertisedContext
impl RefUnwindSafe for AdvertisedContext
impl Send for AdvertisedContext
impl Sync for AdvertisedContext
impl Unpin for AdvertisedContext
impl UnsafeUnpin for AdvertisedContext
impl UnwindSafe for AdvertisedContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.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