@sempdev/semp 0.5.1 → 0.5.5

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 (227) hide show
  1. package/dist/brief/address.d.ts +1 -1
  2. package/dist/brief/address.js +1 -1
  3. package/dist/brief/brief.d.ts +1 -1
  4. package/dist/brief/brief.js +1 -1
  5. package/dist/canonical/marshal.d.ts +2 -2
  6. package/dist/canonical/marshal.js +2 -2
  7. package/dist/closure/driver.d.ts +2 -2
  8. package/dist/closure/driver.js +1 -1
  9. package/dist/crypto/aead.d.ts +2 -2
  10. package/dist/crypto/aead.js +2 -2
  11. package/dist/crypto/kdf.d.ts +1 -1
  12. package/dist/crypto/kdf.js +1 -1
  13. package/dist/crypto/mac.d.ts +1 -1
  14. package/dist/crypto/mac.js +1 -1
  15. package/dist/delivery/ack.d.ts +5 -5
  16. package/dist/delivery/ack.js +6 -6
  17. package/dist/delivery/blocklist.d.ts +1 -1
  18. package/dist/delivery/blocklist.js +2 -2
  19. package/dist/delivery/device_sync.d.ts +26 -0
  20. package/dist/delivery/device_sync.d.ts.map +1 -0
  21. package/dist/delivery/device_sync.js +18 -0
  22. package/dist/delivery/device_sync.js.map +1 -0
  23. package/dist/delivery/disposition.d.ts +1 -1
  24. package/dist/delivery/fetch.d.ts +1 -1
  25. package/dist/delivery/fetch.js +1 -1
  26. package/dist/delivery/inbox.d.ts +2 -2
  27. package/dist/delivery/inbox.js +2 -2
  28. package/dist/delivery/index.d.ts +4 -0
  29. package/dist/delivery/index.d.ts.map +1 -1
  30. package/dist/delivery/index.js +4 -0
  31. package/dist/delivery/index.js.map +1 -1
  32. package/dist/delivery/persistent_silent.d.ts +70 -0
  33. package/dist/delivery/persistent_silent.d.ts.map +1 -0
  34. package/dist/delivery/persistent_silent.js +117 -0
  35. package/dist/delivery/persistent_silent.js.map +1 -0
  36. package/dist/delivery/pipeline.d.ts +4 -4
  37. package/dist/delivery/pipeline.js +2 -2
  38. package/dist/delivery/policy_state.d.ts +2 -2
  39. package/dist/delivery/policy_state.js +4 -4
  40. package/dist/delivery/receipt.d.ts +3 -3
  41. package/dist/delivery/receipt.js +3 -3
  42. package/dist/delivery/receipt_store.d.ts +1 -1
  43. package/dist/delivery/receipt_store.js +1 -1
  44. package/dist/delivery/retry.d.ts +2 -2
  45. package/dist/delivery/retry.js +2 -2
  46. package/dist/delivery/scheduler.d.ts +1 -1
  47. package/dist/delivery/scheduler.js +1 -1
  48. package/dist/delivery/stage_partition.d.ts +1 -1
  49. package/dist/delivery/stage_partition.js +1 -1
  50. package/dist/delivery/staged_runner.d.ts +1 -1
  51. package/dist/delivery/staged_runner.js +2 -2
  52. package/dist/delivery/status_message.d.ts +75 -0
  53. package/dist/delivery/status_message.d.ts.map +1 -0
  54. package/dist/delivery/status_message.js +109 -0
  55. package/dist/delivery/status_message.js.map +1 -0
  56. package/dist/delivery/upgrade_signal.d.ts +48 -0
  57. package/dist/delivery/upgrade_signal.d.ts.map +1 -0
  58. package/dist/delivery/upgrade_signal.js +48 -0
  59. package/dist/delivery/upgrade_signal.js.map +1 -0
  60. package/dist/discovery/configuration.d.ts +20 -1
  61. package/dist/discovery/configuration.d.ts.map +1 -1
  62. package/dist/discovery/configuration.js.map +1 -1
  63. package/dist/discovery/dns.d.ts +27 -1
  64. package/dist/discovery/dns.d.ts.map +1 -1
  65. package/dist/discovery/dns.js +37 -0
  66. package/dist/discovery/dns.js.map +1 -1
  67. package/dist/discovery/index.d.ts +2 -2
  68. package/dist/discovery/index.d.ts.map +1 -1
  69. package/dist/discovery/index.js +1 -1
  70. package/dist/discovery/index.js.map +1 -1
  71. package/dist/discovery/partition.d.ts +1 -1
  72. package/dist/discovery/partition.js +1 -1
  73. package/dist/discovery/resolver.d.ts +5 -5
  74. package/dist/discovery/resolver.js +5 -5
  75. package/dist/discovery/txt.d.ts +1 -1
  76. package/dist/discovery/txt.js +1 -1
  77. package/dist/enclosure/forwarding.d.ts +1 -1
  78. package/dist/enclosure/forwarding.js +1 -1
  79. package/dist/envelope/buckets.d.ts +2 -2
  80. package/dist/envelope/buckets.js +2 -2
  81. package/dist/envelope/compose.d.ts +17 -2
  82. package/dist/envelope/compose.d.ts.map +1 -1
  83. package/dist/envelope/compose.js +29 -11
  84. package/dist/envelope/compose.js.map +1 -1
  85. package/dist/envelope/encode.d.ts +2 -2
  86. package/dist/envelope/encode.js +3 -3
  87. package/dist/envelope/index.d.ts +1 -1
  88. package/dist/envelope/index.d.ts.map +1 -1
  89. package/dist/envelope/index.js +1 -1
  90. package/dist/envelope/index.js.map +1 -1
  91. package/dist/envelope/open_any.d.ts.map +1 -1
  92. package/dist/envelope/open_any.js +5 -5
  93. package/dist/envelope/open_any.js.map +1 -1
  94. package/dist/envelope/open_verified.d.ts +1 -1
  95. package/dist/envelope/open_verified.js +1 -1
  96. package/dist/envelope/padding.d.ts +2 -2
  97. package/dist/envelope/padding.js +3 -3
  98. package/dist/envelope/verify.d.ts +1 -1
  99. package/dist/envelope/verify.js +1 -1
  100. package/dist/extensions/index.d.ts +1 -0
  101. package/dist/extensions/index.d.ts.map +1 -1
  102. package/dist/extensions/index.js +1 -0
  103. package/dist/extensions/index.js.map +1 -1
  104. package/dist/extensions/limits.d.ts +2 -2
  105. package/dist/extensions/limits.js +2 -2
  106. package/dist/extensions/validation_failure.d.ts +48 -0
  107. package/dist/extensions/validation_failure.d.ts.map +1 -0
  108. package/dist/extensions/validation_failure.js +25 -0
  109. package/dist/extensions/validation_failure.js.map +1 -0
  110. package/dist/handshake/abort.d.ts +1 -1
  111. package/dist/handshake/abort.js +1 -1
  112. package/dist/handshake/client_state.d.ts +5 -5
  113. package/dist/handshake/client_state.js +5 -5
  114. package/dist/handshake/confirm.d.ts +2 -2
  115. package/dist/handshake/confirm.js +2 -2
  116. package/dist/handshake/driver.d.ts +2 -2
  117. package/dist/handshake/driver.js +1 -1
  118. package/dist/handshake/federation.d.ts +6 -6
  119. package/dist/handshake/federation.js +5 -5
  120. package/dist/handshake/first_contact.d.ts +1 -1
  121. package/dist/handshake/first_contact.js +1 -1
  122. package/dist/handshake/identity.d.ts +1 -1
  123. package/dist/handshake/identity.js +1 -1
  124. package/dist/handshake/pow.js +1 -1
  125. package/dist/handshake/server_state.d.ts +3 -3
  126. package/dist/handshake/server_state.js +3 -3
  127. package/dist/index.d.ts +1 -1
  128. package/dist/index.js +1 -1
  129. package/dist/keys/compromise.d.ts +2 -2
  130. package/dist/keys/compromise.js +1 -1
  131. package/dist/keys/device_certificate.d.ts +3 -3
  132. package/dist/keys/device_certificate.js +4 -4
  133. package/dist/keys/key_revocation.d.ts +2 -2
  134. package/dist/keys/key_revocation.js +1 -1
  135. package/dist/keys/request.d.ts +17 -3
  136. package/dist/keys/request.d.ts.map +1 -1
  137. package/dist/keys/request.js.map +1 -1
  138. package/dist/keys/sign.d.ts +1 -1
  139. package/dist/keys/sign.js +1 -1
  140. package/dist/keys/signed.d.ts +3 -3
  141. package/dist/keys/signed.js +3 -3
  142. package/dist/keys/store.js +1 -1
  143. package/dist/largeattachment/crypto.d.ts +1 -1
  144. package/dist/largeattachment/crypto.js +2 -2
  145. package/dist/largeattachment/upload.d.ts +3 -3
  146. package/dist/largeattachment/upload.js +1 -1
  147. package/dist/migration/index.d.ts +1 -1
  148. package/dist/migration/index.d.ts.map +1 -1
  149. package/dist/migration/index.js +1 -1
  150. package/dist/migration/index.js.map +1 -1
  151. package/dist/migration/lockout.d.ts +2 -2
  152. package/dist/migration/lockout.js +2 -2
  153. package/dist/migration/migration.d.ts +6 -4
  154. package/dist/migration/migration.d.ts.map +1 -1
  155. package/dist/migration/migration.js +3 -3
  156. package/dist/migration/migration.js.map +1 -1
  157. package/dist/migration/notice.d.ts +31 -19
  158. package/dist/migration/notice.d.ts.map +1 -1
  159. package/dist/migration/notice.js +37 -71
  160. package/dist/migration/notice.js.map +1 -1
  161. package/dist/migration/orchestrate.d.ts +10 -10
  162. package/dist/migration/orchestrate.d.ts.map +1 -1
  163. package/dist/migration/orchestrate.js +23 -23
  164. package/dist/migration/orchestrate.js.map +1 -1
  165. package/dist/migration/sign.js +9 -9
  166. package/dist/migration/sign.js.map +1 -1
  167. package/dist/migration/types.d.ts +35 -29
  168. package/dist/migration/types.d.ts.map +1 -1
  169. package/dist/migration/types.js +5 -7
  170. package/dist/migration/types.js.map +1 -1
  171. package/dist/recovery/bundle_store.js +1 -1
  172. package/dist/recovery/sign.js +3 -3
  173. package/dist/recovery/types.d.ts +3 -3
  174. package/dist/reputation/abuse_report.d.ts +3 -3
  175. package/dist/reputation/abuse_report.js +2 -2
  176. package/dist/reputation/eligibility.d.ts +44 -0
  177. package/dist/reputation/eligibility.d.ts.map +1 -0
  178. package/dist/reputation/eligibility.js +58 -0
  179. package/dist/reputation/eligibility.js.map +1 -0
  180. package/dist/reputation/evidence.d.ts +47 -0
  181. package/dist/reputation/evidence.d.ts.map +1 -0
  182. package/dist/reputation/evidence.js +117 -0
  183. package/dist/reputation/evidence.js.map +1 -0
  184. package/dist/reputation/gossip_fetch.d.ts +2 -2
  185. package/dist/reputation/gossip_fetch.js +1 -1
  186. package/dist/reputation/index.d.ts +4 -1
  187. package/dist/reputation/index.d.ts.map +1 -1
  188. package/dist/reputation/index.js +4 -1
  189. package/dist/reputation/index.js.map +1 -1
  190. package/dist/reputation/pow.d.ts +1 -1
  191. package/dist/reputation/pow.js +1 -1
  192. package/dist/reputation/references.d.ts +51 -0
  193. package/dist/reputation/references.d.ts.map +1 -0
  194. package/dist/reputation/references.js +95 -0
  195. package/dist/reputation/references.js.map +1 -0
  196. package/dist/reputation/sign.d.ts +1 -1
  197. package/dist/reputation/sign.js +2 -2
  198. package/dist/reputation/types.d.ts +46 -2
  199. package/dist/reputation/types.d.ts.map +1 -1
  200. package/dist/reputation/types.js +14 -0
  201. package/dist/reputation/types.js.map +1 -1
  202. package/dist/reputation/whois.d.ts +1 -1
  203. package/dist/reputation/whois.js +1 -1
  204. package/dist/seal/wrap.d.ts +2 -2
  205. package/dist/seal/wrap.js +4 -4
  206. package/dist/session/dispatcher.d.ts +3 -3
  207. package/dist/session/dispatcher.js +1 -1
  208. package/dist/session/rekey_seal.d.ts +3 -3
  209. package/dist/session/rekey_seal.js +3 -3
  210. package/dist/session/session.d.ts +3 -3
  211. package/dist/session/session.js +3 -3
  212. package/dist/transparency/log.d.ts +1 -1
  213. package/dist/transparency/log.js +2 -2
  214. package/dist/transparency/types.d.ts +2 -2
  215. package/dist/transparency/types.js +1 -1
  216. package/dist/transport/h2.d.ts +33 -12
  217. package/dist/transport/h2.d.ts.map +1 -1
  218. package/dist/transport/h2.js +40 -13
  219. package/dist/transport/h2.js.map +1 -1
  220. package/dist/transport/index.d.ts +1 -1
  221. package/dist/transport/index.d.ts.map +1 -1
  222. package/dist/transport/index.js +1 -1
  223. package/dist/transport/index.js.map +1 -1
  224. package/dist/transport/memory.js +1 -1
  225. package/dist/transport/ws.d.ts +1 -1
  226. package/dist/transport/ws.js +1 -1
  227. package/package.json +1 -1
@@ -38,7 +38,7 @@ export declare function addressDomain(addr: string): string;
38
38
  /**
39
39
  * Validate `addr` against the canonical wire form per §2.3:
40
40
  *
41
- * - Non-empty, valid UTF-8 (always true for JS strings included
41
+ * - Non-empty, valid UTF-8 (always true for JS strings - included
42
42
  * for symmetry with semp-go).
43
43
  * - Composed length ≤ {@link MaxAddressLength} bytes.
44
44
  * - No control characters (C0, DEL, C1).
@@ -51,7 +51,7 @@ export function addressDomain(addr) {
51
51
  /**
52
52
  * Validate `addr` against the canonical wire form per §2.3:
53
53
  *
54
- * - Non-empty, valid UTF-8 (always true for JS strings included
54
+ * - Non-empty, valid UTF-8 (always true for JS strings - included
55
55
  * for symmetry with semp-go).
56
56
  * - Composed length ≤ {@link MaxAddressLength} bytes.
57
57
  * - No control characters (C0, DEL, C1).
@@ -57,7 +57,7 @@ export interface Brief {
57
57
  *
58
58
  * Returned copies:
59
59
  *
60
- * 1. If `b.bcc` is empty or undefined, returns `[b]` a single
60
+ * 1. If `b.bcc` is empty or undefined, returns `[b]` - a single
61
61
  * copy, returned unchanged.
62
62
  *
63
63
  * 2. Otherwise, returns `b.bcc.length + 1` elements:
@@ -23,7 +23,7 @@
23
23
  *
24
24
  * Returned copies:
25
25
  *
26
- * 1. If `b.bcc` is empty or undefined, returns `[b]` a single
26
+ * 1. If `b.bcc` is empty or undefined, returns `[b]` - a single
27
27
  * copy, returned unchanged.
28
28
  *
29
29
  * 2. Otherwise, returns `b.bcc.length + 1` elements:
@@ -25,11 +25,11 @@ export declare function marshal(v: unknown): Uint8Array;
25
25
  /**
26
26
  * Apply an in-place elision callback to a deep copy of `v`, then
27
27
  * canonicalize. The elider can mutate `map[string]any` / `any[]`
28
- * structures freely the original is untouched.
28
+ * structures freely - the original is untouched.
29
29
  *
30
30
  * Use case: envelope canonicalization sets `seal.signature` and
31
31
  * `seal.session_mac` to "", omits `postmark.hop_count`, omits
32
- * `padding` all by mutating the deep copy before serialization.
32
+ * `padding` - all by mutating the deep copy before serialization.
33
33
  */
34
34
  export declare function marshalWithElision(v: unknown, elide: (clone: unknown) => void): Uint8Array;
35
35
  //# sourceMappingURL=marshal.d.ts.map
@@ -35,11 +35,11 @@ export function marshal(v) {
35
35
  /**
36
36
  * Apply an in-place elision callback to a deep copy of `v`, then
37
37
  * canonicalize. The elider can mutate `map[string]any` / `any[]`
38
- * structures freely the original is untouched.
38
+ * structures freely - the original is untouched.
39
39
  *
40
40
  * Use case: envelope canonicalization sets `seal.signature` and
41
41
  * `seal.session_mac` to "", omits `postmark.hop_count`, omits
42
- * `padding` all by mutating the deep copy before serialization.
42
+ * `padding` - all by mutating the deep copy before serialization.
43
43
  */
44
44
  export function marshalWithElision(v, elide) {
45
45
  const raw = JSON.stringify(v);
@@ -29,7 +29,7 @@ export interface DriverConfig {
29
29
  * - `already_pending`: a request is already pending for this
30
30
  * user_id; the §2.4 rule rejects double-requests.
31
31
  * - `not_pending`: a cancel arrived for an account with no
32
- * pending request the spec treats this as a no-op success.
32
+ * pending request - the spec treats this as a no-op success.
33
33
  * - `invalid`: the record failed structural validation.
34
34
  */
35
35
  export type SubmitResult = {
@@ -54,7 +54,7 @@ export declare class Driver {
54
54
  constructor(cfg: DriverConfig);
55
55
  /**
56
56
  * Apply `record` to the store. Caller MUST verify the record's
57
- * signature and authority (§2.3 the issuing device must be a
57
+ * signature and authority (§2.3 - the issuing device must be a
58
58
  * full-access device of the account) BEFORE calling submit.
59
59
  */
60
60
  submit(record: ClosureRecord): Promise<SubmitResult>;
@@ -22,7 +22,7 @@ export class Driver {
22
22
  }
23
23
  /**
24
24
  * Apply `record` to the store. Caller MUST verify the record's
25
- * signature and authority (§2.3 the issuing device must be a
25
+ * signature and authority (§2.3 - the issuing device must be a
26
26
  * full-access device of the account) BEFORE calling submit.
27
27
  */
28
28
  async submit(record) {
@@ -4,8 +4,8 @@
4
4
  * The two currently defined algorithm suites use different AEAD
5
5
  * variants:
6
6
  *
7
- * - `x25519-chacha20-poly1305` ChaCha20-Poly1305, 12-byte nonce.
8
- * - `pq-kyber768-x25519` XChaCha20-Poly1305, 24-byte nonce.
7
+ * - `x25519-chacha20-poly1305` - ChaCha20-Poly1305, 12-byte nonce.
8
+ * - `pq-kyber768-x25519` - XChaCha20-Poly1305, 24-byte nonce.
9
9
  *
10
10
  * The sealing flow is identical in both cases: AEAD.Seal(key, nonce,
11
11
  * plaintext, aad) -> ciphertext || tag. Returns a single byte slice
@@ -4,8 +4,8 @@
4
4
  * The two currently defined algorithm suites use different AEAD
5
5
  * variants:
6
6
  *
7
- * - `x25519-chacha20-poly1305` ChaCha20-Poly1305, 12-byte nonce.
8
- * - `pq-kyber768-x25519` XChaCha20-Poly1305, 24-byte nonce.
7
+ * - `x25519-chacha20-poly1305` - ChaCha20-Poly1305, 12-byte nonce.
8
+ * - `pq-kyber768-x25519` - XChaCha20-Poly1305, 24-byte nonce.
9
9
  *
10
10
  * The sealing flow is identical in both cases: AEAD.Seal(key, nonce,
11
11
  * plaintext, aad) -> ciphertext || tag. Returns a single byte slice
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Per-key HKDF info labels for the five session keys derived from
13
13
  * the initial-handshake PRK. Per VECTORS.md §2.2, the rekey
14
- * derivation reuses these same labels cross-context separation
14
+ * derivation reuses these same labels - cross-context separation
15
15
  * comes from the salt change (rekey nonces vs handshake nonces),
16
16
  * not from a different label namespace.
17
17
  */
@@ -13,7 +13,7 @@ import { sha512 } from "@noble/hashes/sha2.js";
13
13
  /**
14
14
  * Per-key HKDF info labels for the five session keys derived from
15
15
  * the initial-handshake PRK. Per VECTORS.md §2.2, the rekey
16
- * derivation reuses these same labels cross-context separation
16
+ * derivation reuses these same labels - cross-context separation
17
17
  * comes from the salt change (rekey nonces vs handshake nonces),
18
18
  * not from a different label namespace.
19
19
  */
@@ -6,7 +6,7 @@
6
6
  */
7
7
  /**
8
8
  * Compute HMAC-SHA-256 over `message` keyed by `key`. The output is
9
- * always 32 bytes the same width every SEMP MAC field expects.
9
+ * always 32 bytes - the same width every SEMP MAC field expects.
10
10
  */
11
11
  export declare function computeMAC(key: Uint8Array, message: Uint8Array): Uint8Array;
12
12
  /**
@@ -8,7 +8,7 @@ import { hmac } from "@noble/hashes/hmac.js";
8
8
  import { sha256 } from "@noble/hashes/sha2.js";
9
9
  /**
10
10
  * Compute HMAC-SHA-256 over `message` keyed by `key`. The output is
11
- * always 32 bytes the same width every SEMP MAC field expects.
11
+ * always 32 bytes - the same width every SEMP MAC field expects.
12
12
  */
13
13
  export function computeMAC(key, message) {
14
14
  return hmac(sha256, key, message);
@@ -4,12 +4,12 @@
4
4
  * A recipient server returns exactly one of three acknowledgments
5
5
  * for every envelope delivery attempt:
6
6
  *
7
- * - `delivered` accepted; carries a signed
7
+ * - `delivered` - accepted; carries a signed
8
8
  * {@link "./receipt".DeliveryReceipt} per §1.1.1, MAY include a
9
9
  * {@link RecipientStatus} per §1.6 if the sender matches the
10
10
  * recipient's visibility rules.
11
- * - `rejected` explicitly refused with a reason code per §1.2.
12
- * - `silent` no response within the sender's timeout window
11
+ * - `rejected` - explicitly refused with a reason code per §1.2.
12
+ * - `silent` - no response within the sender's timeout window
13
13
  * per §1.3. The wire form for silent is "no response sent at
14
14
  * all"; this module exposes a constant value the sending server
15
15
  * uses internally to record the outcome on its own queue state.
@@ -66,7 +66,7 @@ export declare const MaxStatusMessageBytes = 256;
66
66
  * - acknowledgment="rejected" with `reason_code` populated and an
67
67
  * optional `reason`.
68
68
  *
69
- * The `silent` outcome is not represented on the wire the
69
+ * The `silent` outcome is not represented on the wire - the
70
70
  * recipient simply does not respond.
71
71
  */
72
72
  export interface DeliveryAck {
@@ -105,7 +105,7 @@ export interface SenderIdentity {
105
105
  * - `nobody` (default): never disclose, regardless of the allow list.
106
106
  * - `everyone`: always disclose, regardless of the allow list.
107
107
  * - `domains` / `servers` / `users`: walk the allow list looking for
108
- * a match. The mode constrains which entry kinds are honored in
108
+ * a match. The mode constrains which entry kinds are honored - in
109
109
  * `domains` mode only entries with `type: "domain"`, etc.
110
110
  * Mismatched entries in the allow list are ignored.
111
111
  *
@@ -4,12 +4,12 @@
4
4
  * A recipient server returns exactly one of three acknowledgments
5
5
  * for every envelope delivery attempt:
6
6
  *
7
- * - `delivered` accepted; carries a signed
7
+ * - `delivered` - accepted; carries a signed
8
8
  * {@link "./receipt".DeliveryReceipt} per §1.1.1, MAY include a
9
9
  * {@link RecipientStatus} per §1.6 if the sender matches the
10
10
  * recipient's visibility rules.
11
- * - `rejected` explicitly refused with a reason code per §1.2.
12
- * - `silent` no response within the sender's timeout window
11
+ * - `rejected` - explicitly refused with a reason code per §1.2.
12
+ * - `silent` - no response within the sender's timeout window
13
13
  * per §1.3. The wire form for silent is "no response sent at
14
14
  * all"; this module exposes a constant value the sending server
15
15
  * uses internally to record the outcome on its own queue state.
@@ -55,7 +55,7 @@ export function buildRejectedAck(reasonCode, reason) {
55
55
  * - `nobody` (default): never disclose, regardless of the allow list.
56
56
  * - `everyone`: always disclose, regardless of the allow list.
57
57
  * - `domains` / `servers` / `users`: walk the allow list looking for
58
- * a match. The mode constrains which entry kinds are honored in
58
+ * a match. The mode constrains which entry kinds are honored - in
59
59
  * `domains` mode only entries with `type: "domain"`, etc.
60
60
  * Mismatched entries in the allow list are ignored.
61
61
  *
@@ -79,7 +79,7 @@ export function matchVisibility(visibility, sender) {
79
79
  case "users":
80
80
  break;
81
81
  default:
82
- // Unknown mode fail closed.
82
+ // Unknown mode - fail closed.
83
83
  return false;
84
84
  }
85
85
  const senderAddress = (sender.address ?? "").toLowerCase();
@@ -116,7 +116,7 @@ export function matchVisibility(visibility, sender) {
116
116
  }
117
117
  break;
118
118
  default:
119
- // Unknown entry type skip.
119
+ // Unknown entry type - skip.
120
120
  break;
121
121
  }
122
122
  }
@@ -63,7 +63,7 @@ export interface BlockListSender {
63
63
  * `user > server > domain`.
64
64
  *
65
65
  * Entries past `expires_at` are skipped (no clock-skew tolerance
66
- * applied here callers that want the §4.4 grace window evaluate
66
+ * applied here - callers that want the §4.4 grace window evaluate
67
67
  * expiry themselves).
68
68
  *
69
69
  * All comparisons are case-insensitive.
@@ -14,7 +14,7 @@
14
14
  * `user > server > domain`.
15
15
  *
16
16
  * Entries past `expires_at` are skipped (no clock-skew tolerance
17
- * applied here callers that want the §4.4 grace window evaluate
17
+ * applied here - callers that want the §4.4 grace window evaluate
18
18
  * expiry themselves).
19
19
  *
20
20
  * All comparisons are case-insensitive.
@@ -66,7 +66,7 @@ export function matchBlockList(list, sender, now = new Date()) {
66
66
  rank = RANK_DOMAIN;
67
67
  break;
68
68
  default:
69
- continue; // unknown entity type forward-compat ignore
69
+ continue; // unknown entity type - forward-compat ignore
70
70
  }
71
71
  if (rank > bestRank) {
72
72
  bestRank = rank;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Device-sync extension marker per draft-gokce-semp-client §5.6.
3
+ *
4
+ * Every sync envelope MUST carry the marker in `brief.extensions`
5
+ * with `required: true`. The marker's `data` object carries a
6
+ * single `kind` field that names the sync category; each sync
7
+ * kind declares the `kind` value it produces.
8
+ *
9
+ * The marker lives in the brief so the home server can apply
10
+ * correct policy without decrypting the enclosure. Clients
11
+ * receiving an envelope with this marker MUST NOT surface the
12
+ * envelope as ordinary correspondence in any mailbox view.
13
+ *
14
+ * @module
15
+ */
16
+ /** Namespaced identifier of the device-sync marker extension. */
17
+ export declare const DeviceSyncExtensionID = "semp.dev/device-sync";
18
+ /** Content of the device-sync extension's `data` field per §5.6. */
19
+ export interface DeviceSyncMarkerData {
20
+ /**
21
+ * Identifies the sync category. Each sync extension declares
22
+ * the `kind` value it produces.
23
+ */
24
+ kind: string;
25
+ }
26
+ //# sourceMappingURL=device_sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_sync.d.ts","sourceRoot":"","sources":["../../src/delivery/device_sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAE5D,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Device-sync extension marker per draft-gokce-semp-client §5.6.
3
+ *
4
+ * Every sync envelope MUST carry the marker in `brief.extensions`
5
+ * with `required: true`. The marker's `data` object carries a
6
+ * single `kind` field that names the sync category; each sync
7
+ * kind declares the `kind` value it produces.
8
+ *
9
+ * The marker lives in the brief so the home server can apply
10
+ * correct policy without decrypting the enclosure. Clients
11
+ * receiving an envelope with this marker MUST NOT surface the
12
+ * envelope as ordinary correspondence in any mailbox view.
13
+ *
14
+ * @module
15
+ */
16
+ /** Namespaced identifier of the device-sync marker extension. */
17
+ export const DeviceSyncExtensionID = "semp.dev/device-sync";
18
+ //# sourceMappingURL=device_sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_sync.js","sourceRoot":"","sources":["../../src/delivery/device_sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAC"}
@@ -71,7 +71,7 @@ export interface StagedHeldStage {
71
71
  }
72
72
  /**
73
73
  * One envelope held in the staged-delivery queue per §3.2.2. The
74
- * envelope itself is NOT stored twice this record is the
74
+ * envelope itself is NOT stored twice - this record is the
75
75
  * per-stage pointer set the server maintains.
76
76
  */
77
77
  export interface StagedHeld {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * SEMP_FETCH wire shapes the demo-only client → home-server inbox
2
+ * SEMP_FETCH wire shapes - the demo-only client → home-server inbox
3
3
  * pull protocol per CLIENT.md §3.
4
4
  *
5
5
  * HANDSHAKE.md §4.6 explicitly leaves the client wakeup mechanism
@@ -1,5 +1,5 @@
1
1
  /**
2
- * SEMP_FETCH wire shapes the demo-only client → home-server inbox
2
+ * SEMP_FETCH wire shapes - the demo-only client → home-server inbox
3
3
  * pull protocol per CLIENT.md §3.
4
4
  *
5
5
  * HANDSHAKE.md §4.6 explicitly leaves the client wakeup mechanism
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Reference per-user envelope inbox minimal in-memory FIFO.
2
+ * Reference per-user envelope inbox - minimal in-memory FIFO.
3
3
  *
4
4
  * Intended for in-process tests, embedded servers, and the
5
5
  * reference {@link "./fetch".FetchResponse} producer. NOT a
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * Production deployments MUST back this with a durable store,
16
16
  * retention rules, fairness controls, and per-address access
17
- * control none of which are present here.
17
+ * control - none of which are present here.
18
18
  *
19
19
  * @module
20
20
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Reference per-user envelope inbox minimal in-memory FIFO.
2
+ * Reference per-user envelope inbox - minimal in-memory FIFO.
3
3
  *
4
4
  * Intended for in-process tests, embedded servers, and the
5
5
  * reference {@link "./fetch".FetchResponse} producer. NOT a
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * Production deployments MUST back this with a durable store,
16
16
  * retention rules, fairness controls, and per-address access
17
- * control none of which are present here.
17
+ * control - none of which are present here.
18
18
  *
19
19
  * @module
20
20
  */
@@ -28,4 +28,8 @@ export { type DecodedBrief, type DomainKeyLookup, type DomainPolicyFunc, type En
28
28
  export { type StageCompleteFunc, type StageDeliverFunc, type StageSuppressFunc, type StagedRunnerConfig, EnvelopeAlreadyHeldError, EnvelopeNotHeldError, StagedRunner, } from "./staged_runner.js";
29
29
  export { type AttemptResult, type DeliverFunc, type EventSink, type SchedulerConfig, type SchedulerStore, InMemorySchedulerStore, Scheduler, TickInProgressError, UnknownRecordError, } from "./scheduler.js";
30
30
  export { type Dialer, type EndpointResolver, type ForwarderConfig, type PeerDomainKeyLookup, Forwarder, } from "./forwarder.js";
31
+ export { PersistentSilentCounter, PersistentSilentDefaults, } from "./persistent_silent.js";
32
+ export { type StatusMessage, type StatusMessageSignature, type StatusState, type StatusVisibility, type StatusVisibilityEntry, type StatusVisibilityMode, StatusMessagePrefix, StatusMessageType, StatusMessageVersion, signStatusMessage, validateStatusMessage, verifyStatusMessage, } from "./status_message.js";
33
+ export { UpgradeCapabilityPresent, UpgradeHeaderAddress, UpgradeHeaderCapability, UpgradeHeaderDomain, UpgradeHeaderIdentity, } from "./upgrade_signal.js";
34
+ export { type DeviceSyncMarkerData, DeviceSyncExtensionID, } from "./device_sync.js";
31
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,GACtB,MAAM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pB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,SAAS,GACV,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,YAAY,EACjB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EA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nB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
@@ -28,4 +28,8 @@ export { Pipeline, } from "./pipeline.js";
28
28
  export { EnvelopeAlreadyHeldError, EnvelopeNotHeldError, StagedRunner, } from "./staged_runner.js";
29
29
  export { InMemorySchedulerStore, Scheduler, TickInProgressError, UnknownRecordError, } from "./scheduler.js";
30
30
  export { Forwarder, } from "./forwarder.js";
31
+ export { PersistentSilentCounter, PersistentSilentDefaults, } from "./persistent_silent.js";
32
+ export { StatusMessagePrefix, StatusMessageType, StatusMessageVersion, signStatusMessage, validateStatusMessage, verifyStatusMessage, } from "./status_message.js";
33
+ export { UpgradeCapabilityPresent, UpgradeHeaderAddress, UpgradeHeaderCapability, UpgradeHeaderDomain, UpgradeHeaderIdentity, } from "./upgrade_signal.js";
34
+ export { DeviceSyncExtensionID, } from "./device_sync.js";
31
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAOL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EASL,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,GACxB,MAAM,UAAU,CAAC;AAElB,OAAO,EAGL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAGL,eAAe,EACf,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EAQL,qBAAqB,EACrB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAKL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAIL,SAAS,EACT,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,oBAAoB,EACpB,KAAK,GACN,MAAM,YAAY,CAAC;AAEpB,OAAO,EAGL,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAML,qBAAqB,EACrB,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAKL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAGL,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAaL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAKL,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAML,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAKL,SAAS,GACV,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"A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B,EACrB,eAAe,EACf,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAKL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAGL,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAaL,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAKL,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAML,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAKL,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Persistent silent recipient state per
3
+ * draft-gokce-semp-delivery §4.5 / DELIVERY.md §2.5.
4
+ *
5
+ * After repeated `silent` outcomes for the same recipient the
6
+ * sending server tightens its retry deadline so it does not waste
7
+ * effort retrying a recipient that consistently fails to
8
+ * acknowledge.
9
+ *
10
+ * The state is purely sender-side. It MUST NOT be transmitted on
11
+ * the wire and MUST NOT be published as a trust-gossip observation.
12
+ * Two senders correctly disagree on which recipients are
13
+ * persistently silent because each only sees its own envelopes.
14
+ *
15
+ * @module
16
+ */
17
+ /** §4.5 spec defaults. */
18
+ export declare const PersistentSilentDefaults: {
19
+ /** Consecutive silents required before tightening engages. */
20
+ readonly threshold: 5;
21
+ /** Minimum observation window before tightening engages. */
22
+ readonly observationWindowMs: number;
23
+ /** Tightened retry deadline once the trigger fires. */
24
+ readonly shortDeadlineMs: number;
25
+ /** Idle expiry after which the counter for a recipient is dropped. */
26
+ readonly idleExpiryMs: number;
27
+ };
28
+ /** Counter configuration. Zero / undefined falls back to the spec defaults. */
29
+ export interface PersistentSilentConfig {
30
+ threshold?: number;
31
+ observationWindowMs?: number;
32
+ shortDeadlineMs?: number;
33
+ idleExpiryMs?: number;
34
+ }
35
+ /**
36
+ * Sender-side ledger of per-recipient silent-acknowledgment
37
+ * counters.
38
+ *
39
+ * Usage:
40
+ *
41
+ * - `inc(addr, now)` on every `silent` outcome.
42
+ * - `reset(addr)` on every non-silent outcome (delivered /
43
+ * rejected).
44
+ * - `effective(addr, now)` returns the tightened retry deadline
45
+ * (in ms) once the count + observation-window thresholds are
46
+ * met, or null to keep the caller's default.
47
+ * - `pruneExpired(now)` on a janitor cadence so the map does not
48
+ * grow without bound.
49
+ */
50
+ export declare class PersistentSilentCounter {
51
+ private readonly cfg;
52
+ private readonly entries;
53
+ constructor(cfg?: PersistentSilentConfig);
54
+ /** Record one silent outcome for `recipient` at `now`. Returns the running count. */
55
+ inc(recipient: string, now: Date): number;
56
+ /** Clear the counter for `recipient`. Idempotent on missing entries. */
57
+ reset(recipient: string): void;
58
+ /**
59
+ * Returns the §4.5 shortened deadline (in ms) once the count and
60
+ * minimum-observation-window thresholds are met. Returns null
61
+ * when the trigger has not fired yet - caller falls back to its
62
+ * default per-envelope deadline.
63
+ */
64
+ effective(recipient: string, now: Date): number | null;
65
+ /** Current silent count for `recipient`. */
66
+ count(recipient: string): number;
67
+ /** Drop entries whose lastSeen is older than IdleExpiry. Returns the removed count. */
68
+ pruneExpired(now: Date): number;
69
+ }
70
+ //# sourceMappingURL=persistent_silent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistent_silent.d.ts","sourceRoot":"","sources":["../../src/delivery/persistent_silent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0BAA0B;AAC1B,eAAO,MAAM,wBAAwB;IACnC,8DAA8D;;IAE9D,4DAA4D;;IAE5D,uDAAuD;;IAEvD,sEAAsE;;CAE9D,CAAC;AAEX,+EAA+E;AAC/E,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAQD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAmC;IACvD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4C;gBAExD,GAAG,GAAE,sBAA2B;IAoB5C,qFAAqF;IACrF,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM;IAezC,wEAAwE;IACxE,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI9B;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI;IActD,4CAA4C;IAC5C,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAIhC,uFAAuF;IACvF,YAAY,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM;CAWhC"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Persistent silent recipient state per
3
+ * draft-gokce-semp-delivery §4.5 / DELIVERY.md §2.5.
4
+ *
5
+ * After repeated `silent` outcomes for the same recipient the
6
+ * sending server tightens its retry deadline so it does not waste
7
+ * effort retrying a recipient that consistently fails to
8
+ * acknowledge.
9
+ *
10
+ * The state is purely sender-side. It MUST NOT be transmitted on
11
+ * the wire and MUST NOT be published as a trust-gossip observation.
12
+ * Two senders correctly disagree on which recipients are
13
+ * persistently silent because each only sees its own envelopes.
14
+ *
15
+ * @module
16
+ */
17
+ /** §4.5 spec defaults. */
18
+ export const PersistentSilentDefaults = {
19
+ /** Consecutive silents required before tightening engages. */
20
+ threshold: 5,
21
+ /** Minimum observation window before tightening engages. */
22
+ observationWindowMs: 24 * 60 * 60 * 1000,
23
+ /** Tightened retry deadline once the trigger fires. */
24
+ shortDeadlineMs: 4 * 60 * 60 * 1000,
25
+ /** Idle expiry after which the counter for a recipient is dropped. */
26
+ idleExpiryMs: 30 * 24 * 60 * 60 * 1000,
27
+ };
28
+ /**
29
+ * Sender-side ledger of per-recipient silent-acknowledgment
30
+ * counters.
31
+ *
32
+ * Usage:
33
+ *
34
+ * - `inc(addr, now)` on every `silent` outcome.
35
+ * - `reset(addr)` on every non-silent outcome (delivered /
36
+ * rejected).
37
+ * - `effective(addr, now)` returns the tightened retry deadline
38
+ * (in ms) once the count + observation-window thresholds are
39
+ * met, or null to keep the caller's default.
40
+ * - `pruneExpired(now)` on a janitor cadence so the map does not
41
+ * grow without bound.
42
+ */
43
+ export class PersistentSilentCounter {
44
+ cfg;
45
+ entries = new Map();
46
+ constructor(cfg = {}) {
47
+ this.cfg = {
48
+ threshold: cfg.threshold && cfg.threshold > 0
49
+ ? cfg.threshold
50
+ : PersistentSilentDefaults.threshold,
51
+ observationWindowMs: cfg.observationWindowMs && cfg.observationWindowMs > 0
52
+ ? cfg.observationWindowMs
53
+ : PersistentSilentDefaults.observationWindowMs,
54
+ shortDeadlineMs: cfg.shortDeadlineMs && cfg.shortDeadlineMs > 0
55
+ ? cfg.shortDeadlineMs
56
+ : PersistentSilentDefaults.shortDeadlineMs,
57
+ idleExpiryMs: cfg.idleExpiryMs && cfg.idleExpiryMs > 0
58
+ ? cfg.idleExpiryMs
59
+ : PersistentSilentDefaults.idleExpiryMs,
60
+ };
61
+ }
62
+ /** Record one silent outcome for `recipient` at `now`. Returns the running count. */
63
+ inc(recipient, now) {
64
+ if (recipient === "") {
65
+ return 0;
66
+ }
67
+ const t = now.getTime();
68
+ const e = this.entries.get(recipient);
69
+ if (e === undefined) {
70
+ this.entries.set(recipient, { count: 1, firstSeenMs: t, lastSeenMs: t });
71
+ return 1;
72
+ }
73
+ e.count++;
74
+ e.lastSeenMs = t;
75
+ return e.count;
76
+ }
77
+ /** Clear the counter for `recipient`. Idempotent on missing entries. */
78
+ reset(recipient) {
79
+ this.entries.delete(recipient);
80
+ }
81
+ /**
82
+ * Returns the §4.5 shortened deadline (in ms) once the count and
83
+ * minimum-observation-window thresholds are met. Returns null
84
+ * when the trigger has not fired yet - caller falls back to its
85
+ * default per-envelope deadline.
86
+ */
87
+ effective(recipient, now) {
88
+ const e = this.entries.get(recipient);
89
+ if (e === undefined) {
90
+ return null;
91
+ }
92
+ if (e.count < this.cfg.threshold) {
93
+ return null;
94
+ }
95
+ if (now.getTime() - e.firstSeenMs < this.cfg.observationWindowMs) {
96
+ return null;
97
+ }
98
+ return this.cfg.shortDeadlineMs;
99
+ }
100
+ /** Current silent count for `recipient`. */
101
+ count(recipient) {
102
+ return this.entries.get(recipient)?.count ?? 0;
103
+ }
104
+ /** Drop entries whose lastSeen is older than IdleExpiry. Returns the removed count. */
105
+ pruneExpired(now) {
106
+ const t = now.getTime();
107
+ let removed = 0;
108
+ for (const [k, e] of this.entries) {
109
+ if (t - e.lastSeenMs >= this.cfg.idleExpiryMs) {
110
+ this.entries.delete(k);
111
+ removed++;
112
+ }
113
+ }
114
+ return removed;
115
+ }
116
+ }
117
+ //# sourceMappingURL=persistent_silent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistent_silent.js","sourceRoot":"","sources":["../../src/delivery/persistent_silent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,8DAA8D;IAC9D,SAAS,EAAE,CAAC;IACZ,4DAA4D;IAC5D,mBAAmB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IACxC,uDAAuD;IACvD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IACnC,sEAAsE;IACtE,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;CAC9B,CAAC;AAgBX;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,uBAAuB;IACjB,GAAG,CAAmC;IACtC,OAAO,GAAG,IAAI,GAAG,EAAiC,CAAC;IAEpE,YAAY,MAA8B,EAAE;QAC1C,IAAI,CAAC,GAAG,GAAG;YACT,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,SAAS,GAAG,CAAC;gBAC3C,CAAC,CAAC,GAAG,CAAC,SAAS;gBACf,CAAC,CAAC,wBAAwB,CAAC,SAAS;YACtC,mBAAmB,EACjB,GAAG,CAAC,mBAAmB,IAAI,GAAG,CAAC,mBAAmB,GAAG,CAAC;gBACpD,CAAC,CAAC,GAAG,CAAC,mBAAmB;gBACzB,CAAC,CAAC,wBAAwB,CAAC,mBAAmB;YAClD,eAAe,EACb,GAAG,CAAC,eAAe,IAAI,GAAG,CAAC,eAAe,GAAG,CAAC;gBAC5C,CAAC,CAAC,GAAG,CAAC,eAAe;gBACrB,CAAC,CAAC,wBAAwB,CAAC,eAAe;YAC9C,YAAY,EACV,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,YAAY,GAAG,CAAC;gBACtC,CAAC,CAAC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