@lunora/do 1.0.0-alpha.290 → 1.0.0-alpha.292

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
@@ -1909,6 +1909,27 @@ declare abstract class ShardDO {
1909
1909
  * alongside {@link ShardDO.pendingChangedTables}.
1910
1910
  */
1911
1911
  private pendingChangedKeys;
1912
+ /**
1913
+ * D1 bookmarks the `.global()` writes behind {@link ShardDO.pendingChangedTables} reported, recorded with
1914
+ * their tables by {@link ShardDO.recordGlobalWrite} so they travel with them however dispatches interleave.
1915
+ * Keyed by the writer that reported each, which keeps only its latest: one session's bookmark only
1916
+ * moves forward, so the last covers every earlier write of that writer.
1917
+ */
1918
+ private pendingChangedBookmarks;
1919
+ /**
1920
+ * The `.global()` tables behind {@link ShardDO.pendingChangedTables}. A write the writer announced
1921
+ * before its transaction committed invalidated the reactive cache too early to cover a read made
1922
+ * during that transaction, so the flush, which runs after the commit, invalidates them again.
1923
+ */
1924
+ private pendingGlobalWriteTables;
1925
+ /** Live queries a refresh ran that recorded no result, so the poll cannot learn what they read. */
1926
+ private readonly unrecordedQueries;
1927
+ /** Whether this instance has warned that a live query reads a `.global()` table nothing polls for. */
1928
+ private warnedUnpolledGlobalRead;
1929
+ /** When the poll last re-ran global live queries without a changelog answer; see {@link ShardDO.refreshFromGlobalPoll}. */
1930
+ private lastBlindRefreshAt;
1931
+ /** Coalesced twin of {@link ShardDO.pendingChangedBookmarks}; see {@link refreshReadBookmark}. */
1932
+ private pendingRefreshBookmarks;
1912
1933
  /** Coalesced twin of {@link ShardDO.pendingChangedKeys} for the in-flight refresh pass. */
1913
1934
  private pendingRefreshKeys;
1914
1935
  /**
@@ -3762,8 +3783,14 @@ declare abstract class ShardDO {
3762
3783
  * fields from a deferred (`waitUntil`) or concurrently-interleaved context.
3763
3784
  * A refresh runs while the write that triggered it still owns those fields,
3764
3785
  * so reading `ip` there would hand every subscriber the MUTATING caller's IP.
3786
+ *
3787
+ * `refreshBookmark` is the D1 bookmark a refresh's `.global()` reads must start at,
3788
+ * threaded by value for the same reason (see {@link refreshReadBookmark}). The
3789
+ * inbound bookmark on the instance belongs to whichever dispatch holds it now,
3790
+ * not to the write that scheduled this run. `undefined` keeps the reader's own
3791
+ * choice.
3765
3792
  */
3766
- protected executeSubscription(_functionPath: string, _args: Record<string, unknown>, _identity?: SubscriptionIdentity): Promise<SubscriptionOutcome | null>;
3793
+ protected executeSubscription(_functionPath: string, _args: Record<string, unknown>, _identity?: SubscriptionIdentity, _refreshBookmark?: string): Promise<SubscriptionOutcome | null>;
3767
3794
  /**
3768
3795
  * Resolve a named shape to its concrete query plan for `identity`. The base
3769
3796
  * class has no shape registry, so it returns `undefined` — partial
@@ -4334,6 +4361,21 @@ declare abstract class ShardDO {
4334
4361
  * `flushChangedTables` can re-run only the affected subscriptions.
4335
4362
  */
4336
4363
  protected recordChangedTable(table: string, indexKeys?: ReadonlyArray<IndexKeyEntry>): void;
4364
+ /**
4365
+ * A row the `.global()` writer stored, reported by the writer itself (its `onWrite`), so a write a
4366
+ * trigger made inside it is announced too: the shard engine's broadcast only sees the writes it issued.
4367
+ * `bookmark` is the D1 bookmark the writer's session held after the write; the refresh reads at it.
4368
+ * `writer` identifies the session that reported it: a later report from the same writer replaces
4369
+ * the earlier one, so one dispatch's writes contribute one bookmark. Omitted, each call counts as a
4370
+ * writer of its own.
4371
+ */
4372
+ protected recordGlobalWrite(table: string, bookmark: string | undefined, writer?: object): void;
4373
+ /**
4374
+ * A `.global()` write the writer could only announce once its statement settled past its deadline,
4375
+ * after the dispatch that issued it had already flushed. Nothing else would flush it, so this does,
4376
+ * reading at the primary: the session's bookmark for an abandoned statement is unknown.
4377
+ */
4378
+ protected recordLateGlobalWrite(table: string): void;
4337
4379
  /**
4338
4380
  * Per-batch progress hook for the codegen subclass's data-migration runner
4339
4381
  * (wired via `runDataMigration`'s `onBatch`). The runner persists progress to
@@ -5044,6 +5086,13 @@ declare abstract class ShardDO {
5044
5086
  * bearer check above.
5045
5087
  */
5046
5088
  private handleRunAs;
5089
+ /**
5090
+ * Drain the tables a dispatch outside `/rpc` recorded, however it ended: a `.global()` write
5091
+ * reached D1 before the throw and is not undone by the Durable Object's rollback, and a
5092
+ * rolled-back table only costs a re-read of committed state. A flush failure is recorded,
5093
+ * never thrown, so it cannot replace the dispatch's own outcome.
5094
+ */
5095
+ private flushAfterDispatch;
5047
5096
  /**
5048
5097
  * Resolve a declared workflow's runtime binding handle. Looks the
5049
5098
  * `exportName` up in {@link workflowsMetadata} (the codegen subclass's
@@ -5835,6 +5884,13 @@ declare abstract class ShardDO {
5835
5884
  * shortly after.
5836
5885
  */
5837
5886
  private flushChangedTables;
5887
+ /**
5888
+ * Merge `changed` into the coalesced refresh state. Shared by a local write's flush and the global
5889
+ * poll tick, which learns of another shard's `.global()` write, so both coalesce into one pass.
5890
+ */
5891
+ private mergeSubscriptionRefresh;
5892
+ /** Start the drain of the merged refresh state, unless one is running or nothing is pending. */
5893
+ private startSubscriptionRefresh;
5838
5894
  /**
5839
5895
  * Drain {@link ShardDO.pendingRefreshTables} one coalesced batch at a time
5840
5896
  * until it is empty, then release the {@link ShardDO.refreshInFlight} gate.
@@ -6462,12 +6518,31 @@ declare abstract class ShardDO {
6462
6518
  * `cursorOnly` says the caller has already committed to reading everything
6463
6519
  * this pass and wants only the cursor — see the contract on
6464
6520
  * `DatabaseWriterLike.cdcChangedTables`.
6521
+ *
6522
+ * `bookmark` is the D1 bookmark the changelog read's session held: a read at
6523
+ * it sees every write the answer reports, so the subscription refresh the
6524
+ * answer schedules reads at it. Absent on a backend that reports none.
6465
6525
  */
6466
6526
  protected readGlobalChangedTables(_sinceSeq: number, _cursorOnly?: boolean): Promise<{
6527
+ bookmark?: string;
6467
6528
  cursor: number;
6468
6529
  floor?: number;
6469
6530
  tables: string[];
6470
6531
  } | undefined>;
6532
+ /**
6533
+ * The `.global()` tables whose writes by other shards this one learns of from the global
6534
+ * changelog on its poll tick. Empty without a changelog (CDC off): there is then nothing a tick
6535
+ * could narrow by, and re-running every global-reading live query each tick is not paid for
6536
+ * silently, so such a query sees another shard's write only when its own shard writes the
6537
+ * table or the socket resubscribes. The codegen subclass overrides it for an app with
6538
+ * `.global()` tables.
6539
+ */
6540
+ protected polledGlobalTables(): ReadonlySet<string>;
6541
+ /**
6542
+ * Every `.global()` table of the schema, changelog or not, so a shard can tell its operator that a
6543
+ * live query reads one nothing polls for. The codegen subclass overrides it.
6544
+ */
6545
+ protected globalTables(): ReadonlySet<string>;
6471
6546
  /**
6472
6547
  * The two answers a `/rpc` can earn between the replica gate and
6473
6548
  * `beginDispatch`: a reserved admin RPC (served under its own scope and
@@ -6582,6 +6657,35 @@ declare abstract class ShardDO {
6582
6657
  * are dropped in passing (mirrors {@link ShardDO.pokeShapeSubscribers}).
6583
6658
  */
6584
6659
  private pollGlobalShapes;
6660
+ /**
6661
+ * How many live queries on `sockets` read a polled `.global()` table, which is what keeps the poll
6662
+ * armed for them. A subscription with no memo counts: after hibernation nothing records what it
6663
+ * read, and the next tick's refresh re-runs it and records that, so a shard holding only local
6664
+ * queries stops polling one tick after waking.
6665
+ */
6666
+ private countGlobalQueryReaders;
6667
+ /**
6668
+ * Another shard's write to a global table a live query read reaches it only through the poll tick, so
6669
+ * reading a polled table arms the tick; reading one nothing polls for is warned about instead.
6670
+ */
6671
+ private watchGlobalReads;
6672
+ /** Record that a refresh ran `subId` and it recorded no result to learn its tables from. */
6673
+ private noteUnrecordedQuery;
6674
+ /**
6675
+ * Warn once per instance that a live query reads a `.global()` table this shard cannot poll for:
6676
+ * without the global changelog (`.cdc()` on the app), another shard's write to it never reaches
6677
+ * this query, and nothing else would say so.
6678
+ */
6679
+ private warnIfGlobalReadUnpolled;
6680
+ /**
6681
+ * Re-run the live queries that read a `.global()` table the changelog says another writer moved,
6682
+ * through the same coalesced refresh a local write schedules. A full pass treats every polled
6683
+ * table as moved. The run reads at the changelog read's own bookmark, which covers every write it
6684
+ * reported; without one it reads at the primary. This shard's own writes come back here too (the
6685
+ * changelog does not name the writer), so each costs its subscribers one more run, whose unchanged
6686
+ * result is not pushed again.
6687
+ */
6688
+ private refreshFromGlobalPoll;
6585
6689
  /**
6586
6690
  * Refresh one socket's `.global()`-table shapes, containing per-shape
6587
6691
  * failures so a single throw never aborts the poll tick (and with it the
package/dist/index.d.ts CHANGED
@@ -1909,6 +1909,27 @@ declare abstract class ShardDO {
1909
1909
  * alongside {@link ShardDO.pendingChangedTables}.
1910
1910
  */
1911
1911
  private pendingChangedKeys;
1912
+ /**
1913
+ * D1 bookmarks the `.global()` writes behind {@link ShardDO.pendingChangedTables} reported, recorded with
1914
+ * their tables by {@link ShardDO.recordGlobalWrite} so they travel with them however dispatches interleave.
1915
+ * Keyed by the writer that reported each, which keeps only its latest: one session's bookmark only
1916
+ * moves forward, so the last covers every earlier write of that writer.
1917
+ */
1918
+ private pendingChangedBookmarks;
1919
+ /**
1920
+ * The `.global()` tables behind {@link ShardDO.pendingChangedTables}. A write the writer announced
1921
+ * before its transaction committed invalidated the reactive cache too early to cover a read made
1922
+ * during that transaction, so the flush, which runs after the commit, invalidates them again.
1923
+ */
1924
+ private pendingGlobalWriteTables;
1925
+ /** Live queries a refresh ran that recorded no result, so the poll cannot learn what they read. */
1926
+ private readonly unrecordedQueries;
1927
+ /** Whether this instance has warned that a live query reads a `.global()` table nothing polls for. */
1928
+ private warnedUnpolledGlobalRead;
1929
+ /** When the poll last re-ran global live queries without a changelog answer; see {@link ShardDO.refreshFromGlobalPoll}. */
1930
+ private lastBlindRefreshAt;
1931
+ /** Coalesced twin of {@link ShardDO.pendingChangedBookmarks}; see {@link refreshReadBookmark}. */
1932
+ private pendingRefreshBookmarks;
1912
1933
  /** Coalesced twin of {@link ShardDO.pendingChangedKeys} for the in-flight refresh pass. */
1913
1934
  private pendingRefreshKeys;
1914
1935
  /**
@@ -3762,8 +3783,14 @@ declare abstract class ShardDO {
3762
3783
  * fields from a deferred (`waitUntil`) or concurrently-interleaved context.
3763
3784
  * A refresh runs while the write that triggered it still owns those fields,
3764
3785
  * so reading `ip` there would hand every subscriber the MUTATING caller's IP.
3786
+ *
3787
+ * `refreshBookmark` is the D1 bookmark a refresh's `.global()` reads must start at,
3788
+ * threaded by value for the same reason (see {@link refreshReadBookmark}). The
3789
+ * inbound bookmark on the instance belongs to whichever dispatch holds it now,
3790
+ * not to the write that scheduled this run. `undefined` keeps the reader's own
3791
+ * choice.
3765
3792
  */
3766
- protected executeSubscription(_functionPath: string, _args: Record<string, unknown>, _identity?: SubscriptionIdentity): Promise<SubscriptionOutcome | null>;
3793
+ protected executeSubscription(_functionPath: string, _args: Record<string, unknown>, _identity?: SubscriptionIdentity, _refreshBookmark?: string): Promise<SubscriptionOutcome | null>;
3767
3794
  /**
3768
3795
  * Resolve a named shape to its concrete query plan for `identity`. The base
3769
3796
  * class has no shape registry, so it returns `undefined` — partial
@@ -4334,6 +4361,21 @@ declare abstract class ShardDO {
4334
4361
  * `flushChangedTables` can re-run only the affected subscriptions.
4335
4362
  */
4336
4363
  protected recordChangedTable(table: string, indexKeys?: ReadonlyArray<IndexKeyEntry>): void;
4364
+ /**
4365
+ * A row the `.global()` writer stored, reported by the writer itself (its `onWrite`), so a write a
4366
+ * trigger made inside it is announced too: the shard engine's broadcast only sees the writes it issued.
4367
+ * `bookmark` is the D1 bookmark the writer's session held after the write; the refresh reads at it.
4368
+ * `writer` identifies the session that reported it: a later report from the same writer replaces
4369
+ * the earlier one, so one dispatch's writes contribute one bookmark. Omitted, each call counts as a
4370
+ * writer of its own.
4371
+ */
4372
+ protected recordGlobalWrite(table: string, bookmark: string | undefined, writer?: object): void;
4373
+ /**
4374
+ * A `.global()` write the writer could only announce once its statement settled past its deadline,
4375
+ * after the dispatch that issued it had already flushed. Nothing else would flush it, so this does,
4376
+ * reading at the primary: the session's bookmark for an abandoned statement is unknown.
4377
+ */
4378
+ protected recordLateGlobalWrite(table: string): void;
4337
4379
  /**
4338
4380
  * Per-batch progress hook for the codegen subclass's data-migration runner
4339
4381
  * (wired via `runDataMigration`'s `onBatch`). The runner persists progress to
@@ -5044,6 +5086,13 @@ declare abstract class ShardDO {
5044
5086
  * bearer check above.
5045
5087
  */
5046
5088
  private handleRunAs;
5089
+ /**
5090
+ * Drain the tables a dispatch outside `/rpc` recorded, however it ended: a `.global()` write
5091
+ * reached D1 before the throw and is not undone by the Durable Object's rollback, and a
5092
+ * rolled-back table only costs a re-read of committed state. A flush failure is recorded,
5093
+ * never thrown, so it cannot replace the dispatch's own outcome.
5094
+ */
5095
+ private flushAfterDispatch;
5047
5096
  /**
5048
5097
  * Resolve a declared workflow's runtime binding handle. Looks the
5049
5098
  * `exportName` up in {@link workflowsMetadata} (the codegen subclass's
@@ -5835,6 +5884,13 @@ declare abstract class ShardDO {
5835
5884
  * shortly after.
5836
5885
  */
5837
5886
  private flushChangedTables;
5887
+ /**
5888
+ * Merge `changed` into the coalesced refresh state. Shared by a local write's flush and the global
5889
+ * poll tick, which learns of another shard's `.global()` write, so both coalesce into one pass.
5890
+ */
5891
+ private mergeSubscriptionRefresh;
5892
+ /** Start the drain of the merged refresh state, unless one is running or nothing is pending. */
5893
+ private startSubscriptionRefresh;
5838
5894
  /**
5839
5895
  * Drain {@link ShardDO.pendingRefreshTables} one coalesced batch at a time
5840
5896
  * until it is empty, then release the {@link ShardDO.refreshInFlight} gate.
@@ -6462,12 +6518,31 @@ declare abstract class ShardDO {
6462
6518
  * `cursorOnly` says the caller has already committed to reading everything
6463
6519
  * this pass and wants only the cursor — see the contract on
6464
6520
  * `DatabaseWriterLike.cdcChangedTables`.
6521
+ *
6522
+ * `bookmark` is the D1 bookmark the changelog read's session held: a read at
6523
+ * it sees every write the answer reports, so the subscription refresh the
6524
+ * answer schedules reads at it. Absent on a backend that reports none.
6465
6525
  */
6466
6526
  protected readGlobalChangedTables(_sinceSeq: number, _cursorOnly?: boolean): Promise<{
6527
+ bookmark?: string;
6467
6528
  cursor: number;
6468
6529
  floor?: number;
6469
6530
  tables: string[];
6470
6531
  } | undefined>;
6532
+ /**
6533
+ * The `.global()` tables whose writes by other shards this one learns of from the global
6534
+ * changelog on its poll tick. Empty without a changelog (CDC off): there is then nothing a tick
6535
+ * could narrow by, and re-running every global-reading live query each tick is not paid for
6536
+ * silently, so such a query sees another shard's write only when its own shard writes the
6537
+ * table or the socket resubscribes. The codegen subclass overrides it for an app with
6538
+ * `.global()` tables.
6539
+ */
6540
+ protected polledGlobalTables(): ReadonlySet<string>;
6541
+ /**
6542
+ * Every `.global()` table of the schema, changelog or not, so a shard can tell its operator that a
6543
+ * live query reads one nothing polls for. The codegen subclass overrides it.
6544
+ */
6545
+ protected globalTables(): ReadonlySet<string>;
6471
6546
  /**
6472
6547
  * The two answers a `/rpc` can earn between the replica gate and
6473
6548
  * `beginDispatch`: a reserved admin RPC (served under its own scope and
@@ -6582,6 +6657,35 @@ declare abstract class ShardDO {
6582
6657
  * are dropped in passing (mirrors {@link ShardDO.pokeShapeSubscribers}).
6583
6658
  */
6584
6659
  private pollGlobalShapes;
6660
+ /**
6661
+ * How many live queries on `sockets` read a polled `.global()` table, which is what keeps the poll
6662
+ * armed for them. A subscription with no memo counts: after hibernation nothing records what it
6663
+ * read, and the next tick's refresh re-runs it and records that, so a shard holding only local
6664
+ * queries stops polling one tick after waking.
6665
+ */
6666
+ private countGlobalQueryReaders;
6667
+ /**
6668
+ * Another shard's write to a global table a live query read reaches it only through the poll tick, so
6669
+ * reading a polled table arms the tick; reading one nothing polls for is warned about instead.
6670
+ */
6671
+ private watchGlobalReads;
6672
+ /** Record that a refresh ran `subId` and it recorded no result to learn its tables from. */
6673
+ private noteUnrecordedQuery;
6674
+ /**
6675
+ * Warn once per instance that a live query reads a `.global()` table this shard cannot poll for:
6676
+ * without the global changelog (`.cdc()` on the app), another shard's write to it never reaches
6677
+ * this query, and nothing else would say so.
6678
+ */
6679
+ private warnIfGlobalReadUnpolled;
6680
+ /**
6681
+ * Re-run the live queries that read a `.global()` table the changelog says another writer moved,
6682
+ * through the same coalesced refresh a local write schedules. A full pass treats every polled
6683
+ * table as moved. The run reads at the changelog read's own bookmark, which covers every write it
6684
+ * reported; without one it reads at the primary. This shard's own writes come back here too (the
6685
+ * changelog does not name the writer), so each costs its subscribers one more run, whose unchanged
6686
+ * result is not pushed again.
6687
+ */
6688
+ private refreshFromGlobalPoll;
6585
6689
  /**
6586
6690
  * Refresh one socket's `.global()`-table shapes, containing per-shape
6587
6691
  * failures so a single throw never aborts the poll tick (and with it the
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-DcSjzAZv.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-VDKtKWzB.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-DcSjzAZv.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-Dq6YDdyQ.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};