wontopos 2.2.17 → 2.2.18

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.
@@ -171,6 +171,13 @@ export interface MemoryPage {
171
171
  next_cursor: string | null;
172
172
  [key: string]: unknown;
173
173
  }
174
+ /** `searchSelf` result: the main lane plus the assistant's own words, split. */
175
+ export interface SelfSearchResult {
176
+ /** Main lane — what others said / general memories. */
177
+ memories: Memory[];
178
+ /** The assistant's own words (stored with speaker "me"); `[]` on non-self models. */
179
+ self_memories: Memory[];
180
+ }
174
181
  export interface ModelInfo {
175
182
  id: string;
176
183
  name: string;
@@ -286,6 +293,12 @@ export declare class Client {
286
293
  update(oldMemoryId: string, newContent: string, userId?: string): Promise<UpdateResult>;
287
294
  /** Semantic search over a store's memories. Returns memories, most relevant first. */
288
295
  search(query: string, userId?: string, limit?: number, opts?: SearchOptions): Promise<Memory[]>;
296
+ /** Search a self-memory model (Scroll 1.2+): both lanes from ONE call. Returns
297
+ * `{ memories, self_memories }` — `memories` is the main lane (what others said /
298
+ * general memories), `self_memories` is the assistant's OWN words (stored with
299
+ * speaker "me"), kept separate so the reader never confuses who said what. On a model
300
+ * without a self lane, `self_memories` is `[]`. `userId` optional (default store). */
301
+ searchSelf(query: string, userId?: string, limit?: number, opts?: SearchOptions): Promise<SelfSearchResult>;
289
302
  /** One-call LLM context: short-term turns + long-term matches + surrounding context. */
290
303
  recall(query: string, userId?: string): Promise<RecallResult>;
291
304
  /** Run a built-in engram ("deep_recall" | "timeline" | "gather"). Returns the merged result. */
package/dist/wontopos.js CHANGED
@@ -330,6 +330,15 @@ export class Client {
330
330
  const r = await this.post("/api/v1/memory/search", { ...opts, user_id: this.uid(userId), query, max_results: limit });
331
331
  return (r.memories ?? []);
332
332
  }
333
+ /** Search a self-memory model (Scroll 1.2+): both lanes from ONE call. Returns
334
+ * `{ memories, self_memories }` — `memories` is the main lane (what others said /
335
+ * general memories), `self_memories` is the assistant's OWN words (stored with
336
+ * speaker "me"), kept separate so the reader never confuses who said what. On a model
337
+ * without a self lane, `self_memories` is `[]`. `userId` optional (default store). */
338
+ async searchSelf(query, userId, limit = 10, opts = {}) {
339
+ const r = await this.post("/api/v1/memory/search", { ...opts, user_id: this.uid(userId), query, max_results: limit });
340
+ return { memories: (r.memories ?? []), self_memories: (r.self_memories ?? []) };
341
+ }
333
342
  /** One-call LLM context: short-term turns + long-term matches + surrounding context. */
334
343
  recall(query, userId) {
335
344
  return this.post("/api/v1/memory/recall", { user_id: this.uid(userId), query });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontopos",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
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",