@powerhousedao/reactor 6.2.3-dev.24 → 6.2.3-dev.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-worker-executor-DxmDJ4QQ.js → build-worker-executor-DPGjh9Uc.js} +4 -4
- package/dist/{build-worker-executor-DxmDJ4QQ.js.map → build-worker-executor-DPGjh9Uc.js.map} +1 -1
- package/dist/{document-indexer-Dn9RB0sg.js → document-indexer-zbdzqZ3K.js} +18 -9
- package/dist/{document-indexer-Dn9RB0sg.js.map → document-indexer-zbdzqZ3K.js.map} +1 -1
- package/dist/entry.d.ts +2 -1
- package/dist/entry.js +2 -3
- package/dist/entry.js.map +1 -1
- package/dist/{errors-D3S6Eysd.js → errors-BM_ULVWd.js} +9 -1
- package/dist/{errors-D3S6Eysd.js.map → errors-BM_ULVWd.js.map} +1 -1
- package/dist/{drive-container-types-Be5-EY9W.js → forwarding-logger-CSsCJ38f.js} +247 -39
- package/dist/forwarding-logger-CSsCJ38f.js.map +1 -0
- package/dist/index.d.ts +359 -235
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +247 -171
- package/dist/index.js.map +1 -1
- package/dist/projection-entry.d.ts +2 -1
- package/dist/projection-entry.js +7 -13
- package/dist/projection-entry.js.map +1 -1
- package/dist/{projection-shard-manager-mQhfVipO.js → projection-shard-manager-B-j8VYzA.js} +2 -3
- package/dist/{projection-shard-manager-mQhfVipO.js.map → projection-shard-manager-B-j8VYzA.js.map} +1 -1
- package/dist/{projection-worker-wI4PwcV2.js → projection-worker-D8uNFdwX.js} +1 -1
- package/dist/{projection-worker-wI4PwcV2.js.map → projection-worker-D8uNFdwX.js.map} +1 -1
- package/dist/{transport-CuogVKN_.js → transport-B3G50KVd.js} +1 -1
- package/dist/{transport-CuogVKN_.js.map → transport-B3G50KVd.js.map} +1 -1
- package/dist/{transport-ByGviWdZ.js → transport-CZDHzfvy.js} +1 -1
- package/dist/{transport-ByGviWdZ.js.map → transport-CZDHzfvy.js.map} +1 -1
- package/dist/{worker-handle-B3p-nuqG.js → worker-handle-CwWNTpUg.js} +9 -8
- package/dist/{worker-handle-B3p-nuqG.js.map → worker-handle-CwWNTpUg.js.map} +1 -1
- package/package.json +5 -5
- package/dist/drive-container-types-Be5-EY9W.js.map +0 -1
- package/dist/error-info-Cpu4OY3o.js +0 -62
- package/dist/error-info-Cpu4OY3o.js.map +0 -1
- package/dist/forwarding-logger-BBkMSxuJ.js +0 -85
- package/dist/forwarding-logger-BBkMSxuJ.js.map +0 -1
- package/dist/types-DxDCmtId.js +0 -34
- package/dist/types-DxDCmtId.js.map +0 -1
- package/dist/worker-BDVzCtuf.js +0 -22
- 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 */
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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;
|
|
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. */
|
|
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;
|
|
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 */
|
|
@@ -391,10 +408,10 @@ type ReadModelRegistrationStage = "pre_ready" | "post_ready";
|
|
|
391
408
|
interface ILiveReadModelCoordinator extends IReadModelCoordinator {
|
|
392
409
|
addReadModel(readModel: IReadModel, stage: ReadModelRegistrationStage): void;
|
|
393
410
|
}
|
|
394
|
-
declare function supportsLiveReadModelRegistration(coordinator: IReadModelCoordinator): coordinator is ILiveReadModelCoordinator;
|
|
411
|
+
export declare function supportsLiveReadModelRegistration(coordinator: IReadModelCoordinator): coordinator is ILiveReadModelCoordinator;
|
|
395
412
|
//#endregion
|
|
396
413
|
//#region src/sync/types.d.ts
|
|
397
|
-
declare enum ChannelScheme {
|
|
414
|
+
export declare enum ChannelScheme {
|
|
398
415
|
CONNECT = "connect",
|
|
399
416
|
SWITCHBOARD = "switchboard"
|
|
400
417
|
}
|
|
@@ -410,7 +427,7 @@ type JwtHandler = (url: string) => Promise<string | undefined>;
|
|
|
410
427
|
* - `Manual`: the channel registers and connects but never ticks on its own.
|
|
411
428
|
* Callers must invoke ISyncManager.triggerPull(name) to fetch.
|
|
412
429
|
*/
|
|
413
|
-
declare enum PollBehavior {
|
|
430
|
+
export declare enum PollBehavior {
|
|
414
431
|
Auto = "auto",
|
|
415
432
|
Manual = "manual"
|
|
416
433
|
}
|
|
@@ -459,26 +476,30 @@ type SyncEnvelope = {
|
|
|
459
476
|
key?: string;
|
|
460
477
|
dependsOn?: string[];
|
|
461
478
|
};
|
|
462
|
-
declare enum SyncOperationStatus {
|
|
479
|
+
export declare enum SyncOperationStatus {
|
|
463
480
|
Unknown = -1,
|
|
464
481
|
TransportPending = 0,
|
|
465
482
|
ExecutionPending = 1,
|
|
466
483
|
Applied = 2,
|
|
467
484
|
Error = 3
|
|
468
485
|
}
|
|
469
|
-
declare enum ChannelErrorSource {
|
|
486
|
+
export declare enum ChannelErrorSource {
|
|
470
487
|
None = "none",
|
|
471
488
|
Channel = "channel",
|
|
472
489
|
Inbox = "inbox",
|
|
473
490
|
Outbox = "outbox"
|
|
474
491
|
}
|
|
475
|
-
type SyncOperationErrorType = "SIGNATURE_INVALID" | "HASH_MISMATCH" | "LIBRARY_ERROR" | "MISSING_OPERATIONS" | "EXCESSIVE_SHUFFLE" | "GRACEFUL_ABORT"
|
|
492
|
+
type SyncOperationErrorType = "SIGNATURE_INVALID" | "HASH_MISMATCH" | "LIBRARY_ERROR" | "MISSING_OPERATIONS" | "EXCESSIVE_SHUFFLE" | "GRACEFUL_ABORT" |
|
|
476
493
|
/**
|
|
477
494
|
* An arriving auth operation did not exceed the local auth head. Exempt from
|
|
478
495
|
* quarantine, because reconciling the two policies needs the traffic a
|
|
479
496
|
* quarantine would stop.
|
|
480
497
|
*/
|
|
481
|
-
|
|
498
|
+
"AUTH_TIMESTAMP_NOT_MONOTONIC" |
|
|
499
|
+
/** An arriving operation carried a timestamp that is not an ISO-8601 instant. */
|
|
500
|
+
"INVALID_TIMESTAMP" |
|
|
501
|
+
/** No classification applies, including rows written before the field. */
|
|
502
|
+
"UNCLASSIFIED";
|
|
482
503
|
type ChannelHealth = {
|
|
483
504
|
state: "idle" | "running" | "error";
|
|
484
505
|
lastSuccessUtcMs?: number;
|
|
@@ -527,7 +548,7 @@ type RemoteRecord = {
|
|
|
527
548
|
* These events track the sync progress of a job's operations to remotes.
|
|
528
549
|
* Uses a separate namespace (20000 range) from ReactorEventTypes (10000 range).
|
|
529
550
|
*/
|
|
530
|
-
declare const SyncEventTypes: {
|
|
551
|
+
export declare const SyncEventTypes: {
|
|
531
552
|
readonly SYNC_PENDING: 20001;
|
|
532
553
|
readonly SYNC_SUCCEEDED: 20002;
|
|
533
554
|
readonly SYNC_FAILED: 20003;
|
|
@@ -602,27 +623,27 @@ type SyncResult = {
|
|
|
602
623
|
/**
|
|
603
624
|
* Thrown when an operation with the same identity already exists in the store.
|
|
604
625
|
*/
|
|
605
|
-
declare class DuplicateOperationError extends Error {
|
|
626
|
+
export declare class DuplicateOperationError extends Error {
|
|
606
627
|
constructor(description: string);
|
|
607
628
|
}
|
|
608
629
|
/**
|
|
609
630
|
* Thrown when a concurrent write conflict is detected during an atomic apply.
|
|
610
631
|
*/
|
|
611
|
-
declare class OptimisticLockError extends Error {
|
|
632
|
+
export declare class OptimisticLockError extends Error {
|
|
612
633
|
constructor(message: string);
|
|
613
634
|
}
|
|
614
635
|
/**
|
|
615
636
|
* Thrown when the caller-provided revision does not match the current
|
|
616
637
|
* stored revision, indicating a stale read.
|
|
617
638
|
*/
|
|
618
|
-
declare class RevisionMismatchError extends Error {
|
|
639
|
+
export declare class RevisionMismatchError extends Error {
|
|
619
640
|
constructor(expected: number, actual: number);
|
|
620
641
|
}
|
|
621
642
|
/**
|
|
622
643
|
* A create based on an empty stream that already has operations: the id is
|
|
623
644
|
* taken, and no retry can resolve it. Matched by `name`, all the RPC boundary keeps.
|
|
624
645
|
*/
|
|
625
|
-
declare class DocumentAlreadyExistsError extends Error {
|
|
646
|
+
export declare class DocumentAlreadyExistsError extends Error {
|
|
626
647
|
readonly documentId: string;
|
|
627
648
|
constructor(documentId: string, scope: string, headRevision: number);
|
|
628
649
|
static isError(error: unknown): error is DocumentAlreadyExistsError;
|
|
@@ -645,12 +666,12 @@ type AppendCondition = {
|
|
|
645
666
|
streams: AppendConditionStream[];
|
|
646
667
|
};
|
|
647
668
|
/** Error history keeps messages, not classes, so failures match by prefix. */
|
|
648
|
-
declare const APPEND_CONDITION_FAILED_PREFIX = "Append condition failed: ";
|
|
669
|
+
export declare const APPEND_CONDITION_FAILED_PREFIX = "Append condition failed: ";
|
|
649
670
|
/**
|
|
650
671
|
* A read-set stream grew before the append committed. A concurrency
|
|
651
672
|
* conflict, not a fault: the caller retries against the new stream heads.
|
|
652
673
|
*/
|
|
653
|
-
declare class AppendConditionFailedError extends Error {
|
|
674
|
+
export declare class AppendConditionFailedError extends Error {
|
|
654
675
|
readonly condition: AppendCondition;
|
|
655
676
|
constructor(condition: AppendCondition);
|
|
656
677
|
static isError(error: unknown): error is AppendConditionFailedError;
|
|
@@ -670,7 +691,9 @@ interface AtomicTxn {
|
|
|
670
691
|
* revision field and lastModified timestamp.
|
|
671
692
|
*/
|
|
672
693
|
type DocumentRevisions = {
|
|
673
|
-
/** Map of scope to operation index for that scope */
|
|
694
|
+
/** Map of scope to operation index for that scope */
|
|
695
|
+
revision: Record<string, number>;
|
|
696
|
+
/** The largest operation timestamp in the document, across every scope. */
|
|
674
697
|
latestTimestamp: string;
|
|
675
698
|
};
|
|
676
699
|
/**
|
|
@@ -876,7 +899,7 @@ interface OperationFilter {
|
|
|
876
899
|
/**
|
|
877
900
|
* Which sense of "exists" a caller of {@link IDocumentView.exists} means.
|
|
878
901
|
*/
|
|
879
|
-
declare enum DocumentExistence {
|
|
902
|
+
export declare enum DocumentExistence {
|
|
880
903
|
/**
|
|
881
904
|
* A document that is present and not deleted. This is the question a read
|
|
882
905
|
* asks: a deleted document is not readable, so it does not exist.
|
|
@@ -1232,7 +1255,8 @@ type DeadLetterRecord = {
|
|
|
1232
1255
|
branch: string;
|
|
1233
1256
|
operations: OperationWithContext$1[];
|
|
1234
1257
|
errorSource: ChannelErrorSource;
|
|
1235
|
-
errorMessage: string;
|
|
1258
|
+
errorMessage: string;
|
|
1259
|
+
/** Why it failed, in the closed set sync classifies failures into. */
|
|
1236
1260
|
errorType: SyncOperationErrorType;
|
|
1237
1261
|
};
|
|
1238
1262
|
/**
|
|
@@ -1353,7 +1377,7 @@ interface IOperationIndex {
|
|
|
1353
1377
|
* `driveCollectionId(branch, driveId)` output, so existing `document_collections`
|
|
1354
1378
|
* rows and persisted remotes remain valid without migration.
|
|
1355
1379
|
*/
|
|
1356
|
-
declare class DriveCollectionId {
|
|
1380
|
+
export declare class DriveCollectionId {
|
|
1357
1381
|
readonly driveId: string;
|
|
1358
1382
|
readonly branch: string;
|
|
1359
1383
|
private constructor();
|
|
@@ -1374,16 +1398,22 @@ declare class DriveCollectionId {
|
|
|
1374
1398
|
* Configuration options for the write cache
|
|
1375
1399
|
*/
|
|
1376
1400
|
type WriteCacheConfig = {
|
|
1377
|
-
/** Maximum number of document streams to cache (LRU eviction). Default: 1000 */
|
|
1378
|
-
|
|
1401
|
+
/** Maximum number of document streams to cache (LRU eviction). Default: 1000 */
|
|
1402
|
+
maxDocuments: number;
|
|
1403
|
+
/** Number of snapshots to keep in each document's ring buffer. Default: 10 */
|
|
1404
|
+
ringBufferSize: number;
|
|
1405
|
+
/** Persist a keyframe snapshot every N revisions. Default: 10 */
|
|
1379
1406
|
keyframeInterval: number;
|
|
1380
1407
|
};
|
|
1381
1408
|
/**
|
|
1382
1409
|
* Unique identifier for a document stream
|
|
1383
1410
|
*/
|
|
1384
1411
|
type DocumentStreamKey = {
|
|
1385
|
-
/** Document identifier */
|
|
1386
|
-
|
|
1412
|
+
/** Document identifier */
|
|
1413
|
+
documentId: string;
|
|
1414
|
+
/** Operation scope */
|
|
1415
|
+
scope: string;
|
|
1416
|
+
/** Branch name */
|
|
1387
1417
|
branch: string;
|
|
1388
1418
|
};
|
|
1389
1419
|
/**
|
|
@@ -1402,15 +1432,20 @@ declare enum SnapshotPosition {
|
|
|
1402
1432
|
* A cached document snapshot at a specific revision
|
|
1403
1433
|
*/
|
|
1404
1434
|
type CachedSnapshot = {
|
|
1405
|
-
/** The revision number of this snapshot */
|
|
1406
|
-
|
|
1435
|
+
/** The revision number of this snapshot */
|
|
1436
|
+
revision: number;
|
|
1437
|
+
/** The document state at this revision */
|
|
1438
|
+
document: PHDocument;
|
|
1439
|
+
/** Where this snapshot sat in the stream when it was stored */
|
|
1407
1440
|
position: SnapshotPosition;
|
|
1408
1441
|
};
|
|
1409
1442
|
/**
|
|
1410
1443
|
* Serialized keyframe snapshot for K/V store persistence
|
|
1411
1444
|
*/
|
|
1412
1445
|
type KeyframeSnapshot = {
|
|
1413
|
-
/** The revision number of this keyframe */
|
|
1446
|
+
/** The revision number of this keyframe */
|
|
1447
|
+
revision: number;
|
|
1448
|
+
/** Serialized document state */
|
|
1414
1449
|
document: string;
|
|
1415
1450
|
};
|
|
1416
1451
|
//#endregion
|
|
@@ -1556,7 +1591,8 @@ type CachedDocumentMeta = {
|
|
|
1556
1591
|
/**
|
|
1557
1592
|
* The document type (from header), cached for convenience.
|
|
1558
1593
|
*/
|
|
1559
|
-
documentType: string;
|
|
1594
|
+
documentType: string;
|
|
1595
|
+
/** From the CREATE_DOCUMENT input, which fixes them for the document's life. */
|
|
1560
1596
|
protocolVersions: {
|
|
1561
1597
|
[protocol: string]: number;
|
|
1562
1598
|
} | undefined;
|
|
@@ -2015,7 +2051,7 @@ type DocumentStream = {
|
|
|
2015
2051
|
* await cache.shutdown();
|
|
2016
2052
|
* ```
|
|
2017
2053
|
*/
|
|
2018
|
-
declare class KyselyWriteCache implements IWriteCache {
|
|
2054
|
+
export declare class KyselyWriteCache implements IWriteCache {
|
|
2019
2055
|
private streams;
|
|
2020
2056
|
private lruTracker;
|
|
2021
2057
|
private keyframeStore;
|
|
@@ -2174,7 +2210,7 @@ declare class KyselyWriteCache implements IWriteCache {
|
|
|
2174
2210
|
}
|
|
2175
2211
|
//#endregion
|
|
2176
2212
|
//#region src/storage/kysely/store.d.ts
|
|
2177
|
-
declare class KyselyOperationStore implements IOperationStore {
|
|
2213
|
+
export declare class KyselyOperationStore implements IOperationStore {
|
|
2178
2214
|
private db;
|
|
2179
2215
|
private trx?;
|
|
2180
2216
|
constructor(db: Kysely<Database$1>);
|
|
@@ -2226,7 +2262,7 @@ declare class KyselyOperationStore implements IOperationStore {
|
|
|
2226
2262
|
}
|
|
2227
2263
|
//#endregion
|
|
2228
2264
|
//#region src/storage/kysely/keyframe-store.d.ts
|
|
2229
|
-
declare class KyselyKeyframeStore implements IKeyframeStore {
|
|
2265
|
+
export declare class KyselyKeyframeStore implements IKeyframeStore {
|
|
2230
2266
|
private db;
|
|
2231
2267
|
private trx?;
|
|
2232
2268
|
constructor(db: Kysely<Database$1>);
|
|
@@ -2263,17 +2299,24 @@ interface IExecutionScope {
|
|
|
2263
2299
|
* Represents the result of a job execution
|
|
2264
2300
|
*/
|
|
2265
2301
|
type JobResult = {
|
|
2266
|
-
/** The job that was executed */
|
|
2267
|
-
|
|
2268
|
-
|
|
2302
|
+
/** The job that was executed */
|
|
2303
|
+
job: Job;
|
|
2304
|
+
/** Whether the job executed successfully */
|
|
2305
|
+
success: boolean;
|
|
2306
|
+
/** Error if the job failed */
|
|
2307
|
+
error?: Error;
|
|
2308
|
+
/** The operations generated from the actions (if successful) */
|
|
2269
2309
|
operations?: Operation[];
|
|
2270
2310
|
/**
|
|
2271
2311
|
* Operations with context (includes ephemeral resultingState).
|
|
2272
2312
|
* Used for emitting to IDocumentView via event bus.
|
|
2273
2313
|
*/
|
|
2274
|
-
operationsWithContext?: OperationWithContext$1[];
|
|
2275
|
-
|
|
2276
|
-
|
|
2314
|
+
operationsWithContext?: OperationWithContext$1[];
|
|
2315
|
+
/** Timestamp when the job execution completed */
|
|
2316
|
+
completedAt?: string;
|
|
2317
|
+
/** Duration of job execution in milliseconds */
|
|
2318
|
+
duration?: number;
|
|
2319
|
+
/** Any additional metadata from the execution */
|
|
2277
2320
|
metadata?: Record<string, any>;
|
|
2278
2321
|
};
|
|
2279
2322
|
/**
|
|
@@ -2311,14 +2354,20 @@ type ReactorFeatureFlags = {
|
|
|
2311
2354
|
* Configuration options for the job executor
|
|
2312
2355
|
*/
|
|
2313
2356
|
type JobExecutorConfig = {
|
|
2314
|
-
/** Feature flags; anything unset is off. */
|
|
2315
|
-
|
|
2316
|
-
|
|
2357
|
+
/** Feature flags; anything unset is off. */
|
|
2358
|
+
featureFlags?: Partial<ReactorFeatureFlags>;
|
|
2359
|
+
/** Maximum number of conflicting operations to skip when reshuffling. */
|
|
2360
|
+
maxSkipThreshold?: number;
|
|
2361
|
+
/** Maximum number of concurrent jobs to execute */
|
|
2362
|
+
maxConcurrency?: number;
|
|
2363
|
+
/** Maximum time in milliseconds a job can run before being considered timed out */
|
|
2317
2364
|
jobTimeoutMs?: number;
|
|
2318
2365
|
/** How long a job whose document is missing waits for it before failing.
|
|
2319
2366
|
* Unbounded deferral never resolves the caller awaiting the job. */
|
|
2320
|
-
deferredJobTtlMs?: number;
|
|
2321
|
-
|
|
2367
|
+
deferredJobTtlMs?: number;
|
|
2368
|
+
/** Base delay in milliseconds for exponential backoff retries */
|
|
2369
|
+
retryBaseDelayMs?: number;
|
|
2370
|
+
/** Maximum delay in milliseconds for exponential backoff retries */
|
|
2322
2371
|
retryMaxDelayMs?: number;
|
|
2323
2372
|
/** Maximum elapsed milliseconds before yielding to the main thread between actions.
|
|
2324
2373
|
* Keeps the UI responsive when processing large batches. */
|
|
@@ -2341,13 +2390,14 @@ type JobExecutorConfig = {
|
|
|
2341
2390
|
* and PGlite; DefaultExecutionScope opens no transaction and is used only by
|
|
2342
2391
|
* unit-test harnesses, which therefore see writes survive a failed job.
|
|
2343
2392
|
*/
|
|
2344
|
-
batchApplies?: boolean;
|
|
2393
|
+
batchApplies?: boolean;
|
|
2394
|
+
/** Defaults to `enforce`; `log` counts refusals and admits the write. */
|
|
2345
2395
|
signatureVerification?: SignatureVerificationMode;
|
|
2346
2396
|
};
|
|
2347
2397
|
/**
|
|
2348
2398
|
* Event types for the job executor
|
|
2349
2399
|
*/
|
|
2350
|
-
declare const JobExecutorEventTypes: {
|
|
2400
|
+
export declare const JobExecutorEventTypes: {
|
|
2351
2401
|
readonly JOB_STARTED: 20000;
|
|
2352
2402
|
readonly JOB_COMPLETED: 20001;
|
|
2353
2403
|
readonly JOB_FAILED: 20002;
|
|
@@ -2370,14 +2420,16 @@ type JobStartedEvent = {
|
|
|
2370
2420
|
};
|
|
2371
2421
|
type JobCompletedEvent = {
|
|
2372
2422
|
job: Job;
|
|
2373
|
-
result: JobResult;
|
|
2423
|
+
result: JobResult;
|
|
2424
|
+
/** See {@link JobStartedEvent.workerId}. */
|
|
2374
2425
|
workerId?: string;
|
|
2375
2426
|
};
|
|
2376
2427
|
type JobFailedEvent = {
|
|
2377
2428
|
job: Job;
|
|
2378
2429
|
error: string;
|
|
2379
2430
|
willRetry: boolean;
|
|
2380
|
-
retryCount: number;
|
|
2431
|
+
retryCount: number;
|
|
2432
|
+
/** See {@link JobStartedEvent.workerId}. */
|
|
2381
2433
|
workerId?: string;
|
|
2382
2434
|
};
|
|
2383
2435
|
type ExecutorStartedEvent = {
|
|
@@ -2392,9 +2444,13 @@ type ExecutorStoppedEvent = {
|
|
|
2392
2444
|
* Status information for the job executor manager
|
|
2393
2445
|
*/
|
|
2394
2446
|
type ExecutorManagerStatus = {
|
|
2395
|
-
/** Whether the manager is currently running */
|
|
2396
|
-
|
|
2397
|
-
|
|
2447
|
+
/** Whether the manager is currently running */
|
|
2448
|
+
isRunning: boolean;
|
|
2449
|
+
/** Number of executor instances managed */
|
|
2450
|
+
numExecutors: number;
|
|
2451
|
+
/** Number of jobs currently being processed */
|
|
2452
|
+
activeJobs: number;
|
|
2453
|
+
/** Total number of jobs processed since start */
|
|
2398
2454
|
totalJobsProcessed: number;
|
|
2399
2455
|
};
|
|
2400
2456
|
//#endregion
|
|
@@ -2438,10 +2494,14 @@ type ErrorInfo = {
|
|
|
2438
2494
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2439
2495
|
*/
|
|
2440
2496
|
type ModuleRef = {
|
|
2441
|
-
/** Bare-specifier package name (resolved by the worker's module loader). */
|
|
2497
|
+
/** Bare-specifier package name (resolved by the worker's module loader). */
|
|
2498
|
+
packageName: string;
|
|
2499
|
+
/** Named export within the module to invoke as the factory. */
|
|
2442
2500
|
exportName: string;
|
|
2443
2501
|
} | {
|
|
2444
|
-
/** Absolute or worker-resolvable file path to import. */
|
|
2502
|
+
/** Absolute or worker-resolvable file path to import. */
|
|
2503
|
+
filePath: string;
|
|
2504
|
+
/** Named export within the module to invoke as the factory. */
|
|
2445
2505
|
exportName: string;
|
|
2446
2506
|
};
|
|
2447
2507
|
/**
|
|
@@ -2476,8 +2536,11 @@ type DocumentModelSpec = FactorySpec;
|
|
|
2476
2536
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2477
2537
|
*/
|
|
2478
2538
|
type ModelManifestEntry = {
|
|
2479
|
-
/** Document type identifier (e.g. "ph/account"). */
|
|
2480
|
-
|
|
2539
|
+
/** Document type identifier (e.g. "ph/account"). */
|
|
2540
|
+
documentType: string;
|
|
2541
|
+
/** Document model version this entry registers. */
|
|
2542
|
+
version: string;
|
|
2543
|
+
/** Factory spec the worker imports and invokes to obtain the model. */
|
|
2481
2544
|
spec: DocumentModelSpec;
|
|
2482
2545
|
};
|
|
2483
2546
|
/**
|
|
@@ -2519,10 +2582,15 @@ type DbConfig = {
|
|
|
2519
2582
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2520
2583
|
*/
|
|
2521
2584
|
type WorkerPoolConfig = {
|
|
2522
|
-
/** Whether the worker pool is active; when false the executor runs in-process. */
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2585
|
+
/** Whether the worker pool is active; when false the executor runs in-process. */
|
|
2586
|
+
enabled: boolean;
|
|
2587
|
+
/** Number of worker instances to spawn. */
|
|
2588
|
+
numWorkers: number;
|
|
2589
|
+
/** Worker isolation mode. */
|
|
2590
|
+
workerType: "thread" | "process";
|
|
2591
|
+
/** Optional heartbeat interval in milliseconds. */
|
|
2592
|
+
heartbeatMs?: number;
|
|
2593
|
+
/** Optional per-worker Postgres pool size override. */
|
|
2526
2594
|
workerPgPoolSize?: number;
|
|
2527
2595
|
};
|
|
2528
2596
|
/**
|
|
@@ -2551,9 +2619,12 @@ type InitMessage = {
|
|
|
2551
2619
|
workerId: string;
|
|
2552
2620
|
poolConfig: WorkerPoolConfig;
|
|
2553
2621
|
db: DbConfig;
|
|
2554
|
-
models: ModelManifestEntry[];
|
|
2555
|
-
|
|
2556
|
-
|
|
2622
|
+
models: ModelManifestEntry[];
|
|
2623
|
+
/** Omitted = the worker builds its executor with the built-in defaults. */
|
|
2624
|
+
executorConfig?: JobExecutorConfig;
|
|
2625
|
+
/** Builds the `ISigner` for synthesized operations; omitted = unsigned. */
|
|
2626
|
+
signer?: FactorySpec;
|
|
2627
|
+
/** Builds the `SignatureTrustPolicy`; omitted = the default. */
|
|
2557
2628
|
trustPolicy?: FactorySpec;
|
|
2558
2629
|
};
|
|
2559
2630
|
/**
|
|
@@ -2575,7 +2646,8 @@ type ExecuteMessage = {
|
|
|
2575
2646
|
*/
|
|
2576
2647
|
type AbortMessage = {
|
|
2577
2648
|
type: "abort";
|
|
2578
|
-
correlationId: string;
|
|
2649
|
+
correlationId: string;
|
|
2650
|
+
/** correlationId of the `execute` message being aborted. */
|
|
2579
2651
|
targetCorrelationId: string;
|
|
2580
2652
|
reason?: string;
|
|
2581
2653
|
};
|
|
@@ -2587,7 +2659,8 @@ type AbortMessage = {
|
|
|
2587
2659
|
*/
|
|
2588
2660
|
type ShutdownMessage = {
|
|
2589
2661
|
type: "shutdown";
|
|
2590
|
-
correlationId: string;
|
|
2662
|
+
correlationId: string;
|
|
2663
|
+
/** Optional grace period before the parent force-terminates the worker. */
|
|
2591
2664
|
graceMs?: number;
|
|
2592
2665
|
};
|
|
2593
2666
|
/**
|
|
@@ -2616,7 +2689,8 @@ type ParentMessage = InitMessage | ExecuteMessage | AbortMessage | ShutdownMessa
|
|
|
2616
2689
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2617
2690
|
*/
|
|
2618
2691
|
type ReadyMessage = {
|
|
2619
|
-
type: "ready";
|
|
2692
|
+
type: "ready";
|
|
2693
|
+
/** correlationId of the originating `init` message. */
|
|
2620
2694
|
correlationId: string;
|
|
2621
2695
|
workerId: string;
|
|
2622
2696
|
};
|
|
@@ -2631,10 +2705,12 @@ type ReadyMessage = {
|
|
|
2631
2705
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2632
2706
|
*/
|
|
2633
2707
|
type ResultMessage = {
|
|
2634
|
-
type: "result";
|
|
2708
|
+
type: "result";
|
|
2709
|
+
/** correlationId of the originating `execute` message. */
|
|
2635
2710
|
correlationId: string;
|
|
2636
2711
|
result: JobResult;
|
|
2637
|
-
writeReady?: JobWriteReadyPayload;
|
|
2712
|
+
writeReady?: JobWriteReadyPayload;
|
|
2713
|
+
/** Re-emitted on the parent bus, which is where observers subscribe. */
|
|
2638
2714
|
signatureRefusals?: SignatureRefusedEvent[];
|
|
2639
2715
|
error?: ErrorInfo;
|
|
2640
2716
|
};
|
|
@@ -2645,7 +2721,8 @@ type ResultMessage = {
|
|
|
2645
2721
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2646
2722
|
*/
|
|
2647
2723
|
type ModelLoadedMessage = {
|
|
2648
|
-
type: "model-loaded";
|
|
2724
|
+
type: "model-loaded";
|
|
2725
|
+
/** correlationId of the originating `load-model` message. */
|
|
2649
2726
|
correlationId: string;
|
|
2650
2727
|
documentType: string;
|
|
2651
2728
|
version: string;
|
|
@@ -2657,7 +2734,8 @@ type ModelLoadedMessage = {
|
|
|
2657
2734
|
* (Powerhouse board wiki id: 64c03e51-1aa4-4fa9-93d8-daa45642484d)
|
|
2658
2735
|
*/
|
|
2659
2736
|
type ModelLoadFailedMessage = {
|
|
2660
|
-
type: "model-load-failed";
|
|
2737
|
+
type: "model-load-failed";
|
|
2738
|
+
/** correlationId of the originating `load-model` message. */
|
|
2661
2739
|
correlationId: string;
|
|
2662
2740
|
documentType: string;
|
|
2663
2741
|
version: string;
|
|
@@ -2678,7 +2756,8 @@ type LogMessage = {
|
|
|
2678
2756
|
type: "log";
|
|
2679
2757
|
level: "debug" | "info" | "warn" | "error";
|
|
2680
2758
|
message: string;
|
|
2681
|
-
args: SanitizedArg[];
|
|
2759
|
+
args: SanitizedArg[];
|
|
2760
|
+
/** Epoch milliseconds at which the worker generated the log line. */
|
|
2682
2761
|
timestamp: number;
|
|
2683
2762
|
};
|
|
2684
2763
|
/**
|
|
@@ -2690,8 +2769,10 @@ type LogMessage = {
|
|
|
2690
2769
|
*/
|
|
2691
2770
|
type HeartbeatMessage = {
|
|
2692
2771
|
type: "heartbeat";
|
|
2693
|
-
workerId: string;
|
|
2694
|
-
|
|
2772
|
+
workerId: string;
|
|
2773
|
+
/** Epoch milliseconds the worker generated the heartbeat. */
|
|
2774
|
+
timestamp: number;
|
|
2775
|
+
/** Optional snapshot of in-flight job correlation ids. */
|
|
2695
2776
|
inFlightCorrelationIds?: string[];
|
|
2696
2777
|
};
|
|
2697
2778
|
/**
|
|
@@ -2702,7 +2783,8 @@ type HeartbeatMessage = {
|
|
|
2702
2783
|
*/
|
|
2703
2784
|
type MetricsMessage = {
|
|
2704
2785
|
type: "metrics";
|
|
2705
|
-
workerId: string;
|
|
2786
|
+
workerId: string;
|
|
2787
|
+
/** Epoch milliseconds the worker generated the metrics snapshot. */
|
|
2706
2788
|
timestamp: number;
|
|
2707
2789
|
counters: {
|
|
2708
2790
|
[name: string]: number;
|
|
@@ -2720,10 +2802,14 @@ type MetricsMessage = {
|
|
|
2720
2802
|
*/
|
|
2721
2803
|
type PoolAcquireSamplesMessage = {
|
|
2722
2804
|
type: "pool-acquire-samples";
|
|
2723
|
-
workerId: string;
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2805
|
+
workerId: string;
|
|
2806
|
+
/** Stable identifier matching the host-side instrumentation name (e.g. "worker-0"). */
|
|
2807
|
+
poolName: string;
|
|
2808
|
+
/** Epoch milliseconds the worker generated the batch. */
|
|
2809
|
+
timestamp: number;
|
|
2810
|
+
/** Acquire-wait durations (ms) accumulated since the previous batch. */
|
|
2811
|
+
durations: number[];
|
|
2812
|
+
/** Most recent pg.Pool counter snapshot at batch send time. */
|
|
2727
2813
|
size: number;
|
|
2728
2814
|
idle: number;
|
|
2729
2815
|
waiting: number;
|
|
@@ -2748,7 +2834,8 @@ type SignerConfig = {
|
|
|
2748
2834
|
* cannot cross the thread boundary itself. Omitted = pooled workers store
|
|
2749
2835
|
* synthesized operations unsigned.
|
|
2750
2836
|
*/
|
|
2751
|
-
workerSigner?: FactorySpec;
|
|
2837
|
+
workerSigner?: FactorySpec;
|
|
2838
|
+
/** Decides which keys may sign as which users; see {@link SignatureTrustPolicy}. */
|
|
2752
2839
|
trustPolicy?: SignatureTrustPolicy;
|
|
2753
2840
|
/**
|
|
2754
2841
|
* What a pooled executor worker imports to build the same trust policy.
|
|
@@ -2781,7 +2868,7 @@ type SignatureTrustPolicy = {
|
|
|
2781
2868
|
};
|
|
2782
2869
|
/** `log` counts refusals and admits anyway; `enforce` refuses. */
|
|
2783
2870
|
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"];
|
|
2871
|
+
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
2872
|
type SignatureRefusalCode = (typeof SIGNATURE_REFUSAL_CODES)[number];
|
|
2786
2873
|
/** Read from the prefix or length of tuple[2]. */
|
|
2787
2874
|
type SignatureScheme = "unsigned" | "v2" | "legacy-renown" | "legacy-shared" | "legacy-unknown";
|
|
@@ -2817,14 +2904,14 @@ type Subscriber = (type: number, data: any) => void | Promise<void>;
|
|
|
2817
2904
|
/**
|
|
2818
2905
|
* Custom error class that aggregates multiple errors from event subscribers.
|
|
2819
2906
|
*/
|
|
2820
|
-
declare class EventBusAggregateError extends Error {
|
|
2907
|
+
export declare class EventBusAggregateError extends Error {
|
|
2821
2908
|
readonly errors: any[];
|
|
2822
2909
|
constructor(errors: unknown[]);
|
|
2823
2910
|
}
|
|
2824
2911
|
/**
|
|
2825
2912
|
* Event types for reactor lifecycle events.
|
|
2826
2913
|
*/
|
|
2827
|
-
declare const ReactorEventTypes: {
|
|
2914
|
+
export declare const ReactorEventTypes: {
|
|
2828
2915
|
readonly JOB_PENDING: 10001;
|
|
2829
2916
|
readonly JOB_RUNNING: 10002;
|
|
2830
2917
|
readonly JOB_WRITE_READY: 10003;
|
|
@@ -3000,7 +3087,7 @@ interface IJobAwaiter {
|
|
|
3000
3087
|
* Event-driven implementation of IJobAwaiter.
|
|
3001
3088
|
* Subscribes to operation events to detect job completion without polling.
|
|
3002
3089
|
*/
|
|
3003
|
-
declare class JobAwaiter implements IJobAwaiter {
|
|
3090
|
+
export declare class JobAwaiter implements IJobAwaiter {
|
|
3004
3091
|
private eventBus;
|
|
3005
3092
|
private getJobStatus;
|
|
3006
3093
|
private pendingJobs;
|
|
@@ -3139,7 +3226,8 @@ type Projection<M> = {
|
|
|
3139
3226
|
* Action types in this stream that can change an evaluation. Reads of the stream
|
|
3140
3227
|
* are filtered to these, so anything left out is invisible to a decision.
|
|
3141
3228
|
*/
|
|
3142
|
-
decidingActions: string[];
|
|
3229
|
+
decidingActions: string[];
|
|
3230
|
+
/** Applies one of this stream's operations while deciding. */
|
|
3143
3231
|
apply: (document: PHDocument, operation: Operation) => PHDocument;
|
|
3144
3232
|
};
|
|
3145
3233
|
/**
|
|
@@ -3154,7 +3242,7 @@ type Evaluation = {
|
|
|
3154
3242
|
};
|
|
3155
3243
|
/** Projections plus a decision function over the built model. */
|
|
3156
3244
|
type DecisionModel<M> = {
|
|
3157
|
-
projections: { [K in keyof M]: Projection<M
|
|
3245
|
+
projections: { [K in keyof M]: Projection<M>; };
|
|
3158
3246
|
/**
|
|
3159
3247
|
* Present when decide reads the executing scope's state through the
|
|
3160
3248
|
* decision context. A positional walk then folds the evaluated stream with
|
|
@@ -3180,7 +3268,7 @@ type BuiltDecisionModel<M> = {
|
|
|
3180
3268
|
/**
|
|
3181
3269
|
* Describes the types of document changes that can occur.
|
|
3182
3270
|
*/
|
|
3183
|
-
declare enum DocumentChangeType {
|
|
3271
|
+
export declare enum DocumentChangeType {
|
|
3184
3272
|
Created = "created",
|
|
3185
3273
|
Deleted = "deleted",
|
|
3186
3274
|
Updated = "updated",
|
|
@@ -3204,11 +3292,15 @@ type DocumentChangeEvent = {
|
|
|
3204
3292
|
* Options for creating an empty document.
|
|
3205
3293
|
*/
|
|
3206
3294
|
type CreateDocumentOptions = {
|
|
3207
|
-
/** Optional "id" or "slug" of parent document */
|
|
3208
|
-
|
|
3295
|
+
/** Optional "id" or "slug" of parent document */
|
|
3296
|
+
parentIdentifier?: string;
|
|
3297
|
+
/** Optional version of the document model to use (defaults to latest) */
|
|
3298
|
+
documentModelVersion?: number;
|
|
3299
|
+
/** Merged over the model's defaults; `signature: 2` makes it v2-required. */
|
|
3209
3300
|
protocolVersions?: {
|
|
3210
3301
|
[protocol: string]: number;
|
|
3211
|
-
};
|
|
3302
|
+
};
|
|
3303
|
+
/** Overrides the client's creation default for this document. */
|
|
3212
3304
|
signaturePolicy?: SignaturePolicy;
|
|
3213
3305
|
};
|
|
3214
3306
|
/**
|
|
@@ -3725,7 +3817,7 @@ type DocumentDecisionModel = {
|
|
|
3725
3817
|
* The simplest decision model: one projection over the document scope, which
|
|
3726
3818
|
* rejects on a deleted document.
|
|
3727
3819
|
*/
|
|
3728
|
-
declare function documentDecisionModel(target: DecisionTarget): DecisionModel<DocumentDecisionModel>;
|
|
3820
|
+
export declare function documentDecisionModel(target: DecisionTarget): DecisionModel<DocumentDecisionModel>;
|
|
3729
3821
|
//#endregion
|
|
3730
3822
|
//#region src/decision/registered-model.d.ts
|
|
3731
3823
|
/**
|
|
@@ -3765,14 +3857,14 @@ type AdmissionConditions = {
|
|
|
3765
3857
|
* check already refuses a write whose scope grew between the read and the
|
|
3766
3858
|
* append.
|
|
3767
3859
|
*/
|
|
3768
|
-
declare function decideAtHead(model: RegisteredDecisionModel, cache: IWriteCache, target: DecisionTarget, subject: AuthSubject, request: AuthRequest, signal?: AbortSignal, conditions?: AdmissionConditions): Promise<AdmissionDecision>;
|
|
3860
|
+
export declare function decideAtHead(model: RegisteredDecisionModel, cache: IWriteCache, target: DecisionTarget, subject: AuthSubject, request: AuthRequest, signal?: AbortSignal, conditions?: AdmissionConditions): Promise<AdmissionDecision>;
|
|
3769
3861
|
/**
|
|
3770
3862
|
* The model this reactor enforces. With `authEnforcement` off the auth scope is
|
|
3771
3863
|
* absent from every append condition and no load walks it; with `authGroups`
|
|
3772
3864
|
* on, the group documents the grant list names join the read-set and the
|
|
3773
3865
|
* registry supplies the reducer that folds them.
|
|
3774
3866
|
*/
|
|
3775
|
-
declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel;
|
|
3867
|
+
export declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel;
|
|
3776
3868
|
//#endregion
|
|
3777
3869
|
//#region src/decision/read-gate.d.ts
|
|
3778
3870
|
/**
|
|
@@ -3782,7 +3874,7 @@ declare function selectDecisionModel(flags: ReactorFeatureFlags, registry: IDocu
|
|
|
3782
3874
|
* would diverge permanently. The document scope carries the metadata the same
|
|
3783
3875
|
* argument covers. Grants gate domain-scope reads only.
|
|
3784
3876
|
*/
|
|
3785
|
-
declare const ALWAYS_READABLE_SCOPES: ReadonlySet<string>;
|
|
3877
|
+
export declare const ALWAYS_READABLE_SCOPES: ReadonlySet<string>;
|
|
3786
3878
|
/**
|
|
3787
3879
|
* How a gate treats a document nobody has written a policy onto.
|
|
3788
3880
|
*
|
|
@@ -3814,14 +3906,14 @@ interface IReadGate {
|
|
|
3814
3906
|
* Undefined therefore means "evaluate the policy alone", which is what the read
|
|
3815
3907
|
* surface did before the model existed.
|
|
3816
3908
|
*/
|
|
3817
|
-
declare function readDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel | undefined;
|
|
3909
|
+
export declare function readDecisionModel(flags: ReactorFeatureFlags, registry: IDocumentModelRegistry): RegisteredDecisionModel | undefined;
|
|
3818
3910
|
/**
|
|
3819
3911
|
* Evaluates the policy on its own, with no groups map and no condition context.
|
|
3820
3912
|
* A `{ group }` or conditional grant therefore never applies: an allow that
|
|
3821
3913
|
* does not apply withholds access, so this cannot widen a policy, but a policy
|
|
3822
3914
|
* relying on a conditional deny is weaker here than it is written.
|
|
3823
3915
|
*/
|
|
3824
|
-
declare class BareReadGate implements IReadGate {
|
|
3916
|
+
export declare class BareReadGate implements IReadGate {
|
|
3825
3917
|
scopePredicate(document: PHDocument, subject: AuthSubject): Promise<(scope: string) => boolean>;
|
|
3826
3918
|
}
|
|
3827
3919
|
/**
|
|
@@ -3833,7 +3925,7 @@ declare class BareReadGate implements IReadGate {
|
|
|
3833
3925
|
* projections, and the caller has both in hand. Only a group stream the grant
|
|
3834
3926
|
* list names is fetched.
|
|
3835
3927
|
*/
|
|
3836
|
-
declare class SeededStateReader implements IStreamStateReader {
|
|
3928
|
+
export declare class SeededStateReader implements IStreamStateReader {
|
|
3837
3929
|
private readonly documentView;
|
|
3838
3930
|
private readonly seed;
|
|
3839
3931
|
private readonly branch;
|
|
@@ -3862,7 +3954,7 @@ declare class SeededStateReader implements IStreamStateReader {
|
|
|
3862
3954
|
* running its executors in worker processes would answer reads in the parent
|
|
3863
3955
|
* from state no commit ever invalidates.
|
|
3864
3956
|
*/
|
|
3865
|
-
declare class ModelReadGate implements IReadGate {
|
|
3957
|
+
export declare class ModelReadGate implements IReadGate {
|
|
3866
3958
|
private readonly model;
|
|
3867
3959
|
private readonly documentView;
|
|
3868
3960
|
/**
|
|
@@ -3882,7 +3974,6 @@ declare class ModelReadGate implements IReadGate {
|
|
|
3882
3974
|
* match at all; below it the grant fails closed, so serving the roster
|
|
3883
3975
|
* would publish a member list no read grant can use.
|
|
3884
3976
|
*/
|
|
3885
|
-
|
|
3886
3977
|
servesGroups: boolean, operationIndex?: IOperationIndex | undefined, logger?: ILogger | undefined, options?: ReadGateOptions);
|
|
3887
3978
|
/**
|
|
3888
3979
|
* A served group yields its member list and nothing else. What the audience
|
|
@@ -3972,7 +4063,7 @@ type ActionEvaluationConfig = {
|
|
|
3972
4063
|
* - Provides quality-of-life functions for common tasks
|
|
3973
4064
|
* - Wraps subscription interface with ViewFilters
|
|
3974
4065
|
*/
|
|
3975
|
-
declare class ReactorClient implements IReactorClient {
|
|
4066
|
+
export declare class ReactorClient implements IReactorClient {
|
|
3976
4067
|
private logger;
|
|
3977
4068
|
private reactor;
|
|
3978
4069
|
private signer;
|
|
@@ -4590,12 +4681,12 @@ interface IConsistencyTracker {
|
|
|
4590
4681
|
/**
|
|
4591
4682
|
* Creates a consistency key from documentId, scope, and branch.
|
|
4592
4683
|
*/
|
|
4593
|
-
declare function makeConsistencyKey(documentId: string, scope: string, branch: string): ConsistencyKey;
|
|
4684
|
+
export declare function makeConsistencyKey(documentId: string, scope: string, branch: string): ConsistencyKey;
|
|
4594
4685
|
/**
|
|
4595
4686
|
* Tracks operation indexes for documents and provides read-after-write consistency guarantees.
|
|
4596
4687
|
* Maintains an in-memory map of the latest operation index for each (documentId, scope, branch) tuple.
|
|
4597
4688
|
*/
|
|
4598
|
-
declare class ConsistencyTracker implements IConsistencyTracker {
|
|
4689
|
+
export declare class ConsistencyTracker implements IConsistencyTracker {
|
|
4599
4690
|
private state;
|
|
4600
4691
|
private waiters;
|
|
4601
4692
|
update(coordinates: ConsistencyCoordinate[]): void;
|
|
@@ -4614,8 +4705,11 @@ declare class ConsistencyTracker implements IConsistencyTracker {
|
|
|
4614
4705
|
* Snapshot of a pg.Pool's internal counters at a point in time.
|
|
4615
4706
|
*/
|
|
4616
4707
|
type PoolStats = {
|
|
4617
|
-
/** Connections currently open (idle + in-use). pg.Pool.totalCount. */
|
|
4618
|
-
|
|
4708
|
+
/** Connections currently open (idle + in-use). pg.Pool.totalCount. */
|
|
4709
|
+
size: number;
|
|
4710
|
+
/** Open connections not currently checked out. pg.Pool.idleCount. */
|
|
4711
|
+
idle: number;
|
|
4712
|
+
/** Callers queued waiting for a connection. pg.Pool.waitingCount. */
|
|
4619
4713
|
waiting: number;
|
|
4620
4714
|
};
|
|
4621
4715
|
/**
|
|
@@ -4624,7 +4718,9 @@ type PoolStats = {
|
|
|
4624
4718
|
* underlying pg.Pool type.
|
|
4625
4719
|
*/
|
|
4626
4720
|
type PoolInstrumentation = {
|
|
4627
|
-
/** Stable identifier for the pool (e.g. "host", "worker"). Used as a metric label. */
|
|
4721
|
+
/** Stable identifier for the pool (e.g. "host", "worker"). Used as a metric label. */
|
|
4722
|
+
readonly name: string;
|
|
4723
|
+
/** Current pool counters. Cheap, synchronous read off pg.Pool. */
|
|
4628
4724
|
getStats(): PoolStats;
|
|
4629
4725
|
/**
|
|
4630
4726
|
* Subscribe to per-acquire wait durations. Listener fires once per
|
|
@@ -4639,7 +4735,7 @@ type PoolInstrumentation = {
|
|
|
4639
4735
|
* is replaced with a timing wrapper so all callers (Kysely included)
|
|
4640
4736
|
* pick up the instrumentation transparently.
|
|
4641
4737
|
*/
|
|
4642
|
-
declare function instrumentPgPool(pool: Pool, name: string): PoolInstrumentation;
|
|
4738
|
+
export declare function instrumentPgPool(pool: Pool, name: string): PoolInstrumentation;
|
|
4643
4739
|
/**
|
|
4644
4740
|
* Host-side {@link PoolInstrumentation} that re-emits acquire-wait samples
|
|
4645
4741
|
* and pool-stat snapshots forwarded from a worker thread. The worker owns
|
|
@@ -4679,7 +4775,7 @@ declare class GraphQLRequestError extends Error {
|
|
|
4679
4775
|
* difference between a channel that recovers and one that is dead for the
|
|
4680
4776
|
* process lifetime.
|
|
4681
4777
|
*/
|
|
4682
|
-
declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
|
|
4778
|
+
export declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
|
|
4683
4779
|
/**
|
|
4684
4780
|
* A stored operation cannot be represented in the schema - an action with no
|
|
4685
4781
|
* id, say. The document holding it needs repairing, but the channel serves
|
|
@@ -4695,10 +4791,10 @@ declare const RECOVERABLE_GRAPHQL_ERROR_CODES: {
|
|
|
4695
4791
|
* one means something else also went wrong, and polling through that would be
|
|
4696
4792
|
* guessing.
|
|
4697
4793
|
*/
|
|
4698
|
-
declare function isRecoverableGraphQLError(error: GraphQLRequestError): boolean;
|
|
4794
|
+
export declare function isRecoverableGraphQLError(error: GraphQLRequestError): boolean;
|
|
4699
4795
|
/** Auth-rejection message fragments the switchboard emits. Shared with
|
|
4700
4796
|
* reactor-api so server throws and this client check can't drift. */
|
|
4701
|
-
declare const DRIVE_AUTH_ERROR_MESSAGES: {
|
|
4797
|
+
export declare const DRIVE_AUTH_ERROR_MESSAGES: {
|
|
4702
4798
|
readonly forbidden: "Forbidden: insufficient permissions";
|
|
4703
4799
|
readonly authenticationRequired: "Forbidden: authentication required";
|
|
4704
4800
|
};
|
|
@@ -4711,7 +4807,7 @@ declare const DRIVE_AUTH_ERROR_MESSAGES: {
|
|
|
4711
4807
|
* `isDriveAuthError` is what decides whether a failure prompts a login, and a
|
|
4712
4808
|
* bare `Error` tells it nothing.
|
|
4713
4809
|
*/
|
|
4714
|
-
declare class DriveRequestError extends Error {
|
|
4810
|
+
export declare class DriveRequestError extends Error {
|
|
4715
4811
|
readonly statusCode: number | undefined;
|
|
4716
4812
|
constructor(message: string, statusCode?: number);
|
|
4717
4813
|
}
|
|
@@ -4725,11 +4821,11 @@ declare class DriveRequestError extends Error {
|
|
|
4725
4821
|
* indistinguishable from a typo, and prompting for a login on every 404 would
|
|
4726
4822
|
* fire on every mistyped URL. See the `WWW-Authenticate` note on the endpoint
|
|
4727
4823
|
* 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 {
|
|
4824
|
+
export declare function isDriveAuthError(error: unknown): boolean;
|
|
4825
|
+
export declare class PollingChannelError extends Error {
|
|
4730
4826
|
constructor(message: string);
|
|
4731
4827
|
}
|
|
4732
|
-
declare class ChannelError extends Error {
|
|
4828
|
+
export declare class ChannelError extends Error {
|
|
4733
4829
|
source: ChannelErrorSource;
|
|
4734
4830
|
error: Error;
|
|
4735
4831
|
/**
|
|
@@ -4743,11 +4839,11 @@ declare class ChannelError extends Error {
|
|
|
4743
4839
|
//#endregion
|
|
4744
4840
|
//#region src/sync/sync-operation.d.ts
|
|
4745
4841
|
type SyncOperationStatusCallback = (syncOp: SyncOperation, prev: SyncOperationStatus, next: SyncOperationStatus) => void;
|
|
4746
|
-
declare class SyncOperationAggregateError extends Error {
|
|
4842
|
+
export declare class SyncOperationAggregateError extends Error {
|
|
4747
4843
|
errors: Error[];
|
|
4748
4844
|
constructor(errors: Error[]);
|
|
4749
4845
|
}
|
|
4750
|
-
declare class SyncOperation {
|
|
4846
|
+
export declare class SyncOperation {
|
|
4751
4847
|
readonly id: string;
|
|
4752
4848
|
readonly jobId: string;
|
|
4753
4849
|
jobDependencies: string[];
|
|
@@ -4803,7 +4899,7 @@ interface IMailbox {
|
|
|
4803
4899
|
flush(): void;
|
|
4804
4900
|
isPaused(): boolean;
|
|
4805
4901
|
}
|
|
4806
|
-
declare class Mailbox implements IMailbox {
|
|
4902
|
+
export declare class Mailbox implements IMailbox {
|
|
4807
4903
|
private itemsMap;
|
|
4808
4904
|
private addedCallbacks;
|
|
4809
4905
|
private removedCallbacks;
|
|
@@ -4829,7 +4925,7 @@ declare class Mailbox implements IMailbox {
|
|
|
4829
4925
|
}
|
|
4830
4926
|
//#endregion
|
|
4831
4927
|
//#region src/sync/sync-status-tracker.d.ts
|
|
4832
|
-
declare enum SyncStatus {
|
|
4928
|
+
export declare enum SyncStatus {
|
|
4833
4929
|
Synced = "SYNCED",
|
|
4834
4930
|
Outgoing = "OUTGOING",
|
|
4835
4931
|
Incoming = "INCOMING",
|
|
@@ -4844,7 +4940,7 @@ interface ISyncStatusTracker {
|
|
|
4844
4940
|
untrackRemote(remoteName: string): void;
|
|
4845
4941
|
clear(): void;
|
|
4846
4942
|
}
|
|
4847
|
-
declare class SyncStatusTracker implements ISyncStatusTracker {
|
|
4943
|
+
export declare class SyncStatusTracker implements ISyncStatusTracker {
|
|
4848
4944
|
private readonly remotes;
|
|
4849
4945
|
private readonly seen;
|
|
4850
4946
|
private readonly callbacks;
|
|
@@ -5513,7 +5609,7 @@ interface InProcessReactorClientModule extends ReactorClientModule {
|
|
|
5513
5609
|
* for batch execution. The back-reference is captured but never invoked
|
|
5514
5610
|
* during construction, so the partial-`this` hazard does not apply.
|
|
5515
5611
|
*/
|
|
5516
|
-
declare class DriveClient implements IDriveClient {
|
|
5612
|
+
export declare class DriveClient implements IDriveClient {
|
|
5517
5613
|
private readonly client;
|
|
5518
5614
|
private readonly logger;
|
|
5519
5615
|
private readonly reactor;
|
|
@@ -5556,7 +5652,7 @@ type ModelLoadedBroadcastHook = (entry: ModelManifestEntry) => Promise<void>;
|
|
|
5556
5652
|
* (post-failure recovery) so that both paths use the same deduplication
|
|
5557
5653
|
* and failure-caching state.
|
|
5558
5654
|
*/
|
|
5559
|
-
declare class DocumentModelResolver implements IDocumentModelResolver {
|
|
5655
|
+
export declare class DocumentModelResolver implements IDocumentModelResolver {
|
|
5560
5656
|
private registry;
|
|
5561
5657
|
private loader;
|
|
5562
5658
|
private loadingModels;
|
|
@@ -5585,7 +5681,7 @@ declare class DocumentModelResolver implements IDocumentModelResolver {
|
|
|
5585
5681
|
* Checks the registry for the model and returns if found; throws if not.
|
|
5586
5682
|
* Since there is no loader, missing models cannot be recovered.
|
|
5587
5683
|
*/
|
|
5588
|
-
declare class NullDocumentModelResolver implements IDocumentModelResolver {
|
|
5684
|
+
export declare class NullDocumentModelResolver implements IDocumentModelResolver {
|
|
5589
5685
|
private registry?;
|
|
5590
5686
|
constructor(registry?: IDocumentModelRegistry | undefined);
|
|
5591
5687
|
ensureModelLoaded(documentType: string): Promise<void>;
|
|
@@ -5602,19 +5698,22 @@ type WorkerFactory = (index: number) => IExecutorWorker;
|
|
|
5602
5698
|
//#region src/read-models/base-read-model.d.ts
|
|
5603
5699
|
/** Bounds on an indexing pass: one transaction, and the stall between yields. */
|
|
5604
5700
|
type ReadModelIndexingConfig = {
|
|
5605
|
-
/** Maximum operations committed in a single transaction. */
|
|
5701
|
+
/** Maximum operations committed in a single transaction. */
|
|
5702
|
+
commitChunkSize: number;
|
|
5703
|
+
/** Maximum elapsed milliseconds before yielding between chunks. */
|
|
5606
5704
|
yieldDeadlineMs: number;
|
|
5607
5705
|
};
|
|
5608
5706
|
/** Small enough that a chunk's transaction rarely outlasts the yield deadline. */
|
|
5609
|
-
declare const DEFAULT_COMMIT_CHUNK_SIZE = 50;
|
|
5707
|
+
export declare const DEFAULT_COMMIT_CHUNK_SIZE = 50;
|
|
5610
5708
|
/** 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;
|
|
5709
|
+
export declare const DEFAULT_READ_MODEL_YIELD_DEADLINE_MS = 50;
|
|
5710
|
+
export declare const defaultReadModelIndexingConfig: ReadModelIndexingConfig;
|
|
5613
5711
|
/** For read models whose callers can observe where a batch was split. */
|
|
5614
|
-
declare const unchunkedReadModelIndexingConfig: ReadModelIndexingConfig;
|
|
5712
|
+
export declare const unchunkedReadModelIndexingConfig: ReadModelIndexingConfig;
|
|
5615
5713
|
type BaseReadModelConfig = {
|
|
5616
5714
|
readModelId: string;
|
|
5617
|
-
rebuildStateOnInit: boolean;
|
|
5715
|
+
rebuildStateOnInit: boolean;
|
|
5716
|
+
/** Defaults to {@link defaultReadModelIndexingConfig}. */
|
|
5618
5717
|
indexing?: ReadModelIndexingConfig;
|
|
5619
5718
|
};
|
|
5620
5719
|
/**
|
|
@@ -5622,7 +5721,7 @@ type BaseReadModelConfig = {
|
|
|
5622
5721
|
* Handles initialization, state tracking via ViewState table, and consistency tracking.
|
|
5623
5722
|
* Subclasses override commitOperations() with their specific domain logic.
|
|
5624
5723
|
*/
|
|
5625
|
-
declare class BaseReadModel implements IReadModel {
|
|
5724
|
+
export declare class BaseReadModel implements IReadModel {
|
|
5626
5725
|
protected db: Kysely<DocumentViewDatabase>;
|
|
5627
5726
|
protected operationIndex: IOperationIndex;
|
|
5628
5727
|
protected writeCache: IWriteCache;
|
|
@@ -5847,10 +5946,14 @@ type ProjectionChainDepthMessage = {
|
|
|
5847
5946
|
*/
|
|
5848
5947
|
type ProjectionPoolAcquireSamplesMessage = {
|
|
5849
5948
|
type: "pool-acquire-samples";
|
|
5850
|
-
shardId: string;
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5949
|
+
shardId: string;
|
|
5950
|
+
/** Stable identifier matching the host-side instrumentation name. */
|
|
5951
|
+
poolName: string;
|
|
5952
|
+
/** Epoch milliseconds the worker generated the batch. */
|
|
5953
|
+
timestamp: number;
|
|
5954
|
+
/** Acquire-wait durations (ms) accumulated since the previous batch. */
|
|
5955
|
+
durations: number[];
|
|
5956
|
+
/** Most recent pg.Pool counter snapshot at batch send time. */
|
|
5854
5957
|
size: number;
|
|
5855
5958
|
idle: number;
|
|
5856
5959
|
waiting: number;
|
|
@@ -5880,7 +5983,8 @@ type ProjectionWorkerMessage = ProjectionReadyMessage | ProjectionInitFailedMess
|
|
|
5880
5983
|
//#endregion
|
|
5881
5984
|
//#region src/projection/create-hybrid-projection-coordinator.d.ts
|
|
5882
5985
|
type HybridProjectionOptions = {
|
|
5883
|
-
/** Defaults to 1: one worker captures the whole win (Run 11). */
|
|
5986
|
+
/** Defaults to 1: one worker captures the whole win (Run 11). */
|
|
5987
|
+
shardCount?: number;
|
|
5884
5988
|
poolSize?: number;
|
|
5885
5989
|
db?: DbConfig;
|
|
5886
5990
|
onFatal?: (shardId: string, reason: Error) => void;
|
|
@@ -5890,7 +5994,7 @@ type HybridProjectionOptions = {
|
|
|
5890
5994
|
chainDepthReportIntervalMs?: number;
|
|
5891
5995
|
};
|
|
5892
5996
|
/** Built-ins in one projection worker; all other read models stay on the host. */
|
|
5893
|
-
declare function createHybridProjectionCoordinatorFactory(options?: HybridProjectionOptions): ReadModelCoordinatorFactory;
|
|
5997
|
+
export declare function createHybridProjectionCoordinatorFactory(options?: HybridProjectionOptions): ReadModelCoordinatorFactory;
|
|
5894
5998
|
//#endregion
|
|
5895
5999
|
//#region src/projection/transport.d.ts
|
|
5896
6000
|
type ProjectionTransportEventMap = {
|
|
@@ -5920,7 +6024,8 @@ interface IProjectionTransport {
|
|
|
5920
6024
|
*/
|
|
5921
6025
|
type ProjectionWorkerFactory = (shardIndex: number, shardId: string) => IProjectionTransport;
|
|
5922
6026
|
type ProjectionShardHooks = {
|
|
5923
|
-
/** Takes over the host-bus JOB_READ_READY emit; call `emitReadReady` to emit. */
|
|
6027
|
+
/** Takes over the host-bus JOB_READ_READY emit; call `emitReadReady` to emit. */
|
|
6028
|
+
onReadReady?: (event: JobReadReadyEvent) => void;
|
|
5924
6029
|
/**
|
|
5925
6030
|
* Fired when a shard errors, when it exits after having been ready, and
|
|
5926
6031
|
* for every JOB_WRITE_READY dropped because its shard is not ready.
|
|
@@ -6064,13 +6169,16 @@ declare class ProjectionShardManager implements IReadModelCoordinator {
|
|
|
6064
6169
|
type HybridProjectionCoordinatorOptions = {
|
|
6065
6170
|
eventBus: IEventBus;
|
|
6066
6171
|
logger: ILogger;
|
|
6067
|
-
manager: ProjectionShardManager;
|
|
6068
|
-
|
|
6069
|
-
|
|
6172
|
+
manager: ProjectionShardManager;
|
|
6173
|
+
/** Caller and factory registered models. Never documentView/documentIndexer. */
|
|
6174
|
+
preReady: IReadModel[];
|
|
6175
|
+
/** subscriptionNotificationReadModel, processorManager. */
|
|
6176
|
+
postReady: IReadModel[];
|
|
6177
|
+
/** Included in `readModels` for getReadModel() lookup; never indexed here. */
|
|
6070
6178
|
lookupOnly: IReadModel[];
|
|
6071
6179
|
};
|
|
6072
6180
|
/** Host-side stages on a per-queueKey chain driven by the worker's read-ready. */
|
|
6073
|
-
declare class HybridProjectionCoordinator implements ILiveReadModelCoordinator {
|
|
6181
|
+
export declare class HybridProjectionCoordinator implements ILiveReadModelCoordinator {
|
|
6074
6182
|
/** One array, mutated in place: reactor-api captures it by reference once. */
|
|
6075
6183
|
readonly readModels: IReadModel[];
|
|
6076
6184
|
private readonly eventBus;
|
|
@@ -6106,7 +6214,7 @@ interface MigrationResult {
|
|
|
6106
6214
|
}
|
|
6107
6215
|
//#endregion
|
|
6108
6216
|
//#region src/sync/sync-builder.d.ts
|
|
6109
|
-
declare class SyncBuilder {
|
|
6217
|
+
export declare class SyncBuilder {
|
|
6110
6218
|
private channelFactory?;
|
|
6111
6219
|
private remoteStorage?;
|
|
6112
6220
|
private cursorStorage?;
|
|
@@ -6179,7 +6287,8 @@ interface ReadModelCoordinatorFactoryDeps {
|
|
|
6179
6287
|
*/
|
|
6180
6288
|
type ReadModelCoordinatorFactory = (deps: ReadModelCoordinatorFactoryDeps) => IReadModelCoordinator | Promise<IReadModelCoordinator>;
|
|
6181
6289
|
type WorkerPoolBase = {
|
|
6182
|
-
/** Number of worker threads to spawn; also the sticky-routing modulus. */
|
|
6290
|
+
/** Number of worker threads to spawn; also the sticky-routing modulus. */
|
|
6291
|
+
numWorkers: number;
|
|
6183
6292
|
};
|
|
6184
6293
|
/**
|
|
6185
6294
|
* Executor worker-pool configuration. Either `db` (default thread
|
|
@@ -6215,7 +6324,8 @@ type ProjectionShardBuilderConfig = {
|
|
|
6215
6324
|
* list is indexed by nobody, and one named in both is indexed twice.
|
|
6216
6325
|
* `buildModule` rejects any other combination.
|
|
6217
6326
|
*/
|
|
6218
|
-
preReadyKinds: BuiltInReadModelKind[];
|
|
6327
|
+
preReadyKinds: BuiltInReadModelKind[];
|
|
6328
|
+
/** Kinds each shard indexes after READ_READY. See {@link preReadyKinds}. */
|
|
6219
6329
|
postReadyKinds: BuiltInReadModelKind[];
|
|
6220
6330
|
/**
|
|
6221
6331
|
* Connection info for the projection workers' own pools. Falls back to
|
|
@@ -6229,7 +6339,7 @@ type ProjectionShardBuilderConfig = {
|
|
|
6229
6339
|
drainTimeoutMs?: number;
|
|
6230
6340
|
chainDepthReportIntervalMs?: number;
|
|
6231
6341
|
};
|
|
6232
|
-
declare class ReactorBuilder {
|
|
6342
|
+
export declare class ReactorBuilder {
|
|
6233
6343
|
private logger?;
|
|
6234
6344
|
private documentModelSources;
|
|
6235
6345
|
private upgradeManifests;
|
|
@@ -6419,7 +6529,7 @@ declare class ReactorBuilder {
|
|
|
6419
6529
|
/**
|
|
6420
6530
|
* Builder class for constructing ReactorClient instances with proper configuration
|
|
6421
6531
|
*/
|
|
6422
|
-
declare class ReactorClientBuilder {
|
|
6532
|
+
export declare class ReactorClientBuilder {
|
|
6423
6533
|
private logger?;
|
|
6424
6534
|
private reactorBuilder?;
|
|
6425
6535
|
private reactor?;
|
|
@@ -6499,14 +6609,14 @@ declare class ReactorClientBuilder {
|
|
|
6499
6609
|
}
|
|
6500
6610
|
//#endregion
|
|
6501
6611
|
//#region src/core/drive-container-types.d.ts
|
|
6502
|
-
declare const DEFAULT_DRIVE_CONTAINER_TYPES: ReadonlySet<string>;
|
|
6612
|
+
export declare const DEFAULT_DRIVE_CONTAINER_TYPES: ReadonlySet<string>;
|
|
6503
6613
|
//#endregion
|
|
6504
6614
|
//#region src/core/reactor.d.ts
|
|
6505
6615
|
/**
|
|
6506
6616
|
* This class implements the IReactor interface and serves as the main entry point
|
|
6507
6617
|
* for the new Reactor architecture.
|
|
6508
6618
|
*/
|
|
6509
|
-
declare class Reactor implements IReactor {
|
|
6619
|
+
export declare class Reactor implements IReactor {
|
|
6510
6620
|
private logger;
|
|
6511
6621
|
private documentModelRegistry;
|
|
6512
6622
|
private shutdownStatus;
|
|
@@ -6563,15 +6673,15 @@ interface ParsedDriveUrl {
|
|
|
6563
6673
|
* e.g., "http://localhost:4001/d/abc123" -> { driveId: "abc123", graphqlEndpoint: "http://localhost:4001/graphql/r" }
|
|
6564
6674
|
* e.g., "https://example.com/api/reactor/d/abc123" -> { ..., graphqlEndpoint: "https://example.com/api/reactor/graphql/r" }
|
|
6565
6675
|
*/
|
|
6566
|
-
declare function parseDriveUrl(url: string): ParsedDriveUrl;
|
|
6676
|
+
export declare function parseDriveUrl(url: string): ParsedDriveUrl;
|
|
6567
6677
|
/**
|
|
6568
6678
|
* Extract drive ID from a drive URL.
|
|
6569
6679
|
*/
|
|
6570
|
-
declare function driveIdFromUrl(url: string): string;
|
|
6680
|
+
export declare function driveIdFromUrl(url: string): string;
|
|
6571
6681
|
//#endregion
|
|
6572
6682
|
//#region src/shared/errors.d.ts
|
|
6573
6683
|
/** The message carries the code: only name and message cross the queue. */
|
|
6574
|
-
declare class InvalidSignatureError extends Error {
|
|
6684
|
+
export declare class InvalidSignatureError extends Error {
|
|
6575
6685
|
readonly documentId: string;
|
|
6576
6686
|
readonly code: SignatureRefusalCode;
|
|
6577
6687
|
readonly reason: string;
|
|
@@ -6594,7 +6704,7 @@ declare class InvalidSignatureError extends Error {
|
|
|
6594
6704
|
* (`reactor-browser/src/rpc/error-info.ts`), so the class identity and any
|
|
6595
6705
|
* custom field are lost in transit. This error therefore carries no fields.
|
|
6596
6706
|
*/
|
|
6597
|
-
declare class AuthEnforcementDisabledError extends Error {
|
|
6707
|
+
export declare class AuthEnforcementDisabledError extends Error {
|
|
6598
6708
|
constructor();
|
|
6599
6709
|
static isError(error: unknown): error is AuthEnforcementDisabledError;
|
|
6600
6710
|
}
|
|
@@ -6606,7 +6716,7 @@ declare class AuthEnforcementDisabledError extends Error {
|
|
|
6606
6716
|
* (`reactor-browser/src/rpc/error-info.ts`), so the class identity is lost in
|
|
6607
6717
|
* transit.
|
|
6608
6718
|
*/
|
|
6609
|
-
declare class RelationshipNotFoundError extends Error {
|
|
6719
|
+
export declare class RelationshipNotFoundError extends Error {
|
|
6610
6720
|
readonly sourceId: string;
|
|
6611
6721
|
readonly targetId: string;
|
|
6612
6722
|
readonly relationshipType: string;
|
|
@@ -6621,7 +6731,7 @@ declare class RelationshipNotFoundError extends Error {
|
|
|
6621
6731
|
* @param initialState - Initial shutdown state (default: false)
|
|
6622
6732
|
* @returns A tuple of [ShutdownStatus, setShutdown function, setCompleted function]
|
|
6623
6733
|
*/
|
|
6624
|
-
declare function createMutableShutdownStatus(initialState?: boolean): [ShutdownStatus, (value: boolean) => void, (completed: Promise<void>) => void];
|
|
6734
|
+
export declare function createMutableShutdownStatus(initialState?: boolean): [ShutdownStatus, (value: boolean) => void, (completed: Promise<void>) => void];
|
|
6625
6735
|
//#endregion
|
|
6626
6736
|
//#region src/shared/utils.d.ts
|
|
6627
6737
|
type ParsedPaging = {
|
|
@@ -6634,19 +6744,21 @@ type ParsedPaging = {
|
|
|
6634
6744
|
* limit is less than 1. When `paging` is undefined, returns offset 0 and
|
|
6635
6745
|
* the caller-supplied `defaultLimit`.
|
|
6636
6746
|
*/
|
|
6637
|
-
declare function parsePagingOptions(paging: PagingOptions | undefined, defaultLimit: number): ParsedPaging;
|
|
6747
|
+
export declare function parsePagingOptions(paging: PagingOptions | undefined, defaultLimit: number): ParsedPaging;
|
|
6638
6748
|
//#endregion
|
|
6639
6749
|
//#region src/signer/verify-action-signature.d.ts
|
|
6640
6750
|
type VerificationTarget = {
|
|
6641
|
-
/** The stream the operation is stored in. */
|
|
6642
|
-
|
|
6751
|
+
/** The stream the operation is stored in. */
|
|
6752
|
+
documentId: string;
|
|
6753
|
+
branch: string;
|
|
6754
|
+
/** Of the document `documentId` names; legacy when omitted. */
|
|
6643
6755
|
policy?: SignaturePolicy;
|
|
6644
6756
|
};
|
|
6645
6757
|
/**
|
|
6646
6758
|
* Integrity only: identity binding and the live-id check sit with the caller.
|
|
6647
6759
|
* `operation` is the incoming operation at load admission.
|
|
6648
6760
|
*/
|
|
6649
|
-
declare function verifyActionSignature(action: Action, target: VerificationTarget, path: AdmissionPath, operation?: {
|
|
6761
|
+
export declare function verifyActionSignature(action: Action, target: VerificationTarget, path: AdmissionPath, operation?: {
|
|
6650
6762
|
timestampUtcMs: string;
|
|
6651
6763
|
}): Promise<SignatureVerdict>;
|
|
6652
6764
|
//#endregion
|
|
@@ -6655,7 +6767,7 @@ declare function verifyActionSignature(action: Action, target: VerificationTarge
|
|
|
6655
6767
|
* Default error handler that re-throws subscription errors.
|
|
6656
6768
|
* This ensures that errors are not silently swallowed.
|
|
6657
6769
|
*/
|
|
6658
|
-
declare class DefaultSubscriptionErrorHandler implements ISubscriptionErrorHandler {
|
|
6770
|
+
export declare class DefaultSubscriptionErrorHandler implements ISubscriptionErrorHandler {
|
|
6659
6771
|
handleError(error: unknown, context: SubscriptionErrorContext): void;
|
|
6660
6772
|
}
|
|
6661
6773
|
//#endregion
|
|
@@ -6664,7 +6776,7 @@ type DocumentCreatedCallback = (result: PagedResults<string>) => void;
|
|
|
6664
6776
|
type DocumentDeletedCallback = (documentIds: string[]) => void;
|
|
6665
6777
|
type DocumentStateUpdatedCallback = (result: PagedResults<PHDocument>) => void;
|
|
6666
6778
|
type RelationshipChangedCallback = (parentId: string, childId: string, changeType: RelationshipChangeType) => void;
|
|
6667
|
-
declare class ReactorSubscriptionManager implements IReactorSubscriptionManager {
|
|
6779
|
+
export declare class ReactorSubscriptionManager implements IReactorSubscriptionManager {
|
|
6668
6780
|
private createdSubscriptions;
|
|
6669
6781
|
private deletedSubscriptions;
|
|
6670
6782
|
private updatedSubscriptions;
|
|
@@ -6702,7 +6814,7 @@ declare class ReactorSubscriptionManager implements IReactorSubscriptionManager
|
|
|
6702
6814
|
}
|
|
6703
6815
|
//#endregion
|
|
6704
6816
|
//#region src/events/event-bus.d.ts
|
|
6705
|
-
declare class EventBus implements IEventBus {
|
|
6817
|
+
export declare class EventBus implements IEventBus {
|
|
6706
6818
|
readonly eventTypeToSubscribers: Map<number, Subscriber[]>;
|
|
6707
6819
|
subscribe<K>(type: number, subscriber: (type: number, event: K) => void | Promise<void>): Unsubscribe;
|
|
6708
6820
|
emit(type: number, data: any): Promise<void>;
|
|
@@ -6715,7 +6827,7 @@ declare class EventBus implements IEventBus {
|
|
|
6715
6827
|
* Ensures serial execution per document by tracking executing jobs.
|
|
6716
6828
|
* Implements dependency management through queue hints.
|
|
6717
6829
|
*/
|
|
6718
|
-
declare class InMemoryQueue implements IQueue {
|
|
6830
|
+
export declare class InMemoryQueue implements IQueue {
|
|
6719
6831
|
private eventBus;
|
|
6720
6832
|
private resolver;
|
|
6721
6833
|
private queues;
|
|
@@ -6827,7 +6939,7 @@ declare class InMemoryQueue implements IQueue {
|
|
|
6827
6939
|
* Maintains job status in a Map for synchronous access.
|
|
6828
6940
|
* Subscribes to operation events to update job states.
|
|
6829
6941
|
*/
|
|
6830
|
-
declare class InMemoryJobTracker implements IJobTracker {
|
|
6942
|
+
export declare class InMemoryJobTracker implements IJobTracker {
|
|
6831
6943
|
private eventBus;
|
|
6832
6944
|
private jobs;
|
|
6833
6945
|
private unsubscribers;
|
|
@@ -6849,7 +6961,7 @@ type JobExecutorFactory = () => IJobExecutor;
|
|
|
6849
6961
|
* Manages multiple job executors and coordinates job distribution.
|
|
6850
6962
|
* Listens for job available events and dispatches jobs to executors.
|
|
6851
6963
|
*/
|
|
6852
|
-
declare class SimpleJobExecutorManager implements IJobExecutorManager {
|
|
6964
|
+
export declare class SimpleJobExecutorManager implements IJobExecutorManager {
|
|
6853
6965
|
private executorFactory;
|
|
6854
6966
|
private eventBus;
|
|
6855
6967
|
private queue;
|
|
@@ -6875,7 +6987,7 @@ declare class SimpleJobExecutorManager implements IJobExecutorManager {
|
|
|
6875
6987
|
}
|
|
6876
6988
|
//#endregion
|
|
6877
6989
|
//#region src/executor/simple-job-executor.d.ts
|
|
6878
|
-
declare class SimpleJobExecutor implements IJobExecutor {
|
|
6990
|
+
export declare class SimpleJobExecutor implements IJobExecutor {
|
|
6879
6991
|
private logger;
|
|
6880
6992
|
private registry;
|
|
6881
6993
|
private operationStore;
|
|
@@ -7093,21 +7205,21 @@ declare class SimpleJobExecutor implements IJobExecutor {
|
|
|
7093
7205
|
}
|
|
7094
7206
|
//#endregion
|
|
7095
7207
|
//#region src/executor/worker/forwarding-logger.d.ts
|
|
7096
|
-
declare function createForwardingLogger(post: (msg: LogMessage) => void, level?: ILogger["level"], tags?: string[]): ILogger;
|
|
7208
|
+
export declare function createForwardingLogger(post: (msg: LogMessage) => void, level?: ILogger["level"], tags?: string[]): ILogger;
|
|
7097
7209
|
//#endregion
|
|
7098
7210
|
//#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;
|
|
7211
|
+
export declare function errorToInfo(err: unknown): ErrorInfo;
|
|
7212
|
+
export declare function sanitizeArg(value: unknown, depth?: number, seen?: WeakSet<object>): SanitizedArg;
|
|
7101
7213
|
//#endregion
|
|
7102
7214
|
//#region src/executor/worker/index.d.ts
|
|
7103
7215
|
/** Absolute path to the worker entry script for use with `new Worker(workerEntryPath)`. */
|
|
7104
|
-
declare const workerEntryPath: string;
|
|
7216
|
+
export declare const workerEntryPath: string;
|
|
7105
7217
|
//#endregion
|
|
7106
7218
|
//#region src/registry/errors.d.ts
|
|
7107
7219
|
/**
|
|
7108
7220
|
* Error thrown when a document model module is not found in the registry.
|
|
7109
7221
|
*/
|
|
7110
|
-
declare class ModuleNotFoundError extends Error {
|
|
7222
|
+
export declare class ModuleNotFoundError extends Error {
|
|
7111
7223
|
readonly documentType: string;
|
|
7112
7224
|
readonly requestedVersion: number | undefined;
|
|
7113
7225
|
constructor(documentType: string, version?: number);
|
|
@@ -7116,20 +7228,20 @@ declare class ModuleNotFoundError extends Error {
|
|
|
7116
7228
|
/**
|
|
7117
7229
|
* Error thrown when attempting to register a module that already exists.
|
|
7118
7230
|
*/
|
|
7119
|
-
declare class DuplicateModuleError extends Error {
|
|
7231
|
+
export declare class DuplicateModuleError extends Error {
|
|
7120
7232
|
constructor(documentType: string, version?: number);
|
|
7121
7233
|
static isError(error: unknown): error is DuplicateModuleError;
|
|
7122
7234
|
}
|
|
7123
7235
|
/**
|
|
7124
7236
|
* Error thrown when a module is invalid or malformed.
|
|
7125
7237
|
*/
|
|
7126
|
-
declare class InvalidModuleError extends Error {
|
|
7238
|
+
export declare class InvalidModuleError extends Error {
|
|
7127
7239
|
constructor(message: string);
|
|
7128
7240
|
}
|
|
7129
7241
|
/**
|
|
7130
7242
|
* Error thrown when attempting to register an upgrade manifest that already exists.
|
|
7131
7243
|
*/
|
|
7132
|
-
declare class DuplicateManifestError extends Error {
|
|
7244
|
+
export declare class DuplicateManifestError extends Error {
|
|
7133
7245
|
constructor(documentType: string);
|
|
7134
7246
|
static isError(error: unknown): error is DuplicateManifestError;
|
|
7135
7247
|
}
|
|
@@ -7139,7 +7251,7 @@ declare class DuplicateManifestError extends Error {
|
|
|
7139
7251
|
* In-memory implementation of the IDocumentModelRegistry interface.
|
|
7140
7252
|
* Manages document model modules with version-aware storage and upgrade manifest support.
|
|
7141
7253
|
*/
|
|
7142
|
-
declare class DocumentModelRegistry implements IDocumentModelRegistry {
|
|
7254
|
+
export declare class DocumentModelRegistry implements IDocumentModelRegistry {
|
|
7143
7255
|
private modules;
|
|
7144
7256
|
private manifests;
|
|
7145
7257
|
registerModules(...modules: DocumentModelModule<any>[]): RegistrationResult<DocumentModelModule<any>>[];
|
|
@@ -7163,7 +7275,7 @@ declare class DocumentModelRegistry implements IDocumentModelRegistry {
|
|
|
7163
7275
|
* see only those and contribute a map from document id to state. Each
|
|
7164
7276
|
* distinct stream is read once and yields one append condition entry.
|
|
7165
7277
|
*/
|
|
7166
|
-
declare function buildDecisionModel<M>(reader: IStreamStateReader, definition: (target: DecisionTarget) => DecisionModel<M>, target: DecisionTarget, signal?: AbortSignal): Promise<BuiltDecisionModel<M>>;
|
|
7278
|
+
export declare function buildDecisionModel<M>(reader: IStreamStateReader, definition: (target: DecisionTarget) => DecisionModel<M>, target: DecisionTarget, signal?: AbortSignal): Promise<BuiltDecisionModel<M>>;
|
|
7167
7279
|
//#endregion
|
|
7168
7280
|
//#region src/decision/auth-decision-model.d.ts
|
|
7169
7281
|
type AuthDecisionModel = {
|
|
@@ -7171,7 +7283,7 @@ type AuthDecisionModel = {
|
|
|
7171
7283
|
auth: PHAuthState;
|
|
7172
7284
|
};
|
|
7173
7285
|
/** This decision model uses both the document and the auth streams. */
|
|
7174
|
-
declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDecisionModel>;
|
|
7286
|
+
export declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDecisionModel>;
|
|
7175
7287
|
//#endregion
|
|
7176
7288
|
//#region src/decision/sync-scope-gate.d.ts
|
|
7177
7289
|
/**
|
|
@@ -7181,7 +7293,7 @@ declare function authDecisionModel(target: DecisionTarget): DecisionModel<AuthDe
|
|
|
7181
7293
|
* scope, and carries no state. Fetching the document is therefore the serving
|
|
7182
7294
|
* path's own job, and it is the only thing this adds to the gate it wraps.
|
|
7183
7295
|
*/
|
|
7184
|
-
declare class SyncScopeGate {
|
|
7296
|
+
export declare class SyncScopeGate {
|
|
7185
7297
|
private readonly gate;
|
|
7186
7298
|
private readonly documentView;
|
|
7187
7299
|
private readonly logger?;
|
|
@@ -7224,13 +7336,13 @@ type OutOfOrderPair = {
|
|
|
7224
7336
|
* `requireStrict` additionally rejects a tie, which is what the auth stream's
|
|
7225
7337
|
* monotonic rule requires and what the walk alone does not care about.
|
|
7226
7338
|
*/
|
|
7227
|
-
declare function firstOutOfOrderPair(operations: Operation[], options?: {
|
|
7339
|
+
export declare function firstOutOfOrderPair(operations: Operation[], options?: {
|
|
7228
7340
|
requireStrict?: boolean;
|
|
7229
7341
|
}): OutOfOrderPair | undefined;
|
|
7230
7342
|
//#endregion
|
|
7231
7343
|
//#region src/storage/kysely/document-indexer.d.ts
|
|
7232
7344
|
type IndexerDatabase = Database$1 & DocumentIndexerDatabase & DocumentViewDatabase;
|
|
7233
|
-
declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIndexer {
|
|
7345
|
+
export declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIndexer {
|
|
7234
7346
|
private _db;
|
|
7235
7347
|
constructor(db: Kysely<IndexerDatabase>, operationIndex: IOperationIndex, writeCache: IWriteCache, consistencyTracker: IConsistencyTracker, indexing?: ReadModelIndexingConfig);
|
|
7236
7348
|
/** Opens no transaction for a batch carrying no relationship operation. */
|
|
@@ -7257,7 +7369,7 @@ declare class KyselyDocumentIndexer extends BaseReadModel implements IDocumentIn
|
|
|
7257
7369
|
* serialized so the executor can return to dispatch without holding ordering
|
|
7258
7370
|
* implicitly.
|
|
7259
7371
|
*/
|
|
7260
|
-
declare class ReadModelCoordinator implements ILiveReadModelCoordinator {
|
|
7372
|
+
export declare class ReadModelCoordinator implements ILiveReadModelCoordinator {
|
|
7261
7373
|
private eventBus;
|
|
7262
7374
|
readonly preReady: IReadModel[];
|
|
7263
7375
|
readonly postReady: IReadModel[];
|
|
@@ -7292,7 +7404,7 @@ type Database$2 = Database$1 & DocumentViewDatabase;
|
|
|
7292
7404
|
* What a single-document read of a deleted document returns. A listing omits a
|
|
7293
7405
|
* deleted document under either value.
|
|
7294
7406
|
*/
|
|
7295
|
-
declare enum DeletedDocumentRead {
|
|
7407
|
+
export declare enum DeletedDocumentRead {
|
|
7296
7408
|
/**
|
|
7297
7409
|
* The document reads as missing: `get` throws and `resolveIdOrSlug` does not
|
|
7298
7410
|
* match its id.
|
|
@@ -7305,7 +7417,7 @@ declare enum DeletedDocumentRead {
|
|
|
7305
7417
|
*/
|
|
7306
7418
|
StateAtDeletion = "StateAtDeletion"
|
|
7307
7419
|
}
|
|
7308
|
-
declare class KyselyDocumentView extends BaseReadModel implements IDocumentView {
|
|
7420
|
+
export declare class KyselyDocumentView extends BaseReadModel implements IDocumentView {
|
|
7309
7421
|
private operationStore;
|
|
7310
7422
|
private readonly deletedDocumentRead;
|
|
7311
7423
|
private _db;
|
|
@@ -7349,9 +7461,9 @@ declare class KyselyDocumentView extends BaseReadModel implements IDocumentView
|
|
|
7349
7461
|
//#endregion
|
|
7350
7462
|
//#region src/read-models/names.d.ts
|
|
7351
7463
|
/** `getReadModel` name of the document view; see {@link ReactorReadModels}. */
|
|
7352
|
-
declare const DOCUMENT_VIEW_READ_MODEL = "document-view";
|
|
7464
|
+
export declare const DOCUMENT_VIEW_READ_MODEL = "document-view";
|
|
7353
7465
|
/** `getReadModel` name of the document indexer; see {@link ReactorReadModels}. */
|
|
7354
|
-
declare const DOCUMENT_INDEXER_READ_MODEL = "document-indexer";
|
|
7466
|
+
export declare const DOCUMENT_INDEXER_READ_MODEL = "document-indexer";
|
|
7355
7467
|
/**
|
|
7356
7468
|
* Read models the reactor registers on every host, keyed by the name passed to
|
|
7357
7469
|
* `IProcessorHostModule.getReadModel`. Each entry says what the model holds
|
|
@@ -7384,18 +7496,18 @@ interface ReactorReadModels {
|
|
|
7384
7496
|
}
|
|
7385
7497
|
//#endregion
|
|
7386
7498
|
//#region src/storage/migrations/migrator.d.ts
|
|
7387
|
-
declare const REACTOR_SCHEMA = "reactor";
|
|
7499
|
+
export declare const REACTOR_SCHEMA = "reactor";
|
|
7388
7500
|
/**
|
|
7389
7501
|
* Applies every pending migration, or every one up to and including `upTo`.
|
|
7390
7502
|
*
|
|
7391
7503
|
* The bound exists so a test can reach the schema a data migration is written
|
|
7392
7504
|
* against, populate it, and then migrate across the migration under test.
|
|
7393
7505
|
*/
|
|
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[]>;
|
|
7506
|
+
export declare function runMigrations(db: Kysely<any>, schema?: string, upTo?: string): Promise<MigrationResult>;
|
|
7507
|
+
export declare function getMigrationStatus(db: Kysely<any>, schema?: string): Promise<readonly import("kysely").MigrationInfo[]>;
|
|
7396
7508
|
//#endregion
|
|
7397
7509
|
//#region src/storage/kysely/sync-cursor-storage.d.ts
|
|
7398
|
-
declare class KyselySyncCursorStorage implements ISyncCursorStorage {
|
|
7510
|
+
export declare class KyselySyncCursorStorage implements ISyncCursorStorage {
|
|
7399
7511
|
private readonly db;
|
|
7400
7512
|
constructor(db: Kysely<Database$1>);
|
|
7401
7513
|
list(remoteName: string, signal?: AbortSignal): Promise<RemoteCursor[]>;
|
|
@@ -7405,7 +7517,7 @@ declare class KyselySyncCursorStorage implements ISyncCursorStorage {
|
|
|
7405
7517
|
}
|
|
7406
7518
|
//#endregion
|
|
7407
7519
|
//#region src/storage/kysely/sync-remote-storage.d.ts
|
|
7408
|
-
declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
|
|
7520
|
+
export declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
|
|
7409
7521
|
private readonly db;
|
|
7410
7522
|
constructor(db: Kysely<Database$1>);
|
|
7411
7523
|
list(signal?: AbortSignal): Promise<RemoteRecord[]>;
|
|
@@ -7424,7 +7536,7 @@ declare class KyselySyncRemoteStorage implements ISyncRemoteStorage {
|
|
|
7424
7536
|
* The optional jwtHandler enables dynamic JWT token generation per-request,
|
|
7425
7537
|
* which is useful for short-lived tokens with audience-specific claims.
|
|
7426
7538
|
*/
|
|
7427
|
-
declare class GqlRequestChannelFactory implements IChannelFactory {
|
|
7539
|
+
export declare class GqlRequestChannelFactory implements IChannelFactory {
|
|
7428
7540
|
private readonly logger;
|
|
7429
7541
|
private readonly jwtHandler?;
|
|
7430
7542
|
private readonly queue;
|
|
@@ -7445,7 +7557,7 @@ declare class GqlRequestChannelFactory implements IChannelFactory {
|
|
|
7445
7557
|
/**
|
|
7446
7558
|
* Factory for creating GqlResponseChannel instances.
|
|
7447
7559
|
*/
|
|
7448
|
-
declare class GqlResponseChannelFactory implements IChannelFactory {
|
|
7560
|
+
export declare class GqlResponseChannelFactory implements IChannelFactory {
|
|
7449
7561
|
private readonly logger;
|
|
7450
7562
|
constructor(logger: ILogger);
|
|
7451
7563
|
instance(remoteId: string, remoteName: string, config: ChannelConfig, cursorStorage: ISyncCursorStorage): IChannel;
|
|
@@ -7458,8 +7570,11 @@ declare class GqlResponseChannelFactory implements IChannelFactory {
|
|
|
7458
7570
|
* The delegate returns a Promise; timer waits for completion before scheduling next tick.
|
|
7459
7571
|
*/
|
|
7460
7572
|
type IPollTimer = {
|
|
7461
|
-
/** Register the delegate to be called on each tick. Returns Promise that timer awaits. */
|
|
7462
|
-
|
|
7573
|
+
/** Register the delegate to be called on each tick. Returns Promise that timer awaits. */
|
|
7574
|
+
setDelegate: (delegate: () => Promise<void>) => void;
|
|
7575
|
+
/** Start the timer (begins calling delegate periodically) */
|
|
7576
|
+
start: () => void;
|
|
7577
|
+
/** Stop the timer */
|
|
7463
7578
|
stop: () => void;
|
|
7464
7579
|
/**
|
|
7465
7580
|
* Fires the delegate exactly once without changing the running/paused state.
|
|
@@ -7473,18 +7588,25 @@ type IPollTimer = {
|
|
|
7473
7588
|
* Configuration parameters for GqlChannel
|
|
7474
7589
|
*/
|
|
7475
7590
|
type GqlChannelConfig = {
|
|
7476
|
-
/** The GraphQL endpoint URL */
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7591
|
+
/** The GraphQL endpoint URL */
|
|
7592
|
+
url: string;
|
|
7593
|
+
/** Dynamic JWT token handler for generating fresh tokens per-request */
|
|
7594
|
+
jwtHandler?: JwtHandler;
|
|
7595
|
+
/** Custom fetch function for testing (default: global fetch) */
|
|
7596
|
+
fetchFn?: typeof fetch;
|
|
7597
|
+
/** Collection to synchronize (drive-level abstraction) */
|
|
7598
|
+
collectionId: DriveCollectionId;
|
|
7599
|
+
/** Filter to apply to operations */
|
|
7600
|
+
filter: RemoteFilter;
|
|
7601
|
+
/** Base delay in ms for exponential backoff on push retries */
|
|
7602
|
+
retryBaseDelayMs: number;
|
|
7603
|
+
/** Maximum delay in ms for exponential backoff on push retries */
|
|
7482
7604
|
retryMaxDelayMs: number;
|
|
7483
7605
|
};
|
|
7484
7606
|
/**
|
|
7485
7607
|
* GraphQL-based synchronization channel for network communication between reactors.
|
|
7486
7608
|
*/
|
|
7487
|
-
declare class GqlRequestChannel implements IChannel {
|
|
7609
|
+
export declare class GqlRequestChannel implements IChannel {
|
|
7488
7610
|
private readonly logger;
|
|
7489
7611
|
readonly inbox: IMailbox;
|
|
7490
7612
|
readonly outbox: IMailbox;
|
|
@@ -7622,7 +7744,7 @@ declare class GqlRequestChannel implements IChannel {
|
|
|
7622
7744
|
*
|
|
7623
7745
|
* In general, the resolvers are responsible for updating mailboxes.
|
|
7624
7746
|
*/
|
|
7625
|
-
declare class GqlResponseChannel implements IChannel {
|
|
7747
|
+
export declare class GqlResponseChannel implements IChannel {
|
|
7626
7748
|
private readonly logger;
|
|
7627
7749
|
readonly inbox: Mailbox;
|
|
7628
7750
|
readonly outbox: Mailbox;
|
|
@@ -7697,7 +7819,7 @@ type PollTimerConfig = {
|
|
|
7697
7819
|
* Waits for delegate completion before scheduling next tick.
|
|
7698
7820
|
* Checks queue depth and defers polling when backpressure is detected.
|
|
7699
7821
|
*/
|
|
7700
|
-
declare class IntervalPollTimer implements IPollTimer {
|
|
7822
|
+
export declare class IntervalPollTimer implements IPollTimer {
|
|
7701
7823
|
private delegate;
|
|
7702
7824
|
private timer;
|
|
7703
7825
|
private running;
|
|
@@ -7735,7 +7857,7 @@ declare class IntervalPollTimer implements IPollTimer {
|
|
|
7735
7857
|
* This ensures operations are grouped for efficient processing while maintaining
|
|
7736
7858
|
* causality across documents.
|
|
7737
7859
|
*/
|
|
7738
|
-
declare function envelopesToSyncOperations(envelope: SyncEnvelope, remoteName: string): SyncOperation[];
|
|
7860
|
+
export declare function envelopesToSyncOperations(envelope: SyncEnvelope, remoteName: string): SyncOperation[];
|
|
7739
7861
|
//#endregion
|
|
7740
7862
|
//#region src/sync/utils.d.ts
|
|
7741
7863
|
type OperationBatch = {
|
|
@@ -7747,7 +7869,7 @@ type OperationBatch = {
|
|
|
7747
7869
|
/**
|
|
7748
7870
|
* Trims a mailbox using the ack ordinal.
|
|
7749
7871
|
*/
|
|
7750
|
-
declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number): void;
|
|
7872
|
+
export declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number): void;
|
|
7751
7873
|
/**
|
|
7752
7874
|
* Batches consecutive operations by documentId and scope, preserving ordering.
|
|
7753
7875
|
*
|
|
@@ -7760,7 +7882,7 @@ declare function trimMailboxFromAckOrdinal(mailbox: IMailbox, ackOrdinal: number
|
|
|
7760
7882
|
* This ensures operations are grouped for efficient processing while maintaining
|
|
7761
7883
|
* causality across documents and scopes.
|
|
7762
7884
|
*/
|
|
7763
|
-
declare function batchOperationsByDocument(operations: OperationWithContext$1[]): OperationBatch[];
|
|
7885
|
+
export declare function batchOperationsByDocument(operations: OperationWithContext$1[]): OperationBatch[];
|
|
7764
7886
|
/**
|
|
7765
7887
|
* Merges SyncOperations that share the same (documentId, scope, branch) into
|
|
7766
7888
|
* a single SyncOperation per group. Within each group, operations are sorted
|
|
@@ -7774,19 +7896,19 @@ declare function batchOperationsByDocument(operations: OperationWithContext$1[])
|
|
|
7774
7896
|
* depend on the other, which validateBatchStructure rejects as a dependency
|
|
7775
7897
|
* cycle. Merging only adjacent entries keeps the chain linear.
|
|
7776
7898
|
*/
|
|
7777
|
-
declare function consolidateSyncOperations(syncOps: SyncOperation[]): SyncOperation[];
|
|
7899
|
+
export declare function consolidateSyncOperations(syncOps: SyncOperation[]): SyncOperation[];
|
|
7778
7900
|
/**
|
|
7779
7901
|
* Classifies a failure by error name rather than `instanceof`, because a failure
|
|
7780
7902
|
* that crossed the pooled-worker boundary arrives as plain data.
|
|
7781
7903
|
*/
|
|
7782
|
-
declare function classifyJobFailure(errorName: string): SyncOperationErrorType;
|
|
7904
|
+
export declare function classifyJobFailure(errorName: string): SyncOperationErrorType;
|
|
7783
7905
|
/** The explicit type when something else carried it, else derived by name. */
|
|
7784
|
-
declare function syncOperationErrorType(error: ChannelError | undefined): SyncOperationErrorType;
|
|
7906
|
+
export declare function syncOperationErrorType(error: ChannelError | undefined): SyncOperationErrorType;
|
|
7785
7907
|
/**
|
|
7786
7908
|
* A held auth operation must not quarantine: reconciling the two policies needs
|
|
7787
7909
|
* the traffic a quarantine would stop.
|
|
7788
7910
|
*/
|
|
7789
|
-
declare function quarantinesDocument(errorType: SyncOperationErrorType): boolean;
|
|
7911
|
+
export declare function quarantinesDocument(errorType: SyncOperationErrorType): boolean;
|
|
7790
7912
|
//#endregion
|
|
7791
7913
|
//#region src/processors/host-module.d.ts
|
|
7792
7914
|
/**
|
|
@@ -7811,11 +7933,12 @@ interface IReactorProcessorHostModuleBase extends IProcessorHostModuleBase$1 {
|
|
|
7811
7933
|
getReadModel<T>(name: string): T;
|
|
7812
7934
|
}
|
|
7813
7935
|
type ReactorHostModuleBaseOptions = Pick<IProcessorHostModuleBase$1, "analyticsStore" | "relationalDb" | "processorApp" | "config"> & {
|
|
7814
|
-
client: IReactorClient;
|
|
7936
|
+
client: IReactorClient;
|
|
7937
|
+
/** Registered read models, typically `readModelCoordinator.readModels`. */
|
|
7815
7938
|
readModels: ReadonlyArray<Pick<IReadModel, "name">>;
|
|
7816
7939
|
};
|
|
7817
7940
|
/** Builds the reactor-level host module; hosts spread it and add their own fields. */
|
|
7818
|
-
declare function createReactorHostModuleBase(options: ReactorHostModuleBaseOptions): IReactorProcessorHostModuleBase;
|
|
7941
|
+
export declare function createReactorHostModuleBase(options: ReactorHostModuleBaseOptions): IReactorProcessorHostModuleBase;
|
|
7819
7942
|
//#endregion
|
|
7820
7943
|
//#region src/admin/types.d.ts
|
|
7821
7944
|
type KeyframeValidationIssue = {
|
|
@@ -7858,7 +7981,7 @@ interface IDocumentIntegrityService {
|
|
|
7858
7981
|
}
|
|
7859
7982
|
//#endregion
|
|
7860
7983
|
//#region src/admin/document-integrity-service.d.ts
|
|
7861
|
-
declare class DocumentIntegrityService implements IDocumentIntegrityService {
|
|
7984
|
+
export declare class DocumentIntegrityService implements IDocumentIntegrityService {
|
|
7862
7985
|
private readonly keyframeStore;
|
|
7863
7986
|
private readonly operationStore;
|
|
7864
7987
|
private readonly writeCache;
|
|
@@ -7884,7 +8007,7 @@ type FactoryRun = () => Promise<void>;
|
|
|
7884
8007
|
type ProcessorManagerOptions = {
|
|
7885
8008
|
legacyProcessorIds?: boolean;
|
|
7886
8009
|
};
|
|
7887
|
-
declare class ProcessorManager extends BaseReadModel implements IProcessorManager$1 {
|
|
8010
|
+
export declare class ProcessorManager extends BaseReadModel implements IProcessorManager$1 {
|
|
7888
8011
|
private factoryRegistry;
|
|
7889
8012
|
private processorsByDrive;
|
|
7890
8013
|
private pendingSlots;
|
|
@@ -7934,5 +8057,6 @@ declare class ProcessorManager extends BaseReadModel implements IProcessorManage
|
|
|
7934
8057
|
private deleteCursors;
|
|
7935
8058
|
}
|
|
7936
8059
|
//#endregion
|
|
7937
|
-
export {
|
|
8060
|
+
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 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 };
|
|
8061
|
+
export {};
|
|
7938
8062
|
//# sourceMappingURL=index.d.ts.map
|