@powerhousedao/reactor 6.0.0-dev.105 → 6.0.0-dev.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4306 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9433 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -18
- package/dist/src/actions/index.d.ts +0 -24
- package/dist/src/actions/index.d.ts.map +0 -1
- package/dist/src/admin/document-integrity-service.d.ts +0 -17
- package/dist/src/admin/document-integrity-service.d.ts.map +0 -1
- package/dist/src/admin/types.d.ts +0 -30
- package/dist/src/admin/types.d.ts.map +0 -1
- package/dist/src/cache/buffer/ring-buffer.d.ts +0 -37
- package/dist/src/cache/buffer/ring-buffer.d.ts.map +0 -1
- package/dist/src/cache/collection-membership-cache.d.ts +0 -14
- package/dist/src/cache/collection-membership-cache.d.ts.map +0 -1
- package/dist/src/cache/document-meta-cache-types.d.ts +0 -114
- package/dist/src/cache/document-meta-cache-types.d.ts.map +0 -1
- package/dist/src/cache/document-meta-cache.d.ts +0 -31
- package/dist/src/cache/document-meta-cache.d.ts.map +0 -1
- package/dist/src/cache/index.d.ts +0 -3
- package/dist/src/cache/index.d.ts.map +0 -1
- package/dist/src/cache/kysely-operation-index.d.ts +0 -24
- package/dist/src/cache/kysely-operation-index.d.ts.map +0 -1
- package/dist/src/cache/kysely-write-cache.d.ts +0 -142
- package/dist/src/cache/kysely-write-cache.d.ts.map +0 -1
- package/dist/src/cache/lru/lru-tracker.d.ts +0 -15
- package/dist/src/cache/lru/lru-tracker.d.ts.map +0 -1
- package/dist/src/cache/operation-index-types.d.ts +0 -64
- package/dist/src/cache/operation-index-types.d.ts.map +0 -1
- package/dist/src/cache/write/interfaces.d.ts +0 -88
- package/dist/src/cache/write/interfaces.d.ts.map +0 -1
- package/dist/src/cache/write-cache-types.d.ts +0 -42
- package/dist/src/cache/write-cache-types.d.ts.map +0 -1
- package/dist/src/client/reactor-client.d.ts +0 -121
- package/dist/src/client/reactor-client.d.ts.map +0 -1
- package/dist/src/client/types.d.ts +0 -260
- package/dist/src/client/types.d.ts.map +0 -1
- package/dist/src/core/reactor-builder.d.ts +0 -60
- package/dist/src/core/reactor-builder.d.ts.map +0 -1
- package/dist/src/core/reactor-client-builder.d.ts +0 -53
- package/dist/src/core/reactor-client-builder.d.ts.map +0 -1
- package/dist/src/core/reactor.d.ts +0 -56
- package/dist/src/core/reactor.d.ts.map +0 -1
- package/dist/src/core/types.d.ts +0 -312
- package/dist/src/core/types.d.ts.map +0 -1
- package/dist/src/core/utils.d.ts +0 -95
- package/dist/src/core/utils.d.ts.map +0 -1
- package/dist/src/events/event-bus.d.ts +0 -8
- package/dist/src/events/event-bus.d.ts.map +0 -1
- package/dist/src/events/interfaces.d.ts +0 -27
- package/dist/src/events/interfaces.d.ts.map +0 -1
- package/dist/src/events/types.d.ts +0 -92
- package/dist/src/events/types.d.ts.map +0 -1
- package/dist/src/executor/document-action-handler.d.ts +0 -30
- package/dist/src/executor/document-action-handler.d.ts.map +0 -1
- package/dist/src/executor/execution-scope.d.ts +0 -44
- package/dist/src/executor/execution-scope.d.ts.map +0 -1
- package/dist/src/executor/interfaces.d.ts +0 -49
- package/dist/src/executor/interfaces.d.ts.map +0 -1
- package/dist/src/executor/signature-verifier.d.ts +0 -9
- package/dist/src/executor/signature-verifier.d.ts.map +0 -1
- package/dist/src/executor/simple-job-executor-manager.d.ts +0 -40
- package/dist/src/executor/simple-job-executor-manager.d.ts.map +0 -1
- package/dist/src/executor/simple-job-executor.d.ts +0 -42
- package/dist/src/executor/simple-job-executor.d.ts.map +0 -1
- package/dist/src/executor/types.d.ts +0 -91
- package/dist/src/executor/types.d.ts.map +0 -1
- package/dist/src/executor/util.d.ts +0 -84
- package/dist/src/executor/util.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -56
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -20714
- package/dist/src/job-tracker/in-memory-job-tracker.d.ts +0 -26
- package/dist/src/job-tracker/in-memory-job-tracker.d.ts.map +0 -1
- package/dist/src/job-tracker/index.d.ts +0 -3
- package/dist/src/job-tracker/index.d.ts.map +0 -1
- package/dist/src/job-tracker/interfaces.d.ts +0 -41
- package/dist/src/job-tracker/interfaces.d.ts.map +0 -1
- package/dist/src/logging/console.d.ts +0 -2
- package/dist/src/logging/console.d.ts.map +0 -1
- package/dist/src/logging/types.d.ts +0 -2
- package/dist/src/logging/types.d.ts.map +0 -1
- package/dist/src/processors/index.d.ts +0 -2
- package/dist/src/processors/index.d.ts.map +0 -1
- package/dist/src/processors/processor-manager.d.ts +0 -51
- package/dist/src/processors/processor-manager.d.ts.map +0 -1
- package/dist/src/processors/utils.d.ts +0 -11
- package/dist/src/processors/utils.d.ts.map +0 -1
- package/dist/src/queue/interfaces.d.ts +0 -103
- package/dist/src/queue/interfaces.d.ts.map +0 -1
- package/dist/src/queue/job-execution-handle.d.ts +0 -28
- package/dist/src/queue/job-execution-handle.d.ts.map +0 -1
- package/dist/src/queue/queue.d.ts +0 -110
- package/dist/src/queue/queue.d.ts.map +0 -1
- package/dist/src/queue/types.d.ts +0 -74
- package/dist/src/queue/types.d.ts.map +0 -1
- package/dist/src/read-models/base-read-model.d.ts +0 -62
- package/dist/src/read-models/base-read-model.d.ts.map +0 -1
- package/dist/src/read-models/coordinator.d.ts +0 -39
- package/dist/src/read-models/coordinator.d.ts.map +0 -1
- package/dist/src/read-models/document-view.d.ts +0 -27
- package/dist/src/read-models/document-view.d.ts.map +0 -1
- package/dist/src/read-models/interfaces.d.ts +0 -29
- package/dist/src/read-models/interfaces.d.ts.map +0 -1
- package/dist/src/read-models/types.d.ts +0 -63
- package/dist/src/read-models/types.d.ts.map +0 -1
- package/dist/src/registry/document-model-resolver.d.ts +0 -29
- package/dist/src/registry/document-model-resolver.d.ts.map +0 -1
- package/dist/src/registry/implementation.d.ts +0 -74
- package/dist/src/registry/implementation.d.ts.map +0 -1
- package/dist/src/registry/index.d.ts +0 -5
- package/dist/src/registry/index.d.ts.map +0 -1
- package/dist/src/registry/interfaces.d.ts +0 -108
- package/dist/src/registry/interfaces.d.ts.map +0 -1
- package/dist/src/shared/awaiter.d.ts +0 -35
- package/dist/src/shared/awaiter.d.ts.map +0 -1
- package/dist/src/shared/collect-all-pages.d.ts +0 -7
- package/dist/src/shared/collect-all-pages.d.ts.map +0 -1
- package/dist/src/shared/consistency-tracker.d.ts +0 -48
- package/dist/src/shared/consistency-tracker.d.ts.map +0 -1
- package/dist/src/shared/drive-url.d.ts +0 -15
- package/dist/src/shared/drive-url.d.ts.map +0 -1
- package/dist/src/shared/errors.d.ts +0 -50
- package/dist/src/shared/errors.d.ts.map +0 -1
- package/dist/src/shared/factories.d.ts +0 -20
- package/dist/src/shared/factories.d.ts.map +0 -1
- package/dist/src/shared/types.d.ts +0 -161
- package/dist/src/shared/types.d.ts.map +0 -1
- package/dist/src/shared/utils.d.ts +0 -3
- package/dist/src/shared/utils.d.ts.map +0 -1
- package/dist/src/signer/passthrough-signer.d.ts +0 -12
- package/dist/src/signer/passthrough-signer.d.ts.map +0 -1
- package/dist/src/signer/types.d.ts +0 -17
- package/dist/src/signer/types.d.ts.map +0 -1
- package/dist/src/storage/index.d.ts +0 -4
- package/dist/src/storage/index.d.ts.map +0 -1
- package/dist/src/storage/interfaces.d.ts +0 -574
- package/dist/src/storage/interfaces.d.ts.map +0 -1
- package/dist/src/storage/kysely/document-indexer.d.ts +0 -27
- package/dist/src/storage/kysely/document-indexer.d.ts.map +0 -1
- package/dist/src/storage/kysely/keyframe-store.d.ts +0 -24
- package/dist/src/storage/kysely/keyframe-store.d.ts.map +0 -1
- package/dist/src/storage/kysely/store.d.ts +0 -21
- package/dist/src/storage/kysely/store.d.ts.map +0 -1
- package/dist/src/storage/kysely/sync-cursor-storage.d.ts +0 -13
- package/dist/src/storage/kysely/sync-cursor-storage.d.ts.map +0 -1
- package/dist/src/storage/kysely/sync-dead-letter-storage.d.ts +0 -18
- package/dist/src/storage/kysely/sync-dead-letter-storage.d.ts.map +0 -1
- package/dist/src/storage/kysely/sync-remote-storage.d.ts +0 -13
- package/dist/src/storage/kysely/sync-remote-storage.d.ts.map +0 -1
- package/dist/src/storage/kysely/types.d.ts +0 -157
- package/dist/src/storage/kysely/types.d.ts.map +0 -1
- package/dist/src/storage/migrations/001_create_operation_table.d.ts +0 -3
- package/dist/src/storage/migrations/001_create_operation_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/002_create_keyframe_table.d.ts +0 -3
- package/dist/src/storage/migrations/002_create_keyframe_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/003_create_document_table.d.ts +0 -3
- package/dist/src/storage/migrations/003_create_document_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts +0 -3
- package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts +0 -3
- package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts +0 -3
- package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts +0 -3
- package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/008_create_view_state_table.d.ts +0 -3
- package/dist/src/storage/migrations/008_create_view_state_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts +0 -3
- package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts.map +0 -1
- package/dist/src/storage/migrations/010_create_sync_tables.d.ts +0 -3
- package/dist/src/storage/migrations/010_create_sync_tables.d.ts.map +0 -1
- package/dist/src/storage/migrations/011_add_cursor_type_column.d.ts +0 -3
- package/dist/src/storage/migrations/011_add_cursor_type_column.d.ts.map +0 -1
- package/dist/src/storage/migrations/012_add_source_remote_column.d.ts +0 -3
- package/dist/src/storage/migrations/012_add_source_remote_column.d.ts.map +0 -1
- package/dist/src/storage/migrations/013_create_sync_dead_letters_table.d.ts +0 -3
- package/dist/src/storage/migrations/013_create_sync_dead_letters_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/014_create_processor_cursor_table.d.ts +0 -3
- package/dist/src/storage/migrations/014_create_processor_cursor_table.d.ts.map +0 -1
- package/dist/src/storage/migrations/index.d.ts +0 -3
- package/dist/src/storage/migrations/index.d.ts.map +0 -1
- package/dist/src/storage/migrations/migrator.d.ts +0 -6
- package/dist/src/storage/migrations/migrator.d.ts.map +0 -1
- package/dist/src/storage/migrations/run-migrations.d.ts +0 -2
- package/dist/src/storage/migrations/run-migrations.d.ts.map +0 -1
- package/dist/src/storage/migrations/types.d.ts +0 -9
- package/dist/src/storage/migrations/types.d.ts.map +0 -1
- package/dist/src/storage/txn.d.ts +0 -15
- package/dist/src/storage/txn.d.ts.map +0 -1
- package/dist/src/subs/default-error-handler.d.ts +0 -13
- package/dist/src/subs/default-error-handler.d.ts.map +0 -1
- package/dist/src/subs/react-subscription-manager.d.ts +0 -45
- package/dist/src/subs/react-subscription-manager.d.ts.map +0 -1
- package/dist/src/subs/subscription-notification-read-model.d.ts +0 -18
- package/dist/src/subs/subscription-notification-read-model.d.ts.map +0 -1
- package/dist/src/subs/types.d.ts +0 -64
- package/dist/src/subs/types.d.ts.map +0 -1
- package/dist/src/sync/batch-aggregator.d.ts +0 -25
- package/dist/src/sync/batch-aggregator.d.ts.map +0 -1
- package/dist/src/sync/buffered-mailbox.d.ts +0 -37
- package/dist/src/sync/buffered-mailbox.d.ts.map +0 -1
- package/dist/src/sync/channels/gql-req-channel.d.ts +0 -133
- package/dist/src/sync/channels/gql-req-channel.d.ts.map +0 -1
- package/dist/src/sync/channels/gql-request-channel-factory.d.ts +0 -32
- package/dist/src/sync/channels/gql-request-channel-factory.d.ts.map +0 -1
- package/dist/src/sync/channels/gql-res-channel.d.ts +0 -31
- package/dist/src/sync/channels/gql-res-channel.d.ts.map +0 -1
- package/dist/src/sync/channels/gql-response-channel-factory.d.ts +0 -13
- package/dist/src/sync/channels/gql-response-channel-factory.d.ts.map +0 -1
- package/dist/src/sync/channels/index.d.ts +0 -8
- package/dist/src/sync/channels/index.d.ts.map +0 -1
- package/dist/src/sync/channels/interval-poll-timer.d.ts +0 -40
- package/dist/src/sync/channels/interval-poll-timer.d.ts.map +0 -1
- package/dist/src/sync/channels/poll-timer.d.ts +0 -14
- package/dist/src/sync/channels/poll-timer.d.ts.map +0 -1
- package/dist/src/sync/channels/utils.d.ts +0 -44
- package/dist/src/sync/channels/utils.d.ts.map +0 -1
- package/dist/src/sync/errors.d.ts +0 -16
- package/dist/src/sync/errors.d.ts.map +0 -1
- package/dist/src/sync/index.d.ts +0 -16
- package/dist/src/sync/index.d.ts.map +0 -1
- package/dist/src/sync/interfaces.d.ts +0 -203
- package/dist/src/sync/interfaces.d.ts.map +0 -1
- package/dist/src/sync/mailbox.d.ts +0 -62
- package/dist/src/sync/mailbox.d.ts.map +0 -1
- package/dist/src/sync/sync-awaiter.d.ts +0 -34
- package/dist/src/sync/sync-awaiter.d.ts.map +0 -1
- package/dist/src/sync/sync-builder.d.ts +0 -23
- package/dist/src/sync/sync-builder.d.ts.map +0 -1
- package/dist/src/sync/sync-manager.d.ts +0 -51
- package/dist/src/sync/sync-manager.d.ts.map +0 -1
- package/dist/src/sync/sync-operation.d.ts +0 -30
- package/dist/src/sync/sync-operation.d.ts.map +0 -1
- package/dist/src/sync/sync-status-tracker.d.ts +0 -31
- package/dist/src/sync/sync-status-tracker.d.ts.map +0 -1
- package/dist/src/sync/types.d.ts +0 -165
- package/dist/src/sync/types.d.ts.map +0 -1
- package/dist/src/sync/utils.d.ts +0 -71
- package/dist/src/sync/utils.d.ts.map +0 -1
- package/dist/src/utils/reshuffle.d.ts +0 -47
- package/dist/src/utils/reshuffle.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/reactor",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.106",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/powerhouse-inc/powerhouse",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./dist/
|
|
13
|
-
"import": "./dist/
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"
|
|
17
|
+
"dist"
|
|
18
18
|
],
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
@@ -22,30 +22,28 @@
|
|
|
22
22
|
"keywords": [],
|
|
23
23
|
"author": "",
|
|
24
24
|
"license": "AGPL-3.0-only",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"uuid": "^11.0.5",
|
|
27
27
|
"kysely": "0.28.11",
|
|
28
28
|
"kysely-pglite-dialect": "1.2.0",
|
|
29
|
-
"
|
|
29
|
+
"@electric-sql/pglite": "0.3.15",
|
|
30
|
+
"@sindresorhus/fnv1a": "3.1.0",
|
|
31
|
+
"@powerhousedao/shared": "6.0.0-dev.106",
|
|
32
|
+
"document-drive": "6.0.0-dev.106",
|
|
33
|
+
"document-model": "6.0.0-dev.106"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
30
36
|
"@vitest/coverage-v8": "^3.2.4",
|
|
31
37
|
"prettier": "3.8.1",
|
|
32
38
|
"tinybench": "^2.9.0",
|
|
33
39
|
"tsx": "4.21.0",
|
|
34
40
|
"vitest": "3.2.4",
|
|
35
41
|
"@types/bun": "1.3.8",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"document-drive": "6.0.0-dev.105"
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"@electric-sql/pglite": ">=0.3.15",
|
|
42
|
-
"document-drive": "6.0.0-dev.105",
|
|
43
|
-
"document-model": "6.0.0-dev.105"
|
|
42
|
+
"tsdown": "0.21.0",
|
|
43
|
+
"vite-tsconfig-paths": "6.1.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"build": "tsc",
|
|
48
|
-
"build:bundle": "bun run ./bundle.ts",
|
|
46
|
+
"build:bundle": "tsdown",
|
|
49
47
|
"test": "vitest run --coverage --printConsoleTrace=true --silent=false",
|
|
50
48
|
"test:watch": "vitest --coverage",
|
|
51
49
|
"lint": "eslint",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Action, CreateDocumentActionInput, UpgradeDocumentActionInput } from "document-model";
|
|
2
|
-
import { actions as documentActions } from "document-model";
|
|
3
|
-
export { documentActions };
|
|
4
|
-
/**
|
|
5
|
-
* Creates a CREATE_DOCUMENT action for document creation.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createDocumentAction(input: CreateDocumentActionInput): Action;
|
|
8
|
-
/**
|
|
9
|
-
* Creates an UPGRADE_DOCUMENT action to set initial document state.
|
|
10
|
-
*/
|
|
11
|
-
export declare function upgradeDocumentAction(input: UpgradeDocumentActionInput): Action;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a DELETE_DOCUMENT action for document deletion.
|
|
14
|
-
*/
|
|
15
|
-
export declare function deleteDocumentAction(documentId: string): Action;
|
|
16
|
-
/**
|
|
17
|
-
* Creates an ADD_RELATIONSHIP action to establish a parent-child relationship.
|
|
18
|
-
*/
|
|
19
|
-
export declare function addRelationshipAction(sourceId: string, targetId: string, relationshipType?: string): Action;
|
|
20
|
-
/**
|
|
21
|
-
* Creates a REMOVE_RELATIONSHIP action to remove a parent-child relationship.
|
|
22
|
-
*/
|
|
23
|
-
export declare function removeRelationshipAction(sourceId: string, targetId: string, relationshipType?: string): Action;
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAEN,yBAAyB,EAGzB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAQ7E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,GAChC,MAAM,CAQR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY/D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,gBAAgB,GAAE,MAAgB,GACjC,MAAM,CAcR;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,gBAAgB,GAAE,MAAgB,GACjC,MAAM,CAcR"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IWriteCache } from "../cache/write/interfaces.js";
|
|
2
|
-
import type { IDocumentModelRegistry } from "../registry/interfaces.js";
|
|
3
|
-
import type { IDocumentView, IKeyframeStore, IOperationStore } from "../storage/interfaces.js";
|
|
4
|
-
import type { IDocumentIntegrityService, RebuildResult, ValidationResult } from "./types.js";
|
|
5
|
-
export declare class DocumentIntegrityService implements IDocumentIntegrityService {
|
|
6
|
-
private readonly keyframeStore;
|
|
7
|
-
private readonly operationStore;
|
|
8
|
-
private readonly writeCache;
|
|
9
|
-
private readonly documentView;
|
|
10
|
-
private readonly documentModelRegistry;
|
|
11
|
-
constructor(keyframeStore: IKeyframeStore, operationStore: IOperationStore, writeCache: IWriteCache, documentView: IDocumentView, documentModelRegistry: IDocumentModelRegistry);
|
|
12
|
-
validateDocument(documentId: string, branch?: string, signal?: AbortSignal): Promise<ValidationResult>;
|
|
13
|
-
rebuildKeyframes(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
14
|
-
rebuildSnapshots(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
15
|
-
private discoverScopes;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=document-integrity-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-integrity-service.d.ts","sourceRoot":"","sources":["../../../src/admin/document-integrity-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,yBAAyB,EAEzB,aAAa,EAEb,gBAAgB,EACjB,MAAM,YAAY,CAAC;AASpB,qBAAa,wBAAyB,YAAW,yBAAyB;IACxE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkB;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAC7C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAyB;gBAG7D,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,eAAe,EAC/B,UAAU,EAAE,WAAW,EACvB,YAAY,EAAE,aAAa,EAC3B,qBAAqB,EAAE,sBAAsB;IASzC,gBAAgB,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,SAAS,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC;IAiHtB,gBAAgB,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,SAAS,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC;IAenB,gBAAgB,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,SAAS,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC;YAiBX,cAAc;CAY7B"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export type KeyframeValidationIssue = {
|
|
2
|
-
scope: string;
|
|
3
|
-
branch: string;
|
|
4
|
-
revision: number;
|
|
5
|
-
keyframeHash: string;
|
|
6
|
-
replayedHash: string;
|
|
7
|
-
};
|
|
8
|
-
export type SnapshotValidationIssue = {
|
|
9
|
-
scope: string;
|
|
10
|
-
branch: string;
|
|
11
|
-
snapshotHash: string;
|
|
12
|
-
replayedHash: string;
|
|
13
|
-
};
|
|
14
|
-
export type ValidationResult = {
|
|
15
|
-
documentId: string;
|
|
16
|
-
isConsistent: boolean;
|
|
17
|
-
keyframeIssues: KeyframeValidationIssue[];
|
|
18
|
-
snapshotIssues: SnapshotValidationIssue[];
|
|
19
|
-
};
|
|
20
|
-
export type RebuildResult = {
|
|
21
|
-
documentId: string;
|
|
22
|
-
keyframesDeleted: number;
|
|
23
|
-
scopesInvalidated: number;
|
|
24
|
-
};
|
|
25
|
-
export interface IDocumentIntegrityService {
|
|
26
|
-
validateDocument(documentId: string, branch?: string, signal?: AbortSignal): Promise<ValidationResult>;
|
|
27
|
-
rebuildKeyframes(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
28
|
-
rebuildSnapshots(documentId: string, branch?: string, signal?: AbortSignal): Promise<RebuildResult>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/admin/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,uBAAuB,EAAE,CAAC;IAC1C,cAAc,EAAE,uBAAuB,EAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC,CAAC;IAE1B,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RingBuffer is a generic circular buffer implementation that stores a fixed number
|
|
3
|
-
* of items. When the buffer is full, new items overwrite the oldest items.
|
|
4
|
-
*
|
|
5
|
-
* This implementation maintains O(1) time complexity for push operations and provides
|
|
6
|
-
* items in chronological order (oldest to newest) via getAll().
|
|
7
|
-
*
|
|
8
|
-
* @template T - The type of items stored in the buffer
|
|
9
|
-
*/
|
|
10
|
-
export declare class RingBuffer<T> {
|
|
11
|
-
private buffer;
|
|
12
|
-
private head;
|
|
13
|
-
private size;
|
|
14
|
-
private capacity;
|
|
15
|
-
constructor(capacity: number);
|
|
16
|
-
/**
|
|
17
|
-
* Adds an item to the buffer. If the buffer is full, overwrites the oldest item.
|
|
18
|
-
*
|
|
19
|
-
* @param item - The item to add
|
|
20
|
-
*/
|
|
21
|
-
push(item: T): void;
|
|
22
|
-
/**
|
|
23
|
-
* Returns all items in the buffer in chronological order (oldest to newest).
|
|
24
|
-
*
|
|
25
|
-
* @returns Array of items in insertion order
|
|
26
|
-
*/
|
|
27
|
-
getAll(): T[];
|
|
28
|
-
/**
|
|
29
|
-
* Clears all items from the buffer.
|
|
30
|
-
*/
|
|
31
|
-
clear(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Gets the current number of items in the buffer.
|
|
34
|
-
*/
|
|
35
|
-
get length(): number;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=ring-buffer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ring-buffer.d.ts","sourceRoot":"","sources":["../../../../src/cache/buffer/ring-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,qBAAa,UAAU,CAAC,CAAC;IACvB,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,MAAM;IAQ5B;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAYnB;;;;OAIG;IACH,MAAM,IAAI,CAAC,EAAE;IAab;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IOperationIndex } from "./operation-index-types.js";
|
|
2
|
-
export interface ICollectionMembershipCache {
|
|
3
|
-
getCollectionsForDocuments(documentIds: string[]): Promise<Record<string, string[]>>;
|
|
4
|
-
invalidate(documentId: string): void;
|
|
5
|
-
}
|
|
6
|
-
export declare class CollectionMembershipCache implements ICollectionMembershipCache {
|
|
7
|
-
private operationIndex;
|
|
8
|
-
private cache;
|
|
9
|
-
constructor(operationIndex: IOperationIndex);
|
|
10
|
-
withScopedIndex(operationIndex: IOperationIndex): CollectionMembershipCache;
|
|
11
|
-
getCollectionsForDocuments(documentIds: string[]): Promise<Record<string, string[]>>;
|
|
12
|
-
invalidate(documentId: string): void;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=collection-membership-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collection-membership-cache.d.ts","sourceRoot":"","sources":["../../../src/cache/collection-membership-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,0BAA0B;IAEzC,0BAA0B,CACxB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAGrC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,qBAAa,yBAA0B,YAAW,0BAA0B;IAG9D,OAAO,CAAC,cAAc;IAFlC,OAAO,CAAC,KAAK,CAAoC;gBAE7B,cAAc,EAAE,eAAe;IAEnD,eAAe,CAAC,cAAc,EAAE,eAAe,GAAG,yBAAyB;IAMrE,0BAA0B,CAC9B,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IA0BpC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGrC"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import type { PHDocumentState } from "document-model";
|
|
2
|
-
/**
|
|
3
|
-
* Configuration options for the document metadata cache.
|
|
4
|
-
*/
|
|
5
|
-
export type DocumentMetaCacheConfig = {
|
|
6
|
-
/**
|
|
7
|
-
* Maximum number of document metadata entries to cache (LRU eviction).
|
|
8
|
-
* Default: 1000
|
|
9
|
-
*/
|
|
10
|
-
maxDocuments: number;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Cached document metadata from the "document" scope.
|
|
14
|
-
*
|
|
15
|
-
* This lightweight structure holds essential document information needed by
|
|
16
|
-
* the job executor without fetching full scope state. It provides an explicit
|
|
17
|
-
* cross-scope contract for accessing document scope metadata.
|
|
18
|
-
*/
|
|
19
|
-
export type CachedDocumentMeta = {
|
|
20
|
-
/**
|
|
21
|
-
* The full PHDocumentState from document.state.document.
|
|
22
|
-
* Contains version, hash, isDeleted, deletedAtUtcIso, etc.
|
|
23
|
-
*/
|
|
24
|
-
state: PHDocumentState;
|
|
25
|
-
/**
|
|
26
|
-
* The document type (from header), cached for convenience.
|
|
27
|
-
*/
|
|
28
|
-
documentType: string;
|
|
29
|
-
/**
|
|
30
|
-
* The revision of the document scope when this metadata was captured.
|
|
31
|
-
* Used for cache invalidation and consistency checks.
|
|
32
|
-
*/
|
|
33
|
-
documentScopeRevision: number;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Interface for the document metadata cache.
|
|
37
|
-
*
|
|
38
|
-
* This cache provides an explicit cross-scope contract for accessing document
|
|
39
|
-
* scope metadata. It solves the problem where job execution in one scope (e.g.,
|
|
40
|
-
* "global") needs access to document scope state (version, isDeleted, etc.)
|
|
41
|
-
* which may be stale in scope-specific caches or keyframes.
|
|
42
|
-
*
|
|
43
|
-
* The cache supports:
|
|
44
|
-
* - Latest metadata retrieval with LRU caching
|
|
45
|
-
* - Historical metadata reconstruction for reshuffling scenarios
|
|
46
|
-
* - Eager updates after document scope operations
|
|
47
|
-
*/
|
|
48
|
-
export interface IDocumentMetaCache {
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves the LATEST document metadata from cache or rebuilds from operations.
|
|
51
|
-
*
|
|
52
|
-
* On cache miss, fetches all document scope operations and reconstructs the
|
|
53
|
-
* current PHDocumentState by applying UPGRADE_DOCUMENT and DELETE_DOCUMENT
|
|
54
|
-
* operations.
|
|
55
|
-
*
|
|
56
|
-
* @param documentId - The document identifier
|
|
57
|
-
* @param branch - Branch name
|
|
58
|
-
* @param signal - Optional abort signal to cancel the operation
|
|
59
|
-
* @returns The cached or rebuilt document metadata
|
|
60
|
-
* @throws {Error} "Operation aborted" if signal is aborted
|
|
61
|
-
* @throws {Error} If document not found (no CREATE_DOCUMENT operation)
|
|
62
|
-
*/
|
|
63
|
-
getDocumentMeta(documentId: string, branch: string, signal?: AbortSignal): Promise<CachedDocumentMeta>;
|
|
64
|
-
/**
|
|
65
|
-
* Rebuilds document metadata at a SPECIFIC revision (always rebuilds, no caching).
|
|
66
|
-
*
|
|
67
|
-
* Used during reshuffling when operations need to be inserted at a previous
|
|
68
|
-
* revision and we need the document scope state as of that point in time.
|
|
69
|
-
*
|
|
70
|
-
* @param documentId - The document identifier
|
|
71
|
-
* @param branch - Branch name
|
|
72
|
-
* @param targetRevision - The document scope revision to reconstruct up to
|
|
73
|
-
* @param signal - Optional abort signal to cancel the operation
|
|
74
|
-
* @returns Document metadata as of the target revision
|
|
75
|
-
* @throws {Error} "Operation aborted" if signal is aborted
|
|
76
|
-
* @throws {Error} If document not found
|
|
77
|
-
*/
|
|
78
|
-
rebuildAtRevision(documentId: string, branch: string, targetRevision: number, signal?: AbortSignal): Promise<CachedDocumentMeta>;
|
|
79
|
-
/**
|
|
80
|
-
* Eagerly updates cached metadata after document scope operations.
|
|
81
|
-
*
|
|
82
|
-
* Called by the job executor after CREATE_DOCUMENT, UPGRADE_DOCUMENT, or
|
|
83
|
-
* DELETE_DOCUMENT operations to keep the cache current.
|
|
84
|
-
*
|
|
85
|
-
* @param documentId - The document identifier
|
|
86
|
-
* @param branch - Branch name
|
|
87
|
-
* @param meta - The new metadata to cache
|
|
88
|
-
*/
|
|
89
|
-
putDocumentMeta(documentId: string, branch: string, meta: CachedDocumentMeta): void;
|
|
90
|
-
/**
|
|
91
|
-
* Invalidates cached document metadata.
|
|
92
|
-
*
|
|
93
|
-
* Call before reshuffling operations that modify the document scope, or
|
|
94
|
-
* when document state may have changed externally.
|
|
95
|
-
*
|
|
96
|
-
* @param documentId - The document identifier
|
|
97
|
-
* @param branch - Optional branch to narrow invalidation (if omitted, all branches)
|
|
98
|
-
* @returns Number of entries invalidated
|
|
99
|
-
*/
|
|
100
|
-
invalidate(documentId: string, branch?: string): number;
|
|
101
|
-
/**
|
|
102
|
-
* Clears all cached document metadata.
|
|
103
|
-
*/
|
|
104
|
-
clear(): void;
|
|
105
|
-
/**
|
|
106
|
-
* Performs startup initialization.
|
|
107
|
-
*/
|
|
108
|
-
startup(): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Performs graceful shutdown.
|
|
111
|
-
*/
|
|
112
|
-
shutdown(): Promise<void>;
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=document-meta-cache-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-meta-cache-types.d.ts","sourceRoot":"","sources":["../../../src/cache/document-meta-cache-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;OAaG;IACH,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B;;;;;;;;;OASG;IACH,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,kBAAkB,GACvB,IAAI,CAAC;IAER;;;;;;;;;OASG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExD;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IOperationStore } from "../storage/interfaces.js";
|
|
2
|
-
import type { CachedDocumentMeta, DocumentMetaCacheConfig, IDocumentMetaCache } from "./document-meta-cache-types.js";
|
|
3
|
-
/**
|
|
4
|
-
* In-memory document metadata cache with LRU eviction.
|
|
5
|
-
*
|
|
6
|
-
* Caches PHDocumentState per (documentId, branch) key. On cache miss,
|
|
7
|
-
* rebuilds from document scope operations. Provides an explicit cross-scope
|
|
8
|
-
* contract for accessing document scope metadata.
|
|
9
|
-
*
|
|
10
|
-
* **Thread Safety:**
|
|
11
|
-
* Not thread-safe. Designed for single-threaded job executor environment.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DocumentMetaCache implements IDocumentMetaCache {
|
|
14
|
-
private cache;
|
|
15
|
-
private lruTracker;
|
|
16
|
-
private operationStore;
|
|
17
|
-
private config;
|
|
18
|
-
constructor(operationStore: IOperationStore, config: DocumentMetaCacheConfig);
|
|
19
|
-
withScopedStore(operationStore: IOperationStore): DocumentMetaCache;
|
|
20
|
-
startup(): Promise<void>;
|
|
21
|
-
shutdown(): Promise<void>;
|
|
22
|
-
getDocumentMeta(documentId: string, branch: string, signal?: AbortSignal): Promise<CachedDocumentMeta>;
|
|
23
|
-
rebuildAtRevision(documentId: string, branch: string, targetRevision: number, signal?: AbortSignal): Promise<CachedDocumentMeta>;
|
|
24
|
-
putDocumentMeta(documentId: string, branch: string, meta: CachedDocumentMeta): void;
|
|
25
|
-
invalidate(documentId: string, branch?: string): number;
|
|
26
|
-
clear(): void;
|
|
27
|
-
private makeKey;
|
|
28
|
-
private rebuildLatest;
|
|
29
|
-
private rebuildFromOperations;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=document-meta-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-meta-cache.d.ts","sourceRoot":"","sources":["../../../src/cache/document-meta-cache.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAGxC;;;;;;;;;GASG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,KAAK,CAAkC;IAC/C,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,MAAM,CAA0B;gBAGtC,cAAc,EAAE,eAAe,EAC/B,MAAM,EAAE,uBAAuB;IAUjC,eAAe,CAAC,cAAc,EAAE,eAAe,GAAG,iBAAiB;IAO7D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,eAAe,CACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,kBAAkB,CAAC;IAkBxB,iBAAiB,CACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,kBAAkB,CAAC;IAa9B,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,kBAAkB,GACvB,IAAI;IAcP,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAuBvD,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,OAAO;YAID,aAAa;YAQb,qBAAqB;CA2DpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cache/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { OperationWithContext } from "document-model";
|
|
2
|
-
import type { Kysely, Transaction } from "kysely";
|
|
3
|
-
import type { PagedResults, PagingOptions } from "../shared/types.js";
|
|
4
|
-
import type { ViewFilter } from "../storage/interfaces.js";
|
|
5
|
-
import type { Database } from "../storage/kysely/types.js";
|
|
6
|
-
import type { IOperationIndex, IOperationIndexTxn, OperationIndexEntry } from "./operation-index-types.js";
|
|
7
|
-
export declare class KyselyOperationIndex implements IOperationIndex {
|
|
8
|
-
private db;
|
|
9
|
-
private trx?;
|
|
10
|
-
constructor(db: Kysely<Database>);
|
|
11
|
-
private get queryExecutor();
|
|
12
|
-
withTransaction(trx: Transaction<Database>): KyselyOperationIndex;
|
|
13
|
-
start(): IOperationIndexTxn;
|
|
14
|
-
commit(txn: IOperationIndexTxn, signal?: AbortSignal): Promise<number[]>;
|
|
15
|
-
private executeCommit;
|
|
16
|
-
find(collectionId: string, cursor?: number, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationIndexEntry>>;
|
|
17
|
-
get(documentId: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationIndexEntry>>;
|
|
18
|
-
getSinceOrdinal(ordinal: number, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationWithContext>>;
|
|
19
|
-
private rowToOperationWithContext;
|
|
20
|
-
private rowToOperationIndexEntry;
|
|
21
|
-
getLatestTimestampForCollection(collectionId: string, signal?: AbortSignal): Promise<string | null>;
|
|
22
|
-
getCollectionsForDocuments(documentIds: string[]): Promise<Record<string, string[]>>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=kysely-operation-index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kysely-operation-index.d.ts","sourceRoot":"","sources":["../../../src/cache/kysely-operation-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAGV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,4BAA4B,CAAC;AAsEpC,qBAAa,oBAAqB,YAAW,eAAe;IAG9C,OAAO,CAAC,EAAE;IAFtB,OAAO,CAAC,GAAG,CAAC,CAAwB;gBAEhB,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC;IAExC,OAAO,KAAK,aAAa,GAExB;IAED,eAAe,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,oBAAoB;IAMjE,KAAK,IAAI,kBAAkB;IAIrB,MAAM,CACV,GAAG,EAAE,kBAAkB,EACvB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC;YAkBN,aAAa;IA8FrB,IAAI,CACR,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IA6EvC,GAAG,CACP,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IA0DvC,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAsD9C,OAAO,CAAC,yBAAyB;IAsBjC,OAAO,CAAC,wBAAwB;IAmB1B,+BAA+B,CACnC,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoBnB,0BAA0B,CAC9B,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAqBrC"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import type { PHDocument } from "document-model";
|
|
2
|
-
import type { IDocumentModelRegistry } from "../registry/interfaces.js";
|
|
3
|
-
import type { IKeyframeStore, IOperationStore } from "../storage/interfaces.js";
|
|
4
|
-
import { RingBuffer } from "./buffer/ring-buffer.js";
|
|
5
|
-
import type { CachedSnapshot, WriteCacheConfig } from "./write-cache-types.js";
|
|
6
|
-
import type { IWriteCache } from "./write/interfaces.js";
|
|
7
|
-
type DocumentStream = {
|
|
8
|
-
key: string;
|
|
9
|
-
ringBuffer: RingBuffer<CachedSnapshot>;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* In-memory write cache with keyframe persistence for PHDocuments.
|
|
13
|
-
*
|
|
14
|
-
* Caches document snapshots in ring buffers with LRU eviction. On cache miss,
|
|
15
|
-
* rebuilds documents from nearest keyframe or full operation history.
|
|
16
|
-
*
|
|
17
|
-
* **Performance Characteristics:**
|
|
18
|
-
* - Cache hit: O(1) lookup in ring buffer
|
|
19
|
-
* - Cold miss: O(n) where n is total operation count, or O(k) where k is operations since keyframe
|
|
20
|
-
* - Warm miss: O(m) where m is operations since cached revision
|
|
21
|
-
* - Eviction: O(1) for LRU tracking and removal
|
|
22
|
-
*
|
|
23
|
-
* **Thread Safety:**
|
|
24
|
-
* Not thread-safe. Designed for single-threaded job executor environment.
|
|
25
|
-
* External synchronization required for concurrent access across multiple executors.
|
|
26
|
-
*
|
|
27
|
-
* **Example:**
|
|
28
|
-
* ```typescript
|
|
29
|
-
* const cache = new KyselyWriteCache(
|
|
30
|
-
* keyframeStore,
|
|
31
|
-
* operationStore,
|
|
32
|
-
* registry,
|
|
33
|
-
* { maxDocuments: 1000, ringBufferSize: 10, keyframeInterval: 10 }
|
|
34
|
-
* );
|
|
35
|
-
*
|
|
36
|
-
* await cache.startup();
|
|
37
|
-
*
|
|
38
|
-
* // Retrieve or rebuild document
|
|
39
|
-
* const doc = await cache.getState(docId, docType, scope, branch, revision);
|
|
40
|
-
*
|
|
41
|
-
* // Cache result after job execution
|
|
42
|
-
* cache.putState(docId, docType, scope, branch, newRevision, updatedDoc);
|
|
43
|
-
*
|
|
44
|
-
* await cache.shutdown();
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export declare class KyselyWriteCache implements IWriteCache {
|
|
48
|
-
private streams;
|
|
49
|
-
private lruTracker;
|
|
50
|
-
private keyframeStore;
|
|
51
|
-
private operationStore;
|
|
52
|
-
private registry;
|
|
53
|
-
private config;
|
|
54
|
-
constructor(keyframeStore: IKeyframeStore, operationStore: IOperationStore, registry: IDocumentModelRegistry, config: WriteCacheConfig);
|
|
55
|
-
withScopedStores(operationStore: IOperationStore, keyframeStore: IKeyframeStore): KyselyWriteCache;
|
|
56
|
-
/**
|
|
57
|
-
* Initializes the write cache.
|
|
58
|
-
* Currently a no-op as keyframe store lifecycle is managed externally.
|
|
59
|
-
*/
|
|
60
|
-
startup(): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Shuts down the write cache.
|
|
63
|
-
* Currently a no-op as keyframe store lifecycle is managed externally.
|
|
64
|
-
*/
|
|
65
|
-
shutdown(): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Retrieves document state at a specific revision from cache or rebuilds it.
|
|
68
|
-
*
|
|
69
|
-
* Cache hit path: Returns cached snapshot if available (O(1))
|
|
70
|
-
* Warm miss path: Rebuilds from cached base revision + incremental ops
|
|
71
|
-
* Cold miss path: Rebuilds from keyframe or from scratch using all operations
|
|
72
|
-
*
|
|
73
|
-
* @param documentId - The document identifier
|
|
74
|
-
* @param scope - The operation scope
|
|
75
|
-
* @param branch - The operation branch
|
|
76
|
-
* @param targetRevision - The target revision, or undefined for newest
|
|
77
|
-
* @param signal - Optional abort signal to cancel the operation
|
|
78
|
-
* @returns The document at the target revision
|
|
79
|
-
* @throws {Error} "Operation aborted" if signal is aborted
|
|
80
|
-
* @throws {ModuleNotFoundError} If document type not registered in registry
|
|
81
|
-
* @throws {Error} "Failed to rebuild document" if operation store fails
|
|
82
|
-
* @throws {Error} If reducer throws during operation application
|
|
83
|
-
* @throws {Error} If document serialization fails
|
|
84
|
-
*/
|
|
85
|
-
getState(documentId: string, scope: string, branch: string, targetRevision?: number, signal?: AbortSignal): Promise<PHDocument>;
|
|
86
|
-
/**
|
|
87
|
-
* Stores a document snapshot in the cache at a specific revision.
|
|
88
|
-
*
|
|
89
|
-
* The cached document is a shallow copy of the input with its operation history
|
|
90
|
-
* truncated to the last operation per scope and its clipboard cleared. This keeps
|
|
91
|
-
* memory use and copy costs constant regardless of operation count. Consumers of
|
|
92
|
-
* getState() must not rely on the full operation history being present; the only
|
|
93
|
-
* guaranteed invariant is that operations[scope].at(-1) reflects the latest
|
|
94
|
-
* operation index for each scope.
|
|
95
|
-
*
|
|
96
|
-
* Updates LRU tracker and may evict least recently used stream if at capacity.
|
|
97
|
-
* Asynchronously persists keyframes at configured intervals (fire-and-forget).
|
|
98
|
-
*
|
|
99
|
-
* @param documentId - The document identifier
|
|
100
|
-
* @param scope - The operation scope
|
|
101
|
-
* @param branch - The operation branch
|
|
102
|
-
* @param revision - The revision number
|
|
103
|
-
* @param document - The document to cache
|
|
104
|
-
* @throws {Error} If document serialization fails
|
|
105
|
-
*/
|
|
106
|
-
putState(documentId: string, scope: string, branch: string, revision: number, document: PHDocument): void;
|
|
107
|
-
/**
|
|
108
|
-
* Invalidates cached document streams.
|
|
109
|
-
*
|
|
110
|
-
* Supports three invalidation scopes:
|
|
111
|
-
* - Document-level: invalidate(documentId) - removes all streams for document
|
|
112
|
-
* - Scope-level: invalidate(documentId, scope) - removes all branches for scope
|
|
113
|
-
* - Stream-level: invalidate(documentId, scope, branch) - removes specific stream
|
|
114
|
-
*
|
|
115
|
-
* @param documentId - The document identifier
|
|
116
|
-
* @param scope - Optional scope to narrow invalidation
|
|
117
|
-
* @param branch - Optional branch to narrow invalidation (requires scope)
|
|
118
|
-
* @returns The number of streams evicted
|
|
119
|
-
*/
|
|
120
|
-
invalidate(documentId: string, scope?: string, branch?: string): number;
|
|
121
|
-
/**
|
|
122
|
-
* Clears the entire cache, removing all cached document streams.
|
|
123
|
-
* Resets LRU tracking state. This operation always succeeds.
|
|
124
|
-
*/
|
|
125
|
-
clear(): void;
|
|
126
|
-
/**
|
|
127
|
-
* Retrieves a specific stream for a document. Exposed on the implementation
|
|
128
|
-
* for testing, but not on the interface.
|
|
129
|
-
*
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
|
-
getStream(documentId: string, scope: string, branch: string): DocumentStream | undefined;
|
|
133
|
-
private findNearestKeyframe;
|
|
134
|
-
private coldMissRebuild;
|
|
135
|
-
private warmMissRebuild;
|
|
136
|
-
private findNearestOlderSnapshot;
|
|
137
|
-
private makeStreamKey;
|
|
138
|
-
private getOrCreateStream;
|
|
139
|
-
private isKeyframeRevision;
|
|
140
|
-
}
|
|
141
|
-
export {};
|
|
142
|
-
//# sourceMappingURL=kysely-write-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kysely-write-cache.d.ts","sourceRoot":"","sources":["../../../src/cache/kysely-write-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EAEX,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,KAAK,cAAc,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAQF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAAa,gBAAiB,YAAW,WAAW;IAClD,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,MAAM,CAA6B;gBAGzC,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,eAAe,EAC/B,QAAQ,EAAE,sBAAsB,EAChC,MAAM,EAAE,gBAAgB;IAc1B,gBAAgB,CACd,cAAc,EAAE,eAAe,EAC/B,aAAa,EAAE,cAAc,GAC5B,gBAAgB;IAYnB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;;;;;;;;;;;;;;;;;OAkBG;IACG,QAAQ,CACZ,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC;IAiEtB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,UAAU,GACnB,IAAI;IA0CP;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IA+BvE;;;OAGG;IACH,KAAK,IAAI,IAAI;IAKb;;;;;OAKG;IACH,SAAS,CACP,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS;YAKf,mBAAmB;YAoBnB,eAAe;YA2Kf,eAAe;IAmE7B,OAAO,CAAC,wBAAwB;IAiBhC,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,kBAAkB;CAG3B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class LRUTracker<K> {
|
|
2
|
-
private map;
|
|
3
|
-
private head;
|
|
4
|
-
private tail;
|
|
5
|
-
constructor();
|
|
6
|
-
get size(): number;
|
|
7
|
-
touch(key: K): void;
|
|
8
|
-
evict(): K | undefined;
|
|
9
|
-
remove(key: K): void;
|
|
10
|
-
clear(): void;
|
|
11
|
-
private addToFront;
|
|
12
|
-
private moveToFront;
|
|
13
|
-
private removeNode;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=lru-tracker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lru-tracker.d.ts","sourceRoot":"","sources":["../../../../src/cache/lru/lru-tracker.ts"],"names":[],"mappings":"AAYA,qBAAa,UAAU,CAAC,CAAC;IACvB,OAAO,CAAC,GAAG,CAAqB;IAChC,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,IAAI,CAAyB;;IAQrC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI;IAUnB,KAAK,IAAI,CAAC,GAAG,SAAS;IAUtB,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI;IAUpB,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,UAAU;CAanB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { Operation, OperationWithContext } from "document-model";
|
|
2
|
-
import type { Generated, Insertable, Selectable, Updateable } from "kysely";
|
|
3
|
-
import type { PagedResults, PagingOptions } from "../shared/types.js";
|
|
4
|
-
import type { ViewFilter } from "../storage/interfaces.js";
|
|
5
|
-
export type OperationIndexEntry = Operation & {
|
|
6
|
-
ordinal?: number;
|
|
7
|
-
documentId: string;
|
|
8
|
-
documentType: string;
|
|
9
|
-
branch: string;
|
|
10
|
-
scope: string;
|
|
11
|
-
sourceRemote: string;
|
|
12
|
-
};
|
|
13
|
-
export interface IOperationIndexTxn {
|
|
14
|
-
createCollection(collectionId: string): void;
|
|
15
|
-
addToCollection(collectionId: string, documentId: string): void;
|
|
16
|
-
removeFromCollection(collectionId: string, documentId: string): void;
|
|
17
|
-
write(operations: OperationIndexEntry[]): void;
|
|
18
|
-
}
|
|
19
|
-
export interface IOperationIndex {
|
|
20
|
-
start(): IOperationIndexTxn;
|
|
21
|
-
commit(txn: IOperationIndexTxn, signal?: AbortSignal): Promise<number[]>;
|
|
22
|
-
find(collectionId: string, cursor?: number, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationIndexEntry>>;
|
|
23
|
-
/**
|
|
24
|
-
* Get all operations for a specific document, ordered by ordinal.
|
|
25
|
-
* Used for retroactive sync when a document is added to a collection.
|
|
26
|
-
*/
|
|
27
|
-
get(documentId: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationIndexEntry>>;
|
|
28
|
-
getSinceOrdinal(ordinal: number, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<OperationWithContext>>;
|
|
29
|
-
getLatestTimestampForCollection(collectionId: string, signal?: AbortSignal): Promise<string | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Get all collection memberships for the given document IDs.
|
|
32
|
-
* Returns a map of documentId to array of collection IDs.
|
|
33
|
-
*/
|
|
34
|
-
getCollectionsForDocuments(documentIds: string[]): Promise<Record<string, string[]>>;
|
|
35
|
-
}
|
|
36
|
-
export interface DocumentCollectionTable {
|
|
37
|
-
documentId: string;
|
|
38
|
-
collectionId: string;
|
|
39
|
-
joinedOrdinal: bigint;
|
|
40
|
-
leftOrdinal: bigint | null;
|
|
41
|
-
}
|
|
42
|
-
export interface OperationIndexOperationTable {
|
|
43
|
-
ordinal: Generated<number>;
|
|
44
|
-
opId: string;
|
|
45
|
-
documentId: string;
|
|
46
|
-
documentType: string;
|
|
47
|
-
scope: string;
|
|
48
|
-
branch: string;
|
|
49
|
-
timestampUtcMs: string;
|
|
50
|
-
writeTimestampUtcMs: Generated<Date>;
|
|
51
|
-
index: number;
|
|
52
|
-
skip: number;
|
|
53
|
-
hash: string;
|
|
54
|
-
action: unknown;
|
|
55
|
-
sourceRemote: Generated<string>;
|
|
56
|
-
}
|
|
57
|
-
export type DocumentCollectionRow = Selectable<DocumentCollectionTable>;
|
|
58
|
-
export type InsertableDocumentCollection = Insertable<DocumentCollectionTable>;
|
|
59
|
-
export type UpdateableDocumentCollection = Updateable<DocumentCollectionTable>;
|
|
60
|
-
export type OperationIndexOperationRow = Selectable<OperationIndexOperationTable>;
|
|
61
|
-
export type InsertableOperationIndexOperation = Insertable<OperationIndexOperationTable>;
|
|
62
|
-
export type UpdateableOperationIndexOperation = Updateable<OperationIndexOperationTable>;
|
|
63
|
-
export declare function driveCollectionId(branch: string, driveId: string): string;
|
|
64
|
-
//# sourceMappingURL=operation-index-types.d.ts.map
|