pub enum Op<'a> {
Remember {
now: u64,
valid_from: u64,
entity: Option<&'a str>,
text: &'a str,
tags: Vec<&'a str>,
links: Vec<(&'a str, &'a str)>,
vector: Vec<f32>,
metadata: Vec<(&'a str, &'a str)>,
revises: FactId,
assigned: FactId,
},
Forget {
now: u64,
fact: FactId,
},
Link {
now: u64,
src: &'a str,
rel: &'a str,
dst: &'a str,
provenance: FactId,
},
Maintain {
now: u64,
},
}Expand description
One decoded engine operation (op table). Revise is
Remember with revises set — the two share a payload, only the op
byte differs.
Not Eq: the raw f32 vector rides along so replay can re-quantize
it deterministically, and f32 is only PartialEq.
Variants§
Remember
Op 1/2: a new fact (op 2 additionally closes revises).
Fields
valid_from: u64Resolved validity start (the engine defaults it before journaling — replay never re-derives).
Tags, verbatim.
vector: Vec<f32>The raw embedding as remembered (empty = none). Stored pre-quantization so replay re-quantizes with the same pure function and reproduces every slot byte for byte.
metadata: Vec<(&'a str, &'a str)>Metadata key→value pairs as remembered (empty = none). Replay
re-canonicalizes them (sorts, dedups) the same way remember did,
so the stored blob is reproduced byte for byte.
revises: FactIdPredecessor being revised (crate::id::FactId::NONE for op 1).
Forget
Op 3: tombstone a fact.
Link
Op 4: upsert a typed edge between two entities.
Fields
provenance: FactIdProvenance fact, or crate::id::FactId::NONE.
Maintain
Op 5: marker that a maintenance pass ran at this point.