@mosaicast/plugin-sdk 0.5.0 → 0.6.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/README.md +31 -4
- package/dist/index.d.ts +71 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,8 +31,8 @@ The contract version is a **single SemVer anchor** mirrored in four places that
|
|
|
31
31
|
(CI enforces it): `build.gradle.kts` · `package.json` · `PlatformApi.VERSION` · `PLATFORM_API_VERSION`.
|
|
32
32
|
|
|
33
33
|
**How the host matches it:** core compares `major.minor` **exactly**. A plugin declaring `0.3.x` is
|
|
34
|
-
rejected the moment the host runs `0.
|
|
35
|
-
is pre-1.0 a breaking change is therefore a **minor** bump (`0.
|
|
34
|
+
rejected the moment the host runs `0.6.0` — with the reason shown in the admin log viewer. While the SDK
|
|
35
|
+
is pre-1.0 a breaking change is therefore a **minor** bump (`0.5.0` → `0.6.0`), not a major one; from
|
|
36
36
|
`1.0.0` on, normal SemVer applies and breaking means major.
|
|
37
37
|
|
|
38
38
|
## Build & test
|
|
@@ -49,8 +49,8 @@ npm ci && npm run build # TypeScript: src → dist (.js + .d.ts)
|
|
|
49
49
|
- Released: from **GitHub Packages** (see below).
|
|
50
50
|
```kotlin
|
|
51
51
|
dependencies {
|
|
52
|
-
compileOnly("dev.mosaicast:plugin-api:0.
|
|
53
|
-
testImplementation("dev.mosaicast:plugin-testkit:0.
|
|
52
|
+
compileOnly("dev.mosaicast:plugin-api:0.6.0") // contract, provided by the host
|
|
53
|
+
testImplementation("dev.mosaicast:plugin-testkit:0.6.0") // test doubles only
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
Sources + Javadoc JARs give IDE hover docs automatically.
|
|
@@ -131,8 +131,35 @@ Write the aggregate back to an entity scope (`…/data/episode/s2e04/leaderboard
|
|
|
131
131
|
**What the host enforces**, so a plugin doesn't have to:
|
|
132
132
|
- Data is **hard-scoped to the plugin id** — a plugin can only ever see its own data.
|
|
133
133
|
- **Access is what the manifest declares**, not what the slots imply: `"data": { "readableBy": "fan", "writableBy": "podcaster" }`. Values are `anonymous | fan | podcaster | admin`; `writableBy` may not be `anonymous`, and an absent block defaults `readableBy` to the **write** floor rather than to anonymous — saying nothing gets the safe answer. A slot's `visibleTo` governs **rendering only**; deriving the data floor from unrelated UI slots is what once let a plugin with one anonymous slot expose its whole store.
|
|
134
|
+
- **The floors say who, not which key** — see below.
|
|
134
135
|
- The host validates that the scope exists (and that the feed is enabled). `ctx.api` carries the user's auth (session or personal access token).
|
|
135
136
|
|
|
137
|
+
### Backend-owned keys (since 0.6.0) — a shared-scope document has no owner
|
|
138
|
+
|
|
139
|
+
Authorization on the data surface is **per plugin, not per document**. Every caller above your `writableBy` floor can overwrite or delete *any* key in a `site`/`feed`/`season`/`episode` scope — including a value your backend computed on a schedule, because the host cannot tell your write from a `curl`:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# podcaster, with a plugin declaring writableBy: "podcaster" — the floor did exactly what it says
|
|
143
|
+
curl -b cookie.podcaster -X PUT .../api/plugins/sample/data/site/main/stats \
|
|
144
|
+
-H "X-XSRF-TOKEN: $XT" -d '{"totalEpisodes":9999}' # 204, and every visitor now reads it
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
If your backend authors a key, **declare it**:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
"data": {
|
|
151
|
+
"readableBy": "anonymous",
|
|
152
|
+
"writableBy": "podcaster",
|
|
153
|
+
"backendOwned": ["stats", "agg:*"]
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- Each entry is an exact key, a prefix ending in `*`, or the bare `*` (the whole store is computed) — `DocStore.BACKEND_OWNED_PATTERN` = `^(\*|[A-Za-z0-9._:-]{1,200}\*?)$`. A `*` in the middle, or an empty entry, is rejected at load. A pattern can never be a key, since `*` is not in `KEY_PATTERN`.
|
|
158
|
+
- A client `PUT`/`DELETE` to a matching key is **403**, worded differently from the role-floor 403 so you can tell which rule refused you. **Reads are untouched** and still governed by `readableBy`. `ctx.store()` — the backend — is unaffected, which is the whole point.
|
|
159
|
+
- **Write those keys in `register()` too, not only on a schedule.** The declaration refuses *new* client writes; it does not remove a value forged before it existed, so otherwise a bogus document survives until the next tick.
|
|
160
|
+
- It is **ignored for `user` scopes**: the backend cannot write a partition at all, so even a bare `*` leaves those to their owner.
|
|
161
|
+
- `PluginDataDeclaration` in the TS SDK types this block (documentation only — the host validates it), and `InMemoryDocStore.withBackendOwned(...)` enforces it in tests, so you can prove the forged `PUT` fails without a running host.
|
|
162
|
+
|
|
136
163
|
**No request-time server logic.** A write is plain persistence — no plugin code runs on the request. Anything derived, validated or aggregated server-side is **precomputed** in `register`/`onSchedule` and read back from the store.
|
|
137
164
|
|
|
138
165
|
> Roadmap: custom plugin-defined server routes may arrive in a later `platformApi` version; plugins use the doc store.
|
package/dist/index.d.ts
CHANGED
|
@@ -17,9 +17,18 @@
|
|
|
17
17
|
* rejects a mismatch at startup (ARCHITECTURE §7.2). While the SDK is pre-1.0 a breaking change is
|
|
18
18
|
* therefore a *minor* bump; from `1.0.0` on, breaking means major.
|
|
19
19
|
*/
|
|
20
|
-
export declare const PLATFORM_API_VERSION: '0.
|
|
20
|
+
export declare const PLATFORM_API_VERSION: '0.6.0';
|
|
21
21
|
/** A user's role (ARCHITECTURE §8.5). Anonymous visitors have no role (`user` is `null`). */
|
|
22
22
|
export type Role = 'admin' | 'podcaster' | 'fan';
|
|
23
|
+
/**
|
|
24
|
+
* A role as the manifest names it: the {@link Role} values plus `anonymous`, the absence of one.
|
|
25
|
+
*
|
|
26
|
+
* Used by the access floors in {@link PluginDataDeclaration}. `ctx.user` is `null` rather than
|
|
27
|
+
* `'anonymous'` — this spelling exists only where a manifest has to name "no role at all".
|
|
28
|
+
*
|
|
29
|
+
* @since 0.6.0
|
|
30
|
+
*/
|
|
31
|
+
export type DataAccessRole = Role | 'anonymous';
|
|
23
32
|
/**
|
|
24
33
|
* The severity of a {@link PluginContext.log} call.
|
|
25
34
|
*
|
|
@@ -193,7 +202,11 @@ export interface PagedDocs<T = unknown> {
|
|
|
193
202
|
* scope exists. Access is what your **manifest** declares:
|
|
194
203
|
*
|
|
195
204
|
* ```json
|
|
196
|
-
* "data": {
|
|
205
|
+
* "data": {
|
|
206
|
+
* "readableBy": "fan",
|
|
207
|
+
* "writableBy": "podcaster",
|
|
208
|
+
* "backendOwned": ["stats", "agg:*"]
|
|
209
|
+
* }
|
|
197
210
|
* ```
|
|
198
211
|
*
|
|
199
212
|
* Values are `anonymous | fan | podcaster | admin` ({@link Role} plus `anonymous`, the absence of one);
|
|
@@ -207,6 +220,14 @@ export interface PagedDocs<T = unknown> {
|
|
|
207
220
|
* either — a write floor protects the *shared* surface, and a user partition is unshared. Any
|
|
208
221
|
* authenticated caller reads and writes their own `data/user/me/…` whatever the manifest declares.
|
|
209
222
|
*
|
|
223
|
+
* **The floors say who, not which key.** Authorization here is per plugin, not per document, so every
|
|
224
|
+
* caller above `writableBy` can overwrite or delete *any* shared-scope key — including one your backend
|
|
225
|
+
* computed, since the host cannot tell a scheduled write from a `curl`. `backendOwned` is the exception:
|
|
226
|
+
* an exact key or a `*`-terminated prefix that the backend still writes freely while a client `PUT` or
|
|
227
|
+
* `DELETE` answers **403**, worded differently from the role-floor 403 so you can tell which rule refused
|
|
228
|
+
* you. Reads are unaffected. It does not apply to `user` partitions, and it does not remove a value forged
|
|
229
|
+
* before it was declared — see {@link PluginDataDeclaration}.
|
|
230
|
+
*
|
|
210
231
|
* A write is plain persistence: no plugin code runs at request time, so anything derived or validated
|
|
211
232
|
* server-side must be precomputed in the backend's `register`/`onSchedule` and read back from the store.
|
|
212
233
|
*
|
|
@@ -229,6 +250,7 @@ export interface PagedDocs<T = unknown> {
|
|
|
229
250
|
*
|
|
230
251
|
* // A leaderboard is not built here: the backend aggregates every user's marks with
|
|
231
252
|
* // queryAcrossUsers(...) and writes the result to `${shared}/leaderboard` for this component to read.
|
|
253
|
+
* // If the manifest declares that key backendOwned, a PUT to it from here is a 403 — by design.
|
|
232
254
|
* const board = await ctx.api.get<Leaderboard>(`${shared}/leaderboard`);
|
|
233
255
|
* ```
|
|
234
256
|
*/
|
|
@@ -409,6 +431,53 @@ export interface ConsentApi {
|
|
|
409
431
|
*/
|
|
410
432
|
onChange(cb: () => void): Unsubscribe;
|
|
411
433
|
}
|
|
434
|
+
/**
|
|
435
|
+
* The shape of your manifest's `data` block — who may reach the doc store over HTTP, and which keys only
|
|
436
|
+
* your backend may write.
|
|
437
|
+
*
|
|
438
|
+
* **This type is documentation, not enforcement**, on the same terms as {@link ConsentServiceDeclaration}:
|
|
439
|
+
* the manifest is owned and validated by the host, nothing here runs at load time, and if this type and
|
|
440
|
+
* core disagree, core wins. It is typed because the block carries a security control — a typo in
|
|
441
|
+
* `backendOwned` protects nothing and says nothing, which is the worst way for a declaration to fail.
|
|
442
|
+
*
|
|
443
|
+
* ```ts
|
|
444
|
+
* const data: PluginDataDeclaration = {
|
|
445
|
+
* readableBy: 'anonymous',
|
|
446
|
+
* writableBy: 'podcaster',
|
|
447
|
+
* backendOwned: ['stats', 'agg:*'],
|
|
448
|
+
* };
|
|
449
|
+
* ```
|
|
450
|
+
*
|
|
451
|
+
* @since 0.6.0
|
|
452
|
+
*/
|
|
453
|
+
export interface PluginDataDeclaration {
|
|
454
|
+
/**
|
|
455
|
+
* The minimum role that may **read** the doc store.
|
|
456
|
+
*
|
|
457
|
+
* Omit the whole block and this falls back to {@link writableBy}, not to `anonymous` — saying nothing
|
|
458
|
+
* gets the safe answer. Never applies to the `user` scope, which is the caller's own either way.
|
|
459
|
+
*/
|
|
460
|
+
readableBy?: DataAccessRole;
|
|
461
|
+
/**
|
|
462
|
+
* The minimum role that may **write** the doc store. May not be `anonymous`.
|
|
463
|
+
*
|
|
464
|
+
* Governs shared scopes only: a `user` partition is unshared, so its owner writes it whatever this says.
|
|
465
|
+
*/
|
|
466
|
+
writableBy: Exclude<DataAccessRole, 'anonymous'>;
|
|
467
|
+
/**
|
|
468
|
+
* Keys your backend authors, which clients may read but never `PUT` or `DELETE` (403).
|
|
469
|
+
*
|
|
470
|
+
* Each entry is an exact key, a prefix ending in `*`, or the bare `*` for "the whole store is computed"
|
|
471
|
+
* — matching `^(\*|[A-Za-z0-9._:-]{1,200}\*?)$`, mirrored from the Java `DocStore.BACKEND_OWNED_PATTERN`.
|
|
472
|
+
* A `*` in the middle, or an empty entry, is rejected when the plugin loads.
|
|
473
|
+
*
|
|
474
|
+
* Declare a key here **and write it in your backend's `register`**, not only on a schedule: the
|
|
475
|
+
* declaration refuses new client writes but does not remove a value a client wrote before it existed, so
|
|
476
|
+
* a forged document otherwise survives until the next tick. It is ignored for `user` partitions, which
|
|
477
|
+
* the backend cannot write at all — even a bare `*` leaves those to their owner.
|
|
478
|
+
*/
|
|
479
|
+
backendOwned?: string[];
|
|
480
|
+
}
|
|
412
481
|
/**
|
|
413
482
|
* One item a service stores on the visitor's device, as declared in `plugin.json`.
|
|
414
483
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAG,OAAgB,CAAC;AAErD,6FAA6F;AAC7F,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK;IACpB,uBAAuB;IACvB,IAAI,EAAE,MAAM,GAAG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AM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAC9B,UAAU,CAqBZ"}
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* rejects a mismatch at startup (ARCHITECTURE §7.2). While the SDK is pre-1.0 a breaking change is
|
|
20
20
|
* therefore a *minor* bump; from `1.0.0` on, breaking means major.
|
|
21
21
|
*/
|
|
22
|
-
export const PLATFORM_API_VERSION = '0.
|
|
22
|
+
export const PLATFORM_API_VERSION = '0.6.0';
|
|
23
23
|
/**
|
|
24
24
|
* The id every `user` data path carries: the literal `me`, mirroring the Java `Scope.SELF_ID`.
|
|
25
25
|
*
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qDAAqD;AAErD;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qDAAqD;AAErD;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAgB,CAAC;AA0DrD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAa,CAAC;AA6N3C;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,QAAyB;IACtD,OAAO,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC;AACpD,CAAC;AA6WD,MAAM,gBAAgB,GAA+C;IACnE,CAAC,IAAI,EAAE,SAAS,CAAC;IACjB,CAAC,SAAS,EAAE,cAAc,CAAC;IAC3B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,WAAW,EAAE,iBAAiB,CAAC;IAChC,CAAC,QAAQ,EAAE,aA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AE,EAAE,CACtE,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAClF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAsB,EACtB,MAA+B;IAE/B,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE;QACxC,MAAM,GAAG,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,MAAM;YACR,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO;YACL,kGAAkG;YAClG,6EAA6E;YAC7E,WAAW,EAAE,EAAE,CAAC;QAClB,CAAC;QACD,CAAC,CAAC,GAAG,EAAE,MAAM;YACX,MAAM,QAAQ,GACZ,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;YACnE,OAAO,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosaicast/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Versioned plugin contract for Mosaicast: the frontend PluginContext types, a Web Component base helper, an i18n helper, plus a test kit under the /testing subpath.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test:watch": "vitest"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"jsdom": "^
|
|
36
|
+
"jsdom": "^30.0.1",
|
|
37
37
|
"typescript": "^7.0.2",
|
|
38
38
|
"vitest": "^4.1.10"
|
|
39
39
|
},
|