@lobehub/lobehub 2.0.0-next.308 → 2.0.0-next.309

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 (27) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/changelog/v1.json +9 -0
  3. package/locales/en-US/plugin.json +1 -0
  4. package/locales/zh-CN/plugin.json +1 -0
  5. package/package.json +1 -1
  6. package/packages/agent-runtime/src/types/state.ts +2 -0
  7. package/packages/builtin-tool-group-agent-builder/src/client/Inspector/GetAgentInfo/index.tsx +68 -0
  8. package/packages/builtin-tool-group-agent-builder/src/client/Inspector/index.ts +3 -0
  9. package/packages/builtin-tool-memory/src/manifest.ts +581 -19
  10. package/packages/types/src/topic/thread.ts +2 -2
  11. package/packages/types/src/userMemory/layers.ts +19 -8
  12. package/packages/types/src/userMemory/shared.ts +7 -1
  13. package/src/locales/default/plugin.ts +1 -0
  14. package/src/server/modules/AgentRuntime/RuntimeExecutors.ts +11 -3
  15. package/src/server/modules/Mecha/AgentToolsEngine/index.ts +14 -6
  16. package/src/server/modules/Mecha/AgentToolsEngine/types.ts +4 -3
  17. package/src/server/routers/lambda/aiAgent.ts +10 -0
  18. package/src/server/services/agent/index.test.ts +155 -0
  19. package/src/server/services/agent/index.ts +25 -0
  20. package/src/server/services/agentRuntime/AgentRuntimeService.ts +2 -0
  21. package/src/server/services/agentRuntime/types.ts +1 -0
  22. package/src/server/services/aiAgent/__tests__/execAgent.threadId.test.ts +29 -9
  23. package/src/server/services/aiAgent/index.ts +175 -6
  24. package/src/server/services/lobehubSkill/index.ts +109 -0
  25. package/src/server/services/toolExecution/builtin.ts +28 -2
  26. package/src/server/services/toolExecution/types.ts +3 -0
  27. package/src/store/chat/agents/createAgentExecutors.ts +4 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.309](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.308...v2.0.0-next.309)
6
+
7
+ <sup>Released on **2026-01-18**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix group sub task execution.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix group sub task execution, closes [#11595](https://github.com/lobehub/lobe-chat/issues/11595) ([32be2b2](https://github.com/lobehub/lobe-chat/commit/32be2b2))
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.308](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.307...v2.0.0-next.308)
6
31
 
7
32
  <sup>Released on **2026-01-18**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix group sub task execution."
6
+ ]
7
+ },
8
+ "date": "2026-01-18",
9
+ "version": "2.0.0-next.309"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "fixes": [
@@ -40,6 +40,7 @@
40
40
  "builtins.lobe-cloud-sandbox.title": "Cloud Sandbox",
41
41
  "builtins.lobe-group-agent-builder.apiName.batchCreateAgents": "Batch create agents",
42
42
  "builtins.lobe-group-agent-builder.apiName.createAgent": "Create agent",
43
+ "builtins.lobe-group-agent-builder.apiName.getAgentInfo": "Get member info",
43
44
  "builtins.lobe-group-agent-builder.apiName.getAvailableModels": "Get available models",
44
45
  "builtins.lobe-group-agent-builder.apiName.installPlugin": "Install Skill",
45
46
  "builtins.lobe-group-agent-builder.apiName.inviteAgent": "Invite member",
@@ -40,6 +40,7 @@
40
40
  "builtins.lobe-cloud-sandbox.title": "云端沙盒",
41
41
  "builtins.lobe-group-agent-builder.apiName.batchCreateAgents": "批量创建 Agent",
42
42
  "builtins.lobe-group-agent-builder.apiName.createAgent": "创建助理",
43
+ "builtins.lobe-group-agent-builder.apiName.getAgentInfo": "获取成员信息",
43
44
  "builtins.lobe-group-agent-builder.apiName.getAvailableModels": "获取可用模型",
44
45
  "builtins.lobe-group-agent-builder.apiName.installPlugin": "安装技能",
45
46
  "builtins.lobe-group-agent-builder.apiName.inviteAgent": "邀请成员",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.308",
3
+ "version": "2.0.0-next.309",
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,6 +17,8 @@ export interface AgentState {
17
17
  tools?: any[];
18
18
  systemRole?: string;
19
19
  toolManifestMap: Record<string, any>;
20
+ /** Tool source map for routing tool execution to correct handler */
21
+ toolSourceMap?: Record<string, 'builtin' | 'plugin' | 'mcp' | 'klavis' | 'lobehubSkill'>;
20
22
 
21
23
  /**
22
24
  * Model runtime configuration
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+
3
+ import type { BuiltinInspectorProps } from '@lobechat/types';
4
+ import { Avatar, Flexbox } from '@lobehub/ui';
5
+ import { createStaticStyles, cx } from 'antd-style';
6
+ import { memo } from 'react';
7
+ import { useTranslation } from 'react-i18next';
8
+
9
+ import { shinyTextStyles } from '@/styles';
10
+
11
+ import type { GetAgentInfoParams } from '../../../types';
12
+
13
+ interface GetAgentInfoState {
14
+ avatar?: string;
15
+ title?: string;
16
+ }
17
+
18
+ const styles = createStaticStyles(({ css, cssVar: cv }) => ({
19
+ root: css`
20
+ overflow: hidden;
21
+ display: flex;
22
+ gap: 8px;
23
+ align-items: center;
24
+ `,
25
+ title: css`
26
+ flex-shrink: 0;
27
+ color: ${cv.colorTextSecondary};
28
+ white-space: nowrap;
29
+ `,
30
+ }));
31
+
32
+ export const GetAgentInfoInspector = memo<
33
+ BuiltinInspectorProps<GetAgentInfoParams, GetAgentInfoState>
34
+ >(({ args, partialArgs, isArgumentsStreaming, isLoading, pluginState }) => {
35
+ const { t } = useTranslation('plugin');
36
+
37
+ const agentId = args?.agentId || partialArgs?.agentId;
38
+ const title = pluginState?.title;
39
+ const avatar = pluginState?.avatar;
40
+
41
+ // Initial streaming state
42
+ if (isArgumentsStreaming && !agentId) {
43
+ return (
44
+ <div className={cx(styles.root, shinyTextStyles.shinyText)}>
45
+ <span>{t('builtins.lobe-group-agent-builder.apiName.getAgentInfo')}</span>
46
+ </div>
47
+ );
48
+ }
49
+
50
+ return (
51
+ <Flexbox
52
+ align={'center'}
53
+ className={cx(styles.root, (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText)}
54
+ gap={8}
55
+ horizontal
56
+ >
57
+ <span className={styles.title}>
58
+ {t('builtins.lobe-group-agent-builder.apiName.getAgentInfo')}:
59
+ </span>
60
+ {avatar && <Avatar avatar={avatar} shape={'square'} size={20} title={title || undefined} />}
61
+ <span>{title || agentId}</span>
62
+ </Flexbox>
63
+ );
64
+ });
65
+
66
+ GetAgentInfoInspector.displayName = 'GetAgentInfoInspector';
67
+
68
+ export default GetAgentInfoInspector;
@@ -10,6 +10,7 @@ import { type BuiltinInspector } from '@lobechat/types';
10
10
  import { GroupAgentBuilderApiName } from '../../types';
11
11
  import { BatchCreateAgentsInspector } from './BatchCreateAgents';
12
12
  import { CreateAgentInspector } from './CreateAgent';
13
+ import { GetAgentInfoInspector } from './GetAgentInfo';
13
14
  import { InviteAgentInspector } from './InviteAgent';
14
15
  import { RemoveAgentInspector } from './RemoveAgent';
15
16
  import { SearchAgentInspector } from './SearchAgent';
@@ -27,6 +28,7 @@ export const GroupAgentBuilderInspectors: Record<string, BuiltinInspector> = {
27
28
  // Group-specific inspectors
28
29
  [GroupAgentBuilderApiName.batchCreateAgents]: BatchCreateAgentsInspector as BuiltinInspector,
29
30
  [GroupAgentBuilderApiName.createAgent]: CreateAgentInspector as BuiltinInspector,
31
+ [GroupAgentBuilderApiName.getAgentInfo]: GetAgentInfoInspector as BuiltinInspector,
30
32
  [GroupAgentBuilderApiName.inviteAgent]: InviteAgentInspector as BuiltinInspector,
31
33
  [GroupAgentBuilderApiName.removeAgent]: RemoveAgentInspector as BuiltinInspector,
32
34
  [GroupAgentBuilderApiName.searchAgent]: SearchAgentInspector as BuiltinInspector,
@@ -44,6 +46,7 @@ export const GroupAgentBuilderInspectors: Record<string, BuiltinInspector> = {
44
46
  // Re-export individual inspectors
45
47
  export { BatchCreateAgentsInspector } from './BatchCreateAgents';
46
48
  export { CreateAgentInspector } from './CreateAgent';
49
+ export { GetAgentInfoInspector } from './GetAgentInfo';
47
50
  export { InviteAgentInspector } from './InviteAgent';
48
51
  export { RemoveAgentInspector } from './RemoveAgent';
49
52
  export { SearchAgentInspector } from './SearchAgent';