wontopos 2.1.0 → 2.2.0
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 +5 -3
- package/dist/wontopos.js +7 -3
- package/package.json +1 -1
package/dist/wontopos.d.ts
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* const hits = await mem.search("what does alice drink?", "alice");
|
|
10
10
|
*
|
|
11
11
|
* The API key picks *which memory* (your account); `model` picks *which engine*
|
|
12
|
-
* reads it
|
|
12
|
+
* reads it. All models share one memory, so you can store
|
|
13
13
|
* with one and recall with another. Set a default in the constructor, or override
|
|
14
|
-
* a single call with `mem.withModel("
|
|
14
|
+
* a single call with `mem.withModel("tablet-1").recall(...)`.
|
|
15
15
|
*
|
|
16
16
|
* Pure semantic retrieval — no keyword/BM25 matching, so it works the SAME in every
|
|
17
17
|
* language. Storing and searching call no LLM; you only pay for embeddings.
|
|
@@ -67,7 +67,7 @@ export declare class Client {
|
|
|
67
67
|
/**
|
|
68
68
|
* A client that uses `model` (sent as `X-WOS-Model`). Use it to set the default
|
|
69
69
|
* (`new Client({ apiKey, model })`) or to override one call
|
|
70
|
-
* (`client.withModel("
|
|
70
|
+
* (`client.withModel("tablet-1").recall(...)`).
|
|
71
71
|
*/
|
|
72
72
|
withModel(model: string): Client;
|
|
73
73
|
/** Store one memory. `metadata` optional (e.g. { event_date: "2026-03-01" }). */
|
|
@@ -82,6 +82,8 @@ export declare class Client {
|
|
|
82
82
|
search(query: string, userId: string, limit?: number, opts?: Record<string, unknown>): Promise<Memory[]>;
|
|
83
83
|
/** One-call LLM context: short-term turns + long-term matches + surrounding context. */
|
|
84
84
|
recall(query: string, userId: string): Promise<RecallResult>;
|
|
85
|
+
/** Run a built-in engram ("deep_recall" | "timeline" | "gather"). Returns the merged result. */
|
|
86
|
+
engram(name: string, query: string, userId: string): Promise<unknown>;
|
|
85
87
|
/** Recent conversation turns (short-term memory). */
|
|
86
88
|
history(userId: string): Promise<unknown[]>;
|
|
87
89
|
/** Memory counts for a user: { total_memories, short_term_turns }. */
|
package/dist/wontopos.js
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* const hits = await mem.search("what does alice drink?", "alice");
|
|
10
10
|
*
|
|
11
11
|
* The API key picks *which memory* (your account); `model` picks *which engine*
|
|
12
|
-
* reads it
|
|
12
|
+
* reads it. All models share one memory, so you can store
|
|
13
13
|
* with one and recall with another. Set a default in the constructor, or override
|
|
14
|
-
* a single call with `mem.withModel("
|
|
14
|
+
* a single call with `mem.withModel("tablet-1").recall(...)`.
|
|
15
15
|
*
|
|
16
16
|
* Pure semantic retrieval — no keyword/BM25 matching, so it works the SAME in every
|
|
17
17
|
* language. Storing and searching call no LLM; you only pay for embeddings.
|
|
@@ -46,7 +46,7 @@ export class Client {
|
|
|
46
46
|
/**
|
|
47
47
|
* A client that uses `model` (sent as `X-WOS-Model`). Use it to set the default
|
|
48
48
|
* (`new Client({ apiKey, model })`) or to override one call
|
|
49
|
-
* (`client.withModel("
|
|
49
|
+
* (`client.withModel("tablet-1").recall(...)`).
|
|
50
50
|
*/
|
|
51
51
|
withModel(model) {
|
|
52
52
|
return new Client({ apiKey: this.apiKey, baseUrl: this.base, timeoutMs: this.timeoutMs, model });
|
|
@@ -81,6 +81,10 @@ export class Client {
|
|
|
81
81
|
recall(query, userId) {
|
|
82
82
|
return this.post("/api/v1/memory/recall", { user_id: userId, query });
|
|
83
83
|
}
|
|
84
|
+
/** Run a built-in engram ("deep_recall" | "timeline" | "gather"). Returns the merged result. */
|
|
85
|
+
engram(name, query, userId) {
|
|
86
|
+
return this.post("/api/v1/engram/run", { name, user_id: userId, query });
|
|
87
|
+
}
|
|
84
88
|
/** Recent conversation turns (short-term memory). */
|
|
85
89
|
async history(userId) {
|
|
86
90
|
const r = await this.post("/api/v1/memory/history", { user_id: userId });
|
package/package.json
CHANGED