Skip to main content

Crate second_brain_core

Crate second_brain_core 

Source

Modules§

api_token
chunk
cold
config
digest
dir_copy
embedding
evidence
index
keys
machine
maintenance
Store invariants, measured and repaired in place.
model_cache
near_duplicates
Near-duplicate distillates: consolidation often distills one fact from several conversations, and the paraphrases crowd each other out of recall’s top-k. The daemon finds the groups and applies a merge written elsewhere (it has no LLM); a pair the writer judged distinct or contradictory is recorded as reviewed so it is not offered again.
private_files
project_path
query
redact
residency
Where a process’s anonymous resident memory goes, per component: model sessions, vector and lexical indexes, SQLite, and what the allocator holds free. Every figure is per process, like the RSS it is compared against.
retrieval
schema
sealed
Files sealed at rest: chunked XChaCha20-Poly1305 under a key the caller holds. A sealed file starts with a header naming the key it was sealed under and a random id for this written version of the file; each 64 KiB chunk is sealed with a nonce made of that id and the chunk index, and authenticated together with the file’s logical name, the chunk index and whether it is the last chunk, so a file that was cut short, reordered or renamed fails to open.
session_dates
When the session behind each memory happened. created_at is the time a row was ingested or distilled, which bulk re-ingests and re-distillation moved by weeks, so recall needs a separate date that only ever comes from evidence of the session itself and is left unknown otherwise.
sqlite_store
store
transcript_archive
write_queue
Writes held on disk for the daemon. An entry is either sealed to the device’s device.pub, keeping only its Label readable, or plaintext, as older binaries and a writer without the recipient write it.