@mcp-b/react-components 0.59.2 → 0.61.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 (363) hide show
  1. package/dist/{AgentActivity-DSObWhDU.d.ts → AgentActivity-DptCj8XQ.d.ts} +2 -2
  2. package/dist/{AgentChatQueue-CGR4hd7D.d.ts → AgentChatQueue-DG2rGyCI.d.ts} +1 -1
  3. package/dist/AgentToolRunsContext-Br3jZ6Up.d.ts +74 -0
  4. package/dist/{Button-ClRxb8tM.d.ts → Button-DIn-0P-0.d.ts} +4 -5
  5. package/dist/{Card-BPkXIkBz.d.ts → Card-DkGZ3jKQ.d.ts} +7 -1
  6. package/dist/{CodeBlock-DYp5V_4O.d.ts → CodeBlock-BTkag9ms.d.ts} +1 -1
  7. package/dist/{CodeBlock-Bs_Z03eC.js → CodeBlock-CNvOYR0Q.js} +1 -1
  8. package/dist/{EmployeeChrome-QSki0QT4.d.ts → EmployeeChrome-D3IgFX22.d.ts} +12 -34
  9. package/dist/{ExecutionBoard-DHfMvKlB.d.ts → ExecutionBoard-DvPGdn4F.d.ts} +2 -2
  10. package/dist/{ExecutionResult-BSZsUbrL.js → ExecutionResult-DmC21cll.js} +4 -4
  11. package/dist/{FileTree-DyLBn7O_.js → FileTree-H31EVRv_.js} +1 -1
  12. package/dist/{IconButton-43ggXEuf.d.ts → IconButton-FWsa9562.d.ts} +1 -1
  13. package/dist/{ManagerOffice-BxBKEb_j.js → ManagerOffice-B3X3iZV9.js} +27 -34
  14. package/dist/{McpConnectorForm-D4bY-lm_.d.ts → McpConnectorForm-BLsQt_er.d.ts} +1 -1
  15. package/dist/{McpPluginCatalog-2FZDLCeK.d.ts → McpPluginCatalog-SQNOytXQ.d.ts} +2 -2
  16. package/dist/{Message-CwCqa90H.d.ts → Message-BUedRDN1.d.ts} +2 -2
  17. package/dist/{MessageScrollerVirtual-DVQeEkNy.d.ts → MessageScrollerVirtual-DxL6XKq9.d.ts} +1 -1
  18. package/dist/{PromptInput-C3adKglc.d.ts → PromptInput-Dbe6WgWA.d.ts} +1 -1
  19. package/dist/{ResponsiveSidebarShell-DzBGlRJF.d.ts → ResponsiveSidebarShell-DSAMNDdg.d.ts} +1 -1
  20. package/dist/{SetupChecklist-CKQ-mKYt.js → SetupChecklist-Wo4akaSG.js} +1 -1
  21. package/dist/{ThinkChatActivity-C4_hPEmb.d.ts → ThinkChatActivity-zZaSsbC-.d.ts} +7 -3
  22. package/dist/{ThinkChatActivitySummary-ChJ8Iu2T.d.ts → ThinkChatActivitySummary-8MO1VjAJ.d.ts} +1 -1
  23. package/dist/{ThinkExecutionRun-CPeYVneQ.d.ts → ThinkExecutionRun-DJ2TFDmZ.d.ts} +1 -1
  24. package/dist/ThinkSchedule-5S834QKW.d.ts +34 -0
  25. package/dist/{Workspace-iCkXvQRJ.d.ts → Workspace-42LA9Zrb.d.ts} +1 -1
  26. package/dist/WorkspaceAutomation-B2Pdz_SU.d.ts +215 -0
  27. package/dist/{WorkspaceConcept-ByaG-kBq.d.ts → WorkspaceConcept-BjrgGE1w.d.ts} +2 -3
  28. package/dist/{WorkspaceFile-DkIZKoK6.d.ts → WorkspaceFile-nK2n0i4S.d.ts} +1 -1
  29. package/dist/{WorkspaceFileView-CsWwQA1U.js → WorkspaceFileView-BWI_AJlV.js} +8 -8
  30. package/dist/{WorkspaceLink-Buo6gKj2.d.ts → WorkspaceLink-C8HH2fMT.d.ts} +1 -0
  31. package/dist/{WorkspaceMessageResponse-DnsdpaGU.js → WorkspaceMessageResponse-BZ-_I18b.js} +3 -7
  32. package/dist/agent-tool-runs-DsOp_X2y.js +133 -0
  33. package/dist/assets/chrome.svg +1 -0
  34. package/dist/assets/plugins/plugin-github.svg +8 -0
  35. package/dist/assets/plugins/plugin-gmail.svg +1 -0
  36. package/dist/assets/plugins/plugin-google-drive.svg +1 -0
  37. package/dist/assets/plugins/plugin-google.svg +1 -0
  38. package/dist/assets/plugins/plugin-linear.svg +1 -0
  39. package/dist/assets/plugins/plugin-notion.svg +25 -0
  40. package/dist/assets/plugins/plugin-salesforce.svg +31 -0
  41. package/dist/assets/plugins/plugin-slack.svg +6 -0
  42. package/dist/chatgpt-sign-in-button-DNchrZHs.js +32 -0
  43. package/dist/{codex-model-catalog-CReSIBpd.d.ts → codex-model-catalog-CFEGgUAj.d.ts} +68 -20
  44. package/dist/components/agents-sdk/AgentActivity.d.ts +1 -1
  45. package/dist/components/agents-sdk/AgentActivity.js +5 -4
  46. package/dist/components/agents-sdk/AgentChat.d.ts +4 -4
  47. package/dist/components/agents-sdk/AgentChat.js +1 -1
  48. package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
  49. package/dist/components/agents-sdk/AgentEvent.js +5 -5
  50. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
  51. package/dist/components/agents-sdk/AgentToolRunsContext.js +78 -8
  52. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  53. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  54. package/dist/components/agents-sdk/BrowserReplay.js +2 -2
  55. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  56. package/dist/components/agents-sdk/EmployeeApp.d.ts +4 -3
  57. package/dist/components/agents-sdk/EmployeeApp.js +1 -1
  58. package/dist/components/agents-sdk/EmployeeChat.d.ts +9 -2
  59. package/dist/components/agents-sdk/EmployeeChat.js +13 -9
  60. package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
  61. package/dist/components/agents-sdk/EmployeeChrome.js +42 -30
  62. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +10 -10
  63. package/dist/components/agents-sdk/EmployeeSchedules.js +39 -39
  64. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +3 -3
  65. package/dist/components/agents-sdk/EmployeeStartScreen.js +3 -3
  66. package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
  67. package/dist/components/agents-sdk/ExecutionBoard.js +6 -32
  68. package/dist/components/agents-sdk/ManagerAccountActions.js +2 -2
  69. package/dist/components/agents-sdk/ManagerOffice.d.ts +10 -14
  70. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  71. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  72. package/dist/components/agents-sdk/ManagerOfficeScreens.js +3 -3
  73. package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
  74. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  75. package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -1
  76. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  77. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
  78. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -3
  79. package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
  80. package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
  81. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  82. package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
  83. package/dist/components/agents-sdk/ModelSelector.d.ts +2 -2
  84. package/dist/components/agents-sdk/ModelSelector.js +7 -6
  85. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  86. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  87. package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +4 -2
  88. package/dist/components/agents-sdk/SubagentRunIndicator.js +4 -3
  89. package/dist/components/agents-sdk/SubagentRunLanes.d.ts +38 -0
  90. package/dist/components/agents-sdk/SubagentRunLanes.js +160 -0
  91. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +3 -28
  92. package/dist/components/agents-sdk/SubagentRunPanel.js +143 -188
  93. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +1 -1
  94. package/dist/components/agents-sdk/ThinkChat.d.ts +4 -7
  95. package/dist/components/agents-sdk/ThinkChat.js +5 -8
  96. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  97. package/dist/components/agents-sdk/ThinkChatActivity.js +27 -26
  98. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  99. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +28 -28
  100. package/dist/components/agents-sdk/ThinkChatToolPanels.js +12 -27
  101. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
  102. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
  103. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +1 -1
  104. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  105. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  106. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -16
  107. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
  108. package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -0
  109. package/dist/components/agents-sdk/ThinkSchedule.js +9 -0
  110. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +42 -0
  111. package/dist/components/agents-sdk/{ThinkRoutineActions.js → ThinkScheduleActions.js} +35 -35
  112. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +24 -0
  113. package/dist/components/agents-sdk/{ThinkRoutineBrowser.js → ThinkScheduleBrowser.js} +46 -44
  114. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +19 -0
  115. package/dist/components/agents-sdk/ThinkScheduleDetail.js +139 -0
  116. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +58 -0
  117. package/dist/components/agents-sdk/ThinkScheduleForm.js +686 -0
  118. package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
  119. package/dist/components/agents-sdk/WorkbenchBack.d.ts +1 -1
  120. package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
  121. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  122. package/dist/components/agents-sdk/Workspace.js +1 -1
  123. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +2 -0
  124. package/dist/components/agents-sdk/WorkspaceAutomation.js +791 -0
  125. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +2 -0
  126. package/dist/components/agents-sdk/{WorkspaceExecutionTable.js → WorkspaceAutomationTable.js} +45 -65
  127. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  128. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  129. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +2 -2
  130. package/dist/components/agents-sdk/WorkspaceConcept.js +1 -1
  131. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +28 -8
  132. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +104 -254
  133. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -2
  134. package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -4
  135. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  136. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  137. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  138. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  139. package/dist/components/agents-sdk/WorkspaceLink.d.ts +3 -2
  140. package/dist/components/agents-sdk/WorkspaceLink.js +2 -1
  141. package/dist/components/agents-sdk/WorkspaceLive.d.ts +13 -6
  142. package/dist/components/agents-sdk/WorkspaceLive.js +2 -0
  143. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +37 -2
  144. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  145. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +1 -1
  146. package/dist/components/agents-sdk/WorkspacePerson.d.ts +30 -0
  147. package/dist/components/agents-sdk/WorkspacePerson.js +100 -0
  148. package/dist/components/agents-sdk/WorkspaceProject.d.ts +24 -60
  149. package/dist/components/agents-sdk/WorkspaceProject.js +82 -184
  150. package/dist/components/ai-sdk/Activity.js +1 -1
  151. package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
  152. package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
  153. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +2 -2
  154. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  155. package/dist/components/ai-sdk/Approval.js +2 -2
  156. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  157. package/dist/components/ai-sdk/Artifact.js +2 -2
  158. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  159. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  160. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  161. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  162. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  163. package/dist/components/ai-sdk/ComposerLink.js +1 -1
  164. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +51 -63
  165. package/dist/components/ai-sdk/ConnectedAppCards.js +42 -365
  166. package/dist/components/ai-sdk/Context.js +2 -2
  167. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  168. package/dist/components/ai-sdk/Conversation.js +3 -3
  169. package/dist/components/ai-sdk/Goal.js +2 -2
  170. package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
  171. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  172. package/dist/components/ai-sdk/Message.d.ts +1 -1
  173. package/dist/components/ai-sdk/Message.js +13 -5
  174. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  175. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  176. package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +1 -1
  177. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  178. package/dist/components/ai-sdk/Plan.js +1 -1
  179. package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
  180. package/dist/components/ai-sdk/PromptInput.js +4 -4
  181. package/dist/components/ai-sdk/Queue.d.ts +1 -1
  182. package/dist/components/ai-sdk/Queue.js +2 -2
  183. package/dist/components/ai-sdk/Reasoning.js +1 -1
  184. package/dist/components/ai-sdk/Sources.js +1 -1
  185. package/dist/components/ai-sdk/Task.js +1 -1
  186. package/dist/components/ai-sdk/ToolInvocation.js +1 -1
  187. package/dist/components/extension/ChatGptSignInScreen.d.ts +17 -4
  188. package/dist/components/extension/ChatGptSignInScreen.js +32 -32
  189. package/dist/components/extension/CodexModelSelector.d.ts +1 -1
  190. package/dist/components/extension/CodexModelSelector.js +1 -1
  191. package/dist/components/extension/ConversationTabPicker.js +1 -1
  192. package/dist/components/extension/FirstRunSetup.d.ts +117 -0
  193. package/dist/components/extension/FirstRunSetup.js +1175 -0
  194. package/dist/components/foundations/AlertDialog.d.ts +1 -1
  195. package/dist/components/foundations/AppIcon.d.ts +5 -2
  196. package/dist/components/foundations/Button.d.ts +1 -1
  197. package/dist/components/foundations/Button.js +2 -2
  198. package/dist/components/foundations/Card.d.ts +1 -1
  199. package/dist/components/foundations/Card.js +2 -2
  200. package/dist/components/foundations/Checkbox.js +1 -1
  201. package/dist/components/foundations/Collapsible.js +1 -1
  202. package/dist/components/foundations/ContextMenu.js +1 -1
  203. package/dist/components/foundations/DescriptionList.d.ts +3 -1
  204. package/dist/components/foundations/DescriptionList.js +2 -1
  205. package/dist/components/foundations/IconButton.d.ts +1 -1
  206. package/dist/components/foundations/LinkButton.d.ts +1 -1
  207. package/dist/components/foundations/Menubar.js +1 -1
  208. package/dist/components/foundations/Popover.js +1 -1
  209. package/dist/components/foundations/SearchField.js +1 -1
  210. package/dist/components/foundations/Select.js +1 -1
  211. package/dist/components/foundations/Stepper.js +1 -1
  212. package/dist/components/foundations/Toast.js +1 -1
  213. package/dist/components/foundations/Toggle.d.ts +2 -4
  214. package/dist/components/foundations/Toggle.js +3 -7
  215. package/dist/components/foundations/ToggleGroup.d.ts +2 -4
  216. package/dist/components/foundations/ToggleGroup.js +4 -16
  217. package/dist/components/foundations/icons.d.ts +2 -2
  218. package/dist/components/foundations/icons.js +2 -2
  219. package/dist/components/general-purpose/ActionGuide.d.ts +1 -1
  220. package/dist/components/general-purpose/Commit.d.ts +1 -1
  221. package/dist/components/general-purpose/Commit.js +3 -3
  222. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  223. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  224. package/dist/components/general-purpose/FileTree.js +1 -1
  225. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  226. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  227. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  228. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  229. package/dist/components/general-purpose/ResponsiveSidebarShell.js +2 -2
  230. package/dist/components/general-purpose/SettingsFormDialog.js +1 -1
  231. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  232. package/dist/components/general-purpose/Terminal.d.ts +2 -2
  233. package/dist/components/general-purpose/Terminal.js +2 -2
  234. package/dist/components/general-purpose/TestResults.js +1 -1
  235. package/dist/components/general-purpose/ThemeModeControl.js +2 -2
  236. package/dist/components/general-purpose/WebPreview.d.ts +1 -1
  237. package/dist/components/general-purpose/WebPreview.js +1 -1
  238. package/dist/components/nanites/AgentConnection.js +3 -3
  239. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  240. package/dist/components/nanites/AgentToolDetail.js +3 -3
  241. package/dist/connected-app-drafts-B9i69bkj.js +283 -0
  242. package/dist/{copy-button-BIfY5M-D.d.ts → copy-button-B09hHWd1.d.ts} +1 -1
  243. package/dist/{copy-button-M4sAp9xS.js → copy-button-z20VEXRF.js} +1 -1
  244. package/dist/{execution-result-DWVmm-bL.js → execution-result-DAuW4VWv.js} +30 -2
  245. package/dist/{icons-Dj6id76o.d.ts → icons-CReP3qYl.d.ts} +7 -1
  246. package/dist/{icons-DvlrWt54.js → icons-Yp99gmMC.js} +8 -2
  247. package/dist/{mcp-server-catalog-kaMWaSAL.d.ts → mcp-server-catalog-Di4N46H9.d.ts} +9 -3
  248. package/dist/navigation-link-zK6z8Gn3.d.ts +18 -0
  249. package/dist/scheduled-table-source-NZR1vFc_.js +38 -0
  250. package/dist/styles/accessibility.css +22 -9
  251. package/dist/styles/accordion.css +2 -2
  252. package/dist/styles/activity-header.css +14 -11
  253. package/dist/styles/activity.css +6 -13
  254. package/dist/styles/agent-attention.css +0 -23
  255. package/dist/styles/agent-chat.css +8 -3
  256. package/dist/styles/agent-connection.css +2 -2
  257. package/dist/styles/app-icon.css +7 -0
  258. package/dist/styles/app-top-bar.css +3 -11
  259. package/dist/styles/approval.css +2 -2
  260. package/dist/styles/base.css +3 -1
  261. package/dist/styles/browser-live-screen.css +3 -1
  262. package/dist/styles/browser-run-panel.css +2 -2
  263. package/dist/styles/button.css +13 -44
  264. package/dist/styles/card.css +42 -5
  265. package/dist/styles/chain-of-thought.css +2 -8
  266. package/dist/styles/chatgpt-sign-in-screen.css +91 -83
  267. package/dist/styles/checkbox-group.css +2 -1
  268. package/dist/styles/checkbox.css +4 -6
  269. package/dist/styles/code-block.css +2 -1
  270. package/dist/styles/codex-model-selector.css +2 -2
  271. package/dist/styles/collapsible.css +2 -2
  272. package/dist/styles/color-contrast.test.ts +1 -0
  273. package/dist/styles/combobox.css +5 -9
  274. package/dist/styles/commit.css +2 -7
  275. package/dist/styles/composer-link.css +0 -10
  276. package/dist/styles/connected-app-card.css +32 -32
  277. package/dist/styles/context-menu.css +2 -2
  278. package/dist/styles/description-list.css +14 -0
  279. package/dist/styles/execution-board.css +1 -1
  280. package/dist/styles/execution-result.css +161 -0
  281. package/dist/styles/file-tree.css +5 -9
  282. package/dist/styles/first-run-setup.css +751 -0
  283. package/dist/styles/index.css +5 -2
  284. package/dist/styles/inline-citation.css +2 -10
  285. package/dist/styles/manager-office.css +16 -43
  286. package/dist/styles/marker.css +2 -2
  287. package/dist/styles/media-preview-card.css +2 -7
  288. package/dist/styles/message-scroller.css +3 -2
  289. package/dist/styles/model-selector.css +19 -15
  290. package/dist/styles/navigation-menu.css +4 -4
  291. package/dist/styles/number-field.css +2 -3
  292. package/dist/styles/preview-card.css +2 -2
  293. package/dist/styles/prompt-input.css +5 -15
  294. package/dist/styles/queue.css +2 -7
  295. package/dist/styles/radio.css +4 -6
  296. package/dist/styles/recipes.css +25 -52
  297. package/dist/styles/resizable-side-panel.css +3 -2
  298. package/dist/styles/responsive-sidebar-shell.css +1 -6
  299. package/dist/styles/scroll-area.css +3 -2
  300. package/dist/styles/scrollbars.css +2 -0
  301. package/dist/styles/search-field.css +1 -2
  302. package/dist/styles/slider.css +4 -5
  303. package/dist/styles/sources.css +2 -7
  304. package/dist/styles/stepper.css +4 -4
  305. package/dist/styles/streamdown.css +8 -1
  306. package/dist/styles/subagent-run.css +123 -12
  307. package/dist/styles/switch.css +4 -7
  308. package/dist/styles/tabs.css +5 -4
  309. package/dist/styles/task.css +2 -7
  310. package/dist/styles/test-results.css +2 -7
  311. package/dist/styles/theme-mode-control.css +0 -6
  312. package/dist/styles/think-chat-activity.css +0 -8
  313. package/dist/styles/think-execution-status.css +1 -1
  314. package/dist/styles/think-execution-workbench.css +3 -3
  315. package/dist/styles/think-full-app.css +3 -2
  316. package/dist/styles/{think-routine.css → think-schedule.css} +64 -80
  317. package/dist/styles/toggle-group.css +9 -6
  318. package/dist/styles/toggle.css +23 -15
  319. package/dist/styles/toolbar.css +0 -6
  320. package/dist/styles/workspace-automation.css +233 -0
  321. package/dist/styles/workspace-concepts.css +18 -412
  322. package/dist/styles/workspace-entity-card.css +146 -0
  323. package/dist/styles/workspace-explorer.css +4 -3
  324. package/dist/utils/codex-model-catalog.d.ts +1 -1
  325. package/dist/utils/codex-model-catalog.js +51 -19
  326. package/dist/utils/mcp-server-catalog.d.ts +2 -2
  327. package/dist/utils/mcp-server-catalog.js +108 -21
  328. package/dist/utils/structured-code.d.ts +1 -1
  329. package/dist/{workspace-assets-DVn0d-fN.js → workspace-assets-Dq5toMQc.js} +34 -38
  330. package/dist/workspace-concept-panel-CxZfmFkP.js +66 -0
  331. package/dist/workspace-concept-panel-CxuqDi4m.d.ts +21 -0
  332. package/dist/{workspace-delete-CMY1kPkq.js → workspace-delete-CoB0l6ZU.js} +2 -1
  333. package/dist/workspace-entity-card-2TC3RPKh.d.ts +7 -0
  334. package/dist/workspace-entity-card-B1aV-jBj.js +61 -0
  335. package/dist/workspace-person-BSgvRjZE.d.ts +24 -0
  336. package/dist/workspace-person-BVkYb3dv.js +116 -0
  337. package/package.json +28 -28
  338. package/dist/AgentToolRunsContext-DniwGn96.d.ts +0 -18
  339. package/dist/Correspondent-ANkZHGEa.d.ts +0 -60
  340. package/dist/ThinkRoutine-DoZjbzyn.d.ts +0 -41
  341. package/dist/WorkspaceConceptPanel-D21iRsWm.js +0 -23
  342. package/dist/WorkspaceExecutionTable-DNhj6YDX.d.ts +0 -239
  343. package/dist/WorkspaceMessageResponse-D8FGgIQU.d.ts +0 -39
  344. package/dist/components/agents-sdk/SubagentRunList.d.ts +0 -17
  345. package/dist/components/agents-sdk/SubagentRunList.js +0 -26
  346. package/dist/components/agents-sdk/ThinkRoutine.d.ts +0 -2
  347. package/dist/components/agents-sdk/ThinkRoutine.js +0 -9
  348. package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +0 -42
  349. package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +0 -25
  350. package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +0 -19
  351. package/dist/components/agents-sdk/ThinkRoutineDetail.js +0 -97
  352. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +0 -59
  353. package/dist/components/agents-sdk/ThinkRoutineForm.js +0 -744
  354. package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +0 -15
  355. package/dist/components/agents-sdk/ThinkRoutineRuns.js +0 -52
  356. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +0 -2
  357. package/dist/components/agents-sdk/WorkspaceExecution.js +0 -843
  358. package/dist/components/agents-sdk/WorkspaceExecutionTable.d.ts +0 -2
  359. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +0 -36
  360. package/dist/components/agents-sdk/WorkspaceUserScript.js +0 -153
  361. package/dist/components/ai-sdk/Correspondent.d.ts +0 -2
  362. package/dist/components/ai-sdk/Correspondent.js +0 -145
  363. package/dist/styles/correspondent.css +0 -73
@@ -1,843 +0,0 @@
1
- import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { Button } from "../foundations/Button.js";
3
- import { K as SpinnerIcon, S as FileIcon, T as InfoIcon, V as QueueIcon, Y as StopIcon, d as CheckIcon, p as ChevronRightIcon, q as SplitIcon, r as ArrowLeftIcon, u as CalendarIcon, z as PlayIcon } from "../../icons-DvlrWt54.js";
4
- import { a as formatErrorMessage, r as firstLine } from "../../format-CWaZEp5o.js";
5
- import { Field } from "../foundations/Field.js";
6
- import { Form } from "../foundations/Form.js";
7
- import { Tabs } from "../foundations/Tabs.js";
8
- import { IconButton } from "../foundations/IconButton.js";
9
- import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
10
- import { Card, CardAction, CardContent, CardHeader, CardTitle } from "../foundations/Card.js";
11
- import { DescriptionList } from "../foundations/DescriptionList.js";
12
- import { Input } from "../foundations/Input.js";
13
- import { EmptyState } from "../foundations/EmptyState.js";
14
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
15
- import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
16
- import { i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
17
- import { a as httpUrl, i as WorkspaceComposerLink, n as Hint, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
18
- import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
19
- import { ExecutionBoard } from "./ExecutionBoard.js";
20
- import { Checkbox } from "../foundations/Checkbox.js";
21
- import { t as WorkspaceDeleteControl } from "../../workspace-delete-CMY1kPkq.js";
22
- import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
23
- import { WorkspaceExecutionTable } from "./WorkspaceExecutionTable.js";
24
- import * as React from "react";
25
- import { createElement } from "react";
26
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
27
- import { useMutation, useMutationState, useQuery } from "@tanstack/react-query";
28
- //#region src/components/agents-sdk/WorkspaceExecution.tsx
29
- function draftFrom(parameters) {
30
- return Object.fromEntries(parameters.flatMap((parameter) => parameter.value === void 0 ? [] : [[parameter.name, parameter.type === "boolean" ? Boolean(parameter.value) : String(parameter.value)]]));
31
- }
32
- /**
33
- * Values for one run. Empty and untouched fields stay absent so module
34
- * defaults work. Schema types improve the input but never gate execution.
35
- */
36
- function collectRunParameters(parameters, draft) {
37
- const collected = [];
38
- for (const parameter of parameters) {
39
- if (parameter.type === "boolean") {
40
- if (Object.hasOwn(draft, parameter.name)) collected.push({
41
- ...parameter,
42
- value: Boolean(draft[parameter.name])
43
- });
44
- continue;
45
- }
46
- const raw = draft[parameter.name];
47
- const text = (typeof raw === "string" ? raw : String(raw ?? "")).trim();
48
- if (text === "") continue;
49
- if (parameter.type === "number") {
50
- const numeric = Number(text);
51
- collected.push({
52
- ...parameter,
53
- value: Number.isFinite(numeric) ? numeric : text
54
- });
55
- continue;
56
- }
57
- collected.push({
58
- ...parameter,
59
- value: text
60
- });
61
- }
62
- return collected;
63
- }
64
- function snapshotValue(parameter) {
65
- if (parameter.value === void 0) return "";
66
- if (parameter.type === "boolean") return parameter.value ? "Yes" : "No";
67
- return String(parameter.value);
68
- }
69
- function ExecutionIcon({ module }) {
70
- return module.icon ?? /* @__PURE__ */ jsx(QueueIcon, {});
71
- }
72
- function WorkflowApps({ graph, compact = false }) {
73
- const apps = /* @__PURE__ */ new Map();
74
- for (const node of graph?.nodes ?? []) for (const link of node.links ?? []) {
75
- const href = httpUrl(link.href);
76
- if (href && !apps.has(new URL(href).hostname)) apps.set(new URL(href).hostname, {
77
- ...link,
78
- href
79
- });
80
- }
81
- if (apps.size === 0) return null;
82
- return /* @__PURE__ */ jsx("div", {
83
- className: "workspace-execution-apps",
84
- "aria-label": "Apps used",
85
- children: [...apps.values()].map((app) => /* @__PURE__ */ jsx(Hint, {
86
- content: compact ? app.label : new URL(app.href).hostname,
87
- children: /* @__PURE__ */ jsxs("a", {
88
- href: app.href,
89
- target: "_blank",
90
- rel: "noreferrer",
91
- "aria-label": app.label,
92
- children: [/* @__PURE__ */ jsx(FaviconMark, {
93
- href: app.href,
94
- fallback: /* @__PURE__ */ jsx(QueueIcon, {})
95
- }), !compact ? /* @__PURE__ */ jsx("span", { children: app.label }) : null]
96
- })
97
- }, app.href))
98
- });
99
- }
100
- function missingRequiredInput(parameters, draft) {
101
- return parameters.some((parameter) => parameter.required && (draft[parameter.name] === void 0 || draft[parameter.name] === ""));
102
- }
103
- function RunOptions({ initiallyOpen, children, className }) {
104
- const [open, setOpen] = React.useState(initiallyOpen);
105
- return /* @__PURE__ */ jsxs("details", {
106
- className,
107
- open,
108
- onToggle: (event) => setOpen(event.currentTarget.open),
109
- children: [/* @__PURE__ */ jsx("summary", { children: "Run options" }), children]
110
- });
111
- }
112
- function RunLinks({ runs }) {
113
- return /* @__PURE__ */ jsx("div", {
114
- className: "sigvelo-cluster",
115
- children: runs.map((run) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
116
- value: run.path,
117
- label: run.label,
118
- onOpen: run.onOpen
119
- }, run.path))
120
- });
121
- }
122
- function ExecutionFields({ draft, parameters, onDraftChange }) {
123
- const fieldId = React.useId();
124
- const editing = draft != null && onDraftChange != null;
125
- const visibleParameters = editing ? parameters : parameters.filter((parameter) => snapshotValue(parameter) !== "");
126
- if (visibleParameters.length === 0) return null;
127
- return /* @__PURE__ */ jsx(DescriptionList.Root, {
128
- align: "start",
129
- variant: "divided",
130
- children: visibleParameters.map((parameter) => {
131
- const id = `${fieldId}-${parameter.name}`;
132
- const parameterLabel = parameter.label;
133
- const help = [parameter.description, parameter.required ? "Required." : void 0].filter(Boolean).join(" ");
134
- const href = parameter.type === "string" ? httpUrl(String(editing ? draft?.[parameter.name] ?? parameter.value : parameter.value)) : void 0;
135
- return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsxs(DescriptionList.Term, { children: [
136
- href && !editing ? /* @__PURE__ */ jsx(FaviconMark, { href }) : null,
137
- editing && parameter.type !== "boolean" ? /* @__PURE__ */ jsx("label", {
138
- htmlFor: id,
139
- children: parameterLabel
140
- }) : /* @__PURE__ */ jsx("span", {
141
- id: parameter.type === "boolean" ? id : void 0,
142
- children: parameterLabel
143
- }),
144
- help ? /* @__PURE__ */ jsx(IconButton, {
145
- label: `About ${parameterLabel}`,
146
- tooltip: help,
147
- variant: "ghost",
148
- color: "neutral",
149
- children: /* @__PURE__ */ jsx(InfoIcon, {})
150
- }) : null
151
- ] }), /* @__PURE__ */ jsxs(DescriptionList.Details, { children: [editing && parameter.type === "boolean" ? /* @__PURE__ */ jsx(Checkbox.Root, {
152
- checked: draft?.[parameter.name] === true,
153
- indeterminate: draft?.[parameter.name] === void 0,
154
- "aria-labelledby": id,
155
- "aria-describedby": help ? `${id}-description` : void 0,
156
- onCheckedChange: (checked) => {
157
- if (typeof checked === "boolean") onDraftChange?.(parameter.name, checked);
158
- },
159
- children: /* @__PURE__ */ jsx(Checkbox.Indicator, {})
160
- }) : editing ? /* @__PURE__ */ jsx(Input, {
161
- id,
162
- name: parameter.name,
163
- "aria-describedby": help ? `${id}-description` : void 0,
164
- type: href ? "url" : void 0,
165
- value: String(draft?.[parameter.name] ?? ""),
166
- autoComplete: "off",
167
- inputMode: parameter.type === "number" ? "decimal" : void 0,
168
- onChange: (event) => onDraftChange?.(parameter.name, event.currentTarget.value)
169
- }) : snapshotValue(parameter), help ? /* @__PURE__ */ jsx("span", {
170
- id: `${id}-description`,
171
- className: "sigvelo-visually-hidden",
172
- children: help
173
- }) : null] })] }, parameter.name);
174
- })
175
- });
176
- }
177
- function ExecutionActions({ busy, module, canQuickRun, onStop, stopping }) {
178
- return /* @__PURE__ */ jsxs(CardAction, {
179
- className: "workspace-execution-card__actions",
180
- children: [
181
- module.trace?.status === "running" && module.onStop ? /* @__PURE__ */ jsx(IconButton, {
182
- label: "Stop run",
183
- variant: "ghost",
184
- color: "neutral",
185
- onClick: onStop,
186
- disabled: stopping,
187
- children: /* @__PURE__ */ jsx(StopIcon, {})
188
- }) : module.onRun && canQuickRun ? /* @__PURE__ */ jsx(IconButton, {
189
- type: "submit",
190
- label: `Run now: ${module.name}`,
191
- tooltip: "Run",
192
- variant: "ghost",
193
- color: "neutral",
194
- disabled: busy,
195
- children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
196
- }) : null,
197
- module.onSchedule && !module.onOpenBoard ? /* @__PURE__ */ jsx(IconButton, {
198
- label: `Schedule ${module.name}`,
199
- tooltip: "Schedule",
200
- variant: "ghost",
201
- color: "neutral",
202
- onClick: module.onSchedule,
203
- children: /* @__PURE__ */ jsx(CalendarIcon, {})
204
- }) : null,
205
- module.onOpenBoard ? /* @__PURE__ */ jsx(IconButton, {
206
- label: `Open workflow: ${module.name}`,
207
- tooltip: "Open workflow",
208
- variant: "ghost",
209
- color: "neutral",
210
- onClick: module.onOpenBoard,
211
- children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
212
- }) : null,
213
- module.description && !module.onOpenBoard ? /* @__PURE__ */ jsx(IconButton, {
214
- label: `About ${module.name}`,
215
- tooltip: module.description,
216
- variant: "ghost",
217
- color: "neutral",
218
- children: /* @__PURE__ */ jsx(InfoIcon, {})
219
- }) : null,
220
- module.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
221
- name: module.name,
222
- onDelete: module.onDelete
223
- }) : null
224
- ]
225
- });
226
- }
227
- function executionFormKey(module) {
228
- return `${module.path}:${JSON.stringify(module.parameters)}`;
229
- }
230
- function useExecutionSession(module) {
231
- const localKey = React.useId();
232
- const mutationKey = module.mutationKey ?? ["workspace-execution", localKey];
233
- const runs = useMutationState({
234
- filters: {
235
- mutationKey,
236
- exact: true
237
- },
238
- select: (mutation) => mutation.state
239
- });
240
- const [draft, setDraft] = React.useState(() => draftFrom(runs.at(-1)?.variables ?? module.parameters));
241
- const formKey = executionFormKey(module);
242
- const [seenFormKey, setSeenFormKey] = React.useState(formKey);
243
- if (formKey !== seenFormKey) {
244
- setSeenFormKey(formKey);
245
- setDraft(draftFrom(module.parameters));
246
- }
247
- const runMutation = useMutation({
248
- mutationKey,
249
- onMutate: () => module.trace?.executionId,
250
- mutationFn: async (parameters) => {
251
- if (!module.onRun) throw new Error("Execution is no longer available.");
252
- return module.onRun(parameters);
253
- }
254
- });
255
- const latestRun = runs.at(-1) ?? runMutation;
256
- const busy = runMutation.isPending || latestRun.status === "pending" || module.trace?.status === "running";
257
- const stopMutation = useMutation({
258
- onMutate: () => module.trace?.executionId,
259
- mutationFn: async () => module.onStop?.()
260
- });
261
- const superseded = module.trace !== void 0 && latestRun.status !== "pending" && module.trace.executionId !== latestRun.context && module.trace.executionId !== latestRun.data?.executionId;
262
- const error = (stopMutation.context === module.trace?.executionId ? stopMutation.error : null) ?? (superseded ? null : latestRun.error);
263
- return {
264
- draft,
265
- setDraft,
266
- runMutation,
267
- stopMutation,
268
- busy,
269
- errorMessage: error ? executionErrorSummary(formatErrorMessage(error)) : "",
270
- outcome: !superseded && latestRun.status === "success" ? latestRun.data : void 0,
271
- runStatus: latestRun.status
272
- };
273
- }
274
- function WorkspaceExecutionCard({ module, ...props }) {
275
- return /* @__PURE__ */ createElement(WorkspaceExecutionCardSession, {
276
- ...props,
277
- key: module.path,
278
- module
279
- });
280
- }
281
- function executionCardStatus(module, busy, hasError, hasOutcome) {
282
- if (busy) return "Running";
283
- if (hasError) return "Failed";
284
- if (module.trace?.status === "aborted") return "Stopped";
285
- if (module.trace?.status === "interrupted") return "Interrupted";
286
- return hasOutcome ? "Completed" : void 0;
287
- }
288
- function WorkspaceExecutionCardMeta({ module, busy, cardError, cardOutcome }) {
289
- const lastRun = cardOutcome?.runs[0] ?? module.runs?.[0];
290
- const status = executionCardStatus(module, busy, Boolean(cardError), Boolean(cardOutcome));
291
- return /* @__PURE__ */ jsxs("div", {
292
- className: "workspace-execution-card__meta",
293
- children: [
294
- /* @__PURE__ */ jsx(WorkflowApps, {
295
- graph: module.trace?.graph ?? module.graph,
296
- compact: true
297
- }),
298
- status ? /* @__PURE__ */ jsxs("span", {
299
- className: "workspace-execution-status",
300
- role: "status",
301
- "aria-atomic": "true",
302
- children: [busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : cardOutcome && !cardError ? /* @__PURE__ */ jsx(CheckIcon, {}) : null, status]
303
- }) : null,
304
- lastRun ? /* @__PURE__ */ jsx(RunLinks, { runs: [lastRun] }) : null
305
- ]
306
- });
307
- }
308
- function WorkspaceExecutionCardBody({ module, draft, setDraft, busy, errorMessage, outcome }) {
309
- const editing = module.onRun != null;
310
- const cardOutcome = outcome ?? (module.trace?.status === "completed" ? {
311
- result: module.trace.result,
312
- logs: module.trace.logs,
313
- runs: []
314
- } : void 0);
315
- const cardError = errorMessage || (module.trace?.error ? firstLine(executionErrorSummary(module.trace.error)) : "");
316
- return /* @__PURE__ */ jsxs(CardContent, {
317
- className: "workspace-execution-card__body",
318
- children: [
319
- /* @__PURE__ */ jsx(WorkspaceExecutionCardMeta, {
320
- module,
321
- busy,
322
- cardError,
323
- cardOutcome
324
- }),
325
- !module.onOpenBoard && (cardOutcome?.result ?? module.trace?.result) != null ? /* @__PURE__ */ jsx("p", {
326
- className: "workspace-execution-card__summary",
327
- children: firstLine(executionResultSummary(cardOutcome?.result ?? module.trace?.result))
328
- }) : null,
329
- editing && !module.onOpenBoard && module.parameters.length > 0 ? /* @__PURE__ */ jsx(RunOptions, {
330
- className: "workspace-execution-card__options",
331
- initiallyOpen: missingRequiredInput(module.parameters, draft),
332
- children: /* @__PURE__ */ jsx(ExecutionFields, {
333
- draft,
334
- parameters: module.parameters,
335
- onDraftChange: (name, value) => setDraft((current) => ({
336
- ...current,
337
- [name]: value
338
- }))
339
- })
340
- }, executionFormKey(module)) : null,
341
- cardError ? /* @__PURE__ */ jsx(Field.Errors, { errors: [cardError] }) : null
342
- ]
343
- });
344
- }
345
- function WorkspaceExecutionCardSession({ className, module, ref, ...props }) {
346
- const titleId = React.useId();
347
- const ariaLabel = props["aria-label"];
348
- const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
349
- const editing = module.onRun != null;
350
- const { draft, setDraft, runMutation, stopMutation, busy, errorMessage, outcome } = useExecutionSession(module);
351
- const header = /* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsxs(CardTitle, {
352
- id: titleId,
353
- className: "connected-app-card__title",
354
- render: (props) => /* @__PURE__ */ jsx("h3", {
355
- ...props,
356
- children: props.children
357
- }),
358
- children: [/* @__PURE__ */ jsx("span", {
359
- className: "connected-app-card__icon",
360
- "aria-hidden": "true",
361
- children: /* @__PURE__ */ jsx(ExecutionIcon, { module })
362
- }), module.name]
363
- }), /* @__PURE__ */ jsx(ExecutionActions, {
364
- busy,
365
- module,
366
- canQuickRun: !module.onOpenBoard || !missingRequiredInput(module.parameters, draft),
367
- onStop: () => stopMutation.mutate(),
368
- stopping: stopMutation.isPending
369
- })] });
370
- const body = /* @__PURE__ */ jsx(WorkspaceExecutionCardBody, {
371
- module,
372
- draft,
373
- setDraft,
374
- busy,
375
- errorMessage,
376
- outcome
377
- });
378
- const inner = editing ? /* @__PURE__ */ jsxs(Form, {
379
- noValidate: true,
380
- onSubmit: (event) => {
381
- event.preventDefault();
382
- if (!busy) {
383
- stopMutation.reset();
384
- runMutation.mutate(collectRunParameters(module.parameters, draft));
385
- }
386
- },
387
- children: [header, body]
388
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [header, body] });
389
- return /* @__PURE__ */ jsx(Card, {
390
- ...props,
391
- ref,
392
- role: props.role ?? "article",
393
- "aria-labelledby": ariaLabelledBy,
394
- "data-slot": "workspace-execution-card",
395
- size: "sm",
396
- className: cx("connected-app-card", "workspace-execution-card", className),
397
- children: inner
398
- });
399
- }
400
- /**
401
- * Compact inline card for one queried execution module.
402
- */
403
- function WorkspaceExecutionFile({ fallback = null, path, source, ...props }) {
404
- const module = useQuery(source.queryOptions).data?.find((candidate) => candidate.path === path);
405
- if (!module) return fallback;
406
- return /* @__PURE__ */ jsx(WorkspaceExecutionCard, {
407
- ...props,
408
- module: executionWithSource(module, source)
409
- }, JSON.stringify(source.queryOptions.queryKey));
410
- }
411
- function workspaceExecutionModules(entries, source) {
412
- const modules = entries.map((module) => executionWithSource(module, source));
413
- const { trace, onOpenBoard, onStop } = source;
414
- if (source.tableExecution && !modules.some((module) => module.path === source.tableExecution?.invocation.path)) modules.unshift(executionWithSource({
415
- path: source.tableExecution.invocation.path,
416
- name: source.tableExecution.name,
417
- parameters: []
418
- }, source));
419
- if (trace && !modules.some((module) => module.path === trace.path)) modules.unshift({
420
- path: trace.path,
421
- name: "Current workflow",
422
- parameters: [],
423
- trace,
424
- onOpenBoard: onOpenBoard ? () => onOpenBoard(trace.path) : void 0,
425
- onStop: onStop ? () => onStop(trace.executionId) : void 0
426
- });
427
- return modules;
428
- }
429
- function WorkspaceExecutionLibrary({ modules, error, isPending, onRetry }) {
430
- if (modules.length > 0) return /* @__PURE__ */ jsx("ul", {
431
- className: "sigvelo-stack-list sigvelo-stack",
432
- children: modules.map((module) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceExecutionCard, { module }) }, module.path))
433
- });
434
- if (error) return /* @__PURE__ */ jsx(EmptyState, {
435
- icon: /* @__PURE__ */ jsx(QueueIcon, {}),
436
- title: "Workflows unavailable",
437
- description: executionErrorSummary(formatErrorMessage(error)),
438
- children: /* @__PURE__ */ jsx(Button, {
439
- size: "sm",
440
- variant: "outline",
441
- color: "neutral",
442
- onClick: onRetry,
443
- children: "Retry"
444
- })
445
- });
446
- if (isPending) return /* @__PURE__ */ jsx(EmptyState, {
447
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
448
- title: "Loading workflows"
449
- });
450
- return /* @__PURE__ */ jsx(EmptyState, {
451
- icon: /* @__PURE__ */ jsx(QueueIcon, {}),
452
- title: "No workflows",
453
- description: "Ask your assistant to save a reusable workflow to find it here."
454
- });
455
- }
456
- /**
457
- * Route-owned script workbench: compact discovery cards or one selected board.
458
- * A query failure with nothing loaded is an error, never an empty library.
459
- */
460
- function WorkspaceExecutionsPanel({ className, source, selectedPath, selectedTrace, selectedGraph, onBack, ref, ...props }) {
461
- const query = useQuery(source.queryOptions);
462
- const modules = workspaceExecutionModules(query.data ?? [], source);
463
- const savedModule = selectedTrace ? modules.find((module) => module.path === selectedTrace.path) : void 0;
464
- const selected = selectedTrace ? {
465
- ...savedModule,
466
- path: selectedTrace.path,
467
- name: savedModule?.name ?? "Saved workflow run",
468
- parameters: savedModule?.parameters ?? [],
469
- tableExecution: void 0,
470
- trace: selectedTrace,
471
- onStop: void 0
472
- } : modules.find((module) => module.path === selectedPath) ?? (selectedPath ? {
473
- path: selectedPath,
474
- name: "Workflow",
475
- parameters: [],
476
- graph: selectedGraph
477
- } : void 0);
478
- const panelRef = React.useRef(null);
479
- const focusedControl = React.useRef(null);
480
- const selectionKey = `${JSON.stringify(source.queryOptions.queryKey)}:${selectedPath ?? selected?.path ?? ""}`;
481
- React.useLayoutEffect(() => {
482
- const previous = focusedControl.current;
483
- if (!previous || previous.isConnected) return;
484
- focusedControl.current = null;
485
- if (document.activeElement === document.body) panelRef.current?.focus({ preventScroll: true });
486
- }, [selectionKey]);
487
- const mergedPanelRef = React.useMemo(() => mergeRefs(ref, panelRef), [ref]);
488
- const panelProps = {
489
- ...props,
490
- ref: mergedPanelRef,
491
- tabIndex: props.tabIndex ?? -1,
492
- onFocusCapture: (event) => {
493
- focusedControl.current = event.target;
494
- props.onFocusCapture?.(event);
495
- },
496
- onBlurCapture: (event) => {
497
- focusedControl.current = null;
498
- props.onBlurCapture?.(event);
499
- }
500
- };
501
- if (selected) return /* @__PURE__ */ createElement(WorkspaceExecutionWorkbench, {
502
- ...panelProps,
503
- key: selectionKey,
504
- className,
505
- module: {
506
- ...selected,
507
- graph: selectedGraph ?? selected.graph
508
- },
509
- onBack
510
- });
511
- return /* @__PURE__ */ jsx(WorkspaceConceptPanel, {
512
- heading: "Workflows",
513
- "data-slot": "workspace-executions-panel",
514
- className: cx("workspace-concept-panel", className),
515
- ...panelProps,
516
- "aria-label": props["aria-label"] ?? "Workflows",
517
- children: /* @__PURE__ */ jsx(WorkspaceExecutionLibrary, {
518
- modules,
519
- error: query.error,
520
- isPending: query.isPending,
521
- onRetry: () => void query.refetch()
522
- })
523
- }, JSON.stringify(source.queryOptions.queryKey));
524
- }
525
- function workbenchPlaceholder(module, graph, busy, errorMessage) {
526
- const traceError = module.trace?.error ? executionErrorSummary(module.trace.error) : "";
527
- if (errorMessage || traceError) return {
528
- icon: InfoIcon,
529
- title: "This run could not finish",
530
- description: traceError || errorMessage
531
- };
532
- if (module.trace?.status === "aborted" || module.trace?.status === "interrupted") return {
533
- icon: StopIcon,
534
- title: module.trace.status === "aborted" ? "Run stopped" : "Run interrupted"
535
- };
536
- if (!graph && !module.onRun) return {
537
- icon: SpinnerIcon,
538
- title: "Loading workflow"
539
- };
540
- return busy ? {
541
- icon: SpinnerIcon,
542
- title: "Running workflow",
543
- description: "Follow the run in Steps."
544
- } : {
545
- icon: PlayIcon,
546
- title: "Ready when you are",
547
- description: "Run this workflow to see its results here."
548
- };
549
- }
550
- function WorkbenchResult({ module, graph, busy, completed, errorMessage }) {
551
- if (completed) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
552
- className: "workspace-execution-status",
553
- children: [/* @__PURE__ */ jsx(CheckIcon, {}), busy ? "Previous result" : "Completed"]
554
- }), /* @__PURE__ */ jsx(ExecutionResult, { result: completed.result })] });
555
- const placeholder = workbenchPlaceholder(module, graph, busy, errorMessage);
556
- const Icon = placeholder.icon;
557
- return /* @__PURE__ */ jsx(EmptyState, {
558
- icon: /* @__PURE__ */ jsx(Icon, {}),
559
- title: placeholder.title,
560
- description: placeholder.description
561
- });
562
- }
563
- function WorkbenchRunAction({ module, tableMode, busy, stopping, onStop, formId }) {
564
- if (tableMode) return null;
565
- if (module.trace?.status === "running" && module.onStop) return /* @__PURE__ */ jsx(AppTopBar.Button, {
566
- label: "Stop run",
567
- onClick: onStop,
568
- disabled: stopping,
569
- children: stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {})
570
- });
571
- if (!module.onRun) return null;
572
- return /* @__PURE__ */ jsx(AppTopBar.Button, {
573
- type: "submit",
574
- form: formId,
575
- label: `Run now: ${module.name}`,
576
- disabled: busy,
577
- children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
578
- });
579
- }
580
- function WorkbenchHeader({ module, onBack, tableMode, onToggleTable, busy, stopping, onStop, formId }) {
581
- return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
582
- label: "Workflow controls",
583
- className: "workspace-execution-workbench__header",
584
- title: module.name,
585
- titleRender: (props) => /* @__PURE__ */ jsx("h2", {
586
- ...props,
587
- children: props.children
588
- }),
589
- leading: onBack ? /* @__PURE__ */ jsx(AppTopBar.Button, {
590
- label: "Back to workflows",
591
- onClick: onBack,
592
- children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
593
- }) : void 0,
594
- actions: /* @__PURE__ */ jsxs(Fragment, { children: [
595
- module.onRunTable ? /* @__PURE__ */ jsx(AppTopBar.Button, {
596
- label: tableMode ? "Single run" : "Run on a table",
597
- disabled: busy || module.tableExecution?.status === "running",
598
- onClick: onToggleTable,
599
- children: /* @__PURE__ */ jsx(QueueIcon, {})
600
- }) : null,
601
- module.onSchedule && !tableMode ? /* @__PURE__ */ jsx(AppTopBar.Button, {
602
- label: `Schedule ${module.name}`,
603
- onClick: module.onSchedule,
604
- children: /* @__PURE__ */ jsx(CalendarIcon, {})
605
- }) : null,
606
- /* @__PURE__ */ jsx(WorkbenchRunAction, {
607
- module,
608
- tableMode,
609
- busy,
610
- stopping,
611
- onStop,
612
- formId
613
- })
614
- ] })
615
- });
616
- }
617
- function WorkbenchSingleRun({ module, graph, draft, setDraft, tab, setTab, busy, completed, errorMessage, outcome }) {
618
- return /* @__PURE__ */ jsxs("div", {
619
- className: "workspace-execution-workbench__content",
620
- children: [module.parameters.length > 0 ? /* @__PURE__ */ jsx(RunOptions, {
621
- initiallyOpen: missingRequiredInput(module.parameters, draft),
622
- className: "workspace-execution-workbench__inputs",
623
- children: /* @__PURE__ */ jsx(ExecutionFields, {
624
- draft: module.onRun ? draft : void 0,
625
- parameters: module.parameters,
626
- onDraftChange: module.onRun ? (name, value) => setDraft((current) => ({
627
- ...current,
628
- [name]: value
629
- })) : void 0
630
- })
631
- }, executionFormKey(module)) : null, /* @__PURE__ */ jsxs(Tabs.Root, {
632
- value: tab,
633
- onValueChange: (value) => setTab(String(value)),
634
- className: "workspace-execution-workbench__tabs",
635
- children: [
636
- /* @__PURE__ */ jsxs(Tabs.List, {
637
- variant: "line",
638
- "aria-label": "Workflow view",
639
- className: "workspace-execution-workbench__tab-list",
640
- children: [/* @__PURE__ */ jsxs(Tabs.Tab, {
641
- value: "results",
642
- className: "workspace-execution-workbench__tab",
643
- children: [/* @__PURE__ */ jsx(FileIcon, {}), "Results"]
644
- }), /* @__PURE__ */ jsxs(Tabs.Tab, {
645
- value: "steps",
646
- className: "workspace-execution-workbench__tab",
647
- children: [/* @__PURE__ */ jsx(SplitIcon, {}), "Steps"]
648
- })]
649
- }),
650
- /* @__PURE__ */ jsxs(Tabs.Panel, {
651
- value: "results",
652
- className: "workspace-execution-workbench__results",
653
- children: [
654
- /* @__PURE__ */ jsx(WorkbenchResult, {
655
- module,
656
- graph,
657
- busy,
658
- completed,
659
- errorMessage
660
- }),
661
- outcome?.runs.length ? /* @__PURE__ */ jsx(RunLinks, { runs: outcome.runs }) : null,
662
- module.runs?.length ? /* @__PURE__ */ jsxs("details", {
663
- className: "workspace-execution-workbench__history",
664
- children: [/* @__PURE__ */ jsx("summary", { children: "Saved runs" }), /* @__PURE__ */ jsx(RunLinks, { runs: module.runs })]
665
- }) : null
666
- ]
667
- }),
668
- /* @__PURE__ */ jsx(Tabs.Panel, {
669
- value: "steps",
670
- className: "workspace-execution-workbench__steps",
671
- children: graph ? /* @__PURE__ */ jsx(ExecutionBoard, {
672
- "aria-label": "Steps",
673
- className: "workspace-execution-workbench__board",
674
- graph,
675
- trace: module.trace,
676
- showResults: false
677
- }) : /* @__PURE__ */ jsx(EmptyState, {
678
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
679
- title: "Loading workflow steps"
680
- })
681
- })
682
- ]
683
- })]
684
- });
685
- }
686
- function useWorkbenchTabs(trace, runStatus, busy) {
687
- const [tab, setTab] = React.useState(busy ? "steps" : "results");
688
- const [seenRunStatus, setSeenRunStatus] = React.useState(runStatus);
689
- if (runStatus !== seenRunStatus) {
690
- setSeenRunStatus(runStatus);
691
- if (runStatus === "pending") setTab("steps");
692
- }
693
- const [seenTrace, setSeenTrace] = React.useState(() => ({
694
- executionId: trace?.executionId,
695
- status: trace?.status
696
- }));
697
- if (seenTrace.executionId !== trace?.executionId || seenTrace.status !== trace?.status) {
698
- setSeenTrace({
699
- executionId: trace?.executionId,
700
- status: trace?.status
701
- });
702
- if (trace?.status === "running") setTab("steps");
703
- }
704
- return [tab, setTab];
705
- }
706
- /** Each newly attached table run reopens table mode; the user can still leave it. */
707
- function useTableMode(tableExecution) {
708
- const [tableMode, setTableMode] = React.useState(Boolean(tableExecution));
709
- const [seenTablePath, setSeenTablePath] = React.useState(tableExecution?.path);
710
- if (tableExecution?.path !== seenTablePath) {
711
- setSeenTablePath(tableExecution?.path);
712
- if (tableExecution) setTableMode(true);
713
- }
714
- return [tableMode, setTableMode];
715
- }
716
- /** Keeps the last completed result inspectable while its replacement is running. */
717
- function useVisibleCompleted(outcome, trace, busy) {
718
- const completed = outcome ?? (trace?.status === "completed" ? trace : void 0);
719
- const [lastCompleted, setLastCompleted] = React.useState(completed);
720
- if (completed && completed !== lastCompleted) setLastCompleted(completed);
721
- return busy ? lastCompleted : completed;
722
- }
723
- function WorkspaceExecutionWorkbench({ module, onBack, className, ref, ...props }) {
724
- const { draft, setDraft, runMutation, stopMutation, busy, errorMessage, outcome, runStatus } = useExecutionSession(module);
725
- const formId = React.useId();
726
- const graph = module.trace?.graph ?? module.graph;
727
- const [tableMode, setTableMode] = useTableMode(module.tableExecution);
728
- const [tab, setTab] = useWorkbenchTabs(module.trace, runStatus, busy);
729
- const visibleCompleted = useVisibleCompleted(outcome, module.trace, busy);
730
- const tableValues = new Map(collectRunParameters(module.parameters, draft).map(({ name, value }) => [name, value]));
731
- return /* @__PURE__ */ jsx("section", {
732
- ...props,
733
- ref,
734
- "aria-label": props["aria-label"] ?? "Workflows",
735
- "data-slot": "workspace-executions-panel",
736
- className: cx("workspace-execution-workbench", className),
737
- children: /* @__PURE__ */ jsxs(Form, {
738
- id: formId,
739
- noValidate: true,
740
- onSubmit: (event) => {
741
- event.preventDefault();
742
- if (!tableMode && !busy && module.onRun) {
743
- stopMutation.reset();
744
- setTab("steps");
745
- runMutation.mutate(collectRunParameters(module.parameters, draft));
746
- }
747
- },
748
- children: [
749
- /* @__PURE__ */ jsx(WorkbenchHeader, {
750
- module,
751
- formId,
752
- onBack,
753
- tableMode,
754
- onToggleTable: () => setTableMode((current) => !current),
755
- busy,
756
- stopping: stopMutation.isPending,
757
- onStop: () => stopMutation.mutate()
758
- }),
759
- module.description ? /* @__PURE__ */ jsx("p", {
760
- className: "workspace-execution-workbench__description",
761
- children: module.description
762
- }) : null,
763
- /* @__PURE__ */ jsx(WorkflowApps, { graph }),
764
- !tableMode && errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [errorMessage] }) : null,
765
- /* @__PURE__ */ jsx("span", {
766
- className: "sigvelo-visually-hidden",
767
- role: "status",
768
- "aria-atomic": "true",
769
- children: busy && module.trace?.status !== "running" ? "Starting run" : ""
770
- }),
771
- tableMode ? /* @__PURE__ */ jsx(WorkspaceExecutionTable, {
772
- path: module.path,
773
- parameters: module.parameters.map((parameter) => ({
774
- ...parameter,
775
- value: tableValues.get(parameter.name)
776
- })),
777
- execution: module.tableExecution,
778
- trace: module.trace,
779
- graph,
780
- onLoadTable: module.onLoadTable,
781
- onRequestTableSource: module.onRequestTableSource,
782
- onPrepareTable: module.onPrepareTable,
783
- onRunTable: module.onRunTable,
784
- onStopTable: module.onStopTable,
785
- onLoadTableTrace: module.onLoadTableTrace,
786
- onScheduleTable: module.onScheduleTable
787
- }) : /* @__PURE__ */ jsx(WorkbenchSingleRun, {
788
- module,
789
- graph,
790
- draft,
791
- setDraft,
792
- tab,
793
- setTab,
794
- busy,
795
- completed: visibleCompleted,
796
- errorMessage,
797
- outcome
798
- })
799
- ]
800
- })
801
- });
802
- }
803
- function executionWithSource(module, source) {
804
- const { onDelete, onOpen, onOpenBoard, onRun, onSchedule, onStop, trace } = source;
805
- const moduleTrace = trace?.path === module.path ? trace : void 0;
806
- const withOpen = (run) => ({
807
- ...run,
808
- onOpen: onOpen ? () => onOpen(run.path) : void 0
809
- });
810
- return {
811
- ...module,
812
- tableExecution: source.tableExecution?.invocation.path === module.path ? source.tableExecution : void 0,
813
- onLoadTable: source.onLoadTable,
814
- onRequestTableSource: source.onRequestTableSource,
815
- onPrepareTable: source.onPrepareTable,
816
- onRunTable: source.onRunTable,
817
- onStopTable: source.onStopTable,
818
- onLoadTableTrace: source.onLoadTableTrace,
819
- onScheduleTable: source.onScheduleTable,
820
- mutationKey: [
821
- ...source.queryOptions.queryKey,
822
- "run",
823
- module.path
824
- ],
825
- trace: moduleTrace,
826
- onStop: onStop && moduleTrace ? () => onStop(moduleTrace.executionId) : void 0,
827
- onOpenBoard: onOpenBoard ? () => onOpenBoard(module.path) : void 0,
828
- onSchedule: onSchedule ? () => onSchedule(module.path) : void 0,
829
- runs: module.runs?.map(withOpen),
830
- onRun: onRun ? async (parameters) => {
831
- onOpenBoard?.(module.path);
832
- const outcome = await onRun(module.path, parameters);
833
- return {
834
- ...outcome,
835
- runs: outcome.runs.map(withOpen)
836
- };
837
- } : void 0,
838
- onOpen: onOpen ? () => onOpen(module.path) : void 0,
839
- onDelete: onDelete ? () => onDelete(module.path) : void 0
840
- };
841
- }
842
- //#endregion
843
- export { WorkspaceExecutionCard, WorkspaceExecutionFile, WorkspaceExecutionsPanel };