@lobehub/lobehub 2.0.11 → 2.0.12

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.12](https://github.com/lobehub/lobe-chat/compare/v2.0.11...v2.0.12)
6
+
7
+ <sup>Released on **2026-01-29**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Group publish to market should set local group market identifer.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Group publish to market should set local group market identifer, closes [#11965](https://github.com/lobehub/lobe-chat/issues/11965) ([0bda4d9](https://github.com/lobehub/lobe-chat/commit/0bda4d9))
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.11](https://github.com/lobehub/lobe-chat/compare/v2.0.10...v2.0.11)
6
31
 
7
32
  <sup>Released on **2026-01-29**</sup>
package/changelog/v2.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Group publish to market should set local group market identifer."
6
+ ]
7
+ },
8
+ "date": "2026-01-29",
9
+ "version": "2.0.12"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
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",
@@ -17,9 +17,11 @@ import { LobeChatDatabase } from '../../type';
17
17
  export interface SupervisorAgentConfig {
18
18
  avatar?: string;
19
19
  backgroundColor?: string;
20
+ chatConfig?: any;
20
21
  description?: string;
21
22
  model?: string;
22
23
  params?: any;
24
+ plugins?: string[];
23
25
  provider?: string;
24
26
  systemRole?: string;
25
27
  tags?: string[];
@@ -172,9 +174,11 @@ export class AgentGroupRepository {
172
174
  .values({
173
175
  avatar: supervisorConfig?.avatar,
174
176
  backgroundColor: supervisorConfig?.backgroundColor,
177
+ chatConfig: supervisorConfig?.chatConfig,
175
178
  description: supervisorConfig?.description,
176
179
  model: supervisorConfig?.model,
177
180
  params: supervisorConfig?.params,
181
+ plugins: supervisorConfig?.plugins,
178
182
  provider: supervisorConfig?.provider,
179
183
  systemRole: supervisorConfig?.systemRole,
180
184
  tags: supervisorConfig?.tags,
@@ -134,7 +134,8 @@ const ForkGroupAndChat = memo<{ mobile?: boolean }>(() => {
134
134
  // Group content is the supervisor's systemRole (for backward compatibility)
135
135
  content: config.systemRole || supervisorConfig?.systemRole,
136
136
  ...meta,
137
- marketIdentifier: forkResult.group.identifier, // Store the new market identifier
137
+ // Store marketIdentifier at top-level (same as agents)
138
+ marketIdentifier: forkResult.group.identifier,
138
139
  };
139
140
 
140
141
  // Step 5: Prepare member agents from market data
@@ -28,8 +28,8 @@ const GroupPublishButton = memo(() => {
28
28
 
29
29
  // Determine action based on whether we have an existing marketIdentifier
30
30
  // Backend will verify ownership and decide to create new or update
31
- // marketIdentifier is stored in editorData
32
- const action = currentGroup?.editorData?.marketIdentifier ? 'upload' : 'submit';
31
+ // marketIdentifier is stored at top-level (same as agents)
32
+ const action = currentGroup?.marketIdentifier ? 'upload' : 'submit';
33
33
 
34
34
  return (
35
35
  <>
@@ -45,8 +45,8 @@ export const useMarketGroupPublish = ({ action, onSuccess }: UseMarketGroupPubli
45
45
  * Returns whether fork confirmation is needed and original group info
46
46
  */
47
47
  const checkOwnership = useCallback(async (): Promise<CheckOwnershipResult> => {
48
- // marketIdentifier is stored in editorData
49
- const identifier = currentGroup?.editorData?.marketIdentifier as string | undefined;
48
+ // marketIdentifier is stored at top-level (same as agents)
49
+ const identifier = currentGroup?.marketIdentifier;
50
50
 
51
51
  // No identifier means new group, no need to check
52
52
  if (!identifier) {
@@ -150,27 +150,26 @@ export const useMarketGroupPublish = ({ action, onSuccess }: UseMarketGroupPubli
150
150
  }),
151
151
  ...(currentGroupConfig.openingQuestions !== undefined &&
152
152
  currentGroupConfig.openingQuestions.length > 0 && {
153
- openingQuestions: currentGroupConfig.openingQuestions,
154
- }),
153
+ openingQuestions: currentGroupConfig.openingQuestions,
154
+ }),
155
155
  ...(currentGroupConfig.allowDM !== undefined && { allowDM: currentGroupConfig.allowDM }),
156
- ...(currentGroupConfig.revealDM !== undefined && { revealDM: currentGroupConfig.revealDM }),
156
+ ...(currentGroupConfig.revealDM !== undefined && {
157
+ revealDM: currentGroupConfig.revealDM,
158
+ }),
157
159
  },
158
160
  // Market requires at least 1 character for description
159
161
  description: currentGroupMeta.description || 'No description provided',
160
- // marketIdentifier is stored in editorData
161
- identifier: currentGroup.editorData?.marketIdentifier as string | undefined,
162
+ // marketIdentifier is stored at top-level (same as agents)
163
+ identifier: currentGroup.marketIdentifier,
162
164
  memberAgents,
163
165
  name: currentGroupMeta.title || 'Untitled Group',
164
166
  visibility: 'public', // TODO: Allow user to select visibility
165
167
  });
166
168
 
167
- // Save marketIdentifier to editorData if new group
169
+ // Save marketIdentifier at top-level if new group (same as agents)
168
170
  if (result.isNewGroup) {
169
171
  await updateGroupMeta({
170
- editorData: {
171
- ...currentGroup.editorData,
172
- marketIdentifier: result.identifier,
173
- },
172
+ marketIdentifier: result.identifier,
174
173
  });
175
174
  }
176
175
 
@@ -133,9 +133,11 @@ export const agentGroupRouter = router({
133
133
  .object({
134
134
  avatar: z.string().nullish(),
135
135
  backgroundColor: z.string().nullish(),
136
+ chatConfig: z.any().nullish(),
136
137
  description: z.string().nullish(),
137
138
  model: z.string().nullish(),
138
139
  params: z.any().nullish(),
140
+ plugins: z.array(z.string()).nullish(),
139
141
  provider: z.string().nullish(),
140
142
  systemRole: z.string().nullish(),
141
143
  tags: z.array(z.string()).nullish(),
@@ -177,8 +177,8 @@ const publishOrCreateSchema = z.object({
177
177
  editorData: z.record(z.any()).optional(),
178
178
 
179
179
  // Agent basic info
180
- identifier: z.string().optional(),
181
- // Optional - if not provided or not owned, will create new
180
+ identifier: z.string().nullish(),
181
+ // Optional - if not provided or not owned, will create new (allow null or undefined)
182
182
  name: z.string(),
183
183
  tags: z.array(z.string()).optional(),
184
184
  tokenUsage: z.number().optional(),
@@ -312,12 +312,11 @@ export const agentRouter = router({
312
312
  }
313
313
  }),
314
314
 
315
-
316
315
  /**
317
316
  * Fork an agent
318
317
  * POST /market/agent/:identifier/fork
319
318
  */
320
- forkAgent: agentProcedure
319
+ forkAgent: agentProcedure
321
320
  .input(
322
321
  z.object({
323
322
  identifier: z.string(),
@@ -385,13 +384,11 @@ forkAgent: agentProcedure
385
384
  }
386
385
  }),
387
386
 
388
-
389
-
390
- /**
387
+ /**
391
388
  * Get agent detail by identifier
392
389
  * GET /market/agent/:identifier
393
390
  */
394
- getAgentDetail: agentProcedure
391
+ getAgentDetail: agentProcedure
395
392
  .input(z.object({ identifier: z.string() }))
396
393
  .query(async ({ input, ctx }) => {
397
394
  log('getAgentDetail input: %O', input);
@@ -409,14 +406,11 @@ getAgentDetail: agentProcedure
409
406
  }
410
407
  }),
411
408
 
412
-
413
-
414
-
415
- /**
409
+ /**
416
410
  * Get the fork source of an agent
417
411
  * GET /market/agent/:identifier/fork-source
418
412
  */
419
- getAgentForkSource: agentProcedure
413
+ getAgentForkSource: agentProcedure
420
414
  .input(z.object({ identifier: z.string() }))
421
415
  .query(async ({ input, ctx }) => {
422
416
  log('getAgentForkSource input: %O', input);
@@ -470,16 +464,11 @@ getAgentForkSource: agentProcedure
470
464
  }
471
465
  }),
472
466
 
473
-
474
-
475
-
476
-
477
-
478
- /**
467
+ /**
479
468
  * Get all forks of an agent
480
469
  * GET /market/agent/:identifier/forks
481
470
  */
482
- getAgentForks: agentProcedure
471
+ getAgentForks: agentProcedure
483
472
  .input(z.object({ identifier: z.string() }))
484
473
  .query(async ({ input, ctx }) => {
485
474
  log('getAgentForks input: %O', input);
@@ -533,17 +522,11 @@ getAgentForks: agentProcedure
533
522
  }
534
523
  }),
535
524
 
536
-
537
-
538
-
539
-
540
-
541
-
542
- /**
525
+ /**
543
526
  * Get own agents (requires authentication)
544
527
  * GET /market/agent/own
545
528
  */
546
- getOwnAgents: agentProcedure.input(paginationSchema.optional()).query(async ({ input, ctx }) => {
529
+ getOwnAgents: agentProcedure.input(paginationSchema.optional()).query(async ({ input, ctx }) => {
547
530
  log('getOwnAgents input: %O', input);
548
531
 
549
532
  try {
@@ -562,16 +545,11 @@ getOwnAgents: agentProcedure.input(paginationSchema.optional()).query(async ({ i
562
545
  }
563
546
  }),
564
547
 
565
-
566
-
567
-
568
-
569
-
570
- /**
548
+ /**
571
549
  * Publish an agent (make it visible in marketplace)
572
550
  * POST /market/agent/:identifier/publish
573
551
  */
574
- publishAgent: agentProcedure
552
+ publishAgent: agentProcedure
575
553
  .input(z.object({ identifier: z.string() }))
576
554
  .mutation(async ({ input, ctx }) => {
577
555
  log('publishAgent input: %O', input);
@@ -589,11 +567,7 @@ publishAgent: agentProcedure
589
567
  }
590
568
  }),
591
569
 
592
-
593
-
594
-
595
-
596
- /**
570
+ /**
597
571
  * Unified publish or create agent flow
598
572
  * This procedure handles the complete publish logic:
599
573
  * 1. Check if identifier exists and if current user is owner
@@ -602,7 +576,7 @@ publishAgent: agentProcedure
602
576
  *
603
577
  * Returns: { identifier, isNewAgent, success }
604
578
  */
605
- publishOrCreate: agentProcedure.input(publishOrCreateSchema).mutation(async ({ input, ctx }) => {
579
+ publishOrCreate: agentProcedure.input(publishOrCreateSchema).mutation(async ({ input, ctx }) => {
606
580
  log('publishOrCreate input: %O', input);
607
581
 
608
582
  const { identifier: inputIdentifier, name, ...versionData } = input;
@@ -684,13 +658,11 @@ publishOrCreate: agentProcedure.input(publishOrCreateSchema).mutation(async ({ i
684
658
  }
685
659
  }),
686
660
 
687
-
688
-
689
- /**
661
+ /**
690
662
  * Unpublish an agent (hide from marketplace, can be republished)
691
663
  * POST /market/agent/:identifier/unpublish
692
664
  */
693
- unpublishAgent: agentProcedure
665
+ unpublishAgent: agentProcedure
694
666
  .input(z.object({ identifier: z.string() }))
695
667
  .mutation(async ({ input, ctx }) => {
696
668
  log('unpublishAgent input: %O', input);
@@ -134,7 +134,7 @@ const publishOrCreateGroupSchema = z.object({
134
134
  })
135
135
  .optional(),
136
136
  description: z.string(),
137
- identifier: z.string().optional(),
137
+ identifier: z.string().nullish(), // Allow null or undefined
138
138
  memberAgents: z.array(memberAgentSchema),
139
139
  name: z.string(),
140
140
  visibility: z.enum(['public', 'private', 'internal']).optional(),
@@ -200,12 +200,11 @@ export const agentGroupRouter = router({
200
200
  }
201
201
  }),
202
202
 
203
-
204
203
  /**
205
204
  * Deprecate agent group
206
205
  * POST /market/agent-group/:identifier/deprecate
207
206
  */
208
- deprecateAgentGroup: agentGroupProcedure
207
+ deprecateAgentGroup: agentGroupProcedure
209
208
  .input(z.object({ identifier: z.string() }))
210
209
  .mutation(async ({ input, ctx }) => {
211
210
  log('deprecateAgentGroup input: %O', input);
@@ -259,13 +258,11 @@ deprecateAgentGroup: agentGroupProcedure
259
258
  }
260
259
  }),
261
260
 
262
-
263
-
264
- /**
261
+ /**
265
262
  * Fork an agent group
266
263
  * POST /market/agent-group/:identifier/fork
267
264
  */
268
- forkAgentGroup: agentGroupProcedure
265
+ forkAgentGroup: agentGroupProcedure
269
266
  .input(
270
267
  z.object({
271
268
  identifier: z.string(),
@@ -338,13 +335,11 @@ forkAgentGroup: agentGroupProcedure
338
335
  }
339
336
  }),
340
337
 
341
-
342
-
343
- /**
338
+ /**
344
339
  * Get the fork source of an agent group
345
340
  * GET /market/agent-group/:identifier/fork-source
346
341
  */
347
- getAgentGroupForkSource: agentGroupProcedure
342
+ getAgentGroupForkSource: agentGroupProcedure
348
343
  .input(z.object({ identifier: z.string() }))
349
344
  .query(async ({ input, ctx }) => {
350
345
  log('getAgentGroupForkSource input: %O', input);
@@ -398,13 +393,11 @@ getAgentGroupForkSource: agentGroupProcedure
398
393
  }
399
394
  }),
400
395
 
401
-
402
-
403
- /**
396
+ /**
404
397
  * Get all forks of an agent group
405
398
  * GET /market/agent-group/:identifier/forks
406
399
  */
407
- getAgentGroupForks: agentGroupProcedure
400
+ getAgentGroupForks: agentGroupProcedure
408
401
  .input(z.object({ identifier: z.string() }))
409
402
  .query(async ({ input, ctx }) => {
410
403
  log('getAgentGroupForks input: %O', input);
@@ -458,13 +451,11 @@ getAgentGroupForks: agentGroupProcedure
458
451
  }
459
452
  }),
460
453
 
461
-
462
-
463
- /**
454
+ /**
464
455
  * Publish agent group
465
456
  * POST /market/agent-group/:identifier/publish
466
457
  */
467
- publishAgentGroup: agentGroupProcedure
458
+ publishAgentGroup: agentGroupProcedure
468
459
  .input(z.object({ identifier: z.string() }))
469
460
  .mutation(async ({ input, ctx }) => {
470
461
  log('publishAgentGroup input: %O', input);
@@ -518,15 +509,13 @@ publishAgentGroup: agentGroupProcedure
518
509
  }
519
510
  }),
520
511
 
521
-
522
-
523
- /**
512
+ /**
524
513
  * Unified publish or create agent group flow
525
514
  * 1. Check if identifier exists and if current user is owner
526
515
  * 2. If not owner or no identifier, create new group
527
516
  * 3. Create new version for the group if updating
528
517
  */
529
- publishOrCreate: agentGroupProcedure
518
+ publishOrCreate: agentGroupProcedure
530
519
  .input(publishOrCreateGroupSchema)
531
520
  .mutation(async ({ input, ctx }) => {
532
521
  log('publishOrCreate input: %O', input);
@@ -614,12 +603,11 @@ publishOrCreate: agentGroupProcedure
614
603
  }
615
604
  }),
616
605
 
617
-
618
606
  /**
619
607
  * Unpublish agent group
620
608
  * POST /market/agent-group/:identifier/unpublish
621
609
  */
622
- unpublishAgentGroup: agentGroupProcedure
610
+ unpublishAgentGroup: agentGroupProcedure
623
611
  .input(z.object({ identifier: z.string() }))
624
612
  .mutation(async ({ input, ctx }) => {
625
613
  log('unpublishAgentGroup input: %O', input);