@memnexus-ai/typescript-sdk 1.44.0 → 1.45.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/index.cjs +42 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +42 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1818,11 +1818,18 @@ var MonitoringService = class extends BaseService {
|
|
|
1818
1818
|
// src/services/memories-service.ts
|
|
1819
1819
|
var MemoriesService = class extends BaseService {
|
|
1820
1820
|
/**
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1821
|
+
* Get memory by ID
|
|
1822
|
+
* Retrieve a specific memory by its ID with configurable detail level.
|
|
1823
|
+
|
|
1824
|
+
**Detail levels:**
|
|
1825
|
+
- `minimal` — raw memory only, no extra queries
|
|
1826
|
+
- `standard` (default) — adds userTopics, extractedTopics, entities, facts, relationships
|
|
1827
|
+
- `full` — adds conversationContext (title, memoryCount, position) and relationship target previews
|
|
1828
|
+
|
|
1829
|
+
* @param id - The memory ID
|
|
1830
|
+
* @param detail - Detail level: minimal (raw memory), standard (default, + topics/entities/facts/relationships), full (+ conversation context and relationship previews)
|
|
1831
|
+
*/
|
|
1832
|
+
async getMemoryById(id, options) {
|
|
1826
1833
|
const request = new Request({
|
|
1827
1834
|
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
1828
1835
|
method: "GET",
|
|
@@ -1846,6 +1853,18 @@ var MemoriesService = class extends BaseService {
|
|
|
1846
1853
|
isOffset: false,
|
|
1847
1854
|
isCursor: false
|
|
1848
1855
|
});
|
|
1856
|
+
if (options?.detail !== void 0) {
|
|
1857
|
+
request.addQueryParam("detail", {
|
|
1858
|
+
key: "detail",
|
|
1859
|
+
value: options.detail,
|
|
1860
|
+
explode: false,
|
|
1861
|
+
encode: true,
|
|
1862
|
+
style: "form",
|
|
1863
|
+
isLimit: false,
|
|
1864
|
+
isOffset: false,
|
|
1865
|
+
isCursor: false
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1849
1868
|
return this.client.call(request);
|
|
1850
1869
|
}
|
|
1851
1870
|
/**
|
|
@@ -2645,11 +2664,12 @@ var MemoriesService = class extends BaseService {
|
|
|
2645
2664
|
/**
|
|
2646
2665
|
* Get a memory by name
|
|
2647
2666
|
* Retrieve the current HEAD version of a named memory by its user-assigned name.
|
|
2648
|
-
|
|
2667
|
+
Supports the same detail levels as GET /api/memories/{id}.
|
|
2649
2668
|
|
|
2650
2669
|
* @param name - Memory name (kebab-case, 2-64 chars)
|
|
2670
|
+
* @param detail - Detail level: minimal (raw memory), standard (default, + topics/entities/facts/relationships), full (+ conversation context and relationship previews)
|
|
2651
2671
|
*/
|
|
2652
|
-
async getMemoryByName(name) {
|
|
2672
|
+
async getMemoryByName(name, options) {
|
|
2653
2673
|
const request = new Request({
|
|
2654
2674
|
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
2655
2675
|
method: "GET",
|
|
@@ -2673,6 +2693,18 @@ var MemoriesService = class extends BaseService {
|
|
|
2673
2693
|
isOffset: false,
|
|
2674
2694
|
isCursor: false
|
|
2675
2695
|
});
|
|
2696
|
+
if (options?.detail !== void 0) {
|
|
2697
|
+
request.addQueryParam("detail", {
|
|
2698
|
+
key: "detail",
|
|
2699
|
+
value: options.detail,
|
|
2700
|
+
explode: false,
|
|
2701
|
+
encode: true,
|
|
2702
|
+
style: "form",
|
|
2703
|
+
isLimit: false,
|
|
2704
|
+
isOffset: false,
|
|
2705
|
+
isCursor: false
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2676
2708
|
return this.client.call(request);
|
|
2677
2709
|
}
|
|
2678
2710
|
/**
|
|
@@ -4948,7 +4980,9 @@ var namedMemoryHistoryResponse = import_zod.z.object({
|
|
|
4948
4980
|
});
|
|
4949
4981
|
var batchGetMemoriesRequest = import_zod.z.object({
|
|
4950
4982
|
/** Array of memory IDs to retrieve */
|
|
4951
|
-
ids: import_zod.z.array(import_zod.z.string().uuid()).min(1).max(100)
|
|
4983
|
+
ids: import_zod.z.array(import_zod.z.string().uuid()).min(1).max(100),
|
|
4984
|
+
/** Detail level for each memory. 'minimal' returns raw memory only (default, backward compatible). 'standard' adds topics, entities, facts, and relationships. */
|
|
4985
|
+
detail: import_zod.z.enum(["minimal", "standard"]).optional()
|
|
4952
4986
|
});
|
|
4953
4987
|
var batchGetMemoriesMeta = import_zod.z.object({
|
|
4954
4988
|
/** Number of IDs requested */
|