@lunora/do 1.0.0-alpha.294 → 1.0.0-alpha.296

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/index.d.mts CHANGED
@@ -1558,7 +1558,14 @@ declare abstract class ShardDO {
1558
1558
  private readonly deliveryRequestPermits;
1559
1559
  private currentDeliveryPermit;
1560
1560
  private transactionRequestScope;
1561
- private readonly deliveryRegistrations;
1561
+ /**
1562
+ * Per socket, the identity of each subscription id's current registration: `subscribe` mints a
1563
+ * new one when it (re)registers an id, `unsubscribe` drops it. A path that awaits between reading
1564
+ * a subscription and acting on it compares identities so it never acts on a replacement. Memory
1565
+ * only, so a subscription restored from hibernation gets one lazily — see
1566
+ * {@link ShardDO.subscriptionRegistration}.
1567
+ */
1568
+ private readonly subscriptionRegistrations;
1562
1569
  /** ctx-db relation knobs from {@link ShardDOOptions}, handed on by {@link ShardDO.ctxDbTuning}. */
1563
1570
  private readonly ctxDbRelationOptions;
1564
1571
  /**
@@ -2099,6 +2106,8 @@ declare abstract class ShardDO {
2099
2106
  private readonly queuedSocketEvents;
2100
2107
  /** Sockets whose close is in progress: their room membership is being torn down, so nothing new may join or leave. */
2101
2108
  private readonly closingSockets;
2109
+ /** Per socket, the subscribe ids waiting on their function's load; see {@link ShardDO.subscribeOutlivedLoad}. */
2110
+ private readonly loadingSubscribes;
2102
2111
  /**
2103
2112
  * Sockets holding at least one live grant, so a publish visits only grant holders. Kept as a
2104
2113
  * superset of the truth: `deliverLiveLocal` re-checks each socket's attachment, and drops an
@@ -3228,8 +3237,12 @@ declare abstract class ShardDO {
3228
3237
  * Rows applied before it are ALREADY COMMITTED — the writer commits per row —
3229
3238
  * so the caller must flush on the failure path too; {@link handleBulkRowOp}
3230
3239
  * owns that, alongside every other admin arm's flush.
3240
+ *
3241
+ * `apply` resolves `false` for a row it skipped (one that vanished between the
3242
+ * scan and its turn); `count` reports written rows only, while the cursor and
3243
+ * `hasMore` still follow the scanned ids.
3231
3244
  */
3232
- protected runShardBulkRowOp(args: RunShardBulkRowArgs, apply: (id: string) => Promise<void>, after?: string): Promise<RunShardBulkRowResult>;
3245
+ protected runShardBulkRowOp(args: RunShardBulkRowArgs, apply: (id: string) => Promise<boolean>, after?: string): Promise<RunShardBulkRowResult>;
3233
3246
  /**
3234
3247
  * Count, for the row identified by `rowId`, how many rows precede it under
3235
3248
  * `index` within `partitionKey` on this shard (`before`) and the partition's
@@ -3556,7 +3569,10 @@ declare abstract class ShardDO {
3556
3569
  * or a `"next"` push so `fetch` proceeds to the authoritative handler. Records
3557
3570
  * the function call on the short-circuit paths so metrics stay attributed.
3558
3571
  */
3559
- protected rejectNonNextMutation(functionPath: string, mutatorClass: ClientMutationClass | undefined, dispatchStartedAt: number): Response | undefined;
3572
+ protected rejectNonNextMutation(functionPath: string, mutatorClass: ClientMutationClass | undefined, dispatchStartedAt: number, dispatchCollectors: {
3573
+ indexHits: Set<string>;
3574
+ scannedTables: Set<string>;
3575
+ }): Response | undefined;
3560
3576
  /**
3561
3577
  * Respond to a dispatch that hit the `(identity, mutationId)` idempotency
3562
3578
  * cache. Records the (zero-work) function call, then: for a `"next"` custom
@@ -3566,7 +3582,10 @@ declare abstract class ShardDO {
3566
3582
  * result with a stale watermark and the client reports every later seq as a
3567
3583
  * gap forever); for everything else, return the bare cached `{ result }`.
3568
3584
  */
3569
- protected respondFromIdempotencyCache(functionPath: string, dispatchStartedAt: number, mutatorClass: ClientMutationClass | undefined, cachedValue: unknown): Response;
3585
+ protected respondFromIdempotencyCache(functionPath: string, dispatchStartedAt: number, mutatorClass: ClientMutationClass | undefined, cachedValue: unknown, dispatchCollectors: {
3586
+ indexHits: Set<string>;
3587
+ scannedTables: Set<string>;
3588
+ }): Response;
3570
3589
  /**
3571
3590
  * The CDC cursor a just-committed plain mutation landed at — the post-write
3572
3591
  * high-watermark, on the same scale as the `cursor` on `data`/`delta` frames.
@@ -3662,6 +3681,15 @@ declare abstract class ShardDO {
3662
3681
  * nothing — and this is the only place left that still knows the call is paid.
3663
3682
  */
3664
3683
  protected isPaidFunction(_functionPath: string): boolean;
3684
+ /**
3685
+ * Whether `functionPath`'s `.use()` chain carries a per-dispatch middleware
3686
+ * (`perDispatch` on the registered function). `subscribe` refuses such a
3687
+ * query: a live query re-runs the chain on every refresh, and the effect —
3688
+ * limiter budget, a single-use token — must happen once per request. The
3689
+ * base class has no function registry, so the default is `false`; the
3690
+ * codegen-generated subclass answers from `LUNORA_FUNCTIONS`.
3691
+ */
3692
+ protected isPerDispatchFunction(_functionPath: string): boolean;
3665
3693
  /**
3666
3694
  * The argument names of `functionPath` whose validators carry a `v.sensitive`
3667
3695
  * marker. The request log replaces them before anything is persisted, logged or
@@ -3715,10 +3743,11 @@ declare abstract class ShardDO {
3715
3743
  * serialize. We never throw out of this path — the WS hibernation API
3716
3744
  * treats a thrown `webSocketMessage` as a fatal-channel error.
3717
3745
  *
3718
- * The `paid` refusal sits here rather than at the envelope so every
3719
- * registration path — not only the `subscribe` frame — goes through it.
3746
+ * The `paid` and `per_dispatch` refusals sit here rather than at the
3747
+ * envelope so every registration path — not only the `subscribe` frame —
3748
+ * goes through them.
3720
3749
  */
3721
- protected subscribe(ws: ShardSocketLike, subId: string, query: SubscriptionQuery): "ok" | "paid" | "serialize_failed" | "too_many";
3750
+ protected subscribe(ws: ShardSocketLike, subId: string, query: SubscriptionQuery): "ok" | "paid" | "per_dispatch" | "serialize_failed" | "too_many";
3722
3751
  protected unsubscribe(ws: ShardSocketLike, subId: string): void;
3723
3752
  /**
3724
3753
  * Register a live shape subscription on a socket — the partial-replication
@@ -4556,6 +4585,35 @@ declare abstract class ShardDO {
4556
4585
  * as this request's. The dispatch path re-pins its own afterwards.
4557
4586
  */
4558
4587
  protected restoreRequestScope(scope: RequestScope): void;
4588
+ /**
4589
+ * Load `functionPath`'s module before a live-query gate reads its registry entry: a lazy
4590
+ * registry's stub carries no `perDispatch` until then, so the gate would wave a cold per-dispatch
4591
+ * query through and run it once. A failed load is left to the run that follows, which reports it.
4592
+ *
4593
+ * The per-request fields are left alone: a socket path pins its identity around each run it
4594
+ * makes, so it holds no scope here, and putting a snapshot back after the wait would overwrite
4595
+ * those of a dispatch that ran meanwhile.
4596
+ */
4597
+ private prepareForLiveQueryGate;
4598
+ /**
4599
+ * Wait out a subscribe's function load, answering whether the subscribe may still register: an
4600
+ * unsubscribe for the same id, or the socket closing, during the wait makes it moot.
4601
+ */
4602
+ private subscribeOutlivedLoad;
4603
+ /** The identity of `subId`'s current registration on `ws`, minted for one restored from hibernation. */
4604
+ private subscriptionRegistration;
4605
+ /** Whether `subId` on `ws` is still the registration a caller read before awaiting. */
4606
+ private holdsRegistration;
4607
+ /**
4608
+ * The refresh sweep's gate: drop `subId` (and tell the client) when its function may not be held
4609
+ * live, once that function is loaded. `undefined` keeps it, decided without a yield; a promise
4610
+ * answers whether the sweep must skip it — dropped, or replaced or unsubscribed during the load,
4611
+ * in which case `functionPath` names a query the id no longer holds — and is only pending while
4612
+ * a cold function loads.
4613
+ */
4614
+ private dropIfNotLive;
4615
+ /** Why `functionPath` may not be held as a live subscription, or `undefined` when it may; shared by `subscribe` and the refresh sweep. */
4616
+ private liveQueryRefusal;
4559
4617
  /**
4560
4618
  * Whether a subscription gets its updates by re-execution, which diffs the
4561
4619
  * query's own result. A broadcast row would bypass that diff baseline (no
@@ -5974,6 +6032,8 @@ declare abstract class ShardDO {
5974
6032
  * persist failure. A subscription hitting one ends rather than latching for backoff.
5975
6033
  */
5976
6034
  private isDeterministicSubscriptionFailure;
6035
+ /** The refresh sweep's answer to a subscription run that threw. */
6036
+ private failRefresh;
5977
6037
  /**
5978
6038
  * A subscription's refresh threw: count and log it, latch it for backoff, and
5979
6039
  * tell the client the first time of a streak. The subscription stays
@@ -6529,6 +6589,11 @@ declare abstract class ShardDO {
6529
6589
  floor?: number;
6530
6590
  tables: string[];
6531
6591
  } | undefined>;
6592
+ /**
6593
+ * Whether `table` holds a row with `id`: `true`/`false` when the probe runs,
6594
+ * `undefined` when it cannot (a missing table included) — unknown, not absent.
6595
+ */
6596
+ private shardRowExists;
6532
6597
  /**
6533
6598
  * The `.global()` tables whose writes by other shards this one learns of from the global
6534
6599
  * changelog on its poll tick. Empty without a changelog (CDC off): there is then nothing a tick
@@ -6603,7 +6668,12 @@ declare abstract class ShardDO {
6603
6668
  * @returns this dispatch's trace anchor and its transaction-headroom tracker
6604
6669
  */
6605
6670
  private beginDispatch;
6606
- /** Clear every per-request field {@link ShardDO.beginDispatch} stamped. */
6671
+ /**
6672
+ * Clear every per-request field {@link ShardDO.beginDispatch} stamped. The
6673
+ * collector fields are cleared only while they still point at THIS dispatch's
6674
+ * objects: a concurrent dispatch that began meanwhile owns them now, and
6675
+ * clearing would silently stop its collection.
6676
+ */
6607
6677
  private endDispatch;
6608
6678
  /**
6609
6679
  * Open one `.global()` poll tick: ask the global changelog what moved since
package/dist/index.d.ts CHANGED
@@ -1558,7 +1558,14 @@ declare abstract class ShardDO {
1558
1558
  private readonly deliveryRequestPermits;
1559
1559
  private currentDeliveryPermit;
1560
1560
  private transactionRequestScope;
1561
- private readonly deliveryRegistrations;
1561
+ /**
1562
+ * Per socket, the identity of each subscription id's current registration: `subscribe` mints a
1563
+ * new one when it (re)registers an id, `unsubscribe` drops it. A path that awaits between reading
1564
+ * a subscription and acting on it compares identities so it never acts on a replacement. Memory
1565
+ * only, so a subscription restored from hibernation gets one lazily — see
1566
+ * {@link ShardDO.subscriptionRegistration}.
1567
+ */
1568
+ private readonly subscriptionRegistrations;
1562
1569
  /** ctx-db relation knobs from {@link ShardDOOptions}, handed on by {@link ShardDO.ctxDbTuning}. */
1563
1570
  private readonly ctxDbRelationOptions;
1564
1571
  /**
@@ -2099,6 +2106,8 @@ declare abstract class ShardDO {
2099
2106
  private readonly queuedSocketEvents;
2100
2107
  /** Sockets whose close is in progress: their room membership is being torn down, so nothing new may join or leave. */
2101
2108
  private readonly closingSockets;
2109
+ /** Per socket, the subscribe ids waiting on their function's load; see {@link ShardDO.subscribeOutlivedLoad}. */
2110
+ private readonly loadingSubscribes;
2102
2111
  /**
2103
2112
  * Sockets holding at least one live grant, so a publish visits only grant holders. Kept as a
2104
2113
  * superset of the truth: `deliverLiveLocal` re-checks each socket's attachment, and drops an
@@ -3228,8 +3237,12 @@ declare abstract class ShardDO {
3228
3237
  * Rows applied before it are ALREADY COMMITTED — the writer commits per row —
3229
3238
  * so the caller must flush on the failure path too; {@link handleBulkRowOp}
3230
3239
  * owns that, alongside every other admin arm's flush.
3240
+ *
3241
+ * `apply` resolves `false` for a row it skipped (one that vanished between the
3242
+ * scan and its turn); `count` reports written rows only, while the cursor and
3243
+ * `hasMore` still follow the scanned ids.
3231
3244
  */
3232
- protected runShardBulkRowOp(args: RunShardBulkRowArgs, apply: (id: string) => Promise<void>, after?: string): Promise<RunShardBulkRowResult>;
3245
+ protected runShardBulkRowOp(args: RunShardBulkRowArgs, apply: (id: string) => Promise<boolean>, after?: string): Promise<RunShardBulkRowResult>;
3233
3246
  /**
3234
3247
  * Count, for the row identified by `rowId`, how many rows precede it under
3235
3248
  * `index` within `partitionKey` on this shard (`before`) and the partition's
@@ -3556,7 +3569,10 @@ declare abstract class ShardDO {
3556
3569
  * or a `"next"` push so `fetch` proceeds to the authoritative handler. Records
3557
3570
  * the function call on the short-circuit paths so metrics stay attributed.
3558
3571
  */
3559
- protected rejectNonNextMutation(functionPath: string, mutatorClass: ClientMutationClass | undefined, dispatchStartedAt: number): Response | undefined;
3572
+ protected rejectNonNextMutation(functionPath: string, mutatorClass: ClientMutationClass | undefined, dispatchStartedAt: number, dispatchCollectors: {
3573
+ indexHits: Set<string>;
3574
+ scannedTables: Set<string>;
3575
+ }): Response | undefined;
3560
3576
  /**
3561
3577
  * Respond to a dispatch that hit the `(identity, mutationId)` idempotency
3562
3578
  * cache. Records the (zero-work) function call, then: for a `"next"` custom
@@ -3566,7 +3582,10 @@ declare abstract class ShardDO {
3566
3582
  * result with a stale watermark and the client reports every later seq as a
3567
3583
  * gap forever); for everything else, return the bare cached `{ result }`.
3568
3584
  */
3569
- protected respondFromIdempotencyCache(functionPath: string, dispatchStartedAt: number, mutatorClass: ClientMutationClass | undefined, cachedValue: unknown): Response;
3585
+ protected respondFromIdempotencyCache(functionPath: string, dispatchStartedAt: number, mutatorClass: ClientMutationClass | undefined, cachedValue: unknown, dispatchCollectors: {
3586
+ indexHits: Set<string>;
3587
+ scannedTables: Set<string>;
3588
+ }): Response;
3570
3589
  /**
3571
3590
  * The CDC cursor a just-committed plain mutation landed at — the post-write
3572
3591
  * high-watermark, on the same scale as the `cursor` on `data`/`delta` frames.
@@ -3662,6 +3681,15 @@ declare abstract class ShardDO {
3662
3681
  * nothing — and this is the only place left that still knows the call is paid.
3663
3682
  */
3664
3683
  protected isPaidFunction(_functionPath: string): boolean;
3684
+ /**
3685
+ * Whether `functionPath`'s `.use()` chain carries a per-dispatch middleware
3686
+ * (`perDispatch` on the registered function). `subscribe` refuses such a
3687
+ * query: a live query re-runs the chain on every refresh, and the effect —
3688
+ * limiter budget, a single-use token — must happen once per request. The
3689
+ * base class has no function registry, so the default is `false`; the
3690
+ * codegen-generated subclass answers from `LUNORA_FUNCTIONS`.
3691
+ */
3692
+ protected isPerDispatchFunction(_functionPath: string): boolean;
3665
3693
  /**
3666
3694
  * The argument names of `functionPath` whose validators carry a `v.sensitive`
3667
3695
  * marker. The request log replaces them before anything is persisted, logged or
@@ -3715,10 +3743,11 @@ declare abstract class ShardDO {
3715
3743
  * serialize. We never throw out of this path — the WS hibernation API
3716
3744
  * treats a thrown `webSocketMessage` as a fatal-channel error.
3717
3745
  *
3718
- * The `paid` refusal sits here rather than at the envelope so every
3719
- * registration path — not only the `subscribe` frame — goes through it.
3746
+ * The `paid` and `per_dispatch` refusals sit here rather than at the
3747
+ * envelope so every registration path — not only the `subscribe` frame —
3748
+ * goes through them.
3720
3749
  */
3721
- protected subscribe(ws: ShardSocketLike, subId: string, query: SubscriptionQuery): "ok" | "paid" | "serialize_failed" | "too_many";
3750
+ protected subscribe(ws: ShardSocketLike, subId: string, query: SubscriptionQuery): "ok" | "paid" | "per_dispatch" | "serialize_failed" | "too_many";
3722
3751
  protected unsubscribe(ws: ShardSocketLike, subId: string): void;
3723
3752
  /**
3724
3753
  * Register a live shape subscription on a socket — the partial-replication
@@ -4556,6 +4585,35 @@ declare abstract class ShardDO {
4556
4585
  * as this request's. The dispatch path re-pins its own afterwards.
4557
4586
  */
4558
4587
  protected restoreRequestScope(scope: RequestScope): void;
4588
+ /**
4589
+ * Load `functionPath`'s module before a live-query gate reads its registry entry: a lazy
4590
+ * registry's stub carries no `perDispatch` until then, so the gate would wave a cold per-dispatch
4591
+ * query through and run it once. A failed load is left to the run that follows, which reports it.
4592
+ *
4593
+ * The per-request fields are left alone: a socket path pins its identity around each run it
4594
+ * makes, so it holds no scope here, and putting a snapshot back after the wait would overwrite
4595
+ * those of a dispatch that ran meanwhile.
4596
+ */
4597
+ private prepareForLiveQueryGate;
4598
+ /**
4599
+ * Wait out a subscribe's function load, answering whether the subscribe may still register: an
4600
+ * unsubscribe for the same id, or the socket closing, during the wait makes it moot.
4601
+ */
4602
+ private subscribeOutlivedLoad;
4603
+ /** The identity of `subId`'s current registration on `ws`, minted for one restored from hibernation. */
4604
+ private subscriptionRegistration;
4605
+ /** Whether `subId` on `ws` is still the registration a caller read before awaiting. */
4606
+ private holdsRegistration;
4607
+ /**
4608
+ * The refresh sweep's gate: drop `subId` (and tell the client) when its function may not be held
4609
+ * live, once that function is loaded. `undefined` keeps it, decided without a yield; a promise
4610
+ * answers whether the sweep must skip it — dropped, or replaced or unsubscribed during the load,
4611
+ * in which case `functionPath` names a query the id no longer holds — and is only pending while
4612
+ * a cold function loads.
4613
+ */
4614
+ private dropIfNotLive;
4615
+ /** Why `functionPath` may not be held as a live subscription, or `undefined` when it may; shared by `subscribe` and the refresh sweep. */
4616
+ private liveQueryRefusal;
4559
4617
  /**
4560
4618
  * Whether a subscription gets its updates by re-execution, which diffs the
4561
4619
  * query's own result. A broadcast row would bypass that diff baseline (no
@@ -5974,6 +6032,8 @@ declare abstract class ShardDO {
5974
6032
  * persist failure. A subscription hitting one ends rather than latching for backoff.
5975
6033
  */
5976
6034
  private isDeterministicSubscriptionFailure;
6035
+ /** The refresh sweep's answer to a subscription run that threw. */
6036
+ private failRefresh;
5977
6037
  /**
5978
6038
  * A subscription's refresh threw: count and log it, latch it for backoff, and
5979
6039
  * tell the client the first time of a streak. The subscription stays
@@ -6529,6 +6589,11 @@ declare abstract class ShardDO {
6529
6589
  floor?: number;
6530
6590
  tables: string[];
6531
6591
  } | undefined>;
6592
+ /**
6593
+ * Whether `table` holds a row with `id`: `true`/`false` when the probe runs,
6594
+ * `undefined` when it cannot (a missing table included) — unknown, not absent.
6595
+ */
6596
+ private shardRowExists;
6532
6597
  /**
6533
6598
  * The `.global()` tables whose writes by other shards this one learns of from the global
6534
6599
  * changelog on its poll tick. Empty without a changelog (CDC off): there is then nothing a tick
@@ -6603,7 +6668,12 @@ declare abstract class ShardDO {
6603
6668
  * @returns this dispatch's trace anchor and its transaction-headroom tracker
6604
6669
  */
6605
6670
  private beginDispatch;
6606
- /** Clear every per-request field {@link ShardDO.beginDispatch} stamped. */
6671
+ /**
6672
+ * Clear every per-request field {@link ShardDO.beginDispatch} stamped. The
6673
+ * collector fields are cleared only while they still point at THIS dispatch's
6674
+ * objects: a concurrent dispatch that began meanwhile owns them now, and
6675
+ * clearing would silently stop its collection.
6676
+ */
6607
6677
  private endDispatch;
6608
6678
  /**
6609
6679
  * Open one `.global()` poll tick: ask the global changelog what moved since
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{AdminRevocationDO as a}from"./packem_shared/AdminRevocationDO-DHjoZWfF.mjs";import{installDeliveryFence as t}from"./packem_shared/installDeliveryFence-B6M9KOnb.mjs";import{MERGED_ROLES as S,mergeDurableObjects as i,roleNamespace as l}from"./packem_shared/MERGED_ROLES-BAMAmIcW.mjs";import{serveRelationFanout as n}from"./packem_shared/serveRelationFanout-Bms_fuoY.mjs";import{SESSION_DO_TTL_DEFAULT as d,SessionDO as p}from"./packem_shared/SESSION_DO_TTL_DEFAULT-DSvTwRjc.mjs";import{ROOT_DO_SIZE_WARN_BYTES as D,ROOT_SHARD_NAME as O,ShardDO as E}from"./packem_shared/ROOT_DO_SIZE_WARN_BYTES-DcUakypR.mjs";import{SHARD_REGISTRY_DO_NAME as h,ShardRegistryDO as x,hostedShardRegistry as f}from"./packem_shared/SHARD_REGISTRY_DO_NAME-Dbh8JQJQ.mjs";import{createStableIdFactory as A,createStableRandomFactory as I}from"./packem_shared/createStableIdFactory-DPDT_chw.mjs";import{createShardAlarms as b,createShardDirectory as M,createShardHost as N,createShardKvStore as g,createShardPlatform as y,createSocketHost as k,createWorkerPlatform as F}from"@lunora/platform-cloudflare";import{REPROJECTION_MIGRATION_PREFIX as L,UNVOUCHABLE_DEP as v,applyCdcChanges as H,assertShapeShardable as P,backfillSearchIndexes as j,backfillVectorIndexes as U,buildReprojectionMigration as w,clearMemoryTables as G,countLegacyRows as V,createReadFootprint as B,createShardCtxDb as W,exportShardRows as Y,importShardRows as J,isSourceDue as K,markUnvouchableReads as X,pullExternalSourceIncrementalTick as Z,pullExternalSourceTick as q,reprojectionMigrationId as z,reprojectionTables as Q,runDataMigration as $,runShardMigrations as ee,subscriptionListDeltas as re}from"@lunora/shard-engine";import{A as oe}from"./packem_shared/admin-token-DrufJIZV.mjs";export{oe as ADMIN_REVOCATION_DO_NAME,a as AdminRevocationDO,S as MERGED_ROLES,L as REPROJECTION_MIGRATION_PREFIX,D as ROOT_DO_SIZE_WARN_BYTES,O as ROOT_SHARD_NAME,d as SESSION_DO_TTL_DEFAULT,h as SHARD_REGISTRY_DO_NAME,p as SessionDO,E as ShardDO,x as ShardRegistryDO,v as UNVOUCHABLE_DEP,H as applyCdcChanges,P as assertShapeShardable,j as backfillSearchIndexes,U as backfillVectorIndexes,w as buildReprojectionMigration,G as clearMemoryTables,V as countLegacyRows,B as createReadFootprint,b as createShardAlarms,W as createShardCtxDb,M as createShardDirectory,N as createShardHost,g as createShardKvStore,y as createShardPlatform,k as createSocketHost,A as createStableIdFactory,I as createStableRandomFactory,F as createWorkerPlatform,Y as exportShardRows,f as hostedShardRegistry,J as importShardRows,t as installDeliveryFence,K as isSourceDue,X as markUnvouchableReads,i as mergeDurableObjects,Z as pullExternalSourceIncrementalTick,q as pullExternalSourceTick,z as reprojectionMigrationId,Q as reprojectionTables,l as roleNamespace,$ as runDataMigration,ee as runShardMigrations,n as serveRelationFanout,re as subscriptionListDeltas};
1
+ import{AdminRevocationDO as a}from"./packem_shared/AdminRevocationDO-DHjoZWfF.mjs";import{installDeliveryFence as t}from"./packem_shared/installDeliveryFence-B6M9KOnb.mjs";import{MERGED_ROLES as S,mergeDurableObjects as i,roleNamespace as l}from"./packem_shared/MERGED_ROLES-BAMAmIcW.mjs";import{serveRelationFanout as n}from"./packem_shared/serveRelationFanout-Bms_fuoY.mjs";import{SESSION_DO_TTL_DEFAULT as d,SessionDO as p}from"./packem_shared/SESSION_DO_TTL_DEFAULT-DSvTwRjc.mjs";import{ROOT_DO_SIZE_WARN_BYTES as D,ROOT_SHARD_NAME as O,ShardDO as E}from"./packem_shared/ROOT_DO_SIZE_WARN_BYTES-BO0jZbrG.mjs";import{SHARD_REGISTRY_DO_NAME as h,ShardRegistryDO as x,hostedShardRegistry as f}from"./packem_shared/SHARD_REGISTRY_DO_NAME-Dbh8JQJQ.mjs";import{createStableIdFactory as A,createStableRandomFactory as I}from"./packem_shared/createStableIdFactory-DPDT_chw.mjs";import{createShardAlarms as b,createShardDirectory as M,createShardHost as N,createShardKvStore as g,createShardPlatform as y,createSocketHost as k,createWorkerPlatform as F}from"@lunora/platform-cloudflare";import{REPROJECTION_MIGRATION_PREFIX as L,UNVOUCHABLE_DEP as v,applyCdcChanges as H,assertShapeShardable as P,backfillSearchIndexes as j,backfillVectorIndexes as U,buildReprojectionMigration as w,clearMemoryTables as G,countLegacyRows as V,createReadFootprint as B,createShardCtxDb as W,exportShardRows as Y,importShardRows as J,isSourceDue as K,markUnvouchableReads as X,pullExternalSourceIncrementalTick as Z,pullExternalSourceTick as q,reprojectionMigrationId as z,reprojectionTables as Q,runDataMigration as $,runShardMigrations as ee,subscriptionListDeltas as re}from"@lunora/shard-engine";import{A as oe}from"./packem_shared/admin-token-DrufJIZV.mjs";export{oe as ADMIN_REVOCATION_DO_NAME,a as AdminRevocationDO,S as MERGED_ROLES,L as REPROJECTION_MIGRATION_PREFIX,D as ROOT_DO_SIZE_WARN_BYTES,O as ROOT_SHARD_NAME,d as SESSION_DO_TTL_DEFAULT,h as SHARD_REGISTRY_DO_NAME,p as SessionDO,E as ShardDO,x as ShardRegistryDO,v as UNVOUCHABLE_DEP,H as applyCdcChanges,P as assertShapeShardable,j as backfillSearchIndexes,U as backfillVectorIndexes,w as buildReprojectionMigration,G as clearMemoryTables,V as countLegacyRows,B as createReadFootprint,b as createShardAlarms,W as createShardCtxDb,M as createShardDirectory,N as createShardHost,g as createShardKvStore,y as createShardPlatform,k as createSocketHost,A as createStableIdFactory,I as createStableRandomFactory,F as createWorkerPlatform,Y as exportShardRows,f as hostedShardRegistry,J as importShardRows,t as installDeliveryFence,K as isSourceDue,X as markUnvouchableReads,i as mergeDurableObjects,Z as pullExternalSourceIncrementalTick,q as pullExternalSourceTick,z as reprojectionMigrationId,Q as reprojectionTables,l as roleNamespace,$ as runDataMigration,ee as runShardMigrations,n as serveRelationFanout,re as subscriptionListDeltas};