@powerhousedao/reactor 6.2.2 → 6.2.3-dev.1

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.js CHANGED
@@ -7611,6 +7611,20 @@ var Reactor = class {
7611
7611
  function sameDatabaseTarget(a, b) {
7612
7612
  return a.host === b.host && a.port === b.port && a.database === b.database;
7613
7613
  }
7614
+ /**
7615
+ * Requires each built-in kind exactly once across both lists. A kind in
7616
+ * neither list is indexed by nobody (host copies never index under a
7617
+ * worker), so its reads go stale and its consistency-token waits never
7618
+ * resolve; a kind in both is indexed twice per operation.
7619
+ */
7620
+ function validateBuiltInKindCoverage(preReadyKinds, postReadyKinds) {
7621
+ const named = [...preReadyKinds, ...postReadyKinds];
7622
+ const missing = BUILT_IN_READ_MODEL_KINDS.filter((kind) => !named.includes(kind));
7623
+ const duplicated = BUILT_IN_READ_MODEL_KINDS.filter((kind) => named.filter((entry) => entry === kind).length > 1);
7624
+ if (missing.length === 0 && duplicated.length === 0) return;
7625
+ const problems = [missing.length > 0 ? `never named: ${missing.join(", ")} (would be indexed by no shard, leaving those reads permanently stale and their consistency-token waits unresolvable)` : void 0, duplicated.length > 0 ? `named more than once: ${duplicated.join(", ")} (would be indexed twice per operation)` : void 0].filter((problem) => problem !== void 0);
7626
+ throw new Error(`withProjectionShards requires preReadyKinds and postReadyKinds to name each built-in read model (${BUILT_IN_READ_MODEL_KINDS.join(", ")}) exactly once between them; ${problems.join("; ")}`);
7627
+ }
7614
7628
  var ReactorBuilder = class {
7615
7629
  logger;
7616
7630
  documentModelSources = [];
@@ -7628,6 +7642,7 @@ var ReactorBuilder = class {
7628
7642
  syncBuilder;
7629
7643
  eventBus;
7630
7644
  readModelCoordinator;
7645
+ readModelCoordinatorFactory;
7631
7646
  signatureVerifier;
7632
7647
  kyselyInstance;
7633
7648
  signalHandlersEnabled = false;
@@ -7639,6 +7654,7 @@ var ReactorBuilder = class {
7639
7654
  driveContainerTypes = DEFAULT_DRIVE_CONTAINER_TYPES;
7640
7655
  workerPool;
7641
7656
  resolvedModelManifest;
7657
+ moduleOnlyModelKeys = [];
7642
7658
  projectionShardConfig;
7643
7659
  projectionWorkerFactory;
7644
7660
  instrumentedPools = [];
@@ -7687,6 +7703,15 @@ var ReactorBuilder = class {
7687
7703
  this.readModelCoordinator = readModelCoordinator;
7688
7704
  return this;
7689
7705
  }
7706
+ /**
7707
+ * Register a factory that builds the coordinator once the subscription
7708
+ * read model, processor manager and host read models exist. Use this, not
7709
+ * `withReadModelCoordinator`, for coordinators that compose those internals.
7710
+ */
7711
+ withReadModelCoordinatorFactory(factory) {
7712
+ this.readModelCoordinatorFactory = factory;
7713
+ return this;
7714
+ }
7690
7715
  withExecutor(executor) {
7691
7716
  this.executorManager = executor;
7692
7717
  return this;
@@ -7816,23 +7841,18 @@ var ReactorBuilder = class {
7816
7841
  async buildModule() {
7817
7842
  if (!this.logger) this.logger = new ConsoleLogger(["reactor"]);
7818
7843
  const featureFlags = resolveFeatureFlags(this.executorConfig.featureFlags);
7844
+ if (this.readModelCoordinator !== void 0 && this.readModelCoordinatorFactory !== void 0) throw new Error("withReadModelCoordinator and withReadModelCoordinatorFactory are mutually exclusive; register one coordinator source");
7845
+ if (this.projectionShardConfig !== void 0 && this.readModelCoordinatorFactory !== void 0) throw new Error("withProjectionShards and withReadModelCoordinatorFactory are mutually exclusive; the factory owns the projection worker through its createProjectionShardManager dependency");
7819
7846
  if (this.projectionShardConfig !== void 0 && this.readModelFactories.length > 0) throw new Error("withProjectionShards does not support read models registered through withReadModelFactory; projection workers cannot receive host-only factory dependencies");
7820
7847
  if (this.projectionShardConfig !== void 0 && this.readModels.length > 0) throw new Error("withProjectionShards does not support read models registered through withReadModel; projection workers build their own read models from the shard config and would silently omit these");
7821
- if (this.projectionShardConfig !== void 0) {
7822
- const named = [...this.projectionShardConfig.preReadyKinds, ...this.projectionShardConfig.postReadyKinds];
7823
- const missing = BUILT_IN_READ_MODEL_KINDS.filter((kind) => !named.includes(kind));
7824
- const duplicated = BUILT_IN_READ_MODEL_KINDS.filter((kind) => named.filter((entry) => entry === kind).length > 1);
7825
- if (missing.length > 0 || duplicated.length > 0) {
7826
- const problems = [missing.length > 0 ? `never named: ${missing.join(", ")} (would be indexed by no shard, leaving those reads permanently stale and their consistency-token waits unresolvable)` : void 0, duplicated.length > 0 ? `named more than once: ${duplicated.join(", ")} (would be indexed twice per operation)` : void 0].filter((problem) => problem !== void 0);
7827
- throw new Error(`withProjectionShards requires preReadyKinds and postReadyKinds to name each built-in read model (${BUILT_IN_READ_MODEL_KINDS.join(", ")}) exactly once between them; ${problems.join("; ")}`);
7828
- }
7829
- }
7848
+ if (this.projectionShardConfig !== void 0) validateBuiltInKindCoverage(this.projectionShardConfig.preReadyKinds, this.projectionShardConfig.postReadyKinds);
7830
7849
  const resolvedSources = await resolveModelSources(this.documentModelSources);
7831
7850
  if (this.workerPool) {
7832
7851
  if (resolvedSources.manifest.length === 0) throw new Error("withWorkerPool requires at least one worker-importable document-model source ({ filePath } or { packageName }).");
7833
7852
  if (resolvedSources.moduleOnlyKeys.length > 0) throw new Error(`withWorkerPool requires worker-importable sources, but these models were registered only as live modules: ${resolvedSources.moduleOnlyKeys.join(", ")}. Provide a { filePath } or { packageName } source for each.`);
7834
7853
  }
7835
7854
  this.resolvedModelManifest = resolvedSources.manifest.length > 0 ? resolvedSources.manifest : void 0;
7855
+ this.moduleOnlyModelKeys = resolvedSources.moduleOnlyKeys;
7836
7856
  const documentModelRegistry = new DocumentModelRegistry();
7837
7857
  if (this.upgradeManifests.length > 0) {
7838
7858
  const results = documentModelRegistry.registerUpgradeManifests(...this.upgradeManifests);
@@ -7882,7 +7902,7 @@ var ReactorBuilder = class {
7882
7902
  if (resolver instanceof DocumentModelResolver) resolver.setBroadcastHook((entry) => poolManager.loadModel(entry));
7883
7903
  } else executorManager = new SimpleJobExecutorManager(() => new SimpleJobExecutor(this.logger, documentModelRegistry, operationStore, eventBus, writeCache, operationIndex, documentMetaCache, collectionMembershipCache, this.driveContainerTypes, this.executorConfig, this.signatureVerifier, executionScope), eventBus, queue, jobTracker, this.logger, resolver, this.executorConfig.jobTimeoutMs, this.executorConfig.deferredJobTtlMs);
7884
7904
  await executorManager.start(executorStartCount);
7885
- const readModelInstances = Array.from(new Set([...this.readModels]));
7905
+ const callerReadModels = Array.from(new Set([...this.readModels]));
7886
7906
  const documentViewConsistencyTracker = new ConsistencyTracker();
7887
7907
  const documentView = new KyselyDocumentView(database, operationStore, operationIndex, writeCache, documentViewConsistencyTracker, featureFlags.documentDecisions);
7888
7908
  try {
@@ -7890,7 +7910,6 @@ var ReactorBuilder = class {
7890
7910
  } catch (error) {
7891
7911
  console.error("Error initializing document view", error);
7892
7912
  }
7893
- readModelInstances.push(documentView);
7894
7913
  const documentIndexerConsistencyTracker = new ConsistencyTracker();
7895
7914
  const documentIndexer = new KyselyDocumentIndexer(database, operationIndex, writeCache, documentIndexerConsistencyTracker);
7896
7915
  try {
@@ -7898,7 +7917,6 @@ var ReactorBuilder = class {
7898
7917
  } catch (error) {
7899
7918
  console.error("Error initializing document indexer", error);
7900
7919
  }
7901
- readModelInstances.push(documentIndexer);
7902
7920
  const subscriptionManager = new ReactorSubscriptionManager(new DefaultSubscriptionErrorHandler());
7903
7921
  const subscriptionNotificationReadModel = new SubscriptionNotificationReadModel(subscriptionManager, documentView);
7904
7922
  const processorManagerConsistencyTracker = new ConsistencyTracker();
@@ -7915,12 +7933,28 @@ var ReactorBuilder = class {
7915
7933
  writeCache,
7916
7934
  processorManagerConsistencyTracker
7917
7935
  });
7918
- readModelInstances.push(readModel);
7936
+ callerReadModels.push(readModel);
7919
7937
  }
7920
- const readModelCoordinator = this.readModelCoordinator ? this.readModelCoordinator : this.projectionShardConfig ? await this.createProjectionShardManager(this.projectionShardConfig, eventBus, {
7938
+ const readModelInstances = [
7939
+ ...callerReadModels,
7940
+ documentView,
7941
+ documentIndexer
7942
+ ];
7943
+ const hostTrackers = {
7921
7944
  "document-view": documentViewConsistencyTracker,
7922
7945
  "document-indexer": documentIndexerConsistencyTracker
7923
- }) : new ReadModelCoordinator(eventBus, readModelInstances, [subscriptionNotificationReadModel, processorManager]);
7946
+ };
7947
+ const readModelCoordinator = this.readModelCoordinator ? this.readModelCoordinator : this.readModelCoordinatorFactory ? await this.readModelCoordinatorFactory({
7948
+ eventBus,
7949
+ logger: this.logger,
7950
+ readModels: callerReadModels,
7951
+ subscriptionNotificationReadModel,
7952
+ processorManager,
7953
+ documentView,
7954
+ documentIndexer,
7955
+ createProjectionShardManager: (config) => this.createProjectionShardManager(config, eventBus, hostTrackers, false),
7956
+ registerShutdownHook: (hook) => this.shutdownHooks.push(hook)
7957
+ }) : this.projectionShardConfig ? await this.createProjectionShardManager(this.projectionShardConfig, eventBus, hostTrackers, true) : new ReadModelCoordinator(eventBus, readModelInstances, [subscriptionNotificationReadModel, processorManager]);
7924
7958
  const reactor = new Reactor(this.logger, documentModelRegistry, queue, jobTracker, readModelCoordinator, this.features, documentView, documentIndexer, operationStore, eventBus, executorManager);
7925
7959
  let syncModule = void 0;
7926
7960
  if (this.channelScheme) {
@@ -7989,15 +8023,28 @@ var ReactorBuilder = class {
7989
8023
  * models never index an operation, so the manager advances these from the
7990
8024
  * shards' relayed indexing reports; without them every read carrying a
7991
8025
  * consistency token waits forever.
8026
+ * @param registerShutdownHook Whether the builder owns `manager.shutdown()`
8027
+ * at signal time. False for the coordinator-factory path, whose factory
8028
+ * registers its own hook so host chains drain before the worker stops.
7992
8029
  */
7993
- async createProjectionShardManager(config, eventBus, consistencyTrackers) {
7994
- const baseDb = this.resolveReactorDbConfig();
7995
- if (!baseDb) throw new Error("withProjectionShards requires a db (or an executor worker pool configured with one); projection workers need connection info to open their own pools.");
8030
+ async createProjectionShardManager(config, eventBus, consistencyTrackers, registerShutdownHook) {
8031
+ const parentDb = this.resolveReactorDbConfig();
8032
+ const baseDb = config.db ?? parentDb;
8033
+ const caller = this.projectionShardConfig !== void 0 ? "withProjectionShards" : "withReadModelCoordinatorFactory";
8034
+ if (!baseDb) throw new Error(`${caller} requires a db (or an executor worker pool configured with one); projection workers need connection info to open their own pools.`);
8035
+ const workerDb = this.workerPool?.db;
8036
+ if (config.db && workerDb && !sameDatabaseTarget(workerDb, config.db)) throw new Error("withWorkerPool({ db }) and the projection worker db must address the same Postgres database (same host, port, and database); the parent writes operations there and the projection shards read them.");
8037
+ if (config.db && this.kyselyInstance === void 0) {
8038
+ if (!parentDb) throw new Error(`The projection worker db passed to ${caller} must also be the parent reactor's database, but nothing configures the parent: it would fall back to the default embedded database while the worker projects into Postgres. Pass the same { db } to withWorkerPool, or give the parent its connection with withKysely.`);
8039
+ if (!sameDatabaseTarget(config.db, parentDb)) throw new Error(`The projection worker db passed to ${caller} and the parent reactor database must address the same Postgres database (same host, port, and database); the parent writes operations there and the projection shards read them.`);
8040
+ }
8041
+ validateBuiltInKindCoverage(config.preReadyKinds, config.postReadyKinds);
8042
+ if (this.moduleOnlyModelKeys.length > 0) throw new Error(`projection workers require worker-importable sources, but these models were registered only as live modules: ${this.moduleOnlyModelKeys.join(", ")}. Provide a { filePath } or { packageName } source for each.`);
7996
8043
  const models = this.resolvedModelManifest ?? [];
7997
8044
  const db = {
7998
8045
  ...baseDb,
7999
8046
  poolSize: config.poolSize ?? baseDb.poolSize,
8000
- applicationName: "reactor-projection-shard"
8047
+ applicationName: config.db?.applicationName ?? "reactor-projection-shard"
8001
8048
  };
8002
8049
  const factory = this.projectionWorkerFactory ?? await this.createDefaultProjectionWorkerFactory();
8003
8050
  const poolInstrumentations = [];
@@ -8006,7 +8053,7 @@ var ReactorBuilder = class {
8006
8053
  poolInstrumentations.push(forwarder);
8007
8054
  this.instrumentedPools.push(forwarder);
8008
8055
  }
8009
- const { ProjectionShardManager } = await import("./projection-shard-manager-D6KYcEZi.js");
8056
+ const { ProjectionShardManager } = await import("./projection-shard-manager-CPQc5XHL.js");
8010
8057
  const manager = new ProjectionShardManager({
8011
8058
  shardCount: config.shardCount,
8012
8059
  db,
@@ -8021,10 +8068,21 @@ var ReactorBuilder = class {
8021
8068
  drainTimeoutMs: config.drainTimeoutMs,
8022
8069
  chainDepthReportIntervalMs: config.chainDepthReportIntervalMs,
8023
8070
  poolInstrumentations,
8024
- consistencyTrackers
8071
+ consistencyTrackers,
8072
+ onReadReady: config.onReadReady,
8073
+ onShardFatal: config.onShardFatal
8025
8074
  });
8026
- await manager.startup();
8027
- this.shutdownHooks.push(() => manager.shutdown());
8075
+ try {
8076
+ await manager.startup();
8077
+ } catch (error) {
8078
+ try {
8079
+ await manager.shutdown();
8080
+ } catch (shutdownError) {
8081
+ this.logger.warn("projection shard manager shutdown after a failed startup also failed: @error", shutdownError);
8082
+ }
8083
+ throw error;
8084
+ }
8085
+ if (registerShutdownHook) this.shutdownHooks.push(() => manager.shutdown());
8028
8086
  return manager;
8029
8087
  }
8030
8088
  async createDefaultProjectionWorkerFactory() {
@@ -8143,6 +8201,168 @@ var ReactorBuilder = class {
8143
8201
  }
8144
8202
  };
8145
8203
  //#endregion
8204
+ //#region src/projection/hybrid-projection-coordinator.ts
8205
+ /** Host-side stages on a per-queueKey chain driven by the worker's read-ready. */
8206
+ var HybridProjectionCoordinator = class {
8207
+ /** One array, mutated in place: reactor-api captures it by reference once. */
8208
+ readModels;
8209
+ eventBus;
8210
+ logger;
8211
+ manager;
8212
+ preReady;
8213
+ postReady;
8214
+ chains = /* @__PURE__ */ new Map();
8215
+ constructor(options) {
8216
+ this.eventBus = options.eventBus;
8217
+ this.logger = options.logger;
8218
+ this.manager = options.manager;
8219
+ this.preReady = options.preReady;
8220
+ this.postReady = options.postReady;
8221
+ this.readModels = [
8222
+ ...options.preReady,
8223
+ ...options.postReady,
8224
+ ...options.lookupOnly
8225
+ ];
8226
+ }
8227
+ start() {
8228
+ this.manager.start();
8229
+ }
8230
+ stop() {
8231
+ this.manager.stop();
8232
+ }
8233
+ /** Wired as `onReadReady`; host trackers are already advanced (port FIFO). */
8234
+ acceptReadReady(event) {
8235
+ if (event.operations.length === 0) {
8236
+ this.manager.emitReadReady(event).catch((err) => this.logger.error("JOB_READ_READY emit failed for job @jobId: @Error", { jobId: event.jobId }, err));
8237
+ return;
8238
+ }
8239
+ const enqueuedAt = performance.now();
8240
+ const key = this.queueKeyFor(event);
8241
+ const current = (this.chains.get(key) ?? Promise.resolve()).then(() => this.runHostChain(event, enqueuedAt));
8242
+ this.chains.set(key, current);
8243
+ current.finally(() => {
8244
+ if (this.chains.get(key) === current) this.chains.delete(key);
8245
+ });
8246
+ }
8247
+ addReadModel(readModel, stage) {
8248
+ if (this.readModels.some(({ name }) => name === readModel.name)) throw new Error(`Read model "${readModel.name}" is already registered`);
8249
+ if (stage === "pre_ready") this.preReady.push(readModel);
8250
+ else this.postReady.push(readModel);
8251
+ this.readModels.push(readModel);
8252
+ }
8253
+ getChainDepth() {
8254
+ return this.manager.getChainDepth() + this.chains.size;
8255
+ }
8256
+ /** Worker chains flush first, so every relayed read-ready is in `chains`. */
8257
+ async drain() {
8258
+ await this.manager.drain();
8259
+ while (this.chains.size > 0) {
8260
+ const pending = Array.from(this.chains.values());
8261
+ await Promise.allSettled(pending);
8262
+ }
8263
+ }
8264
+ /** Builder shutdown hook; reaches `manager.shutdown()` even when drain fails. */
8265
+ async shutdown() {
8266
+ try {
8267
+ await this.drain();
8268
+ } catch (error) {
8269
+ this.logger.warn("hybrid coordinator drain failed during shutdown: @Error", error);
8270
+ }
8271
+ await this.manager.shutdown();
8272
+ }
8273
+ async runHostChain(event, enqueuedAt) {
8274
+ const chainWaitDurationMs = performance.now() - enqueuedAt;
8275
+ const preReadyStart = performance.now();
8276
+ try {
8277
+ await Promise.all(this.preReady.map((readModel) => this.indexWithTiming(readModel, "pre_ready", event)));
8278
+ } catch (error) {
8279
+ this.logger.error("Host pre-ready read model indexing failed for job @jobId: @Error", { jobId: event.jobId }, error);
8280
+ }
8281
+ const preReadyDurationMs = performance.now() - preReadyStart;
8282
+ const emitStart = performance.now();
8283
+ try {
8284
+ await this.manager.emitReadReady(event);
8285
+ } catch (error) {
8286
+ this.logger.error("JOB_READ_READY emit failed for job @jobId: @Error", { jobId: event.jobId }, error);
8287
+ }
8288
+ const emitDurationMs = performance.now() - emitStart;
8289
+ const postReadyStart = performance.now();
8290
+ try {
8291
+ await Promise.all(this.postReady.map((readModel) => this.indexWithTiming(readModel, "post_ready", event)));
8292
+ } catch (error) {
8293
+ this.logger.error("Host post-ready read model indexing failed for job @jobId: @Error", { jobId: event.jobId }, error);
8294
+ }
8295
+ const postReadyDurationMs = performance.now() - postReadyStart;
8296
+ this.emitBatchCompleted({
8297
+ jobId: event.jobId,
8298
+ batchSize: event.operations.length,
8299
+ chainWaitDurationMs,
8300
+ preReadyDurationMs,
8301
+ emitDurationMs,
8302
+ postReadyDurationMs
8303
+ });
8304
+ }
8305
+ async indexWithTiming(readModel, stage, event) {
8306
+ const start = performance.now();
8307
+ let success = false;
8308
+ try {
8309
+ await readModel.indexOperations(event.operations);
8310
+ success = true;
8311
+ } finally {
8312
+ this.emitReadModelIndexed({
8313
+ jobId: event.jobId,
8314
+ readModelName: readModel.name,
8315
+ stage,
8316
+ durationMs: performance.now() - start,
8317
+ operationCount: event.operations.length,
8318
+ success
8319
+ });
8320
+ }
8321
+ }
8322
+ emitBatchCompleted(payload) {
8323
+ this.eventBus.emit(ReactorEventTypes.READMODEL_BATCH_COMPLETED, payload).catch((err) => this.logger.error("READMODEL_BATCH_COMPLETED emit failed for job @jobId: @Error", { jobId: payload.jobId }, err));
8324
+ }
8325
+ emitReadModelIndexed(payload) {
8326
+ this.eventBus.emit(ReactorEventTypes.READMODEL_INDEXED, payload).catch((err) => this.logger.error("READMODEL_INDEXED emit failed for job @jobId: @Error", { jobId: payload.jobId }, err));
8327
+ }
8328
+ queueKeyFor(event) {
8329
+ const ctx = event.operations[0].context;
8330
+ return `${ctx.documentId}:${ctx.scope}:${ctx.branch}`;
8331
+ }
8332
+ };
8333
+ //#endregion
8334
+ //#region src/projection/create-hybrid-projection-coordinator.ts
8335
+ /** Built-ins in one projection worker; all other read models stay on the host. */
8336
+ function createHybridProjectionCoordinatorFactory(options = {}) {
8337
+ return async (deps) => {
8338
+ const ref = { current: void 0 };
8339
+ const manager = await deps.createProjectionShardManager({
8340
+ shardCount: options.shardCount ?? 1,
8341
+ preReadyKinds: ["document-view", "document-indexer"],
8342
+ postReadyKinds: [],
8343
+ db: options.db,
8344
+ poolSize: options.poolSize,
8345
+ initTimeoutMs: options.initTimeoutMs,
8346
+ shutdownGraceMs: options.shutdownGraceMs,
8347
+ drainTimeoutMs: options.drainTimeoutMs,
8348
+ chainDepthReportIntervalMs: options.chainDepthReportIntervalMs,
8349
+ onReadReady: (event) => ref.current.acceptReadReady(event),
8350
+ onShardFatal: options.onFatal
8351
+ });
8352
+ const coordinator = new HybridProjectionCoordinator({
8353
+ eventBus: deps.eventBus,
8354
+ logger: deps.logger,
8355
+ manager,
8356
+ preReady: deps.readModels,
8357
+ postReady: [deps.subscriptionNotificationReadModel, deps.processorManager],
8358
+ lookupOnly: [deps.documentView, deps.documentIndexer]
8359
+ });
8360
+ ref.current = coordinator;
8361
+ deps.registerShutdownHook(() => coordinator.shutdown());
8362
+ return coordinator;
8363
+ };
8364
+ }
8365
+ //#endregion
8146
8366
  //#region src/signer/passthrough-signer.ts
8147
8367
  /**
8148
8368
  * A no-op signer that returns empty values for all methods.
@@ -8572,6 +8792,6 @@ var DocumentIntegrityService = class {
8572
8792
  }
8573
8793
  };
8574
8794
  //#endregion
8575
- export { ALWAYS_READABLE_SCOPES, APPEND_CONDITION_FAILED_PREFIX, AppendConditionFailedError, AuthEnforcementDisabledError, BareReadGate, BaseReadModel, ChannelError, ChannelErrorSource, ChannelScheme, ConsistencyTracker, DEFAULT_DRIVE_CONTAINER_TYPES, DOCUMENT_INDEXER_READ_MODEL, DOCUMENT_VIEW_READ_MODEL, DRIVE_AUTH_ERROR_MESSAGES, DefaultSubscriptionErrorHandler, DocumentAlreadyExistsError, DocumentChangeType, DocumentExistence, DocumentIntegrityService, DocumentModelRegistry, DocumentModelResolver, DriveClient, DriveCollectionId, DuplicateManifestError, DuplicateModuleError, DuplicateOperationError, EventBus, EventBusAggregateError, GqlRequestChannel, GqlRequestChannelFactory, GqlResponseChannel, GqlResponseChannelFactory, SimpleJobExecutor as InMemoryJobExecutor, SimpleJobExecutor, InMemoryJobTracker, InMemoryQueue, IntervalPollTimer, InvalidModuleError, JobAwaiter, JobExecutorEventTypes, JobStatus, KyselyDocumentIndexer, KyselyDocumentView, KyselyKeyframeStore, KyselyOperationStore, KyselySyncCursorStorage, KyselySyncRemoteStorage, KyselyWriteCache, Mailbox, ModelReadGate, ModuleNotFoundError, NullDocumentModelResolver, OptimisticLockError, PollBehavior, PollingChannelError, ProcessorManager, PropagationMode, QueueEventTypes, REACTOR_SCHEMA, RECOVERABLE_GRAPHQL_ERROR_CODES, Reactor, ReactorBuilder, ReactorClient, ReactorClientBuilder, ReactorEventTypes, ReactorSubscriptionManager, ReadModelCoordinator, RelationalDbProcessor, RelationshipChangeType, RetryAccounting, RevisionMismatchError, SeededStateReader, SimpleJobExecutorManager, SyncBuilder, SyncEventTypes, SyncOperation, SyncOperationAggregateError, SyncOperationStatus, SyncScopeGate, SyncStatus, SyncStatusTracker, addRelationshipAction, authDecisionModel, batchOperationsByDocument, buildDecisionModel, classifyJobFailure, consolidateSyncOperations, createDocumentAction, createForwardingLogger, createMutableShutdownStatus, createReactorHostModuleBase, createRelationalDb, decideAtHead, deleteDocumentAction, documentActions, documentDecisionModel, driveIdFromUrl, envelopesToSyncOperations, errorToInfo, firstOutOfOrderPair, getMigrationStatus, instrumentPgPool, isDriveAuthError, isRecoverableGraphQLError, makeConsistencyKey, parseDriveUrl, parsePagingOptions, quarantinesDocument, readDecisionModel, removeRelationshipAction, runMigrations, sanitizeArg, selectDecisionModel, supportsLiveReadModelRegistration, syncOperationErrorType, trimMailboxFromAckOrdinal, updateRelationshipAction, upgradeDocumentAction, workerEntryPath };
8795
+ export { ALWAYS_READABLE_SCOPES, APPEND_CONDITION_FAILED_PREFIX, AppendConditionFailedError, AuthEnforcementDisabledError, BareReadGate, BaseReadModel, ChannelError, ChannelErrorSource, ChannelScheme, ConsistencyTracker, DEFAULT_DRIVE_CONTAINER_TYPES, DOCUMENT_INDEXER_READ_MODEL, DOCUMENT_VIEW_READ_MODEL, DRIVE_AUTH_ERROR_MESSAGES, DefaultSubscriptionErrorHandler, DocumentAlreadyExistsError, DocumentChangeType, DocumentExistence, DocumentIntegrityService, DocumentModelRegistry, DocumentModelResolver, DriveClient, DriveCollectionId, DuplicateManifestError, DuplicateModuleError, DuplicateOperationError, EventBus, EventBusAggregateError, GqlRequestChannel, GqlRequestChannelFactory, GqlResponseChannel, GqlResponseChannelFactory, HybridProjectionCoordinator, SimpleJobExecutor as InMemoryJobExecutor, SimpleJobExecutor, InMemoryJobTracker, InMemoryQueue, IntervalPollTimer, InvalidModuleError, JobAwaiter, JobExecutorEventTypes, JobStatus, KyselyDocumentIndexer, KyselyDocumentView, KyselyKeyframeStore, KyselyOperationStore, KyselySyncCursorStorage, KyselySyncRemoteStorage, KyselyWriteCache, Mailbox, ModelReadGate, ModuleNotFoundError, NullDocumentModelResolver, OptimisticLockError, PollBehavior, PollingChannelError, ProcessorManager, PropagationMode, QueueEventTypes, REACTOR_SCHEMA, RECOVERABLE_GRAPHQL_ERROR_CODES, Reactor, ReactorBuilder, ReactorClient, ReactorClientBuilder, ReactorEventTypes, ReactorSubscriptionManager, ReadModelCoordinator, RelationalDbProcessor, RelationshipChangeType, RetryAccounting, RevisionMismatchError, SeededStateReader, SimpleJobExecutorManager, SyncBuilder, SyncEventTypes, SyncOperation, SyncOperationAggregateError, SyncOperationStatus, SyncScopeGate, SyncStatus, SyncStatusTracker, addRelationshipAction, authDecisionModel, batchOperationsByDocument, buildDecisionModel, classifyJobFailure, consolidateSyncOperations, createDocumentAction, createForwardingLogger, createHybridProjectionCoordinatorFactory, createMutableShutdownStatus, createReactorHostModuleBase, createRelationalDb, decideAtHead, deleteDocumentAction, documentActions, documentDecisionModel, driveIdFromUrl, envelopesToSyncOperations, errorToInfo, firstOutOfOrderPair, getMigrationStatus, instrumentPgPool, isDriveAuthError, isRecoverableGraphQLError, makeConsistencyKey, parseDriveUrl, parsePagingOptions, quarantinesDocument, readDecisionModel, removeRelationshipAction, runMigrations, sanitizeArg, selectDecisionModel, supportsLiveReadModelRegistration, syncOperationErrorType, trimMailboxFromAckOrdinal, updateRelationshipAction, upgradeDocumentAction, workerEntryPath };
8576
8796
 
8577
8797
  //# sourceMappingURL=index.js.map