pub struct AgentShell {
pub agent_id: AgentId,
pub shell_manifest: ShellManifest,
pub unique_layers: Vec<ShellLayer>,
pub pool_digest: Digest,
pub build_seed: u64,
}Expand description
A per-agent compressed context shell.
AgentShell stores turbo-quant compressed KV vectors for tokens that are unique to a specific agent. Shared tokens are referenced from the parent pool by digest, not duplicated.
Fields§
§agent_id: AgentIdAgent identifier.
shell_manifest: ShellManifestShell manifest.
unique_layers: Vec<ShellLayer>Per-layer unique token blocks (turbo-quant compressed).
pool_digest: DigestReference to the parent pool digest.
build_seed: u64Seed used for deterministic codec operations.
Implementations§
Source§impl AgentShell
impl AgentShell
Sourcepub fn attention_topk(
&self,
pool: &SharedKVPool,
layer_idx: usize,
query: &[f32],
top_k: usize,
turbo_config: &TurboConfig,
) -> Result<Vec<AttentionHit>>
pub fn attention_topk( &self, pool: &SharedKVPool, layer_idx: usize, query: &[f32], top_k: usize, turbo_config: &TurboConfig, ) -> Result<Vec<AttentionHit>>
Compute attention over pool + shell for a given query.
Decompresses the shared pool keys and the shell’s unique keys for the specified layer, concatenates them, and returns the top-K token indices with their dot-product scores. Returns a marker indicating whether each hit came from the pool or the shell.
Sourcepub fn attention_topk_compressed(
&self,
pool: &SharedKVPool,
layer_idx: usize,
head_idx: usize,
query: &[f32],
top_k: usize,
) -> Result<CompressedShellAttentionSelection>
pub fn attention_topk_compressed( &self, pool: &SharedKVPool, layer_idx: usize, head_idx: usize, query: &[f32], top_k: usize, ) -> Result<CompressedShellAttentionSelection>
Compute global top-k attention over the compressed cold pool and this agent’s compressed hot shell without full-layer decode.
The method scores cold-pool Fib codes and hot-shell Turbo codes in their compressed forms, selects global top-k candidates, and decodes only the selected value vectors. The receipt is candidate-selection evidence only; model-quality claims still require exact attention/logit/PPL replay.
Trait Implementations§
Source§impl Clone for AgentShell
impl Clone for AgentShell
Source§fn clone(&self) -> AgentShell
fn clone(&self) -> AgentShell
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AgentShell
impl RefUnwindSafe for AgentShell
impl Send for AgentShell
impl Sync for AgentShell
impl Unpin for AgentShell
impl UnsafeUnpin for AgentShell
impl UnwindSafe for AgentShell
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<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> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.