@opendatalabs/personal-server-ts-core 1.33.8 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/additions/budget.d.ts +28 -0
- package/dist/additions/budget.d.ts.map +1 -0
- package/dist/additions/budget.js +119 -0
- package/dist/additions/budget.js.map +1 -0
- package/dist/additions/durable.d.ts +64 -0
- package/dist/additions/durable.d.ts.map +1 -0
- package/dist/additions/durable.js +591 -0
- package/dist/additions/durable.js.map +1 -0
- package/dist/additions/first-added.d.ts +32 -48
- package/dist/additions/first-added.d.ts.map +1 -1
- package/dist/additions/first-added.js +68 -123
- package/dist/additions/first-added.js.map +1 -1
- package/dist/additions/index.d.ts +3 -0
- package/dist/additions/index.d.ts.map +1 -1
- package/dist/additions/index.js +3 -0
- package/dist/additions/index.js.map +1 -1
- package/dist/additions/ledger-store.js +1 -1
- package/dist/additions/record-rules.d.ts.map +1 -1
- package/dist/additions/record-rules.js +7 -0
- package/dist/additions/record-rules.js.map +1 -1
- package/dist/additions/summary.d.ts +88 -1
- package/dist/additions/summary.d.ts.map +1 -1
- package/dist/additions/summary.js +173 -8
- package/dist/additions/summary.js.map +1 -1
- package/dist/additions/version-inventory.d.ts +80 -0
- package/dist/additions/version-inventory.d.ts.map +1 -0
- package/dist/additions/version-inventory.js +232 -0
- package/dist/additions/version-inventory.js.map +1 -0
- package/dist/api/index.d.ts +70 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +506 -79
- package/dist/api/index.js.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/request.d.ts +6 -0
- package/dist/auth/request.d.ts.map +1 -1
- package/dist/auth/request.js +66 -4
- package/dist/auth/request.js.map +1 -1
- package/dist/contracts/data.d.ts +54 -8
- package/dist/contracts/data.d.ts.map +1 -1
- package/dist/contracts/data.js +178 -35
- package/dist/contracts/data.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/derivatives/registration.d.ts +0 -5
- package/dist/derivatives/registration.d.ts.map +1 -1
- package/dist/derivatives/registration.js +2 -1
- package/dist/derivatives/registration.js.map +1 -1
- package/dist/errors/pdpp-catalog.d.ts +36 -0
- package/dist/errors/pdpp-catalog.d.ts.map +1 -0
- package/dist/errors/pdpp-catalog.js +86 -0
- package/dist/errors/pdpp-catalog.js.map +1 -0
- package/dist/grants/index.d.ts +2 -0
- package/dist/grants/index.d.ts.map +1 -1
- package/dist/grants/index.js +4 -0
- package/dist/grants/index.js.map +1 -1
- package/dist/grants/pdpp-binding-store.d.ts +89 -0
- package/dist/grants/pdpp-binding-store.d.ts.map +1 -0
- package/dist/grants/pdpp-binding-store.js +112 -0
- package/dist/grants/pdpp-binding-store.js.map +1 -0
- package/dist/grants/pdpp-binding.d.ts +169 -0
- package/dist/grants/pdpp-binding.d.ts.map +1 -0
- package/dist/grants/pdpp-binding.js +236 -0
- package/dist/grants/pdpp-binding.js.map +1 -0
- package/dist/legacy-projection/bindings.d.ts +28 -1
- package/dist/legacy-projection/bindings.d.ts.map +1 -1
- package/dist/legacy-projection/bindings.js +622 -189
- package/dist/legacy-projection/bindings.js.map +1 -1
- package/dist/legacy-projection/claude-source-record.d.ts +22 -0
- package/dist/legacy-projection/claude-source-record.d.ts.map +1 -0
- package/dist/legacy-projection/claude-source-record.js +360 -0
- package/dist/legacy-projection/claude-source-record.js.map +1 -0
- package/dist/legacy-projection/declared-text.d.ts +41 -0
- package/dist/legacy-projection/declared-text.d.ts.map +1 -0
- package/dist/legacy-projection/declared-text.js +199 -0
- package/dist/legacy-projection/declared-text.js.map +1 -0
- package/dist/legacy-projection/github-browser-bindings.d.ts.map +1 -1
- package/dist/legacy-projection/github-browser-bindings.js +89 -5
- package/dist/legacy-projection/github-browser-bindings.js.map +1 -1
- package/dist/legacy-projection/github-legacy-fields.d.ts +6 -0
- package/dist/legacy-projection/github-legacy-fields.d.ts.map +1 -0
- package/dist/legacy-projection/github-legacy-fields.js +202 -0
- package/dist/legacy-projection/github-legacy-fields.js.map +1 -0
- package/dist/legacy-projection/index.d.ts +3 -1
- package/dist/legacy-projection/index.d.ts.map +1 -1
- package/dist/legacy-projection/index.js +49 -1
- package/dist/legacy-projection/index.js.map +1 -1
- package/dist/legacy-projection/oura-browser-bindings.d.ts.map +1 -1
- package/dist/legacy-projection/oura-browser-bindings.js +43 -41
- package/dist/legacy-projection/oura-browser-bindings.js.map +1 -1
- package/dist/legacy-projection/types.d.ts +38 -2
- package/dist/legacy-projection/types.d.ts.map +1 -1
- package/dist/mcp/resources.d.ts.map +1 -1
- package/dist/mcp/resources.js +3 -0
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +11 -2
- package/dist/mcp/tools.js.map +1 -1
- package/dist/pdpp/approval.d.ts +271 -0
- package/dist/pdpp/approval.d.ts.map +1 -0
- package/dist/pdpp/approval.js +467 -0
- package/dist/pdpp/approval.js.map +1 -0
- package/dist/pdpp/client-identity.d.ts +88 -0
- package/dist/pdpp/client-identity.d.ts.map +1 -0
- package/dist/pdpp/client-identity.js +196 -0
- package/dist/pdpp/client-identity.js.map +1 -0
- package/dist/pdpp/client-metadata.d.ts +95 -0
- package/dist/pdpp/client-metadata.d.ts.map +1 -0
- package/dist/pdpp/client-metadata.js +96 -0
- package/dist/pdpp/client-metadata.js.map +1 -0
- package/dist/pdpp/commitments.d.ts +75 -0
- package/dist/pdpp/commitments.d.ts.map +1 -0
- package/dist/pdpp/commitments.js +113 -0
- package/dist/pdpp/commitments.js.map +1 -0
- package/dist/pdpp/declaration.d.ts +118 -0
- package/dist/pdpp/declaration.d.ts.map +1 -0
- package/dist/pdpp/declaration.js +836 -0
- package/dist/pdpp/declaration.js.map +1 -0
- package/dist/pdpp/index.d.ts +37 -0
- package/dist/pdpp/index.d.ts.map +1 -0
- package/dist/pdpp/index.js +23 -0
- package/dist/pdpp/index.js.map +1 -0
- package/dist/pdpp/issuance.d.ts +126 -0
- package/dist/pdpp/issuance.d.ts.map +1 -0
- package/dist/pdpp/issuance.js +180 -0
- package/dist/pdpp/issuance.js.map +1 -0
- package/dist/pdpp/pkce.d.ts +53 -0
- package/dist/pdpp/pkce.d.ts.map +1 -0
- package/dist/pdpp/pkce.js +109 -0
- package/dist/pdpp/pkce.js.map +1 -0
- package/dist/pdpp/redirect.d.ts +60 -0
- package/dist/pdpp/redirect.d.ts.map +1 -0
- package/dist/pdpp/redirect.js +125 -0
- package/dist/pdpp/redirect.js.map +1 -0
- package/dist/pdpp/resolve.d.ts +109 -0
- package/dist/pdpp/resolve.d.ts.map +1 -0
- package/dist/pdpp/resolve.js +393 -0
- package/dist/pdpp/resolve.js.map +1 -0
- package/dist/pdpp/review.d.ts +280 -0
- package/dist/pdpp/review.d.ts.map +1 -0
- package/dist/pdpp/review.js +205 -0
- package/dist/pdpp/review.js.map +1 -0
- package/dist/pdpp/selection.d.ts +50 -0
- package/dist/pdpp/selection.d.ts.map +1 -0
- package/dist/pdpp/selection.js +442 -0
- package/dist/pdpp/selection.js.map +1 -0
- package/dist/pdpp/store.d.ts +228 -0
- package/dist/pdpp/store.d.ts.map +1 -0
- package/dist/pdpp/store.js +542 -0
- package/dist/pdpp/store.js.map +1 -0
- package/dist/pdpp/tokens.d.ts +181 -0
- package/dist/pdpp/tokens.d.ts.map +1 -0
- package/dist/pdpp/tokens.js +419 -0
- package/dist/pdpp/tokens.js.map +1 -0
- package/dist/pdpp/types.d.ts +441 -0
- package/dist/pdpp/types.d.ts.map +1 -0
- package/dist/pdpp/types.js +61 -0
- package/dist/pdpp/types.js.map +1 -0
- package/dist/pdpp-version.d.ts +28 -0
- package/dist/pdpp-version.d.ts.map +1 -0
- package/dist/pdpp-version.js +28 -0
- package/dist/pdpp-version.js.map +1 -0
- package/dist/policy/data-read.d.ts +24 -0
- package/dist/policy/data-read.d.ts.map +1 -1
- package/dist/policy/data-read.js +60 -3
- package/dist/policy/data-read.js.map +1 -1
- package/dist/policy/data-write.d.ts.map +1 -1
- package/dist/policy/data-write.js +3 -0
- package/dist/policy/data-write.js.map +1 -1
- package/dist/policy/index.d.ts +1 -0
- package/dist/policy/index.d.ts.map +1 -1
- package/dist/policy/index.js +1 -0
- package/dist/policy/index.js.map +1 -1
- package/dist/policy/reserved-scopes.d.ts +3 -0
- package/dist/policy/reserved-scopes.d.ts.map +1 -0
- package/dist/policy/reserved-scopes.js +5 -0
- package/dist/policy/reserved-scopes.js.map +1 -0
- package/dist/ports/index.d.ts +63 -0
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/index.js.map +1 -1
- package/dist/ports/pdpp-auth.d.ts +129 -0
- package/dist/ports/pdpp-auth.d.ts.map +1 -0
- package/dist/ports/pdpp-auth.js +60 -0
- package/dist/ports/pdpp-auth.js.map +1 -0
- package/dist/ports/pdpp-auth.test-utils.d.ts +9 -0
- package/dist/ports/pdpp-auth.test-utils.d.ts.map +1 -0
- package/dist/ports/pdpp-auth.test-utils.js +18 -0
- package/dist/ports/pdpp-auth.test-utils.js.map +1 -0
- package/dist/schemas/server-config.d.ts +44 -0
- package/dist/schemas/server-config.d.ts.map +1 -1
- package/dist/schemas/server-config.js +91 -0
- package/dist/schemas/server-config.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/storage/adapters/interface.d.ts +3 -0
- package/dist/storage/adapters/interface.d.ts.map +1 -1
- package/dist/storage/adapters/vana-audience.d.ts +12 -0
- package/dist/storage/adapters/vana-audience.d.ts.map +1 -0
- package/dist/storage/adapters/vana-audience.js +72 -0
- package/dist/storage/adapters/vana-audience.js.map +1 -0
- package/dist/storage/adapters/vana.d.ts +2 -0
- package/dist/storage/adapters/vana.d.ts.map +1 -1
- package/dist/storage/adapters/vana.js +53 -20
- package/dist/storage/adapters/vana.js.map +1 -1
- package/dist/storage/canonical-legacy-projection.d.ts +262 -0
- package/dist/storage/canonical-legacy-projection.d.ts.map +1 -0
- package/dist/storage/canonical-legacy-projection.js +761 -0
- package/dist/storage/canonical-legacy-projection.js.map +1 -0
- package/dist/storage/index/manager.d.ts +29 -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 +7 -1
- package/dist/storage/index/types.d.ts.map +1 -1
- package/dist/storage/legacy-projection.d.ts +4 -3
- package/dist/storage/legacy-projection.d.ts.map +1 -1
- package/dist/storage/legacy-projection.js +145 -42
- package/dist/storage/legacy-projection.js.map +1 -1
- package/dist/storage/legacy-scope-coverage-exceptions.d.ts +8 -0
- package/dist/storage/legacy-scope-coverage-exceptions.d.ts.map +1 -0
- package/dist/storage/legacy-scope-coverage-exceptions.js +10 -0
- package/dist/storage/legacy-scope-coverage-exceptions.js.map +1 -0
- package/dist/storage/legacy-scope-coverage.d.ts +53 -0
- package/dist/storage/legacy-scope-coverage.d.ts.map +1 -0
- package/dist/storage/legacy-scope-coverage.js +403 -0
- package/dist/storage/legacy-scope-coverage.js.map +1 -0
- package/dist/storage/legacy-scope-entity-keys.d.ts +4 -0
- package/dist/storage/legacy-scope-entity-keys.d.ts.map +1 -0
- package/dist/storage/legacy-scope-entity-keys.js +92 -0
- package/dist/storage/legacy-scope-entity-keys.js.map +1 -0
- package/dist/storage/legacy-scope-view.d.ts +154 -0
- package/dist/storage/legacy-scope-view.d.ts.map +1 -0
- package/dist/storage/legacy-scope-view.js +735 -0
- package/dist/storage/legacy-scope-view.js.map +1 -0
- package/dist/storage/pdpp-records/completion.d.ts +91 -0
- package/dist/storage/pdpp-records/completion.d.ts.map +1 -0
- package/dist/storage/pdpp-records/completion.js +170 -0
- package/dist/storage/pdpp-records/completion.js.map +1 -0
- package/dist/storage/pdpp-records/cursor.d.ts +41 -0
- package/dist/storage/pdpp-records/cursor.d.ts.map +1 -0
- package/dist/storage/pdpp-records/cursor.js +49 -0
- package/dist/storage/pdpp-records/cursor.js.map +1 -0
- package/dist/storage/pdpp-records/declaration-witness.d.ts +58 -0
- package/dist/storage/pdpp-records/declaration-witness.d.ts.map +1 -0
- package/dist/storage/pdpp-records/declaration-witness.js +230 -0
- package/dist/storage/pdpp-records/declaration-witness.js.map +1 -0
- package/dist/storage/pdpp-records/enforcement.d.ts +52 -0
- package/dist/storage/pdpp-records/enforcement.d.ts.map +1 -0
- package/dist/storage/pdpp-records/enforcement.js +116 -0
- package/dist/storage/pdpp-records/enforcement.js.map +1 -0
- package/dist/storage/pdpp-records/index.d.ts +5 -0
- package/dist/storage/pdpp-records/index.d.ts.map +1 -0
- package/dist/storage/pdpp-records/index.js +5 -0
- package/dist/storage/pdpp-records/index.js.map +1 -0
- package/dist/storage/pdpp-records/ingest-plan.d.ts +39 -0
- package/dist/storage/pdpp-records/ingest-plan.d.ts.map +1 -0
- package/dist/storage/pdpp-records/ingest-plan.js +103 -0
- package/dist/storage/pdpp-records/ingest-plan.js.map +1 -0
- package/dist/storage/pdpp-records/interface.d.ts +104 -0
- package/dist/storage/pdpp-records/interface.d.ts.map +1 -0
- package/dist/storage/pdpp-records/interface.js +2 -0
- package/dist/storage/pdpp-records/interface.js.map +1 -0
- package/dist/storage/pdpp-records/memory-store.d.ts +9 -0
- package/dist/storage/pdpp-records/memory-store.d.ts.map +1 -0
- package/dist/storage/pdpp-records/memory-store.js +466 -0
- package/dist/storage/pdpp-records/memory-store.js.map +1 -0
- package/dist/storage/pdpp-records/portable.d.ts +9 -0
- package/dist/storage/pdpp-records/portable.d.ts.map +1 -0
- package/dist/storage/pdpp-records/portable.js +8 -0
- package/dist/storage/pdpp-records/portable.js.map +1 -0
- package/dist/storage/pdpp-records/read-port.d.ts +44 -0
- package/dist/storage/pdpp-records/read-port.d.ts.map +1 -0
- package/dist/storage/pdpp-records/read-port.js +22 -0
- package/dist/storage/pdpp-records/read-port.js.map +1 -0
- package/dist/storage/pdpp-records/record-key.d.ts +52 -0
- package/dist/storage/pdpp-records/record-key.d.ts.map +1 -0
- package/dist/storage/pdpp-records/record-key.js +97 -0
- package/dist/storage/pdpp-records/record-key.js.map +1 -0
- package/dist/storage/pdpp-records/schema.d.ts +41 -0
- package/dist/storage/pdpp-records/schema.d.ts.map +1 -0
- package/dist/storage/pdpp-records/schema.js +153 -0
- package/dist/storage/pdpp-records/schema.js.map +1 -0
- package/dist/storage/pdpp-records/stream-declaration.d.ts +88 -0
- package/dist/storage/pdpp-records/stream-declaration.d.ts.map +1 -0
- package/dist/storage/pdpp-records/stream-declaration.js +57 -0
- package/dist/storage/pdpp-records/stream-declaration.js.map +1 -0
- package/dist/storage/pdpp-records/types.d.ts +138 -0
- package/dist/storage/pdpp-records/types.d.ts.map +1 -0
- package/dist/storage/pdpp-records/types.js +38 -0
- package/dist/storage/pdpp-records/types.js.map +1 -0
- package/dist/sync/data-point-feed.d.ts +3 -0
- package/dist/sync/data-point-feed.d.ts.map +1 -1
- package/dist/sync/data-point-feed.js +17 -1
- package/dist/sync/data-point-feed.js.map +1 -1
- package/dist/sync/delete-data-port.d.ts +2 -0
- package/dist/sync/delete-data-port.d.ts.map +1 -1
- package/dist/sync/delete-data-port.js +1 -1
- package/dist/sync/delete-data-port.js.map +1 -1
- package/dist/sync/engine/sync-manager.d.ts.map +1 -1
- package/dist/sync/engine/sync-manager.js +5 -2
- package/dist/sync/engine/sync-manager.js.map +1 -1
- package/dist/sync/index.d.ts +3 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +4 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/pdpp-import.d.ts +192 -0
- package/dist/sync/pdpp-import.d.ts.map +1 -0
- package/dist/sync/pdpp-import.js +441 -0
- package/dist/sync/pdpp-import.js.map +1 -0
- package/dist/sync/scope-deletions.d.ts +10 -0
- package/dist/sync/scope-deletions.d.ts.map +1 -1
- package/dist/sync/scope-deletions.js +40 -7
- package/dist/sync/scope-deletions.js.map +1 -1
- package/dist/sync/workers/download.d.ts +14 -0
- package/dist/sync/workers/download.d.ts.map +1 -1
- package/dist/sync/workers/download.js +149 -13
- package/dist/sync/workers/download.js.map +1 -1
- package/dist/sync/workers/upload.d.ts +2 -0
- package/dist/sync/workers/upload.d.ts.map +1 -1
- package/dist/sync/workers/upload.js +7 -0
- package/dist/sync/workers/upload.js.map +1 -1
- package/dist/test-utils/memory-storage.d.ts +1 -1
- package/dist/test-utils/memory-storage.d.ts.map +1 -1
- package/dist/test-utils/memory-storage.js +11 -5
- package/dist/test-utils/memory-storage.js.map +1 -1
- package/package.json +54 -4
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDPP Core v0.1.0 authorization types.
|
|
3
|
+
*
|
|
4
|
+
* These mirror the normative field tables in PDPP Core §6 (Selection Request)
|
|
5
|
+
* and §7 (Grant). Where this file and the spec disagree, the spec wins — §7
|
|
6
|
+
* says so explicitly about its own TypeScript mirror.
|
|
7
|
+
*
|
|
8
|
+
* The PDPP grant model is deliberately separate from the Vana chain grant in
|
|
9
|
+
* `../grants/`. That one is an EIP-712 payload binding a builder address to
|
|
10
|
+
* dot-scopes; this one is an RFC 9396 consent artifact binding an OAuth client
|
|
11
|
+
* to declaration-resolved streams. They are different authorities over
|
|
12
|
+
* different data and must not be conflated.
|
|
13
|
+
*/
|
|
14
|
+
/** The RFC 9396 `type` value that marks an authorization detail as PDPP. */
|
|
15
|
+
export declare const PDPP_DATA_ACCESS_TYPE = "https://pdpp.dev/data-access";
|
|
16
|
+
/**
|
|
17
|
+
* The v0.2 RFC 9396 `type`.
|
|
18
|
+
*
|
|
19
|
+
* v0.2 is deliberately a *separate* detail type rather than a compatible
|
|
20
|
+
* extension of v0.1. The revision changes authorization resolution (explicit
|
|
21
|
+
* minima) and disclosed-record semantics (a schema's `required` array is no
|
|
22
|
+
* longer a consent floor), so the two are not wire-compatible: the same
|
|
23
|
+
* request body resolves to a different grant under each. An AS implementing
|
|
24
|
+
* both MUST resolve each under its own revision, which is why every rule below
|
|
25
|
+
* branches on this constant rather than on the presence of a v0.2-only member.
|
|
26
|
+
*
|
|
27
|
+
* A client MUST NOT retry a rejected v0.2 request under the v0.1 type without
|
|
28
|
+
* a new authorization decision; nothing here silently downgrades one.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PDPP_DATA_ACCESS_TYPE_V02 = "https://pdpp.dev/data-access/0.2";
|
|
31
|
+
/** The v0.1 grant schema version. */
|
|
32
|
+
export declare const PDPP_GRANT_VERSION = "0.1.0";
|
|
33
|
+
/** The v0.2 grant schema version, issued for `PDPP_DATA_ACCESS_TYPE_V02`. */
|
|
34
|
+
export declare const PDPP_GRANT_VERSION_V02 = "0.2.0";
|
|
35
|
+
/**
|
|
36
|
+
* The PDPP HTTP API contract version, sent and echoed in the `PDPP-Version`
|
|
37
|
+
* header. Normative value from Core §8 "API versioning".
|
|
38
|
+
*
|
|
39
|
+
* §7 "Version layering" is explicit that the three version axes MUST NOT be
|
|
40
|
+
* conflated, and this is the one that is easiest to get wrong: it is the HTTP
|
|
41
|
+
* *contract* version, not `PDPP_GRANT_VERSION` (the grant schema, `0.1.0`) and
|
|
42
|
+
* not `source_declaration.version` (an opaque declaration revision). This
|
|
43
|
+
* previously carried the grant schema version, which meant a client pinning
|
|
44
|
+
* the spec's own header value was rejected by the AS while the RS accepted it —
|
|
45
|
+
* a client could reach only half the server.
|
|
46
|
+
*
|
|
47
|
+
* Both the AS and RS surfaces import this one constant so they cannot drift
|
|
48
|
+
* apart again.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PDPP_API_VERSION = "2026-04-06";
|
|
51
|
+
/**
|
|
52
|
+
* The one purpose code Core gives a protocol-level consent requirement
|
|
53
|
+
* (§6 "AI training consent"). Every other code is a structured policy
|
|
54
|
+
* declaration the AS displays but does not gate on.
|
|
55
|
+
*/
|
|
56
|
+
export declare const AI_TRAINING_PURPOSE = "https://pdpp.dev/purpose/ai_training";
|
|
57
|
+
export type AccessMode = "single_use" | "continuous";
|
|
58
|
+
/**
|
|
59
|
+
* Provenance class. A selection request never carries this — the AS derives it
|
|
60
|
+
* from the declaration it accepted for `source.id` (§6 "Source kinds").
|
|
61
|
+
*/
|
|
62
|
+
export type SourceKind = "connector" | "provider_native";
|
|
63
|
+
/** RFC 7591-aligned inline client metadata, minus the redundant `client_` prefix. */
|
|
64
|
+
export interface ClientDisplay {
|
|
65
|
+
name: string;
|
|
66
|
+
uri?: string;
|
|
67
|
+
logo_uri?: string;
|
|
68
|
+
policy_uri?: string;
|
|
69
|
+
tos_uri?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface TimeRange {
|
|
72
|
+
/** Inclusive lower bound (>=). */
|
|
73
|
+
since?: string;
|
|
74
|
+
/** Exclusive upper bound (<). */
|
|
75
|
+
until?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A v0.2 explicit authorization minimum: the floor below which the owner's
|
|
79
|
+
* narrowing cannot go without failing issuance for this stream.
|
|
80
|
+
*
|
|
81
|
+
* This describes *permission*, never data. A satisfied minimum says the grant
|
|
82
|
+
* permits those fields and that window; it asserts nothing about whether
|
|
83
|
+
* records exist in it, how fresh they are, or whether they suit the client's
|
|
84
|
+
* task. The client evaluates application sufficiency separately.
|
|
85
|
+
*/
|
|
86
|
+
export interface StreamMinimum {
|
|
87
|
+
/** Non-empty; declared top-level field names drawn from the expanded request. */
|
|
88
|
+
fields?: string[];
|
|
89
|
+
/** Both bounds finite, `since < until`; must sit inside the requested window. */
|
|
90
|
+
time_range?: {
|
|
91
|
+
since: string;
|
|
92
|
+
until: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface StreamRequest {
|
|
96
|
+
/** Stream name, or `*` for every stream in the retained declaration. */
|
|
97
|
+
name: string;
|
|
98
|
+
/** `required` (default) or `optional`; optional streams become owner choices. */
|
|
99
|
+
necessity?: "required" | "optional";
|
|
100
|
+
instance_ids?: string[];
|
|
101
|
+
time_range?: TimeRange;
|
|
102
|
+
/** Named AS view. Mutually exclusive with `fields`. */
|
|
103
|
+
view?: string;
|
|
104
|
+
/** Field allowlist, top-level names only. Mutually exclusive with `view`. */
|
|
105
|
+
fields?: string[];
|
|
106
|
+
/** Canonical key strings for specific records. */
|
|
107
|
+
resources?: string[];
|
|
108
|
+
/**
|
|
109
|
+
* v0.2 only. The AS recognizes exactly `fields` and `time_range` here and
|
|
110
|
+
* rejects anything else — an unknown member would otherwise read as a
|
|
111
|
+
* satisfied condition the client believes it imposed.
|
|
112
|
+
*/
|
|
113
|
+
minimum?: StreamMinimum;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Client-authored, unverifiable statements about this specific request.
|
|
117
|
+
* Request-scoped, not entity-scoped. These never enter the resolved grant.
|
|
118
|
+
*/
|
|
119
|
+
export interface ClientClaims {
|
|
120
|
+
commitments?: string[];
|
|
121
|
+
}
|
|
122
|
+
export interface Retention {
|
|
123
|
+
/** ISO 8601 duration. */
|
|
124
|
+
max_duration: string;
|
|
125
|
+
/** `archive` is not supported in v0.1. */
|
|
126
|
+
on_expiry: "delete" | "anonymize";
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Standing terms the recipient has already authorized, as the AS knows them.
|
|
130
|
+
*
|
|
131
|
+
* v0.2 draws a line the protocol cannot enforce after disclosure but can
|
|
132
|
+
* enforce before it: changing the *data selection* is the owner's to do, while
|
|
133
|
+
* changing the *terms of use* requires the recipient's authority. An owner can
|
|
134
|
+
* narrow what they share freely; an owner asking the recipient to hold it for
|
|
135
|
+
* a week instead of a month is proposing a different obligation, and PDPP must
|
|
136
|
+
* not record that as agreed when nobody agreed to it.
|
|
137
|
+
*
|
|
138
|
+
* The accepted lists are enumerations, not capabilities. A recipient that
|
|
139
|
+
* accepts a 7-day retention has accepted 7 days — not "whatever the owner
|
|
140
|
+
* asks, up to 7 days", and not "the ability to accept retention terms". v0.2
|
|
141
|
+
* is explicit that a capability advertisement alone is not acceptance.
|
|
142
|
+
*/
|
|
143
|
+
export interface RecipientTerms {
|
|
144
|
+
/** Identifies the terms. Retained with the consent evidence. */
|
|
145
|
+
id: string;
|
|
146
|
+
/**
|
|
147
|
+
* The version in force. Retained too: "the recipient agreed" is
|
|
148
|
+
* unfalsifiable later if the document can change and nothing records which
|
|
149
|
+
* text was in force at approval.
|
|
150
|
+
*/
|
|
151
|
+
version: string;
|
|
152
|
+
/** Retention terms the recipient has accepted, exactly. */
|
|
153
|
+
accepted_retention?: Retention[];
|
|
154
|
+
/** Purpose codes the recipient has accepted, exactly. */
|
|
155
|
+
accepted_purpose_codes?: string[];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Conditions the owner attached to their approval, beyond narrowing the data.
|
|
159
|
+
*
|
|
160
|
+
* These are *proposals*, not decisions: each must be covered by the request or
|
|
161
|
+
* by recipient-authorized standing terms before it can become a commitment.
|
|
162
|
+
*/
|
|
163
|
+
export interface OwnerConditions {
|
|
164
|
+
retention?: Retention;
|
|
165
|
+
purpose_code?: string;
|
|
166
|
+
}
|
|
167
|
+
/** One RFC 9396 `authorization_details` entry of PDPP type. */
|
|
168
|
+
export interface SelectionRequest {
|
|
169
|
+
type: typeof PDPP_DATA_ACCESS_TYPE | typeof PDPP_DATA_ACCESS_TYPE_V02;
|
|
170
|
+
/** A request carries `id` alone; provenance is derived, never asserted. */
|
|
171
|
+
source: {
|
|
172
|
+
id: string;
|
|
173
|
+
};
|
|
174
|
+
purpose_code: string;
|
|
175
|
+
purpose_description?: string;
|
|
176
|
+
access_mode: AccessMode;
|
|
177
|
+
retention?: Retention;
|
|
178
|
+
/** Required unless `selection_preset` is used. Exactly one of the two. */
|
|
179
|
+
streams?: StreamRequest[];
|
|
180
|
+
/** Alternative to explicit streams. Exactly one of the two. */
|
|
181
|
+
selection_preset?: string;
|
|
182
|
+
client_claims?: ClientClaims;
|
|
183
|
+
}
|
|
184
|
+
export interface TimeConstraint {
|
|
185
|
+
/** Frozen `consent_time_field` from the retained declaration. */
|
|
186
|
+
field: string;
|
|
187
|
+
/** Inclusive (>=). */
|
|
188
|
+
since?: string;
|
|
189
|
+
/** Exclusive (<). A hard cap: applies to future records as well as past. */
|
|
190
|
+
until?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface StreamGrant {
|
|
193
|
+
/** Always concrete. Issued grants never contain wildcards. */
|
|
194
|
+
name: string;
|
|
195
|
+
/** Unique, non-empty. Fan-in only when more than one handle is listed. */
|
|
196
|
+
instance_ids: string[];
|
|
197
|
+
/** Unique, non-empty, resolved. Authoritative for RS enforcement. */
|
|
198
|
+
fields: string[];
|
|
199
|
+
time_constraint?: TimeConstraint;
|
|
200
|
+
/** Canonical key strings. Absent means all records in the stream. */
|
|
201
|
+
resources?: string[];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* What the client asked for on one stream, as the grant records it alongside
|
|
205
|
+
* what was approved.
|
|
206
|
+
*
|
|
207
|
+
* v0.2 requires the grant to be the client's source of truth for the outcome,
|
|
208
|
+
* including any narrowing the owner applied. Without this the client cannot
|
|
209
|
+
* tell a narrowed grant from the request it sent — the approved `StreamGrant`
|
|
210
|
+
* alone is indistinguishable from an unnarrowed one, so a client would have to
|
|
211
|
+
* diff against its own memory of the request, which §7 forbids it from
|
|
212
|
+
* treating as authority.
|
|
213
|
+
*/
|
|
214
|
+
export interface RequestedStream {
|
|
215
|
+
name: string;
|
|
216
|
+
necessity: "required" | "optional";
|
|
217
|
+
/** The upper field limit as expanded from the request, before owner choices. */
|
|
218
|
+
fields: string[];
|
|
219
|
+
time_range?: TimeRange;
|
|
220
|
+
minimum?: StreamMinimum;
|
|
221
|
+
}
|
|
222
|
+
/** The v0.2 requested-vs-approved record. Absent on v0.1 grants. */
|
|
223
|
+
export interface RequestedSelection {
|
|
224
|
+
streams: RequestedStream[];
|
|
225
|
+
/** Requested stream names the owner declined. Only optional streams can appear. */
|
|
226
|
+
omitted_streams?: string[];
|
|
227
|
+
}
|
|
228
|
+
export interface Grant {
|
|
229
|
+
/** `0.1.0` for v0.1 grants, `0.2.0` for v0.2. */
|
|
230
|
+
version: string;
|
|
231
|
+
grant_id: string;
|
|
232
|
+
issued_at: string;
|
|
233
|
+
subject: {
|
|
234
|
+
id: string;
|
|
235
|
+
};
|
|
236
|
+
client: {
|
|
237
|
+
client_id: string;
|
|
238
|
+
client_display?: ClientDisplay;
|
|
239
|
+
};
|
|
240
|
+
/** Retained verbatim from the accepted declaration. */
|
|
241
|
+
source: {
|
|
242
|
+
kind: SourceKind;
|
|
243
|
+
id: string;
|
|
244
|
+
};
|
|
245
|
+
/** Opaque revision of the exact snapshot used, not a live lookup authority. */
|
|
246
|
+
source_declaration: {
|
|
247
|
+
version: string;
|
|
248
|
+
};
|
|
249
|
+
purpose_code: string;
|
|
250
|
+
purpose_description?: string;
|
|
251
|
+
access_mode: AccessMode;
|
|
252
|
+
streams: StreamGrant[];
|
|
253
|
+
/** Informational; the resolved streams stay authoritative. */
|
|
254
|
+
selection_preset?: string;
|
|
255
|
+
retention?: Retention;
|
|
256
|
+
/** Absent means no expiry. */
|
|
257
|
+
expires_at?: string;
|
|
258
|
+
/**
|
|
259
|
+
* v0.2: what the client requested, beside the approved `streams` above.
|
|
260
|
+
* Absent on v0.1 grants, whose contract has no such member.
|
|
261
|
+
*/
|
|
262
|
+
requested?: RequestedSelection;
|
|
263
|
+
}
|
|
264
|
+
/** True for a grant issued under the v0.2 detail type. */
|
|
265
|
+
export declare function isV02Grant(grant: Grant): boolean;
|
|
266
|
+
/**
|
|
267
|
+
* §5 "Stream display metadata": human-readable copy for the consent UI.
|
|
268
|
+
*
|
|
269
|
+
* Authored by the connector maintainer, never by the requesting client. §5:
|
|
270
|
+
* "The requesting client MUST NOT be able to override or supplement these
|
|
271
|
+
* descriptions in the selection request. This separation ensures that the
|
|
272
|
+
* consent UI's data descriptions are trustworthy regardless of the client's
|
|
273
|
+
* intentions." That is what makes this the one data description on the consent
|
|
274
|
+
* surface a hostile client cannot write.
|
|
275
|
+
*/
|
|
276
|
+
export interface DeclaredDisplay {
|
|
277
|
+
/** Short consent-card name, e.g. "Who you follow". */
|
|
278
|
+
label?: string;
|
|
279
|
+
/**
|
|
280
|
+
* What the data includes and, where relevant, what it EXCLUDES — e.g.
|
|
281
|
+
* "…No DMs, profile details, or follower lists." The exclusion half is the
|
|
282
|
+
* part an owner cannot reconstruct from a field list.
|
|
283
|
+
*/
|
|
284
|
+
detail?: string;
|
|
285
|
+
}
|
|
286
|
+
export interface DeclaredStream {
|
|
287
|
+
name: string;
|
|
288
|
+
/**
|
|
289
|
+
* §5 `streams[].description`: a short summary of the stream's contents.
|
|
290
|
+
*
|
|
291
|
+
* Explicitly NOT consent-surface metadata — §5 points at `display` for that.
|
|
292
|
+
* Kept separate rather than coalesced so the AS can apply that precedence
|
|
293
|
+
* (label → description → name) instead of guessing at render time.
|
|
294
|
+
*/
|
|
295
|
+
description?: string;
|
|
296
|
+
/** §5 consent-surface metadata. Absent means the declaration authored none. */
|
|
297
|
+
display?: DeclaredDisplay;
|
|
298
|
+
/**
|
|
299
|
+
* How records in this stream behave over time (§5).
|
|
300
|
+
*
|
|
301
|
+
* `mutable_state` records are upserted by key and carry version history;
|
|
302
|
+
* `append_only` records are immutable, so a duplicate key is a no-op rather
|
|
303
|
+
* than an update. Optional, defaulting to `mutable_state`, so declarations
|
|
304
|
+
* written before this field existed keep their current meaning exactly.
|
|
305
|
+
*
|
|
306
|
+
* Before this existed the RS hardcoded `mutable_state` for every stream,
|
|
307
|
+
* which made an `append_only` declaration silently coerced and the field
|
|
308
|
+
* unfalsifiable for an ingesting producer.
|
|
309
|
+
*/
|
|
310
|
+
semantics?: "mutable_state" | "append_only";
|
|
311
|
+
/** Top-level field names the stream's schema defines. */
|
|
312
|
+
fields: string[];
|
|
313
|
+
/**
|
|
314
|
+
* Fields a record of this stream cannot be valid without. Always included in
|
|
315
|
+
* a resolved field set regardless of the requested allowlist — the per-stream
|
|
316
|
+
* consent floor (§6 "Note on `fields`").
|
|
317
|
+
*/
|
|
318
|
+
required_fields: string[];
|
|
319
|
+
/**
|
|
320
|
+
* Presence is the authoritative signal that the stream is time-range-capable
|
|
321
|
+
* (§6 "Note on `time_range`").
|
|
322
|
+
*/
|
|
323
|
+
consent_time_field?: string;
|
|
324
|
+
/** Arity of the primary key; `resources` entries are validated against it. */
|
|
325
|
+
primary_key: string[];
|
|
326
|
+
/** The stream's JSON Schema from a normative §5 declaration, when present. */
|
|
327
|
+
schema?: Record<string, unknown>;
|
|
328
|
+
/** Declared selection capabilities, e.g. `{ fields: true, resources: false }`. */
|
|
329
|
+
selection?: Record<string, unknown>;
|
|
330
|
+
}
|
|
331
|
+
export interface DeclaredView {
|
|
332
|
+
name: string;
|
|
333
|
+
fields: string[];
|
|
334
|
+
}
|
|
335
|
+
export interface DeclaredPreset {
|
|
336
|
+
name: string;
|
|
337
|
+
streams: StreamRequest[];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* The exact declaration snapshot retained through validation, consent,
|
|
341
|
+
* issuance, and consent evidence. A later current declaration never
|
|
342
|
+
* substitutes for it (§9 AS item 16).
|
|
343
|
+
*/
|
|
344
|
+
export interface DeclarationSnapshot {
|
|
345
|
+
source_id: string;
|
|
346
|
+
source_kind: SourceKind;
|
|
347
|
+
/**
|
|
348
|
+
* §5 top-level `display`: the source's human-readable name for consent UIs.
|
|
349
|
+
*
|
|
350
|
+
* Without it the consent surface can only name a source by its registry URL.
|
|
351
|
+
* Absent means the declaration authored none, and the surface falls back to
|
|
352
|
+
* the id rather than rendering a blank.
|
|
353
|
+
*/
|
|
354
|
+
display?: {
|
|
355
|
+
name?: string;
|
|
356
|
+
};
|
|
357
|
+
/** Opaque revision identifier recorded into the grant. */
|
|
358
|
+
version: string;
|
|
359
|
+
/** Digest over the retrieved document, verified before the snapshot is trusted. */
|
|
360
|
+
digest: string;
|
|
361
|
+
streams: DeclaredStream[];
|
|
362
|
+
views?: DeclaredView[];
|
|
363
|
+
selection_presets?: DeclaredPreset[];
|
|
364
|
+
}
|
|
365
|
+
export type PdppTokenKind = "owner" | "client";
|
|
366
|
+
export interface PdppAuthorizationDetail {
|
|
367
|
+
type: typeof PDPP_DATA_ACCESS_TYPE;
|
|
368
|
+
source: {
|
|
369
|
+
kind: SourceKind;
|
|
370
|
+
id: string;
|
|
371
|
+
};
|
|
372
|
+
purpose_code: string;
|
|
373
|
+
purpose_description?: string;
|
|
374
|
+
access_mode: AccessMode;
|
|
375
|
+
streams: StreamGrant[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The v0.2 client-visible authorization result: `{ type, grant }` carrying the
|
|
379
|
+
* complete immutable grant.
|
|
380
|
+
*
|
|
381
|
+
* v0.2 forbids substituting the original selection request or a lossy summary.
|
|
382
|
+
* The v0.1 detail above is exactly such a summary — it drops `retention`,
|
|
383
|
+
* `expires_at`, the resolved client identity, and (under v0.2) the
|
|
384
|
+
* requested-vs-approved record — so v0.2 carries the whole grant instead of a
|
|
385
|
+
* projection of it. Both shapes coexist: a token covering a v0.1 grant still
|
|
386
|
+
* returns the v0.1 detail, so an existing client sees no change.
|
|
387
|
+
*/
|
|
388
|
+
export interface PdppAuthorizationResultV02 {
|
|
389
|
+
type: typeof PDPP_DATA_ACCESS_TYPE_V02;
|
|
390
|
+
grant: Grant;
|
|
391
|
+
}
|
|
392
|
+
/** Either revision's element, as it appears in `authorization_details`. */
|
|
393
|
+
export type PdppAuthorizationEntry = PdppAuthorizationDetail | PdppAuthorizationResultV02;
|
|
394
|
+
/**
|
|
395
|
+
* RFC 7662 introspection response with the PDPP extension members. An inactive
|
|
396
|
+
* token returns exactly `{ active: false }` — RFC 7662 §2.2 forbids leaking
|
|
397
|
+
* anything else about a token that is revoked, expired, or simply unknown.
|
|
398
|
+
*/
|
|
399
|
+
export interface PdppIntrospectionResponse {
|
|
400
|
+
active: boolean;
|
|
401
|
+
pdpp_token_kind?: PdppTokenKind;
|
|
402
|
+
subject_id?: string;
|
|
403
|
+
/** Owner tokens only. Source-wide tokens may omit an instance list. */
|
|
404
|
+
instance_ids?: string[];
|
|
405
|
+
/** Owner tokens only. Limits the token to one source's connections. */
|
|
406
|
+
source_id?: string;
|
|
407
|
+
grant_id?: string;
|
|
408
|
+
client_id?: string;
|
|
409
|
+
/** Unix epoch seconds. Omitted when the token never expires. */
|
|
410
|
+
exp?: number;
|
|
411
|
+
/**
|
|
412
|
+
* One element per covered grant, in that grant's own revision shape. v0.2
|
|
413
|
+
* requires the AS to return the same resolved grant facts to the client and
|
|
414
|
+
* to an authenticated RS apart from token-specific active-state and expiry,
|
|
415
|
+
* which is why this is the same projection the token response uses.
|
|
416
|
+
*/
|
|
417
|
+
authorization_details?: PdppAuthorizationEntry[];
|
|
418
|
+
}
|
|
419
|
+
/** Why a token did not resolve. Drives the RS error; never echoed to the client. */
|
|
420
|
+
export type InactiveReason = "unknown" | "expired" | "revoked" | "grant_revoked" | "grant_expired";
|
|
421
|
+
/**
|
|
422
|
+
* The co-located equivalent of an introspection call. The RS resolves a token
|
|
423
|
+
* through this one path and enforces only from the result (§8 "Grant
|
|
424
|
+
* enforcement"): no second authority, no live declaration lookup.
|
|
425
|
+
*/
|
|
426
|
+
export interface PdppTokenContext {
|
|
427
|
+
active: boolean;
|
|
428
|
+
tokenKind?: PdppTokenKind;
|
|
429
|
+
subjectId?: string;
|
|
430
|
+
/** Owner tokens only. The RS enforces this persisted scope directly. */
|
|
431
|
+
instanceIds?: string[];
|
|
432
|
+
/** Owner tokens only. The AS and RS enforce this source scope directly. */
|
|
433
|
+
sourceId?: string;
|
|
434
|
+
/** Client tokens only. An owner token carries no grant. */
|
|
435
|
+
grant?: Grant;
|
|
436
|
+
clientId?: string;
|
|
437
|
+
expiresAt?: string;
|
|
438
|
+
inactiveReason?: InactiveReason;
|
|
439
|
+
}
|
|
440
|
+
export type GrantStatus = "active" | "expired" | "revoked";
|
|
441
|
+
//# sourceM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
|
|
2
|
+
* PDPP Core v0.1.0 authorization types.
|
|
3
|
+
*
|
|
4
|
+
* These mirror the normative field tables in PDPP Core §6 (Selection Request)
|
|
5
|
+
* and §7 (Grant). Where this file and the spec disagree, the spec wins — §7
|
|
6
|
+
* says so explicitly about its own TypeScript mirror.
|
|
7
|
+
*
|
|
8
|
+
* The PDPP grant model is deliberately separate from the Vana chain grant in
|
|
9
|
+
* `../grants/`. That one is an EIP-712 payload binding a builder address to
|
|
10
|
+
* dot-scopes; this one is an RFC 9396 consent artifact binding an OAuth client
|
|
11
|
+
* to declaration-resolved streams. They are different authorities over
|
|
12
|
+
* different data and must not be conflated.
|
|
13
|
+
*/
|
|
14
|
+
/** The RFC 9396 `type` value that marks an authorization detail as PDPP. */
|
|
15
|
+
export const PDPP_DATA_ACCESS_TYPE = "https://pdpp.dev/data-access";
|
|
16
|
+
/**
|
|
17
|
+
* The v0.2 RFC 9396 `type`.
|
|
18
|
+
*
|
|
19
|
+
* v0.2 is deliberately a *separate* detail type rather than a compatible
|
|
20
|
+
* extension of v0.1. The revision changes authorization resolution (explicit
|
|
21
|
+
* minima) and disclosed-record semantics (a schema's `required` array is no
|
|
22
|
+
* longer a consent floor), so the two are not wire-compatible: the same
|
|
23
|
+
* request body resolves to a different grant under each. An AS implementing
|
|
24
|
+
* both MUST resolve each under its own revision, which is why every rule below
|
|
25
|
+
* branches on this constant rather than on the presence of a v0.2-only member.
|
|
26
|
+
*
|
|
27
|
+
* A client MUST NOT retry a rejected v0.2 request under the v0.1 type without
|
|
28
|
+
* a new authorization decision; nothing here silently downgrades one.
|
|
29
|
+
*/
|
|
30
|
+
export const PDPP_DATA_ACCESS_TYPE_V02 = "https://pdpp.dev/data-access/0.2";
|
|
31
|
+
/** The v0.1 grant schema version. */
|
|
32
|
+
export const PDPP_GRANT_VERSION = "0.1.0";
|
|
33
|
+
/** The v0.2 grant schema version, issued for `PDPP_DATA_ACCESS_TYPE_V02`. */
|
|
34
|
+
export const PDPP_GRANT_VERSION_V02 = "0.2.0";
|
|
35
|
+
/**
|
|
36
|
+
* The PDPP HTTP API contract version, sent and echoed in the `PDPP-Version`
|
|
37
|
+
* header. Normative value from Core §8 "API versioning".
|
|
38
|
+
*
|
|
39
|
+
* §7 "Version layering" is explicit that the three version axes MUST NOT be
|
|
40
|
+
* conflated, and this is the one that is easiest to get wrong: it is the HTTP
|
|
41
|
+
* *contract* version, not `PDPP_GRANT_VERSION` (the grant schema, `0.1.0`) and
|
|
42
|
+
* not `source_declaration.version` (an opaque declaration revision). This
|
|
43
|
+
* previously carried the grant schema version, which meant a client pinning
|
|
44
|
+
* the spec's own header value was rejected by the AS while the RS accepted it —
|
|
45
|
+
* a client could reach only half the server.
|
|
46
|
+
*
|
|
47
|
+
* Both the AS and RS surfaces import this one constant so they cannot drift
|
|
48
|
+
* apart again.
|
|
49
|
+
*/
|
|
50
|
+
export const PDPP_API_VERSION = "2026-04-06";
|
|
51
|
+
/**
|
|
52
|
+
* The one purpose code Core gives a protocol-level consent requirement
|
|
53
|
+
* (§6 "AI training consent"). Every other code is a structured policy
|
|
54
|
+
* declaration the AS displays but does not gate on.
|
|
55
|
+
*/
|
|
56
|
+
export const AI_TRAINING_PURPOSE = "https://pdpp.dev/purpose/ai_training";
|
|
57
|
+
/** True for a grant issued under the v0.2 detail type. */
|
|
58
|
+
export function isV02Grant(grant) {
|
|
59
|
+
return grant.version === PDPP_GRANT_VERSION_V02;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/pdpp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,CAAC;AAE5E,qCAAqC;AACrC,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AA0N1E,0DAA0D;AAC1D,MAAM,UAAU,UAAU,CAAC,KAAY;IACrC,OAAO,KAAK,CAAC,OAAO,KAAK,sBAAsB,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single `PDPP-Version` value both the Authorization Server and Resource
|
|
3
|
+
* Server surfaces of this Personal Server negotiate against (spec-core.md
|
|
4
|
+
* §8 "API versioning").
|
|
5
|
+
*
|
|
6
|
+
* Spec-core.md's own normative example is a date string
|
|
7
|
+
* (`PDPP-Version: 2026-04-06`), not a semver string — this constant follows
|
|
8
|
+
* that convention. Both AS and RS route modules MUST import this one
|
|
9
|
+
* constant rather than declaring their own local copy: an AS and RS that
|
|
10
|
+
* hard-reject an unrecognized `PDPP-Version` (spec §8 requires this) but
|
|
11
|
+
* accept mutually exclusive values make half the server unreachable to any
|
|
12
|
+
* client that pins a version header.
|
|
13
|
+
*
|
|
14
|
+
* Found in an independent combined AS+RS review (2026-09-17): the AS lane's
|
|
15
|
+
* `packages/core/src/pdpp/types.ts` previously declared its own
|
|
16
|
+
* `PDPP_API_VERSION = "0.1.0"` (a semver-shaped grant/API contract version,
|
|
17
|
+
* not the spec's `PDPP-Version` header value) alongside this module's
|
|
18
|
+
* `PDPP-Version = "2026-04-06"` in the RS route files. A client sending
|
|
19
|
+
* either header value could reach only one half of the server. Fix: one
|
|
20
|
+
* shared constant, spec-date-shaped, imported by both surfaces. The AS lane
|
|
21
|
+
* needs to adopt this constant (or reconcile `PDPP_API_VERSION`'s meaning to
|
|
22
|
+
* something distinct from the `PDPP-Version` header, if that field is
|
|
23
|
+
* actually meant to version the grant schema rather than the wire protocol)
|
|
24
|
+
* — that reconciliation was not made unilaterally here since it touches
|
|
25
|
+
* AS-owned files this lane does not edit.
|
|
26
|
+
*/
|
|
27
|
+
export declare const PDPP_VERSION = "2026-04-06";
|
|
28
|
+
//# sourceMappingURL=pdpp-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdpp-version.d.ts","sourceRoot":"","sources":["../src/pdpp-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,eAAe,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single `PDPP-Version` value both the Authorization Server and Resource
|
|
3
|
+
* Server surfaces of this Personal Server negotiate against (spec-core.md
|
|
4
|
+
* §8 "API versioning").
|
|
5
|
+
*
|
|
6
|
+
* Spec-core.md's own normative example is a date string
|
|
7
|
+
* (`PDPP-Version: 2026-04-06`), not a semver string — this constant follows
|
|
8
|
+
* that convention. Both AS and RS route modules MUST import this one
|
|
9
|
+
* constant rather than declaring their own local copy: an AS and RS that
|
|
10
|
+
* hard-reject an unrecognized `PDPP-Version` (spec §8 requires this) but
|
|
11
|
+
* accept mutually exclusive values make half the server unreachable to any
|
|
12
|
+
* client that pins a version header.
|
|
13
|
+
*
|
|
14
|
+
* Found in an independent combined AS+RS review (2026-09-17): the AS lane's
|
|
15
|
+
* `packages/core/src/pdpp/types.ts` previously declared its own
|
|
16
|
+
* `PDPP_API_VERSION = "0.1.0"` (a semver-shaped grant/API contract version,
|
|
17
|
+
* not the spec's `PDPP-Version` header value) alongside this module's
|
|
18
|
+
* `PDPP-Version = "2026-04-06"` in the RS route files. A client sending
|
|
19
|
+
* either header value could reach only one half of the server. Fix: one
|
|
20
|
+
* shared constant, spec-date-shaped, imported by both surfaces. The AS lane
|
|
21
|
+
* needs to adopt this constant (or reconcile `PDPP_API_VERSION`'s meaning to
|
|
22
|
+
* something distinct from the `PDPP-Version` header, if that field is
|
|
23
|
+
* actually meant to version the grant schema rather than the wire protocol)
|
|
24
|
+
* — that reconciliation was not made unilaterally here since it touches
|
|
25
|
+
* AS-owned files this lane does not edit.
|
|
26
|
+
*/
|
|
27
|
+
export const PDPP_VERSION = "2026-04-06";
|
|
28
|
+
//# sourceMappingURL=pdpp-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdpp-version.js","sourceRoot":"","sources":["../src/pdpp-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GatewayGrantResponse } from "@opendatalabs/vana-sdk/browser";
|
|
2
2
|
import { type AuthSessionVerifierPort, type GrantListerPort, type GrantVerifierPort, type RuntimeAvailabilityPort } from "../ports/index.js";
|
|
3
|
+
import type { PdppGrantBindingStore } from "../grants/pdpp-binding-store.js";
|
|
3
4
|
export interface DataReadPolicyInput {
|
|
4
5
|
signer: `0x${string}`;
|
|
5
6
|
grantId?: string;
|
|
@@ -12,10 +13,33 @@ export interface DataReadPolicyInput {
|
|
|
12
13
|
* owner; the check also fails closed at runtime for untyped/JS callers.
|
|
13
14
|
*/
|
|
14
15
|
serverOwner: `0x${string}`;
|
|
16
|
+
/**
|
|
17
|
+
* The PDPP grant id the caller is reading under, when the read is authorized
|
|
18
|
+
* through a PDPP grant rather than a bare chain grant (§6).
|
|
19
|
+
*
|
|
20
|
+
* Optional because the chain-grant read path predates PDPP and still works
|
|
21
|
+
* on its own. When present — and only then — the PDPP↔chain binding is
|
|
22
|
+
* enforced in addition to every existing check, never instead of one.
|
|
23
|
+
*/
|
|
24
|
+
pdppGrantId?: string;
|
|
15
25
|
}
|
|
16
26
|
export interface DataReadPolicyPorts {
|
|
17
27
|
authSessionVerifier: AuthSessionVerifierPort;
|
|
18
28
|
grantVerifier: GrantVerifierPort;
|
|
29
|
+
/**
|
|
30
|
+
* Retained PDPP↔chain grant bindings. Required only to serve reads that
|
|
31
|
+
* present a `pdppGrantId`; a PS with no PDPP surface omits it.
|
|
32
|
+
*/
|
|
33
|
+
pdppGrantBindings?: PdppGrantBindingStore;
|
|
34
|
+
/**
|
|
35
|
+
* The chain deployment this PS is configured against. Required alongside
|
|
36
|
+
* `pdppGrantBindings` so a binding recorded on one network cannot authorize
|
|
37
|
+
* a read on another.
|
|
38
|
+
*/
|
|
39
|
+
chainDeployment?: {
|
|
40
|
+
chainId: number;
|
|
41
|
+
contractAddress: `0x${string}`;
|
|
42
|
+
};
|
|
19
43
|
runtimeAvailability?: RuntimeAvailabilityPort;
|
|
20
44
|
}
|
|
21
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-read.d.ts","sourceRoot":"","sources":["../../src/policy/data-read.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-read.d.ts","sourceRoot":"","sources":["../../src/policy/data-read.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAcxC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IAGvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACt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