mengram-ai 2.14.2 → 2.14.3
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/index.d.ts +2 -1
- package/index.js +4 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface MemoryOptions {
|
|
|
18
18
|
|
|
19
19
|
export interface SearchOptions extends MemoryOptions {
|
|
20
20
|
limit?: number;
|
|
21
|
+
graphDepth?: number;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface AddResult {
|
|
@@ -186,7 +187,7 @@ export declare class MengramClient {
|
|
|
186
187
|
procedureEvolution(procedureId: string, options?: { userId?: string }): Promise<{ evolution: ProcedureEvolutionEntry[] }>;
|
|
187
188
|
|
|
188
189
|
// Unified Search
|
|
189
|
-
searchAll(query: string, options?: { limit?: number }): Promise<UnifiedSearchResult>;
|
|
190
|
+
searchAll(query: string, options?: { limit?: number; graphDepth?: number }): Promise<UnifiedSearchResult>;
|
|
190
191
|
|
|
191
192
|
// Agents
|
|
192
193
|
runAgents(options?: { agent?: string; autoFix?: boolean }): Promise<any>;
|
package/index.js
CHANGED
|
@@ -125,6 +125,7 @@ class MengramClient {
|
|
|
125
125
|
* @param {string} [options.runId]
|
|
126
126
|
* @param {string} [options.appId]
|
|
127
127
|
* @param {number} [options.limit] - Max results (default: 5)
|
|
128
|
+
* @param {number} [options.graphDepth] - Knowledge graph traversal depth (default: 2)
|
|
128
129
|
* @returns {Promise<Array>}
|
|
129
130
|
*/
|
|
130
131
|
async search(query, options = {}) {
|
|
@@ -135,6 +136,7 @@ class MengramClient {
|
|
|
135
136
|
run_id: options.runId || null,
|
|
136
137
|
app_id: options.appId || null,
|
|
137
138
|
limit: options.limit || 5,
|
|
139
|
+
graph_depth: options.graphDepth != null ? options.graphDepth : 2,
|
|
138
140
|
});
|
|
139
141
|
return data.results || [];
|
|
140
142
|
}
|
|
@@ -350,6 +352,7 @@ class MengramClient {
|
|
|
350
352
|
* @param {string} query - Search query
|
|
351
353
|
* @param {object} [options]
|
|
352
354
|
* @param {number} [options.limit] - Max results per type (default 5)
|
|
355
|
+
* @param {number} [options.graphDepth] - Knowledge graph traversal depth (default: 2)
|
|
353
356
|
* @returns {Promise<{semantic: Array, episodic: Array, procedural: Array}>}
|
|
354
357
|
*/
|
|
355
358
|
async searchAll(query, options = {}) {
|
|
@@ -357,6 +360,7 @@ class MengramClient {
|
|
|
357
360
|
query,
|
|
358
361
|
limit: options.limit || 5,
|
|
359
362
|
user_id: options.userId || 'default',
|
|
363
|
+
graph_depth: options.graphDepth != null ? options.graphDepth : 2,
|
|
360
364
|
});
|
|
361
365
|
}
|
|
362
366
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mengram-ai",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.3",
|
|
4
4
|
"description": "Human-like memory for AI — semantic, episodic & procedural memory. Experience-driven procedures, Cognitive Profile, unified search, memory agents. Free Mem0 alternative.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|