@jini-ai/admin 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/CHANGELOG.md +58 -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 +43 -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 +79 -0
  168. package/dist/media/react/hooks/MediaCard.hooks.js +63 -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 +28 -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 +80 -0
  196. package/dist/media/rules.js +127 -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.d.ts +15 -3
  243. package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.d.ts +17 -3
  244. package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +3 -3
  245. package/dist/react/components/ConfirmDialog/ConfirmDialog.js +6 -6
  246. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +6 -2
  247. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +7 -8
  248. package/dist/react/components/RowMenu/RowMenu.d.ts +5 -1
  249. package/dist/react/components/RowMenu/RowMenu.hooks.d.ts +8 -2
  250. package/dist/react/components/RowMenu/RowMenu.hooks.js +4 -4
  251. package/dist/react/components/RowMenu/RowMenu.js +6 -6
  252. package/dist/react/components/Sidebar.d.ts +1 -1
  253. package/dist/react/components/Sidebar.js +103 -7
  254. package/dist/react/entities/EntityCell.d.ts +10 -0
  255. package/dist/react/entities/EntityCell.js +18 -0
  256. package/dist/react/entities/EntityDetail.d.ts +3 -0
  257. package/dist/react/entities/EntityDetail.js +21 -0
  258. package/dist/react/entities/EntityEdit.d.ts +13 -0
  259. package/dist/react/entities/EntityEdit.js +45 -0
  260. package/dist/react/entities/EntityField.d.ts +20 -0
  261. package/dist/react/entities/EntityField.js +31 -0
  262. package/dist/react/entities/EntityIndex.d.ts +3 -0
  263. package/dist/react/entities/EntityIndex.js +10 -0
  264. package/dist/react/entities/EntityList.d.ts +7 -0
  265. package/dist/react/entities/EntityList.js +52 -0
  266. package/dist/react/entities/contribution.d.ts +26 -0
  267. package/dist/react/entities/contribution.js +78 -0
  268. package/dist/react/entities/index.d.ts +10 -0
  269. package/dist/react/entities/index.js +7 -0
  270. package/dist/react/entities/rules.d.ts +179 -0
  271. package/dist/react/entities/rules.js +224 -0
  272. package/dist/react/entities/types.d.ts +45 -0
  273. package/dist/react/entities/types.js +5 -0
  274. package/dist/react/entities/use-entity-edit.d.ts +35 -0
  275. package/dist/react/entities/use-entity-edit.js +98 -0
  276. package/dist/react/entities/use-entity-read.d.ts +22 -0
  277. package/dist/react/entities/use-entity-read.js +27 -0
  278. package/dist/react/hooks/use-nav-sections.d.ts +12 -3
  279. package/dist/react/hooks/use-nav-sections.js +14 -14
  280. package/dist/react/hooks/use-sidebar-rail.d.ts +7 -1
  281. package/dist/react/hooks/use-sidebar-rail.js +11 -11
  282. package/dist/react/index.d.ts +3 -1
  283. package/dist/react/index.js +5 -2
  284. package/dist/react/kit/Kit.hooks.d.ts +13 -0
  285. package/dist/react/kit/Kit.hooks.js +10 -0
  286. package/dist/react/kit/Native.hooks.d.ts +38 -0
  287. package/dist/react/kit/Native.hooks.js +65 -0
  288. package/dist/react/kit/index.d.ts +12 -0
  289. package/dist/react/kit/index.js +21 -0
  290. package/dist/react/kit/native.d.ts +3 -0
  291. package/dist/react/kit/native.js +21 -0
  292. package/dist/react/kit/types.d.ts +40 -0
  293. package/dist/react/kit/types.js +2 -0
  294. package/dist/react/overlay.d.ts +36 -0
  295. package/dist/react/overlay.js +35 -0
  296. package/dist/react/overlays.d.ts +38 -0
  297. package/dist/react/overlays.js +46 -0
  298. package/dist/react/shell/AdminShell.d.ts +9 -0
  299. package/dist/react/shell/AdminShell.hooks.d.ts +15 -0
  300. package/dist/react/shell/AdminShell.hooks.js +27 -0
  301. package/dist/react/shell/AdminShell.js +46 -0
  302. package/dist/react/shell/index.d.ts +7 -0
  303. package/dist/react/shell/index.js +5 -0
  304. package/dist/react/shell/model.d.ts +25 -0
  305. package/dist/react/shell/model.js +29 -0
  306. package/dist/react/shell/theme-ports.d.ts +28 -0
  307. package/dist/react/shell/theme-ports.js +2 -0
  308. package/dist/react/shell/types.d.ts +99 -0
  309. package/dist/react/shell/types.js +2 -0
  310. package/dist/react/shell/use-admin-shell-session.d.ts +13 -0
  311. package/dist/react/shell/use-admin-shell-session.js +81 -0
  312. package/dist/react/shell/use-admin-theme.d.ts +16 -0
  313. package/dist/react/shell/use-admin-theme.js +57 -0
  314. package/dist/react/types.d.ts +6 -4
  315. package/dist/react/types.js +2 -2
  316. package/dist/react/use-controller.d.ts +16 -0
  317. package/dist/react/use-controller.js +18 -0
  318. package/dist/security/adapters/http.d.ts +16 -0
  319. package/dist/security/adapters/http.js +94 -0
  320. package/dist/security/adapters/memory.d.ts +15 -0
  321. package/dist/security/adapters/memory.js +60 -0
  322. package/dist/security/conformance/security-api.conformance.d.ts +10 -0
  323. package/dist/security/conformance/security-api.conformance.js +48 -0
  324. package/dist/security/controllers/access-tokens.controller.d.ts +44 -0
  325. package/dist/security/controllers/access-tokens.controller.js +112 -0
  326. package/dist/security/controllers/other-credentials.controller.d.ts +30 -0
  327. package/dist/security/controllers/other-credentials.controller.js +74 -0
  328. package/dist/security/controllers/root-key.controller.d.ts +35 -0
  329. package/dist/security/controllers/root-key.controller.js +90 -0
  330. package/dist/security/index.d.ts +9 -0
  331. package/dist/security/index.js +9 -0
  332. package/dist/security/messages.en.d.ts +12 -0
  333. package/dist/security/messages.en.js +2 -0
  334. package/dist/security/models.d.ts +112 -0
  335. package/dist/security/models.js +2 -0
  336. package/dist/security/ports.d.ts +58 -0
  337. package/dist/security/ports.js +5 -0
  338. package/dist/security/react/components/CredentialEditor.d.ts +3 -0
  339. package/dist/security/react/components/CredentialEditor.js +8 -0
  340. package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +94 -0
  341. package/dist/security/react/hooks/AccessTokensTab.hooks.js +36 -0
  342. package/dist/security/react/hooks/CredentialEditor.hooks.d.ts +49 -0
  343. package/dist/security/react/hooks/CredentialEditor.hooks.js +14 -0
  344. package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +29 -0
  345. package/dist/security/react/hooks/RootKeyTab.hooks.js +19 -0
  346. package/dist/security/react/hooks/SecurityPage.hooks.d.ts +17 -0
  347. package/dist/security/react/hooks/SecurityPage.hooks.js +12 -0
  348. package/dist/security/react/hooks/SecurityPorts.hooks.d.ts +9 -0
  349. package/dist/security/react/hooks/SecurityPorts.hooks.js +6 -0
  350. package/dist/security/react/index.d.ts +215 -0
  351. package/dist/security/react/index.js +10 -0
  352. package/dist/security/react/pages/SecurityPage.d.ts +4 -0
  353. package/dist/security/react/pages/SecurityPage.js +10 -0
  354. package/dist/security/react/tabs/AccessTokensTab.d.ts +4 -0
  355. package/dist/security/react/tabs/AccessTokensTab.js +10 -0
  356. package/dist/security/react/tabs/RootKeyTab.d.ts +4 -0
  357. package/dist/security/react/tabs/RootKeyTab.js +9 -0
  358. package/dist/security/rules.d.ts +57 -0
  359. package/dist/security/rules.js +63 -0
  360. package/dist/security/security.module.d.ts +45 -0
  361. package/dist/security/security.module.js +5 -0
  362. package/dist/source-control/adapters/http.d.ts +6 -0
  363. package/dist/source-control/adapters/http.js +13 -0
  364. package/dist/source-control/adapters/memory.d.ts +9 -0
  365. package/dist/source-control/adapters/memory.js +35 -0
  366. package/dist/source-control/conformance/source-control-api.conformance.d.ts +10 -0
  367. package/dist/source-control/conformance/source-control-api.conformance.js +48 -0
  368. package/dist/source-control/controllers/source-control.controller.d.ts +26 -0
  369. package/dist/source-control/controllers/source-control.controller.js +70 -0
  370. package/dist/source-control/index.d.ts +8 -0
  371. package/dist/source-control/index.js +6 -0
  372. package/dist/source-control/messages.en.d.ts +11 -0
  373. package/dist/source-control/messages.en.js +2 -0
  374. package/dist/source-control/models.d.ts +70 -0
  375. package/dist/source-control/models.js +2 -0
  376. package/dist/source-control/ports.d.ts +23 -0
  377. package/dist/source-control/ports.js +3 -0
  378. package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +5 -0
  379. package/dist/source-control/react/components/SourceControlCredentialFields.js +8 -0
  380. package/dist/source-control/react/components/SourceControlProviderRow.d.ts +5 -0
  381. package/dist/source-control/react/components/SourceControlProviderRow.js +7 -0
  382. package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +45 -0
  383. package/dist/source-control/react/hooks/ProvidersTab.hooks.js +20 -0
  384. package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.d.ts +43 -0
  385. package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.js +9 -0
  386. package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +17 -0
  387. package/dist/source-control/react/hooks/SourceControlPage.hooks.js +5 -0
  388. package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +9 -0
  389. package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +6 -0
  390. package/dist/source-control/react/index.d.ts +156 -0
  391. package/dist/source-control/react/index.js +10 -0
  392. package/dist/source-control/react/pages/SourceControlPage.d.ts +4 -0
  393. package/dist/source-control/react/pages/SourceControlPage.js +11 -0
  394. package/dist/source-control/react/tabs/ProvidersTab.d.ts +4 -0
  395. package/dist/source-control/react/tabs/ProvidersTab.js +10 -0
  396. package/dist/source-control/rules.d.ts +32 -0
  397. package/dist/source-control/rules.js +35 -0
  398. package/dist/source-control/source-control.module.d.ts +36 -0
  399. package/dist/source-control/source-control.module.js +6 -0
  400. package/package.json +207 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0 — 2026-10-02
4
+
5
+ ### BREAKING
6
+
7
+ - Shell copy is host-neutral and public APIs use object argument contracts; theme/process handoffs are archived.
8
+ - Distribution includes runtime output, release documentation and required assets only. Process records and per-job neutrality checks are no longer part of the package surface.
9
+
10
+ ## Unreleased
11
+
12
+ - Fix strict compilation of entity tables and integration/session test fixtures
13
+ with explicit row, deferred-promise and tuple types. Runtime behavior and test
14
+ assertions are unchanged.
15
+
16
+ - Replace the removed connector integration import guidance with host-owned connector ports. Keep the allowed React agentic helpers in their original package.
17
+
18
+ - Adopt shared kernel contracts and preserve the module rationale in neutral documentation.
19
+
20
+
21
+ - Complete object-argument calls in Sidebar, RowMenu and ConfirmDialog, preserving
22
+ preferences, routing, tone precedence, selection and agent handle behavior.
23
+ - Merge every per-request `HeadersInit` form through `Headers`, with case-insensitive
24
+ overrides and no input mutation. Clarify host-owned route factories, restore
25
+ ceremony inputs and the need for a host restore capability before offering media undo.
26
+ - Add caller and header regression tests; execution is deferred by owner directive.
27
+
28
+ - Restore the HTTP transport's 60-second deadline with a `timeoutMs` override and
29
+ caller-signal precedence. Restore typed network/timeout and unparseable-5xx
30
+ failures with neutral API messages; inject page-unload detection through the host.
31
+ - Expose success response headers through `request`'s optional `onOk({ response })`
32
+ observer, preserving JSON return values for ETag / If-Match route adapters.
33
+ - Honor `defaultPanelId` in dashboard navigation and agent-page maps while keeping
34
+ the conventional dashboard-root default. Clear local authentication after failed
35
+ logout so a session-error retry cannot restore the old principal.
36
+ - Add regression tests for these audit fixes; execution is deferred by owner directive.
37
+
38
+ - Add a manifest-driven AdminShell with injected session/navigation ports, host API
39
+ and workspace scope, feature contributions and persistent assistant-pane slots.
40
+ - Add a query-preserving shell navigation adapter and generalized shell regression
41
+ tests. Barrel/subpath wiring and verification remain coordinator follow-ups.
42
+
43
+ ### Admin extraction integration
44
+
45
+ - Wire `./react/shell`, `./react/entities`, and `./browser/shell-navigation` with
46
+ browser runtime metadata, and expose their APIs through the existing barrels.
47
+ Export the framework-free shell contracts from the core and ports barrels.
48
+ - Add generic entity index, list, detail and create/edit screens over the entity
49
+ port, with injected translation/navigation and AdminShell route contributions.
50
+ - BREAKING: Admin helpers, error constructors, client/transport factories, browser
51
+ navigation and converted service-port methods now take required and optional
52
+ argument objects. Fetch, browser and preference persistence dependencies are
53
+ injected ports. Pass `{}` for input-free and optional-only service-port methods,
54
+ and update custom route factories and injected component hooks.
55
+ - Integration verification is pending. The active Sidebar/RowMenu and entity/menu
56
+ port owners must finish their remaining convention changes before release.
57
+ - BREAKING: Embed marker helpers take `{ el }`; the React editor adapts these
58
+ object APIs to the upstream editor callback contracts without changing markers.
package/README.md CHANGED
@@ -17,8 +17,10 @@ not in your bundle.
17
17
  |---|---|---|
18
18
  | `@jini-ai/admin/core` | contracts, panel registry, route matching, transport, ports | nothing |
19
19
  | `@jini-ai/admin/browser` | `window`-bound navigation, link interception | a DOM |
20
- | `@jini-ai/admin/server` | Composio integration: catalog, OAuth, tool execution | Node.js |
21
- | `@jini-ai/admin/react` | Presentational primitives (`Sidebar`, `DataTable`, `RowMenu`, `ConfirmButton`, `ConfirmDialog`, `InteractiveHtmlEditor`) and hooks; `<AdminShell>` and panels are not built yet | React (optional peer) |
20
+ | `@jini-ai/admin/react` | Primitives, hooks, shell and entity screens | React and React DOM (optional peers) |
21
+ | `@jini-ai/admin/react/shell` | Session gate, panel rendering and persistent assistant slot | React and injected session/navigation |
22
+ | `@jini-ai/admin/react/entities` | Schema-driven index, list, detail and create/edit screens | React and injected registry/translation/navigation |
23
+ | `@jini-ai/admin/browser/shell-navigation` | Query-preserving History API adapter for the shell | Injected browser window/document/location |
22
24
 
23
25
  `/core` is the layer a panel author codes against: no React, no DOM, no I/O. That boundary is
24
26
  enforced at runtime — this package's vitest config runs `src/core/**` without a jsdom environment,
@@ -60,10 +62,10 @@ Three properties carry decisions worth not re-deriving:
60
62
  ```ts
61
63
  import { resolvePanels, buildNav, buildAgentPageMap, matchRoute } from '@jini-ai/admin/core';
62
64
 
63
- const mounted = resolvePanels(ALL_PANELS, { capabilities: wiredPorts, permissions: me.permissions });
64
- const nav = buildNav(mounted);
65
- const agentPages = buildAgentPageMap(mounted); // pass the RESOLVED set, never the raw one
66
- const route = matchRoute('/users/u1', mounted);
65
+ const mounted = resolvePanels({ panels: ALL_PANELS }, { capabilities: wiredPorts, permissions: me.permissions });
66
+ const nav = buildNav({ panels: mounted });
67
+ const agentPages = buildAgentPageMap({ panels: mounted }); // pass the RESOLVED set, never the raw one
68
+ const route = matchRoute({ routePath: '/users/u1', panels: mounted });
67
69
  // -> { panelId: 'users', view: 'user-detail', params: { userId: 'u1' }, query }
68
70
  ```
69
71
 
@@ -71,31 +73,28 @@ Route matching is registry-driven: a panel declares its own detail routes and th
71
73
  generic. Unregistered paths return `panelId: null` so the shell can fall through to the dashboard,
72
74
  matching the ported behaviour — a typo should look like a bad URL, not an empty screen.
73
75
 
74
- ## Adding your own routes alongside the shipped ones
76
+ ## Adding host routes
75
77
 
76
- Every route group is `(transport) => port`. Jini's and yours are the same shape, so they compose
77
- into one client with one auth policy, one error class, and one place to add retries or tracing:
78
+ Route groups are host-owned factories taking `({ transport })`. The package ships
79
+ contracts and an HTTP transport; it does not ship identity or media route factories.
78
80
 
79
81
  ```ts
80
82
  import { createAdminClient, createHttpTransport } from '@jini-ai/admin/core';
81
83
 
82
- const transport = createHttpTransport({ baseUrl: '/api/admin/v1' });
83
-
84
- const client = createAdminClient(transport, {
85
- identity: createIdentityRoutes, // shipped by @jini-ai/admin
86
- media: createMediaRoutes, // shipped by @jini-ai/admin
87
- posts: createHostPostRoutes, // yours, same signature
88
- widgets: createHostWidgetRoutes, // yours
84
+ const transport = createHttpTransport({
85
+ baseUrl: '/api/admin/v1',
86
+ fetch: ({ url }, init) => fetch(url, init),
89
87
  });
90
-
91
- await client.identity.listUsers();
92
- await client.posts.list();
93
- await client.transport.request('/one-off'); // escape hatch for un-wrapped routes
88
+ const createStatusRoutes = ({ transport }) => ({
89
+ read: ({}) => transport.request({ path: '/status' }),
90
+ });
91
+ const client = createAdminClient({ transport, groups: { status: createStatusRoutes } });
92
+ await client.status.read({});
93
+ await client.transport.request({ path: '/one-off' });
94
94
  ```
95
95
 
96
- `AdminTransport` is an interface rather than a bare function so a host can supply a non-HTTP
97
- implementation — an in-process direct dispatch for a multi-instance runner, or a fixture-returning
98
- fake in tests — without any route group knowing.
96
+ `AdminTransport` also supports non-HTTP adapters. Hosts bind authentication,
97
+ workspace scope and error handling at that boundary.
99
98
 
100
99
  ## Errors
101
100
 
@@ -111,14 +110,13 @@ the server. A bug here can only show or hide a control; it cannot grant or block
111
110
  operation, because every mutation must be independently re-checked server-side. Do not import
112
111
  these into server code.
113
112
 
114
- ## Composio integration has moved
113
+ ## Connector integrations
115
114
 
116
- `@jini-ai/admin/server` no longer exists. Composio started as its own standalone package
117
- (`@jini-ai/composio`), was folded into this package as `./server` on 2026-08-01, and has since
118
- moved back out — now `@jini-ai/integrations/composio`, one of two subpaths (alongside
119
- `@jini-ai/integrations/media-providers`) under the single `@jini-ai/integrations` package
120
- (`packages/integrations/`). See that package's own `README.md` and `src/composio/source-map.md`
121
- for full provenance. Import it directly rather than through `@jini-ai/admin`.
115
+ `@jini-ai/admin/server` no longer exists. The former embedded connector backend
116
+ was extracted and subsequently removed by the owner. Hosts supply connector data
117
+ and authorization through the UI ports; there is no built-in connector vendor
118
+ adapter to import. See `@jini-ai/integrations` for the supported webhook and
119
+ media-provider capabilities.
122
120
 
123
121
  ## Before writing a panel: check `@jini-ai/ui-core` first
124
122
 
@@ -131,11 +129,47 @@ Panels that reuse `ui-core` take the dependency in `/react/panels/*`. **`/core`
131
129
  zero-dependency** — otherwise every consumer of the contracts layer pulls in 6,000+ lines of
132
130
  unrelated domain features to get a type.
133
131
 
134
- ## Status
132
+ ## API arguments and integration status
133
+
134
+ Public helpers and factories take a required argument object and an optional
135
+ options object. Pass `{}` before optional-only arguments. React props and native
136
+ framework callbacks retain their framework contracts.
137
+
138
+ ```ts
139
+ hasPermission({ permissions, permission: 'records.read' });
140
+ adminHref({ routePath: '/records' }, { base: '/console' });
141
+ new AdminApiError({ message: 'Unavailable', status: 503 }, { code: 'unavailable' });
142
+ createAdminShellNavigation({ location: window.location, window, document });
143
+ ```
144
+
145
+ The shell requires `apiBase`, `workspace`, `adminBase`, `defaultPanelId`,
146
+ `railStorageKey`, title, labels, session/navigation ports, panels and slots. A host
147
+ supplies every product value. Its session port exposes `read(context)`,
148
+ `logout(context)` and `onUnauthenticated({ ...context, onUnauthenticated })`.
149
+
150
+ Entity screens consume the existing entity port through `EntityRegistryPort` and
151
+ require translation and navigation ports. `createEntityPanel({ adminBase,
152
+ panelId, navigate, registry, translate }, options)` returns an `AdminShellPanel`.
153
+ It contributes list, create, detail and edit routes; agent reachability is opt-in.
154
+ Its translation port takes `{ key }`, and `navigate` takes `{ routePath }`.
155
+
156
+ The HTML editor's direct marker helpers take `{ el }`; its React component adapts
157
+ those calls to the upstream editor callbacks. Marker bytes and labels are unchanged.
158
+
159
+ The export map and barrels include all these slices. The package typecheck includes
160
+ test sources and passes after the upstream agentic and UI declarations are rebuilt.
161
+ Runtime tests and packing remain deferred under the owner's execution directive. Active owners
162
+ must still update Sidebar/RowMenu callers and the entity/menu port APIs before the
163
+ package can be released. The integration handoff records the remaining changes.
164
+
165
+ ## Kernel contracts
166
+
167
+ Admin editor and menu contracts document host integration without repository-specific paths.
168
+ `RedirectMatchType` retains `regex` because callers can submit that rejected request shape;
169
+ its presence does not imply matcher support. Hosts must verify support before offering it.
170
+
171
+ ## Agent-addressable React controls
135
172
 
136
- Slice 1: `/core` (75 tests) and `/browser` (no test files). `/server` (Composio, folded in
137
- 2026-08-01, moved back out to `@jini-ai/integrations/composio`) no longer exists in this package.
138
- `/react` has real content — presentational primitives and hooks (147 tests) — but no `<AdminShell>`
139
- or panels yet. `src/core/ports/` now specifies 16 ports (`identity`, `menus`, `integrations`,
140
- `workspace`, `redirects`, `analytics`, `settings`, `forms`, `seo`, `database`, `members`,
141
- `recovery`, `auth`, `media`, `plugins`, `comments`), not just `AdminIdentityPort`.
173
+ React controls keep importing `agentHandle` and `buildAgentListHandles` from
174
+ `@jini-ai/agentic`; this is an allowed UI-to-agentic layer dependency. The helpers
175
+ have not moved and consumers continue to use their original exports.
@@ -0,0 +1,7 @@
1
+ import type { AgentPluginsApiPort, AgentPluginsTransportPort } from '../ports.js';
2
+ /** Existing workspace routes. Auth, JSON serialization and response decoding belong to transport. */
3
+ export declare function createHttpAgentPluginsApi({ transport, workspacePath }: {
4
+ transport: AgentPluginsTransportPort;
5
+ workspacePath: string;
6
+ }, _optional?: {}): AgentPluginsApiPort;
7
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { agentPluginSummary, agentPluginFilesSnapshot } from '../rules.js';
2
+ /** Existing workspace routes. Auth, JSON serialization and response decoding belong to transport. */
3
+ export function createHttpAgentPluginsApi({ transport, workspacePath }, _optional = {}) {
4
+ const base = `${workspacePath.replace(/\/$/, '')}/agent-plugins`;
5
+ function request(suffix, method, options, body) {
6
+ options.signal?.throwIfAborted();
7
+ return transport.request({ path: `${base}${suffix}`, method, ...(body === undefined ? {} : { body }) }, options);
8
+ }
9
+ return {
10
+ async list(_required, options = {}) { const r = await request('', 'GET', options); return Object.freeze(r.agentPlugins.map(row => agentPluginSummary({ row }))); },
11
+ async setEnabled({ pluginId, enabled }, options = {}) { const r = await request(`/${encodeURIComponent(pluginId)}`, 'PATCH', options, { enabled }); return agentPluginSummary({ row: r.agentPlugin }); },
12
+ async files({ pluginId }, options = {}) { const r = await request(`/${encodeURIComponent(pluginId)}/files`, 'GET', options); return agentPluginFilesSnapshot({ listing: r }); },
13
+ };
14
+ }
15
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1,8 @@
1
+ import type { AgentPluginsApiPort } from '../ports.js';
2
+ import type { AgentPluginSummary, AgentPluginFiles } from '../models.js';
3
+ /** Presentation backend only. No lifecycle install, trust, activation-file or MCP rules copied. */
4
+ export declare function createMemoryAgentPluginsApi({ plugins, files }: {
5
+ plugins?: readonly AgentPluginSummary[];
6
+ files?: Readonly<Record<string, AgentPluginFiles>>;
7
+ }, _optional?: {}): AgentPluginsApiPort;
8
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { agentPluginSummary, agentPluginFilesSnapshot } from '../rules.js';
2
+ /** Presentation backend only. No lifecycle install, trust, activation-file or MCP rules copied. */
3
+ export function createMemoryAgentPluginsApi({ plugins = [], files = {} }, _optional = {}) {
4
+ const rows = new Map(plugins.map(row => [row.pluginId, agentPluginSummary({ row })]));
5
+ const listings = new Map(Object.entries(files).map(([id, listing]) => [id, agentPluginFilesSnapshot({ listing })]));
6
+ function notFound() { throw Object.assign(new Error('Agent plugin not found'), { code: 'AGENT_PLUGIN_NOT_FOUND' }); }
7
+ return {
8
+ async list(_required, options = {}) { options.signal?.throwIfAborted(); return Object.freeze([...rows.values()]); },
9
+ async setEnabled({ pluginId, enabled }, options = {}) {
10
+ options.signal?.throwIfAborted();
11
+ if (typeof enabled !== 'boolean')
12
+ throw Object.assign(new Error('Invalid activation'), { code: 'VALIDATION_ERROR' });
13
+ const row = rows.get(pluginId);
14
+ if (!row)
15
+ return notFound();
16
+ const updated = agentPluginSummary({ row: { ...row, enabled } });
17
+ rows.set(pluginId, updated);
18
+ return updated;
19
+ },
20
+ async files({ pluginId }, options = {}) { options.signal?.throwIfAborted(); if (!rows.has(pluginId))
21
+ return notFound(); const listing = listings.get(pluginId); if (!listing)
22
+ return agentPluginFilesSnapshot({ listing: { pluginId, files: [], truncated: false, limits: { maxFiles: 200, maxEntries: 2000, maxFileBytes: 524288, maxTotalBytes: 4194304 } } }); return listing; },
23
+ };
24
+ }
25
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1,51 @@
1
+ export declare const agentPluginsModule: {
2
+ readonly id: "agent-plugins";
3
+ readonly requires: {
4
+ readonly agentPluginsApi: import("../core/module/token.js").AdminPortToken<import("./ports.js").AgentPluginsApiPort, "admin.agent-plugins.api">;
5
+ };
6
+ readonly messages: {
7
+ readonly title: "Agent Plugins";
8
+ readonly installed: "Installed";
9
+ readonly downloaded: "Downloaded";
10
+ readonly marketplace: "Marketplace";
11
+ readonly description: "Portable packages installed for this workspace.";
12
+ readonly denied: "Permission denied";
13
+ readonly loading: "Loading Agent Plugins…";
14
+ readonly empty: "No Agent Plugins are installed in this workspace.";
15
+ readonly loadError: "Failed to load agent plugins";
16
+ readonly actionError: "Failed to update agent plugin";
17
+ readonly fileError: "Failed to load package files";
18
+ readonly filesLoading: "Loading package files…";
19
+ readonly filesEmpty: "No files to show for this plugin.";
20
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
21
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
22
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
23
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
24
+ readonly marketplaceTitle: "Nothing to browse yet";
25
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
26
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
27
+ };
28
+ readonly pages: {
29
+ readonly agentPlugins: {
30
+ readonly path: "/agent-plugins";
31
+ readonly label: "Agent Plugins";
32
+ readonly permissions: readonly ["admin.plugins.read"];
33
+ readonly nav: {
34
+ readonly group: "operations";
35
+ readonly icon: "package";
36
+ };
37
+ readonly tabs: {
38
+ readonly installed: {
39
+ readonly label: "Installed";
40
+ };
41
+ readonly downloaded: {
42
+ readonly label: "Downloaded";
43
+ };
44
+ readonly marketplace: {
45
+ readonly label: "Marketplace";
46
+ };
47
+ };
48
+ };
49
+ };
50
+ };
51
+ //# sourceMappingURL=agent-plugins.module.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { defineAdminModule } from '../core/module/index.js';
2
+ import { agentPluginsApiToken } from './ports.js';
3
+ import { agentPluginsMessagesEn as m } from './messages.en.js';
4
+ import { AGENT_PLUGINS_READ } from './rules.js';
5
+ export const agentPluginsModule = defineAdminModule({ id: 'agent-plugins', requires: { agentPluginsApi: agentPluginsApiToken }, messages: m, pages: { agentPlugins: { path: '/agent-plugins', label: m.title, permissions: [AGENT_PLUGINS_READ], nav: { group: 'operations', icon: 'package' }, tabs: { installed: { label: m.installed }, downloaded: { label: m.downloaded }, marketplace: { label: m.marketplace } } } } });
6
+ //# sourceMappingURL=agent-plugins.module.js.map
@@ -0,0 +1,12 @@
1
+ import type { AgentPluginsApiPort } from '../ports.js';
2
+ export interface AgentPluginsConformanceResult {
3
+ readonly name: string;
4
+ readonly passed: boolean;
5
+ }
6
+ /** Run in an isolated workspace fixture with two installed ids and readable files for pluginId. */
7
+ export declare function runAgentPluginsApiConformance({ create, pluginId, otherPluginId }: {
8
+ create: (required: Record<string, never>, optional?: Record<string, never>) => AgentPluginsApiPort | Promise<AgentPluginsApiPort>;
9
+ pluginId: string;
10
+ otherPluginId: string;
11
+ }, _optional?: {}): Promise<readonly AgentPluginsConformanceResult[]>;
12
+ //# sourceMappingURL=agent-plugins-api.conformance.d.ts.map
@@ -0,0 +1,47 @@
1
+ /** Run in an isolated workspace fixture with two installed ids and readable files for pluginId. */
2
+ export async function runAgentPluginsApiConformance({ create, pluginId, otherPluginId }, _optional = {}) {
3
+ const api = await create({}), results = [];
4
+ const check = (condition) => { if (!condition)
5
+ throw new Error('Contract violation'); };
6
+ async function test(name, run) { try {
7
+ await run();
8
+ results.push({ name, passed: true });
9
+ }
10
+ catch {
11
+ results.push({ name, passed: false });
12
+ } }
13
+ const initial = await api.list({}), first = initial.find(p => p.pluginId === pluginId), other = initial.find(p => p.pluginId === otherPluginId);
14
+ if (!first || !other || pluginId === otherPluginId)
15
+ throw new Error('Conformance needs two distinct installed plugin ids');
16
+ const expectRejection = async (run) => { let rejected = false; try {
17
+ await run();
18
+ }
19
+ catch {
20
+ rejected = true;
21
+ } check(rejected); };
22
+ try {
23
+ await test('lists installed packages independent of activation', () => { check(initial.length >= 2 && new Set(initial.map(p => p.pluginId)).size === initial.length); });
24
+ await test('list snapshots are immutable', () => { check(Object.isFrozen(initial) && Object.isFrozen(first) && Object.isFrozen(first.skills) && Object.isFrozen(first.keywords) && Object.isFrozen(first.mcpServerIds)); });
25
+ await test('activation replies with the single updated row', async () => { const row = await api.setEnabled({ pluginId, enabled: !first.enabled }); check(row.pluginId === pluginId && row.enabled === !first.enabled && row.description === first.description); });
26
+ await test('accepted activation is visible on reload', async () => { check((await api.list({})).find(p => p.pluginId === pluginId)?.enabled === !first.enabled); });
27
+ await test('old snapshot retains its original enabled value', () => { check(initial.find(p => p.pluginId === pluginId)?.enabled === first.enabled); });
28
+ await test('unrelated row is unchanged', async () => { check(JSON.stringify((await api.list({})).find(p => p.pluginId === otherPluginId)) === JSON.stringify(other)); });
29
+ await test('repeated assignment is idempotent', async () => { check((await api.setEnabled({ pluginId, enabled: !first.enabled })).enabled === !first.enabled); });
30
+ await test('disabled package remains inspectable', async () => { await api.setEnabled({ pluginId, enabled: false }); const listing = await api.files({ pluginId }); check(listing.pluginId === pluginId && listing.files.length > 0); });
31
+ await test('file metadata includes omission and bounds', async () => { const listing = await api.files({ pluginId }); check(typeof listing.truncated === 'boolean' && listing.limits.maxFiles > 0 && listing.files.every(f => typeof f.relativePath === 'string' && f.sizeBytes >= 0 && (f.content === null || typeof f.content === 'string'))); });
32
+ await test('file snapshots are immutable', async () => { const listing = await api.files({ pluginId }); check(Object.isFrozen(listing) && Object.isFrozen(listing.files) && Object.isFrozen(listing.limits) && listing.files.every(f => Object.isFrozen(f))); });
33
+ await test('missing activation rejects', async () => { await expectRejection(() => api.setEnabled({ pluginId: '__missing__', enabled: true })); });
34
+ await test('missing inspector rejects', async () => { await expectRejection(() => api.files({ pluginId: '__missing__' })); });
35
+ await test('nonboolean activation rejects without mutation', async () => { const before = (await api.list({})).find(p => p.pluginId === pluginId)?.enabled; await expectRejection(() => api.setEnabled({ pluginId, enabled: 'false' })); check((await api.list({})).find(p => p.pluginId === pluginId)?.enabled === before); });
36
+ const abort = new AbortController();
37
+ abort.abort();
38
+ await test('aborted list rejects', async () => { await expectRejection(() => api.list({}, { signal: abort.signal })); });
39
+ await test('aborted files reject', async () => { await expectRejection(() => api.files({ pluginId }, { signal: abort.signal })); });
40
+ await test('aborted write leaves activation intact', async () => { const before = (await api.list({})).find(p => p.pluginId === pluginId)?.enabled; await expectRejection(() => api.setEnabled({ pluginId, enabled: !before }, { signal: abort.signal })); check((await api.list({})).find(p => p.pluginId === pluginId)?.enabled === before); });
41
+ }
42
+ finally {
43
+ await api.setEnabled({ pluginId, enabled: first.enabled });
44
+ }
45
+ return Object.freeze(results.map(r => Object.freeze(r)));
46
+ }
47
+ //# sourceMappingURL=agent-plugins-api.conformance.js.map
@@ -0,0 +1,20 @@
1
+ import type { AgentPluginsApiPort } from '../ports.js';
2
+ import type { AgentPluginFilesState } from '../models.js';
3
+ export declare function createAgentPluginFilesController({ api, permissions }: {
4
+ api: AgentPluginsApiPort;
5
+ permissions?: readonly string[];
6
+ }, _optional?: {}): {
7
+ getSnapshot: () => Readonly<AgentPluginFilesState>;
8
+ subscribe: ({ listener }: {
9
+ listener: () => void;
10
+ }) => () => void;
11
+ open({ pluginId }: {
12
+ pluginId: string;
13
+ }, _optional?: {}): Promise<void>;
14
+ select({ path }: {
15
+ path: string;
16
+ }, _optional?: {}): void;
17
+ close(_required: Record<string, never>, _optional?: {}): void;
18
+ dispose(_required?: Record<string, never>, _optional?: {}): void;
19
+ };
20
+ //# sourceMappingURL=agent-plugin-files.controller.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { createControllerStore } from '../../core/module/controller-store.js';
2
+ import { agentPluginFilesSnapshot, selectAgentPluginFile, AGENT_PLUGINS_READ } from '../rules.js';
3
+ import { agentPluginsMessagesEn as m } from '../messages.en.js';
4
+ export function createAgentPluginFilesController({ api, permissions = [] }, _optional = {}) {
5
+ const store = createControllerStore({ initial: { pluginId: null, listing: null, loading: false, error: null, selectedPath: '' } });
6
+ let generation = 0, pending = null;
7
+ function cancel() { generation++; pending?.abort(); pending = null; }
8
+ return {
9
+ getSnapshot: store.getSnapshot, subscribe: store.subscribe,
10
+ async open({ pluginId }, _optional = {}) {
11
+ if (store.signal.aborted || !permissions.includes(AGENT_PLUGINS_READ))
12
+ return;
13
+ cancel();
14
+ const ticket = generation, abort = new AbortController();
15
+ pending = abort;
16
+ store.set({ patch: { pluginId, listing: null, loading: true, error: null, selectedPath: '' } });
17
+ try {
18
+ const result = await api.files({ pluginId }, { signal: abort.signal });
19
+ if (ticket !== generation || store.signal.aborted)
20
+ return;
21
+ if (result.pluginId !== pluginId)
22
+ throw new Error('Invalid files response');
23
+ const listing = agentPluginFilesSnapshot({ listing: result });
24
+ store.set({ patch: { listing, selectedPath: selectAgentPluginFile({ files: listing.files, path: '' })?.relativePath ?? '' } });
25
+ }
26
+ catch {
27
+ if (ticket === generation)
28
+ store.set({ patch: { error: m.fileError } });
29
+ }
30
+ finally {
31
+ if (ticket === generation) {
32
+ pending = null;
33
+ store.set({ patch: { loading: false } });
34
+ }
35
+ }
36
+ },
37
+ select({ path }, _optional = {}) { if (store.signal.aborted)
38
+ return; store.set({ patch: { selectedPath: selectAgentPluginFile({ files: store.getSnapshot().listing?.files ?? [], path })?.relativePath ?? '' } }); },
39
+ close(_required, _optional = {}) { cancel(); store.set({ patch: { pluginId: null, listing: null, loading: false, error: null, selectedPath: '' } }); },
40
+ dispose(_required = {}, _optional = {}) { cancel(); store.set({ patch: { pluginId: null, listing: null, selectedPath: '' } }); store.dispose(); },
41
+ };
42
+ }
43
+ //# sourceMappingURL=agent-plugin-files.controller.js.map
@@ -0,0 +1,25 @@
1
+ import type { AgentPluginsApiPort } from '../ports.js';
2
+ import type { AgentPluginsState, AgentPluginActivationInput, AgentPluginDisableRequest } from '../models.js';
3
+ export declare function createAgentPluginsController({ api, permissions }: {
4
+ api: AgentPluginsApiPort;
5
+ permissions?: readonly string[];
6
+ }, _optional?: {}): {
7
+ getSnapshot: () => Readonly<AgentPluginsState>;
8
+ subscribe: ({ listener }: {
9
+ listener: () => void;
10
+ }) => () => void;
11
+ load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
12
+ setEnabled: (input: AgentPluginActivationInput, _optional?: {}) => Promise<boolean>;
13
+ requestDisable(input: AgentPluginDisableRequest, _optional?: {}): void;
14
+ cancelDisable(_required: Record<string, never>, _optional?: {}): void;
15
+ confirmDisable(_required: Record<string, never>, _optional?: {}): Promise<boolean>;
16
+ toggleExpanded({ pluginId }: {
17
+ pluginId: string;
18
+ }, _optional?: {}): void;
19
+ inspect({ pluginId }: {
20
+ pluginId: string;
21
+ }, _optional?: {}): void;
22
+ closeInspector(_required: Record<string, never>, _optional?: {}): void;
23
+ dispose(_required?: Record<string, never>, _optional?: {}): void;
24
+ };
25
+ //# sourceMappingURL=agent-plugins.controller.d.ts.map
@@ -0,0 +1,91 @@
1
+ import { createControllerStore } from '../../core/module/controller-store.js';
2
+ import { agentPluginSummary, AGENT_PLUGINS_READ, AGENT_PLUGINS_WRITE } from '../rules.js';
3
+ import { agentPluginsMessagesEn as m } from '../messages.en.js';
4
+ export function createAgentPluginsController({ api, permissions = [] }, _optional = {}) {
5
+ const grants = new Set(permissions);
6
+ const store = createControllerStore({ initial: { plugins: null, loading: false, error: null, actionError: null, busyIds: [], expandedIds: [], pendingDisable: null, inspectedId: null } });
7
+ let generation = 0, revision = 0;
8
+ const canRead = () => !store.signal.aborted && grants.has(AGENT_PLUGINS_READ);
9
+ const canWrite = () => canRead() && grants.has(AGENT_PLUGINS_WRITE);
10
+ const rowFor = (id) => store.getSnapshot().plugins?.find(p => p.pluginId === id);
11
+ async function load(_required, _optional = {}) {
12
+ if (!canRead())
13
+ return;
14
+ const ticket = ++generation, version = revision;
15
+ store.set({ patch: { loading: true, error: null } });
16
+ try {
17
+ const plugins = await api.list({}, { signal: store.signal });
18
+ // Older reads cannot overwrite accepted writes; each updated row replaces itself once.
19
+ if (ticket !== generation || store.signal.aborted)
20
+ return;
21
+ if (version === revision) {
22
+ const rows = Object.freeze(plugins.map(row => agentPluginSummary({ row })));
23
+ const state = store.getSnapshot();
24
+ store.set({ patch: { plugins: rows, inspectedId: rows.some(p => p.pluginId === state.inspectedId) ? state.inspectedId : null, pendingDisable: rows.some(p => p.pluginId === state.pendingDisable?.pluginId && p.enabled) ? state.pendingDisable : null, expandedIds: state.expandedIds.filter(id => rows.some(p => p.pluginId === id)) } });
25
+ }
26
+ }
27
+ catch {
28
+ if (ticket === generation)
29
+ store.set({ patch: { error: m.loadError } });
30
+ }
31
+ finally {
32
+ if (ticket === generation)
33
+ store.set({ patch: { loading: false } });
34
+ }
35
+ }
36
+ async function setEnabled(input, _optional = {}) {
37
+ const row = rowFor(input.pluginId), state = store.getSnapshot();
38
+ if (!canWrite() || !row || row.enabled === input.enabled || state.busyIds.includes(input.pluginId))
39
+ return false;
40
+ store.set({ patch: { busyIds: [...state.busyIds, input.pluginId], actionError: null } });
41
+ try {
42
+ const updated = await api.setEnabled(input, { signal: store.signal });
43
+ if (store.signal.aborted)
44
+ return false;
45
+ if (updated.pluginId !== input.pluginId)
46
+ throw new Error('Invalid activation response');
47
+ revision++;
48
+ // No optimistic flip: independent rows always splice into the newest snapshot.
49
+ const current = store.getSnapshot();
50
+ store.set({ patch: { plugins: Object.freeze((current.plugins ?? []).map(p => p.pluginId === updated.pluginId ? agentPluginSummary({ row: updated }) : p)) } });
51
+ return true;
52
+ }
53
+ catch {
54
+ store.set({ patch: { actionError: m.actionError } });
55
+ return false;
56
+ }
57
+ finally {
58
+ store.set({ patch: { busyIds: store.getSnapshot().busyIds.filter(id => id !== input.pluginId) } });
59
+ }
60
+ }
61
+ return {
62
+ getSnapshot: store.getSnapshot, subscribe: store.subscribe, load, setEnabled,
63
+ requestDisable(input, _optional = {}) {
64
+ if (canWrite() && !store.getSnapshot().pendingDisable && rowFor(input.pluginId)?.enabled && !store.getSnapshot().busyIds.includes(input.pluginId))
65
+ store.set({ patch: { pendingDisable: { ...input } } });
66
+ },
67
+ cancelDisable(_required, _optional = {}) { const p = store.getSnapshot().pendingDisable; if (!p || store.getSnapshot().busyIds.includes(p.pluginId))
68
+ return; store.set({ patch: { pendingDisable: null } }); },
69
+ async confirmDisable(_required, _optional = {}) {
70
+ const pending = store.getSnapshot().pendingDisable;
71
+ if (!pending || !canWrite() || !rowFor(pending.pluginId)?.enabled) {
72
+ store.set({ patch: { pendingDisable: null } });
73
+ return false;
74
+ }
75
+ if (store.getSnapshot().busyIds.includes(pending.pluginId))
76
+ return false;
77
+ // Explicit false, never invert a stale plugin object captured when the dialog opened.
78
+ const accepted = await setEnabled({ pluginId: pending.pluginId, enabled: false });
79
+ if (accepted)
80
+ store.set({ patch: { pendingDisable: null } });
81
+ return accepted;
82
+ },
83
+ toggleExpanded({ pluginId }, _optional = {}) { if (!canRead() || !rowFor(pluginId))
84
+ return; const ids = store.getSnapshot().expandedIds; store.set({ patch: { expandedIds: ids.includes(pluginId) ? ids.filter(id => id !== pluginId) : [...ids, pluginId] } }); },
85
+ inspect({ pluginId }, _optional = {}) { if (canRead() && rowFor(pluginId))
86
+ store.set({ patch: { inspectedId: pluginId } }); },
87
+ closeInspector(_required, _optional = {}) { store.set({ patch: { inspectedId: null } }); },
88
+ dispose(_required = {}, _optional = {}) { generation++; store.set({ patch: { pendingDisable: null, inspectedId: null, busyIds: [] } }); store.dispose(); },
89
+ };
90
+ }
91
+ //# sourceMappingURL=agent-plugins.controller.js.map
@@ -0,0 +1,9 @@
1
+ export * from './models.js';
2
+ export * from './ports.js';
3
+ export * from './rules.js';
4
+ export * from './package-file-tree.js';
5
+ export * from './messages.en.js';
6
+ export * from './agent-plugins.module.js';
7
+ export * from './controllers/agent-plugins.controller.js';
8
+ export * from './controllers/agent-plugin-files.controller.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ export * from './models.js';
2
+ export * from './ports.js';
3
+ export * from './rules.js';
4
+ export * from './package-file-tree.js';
5
+ export * from './messages.en.js';
6
+ export * from './agent-plugins.module.js';
7
+ export * from './controllers/agent-plugins.controller.js';
8
+ export * from './controllers/agent-plugin-files.controller.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
1
+ export declare const agentPluginsMessagesEn: {
2
+ readonly title: "Agent Plugins";
3
+ readonly installed: "Installed";
4
+ readonly downloaded: "Downloaded";
5
+ readonly marketplace: "Marketplace";
6
+ readonly description: "Portable packages installed for this workspace.";
7
+ readonly denied: "Permission denied";
8
+ readonly loading: "Loading Agent Plugins…";
9
+ readonly empty: "No Agent Plugins are installed in this workspace.";
10
+ readonly loadError: "Failed to load agent plugins";
11
+ readonly actionError: "Failed to update agent plugin";
12
+ readonly fileError: "Failed to load package files";
13
+ readonly filesLoading: "Loading package files…";
14
+ readonly filesEmpty: "No files to show for this plugin.";
15
+ readonly filesTruncated: "Some files are not listed: this package is larger than the viewer’s limits.";
16
+ readonly installedLede: "Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.";
17
+ readonly downloadedLede: "An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.";
18
+ readonly uninstallUnavailable: "Uninstall is unavailable in this view. Package removal is managed by the host.";
19
+ readonly marketplaceTitle: "Nothing to browse yet";
20
+ readonly marketplaceDescription: "Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.";
21
+ readonly marketplaceHint: "Until then, the Downloaded tab lists the packages available in this workspace.";
22
+ };
23
+ //# sourceMappingURL=messages.en.d.ts.map