@stigmer/react 0.4.7 → 0.5.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 (652) hide show
  1. package/action-menu/ActionMenu.d.ts +64 -0
  2. package/action-menu/ActionMenu.d.ts.map +1 -0
  3. package/action-menu/ActionMenu.js +78 -0
  4. package/action-menu/ActionMenu.js.map +1 -0
  5. package/action-menu/index.d.ts +3 -0
  6. package/action-menu/index.d.ts.map +1 -0
  7. package/action-menu/index.js +2 -0
  8. package/action-menu/index.js.map +1 -0
  9. package/action-menu/types.d.ts +65 -0
  10. package/action-menu/types.d.ts.map +1 -0
  11. package/action-menu/types.js +2 -0
  12. package/action-menu/types.js.map +1 -0
  13. package/agent/AgentCreationWizard.d.ts +55 -0
  14. package/agent/AgentCreationWizard.d.ts.map +1 -0
  15. package/agent/AgentCreationWizard.js +115 -0
  16. package/agent/AgentCreationWizard.js.map +1 -0
  17. package/agent/AgentDetailView.d.ts +77 -9
  18. package/agent/AgentDetailView.d.ts.map +1 -1
  19. package/agent/AgentDetailView.js +265 -87
  20. package/agent/AgentDetailView.js.map +1 -1
  21. package/agent/index.d.ts +8 -0
  22. package/agent/index.d.ts.map +1 -1
  23. package/agent/index.js +4 -0
  24. package/agent/index.js.map +1 -1
  25. package/agent/internal/agentToInput.d.ts +12 -0
  26. package/agent/internal/agentToInput.d.ts.map +1 -0
  27. package/agent/internal/agentToInput.js +72 -0
  28. package/agent/internal/agentToInput.js.map +1 -0
  29. package/agent/steps/CapabilitiesStep.d.ts +16 -0
  30. package/agent/steps/CapabilitiesStep.d.ts.map +1 -0
  31. package/agent/steps/CapabilitiesStep.js +80 -0
  32. package/agent/steps/CapabilitiesStep.js.map +1 -0
  33. package/agent/steps/IdentityStep.d.ts +18 -0
  34. package/agent/steps/IdentityStep.d.ts.map +1 -0
  35. package/agent/steps/IdentityStep.js +43 -0
  36. package/agent/steps/IdentityStep.js.map +1 -0
  37. package/agent/steps/ReviewStep.d.ts +23 -0
  38. package/agent/steps/ReviewStep.d.ts.map +1 -0
  39. package/agent/steps/ReviewStep.js +73 -0
  40. package/agent/steps/ReviewStep.js.map +1 -0
  41. package/agent/steps/types.d.ts +35 -0
  42. package/agent/steps/types.d.ts.map +1 -0
  43. package/agent/steps/types.js +16 -0
  44. package/agent/steps/types.js.map +1 -0
  45. package/agent/useCreateAgent.d.ts +45 -0
  46. package/agent/useCreateAgent.d.ts.map +1 -0
  47. package/agent/useCreateAgent.js +50 -0
  48. package/agent/useCreateAgent.js.map +1 -0
  49. package/agent/useUpdateAgent.d.ts +24 -0
  50. package/agent/useUpdateAgent.d.ts.map +1 -0
  51. package/agent/useUpdateAgent.js +35 -0
  52. package/agent/useUpdateAgent.js.map +1 -0
  53. package/dependency-graph/DependencyGraph.d.ts +37 -0
  54. package/dependency-graph/DependencyGraph.d.ts.map +1 -0
  55. package/dependency-graph/DependencyGraph.js +88 -0
  56. package/dependency-graph/DependencyGraph.js.map +1 -0
  57. package/dependency-graph/DependencyTreeNode.d.ts +23 -0
  58. package/dependency-graph/DependencyTreeNode.d.ts.map +1 -0
  59. package/dependency-graph/DependencyTreeNode.js +99 -0
  60. package/dependency-graph/DependencyTreeNode.js.map +1 -0
  61. package/dependency-graph/index.d.ts +4 -0
  62. package/dependency-graph/index.d.ts.map +1 -0
  63. package/dependency-graph/index.js +5 -0
  64. package/dependency-graph/index.js.map +1 -0
  65. package/dependency-graph/types.d.ts +130 -0
  66. package/dependency-graph/types.d.ts.map +1 -0
  67. package/dependency-graph/types.js +2 -0
  68. package/dependency-graph/types.js.map +1 -0
  69. package/dependency-graph/useDependencyGraph.d.ts +27 -0
  70. package/dependency-graph/useDependencyGraph.d.ts.map +1 -0
  71. package/dependency-graph/useDependencyGraph.js +129 -0
  72. package/dependency-graph/useDependencyGraph.js.map +1 -0
  73. package/empty-state/EmptyState.d.ts +29 -0
  74. package/empty-state/EmptyState.d.ts.map +1 -0
  75. package/empty-state/EmptyState.js +45 -0
  76. package/empty-state/EmptyState.js.map +1 -0
  77. package/empty-state/index.d.ts +4 -0
  78. package/empty-state/index.d.ts.map +1 -0
  79. package/empty-state/index.js +3 -0
  80. package/empty-state/index.js.map +1 -0
  81. package/empty-state/types.d.ts +73 -0
  82. package/empty-state/types.d.ts.map +1 -0
  83. package/empty-state/types.js +2 -0
  84. package/empty-state/types.js.map +1 -0
  85. package/empty-state/useEmptyState.d.ts +18 -0
  86. package/empty-state/useEmptyState.d.ts.map +1 -0
  87. package/empty-state/useEmptyState.js +72 -0
  88. package/empty-state/useEmptyState.js.map +1 -0
  89. package/execution/MessageThread.d.ts +1 -0
  90. package/execution/MessageThread.d.ts.map +1 -1
  91. package/execution/MessageThread.js +22 -12
  92. package/execution/MessageThread.js.map +1 -1
  93. package/execution/SetupProgress.d.ts +23 -9
  94. package/execution/SetupProgress.d.ts.map +1 -1
  95. package/execution/SetupProgress.js +30 -14
  96. package/execution/SetupProgress.js.map +1 -1
  97. package/execution/__tests__/thread-keys.test.js +82 -0
  98. package/execution/__tests__/thread-keys.test.js.map +1 -1
  99. package/feedback/StigmerToaster.d.ts +18 -0
  100. package/feedback/StigmerToaster.d.ts.map +1 -0
  101. package/feedback/StigmerToaster.js +31 -0
  102. package/feedback/StigmerToaster.js.map +1 -0
  103. package/feedback/index.d.ts +4 -0
  104. package/feedback/index.d.ts.map +1 -0
  105. package/feedback/index.js +3 -0
  106. package/feedback/index.js.map +1 -0
  107. package/feedback/toast.d.ts +14 -0
  108. package/feedback/toast.d.ts.map +1 -0
  109. package/feedback/toast.js +14 -0
  110. package/feedback/toast.js.map +1 -0
  111. package/feedback/types.d.ts +4 -0
  112. package/feedback/types.d.ts.map +1 -0
  113. package/feedback/types.js +2 -0
  114. package/feedback/types.js.map +1 -0
  115. package/index.d.ts +30 -10
  116. package/index.d.ts.map +1 -1
  117. package/index.js +29 -9
  118. package/index.js.map +1 -1
  119. package/inline-edit/InlineEditImage.d.ts +20 -0
  120. package/inline-edit/InlineEditImage.d.ts.map +1 -0
  121. package/inline-edit/InlineEditImage.js +85 -0
  122. package/inline-edit/InlineEditImage.js.map +1 -0
  123. package/inline-edit/InlineEditKeyValue.d.ts +29 -0
  124. package/inline-edit/InlineEditKeyValue.d.ts.map +1 -0
  125. package/inline-edit/InlineEditKeyValue.js +67 -0
  126. package/inline-edit/InlineEditKeyValue.js.map +1 -0
  127. package/inline-edit/InlineEditResourceList.d.ts +34 -0
  128. package/inline-edit/InlineEditResourceList.d.ts.map +1 -0
  129. package/inline-edit/InlineEditResourceList.js +99 -0
  130. package/inline-edit/InlineEditResourceList.js.map +1 -0
  131. package/inline-edit/InlineEditSelect.d.ts +18 -0
  132. package/inline-edit/InlineEditSelect.d.ts.map +1 -0
  133. package/inline-edit/InlineEditSelect.js +54 -0
  134. package/inline-edit/InlineEditSelect.js.map +1 -0
  135. package/inline-edit/InlineEditText.d.ts +23 -0
  136. package/inline-edit/InlineEditText.d.ts.map +1 -0
  137. package/inline-edit/InlineEditText.js +79 -0
  138. package/inline-edit/InlineEditText.js.map +1 -0
  139. package/inline-edit/InlineEditTextarea.d.ts +22 -0
  140. package/inline-edit/InlineEditTextarea.d.ts.map +1 -0
  141. package/inline-edit/InlineEditTextarea.js +83 -0
  142. package/inline-edit/InlineEditTextarea.js.map +1 -0
  143. package/inline-edit/index.d.ts +16 -0
  144. package/inline-edit/index.d.ts.map +1 -0
  145. package/inline-edit/index.js +8 -0
  146. package/inline-edit/index.js.map +1 -0
  147. package/inline-edit/types.d.ts +42 -0
  148. package/inline-edit/types.d.ts.map +1 -0
  149. package/inline-edit/types.js +2 -0
  150. package/inline-edit/types.js.map +1 -0
  151. package/inline-edit/useInlineFieldSave.d.ts +23 -0
  152. package/inline-edit/useInlineFieldSave.d.ts.map +1 -0
  153. package/inline-edit/useInlineFieldSave.js +44 -0
  154. package/inline-edit/useInlineFieldSave.js.map +1 -0
  155. package/internal/Tabs.d.ts +4 -38
  156. package/internal/Tabs.d.ts.map +1 -1
  157. package/internal/Tabs.js +3 -62
  158. package/internal/Tabs.js.map +1 -1
  159. package/library/ImportResourceDialog.d.ts +43 -0
  160. package/library/ImportResourceDialog.d.ts.map +1 -0
  161. package/library/ImportResourceDialog.js +90 -0
  162. package/library/ImportResourceDialog.js.map +1 -0
  163. package/library/index.d.ts +7 -4
  164. package/library/index.d.ts.map +1 -1
  165. package/library/index.js +4 -2
  166. package/library/index.js.map +1 -1
  167. package/library/serialize-resource-yaml.d.ts +53 -0
  168. package/library/serialize-resource-yaml.d.ts.map +1 -1
  169. package/library/serialize-resource-yaml.js +275 -0
  170. package/library/serialize-resource-yaml.js.map +1 -1
  171. package/library/useExportResource.d.ts +56 -0
  172. package/library/useExportResource.d.ts.map +1 -0
  173. package/library/useExportResource.js +137 -0
  174. package/library/useExportResource.js.map +1 -0
  175. package/library/useImportResource.d.ts +84 -0
  176. package/library/useImportResource.d.ts.map +1 -0
  177. package/library/useImportResource.js +188 -0
  178. package/library/useImportResource.js.map +1 -0
  179. package/mcp-server/McpServerCreationWizard.d.ts +55 -0
  180. package/mcp-server/McpServerCreationWizard.d.ts.map +1 -0
  181. package/mcp-server/McpServerCreationWizard.js +121 -0
  182. package/mcp-server/McpServerCreationWizard.js.map +1 -0
  183. package/mcp-server/McpServerDetailView.d.ts +21 -1
  184. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  185. package/mcp-server/McpServerDetailView.js +113 -20
  186. package/mcp-server/McpServerDetailView.js.map +1 -1
  187. package/mcp-server/index.d.ts +8 -0
  188. package/mcp-server/index.d.ts.map +1 -1
  189. package/mcp-server/index.js +4 -0
  190. package/mcp-server/index.js.map +1 -1
  191. package/mcp-server/internal/mcpServerToInput.d.ts +12 -0
  192. package/mcp-server/internal/mcpServerToInput.d.ts.map +1 -0
  193. package/mcp-server/internal/mcpServerToInput.js +81 -0
  194. package/mcp-server/internal/mcpServerToInput.js.map +1 -0
  195. package/mcp-server/steps/EnvironmentAuthStep.d.ts +15 -0
  196. package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -0
  197. package/mcp-server/steps/EnvironmentAuthStep.js +55 -0
  198. package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -0
  199. package/mcp-server/steps/IdentityTransportStep.d.ts +19 -0
  200. package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -0
  201. package/mcp-server/steps/IdentityTransportStep.js +73 -0
  202. package/mcp-server/steps/IdentityTransportStep.js.map +1 -0
  203. package/mcp-server/steps/ReviewStep.d.ts +23 -0
  204. package/mcp-server/steps/ReviewStep.d.ts.map +1 -0
  205. package/mcp-server/steps/ReviewStep.js +137 -0
  206. package/mcp-server/steps/ReviewStep.js.map +1 -0
  207. package/mcp-server/steps/types.d.ts +56 -0
  208. package/mcp-server/steps/types.d.ts.map +1 -0
  209. package/mcp-server/steps/types.js +27 -0
  210. package/mcp-server/steps/types.js.map +1 -0
  211. package/mcp-server/useCreateMcpServer.d.ts +45 -0
  212. package/mcp-server/useCreateMcpServer.d.ts.map +1 -0
  213. package/mcp-server/useCreateMcpServer.js +50 -0
  214. package/mcp-server/useCreateMcpServer.js.map +1 -0
  215. package/mcp-server/useUpdateMcpServer.d.ts +24 -0
  216. package/mcp-server/useUpdateMcpServer.d.ts.map +1 -0
  217. package/mcp-server/useUpdateMcpServer.js +35 -0
  218. package/mcp-server/useUpdateMcpServer.js.map +1 -0
  219. package/models/registry.d.ts +4 -1
  220. package/models/registry.d.ts.map +1 -1
  221. package/models/registry.js +6 -2
  222. package/models/registry.js.map +1 -1
  223. package/package.json +8 -4
  224. package/provider.js +1 -1
  225. package/provider.js.map +1 -1
  226. package/resource-creation/CreationPicker.d.ts +60 -0
  227. package/resource-creation/CreationPicker.d.ts.map +1 -0
  228. package/resource-creation/CreationPicker.js +74 -0
  229. package/resource-creation/CreationPicker.js.map +1 -0
  230. package/resource-creation/StepIndicator.d.ts +28 -0
  231. package/resource-creation/StepIndicator.d.ts.map +1 -0
  232. package/resource-creation/StepIndicator.js +40 -0
  233. package/resource-creation/StepIndicator.js.map +1 -0
  234. package/resource-creation/TemplateCard.d.ts +24 -0
  235. package/resource-creation/TemplateCard.d.ts.map +1 -0
  236. package/resource-creation/TemplateCard.js +68 -0
  237. package/resource-creation/TemplateCard.js.map +1 -0
  238. package/resource-creation/TemplateGallery.d.ts +43 -0
  239. package/resource-creation/TemplateGallery.d.ts.map +1 -0
  240. package/resource-creation/TemplateGallery.js +78 -0
  241. package/resource-creation/TemplateGallery.js.map +1 -0
  242. package/resource-creation/WizardNav.d.ts +31 -0
  243. package/resource-creation/WizardNav.d.ts.map +1 -0
  244. package/resource-creation/WizardNav.js +29 -0
  245. package/resource-creation/WizardNav.js.map +1 -0
  246. package/resource-creation/WizardShell.d.ts +41 -0
  247. package/resource-creation/WizardShell.d.ts.map +1 -0
  248. package/resource-creation/WizardShell.js +55 -0
  249. package/resource-creation/WizardShell.js.map +1 -0
  250. package/resource-creation/index.d.ts +21 -0
  251. package/resource-creation/index.d.ts.map +1 -0
  252. package/resource-creation/index.js +14 -0
  253. package/resource-creation/index.js.map +1 -0
  254. package/resource-creation/templates/agent-templates.d.ts +15 -0
  255. package/resource-creation/templates/agent-templates.d.ts.map +1 -0
  256. package/resource-creation/templates/agent-templates.js +148 -0
  257. package/resource-creation/templates/agent-templates.js.map +1 -0
  258. package/resource-creation/templates/index.d.ts +5 -0
  259. package/resource-creation/templates/index.d.ts.map +1 -0
  260. package/resource-creation/templates/index.js +5 -0
  261. package/resource-creation/templates/index.js.map +1 -0
  262. package/resource-creation/templates/mcp-server-templates.d.ts +15 -0
  263. package/resource-creation/templates/mcp-server-templates.d.ts.map +1 -0
  264. package/resource-creation/templates/mcp-server-templates.js +92 -0
  265. package/resource-creation/templates/mcp-server-templates.js.map +1 -0
  266. package/resource-creation/templates/types.d.ts +48 -0
  267. package/resource-creation/templates/types.d.ts.map +1 -0
  268. package/resource-creation/templates/types.js +16 -0
  269. package/resource-creation/templates/types.js.map +1 -0
  270. package/resource-creation/types.d.ts +88 -0
  271. package/resource-creation/types.d.ts.map +1 -0
  272. package/resource-creation/types.js +2 -0
  273. package/resource-creation/types.js.map +1 -0
  274. package/resource-creation/useTemplateFilter.d.ts +43 -0
  275. package/resource-creation/useTemplateFilter.d.ts.map +1 -0
  276. package/resource-creation/useTemplateFilter.js +73 -0
  277. package/resource-creation/useTemplateFilter.js.map +1 -0
  278. package/resource-creation/useWizardState.d.ts +67 -0
  279. package/resource-creation/useWizardState.d.ts.map +1 -0
  280. package/resource-creation/useWizardState.js +143 -0
  281. package/resource-creation/useWizardState.js.map +1 -0
  282. package/resource-detail/ConfirmDialog.d.ts +44 -0
  283. package/resource-detail/ConfirmDialog.d.ts.map +1 -0
  284. package/resource-detail/ConfirmDialog.js +62 -0
  285. package/resource-detail/ConfirmDialog.js.map +1 -0
  286. package/resource-detail/ResourceActionBar.d.ts +42 -0
  287. package/resource-detail/ResourceActionBar.d.ts.map +1 -0
  288. package/resource-detail/ResourceActionBar.js +64 -0
  289. package/resource-detail/ResourceActionBar.js.map +1 -0
  290. package/resource-detail/ResourceDetailShell.d.ts +36 -0
  291. package/resource-detail/ResourceDetailShell.d.ts.map +1 -0
  292. package/resource-detail/ResourceDetailShell.js +65 -0
  293. package/resource-detail/ResourceDetailShell.js.map +1 -0
  294. package/resource-detail/Section.d.ts +18 -0
  295. package/resource-detail/Section.d.ts.map +1 -0
  296. package/resource-detail/Section.js +18 -0
  297. package/resource-detail/Section.js.map +1 -0
  298. package/resource-detail/index.d.ts +15 -0
  299. package/resource-detail/index.d.ts.map +1 -0
  300. package/resource-detail/index.js +10 -0
  301. package/resource-detail/index.js.map +1 -0
  302. package/resource-detail/types.d.ts +146 -0
  303. package/resource-detail/types.d.ts.map +1 -0
  304. package/resource-detail/types.js +2 -0
  305. package/resource-detail/types.js.map +1 -0
  306. package/resource-detail/useConfirmAction.d.ts +41 -0
  307. package/resource-detail/useConfirmAction.d.ts.map +1 -0
  308. package/resource-detail/useConfirmAction.js +30 -0
  309. package/resource-detail/useConfirmAction.js.map +1 -0
  310. package/resource-detail/useCopyResource.d.ts +28 -0
  311. package/resource-detail/useCopyResource.d.ts.map +1 -0
  312. package/resource-detail/useCopyResource.js +46 -0
  313. package/resource-detail/useCopyResource.js.map +1 -0
  314. package/resource-detail/useDeleteResource.d.ts +40 -0
  315. package/resource-detail/useDeleteResource.d.ts.map +1 -0
  316. package/resource-detail/useDeleteResource.js +83 -0
  317. package/resource-detail/useDeleteResource.js.map +1 -0
  318. package/resource-detail/useDetailTabs.d.ts +46 -0
  319. package/resource-detail/useDetailTabs.d.ts.map +1 -0
  320. package/resource-detail/useDetailTabs.js +47 -0
  321. package/resource-detail/useDetailTabs.js.map +1 -0
  322. package/resource-workbench/components/BulkActionBar.d.ts +36 -0
  323. package/resource-workbench/components/BulkActionBar.d.ts.map +1 -0
  324. package/resource-workbench/components/BulkActionBar.js +35 -0
  325. package/resource-workbench/components/BulkActionBar.js.map +1 -0
  326. package/resource-workbench/components/ColumnHeader.d.ts +23 -0
  327. package/resource-workbench/components/ColumnHeader.d.ts.map +1 -0
  328. package/resource-workbench/components/ColumnHeader.js +25 -0
  329. package/resource-workbench/components/ColumnHeader.js.map +1 -0
  330. package/resource-workbench/components/FilterBar.d.ts +33 -0
  331. package/resource-workbench/components/FilterBar.d.ts.map +1 -0
  332. package/resource-workbench/components/FilterBar.js +72 -0
  333. package/resource-workbench/components/FilterBar.js.map +1 -0
  334. package/resource-workbench/components/ResourceAvatar.d.ts +29 -0
  335. package/resource-workbench/components/ResourceAvatar.d.ts.map +1 -0
  336. package/resource-workbench/components/ResourceAvatar.js +51 -0
  337. package/resource-workbench/components/ResourceAvatar.js.map +1 -0
  338. package/resource-workbench/components/ResourceCards.d.ts +39 -0
  339. package/resource-workbench/components/ResourceCards.d.ts.map +1 -0
  340. package/resource-workbench/components/ResourceCards.js +41 -0
  341. package/resource-workbench/components/ResourceCards.js.map +1 -0
  342. package/resource-workbench/components/ResourceInspector.d.ts +26 -0
  343. package/resource-workbench/components/ResourceInspector.d.ts.map +1 -0
  344. package/resource-workbench/components/ResourceInspector.js +22 -0
  345. package/resource-workbench/components/ResourceInspector.js.map +1 -0
  346. package/resource-workbench/components/ResourceList.d.ts +39 -0
  347. package/resource-workbench/components/ResourceList.d.ts.map +1 -0
  348. package/resource-workbench/components/ResourceList.js +41 -0
  349. package/resource-workbench/components/ResourceList.js.map +1 -0
  350. package/resource-workbench/components/ResourceTable.d.ts +47 -0
  351. package/resource-workbench/components/ResourceTable.d.ts.map +1 -0
  352. package/resource-workbench/components/ResourceTable.js +78 -0
  353. package/resource-workbench/components/ResourceTable.js.map +1 -0
  354. package/resource-workbench/components/ResourceWorkbench.d.ts +131 -0
  355. package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -0
  356. package/resource-workbench/components/ResourceWorkbench.js +170 -0
  357. package/resource-workbench/components/ResourceWorkbench.js.map +1 -0
  358. package/resource-workbench/components/SelectionCheckbox.d.ts +24 -0
  359. package/resource-workbench/components/SelectionCheckbox.d.ts.map +1 -0
  360. package/resource-workbench/components/SelectionCheckbox.js +16 -0
  361. package/resource-workbench/components/SelectionCheckbox.js.map +1 -0
  362. package/resource-workbench/components/StatusBadge.d.ts +31 -0
  363. package/resource-workbench/components/StatusBadge.d.ts.map +1 -0
  364. package/resource-workbench/components/StatusBadge.js +75 -0
  365. package/resource-workbench/components/StatusBadge.js.map +1 -0
  366. package/resource-workbench/components/ViewSwitcher.d.ts +21 -0
  367. package/resource-workbench/components/ViewSwitcher.d.ts.map +1 -0
  368. package/resource-workbench/components/ViewSwitcher.js +37 -0
  369. package/resource-workbench/components/ViewSwitcher.js.map +1 -0
  370. package/resource-workbench/hooks/useResourceCollection.d.ts +93 -0
  371. package/resource-workbench/hooks/useResourceCollection.d.ts.map +1 -0
  372. package/resource-workbench/hooks/useResourceCollection.js +133 -0
  373. package/resource-workbench/hooks/useResourceCollection.js.map +1 -0
  374. package/resource-workbench/hooks/useResourceFilters.d.ts +73 -0
  375. package/resource-workbench/hooks/useResourceFilters.d.ts.map +1 -0
  376. package/resource-workbench/hooks/useResourceFilters.js +105 -0
  377. package/resource-workbench/hooks/useResourceFilters.js.map +1 -0
  378. package/resource-workbench/hooks/useResourceSelection.d.ts +44 -0
  379. package/resource-workbench/hooks/useResourceSelection.d.ts.map +1 -0
  380. package/resource-workbench/hooks/useResourceSelection.js +123 -0
  381. package/resource-workbench/hooks/useResourceSelection.js.map +1 -0
  382. package/resource-workbench/hooks/useViewPreference.d.ts +32 -0
  383. package/resource-workbench/hooks/useViewPreference.d.ts.map +1 -0
  384. package/resource-workbench/hooks/useViewPreference.js +60 -0
  385. package/resource-workbench/hooks/useViewPreference.js.map +1 -0
  386. package/resource-workbench/index.d.ts +34 -0
  387. package/resource-workbench/index.d.ts.map +1 -0
  388. package/resource-workbench/index.js +19 -0
  389. package/resource-workbench/index.js.map +1 -0
  390. package/resource-workbench/types.d.ts +165 -0
  391. package/resource-workbench/types.d.ts.map +1 -0
  392. package/resource-workbench/types.js +2 -0
  393. package/resource-workbench/types.js.map +1 -0
  394. package/runner/RunnerDetailView.d.ts +44 -0
  395. package/runner/RunnerDetailView.d.ts.map +1 -0
  396. package/runner/RunnerDetailView.js +154 -0
  397. package/runner/RunnerDetailView.js.map +1 -0
  398. package/runner/RunnerListPanel.d.ts +26 -1
  399. package/runner/RunnerListPanel.d.ts.map +1 -1
  400. package/runner/RunnerListPanel.js +68 -46
  401. package/runner/RunnerListPanel.js.map +1 -1
  402. package/runner/index.d.ts +7 -1
  403. package/runner/index.d.ts.map +1 -1
  404. package/runner/index.js +3 -0
  405. package/runner/index.js.map +1 -1
  406. package/runner/shared.d.ts +31 -0
  407. package/runner/shared.d.ts.map +1 -0
  408. package/runner/shared.js +55 -0
  409. package/runner/shared.js.map +1 -0
  410. package/runner/useRunner.d.ts +37 -0
  411. package/runner/useRunner.d.ts.map +1 -0
  412. package/runner/useRunner.js +24 -0
  413. package/runner/useRunner.js.map +1 -0
  414. package/session/__tests__/group-sessions.test.js +3 -3
  415. package/session/__tests__/group-sessions.test.js.map +1 -1
  416. package/skill/SkillDetailView.d.ts +70 -7
  417. package/skill/SkillDetailView.d.ts.map +1 -1
  418. package/skill/SkillDetailView.js +107 -39
  419. package/skill/SkillDetailView.js.map +1 -1
  420. package/skill/SkillDiffDialog.d.ts +42 -0
  421. package/skill/SkillDiffDialog.d.ts.map +1 -0
  422. package/skill/SkillDiffDialog.js +72 -0
  423. package/skill/SkillDiffDialog.js.map +1 -0
  424. package/skill/SkillFileBrowser.d.ts +31 -0
  425. package/skill/SkillFileBrowser.d.ts.map +1 -0
  426. package/skill/SkillFileBrowser.js +105 -0
  427. package/skill/SkillFileBrowser.js.map +1 -0
  428. package/skill/SkillUploader.d.ts +39 -0
  429. package/skill/SkillUploader.d.ts.map +1 -0
  430. package/skill/SkillUploader.js +141 -0
  431. package/skill/SkillUploader.js.map +1 -0
  432. package/skill/index.d.ts +18 -0
  433. package/skill/index.d.ts.map +1 -1
  434. package/skill/index.js +9 -0
  435. package/skill/index.js.map +1 -1
  436. package/skill/internal/computeArtifactHash.d.ts +9 -0
  437. package/skill/internal/computeArtifactHash.d.ts.map +1 -0
  438. package/skill/internal/computeArtifactHash.js +14 -0
  439. package/skill/internal/computeArtifactHash.js.map +1 -0
  440. package/skill/internal/fetchAndUnpackArtifact.d.ts +16 -0
  441. package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -0
  442. package/skill/internal/fetchAndUnpackArtifact.js +34 -0
  443. package/skill/internal/fetchAndUnpackArtifact.js.map +1 -0
  444. package/skill/usePushSkill.d.ts +53 -0
  445. package/skill/usePushSkill.d.ts.map +1 -0
  446. package/skill/usePushSkill.js +57 -0
  447. package/skill/usePushSkill.js.map +1 -0
  448. package/skill/useSkillArtifact.d.ts +37 -0
  449. package/skill/useSkillArtifact.d.ts.map +1 -0
  450. package/skill/useSkillArtifact.js +76 -0
  451. package/skill/useSkillArtifact.js.map +1 -0
  452. package/skill/useSkillDiff.d.ts +31 -0
  453. package/skill/useSkillDiff.d.ts.map +1 -0
  454. package/skill/useSkillDiff.js +97 -0
  455. package/skill/useSkillDiff.js.map +1 -0
  456. package/skill/useSkillDuplicateCheck.d.ts +34 -0
  457. package/skill/useSkillDuplicateCheck.d.ts.map +1 -0
  458. package/skill/useSkillDuplicateCheck.js +58 -0
  459. package/skill/useSkillDuplicateCheck.js.map +1 -0
  460. package/skill/useSkillUpload.d.ts +69 -0
  461. package/skill/useSkillUpload.d.ts.map +1 -0
  462. package/skill/useSkillUpload.js +157 -0
  463. package/skill/useSkillUpload.js.map +1 -0
  464. package/skill/useSkillVersions.d.ts +46 -0
  465. package/skill/useSkillVersions.d.ts.map +1 -0
  466. package/skill/useSkillVersions.js +104 -0
  467. package/skill/useSkillVersions.js.map +1 -0
  468. package/src/action-menu/ActionMenu.tsx +151 -0
  469. package/src/action-menu/index.ts +9 -0
  470. package/src/action-menu/types.ts +70 -0
  471. package/src/agent/AgentCreationWizard.tsx +201 -0
  472. package/src/agent/AgentDetailView.tsx +817 -321
  473. package/src/agent/index.ts +16 -0
  474. package/src/agent/internal/agentToInput.ts +95 -0
  475. package/src/agent/steps/CapabilitiesStep.tsx +363 -0
  476. package/src/agent/steps/IdentityStep.tsx +259 -0
  477. package/src/agent/steps/ReviewStep.tsx +211 -0
  478. package/src/agent/steps/types.ts +53 -0
  479. package/src/agent/useCreateAgent.ts +76 -0
  480. package/src/agent/useUpdateAgent.ts +55 -0
  481. package/src/dependency-graph/DependencyGraph.tsx +153 -0
  482. package/src/dependency-graph/DependencyTreeNode.tsx +282 -0
  483. package/src/dependency-graph/index.ts +15 -0
  484. package/src/dependency-graph/types.ts +131 -0
  485. package/src/dependency-graph/useDependencyGraph.ts +158 -0
  486. package/src/empty-state/EmptyState.tsx +90 -0
  487. package/src/empty-state/index.ts +9 -0
  488. package/src/empty-state/types.ts +81 -0
  489. package/src/empty-state/useEmptyState.ts +85 -0
  490. package/src/execution/MessageThread.tsx +26 -15
  491. package/src/execution/SetupProgress.tsx +35 -14
  492. package/src/execution/__tests__/thread-keys.test.ts +101 -0
  493. package/src/feedback/StigmerToaster.tsx +45 -0
  494. package/src/feedback/index.ts +3 -0
  495. package/src/feedback/toast.ts +13 -0
  496. package/src/feedback/types.ts +7 -0
  497. package/src/index.ts +270 -8
  498. package/src/inline-edit/InlineEditImage.tsx +208 -0
  499. package/src/inline-edit/InlineEditKeyValue.tsx +278 -0
  500. package/src/inline-edit/InlineEditResourceList.tsx +325 -0
  501. package/src/inline-edit/InlineEditSelect.tsx +150 -0
  502. package/src/inline-edit/InlineEditText.tsx +211 -0
  503. package/src/inline-edit/InlineEditTextarea.tsx +209 -0
  504. package/src/inline-edit/index.ts +28 -0
  505. package/src/inline-edit/types.ts +47 -0
  506. package/src/inline-edit/useInlineFieldSave.ts +62 -0
  507. package/src/internal/Tabs.tsx +4 -164
  508. package/src/library/ImportResourceDialog.tsx +227 -0
  509. package/src/library/index.ts +18 -8
  510. package/src/library/serialize-resource-yaml.ts +356 -0
  511. package/src/library/useExportResource.ts +183 -0
  512. package/src/library/useImportResource.ts +253 -0
  513. package/src/mcp-server/McpServerCreationWizard.tsx +206 -0
  514. package/src/mcp-server/McpServerDetailView.tsx +392 -105
  515. package/src/mcp-server/index.ts +16 -0
  516. package/src/mcp-server/internal/mcpServerToInput.ts +95 -0
  517. package/src/mcp-server/steps/EnvironmentAuthStep.tsx +462 -0
  518. package/src/mcp-server/steps/IdentityTransportStep.tsx +531 -0
  519. package/src/mcp-server/steps/ReviewStep.tsx +297 -0
  520. package/src/mcp-server/steps/types.ts +85 -0
  521. package/src/mcp-server/useCreateMcpServer.ts +76 -0
  522. package/src/mcp-server/useUpdateMcpServer.ts +55 -0
  523. package/src/models/registry.ts +10 -2
  524. package/src/provider.tsx +1 -1
  525. package/src/resource-creation/CreationPicker.tsx +292 -0
  526. package/src/resource-creation/StepIndicator.tsx +156 -0
  527. package/src/resource-creation/TemplateCard.tsx +143 -0
  528. package/src/resource-creation/TemplateGallery.tsx +222 -0
  529. package/src/resource-creation/WizardNav.tsx +163 -0
  530. package/src/resource-creation/WizardShell.tsx +124 -0
  531. package/src/resource-creation/index.ts +45 -0
  532. package/src/resource-creation/templates/agent-templates.ts +160 -0
  533. package/src/resource-creation/templates/index.ts +7 -0
  534. package/src/resource-creation/templates/mcp-server-templates.ts +106 -0
  535. package/src/resource-creation/templates/types.ts +64 -0
  536. package/src/resource-creation/types.ts +105 -0
  537. package/src/resource-creation/useTemplateFilter.ts +117 -0
  538. package/src/resource-creation/useWizardState.ts +223 -0
  539. package/src/resource-detail/ConfirmDialog.tsx +127 -0
  540. package/src/resource-detail/ResourceActionBar.tsx +157 -0
  541. package/src/resource-detail/ResourceDetailShell.tsx +184 -0
  542. package/src/resource-detail/Section.tsx +78 -0
  543. package/src/resource-detail/index.ts +34 -0
  544. package/src/resource-detail/types.ts +177 -0
  545. package/src/resource-detail/useConfirmAction.ts +70 -0
  546. package/src/resource-detail/useCopyResource.ts +74 -0
  547. package/src/resource-detail/useDeleteResource.ts +110 -0
  548. package/src/resource-detail/useDetailTabs.ts +93 -0
  549. package/src/resource-workbench/components/BulkActionBar.tsx +122 -0
  550. package/src/resource-workbench/components/ColumnHeader.tsx +105 -0
  551. package/src/resource-workbench/components/FilterBar.tsx +173 -0
  552. package/src/resource-workbench/components/ResourceAvatar.tsx +109 -0
  553. package/src/resource-workbench/components/ResourceCards.tsx +126 -0
  554. package/src/resource-workbench/components/ResourceInspector.tsx +88 -0
  555. package/src/resource-workbench/components/ResourceList.tsx +121 -0
  556. package/src/resource-workbench/components/ResourceTable.tsx +222 -0
  557. package/src/resource-workbench/components/ResourceWorkbench.tsx +695 -0
  558. package/src/resource-workbench/components/SelectionCheckbox.tsx +52 -0
  559. package/src/resource-workbench/components/StatusBadge.tsx +119 -0
  560. package/src/resource-workbench/components/ViewSwitcher.tsx +135 -0
  561. package/src/resource-workbench/hooks/useResourceCollection.ts +261 -0
  562. package/src/resource-workbench/hooks/useResourceFilters.ts +216 -0
  563. package/src/resource-workbench/hooks/useResourceSelection.ts +178 -0
  564. package/src/resource-workbench/hooks/useViewPreference.ts +75 -0
  565. package/src/resource-workbench/index.ts +73 -0
  566. package/src/resource-workbench/types.ts +220 -0
  567. package/src/runner/RunnerDetailView.tsx +410 -0
  568. package/src/runner/RunnerListPanel.tsx +126 -111
  569. package/src/runner/index.ts +13 -1
  570. package/src/runner/shared.tsx +124 -0
  571. package/src/runner/useRunner.ts +59 -0
  572. package/src/session/__tests__/group-sessions.test.ts +5 -3
  573. package/src/skill/SkillDetailView.tsx +371 -165
  574. package/src/skill/SkillDiffDialog.tsx +213 -0
  575. package/src/skill/SkillFileBrowser.tsx +289 -0
  576. package/src/skill/SkillUploader.tsx +481 -0
  577. package/src/skill/index.ts +34 -0
  578. package/src/skill/internal/computeArtifactHash.ts +13 -0
  579. package/src/skill/internal/fetchAndUnpackArtifact.ts +48 -0
  580. package/src/skill/usePushSkill.ts +101 -0
  581. package/src/skill/useSkillArtifact.ts +107 -0
  582. package/src/skill/useSkillDiff.ts +128 -0
  583. package/src/skill/useSkillDuplicateCheck.ts +92 -0
  584. package/src/skill/useSkillUpload.ts +231 -0
  585. package/src/skill/useSkillVersions.ts +165 -0
  586. package/src/styles.css +28 -0
  587. package/src/tabs/Tabs.tsx +184 -0
  588. package/src/tabs/index.ts +2 -0
  589. package/src/version-history/DiffFileList.tsx +111 -0
  590. package/src/version-history/DiffSummary.tsx +61 -0
  591. package/src/version-history/DiffViewer.tsx +163 -0
  592. package/src/version-history/MultiFileDiffView.tsx +114 -0
  593. package/src/version-history/VersionTimeline.tsx +232 -0
  594. package/src/version-history/VersionTimelineEntry.tsx +254 -0
  595. package/src/version-history/computeDiff.ts +61 -0
  596. package/src/version-history/computeMultiFileDiff.ts +97 -0
  597. package/src/version-history/index.ts +22 -0
  598. package/src/version-history/types.ts +129 -0
  599. package/styles.css +1 -1
  600. package/tabs/Tabs.d.ts +58 -0
  601. package/tabs/Tabs.d.ts.map +1 -0
  602. package/tabs/Tabs.js +80 -0
  603. package/tabs/Tabs.js.map +1 -0
  604. package/tabs/index.d.ts +3 -0
  605. package/tabs/index.d.ts.map +1 -0
  606. package/tabs/index.js +2 -0
  607. package/tabs/index.js.map +1 -0
  608. package/version-history/DiffFileList.d.ts +22 -0
  609. package/version-history/DiffFileList.d.ts.map +1 -0
  610. package/version-history/DiffFileList.js +37 -0
  611. package/version-history/DiffFileList.js.map +1 -0
  612. package/version-history/DiffSummary.d.ts +21 -0
  613. package/version-history/DiffSummary.d.ts.map +1 -0
  614. package/version-history/DiffSummary.js +16 -0
  615. package/version-history/DiffSummary.js.map +1 -0
  616. package/version-history/DiffViewer.d.ts +31 -0
  617. package/version-history/DiffViewer.d.ts.map +1 -0
  618. package/version-history/DiffViewer.js +60 -0
  619. package/version-history/DiffViewer.js.map +1 -0
  620. package/version-history/MultiFileDiffView.d.ts +30 -0
  621. package/version-history/MultiFileDiffView.d.ts.map +1 -0
  622. package/version-history/MultiFileDiffView.js +40 -0
  623. package/version-history/MultiFileDiffView.js.map +1 -0
  624. package/version-history/VersionTimeline.d.ts +29 -0
  625. package/version-history/VersionTimeline.d.ts.map +1 -0
  626. package/version-history/VersionTimeline.js +87 -0
  627. package/version-history/VersionTimeline.js.map +1 -0
  628. package/version-history/VersionTimelineEntry.d.ts +22 -0
  629. package/version-history/VersionTimelineEntry.d.ts.map +1 -0
  630. package/version-history/VersionTimelineEntry.js +98 -0
  631. package/version-history/VersionTimelineEntry.js.map +1 -0
  632. package/version-history/computeDiff.d.ts +16 -0
  633. package/version-history/computeDiff.d.ts.map +1 -0
  634. package/version-history/computeDiff.js +54 -0
  635. package/version-history/computeDiff.js.map +1 -0
  636. package/version-history/computeMultiFileDiff.d.ts +15 -0
  637. package/version-history/computeMultiFileDiff.d.ts.map +1 -0
  638. package/version-history/computeMultiFileDiff.js +83 -0
  639. package/version-history/computeMultiFileDiff.js.map +1 -0
  640. package/version-history/index.d.ts +14 -0
  641. package/version-history/index.d.ts.map +1 -0
  642. package/version-history/index.js +9 -0
  643. package/version-history/index.js.map +1 -0
  644. package/version-history/types.d.ts +106 -0
  645. package/version-history/types.d.ts.map +1 -0
  646. package/version-history/types.js +2 -0
  647. package/version-history/types.js.map +1 -0
  648. package/library/ResourceListView.d.ts +0 -174
  649. package/library/ResourceListView.d.ts.map +0 -1
  650. package/library/ResourceListView.js +0 -318
  651. package/library/ResourceListView.js.map +0 -1
  652. package/src/library/ResourceListView.tsx +0 -956
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentToInput.d.ts","sourceRoot":"","sources":["../../../src/agent/internal/agentToInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,cAAc,CAAC;AAQtB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAyErD"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Converts a fetched Agent proto to the AgentInput shape expected by
3
+ * `stigmer.agent.update()`. This enables inline field editing: read the
4
+ * current resource, modify one field, and re-submit the full input.
5
+ *
6
+ * Must be kept exhaustive — any spec field not mapped here will be
7
+ * cleared on the next update (the backend does full spec replacement).
8
+ */
9
+ export function agentToInput(agent) {
10
+ const meta = agent.metadata;
11
+ const spec = agent.spec;
12
+ const mcpServerUsages = spec?.mcpServerUsages?.map((usage) => ({
13
+ mcpServerRef: {
14
+ org: usage.mcpServerRef?.org ?? "",
15
+ slug: usage.mcpServerRef?.slug ?? "",
16
+ },
17
+ enabledTools: usage.enabledTools.length > 0 ? [...usage.enabledTools] : undefined,
18
+ toolApprovalOverrides: usage.toolApprovalOverrides.length > 0
19
+ ? usage.toolApprovalOverrides.map((o) => ({
20
+ toolName: o.toolName,
21
+ requiresApproval: o.requiresApproval,
22
+ message: o.message || undefined,
23
+ }))
24
+ : undefined,
25
+ }));
26
+ const skillRefs = spec?.skillRefs?.map((ref) => ({
27
+ org: ref.org || "",
28
+ slug: ref.slug,
29
+ }));
30
+ const subAgents = spec?.subAgents?.map((sa) => ({
31
+ name: sa.name,
32
+ description: sa.description || undefined,
33
+ instructions: sa.instructions || undefined,
34
+ mcpAccess: sa.mcpAccess.length > 0
35
+ ? sa.mcpAccess.map((a) => ({
36
+ mcpServer: a.mcpServer,
37
+ enabledTools: a.enabledTools.length > 0 ? [...a.enabledTools] : undefined,
38
+ }))
39
+ : undefined,
40
+ skillRefs: sa.skillRefs.length > 0
41
+ ? sa.skillRefs.map((r) => ({ org: r.org || "", slug: r.slug }))
42
+ : undefined,
43
+ modelOverride: sa.modelOverride || undefined,
44
+ }));
45
+ let env;
46
+ if (spec?.env && Object.keys(spec.env).length > 0) {
47
+ env = {};
48
+ for (const [key, decl] of Object.entries(spec.env)) {
49
+ env[key] = {
50
+ isSecret: decl.isSecret || undefined,
51
+ description: decl.description || undefined,
52
+ optional: decl.optional || undefined,
53
+ };
54
+ }
55
+ }
56
+ return {
57
+ name: meta?.name ?? "",
58
+ org: meta?.org ?? "",
59
+ slug: meta?.slug,
60
+ labels: meta?.labels && Object.keys(meta.labels).length > 0
61
+ ? { ...meta.labels }
62
+ : undefined,
63
+ description: spec?.description || undefined,
64
+ iconUrl: spec?.iconUrl || undefined,
65
+ instructions: spec?.instructions || undefined,
66
+ mcpServerUsages: mcpServerUsages?.length ? mcpServerUsages : undefined,
67
+ skillRefs: skillRefs?.length ? skillRefs : undefined,
68
+ subAgents: subAgents?.length ? subAgents : undefined,
69
+ env,
70
+ };
71
+ }
72
+ //# sourceMappingURL=agentToInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentToInput.js","sourceRoot":"","sources":["../../../src/agent/internal/agentToInput.ts"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC;IAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAExB,MAAM,eAAe,GACnB,IAA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,EAAE;QACpB,IAAI,EAAE,IAAI,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;YACzD,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;YACpB,CAAC,CAAC,SAAS;QACb,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,SAAS;QAC3C,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,SAAS;QACnC,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,SAAS;QAC7C,eAAe,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;QACtE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACpD,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACpD,GAAG;KACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AgentWizardData } from "./types";
2
+ /** Props for {@link CapabilitiesStep}. */
3
+ export interface CapabilitiesStepProps {
4
+ readonly org: string;
5
+ readonly data: AgentWizardData;
6
+ readonly updateData: (partial: Partial<AgentWizardData>) => void;
7
+ }
8
+ /**
9
+ * Wizard step 2: Agent capabilities.
10
+ *
11
+ * All sections are optional and start collapsed. The user expands
12
+ * sections to add MCP servers, skills, and environment variables.
13
+ * No validation gate — the user can proceed with zero capabilities.
14
+ */
15
+ export declare function CapabilitiesStep({ org, data, updateData, }: CapabilitiesStepProps): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=CapabilitiesStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CapabilitiesStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/CapabilitiesStep.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AAE5D,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;CAClE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,IAAI,EACJ,UAAU,GACX,EAAE,qBAAqB,2CA8FvB"}
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useState } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ import { McpServerPicker } from "../../mcp-server/McpServerPicker";
6
+ import { SkillPicker } from "../../skill/SkillPicker";
7
+ /**
8
+ * Wizard step 2: Agent capabilities.
9
+ *
10
+ * All sections are optional and start collapsed. The user expands
11
+ * sections to add MCP servers, skills, and environment variables.
12
+ * No validation gate — the user can proceed with zero capabilities.
13
+ */
14
+ export function CapabilitiesStep({ org, data, updateData, }) {
15
+ const [expandedSections, setExpandedSections] = useState(() => {
16
+ const initial = new Set();
17
+ if (data.mcpServerUsages.length > 0)
18
+ initial.add("mcp");
19
+ if (data.skillRefs.length > 0)
20
+ initial.add("skills");
21
+ if (data.env.length > 0)
22
+ initial.add("env");
23
+ return initial;
24
+ });
25
+ const toggleSection = useCallback((section) => {
26
+ setExpandedSections((prev) => {
27
+ const next = new Set(prev);
28
+ if (next.has(section))
29
+ next.delete(section);
30
+ else
31
+ next.add(section);
32
+ return next;
33
+ });
34
+ }, []);
35
+ const handleMcpChange = useCallback((usages) => {
36
+ updateData({ mcpServerUsages: usages });
37
+ }, [updateData]);
38
+ const handleSkillsChange = useCallback((refs) => {
39
+ updateData({ skillRefs: refs });
40
+ }, [updateData]);
41
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Capabilities" }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Configure what tools, skills, and secrets this agent can use. All sections are optional." })] }), _jsx(CollapsibleSection, { id: "mcp", title: "MCP Servers", subtitle: "Tools and integrations the agent can call", count: data.mcpServerUsages.length, expanded: expandedSections.has("mcp"), onToggle: toggleSection, children: _jsx(McpServerPicker, { org: org, scope: "all", value: data.mcpServerUsages, onChange: handleMcpChange }) }), _jsx(CollapsibleSection, { id: "skills", title: "Skills", subtitle: "Knowledge and capabilities to attach", count: data.skillRefs.length, expanded: expandedSections.has("skills"), onToggle: toggleSection, children: _jsx(SkillPicker, { org: org, scope: "all", value: data.skillRefs, onChange: handleSkillsChange }) }), _jsx(CollapsibleSection, { id: "env", title: "Environment Variables", subtitle: "Secrets and config the agent declares", count: data.env.length, expanded: expandedSections.has("env"), onToggle: toggleSection, children: _jsx(EnvVarEditor, { entries: data.env, onChange: (env) => updateData({ env }) }) })] }));
42
+ }
43
+ // ---------------------------------------------------------------------------
44
+ // CollapsibleSection
45
+ // ---------------------------------------------------------------------------
46
+ function CollapsibleSection({ id, title, subtitle, count, expanded, onToggle, children, }) {
47
+ return (_jsxs("div", { className: "overflow-hidden rounded-lg border border-border", children: [_jsxs("button", { type: "button", onClick: () => onToggle(id), "aria-expanded": expanded, "aria-controls": `stgm-wizard-section-${id}`, className: cn("flex w-full items-center justify-between px-4 py-3 text-left transition-colors", "hover:bg-accent-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"), children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium text-foreground", children: title }), count > 0 && (_jsx("span", { className: "ml-2 inline-flex items-center justify-center rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-medium text-primary-foreground", children: count })), _jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: subtitle })] }), _jsx(ChevronIcon, { className: cn("size-4 shrink-0 text-muted-foreground transition-transform", expanded && "rotate-180") })] }), expanded && (_jsx("div", { id: `stgm-wizard-section-${id}`, className: "border-t border-border px-4 py-4", children: children }))] }));
48
+ }
49
+ // ---------------------------------------------------------------------------
50
+ // EnvVarEditor — key-value editor for env var declarations
51
+ // ---------------------------------------------------------------------------
52
+ function EnvVarEditor({ entries, onChange, }) {
53
+ const addEntry = useCallback(() => {
54
+ onChange([
55
+ ...entries,
56
+ { key: "", description: "", isSecret: true, optional: false },
57
+ ]);
58
+ }, [entries, onChange]);
59
+ const updateEntry = useCallback((index, partial) => {
60
+ const updated = entries.map((entry, i) => i === index ? { ...entry, ...partial } : entry);
61
+ onChange(updated);
62
+ }, [entries, onChange]);
63
+ const removeEntry = useCallback((index) => {
64
+ onChange(entries.filter((_, i) => i !== index));
65
+ }, [entries, onChange]);
66
+ return (_jsxs("div", { className: "flex flex-col gap-3", children: [entries.map((entry, index) => (_jsxs("div", { className: "flex flex-col gap-2 rounded-md border border-border p-3", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsxs("div", { className: "flex-1 space-y-1.5", children: [_jsx("input", { type: "text", value: entry.key, onChange: (e) => updateEntry(index, { key: e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g, "") }), placeholder: "VARIABLE_NAME", "aria-label": `Environment variable name ${index + 1}`, className: cn("w-full rounded-md border border-input bg-input-bg px-2.5 py-1.5 font-mono text-xs text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring") }), _jsx("input", { type: "text", value: entry.description, onChange: (e) => updateEntry(index, { description: e.target.value }), placeholder: "Description (optional)", "aria-label": `Description for ${entry.key || `variable ${index + 1}`}`, className: cn("w-full rounded-md border border-input bg-input-bg px-2.5 py-1.5 text-xs text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring") })] }), _jsx("button", { type: "button", onClick: () => removeEntry(index), "aria-label": `Remove ${entry.key || "variable"}`, className: cn("mt-1 rounded p-1 text-muted-foreground transition-colors", "hover:bg-accent-hover hover:text-destructive", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: _jsx(RemoveIcon, { className: "size-3.5" }) })] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("label", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [_jsx("input", { type: "checkbox", checked: entry.isSecret, onChange: (e) => updateEntry(index, { isSecret: e.target.checked }), className: "size-3.5 rounded border-input" }), "Secret"] }), _jsxs("label", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [_jsx("input", { type: "checkbox", checked: entry.optional, onChange: (e) => updateEntry(index, { optional: e.target.checked }), className: "size-3.5 rounded border-input" }), "Optional"] })] })] }, index))), _jsxs("button", { type: "button", onClick: addEntry, className: cn("inline-flex w-fit items-center gap-1.5 rounded-md border border-dashed border-input px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors", "hover:border-border hover:text-foreground hover:bg-accent-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: [_jsx(PlusIcon, { className: "size-3" }), "Add variable"] })] }));
67
+ }
68
+ // ---------------------------------------------------------------------------
69
+ // Icons
70
+ // ---------------------------------------------------------------------------
71
+ function ChevronIcon({ className }) {
72
+ return (_jsx("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: "m4 6 4 4 4-4" }) }));
73
+ }
74
+ function PlusIcon({ className }) {
75
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M8 3v10M3 8h10" }) }));
76
+ }
77
+ function RemoveIcon({ className }) {
78
+ return (_jsx("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: "M4 4l8 8M12 4l-8 8" }) }));
79
+ }
80
+ //# sourceMappingURL=CapabilitiesStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CapabilitiesStep.js","sourceRoot":"","sources":["../../../src/agent/steps/CapabilitiesStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAUtD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,GAAG,EACH,IAAI,EACJ,UAAU,GACY;IACtB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAc,GAAG,EAAE;QACzE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,OAAe,EAAE,EAAE;QACpD,mBAAmB,CAAC,CAAC,IAAI,EAAE,EAAE;YAC3B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,IAAI,CAAC,GAAG,C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ACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,iBACT,MAAM,YAElB,eAAM,CAAC,EAAC,gBAAgB,GAAG,GACvB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAmC;IAChE,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,YAElB,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { AgentWizardData } from "./types";
2
+ /** Props for {@link IdentityStep}. */
3
+ export interface IdentityStepProps {
4
+ readonly data: AgentWizardData;
5
+ readonly updateData: (partial: Partial<AgentWizardData>) => void;
6
+ readonly validationError: string | null;
7
+ }
8
+ /**
9
+ * Wizard step 1: Agent identity and instructions.
10
+ *
11
+ * Collects: name (required), slug (auto-derived), description,
12
+ * icon URL, visibility, and the instructions textarea.
13
+ *
14
+ * The slug auto-derives from the name until the user manually edits it.
15
+ * Follows the same pattern as `CreateOrganizationForm`.
16
+ */
17
+ export declare function IdentityStep({ data, updateData, validationError, }: IdentityStepProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=IdentityStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAID;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,eAAe,GAChB,EAAE,iBAAiB,2CAgMnB"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ import { generateSlug } from "../../internal/slug";
6
+ const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
7
+ /**
8
+ * Wizard step 1: Agent identity and instructions.
9
+ *
10
+ * Collects: name (required), slug (auto-derived), description,
11
+ * icon URL, visibility, and the instructions textarea.
12
+ *
13
+ * The slug auto-derives from the name until the user manually edits it.
14
+ * Follows the same pattern as `CreateOrganizationForm`.
15
+ */
16
+ export function IdentityStep({ data, updateData, validationError, }) {
17
+ const handleNameChange = useCallback((value) => {
18
+ if (!data.slugTouched) {
19
+ updateData({ name: value, slug: generateSlug(value) });
20
+ }
21
+ else {
22
+ updateData({ name: value });
23
+ }
24
+ }, [data.slugTouched, updateData]);
25
+ const handleSlugChange = useCallback((value) => {
26
+ updateData({ slug: value, slugTouched: true });
27
+ }, [updateData]);
28
+ const slugError = data.slug.length > 0 && !SLUG_PATTERN.test(data.slug)
29
+ ? "Slug must be lowercase letters, numbers, and hyphens only"
30
+ : null;
31
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Identity & Instructions" }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Define what this agent is and what it does." })] }), validationError && (_jsx("p", { className: "text-sm text-destructive", role: "alert", children: validationError })), _jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsxs("label", { htmlFor: "stgm-wizard-agent-name", className: "text-sm font-medium text-foreground", children: ["Name ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx("input", { id: "stgm-wizard-agent-name", type: "text", value: data.name, onChange: (e) => handleNameChange(e.target.value), placeholder: "e.g. PR Review Bot", autoFocus: true, className: cn("w-full rounded-md border border-input bg-input-bg px-3 py-2 text-sm text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring") })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("label", { htmlFor: "stgm-wizard-agent-slug", className: "text-sm font-medium text-foreground", children: "Slug" }), _jsx("input", { id: "stgm-wizard-agent-slug", type: "text", value: data.slug, onChange: (e) => handleSlugChange(e.target.value), placeholder: "auto-generated", className: cn("w-full rounded-md border px-3 py-2 font-mono text-sm text-foreground", slugError
32
+ ? "border-destructive bg-input-bg"
33
+ : "border-input bg-input-bg", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring") }), slugError && (_jsx("p", { className: "text-xs text-destructive", children: slugError })), !slugError && data.slug && (_jsxs("p", { className: "text-xs text-muted-foreground", children: ["Referenced as ", _jsx("code", { className: "font-mono", children: data.slug })] }))] })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("label", { htmlFor: "stgm-wizard-agent-description", className: "text-sm font-medium text-foreground", children: "Description" }), _jsx("input", { id: "stgm-wizard-agent-description", type: "text", value: data.description, onChange: (e) => updateData({ description: e.target.value }), placeholder: "A brief description of what this agent does", maxLength: 200, className: cn("w-full rounded-md border border-input bg-input-bg px-3 py-2 text-sm text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring") })] }), _jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx("label", { htmlFor: "stgm-wizard-agent-icon", className: "text-sm font-medium text-foreground", children: "Icon URL" }), _jsx("input", { id: "stgm-wizard-agent-icon", type: "url", value: data.iconUrl, onChange: (e) => updateData({ iconUrl: e.target.value }), placeholder: "https://example.com/icon.png", className: cn("w-full rounded-md border border-input bg-input-bg px-3 py-2 text-sm text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring") })] }), _jsxs("fieldset", { className: "space-y-1.5", children: [_jsx("legend", { className: "text-sm font-medium text-foreground", children: "Visibility" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(VisibilityOption, { value: "private", label: "Private", checked: data.visibility === "private", onChange: () => updateData({ visibility: "private" }) }), _jsx(VisibilityOption, { value: "public", label: "Public", checked: data.visibility === "public", onChange: () => updateData({ visibility: "public" }) })] })] })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("label", { htmlFor: "stgm-wizard-agent-instructions", className: "text-sm font-medium text-foreground", children: "Instructions" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "The system prompt that defines this agent's behavior." }), _jsx("textarea", { id: "stgm-wizard-agent-instructions", value: data.instructions, onChange: (e) => updateData({ instructions: e.target.value }), placeholder: "You are a helpful assistant that...", rows: 12, className: cn("w-full resize-y rounded-md border border-input bg-input-bg px-3 py-2 font-mono text-sm text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring") })] })] }));
34
+ }
35
+ // ---------------------------------------------------------------------------
36
+ // Visibility radio option
37
+ // ---------------------------------------------------------------------------
38
+ function VisibilityOption({ value, label, checked, onChange, }) {
39
+ return (_jsxs("label", { className: cn("inline-flex cursor-pointer items-center rounded-md border px-3 py-1.5 text-sm transition-colors", checked
40
+ ? "border-primary bg-primary-subtle text-primary font-medium"
41
+ : "border-input bg-input-bg text-muted-foreground hover:border-border hover:text-foreground"), children: [_jsx("input", { type: "radio", name: "stgm-wizard-agent-visibility", value: value, checked: checked, onChange: onChange, className: "sr-only" }), label] }));
42
+ }
43
+ //# sourceMappingURL=IdentityStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityStep.js","sourceRoot":"","sources":["../../../src/agent/steps/IdentityStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,eAAe,GACG;IAClB,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,KAAa,EAAE,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EACD,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAC/B,CAAC;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,KAAa,EAAE,EAAE;QAChB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACnD,CAAC,CAAC,2DAA2D;QAC7D,CAAC,CAAC,IAAI,CAAC;IAEX,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,a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nB,EACD,KAAK,IACA,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { AgentInput } from "@stigmer/sdk";
2
+ import type { AgentWizardData } from "./types";
3
+ /** Props for {@link ReviewStep}. */
4
+ export interface ReviewStepProps {
5
+ readonly org: string;
6
+ readonly data: AgentWizardData;
7
+ readonly isCreating: boolean;
8
+ readonly error: Error | null;
9
+ }
10
+ /**
11
+ * Wizard step 3: Review and create.
12
+ *
13
+ * Shows a summary card with key configuration details and a full
14
+ * YAML preview of the agent that will be created. The "Create" action
15
+ * is in the WizardNav footer, not in this component.
16
+ */
17
+ export declare function ReviewStep({ org, data, isCreating, error, }: ReviewStepProps): import("react/jsx-runtime").JSX.Element;
18
+ /**
19
+ * Transforms wizard data into the SDK `AgentInput` shape for submission.
20
+ * Exported for reuse by `AgentCreationWizard`.
21
+ */
22
+ export declare function buildAgentInput(org: string, data: AgentWizardData): AgentInput;
23
+ //# sourceMappingURL=ReviewStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReviewStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/ReviewStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,UAAU,EACV,KAAK,GACN,EAAE,eAAe,2CAmGjB;AAyCD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,eAAe,GACpB,UAAU,CAkCZ"}
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMemo } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ import { getUserMessage } from "@stigmer/sdk";
6
+ import { serializeAgentInputYaml } from "../../library/serialize-resource-yaml";
7
+ /**
8
+ * Wizard step 3: Review and create.
9
+ *
10
+ * Shows a summary card with key configuration details and a full
11
+ * YAML preview of the agent that will be created. The "Create" action
12
+ * is in the WizardNav footer, not in this component.
13
+ */
14
+ export function ReviewStep({ org, data, isCreating, error, }) {
15
+ const agentInput = useMemo(() => buildAgentInput(org, data), [org, data]);
16
+ const yamlPreview = useMemo(() => serializeAgentInputYaml(agentInput), [agentInput]);
17
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Review & Create" }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Review the agent configuration below, then create it." })] }), _jsx("div", { className: "rounded-lg border border-border p-4", children: _jsxs("dl", { className: "grid gap-x-6 gap-y-3 text-sm sm:grid-cols-2", children: [_jsx(SummaryItem, { label: "Name", value: data.name }), _jsx(SummaryItem, { label: "Slug", value: data.slug, mono: true }), _jsx(SummaryItem, { label: "Organization", value: org, mono: true }), _jsx(SummaryItem, { label: "Visibility", value: data.visibility === "public" ? "Public" : "Private" }), data.description && (_jsx(SummaryItem, { label: "Description", value: data.description, className: "sm:col-span-2" })), data.instructions && (_jsx(SummaryItem, { label: "Instructions", value: truncate(data.instructions, 120), className: "sm:col-span-2" })), _jsx(SummaryItem, { label: "MCP Servers", value: data.mcpServerUsages.length > 0
18
+ ? `${data.mcpServerUsages.length} configured`
19
+ : "None" }), _jsx(SummaryItem, { label: "Skills", value: data.skillRefs.length > 0
20
+ ? `${data.skillRefs.length} attached`
21
+ : "None" }), data.env.length > 0 && (_jsx(SummaryItem, { label: "Env Variables", value: `${data.env.length} declared` }))] }) }), _jsxs("div", { className: "space-y-2", children: [_jsx("h3", { className: "text-xs font-medium uppercase tracking-wider text-muted-foreground", children: "YAML Preview" }), _jsx("div", { className: "max-h-80 overflow-auto rounded-lg border border-border bg-muted-faint", children: _jsx("pre", { className: "p-4 font-mono text-xs leading-relaxed text-foreground", children: yamlPreview }) })] }), error && (_jsxs("div", { className: "rounded-md border border-destructive bg-muted-faint px-4 py-3", role: "alert", children: [_jsx("p", { className: "text-sm font-medium text-destructive", children: "Failed to create agent" }), _jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: getUserMessage(error) })] })), isCreating && (_jsx("p", { className: "text-sm text-muted-foreground", "aria-live": "polite", children: "Creating agent\u2026" }))] }));
22
+ }
23
+ // ---------------------------------------------------------------------------
24
+ // Summary item
25
+ // ---------------------------------------------------------------------------
26
+ function SummaryItem({ label, value, mono, className, }) {
27
+ return (_jsxs("div", { className: className, children: [_jsx("dt", { className: "text-xs text-muted-foreground", children: label }), _jsx("dd", { className: cn("mt-0.5 text-sm text-foreground", mono && "font-mono"), children: value })] }));
28
+ }
29
+ // ---------------------------------------------------------------------------
30
+ // Helpers
31
+ // ---------------------------------------------------------------------------
32
+ function truncate(text, maxLength) {
33
+ if (text.length <= maxLength)
34
+ return text;
35
+ return text.slice(0, maxLength) + "…";
36
+ }
37
+ /**
38
+ * Transforms wizard data into the SDK `AgentInput` shape for submission.
39
+ * Exported for reuse by `AgentCreationWizard`.
40
+ */
41
+ export function buildAgentInput(org, data) {
42
+ const input = {
43
+ name: data.name.trim(),
44
+ org,
45
+ ...(data.slug && { slug: data.slug }),
46
+ ...(data.description && { description: data.description.trim() }),
47
+ ...(data.iconUrl && { iconUrl: data.iconUrl.trim() }),
48
+ ...(data.instructions && { instructions: data.instructions }),
49
+ };
50
+ if (data.mcpServerUsages.length > 0) {
51
+ input.mcpServerUsages = data.mcpServerUsages;
52
+ }
53
+ if (data.skillRefs.length > 0) {
54
+ input.skillRefs = data.skillRefs;
55
+ }
56
+ if (data.env.length > 0) {
57
+ const env = {};
58
+ for (const entry of data.env) {
59
+ if (!entry.key)
60
+ continue;
61
+ env[entry.key] = {
62
+ ...(entry.isSecret && { isSecret: true }),
63
+ ...(entry.description && { description: entry.description }),
64
+ ...(entry.optional && { optional: true }),
65
+ };
66
+ }
67
+ if (Object.keys(env).length > 0) {
68
+ input.env = env;
69
+ }
70
+ }
71
+ return input;
72
+ }
73
+ //# sourceMappingURL=ReviewStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReviewStep.js","sourceRoot":"","sources":["../../../src/agent/steps/ReviewStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAWhF;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,UAAU,EACV,KAAK,GACW;IAChB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC,EACzC,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,aAClC,0BACE,aAAI,SAAS,EAAC,uCAAuC,gCAEhD,EACL,YAAG,SAAS,EAAC,oCAAoC,sEAE7C,IACA,EAGN,cAAK,SAAS,EAAC,qCAAqC,YAClD,cAAI,SAAS,EAAC,6CAA6C,aACzD,KAAC,WAAW,IAAC,KAAK,EAAC,MA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,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;QAClB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { McpServerUsageInput, ResourceRef } from "@stigmer/sdk";
2
+ import type { EnvVarEntry } from "../../resource-creation/types";
3
+ export type { EnvVarEntry } from "../../resource-creation/types";
4
+ /**
5
+ * Accumulated form state for the agent creation wizard.
6
+ *
7
+ * Each field corresponds to a property on `AgentInput`. The wizard
8
+ * builds this incrementally across steps, then transforms it into
9
+ * an `AgentInput` for submission on the final step.
10
+ */
11
+ export interface AgentWizardData {
12
+ /** Agent display name (required). */
13
+ readonly name: string;
14
+ /** URL-friendly slug (auto-derived from name, editable). */
15
+ readonly slug: string;
16
+ /** Whether the slug has been manually edited by the user. */
17
+ readonly slugTouched: boolean;
18
+ /** Short description (optional). */
19
+ readonly description: string;
20
+ /** Icon URL (optional). */
21
+ readonly iconUrl: string;
22
+ /** Resource visibility. */
23
+ readonly visibility: "private" | "public";
24
+ /** System prompt / instructions (the agent's core content). */
25
+ readonly instructions: string;
26
+ /** MCP server usages with tool configuration. */
27
+ readonly mcpServerUsages: McpServerUsageInput[];
28
+ /** Skill references. */
29
+ readonly skillRefs: ResourceRef[];
30
+ /** Environment variable declarations. */
31
+ readonly env: EnvVarEntry[];
32
+ }
33
+ /** Creates the initial empty wizard data. */
34
+ export declare function createInitialWizardData(): AgentWizardData;
35
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,YAAY,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAE9B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,oCAAoC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2BAA2B;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC1C,+DAA+D;IAC/D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAG9B,iDAAiD;IACjD,QAAQ,CAAC,eAAe,EAAE,mBAAmB,EAAE,CAAC;IAChD,wBAAwB;IACxB,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,6CAA6C;AAC7C,wBAAgB,uBAAuB,IAAI,eAAe,CAazD"}
@@ -0,0 +1,16 @@
1
+ /** Creates the initial empty wizard data. */
2
+ export function createInitialWizardData() {
3
+ return {
4
+ name: "",
5
+ slug: "",
6
+ slugTouched: false,
7
+ description: "",
8
+ iconUrl: "",
9
+ visibility: "private",
10
+ instructions: "",
11
+ mcpServerUsages: [],
12
+ skillRefs: [],
13
+ env: [],
14
+ };
15
+ }
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/agent/steps/types.ts"],"names":[],"mappings":"AAsCA,6CAA6C;AAC7C,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,EAAE;QACb,GAAG,EAAE,EAAE;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { AgentInput } from "@stigmer/sdk";
2
+ import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
3
+ /** Return value of {@link useCreateAgent}. */
4
+ export interface UseCreateAgentReturn {
5
+ /**
6
+ * Submit an {@link AgentInput} to create (or upsert) an agent blueprint.
7
+ *
8
+ * Uses `stigmer.agent.apply()` — the idempotent upsert operation.
9
+ * Resolves with the server-created/updated `Agent` proto including
10
+ * populated metadata (id, slug, audit timestamps).
11
+ */
12
+ readonly create: (input: AgentInput) => Promise<Agent>;
13
+ /** `true` while the apply request is in flight. */
14
+ readonly isCreating: boolean;
15
+ /** Error from the last failed create, or `null` when healthy. */
16
+ readonly error: Error | null;
17
+ /** Reset `error` to `null`. */
18
+ readonly clearError: () => void;
19
+ }
20
+ /**
21
+ * Behavior hook that wraps `agent.apply()` with loading and error state.
22
+ *
23
+ * Creates an agent blueprint from an {@link AgentInput}. Uses `apply()`
24
+ * (upsert) rather than `create()` so re-submissions are idempotent —
25
+ * matching the CLI's `stigmer apply` semantics.
26
+ *
27
+ * Follows the established SDK mutation hook pattern: `isCreating` flag,
28
+ * `error` state, `clearError` reset, result returned from the promise
29
+ * (not stored in hook state).
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * const { create, isCreating, error, clearError } = useCreateAgent();
34
+ *
35
+ * const agent = await create({
36
+ * name: "pr-review-bot",
37
+ * org: "acme",
38
+ * instructions: "Review pull requests for code quality...",
39
+ * mcpServerUsages: [{ mcpServerRef: { org: "acme", slug: "github" } }],
40
+ * });
41
+ * // agent.metadata?.slug → "pr-review-bot"
42
+ * ```
43
+ */
44
+ export declare function useCreateAgent(): UseCreateAgentReturn;
45
+ //# sourceMappingURL=useCreateAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateAgent.d.ts","sourceRoot":"","sources":["../../src/agent/useCreateAgent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAIhF,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACvD,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,+BAA+B;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAyBrD"}
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { useCallback, useState } from "react";
3
+ import { useStigmer } from "../hooks";
4
+ import { toError } from "../internal/toError";
5
+ /**
6
+ * Behavior hook that wraps `agent.apply()` with loading and error state.
7
+ *
8
+ * Creates an agent blueprint from an {@link AgentInput}. Uses `apply()`
9
+ * (upsert) rather than `create()` so re-submissions are idempotent —
10
+ * matching the CLI's `stigmer apply` semantics.
11
+ *
12
+ * Follows the established SDK mutation hook pattern: `isCreating` flag,
13
+ * `error` state, `clearError` reset, result returned from the promise
14
+ * (not stored in hook state).
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { create, isCreating, error, clearError } = useCreateAgent();
19
+ *
20
+ * const agent = await create({
21
+ * name: "pr-review-bot",
22
+ * org: "acme",
23
+ * instructions: "Review pull requests for code quality...",
24
+ * mcpServerUsages: [{ mcpServerRef: { org: "acme", slug: "github" } }],
25
+ * });
26
+ * // agent.metadata?.slug → "pr-review-bot"
27
+ * ```
28
+ */
29
+ export function useCreateAgent() {
30
+ const stigmer = useStigmer();
31
+ const [isCreating, setIsCreating] = useState(false);
32
+ const [error, setError] = useState(null);
33
+ const clearError = useCallback(() => setError(null), []);
34
+ const create = useCallback(async (input) => {
35
+ setIsCreating(true);
36
+ setError(null);
37
+ try {
38
+ return await stigmer.agent.apply(input);
39
+ }
40
+ catch (err) {
41
+ setError(toError(err));
42
+ throw err;
43
+ }
44
+ finally {
45
+ setIsCreating(false);
46
+ }
47
+ }, [stigmer]);
48
+ return { create, isCreating, error, clearError };
49
+ }
50
+ //# sourceMappingURL=useCreateAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateAgent.js","sourceRoot":"","sources":["../../src/agent/useCreateAgent.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAoB9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,KAAiB,EAAkB,EAAE;QAC1C,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
2
+ import type { AgentInput } from "@stigmer/sdk";
3
+ /** Return value of {@link useUpdateAgent}. */
4
+ export interface UseUpdateAgentReturn {
5
+ /** Update an existing agent with a full input. Returns the updated resource. */
6
+ readonly update: (input: AgentInput) => Promise<Agent>;
7
+ /** `true` while the update RPC is in flight. */
8
+ readonly isUpdating: boolean;
9
+ /** Error from the last failed update, or `null` when healthy. */
10
+ readonly error: Error | null;
11
+ /** Clear the error state. */
12
+ readonly clearError: () => void;
13
+ }
14
+ /**
15
+ * Mutation hook that updates an existing Agent resource.
16
+ *
17
+ * Wraps `stigmer.agent.update(input)` with loading and error state.
18
+ * The caller must provide a **complete** `AgentInput` — the backend
19
+ * performs full spec replacement. Use `agentToInput()` to reconstruct
20
+ * the input from a fetched agent, modify the desired field, and pass
21
+ * the result here.
22
+ */
23
+ export declare function useUpdateAgent(): UseUpdateAgentReturn;
24
+ //# sourceMappingURL=useUpdateAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateAgent.d.ts","sourceRoot":"","sources":["../../src/agent/useUpdateAgent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACvD,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAyBrD"}