@stigmer/react 0.5.0 → 1.0.0

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 (691) hide show
  1. package/activity/group-activity.d.ts +13 -0
  2. package/activity/group-activity.d.ts.map +1 -0
  3. package/activity/group-activity.js +54 -0
  4. package/activity/group-activity.js.map +1 -0
  5. package/activity/index.d.ts +4 -0
  6. package/activity/index.d.ts.map +1 -0
  7. package/activity/index.js +3 -0
  8. package/activity/index.js.map +1 -0
  9. package/activity/types.d.ts +34 -0
  10. package/activity/types.d.ts.map +1 -0
  11. package/activity/types.js +2 -0
  12. package/activity/types.js.map +1 -0
  13. package/activity/useRecentActivity.d.ts +35 -0
  14. package/activity/useRecentActivity.d.ts.map +1 -0
  15. package/activity/useRecentActivity.js +73 -0
  16. package/activity/useRecentActivity.js.map +1 -0
  17. package/agent/AgentPicker.d.ts.map +1 -1
  18. package/agent/AgentPicker.js +4 -2
  19. package/agent/AgentPicker.js.map +1 -1
  20. package/billing/BillingSection.d.ts.map +1 -1
  21. package/billing/BillingSection.js +1 -1
  22. package/billing/BillingSection.js.map +1 -1
  23. package/composer/ComposerToolbar.d.ts +5 -1
  24. package/composer/ComposerToolbar.d.ts.map +1 -1
  25. package/composer/ComposerToolbar.js +4 -3
  26. package/composer/ComposerToolbar.js.map +1 -1
  27. package/composer/ContextChip.d.ts +7 -2
  28. package/composer/ContextChip.d.ts.map +1 -1
  29. package/composer/ContextChip.js +2 -1
  30. package/composer/ContextChip.js.map +1 -1
  31. package/composer/InteractionModePicker.d.ts +40 -0
  32. package/composer/InteractionModePicker.d.ts.map +1 -0
  33. package/composer/InteractionModePicker.js +76 -0
  34. package/composer/InteractionModePicker.js.map +1 -0
  35. package/composer/SessionComposer.d.ts +64 -64
  36. package/composer/SessionComposer.d.ts.map +1 -1
  37. package/composer/SessionComposer.js +52 -11
  38. package/composer/SessionComposer.js.map +1 -1
  39. package/composer/__tests__/SessionComposer-memo.test.js +10 -5
  40. package/composer/__tests__/SessionComposer-memo.test.js.map +1 -1
  41. package/composer/index.d.ts +3 -1
  42. package/composer/index.d.ts.map +1 -1
  43. package/composer/index.js +1 -0
  44. package/composer/index.js.map +1 -1
  45. package/dashboard/DashboardFailedRuns.d.ts +19 -0
  46. package/dashboard/DashboardFailedRuns.d.ts.map +1 -0
  47. package/dashboard/DashboardFailedRuns.js +35 -0
  48. package/dashboard/DashboardFailedRuns.js.map +1 -0
  49. package/dashboard/DashboardKPICards.d.ts +19 -0
  50. package/dashboard/DashboardKPICards.d.ts.map +1 -0
  51. package/dashboard/DashboardKPICards.js +80 -0
  52. package/dashboard/DashboardKPICards.js.map +1 -0
  53. package/dashboard/OperationalDashboard.d.ts +37 -0
  54. package/dashboard/OperationalDashboard.d.ts.map +1 -0
  55. package/dashboard/OperationalDashboard.js +48 -0
  56. package/dashboard/OperationalDashboard.js.map +1 -0
  57. package/dashboard/index.d.ts +8 -0
  58. package/dashboard/index.d.ts.map +1 -0
  59. package/dashboard/index.js +9 -0
  60. package/dashboard/index.js.map +1 -0
  61. package/dashboard/types.d.ts +49 -0
  62. package/dashboard/types.d.ts.map +1 -0
  63. package/dashboard/types.js +2 -0
  64. package/dashboard/types.js.map +1 -0
  65. package/dashboard/useAgentExecutionSummary.d.ts +33 -0
  66. package/dashboard/useAgentExecutionSummary.d.ts.map +1 -0
  67. package/dashboard/useAgentExecutionSummary.js +32 -0
  68. package/dashboard/useAgentExecutionSummary.js.map +1 -0
  69. package/dashboard/useDashboardFailedRuns.d.ts +18 -0
  70. package/dashboard/useDashboardFailedRuns.d.ts.map +1 -0
  71. package/dashboard/useDashboardFailedRuns.js +86 -0
  72. package/dashboard/useDashboardFailedRuns.js.map +1 -0
  73. package/dashboard/useDashboardSummary.d.ts +32 -0
  74. package/dashboard/useDashboardSummary.d.ts.map +1 -0
  75. package/dashboard/useDashboardSummary.js +67 -0
  76. package/dashboard/useDashboardSummary.js.map +1 -0
  77. package/environment/usePersonalEnvironment.d.ts.map +1 -1
  78. package/environment/usePersonalEnvironment.js +1 -0
  79. package/environment/usePersonalEnvironment.js.map +1 -1
  80. package/execution/ContextGauge.d.ts +45 -0
  81. package/execution/ContextGauge.d.ts.map +1 -0
  82. package/execution/ContextGauge.js +82 -0
  83. package/execution/ContextGauge.js.map +1 -0
  84. package/execution/InteractionModeBadge.d.ts +24 -0
  85. package/execution/InteractionModeBadge.d.ts.map +1 -0
  86. package/execution/InteractionModeBadge.js +29 -0
  87. package/execution/InteractionModeBadge.js.map +1 -0
  88. package/execution/MessageThread.d.ts +33 -3
  89. package/execution/MessageThread.d.ts.map +1 -1
  90. package/execution/MessageThread.js +51 -9
  91. package/execution/MessageThread.js.map +1 -1
  92. package/execution/PlanCompletionCard.d.ts +23 -0
  93. package/execution/PlanCompletionCard.d.ts.map +1 -0
  94. package/execution/PlanCompletionCard.js +28 -0
  95. package/execution/PlanCompletionCard.js.map +1 -0
  96. package/execution/SummarizationBadge.d.ts +30 -0
  97. package/execution/SummarizationBadge.d.ts.map +1 -0
  98. package/execution/SummarizationBadge.js +61 -0
  99. package/execution/SummarizationBadge.js.map +1 -0
  100. package/execution/SummarizationCard.d.ts +27 -0
  101. package/execution/SummarizationCard.d.ts.map +1 -0
  102. package/execution/SummarizationCard.js +47 -0
  103. package/execution/SummarizationCard.js.map +1 -0
  104. package/execution/__tests__/PlanCompletionCard.test.d.ts +2 -0
  105. package/execution/__tests__/PlanCompletionCard.test.d.ts.map +1 -0
  106. package/execution/__tests__/PlanCompletionCard.test.js +53 -0
  107. package/execution/__tests__/PlanCompletionCard.test.js.map +1 -0
  108. package/execution/__tests__/buildThreadItems-plan-completion.test.d.ts +2 -0
  109. package/execution/__tests__/buildThreadItems-plan-completion.test.d.ts.map +1 -0
  110. package/execution/__tests__/buildThreadItems-plan-completion.test.js +137 -0
  111. package/execution/__tests__/buildThreadItems-plan-completion.test.js.map +1 -0
  112. package/execution/__tests__/useContextWindow.test.d.ts +2 -0
  113. package/execution/__tests__/useContextWindow.test.d.ts.map +1 -0
  114. package/execution/__tests__/useContextWindow.test.js +121 -0
  115. package/execution/__tests__/useContextWindow.test.js.map +1 -0
  116. package/execution/index.d.ts +12 -0
  117. package/execution/index.d.ts.map +1 -1
  118. package/execution/index.js +6 -0
  119. package/execution/index.js.map +1 -1
  120. package/execution/useContextWindow.d.ts +71 -0
  121. package/execution/useContextWindow.d.ts.map +1 -0
  122. package/execution/useContextWindow.js +91 -0
  123. package/execution/useContextWindow.js.map +1 -0
  124. package/execution/useCreateAgentExecution.d.ts +9 -0
  125. package/execution/useCreateAgentExecution.d.ts.map +1 -1
  126. package/execution/useCreateAgentExecution.js +15 -3
  127. package/execution/useCreateAgentExecution.js.map +1 -1
  128. package/index.d.ts +11 -6
  129. package/index.d.ts.map +1 -1
  130. package/index.js +13 -3
  131. package/index.js.map +1 -1
  132. package/inline-edit/InlineEditKeyValue.d.ts +5 -1
  133. package/inline-edit/InlineEditKeyValue.d.ts.map +1 -1
  134. package/inline-edit/InlineEditKeyValue.js +3 -3
  135. package/inline-edit/InlineEditKeyValue.js.map +1 -1
  136. package/internal/VirtualizedThread.d.ts +2 -1
  137. package/internal/VirtualizedThread.d.ts.map +1 -1
  138. package/internal/VirtualizedThread.js +3 -2
  139. package/internal/VirtualizedThread.js.map +1 -1
  140. package/internal/store/index.d.ts +1 -0
  141. package/internal/store/index.d.ts.map +1 -1
  142. package/internal/store/index.js +1 -0
  143. package/internal/store/index.js.map +1 -1
  144. package/internal/store/workflow-execution-event-store.d.ts +92 -0
  145. package/internal/store/workflow-execution-event-store.d.ts.map +1 -0
  146. package/internal/store/workflow-execution-event-store.js +298 -0
  147. package/internal/store/workflow-execution-event-store.js.map +1 -0
  148. package/internal/useFetch.js +2 -2
  149. package/internal/useFetch.js.map +1 -1
  150. package/library/ScopeToggle.d.ts +13 -9
  151. package/library/ScopeToggle.d.ts.map +1 -1
  152. package/library/ScopeToggle.js +43 -22
  153. package/library/ScopeToggle.js.map +1 -1
  154. package/library/VisibilityToggle.js +14 -5
  155. package/library/VisibilityToggle.js.map +1 -1
  156. package/library/index.d.ts +1 -0
  157. package/library/index.d.ts.map +1 -1
  158. package/library/index.js +1 -0
  159. package/library/index.js.map +1 -1
  160. package/library/useExportResource.d.ts +3 -2
  161. package/library/useExportResource.d.ts.map +1 -1
  162. package/library/useExportResource.js +11 -6
  163. package/library/useExportResource.js.map +1 -1
  164. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  165. package/mcp-server/McpServerDetailView.js +169 -58
  166. package/mcp-server/McpServerDetailView.js.map +1 -1
  167. package/mcp-server/McpServerPicker.d.ts.map +1 -1
  168. package/mcp-server/McpServerPicker.js +4 -2
  169. package/mcp-server/McpServerPicker.js.map +1 -1
  170. package/models/ModelRegistryContext.d.ts +2 -0
  171. package/models/ModelRegistryContext.d.ts.map +1 -1
  172. package/models/ModelRegistryContext.js +1 -0
  173. package/models/ModelRegistryContext.js.map +1 -1
  174. package/models/ModelSelector.d.ts.map +1 -1
  175. package/models/ModelSelector.js +2 -2
  176. package/models/ModelSelector.js.map +1 -1
  177. package/models/__tests__/useModelRegistry.test.js +4 -3
  178. package/models/__tests__/useModelRegistry.test.js.map +1 -1
  179. package/models/useModelRegistry.d.ts +2 -0
  180. package/models/useModelRegistry.d.ts.map +1 -1
  181. package/models/useModelRegistry.js +3 -2
  182. package/models/useModelRegistry.js.map +1 -1
  183. package/package.json +16 -5
  184. package/provider.d.ts.map +1 -1
  185. package/provider.js +232 -22
  186. package/provider.js.map +1 -1
  187. package/resource-detail/ResourceDetailShell.d.ts +1 -1
  188. package/resource-detail/ResourceDetailShell.d.ts.map +1 -1
  189. package/resource-detail/ResourceDetailShell.js +6 -6
  190. package/resource-detail/ResourceDetailShell.js.map +1 -1
  191. package/resource-detail/types.d.ts +23 -0
  192. package/resource-detail/types.d.ts.map +1 -1
  193. package/resource-detail/useDeleteResource.d.ts +1 -1
  194. package/resource-detail/useDeleteResource.d.ts.map +1 -1
  195. package/resource-detail/useDeleteResource.js +5 -0
  196. package/resource-detail/useDeleteResource.js.map +1 -1
  197. package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -1
  198. package/resource-workbench/components/ResourceWorkbench.js +2 -1
  199. package/resource-workbench/components/ResourceWorkbench.js.map +1 -1
  200. package/session/__tests__/session-spec-converters.test.d.ts +2 -0
  201. package/session/__tests__/session-spec-converters.test.d.ts.map +1 -0
  202. package/session/__tests__/session-spec-converters.test.js +162 -0
  203. package/session/__tests__/session-spec-converters.test.js.map +1 -0
  204. package/session/__tests__/useNewSessionFlow.test.js +2 -2
  205. package/session/__tests__/useNewSessionFlow.test.js.map +1 -1
  206. package/session/__tests__/usePersistedModel.test.js +1 -1
  207. package/session/__tests__/usePersistedModel.test.js.map +1 -1
  208. package/session/group-sessions.d.ts +17 -0
  209. package/session/group-sessions.d.ts.map +1 -1
  210. package/session/group-sessions.js +46 -0
  211. package/session/group-sessions.js.map +1 -1
  212. package/session/index.d.ts +4 -2
  213. package/session/index.d.ts.map +1 -1
  214. package/session/index.js +2 -1
  215. package/session/index.js.map +1 -1
  216. package/session/session-spec-converters.d.ts +24 -0
  217. package/session/session-spec-converters.d.ts.map +1 -0
  218. package/session/session-spec-converters.js +72 -0
  219. package/session/session-spec-converters.js.map +1 -0
  220. package/session/useNewSessionFlow.d.ts.map +1 -1
  221. package/session/useNewSessionFlow.js +1 -0
  222. package/session/useNewSessionFlow.js.map +1 -1
  223. package/session/useSessionConversation.d.ts +7 -0
  224. package/session/useSessionConversation.d.ts.map +1 -1
  225. package/session/useSessionConversation.js +2 -56
  226. package/session/useSessionConversation.js.map +1 -1
  227. package/session/useSessionPageFlow.d.ts +5 -0
  228. package/session/useSessionPageFlow.d.ts.map +1 -1
  229. package/session/useSessionPageFlow.js +21 -6
  230. package/session/useSessionPageFlow.js.map +1 -1
  231. package/session/useSessionSearch.d.ts +57 -0
  232. package/session/useSessionSearch.d.ts.map +1 -0
  233. package/session/useSessionSearch.js +94 -0
  234. package/session/useSessionSearch.js.map +1 -0
  235. package/session/useSessionUsage.d.ts.map +1 -1
  236. package/session/useSessionUsage.js +65 -4
  237. package/session/useSessionUsage.js.map +1 -1
  238. package/settings/UsageSection.d.ts.map +1 -1
  239. package/settings/UsageSection.js +1 -4
  240. package/settings/UsageSection.js.map +1 -1
  241. package/skill/SkillPicker.d.ts.map +1 -1
  242. package/skill/SkillPicker.js +4 -2
  243. package/skill/SkillPicker.js.map +1 -1
  244. package/src/activity/group-activity.ts +65 -0
  245. package/src/activity/index.ts +13 -0
  246. package/src/activity/types.ts +35 -0
  247. package/src/activity/useRecentActivity.ts +131 -0
  248. package/src/agent/AgentPicker.tsx +6 -1
  249. package/src/billing/BillingSection.tsx +3 -2
  250. package/src/composer/ComposerToolbar.tsx +19 -1
  251. package/src/composer/ContextChip.tsx +20 -11
  252. package/src/composer/InteractionModePicker.tsx +189 -0
  253. package/src/composer/SessionComposer.tsx +137 -11
  254. package/src/composer/__tests__/SessionComposer-memo.test.ts +11 -6
  255. package/src/composer/index.ts +7 -0
  256. package/src/dashboard/DashboardFailedRuns.tsx +109 -0
  257. package/src/dashboard/DashboardKPICards.tsx +128 -0
  258. package/src/dashboard/OperationalDashboard.tsx +96 -0
  259. package/src/dashboard/index.ts +37 -0
  260. package/src/dashboard/types.ts +50 -0
  261. package/src/dashboard/useAgentExecutionSummary.ts +71 -0
  262. package/src/dashboard/useDashboardFailedRuns.ts +122 -0
  263. package/src/dashboard/useDashboardSummary.ts +109 -0
  264. package/src/environment/usePersonalEnvironment.ts +1 -0
  265. package/src/execution/ContextGauge.tsx +243 -0
  266. package/src/execution/InteractionModeBadge.tsx +70 -0
  267. package/src/execution/MessageThread.tsx +88 -3
  268. package/src/execution/PlanCompletionCard.tsx +105 -0
  269. package/src/execution/SummarizationBadge.tsx +188 -0
  270. package/src/execution/SummarizationCard.tsx +126 -0
  271. package/src/execution/__tests__/PlanCompletionCard.test.tsx +67 -0
  272. package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +197 -0
  273. package/src/execution/__tests__/useContextWindow.test.ts +167 -0
  274. package/src/execution/index.ts +22 -0
  275. package/src/execution/useContextWindow.ts +148 -0
  276. package/src/execution/useCreateAgentExecution.ts +26 -3
  277. package/src/index.ts +227 -0
  278. package/src/inline-edit/InlineEditKeyValue.tsx +23 -0
  279. package/src/internal/VirtualizedThread.tsx +4 -1
  280. package/src/internal/store/index.ts +6 -0
  281. package/src/internal/store/workflow-execution-event-store.ts +391 -0
  282. package/src/internal/useFetch.ts +2 -2
  283. package/src/library/ScopeToggle.tsx +88 -20
  284. package/src/library/VisibilityToggle.tsx +54 -13
  285. package/src/library/index.ts +2 -0
  286. package/src/library/useExportResource.ts +12 -9
  287. package/src/mcp-server/McpServerDetailView.tsx +509 -203
  288. package/src/mcp-server/McpServerPicker.tsx +6 -1
  289. package/src/models/ModelRegistryContext.ts +3 -0
  290. package/src/models/ModelSelector.tsx +25 -2
  291. package/src/models/__tests__/useModelRegistry.test.tsx +5 -3
  292. package/src/models/useModelRegistry.ts +5 -2
  293. package/src/provider.tsx +264 -26
  294. package/src/resource-detail/ResourceDetailShell.tsx +21 -4
  295. package/src/resource-detail/types.ts +25 -0
  296. package/src/resource-detail/useDeleteResource.ts +6 -1
  297. package/src/resource-workbench/components/ResourceWorkbench.tsx +4 -0
  298. package/src/session/__tests__/session-spec-converters.test.ts +185 -0
  299. package/src/session/__tests__/useNewSessionFlow.test.tsx +2 -2
  300. package/src/session/__tests__/usePersistedModel.test.tsx +1 -1
  301. package/src/session/group-sessions.ts +65 -0
  302. package/src/session/index.ts +8 -2
  303. package/src/session/session-spec-converters.ts +86 -0
  304. package/src/session/useNewSessionFlow.ts +1 -0
  305. package/src/session/useSessionConversation.ts +13 -64
  306. package/src/session/useSessionPageFlow.ts +29 -7
  307. package/src/session/useSessionSearch.ts +149 -0
  308. package/src/session/useSessionUsage.ts +72 -4
  309. package/src/settings/UsageSection.tsx +1 -9
  310. package/src/skill/SkillPicker.tsx +6 -1
  311. package/src/workflow/ApprovalFormBuilder.tsx +1017 -0
  312. package/src/workflow/BranchConditionBuilder.tsx +451 -0
  313. package/src/workflow/CanvasActionsContext.ts +12 -0
  314. package/src/workflow/CanvasContextMenu.tsx +364 -0
  315. package/src/workflow/CanvasTaskNode.tsx +372 -0
  316. package/src/workflow/CanvasTransitionEdge.tsx +122 -0
  317. package/src/workflow/CostByWorkflowChart.tsx +120 -0
  318. package/src/workflow/ExecutionSummaryWidget.tsx +194 -0
  319. package/src/workflow/ExecutionTrendChart.tsx +157 -0
  320. package/src/workflow/FailedRunsWidget.tsx +109 -0
  321. package/src/workflow/PendingApprovalsWidget.tsx +115 -0
  322. package/src/workflow/TaskConfigForm.tsx +618 -0
  323. package/src/workflow/TaskKindRegistryContext.ts +36 -0
  324. package/src/workflow/TaskPickerPopover.tsx +326 -0
  325. package/src/workflow/WorkflowArchitectDialog.tsx +505 -0
  326. package/src/workflow/WorkflowCanvasEditor.tsx +651 -0
  327. package/src/workflow/WorkflowCanvasInner.tsx +160 -0
  328. package/src/workflow/WorkflowDashboard.tsx +124 -0
  329. package/src/workflow/WorkflowDetailView.tsx +527 -0
  330. package/src/workflow/WorkflowEditorView.tsx +547 -0
  331. package/src/workflow/WorkflowExecutionApprovalCard.tsx +129 -0
  332. package/src/workflow/WorkflowExecutionArtifactPanel.tsx +112 -0
  333. package/src/workflow/WorkflowExecutionCostPanel.tsx +131 -0
  334. package/src/workflow/WorkflowExecutionHeader.tsx +194 -0
  335. package/src/workflow/WorkflowExecutionPhaseBadge.tsx +188 -0
  336. package/src/workflow/WorkflowExecutionTaskPanel.tsx +135 -0
  337. package/src/workflow/WorkflowExecutionTimeline.tsx +118 -0
  338. package/src/workflow/WorkflowExecutionTimelineEvent.tsx +488 -0
  339. package/src/workflow/WorkflowExecutionViewer.tsx +248 -0
  340. package/src/workflow/WorkflowInspectorPanel.tsx +568 -0
  341. package/src/workflow/WorkflowRefinePanel.tsx +411 -0
  342. package/src/workflow/WorkflowRepairCard.tsx +433 -0
  343. package/src/workflow/WorkflowRunDialog.tsx +220 -0
  344. package/src/workflow/WorkflowRunForm.tsx +245 -0
  345. package/src/workflow/WorkflowTaskList.tsx +177 -0
  346. package/src/workflow/WorkflowTaskPalette.tsx +248 -0
  347. package/src/workflow/WorkflowTopologyGraph.tsx +250 -0
  348. package/src/workflow/WorkflowYamlEditor.tsx +271 -0
  349. package/src/workflow/__tests__/starter-workflow-yaml.test.ts +57 -0
  350. package/src/workflow/canvas-constants.ts +87 -0
  351. package/src/workflow/canvas-icons.tsx +36 -0
  352. package/src/workflow/extract-workflow-yaml.ts +87 -0
  353. package/src/workflow/graph-commands.ts +675 -0
  354. package/src/workflow/index.ts +375 -0
  355. package/src/workflow/serialize-workflow-yaml.ts +546 -0
  356. package/src/workflow/starter-workflow-yaml.ts +29 -0
  357. package/src/workflow/types.ts +99 -0
  358. package/src/workflow/useCanvasKeyboardShortcuts.ts +134 -0
  359. package/src/workflow/useDiagnoseExecutionFlow.ts +378 -0
  360. package/src/workflow/useGraphHistory.ts +138 -0
  361. package/src/workflow/usePendingApprovals.ts +89 -0
  362. package/src/workflow/useRefineWorkflowFlow.ts +321 -0
  363. package/src/workflow/useResolveAgentExecutionSession.ts +57 -0
  364. package/src/workflow/useRunWorkflowFlow.ts +235 -0
  365. package/src/workflow/useTaskKindRegistry.ts +135 -0
  366. package/src/workflow/useWorkflow.ts +78 -0
  367. package/src/workflow/useWorkflowArchitectFlow.ts +303 -0
  368. package/src/workflow/useWorkflowCanvas.ts +882 -0
  369. package/src/workflow/useWorkflowCount.ts +66 -0
  370. package/src/workflow/useWorkflowDashboardSummary.ts +71 -0
  371. package/src/workflow/useWorkflowEditor.ts +106 -0
  372. package/src/workflow/useWorkflowExecution.ts +67 -0
  373. package/src/workflow/useWorkflowExecutionActions.ts +179 -0
  374. package/src/workflow/useWorkflowExecutionArtifacts.ts +57 -0
  375. package/src/workflow/useWorkflowExecutionEventLog.ts +111 -0
  376. package/src/workflow/useWorkflowExecutionEventStream.ts +244 -0
  377. package/src/workflow/useWorkflowExecutionList.ts +121 -0
  378. package/src/workflow/useWorkflowInstances.ts +62 -0
  379. package/src/workflow/useWorkflowList.ts +79 -0
  380. package/src/workflow/useWorkflowSave.ts +84 -0
  381. package/src/workflow/useWorkflowTopology.ts +229 -0
  382. package/src/workflow/useWorkflowValidation.ts +329 -0
  383. package/src/workflow/useWorkflowYaml.ts +49 -0
  384. package/src/workflow/workflow-graph-conversions.ts +796 -0
  385. package/src/workflow/workflow-graph-model.ts +83 -0
  386. package/src/workflow/workflow-yaml-diff.ts +132 -0
  387. package/styles.css +1 -1
  388. package/workflow/ApprovalFormBuilder.d.ts +24 -0
  389. package/workflow/ApprovalFormBuilder.d.ts.map +1 -0
  390. package/workflow/ApprovalFormBuilder.js +347 -0
  391. package/workflow/ApprovalFormBuilder.js.map +1 -0
  392. package/workflow/BranchConditionBuilder.d.ts +29 -0
  393. package/workflow/BranchConditionBuilder.d.ts.map +1 -0
  394. package/workflow/BranchConditionBuilder.js +170 -0
  395. package/workflow/BranchConditionBuilder.js.map +1 -0
  396. package/workflow/CanvasActionsContext.d.ts +8 -0
  397. package/workflow/CanvasActionsContext.d.ts.map +1 -0
  398. package/workflow/CanvasActionsContext.js +4 -0
  399. package/workflow/CanvasActionsContext.js.map +1 -0
  400. package/workflow/CanvasContextMenu.d.ts +59 -0
  401. package/workflow/CanvasContextMenu.d.ts.map +1 -0
  402. package/workflow/CanvasContextMenu.js +98 -0
  403. package/workflow/CanvasContextMenu.js.map +1 -0
  404. package/workflow/CanvasTaskNode.d.ts +21 -0
  405. package/workflow/CanvasTaskNode.d.ts.map +1 -0
  406. package/workflow/CanvasTaskNode.js +125 -0
  407. package/workflow/CanvasTaskNode.js.map +1 -0
  408. package/workflow/CanvasTransitionEdge.d.ts +24 -0
  409. package/workflow/CanvasTransitionEdge.d.ts.map +1 -0
  410. package/workflow/CanvasTransitionEdge.js +50 -0
  411. package/workflow/CanvasTransitionEdge.js.map +1 -0
  412. package/workflow/CostByWorkflowChart.d.ts +15 -0
  413. package/workflow/CostByWorkflowChart.d.ts.map +1 -0
  414. package/workflow/CostByWorkflowChart.js +45 -0
  415. package/workflow/CostByWorkflowChart.js.map +1 -0
  416. package/workflow/ExecutionSummaryWidget.d.ts +16 -0
  417. package/workflow/ExecutionSummaryWidget.d.ts.map +1 -0
  418. package/workflow/ExecutionSummaryWidget.js +93 -0
  419. package/workflow/ExecutionSummaryWidget.js.map +1 -0
  420. package/workflow/ExecutionTrendChart.d.ts +14 -0
  421. package/workflow/ExecutionTrendChart.d.ts.map +1 -0
  422. package/workflow/ExecutionTrendChart.js +67 -0
  423. package/workflow/ExecutionTrendChart.js.map +1 -0
  424. package/workflow/FailedRunsWidget.d.ts +19 -0
  425. package/workflow/FailedRunsWidget.d.ts.map +1 -0
  426. package/workflow/FailedRunsWidget.js +37 -0
  427. package/workflow/FailedRunsWidget.js.map +1 -0
  428. package/workflow/PendingApprovalsWidget.d.ts +19 -0
  429. package/workflow/PendingApprovalsWidget.d.ts.map +1 -0
  430. package/workflow/PendingApprovalsWidget.js +35 -0
  431. package/workflow/PendingApprovalsWidget.js.map +1 -0
  432. package/workflow/TaskConfigForm.d.ts +29 -0
  433. package/workflow/TaskConfigForm.d.ts.map +1 -0
  434. package/workflow/TaskConfigForm.js +230 -0
  435. package/workflow/TaskConfigForm.js.map +1 -0
  436. package/workflow/TaskKindRegistryContext.d.ts +24 -0
  437. package/workflow/TaskKindRegistryContext.d.ts.map +1 -0
  438. package/workflow/TaskKindRegistryContext.js +25 -0
  439. package/workflow/TaskKindRegistryContext.js.map +1 -0
  440. package/workflow/TaskPickerPopover.d.ts +33 -0
  441. package/workflow/TaskPickerPopover.d.ts.map +1 -0
  442. package/workflow/TaskPickerPopover.js +110 -0
  443. package/workflow/TaskPickerPopover.js.map +1 -0
  444. package/workflow/WorkflowArchitectDialog.d.ts +48 -0
  445. package/workflow/WorkflowArchitectDialog.d.ts.map +1 -0
  446. package/workflow/WorkflowArchitectDialog.js +129 -0
  447. package/workflow/WorkflowArchitectDialog.js.map +1 -0
  448. package/workflow/WorkflowCanvasEditor.d.ts +38 -0
  449. package/workflow/WorkflowCanvasEditor.d.ts.map +1 -0
  450. package/workflow/WorkflowCanvasEditor.js +287 -0
  451. package/workflow/WorkflowCanvasEditor.js.map +1 -0
  452. package/workflow/WorkflowCanvasInner.d.ts +32 -0
  453. package/workflow/WorkflowCanvasInner.d.ts.map +1 -0
  454. package/workflow/WorkflowCanvasInner.js +49 -0
  455. package/workflow/WorkflowCanvasInner.js.map +1 -0
  456. package/workflow/WorkflowDashboard.d.ts +35 -0
  457. package/workflow/WorkflowDashboard.d.ts.map +1 -0
  458. package/workflow/WorkflowDashboard.js +59 -0
  459. package/workflow/WorkflowDashboard.js.map +1 -0
  460. package/workflow/WorkflowDetailView.d.ts +63 -0
  461. package/workflow/WorkflowDetailView.d.ts.map +1 -0
  462. package/workflow/WorkflowDetailView.js +202 -0
  463. package/workflow/WorkflowDetailView.js.map +1 -0
  464. package/workflow/WorkflowEditorView.d.ts +43 -0
  465. package/workflow/WorkflowEditorView.d.ts.map +1 -0
  466. package/workflow/WorkflowEditorView.js +165 -0
  467. package/workflow/WorkflowEditorView.js.map +1 -0
  468. package/workflow/WorkflowExecutionApprovalCard.d.ts +27 -0
  469. package/workflow/WorkflowExecutionApprovalCard.d.ts.map +1 -0
  470. package/workflow/WorkflowExecutionApprovalCard.js +32 -0
  471. package/workflow/WorkflowExecutionApprovalCard.js.map +1 -0
  472. package/workflow/WorkflowExecutionArtifactPanel.d.ts +15 -0
  473. package/workflow/WorkflowExecutionArtifactPanel.d.ts.map +1 -0
  474. package/workflow/WorkflowExecutionArtifactPanel.js +53 -0
  475. package/workflow/WorkflowExecutionArtifactPanel.js.map +1 -0
  476. package/workflow/WorkflowExecutionCostPanel.d.ts +18 -0
  477. package/workflow/WorkflowExecutionCostPanel.d.ts.map +1 -0
  478. package/workflow/WorkflowExecutionCostPanel.js +44 -0
  479. package/workflow/WorkflowExecutionCostPanel.js.map +1 -0
  480. package/workflow/WorkflowExecutionHeader.d.ts +26 -0
  481. package/workflow/WorkflowExecutionHeader.d.ts.map +1 -0
  482. package/workflow/WorkflowExecutionHeader.js +68 -0
  483. package/workflow/WorkflowExecutionHeader.js.map +1 -0
  484. package/workflow/WorkflowExecutionPhaseBadge.d.ts +23 -0
  485. package/workflow/WorkflowExecutionPhaseBadge.d.ts.map +1 -0
  486. package/workflow/WorkflowExecutionPhaseBadge.js +99 -0
  487. package/workflow/WorkflowExecutionPhaseBadge.js.map +1 -0
  488. package/workflow/WorkflowExecutionTaskPanel.d.ts +24 -0
  489. package/workflow/WorkflowExecutionTaskPanel.d.ts.map +1 -0
  490. package/workflow/WorkflowExecutionTaskPanel.js +59 -0
  491. package/workflow/WorkflowExecutionTaskPanel.js.map +1 -0
  492. package/workflow/WorkflowExecutionTimeline.d.ts +27 -0
  493. package/workflow/WorkflowExecutionTimeline.d.ts.map +1 -0
  494. package/workflow/WorkflowExecutionTimeline.js +51 -0
  495. package/workflow/WorkflowExecutionTimeline.js.map +1 -0
  496. package/workflow/WorkflowExecutionTimelineEvent.d.ts +18 -0
  497. package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +1 -0
  498. package/workflow/WorkflowExecutionTimelineEvent.js +210 -0
  499. package/workflow/WorkflowExecutionTimelineEvent.js.map +1 -0
  500. package/workflow/WorkflowExecutionViewer.d.ts +45 -0
  501. package/workflow/WorkflowExecutionViewer.d.ts.map +1 -0
  502. package/workflow/WorkflowExecutionViewer.js +75 -0
  503. package/workflow/WorkflowExecutionViewer.js.map +1 -0
  504. package/workflow/WorkflowInspectorPanel.d.ts +46 -0
  505. package/workflow/WorkflowInspectorPanel.d.ts.map +1 -0
  506. package/workflow/WorkflowInspectorPanel.js +152 -0
  507. package/workflow/WorkflowInspectorPanel.js.map +1 -0
  508. package/workflow/WorkflowRefinePanel.d.ts +30 -0
  509. package/workflow/WorkflowRefinePanel.d.ts.map +1 -0
  510. package/workflow/WorkflowRefinePanel.js +107 -0
  511. package/workflow/WorkflowRefinePanel.js.map +1 -0
  512. package/workflow/WorkflowRepairCard.d.ts +35 -0
  513. package/workflow/WorkflowRepairCard.d.ts.map +1 -0
  514. package/workflow/WorkflowRepairCard.js +113 -0
  515. package/workflow/WorkflowRepairCard.js.map +1 -0
  516. package/workflow/WorkflowRunDialog.d.ts +51 -0
  517. package/workflow/WorkflowRunDialog.d.ts.map +1 -0
  518. package/workflow/WorkflowRunDialog.js +75 -0
  519. package/workflow/WorkflowRunDialog.js.map +1 -0
  520. package/workflow/WorkflowRunForm.d.ts +62 -0
  521. package/workflow/WorkflowRunForm.d.ts.map +1 -0
  522. package/workflow/WorkflowRunForm.js +64 -0
  523. package/workflow/WorkflowRunForm.js.map +1 -0
  524. package/workflow/WorkflowTaskList.d.ts +25 -0
  525. package/workflow/WorkflowTaskList.d.ts.map +1 -0
  526. package/workflow/WorkflowTaskList.js +89 -0
  527. package/workflow/WorkflowTaskList.js.map +1 -0
  528. package/workflow/WorkflowTaskPalette.d.ts +22 -0
  529. package/workflow/WorkflowTaskPalette.d.ts.map +1 -0
  530. package/workflow/WorkflowTaskPalette.js +83 -0
  531. package/workflow/WorkflowTaskPalette.js.map +1 -0
  532. package/workflow/WorkflowTopologyGraph.d.ts +22 -0
  533. package/workflow/WorkflowTopologyGraph.d.ts.map +1 -0
  534. package/workflow/WorkflowTopologyGraph.js +123 -0
  535. package/workflow/WorkflowTopologyGraph.js.map +1 -0
  536. package/workflow/WorkflowYamlEditor.d.ts +43 -0
  537. package/workflow/WorkflowYamlEditor.d.ts.map +1 -0
  538. package/workflow/WorkflowYamlEditor.js +215 -0
  539. package/workflow/WorkflowYamlEditor.js.map +1 -0
  540. package/workflow/__tests__/starter-workflow-yaml.test.d.ts +2 -0
  541. package/workflow/__tests__/starter-workflow-yaml.test.d.ts.map +1 -0
  542. package/workflow/__tests__/starter-workflow-yaml.test.js +44 -0
  543. package/workflow/__tests__/starter-workflow-yaml.test.js.map +1 -0
  544. package/workflow/canvas-constants.d.ts +56 -0
  545. package/workflow/canvas-constants.d.ts.map +1 -0
  546. package/workflow/canvas-constants.js +74 -0
  547. package/workflow/canvas-constants.js.map +1 -0
  548. package/workflow/canvas-icons.d.ts +13 -0
  549. package/workflow/canvas-icons.d.ts.map +1 -0
  550. package/workflow/canvas-icons.js +21 -0
  551. package/workflow/canvas-icons.js.map +1 -0
  552. package/workflow/extract-workflow-yaml.d.ts +22 -0
  553. package/workflow/extract-workflow-yaml.d.ts.map +1 -0
  554. package/workflow/extract-workflow-yaml.js +63 -0
  555. package/workflow/extract-workflow-yaml.js.map +1 -0
  556. package/workflow/graph-commands.d.ts +209 -0
  557. package/workflow/graph-commands.d.ts.map +1 -0
  558. package/workflow/graph-commands.js +516 -0
  559. package/workflow/graph-commands.js.map +1 -0
  560. package/workflow/index.d.ts +66 -0
  561. package/workflow/index.d.ts.map +1 -0
  562. package/workflow/index.js +88 -0
  563. package/workflow/index.js.map +1 -0
  564. package/workflow/serialize-workflow-yaml.d.ts +39 -0
  565. package/workflow/serialize-workflow-yaml.d.ts.map +1 -0
  566. package/workflow/serialize-workflow-yaml.js +413 -0
  567. package/workflow/serialize-workflow-yaml.js.map +1 -0
  568. package/workflow/starter-workflow-yaml.d.ts +12 -0
  569. package/workflow/starter-workflow-yaml.d.ts.map +1 -0
  570. package/workflow/starter-workflow-yaml.js +30 -0
  571. package/workflow/starter-workflow-yaml.js.map +1 -0
  572. package/workflow/types.d.ts +80 -0
  573. package/workflow/types.d.ts.map +1 -0
  574. package/workflow/types.js +2 -0
  575. package/workflow/types.js.map +1 -0
  576. package/workflow/useCanvasKeyboardShortcuts.d.ts +34 -0
  577. package/workflow/useCanvasKeyboardShortcuts.d.ts.map +1 -0
  578. package/workflow/useCanvasKeyboardShortcuts.js +108 -0
  579. package/workflow/useCanvasKeyboardShortcuts.js.map +1 -0
  580. package/workflow/useDiagnoseExecutionFlow.d.ts +87 -0
  581. package/workflow/useDiagnoseExecutionFlow.d.ts.map +1 -0
  582. package/workflow/useDiagnoseExecutionFlow.js +257 -0
  583. package/workflow/useDiagnoseExecutionFlow.js.map +1 -0
  584. package/workflow/useGraphHistory.d.ts +28 -0
  585. package/workflow/useGraphHistory.d.ts.map +1 -0
  586. package/workflow/useGraphHistory.js +106 -0
  587. package/workflow/useGraphHistory.js.map +1 -0
  588. package/workflow/usePendingApprovals.d.ts +35 -0
  589. package/workflow/usePendingApprovals.d.ts.map +1 -0
  590. package/workflow/usePendingApprovals.js +50 -0
  591. package/workflow/usePendingApprovals.js.map +1 -0
  592. package/workflow/useRefineWorkflowFlow.d.ts +75 -0
  593. package/workflow/useRefineWorkflowFlow.d.ts.map +1 -0
  594. package/workflow/useRefineWorkflowFlow.js +216 -0
  595. package/workflow/useRefineWorkflowFlow.js.map +1 -0
  596. package/workflow/useResolveAgentExecutionSession.d.ts +33 -0
  597. package/workflow/useResolveAgentExecutionSession.d.ts.map +1 -0
  598. package/workflow/useResolveAgentExecutionSession.js +37 -0
  599. package/workflow/useResolveAgentExecutionSession.js.map +1 -0
  600. package/workflow/useRunWorkflowFlow.d.ts +82 -0
  601. package/workflow/useRunWorkflowFlow.d.ts.map +1 -0
  602. package/workflow/useRunWorkflowFlow.js +145 -0
  603. package/workflow/useRunWorkflowFlow.js.map +1 -0
  604. package/workflow/useTaskKindRegistry.d.ts +96 -0
  605. package/workflow/useTaskKindRegistry.d.ts.map +1 -0
  606. package/workflow/useTaskKindRegistry.js +75 -0
  607. package/workflow/useTaskKindRegistry.js.map +1 -0
  608. package/workflow/useWorkflow.d.ts +47 -0
  609. package/workflow/useWorkflow.d.ts.map +1 -0
  610. package/workflow/useWorkflow.js +53 -0
  611. package/workflow/useWorkflow.js.map +1 -0
  612. package/workflow/useWorkflowArchitectFlow.d.ts +96 -0
  613. package/workflow/useWorkflowArchitectFlow.d.ts.map +1 -0
  614. package/workflow/useWorkflowArchitectFlow.js +179 -0
  615. package/workflow/useWorkflowArchitectFlow.js.map +1 -0
  616. package/workflow/useWorkflowCanvas.d.ts +66 -0
  617. package/workflow/useWorkflowCanvas.d.ts.map +1 -0
  618. package/workflow/useWorkflowCanvas.js +628 -0
  619. package/workflow/useWorkflowCanvas.js.map +1 -0
  620. package/workflow/useWorkflowCount.d.ts +47 -0
  621. package/workflow/useWorkflowCount.d.ts.map +1 -0
  622. package/workflow/useWorkflowCount.js +26 -0
  623. package/workflow/useWorkflowCount.js.map +1 -0
  624. package/workflow/useWorkflowDashboardSummary.d.ts +34 -0
  625. package/workflow/useWorkflowDashboardSummary.d.ts.map +1 -0
  626. package/workflow/useWorkflowDashboardSummary.js +33 -0
  627. package/workflow/useWorkflowDashboardSummary.js.map +1 -0
  628. package/workflow/useWorkflowEditor.d.ts +45 -0
  629. package/workflow/useWorkflowEditor.d.ts.map +1 -0
  630. package/workflow/useWorkflowEditor.js +52 -0
  631. package/workflow/useWorkflowEditor.js.map +1 -0
  632. package/workflow/useWorkflowExecution.d.ts +37 -0
  633. package/workflow/useWorkflowExecution.d.ts.map +1 -0
  634. package/workflow/useWorkflowExecution.js +43 -0
  635. package/workflow/useWorkflowExecution.js.map +1 -0
  636. package/workflow/useWorkflowExecutionActions.d.ts +41 -0
  637. package/workflow/useWorkflowExecutionActions.d.ts.map +1 -0
  638. package/workflow/useWorkflowExecutionActions.js +86 -0
  639. package/workflow/useWorkflowExecutionActions.js.map +1 -0
  640. package/workflow/useWorkflowExecutionArtifacts.d.ts +26 -0
  641. package/workflow/useWorkflowExecutionArtifacts.d.ts.map +1 -0
  642. package/workflow/useWorkflowExecutionArtifacts.js +29 -0
  643. package/workflow/useWorkflowExecutionArtifacts.js.map +1 -0
  644. package/workflow/useWorkflowExecutionEventLog.d.ts +47 -0
  645. package/workflow/useWorkflowExecutionEventLog.d.ts.map +1 -0
  646. package/workflow/useWorkflowExecutionEventLog.js +59 -0
  647. package/workflow/useWorkflowExecutionEventLog.js.map +1 -0
  648. package/workflow/useWorkflowExecutionEventStream.d.ts +61 -0
  649. package/workflow/useWorkflowExecutionEventStream.d.ts.map +1 -0
  650. package/workflow/useWorkflowExecutionEventStream.js +161 -0
  651. package/workflow/useWorkflowExecutionEventStream.js.map +1 -0
  652. package/workflow/useWorkflowExecutionList.d.ts +49 -0
  653. package/workflow/useWorkflowExecutionList.d.ts.map +1 -0
  654. package/workflow/useWorkflowExecutionList.js +65 -0
  655. package/workflow/useWorkflowExecutionList.js.map +1 -0
  656. package/workflow/useWorkflowInstances.d.ts +30 -0
  657. package/workflow/useWorkflowInstances.d.ts.map +1 -0
  658. package/workflow/useWorkflowInstances.js +33 -0
  659. package/workflow/useWorkflowInstances.js.map +1 -0
  660. package/workflow/useWorkflowList.d.ts +57 -0
  661. package/workflow/useWorkflowList.d.ts.map +1 -0
  662. package/workflow/useWorkflowList.js +29 -0
  663. package/workflow/useWorkflowList.js.map +1 -0
  664. package/workflow/useWorkflowSave.d.ts +25 -0
  665. package/workflow/useWorkflowSave.d.ts.map +1 -0
  666. package/workflow/useWorkflowSave.js +61 -0
  667. package/workflow/useWorkflowSave.js.map +1 -0
  668. package/workflow/useWorkflowTopology.d.ts +40 -0
  669. package/workflow/useWorkflowTopology.d.ts.map +1 -0
  670. package/workflow/useWorkflowTopology.js +163 -0
  671. package/workflow/useWorkflowTopology.js.map +1 -0
  672. package/workflow/useWorkflowValidation.d.ts +27 -0
  673. package/workflow/useWorkflowValidation.d.ts.map +1 -0
  674. package/workflow/useWorkflowValidation.js +253 -0
  675. package/workflow/useWorkflowValidation.js.map +1 -0
  676. package/workflow/useWorkflowYaml.d.ts +26 -0
  677. package/workflow/useWorkflowYaml.d.ts.map +1 -0
  678. package/workflow/useWorkflowYaml.js +26 -0
  679. package/workflow/useWorkflowYaml.js.map +1 -0
  680. package/workflow/workflow-graph-conversions.d.ts +70 -0
  681. package/workflow/workflow-graph-conversions.d.ts.map +1 -0
  682. package/workflow/workflow-graph-conversions.js +634 -0
  683. package/workflow/workflow-graph-conversions.js.map +1 -0
  684. package/workflow/workflow-graph-model.d.ts +83 -0
  685. package/workflow/workflow-graph-model.d.ts.map +1 -0
  686. package/workflow/workflow-graph-model.js +5 -0
  687. package/workflow/workflow-graph-model.js.map +1 -0
  688. package/workflow/workflow-yaml-diff.d.ts +24 -0
  689. package/workflow/workflow-yaml-diff.d.ts.map +1 -0
  690. package/workflow/workflow-yaml-diff.js +96 -0
  691. package/workflow/workflow-yaml-diff.js.map +1 -0
@@ -3,6 +3,7 @@ import { useCallback, useMemo } from "react";
3
3
  import { parse as parseYaml } from "yaml";
4
4
  import { toast } from "../feedback/toast";
5
5
  import { serializeAgentYaml, serializeMcpServerYaml } from "./serialize-resource-yaml";
6
+ import { serializeWorkflowYaml } from "../workflow/serialize-workflow-yaml";
6
7
  // ---------------------------------------------------------------------------
7
8
  // Hook
8
9
  // ---------------------------------------------------------------------------
@@ -42,14 +43,14 @@ export function useExportResource({ kind, resource, }) {
42
43
  return null;
43
44
  if (kind === "Agent")
44
45
  return serializeAgentYaml(resource);
46
+ if (kind === "Workflow")
47
+ return serializeWorkflowYaml(resource);
45
48
  return serializeMcpServerYaml(resource);
46
49
  }, [kind, resource]);
47
50
  const json = useMemo(() => {
48
51
  if (!resource)
49
52
  return null;
50
- if (kind === "Agent")
51
- return serializeResourceJson(resource, "Agent");
52
- return serializeResourceJson(resource, "McpServer");
53
+ return serializeResourceJson(resource, kind);
53
54
  }, [kind, resource]);
54
55
  const slug = useMemo(() => {
55
56
  if (!resource)
@@ -92,9 +93,13 @@ export function useExportResource({ kind, resource, }) {
92
93
  * to the YAML structure (snake_case fields, no status).
93
94
  */
94
95
  function serializeResourceJson(resource, kind) {
95
- const yamlStr = kind === "Agent"
96
- ? serializeAgentYaml(resource)
97
- : serializeMcpServerYaml(resource);
96
+ let yamlStr;
97
+ if (kind === "Agent")
98
+ yamlStr = serializeAgentYaml(resource);
99
+ else if (kind === "Workflow")
100
+ yamlStr = serializeWorkflowYaml(resource);
101
+ else
102
+ yamlStr = serializeMcpServerYaml(resource);
98
103
  const doc = parseYaml(yamlStr);
99
104
  return JSON.stringify(doc, null, 2);
100
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useExportResource.js","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AA8BvF,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAQ,GACiB;IACzB,MAAM,IAAI,GAAG,OAAO,CAAgB,GAAG,EAAE;QACvC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,kBAAkB,CAAC,QAAiB,CAAC,CAAC;QACnE,OAAO,sBAAsB,CAAC,QAAqB,CAAC,CAAC;IACvD,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAErB,MAAM,IAAI,GAAG,OAAO,CAAgB,GAAG,EAAE;QACvC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,qBAAqB,CAAC,QAAiB,EAAE,OAAO,CAAC,CAAC;QAC/E,OAAO,qBAAqB,CAAC,QAAqB,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAErB,MAAM,IAAI,GAAG,OAAO,CAAS,GAAG,EAAE;QAChC,IAAI,CAAC,QAAQ;YAAE,OAAO,UAAU,CAAC;QACjC,OA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B,EACnB,oBAA8B,EAC9B,yBAAiC,EACjC,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,OAAO,EACP,QAAgB,EAChB,iBAAiB,EACjB,SAAS,GACV,EAAE,wBAAwB,2CAob1B"}
@@ -20,7 +20,7 @@ import { ErrorMessage } from "../error/ErrorMessage";
20
20
  import { EnvVarForm } from "../environment/EnvVarForm";
21
21
  import { VisibilityToggle } from "../library/VisibilityToggle";
22
22
  import { Tabs } from "../tabs/Tabs";
23
- import { ResourceActionBar } from "../resource-detail/ResourceActionBar";
23
+ import { ResourceDetailShell } from "../resource-detail/ResourceDetailShell";
24
24
  import { Section } from "../resource-detail/Section";
25
25
  import { InlineEditText } from "../inline-edit/InlineEditText";
26
26
  import { InlineEditTextarea } from "../inline-edit/InlineEditTextarea";
@@ -126,21 +126,16 @@ export function McpServerDetailView({ org, slug, onResourceLoad, onVisibilityCha
126
126
  await credentials.saveCredentials(values);
127
127
  credentials.refetch();
128
128
  }
129
- setShowCredentialForm(false);
130
129
  if (mcpServer?.metadata?.id) {
131
130
  const envKeys = Object.keys(mcpServer.spec?.env ?? {});
132
131
  const connectOrg = activeOrg ?? org;
133
- if (options.saveForFuture) {
134
- await connection.connect(mcpServer.metadata.id, connectOrg, undefined, envKeys);
135
- }
136
- else {
137
- await connection.connect(mcpServer.metadata.id, connectOrg, values, envKeys);
138
- }
132
+ await connection.connect(mcpServer.metadata.id, connectOrg, values, envKeys);
139
133
  refetch();
140
134
  }
135
+ setShowCredentialForm(false);
141
136
  }
142
137
  catch {
143
- // error state is managed by the hooks
138
+ // error state is managed by the hooks — form stays open for retry
144
139
  }
145
140
  }, [credentials, mcpServer, connection, refetch]);
146
141
  const handleDisconnect = useCallback(async () => {
@@ -221,10 +216,30 @@ export function McpServerDetailView({ org, slug, onResourceLoad, onVisibilityCha
221
216
  return _jsx(ErrorMessage, { error: error, retry: refetch, className: className });
222
217
  if (!mcpServer)
223
218
  return _jsx(NotFoundState, { className: className });
224
- return (_jsxs("div", { className: cn("flex flex-col gap-6", className), children: [status?.validationState === ValidationState.invalid &&
225
- status.validationMessage && (_jsx(ValidationBanner, { message: status.validationMessage })), _jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsx(Header, { server: mcpServer, createdAt: specAudit?.createdAt ? timestampDate(specAudit.createdAt) : null, updatedAt: specAudit?.updatedAt ? timestampDate(specAudit.updatedAt) : null, lastDiscoveredAt: capabilities?.lastDiscoveredAt
226
- ? timestampDate(capabilities.lastDiscoveredAt)
227
- : null, onVisibilityChange: onVisibilityChange, isVisibilityPending: isVisibilityPending, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField }), _jsx(ResourceActionBar, { primaryAction: primaryAction, actions: actions, className: "shrink-0" })] }), (editable || spec?.description) && (_jsx(Section, { title: "Description", children: editable && saveMcpField ? (_jsx("div", { className: "max-h-20 overflow-y-auto p-3", children: _jsx(InlineEditTextarea, { value: spec?.description || "", onSave: (v) => saveMcpField("description", v || undefined), isSaving: isUpdating, placeholder: "Add a description", minRows: 2 }) })) : (_jsx("div", { className: "p-3", children: _jsx("pre", { className: "whitespace-pre-wrap break-words text-sm text-foreground font-sans", children: spec?.description }) })) })), hasSource && _jsx(SourceSection, { spec: spec }), (editable || spec?.serverType.case) && (_jsx(ServerConfigSection, { serverType: spec?.serverType, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), (editable || (spec?.env && Object.keys(spec.env).length > 0)) && (_jsx(EnvSection, { data: spec?.env ?? {}, oauthTargetEnvVar: credentials.oauthTargetEnvVar, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), _jsxs(Section, { title: "Connection", children: [_jsx(ConnectBar, { isConnecting: connection.isConnecting || oauth.isInProgress, connectionError: combinedError, onConnect: handleConnectClick, onClearConnectionError: combinedClearError, hasDiscoveredTools: hasDiscoveredTools, toolCount: tools.length, policyCount: totalPolicyCount, credentialsLoading: credentials.isLoading, oauthPhase: oauth.phase, authMode: credentials.authMode, isOAuthConnected: credentials.isOAuthConnected, connectionHealth: credentials.connectionHealth, canDisconnect: credentials.canDisconnect, onDisconnect: handleDisconnect, isDisconnecting: disconnectOAuth.isDisconnecting, disconnectError: disconnectOAuth.error, onClearDisconnectError: disconnectOAuth.clearError, serverName: mcpServer?.metadata?.name ?? slug, accessTokenExpiresAt: credentials.accessTokenExpiresAt, tokenLifetimeHint: credentials.tokenLifetimeHint, isVendorApprovalPending: credentials.isVendorApprovalPending, isVendorApprovalBlocked: credentials.isVendorApprovalBlocked, vendorApprovalDocsUrl: credentials.vendorApprovalDocsUrl, canBringOwnApp: credentials.canBringOwnApp, isOrgOAuthApp: credentials.isOrgOAuthApp, onBringOwnApp: () => setShowByoaForm(true), onRemoveOrgApp: handleRemoveOrgApp, isRemovingOrgApp: orgOAuthApp.isDeleting, removeOrgAppError: orgOAuthApp.deleteError, onClearRemoveOrgAppError: orgOAuthApp.clearErrors, manualOverride: credentials.manualOverride, onManualOverride: () => {
219
+ const meta = mcpServer.metadata;
220
+ const lastDiscoveredAt = capabilities?.lastDiscoveredAt
221
+ ? timestampDate(capabilities.lastDiscoveredAt)
222
+ : null;
223
+ const headerMeta = {
224
+ name: meta?.name || meta?.slug || "Untitled",
225
+ nameElement: editable && saveMcpField ? (_jsx(InlineEditText, { value: meta?.name || "", onSave: (v) => saveMcpField("name", v), isSaving: isUpdating, variant: "heading", placeholder: "Server name", validate: (v) => (v.trim() ? null : "Name is required") })) : undefined,
226
+ id: meta?.id || "",
227
+ org: meta?.org,
228
+ slug: meta?.slug,
229
+ qualifiedSlug: meta?.slug
230
+ ? (meta.org ? `${meta.org}/${meta.slug}` : meta.slug)
231
+ : undefined,
232
+ icon: editable && saveMcpField ? (_jsx(InlineEditImage, { value: spec?.iconUrl ?? "", onSave: (v) => saveMcpField("iconUrl", v || undefined), isSaving: isUpdating, fallback: _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }), size: "md" })) : spec?.iconUrl ? undefined : _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }),
233
+ iconUrl: editable ? undefined : spec?.iconUrl || undefined,
234
+ createdAt: specAudit?.createdAt ? timestampDate(specAudit.createdAt) : null,
235
+ updatedAt: specAudit?.updatedAt ? timestampDate(specAudit.updatedAt) : null,
236
+ };
237
+ const isPublic = meta?.visibility === ApiResourceVisibility.visibility_public;
238
+ const visibilityControl = onVisibilityChange && meta ? (_jsx(VisibilityToggle, { visibility: meta.visibility, onVisibilityChange: onVisibilityChange, isPending: isVisibilityPending })) : isPublic ? (_jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Public" })) : undefined;
239
+ const headerMetaExtra = (_jsxs(_Fragment, { children: [status && _jsx(ValidationStateBadge, { state: status.validationState }), lastDiscoveredAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Discovered ", formatDate(lastDiscoveredAt)] })] }))] }));
240
+ const headerBanner = status?.validationState === ValidationState.invalid &&
241
+ status.validationMessage ? (_jsx(ValidationBanner, { message: status.validationMessage })) : undefined;
242
+ return (_jsxs(ResourceDetailShell, { header: headerMeta, visibilityControl: visibilityControl, headerMetaExtra: headerMetaExtra, headerBanner: headerBanner, primaryAction: primaryAction, actions: actions, className: className, children: [(editable || spec?.description) && (_jsx(Section, { title: "Description", children: editable && saveMcpField ? (_jsx("div", { className: "max-h-20 overflow-y-auto p-3", children: _jsx(InlineEditTextarea, { value: spec?.description || "", onSave: (v) => saveMcpField("description", v || undefined), isSaving: isUpdating, placeholder: "Add a description", minRows: 2 }) })) : (_jsx("div", { className: "p-3", children: _jsx("pre", { className: "whitespace-pre-wrap break-words text-sm text-foreground font-sans", children: spec?.description }) })) })), hasSource && _jsx(SourceSection, { spec: spec }), (editable || spec?.serverType.case) && (_jsx(ServerConfigSection, { serverType: spec?.serverType, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), (editable || (spec?.env && Object.keys(spec.env).length > 0)) && (_jsx(EnvSection, { data: spec?.env ?? {}, oauthTargetEnvVar: credentials.oauthTargetEnvVar, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), _jsxs(Section, { title: "Connection", children: [_jsx(ConnectBar, { isConnecting: connection.isConnecting || oauth.isInProgress, connectionError: combinedError, onConnect: handleConnectClick, onClearConnectionError: combinedClearError, hasDiscoveredTools: hasDiscoveredTools, credentialsLoading: credentials.isLoading, oauthPhase: oauth.phase, authMode: credentials.authMode, isOAuthConnected: credentials.isOAuthConnected, connectionHealth: credentials.connectionHealth, canDisconnect: credentials.canDisconnect, onDisconnect: handleDisconnect, isDisconnecting: disconnectOAuth.isDisconnecting, disconnectError: disconnectOAuth.error, onClearDisconnectError: disconnectOAuth.clearError, serverName: mcpServer?.metadata?.name ?? slug, accessTokenExpiresAt: credentials.accessTokenExpiresAt, tokenLifetimeHint: credentials.tokenLifetimeHint, isVendorApprovalPending: credentials.isVendorApprovalPending, isVendorApprovalBlocked: credentials.isVendorApprovalBlocked, vendorApprovalDocsUrl: credentials.vendorApprovalDocsUrl, canBringOwnApp: credentials.canBringOwnApp, isOrgOAuthApp: credentials.isOrgOAuthApp, onBringOwnApp: () => setShowByoaForm(true), onRemoveOrgApp: handleRemoveOrgApp, isRemovingOrgApp: orgOAuthApp.isDeleting, removeOrgAppError: orgOAuthApp.deleteError, onClearRemoveOrgAppError: orgOAuthApp.clearErrors, manualOverride: credentials.manualOverride, onManualOverride: () => {
228
243
  credentials.setManualOverride(true);
229
244
  setShowCredentialForm(true);
230
245
  }, onBackToOAuth: () => {
@@ -294,7 +309,7 @@ function healthStatusText(health, accessTokenExpiresAt, tokenLifetimeHint) {
294
309
  return "Not connected yet";
295
310
  }
296
311
  }
297
- function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectionError, hasDiscoveredTools, toolCount, policyCount, credentialsLoading, oauthPhase, authMode, isOAuthConnected, connectionHealth, canDisconnect, onDisconnect, isDisconnecting, disconnectError, onClearDisconnectError, serverName, accessTokenExpiresAt, tokenLifetimeHint, isVendorApprovalPending, isVendorApprovalBlocked, vendorApprovalDocsUrl, canBringOwnApp, isOrgOAuthApp, onBringOwnApp, onRemoveOrgApp, isRemovingOrgApp, removeOrgAppError, onClearRemoveOrgAppError, manualOverride, onManualOverride, onBackToOAuth, onCancelOAuth, }) {
312
+ function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectionError, hasDiscoveredTools, credentialsLoading, oauthPhase, authMode, isOAuthConnected, connectionHealth, canDisconnect, onDisconnect, isDisconnecting, disconnectError, onClearDisconnectError, serverName, accessTokenExpiresAt, tokenLifetimeHint, isVendorApprovalPending, isVendorApprovalBlocked, vendorApprovalDocsUrl, canBringOwnApp, isOrgOAuthApp, onBringOwnApp, onRemoveOrgApp, isRemovingOrgApp, removeOrgAppError, onClearRemoveOrgAppError, manualOverride, onManualOverride, onBackToOAuth, onCancelOAuth, }) {
298
313
  const [disconnectPhase, setDisconnectPhase] = useState("idle");
299
314
  const [removeOrgAppPhase, setRemoveOrgAppPhase] = useState("idle");
300
315
  const isOAuthBusy = oauthPhase === "initiating" ||
@@ -337,7 +352,7 @@ function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectio
337
352
  if (manualOverride)
338
353
  return "Entering token manually";
339
354
  if (hasDiscoveredTools)
340
- return formatConnectionSummary(toolCount, policyCount);
355
+ return "Connected";
341
356
  return "Not connected yet";
342
357
  })();
343
358
  const pill = healthPillProps(connectionHealth, isVendorApprovalPending && !isOAuthConnected);
@@ -398,13 +413,6 @@ function oauthPhaseLabel(phase) {
398
413
  return "Connecting...";
399
414
  }
400
415
  }
401
- function formatConnectionSummary(toolCount, policyCount) {
402
- const toolLabel = `${toolCount} tool${toolCount !== 1 ? "s" : ""}`;
403
- if (policyCount === 0)
404
- return toolLabel;
405
- const policyLabel = `${policyCount} ${policyCount !== 1 ? "policies" : "policy"}`;
406
- return `${toolLabel}, ${policyLabel}`;
407
- }
408
416
  function formatTokenExpiry(expiresAtSeconds) {
409
417
  if (expiresAtSeconds === BigInt(0))
410
418
  return null;
@@ -429,14 +437,6 @@ function formatTokenExpiry(expiresAtSeconds) {
429
437
  function ValidationBanner({ message }) {
430
438
  return (_jsxs("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/30 bg-destructive-subtle px-4 py-3", children: [_jsx(WarningIcon, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-sm font-medium text-destructive", children: "Invalid Configuration" }), _jsx("p", { className: "mt-0.5 text-xs text-destructive-muted", children: message })] })] }));
431
439
  }
432
- function Header({ server, createdAt, updatedAt, lastDiscoveredAt, onVisibilityChange, isVisibilityPending, editable, isSaving, saveMcpField, }) {
433
- const meta = server.metadata;
434
- const spec = server.spec;
435
- const status = server.status;
436
- const displayName = meta?.name || meta?.slug || "Untitled";
437
- const isPublic = meta?.visibility === ApiResourceVisibility.visibility_public;
438
- return (_jsxs("div", { className: "flex items-start gap-3", children: [editable && saveMcpField ? (_jsx(InlineEditImage, { value: spec?.iconUrl ?? "", onSave: (v) => saveMcpField("iconUrl", v || undefined), isSaving: isSaving, fallback: _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }), size: "md" })) : spec?.iconUrl ? (_jsx("img", { src: spec.iconUrl, alt: "", className: "mt-0.5 size-8 shrink-0 rounded object-cover" })) : (_jsx(McpServerIcon, { className: "mt-1 size-6 shrink-0 text-muted-foreground" })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [editable && saveMcpField ? (_jsx(InlineEditText, { value: meta?.name || "", onSave: (v) => saveMcpField("name", v), isSaving: isSaving, variant: "heading", placeholder: "Server name", validate: (v) => (v.trim() ? null : "Name is required") })) : (_jsx("h2", { className: "truncate text-lg font-semibold text-foreground", children: displayName })), onVisibilityChange && meta ? (_jsx(VisibilityToggle, { visibility: meta.visibility, onVisibilityChange: onVisibilityChange, isPending: isVisibilityPending })) : (isPublic && (_jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Public" })))] }), meta?.slug && (_jsx("span", { className: "mt-0.5 block truncate font-mono text-xs text-muted-foreground", children: meta.org ? `${meta.org}/${meta.slug}` : meta.slug })), _jsxs("div", { className: "mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground", children: [meta?.org && _jsx("span", { children: meta.org }), status && (_jsx(ValidationStateBadge, { state: status.validationState })), lastDiscoveredAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Discovered ", formatDate(lastDiscoveredAt)] })] })), createdAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Created ", formatDate(createdAt)] })] })), updatedAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Updated ", formatDate(updatedAt)] })] }))] })] })] }));
439
- }
440
440
  function ValidationStateBadge({ state, }) {
441
441
  switch (state) {
442
442
  case ValidationState.valid:
@@ -452,6 +452,19 @@ const TRANSPORT_OPTIONS = [
452
452
  { value: "stdio", label: "Stdio", description: "Launch a local process with stdin/stdout" },
453
453
  ];
454
454
  function ServerConfigSection({ serverType, editable, isSaving, saveMcpField, }) {
455
+ const [headersEditing, setHeadersEditing] = useState(false);
456
+ const [queryParamsEditing, setQueryParamsEditing] = useState(false);
457
+ const currentHttpConfig = useMemo(() => {
458
+ if (serverType?.case !== "http")
459
+ return null;
460
+ const v = serverType.value;
461
+ return {
462
+ url: v.url,
463
+ headers: v.headers && Object.keys(v.headers).length > 0 ? { ...v.headers } : undefined,
464
+ queryParams: v.queryParams && Object.keys(v.queryParams).length > 0 ? { ...v.queryParams } : undefined,
465
+ timeoutSeconds: v.timeoutSeconds || undefined,
466
+ };
467
+ }, [serverType]);
455
468
  const handleTransportChange = useCallback(async (newType) => {
456
469
  if (!saveMcpField)
457
470
  return false;
@@ -466,28 +479,86 @@ function ServerConfigSection({ serverType, editable, isSaving, saveMcpField, })
466
479
  await saveMcpField("http", undefined);
467
480
  return ok;
468
481
  }, [saveMcpField]);
469
- return (_jsx(Section, { title: "Server Configuration", children: _jsxs("div", { className: "flex flex-col gap-2 p-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Type" }), editable && saveMcpField ? (_jsx(InlineEditSelect, { value: serverType?.case ?? "http", options: TRANSPORT_OPTIONS, onSave: handleTransportChange, isSaving: isSaving })) : (_jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-xs font-medium text-foreground", children: serverType?.case ?? "none" }))] }), serverType?.case === "stdio" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Command" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: `${serverType.value.command}${serverType.value.args.length > 0 ? ` ${serverType.value.args.join(" ")}` : ""}`, onSave: async (v) => {
470
- const parts = v.trim().split(/\s+/);
471
- return saveMcpField("stdio", {
472
- command: parts[0] || "",
473
- args: parts.slice(1),
474
- });
475
- }, isSaving: isSaving, placeholder: "e.g. npx -y @modelcontextprotocol/server" })) : (_jsxs("code", { className: "font-mono text-sm text-foreground", children: [serverType.value.command, serverType.value.args.length > 0 &&
476
- ` ${serverType.value.args.join(" ")}`] }))] }), (editable || serverType.value.workingDir) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Working Dir" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.workingDir ?? "", onSave: async (v) => saveMcpField("stdio", {
477
- command: serverType.value.command,
478
- args: [...serverType.value.args],
479
- workingDir: v || undefined,
480
- }), isSaving: isSaving, placeholder: "/path/to/working/dir" })) : (_jsx("code", { className: "font-mono text-xs text-foreground", children: serverType.value.workingDir }))] }))] })), serverType?.case === "http" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "URL" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.url, onSave: async (v) => saveMcpField("http", {
481
- url: v,
482
- timeoutSeconds: serverType.value.timeoutSeconds || undefined,
483
- }), isSaving: isSaving, placeholder: "https://example.com/mcp" })) : (_jsx("code", { className: "break-all font-mono text-sm text-foreground", children: serverType.value.url }))] }), (editable || serverType.value.timeoutSeconds > 0) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Timeout" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.timeoutSeconds > 0 ? String(serverType.value.timeoutSeconds) : "", onSave: async (v) => saveMcpField("http", {
484
- url: serverType.value.url,
485
- timeoutSeconds: v ? Number(v) : undefined,
486
- }), isSaving: isSaving, placeholder: "30", validate: (v) => {
487
- if (v && (isNaN(Number(v)) || Number(v) < 0))
488
- return "Must be a positive number";
489
- return null;
490
- } })) : (_jsxs("span", { className: "text-xs text-foreground", children: [serverType.value.timeoutSeconds, "s"] }))] }))] }))] }) }));
482
+ const headerRows = useMemo(() => {
483
+ if (!currentHttpConfig?.headers)
484
+ return [];
485
+ return Object.entries(currentHttpConfig.headers).map(([key, value]) => ({ key, value }));
486
+ }, [currentHttpConfig?.headers]);
487
+ const queryParamRows = useMemo(() => {
488
+ if (!currentHttpConfig?.queryParams)
489
+ return [];
490
+ return Object.entries(currentHttpConfig.queryParams).map(([key, value]) => ({ key, value }));
491
+ }, [currentHttpConfig?.queryParams]);
492
+ const handleHeadersSave = useCallback(async (rows) => {
493
+ if (!saveMcpField || !currentHttpConfig)
494
+ return false;
495
+ const headers = {};
496
+ for (const row of rows) {
497
+ if (row.key.trim())
498
+ headers[row.key.trim()] = row.value;
499
+ }
500
+ return saveMcpField("http", {
501
+ ...currentHttpConfig,
502
+ headers: Object.keys(headers).length > 0 ? headers : undefined,
503
+ });
504
+ }, [saveMcpField, currentHttpConfig]);
505
+ const handleQueryParamsSave = useCallback(async (rows) => {
506
+ if (!saveMcpField || !currentHttpConfig)
507
+ return false;
508
+ const queryParams = {};
509
+ for (const row of rows) {
510
+ if (row.key.trim())
511
+ queryParams[row.key.trim()] = row.value;
512
+ }
513
+ return saveMcpField("http", {
514
+ ...currentHttpConfig,
515
+ queryParams: Object.keys(queryParams).length > 0 ? queryParams : undefined,
516
+ });
517
+ }, [saveMcpField, currentHttpConfig]);
518
+ return (_jsxs(Section, { title: "Server Configuration", children: [_jsxs("div", { className: "flex flex-col gap-2 p-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Type" }), editable && saveMcpField ? (_jsx(InlineEditSelect, { value: serverType?.case ?? "http", options: TRANSPORT_OPTIONS, onSave: handleTransportChange, isSaving: isSaving })) : (_jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-xs font-medium text-foreground", children: serverType?.case ?? "none" }))] }), serverType?.case === "stdio" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Command" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: `${serverType.value.command}${serverType.value.args.length > 0 ? ` ${serverType.value.args.join(" ")}` : ""}`, onSave: async (v) => {
519
+ const parts = v.trim().split(/\s+/);
520
+ return saveMcpField("stdio", {
521
+ command: parts[0] || "",
522
+ args: parts.slice(1),
523
+ });
524
+ }, isSaving: isSaving, placeholder: "e.g. npx -y @modelcontextprotocol/server" })) : (_jsxs("code", { className: "font-mono text-sm text-foreground", children: [serverType.value.command, serverType.value.args.length > 0 &&
525
+ ` ${serverType.value.args.join(" ")}`] }))] }), (editable || serverType.value.workingDir) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Working Dir" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.workingDir ?? "", onSave: async (v) => saveMcpField("stdio", {
526
+ command: serverType.value.command,
527
+ args: [...serverType.value.args],
528
+ workingDir: v || undefined,
529
+ }), isSaving: isSaving, placeholder: "/path/to/working/dir" })) : (_jsx("code", { className: "font-mono text-xs text-foreground", children: serverType.value.workingDir }))] }))] })), serverType?.case === "http" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "URL" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.url, onSave: async (v) => saveMcpField("http", { ...currentHttpConfig, url: v }), isSaving: isSaving, placeholder: "https://example.com/mcp" })) : (_jsx("code", { className: "break-all font-mono text-sm text-foreground", children: serverType.value.url }))] }), (editable || serverType.value.timeoutSeconds > 0) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Timeout" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.timeoutSeconds > 0 ? String(serverType.value.timeoutSeconds) : "", onSave: async (v) => saveMcpField("http", {
530
+ ...currentHttpConfig,
531
+ timeoutSeconds: v ? Number(v) : undefined,
532
+ }), isSaving: isSaving, placeholder: "30", validate: (v) => {
533
+ if (v && (isNaN(Number(v)) || Number(v) < 0))
534
+ return "Must be a positive number";
535
+ return null;
536
+ } })) : (_jsxs("span", { className: "text-xs text-foreground", children: [serverType.value.timeoutSeconds, "s"] }))] }))] }))] }), serverType?.case === "http" && (editable || headerRows.length > 0) && (_jsx(HttpKeyValueSubsection, { title: "Headers", count: headerRows.length, rows: headerRows, editable: editable, isSaving: isSaving, editing: headersEditing, onEditingChange: setHeadersEditing, onSave: handleHeadersSave, keyLabel: "Header name" })), serverType?.case === "http" && (editable || queryParamRows.length > 0) && (_jsx(HttpKeyValueSubsection, { title: "Query Parameters", count: queryParamRows.length, rows: queryParamRows, editable: editable, isSaving: isSaving, editing: queryParamsEditing, onEditingChange: setQueryParamsEditing, onSave: handleQueryParamsSave, keyLabel: "Parameter name" }))] }));
537
+ }
538
+ /** Renders a key-value subsection (headers or query params) within ServerConfigSection. */
539
+ function HttpKeyValueSubsection({ title, count, rows, editable, isSaving, editing, onEditingChange, onSave, keyLabel, }) {
540
+ return (_jsxs("div", { className: "border-t border-border", children: [_jsxs("div", { className: "flex items-center justify-between px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: title }), count > 0 && (_jsx("span", { className: "inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-muted px-1 py-px text-[10px] font-medium leading-none text-muted-foreground", children: count }))] }), editable && (_jsx("button", { type: "button", onClick: () => onEditingChange(!editing), className: "text-[11px] text-muted-foreground underline decoration-muted-foreground/40 underline-offset-2 hover:text-foreground hover:decoration-foreground", children: editing ? "Done" : "Edit" }))] }), editable && editing ? (_jsx(InlineEditKeyValue, { value: [...rows], onSave: onSave, isSaving: isSaving, editing: editing, onEditingChange: onEditingChange, keyLabel: keyLabel, showValue: true, valueLabel: "Value" })) : (_jsx("div", { className: "flex flex-col divide-y divide-border", children: rows.map((row) => (_jsxs("div", { className: "flex items-start gap-2 px-3 py-1.5", children: [_jsx("code", { className: "shrink-0 font-mono text-xs font-medium text-foreground", children: row.key }), _jsx("span", { className: "min-w-0 break-all font-mono text-xs text-muted-foreground", children: renderHeaderValue(row.value) })] }, row.key))) }))] }));
541
+ }
542
+ const ENV_VAR_PLACEHOLDER = /\$\{([^}]+)\}/g;
543
+ /** Renders a header value, highlighting ${VAR} placeholders with a variable badge. */
544
+ function renderHeaderValue(value) {
545
+ if (!ENV_VAR_PLACEHOLDER.test(value))
546
+ return value;
547
+ ENV_VAR_PLACEHOLDER.lastIndex = 0;
548
+ const parts = [];
549
+ let lastIndex = 0;
550
+ let match;
551
+ while ((match = ENV_VAR_PLACEHOLDER.exec(value)) !== null) {
552
+ if (match.index > lastIndex) {
553
+ parts.push(value.slice(lastIndex, match.index));
554
+ }
555
+ parts.push(_jsx("span", { className: "inline-flex items-center gap-0.5 rounded bg-primary-subtle px-1 py-px text-[10px] font-medium text-primary", title: `Resolved from environment variable: ${match[1]}`, children: match[0] }, match.index));
556
+ lastIndex = match.index + match[0].length;
557
+ }
558
+ if (lastIndex < value.length) {
559
+ parts.push(value.slice(lastIndex));
560
+ }
561
+ return _jsx(_Fragment, { children: parts });
491
562
  }
492
563
  function SourceSection({ spec, }) {
493
564
  return (_jsx(Section, { title: "Source", children: _jsxs("div", { className: "flex flex-col gap-2 p-3", children: [spec.repositoryUrl && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "shrink-0 text-xs font-medium text-muted-foreground", children: "Repository" }), _jsxs("a", { href: spec.repositoryUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 break-all font-mono text-xs text-foreground underline decoration-muted-foreground/40 underline-offset-2 hover:decoration-foreground", children: [spec.repositoryUrl, _jsx(ExternalLinkIcon, { className: "size-3 shrink-0" })] })] })), spec.githubStars > 0 && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "shrink-0 text-xs font-medium text-muted-foreground", children: "Stars" }), _jsx("span", { className: "text-xs text-foreground", children: spec.githubStars.toLocaleString() })] }))] }) }));
@@ -544,24 +615,55 @@ function TagsSection({ tags, editable, isSaving, saveMcpField, }) {
544
615
  // Capability tab contents (read-only)
545
616
  // ---------------------------------------------------------------------------
546
617
  function ToolsTabContent({ tools, }) {
618
+ const [search, setSearch] = useState("");
619
+ const [expandedTool, setExpandedTool] = useState(null);
620
+ const filtered = useMemo(() => {
621
+ if (!search.trim())
622
+ return tools;
623
+ const q = search.toLowerCase();
624
+ return tools.filter((t) => t.name.toLowerCase().includes(q) ||
625
+ t.description?.toLowerCase().includes(q));
626
+ }, [tools, search]);
547
627
  if (tools.length === 0) {
548
628
  return (_jsxs("div", { className: "px-3 py-8 text-center", children: [_jsx(ConnectIcon, { className: "mx-auto mb-2 size-6 text-muted-foreground-faint" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Connect to this MCP server to discover its available tools." })] }));
549
629
  }
550
- return (_jsx("div", { className: "flex flex-col divide-y divide-border", children: tools.map((tool) => (_jsxs("div", { className: "px-3 py-2.5", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: tool.name }), tool.description && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: tool.description }))] }, tool.name))) }));
630
+ const isFiltered = search.trim().length > 0;
631
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 pb-2", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: "Search tools\u2026", "aria-label": "Search tools", className: "w-full rounded-md border border-border bg-background py-1.5 pl-7 pr-7 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring" }), isFiltered && (_jsx("button", { type: "button", onClick: () => setSearch(""), "aria-label": "Clear search", className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground", children: _jsx(CloseIcon, { className: "size-3" }) }))] }), _jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: isFiltered ? `${filtered.length} of ${tools.length}` : tools.length })] }), filtered.length === 0 ? (_jsx("div", { className: "px-3 py-6 text-center", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["No tools matching \u201C", search, "\u201D"] }) })) : (_jsx("div", { className: "max-h-96 overflow-y-auto", children: _jsx("div", { className: "flex flex-col divide-y divide-border", children: filtered.map((tool) => {
632
+ const isExpanded = expandedTool === tool.name;
633
+ const hasSchema = tool.inputSchema != null &&
634
+ Object.keys(tool.inputSchema).length > 0;
635
+ return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => setExpandedTool(isExpanded ? null : tool.name), className: "flex w-full items-start gap-2 px-3 py-2.5 text-left transition-colors hover:bg-muted-faint", "aria-expanded": isExpanded, children: [_jsx(ChevronIcon, { className: cn("mt-0.5 size-3 shrink-0 text-muted-foreground transition-transform", isExpanded && "rotate-90") }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: tool.name }), tool.description && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: tool.description }))] }), hasSchema && (_jsx("span", { className: "mt-0.5 shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: "schema" }))] }), isExpanded && hasSchema && (_jsx("div", { className: "border-t border-border bg-muted-faint px-3 py-2", children: _jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded border border-border bg-background p-2 font-mono text-[11px] text-foreground", children: JSON.stringify(tool.inputSchema, null, 2) }) }))] }, tool.name));
636
+ }) }) }))] }));
551
637
  }
552
638
  function PoliciesTabContent({ pinnedPolicies, classifiedPolicies, hasDiscoveredTools, }) {
553
- const hasPinnedPolicies = pinnedPolicies.length > 0;
554
- const hasClassifiedPolicies = classifiedPolicies.length > 0;
555
- const hasAnyPolicies = hasPinnedPolicies || hasClassifiedPolicies;
639
+ const [search, setSearch] = useState("");
640
+ const totalCount = pinnedPolicies.length + classifiedPolicies.length;
641
+ const hasAnyPolicies = totalCount > 0;
642
+ const filteredPinned = useMemo(() => {
643
+ if (!search.trim())
644
+ return pinnedPolicies;
645
+ const q = search.toLowerCase();
646
+ return pinnedPolicies.filter((p) => p.toolName.toLowerCase().includes(q) ||
647
+ p.message?.toLowerCase().includes(q));
648
+ }, [pinnedPolicies, search]);
649
+ const filteredClassified = useMemo(() => {
650
+ if (!search.trim())
651
+ return classifiedPolicies;
652
+ const q = search.toLowerCase();
653
+ return classifiedPolicies.filter((p) => p.toolName.toLowerCase().includes(q) ||
654
+ p.message?.toLowerCase().includes(q));
655
+ }, [classifiedPolicies, search]);
656
+ const filteredTotal = filteredPinned.length + filteredClassified.length;
657
+ const isFiltered = search.trim().length > 0;
556
658
  if (!hasAnyPolicies) {
557
659
  return (_jsxs("div", { className: "px-3 py-8 text-center", children: [_jsx(ShieldIcon, { className: "mx-auto mb-2 size-6 text-muted-foreground-faint" }), _jsx("p", { className: "text-xs text-muted-foreground", children: hasDiscoveredTools
558
660
  ? "No approval policies yet. Reconnect to reclassify tools."
559
661
  : "Connect to discover tools and auto-classify approval policies." })] }));
560
662
  }
561
- return (_jsxs("div", { className: "flex flex-col", children: [hasPinnedPolicies && (_jsx(PolicyGroup, { icon: _jsx(PinIcon, { className: "size-3.5" }), label: "Pinned", policies: pinnedPolicies })), hasClassifiedPolicies && (_jsx(PolicyGroup, { icon: _jsx(SparklesIcon, { className: "size-3.5" }), label: "Auto-classified", policies: classifiedPolicies }))] }));
663
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 pb-2", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: "Search policies\u2026", "aria-label": "Search policies", className: "w-full rounded-md border border-border bg-background py-1.5 pl-7 pr-7 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring" }), isFiltered && (_jsx("button", { type: "button", onClick: () => setSearch(""), "aria-label": "Clear search", className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground", children: _jsx(CloseIcon, { className: "size-3" }) }))] }), _jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: isFiltered ? `${filteredTotal} of ${totalCount}` : totalCount })] }), filteredTotal === 0 ? (_jsx("div", { className: "px-3 py-6 text-center", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["No policies matching \u201C", search, "\u201D"] }) })) : (_jsxs("div", { className: "max-h-96 overflow-y-auto", children: [filteredPinned.length > 0 && (_jsx(PolicyGroup, { icon: _jsx(PinIcon, { className: "size-3.5" }), label: "Pinned", policies: filteredPinned })), filteredClassified.length > 0 && (_jsx(PolicyGroup, { icon: _jsx(SparklesIcon, { className: "size-3.5" }), label: "Auto-classified", policies: filteredClassified }))] }))] }));
562
664
  }
563
665
  function PolicyGroup({ icon, label, policies, }) {
564
- return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1.5 border-b border-border bg-muted-faint px-3 py-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: icon }), _jsx("span", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }), _jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", policies.length, ")"] })] }), _jsx("div", { className: "flex flex-col divide-y divide-border", children: policies.map((policy) => (_jsxs("div", { className: "px-3 py-2.5", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: policy.toolName }), _jsx(ShieldIcon, { className: "size-3 text-amber-500 dark:text-amber-400" })] }), policy.message && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: policy.message }))] }, policy.toolName))) })] }));
666
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1.5 border-b border-border bg-muted-faint px-3 py-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: icon }), _jsx("span", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }), _jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", policies.length, ")"] })] }), _jsx("div", { className: "flex flex-col divide-y divide-border", children: policies.map((policy) => (_jsxs("div", { className: "px-3 py-2.5", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: policy.toolName }), _jsxs("span", { className: "inline-flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400", children: [_jsx(ShieldIcon, { className: "size-2.5" }), "requires approval"] })] }), policy.message && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: policy.message }))] }, policy.toolName))) })] }));
565
667
  }
566
668
  // ---------------------------------------------------------------------------
567
669
  // Shared layout primitives
@@ -621,6 +723,15 @@ function OAuthIcon({ className }) {
621
723
  function ExternalLinkIcon({ className }) {
622
724
  return (_jsxs("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("path", { d: "M12 8.667v4A1.333 1.333 0 0 1 10.667 14H3.333A1.333 1.333 0 0 1 2 12.667V5.333A1.333 1.333 0 0 1 3.333 4h4" }), _jsx("path", { d: "M10 2h4v4" }), _jsx("path", { d: "M6.667 9.333 14 2" })] }));
623
725
  }
726
+ function SearchIcon({ className }) {
727
+ return (_jsxs("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("circle", { cx: "7", cy: "7", r: "4.5" }), _jsx("path", { d: "m10.5 10.5 3 3" })] }));
728
+ }
729
+ function CloseIcon({ className }) {
730
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }));
731
+ }
732
+ function ChevronIcon({ className }) {
733
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m6 4 4 4-4 4" }) }));
734
+ }
624
735
  function Spinner() {
625
736
  return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
626
737
  }