@open-e2ee/signal-protocol-sdk 0.1.0-alpha.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/ADAPTERS.md +12 -12
  2. package/ARCHITECTURE.md +12 -4
  3. package/CHANGELOG.md +457 -0
  4. package/README.md +25 -15
  5. package/SECURITY.md +1 -1
  6. package/client/README.md +2 -2
  7. package/device/README.md +3 -1
  8. package/dist/client/client.d.ts +6 -6
  9. package/dist/client/client.js +6 -6
  10. package/dist/client/compose.d.ts +2 -2
  11. package/dist/client/config.d.ts +17 -1
  12. package/dist/client/config.d.ts.map +1 -1
  13. package/dist/client/config.js.map +1 -1
  14. package/dist/client/index.d.ts +2 -2
  15. package/dist/device/expo-metadata.d.ts +26 -0
  16. package/dist/device/expo-metadata.d.ts.map +1 -0
  17. package/dist/device/expo-metadata.js +33 -0
  18. package/dist/device/expo-metadata.js.map +1 -0
  19. package/dist/device/index.d.ts +1 -1
  20. package/dist/device/index.d.ts.map +1 -1
  21. package/dist/device/index.js +5 -1
  22. package/dist/device/index.js.map +1 -1
  23. package/dist/device/provisioning.d.ts +4 -12
  24. package/dist/device/provisioning.d.ts.map +1 -1
  25. package/dist/device/provisioning.js +4 -21
  26. package/dist/device/provisioning.js.map +1 -1
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +5 -5
  29. package/dist/internal/crypto/symmetric/aes.d.ts.map +1 -1
  30. package/dist/internal/crypto/symmetric/aes.js +27 -30
  31. package/dist/internal/crypto/symmetric/aes.js.map +1 -1
  32. package/dist/internal/crypto/utils.d.ts.map +1 -1
  33. package/dist/internal/crypto/utils.js +26 -1
  34. package/dist/internal/crypto/utils.js.map +1 -1
  35. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
  36. package/dist/internal/encoding/proto/pq-ratchet-serialize.js +12 -4
  37. package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
  38. package/dist/internal/encoding/proto/primitives.d.ts +261 -6
  39. package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
  40. package/dist/internal/encoding/proto/primitives.js +468 -6
  41. package/dist/internal/encoding/proto/primitives.js.map +1 -1
  42. package/dist/internal/encoding/proto/sender-key-message.d.ts +4 -3
  43. package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
  44. package/dist/internal/encoding/proto/sender-key-message.js +97 -76
  45. package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
  46. package/dist/internal/encoding/proto/signal-message.d.ts +7 -2
  47. package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
  48. package/dist/internal/encoding/proto/signal-message.js +194 -110
  49. package/dist/internal/encoding/proto/signal-message.js.map +1 -1
  50. package/dist/internal/manager/manager.d.ts +2 -2
  51. package/dist/internal/manager/manager.js +1 -1
  52. package/dist/internal/manager/manager.js.map +1 -1
  53. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +50 -4
  54. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  55. package/dist/internal/protocol/sealed-sender/proto/index.js +273 -151
  56. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  57. package/dist/internal/protocol/spqr/braid.d.ts.map +1 -1
  58. package/dist/internal/protocol/spqr/braid.js.map +1 -1
  59. package/dist/internal/protocol/spqr/index.d.ts +1 -1
  60. package/dist/internal/protocol/spqr/index.d.ts.map +1 -1
  61. package/dist/internal/protocol/spqr/index.js +0 -2
  62. package/dist/internal/protocol/spqr/index.js.map +1 -1
  63. package/dist/internal/protocol/spqr/message.d.ts +0 -18
  64. package/dist/internal/protocol/spqr/message.d.ts.map +1 -1
  65. package/dist/internal/protocol/spqr/message.js +1 -37
  66. package/dist/internal/protocol/spqr/message.js.map +1 -1
  67. package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +30 -0
  68. package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts.map +1 -0
  69. package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +45 -0
  70. package/dist/internal/protocol/spqr/ml-kem-braid/progress.js.map +1 -0
  71. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +11 -8
  72. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
  73. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +11 -8
  74. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
  75. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -1
  76. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts.map +1 -1
  77. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +342 -152
  78. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
  79. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +9 -6
  80. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  81. package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
  82. package/dist/internal/protocol/spqr/spqr.d.ts +5 -3
  83. package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
  84. package/dist/internal/protocol/spqr/spqr.js +62 -7
  85. package/dist/internal/protocol/spqr/spqr.js.map +1 -1
  86. package/dist/internal/session/cipher.d.ts +4 -0
  87. package/dist/internal/session/cipher.d.ts.map +1 -1
  88. package/dist/internal/session/cipher.js +8 -3
  89. package/dist/internal/session/cipher.js.map +1 -1
  90. package/dist/internal/session/types.d.ts +8 -0
  91. package/dist/internal/session/types.d.ts.map +1 -1
  92. package/dist/layers.d.ts +2 -2
  93. package/dist/layers.d.ts.map +1 -1
  94. package/dist/layers.js +2 -2
  95. package/dist/layers.js.map +1 -1
  96. package/dist/local/store/index.d.ts +3 -3
  97. package/dist/local/store/index.d.ts.map +1 -1
  98. package/dist/local/store/index.js +4 -4
  99. package/dist/local/store/index.js.map +1 -1
  100. package/dist/local/store/{mock → memory}/adapter.d.ts +10 -10
  101. package/dist/local/store/memory/adapter.d.ts.map +1 -0
  102. package/dist/local/store/{mock → memory}/adapter.js +5 -5
  103. package/dist/local/store/memory/adapter.js.map +1 -0
  104. package/dist/local/store/{mock → memory}/failures.d.ts +6 -6
  105. package/dist/local/store/memory/failures.d.ts.map +1 -0
  106. package/dist/local/store/{mock → memory}/failures.js +6 -6
  107. package/dist/local/store/memory/failures.js.map +1 -0
  108. package/dist/local/store/memory/index.d.ts +11 -0
  109. package/dist/local/store/memory/index.d.ts.map +1 -0
  110. package/dist/local/store/memory/index.js +7 -0
  111. package/dist/local/store/memory/index.js.map +1 -0
  112. package/dist/local/store/node/database.d.ts +1 -1
  113. package/dist/local/store/node/database.js +1 -1
  114. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  115. package/dist/local/store/react-native/adapter.js +69 -1
  116. package/dist/local/store/react-native/adapter.js.map +1 -1
  117. package/dist/local/store/react-native/backend-conformance.d.ts +66 -0
  118. package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -0
  119. package/dist/local/store/react-native/backend-conformance.js +326 -0
  120. package/dist/local/store/react-native/backend-conformance.js.map +1 -0
  121. package/dist/local/store/react-native/index.d.ts +9 -4
  122. package/dist/local/store/react-native/index.d.ts.map +1 -1
  123. package/dist/local/store/react-native/index.js +2 -0
  124. package/dist/local/store/react-native/index.js.map +1 -1
  125. package/dist/local/store/react-native/reference-backend.d.ts +42 -0
  126. package/dist/local/store/react-native/reference-backend.d.ts.map +1 -0
  127. package/dist/local/store/react-native/reference-backend.js +177 -0
  128. package/dist/local/store/react-native/reference-backend.js.map +1 -0
  129. package/dist/local/store/react-native/storage.d.ts +9 -0
  130. package/dist/local/store/react-native/storage.d.ts.map +1 -1
  131. package/dist/local/store/web/adapter.d.ts +11 -1
  132. package/dist/local/store/web/adapter.d.ts.map +1 -1
  133. package/dist/local/store/web/adapter.js +226 -50
  134. package/dist/local/store/web/adapter.js.map +1 -1
  135. package/dist/local/store/web/index.d.ts +3 -2
  136. package/dist/local/store/web/index.d.ts.map +1 -1
  137. package/dist/local/store/web/index.js.map +1 -1
  138. package/dist/local/vault/index.d.ts +5 -1
  139. package/dist/local/vault/index.d.ts.map +1 -1
  140. package/dist/local/vault/index.js +1 -1
  141. package/dist/local/vault/index.js.map +1 -1
  142. package/dist/remote/relay/convex/component/certificates.d.ts.map +1 -1
  143. package/dist/remote/relay/convex/component/certificates.js +26 -31
  144. package/dist/remote/relay/convex/component/certificates.js.map +1 -1
  145. package/dist/remote/relay/index.d.ts +1 -1
  146. package/dist/remote/relay/index.d.ts.map +1 -1
  147. package/dist/remote/relay/index.js +2 -2
  148. package/dist/remote/relay/index.js.map +1 -1
  149. package/dist/remote/relay/{mock → memory}/adapter.d.ts +17 -17
  150. package/dist/remote/relay/memory/adapter.d.ts.map +1 -0
  151. package/dist/remote/relay/{mock → memory}/adapter.js +17 -17
  152. package/dist/remote/relay/memory/adapter.js.map +1 -0
  153. package/dist/remote/relay/{mock → memory}/failures.d.ts +5 -5
  154. package/dist/remote/relay/memory/failures.d.ts.map +1 -0
  155. package/dist/remote/relay/{mock → memory}/failures.js +1 -1
  156. package/dist/remote/relay/memory/failures.js.map +1 -0
  157. package/dist/remote/relay/{mock → memory}/group-server.d.ts +1 -1
  158. package/dist/remote/relay/memory/group-server.d.ts.map +1 -0
  159. package/dist/remote/relay/{mock → memory}/group-server.js +1 -1
  160. package/dist/remote/relay/memory/group-server.js.map +1 -0
  161. package/dist/remote/relay/memory/index.d.ts +11 -0
  162. package/dist/remote/relay/memory/index.d.ts.map +1 -0
  163. package/dist/remote/relay/memory/index.js +7 -0
  164. package/dist/remote/relay/memory/index.js.map +1 -0
  165. package/dist/types/errors.d.ts +33 -0
  166. package/dist/types/errors.d.ts.map +1 -1
  167. package/dist/types/errors.js +36 -0
  168. package/dist/types/errors.js.map +1 -1
  169. package/dist/types/protocol-config.d.ts +44 -1
  170. package/dist/types/protocol-config.d.ts.map +1 -1
  171. package/dist/types/protocol-config.js +1 -0
  172. package/dist/types/protocol-config.js.map +1 -1
  173. package/dist/types/session.d.ts +1 -1
  174. package/dist/types/session.js +1 -1
  175. package/docs/ASSURANCE.md +49 -14
  176. package/docs/CLIENT_COMPOSITION.md +3 -3
  177. package/docs/DEVIATIONS.md +72 -31
  178. package/docs/GETTING_STARTED.md +11 -11
  179. package/docs/PACKAGE_SURFACE.md +10 -8
  180. package/docs/PROTOCOL_POLICY.md +6 -0
  181. package/docs/RECIPES.md +12 -12
  182. package/local/store/README.md +95 -8
  183. package/local/store/{mock → memory}/README.md +8 -8
  184. package/local/store/react-native/README.md +34 -2
  185. package/local/store/web/README.md +30 -3
  186. package/package.json +14 -11
  187. package/remote/README.md +7 -7
  188. package/remote/relay/README.md +5 -5
  189. package/remote/relay/{mock → memory}/README.md +8 -8
  190. package/dist/local/store/mock/adapter.d.ts.map +0 -1
  191. package/dist/local/store/mock/adapter.js.map +0 -1
  192. package/dist/local/store/mock/failures.d.ts.map +0 -1
  193. package/dist/local/store/mock/failures.js.map +0 -1
  194. package/dist/local/store/mock/index.d.ts +0 -11
  195. package/dist/local/store/mock/index.d.ts.map +0 -1
  196. package/dist/local/store/mock/index.js +0 -7
  197. package/dist/local/store/mock/index.js.map +0 -1
  198. package/dist/remote/relay/mock/adapter.d.ts.map +0 -1
  199. package/dist/remote/relay/mock/adapter.js.map +0 -1
  200. package/dist/remote/relay/mock/failures.d.ts.map +0 -1
  201. package/dist/remote/relay/mock/failures.js.map +0 -1
  202. package/dist/remote/relay/mock/group-server.d.ts.map +0 -1
  203. package/dist/remote/relay/mock/group-server.js.map +0 -1
  204. package/dist/remote/relay/mock/index.d.ts +0 -11
  205. package/dist/remote/relay/mock/index.d.ts.map +0 -1
  206. package/dist/remote/relay/mock/index.js +0 -7
  207. package/dist/remote/relay/mock/index.js.map +0 -1
package/ADAPTERS.md CHANGED
@@ -18,7 +18,7 @@ The relay interface handles server-owned Signal Protocol state:
18
18
  Use:
19
19
 
20
20
  - `ConvexSignalProtocolRelayServer` from `@open-e2ee/signal-protocol-sdk/remote/relay/convex`
21
- - `MockSignalProtocolRelayServer` from `@open-e2ee/signal-protocol-sdk/remote/relay/mock`
21
+ - `InMemorySignalProtocolRelayServer` from `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
22
22
  - or a custom implementation
23
23
 
24
24
  ### Storage: `ISignalProtocolLocalStore`
@@ -35,10 +35,10 @@ Use:
35
35
 
36
36
  - `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
37
37
  - Expo integration helpers like `getKeyStorage`, `getDatabaseKeyManager`, `clearDatabaseKeyCache`, and `createPreKeyMaintenanceStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
38
- - `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web` (experimental)
39
- - `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native` (experimental; use `await ReactNativeSignalProtocolStore.create({ storage })` with a caller-provided key-value backend)
38
+ - `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web`
39
+ - `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native` (use `await ReactNativeSignalProtocolStore.create({ storage })` with a caller-provided key-value backend, verified with the exported backend-conformance kit)
40
40
  - `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node`
41
- - `MockSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/mock`
41
+ - `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
42
42
  - or a custom implementation
43
43
 
44
44
  ### Remote object storage: `SignalProtocolRemoteObjectStore`
@@ -69,11 +69,11 @@ functions retain authentication, authorization, and persistence.
69
69
 
70
70
  ```ts
71
71
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
72
- import { mockStore } from "@open-e2ee/signal-protocol-sdk/local/store/mock";
72
+ import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
73
73
 
74
74
  const signal = await createSignalProtocolClient({
75
75
  identity: { userId: "alice" },
76
- adapters: { storage: mockStore() },
76
+ adapters: { storage: inMemoryStore() },
77
77
  });
78
78
  ```
79
79
 
@@ -112,19 +112,19 @@ database and SQLCipher bootstrap.
112
112
 
113
113
  ```ts
114
114
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
115
- import { mockRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/mock";
116
- import { mockStore } from "@open-e2ee/signal-protocol-sdk/local/store/mock";
115
+ import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
116
+ import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
117
117
 
118
- const relay = mockRelay();
118
+ const relay = inMemoryRelay();
119
119
 
120
120
  const alice = await createSignalProtocolClient({
121
121
  identity: { userId: "alice" },
122
- adapters: { storage: mockStore(), relay },
122
+ adapters: { storage: inMemoryStore(), relay },
123
123
  });
124
124
 
125
125
  const bob = await createSignalProtocolClient({
126
126
  identity: { userId: "bob" },
127
- adapters: { storage: mockStore(), relay },
127
+ adapters: { storage: inMemoryStore(), relay },
128
128
  });
129
129
  ```
130
130
 
@@ -182,7 +182,7 @@ const signal = await createSignalProtocolClient({
182
182
 
183
183
  ## Verifiable adapter design
184
184
 
185
- Mock relay and storage adapters provide deterministic, in-memory behavior for
185
+ In-memory relay and storage adapters provide deterministic behavior for
186
186
  development environments. Production adapters remain dependency-injected so
187
187
  applications can evaluate storage, delivery, and failure behavior without
188
188
  reaching into client internals.
package/ARCHITECTURE.md CHANGED
@@ -15,7 +15,7 @@ The `@open-e2ee` scope is the umbrella namespace. Package and primary-client
15
15
  names identify the protocol they implement so future protocol packages do not
16
16
  share an ambiguous client identity.
17
17
 
18
- This package is in alpha. Prefer a clear, versioned correction over a
18
+ This package is pre-1.0. Prefer a clear, versioned correction over a
19
19
  compatibility shim when a boundary is wrong.
20
20
 
21
21
  ## Review Posture
@@ -40,7 +40,7 @@ compatibility shim when a boundary is wrong.
40
40
  | Public feature surfaces | [blocking/](./blocking/), [groups/](./groups/), [media/](./media/), [profile/](./profile/), [sealed-sender/](./sealed-sender/), [username/](./username/), [zk/](./zk/) | App-facing helpers that compose protocol, media, or account-state behavior without joining the inward dependency hierarchy |
41
41
  | Public utility surfaces | [encoding/](./encoding/), [files/](./files/), [hooks/](./hooks/), [utils/](./utils/), `logger.ts`, `server-clock.ts`, `versions.ts` | Stable helpers, React hooks, logging, clock estimation, version metadata, and file/encoding utilities |
42
42
  | Local adapters | [local/](./local/) | Local protocol stores and secret vault integrations |
43
- | Remote adapters | [remote/](./remote/) | Relay and object-store ports plus Convex, mock, R2, and S3 adapters |
43
+ | Remote adapters | [remote/](./remote/) | Relay and object-store ports plus Convex, in-memory, R2, and S3 adapters |
44
44
  | Device features | [device/](./device/) | Device IDs, provisioning, linked-device lifecycle and transfer |
45
45
 
46
46
  ## Documentation Ownership
@@ -71,9 +71,9 @@ import {
71
71
  Platform and backend integrations are explicit subpaths such as:
72
72
 
73
73
  - `@open-e2ee/signal-protocol-sdk/local/store/expo`
74
- - `@open-e2ee/signal-protocol-sdk/local/store/mock`
74
+ - `@open-e2ee/signal-protocol-sdk/local/store/memory`
75
75
  - `@open-e2ee/signal-protocol-sdk/remote/relay/convex`
76
- - `@open-e2ee/signal-protocol-sdk/remote/relay/mock`
76
+ - `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
77
77
  - `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
78
78
  - `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2/server`
79
79
  - `@open-e2ee/signal-protocol-sdk/remote/object-store/s3`
@@ -137,6 +137,7 @@ object records, credentials, and bucket.
137
137
  - `PostQuantumPolicy`
138
138
  - `ProtocolStrategyConfig`
139
139
  - `ProtocolSelectionEvent`
140
+ - `BraidProgressEvent`
140
141
  - `SenderKeysConfig`
141
142
  - `PreKeyMaintenanceStore`
142
143
  - `SENDER_KEYS_DEFAULTS`
@@ -164,6 +165,13 @@ diagnostics, telemetry, and algorithm tuning, but compatibility fallback is sele
164
165
  through `protocol.postQuantum: 'compatible'`, and direct SPQR is selected
165
166
  through `protocol.braid: 'disabled'`.
166
167
 
168
+ Two strategy hooks report protocol events. `onProtocolSelected` fires once per
169
+ session establishment, from the handshake. `onBraidProgress` fires on every
170
+ braid-mode send and receive, from the SPQR seam that holds the braid state; the
171
+ manager carries the strategy into `SessionCipher`, which passes it to `spqrSend`
172
+ and `spqrRecv`. Both hooks are guarded, so a consumer that throws cannot break
173
+ the protocol path.
174
+
167
175
  ## Session Resolution
168
176
 
169
177
  Session convergence is a SESAME behavior, but active/archive record manipulation is shared session-domain logic.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,462 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ - **ML-KEM Braid key-agreement progress is now observable.** A new
6
+ `protocolStrategy.onBraidProgress` callback reports a `BraidProgressEvent`
7
+ after every braid-mode send and receive: the chunks this side has carried in
8
+ the current epoch, the chunks the open transfers account for, the epoch, and
9
+ whether the operation produced the epoch secret. Braid mode spreads one
10
+ ML-KEM key agreement across many messages, and until now the chunk counts
11
+ lived entirely inside the state machine, so a host had no way to show or log
12
+ how far a ratchet had travelled. A direct-mode session never raises the
13
+ callback. The hook is guarded exactly as `onProtocolSelected` is: a consumer
14
+ that throws is logged and the protocol path continues.
15
+
16
+ - **The web store's atomic commits leave no window for a partial commit
17
+ under tab death.** A dying page closes its IndexedDB connection
18
+ gracefully, and a transaction that is idle at an await boundary then
19
+ commits the writes it already holds. The atomic session/trust commit
20
+ awaited each write in turn, so a tab death after the session write could
21
+ commit the session while the consumed one-time prekey survived — CI
22
+ observed exactly that once in Firefox. The identity-rotation commit
23
+ deleted sessions through an awaited cursor walk, with the same windows
24
+ between the new pin and each deletion. Both commits now enter every
25
+ mutation in one synchronous batch before any settles, and a structural
26
+ browser test fails on every run — no kill timing required — if a commit
27
+ regains an await boundary between writes.
28
+
29
+ - **ML-KEM Braid key agreement completes.** A braid session now reaches its
30
+ first epoch on both sides; before this it could not complete one at all,
31
+ failing at the 66th alternating message with `Future epoch requested`.
32
+ Braid is the default SCKA mode, so this was the default path. The two sides
33
+ derive an epoch secret at very different times by design — the encapsulator
34
+ from a single `Encaps1` over the header, the decapsulator only after
35
+ `Decaps` over the full `ct1 ‖ ct2` — and everything sent across that gap has
36
+ to go out under the epoch the peer can still follow. `spqrSend` took that
37
+ epoch from the chunk it was emitting, so it lost it on exactly the messages
38
+ that carry no chunk: once its ciphertext is acknowledged, a sender has
39
+ nothing left to send until the encapsulation-key transfer finishes. It then
40
+ fell back to its own SPQR epoch, which had already advanced, and the peer
41
+ rejected the message. The braid state machine reports the epoch it is
42
+ sending under on every send, including the empty ones, and `spqrSend` now
43
+ uses that for both the message-key derivation and the wire epoch. No wire
44
+ format, serialized state, or public API changes.
45
+
46
+ - **Session state survives cloning under a cross-realm `structuredClone`.**
47
+ `cloneProtocolState` now checks once whether the ambient `structuredClone`
48
+ returns objects of the calling realm, and falls back to its portable clone
49
+ when it does not. Reached across a realm boundary — the arrangement a Node
50
+ `vm` context produces, and one Jest builds for everything it runs —
51
+ `structuredClone` returns a working `Map` whose prototype belongs to the
52
+ other realm, so `instanceof Map` reports false for it everywhere downstream.
53
+ Two silent losses followed: the session codec wrote such a `Map` as `{}`,
54
+ and the portable clone rebuilt it as a prototype-only husk whose `size`
55
+ getter throws. ML-KEM Braid felt this first, because its decoders are the
56
+ only protocol state held in a `Map` that has to survive many clones — a
57
+ receiving decoder discarded every chunk it had accepted, held at one chunk
58
+ forever, and the key agreement could never complete. Single-realm hosts, the
59
+ browser and React Native included, always took and still take the native
60
+ path.
61
+
62
+ - **Restoring a braid encoder state now rejects a malformed polynomial.** Each
63
+ `polys` element is a run of big-endian 16-bit coefficients. An odd-length
64
+ element read one byte past the end. The resulting
65
+ `undefined` folded into the low half of a coefficient. A truncated state
66
+ therefore decoded to a polynomial with a fabricated final term. The decoder
67
+ now refuses empty and odd-length elements, as the reference does.
68
+
69
+ - **Encoding a braid message now rejects a chunk that is not 32 bytes.** The
70
+ slot holds exactly 32 bytes. A shorter chunk left the rest of the slot zeroed and
71
+ encoded a chunk the sender never held. A longer chunk raised a bounds error
72
+ that named no field. Both now fail and report the length offered. The braid
73
+ state machine only ever produces 32-byte chunks.
74
+
75
+ - **Deriving an SPQR send key now rejects a zeroed chain key.** Two paths
76
+ install one. An epoch advance for receiving alone installs a zeroed send
77
+ chain key. Pruning writes one over each retired send chain. Deriving from
78
+ either would key a message from a known constant. No production path reached
79
+ that state, so the check is defence in depth.
80
+
81
+ - **The unused SPQR binary header codec is gone.** `serializeSPQRHeaderBinary`
82
+ and `deserializeSPQRHeaderBinary` emitted an unversioned framing. No
83
+ production path used it. The documented wire format does not describe it. Use
84
+ the protobuf codec, which carries the version capability.
85
+
86
+ ## 0.1.0
87
+
88
+ - **First non-prerelease release.** Identical in code to `0.1.0-alpha.14`;
89
+ the version graduates the `0.1.0-alpha` series. The alpha label is retired
90
+ because the condition it described no longer holds: every shipped store
91
+ adapter now carries the full `ISignalProtocolLocalStore` contract with its
92
+ graduation checklist running as continuous CI gates — the storage contract
93
+ suites in real Chromium, Firefox, and WebKit, the backend-conformance kit
94
+ on Hermes, and the interruption, storage-pressure, multi-tab, and soak
95
+ suites. The `0.x` caveat stands: public APIs and persisted formats may
96
+ change before `1.0`.
97
+
98
+ ## 0.1.0-alpha.14
99
+
100
+ - **`ReactNativeSignalProtocolStore` is no longer experimental.** Every gate
101
+ on its graduation checklist now runs continuously. A new
102
+ backend-conformance kit — `runBackendConformance` and
103
+ `assertBackendConformance`, exported from the package — executes thirteen
104
+ cases against any `ReactNativeKeyValueStorage` implementation: round-trips,
105
+ key listing, batch removal, in-order atomic application, checks evaluated
106
+ against pre-batch state, null-guarded creation, all-or-nothing failure,
107
+ exact-userId session removal with in-batch visibility, a single winner
108
+ between concurrent guarded batches, and durability across reopen. Negative
109
+ tests prove the kit catches a non-atomic backend, a prefix-matching
110
+ session removal, and an unserialized backend. A new
111
+ `createReferenceReactNativeBackend` — the executable specification of the
112
+ backend contract — passes the kit on the Hermes engine React Native ships
113
+ with, in a new CI gate that runs the bundled kit on the sha256-pinned
114
+ Hermes CLI and requires an explicit pass sentinel, because Hermes exits 0
115
+ on an unhandled async rejection. Interruption and storage-pressure jest
116
+ suites drive the adapter over the reference backend: a simulated process
117
+ kill before commit leaves every atomic security write all-or-nothing and
118
+ a retry after reopen lands it whole, and quota exhaustion is exercised
119
+ through every write path.
120
+
121
+ - **Quota exhaustion in the React Native store now surfaces as a typed
122
+ error.** The backend contract gains a documented quota signal: a backend
123
+ rejects the failing write with an error named `QuotaExceededError` and
124
+ commits nothing. The adapter maps that signal to the public
125
+ `StorageQuotaExceededError` (code `STORAGE_QUOTA_EXCEEDED`) at the same
126
+ adapter-boundary seam the browser store uses, so both stores report
127
+ storage pressure identically.
128
+
129
+ ## 0.1.0-alpha.13
130
+
131
+ - **`IndexedDbSignalProtocolStore` is no longer experimental.** Every gate
132
+ on its graduation checklist now runs continuously: the storage contract
133
+ suites in real Chromium, Firefox, and WebKit; the multi-tab
134
+ compare-and-set suite; the interruption suite; the storage-pressure
135
+ suite; and a new soak gate. The soak drives 2,000 full
136
+ construct/initialize/write/read/close cycles through the adapter in one
137
+ real Chromium page, samples renderer memory — including ArrayBuffer
138
+ backing stores, which plain JS-heap readings miss — after forced
139
+ garbage collection, and fails if the late-run median of memory or
140
+ per-cycle latency grows beyond a small tolerance over the early-run
141
+ median. Injecting a per-cycle leak into the adapter turns both
142
+ detectors red. `npm run soak:web-store` runs longer sessions on demand.
143
+ The React Native adapter remains experimental; its checklist is
144
+ unchanged.
145
+
146
+ - **Quota exhaustion in the browser store now surfaces as a typed error.**
147
+ A write that exhausts the origin's storage quota rejects with the new
148
+ public `StorageQuotaExceededError` (code `STORAGE_QUOTA_EXCEEDED`)
149
+ instead of the raw engine `QuotaExceededError`. The mapping lives at the
150
+ adapter boundary — one seam covering every store method, matched by
151
+ error name so it holds across engines — and because every write commits
152
+ in one atomic transaction, the typed error always means the write did
153
+ not persist, never a partial record. A jest suite drives quota-shaped
154
+ backend failures through every write path, and a new Chromium
155
+ storage-pressure spec in the real-browser gate clamps the origin's
156
+ quota, exhausts it against the real engine, and asserts the typed
157
+ rejection, intact prior state, and a clean retry once space frees.
158
+
159
+ - The real-browser gate now includes an interruption suite: a Playwright
160
+ spec destroys a real tab while a write is in flight — an atomic
161
+ session/trust commit, an identity rotation, a fresh-database bootstrap,
162
+ and a prekey batch — then reopens the store from a fresh tab and asserts
163
+ it is readable and each atomic security commit landed all-or-nothing,
164
+ never partially. The kills are sampled at several points inside each
165
+ write, in all three engines, and a deterministic structural test backs
166
+ them: each atomic security commit must open exactly one readwrite
167
+ transaction, which is what makes every kill land all-or-nothing. Tearing
168
+ either commit into two transactions turns the structural test red on
169
+ every run.
170
+
171
+ - **Two tabs no longer race the IndexedDB store into silent data loss.** Two
172
+ cross-connection races existed in the browser adapter. First, the database
173
+ encryption key bootstrap read then wrote in separate transactions, so two
174
+ tabs initializing a fresh database concurrently could each generate a
175
+ different key — records written by the losing tab then failed authenticated
176
+ decryption everywhere else. Second, first-contact trust pinning checked
177
+ then wrote in separate transactions, so two tabs pinning different
178
+ identities were both told `NEW_IDENTITY` while one pin silently replaced
179
+ the other. Both paths now create through IndexedDB's `add()`, which refuses
180
+ to overwrite: the bootstrap loser adopts the winner's key, and a
181
+ first-contact loser re-evaluates its candidate against the pin that won.
182
+ Rotation, verification, and the atomic session/trust commit already
183
+ performed their compare-and-set inside a single transaction and are
184
+ unchanged.
185
+
186
+ - The real-browser gate now includes a multi-tab compare-and-set suite: a
187
+ Playwright spec drives two tabs — two live IndexedDB connections on one
188
+ origin — through concurrent key bootstrap, first-contact pinning,
189
+ rotations, verification-versus-rotation, and one-time-prekey consumption,
190
+ in all three engines. The two races above are what this suite caught, and
191
+ reverting either fix turns it red.
192
+
193
+ - **Reading sessions or group sender keys no longer fails on Firefox and
194
+ WebKit.** `getSessionsForUser` and `getAllSenderKeysForGroup` in the
195
+ IndexedDB store decrypted each row inside the cursor loop. An IndexedDB
196
+ transaction deactivates the moment the event loop turns to anything that is
197
+ not one of its own requests, so awaiting Web Crypto mid-iteration let the
198
+ transaction commit and the next cursor advance threw
199
+ `TransactionInactiveError`. Chromium's laxer transaction lifetime and the
200
+ fake-indexeddb test double both tolerated the pattern, which is how it went
201
+ unseen. Both methods now collect the encrypted rows inside the transaction
202
+ and decrypt after it completes, the pattern the prekey reads already used.
203
+ No key agreement, payload, or wire byte changed.
204
+
205
+ - **`IndexedDbSignalProtocolStore.close()`.** The store held its database
206
+ connection open for the life of the page, and an open connection blocks
207
+ deletion and version upgrades of the database from anywhere else — so an
208
+ application signing out or clearing local state had no supported way to
209
+ release it. `close()` closes the connection and drops the in-memory
210
+ database key; call `initialize()` again before any other operation.
211
+
212
+ - The storage contract suites now also run against
213
+ `IndexedDbSignalProtocolStore` inside real Chromium, Firefox, and WebKit
214
+ pages on every change to the source repository. The suites are the same
215
+ modules the jest gate runs; the Firefox and WebKit failures above are what
216
+ the gate caught on its first run.
217
+
218
+ ## 0.1.0-alpha.12
219
+
220
+ - **AES-GCM without additional data no longer fails in the browser.** Every
221
+ AES-GCM call built its Web Crypto parameters with `additionalData` always
222
+ present, holding `undefined` when the caller passed no AAD. Node converts
223
+ those parameters through WebIDL, where a member set to `undefined` is
224
+ absent, and accepts them. Chrome parses them by hand: a present
225
+ `additionalData` key must be a BufferSource whatever its value, so the same
226
+ call throws `AeadParams: additionalData: Not a BufferSource`. Device
227
+ provisioning and device transfer pass no AAD at all, so both worked under
228
+ Node and were unusable in a browser. The parameters are now built in one
229
+ place, which omits the member when there is nothing to put in it. No key
230
+ agreement, payload, or wire byte changed.
231
+
232
+ ## 0.1.0-alpha.11
233
+
234
+ - **BREAKING: device provisioning no longer requires React Native, and
235
+ `getDeviceMetadata` moved to its own subpath.** `device/provisioning`
236
+ statically imported `react-native` and `expo-constants` at module scope.
237
+ Both are optional peer dependencies, so the package's own contract says a
238
+ consumer may have neither — but a static import of an absent package throws
239
+ `ERR_MODULE_NOT_FOUND` before the module runs, which made the entire
240
+ device-linking surface unimportable in Node and in the browser. The two
241
+ imports existed for three fields of one function. Provisioning itself is a
242
+ protocol and already takes the device's description as a
243
+ `LocalDeviceMetadata` parameter, so it is now platform-free, and
244
+ `getDeviceMetadata` lives at
245
+ `@open-e2ee/signal-protocol-sdk/device/expo-metadata`. It is no longer
246
+ re-exported from the `device` barrel. Callers off Expo build the four
247
+ fields themselves; callers on Expo change one import path. No key
248
+ agreement, payload, or wire byte changed.
249
+
250
+ - **`local/vault` no longer drags Expo SecureStore in behind the
251
+ interface.** The barrel re-exported
252
+ `ExpoSecureStoreSignalProtocolSecretVault`, so importing the vault
253
+ *contract* failed without `expo-secure-store` installed. The barrel now
254
+ exports only `ISignalProtocolLocalSecretVault`; the implementation keeps
255
+ its own subpath, `local/vault/expo-secure-store`, which is where every
256
+ caller in this repository already imported it from.
257
+
258
+ - **New check: `node ./scripts/smoke-import-surface.mjs`, wired into CI.**
259
+ Packs the package, installs it into a consumer outside the repository whose
260
+ `node_modules` has every optional peer removed, and imports all 59
261
+ published export subpaths. Entry points that are genuinely bound to a
262
+ platform are listed explicitly, and the list is verified in both
263
+ directions, so an exemption that stops being true fails the check rather
264
+ than lingering. Nothing caught the two defects above: the checks that name
265
+ every subpath resolve types without ever loading a module, and the checks
266
+ that load modules run from inside the repository, where the optional peers
267
+ are installed as devDependencies and Node's resolver finds them.
268
+
269
+ - **Bundling the sealed-sender codec no longer pulls React Native in with
270
+ it.** The codec imported two base64 helpers from the `internal/crypto`
271
+ barrel, and that barrel also exports `generateRandomBytes`, whose
272
+ third-choice runtime fallback is a dynamic `import('expo-crypto')`. The
273
+ fallback is correct — it is how the SDK finds a secure random source on
274
+ Expo, behind two other sources and a `try`/`catch` — but a bundler
275
+ resolves what it can reach without asking whether the branch will run, and
276
+ `expo-crypto` reaches `react-native`, whose entry point is Flow rather than
277
+ TypeScript. Anything bundling the codec for a server or a browser was
278
+ therefore parsing a mobile UI framework, and any bundler without a Flow
279
+ loader stopped there. The helpers now come from `internal/crypto/utils`,
280
+ which imports nothing but types, so the reachable graph ends where the
281
+ encoding does. No encoder, decoder, or byte changed.
282
+
283
+ ## 0.1.0-alpha.10
284
+
285
+ - **BREAKING: the quickstart adapters are named for what they are —
286
+ in memory, not mocks.** Nothing in either adapter is a test double: the
287
+ protocol and the cryptography are real, and only the infrastructure is
288
+ simulated. The name said otherwise, and readers discounted the quick
289
+ start because of it. The `mock` subpaths are gone rather than aliased —
290
+ this is a pre-1.0 alpha with no customers, so a compatibility layer would
291
+ only preserve the wrong word. Update imports and identifiers:
292
+
293
+ | Before | After |
294
+ |---|---|
295
+ | `@open-e2ee/signal-protocol-sdk/local/store/mock` | `@open-e2ee/signal-protocol-sdk/local/store/memory` |
296
+ | `@open-e2ee/signal-protocol-sdk/remote/relay/mock` | `@open-e2ee/signal-protocol-sdk/remote/relay/memory` |
297
+ | `mockStore()` | `inMemoryStore()` |
298
+ | `mockRelay()` | `inMemoryRelay()` |
299
+ | `MockSignalProtocolStore` | `InMemorySignalProtocolStore` |
300
+ | `MockSignalProtocolStoreOptions` | `InMemorySignalProtocolStoreOptions` |
301
+ | `MockSignalProtocolRelayServer` | `InMemorySignalProtocolRelayServer` |
302
+ | `MockSignalProtocolRelayServerOptions` | `InMemorySignalProtocolRelayServerOptions` |
303
+ | `MockStoreFailureController` | `StoreFailureController` |
304
+ | `MockStoreFailureOptions` | `StoreFailureOptions` |
305
+ | `MockRelayFailureController` | `RelayFailureController` |
306
+ | `MockRelayFailureOptions` | `RelayFailureOptions` |
307
+ | `MockStorageWriteError` | `InjectedStorageWriteError` |
308
+
309
+ The failure controllers moved with the adapters and kept their behavior.
310
+ They were never test doubles either — they are deterministic, seeded
311
+ failure injection for the documented recovery exercises — so they lost
312
+ the `Mock` prefix instead of the subpath.
313
+ No runtime behavior changed: the storage-failure error message drops the
314
+ word "mock" and `InjectedStorageWriteError` reports the new class name,
315
+ and nothing else on the wire, in storage, or in the failure semantics
316
+ moved. The doc-snippet runner that executes every shipped snippet is now
317
+ `scripts/run-doc-snippets.mjs` with a `doc-snippet:` marker, because the
318
+ snippets it runs were never mock snippets.
319
+
320
+ - **`protobufjs` is no longer a dependency of the published package**, and
321
+ the eval gate that proves it is now part of CI. The relay's sealed-sender
322
+ certificate issuer was the last module importing it, through
323
+ `protobufjs/minimal`'s `Writer` — which generates no code, so it was never
324
+ what made the SDK throw `EvalError` under a strict Content-Security-Policy,
325
+ but it did pull `protobufjs` and `long` into every install to write four
326
+ fields. Issuance now goes through the same hand-written sealed-sender codec
327
+ that validates the certificates it produces, so the field numbers an
328
+ Ed25519 signature is computed over are described in one module instead of
329
+ two that had to agree. The package declares six direct production
330
+ dependencies and resolves to six packages in total; `protobufjs` remains a
331
+ development dependency, where the wire tests use it as an independent
332
+ oracle. The bytes are unchanged, which is the whole of the risk here — a
333
+ certificate is a signature over exactly these bytes, and any shift would
334
+ have invalidated every one already issued. Golden vectors captured from the
335
+ old writer before the rewrite pin the issued bytes for four shapes,
336
+ including a multi-byte UUID and an expiry above 2^53, and each is
337
+ re-validated through the certificate chain with real keys.
338
+
339
+ - **A varint that cannot fit a `uint32` is refused at the encoder instead of
340
+ written wrong.** `encodeVarint` stops at five bytes, so it truncated
341
+ anything above 4294967295 — 2^32 came out as `80 00`, which the 64-bit
342
+ decoder then correctly rejected as non-canonical — and it wrote `NaN` as 0
343
+ and `1.5` as 1. All three now throw a named error at the point the mistake
344
+ is made. Callers that need the wider range already have `encodeVarint64`.
345
+ Nothing in this package encoded a value in the refused range.
346
+
347
+ One decode-side strictness note that belongs with the wire work above and
348
+ was not recorded when it landed: an unknown field encoded as a group (wire
349
+ types 3 and 4) is rejected rather than skipped, where `protobufjs` skipped
350
+ it. Groups are deprecated, no schema here uses them, and skipping one
351
+ correctly means matching its end tag — a parser state this format has no
352
+ reason to carry.
353
+
354
+ - **The sealed-sender wire codec is hand-written, and no signed certificate
355
+ region is re-encoded on the way through.** Its five message types and the
356
+ `UnidentifiedSenderMessage.Type` enum were assembled at runtime by
357
+ `protobufjs` reflection, which compiles its encoders with `new Function` —
358
+ the construct a `script-src 'self'` policy blocks — and they are now static
359
+ encoders and decoders over the shared wire primitives. Every byte is
360
+ unchanged, which carries more weight here than anywhere else in the wire
361
+ work: a server certificate's signature is computed over its serialized
362
+ inner bytes and a sender certificate's over its own, so a shift in field
363
+ order, in a nested length prefix, or in whether an explicitly-set zero
364
+ reaches the wire would invalidate every certificate already issued. The
365
+ decoders hand signed regions back as the raw bytes they arrived as, never
366
+ as a re-encoded structure. The 19 committed golden vectors pin all of it in
367
+ both directions. Two decode paths do change, both for messages that were
368
+ already malformed or came from a peer this version does not know: an inner
369
+ message whose `type` names no declared arm — including an absent field,
370
+ which reads as 0 — now decodes to the value that arrived, where reflection
371
+ substituted the enum's first arm and so reported a `PREKEY_MESSAGE` the
372
+ sender never wrote, and callers that route on the value must narrow it with
373
+ `isSealedSenderContentType`; and a message with no `senderCertificate`
374
+ decodes to empty wrapper fields, which certificate validation rejects,
375
+ instead of raising `TypeError` from a null dereference. A third shift is
376
+ smaller still: string fields decode through `TextDecoder`, which maps
377
+ invalid UTF-8 to U+FFFD replacement characters where reflection produced
378
+ other strings — for one shape, an empty string the required-field check
379
+ then rejected. A certificate whose `senderUuid` is not valid UTF-8
380
+ therefore now decodes instead of failing that check; such bytes can only
381
+ exist under a trusted issuer's signature, and every issuer this SDK has
382
+ shipped writes valid UTF-8.
383
+
384
+ - **The SPQR wire and ratchet-state serializer no longer builds its schema
385
+ at runtime**, so the post-quantum ratchet works under a `script-src 'self'`
386
+ policy. The ML-KEM Braid codec described its eight messages to
387
+ `protobufjs` reflection, which compiles each encoder with `new Function` —
388
+ the one construct a strict Content-Security-Policy forbids, and the reason
389
+ the SDK threw `EvalError` in a hardened browser, an extension service
390
+ worker, or anywhere else code generation is off. The eight messages now
391
+ have hand-written encoders and decoders over the wire primitives, and the
392
+ module imports nothing from `protobufjs`. Every exported function keeps
393
+ its name and signature, and the presence rules that decide what reaches
394
+ the wire are unchanged: an explicitly-set zero is still written, an absent
395
+ field still decodes to its typed zero rather than `undefined`, and the
396
+ `V1Msg` `inner_msg` oneof still emits exactly one arm. That matters more
397
+ than usual here, because the encoder, decoder, and authenticator messages
398
+ are *persisted* ratchet state — an install that upgrades has to decode the
399
+ bytes it wrote before it upgraded. Byte identity is pinned by 49 golden
400
+ vectors covering each message, each oneof arm, empty and maximal repeated
401
+ fields, and epochs at 0, 1, 2^32, 2^53−1, 2^53+1, and 2^64−1.
402
+
403
+ Three behaviors moved, each away from silent corruption. A persisted
404
+ decoder chunk that carries an index but no data used to yield a map entry
405
+ holding `undefined`, which surfaced later as a confusing failure inside
406
+ Reed–Solomon reconstruction; it is now rejected where it is read, naming
407
+ the chunk — nothing in this package has ever written that shape, so it can
408
+ only come from corrupt state. Encoding state that violates its declared
409
+ types — a field that is not the `Uint8Array` it claims, a size that is
410
+ negative or above 4294967295 — now throws a named error where the old
411
+ encoder silently wrapped the value and wrote wrong bytes. And
412
+ `isSerializationReady()` now always returns `true`: with static codecs
413
+ there is no schema to build and no not-ready state to report
414
+ (`initSerialization()` stays as an awaitable no-op for callers that
415
+ sequence on it).
416
+
417
+ - **The Double Ratchet and sender-key message codecs no longer build their
418
+ wire types at runtime.** `SignalProtocolMessage`,
419
+ `PreKeySignalProtocolMessage`, `SenderKeyMessage`, and
420
+ `SenderKeyDistributionMessage` were encoded and decoded through
421
+ `protobufjs` reflection, which compiles each encoder with `new Function` —
422
+ the exact construct a `script-src 'self'` policy blocks. All four are now
423
+ hand-written encoders and `ProtoReader` decode loops over the shared wire
424
+ primitives, and neither module imports `protobufjs`. Nothing on the wire
425
+ moves: the twenty committed golden vectors for these two modules pin every
426
+ byte in both directions, including the behavior that is easiest to lose in
427
+ a rewrite — presence, not value, decides what is written, so a counter of
428
+ 0 and a prekey id of 0 stay distinguishable from an absent field, an empty
429
+ bytes field still reaches the wire and is still dropped on decode, and
430
+ unknown fields are still skipped. Decoding is stricter in one respect
431
+ inherited from the primitives: a field whose wire type contradicts its tag
432
+ is now rejected rather than read as its declared type.
433
+
434
+ - **The protobuf wire primitives now cover 64-bit varints and the field
435
+ shapes the message schemas actually use**, which is the groundwork for
436
+ encoding every message here without `protobufjs` — and so without the
437
+ runtime code generation that a `script-src 'self'` policy blocks. The
438
+ varint helpers stopped at 32 bits in five bytes, so the SPQR epoch, a
439
+ uint64, had no representation that survived a round trip; there are now
440
+ bigint encode and decode functions with a ten-byte ceiling, alongside
441
+ helpers for bool, enum, string, fixed64, embedded-message, and repeated
442
+ fields, and a `ProtoReader` cursor that owns the read-tag-dispatch-skip
443
+ loop every decoder repeats. The existing 32-bit functions are untouched
444
+ and byte-compatible. Two contracts are deliberately stricter than
445
+ `protobufjs`: a varint must be canonically encoded, because these bytes
446
+ are signed and MAC'd and a redundant encoding would make the signed byte
447
+ string malleable; and a field whose wire type contradicts its tag is
448
+ rejected rather than misread. Nothing on the wire moves — no encoder has
449
+ ever emitted the forms now refused.
450
+
451
+ - **The public repository's snippet check no longer requires an unpublished
452
+ file.** `0.1.0-alpha.8` removed the internal pricing preview from the
453
+ export, but `run-mock-snippets.mjs` — which ships in both repositories —
454
+ still read it unconditionally, so the public "shipped mock snippets" CI job
455
+ failed with ENOENT from the `0.1.0-alpha.9` push onward. The runner now
456
+ validates that file's snippets only where the file exists, which is the
457
+ boundary the export already draws. `ossf/scorecard-action` also moves to
458
+ v2.4.4 (dependabot, applied here so the export carries it).
459
+
3
460
  ## 0.1.0-alpha.9
4
461
 
5
462
  - **BREAKING: the multi-recipient content ceiling is the reference's