@open-e2ee/signal-protocol-sdk 12.0.1 → 13.1.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 (165) hide show
  1. package/ADAPTERS.md +3 -0
  2. package/ARCHITECTURE.md +4 -4
  3. package/CHANGELOG.md +141 -0
  4. package/README.md +1 -1
  5. package/SECURITY.md +2 -2
  6. package/client/README.md +40 -0
  7. package/device/README.md +40 -4
  8. package/dist/client/client.d.ts +8 -0
  9. package/dist/client/client.d.ts.map +1 -1
  10. package/dist/client/client.js +19 -1
  11. package/dist/client/client.js.map +1 -1
  12. package/dist/client/config.d.ts +6 -2
  13. package/dist/client/config.d.ts.map +1 -1
  14. package/dist/client/config.js.map +1 -1
  15. package/dist/client/event-hooks.d.ts +28 -0
  16. package/dist/client/event-hooks.d.ts.map +1 -1
  17. package/dist/client/event-hooks.js +1 -0
  18. package/dist/client/event-hooks.js.map +1 -1
  19. package/dist/client/group-init-status.d.ts +21 -0
  20. package/dist/client/group-init-status.d.ts.map +1 -0
  21. package/dist/client/group-init-status.js +156 -0
  22. package/dist/client/group-init-status.js.map +1 -0
  23. package/dist/client/hosted-device-link-transport.d.ts +11 -0
  24. package/dist/client/hosted-device-link-transport.d.ts.map +1 -0
  25. package/dist/client/hosted-device-link-transport.js +25 -0
  26. package/dist/client/hosted-device-link-transport.js.map +1 -0
  27. package/dist/client/hosted-device-link.d.ts +97 -0
  28. package/dist/client/hosted-device-link.d.ts.map +1 -0
  29. package/dist/client/hosted-device-link.js +149 -0
  30. package/dist/client/hosted-device-link.js.map +1 -0
  31. package/dist/client/hosted-http-error.d.ts +30 -0
  32. package/dist/client/hosted-http-error.d.ts.map +1 -0
  33. package/dist/client/hosted-http-error.js +34 -0
  34. package/dist/client/hosted-http-error.js.map +1 -0
  35. package/dist/client/hosted-presence.js +1 -1
  36. package/dist/client/hosted-presence.js.map +1 -1
  37. package/dist/client/hosted-profile-keys.js +1 -1
  38. package/dist/client/hosted-profile-keys.js.map +1 -1
  39. package/dist/client/hosted-sandbox-identity.d.ts +3 -3
  40. package/dist/client/hosted-sandbox-identity.js +3 -3
  41. package/dist/client/hosted-transport.d.ts +12 -13
  42. package/dist/client/hosted-transport.d.ts.map +1 -1
  43. package/dist/client/hosted-transport.js +111 -17
  44. package/dist/client/hosted-transport.js.map +1 -1
  45. package/dist/client/hosted.d.ts +57 -8
  46. package/dist/client/hosted.d.ts.map +1 -1
  47. package/dist/client/hosted.js +170 -19
  48. package/dist/client/hosted.js.map +1 -1
  49. package/dist/client/index.d.ts +2 -1
  50. package/dist/client/index.d.ts.map +1 -1
  51. package/dist/client/index.js +1 -1
  52. package/dist/client/index.js.map +1 -1
  53. package/dist/client/receive-queue.d.ts +4 -2
  54. package/dist/client/receive-queue.d.ts.map +1 -1
  55. package/dist/client/receive-queue.js +26 -22
  56. package/dist/client/receive-queue.js.map +1 -1
  57. package/dist/index.d.ts +2 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/local/store/conformance/cases/ciphertext.d.ts +7 -0
  62. package/dist/local/store/conformance/cases/ciphertext.d.ts.map +1 -0
  63. package/dist/local/store/conformance/cases/ciphertext.js +55 -0
  64. package/dist/local/store/conformance/cases/ciphertext.js.map +1 -0
  65. package/dist/local/store/conformance/cases/durability.d.ts +6 -0
  66. package/dist/local/store/conformance/cases/durability.d.ts.map +1 -0
  67. package/dist/local/store/conformance/cases/durability.js +34 -0
  68. package/dist/local/store/conformance/cases/durability.js.map +1 -0
  69. package/dist/local/store/conformance/cases/identity.d.ts +7 -0
  70. package/dist/local/store/conformance/cases/identity.d.ts.map +1 -0
  71. package/dist/local/store/conformance/cases/identity.js +84 -0
  72. package/dist/local/store/conformance/cases/identity.js.map +1 -0
  73. package/dist/local/store/conformance/cases/metadata.d.ts +7 -0
  74. package/dist/local/store/conformance/cases/metadata.d.ts.map +1 -0
  75. package/dist/local/store/conformance/cases/metadata.js +48 -0
  76. package/dist/local/store/conformance/cases/metadata.js.map +1 -0
  77. package/dist/local/store/conformance/cases/protection.d.ts +7 -0
  78. package/dist/local/store/conformance/cases/protection.d.ts.map +1 -0
  79. package/dist/local/store/conformance/cases/protection.js +14 -0
  80. package/dist/local/store/conformance/cases/protection.js.map +1 -0
  81. package/dist/local/store/conformance/cases/receive-work.d.ts +8 -0
  82. package/dist/local/store/conformance/cases/receive-work.d.ts.map +1 -0
  83. package/dist/local/store/conformance/cases/receive-work.js +152 -0
  84. package/dist/local/store/conformance/cases/receive-work.js.map +1 -0
  85. package/dist/local/store/conformance/cases/sender-key.d.ts +7 -0
  86. package/dist/local/store/conformance/cases/sender-key.d.ts.map +1 -0
  87. package/dist/local/store/conformance/cases/sender-key.js +59 -0
  88. package/dist/local/store/conformance/cases/sender-key.js.map +1 -0
  89. package/dist/local/store/conformance/cases/session-trust.d.ts +7 -0
  90. package/dist/local/store/conformance/cases/session-trust.d.ts.map +1 -0
  91. package/dist/local/store/conformance/cases/session-trust.js +64 -0
  92. package/dist/local/store/conformance/cases/session-trust.js.map +1 -0
  93. package/dist/local/store/conformance/checks.d.ts +15 -0
  94. package/dist/local/store/conformance/checks.d.ts.map +1 -0
  95. package/dist/local/store/conformance/checks.js +67 -0
  96. package/dist/local/store/conformance/checks.js.map +1 -0
  97. package/dist/local/store/conformance/index.d.ts +30 -0
  98. package/dist/local/store/conformance/index.d.ts.map +1 -0
  99. package/dist/local/store/conformance/index.js +29 -0
  100. package/dist/local/store/conformance/index.js.map +1 -0
  101. package/dist/local/store/conformance/records.d.ts +36 -0
  102. package/dist/local/store/conformance/records.d.ts.map +1 -0
  103. package/dist/local/store/conformance/records.js +109 -0
  104. package/dist/local/store/conformance/records.js.map +1 -0
  105. package/dist/local/store/conformance/run.d.ts +24 -0
  106. package/dist/local/store/conformance/run.d.ts.map +1 -0
  107. package/dist/local/store/conformance/run.js +156 -0
  108. package/dist/local/store/conformance/run.js.map +1 -0
  109. package/dist/local/store/conformance/types.d.ts +55 -0
  110. package/dist/local/store/conformance/types.d.ts.map +1 -0
  111. package/dist/local/store/conformance/types.js +6 -0
  112. package/dist/local/store/conformance/types.js.map +1 -0
  113. package/dist/local/store/expo/adapter.d.ts +2 -1
  114. package/dist/local/store/expo/adapter.d.ts.map +1 -1
  115. package/dist/local/store/expo/adapter.js.map +1 -1
  116. package/dist/local/store/node/adapter.d.ts +2 -2
  117. package/dist/local/store/react-native/adapter.d.ts +2 -1
  118. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  119. package/dist/local/store/react-native/adapter.js.map +1 -1
  120. package/dist/local/store/sqlite/convert-plaintext.d.ts +62 -0
  121. package/dist/local/store/sqlite/convert-plaintext.d.ts.map +1 -0
  122. package/dist/local/store/sqlite/convert-plaintext.js +236 -0
  123. package/dist/local/store/sqlite/convert-plaintext.js.map +1 -0
  124. package/dist/local/store/sqlite/encryption.d.ts +21 -0
  125. package/dist/local/store/sqlite/encryption.d.ts.map +1 -1
  126. package/dist/local/store/sqlite/encryption.js.map +1 -1
  127. package/dist/local/store/sqlite/errors.d.ts.map +1 -1
  128. package/dist/local/store/sqlite/errors.js +2 -1
  129. package/dist/local/store/sqlite/errors.js.map +1 -1
  130. package/dist/local/store/sqlite/key-storage/identity-keys.d.ts +3 -1
  131. package/dist/local/store/sqlite/key-storage/identity-keys.d.ts.map +1 -1
  132. package/dist/local/store/sqlite/key-storage/identity-keys.js +3 -1
  133. package/dist/local/store/sqlite/key-storage/identity-keys.js.map +1 -1
  134. package/dist/local/store/sqlite/open-store.d.ts +36 -4
  135. package/dist/local/store/sqlite/open-store.d.ts.map +1 -1
  136. package/dist/local/store/sqlite/open-store.js +326 -21
  137. package/dist/local/store/sqlite/open-store.js.map +1 -1
  138. package/dist/local/store/sqlite/web/worker.d.ts +5 -0
  139. package/dist/local/store/sqlite/web/worker.d.ts.map +1 -1
  140. package/dist/local/store/sqlite/web/worker.js +99 -20
  141. package/dist/local/store/sqlite/web/worker.js.map +1 -1
  142. package/dist/local/store/web-sqlite/adapter.d.ts +3 -2
  143. package/dist/local/store/web-sqlite/adapter.d.ts.map +1 -1
  144. package/dist/local/store/web-sqlite/adapter.js +12 -2
  145. package/dist/local/store/web-sqlite/adapter.js.map +1 -1
  146. package/dist/remote/relay/types.d.ts +4 -2
  147. package/dist/remote/relay/types.d.ts.map +1 -1
  148. package/dist/types/api.d.ts +20 -4
  149. package/dist/types/api.d.ts.map +1 -1
  150. package/docs/ASSURANCE.md +25 -7
  151. package/docs/DEVIATIONS.md +35 -3
  152. package/docs/ERROR_HANDLING.md +8 -6
  153. package/docs/GETTING_STARTED.md +25 -8
  154. package/docs/INTERFACES.md +3 -1
  155. package/docs/PACKAGE_SURFACE.md +1 -0
  156. package/docs/RECIPES.md +44 -0
  157. package/docs/SECURITY.md +23 -5
  158. package/keys/README.md +3 -1
  159. package/local/store/README.md +92 -12
  160. package/local/store/expo/README.md +63 -6
  161. package/local/store/key-value/README.md +3 -2
  162. package/local/store/node/README.md +68 -6
  163. package/local/store/react-native/README.md +62 -4
  164. package/local/store/web-sqlite/README.md +101 -4
  165. package/package.json +5 -1
package/ADAPTERS.md CHANGED
@@ -45,6 +45,8 @@ Use:
45
45
  - `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
46
46
  - or a custom implementation
47
47
 
48
+ A custom implementation can be any object that implements `SignalProtocolLocalStore`. The client does not check its class, and no client feature requires a store class. Managed groups work on a custom store, including group message reception on the Relay subscription and on a pull. A custom store must meet the [storage implementation](#storage-implementations) expectations and pass the local store conformance kit.
49
+
48
50
  On React Native and Expo, the SDK reads random bytes only from the global `crypto.getRandomValues`. Install `react-native-get-random-values` 2.x or `react-native-quick-crypto`, and load it before the first SDK call. Without a global source, the SDK throws `SecureRandomUnavailableError`.
49
51
 
50
52
  ### Local secret vault: `SignalProtocolLocalSecretVault`
@@ -176,6 +178,7 @@ See the [client guide](./client/README.md#with-relay).
176
178
  - Keep contact identity trust decisions stable and explicit.
177
179
  - Persist linked-device identity state atomically enough that startup verification cannot enter a half-linked state.
178
180
  - Preserve session record semantics. Do not treat sessions as opaque blobs without honoring update and archive behavior.
181
+ - Run the local store conformance kit from `@open-e2ee/signal-protocol-sdk/local/store/conformance` against a custom `SignalProtocolLocalStore`. Use `assertLocalStoreConformance` in the automated checks, and give it the `armWriteFailure` hook, so that the rollback of each atomic commit runs. The kit reads the `protection` declaration, so declare it truthfully. The kit does not cover `SenderKeyHandoffStore`, `MessageRecordStore`, or `SendLogStore`. See the [storage guide](./local/store/README.md#conformance-kit-for-a-custom-store).
179
182
 
180
183
  ## Choosing a Shape
181
184
 
package/ARCHITECTURE.md CHANGED
@@ -16,8 +16,8 @@ The `@open-e2ee` scope is the umbrella namespace. Package and primary-client
16
16
  names identify the protocol they implement so future protocol packages do not
17
17
  share an ambiguous client identity.
18
18
 
19
- This package is pre-1.0. Prefer a clear, versioned correction over a
20
- compatibility shim when a boundary is wrong.
19
+ For the current package version and release notes, see
20
+ [package.json](./package.json) and [CHANGELOG](./CHANGELOG.md).
21
21
 
22
22
  ## Review Posture
23
23
 
@@ -35,7 +35,7 @@ compatibility shim when a boundary is wrong.
35
35
  | Shared types | [types/](./types/) | Protocol addresses, records, API contracts, protocol configuration |
36
36
  | Session domain | [internal/session/](./internal/session/) | Session establishment, session cipher, active/archive session resolution |
37
37
  | Orchestration | [internal/manager/](./internal/manager/), [internal/sesame/](./internal/sesame/) | Protocol manager and multi-device SESAME workflows |
38
- | Protocol algorithms | [internal/protocol/](./internal/protocol/) | PQXDH, Double Ratchet, Triple Ratchet, SPQR, sender keys, sealed sender, ZK helpers |
38
+ | Protocol algorithms | [internal/protocol/](./internal/protocol/) | PQXDH, Double Ratchet, SPQR, sender keys, sealed sender, ZK helpers |
39
39
  | Crypto foundation | [internal/crypto/](./internal/crypto/) | X25519, Ed25519, ML-KEM, AES, HKDF, padding |
40
40
  | Key model | [keys/](./keys/) | Key generation, branded key types, identity type helpers |
41
41
  | 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 |
@@ -112,7 +112,7 @@ Shared non-layer modules:
112
112
  | PQXDH | [internal/protocol/pqxdh/](./internal/protocol/pqxdh/) | Hybrid initial key agreement with ML-KEM-1024 |
113
113
  | Double Ratchet | [internal/protocol/double-ratchet/](./internal/protocol/double-ratchet/) | EC ratchet, skipped keys, header encryption |
114
114
  | SPQR | [internal/protocol/spqr/](./internal/protocol/spqr/) | Sparse post-quantum ratchet with ML-KEM-768 |
115
- | Triple Ratchet | [internal/protocol/triple-ratchet/](./internal/protocol/triple-ratchet/) | Double Ratchet plus SPQR hybrid message keys |
115
+ | Triple Ratchet | [internal/session/cipher.ts](./internal/session/cipher.ts) | Double Ratchet plus SPQR hybrid message keys |
116
116
  | SESAME | [internal/sesame/](./internal/sesame/) | Multi-device session management and convergence |
117
117
  | Sender Keys | [internal/protocol/sender-keys/](./internal/protocol/sender-keys/) | Group message sender-key state |
118
118
  | Sealed Sender | [internal/protocol/sealed-sender/](./internal/protocol/sealed-sender/) | Sender certificate and envelope privacy helpers |
package/CHANGELOG.md CHANGED
@@ -1,5 +1,146 @@
1
1
  # Changelog
2
2
 
3
+ ## 13.1.0
4
+
5
+ ### Added
6
+
7
+ - `linkHostedRelayDevice` now supplies the authenticated Signal Protocol Relay
8
+ transport when `hosted.adapter` is absent. Custom adapters keep their path.
9
+ Exact retries preserve registration material and linked prekey state. Token
10
+ renewal rebuilds both device proofs without another provider assertion.
11
+
12
+ ## 13.0.0
13
+
14
+ ### Breaking
15
+
16
+ - **A linked store that holds group state is refused.**
17
+ `linkHostedRelayDevice` lists the linked device's group store before any
18
+ write. When the store lists a group that the link did not write, the call
19
+ throws `HostedRelayDeviceLinkError` with code `DEVICE_LINK_STORE_NOT_EMPTY`.
20
+ The linked device's group store is `groups.store`, or the SDK group store on
21
+ the linked store. Link the device again with a new, empty store.
22
+ - **A custom identity store must accept an overwrite of its own identity
23
+ record.** `linkHostedRelayDevice` gives the linked device its own
24
+ registration ID with the same identity keys. It calls `storeIdentityKey` and
25
+ then `setLocalRegistrationId` for an identity type that the linked store
26
+ already holds. After both calls, both reads of that type must give the new
27
+ ID, and the other identity type must stay unchanged. Every store that the SDK
28
+ ships does this. A custom `SignalProtocolLocalStore` must pass this check:
29
+
30
+ <!-- doc-snippet:skip requires-external-context -->
31
+ ```ts
32
+ const identity = await store.getIdentityKey('aci');
33
+ await store.storeIdentityKey({ ...identity!, registrationId: 4321 }, 'aci');
34
+ await store.setLocalRegistrationId(4321, 'aci');
35
+ (await store.getIdentityKey('aci'))!.registrationId; // 4321
36
+ await store.getLocalRegistrationId('aci'); // 4321
37
+ ```
38
+
39
+ - **A SQLite store name that ends in `.oe2e-convert` is refused.** The
40
+ conversion uses that name for its temporary file. `nodeStore`, `expoStore`,
41
+ `reactNativeStore`, `webSqliteStore`, and their resets fail with
42
+ `INVALID_STATE` for such a name.
43
+
44
+ ### Added
45
+
46
+ - **`getGroupInitStatus` and the `onGroupInitStatus` hook.**
47
+ `DefaultSignalProtocolClient.getGroupInitStatus(groupId)` gives the
48
+ `GroupInitStatus` of a group on this device: `'ready'`, `'stale'`,
49
+ `'pending'`, `'no-key'`, or `'denied'`. It gives null when the device has no
50
+ record of the group. `'no-key'` means that the device knows the group but
51
+ holds no group key. `onGroupInitStatus(groupId, status)` runs when a client
52
+ write to the record of a group changes its status. It does not run when the
53
+ status stays the same.
54
+ - **`activeGroupStore` in `HostedRelayManagedDeviceLinkOptions`.** It is the
55
+ group store that the link copies from. The default is the SDK group store on
56
+ `activeDeviceStorage`. If a client runs on the active device during the
57
+ link, pass that client's group store, or stop that client first.
58
+ - **Progress phase `'copying'` for `'device-link'`.** `linkHostedRelayDevice`
59
+ reports it before it copies the group master keys.
60
+
61
+ - **SQLite stores accept `convertPlaintext: true`.** An encrypted open then
62
+ converts a database that `encryptionAtRest: false` created, and keeps every
63
+ row and its schema version. The removal of the plaintext file is the commit
64
+ point. A crash before it keeps the plaintext file, and a crash after it
65
+ leaves a store that the next encrypted open finishes. Each store guide has a
66
+ "Convert a plaintext store" section.
67
+
68
+ - **`HostedRelayHttpError` is exported from the root entry and the `client`
69
+ entry.** A custom `HostedRelayManagedDeviceLinkAdapter` can throw it when
70
+ the Relay refuses the link. Give it the Relay's status, `code`, message,
71
+ and `retryable`. A refusal with `retryable` false and the code
72
+ `KEY_PROOF_INVALID` or `CONFLICT` then rolls the link back. The
73
+ `linkHostedRelayDevice` call keeps the link state for an error of any other
74
+ class, also when the error has the same `code`.
75
+
76
+ - **Added: the local/store/conformance subpath exports runLocalStoreConformance and assertLocalStoreConformance.** A custom local store can check identity overwrite, atomic commits, compare-and-set, receive work, durability, and its protection declaration.
77
+
78
+ ### Changed
79
+
80
+ - **The link copies each group master key.** `linkHostedRelayDevice` copies
81
+ the master key of each group that the active device's group store lists into
82
+ the linked device's group store, in the calling process. No master key
83
+ crosses the Relay. A client with `groups` on the linked device then fetches
84
+ each copied group, so the application no longer brings each master key and
85
+ calls `syncGroup()`. A group record that a release before 12.0.0 wrote, and
86
+ that the active device has not read since, is not copied. Read each group
87
+ once on the active device before the link to copy it. A link that stops
88
+ during the copy copies again on the next call. A link that the Relay refuses
89
+ removes its copied groups.
90
+
91
+ - **The SQLite key mismatch error names `convertPlaintext`.** An encrypted open
92
+ of a plaintext file fails with `SqliteKeyMismatchError`, and its message
93
+ gives the option as a way to keep the data.
94
+ - **An open or a reset with `encryptionAtRest: false` refuses an incomplete
95
+ conversion.** While the temporary file of a conversion exists, it fails with
96
+ `INVALID_STATE` and changes nothing.
97
+ - **Each linked device gets its own registration ID.** `linkHostedRelayDevice`
98
+ writes a fresh registration ID into the linked store before it registers.
99
+ The ID differs from the ID of the active device. A held PNI record gets a
100
+ separate fresh ID. A device that a 12.0.x release linked keeps the ID that it
101
+ has. A link that a 12.0.x release began and that stopped before it completed
102
+ keeps its stored ID, so it registers the same device.
103
+ - **A linked store with a device-authentication key and no registration of the
104
+ link is refused.** `linkHostedRelayDevice` throws
105
+ `HostedRelayDeviceLinkError` with code `DEVICE_LINK_STORE_NOT_EMPTY` before
106
+ any write. Link the device again with a new, empty store.
107
+ - **A refused link rolls back.** When the Relay refuses a link with
108
+ `KEY_PROOF_INVALID` or `CONFLICT` and the refusal is not retryable, the call
109
+ removes the link state and rethrows. It keeps the identity records and the
110
+ registration, so the next call sends the same registration ID. Every other
111
+ error keeps the link state, and the next call resumes the link.
112
+
113
+ ### Fixed
114
+
115
+ - **Hosted identity docs.** The quickstart and API reference describe both
116
+ Production modes: application-bound and device-owned.
117
+ `hostedRelaySandboxIdentity` remains limited to Sandbox. The key-label note
118
+ states the session interoperability limit.
119
+
120
+ - **A link whose first sync fails rejects and can resume.**
121
+ `linkHostedRelayDevice` stops the client and rejects with
122
+ `OpenE2EE Signal Protocol Relay initial synchronization failed` when the
123
+ client's first sync fails. In 12.0.1 and earlier, it returned the client with
124
+ `syncStatus` `'failed'`. The next call with the same stores resumes the link
125
+ and gets the same device.
126
+
127
+ - **Fixed: removing a web SQLite file also removes its OPFS pool directory.**
128
+
129
+ - **A received message gets one delivery receipt.** When the Relay accepted
130
+ or refused a delivery receipt, the receive queue completed its record
131
+ outside the queue's passes. A pass that read the record before that
132
+ completion could put the receipt in the batch again after it. In 12.0.1
133
+ and earlier, the sender could then get a second delivery receipt for the
134
+ same message. The completion now runs between passes.
135
+
136
+ - **Fixed: the web SQLite store retries a transient OPFS failure of its
137
+ open.** WebKit can reject an access handle with `UnknownError` under load,
138
+ and the store then rejected the open with `OPFS_FILE_BUSY`. Now the store
139
+ attaches the pool of the file again, up to four attempts, 100 ms apart. It
140
+ retries only before the first statement of the request, so the file stays
141
+ unchanged. It does not retry a full quota or any other error. After the
142
+ fourth attempt the store rejects with `OPFS_FILE_BUSY` as before.
143
+
3
144
  ## 12.0.1
4
145
 
5
146
  - **Fixed: a web SQLite store restores the last commit after a tab died inside a
package/README.md CHANGED
@@ -39,7 +39,7 @@ The relay never needs message plaintext or device private keys.
39
39
 
40
40
  The OpenE2EE Signal Protocol SDK implements a versioned profile of the published Signal Protocol specifications. It is not affiliated with Signal Messenger and is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate. See the [notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
41
41
 
42
- Version `12.0.x`. Public APIs and persisted formats follow semantic versioning.
42
+ Version `13.1.x`. Public APIs and persisted formats follow semantic versioning.
43
43
 
44
44
  ## Install
45
45
 
package/SECURITY.md CHANGED
@@ -7,8 +7,8 @@ backports.
7
7
 
8
8
  | Version | Supported |
9
9
  | -------- | ------------------ |
10
- | 12.0.x | :white_check_mark: |
11
- | < 12.0.0 | :x: |
10
+ | 13.1.x | :white_check_mark: |
11
+ | < 13.1.0 | :x: |
12
12
 
13
13
  ## Reporting a Vulnerability
14
14
 
package/client/README.md CHANGED
@@ -325,6 +325,46 @@ A wake client has no socket. Use `hostedRelayWakePresence(client)` beside
325
325
  `pullHostedRelayAfterWake()`. It has the same members without `watch()`, and
326
326
  it sends each request as one authenticated HTTP request.
327
327
 
328
+ ### Group init status
329
+
330
+ `getGroupInitStatus(groupId)` gives the init status of a group on this device.
331
+ It gives null when the device has no record of the group.
332
+
333
+ - `ready` means that the device holds the group key and the newest group state
334
+ that it knows.
335
+ - `stale` means that a sender named a newer revision than the stored state.
336
+ The client fetches the newer state.
337
+ - `pending` means that the device holds the group key and has no group state
338
+ yet. The client fetches the state.
339
+ - `no-key` means that the device knows the group but holds no group key. The
340
+ client cannot fetch the group until the device gets the key.
341
+ - `denied` means that the group server refused the newest revision that the
342
+ device knows.
343
+
344
+ `onGroupInitStatus(groupId, status)` runs when a client write to the record of
345
+ a group changes its status. It does not run when the status stays the same, or
346
+ when a write deletes the record. It also does not run for a status that the
347
+ store holds when the client starts, or for a write that the application makes
348
+ to the group store. So read each status at start, and then use the hook.
349
+
350
+ <!-- doc-snippet:skip requires-external-context -->
351
+ ```ts
352
+ import { createSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
353
+
354
+ const client = await createSignalProtocolClient({
355
+ identity,
356
+ adapters: { storage, relay },
357
+ groups,
358
+ hooks: {
359
+ onGroupInitStatus: (groupId, status) => groupList.setInitStatus(groupId, status),
360
+ },
361
+ });
362
+
363
+ for (const groupId of groupList.groupIds()) {
364
+ groupList.setInitStatus(groupId, await client.getGroupInitStatus(groupId));
365
+ }
366
+ ```
367
+
328
368
  ### Background key maintenance
329
369
 
330
370
  Use the dedicated headless entry point from a background task after restoring
package/device/README.md CHANGED
@@ -107,7 +107,7 @@ import { linkHostedRelayDevice } from "@open-e2ee/signal-protocol-sdk";
107
107
  const client = await linkHostedRelayDevice({
108
108
  adapters: { storage: linkedStorage },
109
109
  activeDeviceStorage,
110
- hosted: { relayUrl, adapter: managedLinkAdapter },
110
+ hosted: { relayUrl },
111
111
  });
112
112
  ```
113
113
 
@@ -118,9 +118,45 @@ challenge in the calling process. Thus that process must hold the active
118
118
  device's store, private keys included. The adapter's `linkDevice()` gets a
119
119
  challenge signer for each device and no private key.
120
120
 
121
- The link copies no protocol state and no group state. Sessions start fresh.
122
- For each group, the application brings the group master key to the new device,
123
- and the new device then calls `syncGroup()`.
121
+ Without `hosted.adapter`, the SDK uses the active device's stored Relay session
122
+ to submit both proofs and persists the linked device's session before synchronization.
123
+ It requests no second identity-provider assertion. Pass `hosted.adapter` to keep
124
+ an application-owned transport. That adapter needs no stored Relay session.
125
+
126
+ Retry with the same stores after an uncertain result. The SDK retains the
127
+ operation and registration material. Token renewal rebuilds both proofs without
128
+ replacing that operation. An expired replay response renews through the linked
129
+ device's key. Existing custom-adapter refusal and rollback rules still apply.
130
+
131
+ The link copies the master key of each group that the active device's group
132
+ store lists into the new device's group store. The copy runs in the calling
133
+ process, so no master key crosses the Relay. A client with `groups` on the new
134
+ device then fetches each copied group. The application calls no group method
135
+ for this. The link copies no protocol state, so sessions start fresh.
136
+
137
+ A group record that a release before 12.0.0 wrote, and that the active device
138
+ has not read since, is not listed and is not copied. Read each group once on
139
+ the active device before the link to copy it. Otherwise the group initializes
140
+ on the new device from its first group message.
141
+
142
+ If a client runs on the active device during the link, pass its group store as
143
+ `activeGroupStore`, or stop that client first. The new device's store must hold
144
+ no group state. The link refuses a store that lists a group with
145
+ `HostedRelayDeviceLinkError`.
146
+
147
+ The copied keys live in the new device's group store. The SDK does not move
148
+ them again. A later move of that store is the application's store move.
149
+
150
+ The new device gets its own registration ID. The link writes it into the new
151
+ device's store before it registers. A device that a 12.0.x release linked
152
+ keeps the ID that it has.
153
+
154
+ The application calls no sender-key method for the new device. A group send
155
+ gives the sender key to the listed devices of other members that have no
156
+ handoff row. A handoff row records that the Relay accepted a distribution of
157
+ the sender's key for one device. So the next group send of each other member
158
+ that lists the new device gives it that member's key. The sender's own other
159
+ devices get the sent transcript and no distribution.
124
160
 
125
161
  ## Transfer cryptographic state
126
162
 
@@ -49,6 +49,7 @@ import type { SesameMessage, SesameStats } from '../internal/sesame/types.js';
49
49
  import { type Logger } from '../logger.js';
50
50
  import { type SenderKeyDistributionMessage } from '../internal/protocol/sender-keys/index.js';
51
51
  import { type BlockedRecipientsSyncInput, type MediaAttachmentDeleteSyncInput, type GroupContentContext, type ReadSyncEntryInput, type RecipientUsernameSyncInput, type ViewOnceOpenSyncInput } from './content-adapter.js';
52
+ import { type GroupInitStatus } from './group-init-status.js';
52
53
  import type { ContentRecoveryStatus } from '../types/protocol-config.js';
53
54
  import type { DataMessageInput } from './types.js';
54
55
  import type { AttachmentTransferOptions, SendOptions, SendResult, SafetyNumber, IncomingEnvelope, PendingReceive, ProcessEnvelopeOptions, ReceiveOutcome } from './types.js';
@@ -1651,6 +1652,13 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
1651
1652
  * Get decrypted group state (from cache or server).
1652
1653
  */
1653
1654
  getGroupState(groupId: GroupId): Promise<DecryptedGroup>;
1655
+ /**
1656
+ * Get the init status of a group on this device.
1657
+ *
1658
+ * @returns The status, or null when this device has no record of the group
1659
+ * @throws {EncryptionError} When the client has no groups config
1660
+ */
1661
+ getGroupInitStatus(groupId: GroupId): Promise<GroupInitStatus | null>;
1654
1662
  /**
1655
1663
  * Sync group state from server.
1656
1664
  */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../client/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAKH,OAAO,KAAK,EAGV,oBAAoB,EACpB,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EAIrB,MAAM,UAAU,CAAC;AAoBlB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAiB,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAA+B,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,8BAA8B,EAEnC,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAE/B,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAkC3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,OAAO,KAAK,EACV,yBAAyB,EAEzB,WAAW,EACX,UAAU,EACV,YAAY,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OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpF;IAED;;OAEG;IACG,sBAAsB,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,UAAU,GACzB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAA;KAAE,CAAC,CAEtE;IAMD;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"}
@@ -62,6 +62,7 @@ import { SenderKeyManager, } from '../internal/protocol/sender-keys/index.js';
62
62
  import { createDefaultSignalProtocolContentAdapter, } from './content-adapter.js';
63
63
  // Note: group utilities (isGroupId, extractGroupId, createGroupId) are used by SignalProtocolServiceCipher
64
64
  import { createGroupId, extractGroupId, isGroupId } from '../internal/groups/index.js';
65
+ import { observeGroupInitStatus, readGroupInitStatus, } from './group-init-status.js';
65
66
  import { removeDistributionsFromMessageRecords } from './distribution-records.js';
66
67
  import { GroupSenderKeyOperations } from './group-sender-key-operations.js';
67
68
  import { GroupReceiveRefusedError, classifyGroupContent, createGroupMembershipChecker, createGroupReceiveEvaluator, groupOfContext, } from './group-receive-authorization.js';
@@ -412,7 +413,12 @@ export class DefaultSignalProtocolClient {
412
413
  // Initialize the group manager if configured
413
414
  if (config?.groups) {
414
415
  const groupConfig = config.groups;
415
- this.groupStore = config.groups.store ?? new SignalProtocolGroupStateStore(this._storage);
416
+ // Each client write to a group record reports a changed init status.
417
+ this.groupStore = observeGroupInitStatus(config.groups.store ?? new SignalProtocolGroupStateStore(this._storage), {
418
+ isObserved: () => typeof this.hooks.onGroupInitStatus === 'function',
419
+ report: (groupId, status) => callHook(this.hooks, 'onGroupInitStatus', createGroupId(groupId), status),
420
+ logger: this.logger,
421
+ });
416
422
  const sessions = new WeakMap();
417
423
  this.groupSessionFor = (authority) => {
418
424
  const cached = sessions.get(authority);
@@ -3714,6 +3720,18 @@ export class DefaultSignalProtocolClient {
3714
3720
  async getGroupState(groupId) {
3715
3721
  return GroupOps.getGroupState(this.ctx, await this.groups, groupId);
3716
3722
  }
3723
+ /**
3724
+ * Get the init status of a group on this device.
3725
+ *
3726
+ * @returns The status, or null when this device has no record of the group
3727
+ * @throws {EncryptionError} When the client has no groups config
3728
+ */
3729
+ async getGroupInitStatus(groupId) {
3730
+ if (!this.groupStore) {
3731
+ throw new EncryptionError('Groups not configured. Provide groups config to DefaultSignalProtocolClient.create().', EncryptionErrorCode.INITIALIZATION_FAILED);
3732
+ }
3733
+ return readGroupInitStatus(this.groupStore, extractGroupId(groupId));
3734
+ }
3717
3735
  /**
3718
3736
  * Sync group state from server.
3719
3737
  */