plugmem 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -9
  2. package/package.json +9 -7
package/README.md CHANGED
@@ -43,13 +43,20 @@ const db = await Plugmem.open("agent.plugmem");
43
43
  await db.remember({ text: "the user prefers tokio", entity: "user", tags: ["pref"] });
44
44
  await db.remember({ text: "the release ships on friday", entity: "release" });
45
45
 
46
- const res = await db.recall({ query: "which runtime?", k: 5 });
46
+ const res = await db.recall({ query: "tokio", k: 5 });
47
47
  console.log(res.rendered); // paste this into the prompt
48
- // - [f0] user: the user prefers tokio (2026-08; active)
48
+ // - [f0] user: the user prefers tokio (2026-08; active) #pref
49
49
 
50
50
  db.close();
51
51
  ```
52
52
 
53
+ The query is `"tokio"` and not `"which runtime?"` for a reason worth knowing up
54
+ front: with no embedder configured, recall matches on **words**, and "runtime"
55
+ appears nowhere in that fact, so the more natural question returns nothing.
56
+ Reach it through the graph instead with `entities: ["user"]`, or configure an
57
+ [embedder](#configuration-and-embeddings) and the meaning matches too. Only one
58
+ of the four sources needs a model — see [How recall works](#how-recall-works).
59
+
53
60
  `Plugmem.open` is a static method, not a constructor, because opening replays a
54
61
  journal and maps a snapshot — work proportional to the file — and a JavaScript
55
62
  constructor has no way to hand that to a worker thread. Everything is typed:
@@ -139,12 +146,12 @@ Not a vector lookup. Four sources run and are fused by
139
146
  [reciprocal-rank fusion](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf)
140
147
  with a recency boost; tags filter and are not a source:
141
148
 
142
- | Source | What it finds |
143
- |---|---|
144
- | **Lexical** — [BM25](https://en.wikipedia.org/wiki/Okapi_BM25) over a Unicode ([UAX #29](https://unicode.org/reports/tr29/)) tokenizer | exact terms, keyword overlap |
145
- | **Semantic** — int8-quantized cosine, a flat scan below a threshold and an [HNSW](https://arxiv.org/abs/1603.09320) graph above | meaning, nearest neighbours |
146
- | **Graph** — typed edges walked from the query's anchor entities | relational knowledge |
147
- | **Temporal** — range scans over the `recordedAt` index, plus the validity test | "what was true then", time windows |
149
+ | Source | What it finds | Needs an embedder |
150
+ |---|---|---|
151
+ | **Lexical** — [BM25](https://en.wikipedia.org/wiki/Okapi_BM25) over a Unicode ([UAX #29](https://unicode.org/reports/tr29/)) tokenizer | exact terms, keyword overlap | no |
152
+ | **Graph** — typed edges walked from the query's anchor entities | relational knowledge | no |
153
+ | **Temporal** — range scans over the `recordedAt` index, plus the validity test | "what was true then", time windows | no |
154
+ | **Semantic** — int8-quantized cosine, a flat scan below a threshold and an [HNSW](https://arxiv.org/abs/1603.09320) graph above | meaning, nearest neighbours | **yes** |
148
155
 
149
156
  The sources compose. A query with no `query` string still answers from tags,
150
157
  entities and time. **Without an embedder the system is complete** — the other
@@ -612,11 +619,12 @@ search. For those, use a dedicated system — [Qdrant](https://qdrant.tech),
612
619
 
613
620
  ## Other ways in
614
621
 
615
- The same engine ships four ways. This package is the Node one.
622
+ The same engine ships five ways. This package is the Node one.
616
623
 
617
624
  | You are | Use |
618
625
  |---|---|
619
626
  | writing JavaScript / TypeScript for Node | **this package** |
627
+ | writing Python | [`plugmem`](https://pypi.org/project/plugmem/) on PyPI |
620
628
  | writing Rust | [`plugmem-host`](https://docs.rs/plugmem-host/latest) — the engine in your process |
621
629
  | an agent, or another language | [`plugmem-mcp`](https://docs.rs/plugmem-mcp/latest) — a stdio JSON-RPC sidecar |
622
630
  | a person at a terminal | [`plugmem-cli`](https://docs.rs/plugmem-cli/latest) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugmem",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Native Node.js addon for plugmem: an embedded bitemporal memory and retrieval engine for local-first applications and agents (remember / recall / revise / forget over one local database).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,20 +32,22 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@napi-rs/cli": "^2.18.4",
35
+ "oxlint": "^1.0.0",
35
36
  "typescript": "^5.9.3"
36
37
  },
37
38
  "scripts": {
38
39
  "build": "napi build --platform --release",
39
40
  "build:debug": "napi build --platform",
41
+ "lint": "oxlint __test__ --deny-warnings",
40
42
  "test": "node --test __test__/*.test.mjs",
41
43
  "typecheck": "tsc -p tsconfig.json"
42
44
  },
43
45
  "optionalDependencies": {
44
- "plugmem-linux-x64-gnu": "0.6.0",
45
- "plugmem-linux-arm64-gnu": "0.6.0",
46
- "plugmem-darwin-x64": "0.6.0",
47
- "plugmem-darwin-arm64": "0.6.0",
48
- "plugmem-win32-x64-msvc": "0.6.0",
49
- "plugmem-win32-arm64-msvc": "0.6.0"
46
+ "plugmem-linux-x64-gnu": "0.7.0",
47
+ "plugmem-linux-arm64-gnu": "0.7.0",
48
+ "plugmem-darwin-x64": "0.7.0",
49
+ "plugmem-darwin-arm64": "0.7.0",
50
+ "plugmem-win32-x64-msvc": "0.7.0",
51
+ "plugmem-win32-arm64-msvc": "0.7.0"
50
52
  }
51
53
  }