@klum-db/lobby 0.2.0-pre.32 → 0.2.0-pre.33
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/dist/bin/klum.d.cts +1 -1
- package/dist/bin/klum.d.ts +1 -1
- package/dist/index.cjs +71 -20
- 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 +71 -20
- package/dist/index.js.map +1 -1
- package/dist/{vault-group-BchRCDm5.d.cts → vault-group-SfkQJ3CM.d.cts} +27 -5
- package/dist/{vault-group-BchRCDm5.d.ts → vault-group-SfkQJ3CM.d.ts} +27 -5
- package/package.json +1 -1
|
@@ -317,6 +317,13 @@ interface CrossVaultDerivationContext {
|
|
|
317
317
|
/** The shard's schema/template version, from its registry row. */
|
|
318
318
|
readonly schemaVersion: number;
|
|
319
319
|
}
|
|
320
|
+
/** Tuning for auto-push-on-write (#13). */
|
|
321
|
+
interface InsightAutoPushConfig {
|
|
322
|
+
/** Reset-debounce window (ms): batch a multi-tick write burst into one re-derive. Omit = microtask coalescing. */
|
|
323
|
+
readonly debounceMs?: number;
|
|
324
|
+
/** Skip auto-pushing a shard whose registry `schemaVersion` is below this. */
|
|
325
|
+
readonly minVersion?: number;
|
|
326
|
+
}
|
|
320
327
|
/**
|
|
321
328
|
* A push-model cross-vault derivation (#271, Insight Vault — Layer 4).
|
|
322
329
|
*
|
|
@@ -344,8 +351,9 @@ interface CrossVaultDerivationSpec<R = Record<string, unknown>, S = Record<strin
|
|
|
344
351
|
* `source` collection, recompute and push that shard's summary
|
|
345
352
|
* automatically (coalesced per microtask). Default off — without this the
|
|
346
353
|
* derivation is explicit-refresh-only (drive it with `refreshInsights()`).
|
|
354
|
+
* Pass an object to enable debounce / minVersion tuning (#13).
|
|
347
355
|
*/
|
|
348
|
-
readonly autoPush?: boolean;
|
|
356
|
+
readonly autoPush?: boolean | InsightAutoPushConfig;
|
|
349
357
|
}
|
|
350
358
|
/** The result of `refreshInsights()`. */
|
|
351
359
|
interface RefreshInsightsResult {
|
|
@@ -847,10 +855,24 @@ declare class ShardedQuery<T, R = T> {
|
|
|
847
855
|
toArray(options?: FanoutQueryOptions): Promise<FanoutResult<R>>;
|
|
848
856
|
/** @internal — build the change-subscription + relevance binding for this query's group+collection. */
|
|
849
857
|
liveBinding(): LiveBinding;
|
|
850
|
-
/**
|
|
851
|
-
|
|
852
|
-
|
|
858
|
+
/**
|
|
859
|
+
* Returns a reactive cross-shard live query — a facade over CrossVaultLive.
|
|
860
|
+
*
|
|
861
|
+
* Joined queries (crossShardJoin / broadcastJoin) are supported (#14): the live
|
|
862
|
+
* value reflects the fully-joined rows. **v1 limitation:** recomputes only on
|
|
863
|
+
* writes to the primary (left) collection; writes to a co-partitioned right
|
|
864
|
+
* collection or a broadcast-dimension collection do NOT trigger a recompute —
|
|
865
|
+
* re-run the query to pick those up.
|
|
866
|
+
*/
|
|
853
867
|
live(options?: LiveQueryOptions): CrossVaultLiveQuery<R>;
|
|
868
|
+
/**
|
|
869
|
+
* @internal — the FanoutRecordSource for aggregate surfaces. With no join legs,
|
|
870
|
+
* returns `this` (partial-reduce-eligible, #8). With join legs, returns a
|
|
871
|
+
* toArray-backed source (fully-joined rows) and NO fanoutReduce, forcing
|
|
872
|
+
* central-reduce over the joined rows (partial-reduce can't span the central
|
|
873
|
+
* broadcast join). Used by scalar `aggregate()` and `ShardedGroupedQuery`.
|
|
874
|
+
*/
|
|
875
|
+
aggregateSource(): FanoutRecordSource<R>;
|
|
854
876
|
/** One-shot distributed aggregate — central reduce over all shard records. */
|
|
855
877
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultAggregation<R, Spec>;
|
|
856
878
|
/** Begin a grouped cross-shard aggregate. */
|
|
@@ -864,4 +886,4 @@ declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
|
864
886
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
865
887
|
}
|
|
866
888
|
|
|
867
|
-
export { type MergeStrategy as A, type MigrationStatusRow as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type SchemaManifestRow as E, type FanoutQueryOptions as F, type GroupedRow as G, type SchemaRolloutResult as H,
|
|
889
|
+
export { type MergeStrategy as A, type MigrationStatusRow as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type SchemaManifestRow as E, type FanoutQueryOptions as F, type GroupedRow as G, type SchemaRolloutResult as H, type InsightAutoPushConfig as I, ShardedCollection as J, ShardedGroupedQuery as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, ShardedQuery as N, type ShardingConfig as O, type SurfaceStatus as P, type VaultRegistryRow as Q, type RefreshInsightsResult as R, StateManagementVault as S, mergeCompartment as T, mergeDecryptedRecords as U, VaultGroup as V, resolveFieldAuthority as W, resolveRecordByFieldAuthority as X, 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 FederatedRetrieveHit as p, type FederatedRetrieveOptions as q, type FederatedRetrieveResult as r, type FederationMeta as s, type FieldAuthorityInputs as t, type FieldAuthorityPolicy as u, FieldAuthorityPolicyMissingError as v, type FieldAuthorityRule as w, FieldLevelDeferredError as x, type GroupMeta as y, type MergeConflict as z };
|
|
@@ -317,6 +317,13 @@ interface CrossVaultDerivationContext {
|
|
|
317
317
|
/** The shard's schema/template version, from its registry row. */
|
|
318
318
|
readonly schemaVersion: number;
|
|
319
319
|
}
|
|
320
|
+
/** Tuning for auto-push-on-write (#13). */
|
|
321
|
+
interface InsightAutoPushConfig {
|
|
322
|
+
/** Reset-debounce window (ms): batch a multi-tick write burst into one re-derive. Omit = microtask coalescing. */
|
|
323
|
+
readonly debounceMs?: number;
|
|
324
|
+
/** Skip auto-pushing a shard whose registry `schemaVersion` is below this. */
|
|
325
|
+
readonly minVersion?: number;
|
|
326
|
+
}
|
|
320
327
|
/**
|
|
321
328
|
* A push-model cross-vault derivation (#271, Insight Vault — Layer 4).
|
|
322
329
|
*
|
|
@@ -344,8 +351,9 @@ interface CrossVaultDerivationSpec<R = Record<string, unknown>, S = Record<strin
|
|
|
344
351
|
* `source` collection, recompute and push that shard's summary
|
|
345
352
|
* automatically (coalesced per microtask). Default off — without this the
|
|
346
353
|
* derivation is explicit-refresh-only (drive it with `refreshInsights()`).
|
|
354
|
+
* Pass an object to enable debounce / minVersion tuning (#13).
|
|
347
355
|
*/
|
|
348
|
-
readonly autoPush?: boolean;
|
|
356
|
+
readonly autoPush?: boolean | InsightAutoPushConfig;
|
|
349
357
|
}
|
|
350
358
|
/** The result of `refreshInsights()`. */
|
|
351
359
|
interface RefreshInsightsResult {
|
|
@@ -847,10 +855,24 @@ declare class ShardedQuery<T, R = T> {
|
|
|
847
855
|
toArray(options?: FanoutQueryOptions): Promise<FanoutResult<R>>;
|
|
848
856
|
/** @internal — build the change-subscription + relevance binding for this query's group+collection. */
|
|
849
857
|
liveBinding(): LiveBinding;
|
|
850
|
-
/**
|
|
851
|
-
|
|
852
|
-
|
|
858
|
+
/**
|
|
859
|
+
* Returns a reactive cross-shard live query — a facade over CrossVaultLive.
|
|
860
|
+
*
|
|
861
|
+
* Joined queries (crossShardJoin / broadcastJoin) are supported (#14): the live
|
|
862
|
+
* value reflects the fully-joined rows. **v1 limitation:** recomputes only on
|
|
863
|
+
* writes to the primary (left) collection; writes to a co-partitioned right
|
|
864
|
+
* collection or a broadcast-dimension collection do NOT trigger a recompute —
|
|
865
|
+
* re-run the query to pick those up.
|
|
866
|
+
*/
|
|
853
867
|
live(options?: LiveQueryOptions): CrossVaultLiveQuery<R>;
|
|
868
|
+
/**
|
|
869
|
+
* @internal — the FanoutRecordSource for aggregate surfaces. With no join legs,
|
|
870
|
+
* returns `this` (partial-reduce-eligible, #8). With join legs, returns a
|
|
871
|
+
* toArray-backed source (fully-joined rows) and NO fanoutReduce, forcing
|
|
872
|
+
* central-reduce over the joined rows (partial-reduce can't span the central
|
|
873
|
+
* broadcast join). Used by scalar `aggregate()` and `ShardedGroupedQuery`.
|
|
874
|
+
*/
|
|
875
|
+
aggregateSource(): FanoutRecordSource<R>;
|
|
854
876
|
/** One-shot distributed aggregate — central reduce over all shard records. */
|
|
855
877
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultAggregation<R, Spec>;
|
|
856
878
|
/** Begin a grouped cross-shard aggregate. */
|
|
@@ -864,4 +886,4 @@ declare class ShardedGroupedQuery<T, R, F extends string> {
|
|
|
864
886
|
aggregate<Spec extends AggregateSpec>(spec: Spec): CrossVaultGroupedAggregation<R, F, Spec>;
|
|
865
887
|
}
|
|
866
888
|
|
|
867
|
-
export { type MergeStrategy as A, type MigrationStatusRow as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type SchemaManifestRow as E, type FanoutQueryOptions as F, type GroupedRow as G, type SchemaRolloutResult as H,
|
|
889
|
+
export { type MergeStrategy as A, type MigrationStatusRow as B, type CapturedBlueprint as C, type DecryptedMergeOptions as D, type SchemaManifestRow as E, type FanoutQueryOptions as F, type GroupedRow as G, type SchemaRolloutResult as H, type InsightAutoPushConfig as I, ShardedCollection as J, ShardedGroupedQuery as K, type LiveQueryOptions as L, type MergeCompartmentOptions as M, ShardedQuery as N, type ShardingConfig as O, type SurfaceStatus as P, type VaultRegistryRow as Q, type RefreshInsightsResult as R, StateManagementVault as S, mergeCompartment as T, mergeDecryptedRecords as U, VaultGroup as V, resolveFieldAuthority as W, resolveRecordByFieldAuthority as X, 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 FederatedRetrieveHit as p, type FederatedRetrieveOptions as q, type FederatedRetrieveResult as r, type FederationMeta as s, type FieldAuthorityInputs as t, type FieldAuthorityPolicy as u, FieldAuthorityPolicyMissingError as v, type FieldAuthorityRule as w, FieldLevelDeferredError as x, type GroupMeta as y, type MergeConflict 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.33",
|
|
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>",
|