@opendatalabs/personal-server-ts-lite 0.0.1-canary.052d47e → 0.0.1-canary.05cdd81

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.
Files changed (148) hide show
  1. package/dist/account-mode-store.d.ts +11 -0
  2. package/dist/account-mode-store.d.ts.map +1 -0
  3. package/dist/account-mode-store.js +68 -0
  4. package/dist/account-mode-store.js.map +1 -0
  5. package/dist/additions-crypto.d.ts +3 -0
  6. package/dist/additions-crypto.d.ts.map +1 -0
  7. package/dist/additions-crypto.js +42 -0
  8. package/dist/additions-crypto.js.map +1 -0
  9. package/dist/additions-protocol.d.ts +56 -0
  10. package/dist/additions-protocol.d.ts.map +1 -0
  11. package/dist/additions-protocol.js +17 -0
  12. package/dist/additions-protocol.js.map +1 -0
  13. package/dist/additions-session.d.ts +20 -0
  14. package/dist/additions-session.d.ts.map +1 -0
  15. package/dist/additions-session.js +215 -0
  16. package/dist/additions-session.js.map +1 -0
  17. package/dist/additions-transport.d.ts +72 -0
  18. package/dist/additions-transport.d.ts.map +1 -0
  19. package/dist/additions-transport.js +428 -0
  20. package/dist/additions-transport.js.map +1 -0
  21. package/dist/additions-worker.bundle.js +31252 -0
  22. package/dist/additions-worker.d.ts +2 -0
  23. package/dist/additions-worker.d.ts.map +1 -0
  24. package/dist/additions-worker.js +308 -0
  25. package/dist/additions-worker.js.map +1 -0
  26. package/dist/bridge.d.ts +3 -0
  27. package/dist/bridge.d.ts.map +1 -1
  28. package/dist/bridge.js +4 -0
  29. package/dist/bridge.js.map +1 -1
  30. package/dist/browser-runtime.d.ts +111 -1
  31. package/dist/browser-runtime.d.ts.map +1 -1
  32. package/dist/browser-runtime.js +176 -11
  33. package/dist/browser-runtime.js.map +1 -1
  34. package/dist/canonical-persistence.d.ts +53 -0
  35. package/dist/canonical-persistence.d.ts.map +1 -0
  36. package/dist/canonical-persistence.js +13 -0
  37. package/dist/canonical-persistence.js.map +1 -0
  38. package/dist/canonical-store.d.ts +395 -0
  39. package/dist/canonical-store.d.ts.map +1 -0
  40. package/dist/canonical-store.js +1807 -0
  41. package/dist/canonical-store.js.map +1 -0
  42. package/dist/client.d.ts +24 -1
  43. package/dist/client.d.ts.map +1 -1
  44. package/dist/client.js +214 -1
  45. package/dist/client.js.map +1 -1
  46. package/dist/derivatives.d.ts.map +1 -1
  47. package/dist/derivatives.js +4 -2
  48. package/dist/derivatives.js.map +1 -1
  49. package/dist/diagnostics.d.ts +3 -0
  50. package/dist/diagnostics.d.ts.map +1 -1
  51. package/dist/diagnostics.js +9 -1
  52. package/dist/diagnostics.js.map +1 -1
  53. package/dist/history-probe-worker.bundle.js +31274 -0
  54. package/dist/history-probe.worker.d.ts +35 -0
  55. package/dist/history-probe.worker.d.ts.map +1 -0
  56. package/dist/history-probe.worker.js +161 -0
  57. package/dist/history-probe.worker.js.map +1 -0
  58. package/dist/index.d.ts +17 -4
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +12 -1
  61. package/dist/index.js.map +1 -1
  62. package/dist/localdb-port.d.ts +28 -0
  63. package/dist/localdb-port.d.ts.map +1 -0
  64. package/dist/localdb-port.js +30 -0
  65. package/dist/localdb-port.js.map +1 -0
  66. package/dist/mcp-store.d.ts +1 -1
  67. package/dist/mcp-store.d.ts.map +1 -1
  68. package/dist/mcp-store.js +144 -15
  69. package/dist/mcp-store.js.map +1 -1
  70. package/dist/oura-import.d.ts +2 -0
  71. package/dist/oura-import.d.ts.map +1 -0
  72. package/dist/oura-import.js +3 -0
  73. package/dist/oura-import.js.map +1 -0
  74. package/dist/owner-binding.d.ts +5 -0
  75. package/dist/owner-binding.d.ts.map +1 -1
  76. package/dist/owner-binding.js +4 -8
  77. package/dist/owner-binding.js.map +1 -1
  78. package/dist/persistence.d.ts +1 -1
  79. package/dist/persistence.d.ts.map +1 -1
  80. package/dist/persistence.js +2 -2
  81. package/dist/persistence.js.map +1 -1
  82. package/dist/pull-signals.d.ts +38 -0
  83. package/dist/pull-signals.d.ts.map +1 -0
  84. package/dist/pull-signals.js +73 -0
  85. package/dist/pull-signals.js.map +1 -0
  86. package/dist/relay-tls.d.ts.map +1 -1
  87. package/dist/relay-tls.js +10 -0
  88. package/dist/relay-tls.js.map +1 -1
  89. package/dist/relay.d.ts +91 -3
  90. package/dist/relay.d.ts.map +1 -1
  91. package/dist/relay.js +522 -75
  92. package/dist/relay.js.map +1 -1
  93. package/dist/replication-coordinator-state.d.ts +19 -0
  94. package/dist/replication-coordinator-state.d.ts.map +1 -0
  95. package/dist/replication-coordinator-state.js +20 -0
  96. package/dist/replication-coordinator-state.js.map +1 -0
  97. package/dist/replication-door.d.ts +17 -0
  98. package/dist/replication-door.d.ts.map +1 -0
  99. package/dist/replication-door.js +23 -0
  100. package/dist/replication-door.js.map +1 -0
  101. package/dist/replication-engine.d.ts +49 -0
  102. package/dist/replication-engine.d.ts.map +1 -0
  103. package/dist/replication-engine.js +589 -0
  104. package/dist/replication-engine.js.map +1 -0
  105. package/dist/replication-host.d.ts +92 -0
  106. package/dist/replication-host.d.ts.map +1 -0
  107. package/dist/replication-host.js +135 -0
  108. package/dist/replication-host.js.map +1 -0
  109. package/dist/replication-ports.d.ts +194 -0
  110. package/dist/replication-ports.d.ts.map +1 -0
  111. package/dist/replication-ports.js +58 -0
  112. package/dist/replication-ports.js.map +1 -0
  113. package/dist/replication-runtime.d.ts +64 -0
  114. package/dist/replication-runtime.d.ts.map +1 -0
  115. package/dist/replication-runtime.js +79 -0
  116. package/dist/replication-runtime.js.map +1 -0
  117. package/dist/replication-storage.d.ts +42 -0
  118. package/dist/replication-storage.d.ts.map +1 -0
  119. package/dist/replication-storage.js +173 -0
  120. package/dist/replication-storage.js.map +1 -0
  121. package/dist/runtime.d.ts +85 -6
  122. package/dist/runtime.d.ts.map +1 -1
  123. package/dist/runtime.js +561 -37
  124. package/dist/runtime.js.map +1 -1
  125. package/dist/seed-staging.d.ts +8 -0
  126. package/dist/seed-staging.d.ts.map +1 -0
  127. package/dist/seed-staging.js +106 -0
  128. package/dist/seed-staging.js.map +1 -0
  129. package/dist/state.d.ts +16 -1
  130. package/dist/state.d.ts.map +1 -1
  131. package/dist/state.js +93 -23
  132. package/dist/state.js.map +1 -1
  133. package/dist/storage-utils.d.ts.map +1 -1
  134. package/dist/storage-utils.js +11 -3
  135. package/dist/storage-utils.js.map +1 -1
  136. package/dist/storage.d.ts +59 -1
  137. package/dist/storage.d.ts.map +1 -1
  138. package/dist/storage.js +601 -150
  139. package/dist/storage.js.map +1 -1
  140. package/dist/stream-sync-budget.d.ts +3 -0
  141. package/dist/stream-sync-budget.d.ts.map +1 -0
  142. package/dist/stream-sync-budget.js +3 -0
  143. package/dist/stream-sync-budget.js.map +1 -0
  144. package/dist/sync.d.ts +104 -3
  145. package/dist/sync.d.ts.map +1 -1
  146. package/dist/sync.js +377 -62
  147. package/dist/sync.js.map +1 -1
  148. package/package.json +12 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replication-runtime.js","sourceRoot":"","sources":["../src/replication-runtime.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,GAIxB,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EACL,4BAA4B,GAI7B,MAAM,wBAAwB,CAAC;AAEhC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAqCrD;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAO5C;IACC,MAAM,KAAK,GAAG,CAAC,MAA6B,EAA0B,EAAE,CAAC,CAAC;QACxE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS;QAC9B,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;QACd,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;QACpB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,KAAK,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;QACrB,IAAI,EAAE,KA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"}
@@ -0,0 +1,42 @@
1
+ import { type BoundedStorageAdapter } from "@opendatalabs/personal-server-ts-core/storage/adapters";
2
+ import { type LiteReplicaObjectTransfers, type LiteReplicaPersistence, type LiteReplicaTransaction } from "./replication-ports.js";
3
+ /** Deadline of one transfer when the caller's budget sets none. */
4
+ export declare const LITE_REPLICA_TRANSFER_DEADLINE_MS = 60000;
5
+ /**
6
+ * Replica bytes this adapter attached and has not released yet. A row
7
+ * commits with the attach and leaves with the release, so bytes a crash
8
+ * left attached between them stay listed until the engine reclaims them
9
+ * (`reclaimLiteTransientBytes`).
10
+ */
11
+ export declare const LITE_REPLICA_TRANSIENT_MIGRATION = "CREATE TABLE IF NOT EXISTS pdpp_lite_replica_transient (id TEXT PRIMARY KEY)";
12
+ /**
13
+ * Attached replica byte ids whose transfer this process still runs. A
14
+ * cancelled step stops waiting for its transfer before the native call
15
+ * settles, so the next step can start while the bytes are still in use; the
16
+ * transfer releases them itself when it settles.
17
+ */
18
+ export type LiteTransientBytesInUse = Set<string>;
19
+ /**
20
+ * Release every transient replica byte left attached, in the caller's
21
+ * transaction, except those `inUse`. The engine calls it under its writer
22
+ * lock, before a step's first transfer.
23
+ */
24
+ export declare function reclaimLiteTransientBytes(tx: LiteReplicaTransaction, inUse?: ReadonlySet<string>): Promise<number>;
25
+ /** Headers for one upload, computed over its exact body before it is staged. */
26
+ export type LiteReplicaUploadHeaders = (request: {
27
+ method: "PUT";
28
+ url: string;
29
+ body: Uint8Array;
30
+ }) => Record<string, string> | Promise<Record<string, string>>;
31
+ export declare function createLiteReplicaStorage(input: {
32
+ persistence: LiteReplicaPersistence;
33
+ transfers: LiteReplicaObjectTransfers;
34
+ /** The object URL of a storage key (the inverse of the storage layout). */
35
+ urlForKey(key: string): string;
36
+ /** Upload headers, e.g. storage authorization over the exact body. */
37
+ headers?: LiteReplicaUploadHeaders;
38
+ deadlineMs?: number;
39
+ /** Shared with the engine's reclaim (`reclaimLiteTransientBytes`). */
40
+ inUse?: LiteTransientBytesInUse;
41
+ }): BoundedStorageAdapter;
42
+ //# sourceMappingURL=replication-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replication-storage.d.ts","sourceRoot":"","sources":["../src/replication-storage.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAGhC,mEAAmE;AACnE,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAQxD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,iFACmC,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,EAAE,EAAE,sBAAsB,EAC1B,KAAK,GAAE,WAAW,CAAC,MAAM,CAAa,mBAkBvC;AAED,gFAAgF;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE;IAC/C,MAAM,EAAE,KAAK,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAClB,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAQ/D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,WAAW,EAAE,sBAAsB,CAAC;IACpC,SAAS,EAAE,0BAA0B,CAAC;IACtC,2EAA2E;IAC3E,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,sEAAsE;IACtE,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,KAAK,CAAC,EAAE,uBAAuB,CAAC;CACjC,GAAG,qBAAqB,CAoIxB"}
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Replica object storage over the native transfers (host contract §4.2), as
3
+ * the storage adapter core's DPv2 replica transport (`replication/dpv2.ts`)
4
+ * takes. Bulk bytes move natively and land in replica byte storage; JS sees
5
+ * only what one fragment or manifest read needs. Gateway calls (register,
6
+ * evidence, owner feed) stay in PS JS core over Lite's HTTP client.
7
+ */
8
+ import { sha256 } from "viem";
9
+ import { AdditionsBudgetExceeded, } from "@opendatalabs/personal-server-ts-core/additions";
10
+ import { StoredBlobConflictError, } from "@opendatalabs/personal-server-ts-core/storage/adapters";
11
+ import { LiteReplicaTransferError, } from "./replication-ports.js";
12
+ const FRAME_BYTES = 128 * 1024;
13
+ /** Deadline of one transfer when the caller's budget sets none. */
14
+ export const LITE_REPLICA_TRANSFER_DEADLINE_MS = 60_000;
15
+ function* frames(bytes) {
16
+ if (bytes.length === 0)
17
+ yield new Uint8Array(0);
18
+ for (let i = 0; i < bytes.length; i += FRAME_BYTES)
19
+ yield bytes.subarray(i, i + FRAME_BYTES);
20
+ }
21
+ /**
22
+ * Replica bytes this adapter attached and has not released yet. A row
23
+ * commits with the attach and leaves with the release, so bytes a crash
24
+ * left attached between them stay listed until the engine reclaims them
25
+ * (`reclaimLiteTransientBytes`).
26
+ */
27
+ export const LITE_REPLICA_TRANSIENT_MIGRATION = "CREATE TABLE IF NOT EXISTS pdpp_lite_replica_transient (id TEXT PRIMARY KEY)";
28
+ /**
29
+ * Release every transient replica byte left attached, in the caller's
30
+ * transaction, except those `inUse`. The engine calls it under its writer
31
+ * lock, before a step's first transfer.
32
+ */
33
+ export async function reclaimLiteTransientBytes(tx, inUse = new Set()) {
34
+ await tx.sql.exec(LITE_REPLICA_TRANSIENT_MIGRATION);
35
+ const rows = await tx.sql.all("SELECT id FROM pdpp_lite_replica_transient", []);
36
+ let released = 0;
37
+ for (const row of rows) {
38
+ const id = row.id;
39
+ if (inUse.has(id))
40
+ continue;
41
+ await tx.releaseBytes(id);
42
+ await tx.sql.run("DELETE FROM pdpp_lite_replica_transient WHERE id=?", [
43
+ id,
44
+ ]);
45
+ released += 1;
46
+ }
47
+ return released;
48
+ }
49
+ /** A storage failure the DPv2 transport reads as definitive absence. */
50
+ const notFound = (url) => Object.assign(new Error(`replica object not found: ${url}`), {
51
+ status: 404,
52
+ });
53
+ export function createLiteReplicaStorage(input) {
54
+ const { persistence, transfers } = input;
55
+ const inUse = input.inUse ?? new Set();
56
+ const deadline = (budget) => Math.max(1, Math.min(input.deadlineMs ?? LITE_REPLICA_TRANSFER_DEADLINE_MS, budget?.remainingMilliseconds ?? Infinity));
57
+ /** Marks `id` in use until `release`, so no reclaim takes it meanwhile. */
58
+ const attach = async (id, length, digest) => {
59
+ inUse.add(id);
60
+ try {
61
+ await persistence.transaction(async (tx) => {
62
+ await tx.sql.exec(LITE_REPLICA_TRANSIENT_MIGRATION);
63
+ await tx.attachBytes(id, { length, sha256: digest });
64
+ await tx.sql.run("INSERT OR IGNORE INTO pdpp_lite_replica_transient (id) VALUES (?)", [id]);
65
+ });
66
+ }
67
+ catch (error) {
68
+ inUse.delete(id);
69
+ throw error;
70
+ }
71
+ };
72
+ const release = async (id) => {
73
+ try {
74
+ await persistence.transaction(async (tx) => {
75
+ await tx.releaseBytes(id);
76
+ await tx.sql.run("DELETE FROM pdpp_lite_replica_transient WHERE id=?", [
77
+ id,
78
+ ]);
79
+ });
80
+ }
81
+ finally {
82
+ inUse.delete(id);
83
+ }
84
+ };
85
+ async function read(id) {
86
+ const parts = [];
87
+ let size = 0;
88
+ for await (const part of persistence.readBytes(id)) {
89
+ parts.push(part);
90
+ size += part.length;
91
+ }
92
+ const bytes = new Uint8Array(size);
93
+ let offset = 0;
94
+ for (const part of parts) {
95
+ bytes.set(part, offset);
96
+ offset += part.length;
97
+ }
98
+ return bytes;
99
+ }
100
+ const unsupported = () => {
101
+ throw new Error("Lite replica storage supports bounded reads only");
102
+ };
103
+ return {
104
+ urlForKey: (key) => input.urlForKey(key),
105
+ /**
106
+ * Write-once: the native upload of different bytes to a stored key
107
+ * fails with HTTP 409, which is `StoredBlobConflictError`.
108
+ */
109
+ async upload(key, data, signal) {
110
+ const url = input.urlForKey(key);
111
+ const headers = (await input.headers?.({ method: "PUT", url, body: data })) ?? {};
112
+ const id = await persistence.stageBytes((async function* () {
113
+ yield* frames(data);
114
+ })());
115
+ await attach(id, data.length, sha256(data).slice(2));
116
+ try {
117
+ await transfers.upload({ url, method: "PUT", headers, bytesId: id }, {
118
+ signal: signal ?? new AbortController().signal,
119
+ deadlineMs: deadline(),
120
+ });
121
+ }
122
+ catch (error) {
123
+ if (error instanceof LiteReplicaTransferError &&
124
+ error.code === "http-status" &&
125
+ /\b409\b/.test(error.message))
126
+ throw new StoredBlobConflictError(key);
127
+ throw error;
128
+ }
129
+ finally {
130
+ await release(id);
131
+ }
132
+ return url;
133
+ },
134
+ /**
135
+ * At most `budget.remaining` bytes. A spent budget only probes: a present
136
+ * object is over budget, a missing one is not found.
137
+ */
138
+ async downloadBounded(url, budget) {
139
+ const signal = budget.signal ?? new AbortController().signal;
140
+ const call = { signal, deadlineMs: deadline(budget) };
141
+ if (budget.remaining <= 0) {
142
+ if (!(await transfers.probe({ url }, call)))
143
+ throw notFound(url);
144
+ throw new AdditionsBudgetExceeded("replica object exceeds budget");
145
+ }
146
+ let staged;
147
+ try {
148
+ staged = await transfers.download({ url, maxBytes: budget.remaining }, call);
149
+ }
150
+ catch (error) {
151
+ if (error instanceof LiteReplicaTransferError) {
152
+ if (error.code === "not-found")
153
+ throw notFound(url);
154
+ if (error.code === "too-large")
155
+ throw new AdditionsBudgetExceeded("replica object exceeds budget");
156
+ }
157
+ throw error;
158
+ }
159
+ budget.recordSpent(staged.length);
160
+ await attach(staged.stagingId, staged.length, staged.sha256);
161
+ try {
162
+ return await read(staged.stagingId);
163
+ }
164
+ finally {
165
+ await release(staged.stagingId);
166
+ }
167
+ },
168
+ download: unsupported,
169
+ delete: unsupported,
170
+ exists: unsupported,
171
+ };
172
+ }
173
+ //# sourceMappingURL=replication-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replication-storage.js","sourceRoot":"","sources":["../src/replication-storage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EACL,uBAAuB,GAExB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,uBAAuB,GAExB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,wBAAwB,GAIzB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,GAAG,GAAG,GAAG,IAAI,CAAC;AAC/B,mEAAmE;AACnE,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC;AAExD,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAiB;IAChC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,WAAW;QAChD,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,8EAA8E,CAAC;AAUjF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,EAA0B,EAC1B,QAA6B,IAAI,GAAG,EAAE;IAEtC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAC3B,4CAA4C,EAC5C,EAAE,CACH,CAAC;IACF,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,EA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AAC;YACD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YAC7D,IAAI,CAAC;gBACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC;oBAAS,CAAC;gBACT,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,WAAW;KACpB,CAAC;AACJ,CAAC"}
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,13 @@
1
+ import type { SeedIntake } from "@opendatalabs/personal-server-ts-core/localdb";
2
+ import type { LocalSync, LocalHistory } from "@opendatalabs/personal-server-ts-core/localdb";
3
+ import type { DurableAdditionsService } from "@opendatalabs/personal-server-ts-core/additions";
4
+ import { type LegacyProjectionIssue } from "@opendatalabs/personal-server-ts-core/storage/legacy-projection";
1
5
  import { type SessionTokenVerifierPort } from "@opendatalabs/personal-server-ts-core/auth";
2
- import { type PersonalServerApiAuthPort, type PersonalServerReadAuthInput, type PersonalServerReadAuthResult, type PersonalServerReadFulfillmentReporter } from "@opendatalabs/personal-server-ts-core/api";
6
+ import { type ModeAuthority } from "@opendatalabs/personal-server-ts-core/sync/account-mode";
7
+ import { type ConnectionDeletePort, type PersonalServerApiAuthPort, type PersonalServerApiLogger, type PersonalServerReadAuthInput, type PersonalServerReadAuthResult, type PersonalServerReadFulfillmentReporter, type PreparedScopeUploadBatch, type StreamSyncReadPort } from "@opendatalabs/personal-server-ts-core/api";
3
8
  import { type QuestionStore, type RecomputeScheduler } from "@opendatalabs/personal-server-ts-core/derivatives";
4
9
  import type { LineageGatewayPort } from "@opendatalabs/personal-server-ts-core/lineage";
5
- import { type DataReadPolicyPorts, type DataWritePolicyPorts } from "@opendatalabs/personal-server-ts-core/policy";
10
+ import { type DataListPolicyPorts, type DataWritePolicyPorts } from "@opendatalabs/personal-server-ts-core/policy";
6
11
  import { type WriteProofReplayStore, type WriteSessionStore } from "@opendatalabs/personal-server-ts-core/write";
7
12
  import type { DataStoragePort, RuntimeAvailabilityPort } from "@opendatalabs/personal-server-ts-core/ports";
8
13
  import type { ScopeDeletionTracker } from "@opendatalabs/personal-server-ts-core/sync";
@@ -11,15 +16,31 @@ import type { AccessLogWriter } from "@opendatalabs/personal-server-ts-core/logg
11
16
  import type { AccessLogReader } from "@opendatalabs/personal-server-ts-core/logging/access-reader";
12
17
  import type { ServerSigner } from "@opendatalabs/personal-server-ts-core/signing";
13
18
  import type { SyncManager } from "@opendatalabs/personal-server-ts-core/sync";
14
- import { type McpConnectionStore, type McpOAuthAuthorizationStore } from "@opendatalabs/personal-server-ts-core/mcp";
19
+ import { type McpConnectionStore, type McpOAuthAuthorizationStore, type McpScopeRequestApprovalUrlHook } from "@opendatalabs/personal-server-ts-core/mcp";
20
+ import type { LiteReplicationRuntime } from "./replication-runtime.js";
15
21
  import { DiagnosticsRecorder } from "./diagnostics.js";
16
22
  export interface PsLiteStorageAdapter {
17
23
  kind: "indexeddb" | "opfs" | "custom";
18
24
  }
19
25
  export type PsLiteReadAuthInput = PersonalServerReadAuthInput;
20
26
  export type PsLiteReadAuthResult = PersonalServerReadAuthResult;
21
- export type PsLiteAuthAdapter = PersonalServerApiAuthPort;
27
+ export interface PsLiteAuthAdapter extends PersonalServerApiAuthPort {
28
+ /**
29
+ * Opt in only when owner authorization does not interpret application body
30
+ * fields. Direct uploads authenticate a digest commitment instead of items.
31
+ * Existing/custom adapters without this flag retain their HTTP body contract.
32
+ */
33
+ supportsScopeUploadCommitments?: true;
34
+ }
22
35
  export interface PsLiteRuntimeOptions {
36
+ localSync?: () => Promise<LocalSync>;
37
+ streamSyncSeed?: SeedIntake | null;
38
+ history?: LocalHistory;
39
+ /**
40
+ * The stream-sync writer's connection delete. Absent = `DELETE
41
+ * /v1/owner/connectors/:id` answers 503, as the Node server does unwired.
42
+ */
43
+ streamSyncConnectionDelete?: ConnectionDeletePort | null;
23
44
  storage: PsLiteStorageAdapter | DataStoragePort;
24
45
  auth?: PsLiteAuthAdapter;
25
46
  active?: boolean;
@@ -37,6 +58,16 @@ export interface PsLiteRuntimeOptions {
37
58
  };
38
59
  };
39
60
  saveConfig?: (config: unknown) => Promise<void>;
61
+ /**
62
+ * The account-mode module: the only source of the account's storage mode.
63
+ * The legacy write gate, the data routes and the MCP engines read the port
64
+ * derived from it, and no option supplies a mode separately. When wired, the
65
+ * owner-authenticated `POST /v1/account-mode/evidence`
66
+ * route answers and the host gives the module the Account's answers
67
+ * through it. Absent = unknown: every legacy
68
+ * write answers a retryable 503.
69
+ */
70
+ accountModeAuthority?: ModeAuthority;
40
71
  identity?: {
41
72
  address: `0x${string}`;
42
73
  publicKey: `0x${string}`;
@@ -44,13 +75,21 @@ export interface PsLiteRuntimeOptions {
44
75
  gateway?: GatewayClient;
45
76
  serverOwner?: `0x${string}`;
46
77
  serverSigner?: Pick<ServerSigner, "signGrantRegistration"> & Partial<Pick<ServerSigner, "signGrantRevocation" | "signRecordDataAccess" | "address">>;
47
- syncManager?: (Pick<SyncManager, "trigger" | "getStatus"> & Partial<Pick<SyncManager, "start" | "stop" | "deleteScope">>) | null;
78
+ syncManager?: (Pick<SyncManager, "trigger" | "getStatus"> & Partial<Pick<SyncManager, "start" | "stop" | "deleteScope" | "requestPull" | "pause" | "resume" | "subscribeStatus">>) | null;
48
79
  /**
49
80
  * Read-side tombstone memory; reads of a scope the gateway reports deleted
50
81
  * answer 410 (stale local copy or not). Built by the browser runtime
51
82
  * alongside the sync manager, which keeps it current.
52
83
  */
53
84
  scopeDeletions?: ScopeDeletionTracker;
85
+ /**
86
+ * Stream-sync reads, from `createPsLiteSyncManager`'s `streamSyncRead`.
87
+ * Absent = reads as before.
88
+ */
89
+ streamSyncRead?: StreamSyncReadPort;
90
+ /** Receives the cause of every 500 the runtime answers. */
91
+ logger?: PersonalServerApiLogger;
92
+ additions?: DurableAdditionsService;
54
93
  accessLogReader?: AccessLogReader;
55
94
  accessLogWriter?: AccessLogWriter;
56
95
  readFulfillmentReporter?: PersonalServerReadFulfillmentReporter;
@@ -104,11 +143,40 @@ export interface PsLiteRuntimeOptions {
104
143
  mcpConnectionStore?: McpConnectionStore;
105
144
  mcpOAuthAuthorizationStore?: McpOAuthAuthorizationStore;
106
145
  mcpOAuthApprovalUrl?: string | (() => string);
146
+ /**
147
+ * Page where the owner answers an MCP client's `request_scope_access`.
148
+ * Called with the connection id and this runtime's public origin; a
149
+ * returned URL is handed to the agent to show the user. Omit to keep
150
+ * pointing the owner at Vana.
151
+ */
152
+ mcpScopeRequestApprovalUrl?: McpScopeRequestApprovalUrlHook;
153
+ /** Default off. `list_granted_scopes` adds `notShared`; see the server option. */
154
+ mcpExposeUnsharedScopes?: boolean;
155
+ /** Default off. Read-side `scope_not_granted` adds `nextAction`. */
156
+ mcpScopeRequestGuidance?: boolean;
157
+ /**
158
+ * Lifetime in seconds of grants this runtime signs itself for MCP
159
+ * connections (OAuth approve, scope-request approve with no live grant to
160
+ * inherit an expiry from). Unset or 0 signs perpetual grants (the default).
161
+ */
162
+ mcpGrantTtlSeconds?: number;
107
163
  /**
108
164
  * Optional diagnostics recorder. When provided, GET /v1/diagnostics (owner-only)
109
165
  * returns a structured snapshot useful for debugging stuck approval pages.
110
166
  */
111
167
  diagnostics?: DiagnosticsRecorder;
168
+ /**
169
+ * Record replication (host contract §4.4). `activate` resumes it and
170
+ * `deactivate` pauses it; owner-only `GET /v1/replication/status` and
171
+ * `POST /v1/replication/sync` expose it. Absent means off.
172
+ */
173
+ replication?: LiteReplicationRuntime;
174
+ /**
175
+ * Called when a legacy scope cannot be projected from stored PDPP records
176
+ * (the stored body is then served) or is projected with rows left out.
177
+ * Defaults to a console warning.
178
+ */
179
+ onLegacyProjectionIssue?: (issue: LegacyProjectionIssue) => void;
112
180
  }
113
181
  export interface PsLiteRuntimeStateCapabilities {
114
182
  tokens: "indexeddb" | "memory" | "custom";
@@ -125,10 +193,14 @@ export interface PsLiteTokenStore {
125
193
  }
126
194
  export interface PsLiteRuntime extends RuntimeAvailabilityPort {
127
195
  readonly kind: "ps-lite";
196
+ /** Descriptor-first streamed snapshot intake, admitted by Account mode. */
197
+ readonly streamSyncSeed?: SeedIntake | null;
128
198
  readonly storage: PsLiteStorageAdapter | DataStoragePort;
129
199
  activate(): void;
130
200
  deactivate(): void;
131
201
  fetch(request: Request): Promise<Response>;
202
+ /** Optional direct bulk transport; older/custom runtimes keep HTTP. */
203
+ appendScopeUpload?(request: Request, batch: PreparedScopeUploadBatch): Promise<Response>;
132
204
  }
133
205
  /**
134
206
  * Delegated-write (Write API) wiring for a PS-Lite auth adapter.
@@ -157,6 +229,12 @@ export interface PsLiteWriteSessionAuthOptions {
157
229
  }
158
230
  export interface BearerTokenPsLiteAuthOptions {
159
231
  ownerToken: string;
232
+ /**
233
+ * Owner-equivalent for listings by design: `authorizeBuilderList` returns
234
+ * void for it, so it sees every scope. The token names no builder, so there
235
+ * is no grant to scope a listing by; reads still require a grantId. Hand it
236
+ * only to a party trusted with the owner's scope inventory.
237
+ */
160
238
  builderToken: string;
161
239
  /**
162
240
  * Optional delegated-write support. The static builder token never gains
@@ -172,7 +250,8 @@ export interface BearerTokenPsLiteAuthOptions {
172
250
  export interface Web3SignedPsLiteAuthOptions {
173
251
  origin: string | (() => string);
174
252
  ownerAddress: `0x${string}`;
175
- dataReadPolicyPorts?: DataReadPolicyPorts;
253
+ /** `grantLister` lets a builder list without presenting a grantId. */
254
+ dataReadPolicyPorts?: DataListPolicyPorts;
176
255
  accessToken?: string;
177
256
  tokenStore?: SessionTokenVerifierPort;
178
257
  now?: () => number;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK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