@jini-ai/admin 0.3.10 → 0.4.1

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 (387) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +71 -37
  3. package/dist/agent-plugins/adapters/http.d.ts +7 -0
  4. package/dist/agent-plugins/adapters/http.js +15 -0
  5. package/dist/agent-plugins/adapters/memory.d.ts +8 -0
  6. package/dist/agent-plugins/adapters/memory.js +25 -0
  7. package/dist/agent-plugins/agent-plugins.module.d.ts +51 -0
  8. package/dist/agent-plugins/agent-plugins.module.js +6 -0
  9. package/dist/agent-plugins/conformance/agent-plugins-api.conformance.d.ts +12 -0
  10. package/dist/agent-plugins/conformance/agent-plugins-api.conformance.js +47 -0
  11. package/dist/agent-plugins/controllers/agent-plugin-files.controller.d.ts +20 -0
  12. package/dist/agent-plugins/controllers/agent-plugin-files.controller.js +43 -0
  13. package/dist/agent-plugins/controllers/agent-plugins.controller.d.ts +25 -0
  14. package/dist/agent-plugins/controllers/agent-plugins.controller.js +91 -0
  15. package/dist/agent-plugins/index.d.ts +9 -0
  16. package/dist/agent-plugins/index.js +9 -0
  17. package/dist/agent-plugins/messages.en.d.ts +23 -0
  18. package/dist/agent-plugins/messages.en.js +14 -0
  19. package/dist/agent-plugins/models.d.ts +57 -0
  20. package/dist/agent-plugins/models.js +2 -0
  21. package/dist/agent-plugins/package-file-tree.d.ts +111 -0
  22. package/dist/agent-plugins/package-file-tree.js +188 -0
  23. package/dist/agent-plugins/ports.d.ts +18 -0
  24. package/dist/agent-plugins/ports.js +3 -0
  25. package/dist/agent-plugins/react/components/AgentPluginFileContent.d.ts +5 -0
  26. package/dist/agent-plugins/react/components/AgentPluginFileContent.js +9 -0
  27. package/dist/agent-plugins/react/components/AgentPluginFileTree.d.ts +9 -0
  28. package/dist/agent-plugins/react/components/AgentPluginFileTree.js +7 -0
  29. package/dist/agent-plugins/react/components/AgentPluginInspector.d.ts +3 -0
  30. package/dist/agent-plugins/react/components/AgentPluginInspector.js +11 -0
  31. package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +6 -0
  32. package/dist/agent-plugins/react/components/AgentPluginListPanel.js +10 -0
  33. package/dist/agent-plugins/react/components/AgentPluginRow.d.ts +5 -0
  34. package/dist/agent-plugins/react/components/AgentPluginRow.js +8 -0
  35. package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.d.ts +90 -0
  36. package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +74 -0
  37. package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +67 -0
  38. package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.js +50 -0
  39. package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.d.ts +55 -0
  40. package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.js +6 -0
  41. package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +64 -0
  42. package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +39 -0
  43. package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.d.ts +7 -0
  44. package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.js +10 -0
  45. package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +6 -0
  46. package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.js +3 -0
  47. package/dist/agent-plugins/react/index.d.ts +245 -0
  48. package/dist/agent-plugins/react/index.js +13 -0
  49. package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +4 -0
  50. package/dist/agent-plugins/react/pages/AgentPluginsPage.js +12 -0
  51. package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +4 -0
  52. package/dist/agent-plugins/react/tabs/DownloadedTab.js +5 -0
  53. package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +4 -0
  54. package/dist/agent-plugins/react/tabs/InstalledTab.js +5 -0
  55. package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +4 -0
  56. package/dist/agent-plugins/react/tabs/MarketplaceTab.js +10 -0
  57. package/dist/agent-plugins/rules.d.ts +33 -0
  58. package/dist/agent-plugins/rules.js +51 -0
  59. package/dist/browser/index.d.ts +1 -0
  60. package/dist/browser/index.js +1 -0
  61. package/dist/browser/navigation.d.ts +19 -4
  62. package/dist/browser/navigation.js +8 -8
  63. package/dist/browser/shell-navigation.d.ts +12 -0
  64. package/dist/browser/shell-navigation.js +16 -0
  65. package/dist/contracts/credential-management.d.ts +8 -0
  66. package/dist/contracts/credential-management.js +3 -0
  67. package/dist/contracts/media-picker.d.ts +17 -0
  68. package/dist/contracts/media-picker.js +5 -0
  69. package/dist/contracts/playground-render-target.d.ts +18 -0
  70. package/dist/contracts/playground-render-target.js +3 -0
  71. package/dist/core/entities/rules.d.ts +138 -0
  72. package/dist/core/entities/rules.js +344 -0
  73. package/dist/core/gated/types.d.ts +8 -4
  74. package/dist/core/index.d.ts +4 -0
  75. package/dist/core/index.js +1 -0
  76. package/dist/core/manifest/rules.d.ts +24 -6
  77. package/dist/core/manifest/rules.js +12 -11
  78. package/dist/core/module/controller-store.d.ts +22 -0
  79. package/dist/core/module/controller-store.js +32 -0
  80. package/dist/core/module/create-admin.d.ts +41 -0
  81. package/dist/core/module/create-admin.js +187 -0
  82. package/dist/core/module/define-admin-module.d.ts +4 -0
  83. package/dist/core/module/define-admin-module.js +5 -0
  84. package/dist/core/module/index.d.ts +7 -0
  85. package/dist/core/module/index.js +4 -0
  86. package/dist/core/module/token.d.ts +19 -0
  87. package/dist/core/module/token.js +4 -0
  88. package/dist/core/module/types.d.ts +79 -0
  89. package/dist/core/module/types.js +2 -0
  90. package/dist/core/permissions/rules.d.ts +4 -1
  91. package/dist/core/permissions/rules.js +1 -1
  92. package/dist/core/ports/analytics.d.ts +1 -1
  93. package/dist/core/ports/auth.d.ts +2 -2
  94. package/dist/core/ports/comments.d.ts +9 -6
  95. package/dist/core/ports/database.d.ts +13 -10
  96. package/dist/core/ports/entities.d.ts +302 -0
  97. package/dist/core/ports/entities.js +47 -0
  98. package/dist/core/ports/forms.d.ts +19 -7
  99. package/dist/core/ports/identity.d.ts +42 -17
  100. package/dist/core/ports/index.d.ts +2 -0
  101. package/dist/core/ports/integrations.d.ts +9 -4
  102. package/dist/core/ports/media.d.ts +16 -7
  103. package/dist/core/ports/members.d.ts +7 -3
  104. package/dist/core/ports/menus.d.ts +46 -0
  105. package/dist/core/ports/menus.js +43 -0
  106. package/dist/core/ports/plugins.d.ts +3 -2
  107. package/dist/core/ports/recovery.d.ts +10 -6
  108. package/dist/core/ports/redirects.d.ts +17 -7
  109. package/dist/core/ports/seo.d.ts +12 -6
  110. package/dist/core/ports/shell.d.ts +41 -0
  111. package/dist/core/ports/shell.js +2 -0
  112. package/dist/core/ports/workspace.d.ts +3 -3
  113. package/dist/core/routing/rules.d.ts +17 -4
  114. package/dist/core/routing/rules.js +4 -4
  115. package/dist/core/transport/errors.d.ts +13 -4
  116. package/dist/core/transport/errors.js +4 -4
  117. package/dist/core/transport/http.d.ts +26 -16
  118. package/dist/core/transport/http.js +59 -21
  119. package/dist/core/transport/types.d.ts +26 -14
  120. package/dist/core/transport/types.js +9 -7
  121. package/dist/media/adapters/http.d.ts +27 -0
  122. package/dist/media/adapters/http.js +44 -0
  123. package/dist/media/adapters/memory.d.ts +11 -0
  124. package/dist/media/adapters/memory.js +139 -0
  125. package/dist/media/conformance/media-api.conformance.d.ts +7 -0
  126. package/dist/media/conformance/media-api.conformance.js +69 -0
  127. package/dist/media/controllers/edit-media.controller.d.ts +24 -0
  128. package/dist/media/controllers/edit-media.controller.js +69 -0
  129. package/dist/media/controllers/library.controller.d.ts +47 -0
  130. package/dist/media/controllers/library.controller.js +173 -0
  131. package/dist/media/controllers/providers.controller.d.ts +30 -0
  132. package/dist/media/controllers/providers.controller.js +76 -0
  133. package/dist/media/html-attributes.d.ts +82 -0
  134. package/dist/media/html-attributes.js +204 -0
  135. package/dist/media/index.d.ts +12 -0
  136. package/dist/media/index.js +9 -0
  137. package/dist/media/media.module.d.ts +83 -0
  138. package/dist/media/media.module.js +43 -0
  139. package/dist/media/messages.en.d.ts +24 -0
  140. package/dist/media/messages.en.js +24 -0
  141. package/dist/media/models.d.ts +72 -0
  142. package/dist/media/models.js +2 -0
  143. package/dist/media/ports.d.ts +75 -0
  144. package/dist/media/ports.js +7 -0
  145. package/dist/media/react/components/EditMediaPanel.d.ts +3 -0
  146. package/dist/media/react/components/EditMediaPanel.js +10 -0
  147. package/dist/media/react/components/MediaCard.d.ts +5 -0
  148. package/dist/media/react/components/MediaCard.js +17 -0
  149. package/dist/media/react/components/MediaDialog.d.ts +3 -0
  150. package/dist/media/react/components/MediaDialog.js +8 -0
  151. package/dist/media/react/components/MediaGrid.d.ts +4 -0
  152. package/dist/media/react/components/MediaGrid.js +8 -0
  153. package/dist/media/react/components/MediaIcons.d.ts +14 -0
  154. package/dist/media/react/components/MediaIcons.js +39 -0
  155. package/dist/media/react/components/MediaLightbox.d.ts +5 -0
  156. package/dist/media/react/components/MediaLightbox.js +12 -0
  157. package/dist/media/react/components/MediaPicker.d.ts +3 -0
  158. package/dist/media/react/components/MediaPicker.js +10 -0
  159. package/dist/media/react/components/MediaPurgeDialog.d.ts +4 -0
  160. package/dist/media/react/components/MediaPurgeDialog.js +9 -0
  161. package/dist/media/react/components/UploadButton.d.ts +3 -0
  162. package/dist/media/react/components/UploadButton.js +8 -0
  163. package/dist/media/react/hooks/EditMediaPanel.hooks.d.ts +84 -0
  164. package/dist/media/react/hooks/EditMediaPanel.hooks.js +105 -0
  165. package/dist/media/react/hooks/LibraryTab.hooks.d.ts +103 -0
  166. package/dist/media/react/hooks/LibraryTab.hooks.js +164 -0
  167. package/dist/media/react/hooks/MediaCard.hooks.d.ts +83 -0
  168. package/dist/media/react/hooks/MediaCard.hooks.js +66 -0
  169. package/dist/media/react/hooks/MediaDialog.hooks.d.ts +10 -0
  170. package/dist/media/react/hooks/MediaDialog.hooks.js +20 -0
  171. package/dist/media/react/hooks/MediaGrid.hooks.d.ts +29 -0
  172. package/dist/media/react/hooks/MediaGrid.hooks.js +6 -0
  173. package/dist/media/react/hooks/MediaLightbox.hooks.d.ts +27 -0
  174. package/dist/media/react/hooks/MediaLightbox.hooks.js +64 -0
  175. package/dist/media/react/hooks/MediaPage.hooks.d.ts +68 -0
  176. package/dist/media/react/hooks/MediaPage.hooks.js +68 -0
  177. package/dist/media/react/hooks/MediaPicker.hooks.d.ts +26 -0
  178. package/dist/media/react/hooks/MediaPicker.hooks.js +25 -0
  179. package/dist/media/react/hooks/MediaPorts.hooks.d.ts +9 -0
  180. package/dist/media/react/hooks/MediaPorts.hooks.js +10 -0
  181. package/dist/media/react/hooks/MediaPurgeDialog.hooks.d.ts +22 -0
  182. package/dist/media/react/hooks/MediaPurgeDialog.hooks.js +6 -0
  183. package/dist/media/react/hooks/ProvidersTab.hooks.d.ts +55 -0
  184. package/dist/media/react/hooks/ProvidersTab.hooks.js +124 -0
  185. package/dist/media/react/hooks/UploadButton.hooks.d.ts +48 -0
  186. package/dist/media/react/hooks/UploadButton.hooks.js +118 -0
  187. package/dist/media/react/index.d.ts +373 -0
  188. package/dist/media/react/index.js +73 -0
  189. package/dist/media/react/pages/MediaPage.d.ts +4 -0
  190. package/dist/media/react/pages/MediaPage.js +9 -0
  191. package/dist/media/react/tabs/LibraryTab.d.ts +4 -0
  192. package/dist/media/react/tabs/LibraryTab.js +14 -0
  193. package/dist/media/react/tabs/ProvidersTab.d.ts +4 -0
  194. package/dist/media/react/tabs/ProvidersTab.js +10 -0
  195. package/dist/media/rules.d.ts +86 -0
  196. package/dist/media/rules.js +134 -0
  197. package/dist/media/styles.d.ts +4 -0
  198. package/dist/media/styles.js +5 -0
  199. package/dist/playground/adapters/http.d.ts +8 -0
  200. package/dist/playground/adapters/http.js +4 -0
  201. package/dist/playground/adapters/memory.d.ts +10 -0
  202. package/dist/playground/adapters/memory.js +30 -0
  203. package/dist/playground/conformance/playground-api.conformance.d.ts +6 -0
  204. package/dist/playground/conformance/playground-api.conformance.js +37 -0
  205. package/dist/playground/controllers/playground.controller.d.ts +16 -0
  206. package/dist/playground/controllers/playground.controller.js +21 -0
  207. package/dist/playground/index.d.ts +7 -0
  208. package/dist/playground/index.js +5 -0
  209. package/dist/playground/messages.en.d.ts +9 -0
  210. package/dist/playground/messages.en.js +2 -0
  211. package/dist/playground/models.d.ts +4 -0
  212. package/dist/playground/models.js +2 -0
  213. package/dist/playground/playground.module.d.ts +31 -0
  214. package/dist/playground/playground.module.js +5 -0
  215. package/dist/playground/ports.d.ts +5 -0
  216. package/dist/playground/ports.js +2 -0
  217. package/dist/playground/react/components/Canvas.d.ts +3 -0
  218. package/dist/playground/react/components/Canvas.js +9 -0
  219. package/dist/playground/react/hooks/Canvas.hooks.d.ts +7 -0
  220. package/dist/playground/react/hooks/Canvas.hooks.js +18 -0
  221. package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +8 -0
  222. package/dist/playground/react/hooks/PlaygroundPage.hooks.js +2 -0
  223. package/dist/playground/react/hooks/PlaygroundPorts.hooks.d.ts +4 -0
  224. package/dist/playground/react/hooks/PlaygroundPorts.hooks.js +6 -0
  225. package/dist/playground/react/index.d.ts +136 -0
  226. package/dist/playground/react/index.js +10 -0
  227. package/dist/playground/react/pages/PlaygroundPage.d.ts +4 -0
  228. package/dist/playground/react/pages/PlaygroundPage.js +11 -0
  229. package/dist/playground/react/tabs/CanvasTab.d.ts +4 -0
  230. package/dist/playground/react/tabs/CanvasTab.js +5 -0
  231. package/dist/playground/rules.d.ts +4 -0
  232. package/dist/playground/rules.js +2 -0
  233. package/dist/react/OverlayHost.d.ts +3 -0
  234. package/dist/react/OverlayHost.hooks.d.ts +9 -0
  235. package/dist/react/OverlayHost.hooks.js +9 -0
  236. package/dist/react/OverlayHost.js +7 -0
  237. package/dist/react/bind-react.d.ts +46 -0
  238. package/dist/react/bind-react.js +28 -0
  239. package/dist/react/components/ConfirmButton/ConfirmButton.hooks.d.ts +7 -1
  240. package/dist/react/components/ConfirmButton/ConfirmButton.hooks.js +2 -2
  241. package/dist/react/components/ConfirmButton/ConfirmButton.js +1 -1
  242. package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.d.ts +17 -3
  243. package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +3 -3
  244. package/dist/react/components/ConfirmDialog/ConfirmDialog.js +5 -5
  245. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +6 -2
  246. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +7 -8
  247. package/dist/react/components/RowMenu/RowMenu.d.ts +5 -1
  248. package/dist/react/components/RowMenu/RowMenu.hooks.d.ts +8 -2
  249. package/dist/react/components/RowMenu/RowMenu.hooks.js +4 -4
  250. package/dist/react/components/RowMenu/RowMenu.js +6 -6
  251. package/dist/react/components/Sidebar.d.ts +1 -1
  252. package/dist/react/components/Sidebar.js +103 -7
  253. package/dist/react/entities/EntityCell.d.ts +10 -0
  254. package/dist/react/entities/EntityCell.js +18 -0
  255. package/dist/react/entities/EntityDetail.d.ts +3 -0
  256. package/dist/react/entities/EntityDetail.js +21 -0
  257. package/dist/react/entities/EntityEdit.d.ts +13 -0
  258. package/dist/react/entities/EntityEdit.js +45 -0
  259. package/dist/react/entities/EntityField.d.ts +20 -0
  260. package/dist/react/entities/EntityField.js +31 -0
  261. package/dist/react/entities/EntityIndex.d.ts +3 -0
  262. package/dist/react/entities/EntityIndex.js +10 -0
  263. package/dist/react/entities/EntityList.d.ts +7 -0
  264. package/dist/react/entities/EntityList.js +52 -0
  265. package/dist/react/entities/contribution.d.ts +26 -0
  266. package/dist/react/entities/contribution.js +78 -0
  267. package/dist/react/entities/index.d.ts +10 -0
  268. package/dist/react/entities/index.js +7 -0
  269. package/dist/react/entities/rules.d.ts +179 -0
  270. package/dist/react/entities/rules.js +224 -0
  271. package/dist/react/entities/types.d.ts +45 -0
  272. package/dist/react/entities/types.js +5 -0
  273. package/dist/react/entities/use-entity-edit.d.ts +35 -0
  274. package/dist/react/entities/use-entity-edit.js +98 -0
  275. package/dist/react/entities/use-entity-read.d.ts +22 -0
  276. package/dist/react/entities/use-entity-read.js +27 -0
  277. package/dist/react/hooks/use-nav-sections.d.ts +12 -3
  278. package/dist/react/hooks/use-nav-sections.js +14 -14
  279. package/dist/react/hooks/use-sidebar-rail.d.ts +7 -1
  280. package/dist/react/hooks/use-sidebar-rail.js +11 -11
  281. package/dist/react/index.d.ts +3 -1
  282. package/dist/react/index.js +5 -2
  283. package/dist/react/overlays.d.ts +38 -0
  284. package/dist/react/overlays.js +46 -0
  285. package/dist/react/shell/AdminShell.d.ts +9 -0
  286. package/dist/react/shell/AdminShell.hooks.d.ts +15 -0
  287. package/dist/react/shell/AdminShell.hooks.js +27 -0
  288. package/dist/react/shell/AdminShell.js +46 -0
  289. package/dist/react/shell/index.d.ts +7 -0
  290. package/dist/react/shell/index.js +5 -0
  291. package/dist/react/shell/model.d.ts +25 -0
  292. package/dist/react/shell/model.js +29 -0
  293. package/dist/react/shell/theme-ports.d.ts +28 -0
  294. package/dist/react/shell/theme-ports.js +2 -0
  295. package/dist/react/shell/types.d.ts +99 -0
  296. package/dist/react/shell/types.js +2 -0
  297. package/dist/react/shell/use-admin-shell-session.d.ts +13 -0
  298. package/dist/react/shell/use-admin-shell-session.js +81 -0
  299. package/dist/react/shell/use-admin-theme.d.ts +16 -0
  300. package/dist/react/shell/use-admin-theme.js +57 -0
  301. package/dist/react/types.d.ts +6 -4
  302. package/dist/react/types.js +2 -2
  303. package/dist/react/use-controller.d.ts +16 -0
  304. package/dist/react/use-controller.js +18 -0
  305. package/dist/security/adapters/http.d.ts +16 -0
  306. package/dist/security/adapters/http.js +94 -0
  307. package/dist/security/adapters/memory.d.ts +15 -0
  308. package/dist/security/adapters/memory.js +60 -0
  309. package/dist/security/conformance/security-api.conformance.d.ts +10 -0
  310. package/dist/security/conformance/security-api.conformance.js +48 -0
  311. package/dist/security/controllers/access-tokens.controller.d.ts +44 -0
  312. package/dist/security/controllers/access-tokens.controller.js +112 -0
  313. package/dist/security/controllers/other-credentials.controller.d.ts +30 -0
  314. package/dist/security/controllers/other-credentials.controller.js +74 -0
  315. package/dist/security/controllers/root-key.controller.d.ts +35 -0
  316. package/dist/security/controllers/root-key.controller.js +90 -0
  317. package/dist/security/index.d.ts +9 -0
  318. package/dist/security/index.js +9 -0
  319. package/dist/security/messages.en.d.ts +12 -0
  320. package/dist/security/messages.en.js +2 -0
  321. package/dist/security/models.d.ts +112 -0
  322. package/dist/security/models.js +2 -0
  323. package/dist/security/ports.d.ts +58 -0
  324. package/dist/security/ports.js +5 -0
  325. package/dist/security/react/components/CredentialEditor.d.ts +3 -0
  326. package/dist/security/react/components/CredentialEditor.js +8 -0
  327. package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +94 -0
  328. package/dist/security/react/hooks/AccessTokensTab.hooks.js +36 -0
  329. package/dist/security/react/hooks/CredentialEditor.hooks.d.ts +49 -0
  330. package/dist/security/react/hooks/CredentialEditor.hooks.js +14 -0
  331. package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +29 -0
  332. package/dist/security/react/hooks/RootKeyTab.hooks.js +19 -0
  333. package/dist/security/react/hooks/SecurityPage.hooks.d.ts +17 -0
  334. package/dist/security/react/hooks/SecurityPage.hooks.js +12 -0
  335. package/dist/security/react/hooks/SecurityPorts.hooks.d.ts +9 -0
  336. package/dist/security/react/hooks/SecurityPorts.hooks.js +6 -0
  337. package/dist/security/react/index.d.ts +215 -0
  338. package/dist/security/react/index.js +10 -0
  339. package/dist/security/react/pages/SecurityPage.d.ts +4 -0
  340. package/dist/security/react/pages/SecurityPage.js +10 -0
  341. package/dist/security/react/tabs/AccessTokensTab.d.ts +4 -0
  342. package/dist/security/react/tabs/AccessTokensTab.js +10 -0
  343. package/dist/security/react/tabs/RootKeyTab.d.ts +4 -0
  344. package/dist/security/react/tabs/RootKeyTab.js +9 -0
  345. package/dist/security/rules.d.ts +57 -0
  346. package/dist/security/rules.js +63 -0
  347. package/dist/security/security.module.d.ts +45 -0
  348. package/dist/security/security.module.js +5 -0
  349. package/dist/source-control/adapters/http.d.ts +6 -0
  350. package/dist/source-control/adapters/http.js +13 -0
  351. package/dist/source-control/adapters/memory.d.ts +9 -0
  352. package/dist/source-control/adapters/memory.js +35 -0
  353. package/dist/source-control/conformance/source-control-api.conformance.d.ts +10 -0
  354. package/dist/source-control/conformance/source-control-api.conformance.js +48 -0
  355. package/dist/source-control/controllers/source-control.controller.d.ts +26 -0
  356. package/dist/source-control/controllers/source-control.controller.js +70 -0
  357. package/dist/source-control/index.d.ts +8 -0
  358. package/dist/source-control/index.js +6 -0
  359. package/dist/source-control/messages.en.d.ts +11 -0
  360. package/dist/source-control/messages.en.js +2 -0
  361. package/dist/source-control/models.d.ts +70 -0
  362. package/dist/source-control/models.js +2 -0
  363. package/dist/source-control/ports.d.ts +23 -0
  364. package/dist/source-control/ports.js +3 -0
  365. package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +5 -0
  366. package/dist/source-control/react/components/SourceControlCredentialFields.js +8 -0
  367. package/dist/source-control/react/components/SourceControlProviderRow.d.ts +5 -0
  368. package/dist/source-control/react/components/SourceControlProviderRow.js +7 -0
  369. package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +45 -0
  370. package/dist/source-control/react/hooks/ProvidersTab.hooks.js +20 -0
  371. package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.d.ts +43 -0
  372. package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.js +9 -0
  373. package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +17 -0
  374. package/dist/source-control/react/hooks/SourceControlPage.hooks.js +5 -0
  375. package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +9 -0
  376. package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +6 -0
  377. package/dist/source-control/react/index.d.ts +156 -0
  378. package/dist/source-control/react/index.js +10 -0
  379. package/dist/source-control/react/pages/SourceControlPage.d.ts +4 -0
  380. package/dist/source-control/react/pages/SourceControlPage.js +11 -0
  381. package/dist/source-control/react/tabs/ProvidersTab.d.ts +4 -0
  382. package/dist/source-control/react/tabs/ProvidersTab.js +10 -0
  383. package/dist/source-control/rules.d.ts +32 -0
  384. package/dist/source-control/rules.js +35 -0
  385. package/dist/source-control/source-control.module.d.ts +36 -0
  386. package/dist/source-control/source-control.module.js +6 -0
  387. package/package.json +207 -4
@@ -0,0 +1,74 @@
1
+ import { useEffect, useId, useRef, useState } from 'react';
2
+ import { useController } from '../../../react/use-controller.js';
3
+ import { createAgentPluginFilesController } from '../../controllers/agent-plugin-files.controller.js';
4
+ import { useAgentPluginsPorts } from './AgentPluginsPorts.hooks.js';
5
+ import { AGENT_PLUGINS_READ, agentPluginFileNotice, selectAgentPluginFile } from '../../rules.js';
6
+ import { ancestorFolderPaths, buildPackageFileTree, visiblePackageFileRows, packageFileTreeKeyAction, packageFileIconKind } from '../../package-file-tree.js';
7
+ import { agentPluginsMessagesEn as m } from '../../messages.en.js';
8
+ export function useAgentPluginInspector({ pluginId, permissions, name }, _optional = {}) {
9
+ const { agentPluginsApi } = useAgentPluginsPorts({}), key = permissions.join('\0');
10
+ const { controller, snapshot } = useController({ create: () => createAgentPluginFilesController({ api: agentPluginsApi, permissions }), dependencies: [agentPluginsApi, key, pluginId] }, { start: ({ controller }) => { void controller.open({ pluginId }); } });
11
+ // Do not show any stored read tagged with another id, even before the new effect commits.
12
+ const state = snapshot?.pluginId === pluginId ? snapshot : null, files = state?.listing?.files ?? [];
13
+ const selected = selectAgentPluginFile({ files, path: state?.selectedPath ?? '' });
14
+ return { title: `${name} — Package files`, denied: !permissions.includes(AGENT_PLUGINS_READ), files, selected, selectedPath: selected?.relativePath ?? null,
15
+ status: state?.error ? { text: state.error, role: 'alert' } : !state || state.loading ? { text: m.filesLoading, role: 'status' } : !files.length ? { text: m.filesEmpty, role: 'status' } : null,
16
+ listNotice: state?.listing?.truncated ? m.filesTruncated : null,
17
+ select({ path }, _optional = {}) { controller?.select({ path }); },
18
+ };
19
+ }
20
+ const fileGlyphs = { json: '{}', markdown: 'M↓', javascript: 'JS', typescript: 'TS', config: '⚙', html: '<>', css: '#', image: '▧', shell: '>', text: '¶', file: '▤' };
21
+ export function useAgentPluginFileTree({ files, selectedPath, onOpen }, _optional = {}) {
22
+ const tree = buildPackageFileTree({ paths: files.map(f => f.relativePath) }), [toggled, setToggled] = useState(new Map());
23
+ const [focused, setFocused] = useState(null), treeRef = useRef(null), moveFocus = useRef(false);
24
+ // Expansion is derived from selected ancestors until the viewer explicitly toggles a folder.
25
+ const ancestors = new Set(selectedPath ? ancestorFolderPaths({ filePath: selectedPath }) : []);
26
+ const isExpanded = ({ path }) => toggled.get(path) ?? ancestors.has(path);
27
+ const rows = visiblePackageFileRows({ nodes: tree, isExpanded });
28
+ const visible = (path) => path !== null && rows.some(r => r.node.path === path);
29
+ const activePath = visible(focused) ? focused : visible(selectedPath) ? selectedPath : rows[0]?.node.path ?? null;
30
+ // Move DOM focus only after keyboard navigation, never when opening the inspector.
31
+ useEffect(() => { if (!moveFocus.current)
32
+ return; moveFocus.current = false; Array.from(treeRef.current?.querySelectorAll('[data-tree-path]') ?? []).find(el => el.dataset.treePath === activePath)?.focus(); });
33
+ const setExpanded = (path, expanded) => setToggled(current => new Map(current).set(path, expanded));
34
+ return { treeRef,
35
+ rows: rows.map(row => {
36
+ const { node } = row, folder = node.kind === 'folder', expanded = folder && isExpanded({ path: node.path });
37
+ return { key: `${node.kind}:${node.path}`, name: node.name, path: node.path, depth: row.depth + 1, setSize: row.setSize, posInSet: row.posInSet, expanded: folder ? expanded : undefined, selected: folder ? undefined : node.path === selectedPath, tabIndex: node.path === activePath ? 0 : -1,
38
+ icon: folder ? expanded ? '▾' : '▸' : fileGlyphs[packageFileIconKind({ fileName: node.name })], indent: { paddingInlineStart: `${row.depth * 1.25}rem`, ...(node.kind === 'file' && node.path === selectedPath ? { backgroundColor: 'Highlight', color: 'HighlightText' } : {}) },
39
+ onClick() { setFocused(node.path); if (folder)
40
+ setExpanded(node.path, !expanded);
41
+ else
42
+ onOpen({ path: node.path }); }, onFocus() { setFocused(node.path); },
43
+ };
44
+ }),
45
+ onKeyDown(event) {
46
+ if (activePath === null)
47
+ return;
48
+ const action = packageFileTreeKeyAction({ rows, currentPath: activePath, key: event.key, isExpanded });
49
+ if (!action.focus && !action.setExpanded && !action.open)
50
+ return;
51
+ event.preventDefault();
52
+ if (action.setExpanded)
53
+ setExpanded(action.setExpanded.path, action.setExpanded.expanded);
54
+ if (action.open)
55
+ onOpen({ path: action.open });
56
+ if (action.focus) {
57
+ setFocused(action.focus);
58
+ moveFocus.current = true;
59
+ }
60
+ },
61
+ };
62
+ }
63
+ export function useAgentPluginFileContent({ file }, _optional = {}) {
64
+ const [wrap, setWrap] = useState(true), headingId = useId(), notice = agentPluginFileNotice({ file });
65
+ // One grid row per source line keeps gutter numbers aligned when long lines wrap.
66
+ const lines = (file.content ?? '').split('\n').map((text, index) => ({ text, number: index + 1 }));
67
+ return { headingId, path: file.relativePath, segments: file.relativePath.split('/').map((text, i, all) => ({ text, slash: i < all.length - 1 })), notice, hasContent: notice === null, lines, wrap,
68
+ wrapAttrs: { 'aria-pressed': wrap }, wrapText: wrap ? 'Wrap: on' : 'Wrap: off',
69
+ codeStyle: { display: 'grid', gridTemplateColumns: 'max-content minmax(0, 1fr)', overflow: 'auto' },
70
+ lineStyle: { whiteSpace: wrap ? 'pre-wrap' : 'pre', overflowWrap: wrap ? 'anywhere' : 'normal' },
71
+ toggleWrap(_required, _optional = {}) { setWrap(value => !value); },
72
+ };
73
+ }
74
+ //# sourceMappingURL=AgentPluginInspector.hooks.js.map
@@ -0,0 +1,67 @@
1
+ import type { TabViewProps } from '../../../react/bind-react.js';
2
+ export declare function useAgentPluginPanel({ props, mode }: {
3
+ props: TabViewProps;
4
+ mode: 'installed' | 'downloaded';
5
+ }, _optional?: {}): {
6
+ denied: boolean;
7
+ mode: "installed" | "downloaded";
8
+ rows: {
9
+ id: string;
10
+ name: string;
11
+ version: string | null | undefined;
12
+ description: string | null | undefined;
13
+ glyph: string;
14
+ enabled: boolean;
15
+ stateLabel: string;
16
+ busy: boolean;
17
+ expanded: boolean;
18
+ mode: "installed" | "downloaded";
19
+ canWrite: boolean;
20
+ toggleLabel: string;
21
+ actionLabel: string;
22
+ actionText: string;
23
+ skills: readonly (Pick<import("@jini-ai/agent-plugins/lifecycle").InstalledAgentPluginSkill, "name"> & {
24
+ readonly summary: string;
25
+ })[];
26
+ keywords: readonly string[];
27
+ servers: readonly string[];
28
+ hasSkills: boolean;
29
+ hasKeywords: boolean;
30
+ hasServers: boolean;
31
+ toggle(_required: {
32
+ checked: boolean;
33
+ }, _optional?: {}): void;
34
+ act(_required: Record<string, never>, _optional?: {}): void;
35
+ expand(_required: Record<string, never>, _optional?: {}): void;
36
+ inspect(_required: Record<string, never>, _optional?: {}): void;
37
+ expandAttrs: {
38
+ 'aria-label': string;
39
+ 'aria-expanded': boolean;
40
+ 'data-agent-handle': string;
41
+ };
42
+ actionAttrs: {
43
+ 'aria-label': string;
44
+ 'data-agent-handle': string;
45
+ };
46
+ inspectAttrs: {
47
+ 'data-agent-handle': string;
48
+ };
49
+ uninstallAttrs: {
50
+ 'aria-describedby': string;
51
+ };
52
+ inspectLabel: string;
53
+ uninstallLabel: string;
54
+ }[];
55
+ loading: boolean;
56
+ error: string | null | undefined;
57
+ actionError: string | null | undefined;
58
+ empty: boolean;
59
+ lede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt." | "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
60
+ label: string;
61
+ uninstallNotice: string;
62
+ uninstallNoteId: string;
63
+ specUrl: string;
64
+ reload(_required: Record<string, never>, _optional?: {}): void;
65
+ };
66
+ export type AgentPluginRowView = ReturnType<typeof useAgentPluginPanel>['rows'][number];
67
+ //# sourceMappingURL=AgentPluginPanel.hooks.d.ts.map
@@ -0,0 +1,50 @@
1
+ import { agentPluginsMessagesEn as m } from '../../messages.en.js';
2
+ import { AGENT_PLUGINS_READ, AGENT_PLUGINS_WRITE, AGENT_PLUGINS_SPEC_URL, humanizeAgentPluginId, agentPluginGlyphKind } from '../../rules.js';
3
+ import { useAgentPluginsPageScope } from './AgentPluginsPage.hooks.js';
4
+ const glyphs = { compliance: '◈', deploy: '↗', design: '◇', integration: '⇄', content: '▤', package: '▣' };
5
+ export function useAgentPluginPanel({ props, mode }, _optional = {}) {
6
+ const { controller, snapshot: state, permissions, uninstallNoteId } = useAgentPluginsPageScope({});
7
+ const canRead = permissions.includes(AGENT_PLUGINS_READ) && !!props.permissions?.includes(AGENT_PLUGINS_READ);
8
+ const canWrite = canRead && permissions.includes(AGENT_PLUGINS_WRITE) && !!props.permissions?.includes(AGENT_PLUGINS_WRITE);
9
+ // Scope is intentionally unfiltered on BOTH tabs, including switched-off bundled packages.
10
+ const rows = (canRead ? state?.plugins ?? [] : []).map(plugin => {
11
+ const name = humanizeAgentPluginId({ pluginId: plugin.pluginId }), busy = state?.busyIds.includes(plugin.pluginId) ?? false;
12
+ const expanded = state?.expandedIds.includes(plugin.pluginId) ?? false;
13
+ // Derived from the id alone, so handles survive sorting and switching tabs.
14
+ const handle = `agent-plugin-${encodeURIComponent(plugin.pluginId)}`;
15
+ const turnOff = () => controller?.requestDisable({ pluginId: plugin.pluginId, variant: mode === 'installed' ? 'disable' : 'remove' });
16
+ return {
17
+ id: plugin.pluginId, name, version: plugin.version, description: plugin.description,
18
+ glyph: glyphs[agentPluginGlyphKind({ plugin })], enabled: plugin.enabled, stateLabel: plugin.enabled ? 'Enabled' : 'Disabled',
19
+ busy, expanded, mode, canWrite, toggleLabel: `${plugin.enabled ? 'Disable' : 'Enable'} ${name}`,
20
+ actionLabel: `${plugin.enabled ? 'Turn off' : 'Enable'} ${name}`, actionText: plugin.enabled ? 'Turn off' : 'Enable',
21
+ skills: plugin.skills, keywords: plugin.keywords, servers: plugin.mcpServerIds,
22
+ hasSkills: plugin.skills.length > 0, hasKeywords: plugin.keywords.length > 0, hasServers: plugin.mcpServerIds.length > 0,
23
+ toggle(_required, _optional = {}) { if (!canWrite)
24
+ return; if (plugin.enabled)
25
+ turnOff();
26
+ else
27
+ void controller?.setEnabled({ pluginId: plugin.pluginId, enabled: true }); },
28
+ act(_required, _optional = {}) { if (!canWrite)
29
+ return; if (plugin.enabled)
30
+ turnOff();
31
+ else
32
+ void controller?.setEnabled({ pluginId: plugin.pluginId, enabled: true }); },
33
+ expand(_required, _optional = {}) { controller?.toggleExpanded({ pluginId: plugin.pluginId }); },
34
+ inspect(_required, _optional = {}) { controller?.inspect({ pluginId: plugin.pluginId }); },
35
+ expandAttrs: { 'aria-label': `${expanded ? 'Collapse' : 'Expand'} ${name}`, 'aria-expanded': expanded, 'data-agent-handle': `${handle}-expand` },
36
+ actionAttrs: { 'aria-label': `${plugin.enabled ? 'Turn off' : 'Enable'} ${name}`, 'data-agent-handle': `${handle}-activation` },
37
+ inspectAttrs: { 'data-agent-handle': `${handle}-inspect` },
38
+ uninstallAttrs: { 'aria-describedby': uninstallNoteId },
39
+ inspectLabel: `Inspect ${name} package files`, uninstallLabel: `Uninstall ${name} — unavailable`,
40
+ };
41
+ });
42
+ return { denied: !canRead, mode, rows, loading: !state || (!state.plugins && !state.error), error: state?.error, actionError: state?.actionError, empty: !!state && state.plugins !== null && rows.length === 0,
43
+ lede: mode === 'installed' ? m.installedLede : m.downloadedLede,
44
+ label: mode === 'installed' ? 'Installed Agent Plugins' : 'Downloaded Agent Plugins',
45
+ uninstallNotice: typeof props.params.uninstallNotice === 'string' ? props.params.uninstallNotice : m.uninstallUnavailable,
46
+ uninstallNoteId, specUrl: AGENT_PLUGINS_SPEC_URL,
47
+ reload(_required, _optional = {}) { void controller?.load({}); },
48
+ };
49
+ }
50
+ //# sourceMappingURL=AgentPluginPanel.hooks.js.map
@@ -0,0 +1,55 @@
1
+ import type { AgentPluginRowView } from './AgentPluginPanel.hooks.js';
2
+ export declare function useAgentPluginRow({ row }: {
3
+ row: AgentPluginRowView;
4
+ }, _optional?: {}): {
5
+ detailId: string;
6
+ expandAttrs: {
7
+ 'aria-controls': string;
8
+ 'aria-label': string;
9
+ 'aria-expanded': boolean;
10
+ 'data-agent-handle': string;
11
+ };
12
+ installed: boolean;
13
+ detailHidden: boolean;
14
+ id: string;
15
+ name: string;
16
+ version: string | null | undefined;
17
+ description: string | null | undefined;
18
+ glyph: string;
19
+ enabled: boolean;
20
+ stateLabel: string;
21
+ busy: boolean;
22
+ expanded: boolean;
23
+ mode: "installed" | "downloaded";
24
+ canWrite: boolean;
25
+ toggleLabel: string;
26
+ actionLabel: string;
27
+ actionText: string;
28
+ skills: readonly (Pick<import("@jini-ai/agent-plugins/lifecycle").InstalledAgentPluginSkill, "name"> & {
29
+ readonly summary: string;
30
+ })[];
31
+ keywords: readonly string[];
32
+ servers: readonly string[];
33
+ hasSkills: boolean;
34
+ hasKeywords: boolean;
35
+ hasServers: boolean;
36
+ toggle(_required: {
37
+ checked: boolean;
38
+ }, _optional?: {}): void;
39
+ act(_required: Record<string, never>, _optional?: {}): void;
40
+ expand(_required: Record<string, never>, _optional?: {}): void;
41
+ inspect(_required: Record<string, never>, _optional?: {}): void;
42
+ actionAttrs: {
43
+ 'aria-label': string;
44
+ 'data-agent-handle': string;
45
+ };
46
+ inspectAttrs: {
47
+ 'data-agent-handle': string;
48
+ };
49
+ uninstallAttrs: {
50
+ 'aria-describedby': string;
51
+ };
52
+ inspectLabel: string;
53
+ uninstallLabel: string;
54
+ };
55
+ //# sourceMappingURL=AgentPluginRow.hooks.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { useId } from 'react';
2
+ export function useAgentPluginRow({ row }, _optional = {}) {
3
+ const detailId = useId();
4
+ return { ...row, detailId, expandAttrs: { ...row.expandAttrs, 'aria-controls': detailId }, installed: row.mode === 'installed', detailHidden: !row.expanded };
5
+ }
6
+ //# sourceMappingURL=AgentPluginRow.hooks.js.map
@@ -0,0 +1,64 @@
1
+ import type { ModulePageProps } from '../../../react/bind-react.js';
2
+ import { createAgentPluginsController } from '../../controllers/agent-plugins.controller.js';
3
+ import type { AgentPluginsState } from '../../models.js';
4
+ export interface AgentPluginsPageScope {
5
+ readonly controller: ReturnType<typeof createAgentPluginsController> | null;
6
+ readonly snapshot: Readonly<AgentPluginsState> | null;
7
+ readonly permissions: readonly string[];
8
+ readonly uninstallNoteId: string;
9
+ }
10
+ export declare const AgentPluginsPageContext: import("react").Context<AgentPluginsPageScope | null>;
11
+ export declare function useAgentPluginsPageScope(_required: Record<string, never>, _optional?: {}): AgentPluginsPageScope;
12
+ export declare function useAgentPluginsPage(props: ModulePageProps, _optional?: {}): {
13
+ denied: boolean;
14
+ scope: {
15
+ controller: {
16
+ getSnapshot: () => Readonly<AgentPluginsState>;
17
+ subscribe: ({ listener }: {
18
+ listener: () => void;
19
+ }) => () => void;
20
+ load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
21
+ setEnabled: (input: import("../../models.js").AgentPluginActivationInput, _optional?: {}) => Promise<boolean>;
22
+ requestDisable(input: import("../../models.js").AgentPluginDisableRequest, _optional?: {}): void;
23
+ cancelDisable(_required: Record<string, never>, _optional?: {}): void;
24
+ confirmDisable(_required: Record<string, never>, _optional?: {}): Promise<boolean>;
25
+ toggleExpanded({ pluginId }: {
26
+ pluginId: string;
27
+ }, _optional?: {}): void;
28
+ inspect({ pluginId }: {
29
+ pluginId: string;
30
+ }, _optional?: {}): void;
31
+ closeInspector(_required: Record<string, never>, _optional?: {}): void;
32
+ dispose(_required?: Record<string, never>, _optional?: {}): void;
33
+ } | null;
34
+ snapshot: Readonly<AgentPluginsState> | null;
35
+ permissions: readonly string[];
36
+ uninstallNoteId: string;
37
+ };
38
+ activeId: string;
39
+ ActiveTab: import("react").LazyExoticComponent<import("react").ComponentType<import("../../../react/bind-react.js").TabViewProps>> | undefined;
40
+ params: Readonly<Record<string, unknown>>;
41
+ permissions: readonly string[];
42
+ items: {
43
+ id: string;
44
+ label: string;
45
+ content: null;
46
+ }[];
47
+ onValueChange({ value }: {
48
+ value: string;
49
+ }, _optional?: {}): void;
50
+ inspector: {
51
+ pluginId: string;
52
+ name: string;
53
+ } | null;
54
+ closeInspector(_required: Record<string, never>, _optional?: {}): void;
55
+ confirmation: {
56
+ title: string;
57
+ confirmLabel: string;
58
+ body: string;
59
+ } | null;
60
+ confirming: boolean;
61
+ confirm(_required: Record<string, never>, _optional?: {}): Promise<void>;
62
+ cancel(_required: Record<string, never>, _optional?: {}): void;
63
+ };
64
+ //# sourceMappingURL=AgentPluginsPage.hooks.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { createContext, useContext, useId, useState } from 'react';
2
+ import { useController } from '../../../react/use-controller.js';
3
+ import { createAgentPluginsController } from '../../controllers/agent-plugins.controller.js';
4
+ import { AGENT_PLUGINS_READ, agentPluginDisableCopy, humanizeAgentPluginId } from '../../rules.js';
5
+ import { useAgentPluginsPorts } from './AgentPluginsPorts.hooks.js';
6
+ import { AdminConfigError } from '../../../core/module/index.js';
7
+ export const AgentPluginsPageContext = createContext(null);
8
+ export function useAgentPluginsPageScope(_required, _optional = {}) {
9
+ const scope = useContext(AgentPluginsPageContext);
10
+ if (!scope)
11
+ throw new AdminConfigError({ issues: ['Agent plugins page scope unavailable'] });
12
+ return scope;
13
+ }
14
+ export function useAgentPluginsPage(props, _optional = {}) {
15
+ const { agentPluginsApi } = useAgentPluginsPorts({});
16
+ const permissions = props.description.visible ? props.description.grants : [], key = permissions.join('\0');
17
+ const { controller, snapshot } = useController({ create: () => createAgentPluginsController({ api: agentPluginsApi, permissions }), dependencies: [agentPluginsApi, key] }, { start: ({ controller }) => { void controller.load({}); } });
18
+ const [localTab, setLocalTab] = useState('installed'), uninstallNoteId = useId();
19
+ const visible = props.description.visible ? props.description.tabs.filter(t => t.visible) : [];
20
+ const active = visible.find(t => t.id.endsWith(`.${props.requestedTab ?? localTab}`)) ?? visible[0];
21
+ const activeId = active?.id.slice(active.id.lastIndexOf('.') + 1) ?? 'installed';
22
+ const pending = snapshot?.pendingDisable, confirming = !!pending && !!snapshot?.busyIds.includes(pending.pluginId);
23
+ const confirmation = pending ? agentPluginDisableCopy(pending) : null;
24
+ const inspected = snapshot?.plugins?.find(p => p.pluginId === snapshot.inspectedId);
25
+ return {
26
+ denied: !props.description.visible || !permissions.includes(AGENT_PLUGINS_READ),
27
+ scope: { controller, snapshot, permissions, uninstallNoteId },
28
+ activeId, ActiveTab: active ? props.tabs[activeId] : undefined, params: active?.params ?? {}, permissions,
29
+ items: visible.map(t => ({ id: t.id.slice(t.id.lastIndexOf('.') + 1), label: t.label, content: null })),
30
+ onValueChange({ value }, _optional = {}) { setLocalTab(value); props.onTabChange?.({ tab: value }); },
31
+ inspector: inspected ? { pluginId: inspected.pluginId, name: humanizeAgentPluginId({ pluginId: inspected.pluginId }) } : null,
32
+ closeInspector(_required, _optional = {}) { controller?.closeInspector({}); },
33
+ confirmation, confirming,
34
+ async confirm(_required, _optional = {}) { if (!await controller?.confirmDisable({}))
35
+ throw new Error('Activation was not updated'); },
36
+ cancel(_required, _optional = {}) { controller?.cancelDisable({}); },
37
+ };
38
+ }
39
+ //# sourceMappingURL=AgentPluginsPage.hooks.js.map
@@ -0,0 +1,7 @@
1
+ import type { AgentPluginsApiPort } from '../../ports.js';
2
+ export interface AgentPluginsPorts {
3
+ readonly agentPluginsApi: AgentPluginsApiPort;
4
+ }
5
+ export declare const AgentPluginsPortsContext: import("react").Context<AgentPluginsPorts | null>;
6
+ export declare function useAgentPluginsPorts(_required?: Record<string, never>, _optional?: {}): AgentPluginsPorts;
7
+ //# sourceMappingURL=AgentPluginsPorts.hooks.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { createContext, useContext } from 'react';
2
+ import { AdminConfigError } from '../../../core/module/index.js';
3
+ export const AgentPluginsPortsContext = createContext(null);
4
+ export function useAgentPluginsPorts(_required = {}, _optional = {}) {
5
+ const ports = useContext(AgentPluginsPortsContext);
6
+ if (!ports)
7
+ throw new AdminConfigError({ issues: ['React scope unavailable: agent-plugins'] });
8
+ return ports;
9
+ }
10
+ //# sourceMappingURL=AgentPluginsPorts.hooks.js.map
@@ -0,0 +1,6 @@
1
+ import type { TabViewProps } from '../../../react/bind-react.js';
2
+ export declare function useMarketplaceTab({ permissions }: TabViewProps, _optional?: {}): {
3
+ denied: boolean;
4
+ specUrl: string;
5
+ };
6
+ //# sourceMappingURL=MarketplaceTab.hooks.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { AGENT_PLUGINS_READ, AGENT_PLUGINS_SPEC_URL } from '../../rules.js';
2
+ export function useMarketplaceTab({ permissions = [] }, _optional = {}) { return { denied: !permissions.includes(AGENT_PLUGINS_READ), specUrl: AGENT_PLUGINS_SPEC_URL }; }
3
+ //# sourceMappingURL=MarketplaceTab.hooks.js.map
@@ -0,0 +1,245 @@
1
+ export { useAgentPluginsPorts } from './hooks/AgentPluginsPorts.hooks.js';
2
+ /** Host-owned bundled policy copy. All page/tab loaders remain lazy. */
3
+ export declare function agentPlugins(_required: Record<string, never>, { uninstallNotice }?: {
4
+ uninstallNotice?: string;
5
+ }): {
6
+ pages: {
7
+ agentPlugins: {
8
+ tabs: {
9
+ installed: {
10
+ params: {
11
+ uninstallNotice: string;
12
+ };
13
+ label: "Installed";
14
+ };
15
+ downloaded: {
16
+ params: {
17
+ uninstallNotice: string;
18
+ };
19
+ label: "Downloaded";
20
+ };
21
+ marketplace: {
22
+ readonly label: "Marketplace";
23
+ };
24
+ };
25
+ path: "/agent-plugins";
26
+ label: "Agent Plugins";
27
+ permissions: readonly ["admin.plugins.read"];
28
+ nav: {
29
+ readonly group: "operations";
30
+ readonly icon: "package";
31
+ };
32
+ };
33
+ };
34
+ id: "agent-plugins";
35
+ requires: {
36
+ readonly agentPluginsApi: import("../../core/module/token.js").AdminPortToken<import("../ports.js").AgentPluginsApiPort, "admin.agent-plugins.api">;
37
+ };
38
+ messages: {
39
+ readonly title: "Agent Plugins";
40
+ readonly installed: "Installed";
41
+ readonly downloaded: "Downloaded";
42
+ readonly marketplace: "Marketplace";
43
+ readonly description: "Portable packages installed for this workspace.";
44
+ readonly denied: "Permission denied";
45
+ readonly loading: "Loading Agent Plugins…";
46
+ readonly empty: "No Agent Plugins are installed in this workspace.";
47
+ readonly loadError: "Failed to load agent plugins";
48
+ readonly actionError: "Failed to update agent plugin";
49
+ readonly fileError: "Failed to load package files";
50
+ readonly filesLoading: "Loading package files…";
51
+ readonly filesEmpty: "No files to show for this plugin.";
52
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
53
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
54
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
55
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
56
+ readonly marketplaceTitle: "Nothing to browse yet";
57
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
58
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
59
+ };
60
+ } & {
61
+ react: {
62
+ module: {
63
+ pages: {
64
+ agentPlugins: {
65
+ tabs: {
66
+ installed: {
67
+ params: {
68
+ uninstallNotice: string;
69
+ };
70
+ label: "Installed";
71
+ };
72
+ downloaded: {
73
+ params: {
74
+ uninstallNotice: string;
75
+ };
76
+ label: "Downloaded";
77
+ };
78
+ marketplace: {
79
+ readonly label: "Marketplace";
80
+ };
81
+ };
82
+ path: "/agent-plugins";
83
+ label: "Agent Plugins";
84
+ permissions: readonly ["admin.plugins.read"];
85
+ nav: {
86
+ readonly group: "operations";
87
+ readonly icon: "package";
88
+ };
89
+ };
90
+ };
91
+ id: "agent-plugins";
92
+ requires: {
93
+ readonly agentPluginsApi: import("../../core/module/token.js").AdminPortToken<import("../ports.js").AgentPluginsApiPort, "admin.agent-plugins.api">;
94
+ };
95
+ messages: {
96
+ readonly title: "Agent Plugins";
97
+ readonly installed: "Installed";
98
+ readonly downloaded: "Downloaded";
99
+ readonly marketplace: "Marketplace";
100
+ readonly description: "Portable packages installed for this workspace.";
101
+ readonly denied: "Permission denied";
102
+ readonly loading: "Loading Agent Plugins…";
103
+ readonly empty: "No Agent Plugins are installed in this workspace.";
104
+ readonly loadError: "Failed to load agent plugins";
105
+ readonly actionError: "Failed to update agent plugin";
106
+ readonly fileError: "Failed to load package files";
107
+ readonly filesLoading: "Loading package files…";
108
+ readonly filesEmpty: "No files to show for this plugin.";
109
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
110
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
111
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
112
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
113
+ readonly marketplaceTitle: "Nothing to browse yet";
114
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
115
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
116
+ };
117
+ };
118
+ pages: {
119
+ agentPlugins: {
120
+ Page: import("react").LazyExoticComponent<import("react").ComponentType<import("../../react/bind-react.js").ModulePageProps>>;
121
+ tabs: {
122
+ installed: import("react").LazyExoticComponent<import("react").ComponentType<import("../../react/bind-react.js").TabViewProps>>;
123
+ downloaded: import("react").LazyExoticComponent<import("react").ComponentType<import("../../react/bind-react.js").TabViewProps>>;
124
+ marketplace: import("react").LazyExoticComponent<import("react").ComponentType<import("../../react/bind-react.js").TabViewProps>>;
125
+ };
126
+ };
127
+ };
128
+ Provider: ({ admin, children }: {
129
+ admin: import("../../core/module/types.js").AdminInstance;
130
+ children: import("react").ReactNode;
131
+ }, _optional?: Record<string, never>) => import("react").FunctionComponentElement<import("react").ProviderProps<import("../../core/module/types.js").ScopedPorts<{
132
+ pages: {
133
+ agentPlugins: {
134
+ tabs: {
135
+ installed: {
136
+ params: {
137
+ uninstallNotice: string;
138
+ };
139
+ label: "Installed";
140
+ };
141
+ downloaded: {
142
+ params: {
143
+ uninstallNotice: string;
144
+ };
145
+ label: "Downloaded";
146
+ };
147
+ marketplace: {
148
+ readonly label: "Marketplace";
149
+ };
150
+ };
151
+ path: "/agent-plugins";
152
+ label: "Agent Plugins";
153
+ permissions: readonly ["admin.plugins.read"];
154
+ nav: {
155
+ readonly group: "operations";
156
+ readonly icon: "package";
157
+ };
158
+ };
159
+ };
160
+ id: "agent-plugins";
161
+ requires: {
162
+ readonly agentPluginsApi: import("../../core/module/token.js").AdminPortToken<import("../ports.js").AgentPluginsApiPort, "admin.agent-plugins.api">;
163
+ };
164
+ messages: {
165
+ readonly title: "Agent Plugins";
166
+ readonly installed: "Installed";
167
+ readonly downloaded: "Downloaded";
168
+ readonly marketplace: "Marketplace";
169
+ readonly description: "Portable packages installed for this workspace.";
170
+ readonly denied: "Permission denied";
171
+ readonly loading: "Loading Agent Plugins…";
172
+ readonly empty: "No Agent Plugins are installed in this workspace.";
173
+ readonly loadError: "Failed to load agent plugins";
174
+ readonly actionError: "Failed to update agent plugin";
175
+ readonly fileError: "Failed to load package files";
176
+ readonly filesLoading: "Loading package files…";
177
+ readonly filesEmpty: "No files to show for this plugin.";
178
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
179
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
180
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
181
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
182
+ readonly marketplaceTitle: "Nothing to browse yet";
183
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
184
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
185
+ };
186
+ }> | null>>;
187
+ usePorts: (_required?: Record<string, never>, _optional?: Record<string, never>) => import("../../core/module/types.js").ScopedPorts<{
188
+ pages: {
189
+ agentPlugins: {
190
+ tabs: {
191
+ installed: {
192
+ params: {
193
+ uninstallNotice: string;
194
+ };
195
+ label: "Installed";
196
+ };
197
+ downloaded: {
198
+ params: {
199
+ uninstallNotice: string;
200
+ };
201
+ label: "Downloaded";
202
+ };
203
+ marketplace: {
204
+ readonly label: "Marketplace";
205
+ };
206
+ };
207
+ path: "/agent-plugins";
208
+ label: "Agent Plugins";
209
+ permissions: readonly ["admin.plugins.read"];
210
+ nav: {
211
+ readonly group: "operations";
212
+ readonly icon: "package";
213
+ };
214
+ };
215
+ };
216
+ id: "agent-plugins";
217
+ requires: {
218
+ readonly agentPluginsApi: import("../../core/module/token.js").AdminPortToken<import("../ports.js").AgentPluginsApiPort, "admin.agent-plugins.api">;
219
+ };
220
+ messages: {
221
+ readonly title: "Agent Plugins";
222
+ readonly installed: "Installed";
223
+ readonly downloaded: "Downloaded";
224
+ readonly marketplace: "Marketplace";
225
+ readonly description: "Portable packages installed for this workspace.";
226
+ readonly denied: "Permission denied";
227
+ readonly loading: "Loading Agent Plugins…";
228
+ readonly empty: "No Agent Plugins are installed in this workspace.";
229
+ readonly loadError: "Failed to load agent plugins";
230
+ readonly actionError: "Failed to update agent plugin";
231
+ readonly fileError: "Failed to load package files";
232
+ readonly filesLoading: "Loading package files…";
233
+ readonly filesEmpty: "No files to show for this plugin.";
234
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
235
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
236
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
237
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
238
+ readonly marketplaceTitle: "Nothing to browse yet";
239
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
240
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
241
+ };
242
+ }>;
243
+ };
244
+ };
245
+ //# sourceMappingURL=index.d.ts.map