@lobehub/lobehub 2.1.0 → 2.1.2

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.
Files changed (174) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/apps/desktop/src/main/controllers/McpInstallCtr.ts +10 -10
  5. package/apps/desktop/src/main/controllers/NetworkProxyCtr.ts +6 -6
  6. package/apps/desktop/src/main/controllers/RemoteServerSyncCtr.ts +2 -2
  7. package/changelog/v2.json +18 -0
  8. package/docker-compose/deploy/.env.example +35 -0
  9. package/docker-compose/deploy/.env.zh-CN.example +31 -0
  10. package/docker-compose/deploy/bucket.config.json +18 -0
  11. package/docker-compose/deploy/docker-compose.yml +148 -0
  12. package/docker-compose/deploy/searxng-settings.yml +2582 -0
  13. package/docker-compose/setup.sh +37 -88
  14. package/docs/changelog/2025-03-02-new-models.mdx +1 -1
  15. package/docs/changelog/2025-03-02-new-models.zh-CN.mdx +1 -1
  16. package/docs/changelog/2025-04-06-exports.mdx +1 -1
  17. package/docs/changelog/2025-04-06-exports.zh-CN.mdx +1 -1
  18. package/docs/changelog/2025-05-08-desktop-app.mdx +2 -2
  19. package/docs/changelog/2025-05-08-desktop-app.zh-CN.mdx +2 -2
  20. package/docs/changelog/2025-06-08-claude-4.mdx +1 -1
  21. package/docs/changelog/2025-06-08-claude-4.zh-CN.mdx +1 -1
  22. package/docs/changelog/2025-07-08-mcp-market.mdx +1 -1
  23. package/docs/changelog/2025-07-08-mcp-market.zh-CN.mdx +1 -1
  24. package/docs/changelog/2025-08-08-image-generation.mdx +1 -1
  25. package/docs/changelog/2025-08-08-image-generation.zh-CN.mdx +1 -1
  26. package/docs/changelog/2025-09-08-gemini.mdx +1 -1
  27. package/docs/changelog/2025-09-08-gemini.zh-CN.mdx +1 -1
  28. package/docs/changelog/2025-10-08-python.mdx +1 -1
  29. package/docs/changelog/2025-10-08-python.zh-CN.mdx +1 -1
  30. package/docs/changelog/2025-11-08-comfy-ui.mdx +1 -1
  31. package/docs/changelog/2025-11-08-comfy-ui.zh-CN.mdx +1 -1
  32. package/docs/changelog/2025-12-20-mcp.mdx +1 -1
  33. package/docs/changelog/2025-12-20-mcp.zh-CN.mdx +1 -1
  34. package/docs/development/basic/add-new-authentication-providers.zh-CN.mdx +1 -1
  35. package/docs/development/basic/add-new-image-model.mdx +3 -3
  36. package/docs/development/basic/add-new-image-model.zh-CN.mdx +3 -3
  37. package/docs/development/basic/chat-api.mdx +10 -10
  38. package/docs/development/basic/chat-api.zh-CN.mdx +10 -10
  39. package/docs/development/basic/feature-development.mdx +4 -4
  40. package/docs/development/basic/feature-development.zh-CN.mdx +4 -4
  41. package/docs/development/basic/setup-development.mdx +4 -4
  42. package/docs/development/basic/setup-development.zh-CN.mdx +4 -4
  43. package/docs/development/internationalization/add-new-locale.mdx +1 -1
  44. package/docs/development/internationalization/add-new-locale.zh-CN.mdx +1 -1
  45. package/docs/development/internationalization/internationalization-implementation.mdx +5 -5
  46. package/docs/development/internationalization/internationalization-implementation.zh-CN.mdx +5 -5
  47. package/docs/development/others/lighthouse.mdx +8 -8
  48. package/docs/development/others/lighthouse.zh-CN.mdx +8 -8
  49. package/docs/development/start.mdx +3 -3
  50. package/docs/development/start.zh-CN.mdx +3 -3
  51. package/docs/self-hosting/advanced/feature-flags.mdx +1 -1
  52. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
  53. package/docs/self-hosting/advanced/knowledge-base.mdx +2 -2
  54. package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +2 -2
  55. package/docs/self-hosting/advanced/online-search.mdx +1 -1
  56. package/docs/self-hosting/advanced/online-search.zh-CN.mdx +1 -1
  57. package/docs/self-hosting/advanced/redis/upstash.mdx +3 -3
  58. package/docs/self-hosting/advanced/redis/upstash.zh-CN.mdx +3 -3
  59. package/docs/self-hosting/advanced/redis.mdx +6 -6
  60. package/docs/self-hosting/advanced/redis.zh-CN.mdx +6 -6
  61. package/docs/self-hosting/advanced/s3/rustfs.mdx +116 -116
  62. package/docs/self-hosting/advanced/s3/rustfs.zh-CN.mdx +116 -117
  63. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -5
  64. package/docs/self-hosting/auth/email.mdx +70 -0
  65. package/docs/self-hosting/auth/email.zh-CN.mdx +70 -0
  66. package/docs/self-hosting/{advanced/auth → auth}/legacy.mdx +10 -10
  67. package/docs/self-hosting/{advanced/auth → auth}/legacy.zh-CN.mdx +5 -5
  68. package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.zh-CN.mdx +3 -3
  69. package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.zh-CN.mdx +2 -2
  70. package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.zh-CN.mdx +2 -2
  71. package/docs/self-hosting/{advanced/auth → auth}/providers/apple.mdx +6 -6
  72. package/docs/self-hosting/{advanced/auth → auth}/providers/apple.zh-CN.mdx +6 -6
  73. package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.mdx +12 -12
  74. package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.zh-CN.mdx +12 -12
  75. package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.mdx +13 -13
  76. package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.zh-CN.mdx +13 -13
  77. package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.mdx +13 -13
  78. package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.zh-CN.mdx +13 -13
  79. package/docs/self-hosting/auth/providers/casdoor.mdx +197 -0
  80. package/docs/self-hosting/auth/providers/casdoor.zh-CN.mdx +248 -0
  81. package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.mdx +7 -7
  82. package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.zh-CN.mdx +6 -6
  83. package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.mdx +13 -13
  84. package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.zh-CN.mdx +13 -13
  85. package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.mdx +10 -10
  86. package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.zh-CN.mdx +10 -10
  87. package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.mdx +12 -12
  88. package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.zh-CN.mdx +12 -12
  89. package/docs/self-hosting/{advanced/auth → auth}/providers/github.mdx +10 -10
  90. package/docs/self-hosting/{advanced/auth → auth}/providers/github.zh-CN.mdx +10 -10
  91. package/docs/self-hosting/{advanced/auth → auth}/providers/google.mdx +10 -10
  92. package/docs/self-hosting/{advanced/auth → auth}/providers/google.zh-CN.mdx +10 -10
  93. package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.mdx +11 -11
  94. package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.zh-CN.mdx +11 -11
  95. package/docs/self-hosting/{advanced/auth → auth}/providers/logto.mdx +8 -8
  96. package/docs/self-hosting/{advanced/auth → auth}/providers/logto.zh-CN.mdx +7 -7
  97. package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.mdx +11 -11
  98. package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.zh-CN.mdx +11 -11
  99. package/docs/self-hosting/{advanced/auth → auth}/providers/okta.mdx +13 -13
  100. package/docs/self-hosting/{advanced/auth → auth}/providers/okta.zh-CN.mdx +13 -13
  101. package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.mdx +10 -10
  102. package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.zh-CN.mdx +10 -10
  103. package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.mdx +13 -13
  104. package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.zh-CN.mdx +13 -13
  105. package/docs/self-hosting/{advanced/auth.mdx → auth.mdx} +12 -81
  106. package/docs/self-hosting/{advanced/auth.zh-CN.mdx → auth.zh-CN.mdx} +11 -80
  107. package/docs/self-hosting/environment-variables/redis.mdx +1 -1
  108. package/docs/self-hosting/environment-variables/redis.zh-CN.mdx +1 -1
  109. package/docs/self-hosting/environment-variables.mdx +1 -1
  110. package/docs/self-hosting/faq/no-v1-suffix.mdx +3 -3
  111. package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +3 -3
  112. package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.mdx +7 -7
  113. package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.zh-CN.mdx +7 -7
  114. package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.mdx +2 -2
  115. package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.zh-CN.mdx +2 -2
  116. package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.mdx +11 -11
  117. package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.zh-CN.mdx +11 -11
  118. package/docs/self-hosting/migration/v2/breaking-changes.mdx +1 -1
  119. package/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx +1 -1
  120. package/docs/self-hosting/platform/docker-compose.mdx +43 -561
  121. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +43 -540
  122. package/docs/self-hosting/platform/docker.mdx +5 -5
  123. package/docs/self-hosting/platform/docker.zh-CN.mdx +10 -10
  124. package/docs/self-hosting/platform/dokploy.mdx +1 -1
  125. package/docs/self-hosting/platform/dokploy.zh-CN.mdx +5 -5
  126. package/docs/self-hosting/platform/sealos.mdx +12 -12
  127. package/docs/self-hosting/platform/sealos.zh-CN.mdx +17 -17
  128. package/docs/self-hosting/platform/vercel.zh-CN.mdx +4 -4
  129. package/docs/self-hosting/start.mdx +3 -3
  130. package/docs/self-hosting/start.zh-CN.mdx +4 -4
  131. package/locales/en-US/auth.json +1 -1
  132. package/locales/en-US/authError.json +1 -0
  133. package/locales/en-US/metadata.json +1 -1
  134. package/locales/zh-CN/authError.json +1 -0
  135. package/package.json +1 -1
  136. package/packages/const/src/url.ts +1 -1
  137. package/src/app/[variants]/(auth)/auth-error/page.tsx +4 -2
  138. package/src/app/[variants]/(auth)/signin/SignInEmailStep.tsx +1 -1
  139. package/src/app/[variants]/(auth)/signin/SignInPasswordStep.tsx +1 -1
  140. package/src/features/Conversation/Messages/AssistantGroup/components/MessageContent.tsx +6 -1
  141. package/src/libs/better-auth/sso/providers/feishu.ts +15 -14
  142. package/src/libs/better-auth/sso/providers/wechat.ts +6 -3
  143. package/src/libs/next/proxy/define-config.ts +1 -0
  144. package/src/locales/default/auth.ts +1 -1
  145. package/src/locales/default/authError.ts +2 -0
  146. package/src/locales/default/metadata.ts +1 -1
  147. package/src/server/ld.ts +1 -1
  148. package/docs/self-hosting/advanced/auth/providers/casdoor.mdx +0 -87
  149. package/docs/self-hosting/advanced/auth/providers/casdoor.zh-CN.mdx +0 -83
  150. /package/docs/self-hosting/{advanced/auth → auth}/clerk.mdx +0 -0
  151. /package/docs/self-hosting/{advanced/auth → auth}/clerk.zh-CN.mdx +0 -0
  152. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.mdx +0 -0
  153. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.zh-CN.mdx +0 -0
  154. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.mdx +0 -0
  155. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.zh-CN.mdx +0 -0
  156. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.mdx +0 -0
  157. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.zh-CN.mdx +0 -0
  158. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.mdx +0 -0
  159. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.mdx +0 -0
  160. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.zh-CN.mdx +0 -0
  161. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.mdx +0 -0
  162. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.zh-CN.mdx +0 -0
  163. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.mdx +0 -0
  164. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.zh-CN.mdx +0 -0
  165. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.mdx +0 -0
  166. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.mdx +0 -0
  167. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.mdx +0 -0
  168. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.zh-CN.mdx +0 -0
  169. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.mdx +0 -0
  170. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.zh-CN.mdx +0 -0
  171. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.mdx +0 -0
  172. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.zh-CN.mdx +0 -0
  173. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.mdx +0 -0
  174. /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.zh-CN.mdx +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 2.1.2](https://github.com/lobehub/lobe-chat/compare/v2.1.1...v2.1.2)
6
+
7
+ <sup>Released on **2026-01-30**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix feishu sso provider.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix feishu sso provider, closes [#11970](https://github.com/lobehub/lobe-chat/issues/11970) ([ffd9fff](https://github.com/lobehub/lobe-chat/commit/ffd9fff))
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.1.1](https://github.com/lobehub/lobe-chat/compare/v2.1.0...v2.1.1)
31
+
32
+ <sup>Released on **2026-01-30**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Correct desktop download URL path.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Correct desktop download URL path, closes [#11990](https://github.com/lobehub/lobe-chat/issues/11990) ([e46df98](https://github.com/lobehub/lobe-chat/commit/e46df98))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ## [Version 2.1.0](https://github.com/lobehub/lobe-chat/compare/v2.0.13...v2.1.0)
6
56
 
7
57
  <sup>Released on **2026-01-30**</sup>
package/README.md CHANGED
@@ -37,7 +37,7 @@ We’re building the world’s largest human–agent co-evolving network.
37
37
  [![][share-mastodon-shield]][share-mastodon-link]
38
38
  [![][share-linkedin-shield]][share-linkedin-link]
39
39
 
40
- <sup>Agent teams that grow with you</sup>
40
+ <sup>Agent teammates that grow with you</sup>
41
41
 
42
42
  [![][github-trending-shield]][github-trending-url]
43
43
 
package/README.zh-CN.md CHANGED
@@ -35,7 +35,7 @@ LobeHub 是一个工作与生活空间,用于发现、构建并与会随着您
35
35
  [![][share-weibo-shield]][share-weibo-link]
36
36
  [![][share-mastodon-shield]][share-mastodon-link]
37
37
 
38
- <sup>Agent teams that grow with you</sup>
38
+ <sup>Agent teammates that grow with you</sup>
39
39
 
40
40
  [![][github-trending-shield]][github-trending-url]
41
41
  [![][github-hello-shield]][github-hello-url]
@@ -59,14 +59,14 @@ interface McpInstallParams {
59
59
  */
60
60
  export default class McpInstallController extends ControllerModule {
61
61
  /**
62
- * 处理 MCP 插件安装请求
63
- * @param parsedData 解析后的协议数据
64
- * @returns 是否处理成功
62
+ * Handle MCP plugin installation request
63
+ * @param parsedData Parsed protocol data
64
+ * @returns Whether processing succeeded
65
65
  */
66
66
  @protocolHandler('install')
67
67
  public async handleInstallRequest(parsedData: McpInstallParams): Promise<boolean> {
68
68
  try {
69
- // 从参数中提取必需字段
69
+ // Extract required fields from parameters
70
70
  const { id, schema: schemaParam, marketId } = parsedData;
71
71
 
72
72
  if (!id) {
@@ -76,11 +76,11 @@ export default class McpInstallController extends ControllerModule {
76
76
  return false;
77
77
  }
78
78
 
79
- // 映射协议来源
79
+ // Map protocol source
80
80
 
81
81
  const isOfficialMarket = marketId === 'lobehub';
82
82
 
83
- // 对于官方市场,schema 是可选的;对于第三方市场,schema 是必需的
83
+ // For official marketplace, schema is optional; for third-party marketplace, schema is required
84
84
  if (!isOfficialMarket && !schemaParam) {
85
85
  logger.warn(`🔧 [McpInstall] Schema is required for third-party marketplace:`, {
86
86
  marketId,
@@ -90,7 +90,7 @@ export default class McpInstallController extends ControllerModule {
90
90
 
91
91
  let mcpSchema: McpSchema | undefined;
92
92
 
93
- // 如果提供了 schema 参数,则解析和验证
93
+ // If schema parameter is provided, parse and validate
94
94
  if (schemaParam) {
95
95
  try {
96
96
  mcpSchema = JSON.parse(schemaParam);
@@ -104,7 +104,7 @@ export default class McpInstallController extends ControllerModule {
104
104
  return false;
105
105
  }
106
106
 
107
- // 验证 identifier id 参数匹配
107
+ // Verify identifier matches id parameter
108
108
  if (mcpSchema.identifier !== id) {
109
109
  logger.error(`🔧 [McpInstall] Schema identifier does not match URL id parameter:`, {
110
110
  schemaId: mcpSchema.identifier,
@@ -122,7 +122,7 @@ export default class McpInstallController extends ControllerModule {
122
122
  pluginVersion: mcpSchema?.version || 'Unknown',
123
123
  });
124
124
 
125
- // 广播安装请求到前端
125
+ // Broadcast installation request to frontend
126
126
  const installRequest = {
127
127
  marketId,
128
128
  pluginId: id,
@@ -136,7 +136,7 @@ export default class McpInstallController extends ControllerModule {
136
136
  pluginName: installRequest.schema?.name || 'Unknown',
137
137
  });
138
138
 
139
- // 通过应用实例广播到前端
139
+ // Broadcast to frontend via app instance
140
140
  if (this.app?.browserManager) {
141
141
  this.app.browserManager.broadcastToWindow('app', 'mcpInstallRequest', installRequest);
142
142
  logger.debug(`🔧 [McpInstall] Install request broadcasted successfully`);
@@ -88,7 +88,7 @@ export default class NetworkProxyCtr extends ControllerModule {
88
88
  }
89
89
 
90
90
  /**
91
- * 测试代理连接
91
+ * Test proxy connection
92
92
  */
93
93
  @IpcMethod()
94
94
  async testProxyConnection(url: string): Promise<{ message?: string; success: boolean }> {
@@ -108,7 +108,7 @@ export default class NetworkProxyCtr extends ControllerModule {
108
108
  }
109
109
 
110
110
  /**
111
- * 测试指定代理配置
111
+ * Test specified proxy configuration
112
112
  */
113
113
  @IpcMethod()
114
114
  async testProxyConfig({
@@ -131,17 +131,17 @@ export default class NetworkProxyCtr extends ControllerModule {
131
131
  }
132
132
 
133
133
  /**
134
- * 应用初始代理设置
134
+ * Apply initial proxy settings
135
135
  */
136
136
  async beforeAppReady(): Promise<void> {
137
137
  try {
138
- // 获取存储的代理设置
138
+ // Get stored proxy settings
139
139
  const networkProxy = this.app.storeManager.get(
140
140
  'networkProxy',
141
141
  defaultProxySettings,
142
142
  ) as NetworkProxySettings;
143
143
 
144
- // 验证配置
144
+ // Validate configuration
145
145
  const validation = ProxyConfigValidator.validate(networkProxy);
146
146
  if (!validation.isValid) {
147
147
  logger.warn('Invalid stored proxy configuration, using defaults:', validation.errors);
@@ -158,7 +158,7 @@ export default class NetworkProxyCtr extends ControllerModule {
158
158
  });
159
159
  } catch (error) {
160
160
  logger.error('Failed to apply initial proxy settings:', error);
161
- // 出错时使用默认设置
161
+ // Use default settings on error
162
162
  try {
163
163
  await ProxyDispatcherManager.applyProxySettings(defaultProxySettings);
164
164
  logger.info('Fallback to default proxy settings');
@@ -162,7 +162,7 @@ export default class RemoteServerSyncCtr extends ControllerModule {
162
162
  });
163
163
  });
164
164
 
165
- // 5. 监听请求本身的错误(如 DNS 解析失败)
165
+ // 5. Listen for request errors (e.g., DNS resolution failure)
166
166
  clientReq.on('error', (error) => {
167
167
  logger.error(`${logPrefix} Error forwarding request:`, error);
168
168
  if (sender.isDestroyed()) return;
@@ -196,7 +196,7 @@ export default class RemoteServerSyncCtr extends ControllerModule {
196
196
  delete requestHeaders['connection']; // Often causes issues
197
197
  // delete requestHeaders['content-length']; // Let node handle it based on body
198
198
 
199
- // 读取代理配置
199
+ // Read proxy configuration
200
200
  const proxyConfig = this.app.storeManager.get('networkProxy', defaultProxySettings);
201
201
 
202
202
  let agent;
package/changelog/v2.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix feishu sso provider."
6
+ ]
7
+ },
8
+ "date": "2026-01-30",
9
+ "version": "2.1.2"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Correct desktop download URL path."
15
+ ]
16
+ },
17
+ "date": "2026-01-30",
18
+ "version": "2.1.1"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "features": [
@@ -0,0 +1,35 @@
1
+ # Proxy, if you need it
2
+ # HTTP_PROXY=http://localhost:7890
3
+ # HTTPS_PROXY=http://localhost:7890
4
+
5
+ # Allowed email addresses for login, separated by commas
6
+ # When set, only emails in the list can log in, other users cannot log in
7
+ # Leave empty to allow all users to register
8
+ # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
+
10
+
11
+ # ===========================
12
+ # ====== Preset config ======
13
+ # ===========================
14
+ # if no special requirements, no need to change
15
+ LOBE_PORT=3210
16
+ RUSTFS_PORT=9000
17
+ APP_URL=http://localhost:3210
18
+ # INTERNAL_APP_URL is optional, used for server-to-server calls
19
+ # to bypass CDN/proxy. If not set, defaults to APP_URL.
20
+ # Example: INTERNAL_APP_URL=http://localhost:3210
21
+
22
+ # Postgres related, which are the necessary environment variables for DB
23
+ LOBE_DB_NAME=lobechat
24
+ POSTGRES_PASSWORD=uWNZugjBqixf8dxC
25
+
26
+ # RUSTFS S3 configuration
27
+ RUSTFS_ACCESS_KEY=admin
28
+ RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
29
+
30
+ # Configure the bucket information of RUSTFS
31
+ S3_PUBLIC_DOMAIN=http://localhost:9000
32
+ S3_ENDPOINT=http://localhost:9000
33
+ RUSTFS_LOBE_BUCKET=lobe
34
+
35
+ JWKS_KEY={"keys":[{"d":"PVoFyqyrGstB8wU52S7gqqQQdZLtin_thcEM0nrNtqp9U-NlKLlhgEcWp5t89ycgvhsAzmrRbezGj4JBTr3jn7eWdwQpPJNYiipnsgeJn0pwsB0H2dMqtavxinoPVXkMTOuGHMTFhhyguFBw2JbIL0PTQUcUlXjv40OoJpYHZeggSxgfV-TuxjwW8Ll4-n84M5IOi6A53RvioE-Hm1iyIc2XLBCfyOu-SbAQYi8HzrA64kCxobAB0peLQMiAzfZmwPKiGOhnhKrAlYmG02qFnbUYiJu_-AXwsAyGv9S9i6dwK7QXaGGWYyis8LlPpd_JmPrBnrWomwDlI045NUMWZQ","dp":"OSXI2NBBZl2r0Dpf4-1z44A_jC5lOyXtJhXQYnSXy5eIuxTJcEtkUYagGEwnREO4Q3t-4J-lT_6Y71M1ZlgKG1upwfw1O4aE3vGpHOik9iZYYCjA8fe5uBfOpX1ELmOtHNoHRhMtyjuPxSFXLlSp3bgcF1f3F40ClukdvXCx0Mc","dq":"m6hNdfj-F8E_7nUlX2nG95OffkFrhHTo67ML9aPgpvFwBlzg-hk5LwtxMfUzngqWF78TMl0JDm7vS1bz0xlWqXqu8pFPoTUnUoWgYfvuyHLBwR5TgccQkfoKbkSMzYNy8VJPXZeyIjVXsW98tZvj-NZF-M9Pke_EWJm-jjXCu_8","e":"AQAB","kty":"RSA","n":"piffosMS0HOSgsSr_zQkXYaQt1kOCD73VR0b2XJD6UdQCKPbnBOzTIuA_xowX61QVsl5pCZLTw8ERC3r2Nlxj5Rp_H6RuOT7ioUqlbnxSGnfuAn8dFupY3A-sf9HVDOvtJdlS-nO9yA4wWU-A50zZ1Mf0pPZlUZE6dUQfsJFi5yXaNAybyk3U4VpMO_SXAilWEHVhiO0F0ccpJMCkT47AeXmYH9MlWwIGcay0UiAsdrs8J-q1arZ7Mbq0oxHmUXJG0vwRvAL8KnCEi8cJ3e2kKCRcr-BQCujsHUyUl6f_ATwSVuTHdAR1IzIcW37v27h3WQK_v0ffQM1NstamDX5vQ","p":"4myVm2M5cZGvVXsOmWUTUG87VC1GlQcL5tmMNSGSpQCL8yWZ1vANkmCxSMptrKB4dU9DAB3On6_oMhW1pJ3uYNGSW49BcmJoLkiWKeg5zWFnKPQNuThQmY1sCCubtKhBQgaYUr7TVzN9smrDV3zCu9MlRl-XPwnEmWaDII3g-f8","q":"u9v4IOEsb4l2Y3eWKE2bwJh5fJRR4vivaYA7U-1-OpvDwB3A48Rey9IL1ucXqE5G1Du8BtijPm5oSAar5uzrjtg1bZ9gevif6DnBGaIRE7LnSrUsTPfZwzntJ1rTaGiVe_pAdnTKXXaH6DxygXxH4wvGgA44V3TTfBXQUcjzdEM","qi":"lDBnSPKkRnYqQvbqVD1LxzqBPEeqEA3GyCqMj6fIZNgoEaBSLi0TSsUyGZ5mahX3KO35vKAZa5jvGjhvUGUiXycq8KvRZdeGK45vJdwZT2TiXiDwo9IQgJcbFMpxaB9DhjX2x0yqxgUY5ca75jLqbMuKBKBN0PVqIr9jlHkR8_s","use":"sig","kid":"6823046760c5d460","alg":"RS256"}]}
@@ -0,0 +1,31 @@
1
+ # Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商)
2
+ # HTTP_PROXY=http://localhost:7890
3
+ # HTTPS_PROXY=http://localhost:7890
4
+
5
+ # 允许登录的邮箱地址,用英文逗号分隔
6
+ # 设置后只有列表中的邮箱可以登录,其他用户可以注册但无法登录
7
+ # 留空则允许所有用户注册登录
8
+ # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
+
10
+ # ===================
11
+ # ===== 预设配置 =====
12
+ # ===================
13
+ # 如没有特殊需要不用更改
14
+ LOBE_PORT=3210
15
+ RUSTFS_PORT=9000
16
+ APP_URL=http://localhost:3210
17
+
18
+ # Postgres 相关,也即 DB 必须的环境变量
19
+ LOBE_DB_NAME=lobehub
20
+ POSTGRES_PASSWORD=uWNZugjBqixf8dxC
21
+
22
+ # RustFS S3 配置
23
+ RUSTFS_ACCESS_KEY=admin
24
+ RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
25
+
26
+ # 在下方配置 rustfs 中添加的桶
27
+ S3_PUBLIC_DOMAIN=http://localhost:9000
28
+ S3_ENDPOINT=http://localhost:9000
29
+ RUSTFS_LOBE_BUCKET=lobe
30
+
31
+ JWKS_KEY={"keys":[{"d":"PVoFyqyrGstB8wU52S7gqqQQdZLtin_thcEM0nrNtqp9U-NlKLlhgEcWp5t89ycgvhsAzmrRbezGj4JBTr3jn7eWdwQpPJNYiipnsgeJn0pwsB0H2dMqtavxinoPVXkMTOuGHMTFhhyguFBw2JbIL0PTQUcUlXjv40OoJpYHZeggSxgfV-TuxjwW8Ll4-n84M5IOi6A53RvioE-Hm1iyIc2XLBCfyOu-SbAQYi8HzrA64kCxobAB0peLQMiAzfZmwPKiGOhnhKrAlYmG02qFnbUYiJu_-AXwsAyGv9S9i6dwK7QXaGGWYyis8LlPpd_JmPrBnrWomwDlI045NUMWZQ","dp":"OSXI2NBBZl2r0Dpf4-1z44A_jC5lOyXtJhXQYnSXy5eIuxTJcEtkUYagGEwnREO4Q3t-4J-lT_6Y71M1ZlgKG1upwfw1O4aE3vGpHOik9iZYYCjA8fe5uBfOpX1ELmOtHNoHRhMtyjuPxSFXLlSp3bgcF1f3F40ClukdvXCx0Mc","dq":"m6hNdfj-F8E_7nUlX2nG95OffkFrhHTo67ML9aPgpvFwBlzg-hk5LwtxMfUzngqWF78TMl0JDm7vS1bz0xlWqXqu8pFPoTUnUoWgYfvuyHLBwR5TgccQkfoKbkSMzYNy8VJPXZeyIjVXsW98tZvj-NZF-M9Pke_EWJm-jjXCu_8","e":"AQAB","kty":"RSA","n":"piffosMS0HOSgsSr_zQkXYaQt1kOCD73VR0b2XJD6UdQCKPbnBOzTIuA_xowX61QVsl5pCZLTw8ERC3r2Nlxj5Rp_H6RuOT7ioUqlbnxSGnfuAn8dFupY3A-sf9HVDOvtJdlS-nO9yA4wWU-A50zZ1Mf0pPZlUZE6dUQfsJFi5yXaNAybyk3U4VpMO_SXAilWEHVhiO0F0ccpJMCkT47AeXmYH9MlWwIGcay0UiAsdrs8J-q1arZ7Mbq0oxHmUXJG0vwRvAL8KnCEi8cJ3e2kKCRcr-BQCujsHUyUl6f_ATwSVuTHdAR1IzIcW37v27h3WQK_v0ffQM1NstamDX5vQ","p":"4myVm2M5cZGvVXsOmWUTUG87VC1GlQcL5tmMNSGSpQCL8yWZ1vANkmCxSMptrKB4dU9DAB3On6_oMhW1pJ3uYNGSW49BcmJoLkiWKeg5zWFnKPQNuThQmY1sCCubtKhBQgaYUr7TVzN9smrDV3zCu9MlRl-XPwnEmWaDII3g-f8","q":"u9v4IOEsb4l2Y3eWKE2bwJh5fJRR4vivaYA7U-1-OpvDwB3A48Rey9IL1ucXqE5G1Du8BtijPm5oSAar5uzrjtg1bZ9gevif6DnBGaIRE7LnSrUsTPfZwzntJ1rTaGiVe_pAdnTKXXaH6DxygXxH4wvGgA44V3TTfBXQUcjzdEM","qi":"lDBnSPKkRnYqQvbqVD1LxzqBPEeqEA3GyCqMj6fIZNgoEaBSLi0TSsUyGZ5mahX3KO35vKAZa5jvGjhvUGUiXycq8KvRZdeGK45vJdwZT2TiXiDwo9IQgJcbFMpxaB9DhjX2x0yqxgUY5ca75jLqbMuKBKBN0PVqIr9jlHkR8_s","use":"sig","kid":"6823046760c5d460","alg":"RS256"}]}
@@ -0,0 +1,18 @@
1
+ {
2
+ "ID": "",
3
+ "Statement": [
4
+ {
5
+ "Sid": "",
6
+ "Effect": "Allow",
7
+ "Principal": {
8
+ "AWS": ["*"]
9
+ },
10
+ "Action": ["s3:GetObject"],
11
+ "NotAction": [],
12
+ "Resource": ["arn:aws:s3:::lobe/*"],
13
+ "NotResource": [],
14
+ "Condition": {}
15
+ }
16
+ ],
17
+ "Version": "2012-10-17"
18
+ }
@@ -0,0 +1,148 @@
1
+ name: lobehub
2
+ services:
3
+ network-service:
4
+ image: alpine
5
+ container_name: lobe-network
6
+ restart: always
7
+ ports:
8
+ - '${RUSTFS_PORT}:9000' # RustFS API
9
+ - '9001:9001' # RustFS Console
10
+ - '${LOBE_PORT}:3210' # LobeChat
11
+ command: tail -f /dev/null
12
+ networks:
13
+ - lobe-network
14
+
15
+ postgresql:
16
+ image: paradedb/paradedb:latest-pg17
17
+ container_name: lobe-postgres
18
+ ports:
19
+ - '5432:5432'
20
+ volumes:
21
+ - './data:/var/lib/postgresql/data'
22
+ environment:
23
+ - 'POSTGRES_DB=${LOBE_DB_NAME}'
24
+ - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
25
+ healthcheck:
26
+ test: ['CMD-SHELL', 'pg_isready -U postgres']
27
+ interval: 5s
28
+ timeout: 5s
29
+ retries: 5
30
+ restart: always
31
+ networks:
32
+ - lobe-network
33
+
34
+ redis:
35
+ image: redis:7-alpine
36
+ container_name: lobe-redis
37
+ ports:
38
+ - '6379:6379'
39
+ command: redis-server --save 60 1000 --appendonly yes
40
+ volumes:
41
+ - 'redis_data:/data'
42
+ healthcheck:
43
+ test: ['CMD', 'redis-cli', 'ping']
44
+ interval: 5s
45
+ timeout: 3s
46
+ retries: 5
47
+ restart: always
48
+ networks:
49
+ - lobe-network
50
+
51
+ rustfs:
52
+ image: rustfs/rustfs:latest
53
+ container_name: lobe-rustfs
54
+ network_mode: 'service:network-service'
55
+ environment:
56
+ - RUSTFS_CONSOLE_ENABLE=true
57
+ - RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY}
58
+ - RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}
59
+ volumes:
60
+ - rustfs-data:/data
61
+ healthcheck:
62
+ test: ["CMD-SHELL", "wget -qO- http://localhost:9000/health >/dev/null 2>&1 || exit 1"]
63
+ interval: 5s
64
+ timeout: 3s
65
+ retries: 30
66
+ command: ["--access-key","${RUSTFS_ACCESS_KEY}","--secret-key","${RUSTFS_SECRET_KEY}","/data"]
67
+
68
+ rustfs-init:
69
+ image: minio/mc:latest
70
+ container_name: lobe-rustfs-init
71
+ depends_on:
72
+ rustfs:
73
+ condition: service_healthy
74
+ volumes:
75
+ - ./bucket.config.json:/bucket.config.json:ro
76
+ entrypoint: /bin/sh
77
+ command: -c '
78
+ set -eux;
79
+ echo "S3_ACCESS_KEY=${RUSTFS_ACCESS_KEY}, S3_SECRET_KEY=${RUSTFS_SECRET_KEY}";
80
+ mc --version;
81
+ mc alias set rustfs "http://network-service:9000" "${RUSTFS_ACCESS_KEY}" "${RUSTFS_SECRET_KEY}";
82
+ mc ls rustfs || true;
83
+ mc mb "rustfs/lobe" --ignore-existing;
84
+ mc admin info rustfs || true;
85
+ mc anonymous set-json "/bucket.config.json" "rustfs/lobe";
86
+ '
87
+ restart: "no"
88
+ networks:
89
+ - lobe-network
90
+
91
+ searxng:
92
+ image: searxng/searxng
93
+ container_name: lobe-searxng
94
+ volumes:
95
+ - './searxng-settings.yml:/etc/searxng/settings.yml'
96
+ environment:
97
+ - 'SEARXNG_SETTINGS_FILE=/etc/searxng/settings.yml'
98
+ restart: always
99
+ networks:
100
+ - lobe-network
101
+ env_file:
102
+ - .env
103
+
104
+ lobe:
105
+ image: lobehub/lobehub
106
+ container_name: lobehub
107
+ network_mode: 'service:network-service'
108
+ depends_on:
109
+ postgresql:
110
+ condition: service_healthy
111
+ network-service:
112
+ condition: service_started
113
+ rustfs:
114
+ condition: service_healthy
115
+ rustfs-init:
116
+ condition: service_completed_successfully
117
+ redis:
118
+ condition: service_healthy
119
+ environment:
120
+ - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
121
+ - 'AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
122
+ - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
123
+ - 'S3_BUCKET=${RUSTFS_LOBE_BUCKET}'
124
+ - 'S3_ENABLE_PATH_STYLE=1'
125
+ - 'S3_ACCESS_KEY=${RUSTFS_ACCESS_KEY}'
126
+ - 'S3_ACCESS_KEY_ID=${RUSTFS_ACCESS_KEY}'
127
+ - 'S3_SECRET_ACCESS_KEY=${RUSTFS_SECRET_KEY}'
128
+ - 'LLM_VISION_IMAGE_USE_BASE64=1'
129
+ - 'S3_SET_ACL=0'
130
+ - 'SEARXNG_URL=http://searxng:8080'
131
+ - 'REDIS_URL=redis://redis:6379'
132
+ - 'REDIS_PREFIX=lobechat'
133
+ - 'REDIS_TLS=0'
134
+ env_file:
135
+ - .env
136
+ restart: always
137
+
138
+ volumes:
139
+ data:
140
+ driver: local
141
+ redis_data:
142
+ driver: local
143
+ rustfs-data:
144
+ driver: local
145
+
146
+ networks:
147
+ lobe-network:
148
+ driver: bridge