@serfab/cadre-core 1.21.0 → 1.23.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/README.md +294 -294
- package/dist/cadre-node.d.ts +334 -53
- package/dist/cadre-node.js +794 -85
- package/dist/cadre-node.js.map +1 -1
- package/dist/control-authorization.d.ts +32 -2
- package/dist/control-authorization.js +19 -0
- package/dist/control-authorization.js.map +1 -1
- package/dist/control-database.d.ts +236 -23
- package/dist/control-database.js +587 -173
- package/dist/control-database.js.map +1 -1
- package/dist/control-schema.d.ts +3 -3
- package/dist/control-schema.js +71 -7
- package/dist/control-schema.js.map +1 -1
- package/dist/ed25519-key.d.ts +8 -0
- package/dist/ed25519-key.js +11 -1
- package/dist/ed25519-key.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/machine-removal.d.ts +51 -1
- package/dist/machine-removal.js +42 -1
- package/dist/machine-removal.js.map +1 -1
- package/dist/membership-connection-gater.d.ts +8 -0
- package/dist/membership-connection-gater.js +13 -1
- package/dist/membership-connection-gater.js.map +1 -1
- package/dist/membership-view.js +4 -1
- package/dist/membership-view.js.map +1 -1
- package/dist/owner-keys.js +2 -1
- package/dist/owner-keys.js.map +1 -1
- package/dist/owner-signer.js +3 -4
- package/dist/owner-signer.js.map +1 -1
- package/dist/peer-authorization.d.ts +14 -2
- package/dist/peer-authorization.js +24 -1
- package/dist/peer-authorization.js.map +1 -1
- package/dist/sealed-party-key.d.ts +32 -0
- package/dist/sealed-party-key.js +162 -0
- package/dist/sealed-party-key.js.map +1 -0
- package/dist/seed-bootstrap.d.ts +10 -3
- package/dist/seed-bootstrap.js +12 -0
- package/dist/seed-bootstrap.js.map +1 -1
- package/dist/strand-addr-protocol.d.ts +56 -6
- package/dist/strand-addr-protocol.js +57 -5
- package/dist/strand-addr-protocol.js.map +1 -1
- package/dist/strand-commit-durability.d.ts +33 -2
- package/dist/strand-commit-durability.js +44 -4
- package/dist/strand-commit-durability.js.map +1 -1
- package/dist/strand-database.d.ts +35 -5
- package/dist/strand-database.js +34 -10
- package/dist/strand-database.js.map +1 -1
- package/dist/strand-instance-manager.d.ts +200 -18
- package/dist/strand-instance-manager.js +434 -64
- package/dist/strand-instance-manager.js.map +1 -1
- package/dist/strand-membership-reconciler.d.ts +250 -51
- package/dist/strand-membership-reconciler.js +410 -66
- package/dist/strand-membership-reconciler.js.map +1 -1
- package/dist/strand-membership-writer.d.ts +7 -0
- package/dist/strand-membership-writer.js +9 -0
- package/dist/strand-membership-writer.js.map +1 -1
- package/dist/strand-party-key-rotation.d.ts +177 -0
- package/dist/strand-party-key-rotation.js +340 -0
- package/dist/strand-party-key-rotation.js.map +1 -0
- package/dist/strand-party-machines.d.ts +111 -0
- package/dist/strand-party-machines.js +258 -0
- package/dist/strand-party-machines.js.map +1 -0
- package/dist/strand-party-peers.d.ts +101 -0
- package/dist/strand-party-peers.js +49 -0
- package/dist/strand-party-peers.js.map +1 -0
- package/dist/strand-peer-redial.d.ts +34 -7
- package/dist/strand-peer-redial.js +46 -13
- package/dist/strand-peer-redial.js.map +1 -1
- package/dist/strand-revocation-enforcer.d.ts +15 -1
- package/dist/strand-revocation-enforcer.js +16 -9
- package/dist/strand-revocation-enforcer.js.map +1 -1
- package/dist/strand-transport-key.js +3 -0
- package/dist/strand-transport-key.js.map +1 -1
- package/dist/strand-watcher.d.ts +7 -4
- package/dist/strand-watcher.js +12 -7
- package/dist/strand-watcher.js.map +1 -1
- package/dist/types.d.ts +169 -13
- package/dist/types.js.map +1 -1
- package/package.json +9 -8
- package/src/cadre-node.ts +12280 -11528
- package/src/control-authorization.ts +41 -1
- package/src/control-database.ts +6123 -5603
- package/src/control-schema.ts +71 -7
- package/src/ed25519-key.ts +12 -1
- package/src/index.ts +957 -924
- package/src/machine-removal.ts +80 -1
- package/src/membership-connection-gater.ts +13 -1
- package/src/membership-view.ts +4 -1
- package/src/owner-keys.ts +2 -1
- package/src/owner-signer.ts +92 -94
- package/src/peer-authorization.ts +27 -3
- package/src/sealed-party-key.ts +190 -0
- package/src/seed-bootstrap.ts +17 -3
- package/src/strand-addr-protocol.ts +67 -6
- package/src/strand-commit-durability.ts +54 -5
- package/src/strand-database.ts +47 -11
- package/src/strand-instance-manager.ts +524 -65
- package/src/strand-membership-reconciler.ts +1310 -942
- package/src/strand-membership-writer.ts +10 -0
- package/src/strand-party-key-rotation.ts +436 -0
- package/src/strand-party-machines.ts +293 -0
- package/src/strand-party-peers.ts +129 -0
- package/src/strand-peer-redial.ts +61 -14
- package/src/strand-revocation-enforcer.ts +27 -9
- package/src/strand-transport-key.ts +3 -0
- package/src/strand-watcher.ts +12 -7
- package/src/types.ts +3121 -2963
package/src/strand-watcher.ts
CHANGED
|
@@ -16,8 +16,10 @@ type FilterDecision = 'pass' | 'reject' | 'defer';
|
|
|
16
16
|
/**
|
|
17
17
|
* Ceiling on the retry delay for a strand whose launch keeps failing. Attempts
|
|
18
18
|
* are never abandoned — the failure this backoff exists for (a transient network
|
|
19
|
-
* or storage fault) can last a long time — but a
|
|
20
|
-
*
|
|
19
|
+
* or storage fault) can last a long time — but a strand that keeps failing must
|
|
20
|
+
* not re-attempt on every run and storm the host app with `strand:error`. A launch
|
|
21
|
+
* that can never succeed is not retried at all: the host suppresses it instead
|
|
22
|
+
* (see {@link StrandWatcher.suppressStrand}).
|
|
21
23
|
*/
|
|
22
24
|
const MAX_RETRY_BACKOFF_MS = 5 * 60 * 1000;
|
|
23
25
|
|
|
@@ -454,11 +456,14 @@ export class StrandWatcher {
|
|
|
454
456
|
}
|
|
455
457
|
|
|
456
458
|
/**
|
|
457
|
-
* Never offer this strand again this session.
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
* (`CadreNode.handleStrandAdded`),
|
|
459
|
+
* Never offer this strand again this session. Callers all mean "the retry ladder
|
|
460
|
+
* cannot help here": a deliberate local stop, and a launch that can never succeed as
|
|
461
|
+
* configured — a strand whose id is unusable as a storage scope key
|
|
462
|
+
* (`CadreNode.handleStrandAdded`), or one whose app schema can never apply to the
|
|
463
|
+
* tables it holds (`AppSchemaRefusedError`, from either `CadreNode.handleStrandAdded`
|
|
464
|
+
* or `CadreNode.addStrand`), which every later attempt would reject identically.
|
|
461
465
|
* A launch that merely FAILED is not one of them; that goes to {@link forgetStrand}.
|
|
466
|
+
* The caller logs its reason.
|
|
462
467
|
*
|
|
463
468
|
* Cleared when the strand's control row disappears, because a row that reappears is a
|
|
464
469
|
* strand the party re-published and the stop said nothing about it; also cleared by
|
|
@@ -466,7 +471,7 @@ export class StrandWatcher {
|
|
|
466
471
|
* {@link unsuppressStrand} when the caller claims the strand again.
|
|
467
472
|
*/
|
|
468
473
|
suppressStrand(strandId: string): void {
|
|
469
|
-
log('Suppressing strand %s —
|
|
474
|
+
log('Suppressing strand %s — will not be re-offered until it is claimed again or its row is removed', strandId);
|
|
470
475
|
this.suppressed.add(strandId);
|
|
471
476
|
}
|
|
472
477
|
|