@opendatalabs/personal-server-ts-core 0.0.1-canary.01ca694 → 0.0.1-canary.052d47e
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/api/index.d.ts +282 -9
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +867 -163
- package/dist/api/index.js.map +1 -1
- package/dist/auth/request.d.ts.map +1 -1
- package/dist/auth/request.js.map +1 -1
- package/dist/client.d.ts +8 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +21 -3
- package/dist/client.js.map +1 -1
- package/dist/contracts/binary.d.ts +12 -0
- package/dist/contracts/binary.d.ts.map +1 -1
- package/dist/contracts/binary.js +31 -0
- package/dist/contracts/binary.js.map +1 -1
- package/dist/contracts/data.d.ts +51 -5
- package/dist/contracts/data.d.ts.map +1 -1
- package/dist/contracts/data.js +166 -30
- package/dist/contracts/data.js.map +1 -1
- package/dist/contracts/grants.d.ts +7 -5
- package/dist/contracts/grants.d.ts.map +1 -1
- package/dist/contracts/grants.js +60 -37
- package/dist/contracts/grants.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/derivatives/api.d.ts +48 -0
- package/dist/derivatives/api.d.ts.map +1 -0
- package/dist/derivatives/api.js +366 -0
- package/dist/derivatives/api.js.map +1 -0
- package/dist/derivatives/compute.d.ts +106 -0
- package/dist/derivatives/compute.d.ts.map +1 -0
- package/dist/derivatives/compute.js +414 -0
- package/dist/derivatives/compute.js.map +1 -0
- package/dist/derivatives/e2ee/aad.d.ts +22 -0
- package/dist/derivatives/e2ee/aad.d.ts.map +1 -0
- package/dist/derivatives/e2ee/aad.js +32 -0
- package/dist/derivatives/e2ee/aad.js.map +1 -0
- package/dist/derivatives/e2ee/attestation.d.ts +134 -0
- package/dist/derivatives/e2ee/attestation.d.ts.map +1 -0
- package/dist/derivatives/e2ee/attestation.js +248 -0
- package/dist/derivatives/e2ee/attestation.js.map +1 -0
- package/dist/derivatives/e2ee/index.d.ts +6 -0
- package/dist/derivatives/e2ee/index.d.ts.map +1 -0
- package/dist/derivatives/e2ee/index.js +6 -0
- package/dist/derivatives/e2ee/index.js.map +1 -0
- package/dist/derivatives/e2ee/jcs.d.ts +17 -0
- package/dist/derivatives/e2ee/jcs.d.ts.map +1 -0
- package/dist/derivatives/e2ee/jcs.js +55 -0
- package/dist/derivatives/e2ee/jcs.js.map +1 -0
- package/dist/derivatives/e2ee/phala.d.ts +62 -0
- package/dist/derivatives/e2ee/phala.d.ts.map +1 -0
- package/dist/derivatives/e2ee/phala.js +168 -0
- package/dist/derivatives/e2ee/phala.js.map +1 -0
- package/dist/derivatives/e2ee/suite.d.ts +56 -0
- package/dist/derivatives/e2ee/suite.d.ts.map +1 -0
- package/dist/derivatives/e2ee/suite.js +164 -0
- package/dist/derivatives/e2ee/suite.js.map +1 -0
- package/dist/derivatives/index.d.ts +10 -0
- package/dist/derivatives/index.d.ts.map +1 -0
- package/dist/derivatives/index.js +10 -0
- package/dist/derivatives/index.js.map +1 -0
- package/dist/derivatives/inference.d.ts +151 -0
- package/dist/derivatives/inference.d.ts.map +1 -0
- package/dist/derivatives/inference.js +262 -0
- package/dist/derivatives/inference.js.map +1 -0
- package/dist/derivatives/prompt.d.ts +64 -0
- package/dist/derivatives/prompt.d.ts.map +1 -0
- package/dist/derivatives/prompt.js +193 -0
- package/dist/derivatives/prompt.js.map +1 -0
- package/dist/derivatives/registration.d.ts +54 -0
- package/dist/derivatives/registration.d.ts.map +1 -0
- package/dist/derivatives/registration.js +180 -0
- package/dist/derivatives/registration.js.map +1 -0
- package/dist/derivatives/scheduler.d.ts +84 -0
- package/dist/derivatives/scheduler.d.ts.map +1 -0
- package/dist/derivatives/scheduler.js +257 -0
- package/dist/derivatives/scheduler.js.map +1 -0
- package/dist/derivatives/store.d.ts +14 -0
- package/dist/derivatives/store.d.ts.map +1 -0
- package/dist/derivatives/store.js +77 -0
- package/dist/derivatives/store.js.map +1 -0
- package/dist/derivatives/types.d.ts +92 -0
- package/dist/derivatives/types.d.ts.map +1 -0
- package/dist/derivatives/types.js +27 -0
- package/dist/derivatives/types.js.map +1 -0
- package/dist/errors/catalog.d.ts +75 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/catalog.js +104 -0
- package/dist/errors/catalog.js.map +1 -1
- package/dist/grants/index.d.ts +2 -1
- package/dist/grants/index.d.ts.map +1 -1
- package/dist/grants/index.js +1 -1
- package/dist/grants/index.js.map +1 -1
- package/dist/keys/index.d.ts +1 -0
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/public-only-account.d.ts +8 -0
- package/dist/keys/public-only-account.d.ts.map +1 -0
- package/dist/keys/public-only-account.js +21 -0
- package/dist/keys/public-only-account.js.map +1 -0
- package/dist/keys/server-account.d.ts +2 -2
- package/dist/keys/server-account.d.ts.map +1 -1
- package/dist/lineage/attestation.d.ts +42 -0
- package/dist/lineage/attestation.d.ts.map +1 -0
- package/dist/lineage/attestation.js +25 -0
- package/dist/lineage/attestation.js.map +1 -0
- package/dist/lineage/gateway.d.ts +105 -0
- package/dist/lineage/gateway.d.ts.map +1 -0
- package/dist/lineage/gateway.js +242 -0
- package/dist/lineage/gateway.js.map +1 -0
- package/dist/lineage/index.d.ts +5 -0
- package/dist/lineage/index.d.ts.map +1 -0
- package/dist/lineage/index.js +5 -0
- package/dist/lineage/index.js.map +1 -0
- package/dist/lineage/lineage.d.ts +141 -0
- package/dist/lineage/lineage.d.ts.map +1 -0
- package/dist/lineage/lineage.js +255 -0
- package/dist/lineage/lineage.js.map +1 -0
- package/dist/logging/access-log.d.ts +10 -1
- package/dist/logging/access-log.d.ts.map +1 -1
- package/dist/mcp/activity.d.ts.map +1 -1
- package/dist/mcp/activity.js.map +1 -1
- package/dist/mcp/connection-api.d.ts.map +1 -1
- package/dist/mcp/connection-api.js +0 -1
- package/dist/mcp/connection-api.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/read-client.d.ts +61 -1
- package/dist/mcp/read-client.d.ts.map +1 -1
- package/dist/mcp/read-client.js +397 -42
- package/dist/mcp/read-client.js.map +1 -1
- package/dist/mcp/resources.d.ts +37 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +114 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/search/index.d.ts.map +1 -1
- package/dist/mcp/search/index.js +108 -21
- package/dist/mcp/search/index.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +27 -9
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session.d.ts +160 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +243 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/tools.d.ts +29 -3
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +515 -48
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/payment/index.d.ts +2 -0
- package/dist/payment/index.d.ts.map +1 -0
- package/dist/payment/index.js +2 -0
- package/dist/payment/index.js.map +1 -0
- package/dist/payment/x402.d.ts +155 -0
- package/dist/payment/x402.d.ts.map +1 -0
- package/dist/payment/x402.js +402 -0
- package/dist/payment/x402.js.map +1 -0
- package/dist/policy/data-read.d.ts +18 -2
- package/dist/policy/data-read.d.ts.map +1 -1
- package/dist/policy/data-read.js +80 -49
- package/dist/policy/data-read.js.map +1 -1
- package/dist/policy/data-write.d.ts +69 -0
- package/dist/policy/data-write.d.ts.map +1 -0
- package/dist/policy/data-write.js +131 -0
- package/dist/policy/data-write.js.map +1 -0
- package/dist/policy/index.d.ts +3 -1
- package/dist/policy/index.d.ts.map +1 -1
- package/dist/policy/index.js +3 -1
- package/dist/policy/index.js.map +1 -1
- package/dist/policy/signed-artifacts.d.ts +17 -0
- package/dist/policy/signed-artifacts.d.ts.map +1 -0
- package/dist/policy/signed-artifacts.js +110 -0
- package/dist/policy/signed-artifacts.js.map +1 -0
- package/dist/ports/index.d.ts +159 -32
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/index.js +6 -5
- package/dist/ports/index.js.map +1 -1
- package/dist/schemas/server-config.d.ts +49 -4
- package/dist/schemas/server-config.d.ts.map +1 -1
- package/dist/schemas/server-config.js +95 -13
- package/dist/schemas/server-config.js.map +1 -1
- package/dist/signing/index.d.ts +2 -2
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/index.js +1 -1
- package/dist/signing/index.js.map +1 -1
- package/dist/signing/request-signer.d.ts +2 -0
- package/dist/signing/request-signer.d.ts.map +1 -1
- package/dist/signing/request-signer.js +1 -0
- package/dist/signing/request-signer.js.map +1 -1
- package/dist/signing/signer.d.ts +27 -25
- package/dist/signing/signer.d.ts.map +1 -1
- package/dist/signing/signer.js +27 -51
- package/dist/signing/signer.js.map +1 -1
- package/dist/storage/adapters/index.d.ts +1 -1
- package/dist/storage/adapters/index.d.ts.map +1 -1
- package/dist/storage/adapters/index.js +1 -1
- package/dist/storage/adapters/index.js.map +1 -1
- package/dist/storage/adapters/interface.d.ts +10 -0
- package/dist/storage/adapters/interface.d.ts.map +1 -1
- package/dist/storage/adapters/sdk.d.ts +11 -1
- package/dist/storage/adapters/sdk.d.ts.map +1 -1
- package/dist/storage/adapters/sdk.js +38 -3
- package/dist/storage/adapters/sdk.js.map +1 -1
- package/dist/storage/adapters/vana.d.ts +3 -0
- package/dist/storage/adapters/vana.d.ts.map +1 -1
- package/dist/storage/adapters/vana.js +95 -2
- package/dist/storage/adapters/vana.js.map +1 -1
- package/dist/storage/blocks/errors.d.ts.map +1 -1
- package/dist/storage/blocks/errors.js.map +1 -1
- package/dist/storage/blocks/index.d.ts +2 -0
- package/dist/storage/blocks/index.d.ts.map +1 -1
- package/dist/storage/blocks/index.js +2 -0
- package/dist/storage/blocks/index.js.map +1 -1
- package/dist/storage/blocks/select.d.ts +29 -0
- package/dist/storage/blocks/select.d.ts.map +1 -0
- package/dist/storage/blocks/select.js +120 -0
- package/dist/storage/blocks/select.js.map +1 -0
- package/dist/storage/blocks/types.d.ts +7 -0
- package/dist/storage/blocks/types.d.ts.map +1 -1
- package/dist/storage/index/manager.d.ts +30 -2
- package/dist/storage/index/manager.d.ts.map +1 -1
- package/dist/storage/index/schema.d.ts +1 -1
- package/dist/storage/index/schema.js +1 -1
- package/dist/storage/index/types.d.ts +6 -1
- package/dist/storage/index/types.d.ts.map +1 -1
- package/dist/sync/data-point-feed.d.ts +35 -0
- package/dist/sync/data-point-feed.d.ts.map +1 -0
- package/dist/sync/data-point-feed.js +122 -0
- package/dist/sync/data-point-feed.js.map +1 -0
- package/dist/sync/data-point-id.d.ts +7 -0
- package/dist/sync/data-point-id.d.ts.map +1 -0
- package/dist/sync/data-point-id.js +16 -0
- package/dist/sync/data-point-id.js.map +1 -0
- package/dist/sync/delete-data-port.d.ts +50 -0
- package/dist/sync/delete-data-port.d.ts.map +1 -0
- package/dist/sync/delete-data-port.js +244 -0
- package/dist/sync/delete-data-port.js.map +1 -0
- package/dist/sync/engine/sync-manager.d.ts +16 -4
- package/dist/sync/engine/sync-manager.d.ts.map +1 -1
- package/dist/sync/engine/sync-manager.js +93 -32
- package/dist/sync/engine/sync-manager.js.map +1 -1
- package/dist/sync/index.d.ts +7 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +7 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/issues.d.ts.map +1 -1
- package/dist/sync/issues.js +21 -3
- package/dist/sync/issues.js.map +1 -1
- package/dist/sync/pending-blob-deletions.d.ts +29 -0
- package/dist/sync/pending-blob-deletions.d.ts.map +1 -0
- package/dist/sync/pending-blob-deletions.js +116 -0
- package/dist/sync/pending-blob-deletions.js.map +1 -0
- package/dist/sync/retry-memory.d.ts +33 -0
- package/dist/sync/retry-memory.d.ts.map +1 -0
- package/dist/sync/retry-memory.js +68 -0
- package/dist/sync/retry-memory.js.map +1 -0
- package/dist/sync/scope-deletions.d.ts +155 -0
- package/dist/sync/scope-deletions.d.ts.map +1 -0
- package/dist/sync/scope-deletions.js +225 -0
- package/dist/sync/scope-deletions.js.map +1 -0
- package/dist/sync/tombstone.d.ts +27 -0
- package/dist/sync/tombstone.d.ts.map +1 -0
- package/dist/sync/tombstone.js +28 -0
- package/dist/sync/tombstone.js.map +1 -0
- package/dist/sync/workers/delete.d.ts +152 -31
- package/dist/sync/workers/delete.d.ts.map +1 -1
- package/dist/sync/workers/delete.js +457 -55
- package/dist/sync/workers/delete.js.map +1 -1
- package/dist/sync/workers/download.d.ts +108 -27
- package/dist/sync/workers/download.d.ts.map +1 -1
- package/dist/sync/workers/download.js +321 -126
- package/dist/sync/workers/download.js.map +1 -1
- package/dist/sync/workers/upload.d.ts +65 -10
- package/dist/sync/workers/upload.d.ts.map +1 -1
- package/dist/sync/workers/upload.js +371 -42
- package/dist/sync/workers/upload.js.map +1 -1
- package/dist/test-utils/e2ee-fixtures.d.ts +94 -0
- package/dist/test-utils/e2ee-fixtures.d.ts.map +1 -0
- package/dist/test-utils/e2ee-fixtures.js +116 -0
- package/dist/test-utils/e2ee-fixtures.js.map +1 -0
- package/dist/test-utils/e2ee-gateway.d.ts +61 -0
- package/dist/test-utils/e2ee-gateway.d.ts.map +1 -0
- package/dist/test-utils/e2ee-gateway.js +248 -0
- package/dist/test-utils/e2ee-gateway.js.map +1 -0
- package/dist/test-utils/index.d.ts +3 -0
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +3 -0
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/memory-storage.d.ts +12 -0
- package/dist/test-utils/memory-storage.d.ts.map +1 -0
- package/dist/test-utils/memory-storage.js +146 -0
- package/dist/test-utils/memory-storage.js.map +1 -0
- package/dist/test-utils/wallet.d.ts +6 -0
- package/dist/test-utils/wallet.d.ts.map +1 -1
- package/dist/test-utils/wallet.js +46 -0
- package/dist/test-utils/wallet.js.map +1 -1
- package/dist/write/attribution.d.ts +185 -0
- package/dist/write/attribution.d.ts.map +1 -0
- package/dist/write/attribution.js +450 -0
- package/dist/write/attribution.js.map +1 -0
- package/dist/write/authorize.d.ts +77 -0
- package/dist/write/authorize.d.ts.map +1 -0
- package/dist/write/authorize.js +109 -0
- package/dist/write/authorize.js.map +1 -0
- package/dist/write/index.d.ts +5 -0
- package/dist/write/index.d.ts.map +1 -0
- package/dist/write/index.js +5 -0
- package/dist/write/index.js.map +1 -0
- package/dist/write/route.d.ts +61 -0
- package/dist/write/route.d.ts.map +1 -0
- package/dist/write/route.js +132 -0
- package/dist/write/route.js.map +1 -0
- package/dist/write/session.d.ts +96 -0
- package/dist/write/session.d.ts.map +1 -0
- package/dist/write/session.js +136 -0
- package/dist/write/session.js.map +1 -0
- package/package.json +19 -3
package/dist/api/index.d.ts
CHANGED
|
@@ -1,49 +1,226 @@
|
|
|
1
1
|
import type { AccessLogWriter } from "../logging/access-log.js";
|
|
2
2
|
import type { AccessLogReader } from "../logging/access-reader.js";
|
|
3
|
-
import { type DataStoragePort, type RuntimeAvailabilityPort
|
|
3
|
+
import { type DataStoragePort, type RuntimeAvailabilityPort } from "../ports/index.js";
|
|
4
4
|
import type { DataReadPolicyPorts } from "../policy/index.js";
|
|
5
5
|
import type { SyncManager } from "../sync/index.js";
|
|
6
|
+
import { type ScopeDeletionTracker } from "../sync/scope-deletions.js";
|
|
7
|
+
import type { IndexEntry } from "../storage/index/types.js";
|
|
8
|
+
import { type DeleteScopeResult } from "../sync/workers/delete.js";
|
|
6
9
|
import { type OAuthDeviceSessionLookup, type OAuthTokenStorePort } from "../contracts/index.js";
|
|
7
|
-
import type { DataPortabilityGatewayConfig, GatewayClient } from "@opendatalabs/vana-sdk/browser";
|
|
10
|
+
import type { DataFileEnvelope, DataPortabilityGatewayConfig, GatewayClient } from "@opendatalabs/vana-sdk/browser";
|
|
8
11
|
import type { ServerSigner } from "../signing/index.js";
|
|
12
|
+
import { type WriterAttribution } from "../write/attribution.js";
|
|
13
|
+
import type { LineageGatewayPort } from "../lineage/gateway.js";
|
|
14
|
+
import { type X402Challenge } from "../payment/index.js";
|
|
9
15
|
export interface PersonalServerReadAuthInput {
|
|
10
16
|
request: Request;
|
|
11
17
|
scope: string;
|
|
12
18
|
grantId?: string;
|
|
13
19
|
fileId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The `collectedAt` version the read is pinned to (cursor-pinned or
|
|
22
|
+
* `?at=`-pinned reads). Payment-enforcing auth ports use it to bind the
|
|
23
|
+
* x402 challenge/settlement to the exact version served, not the latest.
|
|
24
|
+
*/
|
|
25
|
+
at?: string;
|
|
14
26
|
}
|
|
15
27
|
export interface PersonalServerReadAuthResult {
|
|
16
28
|
builder?: `0x${string}` | string;
|
|
17
29
|
grantId?: string;
|
|
18
30
|
}
|
|
31
|
+
export interface PersonalServerWriteAuthInput {
|
|
32
|
+
request: Request;
|
|
33
|
+
/** Raw scope path param (validated by parseDataScopeContract after auth,
|
|
34
|
+
* same precedence as the owner write path). */
|
|
35
|
+
scope: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Result of authorizing a DELEGATED (write-session) write. A void return
|
|
39
|
+
* means the request was authorized as the owner instead — the ingest then
|
|
40
|
+
* proceeds exactly as today, with no attribution stamped.
|
|
41
|
+
*/
|
|
42
|
+
export interface PersonalServerWriteAuthResult {
|
|
43
|
+
builder: `0x${string}`;
|
|
44
|
+
grantId: string;
|
|
45
|
+
/**
|
|
46
|
+
* The live grant's scope entries (read entries bare, write entries
|
|
47
|
+
* `write:`-prefixed). Consumers that need more than the write permission
|
|
48
|
+
* (the derivative compute layer checks read coverage of source scopes)
|
|
49
|
+
* fail closed when this is absent.
|
|
50
|
+
*/
|
|
51
|
+
grantScopes?: string[];
|
|
52
|
+
attribution: WriterAttribution;
|
|
53
|
+
/**
|
|
54
|
+
* Rolls back the per-write proof reservation (replay guard). The handler
|
|
55
|
+
* calls it when the write fails BEFORE the record is committed, so the
|
|
56
|
+
* builder can retry with the same still-valid proof.
|
|
57
|
+
*/
|
|
58
|
+
releaseProof?: () => Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Result of recognizing a delegated caller WITHOUT a scope to authorize
|
|
62
|
+
* against (see `authorizeWriteSession`). Identity only: no grant policy has
|
|
63
|
+
* been evaluated, so this must never gate access to data — it exists so a
|
|
64
|
+
* route can tell "a builder is calling" from "nobody is authenticated" and
|
|
65
|
+
* answer 404 / 400 instead of a misleading 401.
|
|
66
|
+
*/
|
|
67
|
+
export interface PersonalServerWriteSessionResult {
|
|
68
|
+
builder: `0x${string}`;
|
|
69
|
+
grantId: string;
|
|
70
|
+
/** Rolls back the per-call proof reservation; see the write result. */
|
|
71
|
+
releaseProof?: () => Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
export interface PersonalServerReadFulfillment {
|
|
74
|
+
builder: string;
|
|
75
|
+
fileId?: string;
|
|
76
|
+
grantId: string;
|
|
77
|
+
ipAddress: string;
|
|
78
|
+
logId: string;
|
|
79
|
+
scope: string;
|
|
80
|
+
servedAt: string;
|
|
81
|
+
userAgent: string;
|
|
82
|
+
}
|
|
83
|
+
export interface PersonalServerReadFulfillmentReporter {
|
|
84
|
+
report(event: PersonalServerReadFulfillment): Promise<void>;
|
|
85
|
+
}
|
|
19
86
|
export interface PersonalServerApiAuthPort {
|
|
20
87
|
authorizeOwner(request: Request): Promise<void>;
|
|
21
88
|
authorizeBuilderList(request: Request): Promise<void>;
|
|
22
89
|
authorizeBuilderRead(input: PersonalServerReadAuthInput): Promise<PersonalServerReadAuthResult | void>;
|
|
90
|
+
/**
|
|
91
|
+
* Authorize a data ingest (POST /v1/data/:scope). Optional — auth ports
|
|
92
|
+
* that don't support delegated writes omit it and the handler falls back
|
|
93
|
+
* to authorizeOwner, preserving today's owner-only behavior. Ports that DO
|
|
94
|
+
* support write sessions handle BOTH paths here: a recognized session
|
|
95
|
+
* token authorizes as the builder (write policy + attribution proof) and
|
|
96
|
+
* returns the attribution to store; anything else falls through to the
|
|
97
|
+
* owner path and returns void.
|
|
98
|
+
*/
|
|
99
|
+
authorizeWrite?(input: PersonalServerWriteAuthInput): Promise<PersonalServerWriteAuthResult | void>;
|
|
100
|
+
/**
|
|
101
|
+
* Recognize a live write session (bearer + `X-Vana-Write-Signature` proof)
|
|
102
|
+
* WITHOUT authorizing a scope. Optional, and identity only: routes use it
|
|
103
|
+
* where there is no scope to authorize against yet — an unknown question
|
|
104
|
+
* id, or a builder list call missing its `?derivedScope=` — so the answer
|
|
105
|
+
* is 404 / 400 rather than the owner gate's 401, which would send every
|
|
106
|
+
* client with a re-handshake-on-401 policy through a pointless handshake.
|
|
107
|
+
* Returns void when the request carries no write-session credential.
|
|
108
|
+
*/
|
|
109
|
+
authorizeWriteSession?(request: Request): Promise<PersonalServerWriteSessionResult | void>;
|
|
23
110
|
}
|
|
24
111
|
export interface PersonalServerApiLogger {
|
|
112
|
+
debug?(payload: Record<string, unknown>, message: string): void;
|
|
25
113
|
info?(payload: Record<string, unknown>, message: string): void;
|
|
114
|
+
warn?(payload: Record<string, unknown>, message: string): void;
|
|
26
115
|
error?(payload: Record<string, unknown>, message: string): void;
|
|
27
116
|
}
|
|
28
117
|
export interface PersonalServerIngestSyncManager {
|
|
29
118
|
trigger(): Promise<void>;
|
|
30
119
|
notifyNewData?(): void;
|
|
31
|
-
/**
|
|
32
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Durable scope deletion (gateway tombstone -> storage blobs -> local).
|
|
122
|
+
* When absent the DELETE route deletes the local copy only and reports
|
|
123
|
+
* `durable: false`.
|
|
124
|
+
*/
|
|
125
|
+
deleteScope?(scope: string): Promise<DeleteScopeResult>;
|
|
33
126
|
}
|
|
34
127
|
export interface PersonalServerDataApiDeps {
|
|
35
128
|
storage: DataStoragePort;
|
|
36
129
|
auth: PersonalServerApiAuthPort;
|
|
37
|
-
schemaResolver?: SchemaResolverPort;
|
|
38
|
-
/** Auto-registers a "no-schema" schema for binary scopes that lack one. */
|
|
39
|
-
schemaRegistrar?: SchemaRegistrarPort;
|
|
40
130
|
accessLogWriter: AccessLogWriter;
|
|
41
131
|
syncManager?: PersonalServerIngestSyncManager | null;
|
|
42
132
|
runtimeAvailability?: RuntimeAvailabilityPort;
|
|
43
|
-
|
|
133
|
+
readFulfillmentReporter?: PersonalServerReadFulfillmentReporter;
|
|
134
|
+
/**
|
|
135
|
+
* Read-side memory of gateway tombstones (see sync/scope-deletions.ts for
|
|
136
|
+
* the consistency window). Every read consults it before serving or
|
|
137
|
+
* charging: a scope the gateway reports deleted answers 410 DATA_DELETED
|
|
138
|
+
* whether or not a stale local copy still exists, and a local miss on a
|
|
139
|
+
* deleted scope answers 410 instead of 404 so SDK readers can tell
|
|
140
|
+
* "deleted" from "never had it". Without it reads are local-only.
|
|
141
|
+
*/
|
|
142
|
+
scopeDeletions?: ScopeDeletionTracker;
|
|
143
|
+
/**
|
|
144
|
+
* Required when payment is on. Powers two things on GET /v1/data/:scope:
|
|
145
|
+
* - the X402 challenge generation (fee lookup, accessRecord binding)
|
|
146
|
+
* - the forward of validated X-PAYMENTs to gateway.payForOperation
|
|
147
|
+
*
|
|
148
|
+
* Two channels because the SDK client's payForOperation throws plain
|
|
149
|
+
* Errors on non-2xx and loses the gateway's structured error body — we
|
|
150
|
+
* need that body to map gateway 402/409/400 into fresh challenges.
|
|
151
|
+
*/
|
|
152
|
+
gateway?: Pick<GatewayClient, "getGrant">;
|
|
153
|
+
/**
|
|
154
|
+
* Gateway base URL. Used for the direct-fetch forwarding of validated
|
|
155
|
+
* X-PAYMENTs to POST /v1/escrow/pay so we can inspect the gateway's
|
|
156
|
+
* structured error body (which the SDK's gateway.payForOperation
|
|
157
|
+
* discards). Required when X402 is enabled.
|
|
158
|
+
*/
|
|
159
|
+
gatewayUrl?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Required to construct escrowPaymentDomain + dataRegistryDomain for
|
|
162
|
+
* EIP-712 signature recovery during X-PAYMENT validation.
|
|
163
|
+
*/
|
|
164
|
+
gatewayConfig?: DataPortabilityGatewayConfig;
|
|
165
|
+
/**
|
|
166
|
+
* Required for the X402 flow. Signs RECORD_DATA_ACCESS attestations
|
|
167
|
+
* embedded in 402 challenges. Without it, challenges still issue but
|
|
168
|
+
* never include an accessRecord — gateway accepts the resulting payment
|
|
169
|
+
* but the on-chain recordDataAccess won't be scheduled.
|
|
170
|
+
*/
|
|
171
|
+
serverSigner?: Pick<ServerSigner, "signRecordDataAccess">;
|
|
172
|
+
serverOwner?: `0x${string}`;
|
|
173
|
+
/**
|
|
174
|
+
* The server's own account address — accessRecord signatures must
|
|
175
|
+
* recover to this for the X-PAYMENT validation to accept them as
|
|
176
|
+
* server-issued.
|
|
177
|
+
*/
|
|
178
|
+
serverAddress?: `0x${string}`;
|
|
179
|
+
/**
|
|
180
|
+
* Identifier echoed in the X402 challenge as `accepts[].network`. Pure
|
|
181
|
+
* convention (e.g. "vana-moksha"); the gateway doesn't read it.
|
|
182
|
+
*/
|
|
183
|
+
network?: string;
|
|
184
|
+
/**
|
|
185
|
+
* When true, GET /v1/data/:scope enforces the X402 dance: missing /
|
|
186
|
+
* invalid X-PAYMENT → 402 challenge; valid → forward to gateway then
|
|
187
|
+
* serve. When false (default), reads bypass payment entirely.
|
|
188
|
+
*/
|
|
189
|
+
paymentEnabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Test seam for the gateway forwarding fetch. Defaults to the global
|
|
192
|
+
* `fetch`; tests inject a mock that returns specific gateway statuses.
|
|
193
|
+
*/
|
|
194
|
+
paymentFetch?: typeof fetch;
|
|
195
|
+
/**
|
|
196
|
+
* Test seam for the per-event recordId / paymentNonce / clock. Production
|
|
197
|
+
* leaves these unset and the X402 module generates fresh values via
|
|
198
|
+
* crypto.getRandomValues / Date.now.
|
|
199
|
+
*/
|
|
200
|
+
generateRecordId?: () => `0x${string}`;
|
|
201
|
+
generatePaymentNonce?: () => bigint;
|
|
44
202
|
now?: () => Date;
|
|
45
203
|
createLogId?: () => string;
|
|
46
204
|
logger?: PersonalServerApiLogger;
|
|
205
|
+
/**
|
|
206
|
+
* Gateway access for derivative data (docs/derivative-data-api.md): source
|
|
207
|
+
* lookups for lineage validation on write and the signed lineage read
|
|
208
|
+
* behind GET /v1/data/:scope/lineage. Absent = writes with lineage can
|
|
209
|
+
* only cite local scopes and the lineage read answers 503.
|
|
210
|
+
*/
|
|
211
|
+
lineageGateway?: LineageGatewayPort;
|
|
212
|
+
/**
|
|
213
|
+
* Called after a write is committed (owner or builder, JSON or binary).
|
|
214
|
+
* The derivative compute layer uses it to mark questions that read the
|
|
215
|
+
* scope stale (recompute on refresh). Best-effort: a throwing hook is
|
|
216
|
+
* swallowed, the write already succeeded.
|
|
217
|
+
*/
|
|
218
|
+
onDataWritten?: (event: {
|
|
219
|
+
scope: string;
|
|
220
|
+
collectedAt: string;
|
|
221
|
+
/** The stamped `$lineage.sources` of the written record, if any. */
|
|
222
|
+
lineageSources?: string[];
|
|
223
|
+
}) => void;
|
|
47
224
|
}
|
|
48
225
|
export interface PersonalServerAccessLogsApiDeps {
|
|
49
226
|
auth: Pick<PersonalServerApiAuthPort, "authorizeOwner">;
|
|
@@ -56,7 +233,7 @@ export interface PersonalServerSyncApiDeps {
|
|
|
56
233
|
}
|
|
57
234
|
export interface PersonalServerGrantsApiDeps {
|
|
58
235
|
auth: Pick<PersonalServerApiAuthPort, "authorizeOwner">;
|
|
59
|
-
gateway?: Pick<GatewayClient, "getBuilder" | "createGrant" | "listGrantsByUser" | "revokeGrant">;
|
|
236
|
+
gateway?: Pick<GatewayClient, "getBuilder" | "createGrant" | "listGrantsByUser" | "revokeGrant" | "getGrant">;
|
|
60
237
|
gatewayConfig?: DataPortabilityGatewayConfig;
|
|
61
238
|
serverOwner?: `0x${string}`;
|
|
62
239
|
serverSigner?: Pick<ServerSigner, "signGrantRegistration"> & Partial<Pick<ServerSigner, "signGrantRevocation">>;
|
|
@@ -78,6 +255,102 @@ export interface PersonalServerOauthTokenApiDeps {
|
|
|
78
255
|
export interface PersonalServerApiDispatchOptions {
|
|
79
256
|
basePath?: string;
|
|
80
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* The grant the caller nominates for a read: `?grantId=` or the
|
|
260
|
+
* `x-ps-grant-id` header, the SDK's shape on every read route. Exported so
|
|
261
|
+
* the derivatives status route authorizes with exactly the same inputs as
|
|
262
|
+
* a data read — a credential that reads /v1/data/<scope> must not be
|
|
263
|
+
* refused by /v1/derivatives/status.
|
|
264
|
+
*/
|
|
265
|
+
export declare function selectedGrantId(request: Request, url: URL): string | undefined;
|
|
266
|
+
export interface X402CycleInput {
|
|
267
|
+
deps: PersonalServerDataApiDeps;
|
|
268
|
+
request: Request;
|
|
269
|
+
scope: string;
|
|
270
|
+
fileIdParam?: string;
|
|
271
|
+
atParam?: string;
|
|
272
|
+
grantId: string;
|
|
273
|
+
builder: `0x${string}`;
|
|
274
|
+
gateway: Pick<GatewayClient, "getGrant">;
|
|
275
|
+
gatewayConfig: DataPortabilityGatewayConfig;
|
|
276
|
+
gatewayUrl: string;
|
|
277
|
+
}
|
|
278
|
+
export type X402CycleResult = {
|
|
279
|
+
kind: "ok";
|
|
280
|
+
payResponse: unknown;
|
|
281
|
+
} | {
|
|
282
|
+
kind: "challenge";
|
|
283
|
+
body: X402Challenge;
|
|
284
|
+
} | {
|
|
285
|
+
kind: "gateway-error";
|
|
286
|
+
status: number;
|
|
287
|
+
body: unknown;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Run the X402 dispatch for one read:
|
|
291
|
+
*
|
|
292
|
+
* X-PAYMENT absent / malformed / fails local validation
|
|
293
|
+
* → challenge: fresh 402 with current fee + accessRecord
|
|
294
|
+
* X-PAYMENT valid, forward to gateway succeeds
|
|
295
|
+
* → ok: caller proceeds to read the data
|
|
296
|
+
* X-PAYMENT valid, gateway returns 4xx/5xx
|
|
297
|
+
* → gateway-error: relay the gateway's body verbatim so the builder
|
|
298
|
+
* can dispatch (insufficient balance vs. replay vs. race etc.)
|
|
299
|
+
*
|
|
300
|
+
* The gateway POST goes through `fetch` directly (not `gateway.payForOperation`)
|
|
301
|
+
* because the SDK client throws plain Errors and loses the body — which is
|
|
302
|
+
* exactly what we need to distinguish gateway 402 (insufficient balance) from
|
|
303
|
+
* 409 (replay) from 400 (amount mismatch).
|
|
304
|
+
*/
|
|
305
|
+
export declare function handleX402Cycle(input: X402CycleInput): Promise<X402CycleResult>;
|
|
306
|
+
/**
|
|
307
|
+
* The deletion that applies to a read of `scope`, or null when the read may
|
|
308
|
+
* be served. `entry` is the local version the read would serve (undefined
|
|
309
|
+
* on a local miss).
|
|
310
|
+
*
|
|
311
|
+
* - A local copy is refused when the gateway holds a tombstone that covers
|
|
312
|
+
* it (see `isEntryCoveredByTombstone`: registry versions and the ingest
|
|
313
|
+
* marker, never clocks). A local re-add on top of the tombstone is served.
|
|
314
|
+
* - A local miss asks the tracker to consult the gateway (bounded by its
|
|
315
|
+
* per-scope verdict cache and failure back-off): the local index cannot
|
|
316
|
+
* tell "deleted long ago" from "never had it".
|
|
317
|
+
* Gateway unreachability never fails the read: the tracker answers from its
|
|
318
|
+
* last known state, which is the documented offline behaviour.
|
|
319
|
+
*/
|
|
320
|
+
export declare function resolveReadDeletion(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined): Promise<{
|
|
321
|
+
scope: string;
|
|
322
|
+
dataPointId: string | null;
|
|
323
|
+
deletedAt: string;
|
|
324
|
+
} | null>;
|
|
325
|
+
/**
|
|
326
|
+
* Throw 410 DATA_DELETED when `resolveReadDeletion` says the read must not be
|
|
327
|
+
* served. Call it before any payment step: a builder must never be charged
|
|
328
|
+
* for a scope the owner deleted.
|
|
329
|
+
*/
|
|
330
|
+
export declare function assertScopeNotDeleted(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined): Promise<void>;
|
|
331
|
+
/** The index fields the deletion gate needs from the entry a read would serve. */
|
|
332
|
+
export type ReadDeletionEntry = Pick<IndexEntry, "version" | "dataPointId" | "afterTombstoneVersion">;
|
|
333
|
+
export declare function reportPersonalServerReadFulfillment(deps: PersonalServerDataApiDeps, event: PersonalServerReadFulfillment): void;
|
|
334
|
+
/**
|
|
335
|
+
* True when a read auth result entitles the caller to the owner's view of a
|
|
336
|
+
* record — the same convention as resolveLineageGrantView: no result, or the
|
|
337
|
+
* "owner" / "policy-bypass" sentinels. Everything else is a grantee.
|
|
338
|
+
*/
|
|
339
|
+
export declare function isOwnerView(authResult: PersonalServerReadAuthResult | void): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* The envelope view a grantee read is entitled to. The server-stamped
|
|
342
|
+
* `$writtenBy` (writing builder's address, grantId, signature) and
|
|
343
|
+
* `$lineage` (the owner's source data-point ids, dictionary-attackable back
|
|
344
|
+
* to scopes since dataPointId = keccak(owner, scope)) never leave the server
|
|
345
|
+
* on a grantee read: the owner reads them from storage, and grantees get the
|
|
346
|
+
* graph only through the grant-redacted lineage endpoint. When `$lineage` is
|
|
347
|
+
* present, the caller-supplied lineage field it mirrors (top-level `lineage`
|
|
348
|
+
* on a JSON record, `metadata.lineage` on a binary one) carries the same ids
|
|
349
|
+
* and is dropped with it; without the stamp such a field is ordinary user
|
|
350
|
+
* data and stays. Redaction is at serve time only — the stored envelope, its
|
|
351
|
+
* dataHash commitment, and the owner's view are unchanged.
|
|
352
|
+
*/
|
|
353
|
+
export declare function redactEnvelopeForGrantee(envelope: DataFileEnvelope): DataFileEnvelope;
|
|
81
354
|
export declare function handlePersonalServerDataRequest(request: Request, deps: PersonalServerDataApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
|
82
355
|
export declare function handlePersonalServerAccessLogsRequest(request: Request, deps: PersonalServerAccessLogsApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
|
83
356
|
export declare function handlePersonalServerSyncRequest(request: Request, deps: PersonalServerSyncApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAoBL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EASzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,aAAa,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,OAAO,EA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