@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,97 @@
1
+ "use client";
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
+ import { useStigmer } from "../hooks";
4
+ import { toError } from "../internal/toError";
5
+ import { fetchAndUnpackArtifact } from "./internal/fetchAndUnpackArtifact";
6
+ import { computeMultiFileDiff } from "../version-history/computeMultiFileDiff";
7
+ /** Maximum artifact size (10 MB) to prevent excessive memory usage. */
8
+ const MAX_ARTIFACT_BYTES = 10 * 1024 * 1024;
9
+ // ---------------------------------------------------------------------------
10
+ // Hook implementation
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * Data hook that fetches two skill version artifacts and computes a
14
+ * multi-file diff between them.
15
+ *
16
+ * Takes two artifact storage keys (obtained from `useSkillVersions.getArtifactKey()`).
17
+ * Fetches both ZIPs in parallel, unpacks them, and runs `computeMultiFileDiff`
18
+ * on the extracted text file maps.
19
+ *
20
+ * Pass `null` for either key to disable fetching (stable no-op).
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * const { getArtifactKey } = useSkillVersions(org, slug);
25
+ * const { diff, isLoading } = useSkillDiff(
26
+ * getArtifactKey(fromHash),
27
+ * getArtifactKey(toHash),
28
+ * );
29
+ * ```
30
+ */
31
+ export function useSkillDiff(fromArtifactKey, toArtifactKey) {
32
+ const stigmer = useStigmer();
33
+ const [diff, setDiff] = useState(null);
34
+ const [isLoading, setIsLoading] = useState(false);
35
+ const [error, setError] = useState(null);
36
+ const fetchIdRef = useRef(0);
37
+ const doFetch = useCallback(async () => {
38
+ if (!fromArtifactKey || !toArtifactKey) {
39
+ setDiff(null);
40
+ setError(null);
41
+ return;
42
+ }
43
+ const fetchId = ++fetchIdRef.current;
44
+ setIsLoading(true);
45
+ setError(null);
46
+ try {
47
+ const [fromResult, toResult] = await Promise.all([
48
+ fetchAndUnpackArtifact(stigmer, fromArtifactKey),
49
+ fetchAndUnpackArtifact(stigmer, toArtifactKey),
50
+ ]);
51
+ if (fetchIdRef.current !== fetchId)
52
+ return;
53
+ const totalBytes = estimateMapSize(fromResult.contentMap) + estimateMapSize(toResult.contentMap);
54
+ if (totalBytes > MAX_ARTIFACT_BYTES) {
55
+ throw new Error(`Combined artifact size (${formatBytes(totalBytes)}) exceeds the ${formatBytes(MAX_ARTIFACT_BYTES)} limit. ` +
56
+ "Try comparing smaller skill packages.");
57
+ }
58
+ const result = computeMultiFileDiff(fromResult.contentMap, toResult.contentMap);
59
+ if (fetchIdRef.current !== fetchId)
60
+ return;
61
+ setDiff(result);
62
+ }
63
+ catch (err) {
64
+ if (fetchIdRef.current !== fetchId)
65
+ return;
66
+ setError(toError(err));
67
+ setDiff(null);
68
+ }
69
+ finally {
70
+ if (fetchIdRef.current === fetchId) {
71
+ setIsLoading(false);
72
+ }
73
+ }
74
+ }, [fromArtifactKey, toArtifactKey, stigmer]);
75
+ useEffect(() => {
76
+ doFetch();
77
+ }, [doFetch]);
78
+ return useMemo(() => ({ diff, isLoading, error }), [diff, isLoading, error]);
79
+ }
80
+ // ---------------------------------------------------------------------------
81
+ // Utilities
82
+ // ---------------------------------------------------------------------------
83
+ function estimateMapSize(map) {
84
+ let total = 0;
85
+ for (const value of map.values()) {
86
+ total += value.length * 2;
87
+ }
88
+ return total;
89
+ }
90
+ function formatBytes(bytes) {
91
+ if (bytes < 1024)
92
+ return `${bytes} B`;
93
+ if (bytes < 1024 * 1024)
94
+ return `${(bytes / 1024).toFixed(1)} KB`;
95
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
96
+ }
97
+ //# sourceMappingURL=useSkillDiff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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E,CAAC;IACZ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAClC,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CACzB,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,SAAS,eAAe,CAAC,GAAgC;IACvD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;QACjC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACpD,CAAC"}
@@ -0,0 +1,34 @@
1
+ /** Return value of {@link useSkillDuplicateCheck}. */
2
+ export interface UseSkillDuplicateCheckReturn {
3
+ /** Whether the uploaded artifact is identical to the current version. */
4
+ readonly isDuplicate: boolean;
5
+ /** `true` while the check is in progress. */
6
+ readonly isChecking: boolean;
7
+ /**
8
+ * Run the duplicate check for the given artifact.
9
+ *
10
+ * Computes a client-side SHA-256 hash of `artifactBytes`, fetches
11
+ * the existing skill by `(org, slug)`, and compares against
12
+ * `status.versionHash`. If they match, sets `isDuplicate` to `true`.
13
+ *
14
+ * Returns `true` if the content is a duplicate.
15
+ */
16
+ readonly check: (params: {
17
+ org: string;
18
+ slug: string;
19
+ artifactBytes: Uint8Array;
20
+ }) => Promise<boolean>;
21
+ /** Reset the check state. */
22
+ readonly reset: () => void;
23
+ }
24
+ /**
25
+ * Behavior hook that checks whether a skill package's content is
26
+ * identical to the currently deployed version.
27
+ *
28
+ * Uses Web Crypto SHA-256 on the client side and compares against
29
+ * `SkillStatus.versionHash` from a `getByReference` RPC call.
30
+ * If the skill doesn't exist yet (NOT_FOUND), the check passes
31
+ * (not a duplicate).
32
+ */
33
+ export declare function useSkillDuplicateCheck(): UseSkillDuplicateCheckReturn;
34
+ //# sourceMappingURL=useSkillDuplicateCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillDuplicateCheck.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillDuplicateCheck.ts"],"names":[],"mappings":"AAMA,sDAAsD;AACtD,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,UAAU,CAAC;KAC3B,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,4BAA4B,CAoDrE"}
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { useCallback, useRef, useState } from "react";
3
+ import { useStigmer } from "../hooks";
4
+ import { computeArtifactHash } from "./internal/computeArtifactHash";
5
+ /**
6
+ * Behavior hook that checks whether a skill package's content is
7
+ * identical to the currently deployed version.
8
+ *
9
+ * Uses Web Crypto SHA-256 on the client side and compares against
10
+ * `SkillStatus.versionHash` from a `getByReference` RPC call.
11
+ * If the skill doesn't exist yet (NOT_FOUND), the check passes
12
+ * (not a duplicate).
13
+ */
14
+ export function useSkillDuplicateCheck() {
15
+ const stigmer = useStigmer();
16
+ const [isDuplicate, setIsDuplicate] = useState(false);
17
+ const [isChecking, setIsChecking] = useState(false);
18
+ const callIdRef = useRef(0);
19
+ const reset = useCallback(() => {
20
+ callIdRef.current++;
21
+ setIsDuplicate(false);
22
+ setIsChecking(false);
23
+ }, []);
24
+ const check = useCallback(async (params) => {
25
+ const callId = ++callIdRef.current;
26
+ setIsChecking(true);
27
+ setIsDuplicate(false);
28
+ try {
29
+ const [clientHash, existingSkill] = await Promise.all([
30
+ computeArtifactHash(params.artifactBytes),
31
+ stigmer.skill
32
+ .getByReference({ org: params.org, slug: params.slug })
33
+ .catch(() => null),
34
+ ]);
35
+ if (callIdRef.current !== callId)
36
+ return false;
37
+ if (!existingSkill) {
38
+ setIsDuplicate(false);
39
+ return false;
40
+ }
41
+ const serverHash = existingSkill.status?.versionHash ?? "";
42
+ const match = serverHash !== "" && serverHash === clientHash;
43
+ setIsDuplicate(match);
44
+ return match;
45
+ }
46
+ catch {
47
+ if (callIdRef.current === callId)
48
+ setIsDuplicate(false);
49
+ return false;
50
+ }
51
+ finally {
52
+ if (callIdRef.current === callId)
53
+ setIsChecking(false);
54
+ }
55
+ }, [stigmer]);
56
+ return { isDuplicate, isChecking, check, reset };
57
+ }
58
+ //# sourceMappingURL=useSkillDuplicateCheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillDuplicateCheck.js","sourceRoot":"","sources":["../../src/skill/useSkillDuplicateCheck.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBA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,CAAC;YAED,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,CAAC;YAC3D,MAAM,KAAK,GAAG,UAAU,KAAK,EAAE,IAAI,UAAU,KAAK,UAAU,CAAC;YAC7D,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,OAAO,KAAK,CAAC;QACf,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,SAAS,CAAC,OAAO,KAAK,MAAM;gBAAE,cAAc,CAAC,KAAK,CAAC,CAAC;YACxD,OAAO,KAAK,CAAC;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,SAAS,CAAC,OAAO,KAAK,MAAM;gBAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACnD,CAAC"}
@@ -0,0 +1,69 @@
1
+ /** A single file entry within a skill ZIP package. */
2
+ export interface SkillFileEntry {
3
+ /** Relative path within the ZIP (e.g. "SKILL.md", "scripts/validate.py"). */
4
+ readonly path: string;
5
+ /** Uncompressed file size in bytes. */
6
+ readonly size: number;
7
+ /** Whether this entry represents a directory. */
8
+ readonly isDirectory: boolean;
9
+ }
10
+ /** Preview metadata extracted from a validated skill package. */
11
+ export interface SkillUploadPreview {
12
+ /** Skill name extracted from SKILL.md YAML frontmatter. */
13
+ readonly name: string;
14
+ /** Skill description extracted from SKILL.md YAML frontmatter. */
15
+ readonly description: string;
16
+ /** All files contained in the ZIP package. */
17
+ readonly files: SkillFileEntry[];
18
+ /** Raw SKILL.md content (frontmatter + body). */
19
+ readonly skillMdContent: string;
20
+ /** Total uncompressed size of all files in bytes. */
21
+ readonly totalSize: number;
22
+ }
23
+ /** Return value of {@link useSkillUpload}. */
24
+ export interface UseSkillUploadReturn {
25
+ /** Validated preview of the uploaded package, or `null` before upload. */
26
+ readonly preview: SkillUploadPreview | null;
27
+ /** Validation error message, or `null` if valid/not yet uploaded. */
28
+ readonly validationError: string | null;
29
+ /** `true` while the file is being read and validated. */
30
+ readonly isProcessing: boolean;
31
+ /** Process a file selected by the user (triggers validation). */
32
+ readonly processFile: (file: File) => Promise<void>;
33
+ /** Reset to initial state (clear preview and errors). */
34
+ readonly reset: () => void;
35
+ /** Raw ZIP bytes ready for push, or `null` before successful validation. */
36
+ readonly artifact: Uint8Array | null;
37
+ }
38
+ /**
39
+ * Behavior hook for the skill upload workflow.
40
+ *
41
+ * Handles file reading, ZIP unpacking, structure validation, and
42
+ * metadata extraction. Produces a {@link SkillUploadPreview} that
43
+ * the UI can render, and exposes the raw artifact bytes for pushing.
44
+ *
45
+ * Validation rules (Anthropic Agent Skills spec):
46
+ * - File must be a valid ZIP archive (checked via magic bytes)
47
+ * - ZIP must contain `SKILL.md` at the root level
48
+ * - SKILL.md must have YAML frontmatter with a valid `name` field
49
+ * - Name must be lowercase letters/numbers/hyphens, max 64 chars
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * const upload = useSkillUpload();
54
+ *
55
+ * const handleDrop = (file: File) => upload.processFile(file);
56
+ *
57
+ * if (upload.preview) {
58
+ * // Show preview UI
59
+ * console.log(upload.preview.name, upload.preview.files);
60
+ * }
61
+ *
62
+ * if (upload.artifact) {
63
+ * // Ready to push
64
+ * await push({ org: "acme", artifact: upload.artifact });
65
+ * }
66
+ * ```
67
+ */
68
+ export declare function useSkillUpload(): UseSkillUploadReturn;
69
+ //# sourceMappingURL=useSkillUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillUpload.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillUpload.ts"],"names":[],"mappings":"AASA,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,cAAc,EAAE,CAAC;IACjC,iDAAiD;IACjD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,yDAAyD;IACzD,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;CACtC;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAqGrD"}
@@ -0,0 +1,157 @@
1
+ "use client";
2
+ import { useCallback, useRef, useState } from "react";
3
+ import { parse as parseYaml } from "yaml";
4
+ // ---------------------------------------------------------------------------
5
+ // Constants
6
+ // ---------------------------------------------------------------------------
7
+ const ZIP_MAGIC_BYTES = [0x50, 0x4b, 0x03, 0x04];
8
+ const NAME_MAX_LENGTH = 64;
9
+ const NAME_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
10
+ const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---/;
11
+ // ---------------------------------------------------------------------------
12
+ // Hook implementation
13
+ // ---------------------------------------------------------------------------
14
+ /**
15
+ * Behavior hook for the skill upload workflow.
16
+ *
17
+ * Handles file reading, ZIP unpacking, structure validation, and
18
+ * metadata extraction. Produces a {@link SkillUploadPreview} that
19
+ * the UI can render, and exposes the raw artifact bytes for pushing.
20
+ *
21
+ * Validation rules (Anthropic Agent Skills spec):
22
+ * - File must be a valid ZIP archive (checked via magic bytes)
23
+ * - ZIP must contain `SKILL.md` at the root level
24
+ * - SKILL.md must have YAML frontmatter with a valid `name` field
25
+ * - Name must be lowercase letters/numbers/hyphens, max 64 chars
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * const upload = useSkillUpload();
30
+ *
31
+ * const handleDrop = (file: File) => upload.processFile(file);
32
+ *
33
+ * if (upload.preview) {
34
+ * // Show preview UI
35
+ * console.log(upload.preview.name, upload.preview.files);
36
+ * }
37
+ *
38
+ * if (upload.artifact) {
39
+ * // Ready to push
40
+ * await push({ org: "acme", artifact: upload.artifact });
41
+ * }
42
+ * ```
43
+ */
44
+ export function useSkillUpload() {
45
+ const [preview, setPreview] = useState(null);
46
+ const [validationError, setValidationError] = useState(null);
47
+ const [isProcessing, setIsProcessing] = useState(false);
48
+ const [artifact, setArtifact] = useState(null);
49
+ const abortRef = useRef(0);
50
+ const reset = useCallback(() => {
51
+ abortRef.current++;
52
+ setPreview(null);
53
+ setValidationError(null);
54
+ setIsProcessing(false);
55
+ setArtifact(null);
56
+ }, []);
57
+ const processFile = useCallback(async (file) => {
58
+ const callId = ++abortRef.current;
59
+ setIsProcessing(true);
60
+ setValidationError(null);
61
+ setPreview(null);
62
+ setArtifact(null);
63
+ try {
64
+ const bytes = new Uint8Array(await file.arrayBuffer());
65
+ if (abortRef.current !== callId)
66
+ return;
67
+ if (!isZip(bytes)) {
68
+ setValidationError("File is not a valid ZIP archive");
69
+ return;
70
+ }
71
+ const { unzipSync, strFromU8 } = await import("fflate");
72
+ const unzipped = unzipSync(bytes);
73
+ if (abortRef.current !== callId)
74
+ return;
75
+ const entries = Object.entries(unzipped);
76
+ const skillMdEntry = findSkillMd(entries);
77
+ if (!skillMdEntry) {
78
+ setValidationError("ZIP must contain a SKILL.md file at the root level");
79
+ return;
80
+ }
81
+ const skillMdContent = strFromU8(skillMdEntry[1]);
82
+ const frontmatter = parseFrontmatter(skillMdContent);
83
+ if (!frontmatter) {
84
+ setValidationError("SKILL.md must have valid YAML frontmatter (---\\n...\\n---)");
85
+ return;
86
+ }
87
+ if (!frontmatter.name || typeof frontmatter.name !== "string") {
88
+ setValidationError("SKILL.md frontmatter must include a 'name' field");
89
+ return;
90
+ }
91
+ const name = frontmatter.name;
92
+ if (name.length > NAME_MAX_LENGTH) {
93
+ setValidationError(`Skill name must be ${NAME_MAX_LENGTH} characters or fewer`);
94
+ return;
95
+ }
96
+ if (!NAME_PATTERN.test(name)) {
97
+ setValidationError("Skill name must contain only lowercase letters, numbers, and hyphens, starting with a letter or number");
98
+ return;
99
+ }
100
+ const files = entries.map(([path, data]) => ({
101
+ path,
102
+ size: data.length,
103
+ isDirectory: data.length === 0 && path.endsWith("/"),
104
+ }));
105
+ const totalSize = files.reduce((sum, f) => sum + f.size, 0);
106
+ const description = typeof frontmatter.description === "string"
107
+ ? frontmatter.description
108
+ : "";
109
+ if (abortRef.current !== callId)
110
+ return;
111
+ setPreview({ name, description, files, skillMdContent, totalSize });
112
+ setArtifact(bytes);
113
+ }
114
+ catch (err) {
115
+ if (abortRef.current !== callId)
116
+ return;
117
+ const message = err instanceof Error ? err.message : "Failed to process file";
118
+ setValidationError(`Invalid ZIP archive: ${message}`);
119
+ }
120
+ finally {
121
+ if (abortRef.current === callId) {
122
+ setIsProcessing(false);
123
+ }
124
+ }
125
+ }, []);
126
+ return { preview, validationError, isProcessing, processFile, reset, artifact };
127
+ }
128
+ // ---------------------------------------------------------------------------
129
+ // Internal utilities
130
+ // ---------------------------------------------------------------------------
131
+ function isZip(bytes) {
132
+ if (bytes.length < 4)
133
+ return false;
134
+ return (bytes[0] === ZIP_MAGIC_BYTES[0] &&
135
+ bytes[1] === ZIP_MAGIC_BYTES[1] &&
136
+ bytes[2] === ZIP_MAGIC_BYTES[2] &&
137
+ bytes[3] === ZIP_MAGIC_BYTES[3]);
138
+ }
139
+ function findSkillMd(entries) {
140
+ return entries.find(([path]) => path === "SKILL.md" || path.match(/^[^/]+\/SKILL\.md$/));
141
+ }
142
+ function parseFrontmatter(content) {
143
+ const match = content.match(FRONTMATTER_RE);
144
+ if (!match)
145
+ return null;
146
+ try {
147
+ const parsed = parseYaml(match[1]);
148
+ if (typeof parsed === "object" && parsed !== null) {
149
+ return parsed;
150
+ }
151
+ return null;
152
+ }
153
+ catch {
154
+ return null;
155
+ }
156
+ }
157
+ //# sourceMappingURL=useSkillUpload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillUpload.js","sourceRoot":"","sources":["../../src/skill/useSkillUpload.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AA8C1C,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACjD,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAC5C,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG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CAAC;IACnC,OAAO,CACL,KAAK,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC,CAChC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,OAA+B;IAE/B,OAAO,OAAO,CAAC,IAAI,CACjB,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CACpE,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClD,OAAO,MAAiC,CAAC;QAC3C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { VersionEntry } from "../version-history/types";
2
+ /** Return value of {@link useSkillVersions}. */
3
+ export interface UseSkillVersionsReturn {
4
+ /** Version entries mapped to the generic timeline format (newest first). */
5
+ readonly versions: readonly VersionEntry[];
6
+ /** `true` when no versions are available (RPC unimplemented or empty response). */
7
+ readonly isEmpty: boolean;
8
+ /** `true` while the initial fetch is in flight. */
9
+ readonly isLoading: boolean;
10
+ /** Error from the last failed request (excludes UNIMPLEMENTED), or `null`. */
11
+ readonly error: Error | null;
12
+ /** Discard cached data and re-fetch from the server. */
13
+ readonly refetch: () => void;
14
+ /**
15
+ * Look up the artifact storage key for a version by its hash.
16
+ * Used by diff flows to fetch historical artifacts via `getArtifact()`.
17
+ * Returns `null` if the version hash is not found or has no artifact key.
18
+ */
19
+ readonly getArtifactKey: (versionHash: string) => string | null;
20
+ }
21
+ /**
22
+ * Data hook that fetches version history for a skill.
23
+ *
24
+ * Calls the `listVersions` RPC via the SDK client and maps the response
25
+ * to generic {@link VersionEntry} objects for the `VersionTimeline`
26
+ * component.
27
+ *
28
+ * **Graceful degradation**: If the backend returns UNIMPLEMENTED (the
29
+ * RPC handler hasn't been deployed yet), the hook treats it as an empty
30
+ * response — `versions` is `[]` and `isEmpty` is `true`. No error is
31
+ * surfaced to the consumer. This enables the frontend to ship ahead of
32
+ * the backend without visual breakage.
33
+ *
34
+ * Pass `null` for `org` or `slug` to skip fetching (stable no-op).
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * const { versions, isEmpty, isLoading } = useSkillVersions("acme", "code-style-guide");
39
+ *
40
+ * if (!isEmpty) {
41
+ * return <VersionTimeline entries={versions} />;
42
+ * }
43
+ * ```
44
+ */
45
+ export declare function useSkillVersions(org: string | null, slug: string | null): UseSkillVersionsReturn;
46
+ //# sourceMappingURL=useSkillVersions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillVersions.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillVersions.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAS7D,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACjE;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,IAAI,EAAE,MAAM,GAAG,IAAI,GAClB,sBAAsB,CAuDxB"}
@@ -0,0 +1,104 @@
1
+ "use client";
2
+ import { useCallback, useMemo } from "react";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { timestampDate } from "@bufbuild/protobuf/wkt";
5
+ import { StigmerError } from "@stigmer/sdk";
6
+ import { ListSkillVersionsInputSchema, } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/io_pb";
7
+ import { useStigmer } from "../hooks";
8
+ import { useFetch } from "../internal/useFetch";
9
+ // gRPC/Connect Code.Unimplemented = 12
10
+ const CODE_UNIMPLEMENTED = 12;
11
+ // ---------------------------------------------------------------------------
12
+ // Hook implementation
13
+ // ---------------------------------------------------------------------------
14
+ /**
15
+ * Data hook that fetches version history for a skill.
16
+ *
17
+ * Calls the `listVersions` RPC via the SDK client and maps the response
18
+ * to generic {@link VersionEntry} objects for the `VersionTimeline`
19
+ * component.
20
+ *
21
+ * **Graceful degradation**: If the backend returns UNIMPLEMENTED (the
22
+ * RPC handler hasn't been deployed yet), the hook treats it as an empty
23
+ * response — `versions` is `[]` and `isEmpty` is `true`. No error is
24
+ * surfaced to the consumer. This enables the frontend to ship ahead of
25
+ * the backend without visual breakage.
26
+ *
27
+ * Pass `null` for `org` or `slug` to skip fetching (stable no-op).
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * const { versions, isEmpty, isLoading } = useSkillVersions("acme", "code-style-guide");
32
+ *
33
+ * if (!isEmpty) {
34
+ * return <VersionTimeline entries={versions} />;
35
+ * }
36
+ * ```
37
+ */
38
+ export function useSkillVersions(org, slug) {
39
+ const stigmer = useStigmer();
40
+ const { data: rawVersions, isLoading, error, refetch, } = useFetch(org && slug
41
+ ? async () => {
42
+ try {
43
+ const request = create(ListSkillVersionsInputSchema, {
44
+ org,
45
+ slug,
46
+ });
47
+ const response = await stigmer.skill.listVersions(request);
48
+ return response.versions;
49
+ }
50
+ catch (err) {
51
+ if (isUnimplemented(err))
52
+ return [];
53
+ throw err;
54
+ }
55
+ }
56
+ : null, [org, slug, stigmer], []);
57
+ const versions = useMemo(() => rawVersions.map(mapProtoToVersionEntry), [rawVersions]);
58
+ const artifactKeyMap = useMemo(() => {
59
+ const map = new Map();
60
+ for (const entry of rawVersions) {
61
+ if (entry.versionHash && entry.artifactStorageKey) {
62
+ map.set(entry.versionHash, entry.artifactStorageKey);
63
+ }
64
+ }
65
+ return map;
66
+ }, [rawVersions]);
67
+ const getArtifactKey = useCallback((versionHash) => artifactKeyMap.get(versionHash) ?? null, [artifactKeyMap]);
68
+ const isEmpty = versions.length === 0;
69
+ return useMemo(() => ({ versions, isEmpty, isLoading, error, refetch, getArtifactKey }), [versions, isEmpty, isLoading, error, refetch, getArtifactKey]);
70
+ }
71
+ // ---------------------------------------------------------------------------
72
+ // Proto → generic mapping
73
+ // ---------------------------------------------------------------------------
74
+ function mapProtoToVersionEntry(proto) {
75
+ return {
76
+ id: proto.versionHash,
77
+ timestamp: proto.pushedAt ? timestampDate(proto.pushedAt) : new Date(0),
78
+ actor: proto.pushedBy
79
+ ? {
80
+ id: proto.pushedBy.id,
81
+ avatar: proto.pushedBy.avatar || undefined,
82
+ displayName: undefined,
83
+ }
84
+ : undefined,
85
+ label: proto.versionHash.slice(0, 12),
86
+ sublabel: proto.message || undefined,
87
+ isCurrent: proto.isCurrent,
88
+ tag: proto.tag || undefined,
89
+ gitProvenance: proto.gitProvenance
90
+ ? {
91
+ remoteUrl: proto.gitProvenance.remoteUrl,
92
+ ref: proto.gitProvenance.ref,
93
+ commit: proto.gitProvenance.commit,
94
+ }
95
+ : undefined,
96
+ };
97
+ }
98
+ // ---------------------------------------------------------------------------
99
+ // Error detection
100
+ // ---------------------------------------------------------------------------
101
+ function isUnimplemented(err) {
102
+ return err instanceof StigmerError && err.connectCode === CODE_UNIMPLEMENTED;
103
+ }
104
+ //# sourceMappingURL=useSkillVersions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSkillVersions.js","sourceRoot":"","sources":["../../src/skill/useSkillVersions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,4BAA4B,GAE7B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,uCAAuC;AACvC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AA0B9B,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,GAAkB,EAClB,IAAmB;IAEnB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,EACJ,IAAI,EAAE,WAAW,EACjB,SAAS,EACT,KAAK,EACL,OAAO,GACR,GAAG,QAAQ,CACV,GAAG,IAAI,IAAI;QACT,CAAC,CAAC,KAAK,IAAI,EAAE;YACT,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,MAAM,CAAC,4BAA4B,EAAE;oBACnD,GAAG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