@opendatalabs/personal-server-ts-core 0.0.1-canary.00328bf
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 +408 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +1257 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/raw-envelope.d.ts +3 -0
- package/dist/api/raw-envelope.d.ts.map +1 -0
- package/dist/api/raw-envelope.js +215 -0
- package/dist/api/raw-envelope.js.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/request.d.ts +28 -0
- package/dist/auth/request.d.ts.map +1 -0
- package/dist/auth/request.js +106 -0
- package/dist/auth/request.js.map +1 -0
- package/dist/client.d.ts +233 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +243 -0
- package/dist/client.js.map +1 -0
- package/dist/config/defaults.d.ts +12 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +12 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/paths.d.ts +9 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +14 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/contracts/access-logs.d.ts +8 -0
- package/dist/contracts/access-logs.d.ts.map +1 -0
- package/dist/contracts/access-logs.js +7 -0
- package/dist/contracts/access-logs.js.map +1 -0
- package/dist/contracts/auth-device.d.ts +70 -0
- package/dist/contracts/auth-device.d.ts.map +1 -0
- package/dist/contracts/auth-device.js +163 -0
- package/dist/contracts/auth-device.js.map +1 -0
- package/dist/contracts/binary.d.ts +66 -0
- package/dist/contracts/binary.d.ts.map +1 -0
- package/dist/contracts/binary.js +123 -0
- package/dist/contracts/binary.js.map +1 -0
- package/dist/contracts/config.d.ts +5 -0
- package/dist/contracts/config.d.ts.map +1 -0
- package/dist/contracts/config.js +30 -0
- package/dist/contracts/config.js.map +1 -0
- package/dist/contracts/data.d.ts +165 -0
- package/dist/contracts/data.d.ts.map +1 -0
- package/dist/contracts/data.js +371 -0
- package/dist/contracts/data.js.map +1 -0
- package/dist/contracts/grants.d.ts +45 -0
- package/dist/contracts/grants.d.ts.map +1 -0
- package/dist/contracts/grants.js +177 -0
- package/dist/contracts/grants.js.map +1 -0
- package/dist/contracts/http.d.ts +21 -0
- package/dist/contracts/http.d.ts.map +1 -0
- package/dist/contracts/http.js +49 -0
- package/dist/contracts/http.js.map +1 -0
- package/dist/contracts/index.d.ts +16 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +10 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/oauth.d.ts +38 -0
- package/dist/contracts/oauth.d.ts.map +1 -0
- package/dist/contracts/oauth.js +130 -0
- package/dist/contracts/oauth.js.map +1 -0
- package/dist/contracts/sync.d.ts +10 -0
- package/dist/contracts/sync.d.ts.map +1 -0
- package/dist/contracts/sync.js +35 -0
- package/dist/contracts/sync.js.map +1 -0
- package/dist/derivatives/answer-shape.d.ts +83 -0
- package/dist/derivatives/answer-shape.d.ts.map +1 -0
- package/dist/derivatives/answer-shape.js +320 -0
- package/dist/derivatives/answer-shape.js.map +1 -0
- package/dist/derivatives/api.d.ts +48 -0
- package/dist/derivatives/api.d.ts.map +1 -0
- package/dist/derivatives/api.js +374 -0
- package/dist/derivatives/api.js.map +1 -0
- package/dist/derivatives/compute.d.ts +112 -0
- package/dist/derivatives/compute.d.ts.map +1 -0
- package/dist/derivatives/compute.js +476 -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 +11 -0
- package/dist/derivatives/index.d.ts.map +1 -0
- package/dist/derivatives/index.js +11 -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 +99 -0
- package/dist/derivatives/prompt.d.ts.map +1 -0
- package/dist/derivatives/prompt.js +281 -0
- package/dist/derivatives/prompt.js.map +1 -0
- package/dist/derivatives/registration.d.ts +56 -0
- package/dist/derivatives/registration.d.ts.map +1 -0
- package/dist/derivatives/registration.js +187 -0
- package/dist/derivatives/registration.js.map +1 -0
- package/dist/derivatives/scheduler.d.ts +114 -0
- package/dist/derivatives/scheduler.d.ts.map +1 -0
- package/dist/derivatives/scheduler.js +331 -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 +79 -0
- package/dist/derivatives/store.js.map +1 -0
- package/dist/derivatives/types.d.ts +102 -0
- package/dist/derivatives/types.d.ts.map +1 -0
- package/dist/derivatives/types.js +29 -0
- package/dist/derivatives/types.js.map +1 -0
- package/dist/errors/catalog.d.ts +125 -0
- package/dist/errors/catalog.d.ts.map +1 -0
- package/dist/errors/catalog.js +198 -0
- package/dist/errors/catalog.js.map +1 -0
- 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 +82 -0
- package/dist/errors/pdpp-catalog.js.map +1 -0
- package/dist/grants/index.d.ts +5 -0
- package/dist/grants/index.d.ts.map +1 -0
- package/dist/grants/index.js +6 -0
- package/dist/grants/index.js.map +1 -0
- package/dist/grants/pdpp-binding-store.d.ts +58 -0
- package/dist/grants/pdpp-binding-store.d.ts.map +1 -0
- package/dist/grants/pdpp-binding-store.js +97 -0
- package/dist/grants/pdpp-binding-store.js.map +1 -0
- package/dist/grants/pdpp-binding.d.ts +179 -0
- package/dist/grants/pdpp-binding.d.ts.map +1 -0
- package/dist/grants/pdpp-binding.js +214 -0
- package/dist/grants/pdpp-binding.js.map +1 -0
- package/dist/keys/index.d.ts +3 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +2 -0
- package/dist/keys/index.js.map +1 -0
- 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 +24 -0
- package/dist/keys/server-account.d.ts.map +1 -0
- package/dist/keys/server-account.js +2 -0
- package/dist/keys/server-account.js.map +1 -0
- 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/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +5 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logging/access-log.d.ts +23 -0
- package/dist/logging/access-log.d.ts.map +1 -0
- package/dist/logging/access-log.js +2 -0
- package/dist/logging/access-log.js.map +1 -0
- package/dist/logging/access-reader.d.ts +14 -0
- package/dist/logging/access-reader.d.ts.map +1 -0
- package/dist/logging/access-reader.js +2 -0
- package/dist/logging/access-reader.js.map +1 -0
- package/dist/mcp/activity.d.ts +68 -0
- package/dist/mcp/activity.d.ts.map +1 -0
- package/dist/mcp/activity.js +111 -0
- package/dist/mcp/activity.js.map +1 -0
- package/dist/mcp/builder-registration.d.ts +24 -0
- package/dist/mcp/builder-registration.d.ts.map +1 -0
- package/dist/mcp/builder-registration.js +89 -0
- package/dist/mcp/builder-registration.js.map +1 -0
- package/dist/mcp/connection-api.d.ts +201 -0
- package/dist/mcp/connection-api.d.ts.map +1 -0
- package/dist/mcp/connection-api.js +506 -0
- package/dist/mcp/connection-api.js.map +1 -0
- package/dist/mcp/grantee.d.ts +52 -0
- package/dist/mcp/grantee.d.ts.map +1 -0
- package/dist/mcp/grantee.js +91 -0
- package/dist/mcp/grantee.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/read-client.d.ts +176 -0
- package/dist/mcp/read-client.d.ts.map +1 -0
- package/dist/mcp/read-client.js +579 -0
- package/dist/mcp/read-client.js.map +1 -0
- 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 +34 -0
- package/dist/mcp/search/index.d.ts.map +1 -0
- package/dist/mcp/search/index.js +156 -0
- package/dist/mcp/search/index.js.map +1 -0
- package/dist/mcp/server.d.ts +72 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +447 -0
- package/dist/mcp/server.js.map +1 -0
- 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/store.d.ts +13 -0
- package/dist/mcp/store.d.ts.map +1 -0
- package/dist/mcp/store.js +119 -0
- package/dist/mcp/store.js.map +1 -0
- package/dist/mcp/token-expiry.d.ts +38 -0
- package/dist/mcp/token-expiry.d.ts.map +1 -0
- package/dist/mcp/token-expiry.js +55 -0
- package/dist/mcp/token-expiry.js.map +1 -0
- package/dist/mcp/tools.d.ts +95 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +1381 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/types.d.ts +135 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +24 -0
- package/dist/mcp/types.js.map +1 -0
- 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/pdpp/approval.d.ts +182 -0
- package/dist/pdpp/approval.d.ts.map +1 -0
- package/dist/pdpp/approval.js +337 -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 +183 -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/declaration.d.ts +118 -0
- package/dist/pdpp/declaration.d.ts.map +1 -0
- package/dist/pdpp/declaration.js +549 -0
- package/dist/pdpp/declaration.js.map +1 -0
- package/dist/pdpp/index.d.ts +35 -0
- package/dist/pdpp/index.d.ts.map +1 -0
- package/dist/pdpp/index.js +22 -0
- package/dist/pdpp/index.js.map +1 -0
- package/dist/pdpp/issuance.d.ts +91 -0
- package/dist/pdpp/issuance.d.ts.map +1 -0
- package/dist/pdpp/issuance.js +124 -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 +53 -0
- package/dist/pdpp/resolve.d.ts.map +1 -0
- package/dist/pdpp/resolve.js +218 -0
- package/dist/pdpp/resolve.js.map +1 -0
- package/dist/pdpp/review.d.ts +155 -0
- package/dist/pdpp/review.d.ts.map +1 -0
- package/dist/pdpp/review.js +142 -0
- package/dist/pdpp/review.js.map +1 -0
- package/dist/pdpp/selection.d.ts +43 -0
- package/dist/pdpp/selection.d.ts.map +1 -0
- package/dist/pdpp/selection.js +211 -0
- package/dist/pdpp/selection.js.map +1 -0
- package/dist/pdpp/store.d.ts +204 -0
- package/dist/pdpp/store.d.ts.map +1 -0
- package/dist/pdpp/store.js +501 -0
- package/dist/pdpp/store.js.map +1 -0
- package/dist/pdpp/tokens.d.ts +149 -0
- package/dist/pdpp/tokens.d.ts.map +1 -0
- package/dist/pdpp/tokens.js +387 -0
- package/dist/pdpp/tokens.js.map +1 -0
- package/dist/pdpp/types.d.ts +258 -0
- package/dist/pdpp/types.d.ts.map +1 -0
- package/dist/pdpp/types.js +40 -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 +56 -0
- package/dist/policy/data-read.d.ts.map +1 -0
- package/dist/policy/data-read.js +176 -0
- package/dist/policy/data-read.js.map +1 -0
- 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 +4 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +4 -0
- package/dist/policy/index.js.map +1 -0
- 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 +243 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/index.js +7 -0
- package/dist/ports/index.js.map +1 -0
- package/dist/ports/pdpp-auth.d.ts +103 -0
- package/dist/ports/pdpp-auth.d.ts.map +1 -0
- package/dist/ports/pdpp-auth.js +37 -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 +190 -0
- package/dist/schemas/server-config.d.ts.map +1 -0
- package/dist/schemas/server-config.js +282 -0
- package/dist/schemas/server-config.js.map +1 -0
- package/dist/signing/index.d.ts +3 -0
- package/dist/signing/index.d.ts.map +1 -0
- package/dist/signing/index.js +3 -0
- package/dist/signing/index.js.map +1 -0
- package/dist/signing/request-signer.d.ts +20 -0
- package/dist/signing/request-signer.d.ts.map +1 -0
- package/dist/signing/request-signer.js +23 -0
- package/dist/signing/request-signer.js.map +1 -0
- package/dist/signing/signer.d.ts +40 -0
- package/dist/signing/signer.d.ts.map +1 -0
- package/dist/signing/signer.js +56 -0
- package/dist/signing/signer.js.map +1 -0
- package/dist/storage/adapters/index.d.ts +4 -0
- package/dist/storage/adapters/index.d.ts.map +1 -0
- package/dist/storage/adapters/index.js +3 -0
- package/dist/storage/adapters/index.js.map +1 -0
- package/dist/storage/adapters/interface.d.ts +57 -0
- package/dist/storage/adapters/interface.d.ts.map +1 -0
- package/dist/storage/adapters/interface.js +2 -0
- package/dist/storage/adapters/interface.js.map +1 -0
- package/dist/storage/adapters/sdk.d.ts +23 -0
- package/dist/storage/adapters/sdk.d.ts.map +1 -0
- package/dist/storage/adapters/sdk.js +73 -0
- package/dist/storage/adapters/sdk.js.map +1 -0
- package/dist/storage/adapters/vana.d.ts +12 -0
- package/dist/storage/adapters/vana.d.ts.map +1 -0
- package/dist/storage/adapters/vana.js +111 -0
- package/dist/storage/adapters/vana.js.map +1 -0
- package/dist/storage/blocks/build.d.ts +20 -0
- package/dist/storage/blocks/build.d.ts.map +1 -0
- package/dist/storage/blocks/build.js +378 -0
- package/dist/storage/blocks/build.js.map +1 -0
- package/dist/storage/blocks/cursor.d.ts +33 -0
- package/dist/storage/blocks/cursor.d.ts.map +1 -0
- package/dist/storage/blocks/cursor.js +142 -0
- package/dist/storage/blocks/cursor.js.map +1 -0
- package/dist/storage/blocks/errors.d.ts +6 -0
- package/dist/storage/blocks/errors.d.ts.map +1 -0
- package/dist/storage/blocks/errors.js +9 -0
- package/dist/storage/blocks/errors.js.map +1 -0
- package/dist/storage/blocks/index.d.ts +6 -0
- package/dist/storage/blocks/index.d.ts.map +1 -0
- package/dist/storage/blocks/index.js +5 -0
- package/dist/storage/blocks/index.js.map +1 -0
- 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 +56 -0
- package/dist/storage/blocks/types.d.ts.map +1 -0
- package/dist/storage/blocks/types.js +2 -0
- package/dist/storage/blocks/types.js.map +1 -0
- package/dist/storage/hierarchy/index.d.ts +3 -0
- package/dist/storage/hierarchy/index.d.ts.map +1 -0
- package/dist/storage/hierarchy/index.js +2 -0
- package/dist/storage/hierarchy/index.js.map +1 -0
- package/dist/storage/hierarchy/manager.d.ts +9 -0
- package/dist/storage/hierarchy/manager.d.ts.map +1 -0
- package/dist/storage/hierarchy/manager.js +2 -0
- package/dist/storage/hierarchy/manager.js.map +1 -0
- package/dist/storage/hierarchy/paths.d.ts +11 -0
- package/dist/storage/hierarchy/paths.d.ts.map +1 -0
- package/dist/storage/hierarchy/paths.js +43 -0
- package/dist/storage/hierarchy/paths.js.map +1 -0
- package/dist/storage/index/index.d.ts +3 -0
- package/dist/storage/index/index.d.ts.map +1 -0
- package/dist/storage/index/index.js +2 -0
- package/dist/storage/index/index.js.map +1 -0
- package/dist/storage/index/manager.d.ts +63 -0
- package/dist/storage/index/manager.d.ts.map +1 -0
- package/dist/storage/index/manager.js +2 -0
- package/dist/storage/index/manager.js.map +1 -0
- package/dist/storage/index/schema.d.ts +2 -0
- package/dist/storage/index/schema.d.ts.map +1 -0
- package/dist/storage/index/schema.js +2 -0
- package/dist/storage/index/schema.js.map +1 -0
- package/dist/storage/index/types.d.ts +37 -0
- package/dist/storage/index/types.d.ts.map +1 -0
- package/dist/storage/index/types.js +2 -0
- package/dist/storage/index/types.js.map +1 -0
- package/dist/storage/pdpp-records/cursor.d.ts +27 -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/enforcement.d.ts +37 -0
- package/dist/storage/pdpp-records/enforcement.d.ts.map +1 -0
- package/dist/storage/pdpp-records/enforcement.js +79 -0
- package/dist/storage/pdpp-records/enforcement.js.map +1 -0
- package/dist/storage/pdpp-records/index.d.ts +8 -0
- package/dist/storage/pdpp-records/index.d.ts.map +1 -0
- package/dist/storage/pdpp-records/index.js +8 -0
- package/dist/storage/pdpp-records/index.js.map +1 -0
- package/dist/storage/pdpp-records/interface.d.ts +49 -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 +0 -0
- package/dist/storage/pdpp-records/memory-store.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/stream-declaration.d.ts +43 -0
- package/dist/storage/pdpp-records/stream-declaration.d.ts.map +1 -0
- package/dist/storage/pdpp-records/stream-declaration.js +17 -0
- package/dist/storage/pdpp-records/stream-declaration.js.map +1 -0
- package/dist/storage/pdpp-records/types.d.ts +93 -0
- package/dist/storage/pdpp-records/types.d.ts.map +1 -0
- package/dist/storage/pdpp-records/types.js +17 -0
- package/dist/storage/pdpp-records/types.js.map +1 -0
- package/dist/storage/preview.d.ts +12 -0
- package/dist/storage/preview.d.ts.map +1 -0
- package/dist/storage/preview.js +239 -0
- package/dist/storage/preview.js.map +1 -0
- package/dist/sync/cursor.d.ts +10 -0
- package/dist/sync/cursor.d.ts.map +1 -0
- package/dist/sync/cursor.js +2 -0
- package/dist/sync/cursor.js.map +1 -0
- 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 +58 -0
- package/dist/sync/engine/sync-manager.d.ts.map +1 -0
- package/dist/sync/engine/sync-manager.js +285 -0
- package/dist/sync/engine/sync-manager.js.map +1 -0
- package/dist/sync/index.d.ts +15 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +14 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/issues.d.ts +55 -0
- package/dist/sync/issues.d.ts.map +1 -0
- package/dist/sync/issues.js +168 -0
- package/dist/sync/issues.js.map +1 -0
- 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 +422 -0
- package/dist/sync/pdpp-import.js.map +1 -0
- 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/types.d.ts +27 -0
- package/dist/sync/types.d.ts.map +1 -0
- package/dist/sync/types.js +2 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/sync/workers/delete.d.ts +163 -0
- package/dist/sync/workers/delete.d.ts.map +1 -0
- package/dist/sync/workers/delete.js +474 -0
- package/dist/sync/workers/delete.js.map +1 -0
- package/dist/sync/workers/download.d.ts +159 -0
- package/dist/sync/workers/download.d.ts.map +1 -0
- package/dist/sync/workers/download.js +731 -0
- package/dist/sync/workers/download.js.map +1 -0
- package/dist/sync/workers/upload.d.ts +98 -0
- package/dist/sync/workers/upload.d.ts.map +1 -0
- package/dist/sync/workers/upload.js +412 -0
- package/dist/sync/workers/upload.js.map +1 -0
- 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 +5 -0
- package/dist/test-utils/index.d.ts.map +1 -0
- package/dist/test-utils/index.js +5 -0
- package/dist/test-utils/index.js.map +1 -0
- 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 +47 -0
- package/dist/test-utils/wallet.d.ts.map +1 -0
- package/dist/test-utils/wallet.js +98 -0
- package/dist/test-utils/wallet.js.map +1 -0
- 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 +175 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDPP grant-bound token issuance, introspection, and revocation (§8, §9 AS
|
|
3
|
+
* items 8–10, 18–20; delivery scope §2).
|
|
4
|
+
*
|
|
5
|
+
* This module is the single token-validation authority. The RS resolves every
|
|
6
|
+
* request through `resolveToken` and enforces only from the result — §8 is
|
|
7
|
+
* explicit that the separated RS must not make a second AS lookup while
|
|
8
|
+
* handling a request, and that a co-located RS may use a local equivalent.
|
|
9
|
+
* `resolveToken` is that local equivalent, and `introspect` is the same
|
|
10
|
+
* decision rendered onto the RFC 7662 wire shape. They share one code path so
|
|
11
|
+
* the two deployments cannot drift apart.
|
|
12
|
+
*
|
|
13
|
+
* Revocation is immediate here by construction: resolution reads current store
|
|
14
|
+
* state on every call rather than trusting a cached decision, so a revoked
|
|
15
|
+
* grant reports `active: false` on the very next call. The 60-second bound in
|
|
16
|
+
* §8 is the RS's positive-result cache, not slack in the AS.
|
|
17
|
+
*/
|
|
18
|
+
import { verifyCodeVerifier } from "./pkce.js";
|
|
19
|
+
import { newOpaqueToken, } from "./store.js";
|
|
20
|
+
import { PDPP_DATA_ACCESS_TYPE, } from "./types.js";
|
|
21
|
+
/** Default client access-token lifetime. Short: the refresh path renews it. */
|
|
22
|
+
export const DEFAULT_ACCESS_TOKEN_TTL_SECONDS = 60 * 60;
|
|
23
|
+
/** How long an authorization code stays redeemable. RFC 6749 §4.1.2 suggests <=10 min. */
|
|
24
|
+
export const AUTHORIZATION_CODE_TTL_SECONDS = 60;
|
|
25
|
+
/**
|
|
26
|
+
* Whether a grant may carry a refresh token.
|
|
27
|
+
*
|
|
28
|
+
* §9 AS item 20: refresh tokens are issued only for `continuous` grants, or
|
|
29
|
+
* for a grant package only when *every* child grant is continuous. A
|
|
30
|
+
* single-use grant with a refresh token would be a contradiction — the grant
|
|
31
|
+
* is consumed at first issuance, so there is nothing left to refresh into.
|
|
32
|
+
*/
|
|
33
|
+
export function mayIssueRefreshToken(accessModes) {
|
|
34
|
+
return accessModes.length > 0 && accessModes.every((m) => m === "continuous");
|
|
35
|
+
}
|
|
36
|
+
function grantInactiveReason(store, stored, now) {
|
|
37
|
+
const status = store.grantStatus(stored, now);
|
|
38
|
+
if (status === "revoked")
|
|
39
|
+
return "grant_revoked";
|
|
40
|
+
if (status === "expired")
|
|
41
|
+
return "grant_expired";
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
export class PdppTokenService {
|
|
45
|
+
store;
|
|
46
|
+
accessTtl;
|
|
47
|
+
constructor(store, options = {}) {
|
|
48
|
+
this.store = store;
|
|
49
|
+
this.accessTtl =
|
|
50
|
+
options.accessTokenTtlSeconds ?? DEFAULT_ACCESS_TOKEN_TTL_SECONDS;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Issue the first client token for a grant, redeeming an authorization code.
|
|
54
|
+
*
|
|
55
|
+
* The code is consumed atomically before anything else happens (§9 AS item
|
|
56
|
+
* 19) and a single-use grant is consumed atomically with the token insert
|
|
57
|
+
* (§9 AS item 10). Both preconditions live in SQL WHERE clauses, so a
|
|
58
|
+
* concurrent duplicate redemption loses the race rather than double-issuing.
|
|
59
|
+
*/
|
|
60
|
+
redeemAuthorizationCode(input) {
|
|
61
|
+
const now = input.now ?? new Date();
|
|
62
|
+
const record = this.store.consumeAuthCode(input.code, now);
|
|
63
|
+
if (!record) {
|
|
64
|
+
// Unknown, expired, or already redeemed — deliberately one answer, so a
|
|
65
|
+
// replay cannot be distinguished from a bad code.
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
failure: {
|
|
69
|
+
code: "invalid_grant",
|
|
70
|
+
message: "authorization code is invalid, expired, or already redeemed",
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
// RFC 6749 §4.1.3: the client and redirect_uri must match the ones the
|
|
75
|
+
// code was issued to. The code is already burned at this point, which is
|
|
76
|
+
// correct — a mismatched redemption attempt must not leave it redeemable.
|
|
77
|
+
if (record.clientId !== input.clientId) {
|
|
78
|
+
return {
|
|
79
|
+
ok: false,
|
|
80
|
+
failure: {
|
|
81
|
+
code: "invalid_grant",
|
|
82
|
+
message: "authorization code was not issued to this client",
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (record.redirectUri !== input.redirectUri) {
|
|
87
|
+
return {
|
|
88
|
+
ok: false,
|
|
89
|
+
failure: {
|
|
90
|
+
code: "invalid_grant",
|
|
91
|
+
message: "redirect_uri does not match the authorization request",
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
// RFC 7636 §4.6. Checked after the code is burned, like the client and
|
|
96
|
+
// redirect checks above: an attacker who intercepted the code must not be
|
|
97
|
+
// able to probe verifiers against a code that stays alive between guesses.
|
|
98
|
+
// One wrong verifier costs them the code.
|
|
99
|
+
const pkceFailure = verifyCodeVerifier(input.codeVerifier, record.codeChallenge, record.codeChallengeMethod);
|
|
100
|
+
if (pkceFailure) {
|
|
101
|
+
return {
|
|
102
|
+
ok: false,
|
|
103
|
+
failure: { code: "invalid_grant", message: pkceFailure.message },
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const stored = this.store.getGrant(record.grantId);
|
|
107
|
+
if (!stored) {
|
|
108
|
+
return {
|
|
109
|
+
ok: false,
|
|
110
|
+
failure: { code: "invalid_grant", message: "grant not found" },
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const inactive = grantInactiveReason(this.store, stored, now);
|
|
114
|
+
if (inactive) {
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
failure: {
|
|
118
|
+
code: "invalid_grant",
|
|
119
|
+
message: `grant is ${inactive === "grant_revoked" ? "revoked" : "expired"}`,
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return this.mintForGrant(stored, now);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Rotate a refresh token within its family.
|
|
127
|
+
*
|
|
128
|
+
* Reuse of a superseded token revokes the family and every family-linked
|
|
129
|
+
* access token inside `rotateRefreshToken`, then this returns
|
|
130
|
+
* `invalid_grant`, which is what §9 AS item 20 requires: reject the reuse
|
|
131
|
+
* and require fresh authorization.
|
|
132
|
+
*/
|
|
133
|
+
refresh(input) {
|
|
134
|
+
const now = input.now ?? new Date();
|
|
135
|
+
const rotation = this.store.rotateRefreshToken(input.refreshToken, now);
|
|
136
|
+
if (!rotation.ok) {
|
|
137
|
+
return {
|
|
138
|
+
ok: false,
|
|
139
|
+
failure: {
|
|
140
|
+
code: "invalid_grant",
|
|
141
|
+
message: rotation.reason === "reuse_detected"
|
|
142
|
+
? "refresh token reuse detected; the token family has been revoked and fresh authorization is required"
|
|
143
|
+
: "refresh token is unknown or its family is revoked",
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const stored = this.store.getGrant(rotation.grantId);
|
|
148
|
+
if (!stored) {
|
|
149
|
+
return {
|
|
150
|
+
ok: false,
|
|
151
|
+
failure: { code: "invalid_grant", message: "grant not found" },
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const inactive = grantInactiveReason(this.store, stored, now);
|
|
155
|
+
if (inactive) {
|
|
156
|
+
return {
|
|
157
|
+
ok: false,
|
|
158
|
+
failure: {
|
|
159
|
+
code: "invalid_grant",
|
|
160
|
+
message: `grant is ${inactive === "grant_revoked" ? "revoked" : "expired"}`,
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return this.mintForGrant(stored, now, rotation.familyId);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Mint an access token (and, for continuous grants, a refresh token) bound
|
|
168
|
+
* to a grant.
|
|
169
|
+
*
|
|
170
|
+
* `existingFamilyId` carries a rotation into the same family so reuse
|
|
171
|
+
* detection keeps working across the whole chain; a first issuance creates
|
|
172
|
+
* the family.
|
|
173
|
+
*/
|
|
174
|
+
mintForGrant(stored, now, existingFamilyId) {
|
|
175
|
+
const { grant } = stored;
|
|
176
|
+
const continuous = mayIssueRefreshToken([grant.access_mode]);
|
|
177
|
+
let familyId = existingFamilyId ?? null;
|
|
178
|
+
if (continuous && familyId === null) {
|
|
179
|
+
familyId = this.store.createRefreshFamily(grant.grant_id);
|
|
180
|
+
}
|
|
181
|
+
const accessToken = newOpaqueToken("pdpp_at");
|
|
182
|
+
// A token must never outlive the grant it is bound to. Clamping here means
|
|
183
|
+
// the RS's `min(token_exp, 60s)` cache bound can never extend access past
|
|
184
|
+
// grant expiry either.
|
|
185
|
+
const ttlExpiry = new Date(now.getTime() + this.accessTtl * 1000);
|
|
186
|
+
const grantExpiry = grant.expires_at ? new Date(grant.expires_at) : null;
|
|
187
|
+
const effectiveExpiry = grantExpiry && grantExpiry < ttlExpiry ? grantExpiry : ttlExpiry;
|
|
188
|
+
const issued = this.store.issueAccessToken({
|
|
189
|
+
token: accessToken,
|
|
190
|
+
grantId: grant.grant_id,
|
|
191
|
+
subjectId: stored.subjectId,
|
|
192
|
+
clientId: grant.client.client_id,
|
|
193
|
+
tokenKind: "client",
|
|
194
|
+
familyId,
|
|
195
|
+
expiresAt: effectiveExpiry.toISOString(),
|
|
196
|
+
// A single-use grant is consumed exactly at first client-token issuance.
|
|
197
|
+
// A rotation is never a first issuance, so it never re-consumes.
|
|
198
|
+
consumeSingleUse: grant.access_mode === "single_use" && existingFamilyId === undefined,
|
|
199
|
+
now,
|
|
200
|
+
});
|
|
201
|
+
if (!issued) {
|
|
202
|
+
return {
|
|
203
|
+
ok: false,
|
|
204
|
+
failure: {
|
|
205
|
+
code: "invalid_grant",
|
|
206
|
+
message: "single_use grant has already been consumed; no further access tokens may be issued against it",
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
const expiresIn = Math.max(1, Math.floor((effectiveExpiry.getTime() - now.getTime()) / 1000));
|
|
211
|
+
let refreshToken;
|
|
212
|
+
if (continuous && familyId) {
|
|
213
|
+
refreshToken = newOpaqueToken("pdpp_rt");
|
|
214
|
+
this.store.insertRefreshToken(refreshToken, familyId, now);
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
ok: true,
|
|
218
|
+
issued: {
|
|
219
|
+
access_token: accessToken,
|
|
220
|
+
token_type: "Bearer",
|
|
221
|
+
expires_in: expiresIn,
|
|
222
|
+
...(refreshToken && { refresh_token: refreshToken }),
|
|
223
|
+
grant_id: grant.grant_id,
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The single shared token-validation path (§8 "Grant enforcement").
|
|
229
|
+
*
|
|
230
|
+
* Reads live store state every call. That is what makes revocation immediate
|
|
231
|
+
* in introspection (§9 AS item 8) — there is no AS-side cache to invalidate.
|
|
232
|
+
*/
|
|
233
|
+
resolveToken(accessToken, now = new Date()) {
|
|
234
|
+
const record = this.store.getAccessToken(accessToken);
|
|
235
|
+
if (!record) {
|
|
236
|
+
return { active: false, inactiveReason: "unknown" };
|
|
237
|
+
}
|
|
238
|
+
// Grant state is checked BEFORE the token's own revocation flag, because
|
|
239
|
+
// revoking a grant also marks its linked tokens revoked. Checking the
|
|
240
|
+
// token first would report `revoked` for what is really a grant
|
|
241
|
+
// revocation, and the RS keys 403 `grant_revoked` off this exact reason
|
|
242
|
+
// (§2 revocation propagation) — it would return the wrong error.
|
|
243
|
+
if (record.tokenKind === "client" && record.grantId) {
|
|
244
|
+
const stored = this.store.getGrant(record.grantId);
|
|
245
|
+
if (!stored) {
|
|
246
|
+
return { active: false, inactiveReason: "unknown" };
|
|
247
|
+
}
|
|
248
|
+
const grantInactive = grantInactiveReason(this.store, stored, now);
|
|
249
|
+
if (grantInactive) {
|
|
250
|
+
return { active: false, inactiveReason: grantInactive };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (record.revokedAt) {
|
|
254
|
+
return { active: false, inactiveReason: "revoked" };
|
|
255
|
+
}
|
|
256
|
+
if (record.expiresAt && Date.parse(record.expiresAt) <= now.getTime()) {
|
|
257
|
+
return { active: false, inactiveReason: "expired" };
|
|
258
|
+
}
|
|
259
|
+
// A token minted into a family that was later burned by reuse detection is
|
|
260
|
+
// dead even if its own row was not individually marked — belt and braces
|
|
261
|
+
// against a token inserted concurrently with the family revocation.
|
|
262
|
+
if (record.familyId && this.store.isFamilyRevoked(record.familyId)) {
|
|
263
|
+
return { active: false, inactiveReason: "revoked" };
|
|
264
|
+
}
|
|
265
|
+
if (record.tokenKind === "owner") {
|
|
266
|
+
// An owner token carries no grant. The RS derives subject scope from
|
|
267
|
+
// `subjectId` and must not synthesize a grant for it (§8).
|
|
268
|
+
return {
|
|
269
|
+
active: true,
|
|
270
|
+
tokenKind: "owner",
|
|
271
|
+
subjectId: record.subjectId,
|
|
272
|
+
...(record.expiresAt && { expiresAt: record.expiresAt }),
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
if (!record.grantId) {
|
|
276
|
+
// A client token with no grant link is unusable by definition.
|
|
277
|
+
return { active: false, inactiveReason: "unknown" };
|
|
278
|
+
}
|
|
279
|
+
const stored = this.store.getGrant(record.grantId);
|
|
280
|
+
if (!stored) {
|
|
281
|
+
return { active: false, inactiveReason: "unknown" };
|
|
282
|
+
}
|
|
283
|
+
const inactive = grantInactiveReason(this.store, stored, now);
|
|
284
|
+
if (inactive) {
|
|
285
|
+
// grant_revoked is the reason the RS turns into 403 grant_revoked.
|
|
286
|
+
return { active: false, inactiveReason: inactive };
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
active: true,
|
|
290
|
+
tokenKind: "client",
|
|
291
|
+
subjectId: stored.subjectId,
|
|
292
|
+
grant: stored.grant,
|
|
293
|
+
clientId: stored.grant.client.client_id,
|
|
294
|
+
...(record.expiresAt && { expiresAt: record.expiresAt }),
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* RFC 7662 introspection.
|
|
299
|
+
*
|
|
300
|
+
* An inactive token yields exactly `{ active: false }`. RFC 7662 §2.2 is
|
|
301
|
+
* clear that the response must not distinguish revoked from expired from
|
|
302
|
+
* never-issued — the reason stays internal (`resolveToken`) for the
|
|
303
|
+
* co-located RS, which needs it to pick 403 `grant_revoked`.
|
|
304
|
+
*/
|
|
305
|
+
introspect(accessToken, now = new Date()) {
|
|
306
|
+
const context = this.resolveToken(accessToken, now);
|
|
307
|
+
if (!context.active) {
|
|
308
|
+
return { active: false };
|
|
309
|
+
}
|
|
310
|
+
const base = {
|
|
311
|
+
active: true,
|
|
312
|
+
pdpp_token_kind: context.tokenKind,
|
|
313
|
+
subject_id: context.subjectId,
|
|
314
|
+
...(context.expiresAt && {
|
|
315
|
+
exp: Math.floor(Date.parse(context.expiresAt) / 1000),
|
|
316
|
+
}),
|
|
317
|
+
};
|
|
318
|
+
if (context.tokenKind === "owner" || !context.grant) {
|
|
319
|
+
return base;
|
|
320
|
+
}
|
|
321
|
+
return {
|
|
322
|
+
...base,
|
|
323
|
+
grant_id: context.grant.grant_id,
|
|
324
|
+
client_id: context.grant.client.client_id,
|
|
325
|
+
// The complete resolved enforcement context, in one response (§9 item 18).
|
|
326
|
+
authorization_details: [toAuthorizationDetail(context.grant)],
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/** Revoke a grant and every linked token family. Immediate (§2, §9 item 8). */
|
|
330
|
+
revokeGrant(grantId, now = new Date()) {
|
|
331
|
+
return this.store.revokeGrant(grantId, now);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Issue an owner token for a subject.
|
|
335
|
+
*
|
|
336
|
+
* An owner token carries no grant (§8 "Authentication"): it scopes to a
|
|
337
|
+
* single subject's data store, and the RS derives subject scope from it
|
|
338
|
+
* rather than synthesizing a grant. It is also what authenticates a consent
|
|
339
|
+
* decision — see `approval.ts` for why the AS requires this rather than
|
|
340
|
+
* trusting the consent UI's affiliation.
|
|
341
|
+
*
|
|
342
|
+
* How the owner *obtains* this token is out of scope for Core; this build
|
|
343
|
+
* mints it from the already-authenticated owner session paths.
|
|
344
|
+
*/
|
|
345
|
+
issueOwnerToken(input) {
|
|
346
|
+
const now = input.now ?? new Date();
|
|
347
|
+
const ttl = input.ttlSeconds ?? this.accessTtl;
|
|
348
|
+
const token = newOpaqueToken("pdpp_ot");
|
|
349
|
+
const expiresAt = new Date(now.getTime() + ttl * 1000);
|
|
350
|
+
this.store.issueAccessToken({
|
|
351
|
+
token,
|
|
352
|
+
grantId: null,
|
|
353
|
+
subjectId: input.subjectId,
|
|
354
|
+
clientId: null,
|
|
355
|
+
tokenKind: "owner",
|
|
356
|
+
expiresAt: expiresAt.toISOString(),
|
|
357
|
+
consumeSingleUse: false,
|
|
358
|
+
now,
|
|
359
|
+
});
|
|
360
|
+
return { access_token: token, token_type: "Bearer", expires_in: ttl };
|
|
361
|
+
}
|
|
362
|
+
/** Revoke a single access token without touching its grant. */
|
|
363
|
+
revokeAccessToken(token, now = new Date()) {
|
|
364
|
+
return this.store.revokeAccessToken(token, now);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Project a grant onto the RFC 9396 detail the introspection response carries.
|
|
369
|
+
*
|
|
370
|
+
* Note what is absent: `client_claims` and `retention` are not enforcement
|
|
371
|
+
* fields. §6 keeps claims outside introspection rights and RS enforcement
|
|
372
|
+
* entirely; retention is a policy commitment PDPP does not technically
|
|
373
|
+
* enforce, so including it would invite an RS to act on it.
|
|
374
|
+
*/
|
|
375
|
+
export function toAuthorizationDetail(grant) {
|
|
376
|
+
return {
|
|
377
|
+
type: PDPP_DATA_ACCESS_TYPE,
|
|
378
|
+
source: grant.source,
|
|
379
|
+
purpose_code: grant.purpose_code,
|
|
380
|
+
...(grant.purpose_description && {
|
|
381
|
+
purpose_description: grant.purpose_description,
|
|
382
|
+
}),
|
|
383
|
+
access_mode: grant.access_mode,
|
|
384
|
+
streams: grant.streams,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/pdpp/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,cAAc,GAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,GAOtB,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,EAAE,CAAC;AAExD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAuBjD;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAyB;IAC5D,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,KAAK,CAA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,KAAK;YACL,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,OAAO;YAClB,SAAS,EAAE,SAAS,CAAC,WAAW,EAAE;YAClC,gBAAgB,EAAE,KAAK;YACvB,GAAG;SACJ,CAAC,CAAC;QAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;IACxE,CAAC;IAED,+DAA+D;IAC/D,iBAAiB,CAAC,KAAa,EAAE,MAAY,IAAI,IAAI,EAAE;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAY;IAChD,OAAO;QACL,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,GAAG,CAAC,KAAK,CAAC,mBAAmB,IAAI;YAC/B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;SAC/C,CAAC;QACF,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,258 @@
|
|
|
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
|
+
/** The grant schema version this implementation issues and accepts. */
|
|
17
|
+
export declare const PDPP_GRANT_VERSION = "0.1.0";
|
|
18
|
+
/**
|
|
19
|
+
* The PDPP HTTP API contract version, sent and echoed in the `PDPP-Version`
|
|
20
|
+
* header. Normative value from Core §8 "API versioning".
|
|
21
|
+
*
|
|
22
|
+
* §7 "Version layering" is explicit that the three version axes MUST NOT be
|
|
23
|
+
* conflated, and this is the one that is easiest to get wrong: it is the HTTP
|
|
24
|
+
* *contract* version, not `PDPP_GRANT_VERSION` (the grant schema, `0.1.0`) and
|
|
25
|
+
* not `source_declaration.version` (an opaque declaration revision). This
|
|
26
|
+
* previously carried the grant schema version, which meant a client pinning
|
|
27
|
+
* the spec's own header value was rejected by the AS while the RS accepted it —
|
|
28
|
+
* a client could reach only half the server.
|
|
29
|
+
*
|
|
30
|
+
* Both the AS and RS surfaces import this one constant so they cannot drift
|
|
31
|
+
* apart again.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PDPP_API_VERSION = "2026-04-06";
|
|
34
|
+
/**
|
|
35
|
+
* The one purpose code Core gives a protocol-level consent requirement
|
|
36
|
+
* (§6 "AI training consent"). Every other code is a structured policy
|
|
37
|
+
* declaration the AS displays but does not gate on.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AI_TRAINING_PURPOSE = "https://pdpp.dev/purpose/ai_training";
|
|
40
|
+
export type AccessMode = "single_use" | "continuous";
|
|
41
|
+
/**
|
|
42
|
+
* Provenance class. A selection request never carries this — the AS derives it
|
|
43
|
+
* from the declaration it accepted for `source.id` (§6 "Source kinds").
|
|
44
|
+
*/
|
|
45
|
+
export type SourceKind = "connector" | "provider_native";
|
|
46
|
+
/** RFC 7591-aligned inline client metadata, minus the redundant `client_` prefix. */
|
|
47
|
+
export interface ClientDisplay {
|
|
48
|
+
name: string;
|
|
49
|
+
uri?: string;
|
|
50
|
+
logo_uri?: string;
|
|
51
|
+
policy_uri?: string;
|
|
52
|
+
tos_uri?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface TimeRange {
|
|
55
|
+
/** Inclusive lower bound (>=). */
|
|
56
|
+
since?: string;
|
|
57
|
+
/** Exclusive upper bound (<). */
|
|
58
|
+
until?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface StreamRequest {
|
|
61
|
+
/** Stream name, or `*` for every stream in the retained declaration. */
|
|
62
|
+
name: string;
|
|
63
|
+
/** `required` (default) or `optional`; optional streams become owner choices. */
|
|
64
|
+
necessity?: "required" | "optional";
|
|
65
|
+
instance_ids?: string[];
|
|
66
|
+
time_range?: TimeRange;
|
|
67
|
+
/** Named AS view. Mutually exclusive with `fields`. */
|
|
68
|
+
view?: string;
|
|
69
|
+
/** Field allowlist, top-level names only. Mutually exclusive with `view`. */
|
|
70
|
+
fields?: string[];
|
|
71
|
+
/** Canonical key strings for specific records. */
|
|
72
|
+
resources?: string[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Client-authored, unverifiable statements about this specific request.
|
|
76
|
+
* Request-scoped, not entity-scoped. These never enter the resolved grant.
|
|
77
|
+
*/
|
|
78
|
+
export interface ClientClaims {
|
|
79
|
+
commitments?: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface Retention {
|
|
82
|
+
/** ISO 8601 duration. */
|
|
83
|
+
max_duration: string;
|
|
84
|
+
/** `archive` is not supported in v0.1. */
|
|
85
|
+
on_expiry: "delete" | "anonymize";
|
|
86
|
+
}
|
|
87
|
+
/** One RFC 9396 `authorization_details` entry of PDPP type. */
|
|
88
|
+
export interface SelectionRequest {
|
|
89
|
+
type: typeof PDPP_DATA_ACCESS_TYPE;
|
|
90
|
+
/** A request carries `id` alone; provenance is derived, never asserted. */
|
|
91
|
+
source: {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
purpose_code: string;
|
|
95
|
+
purpose_description?: string;
|
|
96
|
+
access_mode: AccessMode;
|
|
97
|
+
retention?: Retention;
|
|
98
|
+
/** Required unless `selection_preset` is used. Exactly one of the two. */
|
|
99
|
+
streams?: StreamRequest[];
|
|
100
|
+
/** Alternative to explicit streams. Exactly one of the two. */
|
|
101
|
+
selection_preset?: string;
|
|
102
|
+
client_claims?: ClientClaims;
|
|
103
|
+
}
|
|
104
|
+
export interface TimeConstraint {
|
|
105
|
+
/** Frozen `consent_time_field` from the retained declaration. */
|
|
106
|
+
field: string;
|
|
107
|
+
/** Inclusive (>=). */
|
|
108
|
+
since?: string;
|
|
109
|
+
/** Exclusive (<). A hard cap: applies to future records as well as past. */
|
|
110
|
+
until?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface StreamGrant {
|
|
113
|
+
/** Always concrete. Issued grants never contain wildcards. */
|
|
114
|
+
name: string;
|
|
115
|
+
/** Unique, non-empty. Fan-in only when more than one handle is listed. */
|
|
116
|
+
instance_ids: string[];
|
|
117
|
+
/** Unique, non-empty, resolved. Authoritative for RS enforcement. */
|
|
118
|
+
fields: string[];
|
|
119
|
+
time_constraint?: TimeConstraint;
|
|
120
|
+
/** Canonical key strings. Absent means all records in the stream. */
|
|
121
|
+
resources?: string[];
|
|
122
|
+
}
|
|
123
|
+
export interface Grant {
|
|
124
|
+
/** This contract requires exactly `0.1.0`. */
|
|
125
|
+
version: string;
|
|
126
|
+
grant_id: string;
|
|
127
|
+
issued_at: string;
|
|
128
|
+
subject: {
|
|
129
|
+
id: string;
|
|
130
|
+
};
|
|
131
|
+
client: {
|
|
132
|
+
client_id: string;
|
|
133
|
+
client_display?: ClientDisplay;
|
|
134
|
+
};
|
|
135
|
+
/** Retained verbatim from the accepted declaration. */
|
|
136
|
+
source: {
|
|
137
|
+
kind: SourceKind;
|
|
138
|
+
id: string;
|
|
139
|
+
};
|
|
140
|
+
/** Opaque revision of the exact snapshot used, not a live lookup authority. */
|
|
141
|
+
source_declaration: {
|
|
142
|
+
version: string;
|
|
143
|
+
};
|
|
144
|
+
purpose_code: string;
|
|
145
|
+
purpose_description?: string;
|
|
146
|
+
access_mode: AccessMode;
|
|
147
|
+
streams: StreamGrant[];
|
|
148
|
+
/** Informational; the resolved streams stay authoritative. */
|
|
149
|
+
selection_preset?: string;
|
|
150
|
+
retention?: Retention;
|
|
151
|
+
/** Absent means no expiry. */
|
|
152
|
+
expires_at?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface DeclaredStream {
|
|
155
|
+
name: string;
|
|
156
|
+
/**
|
|
157
|
+
* How records in this stream behave over time (§5).
|
|
158
|
+
*
|
|
159
|
+
* `mutable_state` records are upserted by key and carry version history;
|
|
160
|
+
* `append_only` records are immutable, so a duplicate key is a no-op rather
|
|
161
|
+
* than an update. Optional, defaulting to `mutable_state`, so declarations
|
|
162
|
+
* written before this field existed keep their current meaning exactly.
|
|
163
|
+
*
|
|
164
|
+
* Before this existed the RS hardcoded `mutable_state` for every stream,
|
|
165
|
+
* which made an `append_only` declaration silently coerced and the field
|
|
166
|
+
* unfalsifiable for an ingesting producer.
|
|
167
|
+
*/
|
|
168
|
+
semantics?: "mutable_state" | "append_only";
|
|
169
|
+
/** Top-level field names the stream's schema defines. */
|
|
170
|
+
fields: string[];
|
|
171
|
+
/**
|
|
172
|
+
* Fields a record of this stream cannot be valid without. Always included in
|
|
173
|
+
* a resolved field set regardless of the requested allowlist — the per-stream
|
|
174
|
+
* consent floor (§6 "Note on `fields`").
|
|
175
|
+
*/
|
|
176
|
+
required_fields: string[];
|
|
177
|
+
/**
|
|
178
|
+
* Presence is the authoritative signal that the stream is time-range-capable
|
|
179
|
+
* (§6 "Note on `time_range`").
|
|
180
|
+
*/
|
|
181
|
+
consent_time_field?: string;
|
|
182
|
+
/** Arity of the primary key; `resources` entries are validated against it. */
|
|
183
|
+
primary_key: string[];
|
|
184
|
+
/** The stream's JSON Schema from a normative §5 declaration, when present. */
|
|
185
|
+
schema?: Record<string, unknown>;
|
|
186
|
+
/** Declared selection capabilities, e.g. `{ fields: true, resources: false }`. */
|
|
187
|
+
selection?: Record<string, unknown>;
|
|
188
|
+
}
|
|
189
|
+
export interface DeclaredView {
|
|
190
|
+
name: string;
|
|
191
|
+
fields: string[];
|
|
192
|
+
}
|
|
193
|
+
export interface DeclaredPreset {
|
|
194
|
+
name: string;
|
|
195
|
+
streams: StreamRequest[];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The exact declaration snapshot retained through validation, consent,
|
|
199
|
+
* issuance, and consent evidence. A later current declaration never
|
|
200
|
+
* substitutes for it (§9 AS item 16).
|
|
201
|
+
*/
|
|
202
|
+
export interface DeclarationSnapshot {
|
|
203
|
+
source_id: string;
|
|
204
|
+
source_kind: SourceKind;
|
|
205
|
+
/** Opaque revision identifier recorded into the grant. */
|
|
206
|
+
version: string;
|
|
207
|
+
/** Digest over the retrieved document, verified before the snapshot is trusted. */
|
|
208
|
+
digest: string;
|
|
209
|
+
streams: DeclaredStream[];
|
|
210
|
+
views?: DeclaredView[];
|
|
211
|
+
selection_presets?: DeclaredPreset[];
|
|
212
|
+
}
|
|
213
|
+
export type PdppTokenKind = "owner" | "client";
|
|
214
|
+
export interface PdppAuthorizationDetail {
|
|
215
|
+
type: typeof PDPP_DATA_ACCESS_TYPE;
|
|
216
|
+
source: {
|
|
217
|
+
kind: SourceKind;
|
|
218
|
+
id: string;
|
|
219
|
+
};
|
|
220
|
+
purpose_code: string;
|
|
221
|
+
purpose_description?: string;
|
|
222
|
+
access_mode: AccessMode;
|
|
223
|
+
streams: StreamGrant[];
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* RFC 7662 introspection response with the PDPP extension members. An inactive
|
|
227
|
+
* token returns exactly `{ active: false }` — RFC 7662 §2.2 forbids leaking
|
|
228
|
+
* anything else about a token that is revoked, expired, or simply unknown.
|
|
229
|
+
*/
|
|
230
|
+
export interface PdppIntrospectionResponse {
|
|
231
|
+
active: boolean;
|
|
232
|
+
pdpp_token_kind?: PdppTokenKind;
|
|
233
|
+
subject_id?: string;
|
|
234
|
+
grant_id?: string;
|
|
235
|
+
client_id?: string;
|
|
236
|
+
/** Unix epoch seconds. Omitted when the token never expires. */
|
|
237
|
+
exp?: number;
|
|
238
|
+
authorization_details?: PdppAuthorizationDetail[];
|
|
239
|
+
}
|
|
240
|
+
/** Why a token did not resolve. Drives the RS error; never echoed to the client. */
|
|
241
|
+
export type InactiveReason = "unknown" | "expired" | "revoked" | "grant_revoked" | "grant_expired";
|
|
242
|
+
/**
|
|
243
|
+
* The co-located equivalent of an introspection call. The RS resolves a token
|
|
244
|
+
* through this one path and enforces only from the result (§8 "Grant
|
|
245
|
+
* enforcement"): no second authority, no live declaration lookup.
|
|
246
|
+
*/
|
|
247
|
+
export interface PdppTokenContext {
|
|
248
|
+
active: boolean;
|
|
249
|
+
tokenKind?: PdppTokenKind;
|
|
250
|
+
subjectId?: string;
|
|
251
|
+
/** Client tokens only. An owner token carries no grant. */
|
|
252
|
+
grant?: Grant;
|
|
253
|
+
clientId?: string;
|
|
254
|
+
expiresAt?: string;
|
|
255
|
+
inactiveReason?: InactiveReason;
|
|
256
|
+
}
|
|
257
|
+
export type GrantStatus = "active" | "expired" | "revoked";
|
|
258
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pdpp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAE1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