@interop/wallet-core 0.89.0 → 0.91.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 (88) hide show
  1. package/dist/clientAnnex/grantRevocation.d.ts +9 -4
  2. package/dist/clientAnnex/grantRevocation.d.ts.map +1 -1
  3. package/dist/clientAnnex/grantRevocation.js +8 -4
  4. package/dist/clientAnnex/grantRevocation.js.map +1 -1
  5. package/dist/clientAnnex/index.d.ts +1 -1
  6. package/dist/clientAnnex/index.d.ts.map +1 -1
  7. package/dist/clientAnnex/index.js +1 -1
  8. package/dist/clientAnnex/index.js.map +1 -1
  9. package/dist/clientAnnex/ladder.d.ts +55 -13
  10. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  11. package/dist/clientAnnex/ladder.js +143 -75
  12. package/dist/clientAnnex/ladder.js.map +1 -1
  13. package/dist/clientAnnex/ladderAnchored.d.ts +7 -58
  14. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
  15. package/dist/clientAnnex/ladderAnchored.js +9 -72
  16. package/dist/clientAnnex/ladderAnchored.js.map +1 -1
  17. package/dist/clientAnnex/log.d.ts +4 -2
  18. package/dist/clientAnnex/log.d.ts.map +1 -1
  19. package/dist/clientAnnex/log.js +12 -2
  20. package/dist/clientAnnex/log.js.map +1 -1
  21. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +53 -17
  22. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
  23. package/dist/clientAnnex/recoveryLadderAnchored.js +52 -24
  24. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
  25. package/dist/clientAnnex/selfEnroll.d.ts +3 -8
  26. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  27. package/dist/clientAnnex/selfEnroll.js +2 -1
  28. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  29. package/dist/recovery/continuation.d.ts +23 -9
  30. package/dist/recovery/continuation.d.ts.map +1 -1
  31. package/dist/recovery/continuation.js +85 -14
  32. package/dist/recovery/continuation.js.map +1 -1
  33. package/dist/recovery/recoveryWebvh.d.ts +17 -4
  34. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  35. package/dist/recovery/recoveryWebvh.js +14 -1
  36. package/dist/recovery/recoveryWebvh.js.map +1 -1
  37. package/dist/sync/contactsConflict.d.ts +9 -9
  38. package/dist/sync/contactsConflict.js +9 -9
  39. package/dist/sync/engine.d.ts +3 -3
  40. package/dist/sync/engine.js +3 -3
  41. package/dist/sync/engine.js.map +1 -1
  42. package/dist/sync/index.d.ts +3 -3
  43. package/dist/sync/index.d.ts.map +1 -1
  44. package/dist/sync/index.js +2 -2
  45. package/dist/sync/pull.d.ts +5 -5
  46. package/dist/sync/pull.js +5 -5
  47. package/dist/sync/push.d.ts +7 -6
  48. package/dist/sync/push.d.ts.map +1 -1
  49. package/dist/sync/push.js +65 -59
  50. package/dist/sync/push.js.map +1 -1
  51. package/dist/sync/remint.d.ts +37 -33
  52. package/dist/sync/remint.d.ts.map +1 -1
  53. package/dist/sync/remint.js +70 -64
  54. package/dist/sync/remint.js.map +1 -1
  55. package/dist/sync/types.d.ts +88 -83
  56. package/dist/sync/types.d.ts.map +1 -1
  57. package/dist/sync/types.js +12 -12
  58. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  59. package/dist/unlock/standingWebvh.js +3 -1
  60. package/dist/unlock/standingWebvh.js.map +1 -1
  61. package/dist/webvh/accountEntry.d.ts +10 -1
  62. package/dist/webvh/accountEntry.d.ts.map +1 -1
  63. package/dist/webvh/accountEntry.js +23 -1
  64. package/dist/webvh/accountEntry.js.map +1 -1
  65. package/dist/webvh/builtOnHead.d.ts +79 -0
  66. package/dist/webvh/builtOnHead.d.ts.map +1 -0
  67. package/dist/webvh/builtOnHead.js +77 -0
  68. package/dist/webvh/builtOnHead.js.map +1 -0
  69. package/dist/webvh/didWebvh.d.ts +14 -6
  70. package/dist/webvh/didWebvh.d.ts.map +1 -1
  71. package/dist/webvh/didWebvh.js +5 -2
  72. package/dist/webvh/didWebvh.js.map +1 -1
  73. package/dist/webvh/enrollClient.d.ts +4 -1
  74. package/dist/webvh/enrollClient.d.ts.map +1 -1
  75. package/dist/webvh/enrollClient.js +38 -8
  76. package/dist/webvh/enrollClient.js.map +1 -1
  77. package/dist/webvh/index.d.ts +2 -0
  78. package/dist/webvh/index.d.ts.map +1 -1
  79. package/dist/webvh/index.js +1 -0
  80. package/dist/webvh/index.js.map +1 -1
  81. package/dist/webvh/revokeClient.d.ts.map +1 -1
  82. package/dist/webvh/revokeClient.js +4 -6
  83. package/dist/webvh/revokeClient.js.map +1 -1
  84. package/dist/webvh/verifyLog.d.ts +5 -1
  85. package/dist/webvh/verifyLog.d.ts.map +1 -1
  86. package/dist/webvh/verifyLog.js +4 -2
  87. package/dist/webvh/verifyLog.js.map +1 -1
  88. package/package.json +1 -1
@@ -19,65 +19,70 @@
19
19
  * create won. At the next sync, provisioning adopts the winner's descriptor
20
20
  * (the create is compare-and-swap, never clobbering), leaving the pending
21
21
  * envelopes sealed under an epoch the published descriptor does not carry;
22
- * pushing them would land feed entries no other replica can route. The
23
- * remedy is {@link remintPendingEnvelopes}, run after adoption and before
24
- * the next push: each pending row the adopted cipher cannot route is
25
- * decrypted through the caller's stale-capable seam and re-encrypted under
26
- * the adopted descriptor's current epoch. This is legal exactly because a
27
- * pending row (dirty, never server-acked) has no feed existence -- envelope
28
- * immutability bites only once an envelope is ON the feed -- and the
29
- * re-encryption may therefore re-key the row (a content-derived id hashes
30
- * the ciphertext, so a re-mint mints a new id).
22
+ * pushing them would land feed entries no other replica can route. The remedy
23
+ * is {@link remintPendingEnvelopes}, run after adoption and before the next
24
+ * push: each pending resource replica the adopted cipher cannot route is
25
+ * decrypted through the caller's stale-capable seam and re-encrypted under the
26
+ * adopted descriptor's current epoch. This is legal exactly because a pending
27
+ * resource replica (dirty, never server-acked) has no feed existence --
28
+ * envelope immutability bites only once an envelope is ON the feed -- and the
29
+ * re-encryption may therefore re-key the resource replica (a content-derived id
30
+ * hashes the ciphertext, so a re-mint mints a new id).
31
31
  */
32
32
  import { isIntegrityError, isUnknownEpochError } from '@interop/was-client/sync';
33
33
  import { log } from '../log.js';
34
34
  /**
35
- * How many full re-mint passes are attempted before giving up. A pass that
36
- * ends with skipped rows (a local write bumped a row's revision between the
37
- * snapshot and the replace) re-snapshots and retries only what is still
38
- * unroutable; the bound keeps a hot-writing row from livelocking the pass.
35
+ * How many full re-mint passes are attempted before giving up. A pass that ends
36
+ * with skipped resource replicas (a local write bumped a resource replica's
37
+ * revision between the snapshot and the replace) re-snapshots and retries only
38
+ * what is still unroutable; the bound keeps a hot-writing resource replica from
39
+ * livelocking the pass.
39
40
  */
40
41
  const MAX_REMINT_ATTEMPTS = 5;
41
42
  /**
42
- * Re-mints every pending (dirty, never-acked, live) row whose envelope the
43
- * given cipher cannot route to an epoch it knows -- the create-loss path for
44
- * an eager minter, run after adopting a published descriptor this client did
45
- * not install itself (`ensureWalletSpaceEpochs` returning an adopted
46
- * descriptor for a collection it had already minted against; the envelope, not
47
- * the `installed` flag, decides per row) and before the next push.
43
+ * Re-mints every pending (dirty, never-acked, live) resource replica whose
44
+ * envelope the given cipher cannot route to an epoch it knows -- the
45
+ * create-loss path for an eager minter, run after adopting a published
46
+ * descriptor this client did not install itself (`ensureWalletSpaceEpochs`
47
+ * returning an adopted descriptor for a collection it had already minted
48
+ * against; the envelope, not the `installed` flag, decides per resource
49
+ * replica) and before the next push.
48
50
  *
49
- * Each such row is decrypted through `decryptStale` (the pre-adoption cipher,
50
- * or a plaintext-projection read keyed by the row id), re-encrypted with
51
- * `cipher` (built from the adopted descriptor, so under its current epoch),
52
- * and handed to {@link SyncStore.replacePending} -- which may re-key the row,
53
- * since the re-mint is a fresh encryption. Rows already readable under the
54
- * adopted descriptor, acked rows (`version > 0` -- they HAVE feed existence
55
- * and are never re-minted), and tombstones are left untouched.
51
+ * Each such resource replica is decrypted through `decryptStale` (the
52
+ * pre-adoption cipher, or a plaintext-projection read keyed by the resource
53
+ * replica id), re-encrypted with `cipher` (built from the adopted descriptor,
54
+ * so under its current epoch), and handed to {@link SyncStore.replacePending}
55
+ * -- which may re-key the resource replica, since the re-mint is a fresh
56
+ * encryption. Resource replicas already readable under the adopted descriptor,
57
+ * acked resource replicas (`version > 0` -- they HAVE feed existence and are
58
+ * never re-minted), and tombstones are left untouched.
56
59
  *
57
60
  * Two decrypt failures are told apart. An unknown epoch is the create-loss
58
- * shape this helper exists for, and the row is re-minted. An addressing
59
- * refusal (was-client's `IntegrityError`: the envelope is sealed for some
60
- * other resource id, the shape a row minted by a pre-addressed writer has) is
61
- * left where it is, logged once, and the pass moves to the next row -- the
62
- * row is not this helper's to settle, and aborting the pass over it would
63
- * strand every other pending row under the losing epoch and block the
64
- * adoption from ever completing. Any other decrypt failure still propagates.
61
+ * shape this helper exists for, and the resource replica is re-minted. An
62
+ * addressing refusal (was-client's `IntegrityError`: the envelope is sealed for
63
+ * some other resource id, the shape a resource replica minted by a
64
+ * pre-addressed writer has) is left where it is, logged once, and the pass
65
+ * moves to the next resource replica -- the resource replica is not this
66
+ * helper's to settle, and aborting the pass over it would strand every other
67
+ * pending resource replica under the losing epoch and block the adoption from
68
+ * ever completing. Any other decrypt failure still propagates.
65
69
  *
66
70
  * A replace the store SKIPS (`{ applied: false }` -- a local write bumped the
67
- * row's revision between the snapshot and the replace, so the row now holds a
68
- * body this pass never saw) is not counted as re-minted: the whole pass
69
- * re-snapshots and re-probes, settling the row under its fresh revision. Only
70
- * rows still unroutable are re-processed; the retry is bounded by
71
- * {@link MAX_REMINT_ATTEMPTS}, and a pass that exhausts the bound throws
72
- * rather than returning -- a row left sealed under the losing epoch MUST NOT
73
- * be pushed, since it would land on the feed as a permanently unroutable
74
- * entry.
71
+ * resource replica's revision between the snapshot and the replace, so the
72
+ * resource replica now holds a body this pass never saw) is not counted as
73
+ * re-minted: the whole pass re-snapshots and re-probes, settling the resource
74
+ * replica under its fresh revision. Only resource replicas still unroutable are
75
+ * re-processed; the retry is bounded by {@link MAX_REMINT_ATTEMPTS}, and a pass
76
+ * that exhausts the bound throws rather than returning -- a resource replica
77
+ * left sealed under the losing epoch MUST NOT be pushed, since it would land on
78
+ * the feed as a permanently unroutable entry.
75
79
  *
76
80
  * The store parameter is narrowed to one that implements `replacePending`
77
81
  * (optional on {@link SyncStore} itself, since a lazy-minting consumer never
78
82
  * re-mints): the requirement is a compile-time one, not a runtime throw.
79
83
  *
80
- * Idempotent: a re-run finds the re-minted rows readable and does nothing.
84
+ * Idempotent: a re-run finds the re-minted resource replicas readable and does
85
+ * nothing.
81
86
  *
82
87
  * @param options {object}
83
88
  * @param options.store {SyncStore} must implement `replacePending`
@@ -85,45 +90,46 @@ const MAX_REMINT_ATTEMPTS = 5;
85
90
  * descriptor
86
91
  * @param options.decryptStale {function} opens envelopes minted before the
87
92
  * adoption; receives `{ id, envelope }` so a projection-backed caller can
88
- * look the plaintext up by row id instead of decrypting
89
- * @param [options.signal] {AbortSignal} checked between rows
93
+ * look the plaintext up by resource replica id instead of decrypting
94
+ * @param [options.signal] {AbortSignal} checked between resource replicas
90
95
  * @returns {Promise<{ pending: number; reminted: number }>} pending live
91
- * rows the first pass scanned, and how many rows were re-minted (applied
92
- * replaces only, across all passes)
96
+ * resource replicas the first pass scanned, and how many were re-minted
97
+ * (applied replaces only, across all passes)
93
98
  */
94
99
  export async function remintPendingEnvelopes({ store, cipher, decryptStale, signal }) {
95
100
  let pending;
96
101
  let reminted = 0;
97
102
  let skipped = [];
98
- // Rows the cipher refused as sealed for another resource id. The refusal is
99
- // deterministic over the same envelope, so a later attempt's pass skips such
100
- // a row instead of paying for the decrypt (and warning) again.
103
+ // Resource replicas the cipher refused as sealed for another resource id. The
104
+ // refusal is deterministic over the same envelope, so a later attempt's pass
105
+ // skips such a resource replica instead of paying for the decrypt (and
106
+ // warning) again.
101
107
  const misaddressed = new Set();
102
108
  for (let attempt = 0; attempt < MAX_REMINT_ATTEMPTS; attempt += 1) {
103
109
  if (signal?.aborted) {
104
110
  break;
105
111
  }
106
- const rows = await store.getDirtyRows();
107
- const pendingRows = rows.filter(row => !row.deleted && row.version === 0 && row.data !== null);
108
- pending ??= pendingRows.length;
112
+ const replicas = await store.getDirtyResourceReplicas();
113
+ const pendingReplicas = replicas.filter(replica => !replica.deleted && replica.version === 0 && replica.data !== null);
114
+ pending ??= pendingReplicas.length;
109
115
  skipped = [];
110
- for (const row of pendingRows) {
116
+ for (const replica of pendingReplicas) {
111
117
  if (signal?.aborted) {
112
118
  break;
113
119
  }
114
- if (misaddressed.has(row.id)) {
120
+ if (misaddressed.has(replica.id)) {
115
121
  continue;
116
122
  }
117
- const envelope = row.data;
123
+ const envelope = replica.data;
118
124
  try {
119
- await cipher.decrypt({ id: row.id, envelope });
125
+ await cipher.decrypt({ id: replica.id, envelope });
120
126
  continue;
121
127
  }
122
128
  catch (err) {
123
129
  if (isIntegrityError(err)) {
124
- misaddressed.add(row.id);
125
- log.warn('Leaving a pending row sealed for another resource id', {
126
- id: row.id,
130
+ misaddressed.add(replica.id);
131
+ log.warn('Leaving a pending resource replica sealed for another resource id', {
132
+ id: replica.id,
127
133
  err
128
134
  });
129
135
  continue;
@@ -132,21 +138,21 @@ export async function remintPendingEnvelopes({ store, cipher, decryptStale, sign
132
138
  throw err;
133
139
  }
134
140
  }
135
- const payload = await decryptStale({ id: row.id, envelope });
141
+ const payload = await decryptStale({ id: replica.id, envelope });
136
142
  const { id: newId, envelope: remintedEnvelope } = await cipher.encrypt({
137
143
  data: payload
138
144
  });
139
145
  const { applied } = await store.replacePending({
140
- id: row.id,
146
+ id: replica.id,
141
147
  newId,
142
148
  envelope: remintedEnvelope,
143
- ...(row.revision !== undefined && { revision: row.revision })
149
+ ...(replica.revision !== undefined && { revision: replica.revision })
144
150
  });
145
151
  if (applied) {
146
152
  reminted += 1;
147
153
  }
148
154
  else {
149
- skipped.push(row.id);
155
+ skipped.push(replica.id);
150
156
  }
151
157
  }
152
158
  if (skipped.length === 0 || signal?.aborted) {
@@ -155,7 +161,7 @@ export async function remintPendingEnvelopes({ store, cipher, decryptStale, sign
155
161
  }
156
162
  if (skipped.length > 0 && !signal?.aborted) {
157
163
  throw new Error(`Re-mint gave up after ${MAX_REMINT_ATTEMPTS} attempts: pending ` +
158
- `row(s) ${skipped.join(', ')} kept being rewritten locally and are ` +
164
+ `resource replica(s) ${skipped.join(', ')} kept being rewritten locally and are ` +
159
165
  'still sealed under an epoch the adopted descriptor does not carry. ' +
160
166
  'They must not be pushed; re-run the re-mint once local writes settle.');
161
167
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remint.js","sourceRoot":"","sources":["../../src/sync/remint.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEhF,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAG/B;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EAQP;IACC,IAAI,OAA2B,CAAA;IAC/B,IAAI,QAAQ,GAAG,CAAC,CAAA;IAChB,IAAI,OAAO,GAAa,EAAE,CAAA;IAC1B,4EAA4E;IAC5E,6EAA6E;IAC7E,+DAA+D;IAC/D,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAA;IAEtC,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,mBAAmB,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QAClE,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,MAAK;QACP,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,YAA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,EAAE,CAAC;YAC5C,MAAK;QACP,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CACb,yBAAyB,mBAAmB,qBAAqB;YAC/D,uBAAuB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,wCAAwC;YACjF,qEAAqE;YACrE,uEAAuE,CAC1E,CAAA;IACH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAA;AAC5C,CAAC"}
@@ -10,21 +10,21 @@
10
10
  * signals) come from `@interop/was-client/sync` and are re-exported here so a
11
11
  * single import gives a consumer both the wire types and the replica-side
12
12
  * seams. The predicates that CLASSIFY those signals ship from
13
- * `@interop/was-client/sync` too, beside the classes that assign the names
14
- * they match; `push.ts` and `remint.ts` import them from there.
13
+ * `@interop/was-client/sync` too, beside the classes that assign the names they
14
+ * match; `push.ts` and `remint.ts` import them from there.
15
15
  *
16
- * The server's `ETag` is opaque (it embeds a per-record generation marker
17
- * ahead of the content `version`, so it can no longer be rebuilt from a bare
18
- * revision number). `MasterState.etag` / `WireDoc.etag` / `WriteAck.etag`
19
- * carry it verbatim; a store that persists synced rows MUST keep the string
16
+ * The server's `ETag` is opaque (it embeds a per-record generation marker ahead
17
+ * of the content `version`, so it can no longer be rebuilt from a bare revision
18
+ * number). `MasterState.etag` / `WireDoc.etag` / `WriteAck.etag` carry it
19
+ * verbatim; a store that persists resource replicas MUST keep the string
20
20
  * alongside `version` and echo it back as a later write's `ifMatch`.
21
21
  *
22
- * The local-persistence seam (`SyncStore`, `SyncedRow`, `ProjectionAction`,
23
- * `ResolveConflict`) is the replica's side of the contract: it stands in for a
24
- * concrete store (an RxDB collection, a SQLite `synced_docs` / `sync_checkpoints`
25
- * table pair, or an in-memory test double). The engine owns the `DocCipher` and
26
- * decrypts OUTSIDE the store transaction, so these methods never see key
27
- * material.
22
+ * The local-persistence seam (`SyncStore`, `SyncedResourceReplica`,
23
+ * `ProjectionAction`, `ResolveConflict`) is the replica's side of the contract:
24
+ * it stands in for a concrete store (an RxDB collection, a SQLite `synced_docs`
25
+ * / `sync_checkpoints` table pair, or an in-memory test double). The engine
26
+ * owns the `DocCipher` and decrypts OUTSIDE the store transaction, so these
27
+ * methods never see key material.
28
28
  *
29
29
  * This module (and `pull.ts` / `push.ts` / `engine.ts`) has no runtime imports
30
30
  * beyond the wire contract, so the engine runs anywhere: browser, Node, or React
@@ -34,23 +34,25 @@ export { UnknownEpochError, WasSyncConflictError, WasSyncNotFoundError } from '@
34
34
  export type { Json, SyncCheckpoint, WireDoc, MasterState, WriteAck, WasSyncPort, DocCipher } from '@interop/was-client/sync';
35
35
  import type { Json, MasterState, SyncCheckpoint, WireDoc } from '@interop/was-client/sync';
36
36
  /**
37
- * A dirty local synced-docs row awaiting push. `data` is the stored body (the
38
- * EDV envelope on an encrypted collection, or the plaintext JSON on a plaintext
39
- * one), `null` for a tombstone. `version` is the last server-acked content
40
- * revision (`0` = never acked, so a create); `etag` is the opaque `ETag`
41
- * validator that revision was acked (or pulled) under, echoed back verbatim as
42
- * a later write's `ifMatch` -- absent when the row has never been acked, or
43
- * against a backend that does not version resources.
37
+ * A dirty resource replica awaiting push: the replica's local copy of one WAS
38
+ * Resource. `data` is the stored body (the EDV envelope on an encrypted
39
+ * collection, or the plaintext JSON on a plaintext one), `null` for a
40
+ * tombstone. `version` is the last server-acked content revision (`0` = never
41
+ * acked, so a create); `etag` is the opaque `ETag` validator that revision was
42
+ * acked (or pulled) under, echoed back verbatim as a later write's `ifMatch` --
43
+ * absent when the resource replica has never been acked, or against a backend
44
+ * that does not version resources.
44
45
  *
45
- * `revision` is the store's own local revision token for the row: any opaque
46
- * value the store bumps on EVERY local write (a counter, a hash of the stored
47
- * body, an RxDB `_rev`). The push loop carries it back through
46
+ * `revision` is the store's own local revision token for the resource replica:
47
+ * any opaque value the store bumps on EVERY local write (a counter, a hash of
48
+ * the stored body, an RxDB `_rev`). The push loop carries it back through
48
49
  * {@link SyncStore.markPushed} / {@link SyncStore.markDeletedPushed} so the ack
49
50
  * can be made conditional -- a local write that lands while the HTTP write is
50
- * in flight leaves a different token behind and keeps the row dirty. A store
51
- * that omits it opts out of that protection and is acked unconditionally.
51
+ * in flight leaves a different token behind and keeps the resource replica
52
+ * dirty. A store that omits it opts out of that protection and is acked
53
+ * unconditionally.
52
54
  */
53
- export interface SyncedRow {
55
+ export interface SyncedResourceReplica {
54
56
  id: string;
55
57
  version: number;
56
58
  etag?: string;
@@ -78,15 +80,17 @@ export type ProjectionAction = {
78
80
  kind: 'none';
79
81
  };
80
82
  /**
81
- * The per-row 412-conflict policy for a mutable (last-write-wins) collection,
82
- * injected into the push loop. Insert-only content-addressed collections leave
83
+ * The per-resource 412-conflict policy for a mutable (last-write-wins)
84
+ * collection, injected into the push loop. Insert-only content-addressed collections leave
83
85
  * it undefined: their settlement rules -- identical-envelope adoption and
84
86
  * tombstone-wins -- already cover every 412. For a mutable head document the
85
87
  * resolver re-reads the master, decides the winner deterministically, and either
86
88
  * applies the remote payload or re-encrypts the local one for the next push.
87
- * Bound to a profile's cipher + store by the caller; opaque to the push loop.
89
+ * `local` is the conflicting local resource replica; the resolver reads the
90
+ * remote side itself. Bound to a profile's cipher + store by the caller;
91
+ * opaque to the push loop.
88
92
  */
89
- export type ResolveConflict = (row: {
93
+ export type ResolveConflict = (local: {
90
94
  id: string;
91
95
  version: number;
92
96
  data: Json | null;
@@ -104,17 +108,17 @@ export interface SyncStore {
104
108
  */
105
109
  getCheckpoint(): Promise<SyncCheckpoint | undefined>;
106
110
  /**
107
- * All rows awaiting push (dirty).
111
+ * All resource replicas awaiting push (dirty).
108
112
  */
109
- getDirtyRows(): Promise<SyncedRow[]>;
113
+ getDirtyResourceReplicas(): Promise<SyncedResourceReplica[]>;
110
114
  /**
111
115
  * Applies one pulled page in a single exclusive transaction: reconcile each
112
- * document against the local row (per the pull-apply conflict table), write
113
- * the matching projection action, and advance the checkpoint. `projections`
114
- * is keyed by document id. Each document's `etag` (and `metaEtag`, on a
115
- * collection that syncs metadata) MUST be recorded onto its row alongside
116
- * `version` -- it is the validator a later local write echoes back as
117
- * `ifMatch`.
116
+ * document against its local resource replica (per the pull-apply conflict
117
+ * table), write the matching projection action, and advance the checkpoint.
118
+ * `projections` is keyed by document id. Each document's `etag` (and
119
+ * `metaEtag`, on a collection that syncs metadata) MUST be recorded onto its
120
+ * resource replica alongside `version` -- it is the validator a later local
121
+ * write echoes back as `ifMatch`.
118
122
  */
119
123
  applyPulledPage(options: {
120
124
  documents: WireDoc[];
@@ -124,13 +128,13 @@ export interface SyncStore {
124
128
  /**
125
129
  * Marks a pushed create/update as acked: record the server `version` and the
126
130
  * opaque `etag` validator it lives behind (the write's {@link WriteAck}) when
127
- * provided, and clear dirty -- but ONLY if the row's current
128
- * {@link SyncedRow.revision} still equals the `revision` that was pushed. A
129
- * local write that landed while the write was in flight leaves a newer token,
130
- * and that row MUST stay dirty (with the acked `version` / `etag` still
131
- * recorded, so the re-push's `ifMatch` is current) so the rerun cycle pushes
132
- * it. When `revision` is `undefined` -- a store that does not track a
133
- * revision token -- dirty is cleared unconditionally.
131
+ * provided, and clear dirty -- but ONLY if the resource replica's current
132
+ * {@link SyncedResourceReplica.revision} still equals the `revision` that was
133
+ * pushed. A local write that landed while the write was in flight leaves a
134
+ * newer token, and that resource replica MUST stay dirty (with the acked
135
+ * `version` / `etag` still recorded, so the re-push's `ifMatch` is current)
136
+ * so the rerun cycle pushes it. When `revision` is `undefined` -- a store
137
+ * that does not track a revision token -- dirty is cleared unconditionally.
134
138
  */
135
139
  markPushed(options: {
136
140
  id: string;
@@ -141,9 +145,9 @@ export interface SyncStore {
141
145
  /**
142
146
  * Marks a pushed delete as settled: keep the tombstone, record the server
143
147
  * `version` / `etag` when provided, and clear dirty under the same revision
144
- * condition as {@link SyncStore.markPushed} -- a row rewritten locally
145
- * mid-flight stays dirty and keeps its local state rather than being forced
146
- * to a clean tombstone.
148
+ * condition as {@link SyncStore.markPushed} -- a resource replica rewritten
149
+ * locally mid-flight stays dirty and keeps its local state rather than being
150
+ * forced to a clean tombstone.
147
151
  */
148
152
  markDeletedPushed(options: {
149
153
  id: string;
@@ -153,12 +157,13 @@ export interface SyncStore {
153
157
  }): Promise<void>;
154
158
  /**
155
159
  * Adopts the server's latest state (its {@link MasterState}, in the wire
156
- * contract's RxDB-derived naming) for a row whose push hit a `412`, applying
157
- * `projection` in the same transaction. `latest === null` means the server
158
- * has a tombstone (or the resource is absent): record the tombstone and
159
- * delete the projection. A non-null `latest` carries its own `etag`, which
160
- * the store MUST record onto the row alongside `version` -- it is the
161
- * validator the row's next push echoes back as `ifMatch`.
160
+ * contract's RxDB-derived naming) for a resource replica whose push hit a
161
+ * `412`, applying `projection` in the same transaction. `latest === null`
162
+ * means the server has a tombstone (or the resource is absent): record the
163
+ * tombstone and delete the projection. A non-null `latest` carries its own
164
+ * `etag`, which the store MUST record onto the resource replica alongside
165
+ * `version` -- it is the validator the resource replica's next push echoes
166
+ * back as `ifMatch`.
162
167
  */
163
168
  adoptLatest(options: {
164
169
  id: string;
@@ -167,16 +172,16 @@ export interface SyncStore {
167
172
  }): Promise<void>;
168
173
  /**
169
174
  * Which of these feed revisions does the replica already hold? Answers with
170
- * the ids whose local row records exactly that `etag` as its validator (the
171
- * one a push ack or an earlier pull recorded). The pull loop asks it only
172
- * about live feed documents carrying the engine's own `writerId`, and skips
173
- * the decrypt of each confirmed one, applying it with a `none` projection
174
- * (see `pull.ts`). The label is host-visible plaintext, so the skip also
175
- * requires the `etag` match. That match limits the skip to a revision the
176
- * replica already records. It does not authenticate the label or the
177
- * envelope, since the `etag` is host-supplied too. A host that replays an
178
- * older envelope under the current `etag` gets the local projection left
179
- * as it was, where a decrypt would have rolled it back.
175
+ * the ids whose local resource replica records exactly that `etag` as its
176
+ * validator (the one a push ack or an earlier pull recorded). The pull loop
177
+ * asks it only about live feed documents carrying the engine's own
178
+ * `writerId`, and skips the decrypt of each confirmed one, applying it with a
179
+ * `none` projection (see `pull.ts`). The label is host-visible plaintext, so
180
+ * the skip also requires the `etag` match. That match limits the skip to a
181
+ * revision the replica already records. It does not authenticate the label or
182
+ * the envelope, since the `etag` is host-supplied too. A host that replays an
183
+ * older envelope under the current `etag` gets the local projection left as
184
+ * it was, where a decrypt would have rolled it back.
180
185
  *
181
186
  * Optional: a store that omits it turns echo suppression off, and every
182
187
  * echo is decrypted as before.
@@ -188,30 +193,30 @@ export interface SyncStore {
188
193
  }[];
189
194
  }): Promise<Set<string>>;
190
195
  /**
191
- * Replaces the body of a pending row (dirty, never-acked, live -- no feed
192
- * existence) with a re-minted envelope, re-keying the row from `id` to
196
+ * Replaces the body of a pending resource replica (dirty, never-acked, live
197
+ * -- no feed existence) with a re-minted envelope, re-keying it from `id` to
193
198
  * `newId` when the fresh encryption minted a different resource id, all in
194
- * ONE transaction: the row keeps `version 0` and stays dirty, and whatever
195
- * links the plaintext projection / app row to the synced row moves to
196
- * `newId` with it. Under the same revision condition as
197
- * {@link SyncStore.markPushed}: when `revision` is provided and the row's
198
- * current token differs (a local write landed mid-re-mint), the replace is
199
- * skipped -- the newer state stays as-is for the next pass.
199
+ * ONE transaction: the resource replica keeps `version 0` and stays dirty,
200
+ * and whatever links the plaintext projection / app row to the resource
201
+ * replica moves to `newId` with it. Under the same revision condition as
202
+ * {@link SyncStore.markPushed}: when `revision` is provided and the resource
203
+ * replica's current token differs (a local write landed mid-re-mint), the
204
+ * replace is skipped -- the newer state stays as-is for the next pass.
200
205
  *
201
206
  * The outcome MUST be reported: resolve with `{ applied: true }` when the
202
- * row's body was replaced, and `{ applied: false }` when the revision
203
- * condition skipped it. A skip is not a failure, but it leaves a row still
204
- * sealed under an epoch the published descriptor does not carry, and the
205
- * caller (`remintPendingEnvelopes`) re-probes and retries it rather than
206
- * counting it as re-minted -- a silently skipped row would otherwise be
207
- * pushed to the feed as a permanently unroutable entry. A store that does
208
- * not track a revision token replaces unconditionally and always reports
209
- * `{ applied: true }`.
207
+ * resource replica's body was replaced, and `{ applied: false }` when the
208
+ * revision condition skipped it. A skip is not a failure, but it leaves a
209
+ * resource replica still sealed under an epoch the published descriptor does
210
+ * not carry, and the caller (`remintPendingEnvelopes`) re-probes and retries
211
+ * it rather than counting it as re-minted -- a silently skipped resource
212
+ * replica would otherwise be pushed to the feed as a permanently unroutable
213
+ * entry. A store that does not track a revision token replaces
214
+ * unconditionally and always reports `{ applied: true }`.
210
215
  *
211
- * Optional: only an eager-minting replica (one that mints envelopes at
212
- * local write time against a cached descriptor) needs it, for the
213
- * create-loss re-mint (`remintPendingEnvelopes`). A replica that mints
214
- * lazily in the engine's migration sweep never re-mints and may omit it.
216
+ * Optional: only an eager-minting replica (one that mints envelopes at local
217
+ * write time against a cached descriptor) needs it, for the create-loss
218
+ * re-mint (`remintPendingEnvelopes`). A replica that mints lazily in the
219
+ * engine's migration sweep never re-mints and may omit it.
215
220
  */
216
221
  replacePending?(options: {
217
222
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,WAAW,EACX,QAAQ,EACR,WAAW,EACX,SAAS,EACV,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EACV,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,EACR,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,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AAC,CAAA;CAClC"}
@@ -10,21 +10,21 @@
10
10
  * signals) come from `@interop/was-client/sync` and are re-exported here so a
11
11
  * single import gives a consumer both the wire types and the replica-side
12
12
  * seams. The predicates that CLASSIFY those signals ship from
13
- * `@interop/was-client/sync` too, beside the classes that assign the names
14
- * they match; `push.ts` and `remint.ts` import them from there.
13
+ * `@interop/was-client/sync` too, beside the classes that assign the names they
14
+ * match; `push.ts` and `remint.ts` import them from there.
15
15
  *
16
- * The server's `ETag` is opaque (it embeds a per-record generation marker
17
- * ahead of the content `version`, so it can no longer be rebuilt from a bare
18
- * revision number). `MasterState.etag` / `WireDoc.etag` / `WriteAck.etag`
19
- * carry it verbatim; a store that persists synced rows MUST keep the string
16
+ * The server's `ETag` is opaque (it embeds a per-record generation marker ahead
17
+ * of the content `version`, so it can no longer be rebuilt from a bare revision
18
+ * number). `MasterState.etag` / `WireDoc.etag` / `WriteAck.etag` carry it
19
+ * verbatim; a store that persists resource replicas MUST keep the string
20
20
  * alongside `version` and echo it back as a later write's `ifMatch`.
21
21
  *
22
- * The local-persistence seam (`SyncStore`, `SyncedRow`, `ProjectionAction`,
23
- * `ResolveConflict`) is the replica's side of the contract: it stands in for a
24
- * concrete store (an RxDB collection, a SQLite `synced_docs` / `sync_checkpoints`
25
- * table pair, or an in-memory test double). The engine owns the `DocCipher` and
26
- * decrypts OUTSIDE the store transaction, so these methods never see key
27
- * material.
22
+ * The local-persistence seam (`SyncStore`, `SyncedResourceReplica`,
23
+ * `ProjectionAction`, `ResolveConflict`) is the replica's side of the contract:
24
+ * it stands in for a concrete store (an RxDB collection, a SQLite `synced_docs`
25
+ * / `sync_checkpoints` table pair, or an in-memory test double). The engine
26
+ * owns the `DocCipher` and decrypts OUTSIDE the store transaction, so these
27
+ * methods never see key material.
28
28
  *
29
29
  * This module (and `pull.ts` / `push.ts` / `engine.ts`) has no runtime imports
30
30
  * beyond the wire contract, so the engine runs anywhere: browser, Node, or React
@@ -1 +1 @@
1
- {"version":3,"file":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IAC9C,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,gBAAgB,CAAA;IACxB,UAAU,EAAE,kBAAkB,CAAA;IAC9B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IAC7B,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,gBAAgB,CAAA;IACxB,eAAe,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,GAAG,eAAe,CAAC,CAAA;IAC1E,UAAU,EAAE,kBAAkB,CAAA;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,qBAAqB,CAAA;CAChC,CAAC,CAID"}
@@ -264,7 +264,9 @@ export async function attributeUnlockLadderInventory({ log, did, unlockKeys, lad
264
264
  * that ambiguity; the other two are held to the protection over what it
265
265
  * could attribute and otherwise proceed, since such a client is a
266
266
  * legitimate torn-enrollment residue (an add entry that revealed the
267
- * approving rung and the new client's key together) and refusing every
267
+ * approving rung and the new client's key together, which only a log
268
+ * written before the ladder-arm approval revealed a committed rung in an
269
+ * entry of its own can carry) and refusing every
268
270
  * retirement on the account for it would leave no way out.
269
271
  *
270
272
  * @param options {object}