@solidxai/core-ui 0.1.20 → 0.1.21-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/dist/components/common/FileReaderExt.d.ts.map +1 -1
  2. package/dist/components/common/FileReaderExt.js +22 -11
  3. package/dist/components/common/FileReaderExt.js.map +1 -1
  4. package/dist/components/common/FileReaderExt.tsx +27 -14
  5. package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
  6. package/dist/components/common/SocialMediaLogin.js +1 -1
  7. package/dist/components/common/SocialMediaLogin.js.map +1 -1
  8. package/dist/components/common/SocialMediaLogin.tsx +50 -19
  9. package/dist/components/common/SolidPopupContainer.js +1 -1
  10. package/dist/components/common/SolidPopupContainer.js.map +1 -1
  11. package/dist/components/common/SolidPopupContainer.tsx +1 -1
  12. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts +1 -0
  13. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts.map +1 -1
  14. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js +46 -19
  15. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
  16. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +69 -14
  17. package/dist/components/common/solid-export.css +75 -0
  18. package/dist/components/core/card/CardItem.d.ts.map +1 -1
  19. package/dist/components/core/card/CardItem.js +13 -2
  20. package/dist/components/core/card/CardItem.js.map +1 -1
  21. package/dist/components/core/card/CardItem.tsx +13 -2
  22. package/dist/components/core/card/SolidCardView.js +2 -2
  23. package/dist/components/core/card/SolidCardView.js.map +1 -1
  24. package/dist/components/core/card/SolidCardView.tsx +2 -2
  25. package/dist/components/core/chatter/SolidChatterAuditMessage.css +68 -0
  26. package/dist/components/core/chatter/SolidChatterAuditMessage.d.ts +1 -0
  27. package/dist/components/core/chatter/SolidChatterAuditMessage.d.ts.map +1 -1
  28. package/dist/components/core/chatter/SolidChatterAuditMessage.js +20 -2
  29. package/dist/components/core/chatter/SolidChatterAuditMessage.js.map +1 -1
  30. package/dist/components/core/chatter/SolidChatterAuditMessage.tsx +49 -12
  31. package/dist/components/core/common/SolidGenericImport/SolidImport.module.css +71 -0
  32. package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.d.ts.map +1 -1
  33. package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.js +83 -1
  34. package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.js.map +1 -1
  35. package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.module.css +45 -1
  36. package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.tsx +106 -2
  37. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.d.ts +3 -0
  38. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.d.ts.map +1 -0
  39. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.js +163 -0
  40. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.js.map +1 -0
  41. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.module.css +86 -0
  42. package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.tsx +129 -0
  43. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts +23 -0
  44. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts.map +1 -0
  45. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js +270 -0
  46. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js.map +1 -0
  47. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.module.css +167 -0
  48. package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.tsx +270 -0
  49. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts +3 -0
  50. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts.map +1 -0
  51. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js +67 -0
  52. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js.map +1 -0
  53. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.module.css +68 -0
  54. package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.tsx +107 -0
  55. package/dist/components/core/form/SolidFormFieldRender.d.ts.map +1 -1
  56. package/dist/components/core/form/SolidFormFieldRender.js +2 -1
  57. package/dist/components/core/form/SolidFormFieldRender.js.map +1 -1
  58. package/dist/components/core/form/SolidFormFieldRender.tsx +6 -3
  59. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  60. package/dist/components/core/form/SolidFormView.js +29 -4
  61. package/dist/components/core/form/SolidFormView.js.map +1 -1
  62. package/dist/components/core/form/SolidFormView.tsx +27 -5
  63. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  64. package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
  65. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  66. package/dist/components/core/form/fields/SolidBooleanField.tsx +15 -3
  67. package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
  68. package/dist/components/core/form/fields/SolidDateField.js +1 -1
  69. package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
  70. package/dist/components/core/form/fields/SolidDateField.tsx +5 -4
  71. package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
  72. package/dist/components/core/form/fields/SolidDateTimeField.js +3 -5
  73. package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
  74. package/dist/components/core/form/fields/SolidDateTimeField.tsx +7 -8
  75. package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
  76. package/dist/components/core/form/fields/SolidDecimalField.js +2 -1
  77. package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
  78. package/dist/components/core/form/fields/SolidDecimalField.tsx +6 -1
  79. package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -1
  80. package/dist/components/core/form/fields/SolidEmailField.js +2 -1
  81. package/dist/components/core/form/fields/SolidEmailField.js.map +1 -1
  82. package/dist/components/core/form/fields/SolidEmailField.tsx +6 -1
  83. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  84. package/dist/components/core/form/fields/SolidIntegerField.js +3 -3
  85. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  86. package/dist/components/core/form/fields/SolidIntegerField.tsx +11 -5
  87. package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
  88. package/dist/components/core/form/fields/SolidJsonField.js +1 -1
  89. package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
  90. package/dist/components/core/form/fields/SolidJsonField.tsx +5 -3
  91. package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
  92. package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
  93. package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
  94. package/dist/components/core/form/fields/SolidLongTextField.tsx +10 -4
  95. package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
  96. package/dist/components/core/form/fields/SolidMediaMultipleField.js +4 -4
  97. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  98. package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +8 -6
  99. package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
  100. package/dist/components/core/form/fields/SolidMediaSingleField.js +3 -3
  101. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  102. package/dist/components/core/form/fields/SolidMediaSingleField.tsx +7 -5
  103. package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -1
  104. package/dist/components/core/form/fields/SolidPasswordField.js +4 -3
  105. package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
  106. package/dist/components/core/form/fields/SolidPasswordField.tsx +21 -4
  107. package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
  108. package/dist/components/core/form/fields/SolidRichTextField.js +2 -1
  109. package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
  110. package/dist/components/core/form/fields/SolidRichTextField.tsx +5 -1
  111. package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  112. package/dist/components/core/form/fields/SolidSelectionDynamicField.js +2 -1
  113. package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
  114. package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +6 -3
  115. package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
  116. package/dist/components/core/form/fields/SolidSelectionStaticField.js +6 -5
  117. package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
  118. package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +26 -7
  119. package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
  120. package/dist/components/core/form/fields/SolidShortTextField.js +3 -2
  121. package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
  122. package/dist/components/core/form/fields/SolidShortTextField.tsx +11 -2
  123. package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
  124. package/dist/components/core/form/fields/SolidTimeField.js +1 -1
  125. package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
  126. package/dist/components/core/form/fields/SolidTimeField.tsx +5 -3
  127. package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
  128. package/dist/components/core/kanban/KanbanCard.js +13 -2
  129. package/dist/components/core/kanban/KanbanCard.js.map +1 -1
  130. package/dist/components/core/kanban/KanbanCard.tsx +13 -2
  131. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  132. package/dist/components/core/kanban/SolidKanbanView.js +18 -11
  133. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  134. package/dist/components/core/kanban/SolidKanbanView.tsx +10 -6
  135. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  136. package/dist/components/core/list/SolidListView.js +49 -38
  137. package/dist/components/core/list/SolidListView.js.map +1 -1
  138. package/dist/components/core/list/SolidListView.tsx +20 -21
  139. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +2 -2
  140. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
  141. package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +4 -4
  142. package/dist/components/core/list/columns/SolidMediaSingleColumn.js +1 -1
  143. package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
  144. package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +3 -3
  145. package/dist/components/core/solid-agent/AgentContextPill.d.ts +9 -0
  146. package/dist/components/core/solid-agent/AgentContextPill.d.ts.map +1 -0
  147. package/dist/components/core/solid-agent/AgentContextPill.js +92 -0
  148. package/dist/components/core/solid-agent/AgentContextPill.js.map +1 -0
  149. package/dist/components/core/solid-agent/AgentContextPill.tsx +175 -0
  150. package/dist/components/core/solid-agent/AgentModelIndicator.d.ts +29 -3
  151. package/dist/components/core/solid-agent/AgentModelIndicator.d.ts.map +1 -1
  152. package/dist/components/core/solid-agent/AgentModelIndicator.js +279 -4
  153. package/dist/components/core/solid-agent/AgentModelIndicator.js.map +1 -1
  154. package/dist/components/core/solid-agent/AgentModelIndicator.tsx +546 -18
  155. package/dist/components/core/solid-agent/SolidAgent.module.css +1271 -128
  156. package/dist/components/core/solid-agent/SolidAgentChat.d.ts +6 -1
  157. package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
  158. package/dist/components/core/solid-agent/SolidAgentChat.js +693 -68
  159. package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
  160. package/dist/components/core/solid-agent/SolidAgentChat.tsx +832 -62
  161. package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts +4 -0
  162. package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts.map +1 -1
  163. package/dist/components/core/solid-agent/SolidAgentEmbedded.js +19 -13
  164. package/dist/components/core/solid-agent/SolidAgentEmbedded.js.map +1 -1
  165. package/dist/components/core/solid-agent/SolidAgentEmbedded.tsx +40 -12
  166. package/dist/components/core/solid-agent/SolidAgentHost.d.ts.map +1 -1
  167. package/dist/components/core/solid-agent/SolidAgentHost.js +84 -1
  168. package/dist/components/core/solid-agent/SolidAgentHost.js.map +1 -1
  169. package/dist/components/core/solid-agent/SolidAgentHost.tsx +75 -2
  170. package/dist/components/core/solid-agent/agentEvents.d.ts +4 -1
  171. package/dist/components/core/solid-agent/agentEvents.d.ts.map +1 -1
  172. package/dist/components/core/solid-agent/agentEvents.js +108 -27
  173. package/dist/components/core/solid-agent/agentEvents.js.map +1 -1
  174. package/dist/components/core/solid-agent/agentEvents.ts +105 -14
  175. package/dist/components/core/solid-agent/agentFormat.d.ts.map +1 -1
  176. package/dist/components/core/solid-agent/agentFormat.js +80 -9
  177. package/dist/components/core/solid-agent/agentFormat.js.map +1 -1
  178. package/dist/components/core/solid-agent/agentFormat.ts +85 -8
  179. package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts +88 -0
  180. package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts.map +1 -0
  181. package/dist/components/core/solid-agent/client/agentPublicEvents.js +26 -0
  182. package/dist/components/core/solid-agent/client/agentPublicEvents.js.map +1 -0
  183. package/dist/components/core/solid-agent/client/agentPublicEvents.ts +66 -0
  184. package/dist/components/core/solid-agent/client/agentRest.d.ts +23 -2
  185. package/dist/components/core/solid-agent/client/agentRest.d.ts.map +1 -1
  186. package/dist/components/core/solid-agent/client/agentRest.js +223 -1
  187. package/dist/components/core/solid-agent/client/agentRest.js.map +1 -1
  188. package/dist/components/core/solid-agent/client/agentRest.ts +173 -5
  189. package/dist/components/core/solid-agent/client/agentRuntime.d.ts +38 -5
  190. package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
  191. package/dist/components/core/solid-agent/client/agentRuntime.js +400 -59
  192. package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
  193. package/dist/components/core/solid-agent/client/agentRuntime.ts +322 -32
  194. package/dist/components/core/solid-agent/client/agentSocket.d.ts +28 -6
  195. package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
  196. package/dist/components/core/solid-agent/client/agentSocket.js +206 -39
  197. package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
  198. package/dist/components/core/solid-agent/client/agentSocket.ts +153 -24
  199. package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts +9 -0
  200. package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts.map +1 -0
  201. package/dist/components/core/solid-agent/client/beforeUserMessageSend.js +53 -0
  202. package/dist/components/core/solid-agent/client/beforeUserMessageSend.js.map +1 -0
  203. package/dist/components/core/solid-agent/client/beforeUserMessageSend.ts +26 -0
  204. package/dist/components/core/solid-agent/composer/AgentComposer.d.ts +3 -1
  205. package/dist/components/core/solid-agent/composer/AgentComposer.d.ts.map +1 -1
  206. package/dist/components/core/solid-agent/composer/AgentComposer.js +37 -21
  207. package/dist/components/core/solid-agent/composer/AgentComposer.js.map +1 -1
  208. package/dist/components/core/solid-agent/composer/AgentComposer.tsx +113 -71
  209. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.d.ts.map +1 -1
  210. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +4 -3
  211. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
  212. package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +4 -2
  213. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts +29 -0
  214. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
  215. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +45 -2
  216. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
  217. package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +49 -2
  218. package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts +1 -0
  219. package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts.map +1 -1
  220. package/dist/components/core/solid-agent/embed/agentEmbedSamples.js +2 -1
  221. package/dist/components/core/solid-agent/embed/agentEmbedSamples.js.map +1 -1
  222. package/dist/components/core/solid-agent/embed/agentEmbedSamples.ts +15 -1
  223. package/dist/components/core/solid-agent/sdk/solidAgent.d.ts +4 -1
  224. package/dist/components/core/solid-agent/sdk/solidAgent.d.ts.map +1 -1
  225. package/dist/components/core/solid-agent/sdk/solidAgent.js.map +1 -1
  226. package/dist/components/core/solid-agent/sdk/solidAgent.ts +2 -2
  227. package/dist/components/core/solid-agent/thread/AgentThread.d.ts +2 -1
  228. package/dist/components/core/solid-agent/thread/AgentThread.d.ts.map +1 -1
  229. package/dist/components/core/solid-agent/thread/AgentThread.js +46 -36
  230. package/dist/components/core/solid-agent/thread/AgentThread.js.map +1 -1
  231. package/dist/components/core/solid-agent/thread/AgentThread.tsx +65 -62
  232. package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts +2 -2
  233. package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts.map +1 -1
  234. package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js +9 -3
  235. package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js.map +1 -1
  236. package/dist/components/core/solid-agent/thread/SolidAgentChatItem.tsx +12 -3
  237. package/dist/components/core/solid-agent/thread/inlineWidget.d.ts +15 -0
  238. package/dist/components/core/solid-agent/thread/inlineWidget.d.ts.map +1 -1
  239. package/dist/components/core/solid-agent/thread/inlineWidget.js +170 -19
  240. package/dist/components/core/solid-agent/thread/inlineWidget.js.map +1 -1
  241. package/dist/components/core/solid-agent/thread/inlineWidget.ts +164 -15
  242. package/dist/components/core/solid-agent/types.d.ts +86 -4
  243. package/dist/components/core/solid-agent/types.d.ts.map +1 -1
  244. package/dist/components/core/solid-agent/types.js +2 -0
  245. package/dist/components/core/solid-agent/types.js.map +1 -1
  246. package/dist/components/core/solid-agent/types.ts +76 -4
  247. package/dist/components/core/solid-agent/useAgentAvailability.d.ts +3 -1
  248. package/dist/components/core/solid-agent/useAgentAvailability.d.ts.map +1 -1
  249. package/dist/components/core/solid-agent/useAgentAvailability.js +16 -7
  250. package/dist/components/core/solid-agent/useAgentAvailability.js.map +1 -1
  251. package/dist/components/core/solid-agent/useAgentAvailability.ts +13 -6
  252. package/dist/components/core/solid-agent/useAgentChat.d.ts +1 -1
  253. package/dist/components/core/solid-agent/useAgentChat.d.ts.map +1 -1
  254. package/dist/components/core/solid-agent/useAgentChat.js +7 -4
  255. package/dist/components/core/solid-agent/useAgentChat.js.map +1 -1
  256. package/dist/components/core/solid-agent/useAgentChat.ts +9 -5
  257. package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.d.ts +1 -1
  258. package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.d.ts.map +1 -1
  259. package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js +7 -38
  260. package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js.map +1 -1
  261. package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.tsx +8 -51
  262. package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.d.ts.map +1 -1
  263. package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js +12 -4
  264. package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js.map +1 -1
  265. package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.tsx +18 -0
  266. package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts +4 -0
  267. package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts.map +1 -0
  268. package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js +30 -0
  269. package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js.map +1 -0
  270. package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.tsx +41 -0
  271. package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js +2 -1
  272. package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js.map +1 -1
  273. package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.tsx +2 -2
  274. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts.map +1 -1
  275. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js +3 -1
  276. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js.map +1 -1
  277. package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx +3 -2
  278. package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.d.ts +1 -1
  279. package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.d.ts.map +1 -1
  280. package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js +77 -10
  281. package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js.map +1 -1
  282. package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.tsx +96 -18
  283. package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.d.ts.map +1 -1
  284. package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js +1 -2
  285. package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js.map +1 -1
  286. package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.tsx +1 -3
  287. package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +101 -76
  288. package/dist/components/core/solid-ai/SolidAiChat.d.ts.map +1 -1
  289. package/dist/components/core/solid-ai/SolidAiChat.js +2 -2
  290. package/dist/components/core/solid-ai/SolidAiChat.js.map +1 -1
  291. package/dist/components/core/solid-ai/SolidAiChat.tsx +12 -10
  292. package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
  293. package/dist/components/core/tree/SolidTreeView.js +42 -44
  294. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  295. package/dist/components/core/tree/SolidTreeView.tsx +2 -20
  296. package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
  297. package/dist/components/layout/AdminTopHeader.js +20 -4
  298. package/dist/components/layout/AdminTopHeader.js.map +1 -1
  299. package/dist/components/layout/AdminTopHeader.tsx +19 -4
  300. package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
  301. package/dist/components/layout/user-profile-menu.js +12 -8
  302. package/dist/components/layout/user-profile-menu.js.map +1 -1
  303. package/dist/components/layout/user-profile-menu.tsx +26 -7
  304. package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts +2 -1
  305. package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts.map +1 -1
  306. package/dist/components/shad-cn-ui/SolidCodeEditor.js +3 -2
  307. package/dist/components/shad-cn-ui/SolidCodeEditor.js.map +1 -1
  308. package/dist/components/shad-cn-ui/SolidCodeEditor.tsx +3 -0
  309. package/dist/helpers/adminViewRefresh.d.ts +13 -0
  310. package/dist/helpers/adminViewRefresh.d.ts.map +1 -0
  311. package/dist/helpers/adminViewRefresh.js +14 -0
  312. package/dist/helpers/adminViewRefresh.js.map +1 -0
  313. package/dist/helpers/adminViewRefresh.ts +26 -0
  314. package/dist/helpers/eventBus.d.ts +1 -0
  315. package/dist/helpers/eventBus.d.ts.map +1 -1
  316. package/dist/helpers/eventBus.js +1 -0
  317. package/dist/helpers/eventBus.js.map +1 -1
  318. package/dist/helpers/eventBus.ts +1 -0
  319. package/dist/helpers/fileTypeIcon.d.ts.map +1 -1
  320. package/dist/helpers/fileTypeIcon.js +4 -1
  321. package/dist/helpers/fileTypeIcon.js.map +1 -1
  322. package/dist/helpers/fileTypeIcon.tsx +15 -0
  323. package/dist/helpers/registry.d.ts.map +1 -1
  324. package/dist/helpers/registry.js +8 -0
  325. package/dist/helpers/registry.js.map +1 -1
  326. package/dist/helpers/registry.ts +8 -0
  327. package/dist/helpers/routePaths.d.ts +16 -0
  328. package/dist/helpers/routePaths.d.ts.map +1 -1
  329. package/dist/helpers/routePaths.js +71 -0
  330. package/dist/helpers/routePaths.js.map +1 -1
  331. package/dist/helpers/routePaths.ts +75 -0
  332. package/dist/redux/api/solidEntityApi.d.ts +1 -1
  333. package/dist/redux/api/solidEntityApi.js +5 -2
  334. package/dist/redux/api/solidEntityApi.js.map +1 -1
  335. package/dist/redux/api/solidEntityApi.tsx +5 -2
  336. package/dist/redux/features/agentSlice.d.ts +3 -1
  337. package/dist/redux/features/agentSlice.d.ts.map +1 -1
  338. package/dist/redux/features/agentSlice.js +7 -3
  339. package/dist/redux/features/agentSlice.js.map +1 -1
  340. package/dist/redux/features/agentSlice.ts +17 -5
  341. package/dist/redux/store/StoreProvider.d.ts.map +1 -1
  342. package/dist/redux/store/StoreProvider.js +46 -5
  343. package/dist/redux/store/StoreProvider.js.map +1 -1
  344. package/dist/redux/store/StoreProvider.tsx +48 -5
  345. package/dist/redux/store/createSolidStore.d.ts +3 -1
  346. package/dist/redux/store/createSolidStore.d.ts.map +1 -1
  347. package/dist/redux/store/createSolidStore.js +2 -1
  348. package/dist/redux/store/createSolidStore.js.map +1 -1
  349. package/dist/redux/store/createSolidStore.ts +2 -1
  350. package/dist/resources/globals.css +31 -4
  351. package/dist/resources/solid-custom.css +136 -0
  352. package/dist/resources/solid-tailwind-generated.css +1 -1
  353. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.css +124 -0
  354. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.d.ts +3 -0
  355. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.d.ts.map +1 -0
  356. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js +144 -0
  357. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js.map +1 -0
  358. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.tsx +164 -0
  359. package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.d.ts +6 -0
  360. package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.d.ts.map +1 -0
  361. package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.js +52 -0
  362. package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.js.map +1 -0
  363. package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.tsx +53 -0
  364. package/dist/routes/pages/admin/core/AgentHubModuleField.css +15 -0
  365. package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts +22 -0
  366. package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts.map +1 -0
  367. package/dist/routes/pages/admin/core/AgentHubModuleField.js +42 -0
  368. package/dist/routes/pages/admin/core/AgentHubModuleField.js.map +1 -0
  369. package/dist/routes/pages/admin/core/AgentHubModuleField.tsx +54 -0
  370. package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts +3 -1
  371. package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts.map +1 -1
  372. package/dist/routes/pages/admin/core/AgentHubTagsField.js +3 -3
  373. package/dist/routes/pages/admin/core/AgentHubTagsField.js.map +1 -1
  374. package/dist/routes/pages/admin/core/AgentHubTagsField.tsx +7 -3
  375. package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.d.ts.map +1 -1
  376. package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.js +6 -2
  377. package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.js.map +1 -1
  378. package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.tsx +5 -3
  379. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +23 -2
  380. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
  381. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +284 -135
  382. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
  383. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +179 -27
  384. package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.d.ts.map +1 -1
  385. package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js +22 -15
  386. package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js.map +1 -1
  387. package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx +17 -7
  388. package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.d.ts.map +1 -1
  389. package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js +21 -15
  390. package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js.map +1 -1
  391. package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx +16 -9
  392. package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.d.ts.map +1 -1
  393. package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js +149 -37
  394. package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js.map +1 -1
  395. package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx +283 -73
  396. package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
  397. package/dist/routes/pages/admin/core/CardPage.js +9 -1
  398. package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
  399. package/dist/routes/pages/admin/core/CardPage.tsx +9 -1
  400. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.css +361 -37
  401. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
  402. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +1 -1
  403. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
  404. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +2 -0
  405. package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
  406. package/dist/routes/pages/admin/core/KanbanPage.js +9 -1
  407. package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
  408. package/dist/routes/pages/admin/core/KanbanPage.tsx +9 -1
  409. package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
  410. package/dist/routes/pages/admin/core/ListPage.js +10 -1
  411. package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
  412. package/dist/routes/pages/admin/core/ListPage.tsx +10 -1
  413. package/dist/routes/pages/admin/core/TreePage.d.ts.map +1 -1
  414. package/dist/routes/pages/admin/core/TreePage.js +9 -1
  415. package/dist/routes/pages/admin/core/TreePage.js.map +1 -1
  416. package/dist/routes/pages/admin/core/TreePage.tsx +9 -1
  417. package/dist/routes/pages/admin/core/agentConfigComparison.d.ts +84 -0
  418. package/dist/routes/pages/admin/core/agentConfigComparison.d.ts.map +1 -0
  419. package/dist/routes/pages/admin/core/agentConfigComparison.js +75 -0
  420. package/dist/routes/pages/admin/core/agentConfigComparison.js.map +1 -0
  421. package/dist/routes/pages/admin/core/agentConfigComparison.ts +40 -0
  422. package/dist/routes/pages/embed/AgentEmbedPage.d.ts.map +1 -1
  423. package/dist/routes/pages/embed/AgentEmbedPage.js +67 -4
  424. package/dist/routes/pages/embed/AgentEmbedPage.js.map +1 -1
  425. package/dist/routes/pages/embed/AgentEmbedPage.tsx +61 -4
  426. package/dist/routes/solidRoutes.d.ts.map +1 -1
  427. package/dist/routes/solidRoutes.js +2 -0
  428. package/dist/routes/solidRoutes.js.map +1 -1
  429. package/dist/routes/solidRoutes.tsx +2 -0
  430. package/package.json +1 -1
@@ -56,21 +56,25 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
56
56
  };
57
57
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
58
58
  import React from "react";
59
- import { ArrowLeft, Ellipsis, ExternalLink, Eye, FlaskConical, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
59
+ import { ArrowLeft, Ellipsis, ExternalLink, Eye, FlaskConical, GitBranch, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
60
60
  import { useDispatch } from "react-redux";
61
- import { useNavigate, useParams } from "react-router-dom";
61
+ import { useNavigate, useParams, useSearchParams } from "react-router-dom";
62
62
  import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
63
+ import { solidPost } from "../../../../http/solidHttp";
63
64
  import { useGetSolidSettingsQuery } from "../../../../redux/api/solidSettingsApi";
64
65
  import { getSettingsMap } from "../../../../helpers/settingsPayload";
65
66
  import { showToast } from "../../../../redux/features/toastSlice";
66
67
  import { AgentRegistryAuditPanel } from "./AgentRegistryAuditPanel";
67
68
  import { AgentPersonaHistory } from "./AgentPersonaHistory";
69
+ import { AgentConfigVersionsPanel } from "./AgentConfigVersionsPanel";
68
70
  import { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload } from "./AgentHubTagsField";
71
+ import { AgentHubModuleField, agentHubModuleFrom, agentHubModulePayload } from "./AgentHubModuleField";
69
72
  import { AgentResourceCardWidget } from "../../../../components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget";
70
73
  import { AgentSessionsPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel";
71
74
  import { AgentProcessesPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentProcessesPanel";
72
75
  import { SolidWorkflowStatusPill } from "../../../../components/core/form/SolidDraftPublishWorkflow";
73
76
  import { getModelsDevModels, useModelsDevCatalog } from "../../../../hooks/useModelsDevModels";
77
+ import { isOtherProvider } from "../../../../components/common/SolidSettings/LlmSettings/AiModelConfigTab";
74
78
  import { SolidAutocomplete, SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidDropdownMenu, SolidDropdownMenuContent, SolidDropdownMenuItem, SolidDropdownMenuTrigger, SolidIconPicker, SolidInput, SolidTabGroup } from "../../../../components/shad-cn-ui";
75
79
  import { SolidAgentEmbedded } from "../../../../components/core/solid-agent/SolidAgentEmbedded";
76
80
  import { SolidAgentMarkdown } from "../../../../components/core/solid-agent/SolidAgentMarkdown";
@@ -123,6 +127,9 @@ function buildModelOptions(providers, settingsModels, catalog, savedValues) {
123
127
  return options;
124
128
  }
125
129
  var OTHER_MODEL = "__other_model__";
130
+ var ACTIVATION_WAIT_MS = 10000;
131
+ var activationWaitKey = function (agentId) { return "agent-activation-wait:".concat(agentId); };
132
+ var savedActivationReadyAt = function (agentId) { return Number(sessionStorage.getItem(activationWaitKey(agentId))) || null; };
126
133
  function SearchableSelect(_a) {
127
134
  var _b;
128
135
  var value = _a.value, options = _a.options, placeholder = _a.placeholder, disabled = _a.disabled, onChange = _a.onChange;
@@ -147,10 +154,10 @@ function ModelPicker(_a) {
147
154
  var _d = React.useState(false), otherSelected = _d[0], setOtherSelected = _d[1];
148
155
  var showOther = !!provider && (otherSelected || (!!model && !availableModels.some(function (option) { return option.model === model; })));
149
156
  return _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Provider *" }), _jsx(SearchableSelect, { value: provider, options: providers, placeholder: "Select provider", onChange: function (next) { setOtherSelected(false); onChange("".concat(next, ":")); } }), ((_b = providerConfig[provider]) === null || _b === void 0 ? void 0 : _b.type) === "bedrock" && ((_c = providerConfig[provider]) === null || _c === void 0 ? void 0 : _c.region) &&
150
- _jsx("small", { children: _jsxs("em", { children: ["Region: ", providerConfig[provider].region] }) })] }), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Model *" }), _jsx(SearchableSelect, { value: showOther ? OTHER_MODEL : model, options: __spreadArray(__spreadArray([], availableModels.map(function (option) { return ({ label: option.model, value: option.model }); }), true), [{ label: "Other", value: OTHER_MODEL }], false), placeholder: "Select model", disabled: !provider, onChange: function (next) {
151
- setOtherSelected(next === OTHER_MODEL);
152
- onChange("".concat(provider, ":").concat(next === OTHER_MODEL ? "" : next));
153
- } }), showOther && _jsx(SolidInput, { className: "w-full", "aria-label": "Custom model ID", placeholder: "Enter model ID", value: model, onChange: function (event) { return onChange("".concat(provider, ":").concat(event.target.value)); } })] })] });
157
+ _jsx("small", { children: _jsxs("em", { children: ["Region: ", providerConfig[provider].region] }) })] }), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Model *" }), isOtherProvider(provider) ? _jsx(SolidInput, { className: "w-full", "aria-label": "Model ID", placeholder: "Enter model ID", value: model, onChange: function (event) { return onChange("".concat(provider, ":").concat(event.target.value)); } }) : _jsxs(_Fragment, { children: [_jsx(SearchableSelect, { value: showOther ? OTHER_MODEL : model, options: __spreadArray(__spreadArray([], availableModels.map(function (option) { return ({ label: option.model, value: option.model }); }), true), [{ label: "Other", value: OTHER_MODEL }], false), placeholder: "Select model", disabled: !provider, onChange: function (next) {
158
+ setOtherSelected(next === OTHER_MODEL);
159
+ onChange("".concat(provider, ":").concat(next === OTHER_MODEL ? "" : next));
160
+ } }), showOther && _jsx(SolidInput, { className: "w-full", "aria-label": "Custom model ID", placeholder: "Enter model ID", value: model, onChange: function (event) { return onChange("".concat(provider, ":").concat(event.target.value)); } })] })] })] });
154
161
  }
155
162
  var entityApi = createSolidEntityApi("agentRegistry");
156
163
  var skillApi = createSolidEntityApi("agentSkillRegistry");
@@ -172,7 +179,7 @@ var detailFields = [
172
179
  "reasoningModelKey", "fastModelKey", "status", "stepLimit", "turnStepLimit", "costLimit", "configVersion",
173
180
  ];
174
181
  var detailQuery = [
175
- "agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret", "tags",
182
+ "agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret", "tags", "module",
176
183
  ].map(function (name, index) { return "populate[".concat(index, "]=").concat(name); }).join("&") + "&" + fieldsQuery(detailFields);
177
184
  // Group by link ID to project summary columns without populating full registry records.
178
185
  function resourceLinksQuery(id, relation, registry, setting, fields) {
@@ -204,7 +211,7 @@ function recordFrom(value) {
204
211
  }
205
212
  function items(value) { return Array.isArray(value) ? value : value ? [value] : []; }
206
213
  function agentFormFromRecord(record) {
207
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
214
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
208
215
  var skills = items(record.agentSkills);
209
216
  var tools = items(record.agentTools);
210
217
  var secrets = items(record.agentSecrets);
@@ -212,7 +219,7 @@ function agentFormFromRecord(record) {
212
219
  name: (_a = record.name) !== null && _a !== void 0 ? _a : "", title: (_b = record.title) !== null && _b !== void 0 ? _b : "", description: (_c = record.description) !== null && _c !== void 0 ? _c : "", iconName: (_d = record.iconName) !== null && _d !== void 0 ? _d : "",
213
220
  inputs: parseInputs(record.requiredInputs), reasoningModelKey: (_e = record.reasoningModelKey) !== null && _e !== void 0 ? _e : "", fastModelKey: (_f = record.fastModelKey) !== null && _f !== void 0 ? _f : "",
214
221
  systemPrompt: (_g = record.systemPrompt) !== null && _g !== void 0 ? _g : "", stepLimit: (_h = record.stepLimit) !== null && _h !== void 0 ? _h : 100, turnStepLimit: (_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20,
215
- costLimit: Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3), tags: agentHubTagsFrom(record.tags), skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
222
+ costLimit: Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3), tags: agentHubTagsFrom(record.tags), moduleId: (_m = (_l = agentHubModuleFrom(record.module)) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : null, skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
216
223
  toolIds: tools.map(function (link) { var _a; return (_a = link.agentToolRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
217
224
  roleIds: items(record.agentRoles).map(function (link) { var _a; return (_a = link.roleMetadata) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
218
225
  secretIds: secrets.map(function (link) { var _a; return (_a = link.secret) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
@@ -331,6 +338,7 @@ export function AgentRegistryEditorPage() {
331
338
  var _this = this;
332
339
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
333
340
  var _t = useParams().id, id = _t === void 0 ? "new" : _t;
341
+ var searchParams = useSearchParams()[0];
334
342
  var navigate = useNavigate();
335
343
  var dispatch = useDispatch();
336
344
  var agentResult = entityApi.useGetSolidEntityByIdQuery({ id: id, qs: detailQuery }, { skip: id === "new" });
@@ -364,7 +372,7 @@ export function AgentRegistryEditorPage() {
364
372
  var deleteSecretLink = agentSecretApi.useDeleteSolidEntityMutation()[0];
365
373
  var updateSecretLink = agentSecretApi.useUpdateSolidEntityMutation()[0];
366
374
  var record = recordFrom(response);
367
- var _x = React.useState("basics"), tab = _x[0], setTab = _x[1];
375
+ var _x = React.useState(searchParams.get("tab") === "config-versions" ? "config-versions" : "basics"), tab = _x[0], setTab = _x[1];
368
376
  var jobs = jobApi.useGetSolidEntitiesQuery("offset=0&limit=1000&filters[agent][id][$eq]=".concat(encodeURIComponent(id), "&").concat(fieldsQuery(["id", "status"])), { skip: id === "new" || tab !== "jobs" });
369
377
  var refetch = function () {
370
378
  void agentResult.refetch();
@@ -373,9 +381,36 @@ export function AgentRegistryEditorPage() {
373
381
  if (tab === "jobs")
374
382
  void jobs.refetch();
375
383
  };
376
- var _y = React.useState(false), testAgentOpen = _y[0], setTestAgentOpen = _y[1];
384
+ var TEST_AGENT_PREFS_KEY = "solid-agent.test-dialog";
385
+ var readTestAgentPrefs = function (agentId) {
386
+ try {
387
+ var raw = localStorage.getItem("".concat(TEST_AGENT_PREFS_KEY, ".").concat(agentId !== null && agentId !== void 0 ? agentId : "global"));
388
+ if (raw) {
389
+ var parsed = JSON.parse(raw);
390
+ return {
391
+ open: parsed.open === true,
392
+ mode: parsed.mode === "maximized" ? "maximized" : "docked",
393
+ };
394
+ }
395
+ }
396
+ catch (_a) {
397
+ // ignore
398
+ }
399
+ return { open: false, mode: "docked" };
400
+ };
401
+ var writeTestAgentPrefs = function (agentId, prefs) {
402
+ try {
403
+ var key = "".concat(TEST_AGENT_PREFS_KEY, ".").concat(agentId !== null && agentId !== void 0 ? agentId : "global");
404
+ var current = readTestAgentPrefs(agentId);
405
+ localStorage.setItem(key, JSON.stringify(__assign(__assign({}, current), prefs)));
406
+ }
407
+ catch (_a) {
408
+ // ignore
409
+ }
410
+ };
411
+ var _y = React.useState(function () { return readTestAgentPrefs(id).open; }), testAgentOpen = _y[0], setTestAgentOpen = _y[1];
377
412
  var _z = React.useState(null), preview = _z[0], setPreview = _z[1];
378
- var _0 = React.useState("maximized"), testAgentWindowMode = _0[0], setTestAgentWindowMode = _0[1];
413
+ var _0 = React.useState(function () { return readTestAgentPrefs(id).mode; }), testAgentWindowMode = _0[0], setTestAgentWindowMode = _0[1];
379
414
  var _1 = React.useState(""), name = _1[0], setName = _1[1];
380
415
  var _2 = React.useState(""), title = _2[0], setTitle = _2[1];
381
416
  var _3 = React.useState(""), description = _3[0], setDescription = _3[1];
@@ -388,22 +423,58 @@ export function AgentRegistryEditorPage() {
388
423
  var _10 = React.useState(20), turnStepLimit = _10[0], setTurnStepLimit = _10[1];
389
424
  var _11 = React.useState(3), costLimit = _11[0], setCostLimit = _11[1];
390
425
  var _12 = React.useState([]), tags = _12[0], setTags = _12[1];
391
- var _13 = React.useState(false), creatingTag = _13[0], setCreatingTag = _13[1];
392
- var _14 = React.useState([]), skillIds = _14[0], setSkillIds = _14[1];
393
- var _15 = React.useState([]), toolIds = _15[0], setToolIds = _15[1];
394
- var _16 = React.useState([]), roleIds = _16[0], setRoleIds = _16[1];
395
- var _17 = React.useState([]), secretIds = _17[0], setSecretIds = _17[1];
396
- var _18 = React.useState({}), alwaysIncludeValues = _18[0], setAlwaysIncludeValues = _18[1];
397
- var _19 = React.useState({}), requiresApprovalValues = _19[0], setRequiresApprovalValues = _19[1];
398
- var _20 = React.useState({}), secretEnvVarNames = _20[0], setSecretEnvVarNames = _20[1];
399
- var _21 = React.useState(null), pendingSecret = _21[0], setPendingSecret = _21[1];
400
- var _22 = React.useState(""), secretEnvVarDraft = _22[0], setSecretEnvVarDraft = _22[1];
401
- var _23 = React.useState(""), secretEnvVarError = _23[0], setSecretEnvVarError = _23[1];
402
- var _24 = React.useState({}), errors = _24[0], setErrors = _24[1];
403
- var _25 = React.useState(0), auditVersion = _25[0], setAuditVersion = _25[1];
404
- var _26 = React.useState(false), confirmRefresh = _26[0], setConfirmRefresh = _26[1];
426
+ var _13 = React.useState(null), module = _13[0], setModule = _13[1];
427
+ var _14 = React.useState(false), creatingTag = _14[0], setCreatingTag = _14[1];
428
+ var _15 = React.useState([]), skillIds = _15[0], setSkillIds = _15[1];
429
+ var _16 = React.useState([]), toolIds = _16[0], setToolIds = _16[1];
430
+ var _17 = React.useState([]), roleIds = _17[0], setRoleIds = _17[1];
431
+ var _18 = React.useState([]), secretIds = _18[0], setSecretIds = _18[1];
432
+ var _19 = React.useState({}), alwaysIncludeValues = _19[0], setAlwaysIncludeValues = _19[1];
433
+ var _20 = React.useState({}), requiresApprovalValues = _20[0], setRequiresApprovalValues = _20[1];
434
+ var _21 = React.useState({}), secretEnvVarNames = _21[0], setSecretEnvVarNames = _21[1];
435
+ var _22 = React.useState(null), pendingSecret = _22[0], setPendingSecret = _22[1];
436
+ var _23 = React.useState(""), secretEnvVarDraft = _23[0], setSecretEnvVarDraft = _23[1];
437
+ var _24 = React.useState(""), secretEnvVarError = _24[0], setSecretEnvVarError = _24[1];
438
+ var _25 = React.useState({}), errors = _25[0], setErrors = _25[1];
439
+ var _26 = React.useState(0), auditVersion = _26[0], setAuditVersion = _26[1];
440
+ var _27 = React.useState(false), confirmRefresh = _27[0], setConfirmRefresh = _27[1];
441
+ var _28 = React.useState(false), activateDialogOpen = _28[0], setActivateDialogOpen = _28[1];
442
+ var _29 = React.useState(false), includeVersionDetails = _29[0], setIncludeVersionDetails = _29[1];
443
+ var _30 = React.useState(""), versionName = _30[0], setVersionName = _30[1];
444
+ var _31 = React.useState(""), versionDescription = _31[0], setVersionDescription = _31[1];
445
+ var _32 = React.useState(false), activating = _32[0], setActivating = _32[1];
446
+ var _33 = React.useState(function () { return id === "new" ? null : savedActivationReadyAt(id); }), activationReadyAt = _33[0], setActivationReadyAt = _33[1];
447
+ var _34 = React.useState(Date.now()), countdownNow = _34[0], setCountdownNow = _34[1];
405
448
  var baseline = React.useRef("");
406
- var currentForm = function () { return JSON.stringify({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags: tags, skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames }); };
449
+ React.useEffect(function () {
450
+ if (id === "new") {
451
+ setActivationReadyAt(null);
452
+ return;
453
+ }
454
+ var readyAt = savedActivationReadyAt(id);
455
+ setActivationReadyAt(readyAt !== null && readyAt > Date.now() ? readyAt : null);
456
+ if (readyAt !== null && readyAt <= Date.now())
457
+ sessionStorage.removeItem(activationWaitKey(id));
458
+ }, [id]);
459
+ React.useEffect(function () {
460
+ if (!activationReadyAt)
461
+ return;
462
+ var tick = function () {
463
+ var now = Date.now();
464
+ setCountdownNow(now);
465
+ if (now >= activationReadyAt) {
466
+ sessionStorage.removeItem(activationWaitKey(id));
467
+ setActivationReadyAt(null);
468
+ }
469
+ };
470
+ tick();
471
+ var timer = window.setInterval(tick, 100);
472
+ return function () { return window.clearInterval(timer); };
473
+ }, [activationReadyAt, id]);
474
+ var currentForm = function () {
475
+ var _a;
476
+ return JSON.stringify({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags: tags, moduleId: (_a = module === null || module === void 0 ? void 0 : module.id) !== null && _a !== void 0 ? _a : null, skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames });
477
+ };
407
478
  React.useEffect(function () {
408
479
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
409
480
  if (!record)
@@ -421,6 +492,7 @@ export function AgentRegistryEditorPage() {
421
492
  setTurnStepLimit((_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20);
422
493
  setCostLimit(Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3));
423
494
  setTags(agentHubTagsFrom(record.tags));
495
+ setModule(agentHubModuleFrom(record.module));
424
496
  setSkillIds(items(record.agentSkills).map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
425
497
  setToolIds(items(record.agentTools).map(function (link) { var _a; return (_a = link.agentToolRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
426
498
  setRoleIds(items(record.agentRoles).map(function (link) { var _a; return (_a = link.roleMetadata) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
@@ -438,11 +510,23 @@ export function AgentRegistryEditorPage() {
438
510
  return key;
439
511
  })));
440
512
  }, [record === null || record === void 0 ? void 0 : record.id, response]);
513
+ React.useEffect(function () {
514
+ if (!(record === null || record === void 0 ? void 0 : record.id))
515
+ return;
516
+ var prefs = readTestAgentPrefs(record.id);
517
+ if (prefs.open) {
518
+ setTestAgentOpen(true);
519
+ if (prefs.mode)
520
+ setTestAgentWindowMode(prefs.mode);
521
+ }
522
+ }, [record === null || record === void 0 ? void 0 : record.id]);
441
523
  var isDirty = Boolean(record === null || record === void 0 ? void 0 : record.id) && currentForm() !== baseline.current;
442
524
  var requestRefresh = function () { return isDirty ? setConfirmRefresh(true) : void refetch(); };
443
525
  var openAgentTest = function () {
444
- setTestAgentWindowMode("maximized");
526
+ var _a;
527
+ setTestAgentWindowMode("docked");
445
528
  setTestAgentOpen(true);
529
+ writeTestAgentPrefs((_a = record === null || record === void 0 ? void 0 : record.id) !== null && _a !== void 0 ? _a : id, { open: true, mode: "docked" });
446
530
  };
447
531
  React.useEffect(function () {
448
532
  var refresh = function () { skills.refetch(); tools.refetch(); };
@@ -454,7 +538,7 @@ export function AgentRegistryEditorPage() {
454
538
  try {
455
539
  aiConfig = (_a = (typeof configValue === "string" ? JSON.parse(configValue) : configValue)) !== null && _a !== void 0 ? _a : {};
456
540
  }
457
- catch ( /* Invalid configuration has no enabled providers. */_27) { /* Invalid configuration has no enabled providers. */ }
541
+ catch ( /* Invalid configuration has no enabled providers. */_35) { /* Invalid configuration has no enabled providers. */ }
458
542
  var modelsCatalog = useModelsDevCatalog().catalog;
459
543
  var savedModelKeys = [record === null || record === void 0 ? void 0 : record.reasoningModelKey, record === null || record === void 0 ? void 0 : record.fastModelKey].filter(function (key) { return !!key; });
460
544
  var modelOptions = buildModelOptions((_b = aiConfig.providers) !== null && _b !== void 0 ? _b : {}, { Reasoning: (_d = (_c = aiConfig.models) === null || _c === void 0 ? void 0 : _c.default) !== null && _d !== void 0 ? _d : (_e = aiConfig.models) === null || _e === void 0 ? void 0 : _e.main, Fast: (_f = aiConfig.models) === null || _f === void 0 ? void 0 : _f.fast }, modelsCatalog, savedModelKeys);
@@ -502,15 +586,15 @@ export function AgentRegistryEditorPage() {
502
586
  case 4:
503
587
  _loop_1 = function (targetId) {
504
588
  var values, existing;
505
- var _d;
506
- return __generator(this, function (_e) {
507
- switch (_e.label) {
589
+ var _d, _e;
590
+ return __generator(this, function (_f) {
591
+ switch (_f.label) {
508
592
  case 0:
509
593
  values = typeof extra === "function" ? extra(targetId) : extra;
510
594
  if (!!oldIds.includes(targetId)) return [3 /*break*/, 2];
511
595
  return [4 /*yield*/, create(__assign((_d = { agentRegistryId: agentId }, _d["".concat(field, "Id")] = targetId, _d), values)).unwrap()];
512
596
  case 1:
513
- _e.sent();
597
+ _f.sent();
514
598
  return [2 /*return*/, "continue"];
515
599
  case 2:
516
600
  existing = links.find(function (link) { var _a; return ((_a = link[field]) === null || _a === void 0 ? void 0 : _a.id) === targetId; });
@@ -518,10 +602,10 @@ export function AgentRegistryEditorPage() {
518
602
  var key = _a[0], value = _a[1];
519
603
  return existing[key] !== value;
520
604
  }))) return [3 /*break*/, 4];
521
- return [4 /*yield*/, update({ id: existing.id, data: values }).unwrap()];
605
+ return [4 /*yield*/, update({ id: existing.id, data: __assign((_e = { agentRegistryId: agentId }, _e["".concat(field, "Id")] = targetId, _e), values) }).unwrap()];
522
606
  case 3:
523
- _e.sent();
524
- _e.label = 4;
607
+ _f.sent();
608
+ _f.label = 4;
525
609
  case 4: return [2 /*return*/];
526
610
  }
527
611
  });
@@ -543,99 +627,124 @@ export function AgentRegistryEditorPage() {
543
627
  });
544
628
  });
545
629
  };
546
- var save = function (nextStatus) { return __awaiter(_this, void 0, void 0, function () {
547
- var next, normalizedInputs, payload, newlyCreatedId, scalarSaved, result, _a, savedId, error_1;
548
- var _b, _c, _d;
549
- return __generator(this, function (_e) {
550
- switch (_e.label) {
551
- case 0:
552
- if (creatingTag)
553
- return [2 /*return*/];
554
- next = {};
555
- if (!name.trim())
556
- next.name = "Name is required.";
557
- if (!title.trim())
558
- next.title = "Title is required.";
559
- if (!systemPrompt.trim())
560
- next.systemPrompt = "Persona instructions are required.";
561
- if (!isValidModelKey(reasoningModelKey))
562
- next.reasoningModelKey = "Choose an enabled reasoning provider and model.";
563
- if (!isValidModelKey(fastModelKey))
564
- next.fastModelKey = "Choose an enabled fast provider and model.";
565
- if (inputs.some(function (input) { return !input.name.trim() || !input.dataType; }))
566
- next.inputs = "Each input needs a name and data type.";
567
- if (new Set(inputs.map(function (input) { return input.name.trim().toLowerCase(); })).size !== inputs.length)
568
- next.inputs = "Input names must be unique.";
569
- if (stepLimit < 1 || turnStepLimit < 1 || costLimit < 0)
570
- next.limits = "Step limits must be positive and cost limit cannot be negative.";
571
- setErrors(next);
572
- if (Object.keys(next).length) {
573
- setTab(next.systemPrompt ? "persona" : next.limits ? "policies" : "basics");
574
- dispatch(showToast({ severity: "error", summary: "Missing information", detail: Object.values(next).join(" ") }));
575
- return [2 /*return*/];
576
- }
577
- try {
578
- normalizedInputs = inputs.map(function (input) { return (__assign(__assign({}, input), { name: input.name.trim(), description: input.description.trim(), defaultValue: input.defaultValue === "" || input.defaultValue == null ? null : parseDefaultValue(String(input.defaultValue), input.dataType) })); });
579
- }
580
- catch (error) {
581
- next.inputs = error instanceof Error ? error.message : "Check the default input values.";
630
+ var save = function (nextStatus, versionDetails) {
631
+ if (versionDetails === void 0) { versionDetails = {}; }
632
+ return __awaiter(_this, void 0, void 0, function () {
633
+ var next, normalizedInputs, payload, newlyCreatedId, scalarSaved, activationAttempted, result, _a, savedId, readyAt, error_1;
634
+ var _b, _c, _d;
635
+ return __generator(this, function (_e) {
636
+ switch (_e.label) {
637
+ case 0:
638
+ if (nextStatus === "active" && activationReadyAt && Date.now() < activationReadyAt)
639
+ return [2 /*return*/, false];
640
+ if (creatingTag)
641
+ return [2 /*return*/, false];
642
+ next = {};
643
+ if (!name.trim())
644
+ next.name = "Name is required.";
645
+ if (!title.trim())
646
+ next.title = "Title is required.";
647
+ if (!module)
648
+ next.module = "Module is required. Select a module before saving this agent.";
649
+ if (!systemPrompt.trim())
650
+ next.systemPrompt = "Persona instructions are required.";
651
+ if (!isValidModelKey(reasoningModelKey))
652
+ next.reasoningModelKey = "Choose an enabled reasoning provider and model.";
653
+ if (!isValidModelKey(fastModelKey))
654
+ next.fastModelKey = "Choose an enabled fast provider and model.";
655
+ if (inputs.some(function (input) { return !input.name.trim() || !input.dataType; }))
656
+ next.inputs = "Each input needs a name and data type.";
657
+ if (new Set(inputs.map(function (input) { return input.name.trim().toLowerCase(); })).size !== inputs.length)
658
+ next.inputs = "Input names must be unique.";
659
+ if (stepLimit < 1 || turnStepLimit < 1 || costLimit < 0)
660
+ next.limits = "Step limits must be positive and cost limit cannot be negative.";
582
661
  setErrors(next);
583
- setTab("basics");
584
- return [2 /*return*/];
585
- }
586
- payload = __assign(__assign({ name: name.trim(), title: title.trim(), description: description.trim(), iconName: iconName, requiredInputs: JSON.stringify(normalizedInputs), reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit) }, agentHubTagsPayload(tags)), { status: (_b = nextStatus !== null && nextStatus !== void 0 ? nextStatus : record === null || record === void 0 ? void 0 : record.status) !== null && _b !== void 0 ? _b : "draft" });
587
- scalarSaved = false;
588
- _e.label = 1;
589
- case 1:
590
- _e.trys.push([1, 10, , 11]);
591
- if (!(record === null || record === void 0 ? void 0 : record.id)) return [3 /*break*/, 3];
592
- return [4 /*yield*/, updateAgent({ id: record.id, data: payload }).unwrap()];
593
- case 2:
594
- _a = _e.sent();
595
- return [3 /*break*/, 5];
596
- case 3: return [4 /*yield*/, createAgent(payload).unwrap()];
597
- case 4:
598
- _a = _e.sent();
599
- _e.label = 5;
600
- case 5:
601
- result = _a;
602
- scalarSaved = true;
603
- savedId = Number((_c = record === null || record === void 0 ? void 0 : record.id) !== null && _c !== void 0 ? _c : (_d = recordFrom(result)) === null || _d === void 0 ? void 0 : _d.id);
604
- if (!savedId)
605
- throw new Error("Agent saved, but its ID was not returned.");
606
- if (!(record === null || record === void 0 ? void 0 : record.id))
607
- newlyCreatedId = savedId;
608
- return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSkills, skillIds, "agentSkillRegistry", createSkillLink, deleteSkillLink, updateSkillLink, function (targetId) { var _a; return ({ alwaysInclude: (_a = alwaysIncludeValues[targetId]) !== null && _a !== void 0 ? _a : true }); })];
609
- case 6:
610
- _e.sent();
611
- return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentTools, toolIds, "agentToolRegistry", createToolLink, deleteToolLink, updateToolLink, function (targetId) { var _a; return ({ requiresApproval: (_a = requiresApprovalValues[targetId]) !== null && _a !== void 0 ? _a : false }); })];
612
- case 7:
613
- _e.sent();
614
- return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentRoles, roleIds, "roleMetadata", createRoleLink, deleteRoleLink, undefined)];
615
- case 8:
616
- _e.sent();
617
- return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSecrets, secretIds, "secret", createSecretLink, deleteSecretLink, updateSecretLink, function (targetId) { var _a; return ({ envVarName: (_a = secretEnvVarNames[targetId]) !== null && _a !== void 0 ? _a : "" }); })];
618
- case 9:
619
- _e.sent();
620
- dispatch(showToast({ severity: "success", summary: nextStatus ? "Agent status updated" : "Saved", detail: nextStatus ? "Agent moved to ".concat(nextStatus, ".") : "Agent and its associations saved." }));
621
- setAuditVersion(function (version) { return version + 1; });
622
- if (record === null || record === void 0 ? void 0 : record.id)
623
- refetch();
624
- else
625
- navigate("/admin/core/solid-core/agent-registry/editor/".concat(savedId), { replace: true });
626
- return [3 /*break*/, 11];
627
- case 10:
628
- error_1 = _e.sent();
629
- dispatch(showToast({ severity: "error", summary: scalarSaved ? "Agent saved; links incomplete" : "Save failed", detail: apiError(error_1) }));
630
- if (record === null || record === void 0 ? void 0 : record.id)
631
- refetch();
632
- else if (newlyCreatedId)
633
- navigate("/admin/core/solid-core/agent-registry/editor/".concat(newlyCreatedId), { replace: true });
634
- return [3 /*break*/, 11];
635
- case 11: return [2 /*return*/];
636
- }
662
+ if (Object.keys(next).length) {
663
+ setTab(next.systemPrompt ? "persona" : next.limits ? "policies" : "basics");
664
+ dispatch(showToast({ severity: "error", summary: "Missing information", detail: Object.values(next).join(" ") }));
665
+ return [2 /*return*/, false];
666
+ }
667
+ try {
668
+ normalizedInputs = inputs.map(function (input) { return (__assign(__assign({}, input), { name: input.name.trim(), description: input.description.trim(), defaultValue: input.defaultValue === "" || input.defaultValue == null ? null : parseDefaultValue(String(input.defaultValue), input.dataType) })); });
669
+ }
670
+ catch (error) {
671
+ next.inputs = error instanceof Error ? error.message : "Check the default input values.";
672
+ setErrors(next);
673
+ setTab("basics");
674
+ return [2 /*return*/, false];
675
+ }
676
+ payload = __assign(__assign(__assign({ name: name.trim(), title: title.trim(), description: description.trim(), iconName: iconName, requiredInputs: JSON.stringify(normalizedInputs), reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit) }, agentHubTagsPayload(tags)), agentHubModulePayload(module)), { status: nextStatus === "active" ? (_b = record === null || record === void 0 ? void 0 : record.status) !== null && _b !== void 0 ? _b : "draft" : nextStatus !== null && nextStatus !== void 0 ? nextStatus : "draft" });
677
+ scalarSaved = false;
678
+ activationAttempted = false;
679
+ _e.label = 1;
680
+ case 1:
681
+ _e.trys.push([1, 12, , 13]);
682
+ if (!(record === null || record === void 0 ? void 0 : record.id)) return [3 /*break*/, 3];
683
+ return [4 /*yield*/, updateAgent({ id: record.id, data: payload }).unwrap()];
684
+ case 2:
685
+ _a = _e.sent();
686
+ return [3 /*break*/, 5];
687
+ case 3: return [4 /*yield*/, createAgent(payload).unwrap()];
688
+ case 4:
689
+ _a = _e.sent();
690
+ _e.label = 5;
691
+ case 5:
692
+ result = _a;
693
+ scalarSaved = true;
694
+ savedId = Number((_c = record === null || record === void 0 ? void 0 : record.id) !== null && _c !== void 0 ? _c : (_d = recordFrom(result)) === null || _d === void 0 ? void 0 : _d.id);
695
+ if (!savedId)
696
+ throw new Error("Agent saved, but its ID was not returned.");
697
+ if (!(record === null || record === void 0 ? void 0 : record.id))
698
+ newlyCreatedId = savedId;
699
+ return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSkills, skillIds, "agentSkillRegistry", createSkillLink, deleteSkillLink, updateSkillLink, function (targetId) { var _a; return ({ alwaysInclude: (_a = alwaysIncludeValues[targetId]) !== null && _a !== void 0 ? _a : true }); })];
700
+ case 6:
701
+ _e.sent();
702
+ return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentTools, toolIds, "agentToolRegistry", createToolLink, deleteToolLink, updateToolLink, function (targetId) { var _a; return ({ requiresApproval: (_a = requiresApprovalValues[targetId]) !== null && _a !== void 0 ? _a : false }); })];
703
+ case 7:
704
+ _e.sent();
705
+ return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentRoles, roleIds, "roleMetadata", createRoleLink, deleteRoleLink, undefined)];
706
+ case 8:
707
+ _e.sent();
708
+ return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSecrets, secretIds, "secret", createSecretLink, deleteSecretLink, updateSecretLink, function (targetId) { var _a; return ({ envVarName: (_a = secretEnvVarNames[targetId]) !== null && _a !== void 0 ? _a : "" }); })];
709
+ case 9:
710
+ _e.sent();
711
+ if (!(nextStatus === "active")) return [3 /*break*/, 11];
712
+ activationAttempted = true;
713
+ return [4 /*yield*/, solidPost("/agent-registry/".concat(savedId, "/activate"), versionDetails)];
714
+ case 10:
715
+ _e.sent();
716
+ _e.label = 11;
717
+ case 11:
718
+ if (!nextStatus || nextStatus === "draft") {
719
+ readyAt = Date.now() + ACTIVATION_WAIT_MS;
720
+ sessionStorage.setItem(activationWaitKey(savedId), String(readyAt));
721
+ setCountdownNow(Date.now());
722
+ setActivationReadyAt(readyAt);
723
+ }
724
+ else {
725
+ sessionStorage.removeItem(activationWaitKey(savedId));
726
+ setActivationReadyAt(null);
727
+ }
728
+ dispatch(showToast({ severity: "success", summary: nextStatus === "active" ? "Agent activated" : nextStatus ? "Agent status updated" : "Saved", detail: nextStatus === "active" ? "A new config version was created and the agent was activated." : nextStatus ? "Agent moved to ".concat(nextStatus, ".") : "Agent and its associations saved." }));
729
+ setAuditVersion(function (version) { return version + 1; });
730
+ if (record === null || record === void 0 ? void 0 : record.id)
731
+ refetch();
732
+ else
733
+ navigate("/admin/core/solid-core/agent-registry/editor/".concat(savedId), { replace: true });
734
+ return [2 /*return*/, true];
735
+ case 12:
736
+ error_1 = _e.sent();
737
+ dispatch(showToast({ severity: "error", summary: activationAttempted ? "Agent saved; activation failed" : scalarSaved ? "Agent saved; links incomplete" : "Save failed", detail: apiError(error_1) }));
738
+ if (record === null || record === void 0 ? void 0 : record.id)
739
+ refetch();
740
+ else if (newlyCreatedId)
741
+ navigate("/admin/core/solid-core/agent-registry/editor/".concat(newlyCreatedId), { replace: true });
742
+ return [2 /*return*/, false];
743
+ case 13: return [2 /*return*/];
744
+ }
745
+ });
637
746
  });
638
- }); };
747
+ };
639
748
  var field = function (label, value, setValue, key, required) {
640
749
  if (required === void 0) { required = false; }
641
750
  return _jsxs("label", { className: "agent-editor__field", children: [_jsxs("span", { children: [label, required && " *"] }), _jsx(SolidInput, { value: value, "aria-invalid": Boolean(errors[key]), onChange: function (event) { setValue(event.target.value); setErrors(function (current) {
@@ -690,8 +799,11 @@ export function AgentRegistryEditorPage() {
690
799
  return _jsxs("label", { className: "agent-editor__link-setting", children: [_jsx("input", { type: "checkbox", checked: checked, onChange: function (event) { return onChange(event.target.checked); } }), _jsxs("span", { children: [_jsx("strong", { children: label }), _jsx("small", { children: hint })] })] });
691
800
  };
692
801
  var agentStatus = (_h = record === null || record === void 0 ? void 0 : record.status) !== null && _h !== void 0 ? _h : "draft";
693
- var tabs = __spreadArray(__spreadArray(__spreadArray(__spreadArray([
694
- { value: "basics", label: "Basics", content: _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__grid", children: [field("Name", name, setName, "name", true), field("Title", title, setTitle, "title", true), field("Description", description, setDescription, "description"), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Icon" }), _jsx(SolidIconPicker, { value: iconName, onChange: setIconName })] })] }), _jsx(AgentHubTagsField, { value: tags, onChange: setTags, disabled: creating || updating || isLoading || isFetching || isError, onBusyChange: setCreatingTag }), _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "Inputs" }), _jsx("p", { children: "Define the variables this agent can use. Mark inputs optional or provide a default value when people do not need to enter them." })] }), inputs.length > 0 && _jsxs(SolidButton, { type: "button", variant: "secondary", size: "small", onClick: function () { return setInputs(function (current) { return __spreadArray(__spreadArray([], current, true), [{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }], false); }); }, children: [_jsx(Plus, { size: 15 }), " Add input"] })] }), !inputs.length ? _jsxs("div", { className: "agent-editor__empty", children: ["This agent has no inputs. ", _jsxs("button", { type: "button", onClick: function () { return setInputs([{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }]); }, children: [_jsx(Plus, { size: 15 }), " Add an input variable"] })] })
802
+ var activationRemainingMs = Math.max(0, (activationReadyAt !== null && activationReadyAt !== void 0 ? activationReadyAt : 0) - countdownNow);
803
+ var activationRemainingSeconds = Math.ceil(activationRemainingMs / 1000);
804
+ var activationWaiting = agentStatus === "draft" && activationRemainingSeconds > 0;
805
+ var tabs = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
806
+ { value: "basics", label: "Basics", content: _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__grid", children: [field("Name", name, setName, "name", true), field("Title", title, setTitle, "title", true), field("Description", description, setDescription, "description"), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Icon" }), _jsx(SolidIconPicker, { value: iconName, onChange: setIconName })] }), _jsx(AgentHubModuleField, { className: "agent-editor__field", value: module, onChange: function (value) { setModule(value); setErrors(function (current) { return (__assign(__assign({}, current), { module: "" })); }); }, disabled: creating || updating || isLoading || isFetching || isError, clearable: false, required: true, error: errors.module })] }), _jsx(AgentHubTagsField, { value: tags, onChange: setTags, module: module, disabled: creating || updating || isLoading || isFetching || isError, onBusyChange: setCreatingTag }), _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "Inputs" }), _jsx("p", { children: "Define the variables this agent can use. Mark inputs optional or provide a default value when people do not need to enter them." })] }), inputs.length > 0 && _jsxs(SolidButton, { type: "button", variant: "secondary", size: "small", onClick: function () { return setInputs(function (current) { return __spreadArray(__spreadArray([], current, true), [{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }], false); }); }, children: [_jsx(Plus, { size: 15 }), " Add input"] })] }), !inputs.length ? _jsxs("div", { className: "agent-editor__empty", children: ["This agent has no inputs. ", _jsxs("button", { type: "button", onClick: function () { return setInputs([{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }]); }, children: [_jsx(Plus, { size: 15 }), " Add an input variable"] })] })
695
807
  : _jsx("div", { className: "agent-editor__inputs", children: inputs.map(function (input, index) { return _jsxs("div", { className: "agent-editor__input-row", children: [_jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " name"), placeholder: "Variable name", value: input.name, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { name: event.target.value }) : item; }); }); } }), _jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " description"), placeholder: "Description", value: input.description, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { description: event.target.value }) : item; }); }); } }), _jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " default value"), placeholder: "Default value", value: formatDefaultValue(input.defaultValue), onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { defaultValue: event.target.value }) : item; }); }); } }), _jsx("select", { "aria-label": "Input ".concat(index + 1, " data type"), value: input.dataType, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { dataType: event.target.value }) : item; }); }); }, children: ["string", "number", "integer", "boolean", "date", "datetime", "object", "array"].map(function (type) { return _jsx("option", { value: type, children: type }, type); }) }), _jsxs("label", { className: "agent-editor__input-optional", children: [_jsx("input", { type: "checkbox", checked: input.optional, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { optional: event.target.checked }) : item; }); }); } }), " Optional"] }), _jsx("button", { type: "button", "aria-label": "Remove input ".concat(index + 1), onClick: function () { return setInputs(function (current) { return current.filter(function (_, i) { return i !== index; }); }); }, children: _jsx(Trash2, { size: 17 }) })] }, index); }) }), errors.inputs && _jsx("small", { className: "agent-editor__error", children: errors.inputs })] }), _jsxs("section", { className: "agent-editor__section agent-editor__models", children: [_jsx("h2", { children: "Models" }), _jsx("p", { children: "Choose a configured provider and model for each role. Select Other to enter a model ID manually." }), _jsx("div", { className: "agent-editor__grid", children: [["Reasoning model", reasoningModelKey, setReasoningModelKey, "reasoningModelKey"], ["Fast model", fastModelKey, setFastModelKey, "fastModelKey"]].map(function (_a) {
696
808
  var _b;
697
809
  var label = _a[0], value = _a[1], setter = _a[2], key = _a[3];
@@ -704,9 +816,18 @@ export function AgentRegistryEditorPage() {
704
816
  ["disabled", "Disabled", "Unavailable for new interactions."],
705
817
  ].map(function (_a, index) {
706
818
  var value = _a[0], label = _a[1], description = _a[2];
707
- return _jsxs(React.Fragment, { children: [index > 0 && _jsx("div", { className: "agent-editor__workflow-connector", "aria-hidden": "true" }), _jsxs("button", { type: "button", className: "agent-editor__workflow-stage".concat(agentStatus === value ? " is-current" : ""), "aria-current": agentStatus === value ? "step" : undefined, "aria-pressed": agentStatus === value, disabled: creating || updating || agentStatus === value, onClick: function () { return void save(value); }, children: [_jsx("span", { className: "agent-editor__workflow-stage-mark", children: index + 1 }), _jsxs("div", { className: "agent-editor__workflow-stage-copy", children: [_jsx("strong", { children: label }), _jsx("small", { children: description }), _jsx("small", { className: "agent-editor__workflow-stage-cta", children: agentStatus === value ? "Current stage" : "Click to move to this stage" })] }), agentStatus === value && _jsx("span", { className: "agent-editor__workflow-current", children: "Current" })] })] }, value);
819
+ return _jsxs(React.Fragment, { children: [index > 0 && _jsx("div", { className: "agent-editor__workflow-connector", "aria-hidden": "true" }), _jsxs("button", { type: "button", className: "agent-editor__workflow-stage".concat(agentStatus === value ? " is-current" : ""), "aria-current": agentStatus === value ? "step" : undefined, "aria-pressed": agentStatus === value, disabled: creating || updating || activating || agentStatus === value || (value === "active" && activationWaiting), onClick: function () {
820
+ if (value === "active") {
821
+ setIncludeVersionDetails(false);
822
+ setVersionName("");
823
+ setVersionDescription("");
824
+ setActivateDialogOpen(true);
825
+ }
826
+ else
827
+ void save(value);
828
+ }, children: [value === "active" && activationWaiting ? _jsxs("span", { className: "agent-editor__activation-countdown", "aria-label": "Active available in ".concat(activationRemainingSeconds, " seconds"), children: [_jsxs("svg", { viewBox: "0 0 36 36", "aria-hidden": "true", children: [_jsx("circle", { className: "agent-editor__activation-countdown-track", cx: "18", cy: "18", r: "15" }), _jsx("circle", { className: "agent-editor__activation-countdown-progress", cx: "18", cy: "18", r: "15", pathLength: "100", strokeDasharray: "100", strokeDashoffset: 100 - activationRemainingMs / ACTIVATION_WAIT_MS * 100 })] }), _jsx("span", { children: activationRemainingSeconds })] }) : _jsx("span", { className: "agent-editor__workflow-stage-mark", children: index + 1 }), _jsxs("div", { className: "agent-editor__workflow-stage-copy", children: [_jsx("strong", { children: label }), _jsx("small", { children: description }), _jsx("small", { className: "agent-editor__workflow-stage-cta", children: agentStatus === value ? "Current stage" : value === "active" && activationWaiting ? "Available in ".concat(activationRemainingSeconds, "s") : "Click to move to this stage" })] }), agentStatus === value && _jsx("span", { className: "agent-editor__workflow-current", children: "Current" })] })] }, value);
708
829
  }) }), _jsx("small", { className: "agent-editor__workflow-save-hint", children: "Changing stage saves the current form and its linked skills, tools, roles, and secrets." })] })] }) },
709
- { value: "persona", label: "Persona", content: _jsxs("section", { className: "agent-editor__section agent-editor__persona", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "System prompt *" }), _jsx("p", { children: "Describe the agent's role, behavior, and instructions in Markdown." })] }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(AgentPersonaHistory, { agentId: record.id, savedPrompt: (_j = record.systemPrompt) !== null && _j !== void 0 ? _j : "", refreshVersion: auditVersion })] }), _jsx(SolidCodeEditor, { value: systemPrompt, onChange: function (value) { setSystemPrompt(value !== null && value !== void 0 ? value : ""); setErrors(function (current) { return (__assign(__assign({}, current), { systemPrompt: "" })); }); }, language: "markdown", fontSize: 11, height: "max(34rem, calc(100dvh - 18rem))" }), errors.systemPrompt && _jsx("small", { className: "agent-editor__error", children: errors.systemPrompt })] }) },
830
+ { value: "persona", label: "System Prompt", content: _jsxs("section", { className: "agent-editor__section agent-editor__persona", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "System prompt *" }), _jsx("p", { children: "Describe the agent's role, behavior, and instructions in Markdown." })] }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(AgentPersonaHistory, { agentId: record.id, savedPrompt: (_j = record.systemPrompt) !== null && _j !== void 0 ? _j : "", refreshVersion: auditVersion })] }), _jsx(SolidCodeEditor, { value: systemPrompt, onChange: function (value) { setSystemPrompt(value !== null && value !== void 0 ? value : ""); setErrors(function (current) { return (__assign(__assign({}, current), { systemPrompt: "" })); }); }, language: "markdown", wordWrap: "on", fontSize: 11, height: "max(34rem, calc(100dvh - 18rem))" }), errors.systemPrompt && _jsx("small", { className: "agent-editor__error", children: errors.systemPrompt })] }) },
710
831
  { value: "skills", label: "Skills", content: _jsx(LinkPicker, { label: "Skills", description: "Skills available to this agent.", options: skills.records, selected: linked(skillIds, skills.records, items(record === null || record === void 0 ? void 0 : record.agentSkills).map(function (link) { return link.agentSkillRegistry; }).filter(Boolean)), onAdd: function (id) { return toggle(setSkillIds, id); }, onRemove: function (id) { return toggle(setSkillIds, id); }, createUrl: "/admin/core/solid-core/agent-skill-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "skill" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-skill-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentSkills, "agentSkillRegistry", id); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
711
832
  var _a;
712
833
  return _jsx("div", { className: "agent-editor__link-settings", children: linkSetting("Always include", (_a = alwaysIncludeValues[item.id]) !== null && _a !== void 0 ? _a : true, function (checked) { return setAlwaysIncludeValues(function (current) {
@@ -741,15 +862,43 @@ export function AgentRegistryEditorPage() {
741
862
  : jobs.isError ? _jsx("div", { className: "agent-editor__empty", children: "Jobs could not be loaded." })
742
863
  : items(related).length ? _jsx("div", { className: "agent-editor__related", children: items(related).map(function (item) { var _a, _b, _c; return _jsxs("article", { children: [_jsx("strong", { children: (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.title) !== null && _b !== void 0 ? _b : "#".concat(item.id) }), _jsx("span", { children: (_c = item.status) !== null && _c !== void 0 ? _c : "" })] }, item.id); }) })
743
864
  : _jsxs("div", { className: "agent-editor__empty", children: ["No ", label.toLowerCase(), " for this agent yet."] })] }) });
744
- }), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "sessions", label: "Sessions", content: _jsx(AgentSessionsPanel, { agentId: record.id, agentLabel: (_m = record.name) !== null && _m !== void 0 ? _m : record.title }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "embedding", label: "Embedding", content: _jsx(AgentEmbeddingPanel, { agentId: record.id, fields: parseInputs(record.requiredInputs), active: record.status === "active", hubUrl: String((_o = getSettingsMap(settings).solidxAgentHubBackendUrl) !== null && _o !== void 0 ? _o : "") }) }] : []), true);
865
+ }), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "sessions", label: "Sessions", content: _jsx(AgentSessionsPanel, { agentId: record.id, agentLabel: (_m = record.name) !== null && _m !== void 0 ? _m : record.title }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "config-versions", label: "Config versions", content: _jsx(AgentConfigVersionsPanel, { agentId: record.id, active: tab === "config-versions" }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "embedding", label: "Embedding", content: _jsx(AgentEmbeddingPanel, { agentId: record.id, fields: parseInputs(record.requiredInputs), active: record.status === "active", hubUrl: String((_o = getSettingsMap(settings).solidxAgentHubBackendUrl) !== null && _o !== void 0 ? _o : "") }) }] : []), true);
745
866
  var content = _jsx(SolidTabGroup, { tabs: tabs, value: tab, onValueChange: setTab, className: "agent-editor__tabs", listClassName: "agent-editor__tab-list", panelClassName: "agent-editor__tab-panel" });
746
- return _jsxs("main", { className: "agent-editor", children: [_jsxs("header", { className: "agent-editor__header", children: [_jsxs("div", { className: "agent-editor__heading-with-refresh", children: [_jsx("h1", { children: (record === null || record === void 0 ? void 0 : record.id) ? "Edit Agent" : "Create Agent" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx("button", { type: "button", className: "agent-editor__refresh".concat(isFetching ? " is-loading" : ""), "aria-label": "Refresh agent", title: "Refresh agent", disabled: isFetching || updating, onClick: requestRefresh, children: _jsx(RefreshCw, { size: 14 }) })] }), _jsxs("div", { className: "agent-editor__actions", children: [_jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () { return navigate(-1); }, children: "Back" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(FlaskConical, { size: 16 }), onClick: openAgentTest, children: "Test Agent" }), _jsx(SolidButton, { loading: creating || updating, disabled: creatingTag || isLoading || isFetching || isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)), onClick: function () { return void save(); }, children: "Save Agent" })] })] }), preview && _jsx(ResourcePreviewDialog, { item: preview.item, kind: preview.kind, onClose: function () { return setPreview(null); } }), _jsx(SolidDialog, { open: confirmRefresh, onOpenChange: setConfirmRefresh, header: "Discard unsaved changes?", style: { width: "min(28rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { return setConfirmRefresh(false); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: isFetching, onClick: function () { setConfirmRefresh(false); void refetch(); }, children: "Refresh and discard" })] }), children: _jsx(SolidDialogBody, { children: _jsx("p", { children: "You have unsaved changes. Refreshing will discard them and load the latest agent content." }) }) }), isLoading ? _jsx("div", { className: "agent-editor__empty", children: "Loading agent\u2026" }) : isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)) ?
867
+ return _jsxs("main", { className: "agent-editor", children: [_jsxs("header", { className: "agent-editor__header", children: [_jsxs("div", { className: "agent-editor__heading-with-refresh", children: [_jsx("h1", { children: (record === null || record === void 0 ? void 0 : record.id) ? "Edit Agent" : "Create Agent" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx("button", { type: "button", className: "agent-editor__refresh".concat(isFetching ? " is-loading" : ""), "aria-label": "Refresh agent", title: "Refresh agent", disabled: isFetching || updating, onClick: requestRefresh, children: _jsx(RefreshCw, { size: 14 }) })] }), _jsxs("div", { className: "agent-editor__actions", children: [_jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () { return navigate(-1); }, children: "Back" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(FlaskConical, { size: 16 }), onClick: openAgentTest, children: "Test Agent" }), _jsx(SolidButton, { loading: creating || updating, disabled: creatingTag || isLoading || isFetching || isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)), onClick: function () { return void save(); }, children: "Save Agent" })] })] }), preview && _jsx(ResourcePreviewDialog, { item: preview.item, kind: preview.kind, onClose: function () { return setPreview(null); } }), _jsx(SolidDialog, { open: confirmRefresh, onOpenChange: setConfirmRefresh, header: "Discard unsaved changes?", style: { width: "min(28rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { return setConfirmRefresh(false); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: isFetching, onClick: function () { setConfirmRefresh(false); void refetch(); }, children: "Refresh and discard" })] }), children: _jsx(SolidDialogBody, { children: _jsx("p", { children: "You have unsaved changes. Refreshing will discard them and load the latest agent content." }) }) }), _jsx(SolidDialog, { open: activateDialogOpen, onOpenChange: function (open) { if (!activating)
868
+ setActivateDialogOpen(open); }, header: "Activate agent with a new config version?", style: { width: "min(34rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", disabled: activating, onClick: function () { return setActivateDialogOpen(false); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", loading: activating || creating || updating, disabled: creatingTag || creating || updating || activating || activationWaiting, onClick: function () { return __awaiter(_this, void 0, void 0, function () {
869
+ var saved;
870
+ return __generator(this, function (_a) {
871
+ switch (_a.label) {
872
+ case 0:
873
+ setActivating(true);
874
+ return [4 /*yield*/, save("active", includeVersionDetails ? { name: versionName.trim(), description: versionDescription.trim() } : {})];
875
+ case 1:
876
+ saved = _a.sent();
877
+ setActivating(false);
878
+ if (saved)
879
+ setActivateDialogOpen(false);
880
+ return [2 /*return*/];
881
+ }
882
+ });
883
+ }); }, children: "Create version and activate" })] }), children: _jsx(SolidDialogBody, { children: _jsxs("div", { className: "agent-editor__activation-dialog", children: [_jsxs("div", { className: "agent-editor__activation-intro", children: [_jsx("span", { className: "agent-editor__activation-icon", children: _jsx(GitBranch, { size: 18 }) }), _jsxs("div", { children: [_jsx("strong", { children: "A new config version will be created" }), _jsx("p", { children: "Activating saves this agent as the next version and makes it available to users." })] })] }), _jsxs("label", { className: "agent-editor__version-details-toggle".concat(includeVersionDetails ? " is-selected" : ""), children: [_jsx("input", { type: "checkbox", checked: includeVersionDetails, onChange: function (event) { return setIncludeVersionDetails(event.target.checked); } }), _jsxs("span", { className: "agent-editor__version-details-copy", children: [_jsx("strong", { children: "Add a name and description" }), _jsx("small", { children: "Optional details help identify this version later." })] })] }), includeVersionDetails && _jsxs("div", { className: "agent-editor__version-details-fields", children: [_jsxs("label", { className: "agent-editor__field", children: [_jsxs("span", { children: ["Version name ", _jsx("small", { children: "Optional" })] }), _jsx(SolidInput, { autoFocus: true, placeholder: "e.g. Updated support workflow", value: versionName, onChange: function (event) { return setVersionName(event.target.value); } })] }), _jsxs("label", { className: "agent-editor__field", children: [_jsxs("span", { children: ["Description ", _jsx("small", { children: "Optional" })] }), _jsx("textarea", { placeholder: "What changed in this version?", value: versionDescription, rows: 3, onChange: function (event) { return setVersionDescription(event.target.value); } })] })] })] }) }) }), isLoading ? _jsx("div", { className: "agent-editor__empty", children: "Loading agent\u2026" }) : isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)) ?
747
884
  _jsx("div", { className: "agent-editor__empty", children: "This agent could not be loaded." }) : (record === null || record === void 0 ? void 0 : record.id) ?
748
885
  _jsx(AgentRegistryAuditPanel, { modelSingularName: "agentRegistry", recordId: record.id, refreshVersion: auditVersion, modelUserKey: record.name, children: content }) : content, _jsx(SolidDialog, { open: Boolean(pendingSecret), onOpenChange: function (open) { if (!open) {
749
886
  setPendingSecret(null);
750
887
  setSecretEnvVarError("");
751
- } }, header: "Set secret environment variable", style: { width: "min(34rem, 94vw)" }, footer: _jsxs("div", { className: "agent-editor__secret-dialog-actions", children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { setPendingSecret(null); setSecretEnvVarError(""); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", onClick: commitSecretEnvVar, children: "Use secret" })] }), children: _jsx(SolidDialogBody, { className: "agent-editor__secret-dialog-body", children: _jsxs("div", { className: "agent-editor__secret-dialog", children: [_jsxs("p", { children: ["Choose the environment variable name AgentHub will set for ", _jsx("strong", { children: (_q = (_p = pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.displayName) !== null && _p !== void 0 ? _p : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.name) !== null && _q !== void 0 ? _q : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.key }), ". The default is the secret name."] }), _jsxs("label", { className: "agent-editor__field", children: [_jsx("span", { children: "Environment variable name" }), _jsx(SolidInput, { autoFocus: true, value: secretEnvVarDraft, "aria-invalid": Boolean(secretEnvVarError), onChange: function (event) { setSecretEnvVarDraft(event.target.value); setSecretEnvVarError(""); } }), secretEnvVarError && _jsx("small", { className: "agent-editor__error", children: secretEnvVarError })] })] }) }) }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidDialog, { open: testAgentOpen, onOpenChange: setTestAgentOpen, onHide: function () { return setTestAgentOpen(false); }, showHeader: false, overlayClassName: "agent-editor__test-dialog-overlay", ariaLabel: "Test ".concat((_r = record.name) !== null && _r !== void 0 ? _r : "SolidX Agent"), className: "agent-editor__test-dialog", style: testAgentWindowMode === "maximized"
888
+ } }, header: "Set secret environment variable", style: { width: "min(34rem, 94vw)" }, footer: _jsxs("div", { className: "agent-editor__secret-dialog-actions", children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { setPendingSecret(null); setSecretEnvVarError(""); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", onClick: commitSecretEnvVar, children: "Use secret" })] }), children: _jsx(SolidDialogBody, { className: "agent-editor__secret-dialog-body", children: _jsxs("div", { className: "agent-editor__secret-dialog", children: [_jsxs("p", { children: ["Choose the environment variable name AgentHub will set for ", _jsx("strong", { children: (_q = (_p = pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.displayName) !== null && _p !== void 0 ? _p : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.name) !== null && _q !== void 0 ? _q : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.key }), ". The default is the secret name."] }), _jsxs("label", { className: "agent-editor__field", children: [_jsx("span", { children: "Environment variable name" }), _jsx(SolidInput, { autoFocus: true, value: secretEnvVarDraft, "aria-invalid": Boolean(secretEnvVarError), onChange: function (event) { setSecretEnvVarDraft(event.target.value); setSecretEnvVarError(""); } }), secretEnvVarError && _jsx("small", { className: "agent-editor__error", children: secretEnvVarError })] })] }) }) }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidDialog, { open: testAgentOpen, dismissible: false, onOpenChange: function (open) {
889
+ setTestAgentOpen(open);
890
+ writeTestAgentPrefs(record.id, { open: open });
891
+ }, onHide: function () {
892
+ setTestAgentOpen(false);
893
+ writeTestAgentPrefs(record.id, { open: false });
894
+ }, showHeader: false, overlayClassName: "agent-editor__test-dialog-overlay", ariaLabel: "Test ".concat((_r = record.name) !== null && _r !== void 0 ? _r : "SolidX Agent"), className: "agent-editor__test-dialog", style: testAgentWindowMode === "maximized"
752
895
  ? { position: "fixed", inset: 16, width: "auto", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }
753
- : { position: "fixed", top: 16, right: 16, bottom: 16, left: "auto", width: "min(28rem, calc(100vw - 32px))", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: _jsx("div", { className: "agent-editor__test-dialog-body", children: _jsx(SolidAgentEmbedded, { agentRuntime: "agentHub", agentId: record.id, title: (_s = record.name) !== null && _s !== void 0 ? _s : "SolidX Agent", requiredInputs: parseInputs(record.requiredInputs), height: "100%", className: "agent-editor__test-chat", windowControls: { mode: testAgentWindowMode, onDock: function () { return setTestAgentWindowMode("docked"); }, onMaximize: function () { return setTestAgentWindowMode("maximized"); }, onRestore: function () { return setTestAgentWindowMode("docked"); }, onClose: function () { return setTestAgentOpen(false); } } }) }) })] });
896
+ : { position: "fixed", top: 16, right: 16, bottom: 16, left: "auto", width: "min(28rem, calc(100vw - 32px))", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: _jsx("div", { className: "agent-editor__test-dialog-body", children: _jsx(SolidAgentEmbedded, { agentRuntime: "agentHub", agentId: record.id, agentVersion: record.configVersion, title: (_s = record.name) !== null && _s !== void 0 ? _s : "SolidX Agent", requiredInputs: parseInputs(record.requiredInputs), height: "100%", className: "agent-editor__test-chat", windowControls: {
897
+ mode: testAgentWindowMode,
898
+ onDock: function () { setTestAgentWindowMode("docked"); writeTestAgentPrefs(record.id, { mode: "docked" }); },
899
+ onMaximize: function () { setTestAgentWindowMode("maximized"); writeTestAgentPrefs(record.id, { mode: "maximized" }); },
900
+ onRestore: function () { setTestAgentWindowMode("docked"); writeTestAgentPrefs(record.id, { mode: "docked" }); },
901
+ onClose: function () { setTestAgentOpen(false); writeTestAgentPrefs(record.id, { open: false }); },
902
+ } }) }) })] });
754
903
  }
755
904
  //# sourceMappingURL=AgentRegistryEditorPage.js.map