@powerhousedao/reactor 6.2.3-dev.24 → 6.2.3-dev.26

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.
Files changed (39) hide show
  1. package/dist/{build-worker-executor-DxmDJ4QQ.js → build-worker-executor-Bvoba-AV.js} +4 -4
  2. package/dist/{build-worker-executor-DxmDJ4QQ.js.map → build-worker-executor-Bvoba-AV.js.map} +1 -1
  3. package/dist/{document-indexer-Dn9RB0sg.js → document-indexer-BVTGbEB0.js} +22 -21
  4. package/dist/document-indexer-BVTGbEB0.js.map +1 -0
  5. package/dist/entry.d.ts +2 -1
  6. package/dist/entry.js +2 -3
  7. package/dist/entry.js.map +1 -1
  8. package/dist/{errors-D3S6Eysd.js → errors-BM_ULVWd.js} +9 -1
  9. package/dist/{errors-D3S6Eysd.js.map → errors-BM_ULVWd.js.map} +1 -1
  10. package/dist/{drive-container-types-Be5-EY9W.js → forwarding-logger-CnuVDVze.js} +303 -53
  11. package/dist/forwarding-logger-CnuVDVze.js.map +1 -0
  12. package/dist/index.d.ts +474 -307
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +700 -366
  15. package/dist/index.js.map +1 -1
  16. package/dist/projection-entry.d.ts +2 -1
  17. package/dist/projection-entry.js +7 -13
  18. package/dist/projection-entry.js.map +1 -1
  19. package/dist/{projection-shard-manager-mQhfVipO.js → projection-shard-manager-BpcqDtnQ.js} +2 -3
  20. package/dist/{projection-shard-manager-mQhfVipO.js.map → projection-shard-manager-BpcqDtnQ.js.map} +1 -1
  21. package/dist/{projection-worker-wI4PwcV2.js → projection-worker-D8uNFdwX.js} +1 -1
  22. package/dist/{projection-worker-wI4PwcV2.js.map → projection-worker-D8uNFdwX.js.map} +1 -1
  23. package/dist/{transport-CuogVKN_.js → transport-B3G50KVd.js} +1 -1
  24. package/dist/{transport-CuogVKN_.js.map → transport-B3G50KVd.js.map} +1 -1
  25. package/dist/{transport-ByGviWdZ.js → transport-CZDHzfvy.js} +1 -1
  26. package/dist/{transport-ByGviWdZ.js.map → transport-CZDHzfvy.js.map} +1 -1
  27. package/dist/{worker-handle-B3p-nuqG.js → worker-handle-C2rLUHwv.js} +9 -8
  28. package/dist/{worker-handle-B3p-nuqG.js.map → worker-handle-C2rLUHwv.js.map} +1 -1
  29. package/package.json +14 -7
  30. package/dist/document-indexer-Dn9RB0sg.js.map +0 -1
  31. package/dist/drive-container-types-Be5-EY9W.js.map +0 -1
  32. package/dist/error-info-Cpu4OY3o.js +0 -62
  33. package/dist/error-info-Cpu4OY3o.js.map +0 -1
  34. package/dist/forwarding-logger-BBkMSxuJ.js +0 -85
  35. package/dist/forwarding-logger-BBkMSxuJ.js.map +0 -1
  36. package/dist/types-DxDCmtId.js +0 -34
  37. package/dist/types-DxDCmtId.js.map +0 -1
  38. package/dist/worker-BDVzCtuf.js +0 -22
  39. package/dist/worker-BDVzCtuf.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { Action, ActionSigner, AuthRequest, AuthSubject, CreateDocumentActionInput, DocumentModelModule, ISigner, Operation, OperationContext, OperationOutcome, OperationWithContext, OperationWithContext as OperationWithContext$1, PHAuthState, PHDocument, PHDocumentState, SignaturePolicy, SignatureVerificationHandler, UpgradeDocumentActionInput, UpgradeManifest, UpgradeReducer, UpgradeTransition, actions as documentActions } from "@powerhousedao/shared/document-model";
2
2
  import { DocumentDriveDocument, DriveInput, FolderNode, Node } from "@powerhousedao/shared/document-drive";
3
3
  import { ILogger } from "document-model";
4
- import * as kysely from "kysely";
5
4
  import { Generated, Insertable, Kysely, Transaction } from "kysely";
6
5
  import { IProcessor, IProcessorHostModuleBase, IProcessorHostModuleBase as IProcessorHostModuleBase$1, IProcessorManager, IProcessorManager as IProcessorManager$1, IRelationalDb, ProcessorApp, ProcessorFactory, ProcessorFactory as ProcessorFactory$1, ProcessorFactoryBuilder, ProcessorFilter, ProcessorRecord, ProcessorRecord as ProcessorRecord$1, ProcessorStatus, RelationalDbProcessor, TrackedProcessor, TrackedProcessor as TrackedProcessor$1, createRelationalDb } from "@powerhousedao/shared/processors";
6
+ import "node:worker_threads";
7
7
  import { Pool } from "pg";
8
-
9
8
  //#region src/attachments/types.d.ts
10
9
  /**
11
10
  * Content hash of the attachment data. This is the primary identifier.
@@ -29,15 +28,15 @@ type AttachmentRef = `attachment://v${number}:${string}`;
29
28
  /**
30
29
  * Creates a CREATE_DOCUMENT action for document creation.
31
30
  */
32
- declare function createDocumentAction(input: CreateDocumentActionInput): Action;
31
+ export declare function createDocumentAction(input: CreateDocumentActionInput): Action;
33
32
  /**
34
33
  * Creates an UPGRADE_DOCUMENT action to set initial document state.
35
34
  */
36
- declare function upgradeDocumentAction(input: UpgradeDocumentActionInput): Action;
35
+ export declare function upgradeDocumentAction(input: UpgradeDocumentActionInput): Action;
37
36
  /**
38
37
  * Creates a DELETE_DOCUMENT action for document deletion.
39
38
  */
40
- declare function deleteDocumentAction(documentId: string): Action;
39
+ export declare function deleteDocumentAction(documentId: string): Action;
41
40
  /**
42
41
  * Creates an ADD_RELATIONSHIP action that records a directed edge from
43
42
  * `sourceId` to `targetId` with an arbitrary `relationshipType` and optional
@@ -45,16 +44,16 @@ declare function deleteDocumentAction(documentId: string): Action;
45
44
  * define their own type strings such as `"drive/child"` and attach
46
45
  * domain-specific metadata.
47
46
  */
48
- declare function addRelationshipAction(sourceId: string, targetId: string, relationshipType: string, metadata?: Record<string, unknown>): Action;
47
+ export declare function addRelationshipAction(sourceId: string, targetId: string, relationshipType: string, metadata?: Record<string, unknown>): Action;
49
48
  /**
50
49
  * Creates an UPDATE_RELATIONSHIP action to replace a relationship's metadata
51
50
  * without losing its createdAt ordering.
52
51
  */
53
- declare function updateRelationshipAction(sourceId: string, targetId: string, relationshipType: string, metadata: Record<string, unknown> | null): Action;
52
+ export declare function updateRelationshipAction(sourceId: string, targetId: string, relationshipType: string, metadata: Record<string, unknown> | null): Action;
54
53
  /**
55
54
  * Creates a REMOVE_RELATIONSHIP action to remove a parent-child relationship.
56
55
  */
57
- declare function removeRelationshipAction(sourceId: string, targetId: string, relationshipType?: string): Action;
56
+ export declare function removeRelationshipAction(sourceId: string, targetId: string, relationshipType?: string): Action;
58
57
  //#endregion
59
58
  //#region src/queue/types.d.ts
60
59
  /**
@@ -83,7 +82,7 @@ declare enum JobQueueState {
83
82
  * - `ExemptFromLimit`: not a fault, so the attempt is not charged to the job.
84
83
  * Used for concurrency conflicts, where the retry does new work.
85
84
  */
86
- declare enum RetryAccounting {
85
+ export declare enum RetryAccounting {
87
86
  CountAgainstLimit = "count-against-limit",
88
87
  ExemptFromLimit = "exempt-from-limit"
89
88
  }
@@ -102,25 +101,39 @@ interface IJobExecutionHandle {
102
101
  * Represents a job to be executed by the job executor
103
102
  */
104
103
  type Job = {
105
- /** Unique identifier for the job */id: string; /** Classification of the job so executors can switch behavior */
106
- kind: JobKind; /** The document ID this job operates on */
107
- documentId: string; /** The scope of the operations */
108
- scope: string; /** The branch of the operations */
109
- branch: string; /** The actions to be executed (processed sequentially) */
110
- actions: Action[]; /** Pre-existing operations to import (used for load jobs) */
111
- operations: Operation[]; /** Timestamp when the job was created */
112
- createdAt: string; /** The hint for the queue to use for ordering the job */
113
- queueHint: string[]; /** Number of retry attempts */
114
- retryCount?: number; /** Maximum number of retries allowed */
115
- maxRetries?: number; /** Last error if job failed */
116
- lastError?: ErrorInfo$1; /** History of all errors from each attempt (ordered) */
117
- errorHistory: ErrorInfo$1[]; /** Metadata that flows through the job lifecycle */
104
+ /** Unique identifier for the job */
105
+ id: string;
106
+ /** Classification of the job so executors can switch behavior */
107
+ kind: JobKind;
108
+ /** The document ID this job operates on */
109
+ documentId: string;
110
+ /** The scope of the operations */
111
+ scope: string;
112
+ /** The branch of the operations */
113
+ branch: string;
114
+ /** The actions to be executed (processed sequentially) */
115
+ actions: Action[];
116
+ /** Pre-existing operations to import (used for load jobs) */
117
+ operations: Operation[];
118
+ /** Timestamp when the job was created */
119
+ createdAt: string;
120
+ /** The hint for the queue to use for ordering the job */
121
+ queueHint: string[];
122
+ /** Number of retry attempts */
123
+ retryCount?: number;
124
+ /** Maximum number of retries allowed */
125
+ maxRetries?: number;
126
+ /** Last error if job failed */
127
+ lastError?: ErrorInfo$1;
128
+ /** History of all errors from each attempt (ordered) */
129
+ errorHistory: ErrorInfo$1[];
130
+ /** Metadata that flows through the job lifecycle */
118
131
  meta: JobMeta;
119
132
  };
120
133
  /**
121
134
  * Event types for the queue system
122
135
  */
123
- declare const QueueEventTypes: {
136
+ export declare const QueueEventTypes: {
124
137
  readonly JOB_AVAILABLE: 10000;
125
138
  };
126
139
  /**
@@ -181,14 +194,14 @@ type ShutdownStatus = {
181
194
  /**
182
195
  * Enum that determines deletion propagation.
183
196
  */
184
- declare enum PropagationMode {
197
+ export declare enum PropagationMode {
185
198
  None = "none",
186
199
  Cascade = "cascade"
187
200
  }
188
201
  /**
189
202
  * Enum that describes the type of relationship change.
190
203
  */
191
- declare enum RelationshipChangeType {
204
+ export declare enum RelationshipChangeType {
192
205
  Added = "added",
193
206
  Removed = "removed"
194
207
  }
@@ -211,7 +224,8 @@ type JobMeta = BatchMeta & Record<string, unknown>;
211
224
  */
212
225
  type SubmittedActionResult = {
213
226
  actionId: string;
214
- scope: string; /** The index the operation occupies in its scope. */
227
+ scope: string;
228
+ /** The index the operation occupies in its scope. */
215
229
  index: number;
216
230
  } & OperationOutcome;
217
231
  /**
@@ -223,14 +237,17 @@ type SubmittedActionResult = {
223
237
  * actions was rejected.
224
238
  */
225
239
  type JobResultSummary = {
226
- /** One entry per submitted action that produced an operation, in write order. */actions: SubmittedActionResult[]; /** False when any submitted action hit a reducer error or was denied. */
240
+ /** One entry per submitted action that produced an operation, in write order. */
241
+ actions: SubmittedActionResult[];
242
+ /** False when any submitted action hit a reducer error or was denied. */
227
243
  allApplied: boolean;
228
244
  };
229
245
  /**
230
246
  * Describes the current state of a job.
231
247
  */
232
248
  type JobInfo = {
233
- id: string; /** The document this job operates on; empty string when the job is unknown. */
249
+ id: string;
250
+ /** The document this job operates on; empty string when the job is unknown. */
234
251
  documentId: string;
235
252
  status: JobStatus;
236
253
  createdAtUtcIso: string;
@@ -259,7 +276,7 @@ type JobInfo = {
259
276
  /**
260
277
  * Job execution statuses
261
278
  */
262
- declare enum JobStatus {
279
+ export declare enum JobStatus {
263
280
  /** Job is queued but not yet started */
264
281
  PENDING = "PENDING",
265
282
  /** Job is currently being executed */
@@ -311,7 +328,6 @@ type PagedResults<T> = {
311
328
  options: PagingOptions;
312
329
  next?: () => Promise<PagedResults<T>>;
313
330
  nextCursor?: string;
314
- totalCount?: number;
315
331
  };
316
332
  /**
317
333
  * A string key in the format `documentId:scope:branch` used to identify a consistency checkpoint.
@@ -391,10 +407,10 @@ type ReadModelRegistrationStage = "pre_ready" | "post_ready";
391
407
  interface ILiveReadModelCoordinator extends IReadModelCoordinator {
392
408
  addReadModel(readModel: IReadModel, stage: ReadModelRegistrationStage): void;
393
409
  }
394
- declare function supportsLiveReadModelRegistration(coordinator: IReadModelCoordinator): coordinator is ILiveReadModelCoordinator;
410
+ export declare function supportsLiveReadModelRegistration(coordinator: IReadModelCoordinator): coordinator is ILiveReadModelCoordinator;
395
411
  //#endregion
396
412
  //#region src/sync/types.d.ts
397
- declare enum ChannelScheme {
413
+ export declare enum ChannelScheme {
398
414
  CONNECT = "connect",
399
415
  SWITCHBOARD = "switchboard"
400
416
  }
@@ -410,7 +426,7 @@ type JwtHandler = (url: string) => Promise<string | undefined>;
410
426
  * - `Manual`: the channel registers and connects but never ticks on its own.
411
427
  * Callers must invoke ISyncManager.triggerPull(name) to fetch.
412
428
  */
413
- declare enum PollBehavior {
429
+ export declare enum PollBehavior {
414
430
  Auto = "auto",
415
431
  Manual = "manual"
416
432
  }
@@ -459,26 +475,30 @@ type SyncEnvelope = {
459
475
  key?: string;
460
476
  dependsOn?: string[];
461
477
  };
462
- declare enum SyncOperationStatus {
478
+ export declare enum SyncOperationStatus {
463
479
  Unknown = -1,
464
480
  TransportPending = 0,
465
481
  ExecutionPending = 1,
466
482
  Applied = 2,
467
483
  Error = 3
468
484
  }
469
- declare enum ChannelErrorSource {
485
+ export declare enum ChannelErrorSource {
470
486
  None = "none",
471
487
  Channel = "channel",
472
488
  Inbox = "inbox",
473
489
  Outbox = "outbox"
474
490
  }
475
- type SyncOperationErrorType = "SIGNATURE_INVALID" | "HASH_MISMATCH" | "LIBRARY_ERROR" | "MISSING_OPERATIONS" | "EXCESSIVE_SHUFFLE" | "GRACEFUL_ABORT"
491
+ type SyncOperationErrorType = "SIGNATURE_INVALID" | "HASH_MISMATCH" | "LIBRARY_ERROR" | "MISSING_OPERATIONS" | "EXCESSIVE_SHUFFLE" | "GRACEFUL_ABORT" |
476
492
  /**
477
493
  * An arriving auth operation did not exceed the local auth head. Exempt from
478
494
  * quarantine, because reconciling the two policies needs the traffic a
479
495
  * quarantine would stop.
480
496
  */
481
- | "AUTH_TIMESTAMP_NOT_MONOTONIC" /** An arriving operation carried a timestamp that is not an ISO-8601 instant. */ | "INVALID_TIMESTAMP" /** No classification applies, including rows written before the field. */ | "UNCLASSIFIED";
497
+ "AUTH_TIMESTAMP_NOT_MONOTONIC" |
498
+ /** An arriving operation carried a timestamp that is not an ISO-8601 instant. */
499
+ "INVALID_TIMESTAMP" |
500
+ /** No classification applies, including rows written before the field. */
501
+ "UNCLASSIFIED";
482
502
  type ChannelHealth = {
483
503
  state: "idle" | "running" | "error";
484
504
  lastSuccessUtcMs?: number;
@@ -527,7 +547,7 @@ type RemoteRecord = {
527
547
  * These events track the sync progress of a job's operations to remotes.
528
548
  * Uses a separate namespace (20000 range) from ReactorEventTypes (10000 range).
529
549
  */
530
- declare const SyncEventTypes: {
550
+ export declare const SyncEventTypes: {
531
551
  readonly SYNC_PENDING: 20001;
532
552
  readonly SYNC_SUCCEEDED: 20002;
533
553
  readonly SYNC_FAILED: 20003;
@@ -602,27 +622,27 @@ type SyncResult = {
602
622
  /**
603
623
  * Thrown when an operation with the same identity already exists in the store.
604
624
  */
605
- declare class DuplicateOperationError extends Error {
625
+ export declare class DuplicateOperationError extends Error {
606
626
  constructor(description: string);
607
627
  }
608
628
  /**
609
629
  * Thrown when a concurrent write conflict is detected during an atomic apply.
610
630
  */
611
- declare class OptimisticLockError extends Error {
631
+ export declare class OptimisticLockError extends Error {
612
632
  constructor(message: string);
613
633
  }
614
634
  /**
615
635
  * Thrown when the caller-provided revision does not match the current
616
636
  * stored revision, indicating a stale read.
617
637
  */
618
- declare class RevisionMismatchError extends Error {
638
+ export declare class RevisionMismatchError extends Error {
619
639
  constructor(expected: number, actual: number);
620
640
  }
621
641
  /**
622
642
  * A create based on an empty stream that already has operations: the id is
623
643
  * taken, and no retry can resolve it. Matched by `name`, all the RPC boundary keeps.
624
644
  */
625
- declare class DocumentAlreadyExistsError extends Error {
645
+ export declare class DocumentAlreadyExistsError extends Error {
626
646
  readonly documentId: string;
627
647
  constructor(documentId: string, scope: string, headRevision: number);
628
648
  static isError(error: unknown): error is DocumentAlreadyExistsError;
@@ -645,12 +665,12 @@ type AppendCondition = {
645
665
  streams: AppendConditionStream[];
646
666
  };
647
667
  /** Error history keeps messages, not classes, so failures match by prefix. */
648
- declare const APPEND_CONDITION_FAILED_PREFIX = "Append condition failed: ";
668
+ export declare const APPEND_CONDITION_FAILED_PREFIX = "Append condition failed: ";
649
669
  /**
650
670
  * A read-set stream grew before the append committed. A concurrency
651
671
  * conflict, not a fault: the caller retries against the new stream heads.
652
672
  */
653
- declare class AppendConditionFailedError extends Error {
673
+ export declare class AppendConditionFailedError extends Error {
654
674
  readonly condition: AppendCondition;
655
675
  constructor(condition: AppendCondition);
656
676
  static isError(error: unknown): error is AppendConditionFailedError;
@@ -670,7 +690,9 @@ interface AtomicTxn {
670
690
  * revision field and lastModified timestamp.
671
691
  */
672
692
  type DocumentRevisions = {
673
- /** Map of scope to operation index for that scope */revision: Record<string, number>; /** The largest operation timestamp in the document, across every scope. */
693
+ /** Map of scope to operation index for that scope */
694
+ revision: Record<string, number>;
695
+ /** The largest operation timestamp in the document, across every scope. */
674
696
  latestTimestamp: string;
675
697
  };
676
698
  /**
@@ -876,7 +898,7 @@ interface OperationFilter {
876
898
  /**
877
899
  * Which sense of "exists" a caller of {@link IDocumentView.exists} means.
878
900
  */
879
- declare enum DocumentExistence {
901
+ export declare enum DocumentExistence {
880
902
  /**
881
903
  * A document that is present and not deleted. This is the question a read
882
904
  * asks: a deleted document is not readable, so it does not exist.
@@ -1232,7 +1254,8 @@ type DeadLetterRecord = {
1232
1254
  branch: string;
1233
1255
  operations: OperationWithContext$1[];
1234
1256
  errorSource: ChannelErrorSource;
1235
- errorMessage: string; /** Why it failed, in the closed set sync classifies failures into. */
1257
+ errorMessage: string;
1258
+ /** Why it failed, in the closed set sync classifies failures into. */
1236
1259
  errorType: SyncOperationErrorType;
1237
1260
  };
1238
1261
  /**
@@ -1353,7 +1376,7 @@ interface IOperationIndex {
1353
1376
  * `driveCollectionId(branch, driveId)` output, so existing `document_collections`
1354
1377
  * rows and persisted remotes remain valid without migration.
1355
1378
  */
1356
- declare class DriveCollectionId {
1379
+ export declare class DriveCollectionId {
1357
1380
  readonly driveId: string;
1358
1381
  readonly branch: string;
1359
1382
  private constructor();
@@ -1374,16 +1397,22 @@ declare class DriveCollectionId {
1374
1397
  * Configuration options for the write cache
1375
1398
  */
1376
1399
  type WriteCacheConfig = {
1377
- /** Maximum number of document streams to cache (LRU eviction). Default: 1000 */maxDocuments: number; /** Number of snapshots to keep in each document's ring buffer. Default: 10 */
1378
- ringBufferSize: number; /** Persist a keyframe snapshot every N revisions. Default: 10 */
1400
+ /** Maximum number of document streams to cache (LRU eviction). Default: 1000 */
1401
+ maxDocuments: number;
1402
+ /** Number of snapshots to keep in each document's ring buffer. Default: 10 */
1403
+ ringBufferSize: number;
1404
+ /** Persist a keyframe snapshot every N revisions. Default: 10 */
1379
1405
  keyframeInterval: number;
1380
1406
  };
1381
1407
  /**
1382
1408
  * Unique identifier for a document stream
1383
1409
  */
1384
1410
  type DocumentStreamKey = {
1385
- /** Document identifier */documentId: string; /** Operation scope */
1386
- scope: string; /** Branch name */
1411
+ /** Document identifier */
1412
+ documentId: string;
1413
+ /** Operation scope */
1414
+ scope: string;
1415
+ /** Branch name */
1387
1416
  branch: string;
1388
1417
  };
1389
1418
  /**
@@ -1402,15 +1431,20 @@ declare enum SnapshotPosition {
1402
1431
  * A cached document snapshot at a specific revision
1403
1432
  */
1404
1433
  type CachedSnapshot = {
1405
- /** The revision number of this snapshot */revision: number; /** The document state at this revision */
1406
- document: PHDocument; /** Where this snapshot sat in the stream when it was stored */
1434
+ /** The revision number of this snapshot */
1435
+ revision: number;
1436
+ /** The document state at this revision */
1437
+ document: PHDocument;
1438
+ /** Where this snapshot sat in the stream when it was stored */
1407
1439
  position: SnapshotPosition;
1408
1440
  };
1409
1441
  /**
1410
1442
  * Serialized keyframe snapshot for K/V store persistence
1411
1443
  */
1412
1444
  type KeyframeSnapshot = {
1413
- /** The revision number of this keyframe */revision: number; /** Serialized document state */
1445
+ /** The revision number of this keyframe */
1446
+ revision: number;
1447
+ /** Serialized document state */
1414
1448
  document: string;
1415
1449
  };
1416
1450
  //#endregion
@@ -1556,7 +1590,8 @@ type CachedDocumentMeta = {
1556
1590
  /**
1557
1591
  * The document type (from header), cached for convenience.
1558
1592
  */
1559
- documentType: string; /** From the CREATE_DOCUMENT input, which fixes them for the document's life. */
1593
+ documentType: string;
1594
+ /** From the CREATE_DOCUMENT input, which fixes them for the document's life. */
1560
1595
  protocolVersions: {
1561
1596
  [protocol: string]: number;
1562
1597
  } | undefined;
@@ -2015,7 +2050,7 @@ type DocumentStream = {
2015
2050
  * await cache.shutdown();
2016
2051
  * ```
2017
2052
  */
2018
- declare class KyselyWriteCache implements IWriteCache {
2053
+ export declare class KyselyWriteCache implements IWriteCache {
2019
2054
  private streams;
2020
2055
  private lruTracker;
2021
2056
  private keyframeStore;
@@ -2174,7 +2209,7 @@ declare class KyselyWriteCache implements IWriteCache {
2174
2209
  }
2175
2210
  //#endregion
2176
2211
  //#region src/storage/kysely/store.d.ts
2177
- declare class KyselyOperationStore implements IOperationStore {
2212
+ export declare class KyselyOperationStore implements IOperationStore {
2178
2213
  private db;
2179
2214
  private trx?;
2180
2215
  constructor(db: Kysely<Database$1>);
@@ -2226,7 +2261,7 @@ declare class KyselyOperationStore implements IOperationStore {
2226
2261
  }
2227
2262
  //#endregion
2228
2263
  //#region src/storage/kysely/keyframe-store.d.ts
2229
- declare class KyselyKeyframeStore implements IKeyframeStore {
2264
+ export declare class KyselyKeyframeStore implements IKeyframeStore {
2230
2265
  private db;
2231
2266
  private trx?;
2232
2267
  constructor(db: Kysely<Database$1>);
@@ -2263,17 +2298,24 @@ interface IExecutionScope {
2263
2298
  * Represents the result of a job execution
2264
2299
  */
2265
2300
  type JobResult = {
2266
- /** The job that was executed */job: Job; /** Whether the job executed successfully */
2267
- success: boolean; /** Error if the job failed */
2268
- error?: Error; /** The operations generated from the actions (if successful) */
2301
+ /** The job that was executed */
2302
+ job: Job;
2303
+ /** Whether the job executed successfully */
2304
+ success: boolean;
2305
+ /** Error if the job failed */
2306
+ error?: Error;
2307
+ /** The operations generated from the actions (if successful) */
2269
2308
  operations?: Operation[];
2270
2309
  /**
2271
2310
  * Operations with context (includes ephemeral resultingState).
2272
2311
  * Used for emitting to IDocumentView via event bus.
2273
2312
  */
2274
- operationsWithContext?: OperationWithContext$1[]; /** Timestamp when the job execution completed */
2275
- completedAt?: string; /** Duration of job execution in milliseconds */
2276
- duration?: number; /** Any additional metadata from the execution */
2313
+ operationsWithContext?: OperationWithContext$1[];
2314
+ /** Timestamp when the job execution completed */
2315
+ completedAt?: string;
2316
+ /** Duration of job execution in milliseconds */
2317
+ duration?: number;
2318
+ /** Any additional metadata from the execution */
2277
2319
  metadata?: Record<string, any>;
2278
2320
  };
2279
2321
  /**
@@ -2311,14 +2353,20 @@ type ReactorFeatureFlags = {
2311
2353
  * Configuration options for the job executor
2312
2354
  */
2313
2355
  type JobExecutorConfig = {
2314
- /** Feature flags; anything unset is off. */featureFlags?: Partial<ReactorFeatureFlags>; /** Maximum number of conflicting operations to skip when reshuffling. */
2315
- maxSkipThreshold?: number; /** Maximum number of concurrent jobs to execute */
2316
- maxConcurrency?: number; /** Maximum time in milliseconds a job can run before being considered timed out */
2356
+ /** Feature flags; anything unset is off. */
2357
+ featureFlags?: Partial<ReactorFeatureFlags>;
2358
+ /** Maximum number of conflicting operations to skip when reshuffling. */
2359
+ maxSkipThreshold?: number;
2360
+ /** Maximum number of concurrent jobs to execute */
2361
+ maxConcurrency?: number;
2362
+ /** Maximum time in milliseconds a job can run before being considered timed out */
2317
2363
  jobTimeoutMs?: number;
2318
2364
  /** How long a job whose document is missing waits for it before failing.
2319
2365
  * Unbounded deferral never resolves the caller awaiting the job. */
2320
- deferredJobTtlMs?: number; /** Base delay in milliseconds for exponential backoff retries */
2321
- retryBaseDelayMs?: number; /** Maximum delay in milliseconds for exponential backoff retries */
2366
+ deferredJobTtlMs?: number;
2367
+ /** Base delay in milliseconds for exponential backoff retries */
2368
+ retryBaseDelayMs?: number;
2369
+ /** Maximum delay in milliseconds for exponential backoff retries */
2322
2370
  retryMaxDelayMs?: number;
2323
2371
  /** Maximum elapsed milliseconds before yielding to the main thread between actions.
2324
2372
  * Keeps the UI responsive when processing large batches. */
@@ -2341,13 +2389,14 @@ type JobExecutorConfig = {
2341
2389
  * and PGlite; DefaultExecutionScope opens no transaction and is used only by
2342
2390
  * unit-test harnesses, which therefore see writes survive a failed job.
2343
2391
  */
2344
- batchApplies?: boolean; /** Defaults to `enforce`; `log` counts refusals and admits the write. */
2392
+ batchApplies?: boolean;
2393
+ /** Defaults to `enforce`; `log` counts refusals and admits the write. */
2345
2394
  signatureVerification?: SignatureVerificationMode;
2346
2395
  };
2347
2396
  /**
2348
2397
  * Event types for the job executor
2349
2398
  */
2350
- declare const JobExecutorEventTypes: {
2399
+ export declare const JobExecutorEventTypes: {
2351
2400
  readonly JOB_STARTED: 20000;
2352
2401
  readonly JOB_COMPLETED: 20001;
2353
2402
  readonly JOB_FAILED: 20002;
@@ -2370,14 +2419,16 @@ type JobStartedEvent = {
2370
2419
  };
2371
2420
  type JobCompletedEvent = {
2372
2421
  job: Job;
2373
- result: JobResult; /** See {@link JobStartedEvent.workerId}. */
2422
+ result: JobResult;
2423
+ /** See {@link JobStartedEvent.workerId}. */
2374
2424
  workerId?: string;
2375
2425
  };
2376
2426
  type JobFailedEvent = {
2377
2427
  job: Job;
2378
2428
  error: string;
2379
2429
  willRetry: boolean;
2380
- retryCount: number; /** See {@link JobStartedEvent.workerId}. */
2430
+ retryCount: number;
2431
+ /** See {@link JobStartedEvent.workerId}. */
2381
2432
  workerId?: string;
2382
2433
  };
2383
2434
  type ExecutorStartedEvent = {
@@ -2392,9 +2443,13 @@ type ExecutorStoppedEvent = {
2392
2443
  * Status information for the job executor manager
2393
2444
  */
2394
2445
  type ExecutorManagerStatus = {
2395
- /** Whether the manager is currently running */isRunning: boolean; /** Number of executor instances managed */
2396
- numExecutors: number; /** Number of jobs currently being processed */
2397
- activeJobs: number; /** Total number of jobs processed since start */
2446
+ /** Whether the manager is currently running */
2447
+ isRunning: boolean;
2448
+ /** Number of executor instances managed */
2449
+ numExecutors: number;
2450
+ /** Number of jobs currently being processed */
2451
+ activeJobs: number;
2452
+ /** Total number of jobs processed since start */
2398
2453
  totalJobsProcessed: number;
2399
2454
  };
2400
2455
  //#endregion
@@ -2438,10 +2493,14 @@ type ErrorInfo = {
2438
2493
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2439
2494
  */
2440
2495
  type ModuleRef = {
2441
- /** Bare-specifier package name (resolved by the worker's module loader). */packageName: string; /** Named export within the module to invoke as the factory. */
2496
+ /** Bare-specifier package name (resolved by the worker's module loader). */
2497
+ packageName: string;
2498
+ /** Named export within the module to invoke as the factory. */
2442
2499
  exportName: string;
2443
2500
  } | {
2444
- /** Absolute or worker-resolvable file path to import. */filePath: string; /** Named export within the module to invoke as the factory. */
2501
+ /** Absolute or worker-resolvable file path to import. */
2502
+ filePath: string;
2503
+ /** Named export within the module to invoke as the factory. */
2445
2504
  exportName: string;
2446
2505
  };
2447
2506
  /**
@@ -2476,8 +2535,11 @@ type DocumentModelSpec = FactorySpec;
2476
2535
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2477
2536
  */
2478
2537
  type ModelManifestEntry = {
2479
- /** Document type identifier (e.g. "ph/account"). */documentType: string; /** Document model version this entry registers. */
2480
- version: string; /** Factory spec the worker imports and invokes to obtain the model. */
2538
+ /** Document type identifier (e.g. "ph/account"). */
2539
+ documentType: string;
2540
+ /** Document model version this entry registers. */
2541
+ version: string;
2542
+ /** Factory spec the worker imports and invokes to obtain the model. */
2481
2543
  spec: DocumentModelSpec;
2482
2544
  };
2483
2545
  /**
@@ -2519,10 +2581,15 @@ type DbConfig = {
2519
2581
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2520
2582
  */
2521
2583
  type WorkerPoolConfig = {
2522
- /** Whether the worker pool is active; when false the executor runs in-process. */enabled: boolean; /** Number of worker instances to spawn. */
2523
- numWorkers: number; /** Worker isolation mode. */
2524
- workerType: "thread" | "process"; /** Optional heartbeat interval in milliseconds. */
2525
- heartbeatMs?: number; /** Optional per-worker Postgres pool size override. */
2584
+ /** Whether the worker pool is active; when false the executor runs in-process. */
2585
+ enabled: boolean;
2586
+ /** Number of worker instances to spawn. */
2587
+ numWorkers: number;
2588
+ /** Worker isolation mode. */
2589
+ workerType: "thread" | "process";
2590
+ /** Optional heartbeat interval in milliseconds. */
2591
+ heartbeatMs?: number;
2592
+ /** Optional per-worker Postgres pool size override. */
2526
2593
  workerPgPoolSize?: number;
2527
2594
  };
2528
2595
  /**
@@ -2551,9 +2618,12 @@ type InitMessage = {
2551
2618
  workerId: string;
2552
2619
  poolConfig: WorkerPoolConfig;
2553
2620
  db: DbConfig;
2554
- models: ModelManifestEntry[]; /** Omitted = the worker builds its executor with the built-in defaults. */
2555
- executorConfig?: JobExecutorConfig; /** Builds the `ISigner` for synthesized operations; omitted = unsigned. */
2556
- signer?: FactorySpec; /** Builds the `SignatureTrustPolicy`; omitted = the default. */
2621
+ models: ModelManifestEntry[];
2622
+ /** Omitted = the worker builds its executor with the built-in defaults. */
2623
+ executorConfig?: JobExecutorConfig;
2624
+ /** Builds the `ISigner` for synthesized operations; omitted = unsigned. */
2625
+ signer?: FactorySpec;
2626
+ /** Builds the `SignatureTrustPolicy`; omitted = the default. */
2557
2627
  trustPolicy?: FactorySpec;
2558
2628
  };
2559
2629
  /**
@@ -2575,7 +2645,8 @@ type ExecuteMessage = {
2575
2645
  */
2576
2646
  type AbortMessage = {
2577
2647
  type: "abort";
2578
- correlationId: string; /** correlationId of the `execute` message being aborted. */
2648
+ correlationId: string;
2649
+ /** correlationId of the `execute` message being aborted. */
2579
2650
  targetCorrelationId: string;
2580
2651
  reason?: string;
2581
2652
  };
@@ -2587,7 +2658,8 @@ type AbortMessage = {
2587
2658
  */
2588
2659
  type ShutdownMessage = {
2589
2660
  type: "shutdown";
2590
- correlationId: string; /** Optional grace period before the parent force-terminates the worker. */
2661
+ correlationId: string;
2662
+ /** Optional grace period before the parent force-terminates the worker. */
2591
2663
  graceMs?: number;
2592
2664
  };
2593
2665
  /**
@@ -2616,7 +2688,8 @@ type ParentMessage = InitMessage | ExecuteMessage | AbortMessage | ShutdownMessa
2616
2688
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2617
2689
  */
2618
2690
  type ReadyMessage = {
2619
- type: "ready"; /** correlationId of the originating `init` message. */
2691
+ type: "ready";
2692
+ /** correlationId of the originating `init` message. */
2620
2693
  correlationId: string;
2621
2694
  workerId: string;
2622
2695
  };
@@ -2631,10 +2704,12 @@ type ReadyMessage = {
2631
2704
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2632
2705
  */
2633
2706
  type ResultMessage = {
2634
- type: "result"; /** correlationId of the originating `execute` message. */
2707
+ type: "result";
2708
+ /** correlationId of the originating `execute` message. */
2635
2709
  correlationId: string;
2636
2710
  result: JobResult;
2637
- writeReady?: JobWriteReadyPayload; /** Re-emitted on the parent bus, which is where observers subscribe. */
2711
+ writeReady?: JobWriteReadyPayload;
2712
+ /** Re-emitted on the parent bus, which is where observers subscribe. */
2638
2713
  signatureRefusals?: SignatureRefusedEvent[];
2639
2714
  error?: ErrorInfo;
2640
2715
  };
@@ -2645,7 +2720,8 @@ type ResultMessage = {
2645
2720
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2646
2721
  */
2647
2722
  type ModelLoadedMessage = {
2648
- type: "model-loaded"; /** correlationId of the originating `load-model` message. */
2723
+ type: "model-loaded";
2724
+ /** correlationId of the originating `load-model` message. */
2649
2725
  correlationId: string;
2650
2726
  documentType: string;
2651
2727
  version: string;
@@ -2657,7 +2733,8 @@ type ModelLoadedMessage = {
2657
2733
  * (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
2658
2734
  */
2659
2735
  type ModelLoadFailedMessage = {
2660
- type: "model-load-failed"; /** correlationId of the originating `load-model` message. */
2736
+ type: "model-load-failed";
2737
+ /** correlationId of the originating `load-model` message. */
2661
2738
  correlationId: string;
2662
2739
  documentType: string;
2663
2740
  version: string;
@@ -2678,7 +2755,8 @@ type LogMessage = {
2678
2755
  type: "log";
2679
2756
  level: "debug" | "info" | "warn" | "error";
2680
2757
  message: string;
2681
- args: SanitizedArg[]; /** Epoch milliseconds at which the worker generated the log line. */
2758
+ args: SanitizedArg[];
2759
+ /** Epoch milliseconds at which the worker generated the log line. */
2682
2760
  timestamp: number;
2683
2761
  };
2684
2762
  /**
@@ -2690,8 +2768,10 @@ type LogMessage = {
2690
2768
  */
2691
2769
  type HeartbeatMessage = {
2692
2770
  type: "heartbeat";
2693
- workerId: string; /** Epoch milliseconds the worker generated the heartbeat. */
2694
- timestamp: number; /** Optional snapshot of in-flight job correlation ids. */
2771
+ workerId: string;
2772
+ /** Epoch milliseconds the worker generated the heartbeat. */
2773
+ timestamp: number;
2774
+ /** Optional snapshot of in-flight job correlation ids. */
2695
2775
  inFlightCorrelationIds?: string[];
2696
2776
  };
2697
2777
  /**
@@ -2702,7 +2782,8 @@ type HeartbeatMessage = {
2702
2782
  */
2703
2783
  type MetricsMessage = {
2704
2784
  type: "metrics";
2705
- workerId: string; /** Epoch milliseconds the worker generated the metrics snapshot. */
2785
+ workerId: string;
2786
+ /** Epoch milliseconds the worker generated the metrics snapshot. */
2706
2787
  timestamp: number;
2707
2788
  counters: {
2708
2789
  [name: string]: number;
@@ -2720,10 +2801,14 @@ type MetricsMessage = {
2720
2801
  */
2721
2802
  type PoolAcquireSamplesMessage = {
2722
2803
  type: "pool-acquire-samples";
2723
- workerId: string; /** Stable identifier matching the host-side instrumentation name (e.g. "worker-0"). */
2724
- poolName: string; /** Epoch milliseconds the worker generated the batch. */
2725
- timestamp: number; /** Acquire-wait durations (ms) accumulated since the previous batch. */
2726
- durations: number[]; /** Most recent pg.Pool counter snapshot at batch send time. */
2804
+ workerId: string;
2805
+ /** Stable identifier matching the host-side instrumentation name (e.g. "worker-0"). */
2806
+ poolName: string;
2807
+ /** Epoch milliseconds the worker generated the batch. */
2808
+ timestamp: number;
2809
+ /** Acquire-wait durations (ms) accumulated since the previous batch. */
2810
+ durations: number[];
2811
+ /** Most recent pg.Pool counter snapshot at batch send time. */
2727
2812
  size: number;
2728
2813
  idle: number;
2729
2814
  waiting: number;
@@ -2748,7 +2833,8 @@ type SignerConfig = {
2748
2833
  * cannot cross the thread boundary itself. Omitted = pooled workers store
2749
2834
  * synthesized operations unsigned.
2750
2835
  */
2751
- workerSigner?: FactorySpec; /** Decides which keys may sign as which users; see {@link SignatureTrustPolicy}. */
2836
+ workerSigner?: FactorySpec;
2837
+ /** Decides which keys may sign as which users; see {@link SignatureTrustPolicy}. */
2752
2838
  trustPolicy?: SignatureTrustPolicy;
2753
2839
  /**
2754
2840
  * What a pooled executor worker imports to build the same trust policy.
@@ -2781,7 +2867,7 @@ type SignatureTrustPolicy = {
2781
2867
  };
2782
2868
  /** `log` counts refusals and admits anyway; `enforce` refuses. */
2783
2869
  type SignatureVerificationMode = "log" | "enforce";
2784
- declare const SIGNATURE_REFUSAL_CODES: readonly ["UNSIGNED_REQUIRED", "UNSIGNED_IDENTITY", "KEY_MISMATCH", "MALFORMED_TUPLE", "TIMESTAMP_MISMATCH", "HASH_MISMATCH", "BAD_SIGNATURE", "SCHEME_BELOW_POLICY", "ID_MISMATCH", "DUPLICATE_ACTION", "SIGNER_UNAUTHORIZED"];
2870
+ export declare const SIGNATURE_REFUSAL_CODES: readonly ["UNSIGNED_REQUIRED", "UNSIGNED_IDENTITY", "KEY_MISMATCH", "MALFORMED_TUPLE", "TIMESTAMP_MISMATCH", "HASH_MISMATCH", "BAD_SIGNATURE", "SCHEME_BELOW_POLICY", "ID_MISMATCH", "DUPLICATE_ACTION", "SIGNER_UNAUTHORIZED"];
2785
2871
  type SignatureRefusalCode = (typeof SIGNATURE_REFUSAL_CODES)[number];
2786
2872
  /** Read from the prefix or length of tuple[2]. */
2787
2873
  type SignatureScheme = "unsigned" | "v2" | "legacy-renown" | "legacy-shared" | "legacy-unknown";
@@ -2817,14 +2903,14 @@ type Subscriber = (type: number, data: any) => void | Promise<void>;
2817
2903
  /**
2818
2904
  * Custom error class that aggregates multiple errors from event subscribers.
2819
2905
  */
2820
- declare class EventBusAggregateError extends Error {
2906
+ export declare class EventBusAggregateError extends Error {
2821
2907
  readonly errors: any[];
2822
2908
  constructor(errors: unknown[]);
2823
2909
  }
2824
2910
  /**
2825
2911
  * Event types for reactor lifecycle events.
2826
2912
  */
2827
- declare const ReactorEventTypes: {
2913
+ export declare const ReactorEventTypes: {
2828
2914
  readonly JOB_PENDING: 10001;
2829
2915
  readonly JOB_RUNNING: 10002;
2830
2916
  readonly JOB_WRITE_READY: 10003;
@@ -3000,7 +3086,7 @@ interface IJobAwaiter {
3000
3086
  * Event-driven implementation of IJobAwaiter.
3001
3087
  * Subscribes to operation events to detect job completion without polling.
3002
3088
  */
3003
- declare class JobAwaiter implements IJobAwaiter {
3089
+ export declare class JobAwaiter implements IJobAwaiter {
3004
3090
  private eventBus;
3005
3091
  private getJobStatus;
3006
3092
  private pendingJobs;
@@ -3139,7 +3225,8 @@ type Projection<M> = {
3139
3225
  * Action types in this stream that can change an evaluation. Reads of the stream
3140
3226
  * are filtered to these, so anything left out is invisible to a decision.
3141
3227
  */
3142
- decidingActions: string[]; /** Applies one of this stream's operations while deciding. */
3228
+ decidingActions: string[];
3229
+ /** Applies one of this stream's operations while deciding. */
3143
3230
  apply: (document: PHDocument, operation: Operation) => PHDocument;
3144
3231
  };
3145
3232
  /**
@@ -3154,7 +3241,7 @@ type Evaluation = {
3154
3241
  };
3155
3242
  /** Projections plus a decision function over the built model. */
3156
3243
  type DecisionModel<M> = {
3157
- projections: { [K in keyof M]: Projection<M> };
3244
+ projections: { [K in keyof M]: Projection<M>; };
3158
3245
  /**
3159
3246
  * Present when decide reads the executing scope's state through the
3160
3247
  * decision context. A positional walk then folds the evaluated stream with
@@ -3180,7 +3267,7 @@ type BuiltDecisionModel<M> = {
3180
3267
  /**
3181
3268
  * Describes the types of document changes that can occur.
3182
3269
  */
3183
- declare enum DocumentChangeType {
3270
+ export declare enum DocumentChangeType {
3184
3271
  Created = "created",
3185
3272
  Deleted = "deleted",
3186
3273
  Updated = "updated",
@@ -3204,11 +3291,15 @@ type DocumentChangeEvent = {
3204
3291
  * Options for creating an empty document.
3205
3292
  */
3206
3293
  type CreateDocumentOptions = {
3207
- /** Optional "id" or "slug" of parent document */parentIdentifier?: string; /** Optional version of the document model to use (defaults to latest) */
3208
- documentModelVersion?: number; /** Merged over the model's defaults; `signature: 2` makes it v2-required. */
3294
+ /** Optional "id" or "slug" of parent document */
3295
+ parentIdentifier?: string;
3296
+ /** Optional version of the document model to use (defaults to latest) */
3297
+ documentModelVersion?: number;
3298
+ /** Merged over the model's defaults; `signature: 2` makes it v2-required. */
3209
3299
  protocolVersions?: {
3210
3300
  [protocol: string]: number;
3211
- }; /** Overrides the client's creation default for this document. */
3301
+ };
3302
+ /** Overrides the client's creation default for this document. */
3212
3303
  signaturePolicy?: SignaturePolicy;
3213
3304
  };
3214
3305
  /**
@@ -3431,7 +3522,9 @@ interface IReactorClient {
3431
3522
  */
3432
3523
  getIncomingRelationshipEdges(targetIdentifier: string, relationshipType?: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<DocumentRelationship>>;
3433
3524
  /**
3434
- * Filters documents by criteria and returns a list of them
3525
+ * Filters documents by criteria and returns a list of them. A document the
3526
+ * view's subject may read no domain scope of is withheld, not served as its
3527
+ * header and always-readable scopes.
3435
3528
  *
3436
3529
  * @param search - Search filter options (type, parentId, identifiers)
3437
3530
  * @param view - Optional filter containing branch and scopes information
@@ -3440,6 +3533,8 @@ interface IReactorClient {
3440
3533
  * @returns List of documents matching criteria and pagination cursor
3441
3534
  */
3442
3535
  find(search: SearchFilter, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<PHDocument>>;
3536
+ /** Whether {@link find} would serve the document; false when it is absent. */
3537
+ isServed(identifier: string, view?: ViewFilter, signal?: AbortSignal): Promise<boolean>;
3443
3538
  /**
3444
3539
  * Predicts whether the subject would be admitted to execute each of a set of
3445
3540
  * candidate operations, without submitting any of them. A UI asks this to
@@ -3706,7 +3801,9 @@ interface IReactorClient {
3706
3801
  */
3707
3802
  waitForJob(jobId: string | JobInfo, signal?: AbortSignal): Promise<JobInfo>;
3708
3803
  /**
3709
- * Subscribes to changes for documents matching specified filters
3804
+ * Subscribes to changes for documents matching specified filters, gated as
3805
+ * `find` is: an event naming a document the view's subject may read no domain
3806
+ * scope of is withheld.
3710
3807
  *
3711
3808
  * @param search - Search filter options (type, parentId, identifiers)
3712
3809
  * @param callback - Function called when documents change with the change event details
@@ -3725,7 +3822,7 @@ type DocumentDecisionModel = {
3725
3822
  * The simplest decision model: one projection over the document scope, which
3726
3823
  * rejects on a deleted document.
3727
3824
  */
3728
- declare function documentDecisionModel(target: DecisionTarget): DecisionModel<DocumentDecisionModel>;
3825
+ export declare function documentDecisionModel(target: DecisionTarget): DecisionModel<DocumentDecisionModel>;
3729
3826
  //#endregion
3730
3827
  //#region src/decision/registered-model.d.ts
3731
3828
  /**
@@ -3765,14 +3862,14 @@ type AdmissionConditions = {
3765
3862
  * check already refuses a write whose scope grew between the read and the
3766
3863
  * append.
3767
3864
  */
3768
- declare function decideAtHead(model: RegisteredDecisionModel, cache: IWriteCache, target: DecisionTarget, subject: AuthSubject, request: AuthRequest, signal?: AbortSignal, conditions?: AdmissionConditions): Promise<AdmissionDecision>;
3865
+ export declare function decideAtHead(model: RegisteredDecisionModel, cache: IWriteCache, target: DecisionTarget, subject: AuthSubject, request: AuthRequest, signal?: AbortSignal, conditions?: AdmissionConditions): Promise<AdmissionDecision>;
3769
3866
  /**
3770
3867
  * The model this reactor enforces. With `authEnforcement` off the auth scope is
3771
3868
  * absent from every append condition and no load walks it; with `authGroups`
3772
3869
  * on, the group documents the grant list names join the read-set and the
3773
3870
  * registry supplies the reducer that folds them.
3774
3871
  */
3775
- declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel;
3872
+ export declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel;
3776
3873
  //#endregion
3777
3874
  //#region src/decision/read-gate.d.ts
3778
3875
  /**
@@ -3782,7 +3879,7 @@ declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocu
3782
3879
  * would diverge permanently. The document scope carries the metadata the same
3783
3880
  * argument covers. Grants gate domain-scope reads only.
3784
3881
  */
3785
- declare const ALWAYS_READABLE_SCOPES: ReadonlySet<string>;
3882
+ export declare const ALWAYS_READABLE_SCOPES: ReadonlySet<string>;
3786
3883
  /**
3787
3884
  * How a gate treats a document nobody has written a policy onto.
3788
3885
  *
@@ -3806,7 +3903,11 @@ interface IReadGate {
3806
3903
  * is built once per document instead of once per scope.
3807
3904
  */
3808
3905
  scopePredicate(document: PHDocument, subject: AuthSubject, branch: string, signal?: AbortSignal): Promise<(scope: string) => boolean>;
3906
+ /** Reads what one document's decision needs once, then decides per subject. */
3907
+ prepare?(document: PHDocument, branch: string, signal?: AbortSignal): Promise<SubjectScopePredicate>;
3809
3908
  }
3909
+ /** Which scopes of an already-prepared document one subject may read. */
3910
+ type SubjectScopePredicate = (subject: AuthSubject) => Promise<(scope: string) => boolean>;
3810
3911
  /**
3811
3912
  * The model reads enforce. Below `authEnforcement` there is no model to
3812
3913
  * enforce: the document-only model ignores the auth scope entirely, so reading
@@ -3814,15 +3915,16 @@ interface IReadGate {
3814
3915
  * Undefined therefore means "evaluate the policy alone", which is what the read
3815
3916
  * surface did before the model existed.
3816
3917
  */
3817
- declare function readDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel | undefined;
3918
+ export declare function readDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel | undefined;
3818
3919
  /**
3819
3920
  * Evaluates the policy on its own, with no groups map and no condition context.
3820
3921
  * A `{ group }` or conditional grant therefore never applies: an allow that
3821
3922
  * does not apply withholds access, so this cannot widen a policy, but a policy
3822
3923
  * relying on a conditional deny is weaker here than it is written.
3823
3924
  */
3824
- declare class BareReadGate implements IReadGate {
3925
+ export declare class BareReadGate implements IReadGate {
3825
3926
  scopePredicate(document: PHDocument, subject: AuthSubject): Promise<(scope: string) => boolean>;
3927
+ prepare(document: PHDocument): Promise<SubjectScopePredicate>;
3826
3928
  }
3827
3929
  /**
3828
3930
  * Answers a stream read from the document already fetched, and anything else
@@ -3833,7 +3935,7 @@ declare class BareReadGate implements IReadGate {
3833
3935
  * projections, and the caller has both in hand. Only a group stream the grant
3834
3936
  * list names is fetched.
3835
3937
  */
3836
- declare class SeededStateReader implements IStreamStateReader {
3938
+ export declare class SeededStateReader implements IStreamStateReader {
3837
3939
  private readonly documentView;
3838
3940
  private readonly seed;
3839
3941
  private readonly branch;
@@ -3847,7 +3949,6 @@ declare class SeededStateReader implements IStreamStateReader {
3847
3949
  * surface, not silently deny.
3848
3950
  */
3849
3951
  getState(documentId: string, scope: string, branch: string, targetRevision?: number, signal?: AbortSignal): Promise<PHDocument>;
3850
- private assertAbsent;
3851
3952
  }
3852
3953
  /**
3853
3954
  * Evaluates a read against the registered decision model, built at the stream
@@ -3862,7 +3963,7 @@ declare class SeededStateReader implements IStreamStateReader {
3862
3963
  * running its executors in worker processes would answer reads in the parent
3863
3964
  * from state no commit ever invalidates.
3864
3965
  */
3865
- declare class ModelReadGate implements IReadGate {
3966
+ export declare class ModelReadGate implements IReadGate {
3866
3967
  private readonly model;
3867
3968
  private readonly documentView;
3868
3969
  /**
@@ -3882,7 +3983,6 @@ declare class ModelReadGate implements IReadGate {
3882
3983
  * match at all; below it the grant fails closed, so serving the roster
3883
3984
  * would publish a member list no read grant can use.
3884
3985
  */
3885
-
3886
3986
  servesGroups: boolean, operationIndex?: IOperationIndex | undefined, logger?: ILogger | undefined, options?: ReadGateOptions);
3887
3987
  /**
3888
3988
  * A served group yields its member list and nothing else. What the audience
@@ -3890,6 +3990,7 @@ declare class ModelReadGate implements IReadGate {
3890
3990
  * group's other scopes are its own business and stay behind its own grants.
3891
3991
  */
3892
3992
  scopePredicate(document: PHDocument, subject: AuthSubject, branch: string, signal?: AbortSignal): Promise<(scope: string) => boolean>;
3993
+ prepare(document: PHDocument, branch: string, signal?: AbortSignal): Promise<SubjectScopePredicate>;
3893
3994
  /**
3894
3995
  * Whether the subject is served this group because a policy names it.
3895
3996
  *
@@ -3923,8 +4024,11 @@ declare class ModelReadGate implements IReadGate {
3923
4024
  * from.
3924
4025
  */
3925
4026
  private servesGroupTo;
4027
+ /** Each read made once, however many subjects the walk runs for. */
4028
+ private referencerReads;
4029
+ private examinedReferencers;
3926
4030
  /**
3927
- * Whether one referencing document serves the subject any domain scope. A
4031
+ * Whether one referencing document serves a subject any domain scope. A
3928
4032
  * referencer this replica does not hold serves nothing, which fails closed
3929
4033
  * the same way a group it does not hold does.
3930
4034
  */
@@ -3943,7 +4047,7 @@ declare class ModelReadGate implements IReadGate {
3943
4047
  * publish an unpoliced group it names: the referencer walk asks this question
3944
4048
  * of the referencing document, whose real policy answers it.
3945
4049
  */
3946
- private ownPolicyPredicate;
4050
+ private ownPolicy;
3947
4051
  }
3948
4052
  //#endregion
3949
4053
  //#region src/client/reactor-client.d.ts
@@ -3972,7 +4076,7 @@ type ActionEvaluationConfig = {
3972
4076
  * - Provides quality-of-life functions for common tasks
3973
4077
  * - Wraps subscription interface with ViewFilters
3974
4078
  */
3975
- declare class ReactorClient implements IReactorClient {
4079
+ export declare class ReactorClient implements IReactorClient {
3976
4080
  private logger;
3977
4081
  private reactor;
3978
4082
  private signer;
@@ -3981,26 +4085,11 @@ declare class ReactorClient implements IReactorClient {
3981
4085
  private documentIndexer;
3982
4086
  private documentView;
3983
4087
  private readGate;
4088
+ private eventReads;
3984
4089
  private actionEvaluation;
3985
4090
  private readonly createSignaturePolicy;
3986
4091
  readonly drives: IDriveClient;
3987
4092
  constructor(logger: ILogger, reactor: IReactor, signer: ISigner, subscriptionManager: IReactorSubscriptionManager, jobAwaiter: IJobAwaiter, documentIndexer: IDocumentIndexer, documentView: IDocumentView, readGate?: IReadGate, actionEvaluation?: ActionEvaluationConfig, createSignaturePolicy?: SignaturePolicy);
3988
- private readSubject;
3989
- /**
3990
- * Which scopes of one document the subject may read. Resolved once per
3991
- * document, so the gate builds its model once however many scopes are then
3992
- * tested, and the filtering itself stays synchronous.
3993
- */
3994
- private readableScopes;
3995
- /**
3996
- * One document, filtered to the scopes the subject may read. Every method
3997
- * that hands a document back goes through here, including the ones that
3998
- * follow a write: a document returned from a mutation is a read like any
3999
- * other, and returning it whole served scopes the same subject would be
4000
- * refused by `get`. Its author still sees what it wrote, because an allow on
4001
- * execute confers read of that scope.
4002
- */
4003
- private gateDocument;
4004
4093
  /**
4005
4094
  * Retrieves a list of document model modules.
4006
4095
  */
@@ -4034,7 +4123,6 @@ declare class ReactorClient implements IReactorClient {
4034
4123
  * Retrieves operations for a document
4035
4124
  */
4036
4125
  getOperations(documentIdentifier: string, view?: ViewFilter, filter?: OperationFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<Operation>>;
4037
- private getOperationsWithCompositeCursor;
4038
4126
  /**
4039
4127
  * Retrieves outgoing relationships of a given type from a source document.
4040
4128
  */
@@ -4053,32 +4141,12 @@ declare class ReactorClient implements IReactorClient {
4053
4141
  * metadata and timestamps the far-end documents do not.
4054
4142
  */
4055
4143
  getIncomingRelationshipEdges(targetIdentifier: string, relationshipType?: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<DocumentRelationship>>;
4056
- /**
4057
- * Drops the edges whose far-end document the subject may read no domain scope
4058
- * of. An edge is withheld whole rather than stripped of its metadata: the
4059
- * document-shaped relationship reads already answer with the far end stripped
4060
- * to the scopes the gate allows, so the far end's existence is disclosed
4061
- * either way, but an edge's metadata is content about the pair that the far
4062
- * end's own reads would refuse. An edge to a far end stripped to nothing
4063
- * therefore carries content past a refusal, and there is no useful shell to
4064
- * hand back in its place.
4065
- *
4066
- * `nextCursor` and `options` are left as the underlying stream reported them,
4067
- * because a caller must feed them back to resume from the right position. A
4068
- * gated page can therefore be shorter than the limit it asked for.
4069
- */
4070
- private gateEdges;
4071
- /**
4072
- * One relationship edge, or undefined when it does not exist. A point lookup:
4073
- * the pair is filtered in SQL rather than scanned out of the source's edge
4074
- * list, which on a drive with thousands of children is the difference between
4075
- * one query and dozens.
4076
- */
4077
- private readRelationshipEdge;
4078
4144
  /**
4079
4145
  * Filters documents by criteria and returns a list of them
4080
4146
  */
4081
4147
  find(search: SearchFilter, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<PHDocument>>;
4148
+ /** Whether `find` would serve the document; false when it is absent. */
4149
+ isServed(identifier: string, view?: ViewFilter, signal?: AbortSignal): Promise<boolean>;
4082
4150
  /**
4083
4151
  * Predicts the admission verdict for each candidate. See
4084
4152
  * {@link IReactorClient.evaluateActions} for the contract and its caveats.
@@ -4089,27 +4157,6 @@ declare class ReactorClient implements IReactorClient {
4089
4157
  * ever invalidates.
4090
4158
  */
4091
4159
  evaluateActions(documentIdentifier: string, branch: string, candidates: ActionCandidate[], subject?: AuthSubject, signal?: AbortSignal): Promise<ActionEvaluations>;
4092
- /**
4093
- * The decision model for one target document, built at its stream heads.
4094
- *
4095
- * The document is fetched unfiltered, because the policy is what decides:
4096
- * reading it through the read gate would withhold the very scopes the
4097
- * decision is about. A deleted document is served at its deletion boundary,
4098
- * which is what lets the model refuse an execute against it -- authEnforcement
4099
- * requires documentDecisions, so that read is available whenever this runs.
4100
- *
4101
- * Reading past the gate discloses nothing a submit does not. The `auth` and
4102
- * `document` scopes are readable by every holder, so a verdict resting on the
4103
- * policy alone is one the caller could compute unaided; and a verdict resting
4104
- * on a conditional grant reads the executing scope's state exactly as
4105
- * admission reads it, so the answer here is what submitting and being refused
4106
- * would have revealed anyway.
4107
- *
4108
- * The append condition the build records is dropped. It guards a write, and
4109
- * this makes none; reproducing it is also what the preflight cannot do, which
4110
- * is why the answer is a prediction.
4111
- */
4112
- private buildEvaluationTarget;
4113
4160
  getCreateSignaturePolicy(): Promise<SignaturePolicy>;
4114
4161
  /**
4115
4162
  * Creates a document and waits for completion
@@ -4150,12 +4197,6 @@ declare class ReactorClient implements IReactorClient {
4150
4197
  * Submits a list of actions to a document
4151
4198
  */
4152
4199
  executeAsync(documentIdentifier: string, branch: string, actions: Action[], signal?: AbortSignal): Promise<JobInfo>;
4153
- /**
4154
- * The id a write on `identifier` is stored under, which its signatures bind.
4155
- * A create names its own id, and an id no slug maps to is taken as given, so
4156
- * a document still in flight resolves to itself.
4157
- */
4158
- private resolveWriteTarget;
4159
4200
  executeBatch(request: BatchExecutionRequest, signal?: AbortSignal): Promise<BatchExecutionResult>;
4160
4201
  /**
4161
4202
  * Renames a document and waits for completion
@@ -4206,6 +4247,99 @@ declare class ReactorClient implements IReactorClient {
4206
4247
  * Subscribes to changes for documents matching specified filters
4207
4248
  */
4208
4249
  subscribe(search: SearchFilter, callback: (event: DocumentChangeEvent) => void, view?: ViewFilter): () => void;
4250
+ private readSubject;
4251
+ /**
4252
+ * Which scopes of one document the subject may read. Resolved once per
4253
+ * document, so the gate builds its model once however many scopes are then
4254
+ * tested, and the filtering itself stays synchronous.
4255
+ */
4256
+ private readableScopes;
4257
+ /**
4258
+ * One document, filtered to the scopes the subject may read. Every method
4259
+ * that hands a document back goes through here, including the ones that
4260
+ * follow a write: a document returned from a mutation is a read like any
4261
+ * other, and returning it whole served scopes the same subject would be
4262
+ * refused by `get`. Its author still sees what it wrote, because an allow on
4263
+ * execute confers read of that scope.
4264
+ */
4265
+ private gateDocument;
4266
+ /**
4267
+ * One document as a listing or a feed serves it, or undefined when withheld.
4268
+ * The document must hold every scope, or withholding is decided on a subset;
4269
+ * a narrowing view is applied here instead.
4270
+ */
4271
+ private gateServed;
4272
+ private gateServedAll;
4273
+ /**
4274
+ * Gates a page and every page after it. `nextCursor` is left as the stream
4275
+ * reported it.
4276
+ */
4277
+ private gateListing;
4278
+ /**
4279
+ * One document as a listing serves it, or undefined when withheld. It holds
4280
+ * only the view's scopes; a domain scope it lacks is decided on its name, or
4281
+ * on its state read now when a condition needs that.
4282
+ */
4283
+ private gateListed;
4284
+ private servesUnheld;
4285
+ /**
4286
+ * Whether an event naming only these ids may reach the subject. An id with no
4287
+ * live document behind it has no content left to protect, so it does not
4288
+ * withhold; a deleted document is read at its deletion boundary when
4289
+ * deletion is positional, and gated like any other.
4290
+ */
4291
+ private servesEvery;
4292
+ private servesId;
4293
+ private getOperationsWithCompositeCursor;
4294
+ /**
4295
+ * Drops the edges whose far-end document the subject may read no domain scope
4296
+ * of. An edge is withheld whole rather than stripped of its metadata: the
4297
+ * document-shaped relationship reads already answer with the far end stripped
4298
+ * to the scopes the gate allows, so the far end's existence is disclosed
4299
+ * either way, but an edge's metadata is content about the pair that the far
4300
+ * end's own reads would refuse. An edge to a far end stripped to nothing
4301
+ * therefore carries content past a refusal, and there is no useful shell to
4302
+ * hand back in its place.
4303
+ *
4304
+ * `nextCursor` and `options` are left as the underlying stream reported them,
4305
+ * because a caller must feed them back to resume from the right position. A
4306
+ * gated page can therefore be shorter than the limit it asked for.
4307
+ */
4308
+ private gateEdges;
4309
+ /**
4310
+ * One relationship edge, or undefined when it does not exist. A point lookup:
4311
+ * the pair is filtered in SQL rather than scanned out of the source's edge
4312
+ * list, which on a drive with thousands of children is the difference between
4313
+ * one query and dozens.
4314
+ */
4315
+ private readRelationshipEdge;
4316
+ /**
4317
+ * The id a write on `identifier` is stored under, which its signatures bind.
4318
+ * A create names its own id, and an id no slug maps to is taken as given, so
4319
+ * a document still in flight resolves to itself.
4320
+ */
4321
+ private resolveWriteTarget;
4322
+ /**
4323
+ * The decision model for one target document, built at its stream heads.
4324
+ *
4325
+ * The document is fetched unfiltered, because the policy is what decides:
4326
+ * reading it through the read gate would withhold the very scopes the
4327
+ * decision is about. A deleted document is served at its deletion boundary,
4328
+ * which is what lets the model refuse an execute against it -- authEnforcement
4329
+ * requires documentDecisions, so that read is available whenever this runs.
4330
+ *
4331
+ * Reading past the gate discloses nothing a submit does not. The `auth` and
4332
+ * `document` scopes are readable by every holder, so a verdict resting on the
4333
+ * policy alone is one the caller could compute unaided; and a verdict resting
4334
+ * on a conditional grant reads the executing scope's state exactly as
4335
+ * admission reads it, so the answer here is what submitting and being refused
4336
+ * would have revealed anyway.
4337
+ *
4338
+ * The append condition the build records is dropped. It guards a write, and
4339
+ * this makes none; reproducing it is also what the preflight cannot do, which
4340
+ * is why the answer is a prediction.
4341
+ */
4342
+ private buildEvaluationTarget;
4209
4343
  private removeAllIncomingRelationships;
4210
4344
  }
4211
4345
  //#endregion
@@ -4590,12 +4724,12 @@ interface IConsistencyTracker {
4590
4724
  /**
4591
4725
  * Creates a consistency key from documentId, scope, and branch.
4592
4726
  */
4593
- declare function makeConsistencyKey(documentId: string, scope: string, branch: string): ConsistencyKey;
4727
+ export declare function makeConsistencyKey(documentId: string, scope: string, branch: string): ConsistencyKey;
4594
4728
  /**
4595
4729
  * Tracks operation indexes for documents and provides read-after-write consistency guarantees.
4596
4730
  * Maintains an in-memory map of the latest operation index for each (documentId, scope, branch) tuple.
4597
4731
  */
4598
- declare class ConsistencyTracker implements IConsistencyTracker {
4732
+ export declare class ConsistencyTracker implements IConsistencyTracker {
4599
4733
  private state;
4600
4734
  private waiters;
4601
4735
  update(coordinates: ConsistencyCoordinate[]): void;
@@ -4614,8 +4748,11 @@ declare class ConsistencyTracker implements IConsistencyTracker {
4614
4748
  * Snapshot of a pg.Pool's internal counters at a point in time.
4615
4749
  */
4616
4750
  type PoolStats = {
4617
- /** Connections currently open (idle + in-use). pg.Pool.totalCount. */size: number; /** Open connections not currently checked out. pg.Pool.idleCount. */
4618
- idle: number; /** Callers queued waiting for a connection. pg.Pool.waitingCount. */
4751
+ /** Connections currently open (idle + in-use). pg.Pool.totalCount. */
4752
+ size: number;
4753
+ /** Open connections not currently checked out. pg.Pool.idleCount. */
4754
+ idle: number;
4755
+ /** Callers queued waiting for a connection. pg.Pool.waitingCount. */
4619
4756
  waiting: number;
4620
4757
  };
4621
4758
  /**
@@ -4624,7 +4761,9 @@ type PoolStats = {
4624
4761
  * underlying pg.Pool type.
4625
4762
  */
4626
4763
  type PoolInstrumentation = {
4627
- /** Stable identifier for the pool (e.g. "host", "worker"). Used as a metric label. */readonly name: string; /** Current pool counters. Cheap, synchronous read off pg.Pool. */
4764
+ /** Stable identifier for the pool (e.g. "host", "worker"). Used as a metric label. */
4765
+ readonly name: string;
4766
+ /** Current pool counters. Cheap, synchronous read off pg.Pool. */
4628
4767
  getStats(): PoolStats;
4629
4768
  /**
4630
4769
  * Subscribe to per-acquire wait durations. Listener fires once per
@@ -4639,7 +4778,7 @@ type PoolInstrumentation = {
4639
4778
  * is replaced with a timing wrapper so all callers (Kysely included)
4640
4779
  * pick up the instrumentation transparently.
4641
4780
  */
4642
- declare function instrumentPgPool(pool: Pool, name: string): PoolInstrumentation;
4781
+ export declare function instrumentPgPool(pool: Pool, name: string): PoolInstrumentation;
4643
4782
  /**
4644
4783
  * Host-side {@link PoolInstrumentation} that re-emits acquire-wait samples
4645
4784
  * and pool-stat snapshots forwarded from a worker thread. The worker owns
@@ -4679,7 +4818,7 @@ declare class GraphQLRequestError extends Error {
4679
4818
  * difference between a channel that recovers and one that is dead for the
4680
4819
  * process lifetime.
4681
4820
  */
4682
- declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
4821
+ export declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
4683
4822
  /**
4684
4823
  * A stored operation cannot be represented in the schema - an action with no
4685
4824
  * id, say. The document holding it needs repairing, but the channel serves
@@ -4695,10 +4834,10 @@ declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
4695
4834
  * one means something else also went wrong, and polling through that would be
4696
4835
  * guessing.
4697
4836
  */
4698
- declare function isRecoverableGraphQLError(error: GraphQLRequestError): boolean;
4837
+ export declare function isRecoverableGraphQLError(error: GraphQLRequestError): boolean;
4699
4838
  /** Auth-rejection message fragments the switchboard emits. Shared with
4700
4839
  * reactor-api so server throws and this client check can't drift. */
4701
- declare const DRIVE_AUTH_ERROR_MESSAGES: {
4840
+ export declare const DRIVE_AUTH_ERROR_MESSAGES: {
4702
4841
  readonly forbidden: "Forbidden: insufficient permissions";
4703
4842
  readonly authenticationRequired: "Forbidden: authentication required";
4704
4843
  };
@@ -4711,7 +4850,7 @@ declare const DRIVE_AUTH_ERROR_MESSAGES: {
4711
4850
  * `isDriveAuthError` is what decides whether a failure prompts a login, and a
4712
4851
  * bare `Error` tells it nothing.
4713
4852
  */
4714
- declare class DriveRequestError extends Error {
4853
+ export declare class DriveRequestError extends Error {
4715
4854
  readonly statusCode: number | undefined;
4716
4855
  constructor(message: string, statusCode?: number);
4717
4856
  }
@@ -4725,11 +4864,11 @@ declare class DriveRequestError extends Error {
4725
4864
  * indistinguishable from a typo, and prompting for a login on every 404 would
4726
4865
  * fire on every mistyped URL. See the `WWW-Authenticate` note on the endpoint
4727
4866
  * for the signal that would let a client tell the two apart. */
4728
- declare function isDriveAuthError(error: unknown): boolean;
4729
- declare class PollingChannelError extends Error {
4867
+ export declare function isDriveAuthError(error: unknown): boolean;
4868
+ export declare class PollingChannelError extends Error {
4730
4869
  constructor(message: string);
4731
4870
  }
4732
- declare class ChannelError extends Error {
4871
+ export declare class ChannelError extends Error {
4733
4872
  source: ChannelErrorSource;
4734
4873
  error: Error;
4735
4874
  /**
@@ -4743,11 +4882,11 @@ declare class ChannelError extends Error {
4743
4882
  //#endregion
4744
4883
  //#region src/sync/sync-operation.d.ts
4745
4884
  type SyncOperationStatusCallback = (syncOp: SyncOperation, prev: SyncOperationStatus, next: SyncOperationStatus) => void;
4746
- declare class SyncOperationAggregateError extends Error {
4885
+ export declare class SyncOperationAggregateError extends Error {
4747
4886
  errors: Error[];
4748
4887
  constructor(errors: Error[]);
4749
4888
  }
4750
- declare class SyncOperation {
4889
+ export declare class SyncOperation {
4751
4890
  readonly id: string;
4752
4891
  readonly jobId: string;
4753
4892
  jobDependencies: string[];
@@ -4803,7 +4942,7 @@ interface IMailbox {
4803
4942
  flush(): void;
4804
4943
  isPaused(): boolean;
4805
4944
  }
4806
- declare class Mailbox implements IMailbox {
4945
+ export declare class Mailbox implements IMailbox {
4807
4946
  private itemsMap;
4808
4947
  private addedCallbacks;
4809
4948
  private removedCallbacks;
@@ -4829,7 +4968,7 @@ declare class Mailbox implements IMailbox {
4829
4968
  }
4830
4969
  //#endregion
4831
4970
  //#region src/sync/sync-status-tracker.d.ts
4832
- declare enum SyncStatus {
4971
+ export declare enum SyncStatus {
4833
4972
  Synced = "SYNCED",
4834
4973
  Outgoing = "OUTGOING",
4835
4974
  Incoming = "INCOMING",
@@ -4844,7 +4983,7 @@ interface ISyncStatusTracker {
4844
4983
  untrackRemote(remoteName: string): void;
4845
4984
  clear(): void;
4846
4985
  }
4847
- declare class SyncStatusTracker implements ISyncStatusTracker {
4986
+ export declare class SyncStatusTracker implements ISyncStatusTracker {
4848
4987
  private readonly remotes;
4849
4988
  private readonly seen;
4850
4989
  private readonly callbacks;
@@ -5513,7 +5652,7 @@ interface InProcessReactorClientModule extends ReactorClientModule {
5513
5652
  * for batch execution. The back-reference is captured but never invoked
5514
5653
  * during construction, so the partial-`this` hazard does not apply.
5515
5654
  */
5516
- declare class DriveClient implements IDriveClient {
5655
+ export declare class DriveClient implements IDriveClient {
5517
5656
  private readonly client;
5518
5657
  private readonly logger;
5519
5658
  private readonly reactor;
@@ -5556,7 +5695,7 @@ type ModelLoadedBroadcastHook = (entry: ModelManifestEntry) => Promise<void>;
5556
5695
  * (post-failure recovery) so that both paths use the same deduplication
5557
5696
  * and failure-caching state.
5558
5697
  */
5559
- declare class DocumentModelResolver implements IDocumentModelResolver {
5698
+ export declare class DocumentModelResolver implements IDocumentModelResolver {
5560
5699
  private registry;
5561
5700
  private loader;
5562
5701
  private loadingModels;
@@ -5585,7 +5724,7 @@ declare class DocumentModelResolver implements IDocumentModelResolver {
5585
5724
  * Checks the registry for the model and returns if found; throws if not.
5586
5725
  * Since there is no loader, missing models cannot be recovered.
5587
5726
  */
5588
- declare class NullDocumentModelResolver implements IDocumentModelResolver {
5727
+ export declare class NullDocumentModelResolver implements IDocumentModelResolver {
5589
5728
  private registry?;
5590
5729
  constructor(registry?: IDocumentModelRegistry | undefined);
5591
5730
  ensureModelLoaded(documentType: string): Promise<void>;
@@ -5602,19 +5741,22 @@ type WorkerFactory = (index: number) => IExecutorWorker;
5602
5741
  //#region src/read-models/base-read-model.d.ts
5603
5742
  /** Bounds on an indexing pass: one transaction, and the stall between yields. */
5604
5743
  type ReadModelIndexingConfig = {
5605
- /** Maximum operations committed in a single transaction. */commitChunkSize: number; /** Maximum elapsed milliseconds before yielding between chunks. */
5744
+ /** Maximum operations committed in a single transaction. */
5745
+ commitChunkSize: number;
5746
+ /** Maximum elapsed milliseconds before yielding between chunks. */
5606
5747
  yieldDeadlineMs: number;
5607
5748
  };
5608
5749
  /** Small enough that a chunk's transaction rarely outlasts the yield deadline. */
5609
- declare const DEFAULT_COMMIT_CHUNK_SIZE = 50;
5750
+ export declare const DEFAULT_COMMIT_CHUNK_SIZE = 50;
5610
5751
  /** Matches the executor's own default, so both paths yield on the same cadence. */
5611
- declare const DEFAULT_READ_MODEL_YIELD_DEADLINE_MS = 50;
5612
- declare const defaultReadModelIndexingConfig: ReadModelIndexingConfig;
5752
+ export declare const DEFAULT_READ_MODEL_YIELD_DEADLINE_MS = 50;
5753
+ export declare const defaultReadModelIndexingConfig: ReadModelIndexingConfig;
5613
5754
  /** For read models whose callers can observe where a batch was split. */
5614
- declare const unchunkedReadModelIndexingConfig: ReadModelIndexingConfig;
5755
+ export declare const unchunkedReadModelIndexingConfig: ReadModelIndexingConfig;
5615
5756
  type BaseReadModelConfig = {
5616
5757
  readModelId: string;
5617
- rebuildStateOnInit: boolean; /** Defaults to {@link defaultReadModelIndexingConfig}. */
5758
+ rebuildStateOnInit: boolean;
5759
+ /** Defaults to {@link defaultReadModelIndexingConfig}. */
5618
5760
  indexing?: ReadModelIndexingConfig;
5619
5761
  };
5620
5762
  /**
@@ -5622,7 +5764,7 @@ type BaseReadModelConfig = {
5622
5764
  * Handles initialization, state tracking via ViewState table, and consistency tracking.
5623
5765
  * Subclasses override commitOperations() with their specific domain logic.
5624
5766
  */
5625
- declare class BaseReadModel implements IReadModel {
5767
+ export declare class BaseReadModel implements IReadModel {
5626
5768
  protected db: Kysely<DocumentViewDatabase>;
5627
5769
  protected operationIndex: IOperationIndex;
5628
5770
  protected writeCache: IWriteCache;
@@ -5847,10 +5989,14 @@ type ProjectionChainDepthMessage = {
5847
5989
  */
5848
5990
  type ProjectionPoolAcquireSamplesMessage = {
5849
5991
  type: "pool-acquire-samples";
5850
- shardId: string; /** Stable identifier matching the host-side instrumentation name. */
5851
- poolName: string; /** Epoch milliseconds the worker generated the batch. */
5852
- timestamp: number; /** Acquire-wait durations (ms) accumulated since the previous batch. */
5853
- durations: number[]; /** Most recent pg.Pool counter snapshot at batch send time. */
5992
+ shardId: string;
5993
+ /** Stable identifier matching the host-side instrumentation name. */
5994
+ poolName: string;
5995
+ /** Epoch milliseconds the worker generated the batch. */
5996
+ timestamp: number;
5997
+ /** Acquire-wait durations (ms) accumulated since the previous batch. */
5998
+ durations: number[];
5999
+ /** Most recent pg.Pool counter snapshot at batch send time. */
5854
6000
  size: number;
5855
6001
  idle: number;
5856
6002
  waiting: number;
@@ -5880,7 +6026,8 @@ type ProjectionWorkerMessage = ProjectionReadyMessage | ProjectionInitFailedMess
5880
6026
  //#endregion
5881
6027
  //#region src/projection/create-hybrid-projection-coordinator.d.ts
5882
6028
  type HybridProjectionOptions = {
5883
- /** Defaults to 1: one worker captures the whole win (Run 11). */shardCount?: number;
6029
+ /** Defaults to 1: one worker captures the whole win (Run 11). */
6030
+ shardCount?: number;
5884
6031
  poolSize?: number;
5885
6032
  db?: DbConfig;
5886
6033
  onFatal?: (shardId: string, reason: Error) => void;
@@ -5890,7 +6037,7 @@ type HybridProjectionOptions = {
5890
6037
  chainDepthReportIntervalMs?: number;
5891
6038
  };
5892
6039
  /** Built-ins in one projection worker; all other read models stay on the host. */
5893
- declare function createHybridProjectionCoordinatorFactory(options?: HybridProjectionOptions): ReadModelCoordinatorFactory;
6040
+ export declare function createHybridProjectionCoordinatorFactory(options?: HybridProjectionOptions): ReadModelCoordinatorFactory;
5894
6041
  //#endregion
5895
6042
  //#region src/projection/transport.d.ts
5896
6043
  type ProjectionTransportEventMap = {
@@ -5920,7 +6067,8 @@ interface IProjectionTransport {
5920
6067
  */
5921
6068
  type ProjectionWorkerFactory = (shardIndex: number, shardId: string) => IProjectionTransport;
5922
6069
  type ProjectionShardHooks = {
5923
- /** Takes over the host-bus JOB_READ_READY emit; call `emitReadReady` to emit. */onReadReady?: (event: JobReadReadyEvent) => void;
6070
+ /** Takes over the host-bus JOB_READ_READY emit; call `emitReadReady` to emit. */
6071
+ onReadReady?: (event: JobReadReadyEvent) => void;
5924
6072
  /**
5925
6073
  * Fired when a shard errors, when it exits after having been ready, and
5926
6074
  * for every JOB_WRITE_READY dropped because its shard is not ready.
@@ -6064,13 +6212,16 @@ declare class ProjectionShardManager implements IReadModelCoordinator {
6064
6212
  type HybridProjectionCoordinatorOptions = {
6065
6213
  eventBus: IEventBus;
6066
6214
  logger: ILogger;
6067
- manager: ProjectionShardManager; /** Caller and factory registered models. Never documentView/documentIndexer. */
6068
- preReady: IReadModel[]; /** subscriptionNotificationReadModel, processorManager. */
6069
- postReady: IReadModel[]; /** Included in `readModels` for getReadModel() lookup; never indexed here. */
6215
+ manager: ProjectionShardManager;
6216
+ /** Caller and factory registered models. Never documentView/documentIndexer. */
6217
+ preReady: IReadModel[];
6218
+ /** subscriptionNotificationReadModel, processorManager. */
6219
+ postReady: IReadModel[];
6220
+ /** Included in `readModels` for getReadModel() lookup; never indexed here. */
6070
6221
  lookupOnly: IReadModel[];
6071
6222
  };
6072
6223
  /** Host-side stages on a per-queueKey chain driven by the worker's read-ready. */
6073
- declare class HybridProjectionCoordinator implements ILiveReadModelCoordinator {
6224
+ export declare class HybridProjectionCoordinator implements ILiveReadModelCoordinator {
6074
6225
  /** One array, mutated in place: reactor-api captures it by reference once. */
6075
6226
  readonly readModels: IReadModel[];
6076
6227
  private readonly eventBus;
@@ -6106,7 +6257,7 @@ interface MigrationResult {
6106
6257
  }
6107
6258
  //#endregion
6108
6259
  //#region src/sync/sync-builder.d.ts
6109
- declare class SyncBuilder {
6260
+ export declare class SyncBuilder {
6110
6261
  private channelFactory?;
6111
6262
  private remoteStorage?;
6112
6263
  private cursorStorage?;
@@ -6179,7 +6330,8 @@ interface ReadModelCoordinatorFactoryDeps {
6179
6330
  */
6180
6331
  type ReadModelCoordinatorFactory = (deps: ReadModelCoordinatorFactoryDeps) => IReadModelCoordinator | Promise<IReadModelCoordinator>;
6181
6332
  type WorkerPoolBase = {
6182
- /** Number of worker threads to spawn; also the sticky-routing modulus. */numWorkers: number;
6333
+ /** Number of worker threads to spawn; also the sticky-routing modulus. */
6334
+ numWorkers: number;
6183
6335
  };
6184
6336
  /**
6185
6337
  * Executor worker-pool configuration. Either `db` (default thread
@@ -6215,7 +6367,8 @@ type ProjectionShardBuilderConfig = {
6215
6367
  * list is indexed by nobody, and one named in both is indexed twice.
6216
6368
  * `buildModule` rejects any other combination.
6217
6369
  */
6218
- preReadyKinds: BuiltInReadModelKind[]; /** Kinds each shard indexes after READ_READY. See {@link preReadyKinds}. */
6370
+ preReadyKinds: BuiltInReadModelKind[];
6371
+ /** Kinds each shard indexes after READ_READY. See {@link preReadyKinds}. */
6219
6372
  postReadyKinds: BuiltInReadModelKind[];
6220
6373
  /**
6221
6374
  * Connection info for the projection workers' own pools. Falls back to
@@ -6229,7 +6382,7 @@ type ProjectionShardBuilderConfig = {
6229
6382
  drainTimeoutMs?: number;
6230
6383
  chainDepthReportIntervalMs?: number;
6231
6384
  };
6232
- declare class ReactorBuilder {
6385
+ export declare class ReactorBuilder {
6233
6386
  private logger?;
6234
6387
  private documentModelSources;
6235
6388
  private upgradeManifests;
@@ -6419,7 +6572,7 @@ declare class ReactorBuilder {
6419
6572
  /**
6420
6573
  * Builder class for constructing ReactorClient instances with proper configuration
6421
6574
  */
6422
- declare class ReactorClientBuilder {
6575
+ export declare class ReactorClientBuilder {
6423
6576
  private logger?;
6424
6577
  private reactorBuilder?;
6425
6578
  private reactor?;
@@ -6499,14 +6652,14 @@ declare class ReactorClientBuilder {
6499
6652
  }
6500
6653
  //#endregion
6501
6654
  //#region src/core/drive-container-types.d.ts
6502
- declare const DEFAULT_DRIVE_CONTAINER_TYPES: ReadonlySet<string>;
6655
+ export declare const DEFAULT_DRIVE_CONTAINER_TYPES: ReadonlySet<string>;
6503
6656
  //#endregion
6504
6657
  //#region src/core/reactor.d.ts
6505
6658
  /**
6506
6659
  * This class implements the IReactor interface and serves as the main entry point
6507
6660
  * for the new Reactor architecture.
6508
6661
  */
6509
- declare class Reactor implements IReactor {
6662
+ export declare class Reactor implements IReactor {
6510
6663
  private logger;
6511
6664
  private documentModelRegistry;
6512
6665
  private shutdownStatus;
@@ -6563,15 +6716,15 @@ interface ParsedDriveUrl {
6563
6716
  * e.g., "http://localhost:4001/d/abc123" -> { driveId: "abc123", graphqlEndpoint: "http://localhost:4001/graphql/r" }
6564
6717
  * e.g., "https://example.com/api/reactor/d/abc123" -> { ..., graphqlEndpoint: "https://example.com/api/reactor/graphql/r" }
6565
6718
  */
6566
- declare function parseDriveUrl(url: string): ParsedDriveUrl;
6719
+ export declare function parseDriveUrl(url: string): ParsedDriveUrl;
6567
6720
  /**
6568
6721
  * Extract drive ID from a drive URL.
6569
6722
  */
6570
- declare function driveIdFromUrl(url: string): string;
6723
+ export declare function driveIdFromUrl(url: string): string;
6571
6724
  //#endregion
6572
6725
  //#region src/shared/errors.d.ts
6573
6726
  /** The message carries the code: only name and message cross the queue. */
6574
- declare class InvalidSignatureError extends Error {
6727
+ export declare class InvalidSignatureError extends Error {
6575
6728
  readonly documentId: string;
6576
6729
  readonly code: SignatureRefusalCode;
6577
6730
  readonly reason: string;
@@ -6594,7 +6747,7 @@ declare class InvalidSignatureError extends Error {
6594
6747
  * (`reactor-browser/src/rpc/error-info.ts`), so the class identity and any
6595
6748
  * custom field are lost in transit. This error therefore carries no fields.
6596
6749
  */
6597
- declare class AuthEnforcementDisabledError extends Error {
6750
+ export declare class AuthEnforcementDisabledError extends Error {
6598
6751
  constructor();
6599
6752
  static isError(error: unknown): error is AuthEnforcementDisabledError;
6600
6753
  }
@@ -6606,7 +6759,7 @@ declare class AuthEnforcementDisabledError extends Error {
6606
6759
  * (`reactor-browser/src/rpc/error-info.ts`), so the class identity is lost in
6607
6760
  * transit.
6608
6761
  */
6609
- declare class RelationshipNotFoundError extends Error {
6762
+ export declare class RelationshipNotFoundError extends Error {
6610
6763
  readonly sourceId: string;
6611
6764
  readonly targetId: string;
6612
6765
  readonly relationshipType: string;
@@ -6621,7 +6774,7 @@ declare class RelationshipNotFoundError extends Error {
6621
6774
  * @param initialState - Initial shutdown state (default: false)
6622
6775
  * @returns A tuple of [ShutdownStatus, setShutdown function, setCompleted function]
6623
6776
  */
6624
- declare function createMutableShutdownStatus(initialState?: boolean): [ShutdownStatus, (value: boolean) => void, (completed: Promise<void>) => void];
6777
+ export declare function createMutableShutdownStatus(initialState?: boolean): [ShutdownStatus, (value: boolean) => void, (completed: Promise<void>) => void];
6625
6778
  //#endregion
6626
6779
  //#region src/shared/utils.d.ts
6627
6780
  type ParsedPaging = {
@@ -6634,19 +6787,21 @@ type ParsedPaging = {
6634
6787
  * limit is less than 1. When `paging` is undefined, returns offset 0 and
6635
6788
  * the caller-supplied `defaultLimit`.
6636
6789
  */
6637
- declare function parsePagingOptions(paging: PagingOptions | undefined, defaultLimit: number): ParsedPaging;
6790
+ export declare function parsePagingOptions(paging: PagingOptions | undefined, defaultLimit: number): ParsedPaging;
6638
6791
  //#endregion
6639
6792
  //#region src/signer/verify-action-signature.d.ts
6640
6793
  type VerificationTarget = {
6641
- /** The stream the operation is stored in. */documentId: string;
6642
- branch: string; /** Of the document `documentId` names; legacy when omitted. */
6794
+ /** The stream the operation is stored in. */
6795
+ documentId: string;
6796
+ branch: string;
6797
+ /** Of the document `documentId` names; legacy when omitted. */
6643
6798
  policy?: SignaturePolicy;
6644
6799
  };
6645
6800
  /**
6646
6801
  * Integrity only: identity binding and the live-id check sit with the caller.
6647
6802
  * `operation` is the incoming operation at load admission.
6648
6803
  */
6649
- declare function verifyActionSignature(action: Action, target: VerificationTarget, path: AdmissionPath, operation?: {
6804
+ export declare function verifyActionSignature(action: Action, target: VerificationTarget, path: AdmissionPath, operation?: {
6650
6805
  timestampUtcMs: string;
6651
6806
  }): Promise<SignatureVerdict>;
6652
6807
  //#endregion
@@ -6655,7 +6810,7 @@ declare function verifyActionSignature(action: Action, target: VerificationTarge
6655
6810
  * Default error handler that re-throws subscription errors.
6656
6811
  * This ensures that errors are not silently swallowed.
6657
6812
  */
6658
- declare class DefaultSubscriptionErrorHandler implements ISubscriptionErrorHandler {
6813
+ export declare class DefaultSubscriptionErrorHandler implements ISubscriptionErrorHandler {
6659
6814
  handleError(error: unknown, context: SubscriptionErrorContext): void;
6660
6815
  }
6661
6816
  //#endregion
@@ -6664,7 +6819,7 @@ type DocumentCreatedCallback = (result: PagedResults<string>) => void;
6664
6819
  type DocumentDeletedCallback = (documentIds: string[]) => void;
6665
6820
  type DocumentStateUpdatedCallback = (result: PagedResults<PHDocument>) => void;
6666
6821
  type RelationshipChangedCallback = (parentId: string, childId: string, changeType: RelationshipChangeType) => void;
6667
- declare class ReactorSubscriptionManager implements IReactorSubscriptionManager {
6822
+ export declare class ReactorSubscriptionManager implements IReactorSubscriptionManager {
6668
6823
  private createdSubscriptions;
6669
6824
  private deletedSubscriptions;
6670
6825
  private updatedSubscriptions;
@@ -6702,7 +6857,7 @@ declare class ReactorSubscriptionManager implements IReactorSubscriptionManager
6702
6857
  }
6703
6858
  //#endregion
6704
6859
  //#region src/events/event-bus.d.ts
6705
- declare class EventBus implements IEventBus {
6860
+ export declare class EventBus implements IEventBus {
6706
6861
  readonly eventTypeToSubscribers: Map<number, Subscriber[]>;
6707
6862
  subscribe<K>(type: number, subscriber: (type: number, event: K) => void | Promise<void>): Unsubscribe;
6708
6863
  emit(type: number, data: any): Promise<void>;
@@ -6715,7 +6870,7 @@ declare class EventBus implements IEventBus {
6715
6870
  * Ensures serial execution per document by tracking executing jobs.
6716
6871
  * Implements dependency management through queue hints.
6717
6872
  */
6718
- declare class InMemoryQueue implements IQueue {
6873
+ export declare class InMemoryQueue implements IQueue {
6719
6874
  private eventBus;
6720
6875
  private resolver;
6721
6876
  private queues;
@@ -6827,7 +6982,7 @@ declare class InMemoryQueue implements IQueue {
6827
6982
  * Maintains job status in a Map for synchronous access.
6828
6983
  * Subscribes to operation events to update job states.
6829
6984
  */
6830
- declare class InMemoryJobTracker implements IJobTracker {
6985
+ export declare class InMemoryJobTracker implements IJobTracker {
6831
6986
  private eventBus;
6832
6987
  private jobs;
6833
6988
  private unsubscribers;
@@ -6849,7 +7004,7 @@ type JobExecutorFactory = () => IJobExecutor;
6849
7004
  * Manages multiple job executors and coordinates job distribution.
6850
7005
  * Listens for job available events and dispatches jobs to executors.
6851
7006
  */
6852
- declare class SimpleJobExecutorManager implements IJobExecutorManager {
7007
+ export declare class SimpleJobExecutorManager implements IJobExecutorManager {
6853
7008
  private executorFactory;
6854
7009
  private eventBus;
6855
7010
  private queue;
@@ -6875,7 +7030,7 @@ declare class SimpleJobExecutorManager implements IJobExecutorManager {
6875
7030
  }
6876
7031
  //#endregion
6877
7032
  //#region src/executor/simple-job-executor.d.ts
6878
- declare class SimpleJobExecutor implements IJobExecutor {
7033
+ export declare class SimpleJobExecutor implements IJobExecutor {
6879
7034
  private logger;
6880
7035
  private registry;
6881
7036
  private operationStore;
@@ -7093,21 +7248,21 @@ declare class SimpleJobExecutor implements IJobExecutor {
7093
7248
  }
7094
7249
  //#endregion
7095
7250
  //#region src/executor/worker/forwarding-logger.d.ts
7096
- declare function createForwardingLogger(post: (msg: LogMessage) => void, level?: ILogger["level"], tags?: string[]): ILogger;
7251
+ export declare function createForwardingLogger(post: (msg: LogMessage) => void, level?: ILogger["level"], tags?: string[]): ILogger;
7097
7252
  //#endregion
7098
7253
  //#region src/executor/worker/sanitize.d.ts
7099
- declare function errorToInfo(err: unknown): ErrorInfo;
7100
- declare function sanitizeArg(value: unknown, depth?: number, seen?: WeakSet<object>): SanitizedArg;
7254
+ export declare function errorToInfo(err: unknown): ErrorInfo;
7255
+ export declare function sanitizeArg(value: unknown, depth?: number, seen?: WeakSet<object>): SanitizedArg;
7101
7256
  //#endregion
7102
7257
  //#region src/executor/worker/index.d.ts
7103
7258
  /** Absolute path to the worker entry script for use with `new Worker(workerEntryPath)`. */
7104
- declare const workerEntryPath: string;
7259
+ export declare const workerEntryPath: string;
7105
7260
  //#endregion
7106
7261
  //#region src/registry/errors.d.ts
7107
7262
  /**
7108
7263
  * Error thrown when a document model module is not found in the registry.
7109
7264
  */
7110
- declare class ModuleNotFoundError extends Error {
7265
+ export declare class ModuleNotFoundError extends Error {
7111
7266
  readonly documentType: string;
7112
7267
  readonly requestedVersion: number | undefined;
7113
7268
  constructor(documentType: string, version?: number);
@@ -7116,20 +7271,20 @@ declare class ModuleNotFoundError extends Error {
7116
7271
  /**
7117
7272
  * Error thrown when attempting to register a module that already exists.
7118
7273
  */
7119
- declare class DuplicateModuleError extends Error {
7274
+ export declare class DuplicateModuleError extends Error {
7120
7275
  constructor(documentType: string, version?: number);
7121
7276
  static isError(error: unknown): error is DuplicateModuleError;
7122
7277
  }
7123
7278
  /**
7124
7279
  * Error thrown when a module is invalid or malformed.
7125
7280
  */
7126
- declare class InvalidModuleError extends Error {
7281
+ export declare class InvalidModuleError extends Error {
7127
7282
  constructor(message: string);
7128
7283
  }
7129
7284
  /**
7130
7285
  * Error thrown when attempting to register an upgrade manifest that already exists.
7131
7286
  */
7132
- declare class DuplicateManifestError extends Error {
7287
+ export declare class DuplicateManifestError extends Error {
7133
7288
  constructor(documentType: string);
7134
7289
  static isError(error: unknown): error is DuplicateManifestError;
7135
7290
  }
@@ -7139,7 +7294,7 @@ declare class DuplicateManifestError extends Error {
7139
7294
  * In-memory implementation of the IDocumentModelRegistry interface.
7140
7295
  * Manages document model modules with version-aware storage and upgrade manifest support.
7141
7296
  */
7142
- declare class DocumentModelRegistry implements IDocumentModelRegistry {
7297
+ export declare class DocumentModelRegistry implements IDocumentModelRegistry {
7143
7298
  private modules;
7144
7299
  private manifests;
7145
7300
  registerModules(...modules: DocumentModelModule<any>[]): RegistrationResult<DocumentModelModule<any>>[];
@@ -7163,7 +7318,7 @@ declare class DocumentModelRegistry implements IDocumentModelRegistry {
7163
7318
  * see only those and contribute a map from document id to state. Each
7164
7319
  * distinct stream is read once and yields one append condition entry.
7165
7320
  */
7166
- declare function buildDecisionModel<M>(reader: IStreamStateReader, definition: (target: DecisionTarget) => DecisionModel<M>, target: DecisionTarget, signal?: AbortSignal): Promise<BuiltDecisionModel<M>>;
7321
+ export declare function buildDecisionModel<M>(reader: IStreamStateReader, definition: (target: DecisionTarget) => DecisionModel<M>, target: DecisionTarget, signal?: AbortSignal): Promise<BuiltDecisionModel<M>>;
7167
7322
  //#endregion
7168
7323
  //#region src/decision/auth-decision-model.d.ts
7169
7324
  type AuthDecisionModel = {
@@ -7171,7 +7326,7 @@ type AuthDecisionModel = {
7171
7326
  auth: PHAuthState;
7172
7327
  };
7173
7328
  /** This decision model uses both the document and the auth streams. */
7174
- declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDecisionModel>;
7329
+ export declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDecisionModel>;
7175
7330
  //#endregion
7176
7331
  //#region src/decision/sync-scope-gate.d.ts
7177
7332
  /**
@@ -7181,7 +7336,7 @@ declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDe
7181
7336
  * scope, and carries no state. Fetching the document is therefore the serving
7182
7337
  * path's own job, and it is the only thing this adds to the gate it wraps.
7183
7338
  */
7184
- declare class SyncScopeGate {
7339
+ export declare class SyncScopeGate {
7185
7340
  private readonly gate;
7186
7341
  private readonly documentView;
7187
7342
  private readonly logger?;
@@ -7224,13 +7379,13 @@ type OutOfOrderPair = {
7224
7379
  * `requireStrict` additionally rejects a tie, which is what the auth stream's
7225
7380
  * monotonic rule requires and what the walk alone does not care about.
7226
7381
  */
7227
- declare function firstOutOfOrderPair(operations: Operation[], options?: {
7382
+ export declare function firstOutOfOrderPair(operations: Operation[], options?: {
7228
7383
  requireStrict?: boolean;
7229
7384
  }): OutOfOrderPair | undefined;
7230
7385
  //#endregion
7231
7386
  //#region src/storage/kysely/document-indexer.d.ts
7232
7387
  type IndexerDatabase = Database$1 & DocumentIndexerDatabase & DocumentViewDatabase;
7233
- declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIndexer {
7388
+ export declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIndexer {
7234
7389
  private _db;
7235
7390
  constructor(db: Kysely<IndexerDatabase>, operationIndex: IOperationIndex, writeCache: IWriteCache, consistencyTracker: IConsistencyTracker, indexing?: ReadModelIndexingConfig);
7236
7391
  /** Opens no transaction for a batch carrying no relationship operation. */
@@ -7257,7 +7412,7 @@ declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIn
7257
7412
  * serialized so the executor can return to dispatch without holding ordering
7258
7413
  * implicitly.
7259
7414
  */
7260
- declare class ReadModelCoordinator implements ILiveReadModelCoordinator {
7415
+ export declare class ReadModelCoordinator implements ILiveReadModelCoordinator {
7261
7416
  private eventBus;
7262
7417
  readonly preReady: IReadModel[];
7263
7418
  readonly postReady: IReadModel[];
@@ -7292,7 +7447,7 @@ type Database$2 = Database$1 & DocumentViewDatabase;
7292
7447
  * What a single-document read of a deleted document returns. A listing omits a
7293
7448
  * deleted document under either value.
7294
7449
  */
7295
- declare enum DeletedDocumentRead {
7450
+ export declare enum DeletedDocumentRead {
7296
7451
  /**
7297
7452
  * The document reads as missing: `get` throws and `resolveIdOrSlug` does not
7298
7453
  * match its id.
@@ -7305,7 +7460,7 @@ declare enum DeletedDocumentRead {
7305
7460
  */
7306
7461
  StateAtDeletion = "StateAtDeletion"
7307
7462
  }
7308
- declare class KyselyDocumentView extends BaseReadModel implements IDocumentView {
7463
+ export declare class KyselyDocumentView extends BaseReadModel implements IDocumentView {
7309
7464
  private operationStore;
7310
7465
  private readonly deletedDocumentRead;
7311
7466
  private _db;
@@ -7349,9 +7504,9 @@ declare class KyselyDocumentView extends BaseReadModel implements IDocumentView
7349
7504
  //#endregion
7350
7505
  //#region src/read-models/names.d.ts
7351
7506
  /** `getReadModel` name of the document view; see {@link ReactorReadModels}. */
7352
- declare const DOCUMENT_VIEW_READ_MODEL = "document-view";
7507
+ export declare const DOCUMENT_VIEW_READ_MODEL = "document-view";
7353
7508
  /** `getReadModel` name of the document indexer; see {@link ReactorReadModels}. */
7354
- declare const DOCUMENT_INDEXER_READ_MODEL = "document-indexer";
7509
+ export declare const DOCUMENT_INDEXER_READ_MODEL = "document-indexer";
7355
7510
  /**
7356
7511
  * Read models the reactor registers on every host, keyed by the name passed to
7357
7512
  * `IProcessorHostModule.getReadModel`. Each entry says what the model holds
@@ -7384,18 +7539,18 @@ interface ReactorReadModels {
7384
7539
  }
7385
7540
  //#endregion
7386
7541
  //#region src/storage/migrations/migrator.d.ts
7387
- declare const REACTOR_SCHEMA = "reactor";
7542
+ export declare const REACTOR_SCHEMA = "reactor";
7388
7543
  /**
7389
7544
  * Applies every pending migration, or every one up to and including `upTo`.
7390
7545
  *
7391
7546
  * The bound exists so a test can reach the schema a data migration is written
7392
7547
  * against, populate it, and then migrate across the migration under test.
7393
7548
  */
7394
- declare function runMigrations(db: Kysely<any>, schema?: string, upTo?: string): Promise<MigrationResult>;
7395
- declare function getMigrationStatus(db: Kysely<any>, schema?: string): Promise<readonly kysely.MigrationInfo[]>;
7549
+ export declare function runMigrations(db: Kysely<any>, schema?: string, upTo?: string): Promise<MigrationResult>;
7550
+ export declare function getMigrationStatus(db: Kysely<any>, schema?: string): Promise<readonly import("kysely").MigrationInfo[]>;
7396
7551
  //#endregion
7397
7552
  //#region src/storage/kysely/sync-cursor-storage.d.ts
7398
- declare class KyselySyncCursorStorage implements ISyncCursorStorage {
7553
+ export declare class KyselySyncCursorStorage implements ISyncCursorStorage {
7399
7554
  private readonly db;
7400
7555
  constructor(db: Kysely<Database$1>);
7401
7556
  list(remoteName: string, signal?: AbortSignal): Promise<RemoteCursor[]>;
@@ -7405,7 +7560,7 @@ declare class KyselySyncCursorStorage implements ISyncCursorStorage {
7405
7560
  }
7406
7561
  //#endregion
7407
7562
  //#region src/storage/kysely/sync-remote-storage.d.ts
7408
- declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
7563
+ export declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
7409
7564
  private readonly db;
7410
7565
  constructor(db: Kysely<Database$1>);
7411
7566
  list(signal?: AbortSignal): Promise<RemoteRecord[]>;
@@ -7424,7 +7579,7 @@ declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
7424
7579
  * The optional jwtHandler enables dynamic JWT token generation per-request,
7425
7580
  * which is useful for short-lived tokens with audience-specific claims.
7426
7581
  */
7427
- declare class GqlRequestChannelFactory implements IChannelFactory {
7582
+ export declare class GqlRequestChannelFactory implements IChannelFactory {
7428
7583
  private readonly logger;
7429
7584
  private readonly jwtHandler?;
7430
7585
  private readonly queue;
@@ -7445,7 +7600,7 @@ declare class GqlRequestChannelFactory implements IChannelFactory {
7445
7600
  /**
7446
7601
  * Factory for creating GqlResponseChannel instances.
7447
7602
  */
7448
- declare class GqlResponseChannelFactory implements IChannelFactory {
7603
+ export declare class GqlResponseChannelFactory implements IChannelFactory {
7449
7604
  private readonly logger;
7450
7605
  constructor(logger: ILogger);
7451
7606
  instance(remoteId: string, remoteName: string, config: ChannelConfig, cursorStorage: ISyncCursorStorage): IChannel;
@@ -7458,8 +7613,11 @@ declare class GqlResponseChannelFactory implements IChannelFactory {
7458
7613
  * The delegate returns a Promise; timer waits for completion before scheduling next tick.
7459
7614
  */
7460
7615
  type IPollTimer = {
7461
- /** Register the delegate to be called on each tick. Returns Promise that timer awaits. */setDelegate: (delegate: () => Promise<void>) => void; /** Start the timer (begins calling delegate periodically) */
7462
- start: () => void; /** Stop the timer */
7616
+ /** Register the delegate to be called on each tick. Returns Promise that timer awaits. */
7617
+ setDelegate: (delegate: () => Promise<void>) => void;
7618
+ /** Start the timer (begins calling delegate periodically) */
7619
+ start: () => void;
7620
+ /** Stop the timer */
7463
7621
  stop: () => void;
7464
7622
  /**
7465
7623
  * Fires the delegate exactly once without changing the running/paused state.
@@ -7473,18 +7631,25 @@ type IPollTimer = {
7473
7631
  * Configuration parameters for GqlChannel
7474
7632
  */
7475
7633
  type GqlChannelConfig = {
7476
- /** The GraphQL endpoint URL */url: string; /** Dynamic JWT token handler for generating fresh tokens per-request */
7477
- jwtHandler?: JwtHandler; /** Custom fetch function for testing (default: global fetch) */
7478
- fetchFn?: typeof fetch; /** Collection to synchronize (drive-level abstraction) */
7479
- collectionId: DriveCollectionId; /** Filter to apply to operations */
7480
- filter: RemoteFilter; /** Base delay in ms for exponential backoff on push retries */
7481
- retryBaseDelayMs: number; /** Maximum delay in ms for exponential backoff on push retries */
7634
+ /** The GraphQL endpoint URL */
7635
+ url: string;
7636
+ /** Dynamic JWT token handler for generating fresh tokens per-request */
7637
+ jwtHandler?: JwtHandler;
7638
+ /** Custom fetch function for testing (default: global fetch) */
7639
+ fetchFn?: typeof fetch;
7640
+ /** Collection to synchronize (drive-level abstraction) */
7641
+ collectionId: DriveCollectionId;
7642
+ /** Filter to apply to operations */
7643
+ filter: RemoteFilter;
7644
+ /** Base delay in ms for exponential backoff on push retries */
7645
+ retryBaseDelayMs: number;
7646
+ /** Maximum delay in ms for exponential backoff on push retries */
7482
7647
  retryMaxDelayMs: number;
7483
7648
  };
7484
7649
  /**
7485
7650
  * GraphQL-based synchronization channel for network communication between reactors.
7486
7651
  */
7487
- declare class GqlRequestChannel implements IChannel {
7652
+ export declare class GqlRequestChannel implements IChannel {
7488
7653
  private readonly logger;
7489
7654
  readonly inbox: IMailbox;
7490
7655
  readonly outbox: IMailbox;
@@ -7622,7 +7787,7 @@ declare class GqlRequestChannel implements IChannel {
7622
7787
  *
7623
7788
  * In general, the resolvers are responsible for updating mailboxes.
7624
7789
  */
7625
- declare class GqlResponseChannel implements IChannel {
7790
+ export declare class GqlResponseChannel implements IChannel {
7626
7791
  private readonly logger;
7627
7792
  readonly inbox: Mailbox;
7628
7793
  readonly outbox: Mailbox;
@@ -7697,7 +7862,7 @@ type PollTimerConfig = {
7697
7862
  * Waits for delegate completion before scheduling next tick.
7698
7863
  * Checks queue depth and defers polling when backpressure is detected.
7699
7864
  */
7700
- declare class IntervalPollTimer implements IPollTimer {
7865
+ export declare class IntervalPollTimer implements IPollTimer {
7701
7866
  private delegate;
7702
7867
  private timer;
7703
7868
  private running;
@@ -7735,7 +7900,7 @@ declare class IntervalPollTimer implements IPollTimer {
7735
7900
  * This ensures operations are grouped for efficient processing while maintaining
7736
7901
  * causality across documents.
7737
7902
  */
7738
- declare function envelopesToSyncOperations(envelope: SyncEnvelope, remoteName: string): SyncOperation[];
7903
+ export declare function envelopesToSyncOperations(envelope: SyncEnvelope, remoteName: string): SyncOperation[];
7739
7904
  //#endregion
7740
7905
  //#region src/sync/utils.d.ts
7741
7906
  type OperationBatch = {
@@ -7747,7 +7912,7 @@ type OperationBatch = {
7747
7912
  /**
7748
7913
  * Trims a mailbox using the ack ordinal.
7749
7914
  */
7750
- declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number): void;
7915
+ export declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number): void;
7751
7916
  /**
7752
7917
  * Batches consecutive operations by documentId and scope, preserving ordering.
7753
7918
  *
@@ -7760,7 +7925,7 @@ declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number
7760
7925
  * This ensures operations are grouped for efficient processing while maintaining
7761
7926
  * causality across documents and scopes.
7762
7927
  */
7763
- declare function batchOperationsByDocument(operations: OperationWithContext$1[]): OperationBatch[];
7928
+ export declare function batchOperationsByDocument(operations: OperationWithContext$1[]): OperationBatch[];
7764
7929
  /**
7765
7930
  * Merges SyncOperations that share the same (documentId, scope, branch) into
7766
7931
  * a single SyncOperation per group. Within each group, operations are sorted
@@ -7774,19 +7939,19 @@ declare function batchOperationsByDocument(operations: OperationWithContext$1[])
7774
7939
  * depend on the other, which validateBatchStructure rejects as a dependency
7775
7940
  * cycle. Merging only adjacent entries keeps the chain linear.
7776
7941
  */
7777
- declare function consolidateSyncOperations(syncOps: SyncOperation[]): SyncOperation[];
7942
+ export declare function consolidateSyncOperations(syncOps: SyncOperation[]): SyncOperation[];
7778
7943
  /**
7779
7944
  * Classifies a failure by error name rather than `instanceof`, because a failure
7780
7945
  * that crossed the pooled-worker boundary arrives as plain data.
7781
7946
  */
7782
- declare function classifyJobFailure(errorName: string): SyncOperationErrorType;
7947
+ export declare function classifyJobFailure(errorName: string): SyncOperationErrorType;
7783
7948
  /** The explicit type when something else carried it, else derived by name. */
7784
- declare function syncOperationErrorType(error: ChannelError | undefined): SyncOperationErrorType;
7949
+ export declare function syncOperationErrorType(error: ChannelError | undefined): SyncOperationErrorType;
7785
7950
  /**
7786
7951
  * A held auth operation must not quarantine: reconciling the two policies needs
7787
7952
  * the traffic a quarantine would stop.
7788
7953
  */
7789
- declare function quarantinesDocument(errorType: SyncOperationErrorType): boolean;
7954
+ export declare function quarantinesDocument(errorType: SyncOperationErrorType): boolean;
7790
7955
  //#endregion
7791
7956
  //#region src/processors/host-module.d.ts
7792
7957
  /**
@@ -7811,11 +7976,12 @@ interface IReactorProcessorHostModuleBase extends IProcessorHostModuleBase$1 {
7811
7976
  getReadModel<T>(name: string): T;
7812
7977
  }
7813
7978
  type ReactorHostModuleBaseOptions = Pick<IProcessorHostModuleBase$1, "analyticsStore" | "relationalDb" | "processorApp" | "config"> & {
7814
- client: IReactorClient; /** Registered read models, typically `readModelCoordinator.readModels`. */
7979
+ client: IReactorClient;
7980
+ /** Registered read models, typically `readModelCoordinator.readModels`. */
7815
7981
  readModels: ReadonlyArray<Pick<IReadModel, "name">>;
7816
7982
  };
7817
7983
  /** Builds the reactor-level host module; hosts spread it and add their own fields. */
7818
- declare function createReactorHostModuleBase(options: ReactorHostModuleBaseOptions): IReactorProcessorHostModuleBase;
7984
+ export declare function createReactorHostModuleBase(options: ReactorHostModuleBaseOptions): IReactorProcessorHostModuleBase;
7819
7985
  //#endregion
7820
7986
  //#region src/admin/types.d.ts
7821
7987
  type KeyframeValidationIssue = {
@@ -7858,7 +8024,7 @@ interface IDocumentIntegrityService {
7858
8024
  }
7859
8025
  //#endregion
7860
8026
  //#region src/admin/document-integrity-service.d.ts
7861
- declare class DocumentIntegrityService implements IDocumentIntegrityService {
8027
+ export declare class DocumentIntegrityService implements IDocumentIntegrityService {
7862
8028
  private readonly keyframeStore;
7863
8029
  private readonly operationStore;
7864
8030
  private readonly writeCache;
@@ -7884,7 +8050,7 @@ type FactoryRun = () => Promise<void>;
7884
8050
  type ProcessorManagerOptions = {
7885
8051
  legacyProcessorIds?: boolean;
7886
8052
  };
7887
- declare class ProcessorManager extends BaseReadModel implements IProcessorManager$1 {
8053
+ export declare class ProcessorManager extends BaseReadModel implements IProcessorManager$1 {
7888
8054
  private factoryRegistry;
7889
8055
  private processorsByDrive;
7890
8056
  private pendingSlots;
@@ -7934,5 +8100,6 @@ declare class ProcessorManager extends BaseReadModel implements IProcessorManage
7934
8100
  private deleteCursors;
7935
8101
  }
7936
8102
  //#endregion
7937
- export { ALWAYS_READABLE_SCOPES, APPEND_CONDITION_FAILED_PREFIX, type AbortMessage, type ActionCandidate, type ActionEvaluationConfig, type ActionEvaluations, type AdmissionDecision, type AdmissionPath, type AppendCondition, AppendConditionFailedError, type AppendConditionStream, type AtomicTxn, type AttachmentHash, type AttachmentRef, type AuthDecisionModel, AuthEnforcementDisabledError, BareReadGate, BaseReadModel, type BaseReadModelConfig, type BatchExecutionRequest, type BatchExecutionResult, type BatchLoadRequest, type BatchLoadResult, type BuiltDecisionModel, type BuiltInReadModelKind, type CachedSnapshot, type ChannelConfig, ChannelError, ChannelErrorSource, type ChannelHealth, type ChannelMeta, ChannelScheme, type ConnectionState, type ConnectionStateChangeCallback, type ConnectionStateChangedEvent, type ConnectionStateSnapshot, type ConsistencyCoordinate, type ConsistencyKey, type ConsistencyToken, ConsistencyTracker, DEFAULT_COMMIT_CHUNK_SIZE, DEFAULT_DRIVE_CONTAINER_TYPES, DEFAULT_READ_MODEL_YIELD_DEADLINE_MS, DOCUMENT_INDEXER_READ_MODEL, DOCUMENT_VIEW_READ_MODEL, DRIVE_AUTH_ERROR_MESSAGES, type Database, type DbConfig, type DeadLetterAddedEvent, type DecisionContext, type DecisionModel, type DecisionTarget, DefaultSubscriptionErrorHandler, type DegradedComponent, DeletedDocumentRead, DocumentAlreadyExistsError, type DocumentChangeEvent, DocumentChangeType, type DocumentDecisionModel, DocumentExistence, type DocumentGraphEdge, type DocumentIndexerDatabase, DocumentIntegrityService, DocumentModelRegistry, DocumentModelResolver, type DocumentModelSource, type DocumentModelSpec, type DocumentRelationship, type DocumentRevisions, type DocumentStreamKey, type DocumentViewDatabase, DriveClient, DriveCollectionId, DriveRequestError, DuplicateManifestError, DuplicateModuleError, DuplicateOperationError, type Evaluation, EventBus, EventBusAggregateError, type ExecuteMessage, type ExecutionJobPlan, type ExecutorStartedEvent, type ExecutorStoppedEvent, type FactorySpec, type FileModelSource, type GqlChannelConfig, GqlRequestChannel, GqlRequestChannelFactory, GqlResponseChannel, GqlResponseChannelFactory, type HeartbeatMessage, HybridProjectionCoordinator, type HybridProjectionCoordinatorOptions, type HybridProjectionOptions, type IChannel, type IChannelFactory, type IConsistencyTracker, type IDocumentGraph, type IDocumentIndexer, type IDocumentIntegrityService, type IDocumentModelLoader, type IDocumentModelRegistry, type IDocumentModelResolver, type IDocumentView, type IDriveClient, type IEventBus, type IJobAwaiter, type IJobExecutor, type IJobExecutorManager, type IJobTracker, type IKeyframeStore, type ILiveReadModelCoordinator, type IMailbox, type IOperationIndex, type IOperationStore, type IPollTimer, type IProcessor, type IProcessorHostModuleBase, type IProcessorManager, type IProjectionTransport, type IQueue, type IReactor, type IReactorClient, type IReactorProcessorHostModuleBase, type IReactorSubscriptionManager, type IReadGate, type IReadModel, type IReadModelCoordinator, type IRelationalDb, type IStreamStateReader, type ISubscriptionErrorHandler, type ISyncCursorStorage, type ISyncManager, type ISyncRemoteStorage, type ISyncStatusTracker, type IWriteCache, SimpleJobExecutor as InMemoryJobExecutor, SimpleJobExecutor, InMemoryJobTracker, InMemoryQueue, type InProcessReactorClientModule, type InProcessReactorModule, type InProcessSyncModule, type InitMessage, type InsertableDocumentSnapshot, IntervalPollTimer, InvalidModuleError, InvalidSignatureError, type Job, type JobAvailableEvent, JobAwaiter, type JobCompletedEvent, type JobExecutorConfig, JobExecutorEventTypes, type JobExecutorFactory, type JobFailedEvent, type JobInfo, type JobPendingEvent, type JobReadReadyEvent, type JobResult, type JobResultSummary, type JobRunningEvent, type JobStartedEvent, JobStatus, type JobWriteReadyEvent, type JobWriteReadyPayload, type JwtHandler, type KeyframeSnapshot, type KeyframeValidationIssue, KyselyDocumentIndexer, KyselyDocumentView, KyselyKeyframeStore, KyselyOperationStore, KyselySyncCursorStorage, KyselySyncRemoteStorage, KyselyWriteCache, type LoadJobPlan, type LoadModelMessage, type LogMessage, Mailbox, type MetricsMessage, type ModelLoadFailedMessage, type ModelLoadedEvent, type ModelLoadedMessage, type ModelManifestEntry, ModelReadGate, ModuleNotFoundError, type ModuleRef, NullDocumentModelResolver, type OperationBatch, type OperationContext, type OperationFilter, type OperationIndexEntry, type OperationTable, type OperationWithContext, OptimisticLockError, type OutOfOrderPair, type PackageModelSource, type PagedResults, type PagingOptions, type ParentMessage, type ParsedDriveUrl, type ParsedPaging, PollBehavior, PollingChannelError, type PoolInstrumentation, type PoolStats, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, ProcessorManager, type ProcessorRecord, type ProcessorStatus, type Projection, type ProjectionShardBuilderConfig, type ProjectionShardHooks, type ProjectionShardManagerConfig, type ProjectionWorkerFactory, PropagationMode, QueueEventTypes, REACTOR_SCHEMA, RECOVERABLE_GRAPHQL_ERROR_CODES, Reactor, ReactorBuilder, ReactorClient, ReactorClientBuilder, type ReactorClientModule, ReactorEventTypes, type ReactorFeatureFlags, type ReactorFeatures, type ReactorHostModuleBaseOptions, type JobFailedEvent$1 as ReactorJobFailedEvent, type ReactorModule, type ReactorReadModels, ReactorSubscriptionManager, type ReadGateOptions, type ReadModelBatchCompletedEvent, ReadModelCoordinator, type ReadModelCoordinatorFactory, type ReadModelCoordinatorFactoryDeps, type ReadModelFactory, type ReadModelFactoryDeps, type ReadModelIndexedEvent, type ReadModelIndexingConfig, type ReadModelIndexingStage, type ReadModelRegistrationStage, type ReadModelStage, type ReadyMessage, type RebuildResult, type RegisteredDecisionModel, RelationalDbProcessor, RelationshipChangeType, RelationshipNotFoundError, type Remote, type RemoteCursor, type RemoteFilter, type RemoteMeta, type RemoteOptions, type RemoteRecord, type RemoteStatus, type ResultMessage, RetryAccounting, RevisionMismatchError, SIGNATURE_REFUSAL_CODES, type SanitizedArg, type SearchFilter, SeededStateReader, type ShutdownMessage, type ShutdownStatus, type SignatureRefusalCode, type SignatureRefusedEvent, type SignatureScheme, type SignatureTrustPolicy, type SignatureVerificationHandler, type SignatureVerificationMode, type SignerConfig, SimpleJobExecutorManager, type SnapshotValidationIssue, type Database$1 as StorageDatabase, type StreamOrderIssue, type StreamQuery, type SubmittedActionResult, type SubscriptionErrorContext, SyncBuilder, type SyncEnvelope, type SyncEnvelopeType, SyncEventTypes, type SyncFailedEvent, type SyncModule, SyncOperation, SyncOperationAggregateError, type SyncOperationErrorType, SyncOperationStatus, type SyncPendingEvent, SyncScopeGate, SyncStatus, type SyncStatusChangeCallback, SyncStatusTracker, type SyncSucceededEvent, type TrackedProcessor, type Unsubscribe, type ValidationResult, type VerificationTarget, type ViewFilter, type ErrorInfo as WorkerErrorInfo, type WorkerMessage, type WorkerPoolConfig, type WorkerPoolOptions, type WriteCacheConfig, addRelationshipAction, authDecisionModel, batchOperationsByDocument, buildDecisionModel, classifyJobFailure, consolidateSyncOperations, createDocumentAction, createForwardingLogger, createHybridProjectionCoordinatorFactory, createMutableShutdownStatus, createReactorHostModuleBase, createRelationalDb, decideAtHead, defaultReadModelIndexingConfig, deleteDocumentAction, documentActions, documentDecisionModel, driveIdFromUrl, envelopesToSyncOperations, errorToInfo, firstOutOfOrderPair, getMigrationStatus, instrumentPgPool, isDriveAuthError, isRecoverableGraphQLError, makeConsistencyKey, parseDriveUrl, parsePagingOptions, quarantinesDocument, readDecisionModel, removeRelationshipAction, runMigrations, sanitizeArg, selectDecisionModel, supportsLiveReadModelRegistration, syncOperationErrorType, trimMailboxFromAckOrdinal, unchunkedReadModelIndexingConfig, updateRelationshipAction, upgradeDocumentAction, verifyActionSignature, workerEntryPath };
8103
+ export { type AbortMessage, type ActionCandidate, type ActionEvaluationConfig, type ActionEvaluations, type AdmissionDecision, type AdmissionPath, type AppendCondition, type AppendConditionStream, type AtomicTxn, type AttachmentHash, type AttachmentRef, type AuthDecisionModel, type BaseReadModelConfig, type BatchExecutionRequest, type BatchExecutionResult, type BatchLoadRequest, type BatchLoadResult, type BuiltDecisionModel, type BuiltInReadModelKind, type CachedSnapshot, type ChannelConfig, type ChannelHealth, type ChannelMeta, type ConnectionState, type ConnectionStateChangeCallback, type ConnectionStateChangedEvent, type ConnectionStateSnapshot, type ConsistencyCoordinate, type ConsistencyKey, type ConsistencyToken, type Database, type DbConfig, type DeadLetterAddedEvent, type DecisionContext, type DecisionModel, type DecisionTarget, type DegradedComponent, type DocumentChangeEvent, type DocumentDecisionModel, type DocumentGraphEdge, type DocumentIndexerDatabase, type DocumentModelSource, type DocumentModelSpec, type DocumentRelationship, type DocumentRevisions, type DocumentStreamKey, type DocumentViewDatabase, type Evaluation, type ExecuteMessage, type ExecutionJobPlan, type ExecutorStartedEvent, type ExecutorStoppedEvent, type FactorySpec, type FileModelSource, type GqlChannelConfig, type HeartbeatMessage, type HybridProjectionCoordinatorOptions, type HybridProjectionOptions, type IChannel, type IChannelFactory, type IConsistencyTracker, type IDocumentGraph, type IDocumentIndexer, type IDocumentIntegrityService, type IDocumentModelLoader, type IDocumentModelRegistry, type IDocumentModelResolver, type IDocumentView, type IDriveClient, type IEventBus, type IJobAwaiter, type IJobExecutor, type IJobExecutorManager, type IJobTracker, type IKeyframeStore, type ILiveReadModelCoordinator, type IMailbox, type IOperationIndex, type IOperationStore, type IPollTimer, type IProcessor, type IProcessorHostModuleBase, type IProcessorManager, type IProjectionTransport, type IQueue, type IReactor, type IReactorClient, type IReactorProcessorHostModuleBase, type IReactorSubscriptionManager, type IReadGate, type IReadModel, type IReadModelCoordinator, type IRelationalDb, type IStreamStateReader, type ISubscriptionErrorHandler, type ISyncCursorStorage, type ISyncManager, type ISyncRemoteStorage, type ISyncStatusTracker, type IWriteCache, SimpleJobExecutor as InMemoryJobExecutor, type InProcessReactorClientModule, type InProcessReactorModule, type InProcessSyncModule, type InitMessage, type InsertableDocumentSnapshot, type Job, type JobAvailableEvent, type JobCompletedEvent, type JobExecutorConfig, type JobExecutorFactory, type JobFailedEvent, type JobInfo, type JobPendingEvent, type JobReadReadyEvent, type JobResult, type JobResultSummary, type JobRunningEvent, type JobStartedEvent, type JobWriteReadyEvent, type JobWriteReadyPayload, type JwtHandler, type KeyframeSnapshot, type KeyframeValidationIssue, type LoadJobPlan, type LoadModelMessage, type LogMessage, type MetricsMessage, type ModelLoadFailedMessage, type ModelLoadedEvent, type ModelLoadedMessage, type ModelManifestEntry, type ModuleRef, type OperationBatch, type OperationContext, type OperationFilter, type OperationIndexEntry, type OperationTable, type OperationWithContext, type OutOfOrderPair, type PackageModelSource, type PagedResults, type PagingOptions, type ParentMessage, type ParsedDriveUrl, type ParsedPaging, type PoolInstrumentation, type PoolStats, type ProcessorApp, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type ProcessorStatus, type Projection, type ProjectionShardBuilderConfig, type ProjectionShardHooks, type ProjectionShardManagerConfig, type ProjectionWorkerFactory, type ReactorClientModule, type ReactorFeatureFlags, type ReactorFeatures, type ReactorHostModuleBaseOptions, type JobFailedEvent$1 as ReactorJobFailedEvent, type ReactorModule, type ReactorReadModels, type ReadGateOptions, type ReadModelBatchCompletedEvent, type ReadModelCoordinatorFactory, type ReadModelCoordinatorFactoryDeps, type ReadModelFactory, type ReadModelFactoryDeps, type ReadModelIndexedEvent, type ReadModelIndexingConfig, type ReadModelIndexingStage, type ReadModelRegistrationStage, type ReadModelStage, type ReadyMessage, type RebuildResult, type RegisteredDecisionModel, RelationalDbProcessor, type Remote, type RemoteCursor, type RemoteFilter, type RemoteMeta, type RemoteOptions, type RemoteRecord, type RemoteStatus, type ResultMessage, type SanitizedArg, type SearchFilter, type ShutdownMessage, type ShutdownStatus, type SignatureRefusalCode, type SignatureRefusedEvent, type SignatureScheme, type SignatureTrustPolicy, type SignatureVerificationHandler, type SignatureVerificationMode, type SignerConfig, type SnapshotValidationIssue, type Database$1 as StorageDatabase, type StreamOrderIssue, type StreamQuery, type SubjectScopePredicate, type SubmittedActionResult, type SubscriptionErrorContext, type SyncEnvelope, type SyncEnvelopeType, type SyncFailedEvent, type SyncModule, type SyncOperationErrorType, type SyncPendingEvent, type SyncStatusChangeCallback, type SyncSucceededEvent, type TrackedProcessor, type Unsubscribe, type ValidationResult, type VerificationTarget, type ViewFilter, type ErrorInfo as WorkerErrorInfo, type WorkerMessage, type WorkerPoolConfig, type WorkerPoolOptions, type WriteCacheConfig, createRelationalDb, documentActions };
8104
+ export {};
7938
8105
  //# sourceMappingURL=index.d.ts.map