@lobehub/lobehub 2.0.0-next.245 → 2.0.0-next.247

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.
@@ -55,9 +55,9 @@ jobs:
55
55
  run: echo "secret=$(openssl rand -base64 32)" >> $GITHUB_OUTPUT
56
56
 
57
57
  - name: Build with bundle analyzer
58
- run: bun run build:analyze || true
58
+ run: npm run build:analyze || true
59
59
  env:
60
- NODE_OPTIONS: --max-old-space-size=8192
60
+ NODE_OPTIONS: --max-old-space-size=81920
61
61
  KEY_VAULTS_SECRET: ${{ secrets.KEY_VAULTS_SECRET || steps.generate-secret.outputs.secret }}
62
62
 
63
63
  - name: Prepare analyzer reports
package/CHANGELOG.md CHANGED
@@ -2,6 +2,64 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.247](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.246...v2.0.0-next.247)
6
+
7
+ <sup>Released on **2026-01-09**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **database**: Renamed to userMemories/index.ts.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **database**: Renamed to userMemories/index.ts, closes [#11359](https://github.com/lobehub/lobe-chat/issues/11359) ([9dae5ff](https://github.com/lobehub/lobe-chat/commit/9dae5ff))
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
+
30
+ ## [Version 2.0.0-next.246](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.245...v2.0.0-next.246)
31
+
32
+ <sup>Released on **2026-01-09**</sup>
33
+
34
+ #### ✨ Features
35
+
36
+ - **misc**: Generate `agent_cron_jobs` in agents.
37
+
38
+ #### 💄 Styles
39
+
40
+ - **desktop**: Update macOS beta icon assets.
41
+
42
+ <br/>
43
+
44
+ <details>
45
+ <summary><kbd>Improvements and Fixes</kbd></summary>
46
+
47
+ #### What's improved
48
+
49
+ - **misc**: Generate `agent_cron_jobs` in agents, closes [#11349](https://github.com/lobehub/lobe-chat/issues/11349) ([eefb6cb](https://github.com/lobehub/lobe-chat/commit/eefb6cb))
50
+
51
+ #### Styles
52
+
53
+ - **desktop**: Update macOS beta icon assets, closes [#11368](https://github.com/lobehub/lobe-chat/issues/11368) ([3623e58](https://github.com/lobehub/lobe-chat/commit/3623e58))
54
+
55
+ </details>
56
+
57
+ <div align="right">
58
+
59
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
60
+
61
+ </div>
62
+
5
63
  ## [Version 2.0.0-next.245](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.244...v2.0.0-next.245)
6
64
 
7
65
  <sup>Released on **2026-01-09**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2026-01-09",
5
+ "version": "2.0.0-next.247"
6
+ },
7
+ {
8
+ "children": {
9
+ "features": [
10
+ "Generate agent_cron_jobs in agents."
11
+ ]
12
+ },
13
+ "date": "2026-01-09",
14
+ "version": "2.0.0-next.246"
15
+ },
2
16
  {
3
17
  "children": {
4
18
  "improvements": [
@@ -67,6 +67,37 @@ table agents_knowledge_bases {
67
67
  }
68
68
  }
69
69
 
70
+ table agent_cron_jobs {
71
+ id text [pk, not null]
72
+ agent_id text [not null]
73
+ group_id text
74
+ user_id text [not null]
75
+ name text
76
+ description text
77
+ enabled boolean [default: true]
78
+ cron_pattern text [not null]
79
+ timezone text [default: 'UTC']
80
+ content text [not null]
81
+ edit_data jsonb
82
+ max_executions integer
83
+ remaining_executions integer
84
+ execution_conditions jsonb
85
+ last_executed_at timestamp
86
+ total_executions integer [default: 0]
87
+ accessed_at "timestamp with time zone" [not null, default: `now()`]
88
+ created_at "timestamp with time zone" [not null, default: `now()`]
89
+ updated_at "timestamp with time zone" [not null, default: `now()`]
90
+
91
+ indexes {
92
+ agent_id [name: 'agent_cron_jobs_agent_id_idx']
93
+ group_id [name: 'agent_cron_jobs_group_id_idx']
94
+ user_id [name: 'agent_cron_jobs_user_id_idx']
95
+ enabled [name: 'agent_cron_jobs_enabled_idx']
96
+ remaining_executions [name: 'agent_cron_jobs_remaining_executions_idx']
97
+ last_executed_at [name: 'agent_cron_jobs_last_executed_at_idx']
98
+ }
99
+ }
100
+
70
101
  table ai_models {
71
102
  id varchar(150) [not null]
72
103
  display_name varchar(200)
@@ -269,7 +300,6 @@ table chat_groups_agents {
269
300
 
270
301
  table documents {
271
302
  id varchar(255) [pk, not null]
272
- slug varchar(255)
273
303
  title text
274
304
  description text
275
305
  content text
@@ -287,6 +317,7 @@ table documents {
287
317
  user_id text [not null]
288
318
  client_id text
289
319
  editor_data jsonb
320
+ slug varchar(255)
290
321
  accessed_at "timestamp with time zone" [not null, default: `now()`]
291
322
  created_at "timestamp with time zone" [not null, default: `now()`]
292
323
  updated_at "timestamp with time zone" [not null, default: `now()`]
@@ -1071,6 +1102,8 @@ table topics {
1071
1102
  client_id text
1072
1103
  history_summary text
1073
1104
  metadata jsonb
1105
+ trigger text
1106
+ mode text
1074
1107
  accessed_at "timestamp with time zone" [not null, default: `now()`]
1075
1108
  created_at "timestamp with time zone" [not null, default: `now()`]
1076
1109
  updated_at "timestamp with time zone" [not null, default: `now()`]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.245",
3
+ "version": "2.0.0-next.247",
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",
@@ -37,7 +37,7 @@
37
37
  "postbuild": "npm run build-sitemap && npm run build-migrate-db",
38
38
  "build-migrate-db": "bun run db:migrate",
39
39
  "build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
40
- "build:analyze": "NODE_OPTIONS=--max-old-space-size=8192 ANALYZE=true next build --webpack",
40
+ "build:analyze": "NODE_OPTIONS=--max-old-space-size=81920 ANALYZE=true next build --webpack",
41
41
  "build:docker": "npm run prebuild && NODE_OPTIONS=--max-old-space-size=8192 DOCKER=true next build --webpack && npm run build-sitemap",
42
42
  "build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=8192 NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/electronWorkflow/buildNextApp.mts",
43
43
  "build:vercel": "npm run prebuild && cross-env NODE_OPTIONS=--max-old-space-size=6144 next build --webpack && npm run postbuild",
@@ -0,0 +1,54 @@
1
+ CREATE TABLE IF NOT EXISTS "agent_cron_jobs" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "agent_id" text NOT NULL,
4
+ "group_id" text,
5
+ "user_id" text NOT NULL,
6
+ "name" text,
7
+ "description" text,
8
+ "enabled" boolean DEFAULT true,
9
+ "cron_pattern" text NOT NULL,
10
+ "timezone" text DEFAULT 'UTC',
11
+ "content" text NOT NULL,
12
+ "edit_data" jsonb,
13
+ "max_executions" integer,
14
+ "remaining_executions" integer,
15
+ "execution_conditions" jsonb,
16
+ "last_executed_at" timestamp,
17
+ "total_executions" integer DEFAULT 0,
18
+ "accessed_at" timestamp with time zone DEFAULT now() NOT NULL,
19
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
20
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
21
+ );
22
+ --> statement-breakpoint
23
+ ALTER TABLE "topics" ADD COLUMN IF NOT EXISTS "trigger" text;--> statement-breakpoint
24
+ ALTER TABLE "topics" ADD COLUMN IF NOT EXISTS "mode" text;--> statement-breakpoint
25
+ DO $$ BEGIN
26
+ IF NOT EXISTS (
27
+ SELECT 1 FROM pg_constraint
28
+ WHERE conname = 'agent_cron_jobs_agent_id_agents_id_fk'
29
+ ) THEN
30
+ ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_agent_id_agents_id_fk" FOREIGN KEY ("agent_id") REFERENCES "public"."agents"("id") ON DELETE cascade ON UPDATE no action;
31
+ END IF;
32
+ END $$;--> statement-breakpoint
33
+ DO $$ BEGIN
34
+ IF NOT EXISTS (
35
+ SELECT 1 FROM pg_constraint
36
+ WHERE conname = 'agent_cron_jobs_group_id_chat_groups_id_fk'
37
+ ) THEN
38
+ ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_group_id_chat_groups_id_fk" FOREIGN KEY ("group_id") REFERENCES "public"."chat_groups"("id") ON DELETE cascade ON UPDATE no action;
39
+ END IF;
40
+ END $$;--> statement-breakpoint
41
+ DO $$ BEGIN
42
+ IF NOT EXISTS (
43
+ SELECT 1 FROM pg_constraint
44
+ WHERE conname = 'agent_cron_jobs_user_id_users_id_fk'
45
+ ) THEN
46
+ ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
47
+ END IF;
48
+ END $$;--> statement-breakpoint
49
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_agent_id_idx" ON "agent_cron_jobs" USING btree ("agent_id");--> statement-breakpoint
50
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_group_id_idx" ON "agent_cron_jobs" USING btree ("group_id");--> statement-breakpoint
51
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_user_id_idx" ON "agent_cron_jobs" USING btree ("user_id");--> statement-breakpoint
52
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_enabled_idx" ON "agent_cron_jobs" USING btree ("enabled");--> statement-breakpoint
53
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_remaining_executions_idx" ON "agent_cron_jobs" USING btree ("remaining_executions");--> statement-breakpoint
54
+ CREATE INDEX IF NOT EXISTS "agent_cron_jobs_last_executed_at_idx" ON "agent_cron_jobs" USING btree ("last_executed_at");