v0.11.0 — attachable memory
Attachable memory
A pack is a sealed, signed YantrikDB file that a host database mounts to gain
the knowledge and rules inside — and unmounts to give them back, leaving the host
byte-for-byte as it was.
from yantrikdb import YantrikDB
db = YantrikDB("memory.db", 64)
db.mount_pack("wordpress-expert-0.2.0.ydbpack") # transient
db.install_pack("wordpress-expert-0.2.0.ydbpack") # survives restart
db.pack_context() # rules to inject
db.unmount_pack(pack_id)CLI: yantrikdb pack info|install|list|uninstall|keygen|sign.
This is the release the pack marketplace has been
waiting on. Until now, pip install yantrikdb gave you a build with no
mount_pack at all, so every listing in that catalog was unmountable by anyone
who downloaded it.
Mount is not import
Importing copies rows into the host: it leaves tombstones on removal and
permanently shifts namespace_importance_stats.count, so the host can never be
returned to its prior state. Mounting adds a read-only pool alongside the host's,
merges at recall time, and drops the handle on unmount.
unmount_leaves_host_byte_identical is the test that holds this, and it compares
file bytes rather than row counts — a row count would not have caught the stats
drift, which is precisely why import was the wrong verb.
Three tiers, because knowledge and ability are different mechanisms
| tier | delivery | what it is |
|---|---|---|
| constitution | injected unconditionally | ability |
| corpus | retrieved by similarity | knowledge |
| coverage | advertised topics | what the pack claims |
Measured rather than assumed. Across eight ability tasks on three models,
retrieval alone scored +1 / +1 / +0; the constitution scored +5 / +4 / +5.
Seven of the eight tasks retrieved zero facts — a rule the model must apply is
not a rule it thinks to look up.
Injection is gated on similarity, not the composite score
Ungated top-k injection measured 12/12 → 5/12 on an unrelated control set.
The content was not wrong; the model concluded it was only permitted to answer
from the supplied material and began refusing questions like "what is the capital
of Japan". A similarity floor of 0.55 restores 12/12 with no loss on the pack's
own questions.
It has to be similarity rather than the composite recall score, because composite
folds in importance and recency — near-uniform across a freshly built pack, and
therefore carrying no relevance signal:
| top-1 similarity | top-1 composite | |
|---|---|---|
| on-topic | 0.65 – 0.79 | 0.83 – 0.91 |
| off-topic | 0.09 – 0.45 | 0.37 – 0.69 |
Trust
Ed25519 over a length-prefixed payload covering origin, name, version, namespace,
content digest, embedder identity, row count, and every constitution and coverage
line. description is deliberately excluded, so a store can localise a listing
without invalidating the signature. Trust-on-first-use, like SSH.
Fixes
- Embedder identity was never persisted.
SearchState::initialreset it to
ExternalOrUnknownon every open, so the same-dimension-different-model guard
was unreachable and no database in the wild had provable embedder identity.
BundledEmbedderalso had nofingerprint()despite the trait doc promising
one. Identity now persists tometa. recall()short-circuited on an empty host index, which broke the flagship
case of mounting a pack into a fresh database.mcpextra bounded below 2.0.0. It was declaredmcp>=1.0.0with no
ceiling, so the day the SDK published 2.0.0 — removingmcp.server.fastmcp—
CI went red on every platform with no commit in between.
Compatibility
No schema migration for existing databases; pack state lives in new tables and
meta keys added on open. Nothing in the recall path changes for a database with
no packs mounted.
Full changelog: v0.10.1...v0.11.0