@kardalum/plugin-sdk 0.19.0 → 0.21.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 (552) hide show
  1. package/CHANGELOG.md +281 -0
  2. package/README.md +19 -0
  3. package/dist/admin-section-registry.d.ts +48 -1
  4. package/dist/admin-section-registry.js +90 -0
  5. package/dist/built-in-editor-ids.d.ts +1 -1
  6. package/dist/built-in-editor-ids.js +2 -20
  7. package/dist/built-in-settings-schemas.d.ts +10 -0
  8. package/dist/built-in-settings-schemas.js +86 -0
  9. package/dist/built-in-value-schemas.js +35 -0
  10. package/dist/built-ins.js +38 -7
  11. package/dist/capabilities.d.ts +11 -1
  12. package/dist/capabilities.js +101 -4
  13. package/dist/cli.d.ts +66 -0
  14. package/dist/cli.js +22 -0
  15. package/dist/consent-entry.d.ts +11 -0
  16. package/dist/consent-entry.js +18 -0
  17. package/dist/content-library.d.ts +102 -0
  18. package/dist/content-library.js +15 -0
  19. package/dist/content-list-extensions.d.ts +50 -0
  20. package/dist/content-list-extensions.js +11 -0
  21. package/dist/content-picker/page-picker-sheet.d.ts +15 -0
  22. package/dist/content-picker/page-picker-sheet.js +105 -0
  23. package/dist/content-picker/page-picker.d.ts +18 -0
  24. package/dist/content-picker/page-picker.js +20 -0
  25. package/dist/content-picker/page-tree.d.ts +25 -0
  26. package/dist/content-picker/page-tree.js +132 -0
  27. package/dist/data-type-plugin.d.ts +7 -1
  28. package/dist/datatype-validation.d.ts +4 -9
  29. package/dist/datatype-validation.js +147 -1
  30. package/dist/datatypes-entry.d.ts +1 -0
  31. package/dist/datatypes-entry.js +2 -0
  32. package/dist/entitlement-entry.d.ts +1 -1
  33. package/dist/entitlement-entry.js +1 -1
  34. package/dist/entitlement-gate.d.ts +14 -0
  35. package/dist/entitlement-gate.js +64 -7
  36. package/dist/entitlement-plan.d.ts +6 -0
  37. package/dist/entitlement-plan.js +10 -0
  38. package/dist/entitlement-types.d.ts +53 -12
  39. package/dist/entitlement.d.ts +31 -4
  40. package/dist/entitlement.js +58 -17
  41. package/dist/hook-entry.d.ts +5 -0
  42. package/dist/hook-entry.js +30 -0
  43. package/dist/host-entry.d.ts +7 -1
  44. package/dist/host-entry.js +14 -1
  45. package/dist/index.d.ts +67 -7
  46. package/dist/index.js +94 -6
  47. package/dist/mail.d.ts +34 -0
  48. package/dist/mail.js +1 -0
  49. package/dist/manifest-entry.d.ts +47 -4
  50. package/dist/manifest-entry.js +63 -2
  51. package/dist/manifest-schema.d.ts +993 -40
  52. package/dist/manifest-schema.js +516 -26
  53. package/dist/manifest.d.ts +1186 -62
  54. package/dist/manifest.js +8 -4
  55. package/dist/media/media-picker.js +31 -18
  56. package/dist/media/upload-error.d.ts +5 -1
  57. package/dist/media/upload-error.js +14 -2
  58. package/dist/media-library.d.ts +32 -0
  59. package/dist/media-library.js +15 -0
  60. package/dist/nested-field-host.d.ts +76 -0
  61. package/dist/nested-field-host.js +90 -0
  62. package/dist/notify.d.ts +12 -4
  63. package/dist/notify.js +1 -1
  64. package/dist/outbound.d.ts +47 -0
  65. package/dist/outbound.js +1 -0
  66. package/dist/plugin-context.d.ts +52 -0
  67. package/dist/plugin-context.js +27 -0
  68. package/dist/plugin-permissions.d.ts +18 -0
  69. package/dist/plugin-permissions.js +25 -0
  70. package/dist/plugin-screen-context.d.ts +262 -9
  71. package/dist/plugin-screen-context.js +56 -0
  72. package/dist/providers.d.ts +313 -0
  73. package/dist/providers.js +74 -0
  74. package/dist/read-all-pages.d.ts +5 -0
  75. package/dist/read-all-pages.js +3 -2
  76. package/dist/render-page.d.ts +15 -0
  77. package/dist/render-page.js +20 -0
  78. package/dist/richtext/block-panel.d.ts +12 -1
  79. package/dist/richtext/block-panel.js +36 -25
  80. package/dist/richtext/button-view.d.ts +11 -0
  81. package/dist/richtext/button-view.js +45 -0
  82. package/dist/richtext/content-guard.d.ts +4 -0
  83. package/dist/richtext/content-guard.js +27 -0
  84. package/dist/richtext/editor-handle.d.ts +34 -0
  85. package/dist/richtext/editor-handle.js +225 -0
  86. package/dist/richtext/extensions.d.ts +6 -0
  87. package/dist/richtext/extensions.js +16 -0
  88. package/dist/richtext/insert-menu.d.ts +6 -1
  89. package/dist/richtext/insert-menu.js +45 -22
  90. package/dist/richtext/item-attributes.d.ts +6 -0
  91. package/dist/richtext/item-attributes.js +19 -0
  92. package/dist/richtext/item-panel.d.ts +25 -0
  93. package/dist/richtext/item-panel.js +118 -0
  94. package/dist/richtext/item-view.d.ts +58 -0
  95. package/dist/richtext/item-view.js +172 -0
  96. package/dist/richtext/mark-form.d.ts +10 -0
  97. package/dist/richtext/mark-form.js +38 -0
  98. package/dist/richtext/paste-choice.d.ts +9 -0
  99. package/dist/richtext/paste-choice.js +13 -0
  100. package/dist/richtext/plugin-items.d.ts +72 -0
  101. package/dist/richtext/plugin-items.js +562 -0
  102. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  103. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  104. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  105. package/dist/richtext/plugin-toolbar.js +186 -0
  106. package/dist/richtext/rich-item-icons.d.ts +5 -0
  107. package/dist/richtext/rich-item-icons.js +42 -0
  108. package/dist/richtext/rich-items.d.ts +42 -0
  109. package/dist/richtext/rich-items.js +68 -0
  110. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  111. package/dist/richtext/rich-text-view-host.js +11 -0
  112. package/dist/richtext/style-listbox.js +6 -4
  113. package/dist/richtext/toolbar-button.d.ts +16 -0
  114. package/dist/richtext/toolbar-button.js +9 -0
  115. package/dist/richtext/url-paste.d.ts +20 -0
  116. package/dist/richtext/url-paste.js +82 -0
  117. package/dist/richtext-html-entry.d.ts +5 -0
  118. package/dist/richtext-html-entry.js +11 -0
  119. package/dist/sdk-strings.d.ts +344 -0
  120. package/dist/sdk-strings.js +411 -0
  121. package/dist/sealing.d.ts +14 -0
  122. package/dist/sealing.js +1 -0
  123. package/dist/service-contract.d.ts +17 -0
  124. package/dist/service-contract.js +39 -0
  125. package/dist/services.d.ts +114 -0
  126. package/dist/services.js +1 -0
  127. package/dist/simple-storage-value-provider.js +24 -24
  128. package/dist/structured-storage-types.d.ts +429 -9
  129. package/dist/tailwind.js +10 -5
  130. package/dist/template-reads.d.ts +16 -0
  131. package/dist/template-reads.js +21 -0
  132. package/dist/testing-entry.d.ts +38 -0
  133. package/dist/testing-entry.js +173 -0
  134. package/dist/text-entry.d.ts +1 -0
  135. package/dist/text-entry.js +7 -0
  136. package/dist/tokens/system-dark.css +1 -0
  137. package/dist/tokens/tailwind-theme.css +7 -0
  138. package/dist/tokens/tokens.css +19 -3
  139. package/dist/tokens/tokens.json +13 -4
  140. package/dist/uploads.d.ts +43 -0
  141. package/dist/uploads.js +1 -0
  142. package/dist/user-library.d.ts +51 -0
  143. package/dist/user-library.js +15 -0
  144. package/dist/view-helpers.d.ts +18 -0
  145. package/dist/view-helpers.js +64 -0
  146. package/dist/views/asset-view.js +4 -1
  147. package/dist/views/content-list-preview.js +3 -1
  148. package/dist/views/content-list-settings-view.js +11 -7
  149. package/dist/views/content-list-view.d.ts +5 -3
  150. package/dist/views/content-list-view.js +243 -40
  151. package/dist/views/content-picker-view.d.ts +3 -0
  152. package/dist/views/content-picker-view.js +143 -0
  153. package/dist/views/crop-view.d.ts +4 -6
  154. package/dist/views/crop-view.js +22 -13
  155. package/dist/views/date-range-view.js +4 -1
  156. package/dist/views/file-upload-view.d.ts +5 -7
  157. package/dist/views/file-upload-view.js +16 -7
  158. package/dist/views/group-view.d.ts +8 -0
  159. package/dist/views/group-view.js +123 -0
  160. package/dist/views/html-view.js +7 -6
  161. package/dist/views/image-view.js +37 -19
  162. package/dist/views/link-view.d.ts +3 -0
  163. package/dist/views/link-view.js +150 -0
  164. package/dist/views/options-list-view.d.ts +3 -0
  165. package/dist/views/options-list-view.js +104 -0
  166. package/dist/views/repeatable-list-view.d.ts +3 -0
  167. package/dist/views/repeatable-list-view.js +113 -0
  168. package/dist/views/rich-text-view.d.ts +2 -0
  169. package/dist/views/rich-text-view.js +208 -35
  170. package/dist/views/suggest-key.d.ts +17 -0
  171. package/dist/views/suggest-key.js +55 -0
  172. package/dist/views/unreadable-rich-text.d.ts +17 -0
  173. package/dist/views/unreadable-rich-text.js +40 -0
  174. package/dist/visitors.d.ts +81 -0
  175. package/dist/visitors.js +1 -0
  176. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  177. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  178. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  179. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  180. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
  181. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -0
  182. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  183. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  184. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  185. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  186. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +11 -1
  187. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  188. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
  189. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
  190. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  191. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
  192. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
  193. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
  194. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
  195. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
  196. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  197. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  199. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  200. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  201. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  202. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  203. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  204. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  205. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  206. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  207. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  208. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  209. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  210. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  211. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  212. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
  213. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
  214. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  215. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
  216. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
  217. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  218. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  219. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +257 -15
  220. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
  221. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  222. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
  223. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  224. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  225. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  226. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  227. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  228. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  229. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  230. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  232. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  233. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  234. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  235. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  236. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  237. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
  238. package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
  239. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  240. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  241. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  242. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  243. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  244. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  245. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  246. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  247. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +226 -0
  248. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -0
  249. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  250. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  251. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  252. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  253. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +490 -10
  254. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
  255. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  256. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  257. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  258. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  259. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  260. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  261. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  262. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  263. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  264. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  265. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  266. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  267. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  268. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  269. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +38 -0
  270. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
  271. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  272. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  273. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  274. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  275. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  276. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +5 -0
  277. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
  278. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  279. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  280. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +60 -0
  281. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -0
  282. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  283. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  284. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  285. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  286. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  287. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  288. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  289. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  290. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  291. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  292. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  293. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  294. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  295. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  296. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  297. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  298. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  299. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  300. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  301. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  302. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  303. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  304. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  305. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +44 -0
  306. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
  307. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  308. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  309. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  310. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  311. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  312. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  313. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  314. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  315. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  316. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  317. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  318. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  319. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  320. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  321. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +44 -2
  322. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
  323. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -5
  324. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  325. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  326. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +34 -0
  327. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
  328. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
  329. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
  330. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  331. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  332. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  333. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  334. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  335. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  336. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  337. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  338. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
  339. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -0
  340. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  341. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  342. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  343. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  344. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +46 -0
  345. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
  346. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
  347. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
  348. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  349. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  350. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  351. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  352. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  353. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  354. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +408 -14
  355. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
  356. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
  357. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
  358. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  359. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  360. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +23 -1
  361. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
  362. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  363. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  364. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  365. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  366. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  367. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  368. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +346 -0
  369. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -0
  370. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  371. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  372. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  373. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  374. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  375. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  376. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  377. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  378. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  379. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  380. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  381. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  382. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  383. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  384. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  385. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  386. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
  387. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
  388. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
  389. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
  390. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  391. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  392. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  393. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
  394. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  395. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  396. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  397. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  398. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  399. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  400. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  401. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  402. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  403. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  404. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  405. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  406. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  407. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  408. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  409. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  410. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  411. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  412. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  413. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  414. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
  415. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  416. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  417. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  418. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  419. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
  420. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -0
  421. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  422. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +394 -0
  423. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  424. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  425. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  426. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  427. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +201 -1
  428. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  429. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  430. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  431. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
  432. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
  433. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
  434. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
  435. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  436. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  437. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
  438. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
  439. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  440. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  441. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  442. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  443. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  444. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  445. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +70 -0
  446. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
  447. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  448. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  449. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  450. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  451. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  452. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  453. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  454. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  455. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +72 -1
  456. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
  457. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  458. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  459. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  460. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  461. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  462. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  463. package/node_modules/@kardalum/api-schemas/package.json +2 -0
  464. package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
  465. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  466. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
  467. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
  468. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  469. package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
  470. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
  471. package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
  472. package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
  473. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
  474. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
  475. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
  476. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  477. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
  478. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  479. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
  480. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  481. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  482. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  483. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  484. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  485. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  486. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  487. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  488. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  489. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  490. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  491. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  492. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  493. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -0
  494. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  495. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  496. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +40 -0
  497. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  498. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  499. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  500. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
  501. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
  502. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
  503. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  504. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +99 -0
  505. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  506. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  507. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  508. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  509. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  510. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +5 -0
  511. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
  512. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
  513. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  514. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  515. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  516. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  517. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +150 -0
  518. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  519. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  520. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  521. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  522. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  523. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -0
  524. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  525. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  526. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +17 -0
  527. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  528. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  529. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  530. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  531. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
  532. package/node_modules/@kardalum/plugin-package/dist/index.js +7 -1
  533. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  534. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  535. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  536. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  537. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  538. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  539. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  540. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  541. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  542. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  543. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  544. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  545. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  546. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  547. package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
  548. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
  549. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
  550. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  551. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  552. package/package.json +25 -3
@@ -30,28 +30,74 @@
30
30
  * them, and they read as a closing caveat rather than as a feature.
31
31
  *
32
32
  * This package cannot name the SDK's `PluginContributions` (the SDK depends
33
- * on it), so the SDK asserts at the type level that these 17 keys are
34
- * exactly `keyof PluginContributions`: an eighteenth contribution added to the
33
+ * on it), so the SDK asserts at the type level that these keys are
34
+ * exactly `keyof PluginContributions`: a contribution added to the
35
35
  * contract and not classified here is a compile error in the SDK's build.
36
36
  */
37
37
  export const CONTRIBUTION_EMISSION_ORDER = [
38
38
  "dataTypes",
39
+ "dataTypeConfigs",
39
40
  "documentTypes",
40
41
  "adminSections",
41
42
  "railEntries",
42
43
  "dashboardWidgets",
44
+ "editorPanels",
45
+ "treeActions",
46
+ "richTextExtensions",
47
+ "contentColumns",
48
+ "treeBadges",
49
+ "listFilters",
50
+ "bulkActions",
51
+ "adminSlots",
43
52
  "templates",
44
53
  "assets",
45
54
  "themeTokens",
46
55
  "hooks",
56
+ "guards",
47
57
  "scheduledTasks",
48
58
  "mediaProcessors",
49
59
  "serializers",
50
60
  "apiRoutes",
61
+ "contentAccess",
62
+ "mediaAccess",
63
+ "userAccess",
64
+ "userFields",
65
+ "visitorIdentity",
66
+ "visitorGroups",
67
+ "visitorAccountSections",
68
+ "visitorData",
69
+ "siteRoutes",
70
+ "siteFallback",
71
+ "requestGuard",
72
+ "responseHeaders",
73
+ "pageGate",
74
+ "templateFilters",
75
+ "templateTags",
76
+ "pageHead",
77
+ "heldEmbeds",
78
+ "pageOutput",
79
+ "pageCache",
80
+ "protectionProviders",
81
+ "searchProviders",
82
+ "mediaStores",
83
+ "signInProviders",
84
+ "signInSteps",
85
+ "mailSenders",
86
+ "consentTools",
87
+ "formReplies",
88
+ "mailKinds",
89
+ "outboundRequests",
90
+ "secrets",
91
+ "sealedValues",
92
+ "serviceContracts",
51
93
  "exposedServices",
94
+ "usedServices",
95
+ "events",
52
96
  "notifications",
53
97
  "bundledPlugins",
54
98
  "bundledTemplate",
99
+ "aiContext",
100
+ "settings",
55
101
  ];
56
102
  /** The assertion kinds, in emission order. The SDK asserts these are
57
103
  * exactly `keyof PluginAssertions`, for the reason above. */
@@ -72,21 +118,19 @@ export const ASSERTION_KEYS = ["externalNetwork", "filesystemAccess"];
72
118
  * `apiRoutes`, and only for the tiers that let traffic reach a handler
73
119
  * without a signed-in session.
74
120
  *
75
- * `exposedServices`, `bundledPlugins` and `bundledTemplate` are not named
76
- * in section 6's automatic list, which enumerates a policy rather than the
77
- * contract's keys. They are classified mediated here rather than dropped:
78
- * the marketplace resolves the two bundle keys, and the cross-plugin
79
- * service registry (when it exists) is the host's own lookup.
80
- * `exposedServices` reads promised until you remember that plugin backend
81
- * code is unsandboxed and in-process already, so handing another plugin a
82
- * service adds a lookup rather than a privilege it could not otherwise
83
- * reach. Emitting them highlights nothing for the reviewer, since the host
84
- * enforces a mediated capability, and not emitting them would be the exact
85
- * failure this design exists to prevent, a declaration the install screen
86
- * does not disclose.
121
+ * `bundledPlugins` and `bundledTemplate` are not named in section 6's
122
+ * automatic list, which enumerates a policy rather than the contract's keys.
123
+ * They are classified mediated here rather than dropped: the marketplace
124
+ * resolves them. Emitting them highlights nothing for the reviewer, since the
125
+ * host enforces a mediated capability, and not emitting them would be the
126
+ * exact failure this design exists to prevent, a declaration the install
127
+ * screen does not disclose. The four service keys (M35 B1a) are mediated by
128
+ * the core's broker, as their rows below say.
87
129
  */
88
130
  const CONTRIBUTION_RULES = {
89
131
  dataTypes: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
132
+ // M32 J (J6): declared data types are disclosed under the id editors already have, as one capability.
133
+ dataTypeConfigs: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
90
134
  documentTypes: { derives: "one", id: "content.documentType", mediation: "mediated", actionGated: false },
91
135
  adminSections: { derives: "one", id: "admin.section", mediation: "mediated", actionGated: true },
92
136
  // S280: a rail entry in a built-in section. Mediated like a section: the
@@ -95,28 +139,126 @@ const CONTRIBUTION_RULES = {
95
139
  // they are disclosed under admin.section rather than counted here.
96
140
  railEntries: { derives: "one", id: "admin.railEntry", mediation: "mediated", actionGated: true },
97
141
  dashboardWidgets: { derives: "one", id: "admin.dashboardWidget", mediation: "mediated", actionGated: true },
142
+ // M32 F3: the host decides where a panel or a tree action renders and checks its action before it does.
143
+ editorPanels: { derives: "one", id: "admin.editorPanel", mediation: "mediated", actionGated: true },
144
+ treeActions: { derives: "one", id: "admin.treeAction", mediation: "mediated", actionGated: true },
145
+ // M35 C4a (W9, design D1): the core owns the schema, stores and checks every value and draws every item, and the
146
+ // partial is a template already mediated as render.template: mediated. A button view (C4b) names its own action.
147
+ richTextExtensions: { derives: "one", id: "content.richText", mediation: "mediated", actionGated: false },
148
+ // M35 C2 (W5, W26): the host draws them where it decides, calls the value functions within
149
+ // CONTENT_SLOT_CALL_TIME_MS, checks their answers as plain text and asks each one's action first.
150
+ contentColumns: { derives: "one", id: "admin.contentColumn", mediation: "mediated", actionGated: true },
151
+ treeBadges: { derives: "one", id: "admin.treeBadge", mediation: "mediated", actionGated: true },
152
+ listFilters: { derives: "one", id: "admin.listFilter", mediation: "mediated", actionGated: true },
153
+ bulkActions: { derives: "one", id: "admin.bulkAction", mediation: "mediated", actionGated: true },
154
+ adminSlots: { derives: "one", id: "admin.slot", mediation: "mediated", actionGated: true },
98
155
  templates: { derives: "one", id: "render.template", mediation: "mediated", actionGated: false },
99
156
  assets: { derives: "one", id: "render.asset", mediation: "mediated", actionGated: false },
100
157
  themeTokens: { derives: "one", id: "theme.tokens", mediation: "mediated", actionGated: false },
101
158
  hooks: { derives: "one", id: "server.hook", mediation: "mediated", actionGated: false },
159
+ // M35 B2 (W1): the host asks it and bounds it in time, but what it refuses is the plugin's code, so
160
+ // it is promised and stands under "Needs your consent".
161
+ guards: { derives: "one", id: "server.guard", mediation: "promised", actionGated: false },
102
162
  scheduledTasks: { derives: "one", id: "server.scheduledTask", mediation: "mediated", actionGated: false },
103
163
  mediaProcessors: { derives: "one", id: "media.processor", mediation: "mediated", actionGated: false },
104
164
  serializers: { derives: "one", id: "api.serializer", mediation: "mediated", actionGated: false },
105
- exposedServices: { derives: "one", id: "service.exposed", mediation: "mediated", actionGated: false },
165
+ // M35 B1a (W16): the broker finds the provider, checks the call against the owner's schemas and
166
+ // limits it in time, and the site owner approves each connection, so every one is mediated.
167
+ serviceContracts: { derives: "one", id: "service.contract", mediation: "mediated", actionGated: false },
168
+ exposedServices: { derives: "one", id: "service.offer", mediation: "mediated", actionGated: false },
169
+ usedServices: { derives: "one", id: "service.use", mediation: "mediated", actionGated: false },
170
+ events: { derives: "one", id: "event.raise", mediation: "mediated", actionGated: false },
106
171
  // S314n3 (D1): the one contribution that is promised. The host delivers each send, but
107
172
  // what the plugin sends, to whom and how often is the plugin's code, so a reviewer reads it.
108
173
  notifications: { derives: "one", id: "admin.notifications", mediation: "promised", actionGated: false },
109
174
  bundledPlugins: { derives: "one", id: "bundle.plugin", mediation: "mediated", actionGated: false },
110
175
  bundledTemplate: { derives: "one", id: "bundle.template", mediation: "mediated", actionGated: false },
111
176
  apiRoutes: { derives: "perApiRouteTier", actionGated: true },
177
+ // M32 F (D7): the host checks every call against the declaration and the route's action, so it is mediated.
178
+ contentAccess: { derives: "one", id: "content.access", mediation: "mediated", actionGated: false },
179
+ // M32 F4c (D10): every call goes through the management API as the plugin's subject, which holds only
180
+ // the declared actions, so the host decides the outcome: mediated.
181
+ mediaAccess: { derives: "one", id: "media.access", mediation: "mediated", actionGated: false },
182
+ // M35 U1 (W6): every call goes through the management user routes as the plugin's subject, so the host decides: mediated.
183
+ userAccess: { derives: "one", id: "users.access", mediation: "mediated", actionGated: false },
184
+ // M35 U1 (W6): the core stores, checks and draws the fields: mediated.
185
+ userFields: { derives: "one", id: "users.fields", mediation: "mediated", actionGated: false },
186
+ // M35 U2b (W8): the core hands the plugin a frozen copy of the facts it chose (mediated), and changes only the
187
+ // plugin's own groups (mediated). What a section's partial shows a visitor, and what the plugin exports and
188
+ // whether it erases, is the plugin's code: promised, so a reviewer reads it.
189
+ visitorIdentity: { derives: "one", id: "visitors.identify", mediation: "mediated", actionGated: false },
190
+ visitorGroups: { derives: "one", id: "visitors.groups", mediation: "mediated", actionGated: false },
191
+ visitorAccountSections: { derives: "one", id: "visitors.accountSections", mediation: "promised", actionGated: false },
192
+ visitorData: { derives: "one", id: "visitors.data", mediation: "promised", actionGated: false },
193
+ // M32 F2 (7.1): the host routes, budgets and escapes every call, so each is mediated.
194
+ siteRoutes: { derives: "one", id: "site.route", mediation: "mediated", actionGated: false },
195
+ siteFallback: { derives: "one", id: "site.fallback", mediation: "mediated", actionGated: false },
196
+ // M35 P2 (W2): the host bounds a guard in time and lets the request through when it fails, but what it
197
+ // refuses is the plugin's code, and it reads every visitor's address and headers: promised.
198
+ requestGuard: { derives: "one", id: "site.requestGuard", mediation: "promised", actionGated: false },
199
+ // M35 P2 (W2): the host checks every name against its list and every value, and keeps its own headers.
200
+ responseHeaders: { derives: "one", id: "site.responseHeaders", mediation: "mediated", actionGated: false },
201
+ // M35 P4 (W46): the host bounds a gate in time and lets the page through when it fails, but which live pages it
202
+ // redirects or removes is the plugin's code: promised, as a request guard is.
203
+ pageGate: { derives: "one", id: "site.pageGate", mediation: "promised", actionGated: false },
204
+ templateFilters: { derives: "one", id: "render.templateFilter", mediation: "mediated", actionGated: false },
205
+ templateTags: { derives: "one", id: "render.templateTag", mediation: "mediated", actionGated: false },
206
+ pageHead: { derives: "one", id: "render.pageHead", mediation: "mediated", actionGated: false },
207
+ // M33 K42: the core writes every placeholder and builds every frame, from a declared origin and
208
+ // path only and only after a visitor's click, so it decides the outcome: mediated.
209
+ heldEmbeds: { derives: "one", id: "render.heldEmbed", mediation: "mediated", actionGated: false },
210
+ // M35 P1 (W3): the host bounds the time and size and keeps the head out of reach, but what a
211
+ // transform writes into every page is the plugin's own: promised, so a reviewer reads it.
212
+ pageOutput: { derives: "one", id: "render.pageOutput", mediation: "promised", actionGated: false },
213
+ // M35 P4 (W32): the host checks every answer and writes every header itself: mediated.
214
+ pageCache: { derives: "one", id: "render.pageCache", mediation: "mediated", actionGated: false },
215
+ // M32 F4 (D8, D10): a provider is plugin code the host calls with the site's data (every posted form's
216
+ // fields and address, every published page, every uploaded file), so what it does with them is the
217
+ // plugin's: promised, read by a reviewer. A secret is kept encrypted by the host and handed only to
218
+ // the plugin's own server code, so the host decides the outcome: mediated.
219
+ protectionProviders: { derives: "one", id: "provider.formProtection", mediation: "promised", actionGated: false },
220
+ searchProviders: { derives: "one", id: "provider.search", mediation: "promised", actionGated: false },
221
+ mediaStores: { derives: "one", id: "provider.mediaStore", mediation: "promised", actionGated: false },
222
+ // M32 F4b (D48): a sign-in provider vouches for who signs in to the admin; for oauth2 its own
223
+ // `profile` decides it, so what the provider is trusted with is the plugin's: promised.
224
+ signInProviders: { derives: "one", id: "provider.signIn", mediation: "promised", actionGated: false },
225
+ // M35 U3a (D5): a step decides whether a person who passed the password gets in; what it lets through is
226
+ // the plugin's code, so it is promised. Shown at install as "can stop people signing in to the admin".
227
+ signInSteps: { derives: "one", id: "provider.signInStep", mediation: "promised", actionGated: false },
228
+ // M32 H (H2, H19): a mail sender sees every email the site sends (reset links included), and a form
229
+ // reply goes to an address a visitor typed, so what each does with them is the plugin's: promised.
230
+ mailSenders: { derives: "one", id: "provider.mail", mediation: "promised", actionGated: false },
231
+ // M35 P5 (W37): a consent tool's script runs on every page, decides what each visitor is asked and writes their choice:
232
+ // promised, so a reviewer reads it.
233
+ consentTools: { derives: "one", id: "provider.consent", mediation: "promised", actionGated: false },
234
+ formReplies: { derives: "one", id: "mail.formReplies", mediation: "promised", actionGated: false },
235
+ // M33 K11 (consolidation 3.15): the host bounds the kinds, the rates and the owner's switch, but to
236
+ // whom the plugin sends and what it writes is the plugin's code, kept to the authors' rule only by
237
+ // review: promised, so it stands under "Needs your consent".
238
+ mailKinds: { derives: "one", id: "mail.direct", mediation: "promised", actionGated: false },
239
+ // M33 K16 (consolidation 3.2): the host makes every call through the checked connection, refuses
240
+ // private networks and bounds the methods, so it decides the outcome: mediated.
241
+ outboundRequests: { derives: "one", id: "network.outbound", mediation: "mediated", actionGated: false },
242
+ secrets: { derives: "one", id: "secrets", mediation: "mediated", actionGated: false },
243
+ // M33 K17: the host seals and opens under a key per plugin and kind, so it decides the outcome: mediated.
244
+ sealedValues: { derives: "one", id: "secrets.sealedValues", mediation: "mediated", actionGated: false },
245
+ // M31.5 D (D9): text for an MCP host, read into the host's own instructions. A route marked as
246
+ // a tool (mcpTool) adds nothing either: its route's tier capability discloses it.
247
+ aiContext: { derives: "none", actionGated: false },
248
+ // M32 F4d (D1): a form the site owner fills grants the plugin no power; a secret field's power is the `secrets` capability.
249
+ settings: { derives: "none", actionGated: false },
112
250
  };
113
251
  /** Whether this contribution kind sits behind a named permission action.
114
252
  * Lives on CONTRIBUTION_RULES rather than in a separate list, because that
115
- * record is compiler-total over the 17 contribution keys: an eighteenth key
253
+ * record is compiler-total over the contribution keys: a new key
116
254
  * cannot be added without classifying it here. */
117
255
  export function isActionGated(key) {
118
256
  return CONTRIBUTION_RULES[key].actionGated;
119
257
  }
258
+ /** M31.5 D (D9): whether a contribution kind produces a capability at all (aiContext does not). */
259
+ export function derivesCapability(key) {
260
+ return CONTRIBUTION_RULES[key].derives !== "none";
261
+ }
120
262
  /**
121
263
  * The access tiers, in emission order, with the classification S267
122
264
  * section 6 gives each.
@@ -209,13 +351,16 @@ function vendorServiceHost(declaration) {
209
351
  * need to be pinned against it (the marketplace's static mirror) and for
210
352
  * the reference page S289 generates. */
211
353
  export const CAPABILITY_IDS = [
212
- STRUCTURED_STORAGE_ID,
213
- ...CONTRIBUTION_EMISSION_ORDER.flatMap((key) => {
214
- const rule = CONTRIBUTION_RULES[key];
215
- return rule.derives === "one" ? [rule.id] : API_ROUTE_TIERS.map((entry) => entry.id);
216
- }),
217
- ...ASSERTION_ENTRIES.map(([, id]) => id),
218
- VENDOR_SERVICE_ID,
354
+ // M32 J (J6): without repeats, each id at its first position: two keys derive content.dataType.
355
+ ...new Set([
356
+ STRUCTURED_STORAGE_ID,
357
+ ...CONTRIBUTION_EMISSION_ORDER.flatMap((key) => {
358
+ const rule = CONTRIBUTION_RULES[key];
359
+ return rule.derives === "one" ? [rule.id] : rule.derives === "none" ? [] : API_ROUTE_TIERS.map((entry) => entry.id);
360
+ }),
361
+ ...ASSERTION_ENTRIES.map(([, id]) => id),
362
+ VENDOR_SERVICE_ID,
363
+ ]),
219
364
  ];
220
365
  // ---------------------------------------------------------------------------
221
366
  // Reading a declaration's readable detail
@@ -239,12 +384,90 @@ function readableField(value) {
239
384
  }
240
385
  return null;
241
386
  }
242
- function describeEntry(entry) {
387
+ const CONTENT_ACCESS_WORDS = [
388
+ ["content.read", "read"],
389
+ ["content.create", "create drafts"],
390
+ ["content.update", "edit"],
391
+ ["content.publish", "publish"],
392
+ ["content.unpublish", "unpublish"],
393
+ ["content.delete", "move to the trash"],
394
+ ];
395
+ const MEDIA_ACCESS_WORDS = [
396
+ ["media.read", "read every file"],
397
+ ["media.create", "add files"],
398
+ ];
399
+ /** M32 F4c (D10): "read every file, add files", or null when the declaration names no action. */
400
+ function describeMediaAccess(entry) {
401
+ const actions = entry !== null && typeof entry === "object" ? entry.actions : undefined;
402
+ if (!Array.isArray(actions))
403
+ return null;
404
+ const words = MEDIA_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
405
+ return words.length === 0 ? null : words.join(", ");
406
+ }
407
+ const USER_ACCESS_WORDS = [
408
+ ["users.read", "read every account"],
409
+ ["users.update", "move people between its roles"],
410
+ ["roles.read", "read roles"],
411
+ ];
412
+ /** M35 U1: "read every account, read roles", or null when the declaration names no action. */
413
+ function describeUserAccess(entry) {
414
+ const actions = entry !== null && typeof entry === "object" ? entry.actions : undefined;
415
+ if (!Array.isArray(actions))
416
+ return null;
417
+ const words = USER_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
418
+ return words.length === 0 ? null : words.join(", ");
419
+ }
420
+ /** M35 U1: an account field's English label. */
421
+ function describeUserField(entry) {
422
+ return entry !== null && typeof entry === "object" ? readableField(entry.label) : null;
423
+ }
424
+ /** M32 F (D7): "Comment under Post: create drafts", or null when the entry names nothing readable. */
425
+ function describeContentAccess(record) {
426
+ // M35 C1 (W12): an allContent entry is its own line, so a wide grant is never hidden in a named list.
427
+ if (record.allContent === true)
428
+ return Array.isArray(record.actions) && record.actions.includes("content.read") ? "All content, drafts included: read" : null;
429
+ const type = readableField(record.documentType);
430
+ const actions = Array.isArray(record.actions) ? record.actions : [];
431
+ const words = CONTENT_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
432
+ if (type === null || words.length === 0)
433
+ return null;
434
+ const parents = Array.isArray(record.parents) ? record.parents.filter((p) => typeof p === "string" && p.trim() !== "") : [];
435
+ return `${type} ${parents.length > 0 ? `under ${parents.join(", ")}` : "(any parent)"}: ${words.join(", ")}`;
436
+ }
437
+ /** M32 G (G6): "New comment (content.publish, blog-moderator)", the label then the actions and roles the kind names. */
438
+ function describeNotificationKind(entry) {
439
+ const record = entry !== null && typeof entry === "object" ? entry : null;
440
+ if (record === null)
441
+ return null;
442
+ let label = readableField(record.label);
443
+ if (label === null && record.label !== null && typeof record.label === "object") {
444
+ for (const value of Object.values(record.label)) {
445
+ if (typeof value === "string" && value.trim() !== "") {
446
+ label = value;
447
+ break;
448
+ }
449
+ }
450
+ }
451
+ if (label === null)
452
+ return null;
453
+ const audience = record.audience !== null && typeof record.audience === "object" ? record.audience : {};
454
+ const named = [];
455
+ for (const list of [audience.actions, audience.roles]) {
456
+ if (Array.isArray(list))
457
+ for (const item of list)
458
+ if (typeof item === "string" && item.trim() !== "")
459
+ named.push(item);
460
+ }
461
+ return named.length > 0 ? `${label} (${named.join(", ")})` : label;
462
+ }
463
+ function describeEntry(entry, key) {
243
464
  if (typeof entry === "string")
244
465
  return entry.trim() || null;
245
466
  if (entry === null || typeof entry !== "object")
246
467
  return null;
247
468
  const record = entry;
469
+ if (key === "contentAccess" && (typeof record.documentType === "string" || record.allContent === true) && Array.isArray(record.actions))
470
+ return describeContentAccess(record);
248
471
  // An apiRoute is named by what it exposes, not by an id it has no field
249
472
  // for: "GET /orders" is the thing a reviewer looks up in the code.
250
473
  if (typeof record.method === "string" && typeof record.path === "string") {
@@ -257,6 +480,363 @@ function describeEntry(entry) {
257
480
  }
258
481
  return null;
259
482
  }
483
+ /** M32 F2 (D14): `<last id segment, "-" written "_">_<name>`, api-schemas' templateNameOf restated:
484
+ * this module is on the browser-loadable reference subpath, which imports nothing from api-schemas
485
+ * at run time (reference-entry.test.ts), and the SDK's capabilities test pins the two together. */
486
+ function templateName(pluginId, name) {
487
+ if (typeof pluginId !== "string")
488
+ return name;
489
+ return `${pluginId.slice(pluginId.lastIndexOf(".") + 1).split("-").join("_")}_${name}`;
490
+ }
491
+ /** CAPABILITY_NOTE_VALUE_MAX of api-schemas, restated because this module may not import it at run time;
492
+ * the SDK's capabilities test pins the two together through describeRoute's output. */
493
+ const NOTE_VALUE_MAX = 200;
494
+ /** M33 K4: a route's detail, "<method> <path>", with the core's `rawBody` note when it reads the request exactly
495
+ * as sent, and (M35 B3) the `takesFiles` note with its declared types when it takes files. A route with no note
496
+ * stays a plain string. */
497
+ function describeRoute(route) {
498
+ const text = describeEntry(route);
499
+ if (text === null)
500
+ return null;
501
+ const record = route !== null && typeof route === "object" ? route : {};
502
+ const notes = [];
503
+ if (record.rawBody === true)
504
+ notes.push("rawBody");
505
+ const types = record.uploads !== null && typeof record.uploads === "object" ? record.uploads.types : undefined;
506
+ if (Array.isArray(types)) {
507
+ const listed = types.filter((type) => typeof type === "string").join(", ");
508
+ notes.push({ id: "takesFiles", value: listed.length <= NOTE_VALUE_MAX ? listed : `${types.length} types` });
509
+ }
510
+ return notes.length > 0 ? { text, notes } : text;
511
+ }
512
+ /** M33 K11: a mail kind's label as written (a string or a map read in the reader's language), or null when it has none. */
513
+ function describeMailKind(entry) {
514
+ const label = entry !== null && typeof entry === "object" ? entry.label : undefined;
515
+ if (typeof label === "string")
516
+ return label.trim() === "" ? null : { text: label };
517
+ if (label === null || typeof label !== "object" || Array.isArray(label))
518
+ return null;
519
+ const map = {};
520
+ for (const [code, text] of Object.entries(label))
521
+ if (typeof text === "string")
522
+ map[code] = text;
523
+ return typeof map.en === "string" && map.en.trim() !== "" ? { text: map } : null;
524
+ }
525
+ /** A label as a detail's text: a string as written, or a map read in the reader's language (English required), else null. */
526
+ function labelText(label) {
527
+ if (typeof label === "string")
528
+ return label.trim() === "" ? null : label;
529
+ if (label === null || typeof label !== "object" || Array.isArray(label))
530
+ return null;
531
+ const map = {};
532
+ for (const [code, text] of Object.entries(label))
533
+ if (typeof text === "string")
534
+ map[code] = text;
535
+ return typeof map.en === "string" && map.en.trim() !== "" ? map : null;
536
+ }
537
+ /** M33 K16: the reason as the text and the methods as the core's `methods` note, or null with no readable reason. */
538
+ function describeOutboundRequests(entry) {
539
+ const record = entry !== null && typeof entry === "object" ? entry : null;
540
+ const text = record === null ? null : labelText(record.reason);
541
+ if (text === null || record === null)
542
+ return null;
543
+ const methods = Array.isArray(record.methods) ? record.methods.filter((m) => typeof m === "string" && m !== "") : [];
544
+ return methods.length === 0 ? { text } : { text, notes: [{ id: "methods", value: methods.join(", ") }] };
545
+ }
546
+ /** M33 K17: a sealed value kind's label as the text, with the `leavesServer` note when it is handed to visitors. */
547
+ function describeSealedValue(entry) {
548
+ const record = entry !== null && typeof entry === "object" ? entry : null;
549
+ const text = record === null ? null : labelText(record.label);
550
+ if (text === null || record === null)
551
+ return null;
552
+ return record.leavesServer === true ? { text, notes: ["leavesServer"] } : { text };
553
+ }
554
+ /** The longest privacy notice address read: api-schemas' HELD_EMBED_PRIVACY_URL_MAX, restated
555
+ * because this module imports nothing from api-schemas at run time (see templateName). */
556
+ const HELD_EMBED_PRIVACY_READ_MAX = 500;
557
+ /** The host of an https address, or null (the URL parser; no user or password). For the note's
558
+ * value only: the declaration's rules are plugin-held-embeds.ts's, run by the door and validate. */
559
+ function httpsHost(value) {
560
+ if (typeof value !== "string" || value.length === 0 || value.length > HELD_EMBED_PRIVACY_READ_MAX)
561
+ return null;
562
+ let url;
563
+ try {
564
+ url = new VendorUrlCtor(value);
565
+ }
566
+ catch {
567
+ return null;
568
+ }
569
+ return url.protocol === "https:" && url.username === "" && url.password === "" && url.host !== "" ? url.host : null;
570
+ }
571
+ /** M33 K42: a held embed's line, the provider as the text and the core's notes: where the frame
572
+ * comes from (origin and path prefix), the kind, and the privacy notice's host. A note whose value
573
+ * cannot be read is left out; a declaration with no readable provider gives no line. */
574
+ function describeHeldEmbed(entry) {
575
+ const record = entry !== null && typeof entry === "object" ? entry : null;
576
+ const text = record === null ? null : labelText(record.provider);
577
+ if (text === null || record === null)
578
+ return null;
579
+ const notes = [];
580
+ if (typeof record.origin === "string" && record.origin !== "" && typeof record.pathPrefix === "string" && record.pathPrefix !== "") {
581
+ notes.push({ id: "embedFrom", value: `${record.origin}${record.pathPrefix}` });
582
+ }
583
+ if (record.kind === "map")
584
+ notes.push("embedKindMap");
585
+ else if (record.kind === "content")
586
+ notes.push("embedKindContent");
587
+ const host = httpsHost(record.privacyNotice);
588
+ if (host !== null)
589
+ notes.push({ id: "privacyNoticeAt", value: host });
590
+ return notes.length === 0 ? { text } : { text, notes };
591
+ }
592
+ /** The user events that name an account, so the install screen says they identify people (M33 K20). */
593
+ const PEOPLE_HOOK_EVENTS = ["user:afterLogin", "user:afterCreate", "user:afterDelete", "user:afterChange"];
594
+ /** M33 K45: a plugin editor's name as `{ text }` (a string, or its label map read in the reader's
595
+ * language by every surface); with no readable name, the entry's other name fields as the text. */
596
+ function describeDataType(entry) {
597
+ const text = labelText(entry !== null && typeof entry === "object" ? entry.name : undefined);
598
+ if (text !== null)
599
+ return { text };
600
+ const fallback = describeEntry(entry, "dataTypes");
601
+ return fallback === null ? null : { text: fallback };
602
+ }
603
+ /** M33 K20: a hook event as a plain name, or with the core's notes for an account event and a durable one.
604
+ * The entry is the event name, or (a durable hook, live or redacted) `{ event, durable: true }`. */
605
+ function describeHook(entry) {
606
+ const record = entry !== null && typeof entry === "object" ? entry : null;
607
+ const event = typeof entry === "string" ? entry : typeof record?.event === "string" ? record.event : "";
608
+ if (event.trim() === "")
609
+ return null;
610
+ const notes = [];
611
+ if (PEOPLE_HOOK_EVENTS.includes(event))
612
+ notes.push("identifiesPeople");
613
+ if (record?.durable === true)
614
+ notes.push("durable");
615
+ return notes.length === 0 ? event : { text: event, notes };
616
+ }
617
+ /** M33 K51: a protection provider's line is its name, and for a provider with a widget script
618
+ * instead the bare line `<id>: public/<file>` with the core's `addsScript` note (Captcha design
619
+ * C2). The file's rule is the delivery check's and the attach check's; this module only shows
620
+ * what was declared. */
621
+ function describeProtectionProvider(entry) {
622
+ const record = entry !== null && typeof entry === "object" ? entry : null;
623
+ const id = record?.id;
624
+ const file = record?.widgetScript;
625
+ if (typeof id === "string" && id.trim() !== "" && typeof file === "string" && file.trim() !== "") {
626
+ return [{ text: `${id}: public/${file}`, notes: ["addsScript"] }];
627
+ }
628
+ const name = describeEntry(entry, "protectionProviders");
629
+ return name === null ? [] : [name];
630
+ }
631
+ /** M35 P5 (P5-D5): a consent tool's line is `<id>: public/<script>` with the core's `addsScript` note, as a protection
632
+ * provider's widget script reads, else its name. */
633
+ function describeConsentTool(entry) {
634
+ const record = entry !== null && typeof entry === "object" ? entry : null;
635
+ const id = record?.id;
636
+ const file = record?.script;
637
+ if (typeof id === "string" && id.trim() !== "" && typeof file === "string" && file.trim() !== "")
638
+ return [{ text: `${id}: public/${file}`, notes: ["addsScript"] }];
639
+ const name = describeEntry(entry, "consentTools");
640
+ return name === null ? [] : [name];
641
+ }
642
+ const RICH_TEXT_SHAPE_NOTES = { block: "richTextBlock", inline: "richTextInline", wrapper: "richTextWrapper" };
643
+ /** M35 C4a and C4b (design D1): a line per node and mark, its label as the plugin's words and its shape as the core's
644
+ * note (with its paste hosts and an editorial note, C4b), a line per button view naming its action, then one line
645
+ * with the count of the other toolbar buttons. Derived from the declarations, never declared twice. */
646
+ function describeRichTextExtensions(entry) {
647
+ const record = entry !== null && typeof entry === "object" && !Array.isArray(entry) ? entry : null;
648
+ if (record === null)
649
+ return [];
650
+ const out = [];
651
+ const valueOf = (text) => text.slice(0, NOTE_VALUE_MAX);
652
+ for (const raw of Array.isArray(record.nodes) ? record.nodes : []) {
653
+ const node = raw !== null && typeof raw === "object" ? raw : {};
654
+ const text = labelText(node.label);
655
+ // An own-property lookup: an unvalidated manifest's shape "constructor" must not find Object.prototype's function.
656
+ const note = typeof node.shape === "string" && Object.hasOwn(RICH_TEXT_SHAPE_NOTES, node.shape) ? RICH_TEXT_SHAPE_NOTES[node.shape] : undefined;
657
+ if (text === null || note === undefined)
658
+ continue;
659
+ const notes = [note];
660
+ const fromUrl = node.fromUrl !== null && typeof node.fromUrl === "object" ? node.fromUrl : null;
661
+ const hosts = Array.isArray(fromUrl?.hosts) ? fromUrl.hosts.filter((host) => typeof host === "string") : [];
662
+ if (hosts.length > 0)
663
+ notes.push({ id: "richTextPasteHosts", value: valueOf(hosts.join(", ")) });
664
+ if (node.editorial === true)
665
+ notes.push("richTextEditorial");
666
+ out.push({ text, notes });
667
+ }
668
+ for (const raw of Array.isArray(record.marks) ? record.marks : []) {
669
+ const mark = raw !== null && typeof raw === "object" ? raw : {};
670
+ const text = labelText(mark.label);
671
+ if (text !== null)
672
+ out.push({ text, notes: mark.editorial === true ? ["richTextMark", "richTextEditorial"] : ["richTextMark"] });
673
+ }
674
+ let plain = 0;
675
+ for (const raw of Array.isArray(record.buttons) ? record.buttons : []) {
676
+ const button = raw !== null && typeof raw === "object" ? raw : {};
677
+ const does = button.does !== null && typeof button.does === "object" ? button.does : {};
678
+ const text = labelText(button.label);
679
+ if (typeof does.action === "string" && text !== null)
680
+ out.push({ text, notes: [{ id: "richTextButtonView", value: valueOf(does.action) }] });
681
+ else
682
+ plain += 1;
683
+ }
684
+ if (plain > 0)
685
+ out.push({ text: "", notes: [{ id: "richTextButtons", value: String(plain) }] });
686
+ return out;
687
+ }
688
+ /** The detail lines of a `derives: "one"` contribution. */
689
+ /** M35 B1a: whether any method's output schema marks a field personal: a bounded walk (depth 8, 512 nodes), the contract subset's own caps. */
690
+ function carriesPersonal(methods) {
691
+ let nodes = 0;
692
+ const walk = (node, depth) => {
693
+ nodes += 1;
694
+ if (nodes > 512 || depth > 8 || node === null || typeof node !== "object" || Array.isArray(node))
695
+ return false;
696
+ const record = node;
697
+ if (record.personal === true)
698
+ return true;
699
+ if (Array.isArray(record.anyOf) && record.anyOf.some((branch) => walk(branch, depth)))
700
+ return true;
701
+ if (record.items !== undefined && walk(record.items, depth + 1))
702
+ return true;
703
+ const properties = record.properties;
704
+ return properties !== null && typeof properties === "object" && Object.values(properties).some((child) => walk(child, depth + 1));
705
+ };
706
+ return methods.some((method) => method !== null && typeof method === "object" && walk(method.output, 0));
707
+ }
708
+ function detailsOf(key, entries, pluginId) {
709
+ if (key === "protectionProviders")
710
+ return entries.flatMap(describeProtectionProvider);
711
+ if (key === "consentTools")
712
+ return entries.flatMap(describeConsentTool);
713
+ // M35 U3a: a step as "<its English label> (<kind>)".
714
+ if (key === "signInSteps") {
715
+ return entries.flatMap((entry) => {
716
+ const step = entry !== null && typeof entry === "object" ? entry : null;
717
+ const label = step?.label;
718
+ const text = typeof label === "string" ? label : typeof label === "object" && label !== null ? label.en : undefined;
719
+ const kind = typeof step?.kind === "string" ? step.kind : "";
720
+ return typeof text === "string" && text.trim() !== "" && text.length <= 200 ? [{ text: kind === "" ? text : `${text} (${kind})` }] : [];
721
+ });
722
+ }
723
+ if (key === "guards") {
724
+ return entries.flatMap((entry) => {
725
+ const point = entry !== null && typeof entry === "object" ? entry.point : undefined;
726
+ return typeof point === "string" && point.trim() !== "" ? [point] : [];
727
+ });
728
+ }
729
+ if (key === "hooks")
730
+ return entries.map(describeHook).filter((detail) => detail !== null);
731
+ if (key === "outboundRequests")
732
+ return entries.map(describeOutboundRequests).filter((detail) => detail !== null);
733
+ if (key === "heldEmbeds")
734
+ return entries.map(describeHeldEmbed).filter((detail) => detail !== null);
735
+ if (key === "sealedValues")
736
+ return entries.map(describeSealedValue).filter((detail) => detail !== null);
737
+ if (key === "mailKinds")
738
+ return entries.map(describeMailKind).filter((detail) => detail !== null);
739
+ if (key === "templateFilters" || key === "templateTags") {
740
+ return entries.flatMap((entry) => {
741
+ const name = entry !== null && typeof entry === "object" ? entry.name : undefined;
742
+ return typeof name === "string" && name.trim() !== "" ? [templateName(pluginId, name)] : [];
743
+ });
744
+ }
745
+ // M35 P2 (W2): each is code; there is nothing to show beside its label.
746
+ if (key === "requestGuard" || key === "responseHeaders" || key === "pageGate")
747
+ return [];
748
+ if (key === "richTextExtensions")
749
+ return entries.flatMap(describeRichTextExtensions);
750
+ // M35 P2 (W21): a site route's detail is "<method> <path>", noted when it reads the request exactly as sent.
751
+ if (key === "siteRoutes")
752
+ return entries.map(describeRoute).filter((detail) => detail !== null);
753
+ // M35 P1 (W3): a transform is code; there is nothing to show beside its label.
754
+ if (key === "pageOutput" || key === "pageCache")
755
+ return [];
756
+ if (key === "pageHead") {
757
+ // The bare origins: the capability's label and shopper text say what they are, in every
758
+ // locale, and a detail is shown as written. M33 K27: then, for a head that declares
759
+ // `setsTitle: true`, a detail that is only the core's note "may set the page title".
760
+ // M35 P1: and for `inlineSnippets: true` the note "writes its own code into every page".
761
+ return entries.flatMap((entry) => {
762
+ const head = entry !== null && typeof entry === "object" ? entry : null;
763
+ const origins = head?.scriptOrigins;
764
+ const lines = Array.isArray(origins) ? origins.filter((o) => typeof o === "string" && o.trim() !== "") : [];
765
+ if (head?.setsTitle === true)
766
+ lines.push({ text: "", notes: ["setsTitle"] });
767
+ // M35 P1 (W40): a head that writes inline code says so beside its origins.
768
+ if (head?.inlineSnippets === true)
769
+ lines.push({ text: "", notes: ["inlineCode"] });
770
+ return lines;
771
+ });
772
+ }
773
+ if (key === "notifications")
774
+ return entries.map(describeNotificationKind).filter((detail) => detail !== null);
775
+ if (key === "mediaAccess")
776
+ return entries.map(describeMediaAccess).filter((detail) => detail !== null);
777
+ if (key === "userAccess")
778
+ return entries.map(describeUserAccess).filter((detail) => detail !== null);
779
+ if (key === "userFields")
780
+ return entries.map(describeUserField).filter((detail) => detail !== null);
781
+ // M35 U2b (W8): the identity notes that it reads the email; a group or a section is its declared id; the data
782
+ // declaration is code, with nothing to show beside its label.
783
+ if (key === "visitorIdentity") {
784
+ return entries.flatMap((entry) => (entry !== null && typeof entry === "object" && entry.email === true ? [{ text: "", notes: ["readsVisitorEmail"] }] : []));
785
+ }
786
+ if (key === "visitorGroups" || key === "visitorAccountSections") {
787
+ return entries.flatMap((entry) => {
788
+ const id = entry !== null && typeof entry === "object" ? entry.id : undefined;
789
+ return typeof id === "string" && id.trim() !== "" && id.length <= 200 ? [id] : [];
790
+ });
791
+ }
792
+ if (key === "visitorData")
793
+ return [];
794
+ if (key === "dataTypes")
795
+ return entries.map(describeDataType).filter((detail) => detail !== null);
796
+ if (key === "dataTypeConfigs") {
797
+ // M32 J (J6): "<name> (<the editor id's last segment>)", e.g. "Highlight (group)". M33 K45: as
798
+ // `{ text }`, the same kind of line as a plugin editor's name beside it.
799
+ return entries.flatMap((entry) => {
800
+ const declared = entry !== null && typeof entry === "object" ? entry : null;
801
+ const name = typeof declared?.name === "string" ? declared.name.trim() : "";
802
+ if (name === "")
803
+ return [];
804
+ const editorId = typeof declared?.editorId === "string" ? declared.editorId : "";
805
+ const kind = editorId.slice(editorId.lastIndexOf(".") + 1);
806
+ return [{ text: kind === "" ? name : `${name} (${kind})` }];
807
+ });
808
+ }
809
+ // M35 B1a: a contract as "<name> <version>" with a note when an answer carries personal data; an
810
+ // offer as "<contract> <version>"; a use as "<contract> <range>", noted when optional; an event its name.
811
+ if (key === "serviceContracts" || key === "exposedServices" || key === "usedServices" || key === "events") {
812
+ return entries.flatMap((entry) => {
813
+ const record = entry !== null && typeof entry === "object" ? entry : null;
814
+ const textOf = (value) => (typeof value === "string" && value.trim() !== "" && value.length <= 200 ? value : null);
815
+ if (record === null)
816
+ return [];
817
+ if (key === "events") {
818
+ const name = textOf(record.name);
819
+ return name === null ? [] : [name];
820
+ }
821
+ if (key === "serviceContracts") {
822
+ const name = textOf(record.name);
823
+ const version = textOf(record.version);
824
+ if (name === null || version === null)
825
+ return [];
826
+ const methods = record.methods !== null && typeof record.methods === "object" ? Object.values(record.methods) : [];
827
+ return [carriesPersonal(methods) ? { text: `${name} ${version}`, notes: ["carriesPersonalData"] } : { text: `${name} ${version}` }];
828
+ }
829
+ const contract = textOf(record.contract);
830
+ const tail = textOf(key === "exposedServices" ? record.version : record.range);
831
+ if (contract === null || tail === null)
832
+ return [];
833
+ const line = `${contract} ${tail}`;
834
+ return key === "usedServices" && record.optional === true ? [{ text: line, notes: ["optionalUse"] }] : [line];
835
+ });
836
+ }
837
+ // A bare string is no content access entry (they are objects), so it counts but names nothing.
838
+ return entries.map((entry) => (key === "contentAccess" && typeof entry === "string" ? null : describeEntry(entry, key))).filter((detail) => detail !== null);
839
+ }
260
840
  /**
261
841
  * Normalises one declared contribution value into the entries that
262
842
  * produced it, handling the three shapes the contract uses: a list, the
@@ -287,8 +867,15 @@ function declaredEntries(key, value) {
287
867
  return [];
288
868
  // `hooks` is Record<event, handler> live and string[] once redacted; the
289
869
  // array branch above already covered the redacted form.
290
- if (key === "hooks")
291
- return Object.keys(value);
870
+ // M33 K18: a durable entry (`{ handler, durable: true }`) is read as `{ event, durable: true }`, the form
871
+ // the redacted list carries, so one reader serves both.
872
+ if (key === "hooks") {
873
+ return Object.entries(value).map(([event, hook]) => hook !== null && typeof hook === "object" && hook.durable === true ? { event, durable: true } : event);
874
+ }
875
+ // M35 U2b (W8): `visitorIdentity: {}` is the declaration itself (the visitor without the email), so an
876
+ // empty object is one entry here, the one key where it is.
877
+ if (key === "visitorIdentity")
878
+ return [value];
292
879
  // A present-but-empty object buys nothing, which is the rule the array
293
880
  // branch gets for free: `themeTokens: {}` declares no tokens, so it is
294
881
  // not a theme capability.
@@ -336,15 +923,18 @@ export function deriveCapabilities(manifest) {
336
923
  if (entries.length === 0)
337
924
  continue;
338
925
  const rule = CONTRIBUTION_RULES[key];
926
+ if (rule.derives === "none")
927
+ continue;
339
928
  if (rule.derives === "one") {
340
- capabilities.push({
341
- id: rule.id,
342
- payload: {
343
- count: entries.length,
344
- details: entries.map(describeEntry).filter((detail) => detail !== null),
345
- },
346
- mediation: rule.mediation,
347
- });
929
+ const details = detailsOf(key, entries, source.id);
930
+ const at = capabilities.findIndex((capability) => capability.id === rule.id);
931
+ if (at !== -1) {
932
+ // M32 J (J6): dataTypeConfigs derives content.dataType beside dataTypes, as one capability.
933
+ const before = capabilities[at];
934
+ capabilities[at] = { ...before, payload: { count: before.payload.count + entries.length, details: [...before.payload.details, ...details] } };
935
+ continue;
936
+ }
937
+ capabilities.push({ id: rule.id, payload: { count: entries.length, details }, mediation: rule.mediation });
348
938
  continue;
349
939
  }
350
940
  // One contribution, up to three capabilities: the routes are grouped
@@ -358,7 +948,7 @@ export function deriveCapabilities(manifest) {
358
948
  id: tier.id,
359
949
  payload: {
360
950
  count: routes.length,
361
- details: routes.map(describeEntry).filter((detail) => detail !== null),
951
+ details: routes.map(describeRoute).filter((detail) => detail !== null),
362
952
  },
363
953
  mediation: tier.mediation,
364
954
  });