wontopos 2.2.6 → 2.2.7

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
@@ -29,16 +29,21 @@ All methods take `{ userId }` — it names the **store**: one isolated memory sp
29
29
  ## Who said it (speakers)
30
30
 
31
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.
32
+ person's name. Speakers are explicit, like stores: register a person once,
33
+ then store under their name — a typo can never silently become a new person.
34
+ Search accepts a speaker too, to recall one person's words only.
33
35
 
34
36
  ```ts
37
+ await mem.addSpeaker("Bob", "alice"); // once per person
35
38
  await mem.add("I promised to send the report on Friday", "alice", { speaker: "me" });
36
39
  await mem.add("Bob said the deadline moved to Tuesday", "alice", { speaker: "Bob" });
37
40
  await mem.search("what did Bob say about deadlines?", "alice", 10, { speaker: "Bob" });
38
41
  ```
39
42
 
40
- A store remembers up to 50 people to start (a limit we plan to raise);
41
- `"me"` never counts against it.
43
+ `listSpeakers()` shows the registered people with per-person memory counts;
44
+ `removeSpeaker()` unregisters (memories stay, the tag goes). A store registers
45
+ up to 50 people to start (a limit we plan to raise); `"me"` never needs
46
+ registration and never counts against it.
42
47
 
43
48
  ## Recall caching
44
49
 
@@ -121,6 +121,14 @@ export declare class Client {
121
121
  }>>;
122
122
  /** Delete a store and ALL its memories. Returns `{ user_id, status }`. */
123
123
  deleteStore(userId: string): Promise<any>;
124
+ /** Register a person for this store. Speakers are explicit: register once, then
125
+ * store with `{ speaker }`. `"me"` (the assistant itself) never needs
126
+ * registration. A store registers up to 50 people to start. */
127
+ addSpeaker(speaker: string, userId?: string): Promise<any>;
128
+ /** The store's registered people, each with its memory count. */
129
+ listSpeakers(userId?: string): Promise<any>;
130
+ /** Unregister a person. Their memories stay; the name tag goes. */
131
+ removeSpeaker(speaker: string, userId?: string): Promise<any>;
124
132
  /** Delete a single memory by id. `userId` optional (uses the default store). */
125
133
  delete(userId: string | undefined, memoryId: string): Promise<any>;
126
134
  /** Delete ALL memories for a store (GDPR erase). `userId` is required on purpose -
package/dist/wontopos.js CHANGED
@@ -146,6 +146,21 @@ export class Client {
146
146
  deleteStore(userId) {
147
147
  return this.request("DELETE", "/api/v1/memory/collection", { user_id: userId });
148
148
  }
149
+ // ----- speakers (who said it) -----
150
+ /** Register a person for this store. Speakers are explicit: register once, then
151
+ * store with `{ speaker }`. `"me"` (the assistant itself) never needs
152
+ * registration. A store registers up to 50 people to start. */
153
+ addSpeaker(speaker, userId) {
154
+ return this.post("/api/v1/memory/speakers", { user_id: this.uid(userId), speaker });
155
+ }
156
+ /** The store's registered people, each with its memory count. */
157
+ listSpeakers(userId) {
158
+ return this.request("GET", `/api/v1/memory/speakers?user_id=${encodeURIComponent(this.uid(userId))}`);
159
+ }
160
+ /** Unregister a person. Their memories stay; the name tag goes. */
161
+ removeSpeaker(speaker, userId) {
162
+ return this.request("DELETE", "/api/v1/memory/speakers", { user_id: this.uid(userId), speaker });
163
+ }
149
164
  // ----- delete -----
150
165
  /** Delete a single memory by id. `userId` optional (uses the default store). */
151
166
  delete(userId, memoryId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontopos",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
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",