pub enum FilterTerm {
Exists(String),
Eq(String, Value),
In(String, Vec<Value>),
Range {
key: String,
min: Option<f64>,
max: Option<f64>,
},
}Expand description
One AND-ed condition applied to a candidate memory’s metadata during
filtered recall (Phase 12.6). Terms are combined conjunctively — a
memory passes the filter only if every term evaluates true against
its metadata map. See Filter for the surface API.
Values use serde_json::Value so the same term shape serializes
cleanly through the MCP / Python / CLI bridges without a parallel
enum per surface.
Variants§
Exists(String)
The memory’s metadata[key] must be set to any value.
Eq(String, Value)
metadata[key] must equal this JSON value (strict JSON equality:
strings compare case-sensitively, numbers compare as f64).
In(String, Vec<Value>)
metadata[key] must equal one of these JSON values.
Range
metadata[key] must be a number in [min, max] (inclusive on
both ends; None on either bound means “no bound on that side”).
A non-numeric metadata value fails the term.