@kardalum/plugin-sdk 0.18.0 → 0.20.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 (435) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +20 -1
  3. package/dist/admin-section-registry.d.ts +16 -1
  4. package/dist/admin-section-registry.js +23 -0
  5. package/dist/assets/asset-picker.js +3 -3
  6. package/dist/built-in-editor-ids.d.ts +1 -1
  7. package/dist/built-in-editor-ids.js +2 -20
  8. package/dist/built-in-serializers.js +1 -1
  9. package/dist/built-in-settings-schemas.d.ts +10 -0
  10. package/dist/built-in-settings-schemas.js +90 -4
  11. package/dist/built-in-value-schemas.js +35 -0
  12. package/dist/built-ins.js +48 -17
  13. package/dist/capabilities.d.ts +11 -1
  14. package/dist/capabilities.js +55 -3
  15. package/dist/cli.d.ts +66 -0
  16. package/dist/cli.js +22 -0
  17. package/dist/content-library.d.ts +85 -0
  18. package/dist/content-library.js +15 -0
  19. package/dist/content-picker/page-picker-sheet.d.ts +13 -0
  20. package/dist/content-picker/page-picker-sheet.js +105 -0
  21. package/dist/content-picker/page-tree.d.ts +25 -0
  22. package/dist/content-picker/page-tree.js +132 -0
  23. package/dist/data-type-plugin.d.ts +9 -3
  24. package/dist/datatype-validation.d.ts +6 -11
  25. package/dist/datatype-validation.js +141 -3
  26. package/dist/define-plugin.d.ts +4 -4
  27. package/dist/define-plugin.js +5 -5
  28. package/dist/entitlement-entry.d.ts +1 -1
  29. package/dist/entitlement-entry.js +1 -1
  30. package/dist/entitlement-gate.d.ts +14 -0
  31. package/dist/entitlement-gate.js +64 -7
  32. package/dist/entitlement-plan.d.ts +6 -0
  33. package/dist/entitlement-plan.js +10 -0
  34. package/dist/entitlement-types.d.ts +36 -12
  35. package/dist/entitlement.d.ts +31 -4
  36. package/dist/entitlement.js +58 -17
  37. package/dist/hook-entry.d.ts +5 -0
  38. package/dist/hook-entry.js +30 -0
  39. package/dist/host-entry.d.ts +1 -1
  40. package/dist/host-entry.js +1 -1
  41. package/dist/index.d.ts +38 -4
  42. package/dist/index.js +54 -3
  43. package/dist/mail.d.ts +30 -0
  44. package/dist/mail.js +1 -0
  45. package/dist/manifest-entry.d.ts +29 -4
  46. package/dist/manifest-entry.js +39 -2
  47. package/dist/manifest-schema.d.ts +443 -29
  48. package/dist/manifest-schema.js +292 -24
  49. package/dist/manifest.d.ts +450 -51
  50. package/dist/manifest.js +1 -1
  51. package/dist/media/media-picker.js +33 -20
  52. package/dist/media/upload-error.d.ts +5 -1
  53. package/dist/media/upload-error.js +14 -2
  54. package/dist/media-library.d.ts +32 -0
  55. package/dist/media-library.js +15 -0
  56. package/dist/nested-field-host.d.ts +76 -0
  57. package/dist/nested-field-host.js +90 -0
  58. package/dist/notify.d.ts +12 -4
  59. package/dist/notify.js +1 -1
  60. package/dist/outbound.d.ts +47 -0
  61. package/dist/outbound.js +1 -0
  62. package/dist/plugin-context.d.ts +5 -0
  63. package/dist/plugin-context.js +3 -3
  64. package/dist/plugin-screen-context.d.ts +112 -0
  65. package/dist/plugin-screen-context.js +26 -0
  66. package/dist/providers.d.ts +268 -0
  67. package/dist/providers.js +74 -0
  68. package/dist/read-all-pages.d.ts +5 -0
  69. package/dist/read-all-pages.js +3 -2
  70. package/dist/register-built-ins.js +6 -6
  71. package/dist/registry.js +1 -1
  72. package/dist/richtext/block-panel.js +12 -7
  73. package/dist/richtext/extensions.js +7 -7
  74. package/dist/richtext/insert-menu.js +12 -9
  75. package/dist/richtext/style-listbox.js +7 -5
  76. package/dist/richtext/text-style-class.js +1 -1
  77. package/dist/sdk-strings.d.ts +285 -0
  78. package/dist/sdk-strings.js +347 -0
  79. package/dist/sealing.d.ts +14 -0
  80. package/dist/sealing.js +1 -0
  81. package/dist/simple-storage-value-provider.js +27 -27
  82. package/dist/structured-storage-types.d.ts +309 -9
  83. package/dist/structured-storage-types.js +2 -2
  84. package/dist/text-entry.d.ts +1 -0
  85. package/dist/text-entry.js +6 -0
  86. package/dist/tokens/tailwind-theme.css +5 -0
  87. package/dist/tokens/tokens.css +15 -3
  88. package/dist/tokens/tokens.json +8 -3
  89. package/dist/ui-entry.js +3 -3
  90. package/dist/views/asset-view.js +6 -3
  91. package/dist/views/content-list-preview.js +3 -1
  92. package/dist/views/content-list-settings-view.js +11 -7
  93. package/dist/views/content-list-view.d.ts +5 -3
  94. package/dist/views/content-list-view.js +38 -34
  95. package/dist/views/content-picker-view.d.ts +3 -0
  96. package/dist/views/content-picker-view.js +143 -0
  97. package/dist/views/crop-view.d.ts +4 -6
  98. package/dist/views/crop-view.js +22 -13
  99. package/dist/views/date-range-view.js +9 -6
  100. package/dist/views/file-upload-view.d.ts +5 -7
  101. package/dist/views/file-upload-view.js +16 -7
  102. package/dist/views/group-view.d.ts +8 -0
  103. package/dist/views/group-view.js +123 -0
  104. package/dist/views/html-code-editor.js +2 -2
  105. package/dist/views/html-view.js +12 -11
  106. package/dist/views/image-view.js +40 -22
  107. package/dist/views/link-view.d.ts +3 -0
  108. package/dist/views/link-view.js +150 -0
  109. package/dist/views/options-list-view.d.ts +3 -0
  110. package/dist/views/options-list-view.js +104 -0
  111. package/dist/views/repeatable-list-view.d.ts +3 -0
  112. package/dist/views/repeatable-list-view.js +113 -0
  113. package/dist/views/rich-text-view.js +32 -16
  114. package/dist/views/suggest-key.d.ts +17 -0
  115. package/dist/views/suggest-key.js +55 -0
  116. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
  117. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
  118. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  119. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  120. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  122. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  123. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
  124. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
  125. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  126. package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +1 -1
  127. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
  128. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
  129. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  130. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
  131. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +116 -3
  132. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +71 -18
  133. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
  134. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
  135. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  136. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  137. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  138. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  139. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  140. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  141. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -3
  142. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +1 -1
  143. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  144. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  145. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  146. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  147. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  148. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  149. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
  150. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
  151. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  152. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +9 -1
  153. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +4 -4
  154. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  155. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  156. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +267 -12
  157. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +54 -8
  158. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  159. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +98 -13
  160. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  161. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  162. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  163. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  164. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  165. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  166. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +122 -43
  167. package/node_modules/@kardalum/api-schemas/dist/index.js +92 -27
  168. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  169. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  170. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  171. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  172. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  173. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  174. package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.d.ts +46 -0
  175. package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.js +52 -0
  176. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
  177. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
  178. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  179. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  180. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  181. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  182. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +359 -8
  183. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +85 -11
  184. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  185. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  186. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  187. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  188. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  189. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  190. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  191. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  192. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  193. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  194. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  195. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  196. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  197. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  198. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
  199. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +22 -10
  200. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  201. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  202. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  203. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  204. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  205. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
  206. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +9 -5
  207. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  208. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  209. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
  210. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
  211. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  212. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  213. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  214. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  215. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  216. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  217. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  218. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  219. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  220. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  221. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  223. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  226. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  227. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  228. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  229. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  230. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
  231. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
  232. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  233. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  234. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
  235. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +1 -0
  236. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
  237. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
  238. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  239. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  240. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
  241. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
  242. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
  243. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
  244. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  245. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  246. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  247. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  248. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
  249. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
  250. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  251. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  252. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  253. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  254. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
  255. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
  256. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
  257. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
  258. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  259. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  260. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  261. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  262. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +357 -4
  263. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +279 -0
  264. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
  265. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
  266. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  267. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  268. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
  269. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
  270. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  271. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  272. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  273. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  274. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  275. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  276. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
  277. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
  278. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  279. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  280. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +1 -1
  281. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  282. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  283. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  284. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  285. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
  286. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
  287. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
  288. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
  289. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  290. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +50 -7
  291. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  292. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  293. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  294. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  295. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  296. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  297. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  298. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  299. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
  300. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +4 -4
  301. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +1 -1
  302. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  303. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
  304. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
  305. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  306. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
  307. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  308. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  309. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  310. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  311. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
  312. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +289 -0
  313. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +205 -0
  314. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +121 -0
  315. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +51 -10
  316. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
  317. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
  318. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  319. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  320. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +1 -1
  321. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  322. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  323. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
  324. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
  325. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +1 -1
  326. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  327. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  328. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +1 -1
  329. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +1 -1
  330. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  331. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  332. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  333. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  334. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
  335. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +35 -4
  336. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  337. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  338. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  339. package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +1 -1
  340. package/node_modules/@kardalum/design-tokens/dist/build-css.js +8 -2
  341. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
  342. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
  343. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +3 -3
  344. package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +2 -2
  345. package/node_modules/@kardalum/design-tokens/dist/theme-css.js +2 -2
  346. package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +2 -2
  347. package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +3 -3
  348. package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +3 -3
  349. package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +1 -1
  350. package/node_modules/@kardalum/design-tokens/dist/themes/light.js +1 -1
  351. package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
  352. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +4 -4
  353. package/node_modules/@kardalum/design-tokens/dist/tokens.js +17 -8
  354. package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
  355. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +2 -2
  356. package/node_modules/@kardalum/design-tokens/dist/types.js +1 -1
  357. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
  358. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
  359. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  360. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
  361. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  362. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
  363. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  364. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  365. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  366. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  367. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  368. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  369. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  370. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
  371. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  372. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  373. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
  374. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  375. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  376. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
  377. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
  378. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
  379. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  380. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
  381. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  382. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  383. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  384. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
  385. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
  386. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +27 -5
  387. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  388. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  389. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
  390. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  391. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
  392. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  393. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  394. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
  395. package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +2 -2
  396. package/node_modules/@kardalum/plugin-package/dist/envelope.js +2 -2
  397. package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +3 -3
  398. package/node_modules/@kardalum/plugin-package/dist/extract.js +9 -9
  399. package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +1 -1
  400. package/node_modules/@kardalum/plugin-package/dist/hash.js +1 -1
  401. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
  402. package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
  403. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  404. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  405. package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +2 -2
  406. package/node_modules/@kardalum/plugin-package/dist/package-contract.js +5 -5
  407. package/node_modules/@kardalum/plugin-package/dist/types.d.ts +1 -1
  408. package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +1 -1
  409. package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +8 -3
  410. package/node_modules/@kardalum/ui/dist/components/badge.js +1 -1
  411. package/node_modules/@kardalum/ui/dist/components/button.js +1 -1
  412. package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +1 -1
  413. package/node_modules/@kardalum/ui/dist/components/dialog.js +49 -4
  414. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +5 -1
  415. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +18 -5
  416. package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +4 -4
  417. package/node_modules/@kardalum/ui/dist/components/input.js +6 -1
  418. package/node_modules/@kardalum/ui/dist/components/property-field.js +3 -3
  419. package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +1 -1
  420. package/node_modules/@kardalum/ui/dist/components/sheet.js +12 -7
  421. package/node_modules/@kardalum/ui/dist/components/skeleton.js +1 -1
  422. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  423. package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +3 -3
  424. package/node_modules/@kardalum/ui/dist/components/toast.js +4 -3
  425. package/node_modules/@kardalum/ui/dist/components/tooltip.d.ts +27 -0
  426. package/node_modules/@kardalum/ui/dist/components/tooltip.js +81 -0
  427. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +16 -0
  428. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +95 -0
  429. package/node_modules/@kardalum/ui/dist/components/use-toast.js +2 -2
  430. package/node_modules/@kardalum/ui/dist/index.d.ts +3 -1
  431. package/node_modules/@kardalum/ui/dist/index.js +3 -1
  432. package/node_modules/@kardalum/ui/dist/lib/menu-host.d.ts +5 -0
  433. package/node_modules/@kardalum/ui/dist/lib/menu-host.js +17 -0
  434. package/node_modules/@kardalum/ui/package.json +8 -6
  435. package/package.json +18 -7
@@ -1,10 +1,18 @@
1
1
  import { z } from "zod";
2
+ import { END_EFFECTS, LicenseVerdictEndWireSchema } from "./sale-conditions.schema.js";
2
3
  import { PluginReadOnlyNoticeSchema } from "./plugin-read-only.schema.js";
4
+ import { ActionStringSchema } from "./action.schema.js";
3
5
  import { PluginRoleOfferSchema } from "./plugin-actions.schema.js";
6
+ import { PLUGIN_ACTION_OFFER_TARGETS } from "./plugin-manifest-actions.js";
7
+ import { PluginLabelSchema } from "./plugin-labels.js";
4
8
  import { InstallRoleOutcomeSchema } from "./plugin-install-record.schema.js";
5
9
  import { SampleContentOutcomeSchema } from "./sample-content-outcome.schema.js";
10
+ import { SignInSwitchedOffSchema } from "./install-sign-in-switched-off.schema.js";
6
11
  import { InstallWarningsSchema } from "./install-warnings.schema.js";
7
12
  import { STORAGE_TYPES } from "./plugin-vocabulary.js";
13
+ import { SITE_REACH_RESETS_MAX } from "./licensing.schema.js";
14
+ import { PROVIDER_KINDS, PROVIDER_TABLE_KINDS } from "./plugin-providers.js";
15
+ import { SERVICE_CLOSING_NOTICE_KIND, SHARING_NOTICE_KIND, SITE_KEY_MAX, STAGING_NOTICE_KIND, SharingNoticeSchema } from "./marketplace-sites.schema.js";
8
16
  // The ADMIN management view of the registry (S135): unlike the public
9
17
  // GET /api/plugins (enabled-only, boot-loader metadata), this surface
10
18
  // lists every installed plugin, disabled included. licenseStatus reflects
@@ -49,15 +57,39 @@ import { STORAGE_TYPES } from "./plugin-vocabulary.js";
49
57
  * role with its id already exists, so the view can hide "Create role"
50
58
  * without reading the roles list (which needs roles.read). */
51
59
  export const ManagedPluginRoleOfferSchema = PluginRoleOfferSchema.extend({ created: z.boolean() });
60
+ /** M33 K29: an action the attached manifest offers to the roles holding `target`; `applied` once
61
+ * it was given (at install or by Apply), otherwise it waits with "Apply". `default` is the derived
62
+ * tick of the install screen. */
63
+ export const ManagedPluginActionOfferSchema = z.object({
64
+ // A plugin offers only its own action, so the reference's example names one (never a core action).
65
+ action: ActionStringSchema.meta({ example: "com.example.words.panel.view" }),
66
+ label: PluginLabelSchema,
67
+ target: z.enum(PLUGIN_ACTION_OFFER_TARGETS),
68
+ default: z.boolean(),
69
+ applied: z.boolean(),
70
+ });
71
+ /** M33 K29: what Apply gave: the offered action, its target, and the roles that gained it. */
72
+ export const ActionOfferAppliedResponseSchema = z.object({ action: ActionStringSchema.meta({ example: "com.example.words.panel.view" }), target: z.enum(PLUGIN_ACTION_OFFER_TARGETS), roles: z.array(z.string()) });
52
73
  /** S284b: the marketplace's classification of an installed package that is
53
74
  * not the one it delivered for the licence (the verdict's `tamper`). */
54
75
  export const PluginTamperKindSchema = z.enum(["foreign-package", "sideloaded", "modified-on-disk"]);
76
+ /** M32 I (R12): what switching a plugin off does, derived from what it declares. */
77
+ export const SWITCH_OFF_EFFECTS = ["keepsSiteContent", "hidesScreens", "stopsServerCode", "stopsTemplateExtensions", "providersFallBack"];
55
78
  export const ManagedPluginSchema = z.object({
79
+ switchOffEffects: z.array(z.enum(SWITCH_OFF_EFFECTS)),
56
80
  pluginId: z.string(),
57
81
  // S318: present only when the licence term lapsed (the plugin is read-only).
58
82
  readOnly: PluginReadOnlyNoticeSchema.optional(),
59
83
  name: z.string(),
60
84
  type: z.string(),
85
+ // S349 (D1): the member plugins this plugin declares
86
+ // (contributions.bundledPlugins), in declaration order. A plugin that
87
+ // declares members is a bundle, whatever its `type`. Optional so an answer
88
+ // from a server before S349 still reads; this server always sends it.
89
+ bundledPlugins: z
90
+ .array(z.string())
91
+ .optional()
92
+ .describe("The member plugins this plugin declares (contributions.bundledPlugins), in declaration order; empty when it declares none. A plugin that declares members is a bundle, whatever its `type`."),
61
93
  version: z.string(),
62
94
  trustTier: z.enum(["verified", "unverified"]),
63
95
  storageType: z.enum(STORAGE_TYPES),
@@ -71,11 +103,71 @@ export const ManagedPluginSchema = z.object({
71
103
  // marketplace operator's reason for a `domain_blocked` answer, which the
72
104
  // admin shows after its sentence. Null when the verdict carried none.
73
105
  licenseReasonDetail: z.string().nullable(),
106
+ // S367b: the signed notice of the stored verdict, read through the shared
107
+ // schema. Optional so an answer from a server before it still reads.
108
+ licenseNotice: SharingNoticeSchema.nullable()
109
+ .optional()
110
+ .describe("A notice the marketplace signed on the stored verdict: where the key was refused while a sharing case is under 30 days old (key-seen-elsewhere), the seated site this staging site belongs to (staging-site), or the day Kardalum's licence service ends, after which this site checks no more (service-closing). Null when there is none."),
74
111
  licenseLastValidatedAt: z.string().nullable(),
75
112
  // S284b: the newest issuedAt of any valid verdict this site has stored
76
113
  // (ISO), the clock the grace period runs on. Null before the first one.
77
114
  licenseLastValidIssuedAt: z.string().nullable(),
78
115
  licenseLastAttemptError: z.string().nullable(),
116
+ // S351 (spec D2): when a check that reaches no verdict would switch the
117
+ // plugin off as grace_expired (ISO), from the helper the lock itself uses
118
+ // (apps/server/src/licensing/grace-deadline.ts). Null where no grace lock
119
+ // can land or the last check succeeded. Optional so an answer from a server
120
+ // before S351 still reads.
121
+ licenseSwitchOffAt: z
122
+ .string()
123
+ .nullable()
124
+ .optional()
125
+ .describe("When a check that reaches no licence verdict would switch this plugin off (ISO 8601): set on a site with a production KARDALUM_SITE_DOMAIN for a licence whose last check failed. Null when no grace lock can land (no production site domain, a revoked or already switched-off licence) or the last check succeeded."),
126
+ // S351 fix wave: what the last failed licence check ran into, derived on
127
+ // the server from where lastAttemptError was written, so the admin never
128
+ // reads the free text. Null when the last check succeeded; absent from a
129
+ // server before it (the admin then reads it as unreachable).
130
+ licenseLastAttemptKind: z
131
+ .enum(["unreachable", "rejected", "site-domain-missing", "site-domain-needed"])
132
+ .nullable()
133
+ .optional()
134
+ .describe("What the last failed licence check ran into: unreachable (the licence server could not be reached), rejected (it answered, but the answer did not verify) site-domain-missing (no KARDALUM_SITE_DOMAIN is set, so no request was made) or site-domain-needed (no KARDALUM_SITE_DOMAIN is set on a site that answers public visitors, so no request was made). Null when the last check succeeded."),
135
+ // M32 I6f: the stored end of the licence and the term facts the notices read.
136
+ licenseEndEffect: z.enum(END_EFFECTS).nullable().optional(),
137
+ licenseEndRefunded: z.boolean().nullable().optional(),
138
+ licenseCancelAtPeriodEnd: z.boolean().nullable().optional(),
139
+ licenseTermEndsAt: z.string().nullable().optional(),
140
+ // M32 I6f (S11, S12): what the site loses when the licence switches the plugin off, for a plugin
141
+ // with a licence row (absent or null otherwise): each role it holds on this site (a chosen search,
142
+ // form protection, mail or media store provider, a media store keeping files, a switched-on
143
+ // sign-in provider), the files its media stores keep, the people who sign in only through its
144
+ // switched-on sign-in providers and how many of them hold an action of SIGN_IN_BARRED_ACTIONS,
145
+ // and, when it is the chosen mail sender, whether the built-in sender is set up.
146
+ licenseProviderRoles: z
147
+ .array(z.enum(PROVIDER_TABLE_KINDS))
148
+ .nullable()
149
+ .optional()
150
+ .describe("For a licensed plugin, the roles it holds on this site: each kind it is the chosen provider of, mediaStore when its stores keep files, signIn when one of its sign-in providers is switched on. Null for a plugin with no licence."),
151
+ licenseStoredFiles: z.number().int().nonnegative().nullable().optional().describe("For a licensed plugin, the files its media stores keep. Null for a plugin with no licence."),
152
+ licenseSignInOnlyWayCount: z
153
+ .number()
154
+ .int()
155
+ .nonnegative()
156
+ .nullable()
157
+ .optional()
158
+ .describe("For a licensed plugin with a switched-on sign-in provider, the people with no password whose only way in is one of its sign-in providers. Null otherwise."),
159
+ licenseSignInOnlyWayManagers: z
160
+ .number()
161
+ .int()
162
+ .nonnegative()
163
+ .nullable()
164
+ .optional()
165
+ .describe("Of licenseSignInOnlyWayCount, the people whose role manages the site (holds an action of SIGN_IN_BARRED_ACTIONS). Null with it."),
166
+ licenseBuiltInMailReady: z
167
+ .boolean()
168
+ .nullable()
169
+ .optional()
170
+ .describe("For a licensed plugin that is the chosen mail sender, whether the built-in sender is set up in Server settings, so email goes on once the plugin is off. Null otherwise."),
79
171
  boundDomain: z.string().nullable(),
80
172
  // S284b: what THIS row's `enabled` was when a grace lock closed (the
81
173
  // registry row's own value since the fix wave, so a bundle member keeps
@@ -109,6 +201,32 @@ export const ManagedPluginSchema = z.object({
109
201
  // accepted from the installed-plugins view. Empty when the manifest is
110
202
  // not attached (package missing at boot) or offers nothing.
111
203
  roleOffers: z.array(ManagedPluginRoleOfferSchema),
204
+ // M33 K29: the actions the attached manifest offers to the roles holding a core action, each
205
+ // saying whether it was applied. Absent when it offers none (or is not attached).
206
+ actionOffers: z.array(ManagedPluginActionOfferSchema).optional(),
207
+ // M32 F4 (D10): how many secrets the attached manifest declares, so the admin offers the Secrets
208
+ // card only for a plugin that has some. 0 when the manifest is not attached. Optional so an
209
+ // answer from a server before it still reads.
210
+ secretCount: z
211
+ .number()
212
+ .int()
213
+ .nonnegative()
214
+ .optional()
215
+ .describe("How many secrets the plugin's attached manifest declares (0 when it declares none or is not attached). Values are never listed here."),
216
+ // M32 F4d (D3, D13): how many plugin settings fields and scheduled tasks the attached manifest
217
+ // declares, so the admin offers the Settings page only where there is something on it.
218
+ settingsCount: z
219
+ .number()
220
+ .int()
221
+ .nonnegative()
222
+ .optional()
223
+ .describe("How many plugin settings fields the plugin's attached manifest declares (0 when it declares none or is not attached). Values are never listed here."),
224
+ taskCount: z
225
+ .number()
226
+ .int()
227
+ .nonnegative()
228
+ .optional()
229
+ .describe("How many scheduled tasks the plugin's attached manifest declares (0 when it declares none or is not attached)."),
112
230
  // S274c: distinct roles holding any of this plugin's actions, for the
113
231
  // uninstall dialog.
114
232
  grantedRoleCount: z.number().int().nonnegative(),
@@ -139,6 +257,49 @@ export const ManagedPluginListResponseSchema = z.object({
139
257
  // S284b: the grace period this server applies (KARDALUM_LICENSE_GRACE_DAYS,
140
258
  // 1 to 14), so the admin's grace_expired sentence names the real days.
141
259
  licenseGraceDays: z.number().int(),
260
+ // S351 (spec D2): the days without a valid verdict after which the admin
261
+ // says the licence server is unreachable (KARDALUM_LICENSE_STALE_WARN_DAYS),
262
+ // so the admin no longer mirrors the default.
263
+ licenseStaleWarnDays: z.number().int().positive().optional(),
264
+ // S367g (D1): the browser origin of the active marketplace, so the admin
265
+ // builds its licence notices' links from it. Null when no marketplace is
266
+ // configured; absent from a server before S367g.
267
+ marketplaceOrigin: z
268
+ .string()
269
+ .nullable()
270
+ .optional()
271
+ .describe("The browser origin of the active marketplace, which the admin builds the licence notices' links to the legal texts from. Null when no marketplace is configured."),
272
+ // S367g (D4): when this site was last reached from the public internet,
273
+ // sent only for an unset or local declared domain and a time under 30
274
+ // days old, so the admin can say so and offer the reset.
275
+ siteReachedPublicAt: z
276
+ .string()
277
+ .datetime()
278
+ .nullable()
279
+ .optional()
280
+ .describe("When this site last answered a request from a public address or under a public name (ISO 8601), sent only when KARDALUM_SITE_DOMAIN is unset or local and that time is under 30 days old. Null otherwise. POST /settings/site-reach/reset clears it."),
281
+ // M32 I6c (U15): the reset's offer and history, computed over every
282
+ // installed plugin rather than the page, sent only to a session whose role
283
+ // holds settings.update.
284
+ siteReachResetOffered: z
285
+ .boolean()
286
+ .optional()
287
+ .describe("Whether to offer POST /settings/site-reach/reset: the site counts as reached publicly and an installed plugin's stored verdict is public_visitors with no tamper finding. Sent only to a session whose role holds settings.update."),
288
+ siteReachResetAt: z
289
+ .string()
290
+ .datetime()
291
+ // An earlier time than siteReachedPublicAt's example, so the reference's
292
+ // example reads as a site reached again after its last reset.
293
+ .meta({ example: "2026-01-08T09:30:00.000Z" })
294
+ .nullable()
295
+ .optional()
296
+ .describe("When the site was last marked not public (ISO 8601), null before any reset. Sent only to a session whose role holds settings.update."),
297
+ siteReachResets: z
298
+ .array(z.string().datetime())
299
+ .max(SITE_REACH_RESETS_MAX)
300
+ .meta({ example: ["2026-01-08T09:30:00.000Z", "2025-12-02T14:00:00.000Z"] })
301
+ .optional()
302
+ .describe("The times of the last ten resets, newest first (the first is siteReachResetAt). Sent only to a session whose role holds settings.update."),
142
303
  });
143
304
  export const PluginIdParamsSchema = z.object({
144
305
  pluginId: z.string().min(1),
@@ -156,6 +317,13 @@ export const UninstallPluginBodySchema = z
156
317
  // what the install record holds.
157
318
  removeSampleContent: z.boolean().optional(),
158
319
  removeRoles: z.boolean().optional(),
320
+ // M33 K13: absent means true. False deletes the snapshot the uninstall took (its tables, its
321
+ // settings values and its data type record, and the ones its unconfirmed attempts took since
322
+ // the plugin was installed) once the uninstall has finished. Only a session may send false.
323
+ keepSnapshot: z
324
+ .boolean()
325
+ .optional()
326
+ .describe("Absent means true. False deletes the data snapshot this uninstall takes (and those its unconfirmed attempts took) once it has finished; only a session may send it, a key gets 403."),
159
327
  })
160
328
  // S293: strict, because an absent flag means true: a misspelt opt-out
161
329
  // dropped as an unknown key would be read as consent to remove.
@@ -292,6 +460,13 @@ export const ListingPlanSummarySchema = z.object({
292
460
  // S321 (P10): positions are 0 and up; the bound also gives the reference example a real value.
293
461
  position: z.number().int().nonnegative(),
294
462
  });
463
+ /** S367e (D21): the stored verdict's notice as the host hands it on: the
464
+ * server's own shape, capped, so the browser's type is the server's. */
465
+ export const LicenseNoticeWireSchema = z.object({
466
+ kind: z.enum([SHARING_NOTICE_KIND, STAGING_NOTICE_KIND, SERVICE_CLOSING_NOTICE_KIND]),
467
+ domain: z.string().min(1).max(SITE_KEY_MAX),
468
+ at: z.string().max(40),
469
+ });
295
470
  export const LicenseVerdictEnvelopeSchema = z.object({
296
471
  v: z.literal(1),
297
472
  alg: z.literal("ed25519"),
@@ -313,6 +488,10 @@ export const LicenseVerdictEnvelopeSchema = z.object({
313
488
  // (never by `signature`); absent on a verdict from before S317.
314
489
  planId: z.string().max(64).optional(),
315
490
  term: LicenseVerdictTermSchema.optional(),
491
+ // S367b, S367d, S367e: the signed notice, covered by noticeSignature; the three kinds the marketplace signs.
492
+ notice: LicenseNoticeWireSchema.optional(),
493
+ // M32 I6f: the signed end effect, covered by endSignature.
494
+ end: LicenseVerdictEndWireSchema.optional(),
316
495
  });
317
496
  // The tagged entitlement (S284b fix wave), the same value plugin server code
318
497
  // receives on `context.entitlement`: `exempt` on a non-production install
@@ -332,6 +511,8 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
332
511
  signature: z.string(),
333
512
  /** S317: base64 Ed25519 signature over the envelope with its plan and term appended; absent when it carries neither. */
334
513
  termSignature: z.string().optional(),
514
+ /** S367d: base64 Ed25519 signature over the envelope with its notice appended; absent when it carries none. A verified service-closing notice keeps the verdict valid without the 14-day age. */
515
+ noticeSignature: z.string().optional(),
335
516
  }),
336
517
  z.object({ kind: z.literal("none") }),
337
518
  ]);
@@ -339,6 +520,7 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
339
520
  // session; no permission beyond it, since a plugin view is gated by the
340
521
  // plugin's own action): what `useEntitlement()` reads in a plugin's admin
341
522
  // view. `valid` is the host's own check of the signature and the 14-day age
523
+ // (none for a verdict whose service-closing notice verifies, S367d)
342
524
  // (true for `exempt`, false for `none`), the answer a browser without
343
525
  // WebCrypto Ed25519 falls back to. It means authentic and fresh, whatever
344
526
  // the verdict's status: a revoked or invalid verdict is `valid: true` too,
@@ -381,10 +563,17 @@ export const SnapshotGroupListQuerySchema = z.object({
381
563
  cursor: z.string().uuid().optional(),
382
564
  limit: z.coerce.number().int().min(1).max(100).default(50),
383
565
  });
566
+ /** M32 I3 (B9): where a restore reads the plugin's settings from. */
567
+ export const RESTORE_SOURCES = ["snapshots", "replacedSettings"];
568
+ export const SnapshotSettingsRecordSchema = z
569
+ .object({ takenAt: z.string(), fields: z.array(z.string()) })
570
+ .strict();
384
571
  export const SnapshotGroupListResponseSchema = z.object({
385
572
  pluginId: z.string(),
386
573
  items: z.array(SnapshotGroupSchema), // newest first
387
574
  nextCursor: z.string().nullable(),
575
+ /** M32 I3 (B9): the settings records restore can use, field ids only, never a value. */
576
+ settings: z.object({ recorded: SnapshotSettingsRecordSchema.nullable(), replaced: SnapshotSettingsRecordSchema.nullable() }).strict().optional(),
388
577
  });
389
578
  // S154 Task 5: the UNION restore plan: the newest available snapshot copy
390
579
  // of each DISTINCT table this plugin has ever snapshotted, chosen
@@ -397,6 +586,19 @@ export const RestorePlanEntrySchema = z.object({
397
586
  snapshotGroupId: z.string(),
398
587
  groupTakenAt: z.string(),
399
588
  });
589
+ // M32 F4d (D2): the plugin settings values a restore writes back: the newest record an uninstall
590
+ // took, named by its snapshot row, and the ids of the fields it holds (never a value). The current
591
+ // values are kept as a safety copy first. Null when there is no record or the plugin is not installed.
592
+ export const RestoreSettingsPlanSchema = z
593
+ .object({
594
+ snapshotId: z.string(),
595
+ snapshotGroupId: z.string(),
596
+ takenAt: z.string(),
597
+ fields: z.array(z.string()),
598
+ /** M32 I3 (B9): absent reads as "snapshots". */
599
+ source: z.enum(RESTORE_SOURCES).optional(),
600
+ })
601
+ .strict();
400
602
  // 409 payload for an unconfirmed restore: nothing has been touched yet,
401
603
  // the plan is offered for the admin to review before confirming. planHash
402
604
  // (S161, S154 rider) is a stable digest of this exact plan: the confirm
@@ -408,6 +610,8 @@ export const RestorePlanEntrySchema = z.object({
408
610
  export const RestoreConfirmationRequiredSchema = z.object({
409
611
  requiresConfirmation: z.literal(true),
410
612
  plan: z.array(RestorePlanEntrySchema),
613
+ // M32 F4d (D2): optional so an answer from a server before it still reads; planHash covers it.
614
+ settings: RestoreSettingsPlanSchema.nullable().optional(),
411
615
  planHash: z.string(),
412
616
  message: z.string(),
413
617
  });
@@ -416,6 +620,11 @@ export const RestoreSucceededSchema = z.object({
416
620
  // plugin had no live tracked tables to protect (restoring onto empty).
417
621
  preRestoreSnapshotGroupId: z.string().nullable(),
418
622
  restoredTables: z.array(z.string()),
623
+ // M32 F4d (D2): true when the plugin's settings values an uninstall recorded were written back.
624
+ restoredSettings: z.boolean().optional(),
625
+ // M32 F4d (D2): the group holding the safety copy of the settings values the restore replaced,
626
+ // null when there were none to keep. Not a table group: the snapshot list does not show it.
627
+ preRestoreSettingsSnapshotGroupId: z.string().nullable().optional(),
419
628
  });
420
629
  // Same DELETE-body-null convention as UninstallPluginBodySchema above: an
421
630
  // absent POST body lands as `null` (not `undefined`) once Fastify's
@@ -430,8 +639,36 @@ export const RestoreBodySchema = z
430
639
  .object({
431
640
  confirmRestore: z.boolean().optional(),
432
641
  planHash: z.string().optional(),
642
+ source: z.enum(RESTORE_SOURCES).optional(),
433
643
  })
434
644
  .nullish();
645
+ // M33 K13 (Shop 4.1 C6, Forms 2.11 C2, consolidation 3.8): deleting one snapshot group of a plugin,
646
+ // every row of it: the tables, the settings values and the data type record an uninstall wrote into
647
+ // the group. Irreversible, so a session only (a key is refused 403), holding plugins.delete, and in
648
+ // two steps like the restore: without `confirmDelete: true` the route answers 409 with what the
649
+ // delete would remove and touches nothing. Never another plugin's rows.
650
+ export const SnapshotGroupParamsSchema = PluginIdParamsSchema.extend({
651
+ snapshotGroupId: z.string().uuid(),
652
+ });
653
+ export const DeleteSnapshotGroupBodySchema = z
654
+ .object({ confirmDelete: z.boolean().optional() })
655
+ .strict()
656
+ .nullish();
657
+ export const SnapshotGroupDeleteConfirmationSchema = z.object({
658
+ requiresConfirmation: z.literal(true),
659
+ snapshotGroupId: z.string(),
660
+ takenAt: z.string(),
661
+ tableNames: z.array(z.string()),
662
+ settings: z.boolean().describe("Whether the group holds the plugin's settings values an uninstall recorded."),
663
+ dataTypes: z.boolean().describe("Whether the group holds the data type record an uninstall wrote."),
664
+ message: z.string(),
665
+ });
666
+ export const SnapshotGroupDeletedSchema = z.object({
667
+ snapshotGroupId: z.string(),
668
+ removedTables: z.array(z.string()),
669
+ removedSettings: z.boolean(),
670
+ removedDataTypes: z.boolean(),
671
+ });
435
672
  // S314c5 (D1, D2): restoring the data types an uninstall recorded (the row under the trigger
436
673
  // "uninstall-data-types" in the snapshot table), in the two-step form of the table restore above:
437
674
  // an unconfirmed call answers 409 with the plan and its hash, a confirmed call with that hash
@@ -506,6 +743,9 @@ export const PluginUploadResponseSchema = z.object({
506
743
  // update did not apply as shipped, or removed. Absent on a fresh install
507
744
  // and when there is nothing to say.
508
745
  warnings: InstallWarningsSchema.optional(),
746
+ // M33 Sign-in: on an update, the ids of the sign-in entries it switched off
747
+ // because the installed declarations could not be read. Absent otherwise.
748
+ signInSwitchedOff: SignInSwitchedOffSchema.optional(),
509
749
  });
510
750
  /** S274c: the upload's confirmation travels as a query flag because the
511
751
  * route reads only the multipart file part. */
@@ -519,6 +759,25 @@ export const PackageRefusedSchema = z.object({
519
759
  message: z.string(),
520
760
  reasons: z.array(z.string()),
521
761
  });
762
+ /** S357 (D2): the 422 an install or update answers when its rollback did not
763
+ * complete: the refusal's message and how many rollback steps failed (each
764
+ * one's record is kept). Sent only when at least one failed; before
765
+ * ApiErrorSchema in each route's union, which would drop the count. */
766
+ export const PluginRollbackIncompleteSchema = z.object({
767
+ message: z.string(),
768
+ rollbackFailures: z.number().int().positive(),
769
+ });
770
+ /** M33 Sign-in: the 409 or 422 an update answers when it failed after switching sign-in entries off
771
+ * (the installed version's sign-in declarations could not be read, so it switched them off before
772
+ * its first write, and that switch-off stands). The refusal's message, the rollback count when a
773
+ * rollback step failed, and the ids switched off (1 to 3, each 1 to 40 characters), which the
774
+ * owner switches on again in Server settings, Sign-in. `signInSwitchedOff` is required, so the
775
+ * schema matches only such an answer: first in each route's union. */
776
+ export const PluginUpdateRefusedSchema = z.object({
777
+ message: z.string(),
778
+ rollbackFailures: z.number().int().positive().optional(),
779
+ signInSwitchedOff: SignInSwitchedOffSchema,
780
+ });
522
781
  /** S274c: the 409 an upload over a verified plugin answers before it stores
523
782
  * anything, until the retry carries confirmTrustDowngrade=true. */
524
783
  export const TrustDowngradeConfirmationSchema = z.object({
@@ -539,7 +798,27 @@ export const DataTypeFieldBlockerSchema = z.object({
539
798
  kind: z.enum(["page", "element", "media"]),
540
799
  fields: z.array(z.object({ id: z.string(), name: z.string(), dataType: z.string() })),
541
800
  });
801
+ // M32 I5b (E2): one of the plugin's data types and the core Groups and lists that hold it (as a
802
+ // sub-field type or a list's item type). Holders refuse an uninstall, never a switch-off.
803
+ export const DataTypeHolderSchema = z.object({
804
+ dataTypeId: z.string(),
805
+ dataType: z.string(),
806
+ holders: z.array(z.object({ id: z.string(), name: z.string() })),
807
+ });
542
808
  export const PluginDataTypesInUseSchema = z.object({
543
809
  message: z.string(),
544
810
  blockedByFields: z.array(DataTypeFieldBlockerSchema),
811
+ /** M32 I5b (E2): sent by an uninstall only, and only when a Group or list holds a data type. */
812
+ heldByDataTypes: z.array(DataTypeHolderSchema).optional(),
813
+ });
814
+ // M32 F4 (D9): the 409 of a switch-off or an uninstall refused while the plugin's providers hold
815
+ // data: `chosen` is each kind whose current choice is one of its providers (choose another first),
816
+ // `storedFiles` the files its media stores keep. Nothing was changed.
817
+ export const PluginProviderInUseSchema = z.object({
818
+ error: z.literal("provider_in_use"),
819
+ message: z.string(),
820
+ chosen: z.array(z.enum(PROVIDER_KINDS)),
821
+ storedFiles: z.number().int().nonnegative(),
822
+ /** M32 F4b (D41): the ids of the plugin's sign-in providers that are switched on (switch them off in Server settings first). */
823
+ signIn: z.array(z.string()),
545
824
  });
@@ -2,7 +2,7 @@ import type { PluginLabel } from "./plugin-labels.js";
2
2
  /** The contribution kinds that sit behind a named action. The SDK classifies
3
3
  * these on its CONTRIBUTION_RULES table; its test pins that table to this
4
4
  * list, so the two cannot drift apart silently. */
5
- export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes"];
5
+ export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes", "editorPanels", "treeActions"];
6
6
  /** S293 (S283's decision, 2026-10-13-s293-the-wizard-installed-design.md 3.9):
7
7
  * the built-in rights an offered role may grant beside the plugin's own
8
8
  * actions: the read right of each built-in section a rail entry may join
@@ -10,6 +10,20 @@ export declare const ACTION_GATED_CONTRIBUTION_KEYS: readonly ["adminSections",
10
10
  * accepted offer can open the section its plugin's screen sits in. A write
11
11
  * right is never offerable. */
12
12
  export declare const OFFERABLE_BUILT_IN_ACTIONS: readonly ["content.read", "media.read", "settings.read", "users.read"];
13
+ /** M33 K29 (SEO 2.16 C7): the core actions a plugin's own action may be offered to. An action that
14
+ * declares `offerTo` is offered, at install or later from the installed plugins, to every role
15
+ * that holds that core action then, the administrator left out (it holds every action already).
16
+ * One target per action, from this fixed list. */
17
+ export declare const PLUGIN_ACTION_OFFER_TARGETS: readonly ["content.read", "content.update", "content.publish", "media.read"];
18
+ export type PluginActionOfferTarget = (typeof PLUGIN_ACTION_OFFER_TARGETS)[number];
19
+ /**
20
+ * M33 K29: whether an offer's box starts ticked, derived from the declarations and never declared
21
+ * (operator question 5 of the SEO design). Ticked when only editor panels, admin sections (their
22
+ * rail entries included), rail entries, dashboard widgets and `GET` routes name the action;
23
+ * unticked when a route of any other method names it, or a tree action does (it acts on a page).
24
+ * Read defensively, as deriveCapabilities reads a manifest.
25
+ */
26
+ export declare function actionOfferTicked(contributions: unknown, actionId: string): boolean;
13
27
  export interface ActionDeclarationIssue {
14
28
  path: (string | number)[];
15
29
  message: string;
@@ -19,6 +33,7 @@ export interface ActionDeclarationInput {
19
33
  actions?: ReadonlyArray<{
20
34
  id: string;
21
35
  label: PluginLabel;
36
+ offerTo?: string;
22
37
  }>;
23
38
  roles?: ReadonlyArray<{
24
39
  id: string;
@@ -10,7 +10,7 @@ import { isPluginActionFor } from "./action.schema.js";
10
10
  /** The contribution kinds that sit behind a named action. The SDK classifies
11
11
  * these on its CONTRIBUTION_RULES table; its test pins that table to this
12
12
  * list, so the two cannot drift apart silently. */
13
- export const ACTION_GATED_CONTRIBUTION_KEYS = ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes"];
13
+ export const ACTION_GATED_CONTRIBUTION_KEYS = ["adminSections", "railEntries", "dashboardWidgets", "apiRoutes", "editorPanels", "treeActions"];
14
14
  /** S293 (S283's decision, 2026-10-13-s293-the-wizard-installed-design.md 3.9):
15
15
  * the built-in rights an offered role may grant beside the plugin's own
16
16
  * actions: the read right of each built-in section a rail entry may join
@@ -20,6 +20,39 @@ export const ACTION_GATED_CONTRIBUTION_KEYS = ["adminSections", "railEntries", "
20
20
  export const OFFERABLE_BUILT_IN_ACTIONS = ["content.read", "media.read", "settings.read", "users.read"];
21
21
  const OFFERABLE = new Set(OFFERABLE_BUILT_IN_ACTIONS);
22
22
  const OFFERABLE_LIST = `${OFFERABLE_BUILT_IN_ACTIONS.slice(0, -1).map((action) => `"${action}"`).join(", ")} or "${OFFERABLE_BUILT_IN_ACTIONS[OFFERABLE_BUILT_IN_ACTIONS.length - 1]}"`;
23
+ /** M33 K29 (SEO 2.16 C7): the core actions a plugin's own action may be offered to. An action that
24
+ * declares `offerTo` is offered, at install or later from the installed plugins, to every role
25
+ * that holds that core action then, the administrator left out (it holds every action already).
26
+ * One target per action, from this fixed list. */
27
+ export const PLUGIN_ACTION_OFFER_TARGETS = ["content.read", "content.update", "content.publish", "media.read"];
28
+ /** The gated kinds whose naming an action keeps its offer ticked: each shows something (a panel,
29
+ * a section and its rail, a rail entry, a widget) and changes nothing itself. A GET route is the
30
+ * one route kind beside them. */
31
+ const SHOWING_KINDS = new Set(["adminSections", "railEntries", "dashboardWidgets", "editorPanels"]);
32
+ /**
33
+ * M33 K29: whether an offer's box starts ticked, derived from the declarations and never declared
34
+ * (operator question 5 of the SEO design). Ticked when only editor panels, admin sections (their
35
+ * rail entries included), rail entries, dashboard widgets and `GET` routes name the action;
36
+ * unticked when a route of any other method names it, or a tree action does (it acts on a page).
37
+ * Read defensively, as deriveCapabilities reads a manifest.
38
+ */
39
+ export function actionOfferTicked(contributions, actionId) {
40
+ if (!contributions || typeof contributions !== "object")
41
+ return true;
42
+ const record = contributions;
43
+ for (const key of ACTION_GATED_CONTRIBUTION_KEYS) {
44
+ const entries = record[key];
45
+ if (!Array.isArray(entries))
46
+ continue;
47
+ for (const entry of entries) {
48
+ if (entry?.action !== actionId)
49
+ continue;
50
+ if (key === "apiRoutes" ? entry.method !== "GET" : !SHOWING_KINDS.has(key))
51
+ return false;
52
+ }
53
+ }
54
+ return true;
55
+ }
23
56
  function referencedActions(contributions) {
24
57
  const referenced = new Set();
25
58
  if (!contributions || typeof contributions !== "object")
@@ -0,0 +1,40 @@
1
+ /** D1: a tool's own name, 1 to 40 characters. */
2
+ export declare const PLUGIN_TOOL_NAME_MAX = 40;
3
+ /** D1: a tool's description, 1 to 500 characters, shown to the host cleaned like a help note. */
4
+ export declare const PLUGIN_TOOL_DESCRIPTION_MAX = 500;
5
+ /** D1: the plugin's part of a tool's full name. */
6
+ export declare const PLUGIN_TOOL_SHORT_NAME_MAX = 20;
7
+ /** The longest full name: the short name, "_" and the tool's own name. */
8
+ export declare const PLUGIN_TOOL_FULL_NAME_MAX: number;
9
+ /** D5: one plugin's context for the AI. */
10
+ export declare const PLUGIN_AI_CONTEXT_MAX_CHARS = 2000;
11
+ /** D5: every active plugin's context together, in the instructions. */
12
+ export declare const PLUGIN_AI_CONTEXTS_MAX_CHARS = 10000;
13
+ /** D1: 1 to 40 lower-case letters, digits and "_", starting with a letter. */
14
+ export declare function isPluginToolName(name: string): boolean;
15
+ /**
16
+ * D1: the plugin id's last segment in the tool alphabet: lower case, "-" written "_", anything else
17
+ * dropped, cut at 20, and any trailing "_" trimmed. The id's last segment starts with a letter
18
+ * (`PLUGIN_ID_REGEX`), so the short name does too, and the full name always has the call shape.
19
+ */
20
+ export declare function pluginToolShortName(pluginId: string): string;
21
+ /** D1: the name the host sees. */
22
+ export declare function pluginToolFullName(pluginId: string, name: string): string;
23
+ /** D4: a name of the full shape, what the audit records for a plugin tool's call. */
24
+ export declare function isPluginToolCallName(name: string): boolean;
25
+ export interface PluginAiDeclarationIssue {
26
+ path: Array<string | number>;
27
+ message: string;
28
+ }
29
+ /**
30
+ * D9: the tools a manifest marks (`mcpTool` on an `apiKey` route, a name of the D1 shape used
31
+ * once in the plugin and never a core tool's full name, a description of 1 to 500 characters),
32
+ * its `aiContext` (1 to 2,000 characters) and its help notes (at most 500 characters). The SDK
33
+ * passes `documentTypesChecked`, because its document type schema already caps the notes.
34
+ */
35
+ export declare function checkPluginAiDeclarations(manifest: {
36
+ id?: unknown;
37
+ contributions?: unknown;
38
+ }, options?: {
39
+ documentTypesChecked?: boolean;
40
+ }): PluginAiDeclarationIssue[];