@klum-db/lobby 0.2.0-pre.28 → 0.2.0-pre.29
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 +4 -4
- package/dist/bin/klum.d.cts +1 -1
- package/dist/bin/klum.d.ts +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/{vault-group-DeBoCFT9.d.cts → vault-group-BXjO5kHB.d.cts} +14 -14
- package/dist/{vault-group-DeBoCFT9.d.ts → vault-group-BXjO5kHB.d.ts} +14 -14
- package/package.json +1 -1
|
@@ -204,15 +204,15 @@ interface VaultGroupOptions<T> {
|
|
|
204
204
|
readonly registry?: Collection<VaultRegistryRow>;
|
|
205
205
|
readonly sharding: ShardingConfig<T>;
|
|
206
206
|
/**
|
|
207
|
-
* Lazy
|
|
207
|
+
* Lazy cutover-on-open (#271 fleet migration). When `true`, opening a shard
|
|
208
208
|
* whose registry `schemaVersion` is behind the template's version runs that
|
|
209
|
-
* shard's cutover inline (via `
|
|
210
|
-
* Zero cost for shards never opened. Default `false` (use `
|
|
209
|
+
* shard's cutover inline (via `cutoverShard`) before surfacing the handle.
|
|
210
|
+
* Zero cost for shards never opened. Default `false` (use `rolloutSchema`).
|
|
211
211
|
*/
|
|
212
|
-
readonly
|
|
212
|
+
readonly cutoverOnOpen?: boolean;
|
|
213
213
|
}
|
|
214
|
-
/** Result of `VaultGroup.
|
|
215
|
-
interface
|
|
214
|
+
/** Result of `VaultGroup.rolloutSchema` (#271 active batch runner). */
|
|
215
|
+
interface SchemaRolloutResult {
|
|
216
216
|
/** The version migrated toward (the template's current version). */
|
|
217
217
|
readonly target: number;
|
|
218
218
|
/** vaultIds successfully migrated (or already current). */
|
|
@@ -568,14 +568,14 @@ declare class VaultGroup<T> {
|
|
|
568
568
|
/** @internal */ readonly registry: Collection<VaultRegistryRow>;
|
|
569
569
|
/** @internal */ readonly sharding: ShardingConfig<T>;
|
|
570
570
|
/** @internal */ readonly template: VaultTemplate;
|
|
571
|
-
/** @internal — lazy
|
|
571
|
+
/** @internal — lazy cutover-on-open (#271). */ readonly cutoverOnOpen: boolean;
|
|
572
572
|
constructor(
|
|
573
573
|
/** @internal */ db: Noydb,
|
|
574
574
|
/** @internal */ name: string,
|
|
575
575
|
/** @internal */ registry: Collection<VaultRegistryRow>,
|
|
576
576
|
/** @internal */ sharding: ShardingConfig<T>,
|
|
577
577
|
/** @internal */ template: VaultTemplate,
|
|
578
|
-
/** @internal — lazy
|
|
578
|
+
/** @internal — lazy cutover-on-open (#271). */ cutoverOnOpen?: boolean);
|
|
579
579
|
/** @internal — set when the group is managed (no explicit registry). */
|
|
580
580
|
private stateVault;
|
|
581
581
|
/** @internal */
|
|
@@ -599,12 +599,12 @@ declare class VaultGroup<T> {
|
|
|
599
599
|
*/
|
|
600
600
|
allRows(): Promise<VaultRegistryRow[]>;
|
|
601
601
|
/**
|
|
602
|
-
* Open an existing shard and apply the template. When `
|
|
602
|
+
* Open an existing shard and apply the template. When `cutoverOnOpen` is set
|
|
603
603
|
* (#271) and the shard's registry version is behind the template, its cutover
|
|
604
604
|
* runs inline first — so a behind shard never surfaces a stale handle.
|
|
605
605
|
*/
|
|
606
606
|
openShard(partitionKey: string): Promise<Vault$1>;
|
|
607
|
-
/** @internal — open + configure with no
|
|
607
|
+
/** @internal — open + configure with no cutover-on-open hook (used by the migration path itself to avoid recursion). */
|
|
608
608
|
private _openShardRaw;
|
|
609
609
|
/**
|
|
610
610
|
* Idempotently provision a shard for `partitionKey`. Returns the
|
|
@@ -696,7 +696,7 @@ declare class VaultGroup<T> {
|
|
|
696
696
|
* Never throws on a cutover failure — it records `status: 'failed'` and
|
|
697
697
|
* returns the row, so a fleet run continues past a bad shard.
|
|
698
698
|
*/
|
|
699
|
-
|
|
699
|
+
cutoverShard(partitionKey: string): Promise<MigrationStatusRow>;
|
|
700
700
|
/**
|
|
701
701
|
* Active batch runner (#271): migrate every shard behind the template version
|
|
702
702
|
* to it, in controlled batches. **Resumable + crash-safe** — shards already at
|
|
@@ -708,10 +708,10 @@ declare class VaultGroup<T> {
|
|
|
708
708
|
* - `batchSize` — max shards migrated concurrently per batch (back-pressure).
|
|
709
709
|
* Default 4. Batches run sequentially; shards within a batch run in parallel.
|
|
710
710
|
*/
|
|
711
|
-
|
|
711
|
+
rolloutSchema(options?: {
|
|
712
712
|
cohort?: readonly string[];
|
|
713
713
|
batchSize?: number;
|
|
714
|
-
}): Promise<
|
|
714
|
+
}): Promise<SchemaRolloutResult>;
|
|
715
715
|
}
|
|
716
716
|
declare class ShardedCollection<T, R = T> {
|
|
717
717
|
private readonly group;
|
|
@@ -760,4 +760,4 @@ declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
|
760
760
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
export { ShardedGroupedQuery as A, ShardedQuery as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type ShardingConfig as E, type FanoutQueryOptions as F, type GroupedRow as G, type SurfaceStatus as H, type VaultRegistryRow as I, mergeCompartment as J, mergeDecryptedRecords as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, resolveFieldAuthority as N, resolveRecordByFieldAuthority as O, type RefreshInsightsResult as R, StateManagementVault as S, VaultGroup as V, type VaultTemplate as a, type SkippedVault as b, type MergeReport as c, type SurfaceDirection as d, type SurfaceConflictPolicy as e, type SurfaceRow as f, type VaultGroupOptions as g, CrossVaultAggregation as h, type CrossVaultDerivationContext as i, type CrossVaultDerivationSpec as j, CrossVaultGroupedAggregation as k, type CrossVaultLiveAggregation as l, type CrossVaultLiveQuery as m, type DeploymentEvent as n, type FanoutResult as o, type FieldAuthorityInputs as p, type FieldAuthorityPolicy as q, FieldAuthorityPolicyMissingError as r, type FieldAuthorityRule as s, FieldLevelDeferredError as t, type
|
|
763
|
+
export { ShardedGroupedQuery as A, ShardedQuery as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type ShardingConfig as E, type FanoutQueryOptions as F, type GroupedRow as G, type SurfaceStatus as H, type VaultRegistryRow as I, mergeCompartment as J, mergeDecryptedRecords as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, resolveFieldAuthority as N, resolveRecordByFieldAuthority as O, type RefreshInsightsResult as R, StateManagementVault as S, VaultGroup as V, type VaultTemplate as a, type SkippedVault as b, type MergeReport as c, type SurfaceDirection as d, type SurfaceConflictPolicy as e, type SurfaceRow as f, type VaultGroupOptions as g, CrossVaultAggregation as h, type CrossVaultDerivationContext as i, type CrossVaultDerivationSpec as j, CrossVaultGroupedAggregation as k, type CrossVaultLiveAggregation as l, type CrossVaultLiveQuery as m, type DeploymentEvent as n, type FanoutResult as o, type FieldAuthorityInputs as p, type FieldAuthorityPolicy as q, FieldAuthorityPolicyMissingError as r, type FieldAuthorityRule as s, FieldLevelDeferredError as t, type MergeConflict as u, type MergeStrategy as v, type MigrationStatusRow as w, type SchemaManifestRow as x, type SchemaRolloutResult as y, ShardedCollection as z };
|
|
@@ -204,15 +204,15 @@ interface VaultGroupOptions<T> {
|
|
|
204
204
|
readonly registry?: Collection<VaultRegistryRow>;
|
|
205
205
|
readonly sharding: ShardingConfig<T>;
|
|
206
206
|
/**
|
|
207
|
-
* Lazy
|
|
207
|
+
* Lazy cutover-on-open (#271 fleet migration). When `true`, opening a shard
|
|
208
208
|
* whose registry `schemaVersion` is behind the template's version runs that
|
|
209
|
-
* shard's cutover inline (via `
|
|
210
|
-
* Zero cost for shards never opened. Default `false` (use `
|
|
209
|
+
* shard's cutover inline (via `cutoverShard`) before surfacing the handle.
|
|
210
|
+
* Zero cost for shards never opened. Default `false` (use `rolloutSchema`).
|
|
211
211
|
*/
|
|
212
|
-
readonly
|
|
212
|
+
readonly cutoverOnOpen?: boolean;
|
|
213
213
|
}
|
|
214
|
-
/** Result of `VaultGroup.
|
|
215
|
-
interface
|
|
214
|
+
/** Result of `VaultGroup.rolloutSchema` (#271 active batch runner). */
|
|
215
|
+
interface SchemaRolloutResult {
|
|
216
216
|
/** The version migrated toward (the template's current version). */
|
|
217
217
|
readonly target: number;
|
|
218
218
|
/** vaultIds successfully migrated (or already current). */
|
|
@@ -568,14 +568,14 @@ declare class VaultGroup<T> {
|
|
|
568
568
|
/** @internal */ readonly registry: Collection<VaultRegistryRow>;
|
|
569
569
|
/** @internal */ readonly sharding: ShardingConfig<T>;
|
|
570
570
|
/** @internal */ readonly template: VaultTemplate;
|
|
571
|
-
/** @internal — lazy
|
|
571
|
+
/** @internal — lazy cutover-on-open (#271). */ readonly cutoverOnOpen: boolean;
|
|
572
572
|
constructor(
|
|
573
573
|
/** @internal */ db: Noydb,
|
|
574
574
|
/** @internal */ name: string,
|
|
575
575
|
/** @internal */ registry: Collection<VaultRegistryRow>,
|
|
576
576
|
/** @internal */ sharding: ShardingConfig<T>,
|
|
577
577
|
/** @internal */ template: VaultTemplate,
|
|
578
|
-
/** @internal — lazy
|
|
578
|
+
/** @internal — lazy cutover-on-open (#271). */ cutoverOnOpen?: boolean);
|
|
579
579
|
/** @internal — set when the group is managed (no explicit registry). */
|
|
580
580
|
private stateVault;
|
|
581
581
|
/** @internal */
|
|
@@ -599,12 +599,12 @@ declare class VaultGroup<T> {
|
|
|
599
599
|
*/
|
|
600
600
|
allRows(): Promise<VaultRegistryRow[]>;
|
|
601
601
|
/**
|
|
602
|
-
* Open an existing shard and apply the template. When `
|
|
602
|
+
* Open an existing shard and apply the template. When `cutoverOnOpen` is set
|
|
603
603
|
* (#271) and the shard's registry version is behind the template, its cutover
|
|
604
604
|
* runs inline first — so a behind shard never surfaces a stale handle.
|
|
605
605
|
*/
|
|
606
606
|
openShard(partitionKey: string): Promise<Vault$1>;
|
|
607
|
-
/** @internal — open + configure with no
|
|
607
|
+
/** @internal — open + configure with no cutover-on-open hook (used by the migration path itself to avoid recursion). */
|
|
608
608
|
private _openShardRaw;
|
|
609
609
|
/**
|
|
610
610
|
* Idempotently provision a shard for `partitionKey`. Returns the
|
|
@@ -696,7 +696,7 @@ declare class VaultGroup<T> {
|
|
|
696
696
|
* Never throws on a cutover failure — it records `status: 'failed'` and
|
|
697
697
|
* returns the row, so a fleet run continues past a bad shard.
|
|
698
698
|
*/
|
|
699
|
-
|
|
699
|
+
cutoverShard(partitionKey: string): Promise<MigrationStatusRow>;
|
|
700
700
|
/**
|
|
701
701
|
* Active batch runner (#271): migrate every shard behind the template version
|
|
702
702
|
* to it, in controlled batches. **Resumable + crash-safe** — shards already at
|
|
@@ -708,10 +708,10 @@ declare class VaultGroup<T> {
|
|
|
708
708
|
* - `batchSize` — max shards migrated concurrently per batch (back-pressure).
|
|
709
709
|
* Default 4. Batches run sequentially; shards within a batch run in parallel.
|
|
710
710
|
*/
|
|
711
|
-
|
|
711
|
+
rolloutSchema(options?: {
|
|
712
712
|
cohort?: readonly string[];
|
|
713
713
|
batchSize?: number;
|
|
714
|
-
}): Promise<
|
|
714
|
+
}): Promise<SchemaRolloutResult>;
|
|
715
715
|
}
|
|
716
716
|
declare class ShardedCollection<T, R = T> {
|
|
717
717
|
private readonly group;
|
|
@@ -760,4 +760,4 @@ declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
|
760
760
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
export { ShardedGroupedQuery as A, ShardedQuery as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type ShardingConfig as E, type FanoutQueryOptions as F, type GroupedRow as G, type SurfaceStatus as H, type VaultRegistryRow as I, mergeCompartment as J, mergeDecryptedRecords as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, resolveFieldAuthority as N, resolveRecordByFieldAuthority as O, type RefreshInsightsResult as R, StateManagementVault as S, VaultGroup as V, type VaultTemplate as a, type SkippedVault as b, type MergeReport as c, type SurfaceDirection as d, type SurfaceConflictPolicy as e, type SurfaceRow as f, type VaultGroupOptions as g, CrossVaultAggregation as h, type CrossVaultDerivationContext as i, type CrossVaultDerivationSpec as j, CrossVaultGroupedAggregation as k, type CrossVaultLiveAggregation as l, type CrossVaultLiveQuery as m, type DeploymentEvent as n, type FanoutResult as o, type FieldAuthorityInputs as p, type FieldAuthorityPolicy as q, FieldAuthorityPolicyMissingError as r, type FieldAuthorityRule as s, FieldLevelDeferredError as t, type
|
|
763
|
+
export { ShardedGroupedQuery as A, ShardedQuery as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type ShardingConfig as E, type FanoutQueryOptions as F, type GroupedRow as G, type SurfaceStatus as H, type VaultRegistryRow as I, mergeCompartment as J, mergeDecryptedRecords as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, resolveFieldAuthority as N, resolveRecordByFieldAuthority as O, type RefreshInsightsResult as R, StateManagementVault as S, VaultGroup as V, type VaultTemplate as a, type SkippedVault as b, type MergeReport as c, type SurfaceDirection as d, type SurfaceConflictPolicy as e, type SurfaceRow as f, type VaultGroupOptions as g, CrossVaultAggregation as h, type CrossVaultDerivationContext as i, type CrossVaultDerivationSpec as j, CrossVaultGroupedAggregation as k, type CrossVaultLiveAggregation as l, type CrossVaultLiveQuery as m, type DeploymentEvent as n, type FanoutResult as o, type FieldAuthorityInputs as p, type FieldAuthorityPolicy as q, FieldAuthorityPolicyMissingError as r, type FieldAuthorityRule as s, FieldLevelDeferredError as t, type MergeConflict as u, type MergeStrategy as v, type MigrationStatusRow as w, type SchemaManifestRow as x, type SchemaRolloutResult as y, ShardedCollection as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klum-db/lobby",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.29",
|
|
4
4
|
"description": "klum-db Lobby — orchestrates a group of sovereign noy-db vaults (federation, interchange, custody). The outward framework to noy-db's inward vault.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|