@opendatalabs/personal-server-ts-lite 0.0.1-canary.c157dcf → 0.0.1-canary.c1948f1
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/account-mode-store.d.ts +11 -0
- package/dist/account-mode-store.d.ts.map +1 -0
- package/dist/account-mode-store.js +68 -0
- package/dist/account-mode-store.js.map +1 -0
- package/dist/additions-worker.bundle.js +113 -24
- package/dist/bridge.d.ts +3 -0
- package/dist/bridge.d.ts.map +1 -1
- package/dist/bridge.js +4 -0
- package/dist/bridge.js.map +1 -1
- package/dist/browser-runtime.d.ts +80 -21
- package/dist/browser-runtime.d.ts.map +1 -1
- package/dist/browser-runtime.js +124 -25
- package/dist/browser-runtime.js.map +1 -1
- package/dist/browser-tls-rustls/browser_tls_rustls_bg.wasm +0 -0
- package/dist/client.d.ts +37 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +129 -115
- package/dist/client.js.map +1 -1
- package/dist/history-probe-worker.bundle.js +15 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/localdb-port.d.ts +28 -0
- package/dist/localdb-port.d.ts.map +1 -0
- package/dist/localdb-port.js +30 -0
- package/dist/localdb-port.js.map +1 -0
- package/dist/mcp-store.d.ts.map +1 -1
- package/dist/mcp-store.js +4 -3
- package/dist/mcp-store.js.map +1 -1
- package/dist/owner-request.d.ts +16 -0
- package/dist/owner-request.d.ts.map +1 -0
- package/dist/owner-request.js +37 -0
- package/dist/owner-request.js.map +1 -0
- package/dist/pdpp-records.d.ts +18 -0
- package/dist/pdpp-records.d.ts.map +1 -0
- package/dist/pdpp-records.js +105 -0
- package/dist/pdpp-records.js.map +1 -0
- package/dist/persistence.d.ts +1 -1
- package/dist/persistence.d.ts.map +1 -1
- package/dist/persistence.js +2 -2
- package/dist/persistence.js.map +1 -1
- package/dist/personal-server-client.d.ts +32 -0
- package/dist/personal-server-client.d.ts.map +1 -0
- package/dist/personal-server-client.js +57 -0
- package/dist/personal-server-client.js.map +1 -0
- package/dist/pull-signals.d.ts +52 -0
- package/dist/pull-signals.d.ts.map +1 -0
- package/dist/pull-signals.js +142 -0
- package/dist/pull-signals.js.map +1 -0
- package/dist/relay.d.ts +89 -1
- package/dist/relay.d.ts.map +1 -1
- package/dist/relay.js +408 -24
- package/dist/relay.js.map +1 -1
- package/dist/runtime.d.ts +29 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +317 -15
- package/dist/runtime.js.map +1 -1
- package/dist/seed-staging.d.ts +8 -0
- package/dist/seed-staging.d.ts.map +1 -0
- package/dist/seed-staging.js +106 -0
- package/dist/seed-staging.js.map +1 -0
- package/dist/state.d.ts +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js.map +1 -1
- package/dist/storage.d.ts +26 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +194 -108
- package/dist/storage.js.map +1 -1
- package/dist/stream-sync-budget.d.ts +3 -0
- package/dist/stream-sync-budget.d.ts.map +1 -0
- package/dist/stream-sync-budget.js +3 -0
- package/dist/stream-sync-budget.js.map +1 -0
- package/dist/sync.d.ts +47 -31
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +166 -84
- package/dist/sync.js.map +1 -1
- package/dist/wasm-stream-crypto.d.ts +20 -0
- package/dist/wasm-stream-crypto.d.ts.map +1 -0
- package/dist/wasm-stream-crypto.js +53 -0
- package/dist/wasm-stream-crypto.js.map +1 -0
- package/package.json +10 -3
- package/dist/stream-sync-files.d.ts +0 -54
- package/dist/stream-sync-files.d.ts.map +0 -1
- package/dist/stream-sync-files.js +0 -316
- package/dist/stream-sync-files.js.map +0 -1
- package/dist/stream-sync-read-cache-files.d.ts +0 -5
- package/dist/stream-sync-read-cache-files.d.ts.map +0 -1
- package/dist/stream-sync-read-cache-files.js +0 -19
- package/dist/stream-sync-read-cache-files.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable per-owner mode records for Web PS Lite, in their own IndexedDB
|
|
3
|
+
* database, never in the data database: clearing or rebuilding the data store
|
|
4
|
+
* must not unset an owner's On. One object store keyed by owner. A save
|
|
5
|
+
* resolves only when its transaction completes. Only the newest tab runs the
|
|
6
|
+
* server, so there is no cross-tab lock.
|
|
7
|
+
*/
|
|
8
|
+
import { type ModeRecordStore } from "@opendatalabs/personal-server-ts-core/sync/account-mode";
|
|
9
|
+
export declare const ACCOUNT_MODE_DB_NAME = "personal-server-lite-account-mode";
|
|
10
|
+
export declare function createIndexedDbModeRecordStore(dbName?: string): ModeRecordStore;
|
|
11
|
+
//# sourceMappingURL=account-mode-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-mode-store.d.ts","sourceRoot":"","sources":["../src/account-mode-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yDAAyD,CAAC;AAEjE,eAAO,MAAM,oBAAoB,sCAAsC,CAAC;AAkBxE,wBAAgB,8BAA8B,CAC5C,MAAM,GAAE,MAA6B,GACpC,eAAe,CAwCjB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable per-owner mode records for Web PS Lite, in their own IndexedDB
|
|
3
|
+
* database, never in the data database: clearing or rebuilding the data store
|
|
4
|
+
* must not unset an owner's On. One object store keyed by owner. A save
|
|
5
|
+
* resolves only when its transaction completes. Only the newest tab runs the
|
|
6
|
+
* server, so there is no cross-tab lock.
|
|
7
|
+
*/
|
|
8
|
+
import { parseRecord, } from "@opendatalabs/personal-server-ts-core/sync/account-mode";
|
|
9
|
+
export const ACCOUNT_MODE_DB_NAME = "personal-server-lite-account-mode";
|
|
10
|
+
const STORE = "owners";
|
|
11
|
+
function openDb(dbName) {
|
|
12
|
+
if (typeof indexedDB === "undefined") {
|
|
13
|
+
return Promise.reject(new Error("IndexedDB is not available"));
|
|
14
|
+
}
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const request = indexedDB.open(dbName, 1);
|
|
17
|
+
request.onupgradeneeded = () => {
|
|
18
|
+
request.result.createObjectStore(STORE, { keyPath: "owner" });
|
|
19
|
+
};
|
|
20
|
+
request.onsuccess = () => resolve(request.result);
|
|
21
|
+
request.onerror = () => reject(request.error ?? new Error("open failed"));
|
|
22
|
+
request.onblocked = () => reject(new Error("open blocked"));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function createIndexedDbModeRecordStore(dbName = ACCOUNT_MODE_DB_NAME) {
|
|
26
|
+
return {
|
|
27
|
+
async load() {
|
|
28
|
+
const db = await openDb(dbName);
|
|
29
|
+
try {
|
|
30
|
+
const rows = await new Promise((resolve, reject) => {
|
|
31
|
+
const request = db
|
|
32
|
+
.transaction(STORE, "readonly")
|
|
33
|
+
.objectStore(STORE)
|
|
34
|
+
.getAll();
|
|
35
|
+
request.onsuccess = () => resolve(request.result);
|
|
36
|
+
request.onerror = () => reject(request.error ?? new Error("read failed"));
|
|
37
|
+
});
|
|
38
|
+
const records = new Map();
|
|
39
|
+
for (const row of rows) {
|
|
40
|
+
const record = parseRecord(row);
|
|
41
|
+
const owner = row.owner;
|
|
42
|
+
if (record && typeof owner === "string")
|
|
43
|
+
records.set(owner, record);
|
|
44
|
+
}
|
|
45
|
+
return records;
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
db.close();
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
async save(owner, record) {
|
|
52
|
+
const db = await openDb(dbName);
|
|
53
|
+
try {
|
|
54
|
+
await new Promise((resolve, reject) => {
|
|
55
|
+
const tx = db.transaction(STORE, "readwrite");
|
|
56
|
+
tx.objectStore(STORE).put({ owner, ...record });
|
|
57
|
+
tx.oncomplete = () => resolve();
|
|
58
|
+
tx.onerror = () => reject(tx.error ?? new Error("write failed"));
|
|
59
|
+
tx.onabort = () => reject(tx.error ?? new Error("write aborted"));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
db.close();
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=account-mode-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-mode-store.js","sourceRoot":"","sources":["../src/account-mode-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,WAAW,GAGZ,MAAM,yDAAyD,CAAC;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AACxE,MAAM,KAAK,GAAG,QAAQ,CAAC;AAEvB,SAAS,MAAM,CAAC,MAAc;IAC5B,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,eAAe,GAAG,GAAG,EAAE;YAC7B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAChE,CAAC,CAAC;QACF,OAAO,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClD,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QAC1E,OAAO,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAA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,IAAI,CAAC;gBACH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC1C,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;oBAC9C,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;oBAChD,EAAE,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;oBAChC,EAAE,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;oBACjE,EAAE,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;gBACpE,CAAC,CAAC,CAAC;YACL,CAAC;oBAAS,CAAC;gBACT,EAAE,CAAC,KAAK,EAAE,CAAC;YACb,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -7067,8 +7067,8 @@ function Ql(e2, t2, r2) {
|
|
|
7067
7067
|
for (var n2 = 0; n2 < 16; n2++) e2[n2] = t2[n2] - r2[n2];
|
|
7068
7068
|
}
|
|
7069
7069
|
function Ml(e2, t2, r2) {
|
|
7070
|
-
var n2, i2, s2 = 0, a2 = 0, o2 = 0, c2 = 0, u2 = 0, h2 = 0, f2 = 0, l2 = 0, y2 = 0, g2 = 0, p2 = 0, d2 = 0, A2 = 0, w2 = 0, m2 = 0, b2 = 0, k2 = 0, E2 = 0, v2 = 0, I3 = 0, B2 = 0, S2 = 0, K2 = 0, C3 = 0, D2 = 0, U2 = 0, P3 = 0, x2 = 0, Q2 = 0, M3 = 0, R2 = 0, F2 = r2[0], T2 = r2[1], L4 = r2[2],
|
|
7071
|
-
s2 += (n2 = t2[0]) * F2, a2 += n2 * T2, o2 += n2 * L4, c2 += n2 *
|
|
7070
|
+
var n2, i2, s2 = 0, a2 = 0, o2 = 0, c2 = 0, u2 = 0, h2 = 0, f2 = 0, l2 = 0, y2 = 0, g2 = 0, p2 = 0, d2 = 0, A2 = 0, w2 = 0, m2 = 0, b2 = 0, k2 = 0, E2 = 0, v2 = 0, I3 = 0, B2 = 0, S2 = 0, K2 = 0, C3 = 0, D2 = 0, U2 = 0, P3 = 0, x2 = 0, Q2 = 0, M3 = 0, R2 = 0, F2 = r2[0], T2 = r2[1], L4 = r2[2], N4 = r2[3], O2 = r2[4], H2 = r2[5], z3 = r2[6], G3 = r2[7], j2 = r2[8], V2 = r2[9], q2 = r2[10], _2 = r2[11], Y2 = r2[12], Z2 = r2[13], J2 = r2[14], W3 = r2[15];
|
|
7071
|
+
s2 += (n2 = t2[0]) * F2, a2 += n2 * T2, o2 += n2 * L4, c2 += n2 * N4, u2 += n2 * O2, h2 += n2 * H2, f2 += n2 * z3, l2 += n2 * G3, y2 += n2 * j2, g2 += n2 * V2, p2 += n2 * q2, d2 += n2 * _2, A2 += n2 * Y2, w2 += n2 * Z2, m2 += n2 * J2, b2 += n2 * W3, a2 += (n2 = t2[1]) * F2, o2 += n2 * T2, c2 += n2 * L4, u2 += n2 * N4, h2 += n2 * O2, f2 += n2 * H2, l2 += n2 * z3, y2 += n2 * G3, g2 += n2 * j2, p2 += n2 * V2, d2 += n2 * q2, A2 += n2 * _2, w2 += n2 * Y2, m2 += n2 * Z2, b2 += n2 * J2, k2 += n2 * W3, o2 += (n2 = t2[2]) * F2, c2 += n2 * T2, u2 += n2 * L4, h2 += n2 * N4, f2 += n2 * O2, l2 += n2 * H2, y2 += n2 * z3, g2 += n2 * G3, p2 += n2 * j2, d2 += n2 * V2, A2 += n2 * q2, w2 += n2 * _2, m2 += n2 * Y2, b2 += n2 * Z2, k2 += n2 * J2, E2 += n2 * W3, c2 += (n2 = t2[3]) * F2, u2 += n2 * T2, h2 += n2 * L4, f2 += n2 * N4, l2 += n2 * O2, y2 += n2 * H2, g2 += n2 * z3, p2 += n2 * G3, d2 += n2 * j2, A2 += n2 * V2, w2 += n2 * q2, m2 += n2 * _2, b2 += n2 * Y2, k2 += n2 * Z2, E2 += n2 * J2, v2 += n2 * W3, u2 += (n2 = t2[4]) * F2, h2 += n2 * T2, f2 += n2 * L4, l2 += n2 * N4, y2 += n2 * O2, g2 += n2 * H2, p2 += n2 * z3, d2 += n2 * G3, A2 += n2 * j2, w2 += n2 * V2, m2 += n2 * q2, b2 += n2 * _2, k2 += n2 * Y2, E2 += n2 * Z2, v2 += n2 * J2, I3 += n2 * W3, h2 += (n2 = t2[5]) * F2, f2 += n2 * T2, l2 += n2 * L4, y2 += n2 * N4, g2 += n2 * O2, p2 += n2 * H2, d2 += n2 * z3, A2 += n2 * G3, w2 += n2 * j2, m2 += n2 * V2, b2 += n2 * q2, k2 += n2 * _2, E2 += n2 * Y2, v2 += n2 * Z2, I3 += n2 * J2, B2 += n2 * W3, f2 += (n2 = t2[6]) * F2, l2 += n2 * T2, y2 += n2 * L4, g2 += n2 * N4, p2 += n2 * O2, d2 += n2 * H2, A2 += n2 * z3, w2 += n2 * G3, m2 += n2 * j2, b2 += n2 * V2, k2 += n2 * q2, E2 += n2 * _2, v2 += n2 * Y2, I3 += n2 * Z2, B2 += n2 * J2, S2 += n2 * W3, l2 += (n2 = t2[7]) * F2, y2 += n2 * T2, g2 += n2 * L4, p2 += n2 * N4, d2 += n2 * O2, A2 += n2 * H2, w2 += n2 * z3, m2 += n2 * G3, b2 += n2 * j2, k2 += n2 * V2, E2 += n2 * q2, v2 += n2 * _2, I3 += n2 * Y2, B2 += n2 * Z2, S2 += n2 * J2, K2 += n2 * W3, y2 += (n2 = t2[8]) * F2, g2 += n2 * T2, p2 += n2 * L4, d2 += n2 * N4, A2 += n2 * O2, w2 += n2 * H2, m2 += n2 * z3, b2 += n2 * G3, k2 += n2 * j2, E2 += n2 * V2, v2 += n2 * q2, I3 += n2 * _2, B2 += n2 * Y2, S2 += n2 * Z2, K2 += n2 * J2, C3 += n2 * W3, g2 += (n2 = t2[9]) * F2, p2 += n2 * T2, d2 += n2 * L4, A2 += n2 * N4, w2 += n2 * O2, m2 += n2 * H2, b2 += n2 * z3, k2 += n2 * G3, E2 += n2 * j2, v2 += n2 * V2, I3 += n2 * q2, B2 += n2 * _2, S2 += n2 * Y2, K2 += n2 * Z2, C3 += n2 * J2, D2 += n2 * W3, p2 += (n2 = t2[10]) * F2, d2 += n2 * T2, A2 += n2 * L4, w2 += n2 * N4, m2 += n2 * O2, b2 += n2 * H2, k2 += n2 * z3, E2 += n2 * G3, v2 += n2 * j2, I3 += n2 * V2, B2 += n2 * q2, S2 += n2 * _2, K2 += n2 * Y2, C3 += n2 * Z2, D2 += n2 * J2, U2 += n2 * W3, d2 += (n2 = t2[11]) * F2, A2 += n2 * T2, w2 += n2 * L4, m2 += n2 * N4, b2 += n2 * O2, k2 += n2 * H2, E2 += n2 * z3, v2 += n2 * G3, I3 += n2 * j2, B2 += n2 * V2, S2 += n2 * q2, K2 += n2 * _2, C3 += n2 * Y2, D2 += n2 * Z2, U2 += n2 * J2, P3 += n2 * W3, A2 += (n2 = t2[12]) * F2, w2 += n2 * T2, m2 += n2 * L4, b2 += n2 * N4, k2 += n2 * O2, E2 += n2 * H2, v2 += n2 * z3, I3 += n2 * G3, B2 += n2 * j2, S2 += n2 * V2, K2 += n2 * q2, C3 += n2 * _2, D2 += n2 * Y2, U2 += n2 * Z2, P3 += n2 * J2, x2 += n2 * W3, w2 += (n2 = t2[13]) * F2, m2 += n2 * T2, b2 += n2 * L4, k2 += n2 * N4, E2 += n2 * O2, v2 += n2 * H2, I3 += n2 * z3, B2 += n2 * G3, S2 += n2 * j2, K2 += n2 * V2, C3 += n2 * q2, D2 += n2 * _2, U2 += n2 * Y2, P3 += n2 * Z2, x2 += n2 * J2, Q2 += n2 * W3, m2 += (n2 = t2[14]) * F2, b2 += n2 * T2, k2 += n2 * L4, E2 += n2 * N4, v2 += n2 * O2, I3 += n2 * H2, B2 += n2 * z3, S2 += n2 * G3, K2 += n2 * j2, C3 += n2 * V2, D2 += n2 * q2, U2 += n2 * _2, P3 += n2 * Y2, x2 += n2 * Z2, Q2 += n2 * J2, M3 += n2 * W3, b2 += (n2 = t2[15]) * F2, a2 += 38 * (E2 += n2 * L4), o2 += 38 * (v2 += n2 * N4), c2 += 38 * (I3 += n2 * O2), u2 += 38 * (B2 += n2 * H2), h2 += 38 * (S2 += n2 * z3), f2 += 38 * (K2 += n2 * G3), l2 += 38 * (C3 += n2 * j2), y2 += 38 * (D2 += n2 * V2), g2 += 38 * (U2 += n2 * q2), p2 += 38 * (P3 += n2 * _2), d2 += 38 * (x2 += n2 * Y2), A2 += 38 * (Q2 += n2 * Z2), w2 += 38 * (M3 += n2 * J2), m2 += 38 * (R2 += n2 * W3), s2 = (n2 = (s2 += 38 * (k2 += n2 * T2)) + (i2 = 1) + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), a2 = (n2 = a2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), o2 = (n2 = o2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), c2 = (n2 = c2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), u2 = (n2 = u2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), h2 = (n2 = h2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), f2 = (n2 = f2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), l2 = (n2 = l2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), y2 = (n2 = y2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), g2 = (n2 = g2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), p2 = (n2 = p2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), d2 = (n2 = d2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), A2 = (n2 = A2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), w2 = (n2 = w2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), m2 = (n2 = m2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), b2 = (n2 = b2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), s2 = (n2 = (s2 += i2 - 1 + 37 * (i2 - 1)) + (i2 = 1) + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), a2 = (n2 = a2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), o2 = (n2 = o2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), c2 = (n2 = c2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), u2 = (n2 = u2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), h2 = (n2 = h2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), f2 = (n2 = f2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), l2 = (n2 = l2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), y2 = (n2 = y2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), g2 = (n2 = g2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), p2 = (n2 = p2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), d2 = (n2 = d2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), A2 = (n2 = A2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), w2 = (n2 = w2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), m2 = (n2 = m2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), b2 = (n2 = b2 + i2 + 65535) - 65536 * (i2 = Math.floor(n2 / 65536)), s2 += i2 - 1 + 37 * (i2 - 1), e2[0] = s2, e2[1] = a2, e2[2] = o2, e2[3] = c2, e2[4] = u2, e2[5] = h2, e2[6] = f2, e2[7] = l2, e2[8] = y2, e2[9] = g2, e2[10] = p2, e2[11] = d2, e2[12] = A2, e2[13] = w2, e2[14] = m2, e2[15] = b2;
|
|
7072
7072
|
}
|
|
7073
7073
|
function Rl(e2, t2) {
|
|
7074
7074
|
Ml(e2, t2, t2);
|
|
@@ -7092,10 +7092,10 @@ function Ll(e2, t2) {
|
|
|
7092
7092
|
return Tl(e2, t2, gl);
|
|
7093
7093
|
}
|
|
7094
7094
|
function Ol(e2, t2, r2, n2) {
|
|
7095
|
-
for (var i2, s2, a2, o2, c2, u2, h2, f2, l2, y2, g2, p2, d2, A2, w2, m2, b2, k2, E2, v2, I3, B2, S2, K2, C3, D2, U2 = new Int32Array(16), P3 = new Int32Array(16), x2 = e2[0], Q2 = e2[1], M3 = e2[2], R2 = e2[3], F2 = e2[4], T2 = e2[5], L4 = e2[6],
|
|
7095
|
+
for (var i2, s2, a2, o2, c2, u2, h2, f2, l2, y2, g2, p2, d2, A2, w2, m2, b2, k2, E2, v2, I3, B2, S2, K2, C3, D2, U2 = new Int32Array(16), P3 = new Int32Array(16), x2 = e2[0], Q2 = e2[1], M3 = e2[2], R2 = e2[3], F2 = e2[4], T2 = e2[5], L4 = e2[6], N4 = e2[7], O2 = t2[0], H2 = t2[1], z3 = t2[2], G3 = t2[3], j2 = t2[4], V2 = t2[5], q2 = t2[6], _2 = t2[7], Y2 = 0; n2 >= 128; ) {
|
|
7096
7096
|
for (E2 = 0; E2 < 16; E2++) v2 = 8 * E2 + Y2, U2[E2] = r2[v2 + 0] << 24 | r2[v2 + 1] << 16 | r2[v2 + 2] << 8 | r2[v2 + 3], P3[E2] = r2[v2 + 4] << 24 | r2[v2 + 5] << 16 | r2[v2 + 6] << 8 | r2[v2 + 7];
|
|
7097
|
-
for (E2 = 0; E2 < 80; E2++) if (i2 = x2, s2 = Q2, a2 = M3, o2 = R2, c2 = F2, u2 = T2, h2 = L4,
|
|
7098
|
-
S2 = 65535 & (B2 = O2), K2 = B2 >>> 16, C3 = 65535 & (I3 = x2), D2 = I3 >>> 16, I3 = e2[0], K2 += (B2 = t2[0]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[0] = x2 = 65535 & C3 | D2 << 16, t2[0] = O2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = H2), K2 = B2 >>> 16, C3 = 65535 & (I3 = Q2), D2 = I3 >>> 16, I3 = e2[1], K2 += (B2 = t2[1]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[1] = Q2 = 65535 & C3 | D2 << 16, t2[1] = H2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = z3), K2 = B2 >>> 16, C3 = 65535 & (I3 = M3), D2 = I3 >>> 16, I3 = e2[2], K2 += (B2 = t2[2]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[2] = M3 = 65535 & C3 | D2 << 16, t2[2] = z3 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = G3), K2 = B2 >>> 16, C3 = 65535 & (I3 = R2), D2 = I3 >>> 16, I3 = e2[3], K2 += (B2 = t2[3]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[3] = R2 = 65535 & C3 | D2 << 16, t2[3] = G3 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = j2), K2 = B2 >>> 16, C3 = 65535 & (I3 = F2), D2 = I3 >>> 16, I3 = e2[4], K2 += (B2 = t2[4]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[4] = F2 = 65535 & C3 | D2 << 16, t2[4] = j2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = V2), K2 = B2 >>> 16, C3 = 65535 & (I3 = T2), D2 = I3 >>> 16, I3 = e2[5], K2 += (B2 = t2[5]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[5] = T2 = 65535 & C3 | D2 << 16, t2[5] = V2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = q2), K2 = B2 >>> 16, C3 = 65535 & (I3 = L4), D2 = I3 >>> 16, I3 = e2[6], K2 += (B2 = t2[6]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[6] = L4 = 65535 & C3 | D2 << 16, t2[6] = q2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = _2), K2 = B2 >>> 16, C3 = 65535 & (I3 =
|
|
7097
|
+
for (E2 = 0; E2 < 80; E2++) if (i2 = x2, s2 = Q2, a2 = M3, o2 = R2, c2 = F2, u2 = T2, h2 = L4, N4, l2 = O2, y2 = H2, g2 = z3, p2 = G3, d2 = j2, A2 = V2, w2 = q2, _2, S2 = 65535 & (B2 = _2), K2 = B2 >>> 16, C3 = 65535 & (I3 = N4), D2 = I3 >>> 16, S2 += 65535 & (B2 = (j2 >>> 14 | F2 << 18) ^ (j2 >>> 18 | F2 << 14) ^ (F2 >>> 9 | j2 << 23)), K2 += B2 >>> 16, C3 += 65535 & (I3 = (F2 >>> 14 | j2 << 18) ^ (F2 >>> 18 | j2 << 14) ^ (j2 >>> 9 | F2 << 23)), D2 += I3 >>> 16, S2 += 65535 & (B2 = j2 & V2 ^ ~j2 & q2), K2 += B2 >>> 16, C3 += 65535 & (I3 = F2 & T2 ^ ~F2 & L4), D2 += I3 >>> 16, S2 += 65535 & (B2 = Nl[2 * E2 + 1]), K2 += B2 >>> 16, C3 += 65535 & (I3 = Nl[2 * E2]), D2 += I3 >>> 16, I3 = U2[E2 % 16], K2 += (B2 = P3[E2 % 16]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16, S2 = 65535 & (B2 = k2 = 65535 & S2 | K2 << 16), K2 = B2 >>> 16, C3 = 65535 & (I3 = b2 = 65535 & C3 | (D2 += C3 >>> 16) << 16), D2 = I3 >>> 16, S2 += 65535 & (B2 = (O2 >>> 28 | x2 << 4) ^ (x2 >>> 2 | O2 << 30) ^ (x2 >>> 7 | O2 << 25)), K2 += B2 >>> 16, C3 += 65535 & (I3 = (x2 >>> 28 | O2 << 4) ^ (O2 >>> 2 | x2 << 30) ^ (O2 >>> 7 | x2 << 25)), D2 += I3 >>> 16, K2 += (B2 = O2 & H2 ^ O2 & z3 ^ H2 & z3) >>> 16, C3 += 65535 & (I3 = x2 & Q2 ^ x2 & M3 ^ Q2 & M3), D2 += I3 >>> 16, f2 = 65535 & (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) | (D2 += C3 >>> 16) << 16, m2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = p2), K2 = B2 >>> 16, C3 = 65535 & (I3 = o2), D2 = I3 >>> 16, K2 += (B2 = k2) >>> 16, C3 += 65535 & (I3 = b2), D2 += I3 >>> 16, Q2 = i2, M3 = s2, R2 = a2, F2 = o2 = 65535 & (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) | (D2 += C3 >>> 16) << 16, T2 = c2, L4 = u2, N4 = h2, x2 = f2, H2 = l2, z3 = y2, G3 = g2, j2 = p2 = 65535 & S2 | K2 << 16, V2 = d2, q2 = A2, _2 = w2, O2 = m2, E2 % 16 == 15) for (v2 = 0; v2 < 16; v2++) I3 = U2[v2], S2 = 65535 & (B2 = P3[v2]), K2 = B2 >>> 16, C3 = 65535 & I3, D2 = I3 >>> 16, I3 = U2[(v2 + 9) % 16], S2 += 65535 & (B2 = P3[(v2 + 9) % 16]), K2 += B2 >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, b2 = U2[(v2 + 1) % 16], S2 += 65535 & (B2 = ((k2 = P3[(v2 + 1) % 16]) >>> 1 | b2 << 31) ^ (k2 >>> 8 | b2 << 24) ^ (k2 >>> 7 | b2 << 25)), K2 += B2 >>> 16, C3 += 65535 & (I3 = (b2 >>> 1 | k2 << 31) ^ (b2 >>> 8 | k2 << 24) ^ b2 >>> 7), D2 += I3 >>> 16, b2 = U2[(v2 + 14) % 16], K2 += (B2 = ((k2 = P3[(v2 + 14) % 16]) >>> 19 | b2 << 13) ^ (b2 >>> 29 | k2 << 3) ^ (k2 >>> 6 | b2 << 26)) >>> 16, C3 += 65535 & (I3 = (b2 >>> 19 | k2 << 13) ^ (k2 >>> 29 | b2 << 3) ^ b2 >>> 6), D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, U2[v2] = 65535 & C3 | D2 << 16, P3[v2] = 65535 & S2 | K2 << 16;
|
|
7098
|
+
S2 = 65535 & (B2 = O2), K2 = B2 >>> 16, C3 = 65535 & (I3 = x2), D2 = I3 >>> 16, I3 = e2[0], K2 += (B2 = t2[0]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[0] = x2 = 65535 & C3 | D2 << 16, t2[0] = O2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = H2), K2 = B2 >>> 16, C3 = 65535 & (I3 = Q2), D2 = I3 >>> 16, I3 = e2[1], K2 += (B2 = t2[1]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[1] = Q2 = 65535 & C3 | D2 << 16, t2[1] = H2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = z3), K2 = B2 >>> 16, C3 = 65535 & (I3 = M3), D2 = I3 >>> 16, I3 = e2[2], K2 += (B2 = t2[2]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[2] = M3 = 65535 & C3 | D2 << 16, t2[2] = z3 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = G3), K2 = B2 >>> 16, C3 = 65535 & (I3 = R2), D2 = I3 >>> 16, I3 = e2[3], K2 += (B2 = t2[3]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[3] = R2 = 65535 & C3 | D2 << 16, t2[3] = G3 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = j2), K2 = B2 >>> 16, C3 = 65535 & (I3 = F2), D2 = I3 >>> 16, I3 = e2[4], K2 += (B2 = t2[4]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[4] = F2 = 65535 & C3 | D2 << 16, t2[4] = j2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = V2), K2 = B2 >>> 16, C3 = 65535 & (I3 = T2), D2 = I3 >>> 16, I3 = e2[5], K2 += (B2 = t2[5]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[5] = T2 = 65535 & C3 | D2 << 16, t2[5] = V2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = q2), K2 = B2 >>> 16, C3 = 65535 & (I3 = L4), D2 = I3 >>> 16, I3 = e2[6], K2 += (B2 = t2[6]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[6] = L4 = 65535 & C3 | D2 << 16, t2[6] = q2 = 65535 & S2 | K2 << 16, S2 = 65535 & (B2 = _2), K2 = B2 >>> 16, C3 = 65535 & (I3 = N4), D2 = I3 >>> 16, I3 = e2[7], K2 += (B2 = t2[7]) >>> 16, C3 += 65535 & I3, D2 += I3 >>> 16, D2 += (C3 += (K2 += (S2 += 65535 & B2) >>> 16) >>> 16) >>> 16, e2[7] = N4 = 65535 & C3 | D2 << 16, t2[7] = _2 = 65535 & S2 | K2 << 16, Y2 += 128, n2 -= 128;
|
|
7099
7099
|
}
|
|
7100
7100
|
return n2;
|
|
7101
7101
|
}
|
|
@@ -8815,10 +8815,10 @@ var init_openpgp_min = __esm({
|
|
|
8815
8815
|
for (I3 = 0; I3 < C3; ++I3) ys(t2, h2 + 3 * I3, S2[zi[I3]]);
|
|
8816
8816
|
h2 += 3 * C3;
|
|
8817
8817
|
for (var T2 = [w2, k2], L4 = 0; L4 < 2; ++L4) {
|
|
8818
|
-
var
|
|
8819
|
-
for (I3 = 0; I3 <
|
|
8820
|
-
var O2 = 31 &
|
|
8821
|
-
ys(t2, h2, F2[O2]), h2 += S2[O2], O2 > 15 && (ys(t2, h2,
|
|
8818
|
+
var N4 = T2[L4];
|
|
8819
|
+
for (I3 = 0; I3 < N4.length; ++I3) {
|
|
8820
|
+
var O2 = 31 & N4[I3];
|
|
8821
|
+
ys(t2, h2, F2[O2]), h2 += S2[O2], O2 > 15 && (ys(t2, h2, N4[I3] >> 5 & 127), h2 += N4[I3] >> 12);
|
|
8822
8822
|
}
|
|
8823
8823
|
}
|
|
8824
8824
|
} else D2 = rs, U2 = es, P3 = is, x2 = ts;
|
|
@@ -8867,7 +8867,7 @@ var init_openpgp_min = __esm({
|
|
|
8867
8867
|
for (Q2 = 0; Q2 < 30; ++Q2) E2[Q2] = 0;
|
|
8868
8868
|
}
|
|
8869
8869
|
var M3 = 2, R2 = 0, F2 = y2, T2 = U2 - P3 & 32767;
|
|
8870
|
-
if (x2 > 2 && D2 == m2(B2 - T2)) for (var L4 = Math.min(l2, x2) - 1,
|
|
8870
|
+
if (x2 > 2 && D2 == m2(B2 - T2)) for (var L4 = Math.min(l2, x2) - 1, N4 = Math.min(32767, B2), O2 = Math.min(258, x2); T2 <= N4 && --F2 && U2 != P3; ) {
|
|
8871
8871
|
if (e3[B2 + M3] == e3[B2 + M3 - T2]) {
|
|
8872
8872
|
for (var H2 = 0; H2 < O2 && e3[B2 + H2] == e3[B2 + H2 - T2]; ++H2) ;
|
|
8873
8873
|
if (H2 > M3) {
|
|
@@ -9004,10 +9004,10 @@ var init_openpgp_min = __esm({
|
|
|
9004
9004
|
T2 = h2, l2 = null;
|
|
9005
9005
|
break;
|
|
9006
9006
|
}
|
|
9007
|
-
var
|
|
9007
|
+
var N4 = L4 - 254;
|
|
9008
9008
|
if (L4 > 264) {
|
|
9009
9009
|
var O2 = Oi[B2 = L4 - 257];
|
|
9010
|
-
|
|
9010
|
+
N4 = os(e4, h2, (1 << O2) - 1) + Vi[B2], h2 += O2;
|
|
9011
9011
|
}
|
|
9012
9012
|
var H2 = y2[cs(e4, h2) & F2], z3 = H2 >> 4;
|
|
9013
9013
|
if (H2 || ls(3), h2 += 15 & H2, M3 = Yi[z3], z3 > 3 && (O2 = Hi[z3], M3 += cs(e4, h2) & (1 << O2) - 1, h2 += O2), h2 > d2) {
|
|
@@ -9015,7 +9015,7 @@ var init_openpgp_min = __esm({
|
|
|
9015
9015
|
break;
|
|
9016
9016
|
}
|
|
9017
9017
|
a2 && c2(f2 + 131072);
|
|
9018
|
-
var G3 = f2 +
|
|
9018
|
+
var G3 = f2 + N4;
|
|
9019
9019
|
if (f2 < M3) {
|
|
9020
9020
|
var j2 = 0 - M3, V2 = Math.min(M3, G3);
|
|
9021
9021
|
for (j2 + f2 < 0 && ls(3); f2 < V2; ++f2) r3[f2] = n2[j2 + f2];
|
|
@@ -29796,6 +29796,7 @@ async function publishPreparedVersion(options) {
|
|
|
29796
29796
|
});
|
|
29797
29797
|
let head = fence ? fence.head : options.head;
|
|
29798
29798
|
await options.checkHead?.(head ?? null);
|
|
29799
|
+
const sealed = (write) => options.legacyWriteSeal ? options.legacyWriteSeal.commit(write) : write();
|
|
29799
29800
|
function requireFence(reason) {
|
|
29800
29801
|
if (!fence)
|
|
29801
29802
|
throw new NeedsFencedPublicationError(scope, reason);
|
|
@@ -29854,13 +29855,13 @@ async function publishPreparedVersion(options) {
|
|
|
29854
29855
|
let id;
|
|
29855
29856
|
if (fencedPublication) {
|
|
29856
29857
|
const previous = requireFence("registration/adoption");
|
|
29857
|
-
const result = await fencedPublication.commit({
|
|
29858
|
+
const result = await sealed(() => fencedPublication.commit({
|
|
29858
29859
|
...request,
|
|
29859
29860
|
...lineageFields,
|
|
29860
29861
|
mode,
|
|
29861
29862
|
fence: previous,
|
|
29862
29863
|
signal
|
|
29863
|
-
});
|
|
29864
|
+
}));
|
|
29864
29865
|
const registered = result.fence.head;
|
|
29865
29866
|
if (result.fence.generation !== previous.generation || !registered || isDeleted(registered) || registered.expectedVersion !== String(version5) || !sameHash(registered.dataHash, value.dataHash) || !sameHash(registered.metadataHash, value.metadataHash) || registered.id !== result.dataPointId)
|
|
29866
29867
|
throw new Error("Gateway returned inconsistent publication evidence");
|
|
@@ -29870,7 +29871,7 @@ async function publishPreparedVersion(options) {
|
|
|
29870
29871
|
} else if (mode === "adopt") {
|
|
29871
29872
|
id = head?.id;
|
|
29872
29873
|
} else {
|
|
29873
|
-
const result = lineageFields ?
|
|
29874
|
+
const result = await sealed(() => lineageFields ? options.lineageGateway.registerDataPoint({ ...request, ...lineageFields }, ...opts) : options.gateway.registerDataPoint(request, ...opts));
|
|
29874
29875
|
id = result.dataPointId;
|
|
29875
29876
|
}
|
|
29876
29877
|
if (!id)
|
|
@@ -29898,7 +29899,7 @@ async function publishPreparedVersion(options) {
|
|
|
29898
29899
|
throw new Error("Missing committed blob cannot be healed: metadata commitment mismatch");
|
|
29899
29900
|
checkpoint();
|
|
29900
29901
|
try {
|
|
29901
|
-
await storageAdapter.upload(`${scope}/${version4}`, encrypted, ...sig);
|
|
29902
|
+
await sealed(() => storageAdapter.upload(`${scope}/${version4}`, encrypted, ...sig));
|
|
29902
29903
|
} catch (error51) {
|
|
29903
29904
|
if (!(error51 instanceof StoredBlobConflictError))
|
|
29904
29905
|
throw error51;
|
|
@@ -29915,7 +29916,7 @@ async function publishPreparedVersion(options) {
|
|
|
29915
29916
|
version4 = BigInt(head.expectedVersion) + 1n;
|
|
29916
29917
|
let value = wanted;
|
|
29917
29918
|
try {
|
|
29918
|
-
await storageAdapter.upload(`${scope}/${version4}`, encrypted, ...sig);
|
|
29919
|
+
await sealed(() => storageAdapter.upload(`${scope}/${version4}`, encrypted, ...sig));
|
|
29919
29920
|
} catch (error51) {
|
|
29920
29921
|
if (!(error51 instanceof StoredBlobConflictError))
|
|
29921
29922
|
throw error51;
|
|
@@ -30153,9 +30154,97 @@ function isReplicaScope(scope) {
|
|
|
30153
30154
|
return scope === REPLICA_SCOPE_PREFIX || scope.startsWith(`${REPLICA_SCOPE_PREFIX}.`);
|
|
30154
30155
|
}
|
|
30155
30156
|
|
|
30157
|
+
// ../stream-sync/dist/json.js
|
|
30158
|
+
var JSON_CHUNK_UNITS = 32 * 1024;
|
|
30159
|
+
|
|
30160
|
+
// ../stream-sync/dist/bytes.js
|
|
30161
|
+
var encoder3 = new TextEncoder();
|
|
30162
|
+
function utf8Length(text) {
|
|
30163
|
+
let bytes = 0;
|
|
30164
|
+
for (let i2 = 0; i2 < text.length; i2 += 1) {
|
|
30165
|
+
const unit = text.charCodeAt(i2);
|
|
30166
|
+
if (unit < 128)
|
|
30167
|
+
bytes += 1;
|
|
30168
|
+
else if (unit < 2048)
|
|
30169
|
+
bytes += 2;
|
|
30170
|
+
else if (unit >= 55296 && unit <= 56319 && i2 + 1 < text.length) {
|
|
30171
|
+
const next = text.charCodeAt(i2 + 1);
|
|
30172
|
+
if (next >= 56320 && next <= 57343) {
|
|
30173
|
+
bytes += 4;
|
|
30174
|
+
i2 += 1;
|
|
30175
|
+
} else
|
|
30176
|
+
bytes += 3;
|
|
30177
|
+
} else
|
|
30178
|
+
bytes += 3;
|
|
30179
|
+
}
|
|
30180
|
+
return bytes;
|
|
30181
|
+
}
|
|
30182
|
+
var HEX_PAIRS = Array.from({ length: 256 }, (_2, byte) => byte.toString(16).padStart(2, "0"));
|
|
30183
|
+
var HEX16 = /^[0-9a-f]{16}$/;
|
|
30184
|
+
var MiB = 1024 * 1024;
|
|
30185
|
+
var DEFAULT_PART_TARGET_BYTES = 4 * MiB;
|
|
30186
|
+
var HEAD_LIMIT_BYTES = 1 * MiB;
|
|
30187
|
+
var PART_LIMIT_BYTES = 16 * MiB;
|
|
30188
|
+
var NAME_LIMIT_BYTES = 256;
|
|
30189
|
+
var FRAME_SMALL_BYTES = 1 * MiB;
|
|
30190
|
+
|
|
30191
|
+
// ../stream-sync/dist/names.js
|
|
30192
|
+
var SCOPE_PREFIX = "pdpp.";
|
|
30193
|
+
function parseScope(name) {
|
|
30194
|
+
if (!name.startsWith(SCOPE_PREFIX))
|
|
30195
|
+
return null;
|
|
30196
|
+
if (utf8Length(name) > NAME_LIMIT_BYTES)
|
|
30197
|
+
return null;
|
|
30198
|
+
const rest = name.slice(SCOPE_PREFIX.length);
|
|
30199
|
+
const tilde = rest.indexOf("~");
|
|
30200
|
+
if (tilde <= 0)
|
|
30201
|
+
return null;
|
|
30202
|
+
const connector = rest.slice(0, tilde);
|
|
30203
|
+
let tail = rest.slice(tilde + 1);
|
|
30204
|
+
let ns2 = "";
|
|
30205
|
+
const candidate = tail.slice(0, 16);
|
|
30206
|
+
if (HEX16.test(candidate)) {
|
|
30207
|
+
ns2 = candidate;
|
|
30208
|
+
tail = tail.slice(16);
|
|
30209
|
+
}
|
|
30210
|
+
if (tail === "")
|
|
30211
|
+
return { kind: "control", connector, ns: ns2 };
|
|
30212
|
+
if (tail[0] !== "." || tail.length === 1)
|
|
30213
|
+
return null;
|
|
30214
|
+
return { kind: "stream", connector, ns: ns2, stream: tail.slice(1) };
|
|
30215
|
+
}
|
|
30216
|
+
|
|
30217
|
+
// ../stream-sync/dist/master-key.js
|
|
30218
|
+
var N3 = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n;
|
|
30219
|
+
var HALF_N = N3 >> 1n;
|
|
30220
|
+
|
|
30221
|
+
// ../stream-sync/dist/parts.js
|
|
30222
|
+
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
30223
|
+
|
|
30224
|
+
// ../stream-sync/dist/head.js
|
|
30225
|
+
var decoder2 = new TextDecoder("utf-8", { fatal: true });
|
|
30226
|
+
|
|
30227
|
+
// ../stream-sync/dist/frames.js
|
|
30228
|
+
var textDecoder2 = new TextDecoder("utf-8", { fatal: true });
|
|
30229
|
+
|
|
30230
|
+
// ../stream-sync/dist/part-frames.js
|
|
30231
|
+
var textDecoder3 = new TextDecoder();
|
|
30232
|
+
|
|
30233
|
+
// ../stream-sync/dist/log.js
|
|
30234
|
+
var BLOB_BYTES_PER_MS = Math.round(4 * 1024 * 1024 / 360);
|
|
30235
|
+
var decoder3 = new TextDecoder("utf-8", { fatal: true });
|
|
30236
|
+
|
|
30237
|
+
// ../core/dist/stream-sync/scope-routing.js
|
|
30238
|
+
function isPhysicalScope(name) {
|
|
30239
|
+
return parseScope(name) !== null || name.includes("~");
|
|
30240
|
+
}
|
|
30241
|
+
|
|
30156
30242
|
// ../core/dist/policy/reserved-scopes.js
|
|
30243
|
+
function isReservedSystemScope(scope) {
|
|
30244
|
+
return scope.startsWith("vana.system.") || /^pdpp\.vana-system-[^.~]+(?:[.~]|$)/.test(scope);
|
|
30245
|
+
}
|
|
30157
30246
|
function isSystemScope(scope) {
|
|
30158
|
-
return scope
|
|
30247
|
+
return isReservedSystemScope(scope) || isReplicaScope(scope) || isPhysicalScope(scope);
|
|
30159
30248
|
}
|
|
30160
30249
|
|
|
30161
30250
|
// ../core/dist/additions/durable.js
|
|
@@ -30237,7 +30326,7 @@ function sameInventory(a2, b2) {
|
|
|
30237
30326
|
function settled(slot) {
|
|
30238
30327
|
return slot.status === "confirmed" || slot.status === "finalized";
|
|
30239
30328
|
}
|
|
30240
|
-
function
|
|
30329
|
+
function eligible2(slot) {
|
|
30241
30330
|
return !slot.isTombstone && ["confirmed", "finalized", "pending", "submitting"].includes(slot.status);
|
|
30242
30331
|
}
|
|
30243
30332
|
function sourceWindow(snapshot) {
|
|
@@ -30256,7 +30345,7 @@ function findCheckpointRegistration(snapshot, version4, commitment) {
|
|
|
30256
30345
|
const { end, after } = sourceWindow(snapshot);
|
|
30257
30346
|
if (BigInt(version4) > end || BigInt(version4) <= after)
|
|
30258
30347
|
return void 0;
|
|
30259
|
-
return snapshot.versions.find((row) => row.expectedVersion === version4 &&
|
|
30348
|
+
return snapshot.versions.find((row) => row.expectedVersion === version4 && eligible2(row) && row.dataHash.toLowerCase() === commitment.dataHash.toLowerCase() && row.metadataHash.toLowerCase() === commitment.metadataHash.toLowerCase());
|
|
30260
30349
|
}
|
|
30261
30350
|
function sourceData(data) {
|
|
30262
30351
|
if (data === null || typeof data !== "object" || Array.isArray(data))
|
|
@@ -30327,7 +30416,7 @@ function createDurableAdditions(options) {
|
|
|
30327
30416
|
for (let index = snapshot.versions.length - 1; index >= 0; index--) {
|
|
30328
30417
|
budget.check();
|
|
30329
30418
|
const slot = snapshot.versions[index];
|
|
30330
|
-
if (BigInt(slot.expectedVersion) <= BigInt(boundary) || BigInt(slot.expectedVersion) > BigInt(snapshot.head.expectedVersion) || search && BigInt(slot.expectedVersion) >= BigInt(search.before) || !
|
|
30419
|
+
if (BigInt(slot.expectedVersion) <= BigInt(boundary) || BigInt(slot.expectedVersion) > BigInt(snapshot.head.expectedVersion) || search && BigInt(slot.expectedVersion) >= BigInt(search.before) || !eligible2(slot))
|
|
30331
30420
|
continue;
|
|
30332
30421
|
const identity = JSON.stringify([
|
|
30333
30422
|
systemScope,
|
|
@@ -30375,7 +30464,7 @@ function createDurableAdditions(options) {
|
|
|
30375
30464
|
continue;
|
|
30376
30465
|
}
|
|
30377
30466
|
const candidate = { ...parsed.data, ledger };
|
|
30378
|
-
if (candidate.slots.length > relevant.length || !candidate.slots.every((row, i2) =>
|
|
30467
|
+
if (candidate.slots.length > relevant.length || !candidate.slots.every((row, i2) => eligible2(relevant[i2]) && sameCommitment(row, relevant[i2])) || candidate.through !== (candidate.slots.at(-1)?.expectedVersion ?? String(after))) {
|
|
30379
30468
|
budget.checkpoints.rejected.set(identity, "invalid");
|
|
30380
30469
|
continue;
|
|
30381
30470
|
}
|
|
@@ -30499,7 +30588,7 @@ function createDurableAdditions(options) {
|
|
|
30499
30588
|
unitBudget.check();
|
|
30500
30589
|
if (BigInt(slot.expectedVersion) !== BigInt(through) + 1n)
|
|
30501
30590
|
coverage = "partial";
|
|
30502
|
-
if (!
|
|
30591
|
+
if (!eligible2(slot)) {
|
|
30503
30592
|
coverage = "partial";
|
|
30504
30593
|
break;
|
|
30505
30594
|
}
|
package/dist/bridge.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PersonalServerReadGranteeObserver } from "@opendatalabs/personal-server-ts-core/api";
|
|
1
2
|
import type { PsLiteRuntime } from "./runtime.js";
|
|
2
3
|
export interface PsLiteBridgeRequest {
|
|
3
4
|
requestId: string;
|
|
@@ -19,5 +20,7 @@ export interface PsLiteBridgeResponse {
|
|
|
19
20
|
}
|
|
20
21
|
export declare function handlePsLiteBridgeRequest(runtime: PsLiteRuntime, bridgeRequest: PsLiteBridgeRequest, options?: {
|
|
21
22
|
origin?: string;
|
|
23
|
+
/** In-process only: receives the grantee label of an authorized read. */
|
|
24
|
+
onReadGrantee?: PersonalServerReadGranteeObserver;
|
|
22
25
|
}): Promise<PsLiteBridgeResponse>;
|
|
23
26
|
//# sourceMappingURL=bridge.d.ts.map
|
package/dist/bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAA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,MAAM,CAAC;IACb,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkDD,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,mBAAmB,EAClC,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,aAAa,CAAC,EAAE,iCAAiC,CAAC;CAC9C,GACL,OAAO,CAAC,oBAAoB,CAAC,CAkB/B"}
|
package/dist/bridge.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { attachPersonalServerReadGranteeObserver, } from "@opendatalabs/personal-server-ts-core/api";
|
|
1
2
|
function decodeBase64(input) {
|
|
2
3
|
if (!input)
|
|
3
4
|
return new Uint8Array();
|
|
@@ -40,6 +41,9 @@ function buildRequest(origin, bridgeRequest) {
|
|
|
40
41
|
}
|
|
41
42
|
export async function handlePsLiteBridgeRequest(runtime, bridgeRequest, options = {}) {
|
|
42
43
|
const request = buildRequest(options.origin ?? "https://ps-lite.local", bridgeRequest);
|
|
44
|
+
if (options.onReadGrantee) {
|
|
45
|
+
attachPersonalServerReadGranteeObserver(request, options.onReadGrantee);
|
|
46
|
+
}
|
|
43
47
|
const response = await runtime.fetch(request);
|
|
44
48
|
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
45
49
|
return {
|
package/dist/bridge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,GAExC,MAAM,2CAA2C,CAAC;AAuBnD,SAAS,YAAY,CAAC,KAAa;IACjC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,UAAU,EAAE,CAAC;IACpC,MAAM,MAAM,GACV,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU;QAC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ocalSync, type SeedIntake, type ViewChangeListener } from "@opendatalabs/personal-server-ts-core/localdb";
|
|
1
2
|
import type { ReplicationDoorStatus } from "@opendatalabs/personal-server-ts-core/replication/door";
|
|
2
3
|
import type { DeclarationSnapshot } from "@opendatalabs/personal-server-ts-core/pdpp";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
4
|
+
import type { RunIntake } from "@opendatalabs/personal-server-ts-core/stream-sync";
|
|
5
|
+
import type { SyncStatus } from "@opendatalabs/personal-server-ts-core/sync";
|
|
5
6
|
import { type LiteReplication } from "./replication-host.js";
|
|
6
7
|
import type { LiteReplicaObjectTransfers, LiteReplicaPersistence, ReplicationBootConfig } from "./replication-ports.js";
|
|
7
8
|
import type { ServerConfig } from "@opendatalabs/personal-server-ts-core/schemas";
|
|
9
|
+
import { type ImportRunner, type ImportWaker, type ModeAuthority, type ModeRecordStore } from "@opendatalabs/personal-server-ts-core/sync/account-mode";
|
|
10
|
+
import { type LegacyWriteSeal } from "@opendatalabs/personal-server-ts-core/storage/legacy-write-seal";
|
|
8
11
|
import type { Logger } from "@opendatalabs/personal-server-ts-core/logger";
|
|
9
12
|
import type { InferenceProvider } from "@opendatalabs/personal-server-ts-core/derivatives";
|
|
10
13
|
import type { AccessLogReader } from "@opendatalabs/personal-server-ts-core/logging/access-reader";
|
|
@@ -17,6 +20,21 @@ import { type PsLiteOwnerSyncSigner, type PsLiteSyncOptions } from "./sync.js";
|
|
|
17
20
|
import { type PsLitePersistenceBundle } from "./persistence.js";
|
|
18
21
|
export interface IndexedDbPsLiteRuntimeOptions extends Omit<PsLiteRuntimeOptions, "accessLogReader" | "accessLogWriter" | "config" | "identity" | "saveConfig" | "stateCapabilities" | "storage" | "tokenStore"> {
|
|
19
22
|
ownerAddress?: `0x${string}`;
|
|
23
|
+
/** Host-owned local database, shared by stream intake and reads. */
|
|
24
|
+
localDb?: PsLiteSyncOptions["localDb"];
|
|
25
|
+
localDbDeviceId?: PsLiteSyncOptions["localDbDeviceId"];
|
|
26
|
+
/**
|
|
27
|
+
* Where the account-mode module keeps its per-owner records. Default: its
|
|
28
|
+
* own IndexedDB database next to the data store's. A host with another
|
|
29
|
+
* durable place (a native bundle) injects a store.
|
|
30
|
+
*/
|
|
31
|
+
accountModeStore?: ModeRecordStore;
|
|
32
|
+
/**
|
|
33
|
+
* The host's legacy importer. The runtime runs it when the Account says On
|
|
34
|
+
* and once at boot when the owner is already switched; what is owed and when
|
|
35
|
+
* it is done is the importer's own record. Without one no import starts.
|
|
36
|
+
*/
|
|
37
|
+
legacyImporter?: ImportRunner;
|
|
20
38
|
/**
|
|
21
39
|
* Inference provider for the derivative compute layer. Defaults to the
|
|
22
40
|
* OpenAI-compatible fetch client on `config.inference`; tests inject a
|
|
@@ -25,6 +43,8 @@ export interface IndexedDbPsLiteRuntimeOptions extends Omit<PsLiteRuntimeOptions
|
|
|
25
43
|
inferenceProvider?: InferenceProvider;
|
|
26
44
|
ownerSignature: `0x${string}`;
|
|
27
45
|
ownerSyncSigner?: PsLiteOwnerSyncSigner;
|
|
46
|
+
/** Closed until incoming-server registration commits; initial sync only pulls. */
|
|
47
|
+
registrationReady?: () => boolean;
|
|
28
48
|
additionsWorkerFactory?: PsLiteSyncOptions["additionsWorkerFactory"];
|
|
29
49
|
dbName?: string;
|
|
30
50
|
stateStoreName?: string;
|
|
@@ -40,25 +60,20 @@ export interface IndexedDbPsLiteRuntimeOptions extends Omit<PsLiteRuntimeOptions
|
|
|
40
60
|
* feed on the configured gateway URL; inject with a mock `gateway` in tests.
|
|
41
61
|
*/
|
|
42
62
|
dataPointFeed?: DataPointFeedPort;
|
|
43
|
-
/**
|
|
44
|
-
* Durable state for stream-sync reads, used only when
|
|
45
|
-
* `config.streamSync.read` is on. Default: memory, rebuilt by a full
|
|
46
|
-
* listing on each start.
|
|
47
|
-
*/
|
|
48
|
-
streamSyncReadFiles?: StreamSyncReadFiles;
|
|
49
63
|
/**
|
|
50
64
|
* Artifact digest -> stream declarations, filled by the host after it
|
|
51
65
|
* verified each artifact. The run intake trusts only this table; with none
|
|
52
|
-
* given, every digest answers `unknown_artifact`.
|
|
53
|
-
* `config.streamSync.write` is on.
|
|
66
|
+
* given, every digest answers `unknown_artifact`. Admission follows Account mode.
|
|
54
67
|
*/
|
|
55
68
|
streamSyncDeclarations?: PsLiteSyncOptions["streamSyncDeclarations"];
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
streamSyncRegistry?: PsLiteSyncOptions["streamSyncRegistry"];
|
|
70
|
+
streamSyncBlobs?: PsLiteSyncOptions["streamSyncBlobs"];
|
|
71
|
+
/** Retained manifest documents for the delete fence; see `PsLiteSyncOptions`. */
|
|
72
|
+
streamSyncRetainedManifests?: PsLiteSyncOptions["streamSyncRetainedManifests"];
|
|
73
|
+
/** Stream-sync design flags, default off; see `PsLiteSyncOptions`. */
|
|
74
|
+
streamSyncPublishWhileCollecting?: PsLiteSyncOptions["streamSyncPublishWhileCollecting"];
|
|
75
|
+
streamSyncProgressiveFirstLoad?: PsLiteSyncOptions["streamSyncProgressiveFirstLoad"];
|
|
76
|
+
streamSyncFlags?: PsLiteSyncOptions["streamSyncFlags"];
|
|
62
77
|
/**
|
|
63
78
|
* The host's replication ports (host contract §4): native persistence
|
|
64
79
|
* with replica support and native object transfers. With the door on and
|
|
@@ -80,8 +95,12 @@ export interface IndexedDbPsLiteRuntimeOptions extends Omit<PsLiteRuntimeOptions
|
|
|
80
95
|
* identity/config/sync/auth/signer composition. This is all-or-nothing:
|
|
81
96
|
* either omit it for the default Web IndexedDB/OPFS path, or provide every
|
|
82
97
|
* port for a host-owned persistence implementation.
|
|
98
|
+
*
|
|
99
|
+
* A host may supply storageFactory to construct storage using the runtime seal.
|
|
83
100
|
*/
|
|
84
|
-
persistence?: PsLitePersistenceBundle
|
|
101
|
+
persistence?: Omit<PsLitePersistenceBundle, "storage"> & Partial<Pick<PsLitePersistenceBundle, "storage">>;
|
|
102
|
+
/** Constructs host storage with the runtime's account-mode seal. */
|
|
103
|
+
storageFactory?: (seal: LegacyWriteSeal) => DataStoragePort | Promise<DataStoragePort>;
|
|
85
104
|
}
|
|
86
105
|
export interface IndexedDbPsLiteRuntime {
|
|
87
106
|
runtime: PsLiteRuntime;
|
|
@@ -93,18 +112,58 @@ export interface IndexedDbPsLiteRuntime {
|
|
|
93
112
|
accessLogStore: AccessLogReader & AccessLogWriter;
|
|
94
113
|
syncManager: PsLiteRuntimeOptions["syncManager"];
|
|
95
114
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
115
|
+
* Calls `listener` with the new sync status after each change of it: a cycle
|
|
116
|
+
* starting or ending, the first sync finishing with no data, an error, the
|
|
117
|
+
* pending count moving. Pass it what `syncManager.getStatus()` returns, so a
|
|
118
|
+
* host that shows sync state needs no timer. Works before the manager
|
|
119
|
+
* starts; the subscription stays when the manager stops and starts again.
|
|
120
|
+
* Returns the unsubscribe; with no sync manager it hears nothing.
|
|
121
|
+
*
|
|
122
|
+
* Do not call `syncManager.trigger()` on every event: each cycle changes
|
|
123
|
+
* `lastSync`, so each ends with an event that would start the next, and
|
|
124
|
+
* nothing bounds that loop. Trigger only on a change the listener acts on.
|
|
125
|
+
*
|
|
126
|
+
* Unsubscribe before `closeStreamSync`. If the caller forgot, `closeStreamSync`
|
|
127
|
+
* removes every subscription this runtime made from the manager, at its
|
|
128
|
+
* start and before it awaits, and no listener is called after that. A
|
|
129
|
+
* subscribe after close registers nothing. Subscriptions other users made
|
|
130
|
+
* on an injected manager stay.
|
|
131
|
+
*/
|
|
132
|
+
subscribeSyncStatus(listener: (status: SyncStatus) => void): () => void;
|
|
133
|
+
/** Database facade when a host driver is supplied and available. */
|
|
134
|
+
localSync?: LocalSync | null;
|
|
135
|
+
/** Lazily open the database after Account mode is known. */
|
|
136
|
+
getLocalSync?(): Promise<LocalSync>;
|
|
137
|
+
/**
|
|
138
|
+
* Calls `listener` once after each operation that changed what the local
|
|
139
|
+
* database serves: records applied, purged or deleted, connections added
|
|
140
|
+
* or removed, control state moved. An operation that changed nothing
|
|
141
|
+
* (an idle cycle, a publish) is silent. The event names the changed
|
|
142
|
+
* connection ids and carries no record data; re-read what you show. Works
|
|
143
|
+
* before the database opens. Returns the unsubscribe.
|
|
144
|
+
*/
|
|
145
|
+
subscribeViewChanges(listener: ViewChangeListener): () => void;
|
|
146
|
+
/** Stop the sync manager before releasing its owner/network database. */
|
|
147
|
+
closeStreamSync?(): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* The database run intake for host code; admission follows Account mode.
|
|
98
150
|
*/
|
|
99
151
|
streamSyncIntake: RunIntake | null;
|
|
100
|
-
|
|
101
|
-
streamSyncWriter: StreamSyncWriter | null;
|
|
152
|
+
streamSyncSeed: SeedIntake | null;
|
|
102
153
|
/** The compute layer; hosts call `scheduler.stop()` on teardown. */
|
|
103
154
|
derivatives: PsLiteRuntimeOptions["derivatives"];
|
|
104
155
|
/** This boot's replication door, from `resolveLiteReplication`. */
|
|
105
156
|
replication: ReplicationDoorStatus;
|
|
106
157
|
/** Replication built over `replicaHost`, when the host passed it. */
|
|
107
158
|
replicationHost?: LiteReplication;
|
|
159
|
+
/**
|
|
160
|
+
* The account-mode module. Web code gives it the Account's answer with
|
|
161
|
+
* `submitEvidence` before it starts the first collection. On teardown call
|
|
162
|
+
* `importWaker.stop()` first, then close the storage, then `close()`.
|
|
163
|
+
*/
|
|
164
|
+
accountModeAuthority: ModeAuthority;
|
|
165
|
+
/** Wakes the host's importer; present when the host passed `legacyImporter`. */
|
|
166
|
+
importWaker?: ImportWaker;
|
|
108
167
|
}
|
|
109
168
|
export declare function createIndexedDbPsLiteRuntime(options: IndexedDbPsLiteRuntimeOptions): Promise<IndexedDbPsLiteRuntime>;
|
|
110
169
|
//# sourceMappingURL=browser-runtime.d.ts.map
|