@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,13 @@
1
+ import { bindReact } from '../../react/bind-react.js';
2
+ import { agentPluginsModule } from '../agent-plugins.module.js';
3
+ import { AgentPluginsPortsContext } from './hooks/AgentPluginsPorts.hooks.js';
4
+ import { agentPluginsMessagesEn as m } from '../messages.en.js';
5
+ export { useAgentPluginsPorts } from './hooks/AgentPluginsPorts.hooks.js';
6
+ /** Host-owned bundled policy copy. All page/tab loaders remain lazy. */
7
+ export function agentPlugins(_required, { uninstallNotice = m.uninstallUnavailable } = {}) {
8
+ const tabs = { ...agentPluginsModule.pages.agentPlugins.tabs, installed: { ...agentPluginsModule.pages.agentPlugins.tabs.installed, params: { uninstallNotice } }, downloaded: { ...agentPluginsModule.pages.agentPlugins.tabs.downloaded, params: { uninstallNotice } } };
9
+ const module = { ...agentPluginsModule, pages: { agentPlugins: { ...agentPluginsModule.pages.agentPlugins, tabs } } };
10
+ const react = bindReact({ module, views: { agentPlugins: { page: () => import('./pages/AgentPluginsPage.js'), tabs: { installed: () => import('./tabs/InstalledTab.js'), downloaded: () => import('./tabs/DownloadedTab.js'), marketplace: () => import('./tabs/MarketplaceTab.js') } } } }, { context: AgentPluginsPortsContext });
11
+ return Object.assign(module, { react });
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import type { ModulePageProps } from '../../../react/bind-react.js';
2
+ export declare function AgentPluginsPage(props: ModulePageProps, _optional?: {}): import("react").JSX.Element;
3
+ export default AgentPluginsPage;
4
+ //# sourceMappingURL=AgentPluginsPage.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Suspense } from 'react';
3
+ import { ConfirmDialog, Notice, Spinner, Tabs } from '@jini-ai/ui-kit/react';
4
+ import { AgentPluginsPageContext, useAgentPluginsPage } from '../hooks/AgentPluginsPage.hooks.js';
5
+ import { AgentPluginInspector } from '../components/AgentPluginInspector.js';
6
+ import { agentPluginsMessagesEn as m } from '../../messages.en.js';
7
+ export function AgentPluginsPage(props, _optional = {}) {
8
+ const vm = useAgentPluginsPage(props);
9
+ return _jsxs("section", { "data-jini-part": "agent-plugins.page", children: [_jsx("h1", { children: props.description.label }), vm.denied ? _jsx(Notice, { tone: "danger", children: m.denied }) : _jsxs(AgentPluginsPageContext.Provider, { value: vm.scope, children: [_jsx("p", { children: m.description }), _jsx(Tabs, { label: "Agent Plugin views", value: vm.activeId, items: vm.items, onValueChange: vm.onValueChange }), _jsx(Suspense, { fallback: _jsx(Spinner, { label: m.loading }), children: vm.ActiveTab && _jsx(vm.ActiveTab, { params: vm.params, permissions: vm.permissions }) }), vm.inspector && _jsx(AgentPluginInspector, { pluginId: vm.inspector.pluginId, name: vm.inspector.name, permissions: vm.permissions, onClose: vm.closeInspector }, vm.inspector.pluginId), vm.confirmation && _jsx(ConfirmDialog, { open: true, title: vm.confirmation.title, body: vm.confirmation.body, consequence: "Stops this package\u2019s skills on the next assistant run.", confirmLabel: vm.confirmation.confirmLabel, cancelLabel: "Cancel", tone: "warning", pending: vm.confirming, agentMayConfirm: false, onConfirm: vm.confirm, onCancel: vm.cancel, errorLabel: m.actionError })] })] });
10
+ }
11
+ export default AgentPluginsPage;
12
+ //# sourceMappingURL=AgentPluginsPage.js.map
@@ -0,0 +1,4 @@
1
+ import type { TabViewProps } from '../../../react/bind-react.js';
2
+ export declare function DownloadedTab(props: TabViewProps, _optional?: {}): import("react").JSX.Element;
3
+ export default DownloadedTab;
4
+ //# sourceMappingURL=DownloadedTab.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AgentPluginListPanel } from '../components/AgentPluginListPanel.js';
3
+ export function DownloadedTab(props, _optional = {}) { return _jsx(AgentPluginListPanel, { props: props, mode: "downloaded" }); }
4
+ export default DownloadedTab;
5
+ //# sourceMappingURL=DownloadedTab.js.map
@@ -0,0 +1,4 @@
1
+ import type { TabViewProps } from '../../../react/bind-react.js';
2
+ export declare function InstalledTab(props: TabViewProps, _optional?: {}): import("react").JSX.Element;
3
+ export default InstalledTab;
4
+ //# sourceMappingURL=InstalledTab.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AgentPluginListPanel } from '../components/AgentPluginListPanel.js';
3
+ export function InstalledTab(props, _optional = {}) { return _jsx(AgentPluginListPanel, { props: props, mode: "installed" }); }
4
+ export default InstalledTab;
5
+ //# sourceMappingURL=InstalledTab.js.map
@@ -0,0 +1,4 @@
1
+ import type { TabViewProps } from '../../../react/bind-react.js';
2
+ export declare function MarketplaceTab(props: TabViewProps, _optional?: {}): import("react").JSX.Element;
3
+ export default MarketplaceTab;
4
+ //# sourceMappingURL=MarketplaceTab.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Notice } from '@jini-ai/ui-kit/react';
3
+ import { useMarketplaceTab } from '../hooks/MarketplaceTab.hooks.js';
4
+ import { agentPluginsMessagesEn as m } from '../../messages.en.js';
5
+ export function MarketplaceTab(props, _optional = {}) {
6
+ const vm = useMarketplaceTab(props);
7
+ return vm.denied ? _jsx(Notice, { tone: "danger", children: m.denied }) : _jsxs("section", { "aria-label": "Agent Plugin Marketplace", children: [_jsx("h2", { children: m.marketplaceTitle }), _jsx("p", { children: m.marketplaceDescription }), _jsx("p", { children: m.marketplaceHint }), _jsx("a", { href: vm.specUrl, target: "_blank", rel: "noreferrer", children: "Read the package format" })] });
8
+ }
9
+ export default MarketplaceTab;
10
+ //# sourceMappingURL=MarketplaceTab.js.map
@@ -0,0 +1,33 @@
1
+ import type { AgentPluginSummary, AgentPluginFiles, AgentPluginPackageFile, AgentPluginDisableRequest } from './models.js';
2
+ export declare const AGENT_PLUGINS_READ = "admin.plugins.read";
3
+ export declare const AGENT_PLUGINS_WRITE = "admin.plugins.enable";
4
+ export declare const AGENT_PLUGINS_SPEC_URL = "https://agent-plugins.org/specification";
5
+ export declare function humanizeAgentPluginId({ pluginId }: {
6
+ pluginId: string;
7
+ }, _optional?: {}): string;
8
+ /** Only wire metadata enters snapshots; never leak lifecycle paths or extra server properties. */
9
+ export declare function agentPluginSummary({ row }: {
10
+ row: AgentPluginSummary;
11
+ }, _optional?: {}): AgentPluginSummary;
12
+ export declare function agentPluginFilesSnapshot({ listing }: {
13
+ listing: AgentPluginFiles;
14
+ }, _optional?: {}): AgentPluginFiles;
15
+ export declare function selectAgentPluginFile({ files, path }: {
16
+ files: readonly AgentPluginPackageFile[];
17
+ path: string;
18
+ }, _optional?: {}): AgentPluginPackageFile | null;
19
+ export declare function agentPluginFileNotice({ file }: {
20
+ file: AgentPluginPackageFile;
21
+ }, _optional?: {}): string | null;
22
+ /** Confirmation names the target and workspace effect; Turn off never implies file deletion. */
23
+ export declare function agentPluginDisableCopy({ pluginId, variant }: AgentPluginDisableRequest, _optional?: {}): {
24
+ title: string;
25
+ confirmLabel: string;
26
+ body: string;
27
+ };
28
+ export type AgentPluginGlyphKind = 'compliance' | 'deploy' | 'design' | 'integration' | 'content' | 'package';
29
+ /** Whole words, strongest evidence first: id, keywords, skills. Never guess a category. */
30
+ export declare function agentPluginGlyphKind({ plugin }: {
31
+ plugin: AgentPluginSummary;
32
+ }, _optional?: {}): AgentPluginGlyphKind;
33
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1,51 @@
1
+ import { buildPackageFileTree, firstPackageFilePath } from './package-file-tree.js';
2
+ export const AGENT_PLUGINS_READ = 'admin.plugins.read';
3
+ export const AGENT_PLUGINS_WRITE = 'admin.plugins.enable';
4
+ export const AGENT_PLUGINS_SPEC_URL = 'https://agent-plugins.org/specification';
5
+ // Closed vocabulary: no heuristic can distinguish an acronym from a real word reliably.
6
+ const acronyms = new Set(['ai', 'api', 'cli', 'css', 'html', 'http', 'id', 'io', 'json', 'mcp', 'rss', 'sdk', 'seo', 'sql', 'ui', 'url', 'ux', 'yaml']);
7
+ export function humanizeAgentPluginId({ pluginId }, _optional = {}) {
8
+ return pluginId.split('-').filter(Boolean).map(part => acronyms.has(part.toLowerCase()) ? part.toUpperCase() : part.charAt(0).toUpperCase() + part.slice(1)).join(' ');
9
+ }
10
+ /** Only wire metadata enters snapshots; never leak lifecycle paths or extra server properties. */
11
+ export function agentPluginSummary({ row }, _optional = {}) {
12
+ return Object.freeze({ pluginId: row.pluginId, version: row.version ?? null, description: row.description ?? null, keywords: Object.freeze([...row.keywords]), skills: Object.freeze(row.skills.map(s => Object.freeze({ name: s.name, summary: s.summary }))), mcpServerIds: Object.freeze([...row.mcpServerIds]), enabled: row.enabled });
13
+ }
14
+ export function agentPluginFilesSnapshot({ listing }, _optional = {}) {
15
+ return Object.freeze({ pluginId: listing.pluginId, files: Object.freeze(listing.files.map(f => Object.freeze({ relativePath: f.relativePath, sizeBytes: f.sizeBytes, content: f.content, omitted: f.omitted }))), truncated: listing.truncated, limits: Object.freeze({ maxFiles: listing.limits.maxFiles, maxEntries: listing.limits.maxEntries, maxFileBytes: listing.limits.maxFileBytes, maxTotalBytes: listing.limits.maxTotalBytes }) });
16
+ }
17
+ export function selectAgentPluginFile({ files, path }, _optional = {}) {
18
+ const selected = files.find(f => f.relativePath === path);
19
+ if (selected)
20
+ return selected;
21
+ const first = firstPackageFilePath({ nodes: buildPackageFileTree({ paths: files.map(f => f.relativePath) }) });
22
+ return files.find(f => f.relativePath === first) ?? files[0] ?? null;
23
+ }
24
+ const omissions = { binary: 'Binary file — not shown.', 'too-large': 'Too large to show here.', symlink: 'Symbolic link — not followed.', unreadable: 'This file could not be read.' };
25
+ export function agentPluginFileNotice({ file }, _optional = {}) {
26
+ return file.omitted === null && file.content !== null ? null : omissions[file.omitted ?? 'unreadable'] ?? omissions.unreadable;
27
+ }
28
+ /** Confirmation names the target and workspace effect; Turn off never implies file deletion. */
29
+ export function agentPluginDisableCopy({ pluginId, variant }, _optional = {}) {
30
+ const name = humanizeAgentPluginId({ pluginId });
31
+ return { title: variant === 'remove' ? `Turn off ${name}?` : `Disable ${name} for this workspace?`, confirmLabel: variant === 'remove' ? 'Turn off' : 'Disable', body: 'Its skills stop reaching the assistant on the next run. The package stays on disk, remains listed on both tabs, and can be enabled again.' };
32
+ }
33
+ const vocabulary = [
34
+ ['compliance', ['compliance', 'privacy', 'gdpr', 'ccpa', 'cpra', 'consent', 'security', 'audit', 'wcag', 'accessibility']],
35
+ ['deploy', ['deploy', 'deployment', 'hosting', 'release', 'ship', 'production', 'ci', 'fly']],
36
+ ['design', ['design', 'ui', 'ux', 'uiux', 'theme', 'brand', 'visual']],
37
+ ['integration', ['mcp', 'integration', 'connector', 'webhook', 'api']],
38
+ ['content', ['docs', 'documentation', 'content', 'writing', 'copy', 'blog']],
39
+ ];
40
+ /** Whole words, strongest evidence first: id, keywords, skills. Never guess a category. */
41
+ export function agentPluginGlyphKind({ plugin }, _optional = {}) {
42
+ const tokens = (values) => new Set(values.flatMap(s => s.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)));
43
+ for (const tier of [[plugin.pluginId], plugin.keywords, plugin.skills.map(s => s.name)]) {
44
+ const words = tokens(tier);
45
+ const match = vocabulary.find(([, values]) => values.some(v => words.has(v)));
46
+ if (match)
47
+ return match[0];
48
+ }
49
+ return 'package';
50
+ }
51
+ //# sourceMappingURL=rules.js.map
@@ -5,4 +5,5 @@
5
5
  * `navigation.ts`'s header.
6
6
  */
7
7
  export { NAVIGATION_EVENT, installInternalLinkInterceptor, navigate, readRoutePath, subscribeToRoute, } from './navigation.js';
8
+ export { createAdminShellNavigation } from './shell-navigation.js';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -5,4 +5,5 @@
5
5
  * `navigation.ts`'s header.
6
6
  */
7
7
  export { NAVIGATION_EVENT, installInternalLinkInterceptor, navigate, readRoutePath, subscribeToRoute, } from './navigation.js';
8
+ export { createAdminShellNavigation } from './shell-navigation.js';
8
9
  //# sourceMappingURL=index.js.map
@@ -11,14 +11,21 @@
11
11
  /** Fires on `navigate()`. `pushState` does not emit `popstate`, so subscribers need this too. */
12
12
  export declare const NAVIGATION_EVENT = "jini:admin-navigate";
13
13
  /** The current route path, read from the address bar. */
14
- export declare function readRoutePath(base?: string): string;
14
+ export declare function readRoutePath({ window }: {
15
+ readonly window: Pick<Window, 'location'>;
16
+ }, { base }?: {
17
+ readonly base?: string;
18
+ }): string;
15
19
  /**
16
20
  * Navigates without a page load.
17
21
  *
18
22
  * Takes a *route path*, not a URL — passing `/admin/settings` here would produce
19
23
  * `/admin/admin/settings`, which is exactly the class of mistake `adminHref` prevents.
20
24
  */
21
- export declare function navigate(routePath: string, options?: {
25
+ export declare function navigate({ routePath, window }: {
26
+ readonly routePath: string;
27
+ readonly window: Pick<Window, 'location' | 'history' | 'dispatchEvent'>;
28
+ }, options?: {
22
29
  readonly replace?: boolean;
23
30
  readonly base?: string;
24
31
  }): void;
@@ -33,7 +40,15 @@ export declare function navigate(routePath: string, options?: {
33
40
  *
34
41
  * @returns a teardown function.
35
42
  */
36
- export declare function installInternalLinkInterceptor(base?: string): () => void;
43
+ export declare function installInternalLinkInterceptor({ window, document }: {
44
+ readonly window: Pick<Window, 'location' | 'history' | 'dispatchEvent'>;
45
+ readonly document: Pick<Document, 'addEventListener' | 'removeEventListener'>;
46
+ }, { base }?: {
47
+ readonly base?: string;
48
+ }): () => void;
37
49
  /** Subscribes to route changes from both `popstate` and programmatic `navigate()`. */
38
- export declare function subscribeToRoute(onChange: () => void): () => void;
50
+ export declare function subscribeToRoute({ window, onChange }: {
51
+ readonly window: Pick<Window, 'addEventListener' | 'removeEventListener'>;
52
+ readonly onChange: () => void;
53
+ }): () => void;
39
54
  //# sourceMappingURL=navigation.d.ts.map
@@ -12,8 +12,8 @@ import { DEFAULT_ADMIN_BASE, adminHref, currentRoutePath, stripTrailingSlash } f
12
12
  /** Fires on `navigate()`. `pushState` does not emit `popstate`, so subscribers need this too. */
13
13
  export const NAVIGATION_EVENT = 'jini:admin-navigate';
14
14
  /** The current route path, read from the address bar. */
15
- export function readRoutePath(base = DEFAULT_ADMIN_BASE) {
16
- return currentRoutePath(window.location.pathname, base);
15
+ export function readRoutePath({ window }, { base = DEFAULT_ADMIN_BASE } = {}) {
16
+ return currentRoutePath({ pathname: window.location.pathname }, { base });
17
17
  }
18
18
  /**
19
19
  * Navigates without a page load.
@@ -21,9 +21,9 @@ export function readRoutePath(base = DEFAULT_ADMIN_BASE) {
21
21
  * Takes a *route path*, not a URL — passing `/admin/settings` here would produce
22
22
  * `/admin/admin/settings`, which is exactly the class of mistake `adminHref` prevents.
23
23
  */
24
- export function navigate(routePath, options = {}) {
24
+ export function navigate({ routePath, window }, options = {}) {
25
25
  const base = options.base ?? DEFAULT_ADMIN_BASE;
26
- const url = adminHref(routePath, base);
26
+ const url = adminHref({ routePath }, { base });
27
27
  /*
28
28
  * Navigating to where you already are is a no-op, not a history entry. Without this, clicking
29
29
  * the already-active sidebar link five times pushes five identical entries and Back appears
@@ -41,7 +41,7 @@ export function navigate(routePath, options = {}) {
41
41
  * same-path/different-query navigation is a real one.
42
42
  */
43
43
  const target = new URL(url, window.location.href);
44
- const isCurrent = stripTrailingSlash(target.pathname) === stripTrailingSlash(window.location.pathname) &&
44
+ const isCurrent = stripTrailingSlash({ pathname: target.pathname }) === stripTrailingSlash({ pathname: window.location.pathname }) &&
45
45
  target.search === window.location.search &&
46
46
  target.hash === window.location.hash;
47
47
  if (isCurrent)
@@ -63,7 +63,7 @@ export function navigate(routePath, options = {}) {
63
63
  *
64
64
  * @returns a teardown function.
65
65
  */
66
- export function installInternalLinkInterceptor(base = DEFAULT_ADMIN_BASE) {
66
+ export function installInternalLinkInterceptor({ window, document }, { base = DEFAULT_ADMIN_BASE } = {}) {
67
67
  const onClick = (event) => {
68
68
  // Anything but an unmodified primary click is the browser's to handle: cmd/ctrl-click opens a
69
69
  // tab, shift-click a window, alt-click downloads.
@@ -96,13 +96,13 @@ export function installInternalLinkInterceptor(base = DEFAULT_ADMIN_BASE) {
96
96
  // `url.hash` is carried through: an in-page fragment (`/admin/settings#seo-defaults`) is not a
97
97
  // routing concern, but dropping it silently loses the anchor. It never reaches the matcher —
98
98
  // the route snapshot is path + query only — so preserving it cannot affect routing.
99
- navigate(`${currentRoutePath(url.pathname, base)}${url.search}${url.hash}`, { base });
99
+ navigate({ window, routePath: `${currentRoutePath({ pathname: url.pathname }, { base })}${url.search}${url.hash}` }, { base });
100
100
  };
101
101
  document.addEventListener('click', onClick);
102
102
  return () => document.removeEventListener('click', onClick);
103
103
  }
104
104
  /** Subscribes to route changes from both `popstate` and programmatic `navigate()`. */
105
- export function subscribeToRoute(onChange) {
105
+ export function subscribeToRoute({ window, onChange }) {
106
106
  window.addEventListener('popstate', onChange);
107
107
  window.addEventListener(NAVIGATION_EVENT, onChange);
108
108
  return () => {
@@ -0,0 +1,12 @@
1
+ import type { AdminShellNavigationPort } from '../core/ports/shell.js';
2
+ /**
3
+ * Adapt the existing browser router to the shell's object-based navigation port.
4
+ * @param args Required live browser location, history/event port and document port; the admin mount path is supplied on each port call.
5
+ * @returns A query-preserving History API adapter. Construct only in a browser host.
6
+ */
7
+ export declare function createAdminShellNavigation(args: {
8
+ readonly location: Pick<Location, 'pathname' | 'search'>;
9
+ readonly window: Pick<Window, 'location' | 'history' | 'dispatchEvent' | 'addEventListener' | 'removeEventListener'>;
10
+ readonly document: Pick<Document, 'addEventListener' | 'removeEventListener'>;
11
+ }): AdminShellNavigationPort;
12
+ //# sourceMappingURL=shell-navigation.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { currentRoutePath } from '../core/routing/rules.js';
2
+ import { installInternalLinkInterceptor, navigate, subscribeToRoute } from './navigation.js';
3
+ /**
4
+ * Adapt the existing browser router to the shell's object-based navigation port.
5
+ * @param args Required live browser location, history/event port and document port; the admin mount path is supplied on each port call.
6
+ * @returns A query-preserving History API adapter. Construct only in a browser host.
7
+ */
8
+ export function createAdminShellNavigation(args) {
9
+ return {
10
+ readRoute: ({ base }) => `${currentRoutePath({ pathname: args.location.pathname }, { base })}${args.location.search}`,
11
+ subscribe: ({ onChange }) => subscribeToRoute({ window: args.window, onChange }),
12
+ navigate: ({ base, routePath }, options = {}) => navigate({ routePath, window: args.window }, { base, ...options }),
13
+ installLinkInterceptor: ({ base }) => installInternalLinkInterceptor({ window: args.window, document: args.document }, { base }),
14
+ };
15
+ }
16
+ //# sourceMappingURL=shell-navigation.js.map
@@ -0,0 +1,8 @@
1
+ /** Optional navigation to the host's single named-credential management home. */
2
+ export interface CredentialManagementPort {
3
+ open(required: {
4
+ kind: 'source-control';
5
+ }, optional?: Record<string, never>): void;
6
+ }
7
+ export declare const credentialManagementToken: import("../core/module/token.js").AdminPortToken<CredentialManagementPort, "admin.credentials.management">;
8
+ //# sourceMappingURL=credential-management.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { adminPort } from '../core/module/token.js';
2
+ export const credentialManagementToken = adminPort({ id: 'admin.credentials.management' });
3
+ //# sourceMappingURL=credential-management.js.map
@@ -0,0 +1,17 @@
1
+ /** Data returned across tab boundaries. Consumers need no media implementation import. */
2
+ export interface MediaAsset {
3
+ readonly id: string;
4
+ readonly title: string;
5
+ readonly alt: string;
6
+ readonly contentType: string | null;
7
+ readonly publicUrl: string | null;
8
+ }
9
+ export interface MediaPickerPort {
10
+ pick(required: {
11
+ accept: readonly string[];
12
+ }, optional?: {
13
+ signal?: AbortSignal;
14
+ }): Promise<MediaAsset | null>;
15
+ }
16
+ export declare const mediaPickerToken: import("../core/module/token.js").AdminPortToken<MediaPickerPort, "admin.media.picker">;
17
+ //# sourceMappingURL=media-picker.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { adminPort } from '../core/module/token.js';
2
+ export const mediaPickerToken = adminPort({
3
+ id: 'admin.media.picker',
4
+ });
5
+ //# sourceMappingURL=media-picker.js.map
@@ -0,0 +1,18 @@
1
+ /** Opaque headlessly; browser hosts publish an actual portal container, never an id or flag. */
2
+ export interface PlaygroundTargetSnapshot {
3
+ readonly target: object | null;
4
+ }
5
+ export interface PlaygroundRenderTargetPort {
6
+ getSnapshot(required?: Record<string, never>, optional?: Record<string, never>): PlaygroundTargetSnapshot;
7
+ subscribe(required: {
8
+ listener: () => void;
9
+ }, optional?: Record<string, never>): () => void;
10
+ /** A lease belongs to its publisher; releasing a stale lease cannot erase the current node. */
11
+ register(required: {
12
+ target: object;
13
+ }, optional?: Record<string, never>): {
14
+ release(required?: Record<string, never>, optional?: Record<string, never>): void;
15
+ };
16
+ }
17
+ export declare const playgroundRenderTargetToken: import("../core/module/token.js").AdminPortToken<PlaygroundRenderTargetPort, "admin.playground.render-target">;
18
+ //# sourceMappingURL=playground-render-target.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { adminPort } from '../core/module/token.js';
2
+ export const playgroundRenderTargetToken = adminPort({ id: 'admin.playground.render-target' });
3
+ //# sourceMappingURL=playground-render-target.js.map
@@ -0,0 +1,138 @@
1
+ /**
2
+ * @file The runtime half of `AdminEntityPort`: registration, descriptor validation, and the one
3
+ * erasure a screen generic over all entities needs.
4
+ *
5
+ * `core/ports/entities.ts` is types only, like every other port. Everything here is the code those
6
+ * types cannot be: checks that a descriptor is internally consistent, and the single cast that
7
+ * turns a descriptor-generic port into the shape a screen can hold.
8
+ *
9
+ * ## Why any of this is runtime rather than type-level
10
+ *
11
+ * Two of the descriptor's own promises are not expressible in the type system:
12
+ *
13
+ * - `titleField` names a `text` field on this same descriptor. Encoding that needs a conditional
14
+ * type heavy enough to make every descriptor's error message unreadable — and a typo here is not
15
+ * cosmetic: it makes every relation picker pointing at this entity render `undefined` for every
16
+ * row, which looks like missing data rather than a typo.
17
+ * - `relation.target` names another *registered* entity. A descriptor cannot know what it will be
18
+ * registered beside, so this can only be checked once the registry is assembled.
19
+ *
20
+ * Both are therefore checked at composition time, where they fail once, at startup, naming the
21
+ * problem — rather than at render time, silently, as blank cells.
22
+ */
23
+ import type { AdminEntityDescriptor, AdminEntityField, AdminEntityPort, AdminEntityRegistry, AdminErasedEntityPort } from '../ports/entities.js';
24
+ /**
25
+ * A row that does not match the descriptor its port advertises.
26
+ *
27
+ * This is the failure `eraseEntityPort`'s cast makes possible: the cast is sound in the direction
28
+ * that matters (a typed row *is* a bag of unknowns), and unsound only if an adapter lies about its
29
+ * own descriptor. Nothing in the type system catches that, so this is what does — as a report, not
30
+ * an exception: a mistyped field is a fidelity problem, and throwing on a read would take a
31
+ * mostly-working screen down over one bad cell.
32
+ */
33
+ export interface AdminEntityRowViolation {
34
+ /** `descriptor.name` of the port that produced the row. */
35
+ readonly entity: string;
36
+ readonly operation: 'list' | 'get' | 'create' | 'update';
37
+ /** The offending row's `id`, or `'<no id>'` when that is itself what is wrong. */
38
+ readonly rowId: string;
39
+ /** Declared field name, `'id'`, or the undeclared key that appeared. */
40
+ readonly field: string;
41
+ readonly problem: 'missing-required' | 'wrong-type' | 'undeclared-field';
42
+ /** One sentence naming what was expected and what arrived. Safe to log verbatim. */
43
+ readonly detail: string;
44
+ }
45
+ export interface AdminEntityErasureOptions {
46
+ /**
47
+ * Where descriptor-conformance violations are reported.
48
+ *
49
+ * **Omit it and no row checking runs at all** — that is the zero-cost default, and it is why this
50
+ * package emits no diagnostics of its own (nothing here writes to `console`; a host owns its
51
+ * reporting the same way it owns its transport). A host wires this under its own development
52
+ * flag and gets adapter drift surfaced the moment it happens; production pays nothing.
53
+ */
54
+ readonly onViolation?: (violation: AdminEntityRowViolation) => void;
55
+ }
56
+ /**
57
+ * Whether `value` is a legal runtime value for `field`.
58
+ *
59
+ * Exported because an EDITOR needs exactly this judgement and must not re-derive it. A generic form
60
+ * that decides for itself what an `integer` accepts will drift from what the conformance walk
61
+ * below rejects, and the two disagreeing is worse than either being wrong alone: the form saves a
62
+ * value the port then reports as a violation, so the write succeeds and the diagnostic blames the
63
+ * adapter. `1.5` in an `integer` and `Infinity` in a `real` are both reachable from a plain
64
+ * `<input type="number">` — `step` constrains the spinner, not the parsed value — so this is not a
65
+ * theoretical seam. One function, both callers.
66
+ *
67
+ * @param field The declared field the value is destined for.
68
+ * @param value The candidate value, typically a form draft entry or an adapter-returned cell.
69
+ * @returns `null` when it conforms, otherwise a one-phrase reason naming what arrived instead.
70
+ * Phrased to complete the sentence "declared `<kind>`; ...".
71
+ * @complexity Time O(1) for every kind but `json`; see {@link describeNonJsonValue} for that one.
72
+ * @overallScore 100
73
+ */
74
+ export declare function describeAdminEntityFieldMismatch(field: AdminEntityField, value: unknown): string | null;
75
+ /**
76
+ * Erases a port's descriptor generic so a screen can hold ports for different entities in one
77
+ * collection.
78
+ *
79
+ * The `as unknown as` below is unavoidable and is the only one in this port. `create` and `update`
80
+ * take the row type as a *parameter*, so `AdminEntityPort<SpecificDescriptor>` is contravariant in
81
+ * it and is genuinely not assignable to any common supertype. The cast is sound in the direction
82
+ * that gets exercised — a typed row is a bag of unknowns — and unsound only if the adapter's rows
83
+ * do not match the descriptor it advertises, which is precisely what `options.onViolation` is here
84
+ * to surface.
85
+ *
86
+ * @param port A port whose rows are typed by its own descriptor.
87
+ * @param options Wire `onViolation` to have every row checked against the descriptor on the way
88
+ * out; omit it for zero added cost.
89
+ * @returns The same port, typed as {@link AdminErasedEntityPort}; a fresh wrapper object when
90
+ * `onViolation` is set, and the original object when it is not.
91
+ * @complexity Time O(1) to erase; O(rows × fields) per call when checking is on.
92
+ * @overallScore 100
93
+ */
94
+ export declare function eraseEntityPort<D extends AdminEntityDescriptor>(port: AdminEntityPort<D>, options?: AdminEntityErasureOptions): AdminErasedEntityPort;
95
+ /**
96
+ * Assembles entity ports into a registry, validating every descriptor first.
97
+ *
98
+ * Same ergonomics as `createAdminClient`: one object literal, `TPorts` inferred, host-owned and
99
+ * Jini-shipped entries indistinguishable. Registering an entity is one line.
100
+ *
101
+ * **No key is reserved.** `createAdminClient` reserves `'transport'` because it merges the
102
+ * transport into the same object it returns; this returns nothing but the ports, so there is
103
+ * nothing an entity named `transport` could shadow. The returned object has a `null` prototype, so
104
+ * a lookup by an attacker- or URL-supplied name (`'constructor'`, `'__proto__'`) resolves to
105
+ * `undefined` rather than walking to `Object.prototype` and yielding a truthy non-port.
106
+ *
107
+ * Deliberately takes no erasure options: a registry holds ports with their row types intact, and
108
+ * checking only becomes possible once those types are erased. `onViolation` therefore belongs to
109
+ * {@link getErasedEntityPort}/{@link listErasedEntityPorts}, at the point the guarantee is dropped.
110
+ *
111
+ * @param ports Entity name -> port. Each key must equal that port's `descriptor.name`.
112
+ * @returns A frozen, null-prototype registry preserving each port's own type.
113
+ * @throws {Error} listing *every* problem found, not just the first — a descriptor with three
114
+ * typos should take one round trip to fix, not three.
115
+ * @complexity Time O(entities × fields); space O(entities).
116
+ * @overallScore 100
117
+ */
118
+ export declare function createAdminEntityRegistry<TPorts extends Record<string, AdminEntityPort<AdminEntityDescriptor>>>(ports: TPorts): AdminEntityRegistry<TPorts>;
119
+ /**
120
+ * Every registered port, erased, in registration order — what a screen that renders any entity
121
+ * iterates.
122
+ *
123
+ * @complexity Time O(entities); space O(entities).
124
+ * @overallScore 100
125
+ */
126
+ export declare function listErasedEntityPorts(registry: Readonly<Record<string, AdminEntityPort<AdminEntityDescriptor>>>, options?: AdminEntityErasureOptions): readonly AdminErasedEntityPort[];
127
+ /**
128
+ * The erased port registered under `name`, or `null`.
129
+ *
130
+ * `name` is routinely a URL segment, so this never trusts a bare property read: the registry's null
131
+ * prototype already stops `'constructor'` resolving to something truthy, and `Object.hasOwn` holds
132
+ * that guarantee even for a caller that hands in a plain object literal instead.
133
+ *
134
+ * @complexity Time O(1) for the lookup, O(1) for the erasure.
135
+ * @overallScore 100
136
+ */
137
+ export declare function getErasedEntityPort(registry: Readonly<Record<string, AdminEntityPort<AdminEntityDescriptor>>>, name: string, options?: AdminEntityErasureOptions): AdminErasedEntityPort | null;
138
+ //# sourceMappingURL=rules.d.ts.map