@powerhousedao/reactor 6.2.3-dev.50 → 6.2.3-dev.52
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/{document-indexer-DwAMDVRI.js → document-indexer-3fkVWCaN.js} +26 -14
- package/dist/document-indexer-3fkVWCaN.js.map +1 -0
- package/dist/{drive-container-types-Ci1pdv4X.js → drive-container-types-BAfFzBOf.js} +133 -7
- package/dist/drive-container-types-BAfFzBOf.js.map +1 -0
- package/dist/entry.js +2 -2
- package/dist/{forwarding-logger-ByfBFgMS.js → forwarding-logger-B9LLXItm.js} +111 -79
- package/dist/forwarding-logger-B9LLXItm.js.map +1 -0
- package/dist/{index-CNhT69De.d.ts → index-dDm0fUBT.d.ts} +518 -68
- package/dist/index-dDm0fUBT.d.ts.map +1 -0
- package/dist/index.d.ts +1040 -138
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3110 -776
- package/dist/index.js.map +1 -1
- package/dist/projection-entry.js +2 -2
- package/dist/{projection-shard-manager-CQ5FwQmv.js → projection-shard-manager-Drl9w8Eo.js} +3 -13
- package/dist/projection-shard-manager-Drl9w8Eo.js.map +1 -0
- package/dist/rpc.d.ts +32 -6
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +8 -4
- package/dist/rpc.js.map +1 -1
- package/dist/{worker-handle-CN2-oRv-.js → worker-handle-Nso8i5eU.js} +2 -2
- package/dist/{worker-handle-CN2-oRv-.js.map → worker-handle-Nso8i5eU.js.map} +1 -1
- package/dist/worker-pool-router-BROOEQSE.js +35 -0
- package/dist/worker-pool-router-BROOEQSE.js.map +1 -0
- package/package.json +3 -3
- package/dist/document-indexer-DwAMDVRI.js.map +0 -1
- package/dist/drive-container-types-Ci1pdv4X.js.map +0 -1
- package/dist/forwarding-logger-ByfBFgMS.js.map +0 -1
- package/dist/index-CNhT69De.d.ts.map +0 -1
- package/dist/projection-shard-manager-CQ5FwQmv.js.map +0 -1
|
@@ -2,75 +2,73 @@ import { Action, ActionSigner, AuthRequest, AuthSubject, DocumentModelModule, Ho
|
|
|
2
2
|
import { DocumentDriveDocument, DriveInput, FolderNode, Node } from "@powerhousedao/shared/document-drive";
|
|
3
3
|
import { ILogger } from "document-model";
|
|
4
4
|
import "@powerhousedao/shared/document-model/errors";
|
|
5
|
-
import { ColumnType, Generated, Insertable, Kysely, Selectable, Transaction } from "kysely";
|
|
6
|
-
import { IProcessorManager } from "@powerhousedao/shared/processors";
|
|
5
|
+
import { ColumnType, DatabaseIntrospector, Dialect, DialectAdapter, Driver, Generated, Insertable, Kysely, QueryCompiler, Selectable, Transaction } from "kysely";
|
|
6
|
+
import { IProcessorManager, ProcessorStatus } from "@powerhousedao/shared/processors";
|
|
7
7
|
import { Pool } from "pg";
|
|
8
|
-
//#region src/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
//#region src/decision/stream-order.d.ts
|
|
9
|
+
/** Where a stream's stored order contradicts its timestamps. */
|
|
10
|
+
type OutOfOrderPair = {
|
|
11
|
+
previous: Operation;
|
|
12
|
+
current: Operation;
|
|
13
|
+
/**
|
|
14
|
+
* `descending` cannot be walked at all. `tied` walks fine — the intra-stream
|
|
15
|
+
* rule breaks the tie by index — but violates the monotonic auth rule, so a
|
|
16
|
+
* stream holding one can never be replicated to a peer that lacks it.
|
|
17
|
+
*/
|
|
18
|
+
kind: "descending" | "tied";
|
|
14
19
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The first pair of effective operations whose stored order contradicts their
|
|
22
|
+
* timestamps, or undefined when the stream is in position order.
|
|
23
|
+
*
|
|
24
|
+
* Such a stream cannot be walked, and the auth stream is never reshuffled once
|
|
25
|
+
* the monotonic rule is on, so run this before enabling enforcement on a fleet.
|
|
26
|
+
*
|
|
27
|
+
* `requireStrict` additionally rejects a tie, which is what the auth stream's
|
|
28
|
+
* monotonic rule requires and what the walk alone does not care about.
|
|
29
|
+
*/
|
|
30
|
+
declare function firstOutOfOrderPair(operations: Operation[], options?: {
|
|
31
|
+
requireStrict?: boolean;
|
|
32
|
+
}): OutOfOrderPair | undefined;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/admin/types.d.ts
|
|
35
|
+
type KeyframeValidationIssue = {
|
|
26
36
|
scope: string;
|
|
27
37
|
branch: string;
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
revision: number;
|
|
39
|
+
keyframeHash: string;
|
|
40
|
+
replayedHash: string;
|
|
30
41
|
};
|
|
31
|
-
type
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/** Late operations applied. */
|
|
37
|
-
replayed: number;
|
|
38
|
-
/** Later operations of their streams applied again. */
|
|
39
|
-
reapplied: number;
|
|
40
|
-
blockedAt?: SweepBlockedAt;
|
|
42
|
+
type SnapshotValidationIssue = {
|
|
43
|
+
scope: string;
|
|
44
|
+
branch: string;
|
|
45
|
+
snapshotHash: string;
|
|
46
|
+
replayedHash: string;
|
|
41
47
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
type CatchUpThread = "host" | "projection";
|
|
50
|
-
type CatchUpConsumerStatus = {
|
|
51
|
-
consumerId: string;
|
|
52
|
-
thread: CatchUpThread;
|
|
53
|
-
appliedThrough: number;
|
|
54
|
-
trackedAbove: number;
|
|
55
|
-
blockedAt?: SweepBlockedAt;
|
|
56
|
-
lastAdvanceUtcMs: number;
|
|
48
|
+
/** Effective operations whose stored order contradicts their timestamps. */
|
|
49
|
+
type StreamOrderIssue = {
|
|
50
|
+
scope: string;
|
|
51
|
+
branch: string;
|
|
52
|
+
previous: Operation;
|
|
53
|
+
current: Operation;
|
|
54
|
+
kind: OutOfOrderPair["kind"];
|
|
57
55
|
};
|
|
58
|
-
type
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
type ValidationResult = {
|
|
57
|
+
documentId: string;
|
|
58
|
+
isConsistent: boolean;
|
|
59
|
+
keyframeIssues: KeyframeValidationIssue[];
|
|
60
|
+
snapshotIssues: SnapshotValidationIssue[];
|
|
61
|
+
streamOrderIssues: StreamOrderIssue[];
|
|
61
62
|
};
|
|
62
|
-
type
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/** Present ordinals read per tick. */
|
|
67
|
-
sweepPageSize: number;
|
|
63
|
+
type RebuildResult = {
|
|
64
|
+
documentId: string;
|
|
65
|
+
keyframesDeleted: number;
|
|
66
|
+
scopesInvalidated: number;
|
|
68
67
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
sweepNow(): Promise<SweepResult[]>;
|
|
68
|
+
interface IDocumentIntegrityService {
|
|
69
|
+
validateDocument(documentId: string, branch?: string, signal?: AbortSignal): Promise<ValidationResult>;
|
|
70
|
+
rebuildKeyframes(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
71
|
+
rebuildSnapshots(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
74
72
|
}
|
|
75
73
|
//#endregion
|
|
76
74
|
//#region src/shared/types.d.ts
|
|
@@ -454,6 +452,9 @@ type ReadModelRegistrationStage = "pre_ready" | "post_ready";
|
|
|
454
452
|
*/
|
|
455
453
|
interface ILiveReadModelCoordinator extends IReadModelCoordinator {
|
|
456
454
|
addReadModel(readModel: IReadModel, stage: ReadModelRegistrationStage): void;
|
|
455
|
+
/** Detaches this instance, not its name; false when it is not registered.
|
|
456
|
+
* A batch it reserved and has not applied is released. */
|
|
457
|
+
removeReadModel(readModel: IReadModel): boolean;
|
|
457
458
|
}
|
|
458
459
|
declare function supportsLiveReadModelRegistration(coordinator: IReadModelCoordinator): coordinator is ILiveReadModelCoordinator;
|
|
459
460
|
//#endregion
|
|
@@ -478,6 +479,18 @@ declare enum PollBehavior {
|
|
|
478
479
|
Auto = "auto",
|
|
479
480
|
Manual = "manual"
|
|
480
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Whether a remote outlives the process that added it.
|
|
484
|
+
*
|
|
485
|
+
* A `Session` remote's transport is a live object of this session, such as a
|
|
486
|
+
* brokered `MessagePort`. Its record is written like any other, so its cursors,
|
|
487
|
+
* holds and dead letters have a parent row, and the next `startup()` removes
|
|
488
|
+
* it instead of rehydrating it.
|
|
489
|
+
*/
|
|
490
|
+
declare enum RemotePersistence {
|
|
491
|
+
Durable = "durable",
|
|
492
|
+
Session = "session"
|
|
493
|
+
}
|
|
481
494
|
type RemoteOptions = {
|
|
482
495
|
/**
|
|
483
496
|
* Stringified UTC timestamp (ms). When set and not `"0"`, outbox operations older
|
|
@@ -485,6 +498,8 @@ type RemoteOptions = {
|
|
|
485
498
|
* the filter, syncing from the beginning of history.
|
|
486
499
|
*/
|
|
487
500
|
sinceTimestampUtcMs?: string;
|
|
501
|
+
/** Defaults to {@link RemotePersistence.Durable}. */
|
|
502
|
+
persistence?: RemotePersistence;
|
|
488
503
|
/**
|
|
489
504
|
* Polling cadence for this remote. Defaults to `PollBehavior.Auto` when omitted.
|
|
490
505
|
*/
|
|
@@ -1622,6 +1637,16 @@ declare class DriveCollectionId {
|
|
|
1622
1637
|
* The single deserializer for the wire/storage form. `branch` may contain
|
|
1623
1638
|
* dots, while `driveId` is a dot-free document id, so the drive id is the
|
|
1624
1639
|
* final dot-delimited segment.
|
|
1640
|
+
*
|
|
1641
|
+
* That asymmetry is a real constraint, not a convention: a drive id
|
|
1642
|
+
* containing a dot does NOT survive `key` -> `fromKey`, because the split
|
|
1643
|
+
* takes the LAST dot and so hands the tail of the drive id back as the drive
|
|
1644
|
+
* id and everything before it as the branch. The key format is the wire and
|
|
1645
|
+
* storage representation of existing `document_collections` rows, so it
|
|
1646
|
+
* cannot be changed; callers that accept a drive id or branch from outside
|
|
1647
|
+
* (a UI field, an RPC payload) must reject dots in the drive id at their own
|
|
1648
|
+
* boundary. The round-trip is verifiable without parsing rules:
|
|
1649
|
+
* `DriveCollectionId.fromKey(id.key).key === id.key`.
|
|
1625
1650
|
*/
|
|
1626
1651
|
static fromKey(key: string): DriveCollectionId;
|
|
1627
1652
|
get key(): string;
|
|
@@ -1819,6 +1844,7 @@ interface SyncRemoteTable {
|
|
|
1819
1844
|
pull_last_failure_utc_ms: string | null;
|
|
1820
1845
|
pull_failure_count: number;
|
|
1821
1846
|
bound_address: string | null;
|
|
1847
|
+
persistence: Generated<string>;
|
|
1822
1848
|
peer_manifest: string | null;
|
|
1823
1849
|
peer_manifest_at_utc_ms: ColumnType<string | number | null, number | null, number | null>;
|
|
1824
1850
|
created_at: Generated<Date>;
|
|
@@ -2660,6 +2686,12 @@ type JobExecutorConfig = {
|
|
|
2660
2686
|
protocolSupport?: ProtocolSupport;
|
|
2661
2687
|
/** Index rows a purge may remove without allowLarge. */
|
|
2662
2688
|
maxPurgeOperations?: number;
|
|
2689
|
+
/**
|
|
2690
|
+
* How long a committed job waits for its flush before its write-ready is
|
|
2691
|
+
* withheld; 0 or less waits unbounded. withGroupCommitPGlite refuses that and
|
|
2692
|
+
* any non-finite value. Must stay under the job timeout.
|
|
2693
|
+
*/
|
|
2694
|
+
durabilityWaitMs?: number;
|
|
2663
2695
|
};
|
|
2664
2696
|
/** Cloneable, so a pooled worker refuses exactly what the host refuses. */
|
|
2665
2697
|
type ProtocolSupport = {
|
|
@@ -3330,6 +3362,281 @@ type CatchUpSweptEvent = SweepResult & {
|
|
|
3330
3362
|
thread: CatchUpThread;
|
|
3331
3363
|
};
|
|
3332
3364
|
//#endregion
|
|
3365
|
+
//#region src/catch-up/types.d.ts
|
|
3366
|
+
type WatermarkStatus = {
|
|
3367
|
+
head: number;
|
|
3368
|
+
settledThrough: number;
|
|
3369
|
+
waitingOn: string[];
|
|
3370
|
+
stalledSinceUtcMs?: number;
|
|
3371
|
+
};
|
|
3372
|
+
interface ISettledWatermark {
|
|
3373
|
+
/** Every ordinal at or below this is visible or will never exist. */
|
|
3374
|
+
readonly settledThrough: number;
|
|
3375
|
+
/** Probes, coalesced with one in flight; resolves with settledThrough. */
|
|
3376
|
+
refresh(signal?: AbortSignal): Promise<number>;
|
|
3377
|
+
onAdvance(listener: (settledThrough: number) => void): Unsubscribe;
|
|
3378
|
+
status(): WatermarkStatus;
|
|
3379
|
+
}
|
|
3380
|
+
type SweepBlockedAt = {
|
|
3381
|
+
ordinal: number;
|
|
3382
|
+
documentId: string;
|
|
3383
|
+
scope: string;
|
|
3384
|
+
branch: string;
|
|
3385
|
+
type: string;
|
|
3386
|
+
error: string;
|
|
3387
|
+
};
|
|
3388
|
+
type SweepResult = {
|
|
3389
|
+
consumerId: string;
|
|
3390
|
+
from: number;
|
|
3391
|
+
to: number;
|
|
3392
|
+
durationMs: number;
|
|
3393
|
+
/** Late operations applied. */
|
|
3394
|
+
replayed: number;
|
|
3395
|
+
/** Later operations of their streams applied again. */
|
|
3396
|
+
reapplied: number;
|
|
3397
|
+
blockedAt?: SweepBlockedAt;
|
|
3398
|
+
};
|
|
3399
|
+
interface ICatchUpConsumer {
|
|
3400
|
+
readonly consumerId: string;
|
|
3401
|
+
readonly appliedThrough: number;
|
|
3402
|
+
/** Ordinals above the cursor this consumer holds in memory. */
|
|
3403
|
+
readonly trackedAbove: number;
|
|
3404
|
+
sweep(settledThrough: number, present: readonly number[], signal?: AbortSignal): Promise<SweepResult>;
|
|
3405
|
+
}
|
|
3406
|
+
type CatchUpThread = "host" | "projection";
|
|
3407
|
+
type CatchUpConsumerStatus = {
|
|
3408
|
+
consumerId: string;
|
|
3409
|
+
thread: CatchUpThread;
|
|
3410
|
+
appliedThrough: number;
|
|
3411
|
+
trackedAbove: number;
|
|
3412
|
+
blockedAt?: SweepBlockedAt;
|
|
3413
|
+
lastAdvanceUtcMs: number;
|
|
3414
|
+
};
|
|
3415
|
+
type CatchUpStatus = {
|
|
3416
|
+
watermark: WatermarkStatus;
|
|
3417
|
+
consumers: CatchUpConsumerStatus[];
|
|
3418
|
+
};
|
|
3419
|
+
type CatchUpConfig = {
|
|
3420
|
+
intervalMs: number;
|
|
3421
|
+
stuckWarnMs: number;
|
|
3422
|
+
maxTrackedAboveCursor: number;
|
|
3423
|
+
/** Present ordinals read per tick. */
|
|
3424
|
+
sweepPageSize: number;
|
|
3425
|
+
};
|
|
3426
|
+
declare const defaultCatchUpConfig: CatchUpConfig;
|
|
3427
|
+
/** The catch-up surface a reactor module exposes. */
|
|
3428
|
+
interface ICatchUp {
|
|
3429
|
+
status(): CatchUpStatus;
|
|
3430
|
+
sweepNow(): Promise<SweepResult[]>;
|
|
3431
|
+
}
|
|
3432
|
+
//#endregion
|
|
3433
|
+
//#region src/inspector/types.d.ts
|
|
3434
|
+
/** Where the reactor's store keeps its bytes. */
|
|
3435
|
+
type StoragePersistence = "idb" | "memory" | "path" | "server" | "unknown";
|
|
3436
|
+
/** What the reactor knows about its own store. */
|
|
3437
|
+
type ReactorStorageFacts = {
|
|
3438
|
+
readonly engine: "pglite" | "postgres" | "unknown";
|
|
3439
|
+
readonly persistence: StoragePersistence;
|
|
3440
|
+
/** False when the store is in memory or its persistence is unknown. */
|
|
3441
|
+
readonly durable: boolean;
|
|
3442
|
+
/** Whether a poisoned store session is recreated in place. */
|
|
3443
|
+
readonly selfHeal: boolean;
|
|
3444
|
+
};
|
|
3445
|
+
/** The inspection tiers a transport serves beyond reads. */
|
|
3446
|
+
type InspectorAccess = {
|
|
3447
|
+
readonly admin: boolean;
|
|
3448
|
+
readonly sql: boolean;
|
|
3449
|
+
};
|
|
3450
|
+
/** The facts a reactor reports about itself. */
|
|
3451
|
+
type ReactorInfo = {
|
|
3452
|
+
readonly storage: ReactorStorageFacts;
|
|
3453
|
+
/** Whether a workflow runtime is composed onto this reactor right now. */
|
|
3454
|
+
readonly workflows: boolean;
|
|
3455
|
+
/** The channel types the built channel factory serves; empty without sync. */
|
|
3456
|
+
readonly syncChannels: readonly string[];
|
|
3457
|
+
readonly access: InspectorAccess;
|
|
3458
|
+
};
|
|
3459
|
+
/** Untracked health reports `healthy: false`, so an unwatched store never reads green. */
|
|
3460
|
+
type InspectorStorageHealth = {
|
|
3461
|
+
tracked: boolean;
|
|
3462
|
+
healthy: boolean;
|
|
3463
|
+
everRecreated: boolean;
|
|
3464
|
+
recreateCount: number;
|
|
3465
|
+
};
|
|
3466
|
+
/** The storage-health source a `ReactorInspector` reads, when one is wired. */
|
|
3467
|
+
interface IInspectorStorageHealthProvider {
|
|
3468
|
+
getStorageHealth(): InspectorStorageHealth;
|
|
3469
|
+
}
|
|
3470
|
+
/** Point-in-time view of the job queue. */
|
|
3471
|
+
type QueueStateSnapshot = {
|
|
3472
|
+
isPaused: boolean;
|
|
3473
|
+
pendingJobs: Job[];
|
|
3474
|
+
executingJobs: Job[];
|
|
3475
|
+
totalPending: number;
|
|
3476
|
+
totalExecuting: number;
|
|
3477
|
+
};
|
|
3478
|
+
/** One registered document model and every version its type supports. */
|
|
3479
|
+
type InspectorDocumentModelInfo = {
|
|
3480
|
+
documentType: string;
|
|
3481
|
+
name: string;
|
|
3482
|
+
version: number;
|
|
3483
|
+
supportedVersions: number[];
|
|
3484
|
+
};
|
|
3485
|
+
/** One drive and a summary of its node tree. */
|
|
3486
|
+
type InspectorDriveInfo = {
|
|
3487
|
+
driveId: string;
|
|
3488
|
+
name: string;
|
|
3489
|
+
branch: string;
|
|
3490
|
+
/** The `drive.<branch>.<driveId>` collection id a remote syncs it under. */
|
|
3491
|
+
collectionId: string;
|
|
3492
|
+
documentType: string;
|
|
3493
|
+
/** Every entry in the raw node array, malformed ones included. */
|
|
3494
|
+
nodeCount: number;
|
|
3495
|
+
fileCount: number;
|
|
3496
|
+
folderCount: number;
|
|
3497
|
+
/** Readable nodes whose kind is neither file nor folder. */
|
|
3498
|
+
otherNodeCount: number;
|
|
3499
|
+
/** Entries with no string id or kind. */
|
|
3500
|
+
unreadableNodeCount: number;
|
|
3501
|
+
icon: string | undefined;
|
|
3502
|
+
};
|
|
3503
|
+
type InspectorDrivePage = {
|
|
3504
|
+
results: InspectorDriveInfo[];
|
|
3505
|
+
/** Absent once the last page has been served. */
|
|
3506
|
+
nextCursor: string | undefined;
|
|
3507
|
+
};
|
|
3508
|
+
type InspectorDriveIntegrityRef = {
|
|
3509
|
+
id: string;
|
|
3510
|
+
documentType: string;
|
|
3511
|
+
};
|
|
3512
|
+
/** One pass over one drive snapshot, so `checkedNodeCount` equals `totalFileNodeCount`. */
|
|
3513
|
+
type InspectorDriveIntegrity = {
|
|
3514
|
+
driveId: string;
|
|
3515
|
+
checkedNodeCount: number;
|
|
3516
|
+
totalFileNodeCount: number;
|
|
3517
|
+
/** Missing or not served to the reader; the two look the same so nothing leaks. */
|
|
3518
|
+
missingDocuments: InspectorDriveIntegrityRef[];
|
|
3519
|
+
unsupportedTypes: InspectorDriveIntegrityRef[];
|
|
3520
|
+
};
|
|
3521
|
+
/** Replicator counters mean nothing when `hasReplicator` is false. */
|
|
3522
|
+
type InspectorAttachmentInfo = {
|
|
3523
|
+
present: boolean;
|
|
3524
|
+
/** The store class, e.g. "kysely", "idb", "memory"; "none" when absent. */
|
|
3525
|
+
storeKind: string;
|
|
3526
|
+
hasReplicator: boolean;
|
|
3527
|
+
replicatorRunning: boolean;
|
|
3528
|
+
backlogScanned: boolean;
|
|
3529
|
+
refsSeen: number;
|
|
3530
|
+
held: number;
|
|
3531
|
+
bytesHeld: number;
|
|
3532
|
+
queued: number;
|
|
3533
|
+
fetching: number;
|
|
3534
|
+
pendingFetches: number;
|
|
3535
|
+
waiting: number;
|
|
3536
|
+
notFound: number;
|
|
3537
|
+
failed: number;
|
|
3538
|
+
lastError: string | undefined;
|
|
3539
|
+
};
|
|
3540
|
+
/** The attachment-store source a `ReactorInspector` reads, when one is wired. */
|
|
3541
|
+
interface IInspectableAttachmentStore {
|
|
3542
|
+
getAttachmentInfo(): Promise<InspectorAttachmentInfo>;
|
|
3543
|
+
}
|
|
3544
|
+
/** A tracked processor without its `retry()` closure, so it can be cloned. */
|
|
3545
|
+
type InspectorProcessorInfo = {
|
|
3546
|
+
processorId: string;
|
|
3547
|
+
factoryId: string;
|
|
3548
|
+
driveId: string;
|
|
3549
|
+
processorIndex: number;
|
|
3550
|
+
lastOrdinal: number;
|
|
3551
|
+
status: ProcessorStatus;
|
|
3552
|
+
lastError: string | undefined;
|
|
3553
|
+
lastErrorTimestamp: Date | undefined;
|
|
3554
|
+
};
|
|
3555
|
+
/** The in-memory queue's debugging surface; not part of `IQueue`. */
|
|
3556
|
+
interface IInspectableQueue {
|
|
3557
|
+
readonly paused: boolean;
|
|
3558
|
+
pause(): void;
|
|
3559
|
+
resume(): Promise<void>;
|
|
3560
|
+
getPendingJobs(): Job[];
|
|
3561
|
+
getExecutingJobIds(): Map<string, Set<string>>;
|
|
3562
|
+
getJob(jobId: string): Job | undefined;
|
|
3563
|
+
}
|
|
3564
|
+
/** Inspection reads: no state changes, plain-data results for any transport. */
|
|
3565
|
+
interface IInspector {
|
|
3566
|
+
info(): Promise<ReactorInfo>;
|
|
3567
|
+
listDocumentModels(): Promise<InspectorDocumentModelInfo[]>;
|
|
3568
|
+
listDrives(cursor?: string, limit?: number): Promise<InspectorDrivePage>;
|
|
3569
|
+
checkDriveIntegrity(driveId: string, branch: string): Promise<InspectorDriveIntegrity>;
|
|
3570
|
+
getAttachmentInfo(): Promise<InspectorAttachmentInfo>;
|
|
3571
|
+
getQueueState(): Promise<QueueStateSnapshot>;
|
|
3572
|
+
getProcessors(): Promise<InspectorProcessorInfo[]>;
|
|
3573
|
+
getCatchUpStatus(): Promise<CatchUpStatus>;
|
|
3574
|
+
getStorageHealth(): Promise<InspectorStorageHealth>;
|
|
3575
|
+
/** Replays the whole document; read-only but expensive. */
|
|
3576
|
+
validateDocument(documentId: string, branch?: string): Promise<ValidationResult>;
|
|
3577
|
+
}
|
|
3578
|
+
/** The inspection levers. An action a host cannot perform is refused. */
|
|
3579
|
+
interface IInspectorAdmin {
|
|
3580
|
+
pauseQueue(): Promise<void>;
|
|
3581
|
+
resumeQueue(): Promise<void>;
|
|
3582
|
+
retryProcessor(processorId: string): Promise<void>;
|
|
3583
|
+
sweepCatchUp(): Promise<SweepResult[]>;
|
|
3584
|
+
rebuildKeyframes(documentId: string, branch?: string): Promise<RebuildResult>;
|
|
3585
|
+
rebuildSnapshots(documentId: string, branch?: string): Promise<RebuildResult>;
|
|
3586
|
+
}
|
|
3587
|
+
/** Raw SQL against the reactor's own store. */
|
|
3588
|
+
interface IReactorDbQuery {
|
|
3589
|
+
queryDb(sql: string, params?: unknown[]): Promise<unknown[]>;
|
|
3590
|
+
}
|
|
3591
|
+
/** Host-side setters for the facts a reactor learns after it is built. */
|
|
3592
|
+
interface IReactorFactsSink {
|
|
3593
|
+
setWorkflows(composed: boolean): void;
|
|
3594
|
+
}
|
|
3595
|
+
//#endregion
|
|
3596
|
+
//#region src/sync/sync-inspection.d.ts
|
|
3597
|
+
/** A remote's persisted cursor beside its channel's live watermark. */
|
|
3598
|
+
type RemoteCursorInfo = {
|
|
3599
|
+
cursorType: "inbox" | "outbox";
|
|
3600
|
+
cursorOrdinal: number;
|
|
3601
|
+
lastSyncedAtUtcMs?: number;
|
|
3602
|
+
liveAckOrdinal: number;
|
|
3603
|
+
liveLatestOrdinal: number;
|
|
3604
|
+
};
|
|
3605
|
+
type MailboxDepths = {
|
|
3606
|
+
inbox: number;
|
|
3607
|
+
outbox: number;
|
|
3608
|
+
deadLetter: number;
|
|
3609
|
+
};
|
|
3610
|
+
type RemoteConnectionHealth = {
|
|
3611
|
+
snapshot: ConnectionStateSnapshot;
|
|
3612
|
+
/** "connected" without one completed poll since boot. */
|
|
3613
|
+
neverSucceeded: boolean;
|
|
3614
|
+
/** Since the last successful poll; absent when there was none. */
|
|
3615
|
+
stalenessMs?: number;
|
|
3616
|
+
};
|
|
3617
|
+
type RemoteSyncInspection = {
|
|
3618
|
+
remoteName: string;
|
|
3619
|
+
remoteId: string;
|
|
3620
|
+
inboxCursor: RemoteCursorInfo;
|
|
3621
|
+
outboxCursor: RemoteCursorInfo;
|
|
3622
|
+
mailboxDepths: MailboxDepths;
|
|
3623
|
+
connection: RemoteConnectionHealth;
|
|
3624
|
+
};
|
|
3625
|
+
/** One page of dead letters, without the `next()` closure a clone cannot carry. */
|
|
3626
|
+
type DeadLetterPage = {
|
|
3627
|
+
remoteName: string;
|
|
3628
|
+
results: DeadLetterRecord[];
|
|
3629
|
+
nextCursor?: string;
|
|
3630
|
+
};
|
|
3631
|
+
/** Sync reads; the repair levers are `ISyncAdmin`. */
|
|
3632
|
+
interface ISyncInspector {
|
|
3633
|
+
inspectRemote(remoteName: string): Promise<RemoteSyncInspection>;
|
|
3634
|
+
inspectRemotes(): Promise<RemoteSyncInspection[]>;
|
|
3635
|
+
/** Newest first; limit clamps to [1, max per remote]; cursor is a row offset. */
|
|
3636
|
+
listDeadLetters(remoteName: string, cursor?: string, limit?: number): Promise<DeadLetterPage>;
|
|
3637
|
+
}
|
|
3638
|
+
declare function deriveConnectionHealth(snapshot: ConnectionStateSnapshot, nowMs?: number): RemoteConnectionHealth;
|
|
3639
|
+
//#endregion
|
|
3333
3640
|
//#region src/events/interfaces.d.ts
|
|
3334
3641
|
/**
|
|
3335
3642
|
* Describes an object that manages event subscriptions and emissions.
|
|
@@ -3709,6 +4016,11 @@ declare function isDriveAuthError(error: unknown): boolean;
|
|
|
3709
4016
|
declare class SyncRepairRefusedError extends Error {
|
|
3710
4017
|
constructor(message: string);
|
|
3711
4018
|
}
|
|
4019
|
+
/** A dead-letter page cursor that is not a row offset. */
|
|
4020
|
+
declare class InvalidDeadLetterCursorError extends Error {
|
|
4021
|
+
readonly cursor: string;
|
|
4022
|
+
constructor(cursor: string);
|
|
4023
|
+
}
|
|
3712
4024
|
declare class PollingChannelError extends Error {
|
|
3713
4025
|
constructor(message: string);
|
|
3714
4026
|
}
|
|
@@ -3766,7 +4078,9 @@ interface IMailbox {
|
|
|
3766
4078
|
/**
|
|
3767
4079
|
* The latest ordinal that has been acknowledged. Because acknowledged items
|
|
3768
4080
|
* are removed from the mailbox, this is the last ordinal that has been removed.
|
|
3769
|
-
*
|
|
4081
|
+
* Never at or past an item that is neither applied nor failed, unless the
|
|
4082
|
+
* mailbox opted out, and with holdAckBelowMarkers never at or past an
|
|
4083
|
+
* unapplied marker entry either.
|
|
3770
4084
|
*/
|
|
3771
4085
|
get ackOrdinal(): number;
|
|
3772
4086
|
/**
|
|
@@ -3780,8 +4094,6 @@ interface IMailbox {
|
|
|
3780
4094
|
get(id: string): SyncOperation | undefined;
|
|
3781
4095
|
add(...items: SyncOperation[]): void;
|
|
3782
4096
|
remove(...items: SyncOperation[]): void;
|
|
3783
|
-
/** Keeps ackOrdinal below an unapplied item until it is applied or removed. */
|
|
3784
|
-
hold?(item: SyncOperation): void;
|
|
3785
4097
|
onAdded(callback: MailboxCallback): void;
|
|
3786
4098
|
onRemoved(callback: MailboxCallback): void;
|
|
3787
4099
|
pause(): void;
|
|
@@ -3792,13 +4104,24 @@ interface IMailbox {
|
|
|
3792
4104
|
type MailboxOptions = {
|
|
3793
4105
|
/** An unapplied item carrying a purge marker keeps ackOrdinal below it. */
|
|
3794
4106
|
holdAckBelowMarkers?: boolean;
|
|
4107
|
+
/**
|
|
4108
|
+
* An item neither applied nor failed keeps ackOrdinal below it. Defaults to
|
|
4109
|
+
* true: items for different documents apply out of order, so the maximum
|
|
4110
|
+
* applied ordinal can pass one still loading. A failed item does not hold it;
|
|
4111
|
+
* its dead letter stands for it. Opt out only where no cursor reads the ack.
|
|
4112
|
+
*/
|
|
4113
|
+
holdAckBelowUnapplied?: boolean;
|
|
3795
4114
|
};
|
|
3796
4115
|
declare class Mailbox implements IMailbox {
|
|
3797
4116
|
private readonly holdAckBelowMarkers;
|
|
4117
|
+
private readonly holdAckBelowUnapplied;
|
|
3798
4118
|
private itemsMap;
|
|
3799
4119
|
/** Unapplied items carrying a marker, so the held ack reads only these. */
|
|
3800
4120
|
private readonly heldMarkers;
|
|
3801
|
-
|
|
4121
|
+
/** Lowest ordinal of each item neither applied nor failed, read once at add. */
|
|
4122
|
+
private readonly unapplied;
|
|
4123
|
+
/** Null when stale; a valid cache may be positive infinity. */
|
|
4124
|
+
private unappliedFloorCache;
|
|
3802
4125
|
private addedCallbacks;
|
|
3803
4126
|
private removedCallbacks;
|
|
3804
4127
|
private paused;
|
|
@@ -3812,7 +4135,6 @@ declare class Mailbox implements IMailbox {
|
|
|
3812
4135
|
get items(): ReadonlyArray<SyncOperation>;
|
|
3813
4136
|
get ackOrdinal(): number;
|
|
3814
4137
|
get latestOrdinal(): number;
|
|
3815
|
-
hold(item: SyncOperation): void;
|
|
3816
4138
|
get(id: string): SyncOperation | undefined;
|
|
3817
4139
|
add(...items: SyncOperation[]): void;
|
|
3818
4140
|
remove(...items: SyncOperation[]): void;
|
|
@@ -3822,6 +4144,9 @@ declare class Mailbox implements IMailbox {
|
|
|
3822
4144
|
resume(): void;
|
|
3823
4145
|
flush(): void;
|
|
3824
4146
|
isPaused(): boolean;
|
|
4147
|
+
/** Recomputed only once the item that set it has resolved. */
|
|
4148
|
+
private unappliedFloor;
|
|
4149
|
+
private forgetUnapplied;
|
|
3825
4150
|
}
|
|
3826
4151
|
//#endregion
|
|
3827
4152
|
//#region src/sync/sync-status-tracker.d.ts
|
|
@@ -3949,6 +4274,8 @@ type PeerManifestListener = (manifest: PeerManifest | null, undelivered?: readon
|
|
|
3949
4274
|
* their own factories that implement this interface.
|
|
3950
4275
|
*/
|
|
3951
4276
|
interface IChannelFactory {
|
|
4277
|
+
/** The `ChannelConfig.type`s this factory builds; absent when it does not say. */
|
|
4278
|
+
readonly channelTypes?: readonly string[];
|
|
3952
4279
|
/**
|
|
3953
4280
|
* Creates a new channel instance with the given configuration.
|
|
3954
4281
|
*
|
|
@@ -4089,6 +4416,8 @@ interface ISyncManager {
|
|
|
4089
4416
|
* @throws Error if the remote does not exist
|
|
4090
4417
|
*/
|
|
4091
4418
|
remove(name: string): Promise<void>;
|
|
4419
|
+
/** Settles once no reset of the remote is running or queued; never rejects. */
|
|
4420
|
+
resetSettled?(name: string): Promise<void>;
|
|
4092
4421
|
/**
|
|
4093
4422
|
* Lists all configured remotes.
|
|
4094
4423
|
*
|
|
@@ -5476,9 +5805,11 @@ interface IJobExecutor {
|
|
|
5476
5805
|
/**
|
|
5477
5806
|
* Execute a single job.
|
|
5478
5807
|
* @param job - The job to execute
|
|
5808
|
+
* @param onCommitting - Called in the same tick as the job's last abort
|
|
5809
|
+
* check, just before its COMMIT is issued; the signal must not abort after it
|
|
5479
5810
|
* @returns Promise that resolves to the job result
|
|
5480
5811
|
*/
|
|
5481
|
-
executeJob(job: Job, signal?: AbortSignal): Promise<JobResult>;
|
|
5812
|
+
executeJob(job: Job, signal?: AbortSignal, onCommitting?: () => void): Promise<JobResult>;
|
|
5482
5813
|
}
|
|
5483
5814
|
/**
|
|
5484
5815
|
* Interface for managing multiple job executors.
|
|
@@ -5828,6 +6159,119 @@ type ForwardingPoolInstrumentation = PoolInstrumentation & {
|
|
|
5828
6159
|
updateStats(stats: PoolStats): void;
|
|
5829
6160
|
};
|
|
5830
6161
|
//#endregion
|
|
6162
|
+
//#region src/storage/storage-health.d.ts
|
|
6163
|
+
type StorageHealth = {
|
|
6164
|
+
/** False once the store's session was poisoned; a host restart clears it. */
|
|
6165
|
+
healthy: boolean;
|
|
6166
|
+
};
|
|
6167
|
+
interface IStorageHealthProvider {
|
|
6168
|
+
getStorageHealth(): StorageHealth;
|
|
6169
|
+
}
|
|
6170
|
+
//#endregion
|
|
6171
|
+
//#region src/storage/kysely/pglite-dialect.d.ts
|
|
6172
|
+
/** Structural so importing this module does not pull in the PGlite wasm bundle. */
|
|
6173
|
+
type PGliteSession = {
|
|
6174
|
+
query: (sql: string, params?: unknown[]) => Promise<{
|
|
6175
|
+
rows: unknown[];
|
|
6176
|
+
affectedRows?: number;
|
|
6177
|
+
}>;
|
|
6178
|
+
/** Simple-query execution, used for the commit guard and session recovery. */
|
|
6179
|
+
exec: (sql: string) => Promise<unknown>;
|
|
6180
|
+
isInTransaction: () => boolean;
|
|
6181
|
+
/** Runs one statement once the session admits it; the dialect's deadlines start inside. */
|
|
6182
|
+
admit?: <T>(run: () => Promise<T>) => Promise<T>;
|
|
6183
|
+
};
|
|
6184
|
+
type HardenedPGliteDialectOptions = {
|
|
6185
|
+
/** Opt-in bound on waiting for the single PGlite lease; 0 (the default) waits indefinitely. */
|
|
6186
|
+
acquireTimeoutMs: number;
|
|
6187
|
+
/** Bound on a call that never settles (a dead wasm call); a long synchronous statement still finishes. 0 disables it. */
|
|
6188
|
+
statementTimeoutMs: number;
|
|
6189
|
+
/** The bound for {@link isLongRunningStatement} statements, whose runtime scales with the data. */
|
|
6190
|
+
longStatementTimeoutMs: number;
|
|
6191
|
+
/** Bound on each session recovery statement, which runs against the session that just failed. */
|
|
6192
|
+
recoveryTimeoutMs: number;
|
|
6193
|
+
/** Where unrecoverable session faults and swallowed rollbacks are reported. */
|
|
6194
|
+
onDiagnostic: (message: string, error?: unknown) => void;
|
|
6195
|
+
/** Called once, the first time the session is refused as unrecoverable; the owner should restart. */
|
|
6196
|
+
onPoisoned: (cause: Error) => void;
|
|
6197
|
+
};
|
|
6198
|
+
declare const DEFAULT_STATEMENT_TIMEOUT_MS = 120000;
|
|
6199
|
+
declare const DEFAULT_LONG_STATEMENT_TIMEOUT_MS = 900000;
|
|
6200
|
+
declare const DEFAULT_RECOVERY_TIMEOUT_MS = 15000;
|
|
6201
|
+
/** Maintenance and DDL, matched on the leading keyword of the compiled SQL. */
|
|
6202
|
+
declare function isLongRunningStatement(statement: string): boolean;
|
|
6203
|
+
type IntrospectedDatabase = Parameters<Dialect["createIntrospector"]>[0];
|
|
6204
|
+
declare class PGliteSessionError extends Error {
|
|
6205
|
+
readonly cause?: unknown;
|
|
6206
|
+
constructor(message: string, cause?: unknown);
|
|
6207
|
+
}
|
|
6208
|
+
declare class PGliteAcquireTimeoutError extends PGliteSessionError {
|
|
6209
|
+
constructor(timeoutMs: number);
|
|
6210
|
+
}
|
|
6211
|
+
/** The call cannot be aborted, so it is abandoned and the session treated as poisoned. */
|
|
6212
|
+
declare class PGliteStatementTimeoutError extends PGliteSessionError {
|
|
6213
|
+
constructor(timeoutMs: number, statement: string);
|
|
6214
|
+
}
|
|
6215
|
+
declare class PGliteAbortedTransactionError extends PGliteSessionError {
|
|
6216
|
+
constructor(cause: unknown);
|
|
6217
|
+
}
|
|
6218
|
+
/** No statement can clear the session (e.g. a stuck active portal). */
|
|
6219
|
+
declare class PGliteSessionPoisonedError extends PGliteSessionError {
|
|
6220
|
+
constructor(cause: unknown);
|
|
6221
|
+
}
|
|
6222
|
+
/** `kysely-pglite-dialect` hardened for one shared session that a fault must not brick. */
|
|
6223
|
+
declare class HardenedPGliteDialect implements Dialect {
|
|
6224
|
+
private readonly client;
|
|
6225
|
+
private readonly inner;
|
|
6226
|
+
private readonly options;
|
|
6227
|
+
constructor(client: PGliteSession, options?: Partial<HardenedPGliteDialectOptions>);
|
|
6228
|
+
createAdapter(): DialectAdapter;
|
|
6229
|
+
createDriver(): Driver;
|
|
6230
|
+
createQueryCompiler(): QueryCompiler;
|
|
6231
|
+
createIntrospector(db: IntrospectedDatabase): DatabaseIntrospector;
|
|
6232
|
+
}
|
|
6233
|
+
/** Raw SQL through the dialect's queue, instead of into whatever transaction holds the session. */
|
|
6234
|
+
declare function queryThroughDialect<DB>(db: Kysely<DB>, sql: string, params?: unknown[]): Promise<unknown[]>;
|
|
6235
|
+
//#endregion
|
|
6236
|
+
//#region src/storage/kysely/group-commit-pglite-client.d.ts
|
|
6237
|
+
/** A PGlite instance; PGlite awaits `syncToFs` after each statement. */
|
|
6238
|
+
type GroupCommitPGliteInstance = PGliteSession & {
|
|
6239
|
+
close: () => Promise<void>;
|
|
6240
|
+
syncToFs: () => Promise<void>;
|
|
6241
|
+
};
|
|
6242
|
+
type GroupCommitPGliteClientOptions = {
|
|
6243
|
+
onDiagnostic: (message: string, error?: unknown) => void;
|
|
6244
|
+
/** The sync hung or kept failing: the session is poisoned. */
|
|
6245
|
+
onSyncStuck: (cause: Error) => void;
|
|
6246
|
+
/** A sync that hangs past this poisons the session; 0 disables. */
|
|
6247
|
+
flushSyncTimeoutMs: number;
|
|
6248
|
+
/** Consecutive failed syncs before the session is poisoned. */
|
|
6249
|
+
maxConsecutiveSyncFailures: number;
|
|
6250
|
+
/** Bounds the closing flush and the instance close; 0 disables. */
|
|
6251
|
+
closeTimeoutMs: number;
|
|
6252
|
+
};
|
|
6253
|
+
/** The filesystem sync never settled. */
|
|
6254
|
+
declare class PGliteFlushSyncTimeoutError extends Error {
|
|
6255
|
+
constructor(timeoutMs: number);
|
|
6256
|
+
}
|
|
6257
|
+
//#endregion
|
|
6258
|
+
//#region src/storage/kysely/group-commit-storage.d.ts
|
|
6259
|
+
type GroupCommitPGliteOptions = {
|
|
6260
|
+
/** Opened without `relaxedDurability`, or the flush is no barrier at all. */
|
|
6261
|
+
pg: GroupCommitPGliteInstance;
|
|
6262
|
+
/** Poisoned: unflushed writes and positions built on them are void; restart. */
|
|
6263
|
+
onUnrecoverable: (cause: Error) => void;
|
|
6264
|
+
onDiagnostic?: (message: string, error?: unknown) => void;
|
|
6265
|
+
dialect?: Partial<Pick<HardenedPGliteDialectOptions, "acquireTimeoutMs" | "statementTimeoutMs" | "longStatementTimeoutMs" | "recoveryTimeoutMs">>;
|
|
6266
|
+
client?: Partial<Pick<GroupCommitPGliteClientOptions, "flushSyncTimeoutMs" | "maxConsecutiveSyncFailures" | "closeTimeoutMs">>;
|
|
6267
|
+
};
|
|
6268
|
+
/** What a host keeps of the group-commit store once the reactor is built. */
|
|
6269
|
+
interface IGroupCommitStorage {
|
|
6270
|
+
readonly health: IStorageHealthProvider;
|
|
6271
|
+
/** Flushes, then closes the instance; bounded. */
|
|
6272
|
+
close(): Promise<void>;
|
|
6273
|
+
}
|
|
6274
|
+
//#endregion
|
|
5831
6275
|
//#region src/core/types.d.ts
|
|
5832
6276
|
/**
|
|
5833
6277
|
* A single mutation job within a batch request.
|
|
@@ -6140,6 +6584,8 @@ interface SyncModule {
|
|
|
6140
6584
|
syncManager: ISyncManager;
|
|
6141
6585
|
/** Absent where the host cannot reach the sync manager's repair levers. */
|
|
6142
6586
|
syncAdmin?: ISyncAdmin;
|
|
6587
|
+
/** Absent where the host cannot read the sync manager's channel state. */
|
|
6588
|
+
syncInspector?: ISyncInspector;
|
|
6143
6589
|
}
|
|
6144
6590
|
/**
|
|
6145
6591
|
* Sync module composed in-process, with the full set of sync dependencies.
|
|
@@ -6230,6 +6676,10 @@ interface InProcessReactorModule extends ReactorModule {
|
|
|
6230
6676
|
settledWatermark: ISettledWatermark;
|
|
6231
6677
|
/** Enqueues purge jobs; the erasure scheduler is its only caller. */
|
|
6232
6678
|
documentPurgeService: DocumentPurgeService;
|
|
6679
|
+
/** What the builder knows about the store; see `withStorageFacts`. */
|
|
6680
|
+
storageFacts: ReactorStorageFacts;
|
|
6681
|
+
/** Set by `withGroupCommitPGlite`; the host closes the store through it. */
|
|
6682
|
+
groupCommitStorage?: IGroupCommitStorage;
|
|
6233
6683
|
}
|
|
6234
6684
|
/**
|
|
6235
6685
|
* Base reactor client contract — the client plus its reactor module. Satisfied
|
|
@@ -6378,6 +6828,6 @@ declare class DocumentModelRegistry implements IDocumentModelRegistry {
|
|
|
6378
6828
|
getUpgradeReducer(documentType: string, fromVersion: number, toVersion: number): UpgradeReducer<any, any>;
|
|
6379
6829
|
}
|
|
6380
6830
|
//#endregion
|
|
6381
|
-
export {
|
|
6831
|
+
export { DEFAULT_READ_MODEL_YIELD_DEADLINE_MS as $, SyncPendingEvent as $a, AtomicTxn as $i, QueueStateSnapshot as $n, ModelLoadedMessage as $r, PeerManifestListener as $t, PGliteFlushSyncTimeoutError as A, ConnectionState as Aa, IDocumentModelLoader as Ai, DeadLetterPage as An, SubmittedActionResult as Ao, Unsubscribe as Ar, CreateDocumentOptions as At, PGliteSessionPoisonedError as B, RemoteOptions as Ba, IDocumentMetaCache as Bi, IInspectorAdmin as Bn, AbortMessage as Br, DecisionTarget as Bt, ReactorClientModule as C, SyncHoldRecord as Ca, KyselyDocumentPurger as Ci, IJobAwaiter as Cn, JobStatus as Co, ReactorEventTypes as Cr, RegisteredDecisionModel as Ct, GroupCommitPGliteOptions as D, ChannelHealth as Da, KyselyOperationStore as Di, IQueue as Dn, RelationshipChangeType as Do, ReadModelStage as Dr, documentDecisionModel as Dt, SyncModule as E, ChannelErrorSource as Ea, KyselyKeyframeStore as Ei, EnqueuePurgeOptions as En, PropagationMode as Eo, ReadModelIndexingStage as Er, DocumentDecisionModel as Et, HardenedPGliteDialectOptions as F, LocalPeer as Fa, Database$1 as Fi, RemoteSyncInspection as Fn, SnapshotValidationIssue as Fo, SignatureTrustPolicy as Fr, ProtocolSelection as Ft, StorageHealth as G, SyncEnvelope as Ga, CachedSnapshot as Gi, InspectorAttachmentInfo as Gn, FactorySpec as Gr, IPeerAgreement as Gt, isLongRunningStatement as H, RemotePersistence as Ha, DriveCollectionId as Hi, IReactorDbQuery as Hn, DocumentModelSpec as Hr, IStreamStateReader as Ht, PGliteAbortedTransactionError as I, PollBehavior as Ia, DocumentIndexerDatabase as Ii, deriveConnectionHealth as In, StreamOrderIssue as Io, SignatureVerdict as Ir, UpgradeDocumentOptions as It, PoolStats as J, SyncFailedEvent as Ja, WriteCacheConfig as Ji, InspectorDriveIntegrity as Jn, JobWriteReadyPayload as Jr, ConnectionStateChangeCallback as Jt, ForwardingPoolInstrumentation as K, SyncEnvelopeType as Ka, DocumentStreamKey as Ki, InspectorDocumentModelInfo as Kn, HeartbeatMessage as Kr, PeerAgreementBasis as Kt, PGliteAcquireTimeoutError as L, PurgeLookup as La, DocumentPurgeRow as Li, IInspectableAttachmentStore as Ln, ValidationResult as Lo, SignatureVerificationHandler as Lr, BuiltDecisionModel as Lt, DEFAULT_RECOVERY_TIMEOUT_MS as M, ConnectionStateSnapshot as Ma, DocumentModelSource as Mi, MailboxDepths as Mn, IDocumentIntegrityService as Mo, SIGNATURE_REFUSAL_CODES as Mr, DocumentChangeType as Mt, DEFAULT_STATEMENT_TIMEOUT_MS as N, DeadLetterAddedEvent as Na, FileModelSource as Ni, RemoteConnectionHealth as Nn, KeyframeValidationIssue as No, SignatureRefusalCode as Nr, IDriveClient as Nt, IGroupCommitStorage as O, ChannelMeta as Oa, KyselyWriteCache as Oi, IJobTracker as On, SearchFilter as Oo, SignatureRefusedEvent as Or, ActionCandidate as Ot, HardenedPGliteDialect as P, JwtHandler as Pa, PackageModelSource as Pi, RemoteCursorInfo as Pn, RebuildResult as Po, SignatureScheme as Pr, IReactorClient as Pt, DEFAULT_COMMIT_CHUNK_SIZE as Q, SyncOperationStatus as Qa, AppendConditionStream as Qi, InspectorStorageHealth as Qn, ModelLoadFailedMessage as Qr, ISyncManager as Qt, PGliteSession as R, RemoteCursor as Ra, OperationTable as Ri, IInspectableQueue as Rn, OutOfOrderPair as Ro, SignatureVerificationMode as Rr, DecisionContext as Rt, LoadJobPlan as S, RevisionMismatchError as Sa, DEFAULT_PURGE_DELETE_BATCH as Si, SubscriptionErrorContext as Sn, JobResultSummary as So, PurgeMarkerContext as Sr, AdmissionDecision as St, ReactorModule as T, ChannelConfig as Ta, appliedDelete as Ti, DocumentPurgeService as Tn, PagingOptions as To, ReadModelIndexedEvent as Tr, selectDecisionModel as Tt, queryThroughDialect as U, RemoteRecord as Ua, IOperationIndex as Ui, IReactorFactsSink as Un, ErrorInfo as Ur, Projection as Ut, PGliteStatementTimeoutError as V, RemotePeer as Va, ICollectionMembershipCache as Vi, IInspectorStorageHealthProvider as Vn, DbConfig as Vr, Evaluation as Vt, IStorageHealthProvider as W, RemoteStatus as Wa, OperationIndexEntry as Wi, InspectorAccess as Wn, ExecuteMessage as Wr, StreamQuery as Wt, BaseReadModel as X, SyncHold as Xa, AppendCondition as Xi, InspectorDrivePage as Xn, LogMessage as Xr, IChannelFactory as Xt, instrumentPgPool as Y, SyncHeldEvent as Ya, APPEND_CONDITION_FAILED_PREFIX as Yi, InspectorDriveIntegrityRef as Yn, LoadModelMessage as Yr, IChannel as Yt, BaseReadModelConfig as Z, SyncOperationErrorType as Za, AppendConditionFailedError as Zi, InspectorProcessorInfo as Zn, MetricsMessage as Zr, ISyncAdmin as Zt, ExecutionJobPlan as _, ISyncRemoteStorage as _a, JobResult as _i, isDriveAuthError as _n, ConsistencyKey as _o, JobPendingEvent as _r, ModelReadGate as _t, ModelNotWorkerImportableError as a, DocumentRevisions as aa, SanitizedArg as ai, SyncStatusTracker as an, IReadModelCoordinator as ao, CatchUpStatus as ar, InsertableDocumentSnapshot as at, InProcessReactorModule as b, PurgeRefusalRecord as ba, IExecutionScope as bi, IReactorSubscriptionManager as bn, JobInfo as bo, JobWriteReadyEvent as br, SubjectScopePredicate as bt, DocumentModelResolver as c, IDocumentIndexer as ca, WorkerPoolConfig as ci, SyncOperation as cn, IJobExecutionHandle as co, ICatchUpConsumer as cr, makeConsistencyKey as ct, BatchExecutionRequest as d, IOperationStore as da, ExecutorStartedEvent as di, DRIVE_AUTH_ERROR_MESSAGES as dn, JobKind as do, SweepResult as dr, IJobExecutorManager as dt, DeadLetterRecord as ea, ModelManifestEntry as ei, Remote as en, SyncPurgeRefusedEvent as eo, ReactorInfo as er, PurgeFence as et, BatchExecutionResult as f, ISyncCursorStorage as fa, ExecutorStoppedEvent as fi, DriveRequestError as fn, JobRoutingMeta as fo, WatermarkStatus as fr, ActionEvaluationConfig as ft, DegradedComponent as g, ISyncReceivedMarkerStorage as ga, JobFailedEvent$1 as gi, SyncRepairRefusedError as gn, ConsistencyCoordinate as go, JobFailedEvent as gr, IReadGate as gt, Database as h, ISyncPurgeRefusalStorage as ha, JobExecutorEventTypes as hi, RECOVERABLE_GRAPHQL_ERROR_CODES as hn, RetryAccounting as ho, EventBusAggregateError as hr, BareReadGate as ht, InvalidModuleError as i, DocumentRelationship as ia, ResultMessage as ii, SyncStatusChangeCallback as in, IReadModel as io, CatchUpConsumerStatus as ir, DocumentViewDatabase as it, DEFAULT_LONG_STATEMENT_TIMEOUT_MS as j, ConnectionStateChangedEvent as ja, IDocumentModelRegistry as ji, ISyncInspector as jn, ViewFilter$1 as jo, AdmissionPath as jr, DocumentChangeEvent as jt, GroupCommitPGliteInstance as k, ChannelScheme as ka, IWriteCache as ki, IEventBus as kn, ShutdownStatus as ko, Subscriber as kr, ActionEvaluations as kt, IDocumentModelResolver as l, IDocumentView as la, DEFAULT_MAX_PURGE_OPERATIONS as li, SyncOperationAggregateError as ln, Job as lo, ISettledWatermark as lr, IExecutorWorker as lt, BatchLoadResult as m, ISyncHoldStorage as ma, JobExecutorConfig as mi, PollingChannelError as mn, QueueEventTypes as mo, CatchUpSweptEvent as mr, ALWAYS_READABLE_SCOPES as mt, DuplicateManifestError as n, DocumentExistence as na, ParentMessage as ni, ISyncStatusTracker as nn, SyncSucceededEvent as no, StoragePersistence as nr, defaultReadModelIndexingConfig as nt, ModuleNotFoundError as o, DuplicateOperationError as oa, ShutdownMessage as oi, IMailbox as on, ReadModelRegistrationStage as oo, CatchUpThread as or, ConsistencyTracker as ot, BatchLoadRequest as p, ISyncDeadLetterStorage as pa, JobCompletedEvent as pi, InvalidDeadLetterCursorError as pn, PurgeJobOptions as po, defaultCatchUpConfig as pr, ReactorClient as pt, PoolInstrumentation as q, SyncEventTypes as qa, KeyframeSnapshot as qi, InspectorDriveInfo as qn, InitMessage as qr, createPeerAgreement as qt, DuplicateModuleError as r, DocumentGraphEdge as ra, ReadyMessage as ri, SyncStatus as rn, ILiveReadModelCoordinator as ro, CatchUpConfig as rr, unchunkedReadModelIndexingConfig as rt, loadDocumentModelSpec as s, IDocumentGraph as sa, WorkerMessage as si, Mailbox as sn, supportsLiveReadModelRegistration as so, ICatchUp as sr, IConsistencyTracker as st, DocumentModelRegistry as t, DocumentAlreadyExistsError as ta, ModuleRef as ti, RemoteMeta as tn, SyncReleasedEvent as to, ReactorStorageFacts as tr, ReadModelIndexingConfig as tt, NullDocumentModelResolver as u, IKeyframeStore as ua, ExecutorManagerStatus as ui, ChannelError as un, JobAvailableEvent as uo, SweepBlockedAt as ur, IJobExecutor as ut, IReactor as v, OperationFilter as va, JobStartedEvent as vi, isRecoverableGraphQLError as vn, ConsistencyToken as vo, JobReadReadyEvent as vr, ReadGateOptions as vt, ReactorFeatures as w, ViewFilter as wa, PurgeStream as wi, JobAwaiter as wn, PagedResults as wo, ReadModelBatchCompletedEvent as wr, decideAtHead as wt, InProcessSyncModule as x, ReceivedMarkerRecord as xa, CollectionMember as xi, ISubscriptionErrorHandler as xn, JobMeta as xo, ModelLoadedEvent as xr, readDecisionModel as xt, InProcessReactorClientModule as y, OptimisticLockError as ya, ReactorFeatureFlags as yi, DocumentDeletedInfo as yn, ErrorInfo$1 as yo, JobRunningEvent as yr, SeededStateReader as yt, PGliteSessionError as z, RemoteFilter as za, PurgeRemovedRows as zi, IInspector as zn, firstOutOfOrderPair as zo, SignerConfig as zr, DecisionModel as zt };
|
|
6382
6832
|
export {};
|
|
6383
|
-
//# sourceMappingURL=index-
|
|
6833
|
+
//# sourceMappingURL=index-dDm0fUBT.d.ts.map
|