@lobehub/lobehub 2.0.0-next.338 → 2.0.0-next.339

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 (257) hide show
  1. package/.gitattributes +35 -0
  2. package/CHANGELOG.md +44 -0
  3. package/changelog/v1.json +15 -0
  4. package/locales/ar/plugin.json +12 -2
  5. package/locales/ar/providers.json +1 -0
  6. package/locales/ar/setting.json +77 -1
  7. package/locales/bg-BG/models.json +5 -10
  8. package/locales/bg-BG/plugin.json +12 -2
  9. package/locales/bg-BG/providers.json +1 -0
  10. package/locales/bg-BG/setting.json +78 -2
  11. package/locales/de-DE/models.json +51 -9
  12. package/locales/de-DE/plugin.json +12 -2
  13. package/locales/de-DE/providers.json +1 -0
  14. package/locales/de-DE/setting.json +78 -2
  15. package/locales/en-US/models.json +11 -10
  16. package/locales/en-US/plugin.json +14 -4
  17. package/locales/en-US/providers.json +1 -0
  18. package/locales/en-US/setting.json +78 -2
  19. package/locales/es-ES/plugin.json +12 -2
  20. package/locales/es-ES/providers.json +1 -0
  21. package/locales/es-ES/setting.json +78 -2
  22. package/locales/fa-IR/plugin.json +12 -2
  23. package/locales/fa-IR/providers.json +1 -0
  24. package/locales/fa-IR/setting.json +78 -2
  25. package/locales/fr-FR/plugin.json +12 -2
  26. package/locales/fr-FR/providers.json +1 -0
  27. package/locales/fr-FR/setting.json +78 -2
  28. package/locales/it-IT/plugin.json +12 -2
  29. package/locales/it-IT/providers.json +1 -0
  30. package/locales/it-IT/setting.json +78 -2
  31. package/locales/ja-JP/plugin.json +12 -2
  32. package/locales/ja-JP/providers.json +1 -0
  33. package/locales/ja-JP/setting.json +78 -2
  34. package/locales/ko-KR/plugin.json +12 -2
  35. package/locales/ko-KR/providers.json +1 -0
  36. package/locales/ko-KR/setting.json +78 -2
  37. package/locales/nl-NL/models.json +4 -9
  38. package/locales/nl-NL/plugin.json +12 -2
  39. package/locales/nl-NL/providers.json +1 -0
  40. package/locales/nl-NL/setting.json +78 -2
  41. package/locales/pl-PL/plugin.json +12 -2
  42. package/locales/pl-PL/providers.json +1 -0
  43. package/locales/pl-PL/setting.json +78 -2
  44. package/locales/pt-BR/plugin.json +12 -2
  45. package/locales/pt-BR/providers.json +1 -0
  46. package/locales/pt-BR/setting.json +78 -2
  47. package/locales/ru-RU/plugin.json +12 -2
  48. package/locales/ru-RU/providers.json +1 -0
  49. package/locales/ru-RU/setting.json +78 -2
  50. package/locales/tr-TR/plugin.json +12 -2
  51. package/locales/tr-TR/providers.json +1 -0
  52. package/locales/tr-TR/setting.json +78 -2
  53. package/locales/vi-VN/plugin.json +12 -2
  54. package/locales/vi-VN/providers.json +1 -0
  55. package/locales/vi-VN/setting.json +77 -1
  56. package/locales/zh-CN/plugin.json +12 -2
  57. package/locales/zh-CN/providers.json +1 -0
  58. package/locales/zh-CN/setting.json +78 -2
  59. package/locales/zh-TW/plugin.json +12 -2
  60. package/locales/zh-TW/providers.json +1 -0
  61. package/locales/zh-TW/setting.json +78 -2
  62. package/package.json +1 -1
  63. package/packages/agent-runtime/src/groupOrchestration/GroupOrchestrationSupervisor.ts +2 -0
  64. package/packages/agent-runtime/src/groupOrchestration/__tests__/GroupOrchestrationSupervisor.test.ts +3 -1
  65. package/packages/agent-runtime/src/groupOrchestration/types.ts +5 -0
  66. package/packages/const/src/index.ts +1 -0
  67. package/packages/const/src/klavis.ts +144 -0
  68. package/packages/const/src/lobehubSkill.ts +34 -0
  69. package/packages/const/src/recommendedSkill.ts +17 -0
  70. package/packages/model-runtime/src/core/contextBuilders/anthropic.test.ts +38 -0
  71. package/packages/model-runtime/src/core/contextBuilders/anthropic.ts +20 -1
  72. package/packages/model-runtime/src/core/contextBuilders/google.test.ts +42 -0
  73. package/packages/model-runtime/src/core/contextBuilders/google.ts +17 -0
  74. package/scripts/electronWorkflow/modifiers/dynamicToStatic.mts +273 -0
  75. package/scripts/electronWorkflow/modifiers/index.mts +10 -0
  76. package/scripts/electronWorkflow/modifiers/nextConfig.mts +1 -0
  77. package/scripts/electronWorkflow/modifiers/nextDynamicToStatic.mts +233 -0
  78. package/scripts/electronWorkflow/modifiers/removeSuspense.mts +124 -0
  79. package/scripts/electronWorkflow/modifiers/routes.mts +14 -2
  80. package/scripts/electronWorkflow/modifiers/settingsContentToStatic.mts +148 -0
  81. package/scripts/electronWorkflow/modifiers/wrapChildrenWithClientOnly.mts +73 -0
  82. package/src/app/[variants]/(main)/home/features/InputArea/SkillInstallBanner.tsx +131 -0
  83. package/src/app/[variants]/(main)/home/features/InputArea/index.tsx +34 -27
  84. package/src/app/[variants]/(main)/settings/features/SettingHeader.tsx +8 -4
  85. package/src/app/[variants]/(main)/settings/features/SettingsContent.tsx +3 -0
  86. package/src/app/[variants]/(main)/settings/hooks/useCategory.tsx +6 -0
  87. package/src/{features/PluginStore/InstalledList/List/Item/Action.tsx → app/[variants]/(main)/settings/skill/features/Actions.tsx} +45 -40
  88. package/src/app/[variants]/(main)/settings/skill/features/KlavisSkillItem.tsx +353 -0
  89. package/src/app/[variants]/(main)/settings/skill/features/LobehubSkillItem.tsx +344 -0
  90. package/src/app/[variants]/(main)/settings/skill/features/McpSkillItem.tsx +116 -0
  91. package/src/app/[variants]/(main)/settings/skill/features/SkillList.tsx +244 -0
  92. package/src/app/[variants]/(main)/settings/skill/index.tsx +35 -0
  93. package/src/components/Plugins/PluginTag.tsx +23 -35
  94. package/src/components/client/ClientOnly.tsx +6 -2
  95. package/src/features/AgentSetting/AgentPlugin/index.tsx +2 -2
  96. package/src/features/ChatInput/ActionBar/Tools/KlavisServerItem.tsx +8 -32
  97. package/src/features/ChatInput/ActionBar/Tools/LobehubSkillServerItem.tsx +8 -30
  98. package/src/features/ChatInput/ActionBar/Tools/PopoverContent.tsx +48 -59
  99. package/src/features/ChatInput/ActionBar/Tools/index.tsx +5 -23
  100. package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +158 -56
  101. package/src/features/IntegrationDetailModal/index.tsx +293 -0
  102. package/src/features/{PluginStore/McpList/Detail → MCP/MCPDetail}/index.tsx +15 -6
  103. package/src/features/MCP/MCPSettings/McpSettingsModal.tsx +58 -0
  104. package/src/features/{PluginStore/McpList/Detail/Settings → MCP/MCPSettings}/index.tsx +39 -27
  105. package/src/features/PluginDetailModal/index.tsx +2 -2
  106. package/src/features/PluginDevModal/index.tsx +16 -40
  107. package/src/features/ProfileEditor/AgentTool.tsx +2 -2
  108. package/src/features/ProtocolUrlHandler/InstallPlugin/OfficialPluginInstallModal/index.tsx +1 -1
  109. package/src/features/{PluginStore/AddPluginButton.tsx → SkillStore/AddSkillButton.tsx} +3 -3
  110. package/src/features/SkillStore/CommunityList/Item.tsx +158 -0
  111. package/src/features/SkillStore/CommunityList/index.tsx +101 -0
  112. package/src/features/SkillStore/Content.tsx +59 -0
  113. package/src/features/{PluginStore/PluginEmpty.tsx → SkillStore/Empty.tsx} +8 -8
  114. package/src/features/SkillStore/LobeHubList/Item.tsx +118 -0
  115. package/src/features/SkillStore/LobeHubList/index.tsx +187 -0
  116. package/src/features/SkillStore/LobeHubList/useSkillConnect.ts +239 -0
  117. package/src/features/SkillStore/Search/index.tsx +43 -0
  118. package/src/features/{PluginStore → SkillStore}/index.tsx +14 -10
  119. package/src/features/SkillStore/style.ts +27 -0
  120. package/src/locales/default/plugin.ts +15 -4
  121. package/src/locales/default/setting.ts +185 -2
  122. package/src/services/chat/mecha/agentConfigResolver.test.ts +197 -0
  123. package/src/services/chat/mecha/agentConfigResolver.ts +44 -17
  124. package/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts +40 -37
  125. package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +78 -0
  126. package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +50 -16
  127. package/src/store/global/initialState.ts +1 -0
  128. package/src/store/tool/slices/lobehubSkillStore/action.test.ts +914 -0
  129. package/src/store/tool/slices/lobehubSkillStore/selectors.test.ts +548 -0
  130. package/.cursor/skills/vercel-react-best-practices/AGENTS.md +0 -2410
  131. package/.cursor/skills/vercel-react-best-practices/SKILL.md +0 -125
  132. package/.cursor/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  133. package/.cursor/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -49
  134. package/.cursor/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
  135. package/.cursor/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
  136. package/.cursor/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -36
  137. package/.cursor/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
  138. package/.cursor/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
  139. package/.cursor/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
  140. package/.cursor/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
  141. package/.cursor/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
  142. package/.cursor/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  143. package/.cursor/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
  144. package/.cursor/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
  145. package/.cursor/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
  146. package/.cursor/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
  147. package/.cursor/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
  148. package/.cursor/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -57
  149. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
  150. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
  151. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
  152. package/.cursor/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
  153. package/.cursor/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
  154. package/.cursor/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
  155. package/.cursor/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
  156. package/.cursor/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
  157. package/.cursor/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
  158. package/.cursor/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
  159. package/.cursor/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
  160. package/.cursor/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
  161. package/.cursor/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  162. package/.cursor/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
  163. package/.cursor/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
  164. package/.cursor/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  165. package/.cursor/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  166. package/.cursor/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
  167. package/.cursor/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
  168. package/.cursor/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
  169. package/.cursor/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
  170. package/.cursor/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
  171. package/.cursor/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  172. package/.cursor/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
  173. package/.cursor/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
  174. package/.cursor/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
  175. package/.cursor/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
  176. package/.cursor/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
  177. package/.cursor/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
  178. package/.cursor/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
  179. package/src/features/PluginStore/Content.tsx +0 -54
  180. package/src/features/PluginStore/InstalledList/Detail/CustomPluginEmptyState.tsx +0 -79
  181. package/src/features/PluginStore/InstalledList/Detail/index.tsx +0 -21
  182. package/src/features/PluginStore/InstalledList/List/Item/index.tsx +0 -61
  183. package/src/features/PluginStore/InstalledList/List/index.tsx +0 -72
  184. package/src/features/PluginStore/InstalledList/index.tsx +0 -90
  185. package/src/features/PluginStore/McpList/List/Action.tsx +0 -119
  186. package/src/features/PluginStore/McpList/List/Item.tsx +0 -83
  187. package/src/features/PluginStore/McpList/List/index.tsx +0 -93
  188. package/src/features/PluginStore/McpList/index.tsx +0 -58
  189. package/src/features/PluginStore/PluginList/Detail/DetailProvider.tsx +0 -19
  190. package/src/features/PluginStore/PluginList/Detail/EmptyState.tsx +0 -56
  191. package/src/features/PluginStore/PluginList/Detail/Header.tsx +0 -130
  192. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Nav.tsx +0 -73
  193. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Settings.tsx +0 -19
  194. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Tools.tsx +0 -111
  195. package/src/features/PluginStore/PluginList/Detail/InstallDetail/index.tsx +0 -24
  196. package/src/features/PluginStore/PluginList/Detail/Loading.tsx +0 -42
  197. package/src/features/PluginStore/PluginList/Detail/TagList.tsx +0 -35
  198. package/src/features/PluginStore/PluginList/Detail/index.tsx +0 -39
  199. package/src/features/PluginStore/PluginList/Detail/useCategory.tsx +0 -76
  200. package/src/features/PluginStore/PluginList/List/Action.tsx +0 -78
  201. package/src/features/PluginStore/PluginList/List/Item.tsx +0 -92
  202. package/src/features/PluginStore/PluginList/List/index.tsx +0 -94
  203. package/src/features/PluginStore/PluginList/index.tsx +0 -46
  204. package/src/features/PluginStore/Search/index.tsx +0 -40
  205. /package/{.codex/skills → .agents}/vercel-react-best-practices/AGENTS.md +0 -0
  206. /package/{.codex/skills → .agents}/vercel-react-best-practices/SKILL.md +0 -0
  207. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -0
  208. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/advanced-use-latest.md +0 -0
  209. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-api-routes.md +0 -0
  210. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-defer-await.md +0 -0
  211. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-dependencies.md +0 -0
  212. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-parallel.md +0 -0
  213. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -0
  214. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -0
  215. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-conditional.md +0 -0
  216. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -0
  217. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -0
  218. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-preload.md +0 -0
  219. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-event-listeners.md +0 -0
  220. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -0
  221. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -0
  222. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-swr-dedup.md +0 -0
  223. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -0
  224. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-function-results.md +0 -0
  225. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-property-access.md +0 -0
  226. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-storage.md +0 -0
  227. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-combine-iterations.md +0 -0
  228. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-early-exit.md +0 -0
  229. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -0
  230. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-index-maps.md +0 -0
  231. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-length-check-first.md +0 -0
  232. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-min-max-loop.md +0 -0
  233. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -0
  234. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -0
  235. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-activity.md +0 -0
  236. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -0
  237. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -0
  238. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -0
  239. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -0
  240. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -0
  241. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -0
  242. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -0
  243. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-dependencies.md +0 -0
  244. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-derived-state.md +0 -0
  245. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -0
  246. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -0
  247. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-memo.md +0 -0
  248. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-transitions.md +0 -0
  249. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -0
  250. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-cache-lru.md +0 -0
  251. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-cache-react.md +0 -0
  252. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -0
  253. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-serialization.md +0 -0
  254. /package/src/{features/PluginStore/InstalledList → app/[variants]/(main)/settings/skill/features}/EditCustomPlugin.tsx +0 -0
  255. /package/src/features/{PluginStore/McpList/Detail → MCP/MCPDetail}/Loading.tsx +0 -0
  256. /package/src/features/{PluginStore → SkillStore}/Loading.tsx +0 -0
  257. /package/src/features/{PluginStore → SkillStore}/VirtuosoLoading.tsx +0 -0
@@ -235,13 +235,14 @@ export const createGroupOrchestrationExecutors = (
235
235
  parallel_call_agents: async (instruction, state): Promise<GroupOrchestrationExecutorOutput> => {
236
236
  const {
237
237
  agentIds,
238
+ disableTools,
238
239
  instruction: agentInstruction,
239
240
  toolMessageId,
240
241
  } = (instruction as SupervisorInstructionParallelCallAgents).payload;
241
242
 
242
243
  const sessionLogId = `${state.operationId}:parallel_call_agents`;
243
244
  log(
244
- `[${sessionLogId}] Broadcasting to agents: ${agentIds.join(', ')}, instruction: ${agentInstruction}, toolMessageId: ${toolMessageId}`,
245
+ `[${sessionLogId}] Broadcasting to agents: ${agentIds.join(', ')}, instruction: ${agentInstruction}, toolMessageId: ${toolMessageId}, disableTools: ${disableTools}`,
245
246
  );
246
247
 
247
248
  const messages = getMessages();
@@ -279,10 +280,12 @@ export const createGroupOrchestrationExecutors = (
279
280
  // - messageContext keeps the group's main conversation context (for message storage)
280
281
  // - subAgentId specifies which agent's config to use for each agent
281
282
  // - toolMessageId is used as parentMessageId so agent responses are children of the tool message
283
+ // - disableTools prevents broadcast agents from calling tools (expected behavior for broadcast)
282
284
  await Promise.all(
283
285
  agentIds.map(async (agentId) => {
284
286
  await get().internal_execAgentRuntime({
285
287
  context: { ...messageContext, subAgentId: agentId },
288
+ disableTools,
286
289
  messages: messagesWithInstruction,
287
290
  parentMessageId: toolMessageId,
288
291
  parentMessageType: 'tool',
@@ -776,48 +779,48 @@ export const createGroupOrchestrationExecutors = (
776
779
  }
777
780
 
778
781
  switch (status.status) {
779
- case 'completed': {
780
- tracker.status = 'completed';
781
- tracker.result = status.result;
782
- log(`[${taskLogId}] Task completed successfully`);
783
- if (status.result) {
782
+ case 'completed': {
783
+ tracker.status = 'completed';
784
+ tracker.result = status.result;
785
+ log(`[${taskLogId}] Task completed successfully`);
786
+ if (status.result) {
787
+ await get().optimisticUpdateMessageContent(
788
+ tracker.taskMessageId,
789
+ status.result,
790
+ undefined,
791
+ { operationId: state.operationId },
792
+ );
793
+ }
794
+
795
+ break;
796
+ }
797
+ case 'failed': {
798
+ tracker.status = 'failed';
799
+ tracker.error = status.error;
800
+ console.error(`[${taskLogId}] Task failed: ${status.error}`);
784
801
  await get().optimisticUpdateMessageContent(
785
802
  tracker.taskMessageId,
786
- status.result,
803
+ `Task failed: ${status.error}`,
787
804
  undefined,
788
805
  { operationId: state.operationId },
789
806
  );
807
+
808
+ break;
790
809
  }
791
-
792
- break;
793
- }
794
- case 'failed': {
795
- tracker.status = 'failed';
796
- tracker.error = status.error;
797
- console.error(`[${taskLogId}] Task failed: ${status.error}`);
798
- await get().optimisticUpdateMessageContent(
799
- tracker.taskMessageId,
800
- `Task failed: ${status.error}`,
801
- undefined,
802
- { operationId: state.operationId },
803
- );
804
-
805
- break;
806
- }
807
- case 'cancel': {
808
- tracker.status = 'failed';
809
- tracker.error = 'Task was cancelled';
810
- log(`[${taskLogId}] Task was cancelled`);
811
- await get().optimisticUpdateMessageContent(
812
- tracker.taskMessageId,
813
- 'Task was cancelled',
814
- undefined,
815
- { operationId: state.operationId },
816
- );
817
-
818
- break;
819
- }
820
- // No default
810
+ case 'cancel': {
811
+ tracker.status = 'failed';
812
+ tracker.error = 'Task was cancelled';
813
+ log(`[${taskLogId}] Task was cancelled`);
814
+ await get().optimisticUpdateMessageContent(
815
+ tracker.taskMessageId,
816
+ 'Task was cancelled',
817
+ undefined,
818
+ { operationId: state.operationId },
819
+ );
820
+
821
+ break;
822
+ }
823
+ // No default
821
824
  }
822
825
 
823
826
  // Check individual task timeout
@@ -1451,6 +1451,84 @@ describe('StreamingExecutor actions', () => {
1451
1451
  });
1452
1452
  });
1453
1453
 
1454
+ describe('internal_createAgentState with disableTools', () => {
1455
+ it('should return empty toolManifestMap when disableTools is true', async () => {
1456
+ act(() => {
1457
+ useChatStore.setState({ internal_execAgentRuntime: realExecAgentRuntime });
1458
+ });
1459
+
1460
+ const { result } = renderHook(() => useChatStore());
1461
+ const userMessage = {
1462
+ id: TEST_IDS.USER_MESSAGE_ID,
1463
+ role: 'user',
1464
+ content: TEST_CONTENT.USER_MESSAGE,
1465
+ sessionId: TEST_IDS.SESSION_ID,
1466
+ topicId: TEST_IDS.TOPIC_ID,
1467
+ } as UIChatMessage;
1468
+
1469
+ // Get actual internal_createAgentState result with disableTools: true
1470
+ const { state } = result.current.internal_createAgentState({
1471
+ messages: [userMessage],
1472
+ parentMessageId: userMessage.id,
1473
+ agentId: TEST_IDS.SESSION_ID,
1474
+ topicId: TEST_IDS.TOPIC_ID,
1475
+ disableTools: true,
1476
+ });
1477
+
1478
+ // toolManifestMap should be empty when disableTools is true
1479
+ expect(state.toolManifestMap).toEqual({});
1480
+ });
1481
+
1482
+ it('should include tools in toolManifestMap when disableTools is false or undefined', async () => {
1483
+ act(() => {
1484
+ useChatStore.setState({ internal_execAgentRuntime: realExecAgentRuntime });
1485
+ });
1486
+
1487
+ const { result } = renderHook(() => useChatStore());
1488
+ const userMessage = {
1489
+ id: TEST_IDS.USER_MESSAGE_ID,
1490
+ role: 'user',
1491
+ content: TEST_CONTENT.USER_MESSAGE,
1492
+ sessionId: TEST_IDS.SESSION_ID,
1493
+ topicId: TEST_IDS.TOPIC_ID,
1494
+ } as UIChatMessage;
1495
+
1496
+ // Mock resolveAgentConfig to return plugins
1497
+ vi.spyOn(agentConfigResolver, 'resolveAgentConfig').mockReturnValue({
1498
+ agentConfig: {
1499
+ ...createMockAgentConfig(),
1500
+ plugins: ['test-plugin'],
1501
+ },
1502
+ chatConfig: createMockChatConfig(),
1503
+ isBuiltinAgent: false,
1504
+ plugins: ['test-plugin'],
1505
+ });
1506
+
1507
+ // Get actual internal_createAgentState result without disableTools
1508
+ const { state: stateWithoutDisable } = result.current.internal_createAgentState({
1509
+ messages: [userMessage],
1510
+ parentMessageId: userMessage.id,
1511
+ agentId: TEST_IDS.SESSION_ID,
1512
+ topicId: TEST_IDS.TOPIC_ID,
1513
+ // disableTools not set (undefined)
1514
+ });
1515
+
1516
+ // Get actual internal_createAgentState result with disableTools: false
1517
+ const { state: stateWithDisableFalse } = result.current.internal_createAgentState({
1518
+ messages: [userMessage],
1519
+ parentMessageId: userMessage.id,
1520
+ agentId: TEST_IDS.SESSION_ID,
1521
+ topicId: TEST_IDS.TOPIC_ID,
1522
+ disableTools: false,
1523
+ });
1524
+
1525
+ // Both should have the same toolManifestMap (tools enabled)
1526
+ // Note: The actual content depends on what plugins are resolved,
1527
+ // but the key point is they should not be empty (unless no plugins are configured)
1528
+ expect(stateWithoutDisable.toolManifestMap).toEqual(stateWithDisableFalse.toolManifestMap);
1529
+ });
1530
+ });
1531
+
1454
1532
  describe('operation status handling', () => {
1455
1533
  it('should complete operation when state is waiting_for_human', async () => {
1456
1534
  const { result } = renderHook(() => useChatStore());
@@ -59,6 +59,11 @@ export interface StreamingExecutorAction {
59
59
  * Explicit agentId for this execution (avoids using global activeAgentId)
60
60
  */
61
61
  agentId?: string;
62
+ /**
63
+ * Whether to disable tools for this agent execution
64
+ * When true, agent will respond without calling any tools
65
+ */
66
+ disableTools?: boolean;
62
67
  /**
63
68
  * Explicit topicId for this execution (avoids using global activeTopicId)
64
69
  */
@@ -117,6 +122,11 @@ export interface StreamingExecutorAction {
117
122
  * Contains agentId, topicId, threadId, groupId, scope, etc.
118
123
  */
119
124
  context: ConversationContext;
125
+ /**
126
+ * Whether to disable tools for this agent execution
127
+ * When true, agent will respond without calling any tools
128
+ */
129
+ disableTools?: boolean;
120
130
  /**
121
131
  * Initial agent runtime context (for resuming execution from a specific phase)
122
132
  */
@@ -156,6 +166,7 @@ export const streamingExecutor: StateCreator<
156
166
  messages,
157
167
  parentMessageId,
158
168
  agentId: paramAgentId,
169
+ disableTools,
159
170
  topicId: paramTopicId,
160
171
  threadId,
161
172
  initialState,
@@ -165,8 +176,9 @@ export const streamingExecutor: StateCreator<
165
176
  isSubTask,
166
177
  }) => {
167
178
  // Use provided agentId/topicId or fallback to global state
179
+ // Note: Use || instead of ?? to also fallback when paramAgentId is empty string
168
180
  const { activeAgentId, activeTopicId } = get();
169
- const agentId = paramAgentId ?? activeAgentId;
181
+ const agentId = paramAgentId || activeAgentId;
170
182
  const topicId = paramTopicId !== undefined ? paramTopicId : activeTopicId;
171
183
 
172
184
  // For group orchestration scenarios:
@@ -181,29 +193,48 @@ export const streamingExecutor: StateCreator<
181
193
 
182
194
  // Resolve agent config with builtin agent runtime config merged
183
195
  // This ensures runtime plugins (e.g., 'lobe-agent-builder' for Agent Builder) are included
184
- // isSubTask is passed to filter out lobe-gtd tools to prevent nested sub-task creation
196
+ // - isSubTask: filters out lobe-gtd tools to prevent nested sub-task creation
197
+ // - disableTools: clears all plugins for broadcast scenarios
185
198
  const agentConfig = resolveAgentConfig({
186
199
  agentId: effectiveAgentId || '',
200
+ disableTools, // Clear plugins for broadcast scenarios
187
201
  groupId, // Pass groupId for supervisor detection
188
202
  isSubTask, // Filter out lobe-gtd in sub-task context
189
203
  scope, // Pass scope from operation context
190
204
  });
191
205
  const { agentConfig: agentConfigData, plugins: pluginIds } = agentConfig;
192
206
 
193
- log('[internal_createAgentState] resolved plugins=%o, isSubTask=%s', pluginIds, isSubTask);
207
+ log(
208
+ '[internal_createAgentState] resolved plugins=%o, isSubTask=%s, disableTools=%s',
209
+ pluginIds,
210
+ isSubTask,
211
+ disableTools,
212
+ );
194
213
 
195
- // Get tools manifest map
196
- const toolsEngine = createAgentToolsEngine({
197
- model: agentConfigData.model,
198
- provider: agentConfigData.provider!,
199
- });
200
- const { enabledToolIds } = toolsEngine.generateToolsDetailed({
201
- model: agentConfigData.model,
202
- provider: agentConfigData.provider!,
203
- toolIds: pluginIds,
204
- });
205
- const toolManifestMap = Object.fromEntries(
206
- toolsEngine.getEnabledPluginManifests(enabledToolIds).entries(),
214
+ // Get tools manifest map (skip if disableTools is true / no plugins)
215
+ let toolManifestMap: Record<string, unknown> = {};
216
+ let enabledToolIds: string[] = [];
217
+
218
+ if (pluginIds.length > 0) {
219
+ const toolsEngine = createAgentToolsEngine({
220
+ model: agentConfigData.model,
221
+ provider: agentConfigData.provider!,
222
+ });
223
+ const toolsDetailed = toolsEngine.generateToolsDetailed({
224
+ model: agentConfigData.model,
225
+ provider: agentConfigData.provider!,
226
+ toolIds: pluginIds,
227
+ });
228
+ enabledToolIds = toolsDetailed.enabledToolIds;
229
+ toolManifestMap = Object.fromEntries(
230
+ toolsEngine.getEnabledPluginManifests(enabledToolIds).entries(),
231
+ );
232
+ }
233
+
234
+ log(
235
+ '[internal_createAgentState] toolManifestMap keys=%o, count=%d',
236
+ Object.keys(toolManifestMap),
237
+ Object.keys(toolManifestMap).length,
207
238
  );
208
239
 
209
240
  // Get user intervention config
@@ -549,6 +580,7 @@ export const streamingExecutor: StateCreator<
549
580
 
550
581
  internal_execAgentRuntime: async (params) => {
551
582
  const {
583
+ disableTools,
552
584
  messages: originalMessages,
553
585
  parentMessageId,
554
586
  parentMessageType,
@@ -588,7 +620,7 @@ export const streamingExecutor: StateCreator<
588
620
  }
589
621
 
590
622
  log(
591
- '[internal_execAgentRuntime] start, operationId: %s, agentId: %s, subAgentId: %s, effectiveAgentId: %s, topicId: %s, messageKey: %s, parentMessageId: %s, parentMessageType: %s, messages count: %d',
623
+ '[internal_execAgentRuntime] start, operationId: %s, agentId: %s, subAgentId: %s, effectiveAgentId: %s, topicId: %s, messageKey: %s, parentMessageId: %s, parentMessageType: %s, messages count: %d, disableTools: %s',
592
624
  operationId,
593
625
  agentId,
594
626
  subAgentId,
@@ -598,6 +630,7 @@ export const streamingExecutor: StateCreator<
598
630
  parentMessageId,
599
631
  parentMessageType,
600
632
  originalMessages.length,
633
+ disableTools,
601
634
  );
602
635
 
603
636
  // Create a new array to avoid modifying the original messages
@@ -615,6 +648,7 @@ export const streamingExecutor: StateCreator<
615
648
  messages,
616
649
  parentMessageId: params.parentMessageId,
617
650
  agentId,
651
+ disableTools,
618
652
  topicId,
619
653
  threadId: threadId ?? undefined,
620
654
  initialState: params.initialState,
@@ -48,6 +48,7 @@ export enum SettingsTabs {
48
48
  Provider = 'provider',
49
49
  Proxy = 'proxy',
50
50
  Security = 'security',
51
+ Skill = 'skill',
51
52
  Stats = 'stats',
52
53
  Storage = 'storage',
53
54
  TTS = 'tts',