@lunora/do 1.0.0-alpha.302 → 1.0.0-alpha.303

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
@@ -3475,6 +3475,19 @@ declare abstract class ShardDO {
3475
3475
  * `LUNORA_FUNCTIONS` lookup, which is what production dispatch uses.
3476
3476
  */
3477
3477
  protected isMutationFunction(_functionPath: string): boolean;
3478
+ /**
3479
+ * Whether `functionPath` names a registered `query`, whose dispatch runs
3480
+ * through the host's read gate ({@link ShardHost.runShared}): on a host
3481
+ * without an input gate (Node) it then waits for an open mutation instead of
3482
+ * being refused by it, and a mutation waits for it.
3483
+ *
3484
+ * The base class has no function registry, so the default is `false`: an
3485
+ * unknown function is never gated, which keeps a subclass without the
3486
+ * registry dispatching exactly as it did. Gating an action by mistake would
3487
+ * hold every mutation on the shard for the length of its outbound I/O. The
3488
+ * codegen-generated subclass overrides it with the `LUNORA_FUNCTIONS` lookup.
3489
+ */
3490
+ protected isQueryFunction(_functionPath: string): boolean;
3478
3491
  /**
3479
3492
  * Classify an in-flight custom-mutator push against the shard's stored
3480
3493
  * high-watermark for `currentRequestClientId`. The watermark is the highest
@@ -5664,6 +5677,16 @@ declare abstract class ShardDO {
5664
5677
  * query under its own identity.
5665
5678
  */
5666
5679
  private joinReactiveRun;
5680
+ /**
5681
+ * Run a read-only dispatch under the host's read gate, or directly on a host
5682
+ * with an input gate, which has none.
5683
+ *
5684
+ * The gated read must never wait on same-shard work that needs the write
5685
+ * gate (a self-fetch to a mutation on this shard, say): that work waits for
5686
+ * the read to finish, and the two deadlock. The host lets a read upgrade
5687
+ * only for work in its own async chain.
5688
+ */
5689
+ private runShared;
5667
5690
  /**
5668
5691
  * Single-flight for subscription seeds: identical seeds (same key as the
5669
5692
  * refresh dedup) that start while one is in flight join it, so a reconnect
package/dist/index.d.ts CHANGED
@@ -3475,6 +3475,19 @@ declare abstract class ShardDO {
3475
3475
  * `LUNORA_FUNCTIONS` lookup, which is what production dispatch uses.
3476
3476
  */
3477
3477
  protected isMutationFunction(_functionPath: string): boolean;
3478
+ /**
3479
+ * Whether `functionPath` names a registered `query`, whose dispatch runs
3480
+ * through the host's read gate ({@link ShardHost.runShared}): on a host
3481
+ * without an input gate (Node) it then waits for an open mutation instead of
3482
+ * being refused by it, and a mutation waits for it.
3483
+ *
3484
+ * The base class has no function registry, so the default is `false`: an
3485
+ * unknown function is never gated, which keeps a subclass without the
3486
+ * registry dispatching exactly as it did. Gating an action by mistake would
3487
+ * hold every mutation on the shard for the length of its outbound I/O. The
3488
+ * codegen-generated subclass overrides it with the `LUNORA_FUNCTIONS` lookup.
3489
+ */
3490
+ protected isQueryFunction(_functionPath: string): boolean;
3478
3491
  /**
3479
3492
  * Classify an in-flight custom-mutator push against the shard's stored
3480
3493
  * high-watermark for `currentRequestClientId`. The watermark is the highest
@@ -5664,6 +5677,16 @@ declare abstract class ShardDO {
5664
5677
  * query under its own identity.
5665
5678
  */
5666
5679
  private joinReactiveRun;
5680
+ /**
5681
+ * Run a read-only dispatch under the host's read gate, or directly on a host
5682
+ * with an input gate, which has none.
5683
+ *
5684
+ * The gated read must never wait on same-shard work that needs the write
5685
+ * gate (a self-fetch to a mutation on this shard, say): that work waits for
5686
+ * the read to finish, and the two deadlock. The host lets a read upgrade
5687
+ * only for work in its own async chain.
5688
+ */
5689
+ private runShared;
5667
5690
  /**
5668
5691
  * Single-flight for subscription seeds: identical seeds (same key as the
5669
5692
  * refresh dedup) that start while one is in flight join it, so a reconnect
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-BvLBzieD.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-DiCZKDDD.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};