@astrasyncai/verification-gateway 2.2.0 → 2.3.4
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/README.md +64 -30
- package/dist/adapter-interface/interface.d.mts +2 -2
- package/dist/adapter-interface/interface.d.ts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.js +40 -89
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +40 -89
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +2 -2
- package/dist/adapters/nextjs.d.ts +2 -2
- package/dist/adapters/nextjs.js +39 -109
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +39 -109
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +2 -2
- package/dist/adapters/sdk.d.ts +2 -2
- package/dist/adapters/sdk.js +39 -53
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +39 -53
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +2 -2
- package/dist/agent/index.mjs.map +1 -1
- package/dist/browser/background.js +39 -53
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +39 -53
- package/dist/browser/background.mjs.map +1 -1
- package/dist/browser/browser-adapter.d.mts +2 -2
- package/dist/browser/browser-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cursor/cursor-adapter.d.mts +2 -2
- package/dist/cursor/cursor-adapter.d.ts +2 -2
- package/dist/cursor/extension.d.mts +2 -2
- package/dist/cursor/extension.d.ts +2 -2
- package/dist/cursor/extension.js +39 -53
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +39 -53
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/{express-DpwYW08E.d.ts → express-CraCA8_t.d.ts} +2 -2
- package/dist/{express-C9KqJNWV.d.mts → express-DtvJ6BGt.d.mts} +2 -2
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +39 -53
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +39 -53
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +2 -2
- package/dist/git-trigger/git-hooks.d.ts +2 -2
- package/dist/{index-gM-lgX_X.d.ts → index--KzVRa32.d.ts} +1 -1
- package/dist/{index-BMZdjGT4.d.mts → index-BZ85CeEr.d.mts} +2 -2
- package/dist/{index-Dm2xA6j1.d.ts → index-BzAFmemy.d.ts} +2 -2
- package/dist/{index-DlsYN3Et.d.mts → index-SEgnWzkf.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +42 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -107
- package/dist/index.mjs.map +1 -1
- package/dist/local-evaluator/evaluator.d.mts +2 -2
- package/dist/local-evaluator/evaluator.d.ts +2 -2
- package/dist/{nextjs-yNzimC3a.d.ts → nextjs-B8o9C0t6.d.ts} +1 -1
- package/dist/{nextjs-BEqidT0U.d.mts → nextjs-DZHAn9j-.d.mts} +1 -1
- package/dist/{sdk-CP9C9Qu0.d.ts → sdk-BQ3olp3v.d.ts} +2 -2
- package/dist/{sdk-7fa9H0qa.d.mts → sdk-CRSUFQH2.d.mts} +2 -2
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-CrVMq_Td.d.mts → types-JMgPake9.d.mts} +135 -28
- package/dist/{types-CrVMq_Td.d.ts → types-JMgPake9.d.ts} +135 -28
- package/dist/{types-DE0ooQJ6.d.mts → types-aN1UHhyy.d.mts} +1 -1
- package/dist/{types-rigu2bH3.d.ts → types-osMd_dpT.d.ts} +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/webhooks.d.mts +59 -0
- package/dist/webhooks.d.ts +59 -0
- package/dist/webhooks.js +81 -0
- package/dist/webhooks.js.map +1 -0
- package/dist/webhooks.mjs +55 -0
- package/dist/webhooks.mjs.map +1 -0
- package/package.json +6 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, a as LocalPurposeRule } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, a as LocalPurposeRule } from '../types-aN1UHhyy.mjs';
|
|
2
|
+
import '../types-JMgPake9.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Local PDLSS Evaluator
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, a as LocalPurposeRule } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, a as LocalPurposeRule } from '../types-osMd_dpT.js';
|
|
2
|
+
import '../types-JMgPake9.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Local PDLSS Evaluator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as next_server from 'next/server';
|
|
2
2
|
import { NextRequest } from 'next/server';
|
|
3
|
-
import { N as NextJsMiddlewareOptions } from './types-
|
|
3
|
+
import { N as NextJsMiddlewareOptions } from './types-JMgPake9.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Next.js middleware for agent verification
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as next_server from 'next/server';
|
|
2
2
|
import { NextRequest } from 'next/server';
|
|
3
|
-
import { N as NextJsMiddlewareOptions } from './types-
|
|
3
|
+
import { N as NextJsMiddlewareOptions } from './types-JMgPake9.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Next.js middleware for agent verification
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, i as TrustLevel, S as SDKOptions, V as VerificationResult } from './types-
|
|
1
|
+
import { a as AccessLevel, i as TrustLevel, S as SDKOptions, V as VerificationResult } from './types-JMgPake9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway - Access Level Definitions
|
|
@@ -69,7 +69,7 @@ declare function getCapabilities(accessLevel: AccessLevel): AccessCapabilities;
|
|
|
69
69
|
* import { createClient } from '@astrasyncai/verification-gateway/sdk';
|
|
70
70
|
*
|
|
71
71
|
* const gateway = createClient({
|
|
72
|
-
* apiBaseUrl: 'https://
|
|
72
|
+
* apiBaseUrl: 'https://astrasync.ai/api',
|
|
73
73
|
* });
|
|
74
74
|
*
|
|
75
75
|
* // Verify another agent before interacting
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, i as TrustLevel, S as SDKOptions, V as VerificationResult } from './types-
|
|
1
|
+
import { a as AccessLevel, i as TrustLevel, S as SDKOptions, V as VerificationResult } from './types-JMgPake9.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway - Access Level Definitions
|
|
@@ -69,7 +69,7 @@ declare function getCapabilities(accessLevel: AccessLevel): AccessCapabilities;
|
|
|
69
69
|
* import { createClient } from '@astrasyncai/verification-gateway/sdk';
|
|
70
70
|
*
|
|
71
71
|
* const gateway = createClient({
|
|
72
|
-
* apiBaseUrl: 'https://
|
|
72
|
+
* apiBaseUrl: 'https://astrasync.ai/api',
|
|
73
73
|
* });
|
|
74
74
|
*
|
|
75
75
|
* // Verify another agent before interacting
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '../types-
|
|
2
|
-
export { A as ACPEndpoint, a as ACPPaymentTokenType, b as ACPRequestContext, c as ACPRequestLike, d as ACPSignatureAlgorithm, e as ACPTotal, f as ACPVerifyInput, g as ACPVerifyResult, h as AP2CartMandateClaims, j as AP2ChainResult, k as AP2IntentMandateClaims, l as AP2MandateClaims, m as AP2MandateTriple, n as AP2MandateTripleInput, o as AP2MandateType, p as AP2PaymentDetailsTotal, q as AP2PaymentMandateClaims, r as AP2PaymentMandateForValue, s as AP2VerifyInput, C as CommerceContext, t as CommercePipelineInput, u as CommerceProtocol, v as CommercePurpose, w as CommerceSignatureStack, x as ConstraintEvalResult, y as ConstraintKey, z as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, B as IdentityClaim, D as IdentityResolver, M as MPPChallengeForValue, F as MPPChallengeSummary, G as MPPCredentialSummary, H as MPPIntent, J as MPPKind, K as MPPReceiptSummary, L as MPPRequestContext, N as MPPRequestLike, O as MPPResponseLike, P as MPPVerifyInput, Q as MPPVerifyResult, R as ParsedRFC9421, S as PaymentMethodAllowlistInput, T as RFC9421SignatureParams, U as RFC9421Tag, V as RFC9421VerifyOptions, W as RFC9421VerifyRequest, X as RFC9421VerifyResult, Y as RegistryName, Z as RegistryResolver, _ as ResolveContext, $ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, a0 as SpendingLimitInput, a1 as StripeWebhookInformationalEvent, a2 as TransactionContext, a3 as TransactionValueContext, a4 as TransportExtractor, a5 as UCPCheckoutContext, a6 as UCPManifestValidationResult, a7 as UCPRequestLike, a8 as UCPTotal, a9 as VIAllowedParty, aa as VIBudgetLimit, ab as VIClaimsForValue, ac as VIConstraintEvalInput, ad as VIConstraints, ae as VIExecutionMode, af as VIExtractedClaims, ag as VILayer, ah as VILineItem, ai as VIMandateType, aj as VIPaymentAmount, ak as VIRecurrence, al as VIVerifyInput, am as VIVerifyResult, an as VerifyStripeWebhookOptions, ao as VerifyStripeWebhookResult, ap as X402Kind, aq as X402RequestContext, ar as X402RequestForValue, as as X402RequestLike, at as X402RequirementsSummary, au as X402ResponseLike, av as applyCredentials, aw as bindIdentity, ax as claim, ay as clearTransportExtractors, az as createMastercardRegistry, aA as createVisaRegistry, aB as createWebBotAuthRegistry, aC as detectProtocol, aD as evaluatePaymentMethodAllowlist, aE as evaluateSpendingLimit, aF as evaluateVIConstraints, aG as extractA2ACredentials, aH as extractACPContext, aI as extractACPTransactionValue, aJ as extractAP2Mandate, aK as extractAP2Mandates, aL as extractAP2TransactionValue, aM as extractCredentialsFromProtocol, aN as extractHttpCredentials, aO as extractMPPContext, aP as extractMPPFromRequest, aQ as extractMPPFromResponse, aR as extractMPPTransactionValue, aS as extractMcpCredentials, aT as extractUCPContext, aU as extractUCPTransactionValue, aV as extractVIClaims, aW as extractVITransactionValue, aX as extractX402Context, aY as extractX402FromRequest, aZ as extractX402FromResponse, a_ as extractX402TransactionValue, a$ as fetchUCPManifest, b0 as getTransportExtractor, b1 as getTransportExtractors, b2 as isStripeWebhookInformational, b3 as mapACPRequestToPurpose, b4 as mapAP2MandateToPurpose, b5 as mapMPPRequestToPurpose, b6 as mapRFC9421TagToPurpose, b7 as mapUCPRequestToPurpose, b8 as mapVIMandateToPurpose, b9 as mapX402RequestToPurpose, ba as parseRFC9421, bb as registerTransportExtractor, bc as runCommercePipeline, bd as runMatchingExtractors, be as setA2AMetadata, bf as setHttpHeaders, bg as setMcpMeta, bh as validateUCPManifest, bi as verifyACPSignature, bj as verifyAP2Chain, bk as verifyMPP, bl as verifyRFC9421, bm as verifyStripeWebhook, bn as verifyVIChain } from '../index-
|
|
1
|
+
import '../types-JMgPake9.mjs';
|
|
2
|
+
export { A as ACPEndpoint, a as ACPPaymentTokenType, b as ACPRequestContext, c as ACPRequestLike, d as ACPSignatureAlgorithm, e as ACPTotal, f as ACPVerifyInput, g as ACPVerifyResult, h as AP2CartMandateClaims, j as AP2ChainResult, k as AP2IntentMandateClaims, l as AP2MandateClaims, m as AP2MandateTriple, n as AP2MandateTripleInput, o as AP2MandateType, p as AP2PaymentDetailsTotal, q as AP2PaymentMandateClaims, r as AP2PaymentMandateForValue, s as AP2VerifyInput, C as CommerceContext, t as CommercePipelineInput, u as CommerceProtocol, v as CommercePurpose, w as CommerceSignatureStack, x as ConstraintEvalResult, y as ConstraintKey, z as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, B as IdentityClaim, D as IdentityResolver, M as MPPChallengeForValue, F as MPPChallengeSummary, G as MPPCredentialSummary, H as MPPIntent, J as MPPKind, K as MPPReceiptSummary, L as MPPRequestContext, N as MPPRequestLike, O as MPPResponseLike, P as MPPVerifyInput, Q as MPPVerifyResult, R as ParsedRFC9421, S as PaymentMethodAllowlistInput, T as RFC9421SignatureParams, U as RFC9421Tag, V as RFC9421VerifyOptions, W as RFC9421VerifyRequest, X as RFC9421VerifyResult, Y as RegistryName, Z as RegistryResolver, _ as ResolveContext, $ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, a0 as SpendingLimitInput, a1 as StripeWebhookInformationalEvent, a2 as TransactionContext, a3 as TransactionValueContext, a4 as TransportExtractor, a5 as UCPCheckoutContext, a6 as UCPManifestValidationResult, a7 as UCPRequestLike, a8 as UCPTotal, a9 as VIAllowedParty, aa as VIBudgetLimit, ab as VIClaimsForValue, ac as VIConstraintEvalInput, ad as VIConstraints, ae as VIExecutionMode, af as VIExtractedClaims, ag as VILayer, ah as VILineItem, ai as VIMandateType, aj as VIPaymentAmount, ak as VIRecurrence, al as VIVerifyInput, am as VIVerifyResult, an as VerifyStripeWebhookOptions, ao as VerifyStripeWebhookResult, ap as X402Kind, aq as X402RequestContext, ar as X402RequestForValue, as as X402RequestLike, at as X402RequirementsSummary, au as X402ResponseLike, av as applyCredentials, aw as bindIdentity, ax as claim, ay as clearTransportExtractors, az as createMastercardRegistry, aA as createVisaRegistry, aB as createWebBotAuthRegistry, aC as detectProtocol, aD as evaluatePaymentMethodAllowlist, aE as evaluateSpendingLimit, aF as evaluateVIConstraints, aG as extractA2ACredentials, aH as extractACPContext, aI as extractACPTransactionValue, aJ as extractAP2Mandate, aK as extractAP2Mandates, aL as extractAP2TransactionValue, aM as extractCredentialsFromProtocol, aN as extractHttpCredentials, aO as extractMPPContext, aP as extractMPPFromRequest, aQ as extractMPPFromResponse, aR as extractMPPTransactionValue, aS as extractMcpCredentials, aT as extractUCPContext, aU as extractUCPTransactionValue, aV as extractVIClaims, aW as extractVITransactionValue, aX as extractX402Context, aY as extractX402FromRequest, aZ as extractX402FromResponse, a_ as extractX402TransactionValue, a$ as fetchUCPManifest, b0 as getTransportExtractor, b1 as getTransportExtractors, b2 as isStripeWebhookInformational, b3 as mapACPRequestToPurpose, b4 as mapAP2MandateToPurpose, b5 as mapMPPRequestToPurpose, b6 as mapRFC9421TagToPurpose, b7 as mapUCPRequestToPurpose, b8 as mapVIMandateToPurpose, b9 as mapX402RequestToPurpose, ba as parseRFC9421, bb as registerTransportExtractor, bc as runCommercePipeline, bd as runMatchingExtractors, be as setA2AMetadata, bf as setHttpHeaders, bg as setMcpMeta, bh as validateUCPManifest, bi as verifyACPSignature, bj as verifyAP2Chain, bk as verifyMPP, bl as verifyRFC9421, bm as verifyStripeWebhook, bn as verifyVIChain } from '../index-SEgnWzkf.mjs';
|
|
3
3
|
import 'jose';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '../types-
|
|
2
|
-
export { A as ACPEndpoint, a as ACPPaymentTokenType, b as ACPRequestContext, c as ACPRequestLike, d as ACPSignatureAlgorithm, e as ACPTotal, f as ACPVerifyInput, g as ACPVerifyResult, h as AP2CartMandateClaims, j as AP2ChainResult, k as AP2IntentMandateClaims, l as AP2MandateClaims, m as AP2MandateTriple, n as AP2MandateTripleInput, o as AP2MandateType, p as AP2PaymentDetailsTotal, q as AP2PaymentMandateClaims, r as AP2PaymentMandateForValue, s as AP2VerifyInput, C as CommerceContext, t as CommercePipelineInput, u as CommerceProtocol, v as CommercePurpose, w as CommerceSignatureStack, x as ConstraintEvalResult, y as ConstraintKey, z as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, B as IdentityClaim, D as IdentityResolver, M as MPPChallengeForValue, F as MPPChallengeSummary, G as MPPCredentialSummary, H as MPPIntent, J as MPPKind, K as MPPReceiptSummary, L as MPPRequestContext, N as MPPRequestLike, O as MPPResponseLike, P as MPPVerifyInput, Q as MPPVerifyResult, R as ParsedRFC9421, S as PaymentMethodAllowlistInput, T as RFC9421SignatureParams, U as RFC9421Tag, V as RFC9421VerifyOptions, W as RFC9421VerifyRequest, X as RFC9421VerifyResult, Y as RegistryName, Z as RegistryResolver, _ as ResolveContext, $ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, a0 as SpendingLimitInput, a1 as StripeWebhookInformationalEvent, a2 as TransactionContext, a3 as TransactionValueContext, a4 as TransportExtractor, a5 as UCPCheckoutContext, a6 as UCPManifestValidationResult, a7 as UCPRequestLike, a8 as UCPTotal, a9 as VIAllowedParty, aa as VIBudgetLimit, ab as VIClaimsForValue, ac as VIConstraintEvalInput, ad as VIConstraints, ae as VIExecutionMode, af as VIExtractedClaims, ag as VILayer, ah as VILineItem, ai as VIMandateType, aj as VIPaymentAmount, ak as VIRecurrence, al as VIVerifyInput, am as VIVerifyResult, an as VerifyStripeWebhookOptions, ao as VerifyStripeWebhookResult, ap as X402Kind, aq as X402RequestContext, ar as X402RequestForValue, as as X402RequestLike, at as X402RequirementsSummary, au as X402ResponseLike, av as applyCredentials, aw as bindIdentity, ax as claim, ay as clearTransportExtractors, az as createMastercardRegistry, aA as createVisaRegistry, aB as createWebBotAuthRegistry, aC as detectProtocol, aD as evaluatePaymentMethodAllowlist, aE as evaluateSpendingLimit, aF as evaluateVIConstraints, aG as extractA2ACredentials, aH as extractACPContext, aI as extractACPTransactionValue, aJ as extractAP2Mandate, aK as extractAP2Mandates, aL as extractAP2TransactionValue, aM as extractCredentialsFromProtocol, aN as extractHttpCredentials, aO as extractMPPContext, aP as extractMPPFromRequest, aQ as extractMPPFromResponse, aR as extractMPPTransactionValue, aS as extractMcpCredentials, aT as extractUCPContext, aU as extractUCPTransactionValue, aV as extractVIClaims, aW as extractVITransactionValue, aX as extractX402Context, aY as extractX402FromRequest, aZ as extractX402FromResponse, a_ as extractX402TransactionValue, a$ as fetchUCPManifest, b0 as getTransportExtractor, b1 as getTransportExtractors, b2 as isStripeWebhookInformational, b3 as mapACPRequestToPurpose, b4 as mapAP2MandateToPurpose, b5 as mapMPPRequestToPurpose, b6 as mapRFC9421TagToPurpose, b7 as mapUCPRequestToPurpose, b8 as mapVIMandateToPurpose, b9 as mapX402RequestToPurpose, ba as parseRFC9421, bb as registerTransportExtractor, bc as runCommercePipeline, bd as runMatchingExtractors, be as setA2AMetadata, bf as setHttpHeaders, bg as setMcpMeta, bh as validateUCPManifest, bi as verifyACPSignature, bj as verifyAP2Chain, bk as verifyMPP, bl as verifyRFC9421, bm as verifyStripeWebhook, bn as verifyVIChain } from '../index
|
|
1
|
+
import '../types-JMgPake9.js';
|
|
2
|
+
export { A as ACPEndpoint, a as ACPPaymentTokenType, b as ACPRequestContext, c as ACPRequestLike, d as ACPSignatureAlgorithm, e as ACPTotal, f as ACPVerifyInput, g as ACPVerifyResult, h as AP2CartMandateClaims, j as AP2ChainResult, k as AP2IntentMandateClaims, l as AP2MandateClaims, m as AP2MandateTriple, n as AP2MandateTripleInput, o as AP2MandateType, p as AP2PaymentDetailsTotal, q as AP2PaymentMandateClaims, r as AP2PaymentMandateForValue, s as AP2VerifyInput, C as CommerceContext, t as CommercePipelineInput, u as CommerceProtocol, v as CommercePurpose, w as CommerceSignatureStack, x as ConstraintEvalResult, y as ConstraintKey, z as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, B as IdentityClaim, D as IdentityResolver, M as MPPChallengeForValue, F as MPPChallengeSummary, G as MPPCredentialSummary, H as MPPIntent, J as MPPKind, K as MPPReceiptSummary, L as MPPRequestContext, N as MPPRequestLike, O as MPPResponseLike, P as MPPVerifyInput, Q as MPPVerifyResult, R as ParsedRFC9421, S as PaymentMethodAllowlistInput, T as RFC9421SignatureParams, U as RFC9421Tag, V as RFC9421VerifyOptions, W as RFC9421VerifyRequest, X as RFC9421VerifyResult, Y as RegistryName, Z as RegistryResolver, _ as ResolveContext, $ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, a0 as SpendingLimitInput, a1 as StripeWebhookInformationalEvent, a2 as TransactionContext, a3 as TransactionValueContext, a4 as TransportExtractor, a5 as UCPCheckoutContext, a6 as UCPManifestValidationResult, a7 as UCPRequestLike, a8 as UCPTotal, a9 as VIAllowedParty, aa as VIBudgetLimit, ab as VIClaimsForValue, ac as VIConstraintEvalInput, ad as VIConstraints, ae as VIExecutionMode, af as VIExtractedClaims, ag as VILayer, ah as VILineItem, ai as VIMandateType, aj as VIPaymentAmount, ak as VIRecurrence, al as VIVerifyInput, am as VIVerifyResult, an as VerifyStripeWebhookOptions, ao as VerifyStripeWebhookResult, ap as X402Kind, aq as X402RequestContext, ar as X402RequestForValue, as as X402RequestLike, at as X402RequirementsSummary, au as X402ResponseLike, av as applyCredentials, aw as bindIdentity, ax as claim, ay as clearTransportExtractors, az as createMastercardRegistry, aA as createVisaRegistry, aB as createWebBotAuthRegistry, aC as detectProtocol, aD as evaluatePaymentMethodAllowlist, aE as evaluateSpendingLimit, aF as evaluateVIConstraints, aG as extractA2ACredentials, aH as extractACPContext, aI as extractACPTransactionValue, aJ as extractAP2Mandate, aK as extractAP2Mandates, aL as extractAP2TransactionValue, aM as extractCredentialsFromProtocol, aN as extractHttpCredentials, aO as extractMPPContext, aP as extractMPPFromRequest, aQ as extractMPPFromResponse, aR as extractMPPTransactionValue, aS as extractMcpCredentials, aT as extractUCPContext, aU as extractUCPTransactionValue, aV as extractVIClaims, aW as extractVITransactionValue, aX as extractX402Context, aY as extractX402FromRequest, aZ as extractX402FromResponse, a_ as extractX402TransactionValue, a$ as fetchUCPManifest, b0 as getTransportExtractor, b1 as getTransportExtractors, b2 as isStripeWebhookInformational, b3 as mapACPRequestToPurpose, b4 as mapAP2MandateToPurpose, b5 as mapMPPRequestToPurpose, b6 as mapRFC9421TagToPurpose, b7 as mapUCPRequestToPurpose, b8 as mapVIMandateToPurpose, b9 as mapX402RequestToPurpose, ba as parseRFC9421, bb as registerTransportExtractor, bc as runCommercePipeline, bd as runMatchingExtractors, be as setA2AMetadata, bf as setHttpHeaders, bg as setMcpMeta, bh as validateUCPManifest, bi as verifyACPSignature, bj as verifyAP2Chain, bk as verifyMPP, bl as verifyRFC9421, bm as verifyStripeWebhook, bn as verifyVIChain } from '../index--KzVRa32.js';
|
|
3
3
|
import 'jose';
|
|
@@ -8,19 +8,32 @@
|
|
|
8
8
|
*/
|
|
9
9
|
type TrustLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM';
|
|
10
10
|
/**
|
|
11
|
-
* Access levels granted based on verification result
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
11
|
+
* Access levels granted based on verification result. Server is the single
|
|
12
|
+
* source of truth — these values are the resolved decision the server returns
|
|
13
|
+
* in `access.accessLevel`. SDK reads them verbatim (no client-side remap).
|
|
14
|
+
*
|
|
15
|
+
* For ANONYMOUS / unverified callers, the level is determined by the
|
|
16
|
+
* endpoint's `unverifiedAgentPolicy` per the verify-access canonical flow
|
|
17
|
+
* (see `docs/research/adapter-architecture-technical-requirements.md` §21):
|
|
18
|
+
* - Branch A (deny): `none` — caller is denied + advised to register
|
|
19
|
+
* - Branch B (allow_partial): `guidance` — reduced/browse-only access + advised
|
|
20
|
+
* - Branch C (allow_full): `standard` — unrestricted + advised to register for next time
|
|
21
|
+
* Every branch ALWAYS emits a verification event + queues a blockchain record.
|
|
22
|
+
*
|
|
23
|
+
* For VERIFIED callers (Branch D), the level is resolved server-side from the
|
|
24
|
+
* agent's live trust score plus the endpoint's `trust_score_requirement`:
|
|
25
|
+
* - none: agent below endpoint gate (denied; access.allowed=false)
|
|
26
|
+
* - guidance: 0–19 trust score
|
|
27
|
+
* - read-only: 20–39 trust score (browse, no mutations)
|
|
28
|
+
* - standard: 40–69 trust score (PDLSS-scoped operations)
|
|
29
|
+
* - full: 70+ trust score (PDLSS-scoped, high-trust)
|
|
30
|
+
* - internal: same-org membership, regardless of score
|
|
18
31
|
*/
|
|
19
32
|
type AccessLevel = 'none' | 'guidance' | 'read-only' | 'standard' | 'full' | 'internal';
|
|
20
33
|
/**
|
|
21
34
|
* Types of counterparties that can integrate the gateway
|
|
22
35
|
*/
|
|
23
|
-
type CounterpartyType = 'agent' | 'api' | 'mcp_server' | 'website' | 'other';
|
|
36
|
+
type CounterpartyType = 'agent' | 'api' | 'mcp_server' | 'website' | 'other' | 'unknown';
|
|
24
37
|
/**
|
|
25
38
|
* Agent credentials extracted from request
|
|
26
39
|
*/
|
|
@@ -44,9 +57,17 @@ interface GatewayConfig {
|
|
|
44
57
|
apiKey?: string;
|
|
45
58
|
/** Default access level for unverified requests */
|
|
46
59
|
defaultAccessLevel?: AccessLevel;
|
|
47
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Removed in v2.3.0 — server is the single source of truth for
|
|
62
|
+
* access-level decisions. Setting this no longer affects access decisions
|
|
63
|
+
* (the SDK reads `access.accessLevel` from the verify-access response).
|
|
64
|
+
* If you need a higher gate for an endpoint, configure it server-side via
|
|
65
|
+
* the endpoint's `trust_score_requirement`.
|
|
66
|
+
*/
|
|
48
67
|
minTrustScore?: number;
|
|
49
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Removed in v2.3.0 — see `minTrustScore` above.
|
|
70
|
+
*/
|
|
50
71
|
minTrustScoreForFull?: number;
|
|
51
72
|
/** Cache verification results (TTL in seconds) */
|
|
52
73
|
cacheTtl?: number;
|
|
@@ -58,6 +79,24 @@ interface GatewayConfig {
|
|
|
58
79
|
counterpartyUrl?: string;
|
|
59
80
|
/** This counterparty's type (sent with verify-access requests for analytics) */
|
|
60
81
|
counterpartyType?: CounterpartyType;
|
|
82
|
+
/**
|
|
83
|
+
* This counterparty's ASTRAE-id (issued at endpoint registration). When set,
|
|
84
|
+
* the SDK forwards it on verify-access calls so the server attributes traffic
|
|
85
|
+
* directly to this endpoint rather than resolving by URL. Useful when:
|
|
86
|
+
* - The merchant has multiple endpoints under the same origin (each running
|
|
87
|
+
* its own SDK instance with its own counterpartyId)
|
|
88
|
+
* - The endpoint URL might be served behind a proxy / different host than
|
|
89
|
+
* the registered origin
|
|
90
|
+
*/
|
|
91
|
+
counterpartyId?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Disable the one-time init self-test. The SDK normally fires a HEAD/OPTIONS
|
|
94
|
+
* to `${apiBaseUrl}/agents/verify-access` on first verify() call and warns
|
|
95
|
+
* if the response is HTML (indicating apiBaseUrl is pointing at a marketing
|
|
96
|
+
* site rather than the API). Set true for tests or environments where the
|
|
97
|
+
* extra request is undesirable.
|
|
98
|
+
*/
|
|
99
|
+
disableInitChecks?: boolean;
|
|
61
100
|
}
|
|
62
101
|
/**
|
|
63
102
|
* Verified agent information
|
|
@@ -101,32 +140,86 @@ interface VerifiedOrganization {
|
|
|
101
140
|
trustScore: number;
|
|
102
141
|
}
|
|
103
142
|
/**
|
|
104
|
-
* PDLSS policy information returned with verification
|
|
143
|
+
* PDLSS policy information returned with verification.
|
|
144
|
+
*
|
|
145
|
+
* @deprecated v2.2.4 — verify-access no longer returns the full PDLSS to the
|
|
146
|
+
* merchant. Read `EnhancedVerificationResult.verificationContext.pdlssCheck`
|
|
147
|
+
* instead for the merchant-facing summary, and `appliedPolicy` (top-level on
|
|
148
|
+
* the verification result) for the boundary name + policy version. The full
|
|
149
|
+
* PDLSS is owner-side only (queryable via `/api/agents/:id` when
|
|
150
|
+
* authenticated as the agent owner).
|
|
105
151
|
*/
|
|
106
152
|
interface PDLSSInfo {
|
|
107
|
-
/** Whether purpose was allowed */
|
|
108
153
|
purposeAllowed: boolean;
|
|
109
|
-
/** Whether within duration constraints */
|
|
110
154
|
withinDuration: boolean;
|
|
111
|
-
/** Whether within limits */
|
|
112
155
|
withinLimits: boolean;
|
|
113
|
-
/** Whether scope is allowed */
|
|
114
156
|
scopeAllowed: boolean;
|
|
115
|
-
/** Whether self-instantiation is allowed (if applicable) */
|
|
116
157
|
selfInstantiationAllowed: boolean;
|
|
117
|
-
/** Allowed purpose categories */
|
|
118
158
|
allowedPurposes?: string[];
|
|
119
|
-
/** Transaction limits */
|
|
120
159
|
limits?: Record<string, number>;
|
|
121
|
-
/** Allowed scope/resources */
|
|
122
160
|
scope?: string[];
|
|
123
|
-
/** Applied policy details */
|
|
124
|
-
appliedPolicy?:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
161
|
+
/** Applied policy details. Boundary/policy UUIDs deliberately not included. */
|
|
162
|
+
appliedPolicy?: AppliedPolicy;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Applied policy — merchant-facing identifiers only.
|
|
166
|
+
*
|
|
167
|
+
* Boundary and policy UUIDs are deliberately not surfaced; merchants and
|
|
168
|
+
* agent owners are different tenants and internal join keys are a
|
|
169
|
+
* cross-tenant correlation primitive. Internal callers that need UUIDs
|
|
170
|
+
* query the boundary/policy tables directly.
|
|
171
|
+
*/
|
|
172
|
+
interface AppliedPolicy {
|
|
173
|
+
boundaryName: string;
|
|
174
|
+
policyVersion: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Structured "why" of a verification decision the merchant receives.
|
|
178
|
+
*
|
|
179
|
+
* Tells the merchant whether the agent ID was verified, whether the runtime
|
|
180
|
+
* challenge succeeded, whether the request was within PDLSS, and the agent's
|
|
181
|
+
* actual dynamic trust score — without exposing thresholds, scope lists, or
|
|
182
|
+
* other-tenant counterparty membership.
|
|
183
|
+
*
|
|
184
|
+
* `attestations` is empty unless the calling endpoint's access policy
|
|
185
|
+
* declared `required_attestations`. Each attestation carries a blockchain
|
|
186
|
+
* proof reference (or, in the future, a full ZKP) so the merchant can verify
|
|
187
|
+
* the underlying claim without seeing the raw underlying data (e.g. the
|
|
188
|
+
* Persona/ConnectID transaction).
|
|
189
|
+
*/
|
|
190
|
+
interface VerificationContext {
|
|
191
|
+
idVerified: boolean;
|
|
192
|
+
runtimeChallenge: {
|
|
193
|
+
status: 'passed' | 'skipped' | 'failed' | 'timeout' | 'not_supported';
|
|
194
|
+
checkedAt: string | null;
|
|
195
|
+
};
|
|
196
|
+
pdlssCheck: {
|
|
197
|
+
/** Outcome only — no thresholds disclosed. */
|
|
198
|
+
result: 'within' | 'exceeded' | 'denied' | 'not_evaluated';
|
|
199
|
+
/** Category-level only. */
|
|
200
|
+
purpose: 'approved' | 'denied';
|
|
201
|
+
scope: 'approved' | 'denied';
|
|
129
202
|
};
|
|
203
|
+
/** Live composite score at decision time (not the stale snapshot column). */
|
|
204
|
+
dynamicTrustScore: number;
|
|
205
|
+
attestations: Attestation[];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Attestation returned in `VerificationContext.attestations`.
|
|
209
|
+
*
|
|
210
|
+
* `proofType: 'reference'` (interim) means `proof` is a blockchain txn hash
|
|
211
|
+
* the merchant CAN verify against on-chain records but doesn't HAVE to.
|
|
212
|
+
* `proofType: 'zkp'` (future) means `proof` is a zero-knowledge proof.
|
|
213
|
+
* Wire shape is forward-compatible — clients reading 'reference' today won't
|
|
214
|
+
* break when it becomes 'zkp'.
|
|
215
|
+
*/
|
|
216
|
+
interface Attestation {
|
|
217
|
+
/** Attestation kind (e.g. `verified_human_party`). */
|
|
218
|
+
type: string;
|
|
219
|
+
status: 'passed' | 'failed';
|
|
220
|
+
validUntil?: string;
|
|
221
|
+
proofType: 'reference' | 'zkp';
|
|
222
|
+
proof: string;
|
|
130
223
|
}
|
|
131
224
|
/**
|
|
132
225
|
* Guidance information for unverified agents
|
|
@@ -318,14 +411,21 @@ interface SDKOptions extends GatewayConfig {
|
|
|
318
411
|
};
|
|
319
412
|
}
|
|
320
413
|
/**
|
|
321
|
-
* Token guidance returned from verify-access
|
|
414
|
+
* Token guidance returned from verify-access.
|
|
415
|
+
*
|
|
416
|
+
* `recommendedRateLimit` carries `requestsPerMinute` and `currency` only.
|
|
417
|
+
* `maxTransactionValue` was removed in v2.2.4 — it leaked the agent's
|
|
418
|
+
* spending headroom to the merchant, which is a price-discrimination signal
|
|
419
|
+
* (a merchant could see the agent's autonomous threshold and price the
|
|
420
|
+
* transaction just under it to capture surplus). The agent's SDK receives
|
|
421
|
+
* its own limits separately for client-side budgeting; the merchant's
|
|
422
|
+
* decision doesn't need amount info.
|
|
322
423
|
*/
|
|
323
424
|
interface TokenGuidance {
|
|
324
425
|
recommendedScopes: string[];
|
|
325
426
|
recommendedTtlSeconds: number;
|
|
326
427
|
recommendedRateLimit?: {
|
|
327
428
|
requestsPerMinute: number;
|
|
328
|
-
maxTransactionValue?: number;
|
|
329
429
|
currency?: string;
|
|
330
430
|
};
|
|
331
431
|
jurisdictionConstraints?: string[];
|
|
@@ -349,12 +449,19 @@ interface RuntimeChallengeResult {
|
|
|
349
449
|
reason?: string;
|
|
350
450
|
}
|
|
351
451
|
/**
|
|
352
|
-
* Enhanced verification result (extends existing VerificationResult)
|
|
452
|
+
* Enhanced verification result (extends existing VerificationResult).
|
|
453
|
+
*
|
|
454
|
+
* - `appliedPolicy`: surfaces the boundary name + policy version that drove
|
|
455
|
+
* the decision (no UUIDs).
|
|
456
|
+
* - `verificationContext`: structured "why" for the merchant — see
|
|
457
|
+
* `VerificationContext` for the full shape.
|
|
353
458
|
*/
|
|
354
459
|
interface EnhancedVerificationResult extends VerificationResult {
|
|
355
460
|
sessionId?: string;
|
|
356
461
|
runtimeChallenge?: RuntimeChallengeResult;
|
|
357
462
|
tokenGuidance?: TokenGuidance;
|
|
463
|
+
appliedPolicy?: AppliedPolicy;
|
|
464
|
+
verificationContext?: VerificationContext;
|
|
358
465
|
recommendation?: 'grant' | 'deny' | 'step_up_required';
|
|
359
466
|
recommendationReasons?: string[];
|
|
360
467
|
}
|
|
@@ -8,19 +8,32 @@
|
|
|
8
8
|
*/
|
|
9
9
|
type TrustLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM';
|
|
10
10
|
/**
|
|
11
|
-
* Access levels granted based on verification result
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
11
|
+
* Access levels granted based on verification result. Server is the single
|
|
12
|
+
* source of truth — these values are the resolved decision the server returns
|
|
13
|
+
* in `access.accessLevel`. SDK reads them verbatim (no client-side remap).
|
|
14
|
+
*
|
|
15
|
+
* For ANONYMOUS / unverified callers, the level is determined by the
|
|
16
|
+
* endpoint's `unverifiedAgentPolicy` per the verify-access canonical flow
|
|
17
|
+
* (see `docs/research/adapter-architecture-technical-requirements.md` §21):
|
|
18
|
+
* - Branch A (deny): `none` — caller is denied + advised to register
|
|
19
|
+
* - Branch B (allow_partial): `guidance` — reduced/browse-only access + advised
|
|
20
|
+
* - Branch C (allow_full): `standard` — unrestricted + advised to register for next time
|
|
21
|
+
* Every branch ALWAYS emits a verification event + queues a blockchain record.
|
|
22
|
+
*
|
|
23
|
+
* For VERIFIED callers (Branch D), the level is resolved server-side from the
|
|
24
|
+
* agent's live trust score plus the endpoint's `trust_score_requirement`:
|
|
25
|
+
* - none: agent below endpoint gate (denied; access.allowed=false)
|
|
26
|
+
* - guidance: 0–19 trust score
|
|
27
|
+
* - read-only: 20–39 trust score (browse, no mutations)
|
|
28
|
+
* - standard: 40–69 trust score (PDLSS-scoped operations)
|
|
29
|
+
* - full: 70+ trust score (PDLSS-scoped, high-trust)
|
|
30
|
+
* - internal: same-org membership, regardless of score
|
|
18
31
|
*/
|
|
19
32
|
type AccessLevel = 'none' | 'guidance' | 'read-only' | 'standard' | 'full' | 'internal';
|
|
20
33
|
/**
|
|
21
34
|
* Types of counterparties that can integrate the gateway
|
|
22
35
|
*/
|
|
23
|
-
type CounterpartyType = 'agent' | 'api' | 'mcp_server' | 'website' | 'other';
|
|
36
|
+
type CounterpartyType = 'agent' | 'api' | 'mcp_server' | 'website' | 'other' | 'unknown';
|
|
24
37
|
/**
|
|
25
38
|
* Agent credentials extracted from request
|
|
26
39
|
*/
|
|
@@ -44,9 +57,17 @@ interface GatewayConfig {
|
|
|
44
57
|
apiKey?: string;
|
|
45
58
|
/** Default access level for unverified requests */
|
|
46
59
|
defaultAccessLevel?: AccessLevel;
|
|
47
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Removed in v2.3.0 — server is the single source of truth for
|
|
62
|
+
* access-level decisions. Setting this no longer affects access decisions
|
|
63
|
+
* (the SDK reads `access.accessLevel` from the verify-access response).
|
|
64
|
+
* If you need a higher gate for an endpoint, configure it server-side via
|
|
65
|
+
* the endpoint's `trust_score_requirement`.
|
|
66
|
+
*/
|
|
48
67
|
minTrustScore?: number;
|
|
49
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Removed in v2.3.0 — see `minTrustScore` above.
|
|
70
|
+
*/
|
|
50
71
|
minTrustScoreForFull?: number;
|
|
51
72
|
/** Cache verification results (TTL in seconds) */
|
|
52
73
|
cacheTtl?: number;
|
|
@@ -58,6 +79,24 @@ interface GatewayConfig {
|
|
|
58
79
|
counterpartyUrl?: string;
|
|
59
80
|
/** This counterparty's type (sent with verify-access requests for analytics) */
|
|
60
81
|
counterpartyType?: CounterpartyType;
|
|
82
|
+
/**
|
|
83
|
+
* This counterparty's ASTRAE-id (issued at endpoint registration). When set,
|
|
84
|
+
* the SDK forwards it on verify-access calls so the server attributes traffic
|
|
85
|
+
* directly to this endpoint rather than resolving by URL. Useful when:
|
|
86
|
+
* - The merchant has multiple endpoints under the same origin (each running
|
|
87
|
+
* its own SDK instance with its own counterpartyId)
|
|
88
|
+
* - The endpoint URL might be served behind a proxy / different host than
|
|
89
|
+
* the registered origin
|
|
90
|
+
*/
|
|
91
|
+
counterpartyId?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Disable the one-time init self-test. The SDK normally fires a HEAD/OPTIONS
|
|
94
|
+
* to `${apiBaseUrl}/agents/verify-access` on first verify() call and warns
|
|
95
|
+
* if the response is HTML (indicating apiBaseUrl is pointing at a marketing
|
|
96
|
+
* site rather than the API). Set true for tests or environments where the
|
|
97
|
+
* extra request is undesirable.
|
|
98
|
+
*/
|
|
99
|
+
disableInitChecks?: boolean;
|
|
61
100
|
}
|
|
62
101
|
/**
|
|
63
102
|
* Verified agent information
|
|
@@ -101,32 +140,86 @@ interface VerifiedOrganization {
|
|
|
101
140
|
trustScore: number;
|
|
102
141
|
}
|
|
103
142
|
/**
|
|
104
|
-
* PDLSS policy information returned with verification
|
|
143
|
+
* PDLSS policy information returned with verification.
|
|
144
|
+
*
|
|
145
|
+
* @deprecated v2.2.4 — verify-access no longer returns the full PDLSS to the
|
|
146
|
+
* merchant. Read `EnhancedVerificationResult.verificationContext.pdlssCheck`
|
|
147
|
+
* instead for the merchant-facing summary, and `appliedPolicy` (top-level on
|
|
148
|
+
* the verification result) for the boundary name + policy version. The full
|
|
149
|
+
* PDLSS is owner-side only (queryable via `/api/agents/:id` when
|
|
150
|
+
* authenticated as the agent owner).
|
|
105
151
|
*/
|
|
106
152
|
interface PDLSSInfo {
|
|
107
|
-
/** Whether purpose was allowed */
|
|
108
153
|
purposeAllowed: boolean;
|
|
109
|
-
/** Whether within duration constraints */
|
|
110
154
|
withinDuration: boolean;
|
|
111
|
-
/** Whether within limits */
|
|
112
155
|
withinLimits: boolean;
|
|
113
|
-
/** Whether scope is allowed */
|
|
114
156
|
scopeAllowed: boolean;
|
|
115
|
-
/** Whether self-instantiation is allowed (if applicable) */
|
|
116
157
|
selfInstantiationAllowed: boolean;
|
|
117
|
-
/** Allowed purpose categories */
|
|
118
158
|
allowedPurposes?: string[];
|
|
119
|
-
/** Transaction limits */
|
|
120
159
|
limits?: Record<string, number>;
|
|
121
|
-
/** Allowed scope/resources */
|
|
122
160
|
scope?: string[];
|
|
123
|
-
/** Applied policy details */
|
|
124
|
-
appliedPolicy?:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
161
|
+
/** Applied policy details. Boundary/policy UUIDs deliberately not included. */
|
|
162
|
+
appliedPolicy?: AppliedPolicy;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Applied policy — merchant-facing identifiers only.
|
|
166
|
+
*
|
|
167
|
+
* Boundary and policy UUIDs are deliberately not surfaced; merchants and
|
|
168
|
+
* agent owners are different tenants and internal join keys are a
|
|
169
|
+
* cross-tenant correlation primitive. Internal callers that need UUIDs
|
|
170
|
+
* query the boundary/policy tables directly.
|
|
171
|
+
*/
|
|
172
|
+
interface AppliedPolicy {
|
|
173
|
+
boundaryName: string;
|
|
174
|
+
policyVersion: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Structured "why" of a verification decision the merchant receives.
|
|
178
|
+
*
|
|
179
|
+
* Tells the merchant whether the agent ID was verified, whether the runtime
|
|
180
|
+
* challenge succeeded, whether the request was within PDLSS, and the agent's
|
|
181
|
+
* actual dynamic trust score — without exposing thresholds, scope lists, or
|
|
182
|
+
* other-tenant counterparty membership.
|
|
183
|
+
*
|
|
184
|
+
* `attestations` is empty unless the calling endpoint's access policy
|
|
185
|
+
* declared `required_attestations`. Each attestation carries a blockchain
|
|
186
|
+
* proof reference (or, in the future, a full ZKP) so the merchant can verify
|
|
187
|
+
* the underlying claim without seeing the raw underlying data (e.g. the
|
|
188
|
+
* Persona/ConnectID transaction).
|
|
189
|
+
*/
|
|
190
|
+
interface VerificationContext {
|
|
191
|
+
idVerified: boolean;
|
|
192
|
+
runtimeChallenge: {
|
|
193
|
+
status: 'passed' | 'skipped' | 'failed' | 'timeout' | 'not_supported';
|
|
194
|
+
checkedAt: string | null;
|
|
195
|
+
};
|
|
196
|
+
pdlssCheck: {
|
|
197
|
+
/** Outcome only — no thresholds disclosed. */
|
|
198
|
+
result: 'within' | 'exceeded' | 'denied' | 'not_evaluated';
|
|
199
|
+
/** Category-level only. */
|
|
200
|
+
purpose: 'approved' | 'denied';
|
|
201
|
+
scope: 'approved' | 'denied';
|
|
129
202
|
};
|
|
203
|
+
/** Live composite score at decision time (not the stale snapshot column). */
|
|
204
|
+
dynamicTrustScore: number;
|
|
205
|
+
attestations: Attestation[];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Attestation returned in `VerificationContext.attestations`.
|
|
209
|
+
*
|
|
210
|
+
* `proofType: 'reference'` (interim) means `proof` is a blockchain txn hash
|
|
211
|
+
* the merchant CAN verify against on-chain records but doesn't HAVE to.
|
|
212
|
+
* `proofType: 'zkp'` (future) means `proof` is a zero-knowledge proof.
|
|
213
|
+
* Wire shape is forward-compatible — clients reading 'reference' today won't
|
|
214
|
+
* break when it becomes 'zkp'.
|
|
215
|
+
*/
|
|
216
|
+
interface Attestation {
|
|
217
|
+
/** Attestation kind (e.g. `verified_human_party`). */
|
|
218
|
+
type: string;
|
|
219
|
+
status: 'passed' | 'failed';
|
|
220
|
+
validUntil?: string;
|
|
221
|
+
proofType: 'reference' | 'zkp';
|
|
222
|
+
proof: string;
|
|
130
223
|
}
|
|
131
224
|
/**
|
|
132
225
|
* Guidance information for unverified agents
|
|
@@ -318,14 +411,21 @@ interface SDKOptions extends GatewayConfig {
|
|
|
318
411
|
};
|
|
319
412
|
}
|
|
320
413
|
/**
|
|
321
|
-
* Token guidance returned from verify-access
|
|
414
|
+
* Token guidance returned from verify-access.
|
|
415
|
+
*
|
|
416
|
+
* `recommendedRateLimit` carries `requestsPerMinute` and `currency` only.
|
|
417
|
+
* `maxTransactionValue` was removed in v2.2.4 — it leaked the agent's
|
|
418
|
+
* spending headroom to the merchant, which is a price-discrimination signal
|
|
419
|
+
* (a merchant could see the agent's autonomous threshold and price the
|
|
420
|
+
* transaction just under it to capture surplus). The agent's SDK receives
|
|
421
|
+
* its own limits separately for client-side budgeting; the merchant's
|
|
422
|
+
* decision doesn't need amount info.
|
|
322
423
|
*/
|
|
323
424
|
interface TokenGuidance {
|
|
324
425
|
recommendedScopes: string[];
|
|
325
426
|
recommendedTtlSeconds: number;
|
|
326
427
|
recommendedRateLimit?: {
|
|
327
428
|
requestsPerMinute: number;
|
|
328
|
-
maxTransactionValue?: number;
|
|
329
429
|
currency?: string;
|
|
330
430
|
};
|
|
331
431
|
jurisdictionConstraints?: string[];
|
|
@@ -349,12 +449,19 @@ interface RuntimeChallengeResult {
|
|
|
349
449
|
reason?: string;
|
|
350
450
|
}
|
|
351
451
|
/**
|
|
352
|
-
* Enhanced verification result (extends existing VerificationResult)
|
|
452
|
+
* Enhanced verification result (extends existing VerificationResult).
|
|
453
|
+
*
|
|
454
|
+
* - `appliedPolicy`: surfaces the boundary name + policy version that drove
|
|
455
|
+
* the decision (no UUIDs).
|
|
456
|
+
* - `verificationContext`: structured "why" for the merchant — see
|
|
457
|
+
* `VerificationContext` for the full shape.
|
|
353
458
|
*/
|
|
354
459
|
interface EnhancedVerificationResult extends VerificationResult {
|
|
355
460
|
sessionId?: string;
|
|
356
461
|
runtimeChallenge?: RuntimeChallengeResult;
|
|
357
462
|
tokenGuidance?: TokenGuidance;
|
|
463
|
+
appliedPolicy?: AppliedPolicy;
|
|
464
|
+
verificationContext?: VerificationContext;
|
|
358
465
|
recommendation?: 'grant' | 'deny' | 'step_up_required';
|
|
359
466
|
recommendationReasons?: string[];
|
|
360
467
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-
|
|
1
|
+
import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-JMgPake9.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-
|
|
1
|
+
import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-JMgPake9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-
|
|
1
|
+
import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-JMgPake9.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Commerce Shield Component
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-
|
|
1
|
+
import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-JMgPake9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Commerce Shield Component
|