wontopos 2.2.4 → 2.2.5

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.
package/README.md CHANGED
@@ -26,6 +26,31 @@ const ctx = await mem.recall("what does alice drink?", "alice");
26
26
 
27
27
  All methods take `{ userId }`. Memories are isolated per user, then per account.
28
28
 
29
+ ## Who said it (speakers)
30
+
31
+ Every memory can carry a speaker: `"me"` for the assistant's own words, or a
32
+ person's name. Search accepts a speaker too, to recall one person's words only.
33
+
34
+ ```ts
35
+ await mem.add("I promised to send the report on Friday", "alice", { speaker: "me" });
36
+ await mem.add("Bob said the deadline moved to Tuesday", "alice", { speaker: "Bob" });
37
+ await mem.search("what did Bob say about deadlines?", "alice", 10, { speaker: "Bob" });
38
+ ```
39
+
40
+ A store remembers up to 50 people to start (a limit we plan to raise);
41
+ `"me"` never counts against it.
42
+
43
+ ## Recall caching
44
+
45
+ Opt in per search and repeated or extended queries reuse the previous result
46
+ at 10% of the normal rate (Tablet and Scroll models):
47
+
48
+ ```ts
49
+ const hits = await mem.search("...the conversation so far...", "alice", 10,
50
+ { cache_control: { ttl: "5m" } }); // or "1h"
51
+ ```
52
+
53
+
29
54
  ## Errors
30
55
 
31
56
  ```ts
@@ -86,7 +86,8 @@ export declare class Client {
86
86
  withModel(model: string): Client;
87
87
  /** A client bound to `userId` as its default store (everything else kept). */
88
88
  withUser(userId: string): Client;
89
- /** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }). */
89
+ /** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }).
90
+ * `metadata.speaker`: "me" = the assistant's own words, or a person's name (up to 50 per store). */
90
91
  add(content: string, userId?: string, metadata?: Record<string, unknown>): Promise<any>;
91
92
  /** Alias of `add` — store one memory. Same surface as the Python SDK's `store`. */
92
93
  store(content: string, userId?: string, metadata?: Record<string, unknown>): Promise<any>;
package/dist/wontopos.js CHANGED
@@ -73,7 +73,8 @@ export class Client {
73
73
  // ----- write -----
74
74
  // `userId` is optional in every call below - omit it to use the client's default
75
75
  // store (set via `new Client({ apiKey, userId })` or `withUser`).
76
- /** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }). */
76
+ /** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }).
77
+ * `metadata.speaker`: "me" = the assistant's own words, or a person's name (up to 50 per store). */
77
78
  add(content, userId, metadata = {}) {
78
79
  return this.post("/api/v1/memory/store", { user_id: this.uid(userId), content, metadata });
79
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontopos",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "Wontopos — long-term memory for AI agents. Pure semantic retrieval, identical recall in every language, ~100× lower LLM bill.",
5
5
  "keywords": [
6
6
  "memory",