@astrasyncai/verification-gateway 3.12.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +85 -8
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +85 -8
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.d.ts +1 -1
- package/dist/adapters/mcp.js +90 -8
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +90 -8
- package/dist/adapters/mcp.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 +86 -8
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +86 -8
- 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 +71 -8
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +71 -8
- 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/bin/astrasync-claude-hook.js +71 -8
- package/dist/bin/astrasync-codex-hook.js +71 -8
- package/dist/bin/astrasync-guard.js +71 -8
- package/dist/bin/astrasync.js +71 -8
- package/dist/browser/background.js +71 -8
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +71 -8
- 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/claude-code/claude-code-adapter.d.mts +2 -2
- package/dist/claude-code/claude-code-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/codex/index.d.mts +2 -2
- package/dist/codex/index.d.ts +2 -2
- package/dist/codex/index.js +71 -8
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +71 -8
- package/dist/codex/index.mjs.map +1 -1
- 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 +71 -8
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +71 -8
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/{express-B39o89gf.d.mts → express-BZajRs4i.d.mts} +1 -1
- package/dist/{express-BuxKNO_q.d.ts → express-CjCUB1k7.d.ts} +1 -1
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +71 -8
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +71 -8
- 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-DME3w3lf.d.mts → index-B0cyMZDL.d.mts} +1 -1
- package/dist/{index-CqydB4ks.d.mts → index-BRYteOqO.d.mts} +1 -1
- package/dist/{index-BG62SXso.d.ts → index-BZQdVqNw.d.ts} +1 -1
- package/dist/{index-CLHdqs2M.d.ts → index-adgKhujR.d.ts} +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +119 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -8
- 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-Ddlw_J1J.d.ts → nextjs-D_iFf5k-.d.ts} +1 -1
- package/dist/{nextjs-D74W7wt-.d.mts → nextjs-DeUTnOBd.d.mts} +1 -1
- package/dist/{sdk-CT7gdkfR.d.ts → sdk-BM3mwEAq.d.ts} +1 -1
- package/dist/{sdk-Bn6bj7kt.d.mts → sdk-_il1Q41f.d.mts} +1 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-BntuzEEn.d.mts → types-BcDf9Kk0.d.mts} +15 -0
- package/dist/{types-DHu7m9HI.d.ts → types-CHKCgDFC.d.ts} +1 -1
- package/dist/{types-Djw4GLtz.d.mts → types-DfnP7JiM.d.mts} +1 -1
- package/dist/{types-SDu4Llbe.d.ts → types-fTQD448H.d.ts} +15 -0
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +4 -2
- package/dist/verify.d.ts +4 -2
- package/dist/verify.js +76 -8
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +75 -8
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, b as LocalPurposeRule } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, b as LocalPurposeRule } from '../types-DfnP7JiM.mjs';
|
|
2
|
+
import '../types-BcDf9Kk0.mjs';
|
|
3
3
|
import '../metadata-capture.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, b as LocalPurposeRule } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, b as LocalPurposeRule } from '../types-CHKCgDFC.js';
|
|
2
|
+
import '../types-fTQD448H.js';
|
|
3
3
|
import '../metadata-capture.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -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-fTQD448H.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-BcDf9Kk0.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Next.js middleware for agent verification.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-
|
|
1
|
+
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-fTQD448H.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway - Access Level Definitions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-
|
|
1
|
+
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-BcDf9Kk0.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway - Access Level Definitions
|
|
@@ -1,4 +1,4 @@
|
|
|
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, i as AP2ChainResult, j as AP2IntentMandateClaims, k as AP2MandateClaims, l as AP2MandateTriple, m as AP2MandateTripleInput, n as AP2MandateType, o as AP2PaymentDetailsTotal, p as AP2PaymentMandateClaims, q as AP2PaymentMandateForValue, r as AP2VerifyInput, C as CommerceContext, s as CommercePipelineInput, t as CommerceProtocol, u as CommercePurpose, v as CommerceSignatureStack, w as ConstraintEvalResult, x as ConstraintKey, y as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, z as IdentityClaim, B as IdentityResolver, M as MPPChallengeForValue, D as MPPChallengeSummary, F as MPPCredentialSummary, G as MPPIntent, H as MPPKind, J as MPPReceiptSummary, K as MPPRequestContext, L as MPPRequestLike, N as MPPResponseLike, O as MPPVerifyInput, P as MPPVerifyResult, Q as ParsedRFC9421, R as PaymentMethodAllowlistInput, S as RFC9421SignatureParams, T as RFC9421Tag, U as RFC9421VerifyOptions, V as RFC9421VerifyRequest, W as RFC9421VerifyResult, X as RegistryName, Y as RegistryResolver, Z as ResolveContext, _ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, $ as SpendingLimitInput, a0 as StripeWebhookInformationalEvent, a1 as TransactionContext, a2 as TransactionValueContext, a3 as TransportExtractor, a4 as UCPCheckoutContext, a5 as UCPManifestValidationResult, a6 as UCPRequestLike, a7 as UCPTotal, a8 as VIAllowedParty, a9 as VIBudgetLimit, aa as VIClaimsForValue, ab as VIConstraintEvalInput, ac as VIConstraints, ad as VIExecutionMode, ae as VIExtractedClaims, af as VILayer, ag as VILineItem, ah as VIMandateType, ai as VIPaymentAmount, aj as VIRecurrence, ak as VIVerifyInput, al as VIVerifyResult, am as VerifyStripeWebhookOptions, an as VerifyStripeWebhookResult, ao as X402Kind, ap as X402RequestContext, aq as X402RequestForValue, ar as X402RequestLike, as as X402RequirementsSummary, at as X402ResponseLike, au as applyCredentials, av as bindIdentity, aw as claim, ax as clearTransportExtractors, ay as createMastercardRegistry, az as createVisaRegistry, aA as createWebBotAuthRegistry, aB as detectProtocol, aC as evaluatePaymentMethodAllowlist, aD as evaluateSpendingLimit, aE as evaluateVIConstraints, aF as extractA2ACredentials, aG as extractACPContext, aH as extractACPTransactionValue, aI as extractAP2Mandate, aJ as extractAP2Mandates, aK as extractAP2TransactionValue, aL as extractCredentialsFromProtocol, aM as extractHttpCredentials, aN as extractMPPContext, aO as extractMPPFromRequest, aP as extractMPPFromResponse, aQ as extractMPPTransactionValue, aR as extractMcpCredentials, aS as extractUCPContext, aT as extractUCPTransactionValue, aU as extractVIClaims, aV as extractVITransactionValue, aW as extractX402Context, aX as extractX402FromRequest, aY as extractX402FromResponse, aZ as extractX402TransactionValue, a_ as fetchUCPManifest, a$ as getTransportExtractor, b0 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-BcDf9Kk0.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, i as AP2ChainResult, j as AP2IntentMandateClaims, k as AP2MandateClaims, l as AP2MandateTriple, m as AP2MandateTripleInput, n as AP2MandateType, o as AP2PaymentDetailsTotal, p as AP2PaymentMandateClaims, q as AP2PaymentMandateForValue, r as AP2VerifyInput, C as CommerceContext, s as CommercePipelineInput, t as CommerceProtocol, u as CommercePurpose, v as CommerceSignatureStack, w as ConstraintEvalResult, x as ConstraintKey, y as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, z as IdentityClaim, B as IdentityResolver, M as MPPChallengeForValue, D as MPPChallengeSummary, F as MPPCredentialSummary, G as MPPIntent, H as MPPKind, J as MPPReceiptSummary, K as MPPRequestContext, L as MPPRequestLike, N as MPPResponseLike, O as MPPVerifyInput, P as MPPVerifyResult, Q as ParsedRFC9421, R as PaymentMethodAllowlistInput, S as RFC9421SignatureParams, T as RFC9421Tag, U as RFC9421VerifyOptions, V as RFC9421VerifyRequest, W as RFC9421VerifyResult, X as RegistryName, Y as RegistryResolver, Z as ResolveContext, _ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, $ as SpendingLimitInput, a0 as StripeWebhookInformationalEvent, a1 as TransactionContext, a2 as TransactionValueContext, a3 as TransportExtractor, a4 as UCPCheckoutContext, a5 as UCPManifestValidationResult, a6 as UCPRequestLike, a7 as UCPTotal, a8 as VIAllowedParty, a9 as VIBudgetLimit, aa as VIClaimsForValue, ab as VIConstraintEvalInput, ac as VIConstraints, ad as VIExecutionMode, ae as VIExtractedClaims, af as VILayer, ag as VILineItem, ah as VIMandateType, ai as VIPaymentAmount, aj as VIRecurrence, ak as VIVerifyInput, al as VIVerifyResult, am as VerifyStripeWebhookOptions, an as VerifyStripeWebhookResult, ao as X402Kind, ap as X402RequestContext, aq as X402RequestForValue, ar as X402RequestLike, as as X402RequirementsSummary, at as X402ResponseLike, au as applyCredentials, av as bindIdentity, aw as claim, ax as clearTransportExtractors, ay as createMastercardRegistry, az as createVisaRegistry, aA as createWebBotAuthRegistry, aB as detectProtocol, aC as evaluatePaymentMethodAllowlist, aD as evaluateSpendingLimit, aE as evaluateVIConstraints, aF as extractA2ACredentials, aG as extractACPContext, aH as extractACPTransactionValue, aI as extractAP2Mandate, aJ as extractAP2Mandates, aK as extractAP2TransactionValue, aL as extractCredentialsFromProtocol, aM as extractHttpCredentials, aN as extractMPPContext, aO as extractMPPFromRequest, aP as extractMPPFromResponse, aQ as extractMPPTransactionValue, aR as extractMcpCredentials, aS as extractUCPContext, aT as extractUCPTransactionValue, aU as extractVIClaims, aV as extractVITransactionValue, aW as extractX402Context, aX as extractX402FromRequest, aY as extractX402FromResponse, aZ as extractX402TransactionValue, a_ as fetchUCPManifest, a$ as getTransportExtractor, b0 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-B0cyMZDL.mjs';
|
|
3
3
|
import '../metadata-capture.mjs';
|
|
4
4
|
import 'jose';
|
|
@@ -1,4 +1,4 @@
|
|
|
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, i as AP2ChainResult, j as AP2IntentMandateClaims, k as AP2MandateClaims, l as AP2MandateTriple, m as AP2MandateTripleInput, n as AP2MandateType, o as AP2PaymentDetailsTotal, p as AP2PaymentMandateClaims, q as AP2PaymentMandateForValue, r as AP2VerifyInput, C as CommerceContext, s as CommercePipelineInput, t as CommerceProtocol, u as CommercePurpose, v as CommerceSignatureStack, w as ConstraintEvalResult, x as ConstraintKey, y as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, z as IdentityClaim, B as IdentityResolver, M as MPPChallengeForValue, D as MPPChallengeSummary, F as MPPCredentialSummary, G as MPPIntent, H as MPPKind, J as MPPReceiptSummary, K as MPPRequestContext, L as MPPRequestLike, N as MPPResponseLike, O as MPPVerifyInput, P as MPPVerifyResult, Q as ParsedRFC9421, R as PaymentMethodAllowlistInput, S as RFC9421SignatureParams, T as RFC9421Tag, U as RFC9421VerifyOptions, V as RFC9421VerifyRequest, W as RFC9421VerifyResult, X as RegistryName, Y as RegistryResolver, Z as ResolveContext, _ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, $ as SpendingLimitInput, a0 as StripeWebhookInformationalEvent, a1 as TransactionContext, a2 as TransactionValueContext, a3 as TransportExtractor, a4 as UCPCheckoutContext, a5 as UCPManifestValidationResult, a6 as UCPRequestLike, a7 as UCPTotal, a8 as VIAllowedParty, a9 as VIBudgetLimit, aa as VIClaimsForValue, ab as VIConstraintEvalInput, ac as VIConstraints, ad as VIExecutionMode, ae as VIExtractedClaims, af as VILayer, ag as VILineItem, ah as VIMandateType, ai as VIPaymentAmount, aj as VIRecurrence, ak as VIVerifyInput, al as VIVerifyResult, am as VerifyStripeWebhookOptions, an as VerifyStripeWebhookResult, ao as X402Kind, ap as X402RequestContext, aq as X402RequestForValue, ar as X402RequestLike, as as X402RequirementsSummary, at as X402ResponseLike, au as applyCredentials, av as bindIdentity, aw as claim, ax as clearTransportExtractors, ay as createMastercardRegistry, az as createVisaRegistry, aA as createWebBotAuthRegistry, aB as detectProtocol, aC as evaluatePaymentMethodAllowlist, aD as evaluateSpendingLimit, aE as evaluateVIConstraints, aF as extractA2ACredentials, aG as extractACPContext, aH as extractACPTransactionValue, aI as extractAP2Mandate, aJ as extractAP2Mandates, aK as extractAP2TransactionValue, aL as extractCredentialsFromProtocol, aM as extractHttpCredentials, aN as extractMPPContext, aO as extractMPPFromRequest, aP as extractMPPFromResponse, aQ as extractMPPTransactionValue, aR as extractMcpCredentials, aS as extractUCPContext, aT as extractUCPTransactionValue, aU as extractVIClaims, aV as extractVITransactionValue, aW as extractX402Context, aX as extractX402FromRequest, aY as extractX402FromResponse, aZ as extractX402TransactionValue, a_ as fetchUCPManifest, a$ as getTransportExtractor, b0 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-fTQD448H.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, i as AP2ChainResult, j as AP2IntentMandateClaims, k as AP2MandateClaims, l as AP2MandateTriple, m as AP2MandateTripleInput, n as AP2MandateType, o as AP2PaymentDetailsTotal, p as AP2PaymentMandateClaims, q as AP2PaymentMandateForValue, r as AP2VerifyInput, C as CommerceContext, s as CommercePipelineInput, t as CommerceProtocol, u as CommercePurpose, v as CommerceSignatureStack, w as ConstraintEvalResult, x as ConstraintKey, y as ConstraintResult, E as ExtractorRequestLike, I as IdentityBindingResult, z as IdentityClaim, B as IdentityResolver, M as MPPChallengeForValue, D as MPPChallengeSummary, F as MPPCredentialSummary, G as MPPIntent, H as MPPKind, J as MPPReceiptSummary, K as MPPRequestContext, L as MPPRequestLike, N as MPPResponseLike, O as MPPVerifyInput, P as MPPVerifyResult, Q as ParsedRFC9421, R as PaymentMethodAllowlistInput, S as RFC9421SignatureParams, T as RFC9421Tag, U as RFC9421VerifyOptions, V as RFC9421VerifyRequest, W as RFC9421VerifyResult, X as RegistryName, Y as RegistryResolver, Z as ResolveContext, _ as STRIPE_WEBHOOK_INFORMATIONAL_EVENTS, $ as SpendingLimitInput, a0 as StripeWebhookInformationalEvent, a1 as TransactionContext, a2 as TransactionValueContext, a3 as TransportExtractor, a4 as UCPCheckoutContext, a5 as UCPManifestValidationResult, a6 as UCPRequestLike, a7 as UCPTotal, a8 as VIAllowedParty, a9 as VIBudgetLimit, aa as VIClaimsForValue, ab as VIConstraintEvalInput, ac as VIConstraints, ad as VIExecutionMode, ae as VIExtractedClaims, af as VILayer, ag as VILineItem, ah as VIMandateType, ai as VIPaymentAmount, aj as VIRecurrence, ak as VIVerifyInput, al as VIVerifyResult, am as VerifyStripeWebhookOptions, an as VerifyStripeWebhookResult, ao as X402Kind, ap as X402RequestContext, aq as X402RequestForValue, ar as X402RequestLike, as as X402RequirementsSummary, at as X402ResponseLike, au as applyCredentials, av as bindIdentity, aw as claim, ax as clearTransportExtractors, ay as createMastercardRegistry, az as createVisaRegistry, aA as createWebBotAuthRegistry, aB as detectProtocol, aC as evaluatePaymentMethodAllowlist, aD as evaluateSpendingLimit, aE as evaluateVIConstraints, aF as extractA2ACredentials, aG as extractACPContext, aH as extractACPTransactionValue, aI as extractAP2Mandate, aJ as extractAP2Mandates, aK as extractAP2TransactionValue, aL as extractCredentialsFromProtocol, aM as extractHttpCredentials, aN as extractMPPContext, aO as extractMPPFromRequest, aP as extractMPPFromResponse, aQ as extractMPPTransactionValue, aR as extractMcpCredentials, aS as extractUCPContext, aT as extractUCPTransactionValue, aU as extractVIClaims, aV as extractVITransactionValue, aW as extractX402Context, aX as extractX402FromRequest, aY as extractX402FromResponse, aZ as extractX402TransactionValue, a_ as fetchUCPManifest, a$ as getTransportExtractor, b0 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-adgKhujR.js';
|
|
3
3
|
import '../metadata-capture.js';
|
|
4
4
|
import 'jose';
|
|
@@ -144,6 +144,13 @@ interface GatewayConfig {
|
|
|
144
144
|
* compatibility.
|
|
145
145
|
*/
|
|
146
146
|
strictInit?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* 4.0.0: hard timeout (ms) on the outbound verify-access call. Without it
|
|
149
|
+
* a hanging backend hangs the merchant's middleware — and every inbound
|
|
150
|
+
* agent request behind it — indefinitely. Timeouts surface as the
|
|
151
|
+
* fail-closed `verify_access.api_error` result. Default 10_000.
|
|
152
|
+
*/
|
|
153
|
+
verifyTimeoutMs?: number;
|
|
147
154
|
/**
|
|
148
155
|
* v2.3.8: emit `X-Astra-Gateway-Mode: unenforced` (with
|
|
149
156
|
* `X-Astra-Gateway-Reason: no-policy | no-match`) on responses where the
|
|
@@ -469,6 +476,14 @@ interface VerificationResult {
|
|
|
469
476
|
* never leaks a prior attempt's id.
|
|
470
477
|
*/
|
|
471
478
|
attemptId?: string;
|
|
479
|
+
/**
|
|
480
|
+
* 4.0.0: the backend rejected THIS INTEGRATION'S own API key (revoked /
|
|
481
|
+
* expired / rotated) — a deterministic merchant-side misconfig, distinct
|
|
482
|
+
* from both an agent denial and a transient `verify_access.api_error`.
|
|
483
|
+
* Adapters branch on it to answer inbound agents with 503 +
|
|
484
|
+
* `MERCHANT_VERIFICATION_MISCONFIGURED` instead of a misleading 401.
|
|
485
|
+
*/
|
|
486
|
+
misconfigured?: boolean;
|
|
472
487
|
/** Whether step-up authentication is required */
|
|
473
488
|
requiresStepUp?: boolean;
|
|
474
489
|
/** Whether approval is required */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-
|
|
1
|
+
import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-fTQD448H.js';
|
|
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, j as CounterpartyType, T as TokenGuidance } from './types-
|
|
1
|
+
import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-BcDf9Kk0.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
|
@@ -144,6 +144,13 @@ interface GatewayConfig {
|
|
|
144
144
|
* compatibility.
|
|
145
145
|
*/
|
|
146
146
|
strictInit?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* 4.0.0: hard timeout (ms) on the outbound verify-access call. Without it
|
|
149
|
+
* a hanging backend hangs the merchant's middleware — and every inbound
|
|
150
|
+
* agent request behind it — indefinitely. Timeouts surface as the
|
|
151
|
+
* fail-closed `verify_access.api_error` result. Default 10_000.
|
|
152
|
+
*/
|
|
153
|
+
verifyTimeoutMs?: number;
|
|
147
154
|
/**
|
|
148
155
|
* v2.3.8: emit `X-Astra-Gateway-Mode: unenforced` (with
|
|
149
156
|
* `X-Astra-Gateway-Reason: no-policy | no-match`) on responses where the
|
|
@@ -469,6 +476,14 @@ interface VerificationResult {
|
|
|
469
476
|
* never leaks a prior attempt's id.
|
|
470
477
|
*/
|
|
471
478
|
attemptId?: string;
|
|
479
|
+
/**
|
|
480
|
+
* 4.0.0: the backend rejected THIS INTEGRATION'S own API key (revoked /
|
|
481
|
+
* expired / rotated) — a deterministic merchant-side misconfig, distinct
|
|
482
|
+
* from both an agent denial and a transient `verify_access.api_error`.
|
|
483
|
+
* Adapters branch on it to answer inbound agents with 503 +
|
|
484
|
+
* `MERCHANT_VERIFICATION_MISCONFIGURED` instead of a misleading 401.
|
|
485
|
+
*/
|
|
486
|
+
misconfigured?: boolean;
|
|
472
487
|
/** Whether step-up authentication is required */
|
|
473
488
|
requiresStepUp?: boolean;
|
|
474
489
|
/** Whether approval is required */
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-
|
|
1
|
+
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-BcDf9Kk0.mjs';
|
|
2
2
|
import '../metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-
|
|
1
|
+
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-fTQD448H.js';
|
|
2
2
|
import '../metadata-capture.js';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/verify.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-
|
|
1
|
+
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-BcDf9Kk0.mjs';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -8,6 +8,8 @@ import { ObservedMetadata } from './metadata-capture.mjs';
|
|
|
8
8
|
* and processing the response into a standardized VerificationResult.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
/** Test-only: re-arm the one-time init self-check. */
|
|
12
|
+
declare function _resetInitCheck(): void;
|
|
11
13
|
/**
|
|
12
14
|
* Clear the verification cache
|
|
13
15
|
*/
|
|
@@ -159,4 +161,4 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
|
|
|
159
161
|
reason?: string;
|
|
160
162
|
}>;
|
|
161
163
|
|
|
162
|
-
export { type RouteAccessConfigShape, type VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportAttempt, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
|
164
|
+
export { type RouteAccessConfigShape, type VerifyOptions, _resetInitCheck, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportAttempt, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
package/dist/verify.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-
|
|
1
|
+
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-fTQD448H.js';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -8,6 +8,8 @@ import { ObservedMetadata } from './metadata-capture.js';
|
|
|
8
8
|
* and processing the response into a standardized VerificationResult.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
/** Test-only: re-arm the one-time init self-check. */
|
|
12
|
+
declare function _resetInitCheck(): void;
|
|
11
13
|
/**
|
|
12
14
|
* Clear the verification cache
|
|
13
15
|
*/
|
|
@@ -159,4 +161,4 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
|
|
|
159
161
|
reason?: string;
|
|
160
162
|
}>;
|
|
161
163
|
|
|
162
|
-
export { type RouteAccessConfigShape, type VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportAttempt, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
|
164
|
+
export { type RouteAccessConfigShape, type VerifyOptions, _resetInitCheck, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportAttempt, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
package/dist/verify.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/verify.ts
|
|
21
21
|
var verify_exports = {};
|
|
22
22
|
__export(verify_exports, {
|
|
23
|
+
_resetInitCheck: () => _resetInitCheck,
|
|
23
24
|
clearCache: () => clearCache,
|
|
24
25
|
extractCredentials: () => extractCredentials,
|
|
25
26
|
fetchRoutes: () => fetchRoutes,
|
|
@@ -43,7 +44,7 @@ function getTrustLevel(score) {
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
// src/version.ts
|
|
46
|
-
var SDK_VERSION = "
|
|
47
|
+
var SDK_VERSION = "4.0.0";
|
|
47
48
|
|
|
48
49
|
// src/well-known.ts
|
|
49
50
|
var CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -68,8 +69,11 @@ var DEFAULT_CONFIG = {
|
|
|
68
69
|
debug: false
|
|
69
70
|
};
|
|
70
71
|
var initCheckPerformed = false;
|
|
72
|
+
function _resetInitCheck() {
|
|
73
|
+
initCheckPerformed = false;
|
|
74
|
+
}
|
|
71
75
|
var deprecationWarningShown = false;
|
|
72
|
-
async function performInitCheck(apiBaseUrl, debug, strictInit) {
|
|
76
|
+
async function performInitCheck(apiBaseUrl, debug, strictInit, apiKey) {
|
|
73
77
|
initCheckPerformed = true;
|
|
74
78
|
try {
|
|
75
79
|
const probeUrl = `${apiBaseUrl}/agents/verify-access`;
|
|
@@ -86,6 +90,28 @@ async function performInitCheck(apiBaseUrl, debug, strictInit) {
|
|
|
86
90
|
`[VerificationGateway] init check passed for ${apiBaseUrl} (content-type: ${contentType})`
|
|
87
91
|
);
|
|
88
92
|
}
|
|
93
|
+
if (apiKey) {
|
|
94
|
+
const selfCheck = await fetch(`${apiBaseUrl}/agents/verify-access/self-check`, {
|
|
95
|
+
headers: { Authorization: `Bearer ${apiKey}` }
|
|
96
|
+
});
|
|
97
|
+
if (selfCheck.status === 401) {
|
|
98
|
+
const body = await selfCheck.json().catch(() => ({}));
|
|
99
|
+
const message = `[VerificationGateway] the configured AstraSync API key was REJECTED at startup (${body.code ?? "api_key_invalid"}: ${body.message ?? "invalid key"}). Every inbound agent will be turned away until the key is rotated` + (body.remediation?.manageUrl ? ` at ${body.remediation.manageUrl}` : "") + `.`;
|
|
100
|
+
if (strictInit) {
|
|
101
|
+
throw new Error(`${message} (strictInit=true)`);
|
|
102
|
+
}
|
|
103
|
+
console.error(message);
|
|
104
|
+
} else if (selfCheck.ok) {
|
|
105
|
+
const body = await selfCheck.json().catch(() => ({}));
|
|
106
|
+
if (typeof body.daysToExpiry === "number" && body.daysToExpiry <= 7) {
|
|
107
|
+
console.warn(
|
|
108
|
+
`[VerificationGateway] the configured AstraSync API key expires in ${body.daysToExpiry} day(s) \u2014 rotate it at Settings \u2192 Developer Tools before integrations start failing.`
|
|
109
|
+
);
|
|
110
|
+
} else if (debug) {
|
|
111
|
+
console.log("[VerificationGateway] API key self-check passed");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
89
115
|
} catch (err) {
|
|
90
116
|
if (strictInit) {
|
|
91
117
|
throw err;
|
|
@@ -203,8 +229,17 @@ function hasCredentials(credentials) {
|
|
|
203
229
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
204
230
|
const source = options.source ?? "no_credentials";
|
|
205
231
|
const isApiError = source === "api_error";
|
|
232
|
+
const isMisconfig = source === "merchant_misconfig";
|
|
206
233
|
const urls = options.urls;
|
|
207
|
-
const guidance =
|
|
234
|
+
const guidance = isMisconfig ? {
|
|
235
|
+
message: "This site's AstraSync integration is misconfigured (its API key was revoked, expired, or rotated). Your identity and the AstraSync platform are fine \u2014 contact the site operator. Retrying will not help.",
|
|
236
|
+
registrationUrl: urls?.registrationUrl ?? "",
|
|
237
|
+
documentationUrl: options.remediation?.docsUrl ?? urls?.documentationUrl ?? "",
|
|
238
|
+
steps: [
|
|
239
|
+
"Report the failure to the site operator \u2014 their AstraSync API key needs rotating",
|
|
240
|
+
"Do not retry: the failure is deterministic until the operator updates their key"
|
|
241
|
+
]
|
|
242
|
+
} : isApiError ? {
|
|
208
243
|
message: "Verification is temporarily unavailable. Retry with exponential backoff; if the issue persists, contact support with the correlationId.",
|
|
209
244
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
210
245
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
@@ -242,13 +277,22 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
242
277
|
// partners (and their custom onDenied handlers) can branch on
|
|
243
278
|
// dimension. Without this, the synthesised stub was indistinguishable
|
|
244
279
|
// from a real policy deny.
|
|
245
|
-
failures:
|
|
280
|
+
failures: isMisconfig ? [
|
|
281
|
+
{
|
|
282
|
+
dimension: "verify_access.merchant_misconfigured",
|
|
283
|
+
message: reason ?? "The integration API key was rejected by AstraSync",
|
|
284
|
+
guidance: guidance.message
|
|
285
|
+
}
|
|
286
|
+
] : isApiError ? [
|
|
246
287
|
{
|
|
247
288
|
dimension: "verify_access.api_error",
|
|
248
289
|
message: reason ?? "Verification temporarily unavailable",
|
|
249
290
|
guidance: guidance.message
|
|
250
291
|
}
|
|
251
292
|
] : void 0,
|
|
293
|
+
// 4.0.0: typed marker so adapters render the misconfig envelope (503 +
|
|
294
|
+
// MERCHANT_VERIFICATION_MISCONFIGURED) without string-matching.
|
|
295
|
+
...isMisconfig && { misconfigured: true },
|
|
252
296
|
correlationId: options.correlationId,
|
|
253
297
|
attemptId: options.attemptId,
|
|
254
298
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
@@ -303,7 +347,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
303
347
|
const response = await fetch(`${config.apiBaseUrl}/agents/verify-access`, {
|
|
304
348
|
method: "POST",
|
|
305
349
|
headers,
|
|
306
|
-
body: JSON.stringify(body)
|
|
350
|
+
body: JSON.stringify(body),
|
|
351
|
+
signal: AbortSignal.timeout(config.verifyTimeoutMs ?? 1e4)
|
|
307
352
|
});
|
|
308
353
|
const data = await response.json();
|
|
309
354
|
if (response.status === 410) {
|
|
@@ -327,6 +372,17 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
327
372
|
};
|
|
328
373
|
}
|
|
329
374
|
if (!response.ok) {
|
|
375
|
+
if (response.status === 401) {
|
|
376
|
+
return {
|
|
377
|
+
success: false,
|
|
378
|
+
error: data.message || data.error || "Integration API key rejected",
|
|
379
|
+
misconfig: true,
|
|
380
|
+
misconfigCode: typeof data?.code === "string" ? data.code : void 0,
|
|
381
|
+
remediation: data?.remediation && typeof data.remediation === "object" ? data.remediation : void 0,
|
|
382
|
+
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
|
|
383
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
|
|
384
|
+
};
|
|
385
|
+
}
|
|
330
386
|
return {
|
|
331
387
|
success: false,
|
|
332
388
|
error: data.message || data.error || `API returned ${response.status}`,
|
|
@@ -348,9 +404,19 @@ async function verify(config, request, options) {
|
|
|
348
404
|
const urls = mergedConfig.apiBaseUrl ? getCachedWellKnownUrls(mergedConfig.apiBaseUrl) : void 0;
|
|
349
405
|
if (!initCheckPerformed && !mergedConfig.disableInitChecks && mergedConfig.apiBaseUrl) {
|
|
350
406
|
if (mergedConfig.strictInit) {
|
|
351
|
-
await performInitCheck(
|
|
407
|
+
await performInitCheck(
|
|
408
|
+
mergedConfig.apiBaseUrl,
|
|
409
|
+
mergedConfig.debug,
|
|
410
|
+
true,
|
|
411
|
+
mergedConfig.apiKey
|
|
412
|
+
);
|
|
352
413
|
} else {
|
|
353
|
-
void performInitCheck(
|
|
414
|
+
void performInitCheck(
|
|
415
|
+
mergedConfig.apiBaseUrl,
|
|
416
|
+
mergedConfig.debug,
|
|
417
|
+
false,
|
|
418
|
+
mergedConfig.apiKey
|
|
419
|
+
);
|
|
354
420
|
}
|
|
355
421
|
}
|
|
356
422
|
if (!deprecationWarningShown && (config.minTrustScore !== void 0 || config.minTrustScoreForFull !== void 0)) {
|
|
@@ -389,9 +455,10 @@ async function verify(config, request, options) {
|
|
|
389
455
|
const serverDenialReasons = Array.isArray(rawServerDenialReasons) && rawServerDenialReasons.length > 0 ? rawServerDenialReasons : void 0;
|
|
390
456
|
if (!apiResponse.success) {
|
|
391
457
|
return createGuidanceResponse(mergedConfig, apiResponse.error, {
|
|
392
|
-
source: "api_error",
|
|
458
|
+
source: apiResponse.misconfig ? "merchant_misconfig" : "api_error",
|
|
393
459
|
correlationId: apiResponse.correlationId,
|
|
394
460
|
attemptId: apiResponse.attemptId,
|
|
461
|
+
remediation: apiResponse.remediation,
|
|
395
462
|
urls
|
|
396
463
|
});
|
|
397
464
|
}
|
|
@@ -617,6 +684,7 @@ async function quickVerify(config, credentials) {
|
|
|
617
684
|
}
|
|
618
685
|
// Annotate the CommonJS export names for ESM import in node:
|
|
619
686
|
0 && (module.exports = {
|
|
687
|
+
_resetInitCheck,
|
|
620
688
|
clearCache,
|
|
621
689
|
extractCredentials,
|
|
622
690
|
fetchRoutes,
|