@tpsdev-ai/flair-client 0.44.4 → 0.44.6

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/dist/client.js +11 -0
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -202,6 +202,17 @@ class MemoryApi {
202
202
  delete record.validTo;
203
203
  delete record.archivedAt;
204
204
  delete record.deduped;
205
+ // flair#1189 — retrievalCount and lastRetrieved are RECORD-scoped, not
206
+ // lineage-scoped: a brand-new successor record has no retrieval history of
207
+ // its OWN, so it must start with none. Inheriting them from the superseded
208
+ // record via the `...existing` spread produced a successor whose
209
+ // lastRetrieved PREDATED its own createdAt ("retrieved before it existed"),
210
+ // silently corrupting any recency/usage-based ranking that reads these
211
+ // fields. Reset both here, at succession construction. Usage/citation-
212
+ // ledger counters (usageCount, the #1147 citation ledger) are a SEPARATE,
213
+ // arguably lineage-scoped question and are deliberately left untouched.
214
+ record.retrievalCount = 0;
215
+ delete record.lastRetrieved;
205
216
  // flair#718 authorship-provenance — see write()'s identical comment above.
206
217
  if (this.client.claimedClient)
207
218
  record.claimedClient = this.client.claimedClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair-client",
3
- "version": "0.44.4",
3
+ "version": "0.44.6",
4
4
  "description": "Lightweight client for Flair — identity, memory, and soul for AI agents. Zero heavy dependencies.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",