@kardalum/plugin-sdk 0.15.0 → 0.16.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 +11 -1
- package/README.md +10 -0
- package/dist/built-in-value-schemas.js +1 -1
- package/dist/built-ins.js +2 -2
- package/dist/capabilities.d.ts +8 -78
- package/dist/capabilities.js +23 -319
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -4
- package/dist/license-verdict-keys.js +4 -0
- package/dist/manifest-entry.d.ts +2 -2
- package/dist/manifest-entry.js +1 -1
- package/dist/manifest-schema.d.ts +81 -13
- package/dist/manifest-schema.js +108 -59
- package/dist/manifest.d.ts +105 -40
- package/dist/media/media-picker.js +21 -12
- package/dist/media/upload-error.d.ts +1 -1
- package/dist/media/upload-error.js +1 -1
- package/dist/plugin-context.d.ts +7 -0
- package/dist/plugin-context.js +7 -0
- package/dist/plugin-screen-context.d.ts +33 -2
- package/dist/plugin-screen-context.js +27 -2
- package/dist/read-all-pages.d.ts +23 -0
- package/dist/read-all-pages.js +30 -0
- package/dist/richtext/block-panel.js +4 -4
- package/dist/richtext/insert-menu.js +3 -3
- package/dist/views/content-list-view.js +2 -2
- package/dist/views/image-view.js +24 -39
- package/dist/views/rich-text-view.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +43 -25
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +60 -8
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +12 -8
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +11 -7
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +107 -57
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +96 -60
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +39 -28
- package/node_modules/@kardalum/api-schemas/dist/index.js +19 -13
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +73 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +104 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +302 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +78 -6
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +38 -30
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +82 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +88 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +79 -17
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +59 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +585 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +536 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +25 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +21 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +16 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +162 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +11 -1
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +79 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +36 -6
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +17 -5
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +8 -8
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +8 -8
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +11 -3
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +5 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +111 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +61 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +3 -1
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +20 -1
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +56 -16
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +4 -6
- package/node_modules/@kardalum/plugin-package/dist/types.js +15 -1
- package/node_modules/@kardalum/plugin-package/package.json +5 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/property-field.js +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ Subpaths are noted per entry. `.` is the package index; `./manifest` is the
|
|
|
8
8
|
server-safe manifest contract subpath, which pulls in no React and no
|
|
9
9
|
`@kardalum/ui`.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## 0.15.0 and 0.16.0 (after 0.14.0, the last release under the former scope)
|
|
12
12
|
|
|
13
13
|
The plugin manifest is no longer a discriminated union on `type`. One
|
|
14
14
|
`PluginManifest` carries a single ungated `contributions` object, and
|
|
@@ -89,6 +89,16 @@ The plugin manifest is no longer a discriminated union on `type`. One
|
|
|
89
89
|
- `VIEW_BEARING_CONTRIBUTIONS` and the `ViewBearingContribution` type
|
|
90
90
|
(`./manifest`), the six contribution keys that imply a client bundle.
|
|
91
91
|
|
|
92
|
+
### Changed
|
|
93
|
+
|
|
94
|
+
- An apiRoute's `path` takes `:name` parameters, each matching one segment
|
|
95
|
+
of the request, and every other segment is letters, digits, `-` and `_`
|
|
96
|
+
(`./manifest`). `CMSPluginSchema` and `validatePluginManifest` refuse two
|
|
97
|
+
routes of one method that the router reads as one route or that one
|
|
98
|
+
request matches both of, a `GET` or `PUT` at the host's plugin storage
|
|
99
|
+
address (`/storage/<segment>/<segment>`), more than 200 routes, and a path
|
|
100
|
+
over 200 characters.
|
|
101
|
+
|
|
92
102
|
### Two additions that will be awkward to change later
|
|
93
103
|
|
|
94
104
|
Recorded here rather than left for whoever has to change them.
|
package/README.md
CHANGED
|
@@ -59,6 +59,16 @@ the root; the subpaths below are bundled into whatever imports them.
|
|
|
59
59
|
Two more entries in `exports`, `./datatype-validation` and
|
|
60
60
|
`./register-built-ins`, are host and server internals a plugin never imports.
|
|
61
61
|
|
|
62
|
+
## The management API base
|
|
63
|
+
|
|
64
|
+
The root also exports `MANAGE_API`, the string `/api/manage/v1`: the base of the
|
|
65
|
+
management API that the admin itself calls with the signed-in session. A plugin
|
|
66
|
+
view that calls a CMS family builds its path from it, for example the content
|
|
67
|
+
roots at `/api/manage/v1/content/roots`, and calls its own routes under
|
|
68
|
+
`/api/plugins/:pluginId/`. The
|
|
69
|
+
[management routes](https://docs.kardalum.com/v1/reference/manage/) page lists
|
|
70
|
+
every operation.
|
|
71
|
+
|
|
62
72
|
## Docs
|
|
63
73
|
|
|
64
74
|
The plugin guide, the manifest reference and the storage reference are at
|
|
@@ -19,7 +19,7 @@ export const BUILT_IN_VALUE_SCHEMAS = {
|
|
|
19
19
|
additionalProperties: false,
|
|
20
20
|
},
|
|
21
21
|
// S232. The Content List field stores nothing at all: the table it
|
|
22
|
-
// renders reads the page's CHILDREN through GET /api/content/:id/list,
|
|
22
|
+
// renders reads the page's CHILDREN through GET /api/manage/v1/content/:id/list,
|
|
23
23
|
// so a consumer of the public API learns the honest answer here, that
|
|
24
24
|
// this field carries no value of its own.
|
|
25
25
|
"com.kardalum.contentlist": { type: "null" },
|
package/dist/built-ins.js
CHANGED
|
@@ -146,7 +146,7 @@ registerDataType(builtIn("date", "Date", "calendar", BUILT_IN_VALUE_SCHEMAS["com
|
|
|
146
146
|
preview: DateReadOnlyView,
|
|
147
147
|
}));
|
|
148
148
|
// Stores a media reference id — the Media Library item itself is
|
|
149
|
-
// fetched separately (GET /api/media/:id), not embedded in the field
|
|
149
|
+
// fetched separately (GET /api/manage/v1/media/:id), not embedded in the field
|
|
150
150
|
// value. S234d gave the view a second way to fill that id: Choose opens
|
|
151
151
|
// the shared media picker over the library, beside the upload it has had
|
|
152
152
|
// since Session 42.
|
|
@@ -218,7 +218,7 @@ registerDataType(builtIn("daterange", "Date range", "calendar-range", BUILT_IN_V
|
|
|
218
218
|
preview: DateRangeReadOnlyView,
|
|
219
219
|
}));
|
|
220
220
|
// S232: the first built-in whose field stores NO value. It renders the
|
|
221
|
-
// children of the page being edited (GET /api/content/:id/list), so it
|
|
221
|
+
// children of the page being edited (GET /api/manage/v1/content/:id/list), so it
|
|
222
222
|
// reads a ContentHost rather than a plugin value, and `preview` is a
|
|
223
223
|
// separate static component instead of the usual alias to `readOnly`:
|
|
224
224
|
// the document type builder is designing a type, where no page and
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -1,83 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
export { CAPABILITY_IDS, deriveCapabilities, isActionGated, type Capability, type CapabilityMediation, type CapabilityPayload, } from "@kardalum/plugin-package/reference";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* module reads those and produces the list. One source of truth, three
|
|
10
|
-
* renderings: the install screen shows it as consent items, marketplace
|
|
11
|
-
* review reads it to decide whether a submission needs a person, and the
|
|
12
|
-
* generated reference page prints it. An author cannot claim a capability
|
|
13
|
-
* they do not have, and cannot quietly have one they did not claim.
|
|
14
|
-
*
|
|
15
|
-
* **Disclosure, not enforcement** (S267 section 7). Plugin backend code
|
|
16
|
-
* runs unsandboxed and in-process, so this list is what the author says
|
|
17
|
-
* and what review checks, never what the runtime confines. The mediated
|
|
18
|
-
* entries are genuinely enforced, because the host owns the decision. The
|
|
19
|
-
* promised ones are promises.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* `mediated`: the host bounds the outcome. It decides where the view
|
|
23
|
-
* renders, which gate the route sits behind, whether the action passes.
|
|
24
|
-
* Review of a mediated capability is automatic.
|
|
25
|
-
*
|
|
26
|
-
* `promised`: only the plugin's own code can honour it, so a person reads
|
|
27
|
-
* it against that code before the submission is approved.
|
|
28
|
-
*/
|
|
29
|
-
export type CapabilityMediation = "mediated" | "promised";
|
|
30
|
-
/**
|
|
31
|
-
* The part of the declaration that produced a capability which is safe to
|
|
32
|
-
* store and to render: never a live function, never a Zod schema.
|
|
33
|
-
*
|
|
34
|
-
* `details` is a list of plain identifying strings, not sentences, so each
|
|
35
|
-
* of the three readers can put its own heading in front of them and none
|
|
36
|
-
* has to re-derive them from the manifest. For an assertion the detail IS
|
|
37
|
-
* the author's reason, because a reason is the whole content of an
|
|
38
|
-
* assertion.
|
|
39
|
-
*/
|
|
40
|
-
export interface CapabilityPayload {
|
|
41
|
-
/** How many declarations produced this capability. 1 for a declaration
|
|
42
|
-
* that is not a list (themeTokens, an assertion, structured storage). */
|
|
43
|
-
count: number;
|
|
44
|
-
/** One line per declaration, in declaration order. Empty when the
|
|
45
|
-
* declaration carries no readable per-entry detail. */
|
|
46
|
-
details: string[];
|
|
47
|
-
}
|
|
48
|
-
export interface Capability {
|
|
49
|
-
/** Stable, dotted, and never reused for a different meaning. Persisted
|
|
50
|
-
* on a marketplace version row and rendered by three surfaces, so a
|
|
51
|
-
* renamed id is a data migration, not a cosmetic change. */
|
|
52
|
-
id: string;
|
|
53
|
-
payload: CapabilityPayload;
|
|
54
|
-
mediation: CapabilityMediation;
|
|
55
|
-
}
|
|
56
|
-
/** Whether this contribution kind sits behind a named permission action.
|
|
57
|
-
* Lives on CONTRIBUTION_RULES rather than in a separate list, because that
|
|
58
|
-
* record is compiler-total over the 19 contribution keys: a twentieth key
|
|
59
|
-
* cannot be added without classifying it here. */
|
|
60
|
-
export declare function isActionGated(key: keyof PluginContributions): boolean;
|
|
61
|
-
/** Every capability id this contract can produce, for the readers that
|
|
62
|
-
* need to be pinned against it (the marketplace's static mirror) and for
|
|
63
|
-
* the reference page S289 generates. */
|
|
64
|
-
export declare const CAPABILITY_IDS: readonly string[];
|
|
65
|
-
/**
|
|
66
|
-
* Compute a manifest's capability list.
|
|
67
|
-
*
|
|
68
|
-
* Accepts both a live `PluginManifest` and the redacted, JSON-safe summary
|
|
69
|
-
* kardalum plugin writes into a package's `manifest.json`, for the same
|
|
70
|
-
* reason `declaresClientBundle` does: the marketplace never executes
|
|
71
|
-
* plugin code, so the only manifest it can read is the redacted one, and
|
|
72
|
-
* the two sides of an install must not disagree about what a package
|
|
73
|
-
* declares.
|
|
74
|
-
*
|
|
75
|
-
* Defensive about its input rather than trusting it. It is handed parsed
|
|
76
|
-
* JSON from an artifact an author built, so a missing or wrongly-shaped
|
|
77
|
-
* field degrades to "declares nothing" for that field instead of throwing
|
|
78
|
-
* inside a review queue listing.
|
|
3
|
+
* S289 (S347): the one sentence every surface uses for what declaring a
|
|
4
|
+
* promised capability means for review. Every submission that passes
|
|
5
|
+
* validation reaches a reviewer whatever it declares; a promised capability
|
|
6
|
+
* changes what the reviewer reads, not whether one reads. The manual and
|
|
7
|
+
* the plugin rules file quote it verbatim after its subject, and
|
|
8
|
+
* promised-wording.test.ts holds them to it.
|
|
79
9
|
*/
|
|
80
|
-
export declare
|
|
10
|
+
export declare const PROMISED_CAPABILITY_SENTENCE = "is a promised capability, so a reviewer reads it against your code";
|
|
81
11
|
/**
|
|
82
12
|
* Who is reading. The split is deliberate and predates this module: a
|
|
83
13
|
* shopper on a public listing is being told what the plugin does, while an
|
package/dist/capabilities.js
CHANGED
|
@@ -1,326 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* in section 6's automatic list, which enumerates a policy rather than the
|
|
17
|
-
* contract's keys. They are classified mediated here rather than dropped:
|
|
18
|
-
* the marketplace resolves the two bundle keys, and the cross-plugin
|
|
19
|
-
* service registry (when it exists) is the host's own lookup.
|
|
20
|
-
* `exposedServices` reads promised until you remember that plugin backend
|
|
21
|
-
* code is unsandboxed and in-process already, so handing another plugin a
|
|
22
|
-
* service adds a lookup rather than a privilege it could not otherwise
|
|
23
|
-
* reach. Emitting them changes no review outcome, since mediated is
|
|
24
|
-
* automatic, and not emitting them would be the exact failure this design
|
|
25
|
-
* exists to prevent, a declaration the install screen does not disclose.
|
|
26
|
-
*/
|
|
27
|
-
const CONTRIBUTION_RULES = {
|
|
28
|
-
dataTypes: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
|
|
29
|
-
documentTypes: { derives: "one", id: "content.documentType", mediation: "mediated", actionGated: false },
|
|
30
|
-
adminSections: { derives: "one", id: "admin.section", mediation: "mediated", actionGated: true },
|
|
31
|
-
// S280: a rail entry in a built-in section. Mediated like a section: the
|
|
32
|
-
// host decides where it renders and checks its action before it does. A
|
|
33
|
-
// section's own rail entries are part of the section's declaration, so
|
|
34
|
-
// they are disclosed under admin.section rather than counted here.
|
|
35
|
-
railEntries: { derives: "one", id: "admin.railEntry", mediation: "mediated", actionGated: true },
|
|
36
|
-
dashboardWidgets: { derives: "one", id: "admin.dashboardWidget", mediation: "mediated", actionGated: true },
|
|
37
|
-
settingsPages: { derives: "one", id: "admin.settingsPage", mediation: "mediated", actionGated: true },
|
|
38
|
-
contentTreeActions: { derives: "one", id: "admin.contentTreeAction", mediation: "mediated", actionGated: true },
|
|
39
|
-
editorToolbar: { derives: "one", id: "admin.editorToolbarItem", mediation: "mediated", actionGated: true },
|
|
40
|
-
templates: { derives: "one", id: "render.template", mediation: "mediated", actionGated: false },
|
|
41
|
-
assets: { derives: "one", id: "render.asset", mediation: "mediated", actionGated: false },
|
|
42
|
-
themeTokens: { derives: "one", id: "theme.tokens", mediation: "mediated", actionGated: false },
|
|
43
|
-
hooks: { derives: "one", id: "server.hook", mediation: "mediated", actionGated: false },
|
|
44
|
-
scheduledTasks: { derives: "one", id: "server.scheduledTask", mediation: "mediated", actionGated: false },
|
|
45
|
-
mediaProcessors: { derives: "one", id: "media.processor", mediation: "mediated", actionGated: false },
|
|
46
|
-
serializers: { derives: "one", id: "api.serializer", mediation: "mediated", actionGated: false },
|
|
47
|
-
exposedServices: { derives: "one", id: "service.exposed", mediation: "mediated", actionGated: false },
|
|
48
|
-
bundledPlugins: { derives: "one", id: "bundle.plugin", mediation: "mediated", actionGated: false },
|
|
49
|
-
bundledTemplate: { derives: "one", id: "bundle.template", mediation: "mediated", actionGated: false },
|
|
50
|
-
apiRoutes: { derives: "perApiRouteTier", actionGated: true },
|
|
51
|
-
};
|
|
52
|
-
/** Whether this contribution kind sits behind a named permission action.
|
|
53
|
-
* Lives on CONTRIBUTION_RULES rather than in a separate list, because that
|
|
54
|
-
* record is compiler-total over the 19 contribution keys: a twentieth key
|
|
55
|
-
* cannot be added without classifying it here. */
|
|
56
|
-
export function isActionGated(key) {
|
|
57
|
-
return CONTRIBUTION_RULES[key].actionGated;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The order capabilities are emitted in, fixed here rather than taken from
|
|
61
|
-
* the manifest's own key order. Two manifests declaring the same things in
|
|
62
|
-
* a different order must produce the same list, or the install screen, the
|
|
63
|
-
* review queue and the reference page would each print a different
|
|
64
|
-
* ordering of one fact.
|
|
65
|
-
*
|
|
66
|
-
* Storage leads because it is the heaviest thing an operator consents to.
|
|
67
|
-
* The assertions trail because they are the claims with nothing behind
|
|
68
|
-
* them, and they read as a closing caveat rather than as a feature.
|
|
69
|
-
*/
|
|
70
|
-
const CONTRIBUTION_ORDER = [
|
|
71
|
-
"dataTypes",
|
|
72
|
-
"documentTypes",
|
|
73
|
-
"adminSections",
|
|
74
|
-
"railEntries",
|
|
75
|
-
"dashboardWidgets",
|
|
76
|
-
"settingsPages",
|
|
77
|
-
"contentTreeActions",
|
|
78
|
-
"editorToolbar",
|
|
79
|
-
"templates",
|
|
80
|
-
"assets",
|
|
81
|
-
"themeTokens",
|
|
82
|
-
"hooks",
|
|
83
|
-
"scheduledTasks",
|
|
84
|
-
"mediaProcessors",
|
|
85
|
-
"serializers",
|
|
86
|
-
"apiRoutes",
|
|
87
|
-
"exposedServices",
|
|
88
|
-
"bundledPlugins",
|
|
89
|
-
"bundledTemplate",
|
|
90
|
-
];
|
|
91
|
-
/**
|
|
92
|
-
* The access tiers, in emission order, with the classification S267
|
|
93
|
-
* section 6 gives each.
|
|
94
|
-
*
|
|
95
|
-
* `admin` is mediated: the host checks the JWT admin session before the
|
|
96
|
-
* handler runs. `apiKey` and `public` are promised: the host enforces the
|
|
97
|
-
* tier, but a route reachable without an admin session is an abuse surface
|
|
98
|
-
* whose handling belongs to the author.
|
|
99
|
-
*/
|
|
100
|
-
const API_ROUTE_TIERS = [
|
|
101
|
-
{ tier: "admin", id: "api.route.admin", mediation: "mediated" },
|
|
102
|
-
{ tier: "apiKey", id: "api.route.apiKey", mediation: "promised" },
|
|
103
|
-
{ tier: "public", id: "api.route.public", mediation: "promised" },
|
|
104
|
-
];
|
|
105
|
-
/**
|
|
106
|
-
* The tier a route actually runs at.
|
|
107
|
-
*
|
|
108
|
-
* This is a real coupling to `apps/server/src/routes/plugin-api-routes.ts`,
|
|
109
|
-
* which resolves `route.access ?? "admin"` and documents that anything
|
|
110
|
-
* unrecognised falls back to `admin`, secure by default. If the two
|
|
111
|
-
* disagreed, the install screen would promise a gate the runtime does not
|
|
112
|
-
* apply, or warn about one it does. The dispatcher is canonical; this
|
|
113
|
-
* follows it.
|
|
114
|
-
*/
|
|
115
|
-
function routeTier(access) {
|
|
116
|
-
const match = API_ROUTE_TIERS.find((entry) => entry.tier === access);
|
|
117
|
-
return match ?? API_ROUTE_TIERS[0];
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Capability id per assertion, in emission order. The reason the author
|
|
121
|
-
* gave is the capability's only detail, because the reason is the only
|
|
122
|
-
* checkable thing an assertion carries.
|
|
123
|
-
*
|
|
124
|
-
* Keyed by `keyof PluginAssertions` for the same reason
|
|
125
|
-
* CONTRIBUTION_RULES is keyed by `keyof PluginContributions`, and with
|
|
126
|
-
* more force: an unclassified contribution is at worst an undisclosed
|
|
127
|
-
* mediated addition, while an unclassified assertion is an undisclosed
|
|
128
|
-
* PROMISE, so it would never reach the consent list and never send the
|
|
129
|
-
* submission to a person. A third kind added to the type and not here is
|
|
130
|
-
* a compile error.
|
|
131
|
-
*/
|
|
132
|
-
const ASSERTION_RULES = {
|
|
133
|
-
externalNetwork: "network.external",
|
|
134
|
-
filesystemAccess: "filesystem.access",
|
|
135
|
-
};
|
|
136
|
-
/** The rules as the derivation walks them. Object key order is stable for
|
|
137
|
-
* string keys, so this is the literal's own order rather than a second
|
|
138
|
-
* list to keep in step. */
|
|
139
|
-
const ASSERTION_ENTRIES = Object.entries(ASSERTION_RULES);
|
|
140
|
-
/**
|
|
141
|
-
* Derived from `databaseCompatibility.storageType`, and NOT from a
|
|
142
|
-
* contribution: `PluginContributions` has no storage-shaped key and the
|
|
143
|
-
* contract cannot silently grow one. Declaring structured storage IS the
|
|
144
|
-
* declaration that the plugin owns real tables. The server agrees: it
|
|
145
|
-
* persists `storageType` on the installed-plugin row, because uninstall
|
|
146
|
-
* has to answer that question without the manifest.
|
|
147
|
-
*/
|
|
148
|
-
const STRUCTURED_STORAGE_ID = "storage.structured";
|
|
149
|
-
/** Every capability id this contract can produce, for the readers that
|
|
150
|
-
* need to be pinned against it (the marketplace's static mirror) and for
|
|
151
|
-
* the reference page S289 generates. */
|
|
152
|
-
export const CAPABILITY_IDS = [
|
|
153
|
-
STRUCTURED_STORAGE_ID,
|
|
154
|
-
...CONTRIBUTION_ORDER.flatMap((key) => {
|
|
155
|
-
const rule = CONTRIBUTION_RULES[key];
|
|
156
|
-
return rule.derives === "one" ? [rule.id] : API_ROUTE_TIERS.map((entry) => entry.id);
|
|
157
|
-
}),
|
|
158
|
-
...ASSERTION_ENTRIES.map(([, id]) => id),
|
|
159
|
-
];
|
|
160
|
-
// ---------------------------------------------------------------------------
|
|
161
|
-
// Reading a declaration's readable detail
|
|
162
|
-
// ---------------------------------------------------------------------------
|
|
163
|
-
/** The plain string fields a contribution entry can be named by, in the
|
|
164
|
-
* order they are preferred. Every one of them survives the redaction
|
|
165
|
-
* kardalum plugin applies when it writes a package's manifest.json, which
|
|
166
|
-
* is the only form the marketplace ever sees. */
|
|
167
|
-
const ENTRY_NAME_FIELDS = ["name", "label", "alias", "file", "id"];
|
|
168
|
-
/** A slot's label is a map of language to text (S280), and the detail is a
|
|
169
|
-
* plain identifying string, so a label map reads as its English text, the
|
|
170
|
-
* one language every label must carry. A map without readable English
|
|
171
|
-
* yields nothing, and the next name field is tried. */
|
|
172
|
-
function readableField(value) {
|
|
173
|
-
if (typeof value === "string")
|
|
174
|
-
return value.trim() ? value : null;
|
|
175
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
176
|
-
const en = value.en;
|
|
177
|
-
if (typeof en === "string" && en.trim())
|
|
178
|
-
return en;
|
|
179
|
-
}
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
function describeEntry(entry) {
|
|
183
|
-
if (typeof entry === "string")
|
|
184
|
-
return entry.trim() || null;
|
|
185
|
-
if (entry === null || typeof entry !== "object")
|
|
186
|
-
return null;
|
|
187
|
-
const record = entry;
|
|
188
|
-
// An apiRoute is named by what it exposes, not by an id it has no field
|
|
189
|
-
// for: "GET /orders" is the thing a reviewer looks up in the code.
|
|
190
|
-
if (typeof record.method === "string" && typeof record.path === "string") {
|
|
191
|
-
return `${record.method} ${record.path}`;
|
|
192
|
-
}
|
|
193
|
-
for (const field of ENTRY_NAME_FIELDS) {
|
|
194
|
-
const value = readableField(record[field]);
|
|
195
|
-
if (value !== null)
|
|
196
|
-
return value;
|
|
197
|
-
}
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Normalises one declared contribution value into the entries that
|
|
202
|
-
* produced it, handling the three shapes the contract uses: a list, the
|
|
203
|
-
* `hooks` map (whose keys are the events, and which arrives as a plain key
|
|
204
|
-
* array once redacted), and a single object like `themeTokens`.
|
|
205
|
-
*
|
|
206
|
-
* Returns an empty list for a declaration that declares nothing, which is
|
|
207
|
-
* the same rule `declaresClientBundle` applies: a present-but-empty array
|
|
208
|
-
* or object buys nothing. The one shape that is NOT nothing is the
|
|
209
|
-
* redactor's `true`, which is a declaration stripped of its detail rather
|
|
210
|
-
* than an absent one.
|
|
211
|
-
*/
|
|
212
|
-
function declaredEntries(key, value) {
|
|
213
|
-
if (value === null || value === undefined)
|
|
214
|
-
return [];
|
|
215
|
-
if (Array.isArray(value))
|
|
216
|
-
return value;
|
|
217
|
-
// `true` is what kardalum plugin's redactor writes for a contribution it
|
|
218
|
-
// can keep no safe per-entry detail from (`serializers` is the only key
|
|
219
|
-
// that lands there today). It means "declared, nothing readable to
|
|
220
|
-
// show", which is exactly one entry with no detail, the same answer the
|
|
221
|
-
// live object form gives. Reading it as "declares nothing" is what made
|
|
222
|
-
// every marketplace surface omit a capability the SDK derived from the
|
|
223
|
-
// same plugin.
|
|
224
|
-
if (value === true)
|
|
225
|
-
return [true];
|
|
226
|
-
if (typeof value !== "object")
|
|
227
|
-
return [];
|
|
228
|
-
// `hooks` is Record<event, handler> live and string[] once redacted; the
|
|
229
|
-
// array branch above already covered the redacted form.
|
|
230
|
-
if (key === "hooks")
|
|
231
|
-
return Object.keys(value);
|
|
232
|
-
// A present-but-empty object buys nothing, which is the rule the array
|
|
233
|
-
// branch gets for free: `themeTokens: {}` declares no tokens, so it is
|
|
234
|
-
// not a theme capability.
|
|
235
|
-
return Object.keys(value).length === 0 ? [] : [value];
|
|
236
|
-
}
|
|
1
|
+
// S289: the derivation moved to @kardalum/plugin-package/reference so the one
|
|
2
|
+
// reference builder can call it (the SDK depends on plugin-package, never the
|
|
3
|
+
// reverse). The SDK's public names are unchanged; the labels stay here.
|
|
4
|
+
export { CAPABILITY_IDS, deriveCapabilities, isActionGated, } from "@kardalum/plugin-package/reference";
|
|
5
|
+
// A contribution or assertion added to the manifest and not classified in
|
|
6
|
+
// the derivation is a compile error here, as it was before the move.
|
|
7
|
+
const contributionKeysAreTotal = true;
|
|
8
|
+
const assertionKeysAreTotal = true;
|
|
9
|
+
// A manifest change that makes a field the builder already reads
|
|
10
|
+
// incompatible with what it expects is a compile error here (spec D3). A new
|
|
11
|
+
// field the builder does not read is not caught.
|
|
12
|
+
const manifestFeedsTheBuilder = true;
|
|
13
|
+
void contributionKeysAreTotal;
|
|
14
|
+
void assertionKeysAreTotal;
|
|
15
|
+
void manifestFeedsTheBuilder;
|
|
237
16
|
// ---------------------------------------------------------------------------
|
|
238
|
-
//
|
|
17
|
+
// Labels
|
|
239
18
|
// ---------------------------------------------------------------------------
|
|
240
19
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* the two sides of an install must not disagree about what a package
|
|
248
|
-
* declares.
|
|
249
|
-
*
|
|
250
|
-
* Defensive about its input rather than trusting it. It is handed parsed
|
|
251
|
-
* JSON from an artifact an author built, so a missing or wrongly-shaped
|
|
252
|
-
* field degrades to "declares nothing" for that field instead of throwing
|
|
253
|
-
* inside a review queue listing.
|
|
20
|
+
* S289 (S347): the one sentence every surface uses for what declaring a
|
|
21
|
+
* promised capability means for review. Every submission that passes
|
|
22
|
+
* validation reaches a reviewer whatever it declares; a promised capability
|
|
23
|
+
* changes what the reviewer reads, not whether one reads. The manual and
|
|
24
|
+
* the plugin rules file quote it verbatim after its subject, and
|
|
25
|
+
* promised-wording.test.ts holds them to it.
|
|
254
26
|
*/
|
|
255
|
-
export
|
|
256
|
-
if (manifest === null || typeof manifest !== "object")
|
|
257
|
-
return [];
|
|
258
|
-
const source = manifest;
|
|
259
|
-
const capabilities = [];
|
|
260
|
-
const databaseCompatibility = source.databaseCompatibility;
|
|
261
|
-
const storageType = databaseCompatibility !== null && typeof databaseCompatibility === "object"
|
|
262
|
-
? databaseCompatibility.storageType
|
|
263
|
-
: undefined;
|
|
264
|
-
if (storageType === "structured") {
|
|
265
|
-
capabilities.push({
|
|
266
|
-
id: STRUCTURED_STORAGE_ID,
|
|
267
|
-
payload: { count: 1, details: [] },
|
|
268
|
-
mediation: "promised",
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
const contributions = source.contributions !== null && typeof source.contributions === "object"
|
|
272
|
-
? source.contributions
|
|
273
|
-
: {};
|
|
274
|
-
for (const key of CONTRIBUTION_ORDER) {
|
|
275
|
-
const entries = declaredEntries(key, contributions[key]);
|
|
276
|
-
if (entries.length === 0)
|
|
277
|
-
continue;
|
|
278
|
-
const rule = CONTRIBUTION_RULES[key];
|
|
279
|
-
if (rule.derives === "one") {
|
|
280
|
-
capabilities.push({
|
|
281
|
-
id: rule.id,
|
|
282
|
-
payload: {
|
|
283
|
-
count: entries.length,
|
|
284
|
-
details: entries.map(describeEntry).filter((detail) => detail !== null),
|
|
285
|
-
},
|
|
286
|
-
mediation: rule.mediation,
|
|
287
|
-
});
|
|
288
|
-
continue;
|
|
289
|
-
}
|
|
290
|
-
// One contribution, up to three capabilities: the routes are grouped
|
|
291
|
-
// by the tier the dispatcher will actually run them at.
|
|
292
|
-
for (const tier of API_ROUTE_TIERS) {
|
|
293
|
-
const routes = entries.filter((entry) => routeTier(entry !== null && typeof entry === "object" ? entry.access : undefined)
|
|
294
|
-
.tier === tier.tier);
|
|
295
|
-
if (routes.length === 0)
|
|
296
|
-
continue;
|
|
297
|
-
capabilities.push({
|
|
298
|
-
id: tier.id,
|
|
299
|
-
payload: {
|
|
300
|
-
count: routes.length,
|
|
301
|
-
details: routes.map(describeEntry).filter((detail) => detail !== null),
|
|
302
|
-
},
|
|
303
|
-
mediation: tier.mediation,
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const assertions = source.assertions !== null && typeof source.assertions === "object"
|
|
308
|
-
? source.assertions
|
|
309
|
-
: {};
|
|
310
|
-
for (const [key, id] of ASSERTION_ENTRIES) {
|
|
311
|
-
const declared = assertions[key];
|
|
312
|
-
if (declared === null || typeof declared !== "object")
|
|
313
|
-
continue;
|
|
314
|
-
const reason = declared.reason;
|
|
315
|
-
// An assertion without a readable reason is not consentable and not
|
|
316
|
-
// checkable, so it is dropped rather than rendered as a blank line.
|
|
317
|
-
// The SDK schema refuses it upstream; this guards a parsed artifact.
|
|
318
|
-
if (typeof reason !== "string" || !reason.trim())
|
|
319
|
-
continue;
|
|
320
|
-
capabilities.push({ id, payload: { count: 1, details: [reason] }, mediation: "promised" });
|
|
321
|
-
}
|
|
322
|
-
return capabilities;
|
|
323
|
-
}
|
|
27
|
+
export const PROMISED_CAPABILITY_SENTENCE = "is a promised capability, so a reviewer reads it against your code";
|
|
324
28
|
export const CAPABILITY_LABELS = {
|
|
325
29
|
"storage.structured": {
|
|
326
30
|
operator: "Structured storage",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
|
|
2
2
|
export type { IconName } from "./icon-name.js";
|
|
3
3
|
export type { DataTypeIssue, DataTypeValidateContext, DataTypeValidateHook, DataTypeValidatorEntry, DataTypeValidatorLookup, } from "./datatype-validation.js";
|
|
4
|
-
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, SettingsPageContribution, ContentTreeActionContribution, EditorToolbarContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
4
|
+
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, SettingsPageContribution, ContentTreeActionContribution, EditorToolbarContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
5
5
|
export { slotLabel } from "./manifest.js";
|
|
6
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
6
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
7
7
|
export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
8
8
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
9
9
|
export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
10
|
-
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, type PluginFetch, type ContentHost, type ContentHostPage, type ContentHostDocumentType, } from "./plugin-context.js";
|
|
11
|
-
export { PluginScreenProvider, usePluginScreen, type PluginScreenContext, } from "./plugin-screen-context.js";
|
|
10
|
+
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, MANAGE_API, type PluginFetch, type ContentHost, type ContentHostPage, type ContentHostDocumentType, } from "./plugin-context.js";
|
|
11
|
+
export { PluginScreenProvider, PluginTranslateProvider, usePluginScreen, usePluginTranslate, type PluginScreenContext, type PluginTranslate, } from "./plugin-screen-context.js";
|
|
12
12
|
export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
|
|
13
13
|
export { EntitlementGate, useEntitlement, type EntitlementStatus, type UseEntitlementResult, } from "./entitlement-gate.js";
|
|
14
14
|
export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext } from "./entitlement-types.js";
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { slotLabel } from "./manifest.js";
|
|
|
5
5
|
// install screen, marketplace review and the generated reference page
|
|
6
6
|
// all read one source. Exported from the package index as well as the
|
|
7
7
|
// ./manifest subpath because the admin UI renders it.
|
|
8
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
8
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
9
9
|
export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, } from "./manifest-schema.js";
|
|
10
10
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
11
11
|
export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
@@ -14,10 +14,11 @@ export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
|
14
14
|
// `@kardalum/plugin-sdk/host` subpath (host-entry.ts). Federation shares
|
|
15
15
|
// the bare package name only, not that subpath, so a plugin that imports it
|
|
16
16
|
// anyway registers into its own bundled copy, never the host's registry.
|
|
17
|
-
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, } from "./plugin-context.js";
|
|
17
|
+
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, MANAGE_API, } from "./plugin-context.js";
|
|
18
18
|
// S280 (spec D7): what a plugin screen (a section, its rail entries, a rail
|
|
19
|
-
// entry in a built-in section) learns about where it is rendered.
|
|
20
|
-
|
|
19
|
+
// entry in a built-in section) learns about where it is rendered. S291: the
|
|
20
|
+
// plugin's t for views outside a screen (a data type's views).
|
|
21
|
+
export { PluginScreenProvider, PluginTranslateProvider, usePluginScreen, usePluginTranslate, } from "./plugin-screen-context.js";
|
|
21
22
|
export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
|
|
22
23
|
// S284b: the entitlement in a view. The verifier for plugin SERVER code is
|
|
23
24
|
// the separate `@kardalum/plugin-sdk/entitlement` subpath (it needs
|
|
@@ -19,4 +19,8 @@ export const LICENSE_VERDICT_PUBLIC_KEYS = [
|
|
|
19
19
|
keyId: "a4c4a883bf1392a6",
|
|
20
20
|
publicKey: "MCowBQYDK2VwAyEA5GCT1TohzY/oOnB0xZ+7pnvCddka2IBFoJNmmYGu9PI=",
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
keyId: "e72c11dbcdf71e68",
|
|
24
|
+
publicKey: "MCowBQYDK2VwAyEA5k/u12E1qUYgQRR4+sjtdmBoYieQdXyunB//groWtCo=",
|
|
25
|
+
},
|
|
22
26
|
];
|
package/dist/manifest-entry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
|
|
2
|
-
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, SettingsPageContribution, ContentTreeActionContribution, EditorToolbarContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, ViewBearingContribution, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
2
|
+
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, SettingsPageContribution, ContentTreeActionContribution, EditorToolbarContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, ViewBearingContribution, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
3
3
|
export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./manifest.js";
|
|
4
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
4
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
5
5
|
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
6
6
|
export type { PluginColumnType, PluginColumnSchema, PluginIndexSchema, PluginTableSchema, StructuredQueryBuilder, StructuredStorageTransaction, ScopedStructuredStorage, PublishedContent, PluginApiRouteContext, } from "./structured-storage-types.js";
|
|
7
7
|
export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext } from "./entitlement-types.js";
|
package/dist/manifest-entry.js
CHANGED
|
@@ -8,6 +8,6 @@ export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./m
|
|
|
8
8
|
// The derived capability list (S268 Task 5). Pure data in, pure data
|
|
9
9
|
// out: no React, no zod, so every non-browser reader of the manifest
|
|
10
10
|
// contract can compute it.
|
|
11
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
11
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
12
12
|
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
|
|
13
13
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|