@xyo-network/event-kit-node 2.1.0 → 2.2.0
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/README.md +53 -34
- package/dist/node/bestEffortSnapshotWorker.d.ts +44 -0
- package/dist/node/bestEffortSnapshotWorker.d.ts.map +1 -0
- package/dist/node/bestEffortTypes.d.ts +55 -0
- package/dist/node/bestEffortTypes.d.ts.map +1 -0
- package/dist/node/filesystemCursorStore.d.ts.map +1 -1
- package/dist/node/filesystemJson.d.ts.map +1 -1
- package/dist/node/filesystemPublisherOutbox.d.ts.map +1 -1
- package/dist/node/filesystemWakeInbox.d.ts +3 -20
- package/dist/node/filesystemWakeInbox.d.ts.map +1 -1
- package/dist/node/filesystemWakeQueue.d.ts +10 -19
- package/dist/node/filesystemWakeQueue.d.ts.map +1 -1
- package/dist/node/handshake.mjs +12 -11
- package/dist/node/handshake.mjs.map +2 -2
- package/dist/node/index.d.ts +8 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +1909 -609
- package/dist/node/index.mjs.map +4 -4
- package/dist/node/privateSqlite.d.ts +19 -0
- package/dist/node/privateSqlite.d.ts.map +1 -0
- package/dist/node/receiverAuthority.d.ts +102 -0
- package/dist/node/receiverAuthority.d.ts.map +1 -0
- package/dist/node/receiverMigration.d.ts +16 -0
- package/dist/node/receiverMigration.d.ts.map +1 -0
- package/dist/node/receiverMigrationInventory.d.ts +6 -0
- package/dist/node/receiverMigrationInventory.d.ts.map +1 -0
- package/dist/node/receiverMigrationSnapshot.d.ts +6 -0
- package/dist/node/receiverMigrationSnapshot.d.ts.map +1 -0
- package/dist/node/receiverMigrationTypes.d.ts +113 -0
- package/dist/node/receiverMigrationTypes.d.ts.map +1 -0
- package/dist/node/runtime.mjs.map +2 -2
- package/dist/node/sqliteBestEffortInbox.d.ts +20 -0
- package/dist/node/sqliteBestEffortInbox.d.ts.map +1 -0
- package/dist/node/sqliteWakeQueue.d.ts +83 -17
- package/dist/node/sqliteWakeQueue.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
export declare class LegacyReceiverStoreError extends Error {
|
|
3
|
+
readonly name = "LegacyReceiverStoreError";
|
|
4
|
+
constructor(path: string);
|
|
5
|
+
}
|
|
6
|
+
/** Only the store's own directory is created/checked; unrelated parents are not chmodded. */
|
|
7
|
+
export declare function ensurePrivateDirectory(path: string): void;
|
|
8
|
+
export declare function checkPrivateStoreFile(path: string, create?: boolean): void;
|
|
9
|
+
export interface PrivateSqliteOptions {
|
|
10
|
+
readonly format: string;
|
|
11
|
+
readonly path: string;
|
|
12
|
+
}
|
|
13
|
+
/** A synchronous commit boundary; no callback may await filesystem/network work. */
|
|
14
|
+
export declare function openPrivateSqlite(options: PrivateSqliteOptions): {
|
|
15
|
+
database: DatabaseSync;
|
|
16
|
+
transaction<T>(work: () => T): T;
|
|
17
|
+
close(): void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=privateSqlite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateSqlite.d.ts","sourceRoot":"","sources":["../../src/privateSqlite.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,SAAkB,IAAI,8BAA6B;gBACvC,IAAI,EAAE,MAAM;CAGzB;AAED,6FAA6F;AAC7F,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAezD;AAaD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,IAAI,CAgBxE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AA0BD,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB;;gBAyB/C,CAAC,QAAQ,MAAM,CAAC,GAAG,CAAC;aAevB,IAAI;EAMhB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { AdmittedWake, AtomicWakeInbox, LeasedWake, WakeAdmissionReceipt, WakeQueue } from '@xyo-network/event-kit-protocol';
|
|
2
|
+
export interface ReceiverQueueRow {
|
|
3
|
+
readonly body: string | null;
|
|
4
|
+
readonly id: number;
|
|
5
|
+
readonly lease_token: string | null;
|
|
6
|
+
readonly state: 'pending' | 'inflight' | 'completed';
|
|
7
|
+
readonly terminal_operation: 'ack' | 'release' | null;
|
|
8
|
+
readonly terminal_token: string | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function receiverIdentity(parts: readonly string[]): string;
|
|
11
|
+
/** One durable authority for admission, queue transitions and completion. */
|
|
12
|
+
export declare function openReceiverAuthority(path: string): {
|
|
13
|
+
queue: WakeQueue<{
|
|
14
|
+
audience: string;
|
|
15
|
+
deploymentId: string;
|
|
16
|
+
event: {
|
|
17
|
+
schema: "network.xyo.event.wake.envelope" & {
|
|
18
|
+
readonly __schema: true;
|
|
19
|
+
};
|
|
20
|
+
authorizationChainId: string;
|
|
21
|
+
deploymentId: string;
|
|
22
|
+
wakeId: string;
|
|
23
|
+
deliveryMode: "best-effort" | "durable";
|
|
24
|
+
source: {
|
|
25
|
+
kind: "xl1-finalized";
|
|
26
|
+
chainId: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: "ethereum-finalized";
|
|
29
|
+
chainId: string;
|
|
30
|
+
genesisHash: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "utc-interval";
|
|
33
|
+
scheduleId: string;
|
|
34
|
+
anchorSeconds: number;
|
|
35
|
+
intervalSeconds: number;
|
|
36
|
+
};
|
|
37
|
+
fromPosition: number;
|
|
38
|
+
toPosition: number;
|
|
39
|
+
filterHash: string;
|
|
40
|
+
issuedAt: number;
|
|
41
|
+
queueId?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
eventHash: string;
|
|
44
|
+
fromPosition: number;
|
|
45
|
+
toPosition: number;
|
|
46
|
+
jti: string;
|
|
47
|
+
publisher: string;
|
|
48
|
+
wakeId: string;
|
|
49
|
+
queueId?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
inbox: AtomicWakeInbox<{
|
|
52
|
+
audience: string;
|
|
53
|
+
deploymentId: string;
|
|
54
|
+
event: {
|
|
55
|
+
schema: "network.xyo.event.wake.envelope" & {
|
|
56
|
+
readonly __schema: true;
|
|
57
|
+
};
|
|
58
|
+
authorizationChainId: string;
|
|
59
|
+
deploymentId: string;
|
|
60
|
+
wakeId: string;
|
|
61
|
+
deliveryMode: "best-effort" | "durable";
|
|
62
|
+
source: {
|
|
63
|
+
kind: "xl1-finalized";
|
|
64
|
+
chainId: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "ethereum-finalized";
|
|
67
|
+
chainId: string;
|
|
68
|
+
genesisHash: string;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "utc-interval";
|
|
71
|
+
scheduleId: string;
|
|
72
|
+
anchorSeconds: number;
|
|
73
|
+
intervalSeconds: number;
|
|
74
|
+
};
|
|
75
|
+
fromPosition: number;
|
|
76
|
+
toPosition: number;
|
|
77
|
+
filterHash: string;
|
|
78
|
+
issuedAt: number;
|
|
79
|
+
queueId?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
eventHash: string;
|
|
82
|
+
fromPosition: number;
|
|
83
|
+
toPosition: number;
|
|
84
|
+
jti: string;
|
|
85
|
+
publisher: string;
|
|
86
|
+
wakeId: string;
|
|
87
|
+
queueId?: string | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
database: import("node:sqlite").DatabaseSync;
|
|
90
|
+
claim: (validate?: (row: ReceiverQueueRow) => Promise<void>) => Promise<(LeasedWake & {
|
|
91
|
+
readonly id: number;
|
|
92
|
+
readonly token: string;
|
|
93
|
+
}) | undefined>;
|
|
94
|
+
currentRow: (id: number) => ReceiverQueueRow | undefined;
|
|
95
|
+
rows: () => readonly ReceiverQueueRow[];
|
|
96
|
+
append(wake: AdmittedWake): Promise<number>;
|
|
97
|
+
receiptQueueId(receipt: WakeAdmissionReceipt): number;
|
|
98
|
+
close: () => void;
|
|
99
|
+
pruneExpiredTokens(nowSeconds: number): number;
|
|
100
|
+
};
|
|
101
|
+
export type ReceiverAuthority = ReturnType<typeof openReceiverAuthority>;
|
|
102
|
+
//# sourceMappingURL=receiverAuthority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiverAuthority.d.ts","sourceRoot":"","sources":["../../src/receiverAuthority.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAAE,eAAe,EAAE,UAAU,EACnB,oBAAoB,EAAyB,SAAS,EAC7E,MAAM,iCAAiC,CAAA;AAQxC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAA;IACpD,QAAQ,CAAC,kBAAkB,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI,CAAA;IACrD,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CACvC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEjE;AAkCD,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA+LhB,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,KAAG,OAAO,CAAC,CAAC,UAAU,GAAG;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;qBAnBtI,MAAM,KAAG,gBAAgB,GAAG,SAAS;gBAG5C,SAAS,gBAAgB,EAAE;iBAiEvB,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;4BAIzB,oBAAoB,GAAG,MAAM;;mCAMtB,MAAM,GAAG,MAAM;EAKjD;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AdmittedWake } from '@xyo-network/event-kit-protocol';
|
|
2
|
+
import type { ReceiverMigrationOptions, ReceiverMigrationReport } from './receiverMigrationTypes.ts';
|
|
3
|
+
export type { FilesystemReceiverMigrationSource, ReceiverMigrationFile, ReceiverMigrationIssue, ReceiverMigrationOptions, ReceiverMigrationReport, ReceiverMigrationReview, ReceiverMigrationSource, SqliteQueueMigrationSource, } from './receiverMigrationTypes.ts';
|
|
4
|
+
/** Offline copy-only migration. Unknown history blocks target publication. */
|
|
5
|
+
export declare function migrateReceiverStore(options: ReceiverMigrationOptions): Promise<ReceiverMigrationReport>;
|
|
6
|
+
export interface LegacyIdOnlyReducerCheckpoint {
|
|
7
|
+
readonly appliedWakeIds: readonly string[];
|
|
8
|
+
readonly lastProcessedPosition: number;
|
|
9
|
+
}
|
|
10
|
+
export interface MigratedReducerCheckpoint {
|
|
11
|
+
readonly appliedWakes: readonly Pick<AdmittedWake, 'audience' | 'eventHash' | 'publisher' | 'wakeId'>[];
|
|
12
|
+
readonly lastProcessedPosition: number;
|
|
13
|
+
}
|
|
14
|
+
/** Requires one externally established exact scoped hash mapping for every historical ID. */
|
|
15
|
+
export declare function migrateIdOnlyReducerCheckpoint(checkpoint: LegacyIdOnlyReducerCheckpoint, mappings: MigratedReducerCheckpoint['appliedWakes']): MigratedReducerCheckpoint;
|
|
16
|
+
//# sourceMappingURL=receiverMigration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiverMigration.d.ts","sourceRoot":"","sources":["../../src/receiverMigration.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAUnE,OAAO,KAAK,EACqC,wBAAwB,EAAyB,uBAAuB,EACxH,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EACV,iCAAiC,EAAE,qBAAqB,EAAE,sBAAsB,EAChF,wBAAwB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,uBAAuB,EACnG,0BAA0B,GAC3B,MAAM,6BAA6B,CAAA;AA2KpC,8EAA8E;AAC9E,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAmB9G;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;CACvC;AACD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC,EAAE,CAAA;IACvG,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;CACvC;AAED,6FAA6F;AAC7F,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,6BAA6B,EACzC,QAAQ,EAAE,yBAAyB,CAAC,cAAc,CAAC,GAClD,yBAAyB,CAgB3B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WakeAdmissionReceipt } from '@xyo-network/event-kit-protocol';
|
|
2
|
+
import type { ReceiverMigrationFile, ReceiverMigrationPlan, ReceiverMigrationReview, ReceiverMigrationSource } from './receiverMigrationTypes.ts';
|
|
3
|
+
export declare function validateMigrationReceipt(receipt: WakeAdmissionReceipt): WakeAdmissionReceipt;
|
|
4
|
+
/** Inspects a disposable private copy only. Originals and exact-byte backups are never opened by SQLite. */
|
|
5
|
+
export declare function inventoryReceiverMigration(source: ReceiverMigrationSource, copiedRoot: string, files: readonly ReceiverMigrationFile[], reviews: readonly ReceiverMigrationReview[]): Promise<ReceiverMigrationPlan>;
|
|
6
|
+
//# sourceMappingURL=receiverMigrationInventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiverMigrationInventory.d.ts","sourceRoot":"","sources":["../../src/receiverMigrationInventory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAgB,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AASzF,OAAO,KAAK,EACuE,qBAAqB,EACtG,qBAAqB,EAA+B,uBAAuB,EAAE,uBAAuB,EACrG,MAAM,6BAA6B,CAAA;AAwBpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB,CAI5F;AA2MD,4GAA4G;AAC5G,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,uBAAuB,EAC/B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,SAAS,qBAAqB,EAAE,EACvC,OAAO,EAAE,SAAS,uBAAuB,EAAE,GAC1C,OAAO,CAAC,qBAAqB,CAAC,CAQhC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReceiverMigrationFile } from './receiverMigrationTypes.ts';
|
|
2
|
+
/** Refuse symlinks and escaping configuration rather than following other stores. */
|
|
3
|
+
export declare function migrationRelativePath(root: string, relative: string): string;
|
|
4
|
+
export declare function snapshotMigrationSource(root: string, destination?: string): Promise<readonly ReceiverMigrationFile[]>;
|
|
5
|
+
export declare function verifyMigrationSource(root: string, files: readonly ReceiverMigrationFile[]): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=receiverMigrationSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiverMigrationSnapshot.d.ts","sourceRoot":"","sources":["../../src/receiverMigrationSnapshot.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAExE,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK5E;AAkBD,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CA2B3H;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,qBAAqB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhH"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { AdmittedWake, WakeAdmissionReceipt } from '@xyo-network/event-kit-protocol';
|
|
2
|
+
export interface FilesystemReceiverMigrationSource {
|
|
3
|
+
readonly inboxDirectory: string;
|
|
4
|
+
readonly kind: 'filesystem';
|
|
5
|
+
/** Entire owned, stopped source store. Relative paths stay inside this root. */
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly queueDirectory: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SqliteQueueMigrationSource {
|
|
10
|
+
readonly databaseFile: string;
|
|
11
|
+
readonly kind: 'sqlite-queue';
|
|
12
|
+
readonly path: string;
|
|
13
|
+
/** Queue-only rows do not establish any admission receipt or grant. */
|
|
14
|
+
readonly scope: 'queue-only';
|
|
15
|
+
}
|
|
16
|
+
export type ReceiverMigrationSource = FilesystemReceiverMigrationSource | SqliteQueueMigrationSource;
|
|
17
|
+
export interface ReceiverMigrationReview {
|
|
18
|
+
readonly action: 'pending' | 'completed' | 'quarantine';
|
|
19
|
+
/** External acknowledgment/checkpoint or exact operator-reviewed mapping reference. */
|
|
20
|
+
readonly evidence: string;
|
|
21
|
+
/** Scoped identity digest from the dry-run report, or artifact:<relative path>. */
|
|
22
|
+
readonly identity: string;
|
|
23
|
+
/** New placement decision only when no matching original queue reference exists. */
|
|
24
|
+
readonly queueOrder?: {
|
|
25
|
+
readonly evidence: string;
|
|
26
|
+
readonly kind: 'after-known';
|
|
27
|
+
};
|
|
28
|
+
readonly receipt?: WakeAdmissionReceipt;
|
|
29
|
+
readonly wake?: AdmittedWake;
|
|
30
|
+
}
|
|
31
|
+
export interface ReceiverMigrationOptions {
|
|
32
|
+
readonly backupPath?: string;
|
|
33
|
+
/** Explicit assertion covering every writer and consumer of the source. */
|
|
34
|
+
readonly consumersStopped: true;
|
|
35
|
+
readonly dryRun?: boolean;
|
|
36
|
+
readonly reviews?: readonly ReceiverMigrationReview[];
|
|
37
|
+
readonly source: ReceiverMigrationSource;
|
|
38
|
+
readonly targetPath?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ReceiverMigrationFile {
|
|
41
|
+
readonly bytes: number;
|
|
42
|
+
readonly mode: number;
|
|
43
|
+
readonly path: string;
|
|
44
|
+
readonly sha256: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ReceiverMigrationIssue {
|
|
47
|
+
readonly identity: string;
|
|
48
|
+
readonly paths: readonly string[];
|
|
49
|
+
readonly reason: string;
|
|
50
|
+
}
|
|
51
|
+
export type ReceiverMigrationQueueOrder = {
|
|
52
|
+
readonly kind: 'filesystem-entry-name';
|
|
53
|
+
readonly name: string;
|
|
54
|
+
readonly path: string;
|
|
55
|
+
} | {
|
|
56
|
+
readonly id: number;
|
|
57
|
+
readonly kind: 'sqlite-row-id';
|
|
58
|
+
readonly path: string;
|
|
59
|
+
} | {
|
|
60
|
+
readonly evidence: string;
|
|
61
|
+
readonly kind: 'reviewed-after-known';
|
|
62
|
+
};
|
|
63
|
+
export interface ReceiverMigrationReport {
|
|
64
|
+
readonly backupPath?: string;
|
|
65
|
+
readonly completedIdentities: number;
|
|
66
|
+
readonly executed: boolean;
|
|
67
|
+
readonly files: readonly ReceiverMigrationFile[];
|
|
68
|
+
readonly pendingIdentities: number;
|
|
69
|
+
readonly quarantined: readonly ReceiverMigrationIssue[];
|
|
70
|
+
readonly ready: boolean;
|
|
71
|
+
readonly reviews: readonly Pick<ReceiverMigrationReview, 'action' | 'evidence' | 'identity' | 'queueOrder'>[];
|
|
72
|
+
readonly rollback: 'restore-backup-only-before-new-writers-resume; after-that-repair-forward; reverse-migration-unsupported';
|
|
73
|
+
readonly selected: readonly {
|
|
74
|
+
readonly completionProvenance?: 'Fresh reviewed migration tombstone; no historical lease or ack inferred';
|
|
75
|
+
readonly eventHash?: string;
|
|
76
|
+
readonly identity: string;
|
|
77
|
+
readonly paths: readonly string[];
|
|
78
|
+
/** Pending work preserves a recorded queue reference; metadata supplies no chronology. */
|
|
79
|
+
readonly queueOrder?: ReceiverMigrationQueueOrder;
|
|
80
|
+
readonly state: 'pending' | 'completed';
|
|
81
|
+
}[];
|
|
82
|
+
readonly sourceBytes: number;
|
|
83
|
+
readonly sourcePath: string;
|
|
84
|
+
readonly sourceUnchanged: true;
|
|
85
|
+
readonly targetPath?: string;
|
|
86
|
+
readonly tokenRecords: number;
|
|
87
|
+
readonly unknown: readonly ReceiverMigrationIssue[];
|
|
88
|
+
}
|
|
89
|
+
export interface LegacyMigrationToken {
|
|
90
|
+
readonly audience: string;
|
|
91
|
+
readonly eventHash: string;
|
|
92
|
+
readonly jwtId: string;
|
|
93
|
+
readonly publisher: string;
|
|
94
|
+
readonly receipt: WakeAdmissionReceipt;
|
|
95
|
+
readonly retainJwtUntil: number;
|
|
96
|
+
readonly wakeId: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ReceiverMigrationEntry {
|
|
99
|
+
readonly evidence: string;
|
|
100
|
+
readonly identity: string;
|
|
101
|
+
readonly paths: readonly string[];
|
|
102
|
+
readonly queueOrder?: ReceiverMigrationQueueOrder;
|
|
103
|
+
readonly receipt?: WakeAdmissionReceipt;
|
|
104
|
+
readonly state: 'pending' | 'completed';
|
|
105
|
+
readonly tokens: readonly LegacyMigrationToken[];
|
|
106
|
+
readonly wake?: AdmittedWake;
|
|
107
|
+
}
|
|
108
|
+
export interface ReceiverMigrationPlan {
|
|
109
|
+
readonly entries: readonly ReceiverMigrationEntry[];
|
|
110
|
+
readonly quarantined: readonly ReceiverMigrationIssue[];
|
|
111
|
+
readonly unknown: readonly ReceiverMigrationIssue[];
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=receiverMigrationTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiverMigrationTypes.d.ts","sourceRoot":"","sources":["../../src/receiverMigrationTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEzF,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAAG,iCAAiC,GAAG,0BAA0B,CAAA;AAEpG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;IACvD,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAA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