@kardalum/plugin-sdk 0.19.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.
- package/CHANGELOG.md +211 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +139 -1
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.js +50 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +285 -23
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/richtext/block-panel.js +11 -6
- package/dist/richtext/insert-menu.js +9 -6
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +28 -13
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +180 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +41 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +117 -41
- package/node_modules/@kardalum/api-schemas/dist/index.js +89 -26
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +312 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +43 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +335 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +242 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +90 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +59 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +34 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +34 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +12 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +25 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/package.json +12 -2
|
@@ -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,10 +57,26 @@ 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(),
|
|
@@ -79,6 +103,11 @@ export const ManagedPluginSchema = z.object({
|
|
|
79
103
|
// marketplace operator's reason for a `domain_blocked` answer, which the
|
|
80
104
|
// admin shows after its sentence. Null when the verdict carried none.
|
|
81
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."),
|
|
82
111
|
licenseLastValidatedAt: z.string().nullable(),
|
|
83
112
|
// S284b: the newest issuedAt of any valid verdict this site has stored
|
|
84
113
|
// (ISO), the clock the grace period runs on. Null before the first one.
|
|
@@ -99,10 +128,46 @@ export const ManagedPluginSchema = z.object({
|
|
|
99
128
|
// reads the free text. Null when the last check succeeded; absent from a
|
|
100
129
|
// server before it (the admin then reads it as unreachable).
|
|
101
130
|
licenseLastAttemptKind: z
|
|
102
|
-
.enum(["unreachable", "rejected", "site-domain-missing"])
|
|
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))
|
|
103
148
|
.nullable()
|
|
104
149
|
.optional()
|
|
105
|
-
.describe("
|
|
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."),
|
|
106
171
|
boundDomain: z.string().nullable(),
|
|
107
172
|
// S284b: what THIS row's `enabled` was when a grace lock closed (the
|
|
108
173
|
// registry row's own value since the fix wave, so a bundle member keeps
|
|
@@ -136,6 +201,32 @@ export const ManagedPluginSchema = z.object({
|
|
|
136
201
|
// accepted from the installed-plugins view. Empty when the manifest is
|
|
137
202
|
// not attached (package missing at boot) or offers nothing.
|
|
138
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)."),
|
|
139
230
|
// S274c: distinct roles holding any of this plugin's actions, for the
|
|
140
231
|
// uninstall dialog.
|
|
141
232
|
grantedRoleCount: z.number().int().nonnegative(),
|
|
@@ -170,6 +261,45 @@ export const ManagedPluginListResponseSchema = z.object({
|
|
|
170
261
|
// says the licence server is unreachable (KARDALUM_LICENSE_STALE_WARN_DAYS),
|
|
171
262
|
// so the admin no longer mirrors the default.
|
|
172
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."),
|
|
173
303
|
});
|
|
174
304
|
export const PluginIdParamsSchema = z.object({
|
|
175
305
|
pluginId: z.string().min(1),
|
|
@@ -187,6 +317,13 @@ export const UninstallPluginBodySchema = z
|
|
|
187
317
|
// what the install record holds.
|
|
188
318
|
removeSampleContent: z.boolean().optional(),
|
|
189
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."),
|
|
190
327
|
})
|
|
191
328
|
// S293: strict, because an absent flag means true: a misspelt opt-out
|
|
192
329
|
// dropped as an unknown key would be read as consent to remove.
|
|
@@ -323,6 +460,13 @@ export const ListingPlanSummarySchema = z.object({
|
|
|
323
460
|
// S321 (P10): positions are 0 and up; the bound also gives the reference example a real value.
|
|
324
461
|
position: z.number().int().nonnegative(),
|
|
325
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
|
+
});
|
|
326
470
|
export const LicenseVerdictEnvelopeSchema = z.object({
|
|
327
471
|
v: z.literal(1),
|
|
328
472
|
alg: z.literal("ed25519"),
|
|
@@ -344,6 +488,10 @@ export const LicenseVerdictEnvelopeSchema = z.object({
|
|
|
344
488
|
// (never by `signature`); absent on a verdict from before S317.
|
|
345
489
|
planId: z.string().max(64).optional(),
|
|
346
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(),
|
|
347
495
|
});
|
|
348
496
|
// The tagged entitlement (S284b fix wave), the same value plugin server code
|
|
349
497
|
// receives on `context.entitlement`: `exempt` on a non-production install
|
|
@@ -363,6 +511,8 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
|
|
|
363
511
|
signature: z.string(),
|
|
364
512
|
/** S317: base64 Ed25519 signature over the envelope with its plan and term appended; absent when it carries neither. */
|
|
365
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(),
|
|
366
516
|
}),
|
|
367
517
|
z.object({ kind: z.literal("none") }),
|
|
368
518
|
]);
|
|
@@ -370,6 +520,7 @@ export const EntitlementSchema = z.discriminatedUnion("kind", [
|
|
|
370
520
|
// session; no permission beyond it, since a plugin view is gated by the
|
|
371
521
|
// plugin's own action): what `useEntitlement()` reads in a plugin's admin
|
|
372
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)
|
|
373
524
|
// (true for `exempt`, false for `none`), the answer a browser without
|
|
374
525
|
// WebCrypto Ed25519 falls back to. It means authentic and fresh, whatever
|
|
375
526
|
// the verdict's status: a revoked or invalid verdict is `valid: true` too,
|
|
@@ -412,10 +563,17 @@ export const SnapshotGroupListQuerySchema = z.object({
|
|
|
412
563
|
cursor: z.string().uuid().optional(),
|
|
413
564
|
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
414
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();
|
|
415
571
|
export const SnapshotGroupListResponseSchema = z.object({
|
|
416
572
|
pluginId: z.string(),
|
|
417
573
|
items: z.array(SnapshotGroupSchema), // newest first
|
|
418
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(),
|
|
419
577
|
});
|
|
420
578
|
// S154 Task 5: the UNION restore plan: the newest available snapshot copy
|
|
421
579
|
// of each DISTINCT table this plugin has ever snapshotted, chosen
|
|
@@ -428,6 +586,19 @@ export const RestorePlanEntrySchema = z.object({
|
|
|
428
586
|
snapshotGroupId: z.string(),
|
|
429
587
|
groupTakenAt: z.string(),
|
|
430
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();
|
|
431
602
|
// 409 payload for an unconfirmed restore: nothing has been touched yet,
|
|
432
603
|
// the plan is offered for the admin to review before confirming. planHash
|
|
433
604
|
// (S161, S154 rider) is a stable digest of this exact plan: the confirm
|
|
@@ -439,6 +610,8 @@ export const RestorePlanEntrySchema = z.object({
|
|
|
439
610
|
export const RestoreConfirmationRequiredSchema = z.object({
|
|
440
611
|
requiresConfirmation: z.literal(true),
|
|
441
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(),
|
|
442
615
|
planHash: z.string(),
|
|
443
616
|
message: z.string(),
|
|
444
617
|
});
|
|
@@ -447,6 +620,11 @@ export const RestoreSucceededSchema = z.object({
|
|
|
447
620
|
// plugin had no live tracked tables to protect (restoring onto empty).
|
|
448
621
|
preRestoreSnapshotGroupId: z.string().nullable(),
|
|
449
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(),
|
|
450
628
|
});
|
|
451
629
|
// Same DELETE-body-null convention as UninstallPluginBodySchema above: an
|
|
452
630
|
// absent POST body lands as `null` (not `undefined`) once Fastify's
|
|
@@ -461,8 +639,36 @@ export const RestoreBodySchema = z
|
|
|
461
639
|
.object({
|
|
462
640
|
confirmRestore: z.boolean().optional(),
|
|
463
641
|
planHash: z.string().optional(),
|
|
642
|
+
source: z.enum(RESTORE_SOURCES).optional(),
|
|
464
643
|
})
|
|
465
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
|
+
});
|
|
466
672
|
// S314c5 (D1, D2): restoring the data types an uninstall recorded (the row under the trigger
|
|
467
673
|
// "uninstall-data-types" in the snapshot table), in the two-step form of the table restore above:
|
|
468
674
|
// an unconfirmed call answers 409 with the plan and its hash, a confirmed call with that hash
|
|
@@ -537,6 +743,9 @@ export const PluginUploadResponseSchema = z.object({
|
|
|
537
743
|
// update did not apply as shipped, or removed. Absent on a fresh install
|
|
538
744
|
// and when there is nothing to say.
|
|
539
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(),
|
|
540
749
|
});
|
|
541
750
|
/** S274c: the upload's confirmation travels as a query flag because the
|
|
542
751
|
* route reads only the multipart file part. */
|
|
@@ -558,6 +767,17 @@ export const PluginRollbackIncompleteSchema = z.object({
|
|
|
558
767
|
message: z.string(),
|
|
559
768
|
rollbackFailures: z.number().int().positive(),
|
|
560
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
|
+
});
|
|
561
781
|
/** S274c: the 409 an upload over a verified plugin answers before it stores
|
|
562
782
|
* anything, until the retry carries confirmTrustDowngrade=true. */
|
|
563
783
|
export const TrustDowngradeConfirmationSchema = z.object({
|
|
@@ -578,7 +798,27 @@ export const DataTypeFieldBlockerSchema = z.object({
|
|
|
578
798
|
kind: z.enum(["page", "element", "media"]),
|
|
579
799
|
fields: z.array(z.object({ id: z.string(), name: z.string(), dataType: z.string() })),
|
|
580
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
|
+
});
|
|
581
808
|
export const PluginDataTypesInUseSchema = z.object({
|
|
582
809
|
message: z.string(),
|
|
583
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()),
|
|
584
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[];
|