pub struct MemoryPack { /* private fields */ }Expand description
Pack implementation providing memory.remember and memory.recall verbs.
Implementations§
Source§impl MemoryPack
impl MemoryPack
Sourcepub fn new(runtime: KhiveRuntime) -> Self
pub fn new(runtime: KhiveRuntime) -> Self
Create a memory pack with default recall policy, ANN state, and query cache.
See crates/khive-pack-memory/docs/api/pack-integration.md.
Trait Implementations§
Source§impl Pack for MemoryPack
impl Pack for MemoryPack
Source§const SCHEMA_PLAN: Option<PackSchemaPlan>
const SCHEMA_PLAN: Option<PackSchemaPlan>
Pack-owned durable ANN epoch schema, applied during registry boot.
Source§const NOTE_KINDS: &'static [&'static str]
const NOTE_KINDS: &'static [&'static str]
Source§const ENTITY_KINDS: &'static [&'static str]
const ENTITY_KINDS: &'static [&'static str]
Source§const HANDLERS: &'static [HandlerDef]
const HANDLERS: &'static [HandlerDef]
Source§const REQUIRES: &'static [&'static str]
const REQUIRES: &'static [&'static str]
Source§const EDGE_RULES: &'static [EdgeEndpointRule] = _
const EDGE_RULES: &'static [EdgeEndpointRule] = _
Source§const ENTITY_TYPES: &'static [EntityTypeDef] = _
const ENTITY_TYPES: &'static [EntityTypeDef] = _
(EntityKind, entity_type) registry (the entity_type axis is distinct from and
finer-grained than the closed EntityKind
taxonomy — see khive-types::entity_type::EntityTypeRegistry). Read moreSource§const NOTE_KIND_SPECS: &'static [NoteKindSpec] = _
const NOTE_KIND_SPECS: &'static [NoteKindSpec] = _
Source§const VALIDATION_RULES: &'static [&'static str] = _
const VALIDATION_RULES: &'static [&'static str] = _
Source§impl PackRuntime for MemoryPack
impl PackRuntime for MemoryPack
Source§fn registered_embedding_model_names(&self) -> Vec<String>
fn registered_embedding_model_names(&self) -> Vec<String>
Report registered models for remember’s dispatch resource accounting.
Source§fn register_note_mutation_hook(&self, _runtime: &KhiveRuntime)
fn register_note_mutation_hook(&self, _runtime: &KhiveRuntime)
Install memory-note generation bumps on this pack’s own runtime.
Generic KG mutation paths preserve the stale graph and schedule replacement. See
crates/khive-pack-memory/docs/api/pack-integration.md.
Source§fn note_kinds(&self) -> &'static [&'static str]
fn note_kinds(&self) -> &'static [&'static str]
<Self as Pack>::NOTE_KINDS.Source§fn entity_kinds(&self) -> &'static [&'static str]
fn entity_kinds(&self) -> &'static [&'static str]
<Self as Pack>::ENTITY_KINDS.Source§fn handlers(&self) -> &'static [HandlerDef]
fn handlers(&self) -> &'static [HandlerDef]
<Self as Pack>::HANDLERS.Source§fn requires(&self) -> &'static [&'static str]
fn requires(&self) -> &'static [&'static str]
Source§fn schema_plan(&self) -> SchemaPlan
fn schema_plan(&self) -> SchemaPlan
Source§fn warm<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn warm<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn dispatch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
registry: &'life2 VerbRegistry,
token: &'life3 NamespaceToken,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dispatch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
verb: &'life1 str,
params: Value,
registry: &'life2 VerbRegistry,
token: &'life3 NamespaceToken,
) -> Pin<Box<dyn Future<Output = Result<Value, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn edge_rules(&self) -> &'static [EdgeEndpointRule]
fn edge_rules(&self) -> &'static [EdgeEndpointRule]
<Self as Pack>::EDGE_RULES.
Defaults to empty so existing packs that don’t extend the edge contract
can ignore it.Source§fn entity_types(&self) -> &'static [EntityTypeDef]
fn entity_types(&self) -> &'static [EntityTypeDef]
<Self as Pack>::ENTITY_TYPES.
Defaults to empty so existing packs that don’t extend the entity_type
registry can ignore it.Source§fn note_kind_specs(&self) -> &'static [NoteKindSpec]
fn note_kind_specs(&self) -> &'static [NoteKindSpec]
Source§fn kind_hook(&self, _kind: &str) -> Option<Arc<dyn KindHook>>
fn kind_hook(&self, _kind: &str) -> Option<Arc<dyn KindHook>>
Source§fn validation_rules(&self) -> &'static [ValidationRule]
fn validation_rules(&self) -> &'static [ValidationRule]
Source§fn register_embedders(&self, _runtime: &KhiveRuntime)
fn register_embedders(&self, _runtime: &KhiveRuntime)
KhiveRuntime::embedder(name)
resolves provider names declared here. Default no-op — packs that only use
built-in lattice models do not need to override this.
See docs/api/pack.md#register_embedders for a usage example.Source§fn register_entity_type_validator(&self, _runtime: &KhiveRuntime)
fn register_entity_type_validator(&self, _runtime: &KhiveRuntime)
create_many/create_entity reject unregistered entity_type values at the
runtime layer. Default no-op leaves the validator absent (skip-when-None).
See docs/api/pack.md#register_entity_type_validator for the two-hook compatibility contract.Source§fn register_entity_type_validator_with_types(
&self,
runtime: &KhiveRuntime,
_pack_entity_types: &[EntityTypeDef],
)
fn register_entity_type_validator_with_types( &self, runtime: &KhiveRuntime, _pack_entity_types: &[EntityTypeDef], )
ENTITY_TYPES (VerbRegistry::all_entity_types).
Defaults to calling register_entity_type_validator
with just the runtime. call_register_entity_type_validators calls this hook, not
the simpler one — override this to receive the composed vocabulary.
See docs/api/pack.md#register_entity_type_validator for the two-hook compatibility contract.Source§impl PackTunable for MemoryPack
Brain tuning maps relevance, salience, and temporal posterior means to recall weights.
impl PackTunable for MemoryPack
Brain tuning maps relevance, salience, and temporal posterior means to recall weights.
Projection is pure; applying a projected config validates it before replacing the active
value. See crates/khive-pack-memory/docs/api/pack-integration.md.
Source§fn project_config(&self, state: &BalancedRecallState) -> Value
fn project_config(&self, state: &BalancedRecallState) -> Value
Project posterior means into a recall config, retaining active values when absent.
Source§fn apply_config(&self, config: Value) -> Result<(), RuntimeError>
fn apply_config(&self, config: Value) -> Result<(), RuntimeError>
Deserialize, validate, and atomically install a projected recall config.
fn parameter_space(&self) -> ParameterSpace
Auto Trait Implementations§
impl !Freeze for MemoryPack
impl !RefUnwindSafe for MemoryPack
impl !UnwindSafe for MemoryPack
impl Send for MemoryPack
impl Sync for MemoryPack
impl Unpin for MemoryPack
impl UnsafeUnpin for MemoryPack
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> 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