@lobehub/lobehub 2.0.0-next.334 → 2.0.0-next.335

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
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.335](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.334...v2.0.0-next.335)
6
+
7
+ <sup>Released on **2026-01-22**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **database**: Added user memory activity.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **database**: Added user memory activity, closes [#11680](https://github.com/lobehub/lobe-chat/issues/11680) ([0160fbd](https://github.com/lobehub/lobe-chat/commit/0160fbd))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 2.0.0-next.334](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.333...v2.0.0-next.334)
6
31
 
7
32
  <sup>Released on **2026-01-21**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,9 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2026-01-22",
5
+ "version": "2.0.0-next.335"
6
+ },
2
7
  {
3
8
  "children": {
4
9
  "features": [
@@ -1235,6 +1235,40 @@ table user_memories {
1235
1235
  }
1236
1236
  }
1237
1237
 
1238
+ table user_memories_activities {
1239
+ id varchar(255) [pk, not null]
1240
+ user_id text
1241
+ user_memory_id varchar(255)
1242
+ metadata jsonb
1243
+ tags text[]
1244
+ type varchar(255) [not null]
1245
+ status varchar(255) [not null, default: 'pending']
1246
+ timezone varchar(255)
1247
+ starts_at "timestamp with time zone"
1248
+ ends_at "timestamp with time zone"
1249
+ associated_objects jsonb
1250
+ associated_subjects jsonb
1251
+ associated_locations jsonb
1252
+ notes text
1253
+ narrative text
1254
+ narrative_vector vector(1024)
1255
+ feedback text
1256
+ feedback_vector vector(1024)
1257
+ captured_at "timestamp with time zone" [not null, default: `now()`]
1258
+ accessed_at "timestamp with time zone" [not null, default: `now()`]
1259
+ created_at "timestamp with time zone" [not null, default: `now()`]
1260
+ updated_at "timestamp with time zone" [not null, default: `now()`]
1261
+
1262
+ indexes {
1263
+ narrative_vector [name: 'user_memories_activities_narrative_vector_index']
1264
+ feedback_vector [name: 'user_memories_activities_feedback_vector_index']
1265
+ type [name: 'user_memories_activities_type_index']
1266
+ user_id [name: 'user_memories_activities_user_id_index']
1267
+ user_memory_id [name: 'user_memories_activities_user_memory_id_index']
1268
+ status [name: 'user_memories_activities_status_index']
1269
+ }
1270
+ }
1271
+
1238
1272
  table user_memories_contexts {
1239
1273
  id varchar(255) [pk, not null]
1240
1274
  user_id text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.334",
3
+ "version": "2.0.0-next.335",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -0,0 +1,35 @@
1
+ CREATE TABLE IF NOT EXISTS "user_memories_activities" (
2
+ "id" varchar(255) PRIMARY KEY NOT NULL,
3
+ "user_id" text,
4
+ "user_memory_id" varchar(255),
5
+ "metadata" jsonb,
6
+ "tags" text[],
7
+ "type" varchar(255) NOT NULL,
8
+ "status" varchar(255) DEFAULT 'pending' NOT NULL,
9
+ "timezone" varchar(255),
10
+ "starts_at" timestamp with time zone,
11
+ "ends_at" timestamp with time zone,
12
+ "associated_objects" jsonb,
13
+ "associated_subjects" jsonb,
14
+ "associated_locations" jsonb,
15
+ "notes" text,
16
+ "narrative" text,
17
+ "narrative_vector" vector(1024),
18
+ "feedback" text,
19
+ "feedback_vector" vector(1024),
20
+ "captured_at" timestamp with time zone DEFAULT now() NOT NULL,
21
+ "accessed_at" timestamp with time zone DEFAULT now() NOT NULL,
22
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
23
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
24
+ );
25
+ --> statement-breakpoint
26
+ ALTER TABLE "user_memories_activities" DROP CONSTRAINT IF EXISTS "user_memories_activities_user_id_users_id_fk";--> statement-breakpoint
27
+ ALTER TABLE "user_memories_activities" ADD CONSTRAINT "user_memories_activities_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
28
+ ALTER TABLE "user_memories_activities" DROP CONSTRAINT IF EXISTS "user_memories_activities_user_memory_id_user_memories_id_fk";--> statement-breakpoint
29
+ ALTER TABLE "user_memories_activities" ADD CONSTRAINT "user_memories_activities_user_memory_id_user_memories_id_fk" FOREIGN KEY ("user_memory_id") REFERENCES "public"."user_memories"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
30
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_narrative_vector_index" ON "user_memories_activities" USING hnsw ("narrative_vector" vector_cosine_ops);--> statement-breakpoint
31
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_feedback_vector_index" ON "user_memories_activities" USING hnsw ("feedback_vector" vector_cosine_ops);--> statement-breakpoint
32
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_type_index" ON "user_memories_activities" USING btree ("type");--> statement-breakpoint
33
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_user_id_index" ON "user_memories_activities" USING btree ("user_id");--> statement-breakpoint
34
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_user_memory_id_index" ON "user_memories_activities" USING btree ("user_memory_id");--> statement-breakpoint
35
+ CREATE INDEX IF NOT EXISTS "user_memories_activities_status_index" ON "user_memories_activities" USING btree ("status");