@serfab/cadre-core 0.11.0 → 0.12.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 (86) hide show
  1. package/dist/announce-addrs.d.ts +49 -0
  2. package/dist/announce-addrs.js +78 -0
  3. package/dist/announce-addrs.js.map +1 -0
  4. package/dist/cadre-node.d.ts +281 -30
  5. package/dist/cadre-node.js +513 -103
  6. package/dist/cadre-node.js.map +1 -1
  7. package/dist/control-database.d.ts +155 -23
  8. package/dist/control-database.js +272 -104
  9. package/dist/control-database.js.map +1 -1
  10. package/dist/control-read-retry.d.ts +103 -0
  11. package/dist/control-read-retry.js +145 -0
  12. package/dist/control-read-retry.js.map +1 -0
  13. package/dist/control-retry.d.ts +101 -0
  14. package/dist/control-retry.js +108 -0
  15. package/dist/control-retry.js.map +1 -0
  16. package/dist/control-schema.d.ts +1 -1
  17. package/dist/control-schema.js +20 -4
  18. package/dist/control-schema.js.map +1 -1
  19. package/dist/control-write-retry.d.ts +59 -35
  20. package/dist/control-write-retry.js +21 -92
  21. package/dist/control-write-retry.js.map +1 -1
  22. package/dist/delegate-admission.d.ts +17 -15
  23. package/dist/delegate-admission.js +17 -15
  24. package/dist/delegate-admission.js.map +1 -1
  25. package/dist/index.d.ts +6 -4
  26. package/dist/index.js +17 -8
  27. package/dist/index.js.map +1 -1
  28. package/dist/membership-connection-gater.d.ts +211 -25
  29. package/dist/membership-connection-gater.js +309 -29
  30. package/dist/membership-connection-gater.js.map +1 -1
  31. package/dist/peer-record.d.ts +26 -0
  32. package/dist/peer-record.js +32 -0
  33. package/dist/peer-record.js.map +1 -1
  34. package/dist/relay-addrs.d.ts +76 -26
  35. package/dist/relay-addrs.js +115 -27
  36. package/dist/relay-addrs.js.map +1 -1
  37. package/dist/relay-reservation.d.ts +20 -15
  38. package/dist/relay-reservation.js +18 -14
  39. package/dist/relay-reservation.js.map +1 -1
  40. package/dist/strand-addr-protocol.js +16 -0
  41. package/dist/strand-addr-protocol.js.map +1 -1
  42. package/dist/strand-backfill.js +13 -4
  43. package/dist/strand-backfill.js.map +1 -1
  44. package/dist/strand-formation-manager.d.ts +10 -9
  45. package/dist/strand-formation-manager.js +10 -9
  46. package/dist/strand-formation-manager.js.map +1 -1
  47. package/dist/strand-formation-protocol.d.ts +7 -7
  48. package/dist/strand-formation-protocol.js +8 -8
  49. package/dist/strand-formation-protocol.js.map +1 -1
  50. package/dist/strand-instance-manager.d.ts +4 -3
  51. package/dist/strand-instance-manager.js +31 -6
  52. package/dist/strand-instance-manager.js.map +1 -1
  53. package/dist/strand-membership-writer.d.ts +106 -14
  54. package/dist/strand-membership-writer.js +180 -14
  55. package/dist/strand-membership-writer.js.map +1 -1
  56. package/dist/strand-solicitation.d.ts +3 -3
  57. package/dist/strand-solicitation.js +4 -5
  58. package/dist/strand-solicitation.js.map +1 -1
  59. package/dist/strand-wake-protocol.d.ts +47 -2
  60. package/dist/strand-wake-protocol.js +76 -6
  61. package/dist/strand-wake-protocol.js.map +1 -1
  62. package/dist/types.d.ts +74 -29
  63. package/dist/types.js.map +1 -1
  64. package/package.json +8 -8
  65. package/src/announce-addrs.ts +93 -0
  66. package/src/cadre-node.ts +5603 -5158
  67. package/src/control-database.ts +2584 -2406
  68. package/src/control-read-retry.ts +167 -0
  69. package/src/control-retry.ts +190 -0
  70. package/src/control-schema.ts +20 -4
  71. package/src/control-write-retry.ts +30 -130
  72. package/src/delegate-admission.ts +17 -15
  73. package/src/index.ts +435 -407
  74. package/src/membership-connection-gater.ts +533 -204
  75. package/src/peer-record.ts +33 -0
  76. package/src/relay-addrs.ts +218 -111
  77. package/src/relay-reservation.ts +828 -823
  78. package/src/strand-addr-protocol.ts +17 -0
  79. package/src/strand-backfill.ts +389 -366
  80. package/src/strand-formation-manager.ts +492 -491
  81. package/src/strand-formation-protocol.ts +8 -8
  82. package/src/strand-instance-manager.ts +636 -611
  83. package/src/strand-membership-writer.ts +209 -14
  84. package/src/strand-solicitation.ts +6 -7
  85. package/src/strand-wake-protocol.ts +94 -8
  86. package/src/types.ts +74 -29
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Native cadre-core strand-formation transport.
3
3
  *
4
- * Mirrors the non-deprecated `seed-bootstrap.ts` protocol service: a dedicated
4
+ * Mirrors the `seed-bootstrap.ts` protocol service: a dedicated
5
5
  * libp2p protocol id, length-prefixed JSON frames, and small single-purpose
6
- * session helpers. It replaces the deprecated `@serfab/strand-proto` transport,
6
+ * session helpers. It replaces the removed `@serfab/strand-proto` package's transport,
7
7
  * carrying the caller's REAL invitation token + disclosure and BOTH parties'
8
8
  * real cadre peer addresses end-to-end (no `{ partyId: sessionId }` / `cadre-*.local`
9
9
  * placeholders), and validating the responder's result on the initiator side.
@@ -12,10 +12,10 @@
12
12
  * provision-then-record, resolves + records consent against) the strand and returns the
13
13
  * result on approval.
14
14
  *
15
- * Cadre-disclosure timing (see docs/strand-proto.md "Security & Privacy"): the
16
- * responder reveals its own party id + cadre addresses — and, for a closed strand
17
- * returned via provision-then-record, that strand's membership key — ONLY after the
18
- * token and disclosure validate; a rejection discloses none of them.
15
+ * Cadre-disclosure timing: the responder reveals its own party id + cadre addresses
16
+ * — and, for a closed strand returned via provision-then-record, that strand's
17
+ * membership key — ONLY after the token and disclosure validate; a rejection
18
+ * discloses none of them.
19
19
  */
20
20
 
21
21
  import debug from 'debug';
@@ -248,12 +248,12 @@ class FrameReader {
248
248
 
249
249
  // ── Result validation ────────────────────────────────────────────────────────
250
250
 
251
- /** Matches the deprecated strand-proto placeholder cadre addrs (`cadre-a-1.local`, …). */
251
+ /** Matches the placeholder cadre addrs (`cadre-a-1.local`, …) of the removed strand-proto transport. */
252
252
  const PLACEHOLDER_CADRE_ADDR = /^cadre-[ab]-\d+\.local$/;
253
253
 
254
254
  /**
255
255
  * Structural check on a `responderCreates` result: the responder must have approved,
256
- * disclosed a non-empty real identity + cadre (not the deprecated `cadre-*.local`
256
+ * disclosed a non-empty real identity + cadre (not the legacy `cadre-*.local`
257
257
  * placeholders), and returned a strand vouched for by the responder party with a real id.
258
258
  *
259
259
  * `createdBy: 'responder'` means "the responder party vouches for / returns this strand."