pub enum PageKind {
Bootstrap,
Constraint,
Plan,
Preference,
Evidence,
Conversation,
}Expand description
ClawVM page classification for a single chat-history entry.
Kinds are stable identifiers, not flags — a message has exactly one
kind. The degradation path and minimum-fidelity invariant are
encoded on PageKind itself (see
min_fidelity and
degradation_path).
Variants§
Bootstrap
System prompts and procedural directives. Losing them causes “forgot its protocol” failures (ClawVM §2).
Constraint
Hard-pinned invariants the agent must honour — codetether’s
.tasks.jsonl goal entries map here natively.
Plan
Current objective and step. Live plan state.
Preference
Scoped user or project preferences.
Evidence
Tool outputs. Pointer-safe (Phase B): can degrade to a handle backed by the MinIO history sink.
Conversation
User / assistant conversation spans. The bulk of the transcript.
Implementations§
Source§impl PageKind
impl PageKind
Sourcepub fn min_fidelity(self) -> ResidencyLevel
pub fn min_fidelity(self) -> ResidencyLevel
The minimum-fidelity level this kind is allowed to drop to.
Compression / eviction strategies that would drop a page below its minimum fidelity must be rejected (ClawVM §3), not silently applied.
§Examples
use codetether_agent::session::pages::{PageKind, ResidencyLevel};
assert_eq!(PageKind::Constraint.min_fidelity(), ResidencyLevel::Structured);
assert_eq!(PageKind::Evidence.min_fidelity(), ResidencyLevel::Pointer);Sourcepub fn degradation_path(self) -> &'static [ResidencyLevel]
pub fn degradation_path(self) -> &'static [ResidencyLevel]
The ordered sequence of residency levels this kind is allowed to visit, from full down to its minimum fidelity.
Used by Phase B’s DerivePolicy::Incremental to pick the next
marginal downgrade when the token budget is tight.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PageKind
impl<'de> Deserialize<'de> for PageKind
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 Copy for PageKind
impl Eq for PageKind
impl StructuralPartialEq for PageKind
Auto Trait Implementations§
impl Freeze for PageKind
impl RefUnwindSafe for PageKind
impl Send for PageKind
impl Sync for PageKind
impl Unpin for PageKind
impl UnsafeUnpin for PageKind
impl UnwindSafe for PageKind
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request