@lobehub/lobehub 2.0.0-next.337 → 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 (270) hide show
  1. package/.gitattributes +35 -0
  2. package/CHANGELOG.md +69 -0
  3. package/changelog/v1.json +24 -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 +97 -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/auth.json +1 -0
  57. package/locales/zh-CN/plugin.json +12 -2
  58. package/locales/zh-CN/providers.json +1 -0
  59. package/locales/zh-CN/setting.json +97 -2
  60. package/locales/zh-TW/plugin.json +12 -2
  61. package/locales/zh-TW/providers.json +1 -0
  62. package/locales/zh-TW/setting.json +78 -2
  63. package/package.json +1 -1
  64. package/packages/agent-runtime/src/groupOrchestration/GroupOrchestrationSupervisor.ts +2 -0
  65. package/packages/agent-runtime/src/groupOrchestration/__tests__/GroupOrchestrationSupervisor.test.ts +3 -1
  66. package/packages/agent-runtime/src/groupOrchestration/types.ts +5 -0
  67. package/packages/const/src/index.ts +1 -0
  68. package/packages/const/src/klavis.ts +144 -0
  69. package/packages/const/src/lobehubSkill.ts +34 -0
  70. package/packages/const/src/recommendedSkill.ts +17 -0
  71. package/packages/model-runtime/src/core/contextBuilders/anthropic.test.ts +38 -0
  72. package/packages/model-runtime/src/core/contextBuilders/anthropic.ts +20 -1
  73. package/packages/model-runtime/src/core/contextBuilders/google.test.ts +42 -0
  74. package/packages/model-runtime/src/core/contextBuilders/google.ts +17 -0
  75. package/packages/model-runtime/src/providers/google/index.ts +14 -14
  76. package/packages/model-runtime/src/providers/moonshot/index.ts +1 -1
  77. package/packages/model-runtime/src/providers/openai/index.ts +3 -3
  78. package/packages/types/src/discover/index.ts +1 -1
  79. package/scripts/electronWorkflow/modifiers/dynamicToStatic.mts +273 -0
  80. package/scripts/electronWorkflow/modifiers/index.mts +10 -0
  81. package/scripts/electronWorkflow/modifiers/nextConfig.mts +1 -0
  82. package/scripts/electronWorkflow/modifiers/nextDynamicToStatic.mts +233 -0
  83. package/scripts/electronWorkflow/modifiers/removeSuspense.mts +124 -0
  84. package/scripts/electronWorkflow/modifiers/routes.mts +14 -2
  85. package/scripts/electronWorkflow/modifiers/settingsContentToStatic.mts +148 -0
  86. package/scripts/electronWorkflow/modifiers/wrapChildrenWithClientOnly.mts +73 -0
  87. package/src/app/[variants]/(main)/agent/cron/[cronId]/CronConfig.ts +16 -16
  88. package/src/app/[variants]/(main)/agent/cron/[cronId]/features/CronJobSaveButton.tsx +1 -1
  89. package/src/app/[variants]/(main)/agent/cron/[cronId]/features/CronJobScheduleConfig.tsx +5 -2
  90. package/src/app/[variants]/(main)/community/features/Search.tsx +1 -1
  91. package/src/app/[variants]/(main)/home/features/InputArea/SkillInstallBanner.tsx +131 -0
  92. package/src/app/[variants]/(main)/home/features/InputArea/index.tsx +34 -27
  93. package/src/app/[variants]/(main)/settings/features/SettingHeader.tsx +8 -4
  94. package/src/app/[variants]/(main)/settings/features/SettingsContent.tsx +3 -0
  95. package/src/app/[variants]/(main)/settings/hooks/useCategory.tsx +6 -0
  96. package/src/{features/PluginStore/InstalledList/List/Item/Action.tsx → app/[variants]/(main)/settings/skill/features/Actions.tsx} +45 -40
  97. package/src/app/[variants]/(main)/settings/skill/features/KlavisSkillItem.tsx +353 -0
  98. package/src/app/[variants]/(main)/settings/skill/features/LobehubSkillItem.tsx +344 -0
  99. package/src/app/[variants]/(main)/settings/skill/features/McpSkillItem.tsx +116 -0
  100. package/src/app/[variants]/(main)/settings/skill/features/SkillList.tsx +244 -0
  101. package/src/app/[variants]/(main)/settings/skill/index.tsx +35 -0
  102. package/src/app/[variants]/(mobile)/router/mobileRouter.config.tsx +27 -0
  103. package/src/app/[variants]/(mobile)/settings/_layout/Header.tsx +8 -17
  104. package/src/app/[variants]/(mobile)/settings/_layout/index.tsx +6 -1
  105. package/src/app/[variants]/(mobile)/settings/provider/_layout/index.tsx +22 -0
  106. package/src/components/Plugins/PluginTag.tsx +23 -35
  107. package/src/components/client/ClientOnly.tsx +6 -2
  108. package/src/features/AgentSetting/AgentPlugin/index.tsx +2 -2
  109. package/src/features/ChatInput/ActionBar/Tools/KlavisServerItem.tsx +8 -32
  110. package/src/features/ChatInput/ActionBar/Tools/LobehubSkillServerItem.tsx +8 -30
  111. package/src/features/ChatInput/ActionBar/Tools/PopoverContent.tsx +48 -59
  112. package/src/features/ChatInput/ActionBar/Tools/index.tsx +5 -23
  113. package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +158 -56
  114. package/src/features/IntegrationDetailModal/index.tsx +293 -0
  115. package/src/features/{PluginStore/McpList/Detail → MCP/MCPDetail}/index.tsx +15 -6
  116. package/src/features/MCP/MCPSettings/McpSettingsModal.tsx +58 -0
  117. package/src/features/{PluginStore/McpList/Detail/Settings → MCP/MCPSettings}/index.tsx +39 -27
  118. package/src/features/PluginDetailModal/index.tsx +2 -2
  119. package/src/features/PluginDevModal/index.tsx +16 -40
  120. package/src/features/ProfileEditor/AgentTool.tsx +2 -2
  121. package/src/features/ProtocolUrlHandler/InstallPlugin/OfficialPluginInstallModal/index.tsx +1 -1
  122. package/src/features/{PluginStore/AddPluginButton.tsx → SkillStore/AddSkillButton.tsx} +3 -3
  123. package/src/features/SkillStore/CommunityList/Item.tsx +158 -0
  124. package/src/features/SkillStore/CommunityList/index.tsx +101 -0
  125. package/src/features/SkillStore/Content.tsx +59 -0
  126. package/src/features/{PluginStore/PluginEmpty.tsx → SkillStore/Empty.tsx} +8 -8
  127. package/src/features/SkillStore/LobeHubList/Item.tsx +118 -0
  128. package/src/features/SkillStore/LobeHubList/index.tsx +187 -0
  129. package/src/features/SkillStore/LobeHubList/useSkillConnect.ts +239 -0
  130. package/src/features/SkillStore/Search/index.tsx +43 -0
  131. package/src/features/{PluginStore → SkillStore}/index.tsx +14 -10
  132. package/src/features/SkillStore/style.ts +27 -0
  133. package/src/locales/default/plugin.ts +15 -4
  134. package/src/locales/default/setting.ts +204 -2
  135. package/src/services/chat/mecha/agentConfigResolver.test.ts +197 -0
  136. package/src/services/chat/mecha/agentConfigResolver.ts +44 -17
  137. package/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts +40 -37
  138. package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +78 -0
  139. package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +50 -16
  140. package/src/store/global/initialState.ts +1 -0
  141. package/src/store/tool/slices/lobehubSkillStore/action.test.ts +914 -0
  142. package/src/store/tool/slices/lobehubSkillStore/selectors.test.ts +548 -0
  143. package/.cursor/skills/vercel-react-best-practices/AGENTS.md +0 -2410
  144. package/.cursor/skills/vercel-react-best-practices/SKILL.md +0 -125
  145. package/.cursor/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  146. package/.cursor/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -49
  147. package/.cursor/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
  148. package/.cursor/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
  149. package/.cursor/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -36
  150. package/.cursor/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
  151. package/.cursor/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
  152. package/.cursor/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
  153. package/.cursor/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
  154. package/.cursor/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
  155. package/.cursor/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  156. package/.cursor/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
  157. package/.cursor/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
  158. package/.cursor/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
  159. package/.cursor/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
  160. package/.cursor/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
  161. package/.cursor/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -57
  162. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
  163. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
  164. package/.cursor/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
  165. package/.cursor/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
  166. package/.cursor/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
  167. package/.cursor/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
  168. package/.cursor/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
  169. package/.cursor/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
  170. package/.cursor/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
  171. package/.cursor/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
  172. package/.cursor/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
  173. package/.cursor/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
  174. package/.cursor/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  175. package/.cursor/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
  176. package/.cursor/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
  177. package/.cursor/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  178. package/.cursor/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  179. package/.cursor/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
  180. package/.cursor/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
  181. package/.cursor/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
  182. package/.cursor/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
  183. package/.cursor/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
  184. package/.cursor/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  185. package/.cursor/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
  186. package/.cursor/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
  187. package/.cursor/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
  188. package/.cursor/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
  189. package/.cursor/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
  190. package/.cursor/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
  191. package/.cursor/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
  192. package/src/features/PluginStore/Content.tsx +0 -54
  193. package/src/features/PluginStore/InstalledList/Detail/CustomPluginEmptyState.tsx +0 -79
  194. package/src/features/PluginStore/InstalledList/Detail/index.tsx +0 -21
  195. package/src/features/PluginStore/InstalledList/List/Item/index.tsx +0 -61
  196. package/src/features/PluginStore/InstalledList/List/index.tsx +0 -72
  197. package/src/features/PluginStore/InstalledList/index.tsx +0 -90
  198. package/src/features/PluginStore/McpList/List/Action.tsx +0 -119
  199. package/src/features/PluginStore/McpList/List/Item.tsx +0 -83
  200. package/src/features/PluginStore/McpList/List/index.tsx +0 -93
  201. package/src/features/PluginStore/McpList/index.tsx +0 -58
  202. package/src/features/PluginStore/PluginList/Detail/DetailProvider.tsx +0 -19
  203. package/src/features/PluginStore/PluginList/Detail/EmptyState.tsx +0 -56
  204. package/src/features/PluginStore/PluginList/Detail/Header.tsx +0 -130
  205. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Nav.tsx +0 -73
  206. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Settings.tsx +0 -19
  207. package/src/features/PluginStore/PluginList/Detail/InstallDetail/Tools.tsx +0 -111
  208. package/src/features/PluginStore/PluginList/Detail/InstallDetail/index.tsx +0 -24
  209. package/src/features/PluginStore/PluginList/Detail/Loading.tsx +0 -42
  210. package/src/features/PluginStore/PluginList/Detail/TagList.tsx +0 -35
  211. package/src/features/PluginStore/PluginList/Detail/index.tsx +0 -39
  212. package/src/features/PluginStore/PluginList/Detail/useCategory.tsx +0 -76
  213. package/src/features/PluginStore/PluginList/List/Action.tsx +0 -78
  214. package/src/features/PluginStore/PluginList/List/Item.tsx +0 -92
  215. package/src/features/PluginStore/PluginList/List/index.tsx +0 -94
  216. package/src/features/PluginStore/PluginList/index.tsx +0 -46
  217. package/src/features/PluginStore/Search/index.tsx +0 -40
  218. /package/{.codex/skills → .agents}/vercel-react-best-practices/AGENTS.md +0 -0
  219. /package/{.codex/skills → .agents}/vercel-react-best-practices/SKILL.md +0 -0
  220. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -0
  221. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/advanced-use-latest.md +0 -0
  222. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-api-routes.md +0 -0
  223. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-defer-await.md +0 -0
  224. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-dependencies.md +0 -0
  225. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-parallel.md +0 -0
  226. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -0
  227. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -0
  228. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-conditional.md +0 -0
  229. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -0
  230. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -0
  231. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/bundle-preload.md +0 -0
  232. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-event-listeners.md +0 -0
  233. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -0
  234. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -0
  235. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/client-swr-dedup.md +0 -0
  236. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -0
  237. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-function-results.md +0 -0
  238. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-property-access.md +0 -0
  239. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-cache-storage.md +0 -0
  240. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-combine-iterations.md +0 -0
  241. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-early-exit.md +0 -0
  242. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -0
  243. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-index-maps.md +0 -0
  244. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-length-check-first.md +0 -0
  245. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-min-max-loop.md +0 -0
  246. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -0
  247. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -0
  248. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-activity.md +0 -0
  249. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -0
  250. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -0
  251. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -0
  252. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -0
  253. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -0
  254. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -0
  255. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -0
  256. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-dependencies.md +0 -0
  257. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-derived-state.md +0 -0
  258. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -0
  259. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -0
  260. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-memo.md +0 -0
  261. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/rerender-transitions.md +0 -0
  262. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -0
  263. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-cache-lru.md +0 -0
  264. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-cache-react.md +0 -0
  265. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -0
  266. /package/{.codex/skills → .agents}/vercel-react-best-practices/rules/server-serialization.md +0 -0
  267. /package/src/{features/PluginStore/InstalledList → app/[variants]/(main)/settings/skill/features}/EditCustomPlugin.tsx +0 -0
  268. /package/src/features/{PluginStore/McpList/Detail → MCP/MCPDetail}/Loading.tsx +0 -0
  269. /package/src/features/{PluginStore → SkillStore}/Loading.tsx +0 -0
  270. /package/src/features/{PluginStore → SkillStore}/VirtuosoLoading.tsx +0 -0
@@ -51,6 +51,12 @@ export interface AgentConfigResolverContext {
51
51
  /** Agent ID to resolve config for */
52
52
  agentId: string;
53
53
 
54
+ /**
55
+ * Whether to disable all tools for this agent execution.
56
+ * When true, returns empty plugins array (used for broadcast scenarios).
57
+ */
58
+ disableTools?: boolean;
59
+
54
60
  // Builtin agent specific context
55
61
  /** Document content for page-agent */
56
62
  documentContent?: string;
@@ -112,13 +118,27 @@ export interface ResolvedAgentConfig {
112
118
  * For regular agents, this simply returns the config from the store.
113
119
  */
114
120
  export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAgentConfig => {
115
- const { agentId, model, documentContent, plugins, targetAgentConfig, isSubTask } = ctx;
116
-
117
- log('resolveAgentConfig called with agentId: %s, scope: %s, isSubTask: %s', agentId, ctx.scope, isSubTask);
118
-
119
- // Helper to filter out lobe-gtd in sub-task context to prevent nested sub-task creation
120
- const applySubTaskFilter = (pluginIds: string[]) =>
121
- isSubTask ? pluginIds.filter((id) => id !== 'lobe-gtd') : pluginIds;
121
+ const { agentId, model, documentContent, plugins, targetAgentConfig, isSubTask, disableTools } =
122
+ ctx;
123
+
124
+ log(
125
+ 'resolveAgentConfig called with agentId: %s, scope: %s, isSubTask: %s, disableTools: %s',
126
+ agentId,
127
+ ctx.scope,
128
+ isSubTask,
129
+ disableTools,
130
+ );
131
+
132
+ // Helper to apply plugin filters:
133
+ // 1. If disableTools is true, return empty array (for broadcast scenarios)
134
+ // 2. If isSubTask is true, filter out lobe-gtd to prevent nested sub-task creation
135
+ const applyPluginFilters = (pluginIds: string[]) => {
136
+ if (disableTools) {
137
+ log('disableTools is true, returning empty plugins');
138
+ return [];
139
+ }
140
+ return isSubTask ? pluginIds.filter((id) => id !== 'lobe-gtd') : pluginIds;
141
+ };
122
142
 
123
143
  const agentStoreState = getAgentStoreState();
124
144
 
@@ -130,18 +150,18 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
130
150
  const basePlugins = agentConfig.plugins ?? [];
131
151
 
132
152
  // Check if this is a builtin agent
133
- // First check agent store, then check if this is a supervisor agent via groupId
134
- let slug = agentSelectors.getAgentSlugById(agentId)(agentStoreState);
135
- log('slug from agentStore: %s (agentId: %s)', slug, agentId);
153
+ // Priority: supervisor check (when in group scope) > agent store slug
154
+ let slug: string | undefined;
136
155
 
137
- // If not found in agent store, check if this is a supervisor agent using groupId
138
- // This is more reliable than iterating all groups to find a match
139
- if (!slug && ctx.groupId) {
156
+ // IMPORTANT: When in group scope with groupId, check if this agent is the group's supervisor FIRST
157
+ // This takes priority because supervisor needs special group-supervisor behavior,
158
+ // even if the agent has its own slug
159
+ if (ctx.groupId && ctx.scope === 'group') {
140
160
  const groupStoreState = getChatGroupStoreState();
141
161
  const group = agentGroupByIdSelectors.groupById(ctx.groupId)(groupStoreState);
142
162
 
143
163
  log(
144
- 'checking supervisor via groupId %s: group=%o',
164
+ 'checking supervisor FIRST (scope=group): groupId=%s, group=%O, agentId=%s',
145
165
  ctx.groupId,
146
166
  group
147
167
  ? {
@@ -150,6 +170,7 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
150
170
  title: group.title,
151
171
  }
152
172
  : null,
173
+ agentId,
153
174
  );
154
175
 
155
176
  // Check if this agent is the supervisor of the specified group
@@ -164,6 +185,12 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
164
185
  }
165
186
  }
166
187
 
188
+ // If not identified as supervisor, check agent store for slug
189
+ if (!slug) {
190
+ slug = agentSelectors.getAgentSlugById(agentId)(agentStoreState) ?? undefined;
191
+ log('slug from agentStore: %s (agentId: %s)', slug, agentId);
192
+ }
193
+
167
194
  if (!slug) {
168
195
  log('agentId %s is not a builtin agent (no slug found)', agentId);
169
196
  // Regular agent - use provided plugins if available, fallback to agent's plugins
@@ -209,7 +236,7 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
209
236
  agentConfig: finalAgentConfig,
210
237
  chatConfig: finalChatConfig,
211
238
  isBuiltinAgent: false,
212
- plugins: applySubTaskFilter(pageAgentPlugins),
239
+ plugins: applyPluginFilters(pageAgentPlugins),
213
240
  };
214
241
  }
215
242
 
@@ -218,7 +245,7 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
218
245
  agentConfig: finalAgentConfig,
219
246
  chatConfig: finalChatConfig,
220
247
  isBuiltinAgent: false,
221
- plugins: applySubTaskFilter(finalPlugins),
248
+ plugins: applyPluginFilters(finalPlugins),
222
249
  };
223
250
  }
224
251
 
@@ -339,7 +366,7 @@ export const resolveAgentConfig = (ctx: AgentConfigResolverContext): ResolvedAge
339
366
  agentConfig: finalAgentConfig,
340
367
  chatConfig: resolvedChatConfig,
341
368
  isBuiltinAgent: true,
342
- plugins: applySubTaskFilter(finalPlugins),
369
+ plugins: applyPluginFilters(finalPlugins),
343
370
  slug,
344
371
  };
345
372
  };
@@ -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',