@cero-base/core 1.6.0 → 1.7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cero-base/core",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "cero p2p primitives — identity, storage, network, database, blobs, rpc, pairing.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -145,7 +145,7 @@
145
145
  "dependencies": {
146
146
  "@hyperswarm/secret-stream": "^6.9.1",
147
147
  "autobee": "1.0.10",
148
- "autobee-encryption": "0.1.2",
148
+ "autobee-encryption": "0.1.3",
149
149
  "b4a": "^1.8.1",
150
150
  "bare-crypto": "^1.15.3",
151
151
  "bare-fs": "^4.7.4",
@@ -184,7 +184,8 @@
184
184
  "bare-url": "^2.4.6",
185
185
  "blind-peer": "^3.12.3",
186
186
  "brittle": "^4.1.0",
187
- "typescript": "^5.9.3"
187
+ "typescript": "^5.9.3",
188
+ "which-runtime": "^1.4.0"
188
189
  },
189
190
  "license": "Apache-2.0"
190
191
  }
@@ -30,7 +30,10 @@ export function blobEpochKey(entropy) {
30
30
  // (ActiveWriters.add, lib/writers.js) news the class directly — no factory to
31
31
  // override. The only injection point that covers every remote writer core is
32
32
  // the provider base class itself, so the epoch awareness is patched onto the
33
- // pinned autobee-encryption prototype: epoch 0 keeps the upstream
33
+ // autobee-encryption prototype. The pin MUST stay on the version autobee's own
34
+ // range resolves to — pin them apart and npm installs two copies, autobee uses
35
+ // the unpatched one, and every rotation silently writes epoch-0 blocks that a
36
+ // removed member can still read. Epoch 0 keeps the upstream
34
37
  // GENESIS_ENTROPY derivation byte-for-byte; epoch n derives from the
35
38
  // keyring's entropy. Without a keyring (auto.keyring unset) behavior is
36
39
  // identical to upstream. Removable once autobee accepts a provider factory.
@@ -219,6 +219,10 @@ export class Database extends ReadyResource {
219
219
  await this._loadEpochs()
220
220
 
221
221
  bee.on('writable', () => this.emit('writable'))
222
+ // the falling edge: this device's writer was removed (or its member was).
223
+ // Apps need it to freeze a UI the moment access ends, rather than
224
+ // discovering it from a failed write or by scanning `members`.
225
+ bee.on('unwritable', () => this.emit('unwritable'))
222
226
  // without a listener autobee escalates apply/view errors to a process crash
223
227
  bee.on('error', this._onerror)
224
228