Skip to main content

Module reader

Module reader 

Source
Expand description

MicroscopeReader — high-performance memory-mapped reader for the binary index.

Structs§

MicroscopeReader
High-performance memory-mapped reader for the Microscope index.
RadialResult
A single result from radial search.
ResultSet
ResultSet from radial search: primary hit + distance-weighted neighbors.

Enums§

DataStore
Backing store for block data — either memory-mapped or decompressed in-memory.

Constants§

EMOTION_DIMS
Emotion dimension labels for the 21D emotion vector.
EMOTION_VECTOR_SIZE

Functions§

append_emotion_log
Append an emotion vector to the emotion log (emotion_log.bin). Format: [u64 timestamp_ms] [f32; 21 emotion] [u32 text_len] [bytes text]
build_emotions_from_log
Build emotions.bin from the emotion log and main index. Reads emotion_log.bin and maps each entry to the closest main-index block.
contains_ci
Allocation-free, case-insensitive substring test.
emotional_similarity
Cosine similarity between two 21D emotion vectors.
format_emotion
Format an emotion vector as a human-readable string.
layer_color
load_emotion_lookup
Load emotions.bin and return a lookup closure. emotions.bin format: flat array of [f32; 21] per block index.
parse_imp_marker
Parse a leading (imp=N) marker from a layer entry.
print_append_result
Display a single append-log result entry.
read_append_log
relevance_score
Score how well a block answers a text query.
store_memory
store_memory_temporary
Store memory to append log and timeline only (NOT to layer files). Used for temporary/internal thoughts that should not persist through rebuilds.
store_memory_with_embedding
Store a memory whose embedding the caller has already computed.
store_memory_with_emotion
Variant with emotion vector.
store_memory_with_status
write_emotion
Write a single block’s emotion vector to emotions.bin. The file is grown to fit the block index if needed.
write_emotions_batch
Write many block emotions with a single read-modify-write.