@senselab-ai/amfs 0.2.0 → 0.2.1

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/memory.d.ts CHANGED
@@ -11,6 +11,7 @@ export interface AgentMemoryOptions {
11
11
  config?: AMFSConfig;
12
12
  }
13
13
  export interface SearchOptions {
14
+ query?: string;
14
15
  entityPath?: string;
15
16
  entityPaths?: string[];
16
17
  minConfidence?: number;
package/dist/memory.js CHANGED
@@ -69,9 +69,17 @@ export class AgentMemory {
69
69
  const ref = options.patternRef;
70
70
  entries = entries.filter((e) => e.provenance.patternRefs.includes(ref));
71
71
  }
72
+ const queryLower = options?.query && !options?.recallConfig
73
+ ? options.query.toLowerCase()
74
+ : undefined;
72
75
  for (const entry of entries) {
73
76
  if (!entry.shared && entry.provenance.agentId !== this.agentId)
74
77
  continue;
78
+ if (queryLower &&
79
+ !entry.key.toLowerCase().includes(queryLower) &&
80
+ !String(entry.value).toLowerCase().includes(queryLower) &&
81
+ !entry.entityPath.toLowerCase().includes(queryLower))
82
+ continue;
75
83
  const ek = `${entry.entityPath}/${entry.key}`;
76
84
  if (!seenKeys.has(ek)) {
77
85
  seenKeys.add(ek);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senselab-ai/amfs",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "AMFS TypeScript SDK — Agent Memory File System",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",