@stigmer/react 0.0.71 → 0.0.73

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 (440) hide show
  1. package/agent/AgentEnvForm.d.ts +2 -0
  2. package/agent/AgentEnvForm.d.ts.map +1 -1
  3. package/agent/AgentEnvForm.js.map +1 -1
  4. package/agent/AgentPicker.d.ts +2 -0
  5. package/agent/AgentPicker.d.ts.map +1 -1
  6. package/agent/AgentPicker.js.map +1 -1
  7. package/agent/agentSetupReducer.d.ts +69 -7
  8. package/agent/agentSetupReducer.d.ts.map +1 -1
  9. package/agent/agentSetupReducer.js.map +1 -1
  10. package/agent/useAgentCount.d.ts +2 -0
  11. package/agent/useAgentCount.d.ts.map +1 -1
  12. package/agent/useAgentCount.js.map +1 -1
  13. package/attachment/AttachmentChipList.d.ts +15 -0
  14. package/attachment/AttachmentChipList.d.ts.map +1 -1
  15. package/attachment/AttachmentChipList.js +15 -0
  16. package/attachment/AttachmentChipList.js.map +1 -1
  17. package/attachment/useAttachments.d.ts +14 -0
  18. package/attachment/useAttachments.d.ts.map +1 -1
  19. package/attachment/useAttachments.js.map +1 -1
  20. package/composer/useComposer.d.ts +5 -0
  21. package/composer/useComposer.d.ts.map +1 -1
  22. package/composer/useComposer.js.map +1 -1
  23. package/execution/ExecutionPhaseBadge.d.ts +1 -1
  24. package/execution/ExecutionPhaseBadge.js +1 -1
  25. package/execution/McpToolDetail.d.ts +16 -8
  26. package/execution/McpToolDetail.d.ts.map +1 -1
  27. package/execution/McpToolDetail.js +0 -6
  28. package/execution/McpToolDetail.js.map +1 -1
  29. package/execution/TodoList.d.ts +8 -0
  30. package/execution/TodoList.d.ts.map +1 -1
  31. package/execution/TodoList.js +8 -0
  32. package/execution/TodoList.js.map +1 -1
  33. package/execution/ToolArgsView.d.ts +1 -0
  34. package/execution/ToolArgsView.d.ts.map +1 -1
  35. package/execution/ToolArgsView.js.map +1 -1
  36. package/execution/UsageWidget.d.ts +1 -1
  37. package/execution/UsageWidget.js +1 -1
  38. package/execution/file-path-resolver.d.ts +10 -0
  39. package/execution/file-path-resolver.d.ts.map +1 -1
  40. package/execution/file-path-resolver.js.map +1 -1
  41. package/execution/index.d.ts +1 -1
  42. package/execution/index.d.ts.map +1 -1
  43. package/execution/index.js.map +1 -1
  44. package/execution/useArtifactContent.d.ts +33 -0
  45. package/execution/useArtifactContent.d.ts.map +1 -1
  46. package/execution/useArtifactContent.js +33 -0
  47. package/execution/useArtifactContent.js.map +1 -1
  48. package/execution/useSubmitApproval.d.ts +2 -0
  49. package/execution/useSubmitApproval.d.ts.map +1 -1
  50. package/execution/useSubmitApproval.js.map +1 -1
  51. package/github/GitHubRepoPicker.d.ts +13 -0
  52. package/github/GitHubRepoPicker.d.ts.map +1 -1
  53. package/github/GitHubRepoPicker.js +13 -0
  54. package/github/GitHubRepoPicker.js.map +1 -1
  55. package/github/useGitHubConnection.d.ts +29 -1
  56. package/github/useGitHubConnection.d.ts.map +1 -1
  57. package/github/useGitHubConnection.js +29 -1
  58. package/github/useGitHubConnection.js.map +1 -1
  59. package/github/useGitHubRepos.d.ts +31 -0
  60. package/github/useGitHubRepos.d.ts.map +1 -1
  61. package/github/useGitHubRepos.js +31 -0
  62. package/github/useGitHubRepos.js.map +1 -1
  63. package/github/useGitHubSearch.d.ts +25 -0
  64. package/github/useGitHubSearch.d.ts.map +1 -1
  65. package/github/useGitHubSearch.js +25 -0
  66. package/github/useGitHubSearch.js.map +1 -1
  67. package/iam-policy/GrantAccessForm.d.ts +39 -0
  68. package/iam-policy/GrantAccessForm.d.ts.map +1 -0
  69. package/iam-policy/GrantAccessForm.js +75 -0
  70. package/iam-policy/GrantAccessForm.js.map +1 -0
  71. package/iam-policy/OrgMembersPanel.d.ts +28 -0
  72. package/iam-policy/OrgMembersPanel.d.ts.map +1 -0
  73. package/iam-policy/OrgMembersPanel.js +192 -0
  74. package/iam-policy/OrgMembersPanel.js.map +1 -0
  75. package/iam-policy/RoleSelector.d.ts +37 -0
  76. package/iam-policy/RoleSelector.d.ts.map +1 -0
  77. package/iam-policy/RoleSelector.js +42 -0
  78. package/iam-policy/RoleSelector.js.map +1 -0
  79. package/iam-policy/index.d.ts +12 -0
  80. package/iam-policy/index.d.ts.map +1 -0
  81. package/iam-policy/index.js +12 -0
  82. package/iam-policy/index.js.map +1 -0
  83. package/iam-policy/useCreateIamPolicy.d.ts +35 -0
  84. package/iam-policy/useCreateIamPolicy.d.ts.map +1 -0
  85. package/iam-policy/useCreateIamPolicy.js +46 -0
  86. package/iam-policy/useCreateIamPolicy.js.map +1 -0
  87. package/iam-policy/useDeleteIamPolicy.d.ts +34 -0
  88. package/iam-policy/useDeleteIamPolicy.d.ts.map +1 -0
  89. package/iam-policy/useDeleteIamPolicy.js +45 -0
  90. package/iam-policy/useDeleteIamPolicy.js.map +1 -0
  91. package/iam-policy/useGrantableRoles.d.ts +28 -0
  92. package/iam-policy/useGrantableRoles.d.ts.map +1 -0
  93. package/iam-policy/useGrantableRoles.js +32 -0
  94. package/iam-policy/useGrantableRoles.js.map +1 -0
  95. package/iam-policy/usePrincipalsCount.d.ts +31 -0
  96. package/iam-policy/usePrincipalsCount.d.ts.map +1 -0
  97. package/iam-policy/usePrincipalsCount.js +72 -0
  98. package/iam-policy/usePrincipalsCount.js.map +1 -0
  99. package/iam-policy/useResourceAccess.d.ts +51 -0
  100. package/iam-policy/useResourceAccess.d.ts.map +1 -0
  101. package/iam-policy/useResourceAccess.js +85 -0
  102. package/iam-policy/useResourceAccess.js.map +1 -0
  103. package/iam-policy/useRevokeOrgAccess.d.ts +36 -0
  104. package/iam-policy/useRevokeOrgAccess.d.ts.map +1 -0
  105. package/iam-policy/useRevokeOrgAccess.js +48 -0
  106. package/iam-policy/useRevokeOrgAccess.js.map +1 -0
  107. package/iam-policy/useRoleSelector.d.ts +52 -0
  108. package/iam-policy/useRoleSelector.d.ts.map +1 -0
  109. package/iam-policy/useRoleSelector.js +50 -0
  110. package/iam-policy/useRoleSelector.js.map +1 -0
  111. package/iam-policy/useWhoAmI.d.ts +30 -0
  112. package/iam-policy/useWhoAmI.d.ts.map +1 -0
  113. package/iam-policy/useWhoAmI.js +56 -0
  114. package/iam-policy/useWhoAmI.js.map +1 -0
  115. package/identity-provider/CreateIdentityProviderForm.d.ts +39 -0
  116. package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -0
  117. package/identity-provider/CreateIdentityProviderForm.js +102 -0
  118. package/identity-provider/CreateIdentityProviderForm.js.map +1 -0
  119. package/identity-provider/IdentityProviderDetailPanel.d.ts +42 -0
  120. package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -0
  121. package/identity-provider/IdentityProviderDetailPanel.js +156 -0
  122. package/identity-provider/IdentityProviderDetailPanel.js.map +1 -0
  123. package/identity-provider/IdentityProviderListPanel.d.ts +41 -0
  124. package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -0
  125. package/identity-provider/IdentityProviderListPanel.js +110 -0
  126. package/identity-provider/IdentityProviderListPanel.js.map +1 -0
  127. package/identity-provider/IdentityProviderWizard.d.ts +40 -0
  128. package/identity-provider/IdentityProviderWizard.d.ts.map +1 -0
  129. package/identity-provider/IdentityProviderWizard.js +180 -0
  130. package/identity-provider/IdentityProviderWizard.js.map +1 -0
  131. package/identity-provider/ProviderPicker.d.ts +28 -0
  132. package/identity-provider/ProviderPicker.d.ts.map +1 -0
  133. package/identity-provider/ProviderPicker.js +64 -0
  134. package/identity-provider/ProviderPicker.js.map +1 -0
  135. package/identity-provider/SsoLoginPrompt.d.ts +51 -0
  136. package/identity-provider/SsoLoginPrompt.d.ts.map +1 -0
  137. package/identity-provider/SsoLoginPrompt.js +119 -0
  138. package/identity-provider/SsoLoginPrompt.js.map +1 -0
  139. package/identity-provider/index.d.ts +14 -0
  140. package/identity-provider/index.d.ts.map +1 -0
  141. package/identity-provider/index.js +14 -0
  142. package/identity-provider/index.js.map +1 -0
  143. package/identity-provider/presets.d.ts +65 -0
  144. package/identity-provider/presets.d.ts.map +1 -0
  145. package/identity-provider/presets.js +200 -0
  146. package/identity-provider/presets.js.map +1 -0
  147. package/identity-provider/useCreateIdentityProvider.d.ts +37 -0
  148. package/identity-provider/useCreateIdentityProvider.d.ts.map +1 -0
  149. package/identity-provider/useCreateIdentityProvider.js +48 -0
  150. package/identity-provider/useCreateIdentityProvider.js.map +1 -0
  151. package/identity-provider/useDeleteIdentityProvider.d.ts +34 -0
  152. package/identity-provider/useDeleteIdentityProvider.d.ts.map +1 -0
  153. package/identity-provider/useDeleteIdentityProvider.js +45 -0
  154. package/identity-provider/useDeleteIdentityProvider.js.map +1 -0
  155. package/identity-provider/useIdentityProvider.d.ts +37 -0
  156. package/identity-provider/useIdentityProvider.d.ts.map +1 -0
  157. package/identity-provider/useIdentityProvider.js +62 -0
  158. package/identity-provider/useIdentityProvider.js.map +1 -0
  159. package/identity-provider/useIdentityProviderList.d.ts +48 -0
  160. package/identity-provider/useIdentityProviderList.d.ts.map +1 -0
  161. package/identity-provider/useIdentityProviderList.js +75 -0
  162. package/identity-provider/useIdentityProviderList.js.map +1 -0
  163. package/identity-provider/useOidcDiscovery.d.ts +39 -0
  164. package/identity-provider/useOidcDiscovery.d.ts.map +1 -0
  165. package/identity-provider/useOidcDiscovery.js +76 -0
  166. package/identity-provider/useOidcDiscovery.js.map +1 -0
  167. package/identity-provider/useSsoProvider.d.ts +50 -0
  168. package/identity-provider/useSsoProvider.d.ts.map +1 -0
  169. package/identity-provider/useSsoProvider.js +83 -0
  170. package/identity-provider/useSsoProvider.js.map +1 -0
  171. package/identity-provider/useUpdateIdentityProvider.d.ts +38 -0
  172. package/identity-provider/useUpdateIdentityProvider.d.ts.map +1 -0
  173. package/identity-provider/useUpdateIdentityProvider.js +49 -0
  174. package/identity-provider/useUpdateIdentityProvider.js.map +1 -0
  175. package/index.d.ts +14 -5
  176. package/index.d.ts.map +1 -1
  177. package/index.js +10 -2
  178. package/index.js.map +1 -1
  179. package/internal/CloudFeatureNotice.d.ts +12 -0
  180. package/internal/CloudFeatureNotice.d.ts.map +1 -1
  181. package/internal/CloudFeatureNotice.js +12 -0
  182. package/internal/CloudFeatureNotice.js.map +1 -1
  183. package/invitation/InvitationCreatedAlert.d.ts +35 -0
  184. package/invitation/InvitationCreatedAlert.d.ts.map +1 -0
  185. package/invitation/InvitationCreatedAlert.js +60 -0
  186. package/invitation/InvitationCreatedAlert.js.map +1 -0
  187. package/invitation/InvitationManager.d.ts +44 -0
  188. package/invitation/InvitationManager.d.ts.map +1 -0
  189. package/invitation/InvitationManager.js +248 -0
  190. package/invitation/InvitationManager.js.map +1 -0
  191. package/invitation/InvitationRedemption.d.ts +69 -0
  192. package/invitation/InvitationRedemption.d.ts.map +1 -0
  193. package/invitation/InvitationRedemption.js +140 -0
  194. package/invitation/InvitationRedemption.js.map +1 -0
  195. package/invitation/index.d.ts +17 -0
  196. package/invitation/index.d.ts.map +1 -0
  197. package/invitation/index.js +9 -0
  198. package/invitation/index.js.map +1 -0
  199. package/invitation/useCreateInvitation.d.ts +52 -0
  200. package/invitation/useCreateInvitation.d.ts.map +1 -0
  201. package/invitation/useCreateInvitation.js +55 -0
  202. package/invitation/useCreateInvitation.js.map +1 -0
  203. package/invitation/useInvitationPreview.d.ts +51 -0
  204. package/invitation/useInvitationPreview.d.ts.map +1 -0
  205. package/invitation/useInvitationPreview.js +80 -0
  206. package/invitation/useInvitationPreview.js.map +1 -0
  207. package/invitation/useOrgInvitations.d.ts +36 -0
  208. package/invitation/useOrgInvitations.d.ts.map +1 -0
  209. package/invitation/useOrgInvitations.js +65 -0
  210. package/invitation/useOrgInvitations.js.map +1 -0
  211. package/invitation/useRedeemInvitation.d.ts +47 -0
  212. package/invitation/useRedeemInvitation.d.ts.map +1 -0
  213. package/invitation/useRedeemInvitation.js +53 -0
  214. package/invitation/useRedeemInvitation.js.map +1 -0
  215. package/invitation/useRevokeInvitation.d.ts +35 -0
  216. package/invitation/useRevokeInvitation.d.ts.map +1 -0
  217. package/invitation/useRevokeInvitation.js +47 -0
  218. package/invitation/useRevokeInvitation.js.map +1 -0
  219. package/library/detect-skill-package.d.ts +1 -0
  220. package/library/detect-skill-package.d.ts.map +1 -1
  221. package/library/detect-skill-package.js.map +1 -1
  222. package/library/detect-stigmer-resource.d.ts +1 -0
  223. package/library/detect-stigmer-resource.d.ts.map +1 -1
  224. package/library/detect-stigmer-resource.js.map +1 -1
  225. package/library/parse-resource-yaml.d.ts +4 -0
  226. package/library/parse-resource-yaml.d.ts.map +1 -1
  227. package/library/parse-resource-yaml.js.map +1 -1
  228. package/mcp-server/McpServerDetailView.d.ts +2 -2
  229. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  230. package/mcp-server/McpServerDetailView.js.map +1 -1
  231. package/mcp-server/index.d.ts +1 -1
  232. package/mcp-server/index.d.ts.map +1 -1
  233. package/mcp-server/index.js.map +1 -1
  234. package/mcp-server/mcpServerSetupReducer.d.ts +54 -0
  235. package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -1
  236. package/mcp-server/mcpServerSetupReducer.js.map +1 -1
  237. package/models/ModelSelector.d.ts +9 -0
  238. package/models/ModelSelector.d.ts.map +1 -1
  239. package/models/ModelSelector.js +9 -0
  240. package/models/ModelSelector.js.map +1 -1
  241. package/models/registry.d.ts +11 -1
  242. package/models/registry.d.ts.map +1 -1
  243. package/models/registry.js.map +1 -1
  244. package/models/useModelRegistry.d.ts +20 -0
  245. package/models/useModelRegistry.d.ts.map +1 -1
  246. package/models/useModelRegistry.js +20 -0
  247. package/models/useModelRegistry.js.map +1 -1
  248. package/organization/OrgProfilePanel.d.ts +31 -0
  249. package/organization/OrgProfilePanel.d.ts.map +1 -0
  250. package/organization/OrgProfilePanel.js +147 -0
  251. package/organization/OrgProfilePanel.js.map +1 -0
  252. package/organization/index.d.ts +6 -0
  253. package/organization/index.d.ts.map +1 -1
  254. package/organization/index.js +3 -0
  255. package/organization/index.js.map +1 -1
  256. package/organization/useOrganization.d.ts +31 -0
  257. package/organization/useOrganization.d.ts.map +1 -0
  258. package/organization/useOrganization.js +56 -0
  259. package/organization/useOrganization.js.map +1 -0
  260. package/organization/useUpdateOrganization.d.ts +40 -0
  261. package/organization/useUpdateOrganization.d.ts.map +1 -0
  262. package/organization/useUpdateOrganization.js +51 -0
  263. package/organization/useUpdateOrganization.js.map +1 -0
  264. package/package.json +4 -4
  265. package/provider.d.ts +1 -0
  266. package/provider.d.ts.map +1 -1
  267. package/provider.js.map +1 -1
  268. package/search/useResourceList.d.ts +4 -2
  269. package/search/useResourceList.d.ts.map +1 -1
  270. package/search/useResourceList.js +2 -1
  271. package/search/useResourceList.js.map +1 -1
  272. package/search/useResourceSearch.d.ts +10 -2
  273. package/search/useResourceSearch.d.ts.map +1 -1
  274. package/search/useResourceSearch.js +2 -1
  275. package/search/useResourceSearch.js.map +1 -1
  276. package/session/group-sessions.d.ts +23 -0
  277. package/session/group-sessions.d.ts.map +1 -1
  278. package/session/group-sessions.js +23 -0
  279. package/session/group-sessions.js.map +1 -1
  280. package/session/index.d.ts +1 -1
  281. package/session/index.d.ts.map +1 -1
  282. package/session/index.js.map +1 -1
  283. package/session/useCreateSession.d.ts +11 -2
  284. package/session/useCreateSession.d.ts.map +1 -1
  285. package/session/useCreateSession.js.map +1 -1
  286. package/session/useSession.d.ts +24 -0
  287. package/session/useSession.d.ts.map +1 -1
  288. package/session/useSession.js +24 -0
  289. package/session/useSession.js.map +1 -1
  290. package/session/useSessionArtifacts.d.ts +1 -0
  291. package/session/useSessionArtifacts.d.ts.map +1 -1
  292. package/session/useSessionArtifacts.js.map +1 -1
  293. package/session/useSessionConversation.d.ts +7 -0
  294. package/session/useSessionConversation.d.ts.map +1 -1
  295. package/session/useSessionConversation.js.map +1 -1
  296. package/session/useSessionExecutions.d.ts +23 -0
  297. package/session/useSessionExecutions.d.ts.map +1 -1
  298. package/session/useSessionExecutions.js +23 -0
  299. package/session/useSessionExecutions.js.map +1 -1
  300. package/session/useSessionList.d.ts +19 -0
  301. package/session/useSessionList.d.ts.map +1 -1
  302. package/session/useSessionList.js +19 -0
  303. package/session/useSessionList.js.map +1 -1
  304. package/session/useSessionWriteBacks.d.ts +1 -0
  305. package/session/useSessionWriteBacks.d.ts.map +1 -1
  306. package/session/useSessionWriteBacks.js.map +1 -1
  307. package/session/useUpdateSession.d.ts +22 -0
  308. package/session/useUpdateSession.d.ts.map +1 -1
  309. package/session/useUpdateSession.js +22 -0
  310. package/session/useUpdateSession.js.map +1 -1
  311. package/skill/SkillPicker.d.ts +15 -0
  312. package/skill/SkillPicker.d.ts.map +1 -1
  313. package/skill/SkillPicker.js +15 -0
  314. package/skill/SkillPicker.js.map +1 -1
  315. package/src/agent/AgentEnvForm.tsx +2 -0
  316. package/src/agent/AgentPicker.tsx +2 -0
  317. package/src/agent/agentSetupReducer.ts +109 -20
  318. package/src/agent/useAgentCount.ts +2 -0
  319. package/src/attachment/AttachmentChipList.tsx +15 -0
  320. package/src/attachment/useAttachments.ts +14 -0
  321. package/src/composer/useComposer.ts +5 -0
  322. package/src/execution/ExecutionPhaseBadge.tsx +1 -1
  323. package/src/execution/McpToolDetail.tsx +18 -6
  324. package/src/execution/TodoList.tsx +8 -0
  325. package/src/execution/ToolArgsView.tsx +1 -0
  326. package/src/execution/UsageWidget.tsx +1 -1
  327. package/src/execution/file-path-resolver.ts +28 -4
  328. package/src/execution/index.ts +5 -1
  329. package/src/execution/useArtifactContent.ts +33 -0
  330. package/src/execution/useSubmitApproval.ts +2 -0
  331. package/src/github/GitHubRepoPicker.tsx +13 -0
  332. package/src/github/useGitHubConnection.ts +29 -1
  333. package/src/github/useGitHubRepos.ts +31 -0
  334. package/src/github/useGitHubSearch.ts +25 -0
  335. package/src/iam-policy/GrantAccessForm.tsx +198 -0
  336. package/src/iam-policy/OrgMembersPanel.tsx +572 -0
  337. package/src/iam-policy/RoleSelector.tsx +105 -0
  338. package/src/iam-policy/index.ts +51 -0
  339. package/src/iam-policy/useCreateIamPolicy.ts +66 -0
  340. package/src/iam-policy/useDeleteIamPolicy.ts +65 -0
  341. package/src/iam-policy/useGrantableRoles.ts +45 -0
  342. package/src/iam-policy/usePrincipalsCount.ts +96 -0
  343. package/src/iam-policy/useResourceAccess.ts +128 -0
  344. package/src/iam-policy/useRevokeOrgAccess.ts +74 -0
  345. package/src/iam-policy/useRoleSelector.ts +97 -0
  346. package/src/iam-policy/useWhoAmI.ts +78 -0
  347. package/src/identity-provider/CreateIdentityProviderForm.tsx +308 -0
  348. package/src/identity-provider/IdentityProviderDetailPanel.tsx +583 -0
  349. package/src/identity-provider/IdentityProviderListPanel.tsx +370 -0
  350. package/src/identity-provider/IdentityProviderWizard.tsx +684 -0
  351. package/src/identity-provider/ProviderPicker.tsx +152 -0
  352. package/src/identity-provider/SsoLoginPrompt.tsx +404 -0
  353. package/src/identity-provider/index.ts +67 -0
  354. package/src/identity-provider/presets.ts +262 -0
  355. package/src/identity-provider/useCreateIdentityProvider.ts +68 -0
  356. package/src/identity-provider/useDeleteIdentityProvider.ts +65 -0
  357. package/src/identity-provider/useIdentityProvider.ts +86 -0
  358. package/src/identity-provider/useIdentityProviderList.ts +100 -0
  359. package/src/identity-provider/useOidcDiscovery.ts +124 -0
  360. package/src/identity-provider/useSsoProvider.ts +99 -0
  361. package/src/identity-provider/useUpdateIdentityProvider.ts +69 -0
  362. package/src/index.ts +121 -1
  363. package/src/internal/CloudFeatureNotice.tsx +12 -0
  364. package/src/invitation/InvitationCreatedAlert.tsx +185 -0
  365. package/src/invitation/InvitationManager.tsx +842 -0
  366. package/src/invitation/InvitationRedemption.tsx +434 -0
  367. package/src/invitation/index.ts +16 -0
  368. package/src/invitation/useCreateInvitation.ts +83 -0
  369. package/src/invitation/useInvitationPreview.ts +103 -0
  370. package/src/invitation/useOrgInvitations.ts +88 -0
  371. package/src/invitation/useRedeemInvitation.ts +82 -0
  372. package/src/invitation/useRevokeInvitation.ts +66 -0
  373. package/src/library/detect-skill-package.ts +4 -1
  374. package/src/library/detect-stigmer-resource.ts +4 -1
  375. package/src/library/parse-resource-yaml.ts +12 -2
  376. package/src/mcp-server/McpServerDetailView.tsx +2 -1
  377. package/src/mcp-server/index.ts +4 -1
  378. package/src/mcp-server/mcpServerSetupReducer.ts +86 -8
  379. package/src/models/ModelSelector.tsx +9 -0
  380. package/src/models/registry.ts +11 -1
  381. package/src/models/useModelRegistry.ts +20 -0
  382. package/src/organization/OrgProfilePanel.tsx +451 -0
  383. package/src/organization/index.ts +6 -0
  384. package/src/organization/useOrganization.ts +79 -0
  385. package/src/organization/useUpdateOrganization.ts +71 -0
  386. package/src/provider.tsx +1 -0
  387. package/src/search/useResourceList.ts +6 -3
  388. package/src/search/useResourceSearch.ts +12 -3
  389. package/src/session/group-sessions.ts +23 -0
  390. package/src/session/index.ts +1 -0
  391. package/src/session/useCreateSession.ts +19 -3
  392. package/src/session/useSession.ts +24 -0
  393. package/src/session/useSessionArtifacts.ts +1 -0
  394. package/src/session/useSessionConversation.ts +7 -0
  395. package/src/session/useSessionExecutions.ts +23 -0
  396. package/src/session/useSessionList.ts +19 -0
  397. package/src/session/useSessionWriteBacks.ts +1 -0
  398. package/src/session/useUpdateSession.ts +22 -0
  399. package/src/skill/SkillPicker.tsx +15 -0
  400. package/src/usage/OrgUsagePanel.tsx +465 -0
  401. package/src/usage/date-range.ts +86 -0
  402. package/src/usage/index.ts +13 -0
  403. package/src/usage/useOrgUsageReport.ts +110 -0
  404. package/src/workspace/FolderBrowser.tsx +9 -0
  405. package/src/workspace/WorkspaceEditor.tsx +17 -0
  406. package/src/workspace/useFolderListing.ts +24 -0
  407. package/src/workspace/useWorkspaceEntries.ts +38 -0
  408. package/styles.css +1 -1
  409. package/usage/OrgUsagePanel.d.ts +24 -0
  410. package/usage/OrgUsagePanel.d.ts.map +1 -0
  411. package/usage/OrgUsagePanel.js +134 -0
  412. package/usage/OrgUsagePanel.js.map +1 -0
  413. package/usage/date-range.d.ts +36 -0
  414. package/usage/date-range.d.ts.map +1 -0
  415. package/usage/date-range.js +69 -0
  416. package/usage/date-range.js.map +1 -0
  417. package/usage/index.d.ts +7 -0
  418. package/usage/index.d.ts.map +1 -0
  419. package/usage/index.js +4 -0
  420. package/usage/index.js.map +1 -0
  421. package/usage/useOrgUsageReport.d.ts +48 -0
  422. package/usage/useOrgUsageReport.d.ts.map +1 -0
  423. package/usage/useOrgUsageReport.js +72 -0
  424. package/usage/useOrgUsageReport.js.map +1 -0
  425. package/workspace/FolderBrowser.d.ts +9 -0
  426. package/workspace/FolderBrowser.d.ts.map +1 -1
  427. package/workspace/FolderBrowser.js +9 -0
  428. package/workspace/FolderBrowser.js.map +1 -1
  429. package/workspace/WorkspaceEditor.d.ts +17 -0
  430. package/workspace/WorkspaceEditor.d.ts.map +1 -1
  431. package/workspace/WorkspaceEditor.js +17 -0
  432. package/workspace/WorkspaceEditor.js.map +1 -1
  433. package/workspace/useFolderListing.d.ts +24 -0
  434. package/workspace/useFolderListing.d.ts.map +1 -1
  435. package/workspace/useFolderListing.js +24 -0
  436. package/workspace/useFolderListing.js.map +1 -1
  437. package/workspace/useWorkspaceEntries.d.ts +38 -0
  438. package/workspace/useWorkspaceEntries.d.ts.map +1 -1
  439. package/workspace/useWorkspaceEntries.js +25 -0
  440. package/workspace/useWorkspaceEntries.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvitationRedemption.js","sourceRoot":"","sources":["../../src/invitation/InvitationRedemption.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAwC5D;;;;;;;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IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,EAClB,SAAS,EAAC,+BAA+B,aAEzC,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,EAC9B,eAAM,CAAC,EAAC,oBAAoB,GAAG,IAC3B,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,CACL,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,EAClB,SAAS,EAAC,sBAAsB,aAEhC,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EACjC,eAAM,CAAC,EAAC,oBAAoB,GAAG,IAC3B,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,CACL,cACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,SAAS,EAAC,cAAc,iBACZ,MAAM,YAElB,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ export { useOrgInvitations } from "./useOrgInvitations";
2
+ export type { UseOrgInvitationsReturn } from "./useOrgInvitations";
3
+ export { useCreateInvitation } from "./useCreateInvitation";
4
+ export type { UseCreateInvitationReturn } from "./useCreateInvitation";
5
+ export { useRevokeInvitation } from "./useRevokeInvitation";
6
+ export type { UseRevokeInvitationReturn } from "./useRevokeInvitation";
7
+ export { useInvitationPreview } from "./useInvitationPreview";
8
+ export type { UseInvitationPreviewReturn } from "./useInvitationPreview";
9
+ export { useRedeemInvitation } from "./useRedeemInvitation";
10
+ export type { UseRedeemInvitationReturn } from "./useRedeemInvitation";
11
+ export { InvitationCreatedAlert } from "./InvitationCreatedAlert";
12
+ export type { InvitationCreatedAlertProps } from "./InvitationCreatedAlert";
13
+ export { InvitationManager } from "./InvitationManager";
14
+ export type { InvitationManagerProps } from "./InvitationManager";
15
+ export { InvitationRedemption } from "./InvitationRedemption";
16
+ export type { InvitationRedemptionProps } from "./InvitationRedemption";
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/invitation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { useOrgInvitations } from "./useOrgInvitations";
2
+ export { useCreateInvitation } from "./useCreateInvitation";
3
+ export { useRevokeInvitation } from "./useRevokeInvitation";
4
+ export { useInvitationPreview } from "./useInvitationPreview";
5
+ export { useRedeemInvitation } from "./useRedeemInvitation";
6
+ export { InvitationCreatedAlert } from "./InvitationCreatedAlert";
7
+ export { InvitationManager } from "./InvitationManager";
8
+ export { InvitationRedemption } from "./InvitationRedemption";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/invitation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { InvitationInput } from "@stigmer/sdk";
2
+ import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
3
+ /** Return value of {@link useCreateInvitation}. */
4
+ export interface UseCreateInvitationReturn {
5
+ /**
6
+ * Create an invitation link for an organization.
7
+ *
8
+ * Resolves with the server-created {@link Invitation} including the
9
+ * generated token in `status.token`. Callers must capture this token
10
+ * to construct the invite URL — it is always available via `get` and
11
+ * `listByOrg`, but surfacing it immediately after creation is the
12
+ * expected UX flow.
13
+ */
14
+ readonly create: (input: InvitationInput) => Promise<Invitation>;
15
+ /** `true` while the create request is in flight. */
16
+ readonly isCreating: boolean;
17
+ /** Error from the last failed create, or `null` when healthy. */
18
+ readonly error: Error | null;
19
+ /** Reset `error` to `null`. */
20
+ readonly clearError: () => void;
21
+ }
22
+ /**
23
+ * Behavior hook that wraps `invitation.create()` with loading and
24
+ * error state.
25
+ *
26
+ * Creates an invitation resource. The caller provides an
27
+ * {@link InvitationInput} with `name`, `org`, `role`, `expiresAt`,
28
+ * and optionally `maxRedemptions` and `label`.
29
+ *
30
+ * The returned {@link Invitation} contains the server-generated token
31
+ * in `status?.token`. Use this to build the invite URL:
32
+ * `https://<host>/invite/<token>`.
33
+ *
34
+ * Creating an invitation requires `can_grant_access` on the
35
+ * organization — typically limited to admins and owners.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * const { create, isCreating, error } = useCreateInvitation();
40
+ *
41
+ * const invitation = await create({
42
+ * name: "engineering-link",
43
+ * org: "acme",
44
+ * role: IamRole.VIEWER,
45
+ * expiresAt: new Date(Date.now() + 30 * 86_400_000),
46
+ * label: "Engineering team invite",
47
+ * });
48
+ * const inviteUrl = `${window.location.origin}/invite/${invitation.status?.token}`;
49
+ * ```
50
+ */
51
+ export declare function useCreateInvitation(): UseCreateInvitationReturn;
52
+ //# sourceMappingURL=useCreateInvitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateInvitation.d.ts","sourceRoot":"","sources":["../../src/invitation/useCreateInvitation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAItF,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,oDAAoD;IACpD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,mBAAmB,IAAI,yBAAyB,CAyB/D"}
@@ -0,0 +1,55 @@
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 `invitation.create()` with loading and
7
+ * error state.
8
+ *
9
+ * Creates an invitation resource. The caller provides an
10
+ * {@link InvitationInput} with `name`, `org`, `role`, `expiresAt`,
11
+ * and optionally `maxRedemptions` and `label`.
12
+ *
13
+ * The returned {@link Invitation} contains the server-generated token
14
+ * in `status?.token`. Use this to build the invite URL:
15
+ * `https://<host>/invite/<token>`.
16
+ *
17
+ * Creating an invitation requires `can_grant_access` on the
18
+ * organization — typically limited to admins and owners.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const { create, isCreating, error } = useCreateInvitation();
23
+ *
24
+ * const invitation = await create({
25
+ * name: "engineering-link",
26
+ * org: "acme",
27
+ * role: IamRole.VIEWER,
28
+ * expiresAt: new Date(Date.now() + 30 * 86_400_000),
29
+ * label: "Engineering team invite",
30
+ * });
31
+ * const inviteUrl = `${window.location.origin}/invite/${invitation.status?.token}`;
32
+ * ```
33
+ */
34
+ export function useCreateInvitation() {
35
+ const stigmer = useStigmer();
36
+ const [isCreating, setIsCreating] = useState(false);
37
+ const [error, setError] = useState(null);
38
+ const clearError = useCallback(() => setError(null), []);
39
+ const create = useCallback(async (input) => {
40
+ setIsCreating(true);
41
+ setError(null);
42
+ try {
43
+ return await stigmer.invitation.create(input);
44
+ }
45
+ catch (err) {
46
+ setError(toError(err));
47
+ throw err;
48
+ }
49
+ finally {
50
+ setIsCreating(false);
51
+ }
52
+ }, [stigmer]);
53
+ return { create, isCreating, error, clearError };
54
+ }
55
+ //# sourceMappingURL=useCreateInvitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateInvitation.js","sourceRoot":"","sources":["../../src/invitation/useCreateInvitation.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;AAsB9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,mBAAmB;IACjC,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,KAAsB,EAAuB,EAAE;QACpD,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAChD,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,51 @@
1
+ import type { InvitationPreview } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
2
+ /** Return value of {@link useInvitationPreview}. */
3
+ export interface UseInvitationPreviewReturn {
4
+ /** The invitation preview, or `null` while loading or on error. */
5
+ readonly preview: InvitationPreview | null;
6
+ /** `true` while the initial fetch or a refetch is in flight. */
7
+ readonly isLoading: boolean;
8
+ /** Error from the last failed request, or `null` when healthy. */
9
+ readonly error: Error | null;
10
+ /** Discard cached data and re-fetch the preview from the server. */
11
+ readonly refetch: () => void;
12
+ }
13
+ /**
14
+ * Data hook that fetches an {@link InvitationPreview} by its
15
+ * shareable token.
16
+ *
17
+ * Pass `null` to skip fetching (stable no-op). When the `token`
18
+ * changes, the previous in-flight request is discarded and a fresh
19
+ * fetch begins.
20
+ *
21
+ * This hook calls the `getByToken` endpoint, which is **public** —
22
+ * it requires no authentication. The server returns a safe projection
23
+ * containing only the information needed to render the invite
24
+ * acceptance page: organization name/logo, the role being offered,
25
+ * expiry, and whether the invitation is still valid.
26
+ *
27
+ * Check `preview.isValid` before offering the redemption action.
28
+ * When `false`, `preview.invalidReason` contains a human-readable
29
+ * explanation (expired, revoked, or fully redeemed).
30
+ *
31
+ * **Note**: Although authentication is not required by the server,
32
+ * the hook still requires a `StigmerProvider` ancestor because it
33
+ * needs the transport configuration (API base URL) to make the
34
+ * request.
35
+ *
36
+ * @param token - The invitation token from the invite URL, or `null`
37
+ * to skip fetching.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const { preview, isLoading, error } = useInvitationPreview(token);
42
+ *
43
+ * if (isLoading) return <Spinner />;
44
+ * if (!preview) return <NotFound />;
45
+ * if (!preview.isValid) return <Expired reason={preview.invalidReason} />;
46
+ *
47
+ * return <p>Join {preview.organizationName} as {preview.role}</p>;
48
+ * ```
49
+ */
50
+ export declare function useInvitationPreview(token: string | null): UseInvitationPreviewReturn;
51
+ //# sourceMappingURL=useInvitationPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInvitationPreview.d.ts","sourceRoot":"","sources":["../../src/invitation/useInvitationPreview.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAK5F,oDAAoD;AACpD,MAAM,WAAW,0BAA0B;IACzC,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,0BAA0B,CA0C5B"}
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { useCallback, useEffect, useState } from "react";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { InvitationTokenInputSchema } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
5
+ import { useStigmer } from "../hooks";
6
+ import { toError } from "../internal/toError";
7
+ /**
8
+ * Data hook that fetches an {@link InvitationPreview} by its
9
+ * shareable token.
10
+ *
11
+ * Pass `null` to skip fetching (stable no-op). When the `token`
12
+ * changes, the previous in-flight request is discarded and a fresh
13
+ * fetch begins.
14
+ *
15
+ * This hook calls the `getByToken` endpoint, which is **public** —
16
+ * it requires no authentication. The server returns a safe projection
17
+ * containing only the information needed to render the invite
18
+ * acceptance page: organization name/logo, the role being offered,
19
+ * expiry, and whether the invitation is still valid.
20
+ *
21
+ * Check `preview.isValid` before offering the redemption action.
22
+ * When `false`, `preview.invalidReason` contains a human-readable
23
+ * explanation (expired, revoked, or fully redeemed).
24
+ *
25
+ * **Note**: Although authentication is not required by the server,
26
+ * the hook still requires a `StigmerProvider` ancestor because it
27
+ * needs the transport configuration (API base URL) to make the
28
+ * request.
29
+ *
30
+ * @param token - The invitation token from the invite URL, or `null`
31
+ * to skip fetching.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * const { preview, isLoading, error } = useInvitationPreview(token);
36
+ *
37
+ * if (isLoading) return <Spinner />;
38
+ * if (!preview) return <NotFound />;
39
+ * if (!preview.isValid) return <Expired reason={preview.invalidReason} />;
40
+ *
41
+ * return <p>Join {preview.organizationName} as {preview.role}</p>;
42
+ * ```
43
+ */
44
+ export function useInvitationPreview(token) {
45
+ const stigmer = useStigmer();
46
+ const [preview, setPreview] = useState(null);
47
+ const [isLoading, setIsLoading] = useState(false);
48
+ const [error, setError] = useState(null);
49
+ const [fetchKey, setFetchKey] = useState(0);
50
+ const refetch = useCallback(() => setFetchKey((k) => k + 1), []);
51
+ useEffect(() => {
52
+ if (!token) {
53
+ setPreview(null);
54
+ setIsLoading(false);
55
+ setError(null);
56
+ return;
57
+ }
58
+ const cancelled = { current: false };
59
+ setIsLoading(true);
60
+ setError(null);
61
+ stigmer.invitation
62
+ .getByToken(create(InvitationTokenInputSchema, { token }))
63
+ .then((result) => {
64
+ if (cancelled.current)
65
+ return;
66
+ setPreview(result);
67
+ setIsLoading(false);
68
+ }, (err) => {
69
+ if (cancelled.current)
70
+ return;
71
+ setError(toError(err));
72
+ setIsLoading(false);
73
+ });
74
+ return () => {
75
+ cancelled.current = true;
76
+ };
77
+ }, [token, stigmer, fetchKey]);
78
+ return { preview, isLoading, error, refetch };
79
+ }
80
+ //# sourceMappingURL=useInvitationPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3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rC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,OAAO,CAAC,UAAU;aACf,UAAU,CAAC,MAAM,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;aACzD,IAAI,CACH,CAAC,MAAM,EAAE,EAAE;YACT,IAAI,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC9B,UAAU,CAAC,MAAM,CAAC,CAAC;YACnB,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,IAAI,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC9B,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CACF,CAAC;QAEJ,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE/B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAChD,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
2
+ /** Return value of {@link useOrgInvitations}. */
3
+ export interface UseOrgInvitationsReturn {
4
+ /** All invitations for the organization. Empty while loading or on error. */
5
+ readonly invitations: readonly Invitation[];
6
+ /** `true` while the initial fetch or a refetch is in flight. */
7
+ readonly isLoading: boolean;
8
+ /** Error from the last failed request, or `null` when healthy. */
9
+ readonly error: Error | null;
10
+ /** Discard cached data and re-fetch the invitation list from the server. */
11
+ readonly refetch: () => void;
12
+ }
13
+ /**
14
+ * Data hook that fetches all {@link Invitation} entries for an
15
+ * organization.
16
+ *
17
+ * Pass `null` to skip fetching (stable no-op). When the `org` slug
18
+ * changes, the previous in-flight request is discarded and a fresh
19
+ * fetch begins. Call `refetch()` to re-query after mutations
20
+ * (create / revoke).
21
+ *
22
+ * Requires `can_view_access` permission on the organization —
23
+ * only admins and owners can list invitation links.
24
+ *
25
+ * @param org - Organization slug, or `null` to skip fetching.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * const { invitations, isLoading, error, refetch } = useOrgInvitations("acme");
30
+ *
31
+ * if (isLoading) return <Spinner />;
32
+ * invitations.map((inv) => inv.spec?.label);
33
+ * ```
34
+ */
35
+ export declare function useOrgInvitations(org: string | null): UseOrgInvitationsReturn;
36
+ //# sourceMappingURL=useOrgInvitations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrgInvitations.d.ts","sourceRoot":"","sources":["../../src/invitation/useOrgInvitations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAKtF,iDAAiD;AACjD,MAAM,WAAW,uBAAuB;IACtC,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,GACjB,uBAAuB,CA0CzB"}
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { useCallback, useEffect, useState } from "react";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { ListInvitationsByOrgInputSchema } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
5
+ import { useStigmer } from "../hooks";
6
+ import { toError } from "../internal/toError";
7
+ /**
8
+ * Data hook that fetches all {@link Invitation} entries for an
9
+ * organization.
10
+ *
11
+ * Pass `null` to skip fetching (stable no-op). When the `org` slug
12
+ * changes, the previous in-flight request is discarded and a fresh
13
+ * fetch begins. Call `refetch()` to re-query after mutations
14
+ * (create / revoke).
15
+ *
16
+ * Requires `can_view_access` permission on the organization —
17
+ * only admins and owners can list invitation links.
18
+ *
19
+ * @param org - Organization slug, or `null` to skip fetching.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const { invitations, isLoading, error, refetch } = useOrgInvitations("acme");
24
+ *
25
+ * if (isLoading) return <Spinner />;
26
+ * invitations.map((inv) => inv.spec?.label);
27
+ * ```
28
+ */
29
+ export function useOrgInvitations(org) {
30
+ const stigmer = useStigmer();
31
+ const [invitations, setInvitations] = useState([]);
32
+ const [isLoading, setIsLoading] = useState(false);
33
+ const [error, setError] = useState(null);
34
+ const [fetchKey, setFetchKey] = useState(0);
35
+ const refetch = useCallback(() => setFetchKey((k) => k + 1), []);
36
+ useEffect(() => {
37
+ if (!org) {
38
+ setInvitations([]);
39
+ setIsLoading(false);
40
+ setError(null);
41
+ return;
42
+ }
43
+ const cancelled = { current: false };
44
+ setIsLoading(true);
45
+ setError(null);
46
+ stigmer.invitation
47
+ .listByOrg(create(ListInvitationsByOrgInputSchema, { org }))
48
+ .then((result) => {
49
+ if (cancelled.current)
50
+ return;
51
+ setInvitations([...result.entries]);
52
+ setIsLoading(false);
53
+ }, (err) => {
54
+ if (cancelled.current)
55
+ return;
56
+ setError(toError(err));
57
+ setIsLoading(false);
58
+ });
59
+ return () => {
60
+ cancelled.current = true;
61
+ };
62
+ }, [org, stigmer, fetchKey]);
63
+ return { invitations, isLoading, error, refetch };
64
+ }
65
+ //# sourceMappingURL=useOrgInvitations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrgInvitations.js","sourceRoot":"","sources":["../../src/invitation/useOrgInvitations.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS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AAG,EAAE,CAAC,CAAC;aAC3D,IAAI,CACH,CAAC,MAAM,EAAE,EAAE;YACT,IAAI,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC9B,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACpC,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,IAAI,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC9B,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CACF,CAAC;QAEJ,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE7B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACpD,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
2
+ /** Return value of {@link useRedeemInvitation}. */
3
+ export interface UseRedeemInvitationReturn {
4
+ /**
5
+ * Redeem an invitation by its token.
6
+ *
7
+ * Creates an IAM policy granting the invitation's configured role
8
+ * to the authenticated user on the invitation's organization.
9
+ * Resolves with the updated {@link Invitation} so callers can
10
+ * access the organization and role information for post-redemption
11
+ * UI (e.g. "You've joined Acme as viewer").
12
+ */
13
+ readonly redeem: (token: string) => Promise<Invitation>;
14
+ /** `true` while the redeem request is in flight. */
15
+ readonly isRedeeming: boolean;
16
+ /** Error from the last failed redeem, or `null` when healthy. */
17
+ readonly error: Error | null;
18
+ /** Reset `error` to `null`. */
19
+ readonly clearError: () => void;
20
+ }
21
+ /**
22
+ * Behavior hook that wraps `invitation.redeem()` with loading and
23
+ * error state.
24
+ *
25
+ * Redeems an invitation by its shareable token. The server validates
26
+ * that the invitation is active, not expired, and not at its
27
+ * redemption limit, then creates an IAM policy granting the
28
+ * configured role to the authenticated user.
29
+ *
30
+ * The redeemer's identity is resolved from the authentication header
31
+ * — the token itself is the authorization mechanism (no FGA check
32
+ * on the invitation resource).
33
+ *
34
+ * Returns the updated {@link Invitation} including the incremented
35
+ * `status.redemptionCount` and the new entry in
36
+ * `status.redemptions`.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * const { redeem, isRedeeming, error } = useRedeemInvitation();
41
+ *
42
+ * const invitation = await redeem("abc123...");
43
+ * // invitation.metadata?.org contains the org the user just joined
44
+ * ```
45
+ */
46
+ export declare function useRedeemInvitation(): UseRedeemInvitationReturn;
47
+ //# sourceMappingURL=useRedeemInvitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRedeemInvitation.d.ts","sourceRoot":"","sources":["../../src/invitation/useRedeemInvitation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAKtF,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACxD,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,+BAA+B;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,IAAI,yBAAyB,CA2B/D"}
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { useCallback, useState } from "react";
3
+ import { create } from "@bufbuild/protobuf";
4
+ import { RedeemInvitationInputSchema } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/io_pb";
5
+ import { useStigmer } from "../hooks";
6
+ import { toError } from "../internal/toError";
7
+ /**
8
+ * Behavior hook that wraps `invitation.redeem()` with loading and
9
+ * error state.
10
+ *
11
+ * Redeems an invitation by its shareable token. The server validates
12
+ * that the invitation is active, not expired, and not at its
13
+ * redemption limit, then creates an IAM policy granting the
14
+ * configured role to the authenticated user.
15
+ *
16
+ * The redeemer's identity is resolved from the authentication header
17
+ * — the token itself is the authorization mechanism (no FGA check
18
+ * on the invitation resource).
19
+ *
20
+ * Returns the updated {@link Invitation} including the incremented
21
+ * `status.redemptionCount` and the new entry in
22
+ * `status.redemptions`.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * const { redeem, isRedeeming, error } = useRedeemInvitation();
27
+ *
28
+ * const invitation = await redeem("abc123...");
29
+ * // invitation.metadata?.org contains the org the user just joined
30
+ * ```
31
+ */
32
+ export function useRedeemInvitation() {
33
+ const stigmer = useStigmer();
34
+ const [isRedeeming, setIsRedeeming] = useState(false);
35
+ const [error, setError] = useState(null);
36
+ const clearError = useCallback(() => setError(null), []);
37
+ const redeem = useCallback(async (token) => {
38
+ setIsRedeeming(true);
39
+ setError(null);
40
+ try {
41
+ return await stigmer.invitation.redeem(create(RedeemInvitationInputSchema, { token }));
42
+ }
43
+ catch (err) {
44
+ setError(toError(err));
45
+ throw err;
46
+ }
47
+ finally {
48
+ setIsRedeeming(false);
49
+ }
50
+ }, [stigmer]);
51
+ return { redeem, isRedeeming, error, clearError };
52
+ }
53
+ //# sourceMappingURL=useRedeemInvitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRedeemInvitation.js","sourceRoot":"","sources":["../../src/invitation/useRedeemInvitation.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAsB9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,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,KAAa,EAAuB,EAAE;QAC3C,cAAc,CAAC,IAAI,CAAC,CAAC;QACrB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CACpC,MAAM,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,CAAC,CAC/C,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACpD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
2
+ /** Return value of {@link useRevokeInvitation}. */
3
+ export interface UseRevokeInvitationReturn {
4
+ /** Revoke an invitation by its resource ID. Resolves with the updated resource for confirmation display. */
5
+ readonly revoke: (id: string) => Promise<Invitation>;
6
+ /** `true` while the revoke request is in flight. */
7
+ readonly isRevoking: boolean;
8
+ /** Error from the last failed revoke, or `null` when healthy. */
9
+ readonly error: Error | null;
10
+ /** Reset `error` to `null`. */
11
+ readonly clearError: () => void;
12
+ }
13
+ /**
14
+ * Behavior hook that wraps `invitation.revoke()` with loading and
15
+ * error state.
16
+ *
17
+ * Revokes an active invitation by its resource ID, setting its state
18
+ * to `revoked` and preventing further redemptions. The operation is
19
+ * idempotent — revoking an already-revoked invitation is a no-op
20
+ * that returns the unchanged resource.
21
+ *
22
+ * Returns the updated {@link Invitation} so callers can verify the
23
+ * new state. Call `refetch()` on the list hook after revocation to
24
+ * refresh the invitation list.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const { revoke, isRevoking, error } = useRevokeInvitation();
29
+ *
30
+ * await revoke("inv-abc123");
31
+ * refetch(); // refresh the invitation list
32
+ * ```
33
+ */
34
+ export declare function useRevokeInvitation(): UseRevokeInvitationReturn;
35
+ //# sourceMappingURL=useRevokeInvitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRevokeInvitation.d.ts","sourceRoot":"","sources":["../../src/invitation/useRevokeInvitation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAItF,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,4GAA4G;IAC5G,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,oDAAoD;IACpD,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;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,IAAI,yBAAyB,CAyB/D"}
@@ -0,0 +1,47 @@
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 `invitation.revoke()` with loading and
7
+ * error state.
8
+ *
9
+ * Revokes an active invitation by its resource ID, setting its state
10
+ * to `revoked` and preventing further redemptions. The operation is
11
+ * idempotent — revoking an already-revoked invitation is a no-op
12
+ * that returns the unchanged resource.
13
+ *
14
+ * Returns the updated {@link Invitation} so callers can verify the
15
+ * new state. Call `refetch()` on the list hook after revocation to
16
+ * refresh the invitation list.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const { revoke, isRevoking, error } = useRevokeInvitation();
21
+ *
22
+ * await revoke("inv-abc123");
23
+ * refetch(); // refresh the invitation list
24
+ * ```
25
+ */
26
+ export function useRevokeInvitation() {
27
+ const stigmer = useStigmer();
28
+ const [isRevoking, setIsRevoking] = useState(false);
29
+ const [error, setError] = useState(null);
30
+ const clearError = useCallback(() => setError(null), []);
31
+ const revoke = useCallback(async (id) => {
32
+ setIsRevoking(true);
33
+ setError(null);
34
+ try {
35
+ return await stigmer.invitation.revoke(id);
36
+ }
37
+ catch (err) {
38
+ setError(toError(err));
39
+ throw err;
40
+ }
41
+ finally {
42
+ setIsRevoking(false);
43
+ }
44
+ }, [stigmer]);
45
+ return { revoke, isRevoking, error, clearError };
46
+ }
47
+ //# sourceMappingURL=useRevokeInvitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRevokeInvitation.js","sourceRoot":"","sources":["../../src/invitation/useRevokeInvitation.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAc9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,mBAAmB;IACjC,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,EAAU,EAAuB,EAAE;QACxC,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC7C,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"}
@@ -12,6 +12,7 @@ import type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agent
12
12
  * - **Package detection** (`detectSkillPackage`): Skill packages (directory with SKILL.md) — pushed via `pushFromExecutionArtifact()`
13
13
  */
14
14
  export type SkillPackageDetection = {
15
+ /** Discriminant — `false` when no skill package was detected. */
15
16
  readonly detected: false;
16
17
  } | {
17
18
  /** Discriminant — always `true` when a skill package was detected. */
@@ -1 +1 @@
1
- {"version":3,"file":"detect-skill-package.d.ts","sourceRoot":"","sources":["../../src/library/detect-skill-package.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAI1G;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAA;CAAE,GAC5B;IACE,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAMN;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAKnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,cAAc,EAAE,MAAM,GACrB,qBAAqB,CAiBvB"}
1
+ {"version":3,"file":"detect-skill-package.d.ts","sourceRoot":"","sources":["../../src/library/detect-skill-package.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAI1G;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IACE,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;CAC1B,GACD;IACE,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sDAAsD;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