|
2 | 2 |
|
3 | 3 | <!-- Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --> |
4 | 4 |
|
| 5 | +## [3.4.0] |
| 6 | + |
| 7 | +Lockstep release of `pryv@3.4.0` + `@pryv/monitor@3.4.0` + |
| 8 | +`@pryv/socket.io@3.4.0`, plus `@pryv/cmc@1.1.0` (additive — new error |
| 9 | +ids on the catalogue + new wire-shape contract tests). |
| 10 | + |
| 11 | +### `@pryv/cmc@1.1.0` |
| 12 | + |
| 13 | +#### Added |
| 14 | +- **7 new error ids** on `cmc.errorIds`, mirroring the server-side |
| 15 | + `CmcErrorIds` additions shipped in `open-pryv.io` 2.0.0-pre.4 (cmc |
| 16 | + plugin commit `0306c7e`): |
| 17 | + - `CAPABILITY_TTL_OUT_OF_RANGE` (`cmc-capability-ttl-out-of-range`) |
| 18 | + — server now bounds `content.expiresAt` to `[60s, 30d]` at mint. |
| 19 | + Omit `expiresAt` to use the 7-day default; pick a value in range |
| 20 | + to override. |
| 21 | + - `HANDLER_MISSING_CAPABILITY_ID` (`cmc-handler-missing-capability-id`) |
| 22 | + — was on the server catalog but missing from the SDK mirror. |
| 23 | + - `CHAT_DISABLED` (`cmc-chat-disabled`) — feature-gating: writes |
| 24 | + rejected when the relationship's `clientData.cmc.features.chat === |
| 25 | + false`. Default-permit on omission. |
| 26 | + - `SYSTEM_MESSAGING_DISABLED` (`cmc-system-messaging-disabled`) — |
| 27 | + same for `features.systemMessaging`. Scope-request / |
| 28 | + scope-update remain protocol-level and permitted regardless. |
| 29 | + - `CLIENTDATA_CMC_FORBIDDEN` (`cmc-clientdata-cmc-forbidden`) — |
| 30 | + `accesses.create` / `accesses.update` reject any user-supplied |
| 31 | + `clientData.cmc.*`. Use this to catch hand-crafted forge attempts |
| 32 | + surfacing as 400-not-200 from the api-server. |
| 33 | + - `RESERVED_STREAM_UNDELETABLE` (`cmc-reserved-stream-undeletable`) |
| 34 | + — `streams.delete` rejects the five reserved CMC parents + |
| 35 | + `:_cmc:_internal:*` + plugin-managed `chats`/`collectors` segments |
| 36 | + even from personal tokens. App code should not target these. |
| 37 | + - `COUNTERPARTY_IDENTITY_MISSING` (`cmc-counterparty-identity-missing`) |
| 38 | + — peer-side `content.from` stamping hook rejects a write when the |
| 39 | + counterparty access has no stored `{username,host}` identity. |
| 40 | + Surfaced for ops; app developers shouldn't see it under normal |
| 41 | + flow. |
| 42 | + |
| 43 | +#### Tests |
| 44 | +- New `[CMCXEC]` J9 catalogue-match test pinning all 7 ids against |
| 45 | + the server-side strings. Future drift between SDK + server will |
| 46 | + fail at unit-test time. |
| 47 | +- New `[CMCL1OB]`–`[CMCL1OH]` wire-shape contract tests (J3, J4, J5, |
| 48 | + J7, J8) covering `listInvites` (uses `streams` not `streamIds`), |
| 49 | + `listAcceptedRelationships` counterparty-mapping precedence |
| 50 | + (content.from > content.acceptedBy > null fallback), `waitForAccept` |
| 51 | + `sinceTime` filter (defensive passthrough when `ev.time` missing), |
| 52 | + `acceptInvite` `scopeStreamId` requirement, `acceptInvite` |
| 53 | + `dataGrantAccessId` resolution post-completion. |
| 54 | + |
| 55 | +#### Compatibility |
| 56 | +- **No source-level breaking changes.** Existing apps using |
| 57 | + `pryv@3.3.x` + `@pryv/cmc@1.0.x` continue to work; the new error ids |
| 58 | + are additive. The `^3.3.0` peer-dep selector on `@pryv/cmc` resolves |
| 59 | + cleanly against `pryv@3.4.0` so apps that pin only `@pryv/cmc` get |
| 60 | + the new `pryv` transitively without action. |
| 61 | + |
| 62 | +### `pryv@3.4.0`, `@pryv/monitor@3.4.0`, `@pryv/socket.io@3.4.0` |
| 63 | + |
| 64 | +- No code changes. Versions bumped in lockstep with `@pryv/cmc@1.1.0` |
| 65 | + so operators upgrade with `npm install pryv@3.4.0 @pryv/cmc@1.1.0` |
| 66 | + and pick up the new ids + the monitor / socket.io packages follow |
| 67 | + via transitive resolution. |
| 68 | + |
| 69 | +### Server-side coverage |
| 70 | + |
| 71 | +This SDK release pairs with `open-pryv.io` 2.0.0-pre.4 (cmc plugin |
| 72 | +commit `0306c7e`+) which ships: |
| 73 | +- Plugin field-stamping completion (`inviteEventId` on inbox mirrors, |
| 74 | + `requestEventId` on capability accesses via post-create hook). |
| 75 | +- Capability TTL configurable per-invite, bounded `[60s, 30d]`. |
| 76 | +- Feature-gating enforced at send time on `handleChat` / `handleSystem`. |
| 77 | +- Forge-prevention on `accesses.create` / `accesses.update` / |
| 78 | + `streams.delete` (new route-level hooks). |
| 79 | +- `content.from` stamping extended from `:_cmc:inbox` to per-app |
| 80 | + chats/collectors writes by counterparty-marked accesses. |
| 81 | +- `:_cmc:_internal:*` defense-in-depth filter on `events.get` / |
| 82 | + `events.getOne` / `streams.get`. |
| 83 | + |
| 84 | +See `open-pryv.io/components/cmc/CHANGELOG-v2.md` for the server-side |
| 85 | +detail. |
| 86 | + |
5 | 87 | ## [3.3.2] |
6 | 88 |
|
7 | 89 | Lockstep patch release of `pryv@3.3.2` + `@pryv/monitor@3.3.2` + |
|
0 commit comments