@aigne/default-memory 1.1.3 → 1.1.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.6](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.5...default-memory-v1.1.6) (2025-08-20)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/core bumped to 1.53.0
11
+ * devDependencies
12
+ * @aigne/openai bumped to 0.12.0
13
+
14
+ ## [1.1.5](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.4...default-memory-v1.1.5) (2025-08-20)
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * The following workspace dependencies were updated
20
+ * dependencies
21
+ * @aigne/core bumped to 1.52.0
22
+ * devDependencies
23
+ * @aigne/openai bumped to 0.11.5
24
+
25
+ ## [1.1.4](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.3...default-memory-v1.1.4) (2025-08-18)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **memory:** memory storage error if search segments is empty ([#379](https://github.com/AIGNE-io/aigne-framework/issues/379)) ([4e36b6b](https://github.com/AIGNE-io/aigne-framework/commit/4e36b6bfe71cd78ee75014ba26a4c121417e5daa))
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * The following workspace dependencies were updated
36
+ * dependencies
37
+ * @aigne/core bumped to 1.51.0
38
+ * devDependencies
39
+ * @aigne/openai bumped to 0.11.4
40
+
3
41
  ## [1.1.3](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.2...default-memory-v1.1.3) (2025-08-16)
4
42
 
5
43
 
@@ -37,12 +37,13 @@ class DefaultMemoryStorage extends storage_js_1.MemoryStorage {
37
37
  const { limit = DEFAULT_MAX_MEMORY_COUNT } = query;
38
38
  const sessionId = (await this.options?.getSessionId?.(context)) ?? null;
39
39
  const db = await this.db;
40
- const memories = this.options?.enableFTS && query.search
40
+ const match = this.options?.enableFTS && query.search ? this.segment(query.search).join(" OR ") : undefined;
41
+ const memories = match
41
42
  ? await db
42
43
  .select()
43
44
  .from(memory_js_1.Memories)
44
45
  .innerJoin((0, drizzle_orm_1.sql) `Memories_fts`, (0, drizzle_orm_1.sql) `Memories_fts.id = ${memory_js_1.Memories.id}`)
45
- .where((0, drizzle_orm_1.sql) `Memories_fts MATCH ${drizzle_orm_1.sql.param(this.segment(query.search).join(" OR "))}`)
46
+ .where((0, drizzle_orm_1.sql) `Memories_fts MATCH ${drizzle_orm_1.sql.param(match)}`)
46
47
  .orderBy((0, drizzle_orm_1.sql) `bm25(Memories_fts)`)
47
48
  .limit(limit)
48
49
  .execute()
@@ -34,12 +34,13 @@ export class DefaultMemoryStorage extends MemoryStorage {
34
34
  const { limit = DEFAULT_MAX_MEMORY_COUNT } = query;
35
35
  const sessionId = (await this.options?.getSessionId?.(context)) ?? null;
36
36
  const db = await this.db;
37
- const memories = this.options?.enableFTS && query.search
37
+ const match = this.options?.enableFTS && query.search ? this.segment(query.search).join(" OR ") : undefined;
38
+ const memories = match
38
39
  ? await db
39
40
  .select()
40
41
  .from(Memories)
41
42
  .innerJoin(sql `Memories_fts`, sql `Memories_fts.id = ${Memories.id}`)
42
- .where(sql `Memories_fts MATCH ${sql.param(this.segment(query.search).join(" OR "))}`)
43
+ .where(sql `Memories_fts MATCH ${sql.param(match)}`)
43
44
  .orderBy(sql `bm25(Memories_fts)`)
44
45
  .limit(limit)
45
46
  .execute()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/default-memory",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "Default memory for AIGNE framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,15 +36,15 @@
36
36
  "uuid": "^11.1.0",
37
37
  "yaml": "^2.8.0",
38
38
  "zod": "^3.25.67",
39
- "@aigne/sqlite": "^0.4.0",
40
- "@aigne/core": "^1.50.1"
39
+ "@aigne/core": "^1.53.0",
40
+ "@aigne/sqlite": "^0.4.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/bun": "^1.2.18",
44
44
  "npm-run-all": "^4.1.5",
45
45
  "rimraf": "^6.0.1",
46
46
  "typescript": "^5.8.3",
47
- "@aigne/openai": "^0.11.3"
47
+ "@aigne/openai": "^0.12.0"
48
48
  },
49
49
  "scripts": {
50
50
  "lint": "tsc --noEmit",