wontopos 2.2.1 → 2.2.2
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/dist/wontopos.d.ts +6 -4
- package/dist/wontopos.js +8 -4
- package/package.json +1 -1
package/dist/wontopos.d.ts
CHANGED
|
@@ -88,12 +88,14 @@ export declare class Client {
|
|
|
88
88
|
withUser(userId: string): Client;
|
|
89
89
|
/** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }). */
|
|
90
90
|
add(content: string, userId?: string, metadata?: Record<string, unknown>): Promise<any>;
|
|
91
|
-
/**
|
|
92
|
-
|
|
91
|
+
/** Alias of `add` — store one memory. Same surface as the Python SDK's `store`. */
|
|
92
|
+
store(content: string, userId?: string, metadata?: Record<string, unknown>): Promise<any>;
|
|
93
|
+
/** Store a conversation turn (user + assistant). Payload first, userId last — same shape as add/search. */
|
|
94
|
+
addTurn(userMsg: string, assistantMsg: string, userId?: string): Promise<any>;
|
|
93
95
|
/** Bulk-ingest a large blob of text (chunked + embedded server-side). For backfilling. */
|
|
94
96
|
addBulk(content: string, userId?: string, category?: string, timestamp?: string): Promise<any>;
|
|
95
|
-
/** Supersede an old memory with new content
|
|
96
|
-
update(
|
|
97
|
+
/** Supersede an old memory with new content. Payload first, userId last — same shape as add/search. */
|
|
98
|
+
update(oldMemoryId: string, newContent: string, userId?: string): Promise<any>;
|
|
97
99
|
/** Semantic search over a store's memories. Returns memories, most relevant first. */
|
|
98
100
|
search(query: string, userId?: string, limit?: number, opts?: Record<string, unknown>): Promise<Memory[]>;
|
|
99
101
|
/** One-call LLM context: short-term turns + long-term matches + surrounding context. */
|
package/dist/wontopos.js
CHANGED
|
@@ -77,8 +77,12 @@ export class Client {
|
|
|
77
77
|
add(content, userId, metadata = {}) {
|
|
78
78
|
return this.post("/api/v1/memory/store", { user_id: this.uid(userId), content, metadata });
|
|
79
79
|
}
|
|
80
|
-
/**
|
|
81
|
-
|
|
80
|
+
/** Alias of `add` — store one memory. Same surface as the Python SDK's `store`. */
|
|
81
|
+
store(content, userId, metadata = {}) {
|
|
82
|
+
return this.add(content, userId, metadata);
|
|
83
|
+
}
|
|
84
|
+
/** Store a conversation turn (user + assistant). Payload first, userId last — same shape as add/search. */
|
|
85
|
+
addTurn(userMsg, assistantMsg, userId) {
|
|
82
86
|
return this.post("/api/v1/memory/store-turn", { user_id: this.uid(userId), user_msg: userMsg, assistant_msg: assistantMsg });
|
|
83
87
|
}
|
|
84
88
|
/** Bulk-ingest a large blob of text (chunked + embedded server-side). For backfilling. */
|
|
@@ -88,8 +92,8 @@ export class Client {
|
|
|
88
92
|
body.timestamp = timestamp;
|
|
89
93
|
return this.post("/api/v1/memory/bulk-store", body);
|
|
90
94
|
}
|
|
91
|
-
/** Supersede an old memory with new content
|
|
92
|
-
update(
|
|
95
|
+
/** Supersede an old memory with new content. Payload first, userId last — same shape as add/search. */
|
|
96
|
+
update(oldMemoryId, newContent, userId) {
|
|
93
97
|
return this.post("/api/v1/memory/supersede", { user_id: this.uid(userId), old_memory_id: oldMemoryId, new_content: newContent });
|
|
94
98
|
}
|
|
95
99
|
// ----- read -----
|
package/package.json
CHANGED