@astrasyncai/verification-gateway 3.11.1 → 3.12.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 +22 -3
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +22 -3
- 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 +22 -3
- package/dist/bin/astrasync-codex-hook.js +22 -3
- package/dist/bin/astrasync-guard.js +22 -3
- package/dist/bin/astrasync.js +23 -3
- package/dist/browser/background.js +22 -3
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +22 -3
- 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 +22 -3
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +22 -3
- 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 +22 -3
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +22 -3
- 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-DCXa1oqj.d.mts → express-B39o89gf.d.mts} +1 -1
- package/dist/{express-ClNtDhhc.d.ts → express-BuxKNO_q.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 +22 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +22 -3
- 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-CfHurO1P.d.ts → index-BG62SXso.d.ts} +1 -1
- package/dist/{index-D2ztkumS.d.ts → index-CLHdqs2M.d.ts} +1 -1
- package/dist/{index-Dr_XiN65.d.mts → index-CqydB4ks.d.mts} +1 -1
- package/dist/{index-BrNKDmiR.d.mts → index-DME3w3lf.d.mts} +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +42 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -3
- 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-DcQIk6Zj.d.mts → nextjs-D74W7wt-.d.mts} +1 -1
- package/dist/{nextjs-CEBVBsdi.d.ts → nextjs-Ddlw_J1J.d.ts} +1 -1
- package/dist/{sdk-CZkbSOeO.d.mts → sdk-Bn6bj7kt.d.mts} +1 -1
- package/dist/{sdk-H0JCLW2y.d.ts → sdk-CT7gdkfR.d.ts} +1 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-sy3tq8lp.d.mts → types-BntuzEEn.d.mts} +103 -1
- package/dist/{types-DhFPiZ3t.d.ts → types-DHu7m9HI.d.ts} +1 -1
- package/dist/{types-cQVCMeNV.d.mts → types-Djw4GLtz.d.mts} +1 -1
- package/dist/{types-9tns4wyl.d.ts → types-SDu4Llbe.d.ts} +103 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +13 -2
- package/dist/verify.d.ts +13 -2
- package/dist/verify.js +42 -3
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +41 -3
- 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-Djw4GLtz.mjs';
|
|
2
|
+
import '../types-BntuzEEn.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-DHu7m9HI.js';
|
|
2
|
+
import '../types-SDu4Llbe.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-BntuzEEn.mjs';
|
|
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-SDu4Llbe.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Create Next.js middleware for agent verification.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel,
|
|
1
|
+
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-BntuzEEn.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway - Access Level Definitions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel,
|
|
1
|
+
import { a as AccessLevel, v as TrustLevel, S as SDKOptions, w as VerificationResult } from './types-SDu4Llbe.js';
|
|
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-BntuzEEn.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-DME3w3lf.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-SDu4Llbe.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-CLHdqs2M.js';
|
|
3
3
|
import '../metadata-capture.js';
|
|
4
4
|
import 'jose';
|
|
@@ -459,6 +459,16 @@ interface VerificationResult {
|
|
|
459
459
|
* `verify_access.internal_error` 200-shaped failure shape.
|
|
460
460
|
*/
|
|
461
461
|
correlationId?: string;
|
|
462
|
+
/**
|
|
463
|
+
* 3.12.0 (Trust Record, §33.5 #3): attempt-chain handle, server-echoed on
|
|
464
|
+
* every response branch (caller-supplied or server-minted). Disjoint from
|
|
465
|
+
* `correlationId`/`sessionId` — those identify one verification EVENT; an
|
|
466
|
+
* attempt CONTAINS events (the whole catalog → intent → settlement funnel
|
|
467
|
+
* for one shopping attempt). On a cache hit the SDK overwrites this with
|
|
468
|
+
* the current request's own attemptId (or drops it) so a cached verdict
|
|
469
|
+
* never leaks a prior attempt's id.
|
|
470
|
+
*/
|
|
471
|
+
attemptId?: string;
|
|
462
472
|
/** Whether step-up authentication is required */
|
|
463
473
|
requiresStepUp?: boolean;
|
|
464
474
|
/** Whether approval is required */
|
|
@@ -582,6 +592,98 @@ interface VerificationRequest {
|
|
|
582
592
|
* backend's `commerceArtifacts` schema 1:1.
|
|
583
593
|
*/
|
|
584
594
|
commerceArtifacts?: CommerceArtifactsPayload;
|
|
595
|
+
/**
|
|
596
|
+
* 3.12.0 (Trust Record, §33.5 #3) — attempt-chain handle correlating the
|
|
597
|
+
* multi-call commerce funnel (catalog → intent → settlement) into ONE
|
|
598
|
+
* attempt. Format `att_` + 32 lowercase hex. Optional: the server mints one
|
|
599
|
+
* when absent and echoes it top-level on every response branch either way.
|
|
600
|
+
* Observational pass-through — never affects the verdict, so it's excluded
|
|
601
|
+
* from the verify cache key (see `getCacheKey`).
|
|
602
|
+
*/
|
|
603
|
+
attemptId?: string;
|
|
604
|
+
/**
|
|
605
|
+
* 3.12.0 (Trust Record, §33.5 #3) — first-party observational data: the
|
|
606
|
+
* offers the agent evaluated at this checkpoint (catalog browse / intent
|
|
607
|
+
* selection). Forwarded verbatim to verify-access; never affects the
|
|
608
|
+
* verdict (also excluded from the cache key).
|
|
609
|
+
*/
|
|
610
|
+
considerationSet?: ConsiderationSet;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* One offer the agent evaluated (Trust Record, §33.5 #3). Mirrors the
|
|
614
|
+
* backend's `considerationItemSchema` 1:1 — first-party observational data
|
|
615
|
+
* reported by the transport (bridge / adapters), never verified locally.
|
|
616
|
+
*/
|
|
617
|
+
interface ConsiderationItem {
|
|
618
|
+
/** SKU identifier as the merchant catalog publishes it (1–128 chars). */
|
|
619
|
+
sku: string;
|
|
620
|
+
/** Display title (≤256 chars). */
|
|
621
|
+
name?: string;
|
|
622
|
+
/** Price in MAJOR units (same convention as `transactionValue`), non-negative. */
|
|
623
|
+
price?: number;
|
|
624
|
+
/** ISO-4217 or settlement-asset code (3–6 alphanumeric chars). */
|
|
625
|
+
currency?: string;
|
|
626
|
+
/** Stock state as the catalog declared it; omit when the catalog didn't say. */
|
|
627
|
+
availability?: 'in_stock' | 'out_of_stock' | 'preorder' | 'unknown';
|
|
628
|
+
/** True when the agent selected this offer (intent/settlement checkpoints). */
|
|
629
|
+
chosen?: boolean;
|
|
630
|
+
/** Why an evaluated-but-unchosen offer lost, when the agent can say. */
|
|
631
|
+
notChosenReason?: 'price' | 'policy' | 'trust_threshold' | 'stock' | 'other';
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* The set of offers evaluated at one funnel checkpoint (Trust Record,
|
|
635
|
+
* §33.5 #3). Mirrors the backend's `considerationSetSchema` 1:1.
|
|
636
|
+
*
|
|
637
|
+
* `items` is capped at 50 server-side — reporters MUST order chosen items
|
|
638
|
+
* FIRST so purchased counts survive truncation; `totalEvaluated` carries the
|
|
639
|
+
* true pre-cap count and `truncated` flags that the cap was applied.
|
|
640
|
+
*/
|
|
641
|
+
interface ConsiderationSet {
|
|
642
|
+
/** Funnel checkpoint this set was observed at. */
|
|
643
|
+
checkpoint?: 'catalog' | 'intent' | 'settlement';
|
|
644
|
+
/** Offers evaluated (max 50; chosen-first ordering under the cap). */
|
|
645
|
+
items: ConsiderationItem[];
|
|
646
|
+
/** True evaluated count — survives the 50-item cap. */
|
|
647
|
+
totalEvaluated?: number;
|
|
648
|
+
/** True when `items` was truncated to the cap. */
|
|
649
|
+
truncated?: boolean;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Terminal (or notable) outcome of an attempt chain, reported post-hoc via
|
|
653
|
+
* `reportAttempt` (Trust Record, §33.5 #3). Mirrors the backend's
|
|
654
|
+
* `attemptReportSchema.outcome` 1:1.
|
|
655
|
+
*/
|
|
656
|
+
interface AttemptOutcome {
|
|
657
|
+
kind: 'settled' | 'blocked_step_up' | 'failed' | 'high_value_action';
|
|
658
|
+
/** Dotted ACTION-axis token for the failure class, e.g. `commerce.catalog.sku_not_found` (≤128 chars). */
|
|
659
|
+
dimension?: string;
|
|
660
|
+
/** Human-readable detail (≤512 chars). */
|
|
661
|
+
reason?: string;
|
|
662
|
+
/** For `high_value_action`: the non-payment conversion type. */
|
|
663
|
+
actionType?: 'lead' | 'signup' | 'application' | 'enquiry';
|
|
664
|
+
/** Value in MAJOR units (settled amount / estimated action value), non-negative. */
|
|
665
|
+
value?: number;
|
|
666
|
+
/** ISO-4217 or settlement-asset code (3–6 alphanumeric chars). */
|
|
667
|
+
currency?: string;
|
|
668
|
+
/** Settlement rail / mandate type, e.g. `ap2.payment_mandate` (≤64 chars). */
|
|
669
|
+
rail?: string;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Body for `POST /agents/verify-access/attempt-report` (Trust Record,
|
|
673
|
+
* §33.5 #3): post-hoc consideration/outcome data for an attempt chain that a
|
|
674
|
+
* verify-access call couldn't carry (e.g. the catalog was served from a local
|
|
675
|
+
* cache, or the deny happened transport-side). Must carry `considerationSet`
|
|
676
|
+
* and/or `outcome`.
|
|
677
|
+
*/
|
|
678
|
+
interface AttemptReport {
|
|
679
|
+
/** Attempt-chain handle — `att_` + 32 lowercase hex. */
|
|
680
|
+
attemptId: string;
|
|
681
|
+
/** Merchant/endpoint the attempt targeted; falls back to `config.counterpartyId`. */
|
|
682
|
+
counterpartyId?: string;
|
|
683
|
+
/** Canonical ASTRA-* id of the acting agent, when known. */
|
|
684
|
+
agentId?: string;
|
|
685
|
+
considerationSet?: ConsiderationSet;
|
|
686
|
+
outcome?: AttemptOutcome;
|
|
585
687
|
}
|
|
586
688
|
/**
|
|
587
689
|
* Raw commerce-protocol artifacts as verify-access accepts them (backend
|
|
@@ -929,4 +1031,4 @@ interface CommerceShieldProps {
|
|
|
929
1031
|
className?: string;
|
|
930
1032
|
}
|
|
931
1033
|
|
|
932
|
-
export type { AccessFailure as A,
|
|
1034
|
+
export type { AccessFailure as A, CallerMetadata as C, EnhancedVerificationResult as E, FiatSettlementBinding as F, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationRequest as V, AccessLevel as a, AgentCredentials as b, AstraSyncCredentials as c, AttemptOutcome as d, AttemptReport as e, CommerceArtifactsPayload as f, CommerceShieldProps as g, ConsiderationItem as h, ConsiderationSet as i, CounterpartyType as j, ExpressMiddlewareOptions as k, GuidanceInfo as l, ProtocolTransport as m, RuntimeChallengeResult as n, SettlementArtifact as o, SettlementArtifactBinding as p, SettlementArtifactBindingBase as q, StablecoinSettlementBinding as r, StepUpApprovalInfo as s, StepUpApprovalStatus as t, StepUpOutcome as u, TrustLevel as v, VerificationResult as w, VerifiedAgent as x, VerifiedDeveloper as y, VerifiedOrganization as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AccessLevel,
|
|
1
|
+
import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-SDu4Llbe.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,
|
|
1
|
+
import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-BntuzEEn.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
|
@@ -459,6 +459,16 @@ interface VerificationResult {
|
|
|
459
459
|
* `verify_access.internal_error` 200-shaped failure shape.
|
|
460
460
|
*/
|
|
461
461
|
correlationId?: string;
|
|
462
|
+
/**
|
|
463
|
+
* 3.12.0 (Trust Record, §33.5 #3): attempt-chain handle, server-echoed on
|
|
464
|
+
* every response branch (caller-supplied or server-minted). Disjoint from
|
|
465
|
+
* `correlationId`/`sessionId` — those identify one verification EVENT; an
|
|
466
|
+
* attempt CONTAINS events (the whole catalog → intent → settlement funnel
|
|
467
|
+
* for one shopping attempt). On a cache hit the SDK overwrites this with
|
|
468
|
+
* the current request's own attemptId (or drops it) so a cached verdict
|
|
469
|
+
* never leaks a prior attempt's id.
|
|
470
|
+
*/
|
|
471
|
+
attemptId?: string;
|
|
462
472
|
/** Whether step-up authentication is required */
|
|
463
473
|
requiresStepUp?: boolean;
|
|
464
474
|
/** Whether approval is required */
|
|
@@ -582,6 +592,98 @@ interface VerificationRequest {
|
|
|
582
592
|
* backend's `commerceArtifacts` schema 1:1.
|
|
583
593
|
*/
|
|
584
594
|
commerceArtifacts?: CommerceArtifactsPayload;
|
|
595
|
+
/**
|
|
596
|
+
* 3.12.0 (Trust Record, §33.5 #3) — attempt-chain handle correlating the
|
|
597
|
+
* multi-call commerce funnel (catalog → intent → settlement) into ONE
|
|
598
|
+
* attempt. Format `att_` + 32 lowercase hex. Optional: the server mints one
|
|
599
|
+
* when absent and echoes it top-level on every response branch either way.
|
|
600
|
+
* Observational pass-through — never affects the verdict, so it's excluded
|
|
601
|
+
* from the verify cache key (see `getCacheKey`).
|
|
602
|
+
*/
|
|
603
|
+
attemptId?: string;
|
|
604
|
+
/**
|
|
605
|
+
* 3.12.0 (Trust Record, §33.5 #3) — first-party observational data: the
|
|
606
|
+
* offers the agent evaluated at this checkpoint (catalog browse / intent
|
|
607
|
+
* selection). Forwarded verbatim to verify-access; never affects the
|
|
608
|
+
* verdict (also excluded from the cache key).
|
|
609
|
+
*/
|
|
610
|
+
considerationSet?: ConsiderationSet;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* One offer the agent evaluated (Trust Record, §33.5 #3). Mirrors the
|
|
614
|
+
* backend's `considerationItemSchema` 1:1 — first-party observational data
|
|
615
|
+
* reported by the transport (bridge / adapters), never verified locally.
|
|
616
|
+
*/
|
|
617
|
+
interface ConsiderationItem {
|
|
618
|
+
/** SKU identifier as the merchant catalog publishes it (1–128 chars). */
|
|
619
|
+
sku: string;
|
|
620
|
+
/** Display title (≤256 chars). */
|
|
621
|
+
name?: string;
|
|
622
|
+
/** Price in MAJOR units (same convention as `transactionValue`), non-negative. */
|
|
623
|
+
price?: number;
|
|
624
|
+
/** ISO-4217 or settlement-asset code (3–6 alphanumeric chars). */
|
|
625
|
+
currency?: string;
|
|
626
|
+
/** Stock state as the catalog declared it; omit when the catalog didn't say. */
|
|
627
|
+
availability?: 'in_stock' | 'out_of_stock' | 'preorder' | 'unknown';
|
|
628
|
+
/** True when the agent selected this offer (intent/settlement checkpoints). */
|
|
629
|
+
chosen?: boolean;
|
|
630
|
+
/** Why an evaluated-but-unchosen offer lost, when the agent can say. */
|
|
631
|
+
notChosenReason?: 'price' | 'policy' | 'trust_threshold' | 'stock' | 'other';
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* The set of offers evaluated at one funnel checkpoint (Trust Record,
|
|
635
|
+
* §33.5 #3). Mirrors the backend's `considerationSetSchema` 1:1.
|
|
636
|
+
*
|
|
637
|
+
* `items` is capped at 50 server-side — reporters MUST order chosen items
|
|
638
|
+
* FIRST so purchased counts survive truncation; `totalEvaluated` carries the
|
|
639
|
+
* true pre-cap count and `truncated` flags that the cap was applied.
|
|
640
|
+
*/
|
|
641
|
+
interface ConsiderationSet {
|
|
642
|
+
/** Funnel checkpoint this set was observed at. */
|
|
643
|
+
checkpoint?: 'catalog' | 'intent' | 'settlement';
|
|
644
|
+
/** Offers evaluated (max 50; chosen-first ordering under the cap). */
|
|
645
|
+
items: ConsiderationItem[];
|
|
646
|
+
/** True evaluated count — survives the 50-item cap. */
|
|
647
|
+
totalEvaluated?: number;
|
|
648
|
+
/** True when `items` was truncated to the cap. */
|
|
649
|
+
truncated?: boolean;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Terminal (or notable) outcome of an attempt chain, reported post-hoc via
|
|
653
|
+
* `reportAttempt` (Trust Record, §33.5 #3). Mirrors the backend's
|
|
654
|
+
* `attemptReportSchema.outcome` 1:1.
|
|
655
|
+
*/
|
|
656
|
+
interface AttemptOutcome {
|
|
657
|
+
kind: 'settled' | 'blocked_step_up' | 'failed' | 'high_value_action';
|
|
658
|
+
/** Dotted ACTION-axis token for the failure class, e.g. `commerce.catalog.sku_not_found` (≤128 chars). */
|
|
659
|
+
dimension?: string;
|
|
660
|
+
/** Human-readable detail (≤512 chars). */
|
|
661
|
+
reason?: string;
|
|
662
|
+
/** For `high_value_action`: the non-payment conversion type. */
|
|
663
|
+
actionType?: 'lead' | 'signup' | 'application' | 'enquiry';
|
|
664
|
+
/** Value in MAJOR units (settled amount / estimated action value), non-negative. */
|
|
665
|
+
value?: number;
|
|
666
|
+
/** ISO-4217 or settlement-asset code (3–6 alphanumeric chars). */
|
|
667
|
+
currency?: string;
|
|
668
|
+
/** Settlement rail / mandate type, e.g. `ap2.payment_mandate` (≤64 chars). */
|
|
669
|
+
rail?: string;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Body for `POST /agents/verify-access/attempt-report` (Trust Record,
|
|
673
|
+
* §33.5 #3): post-hoc consideration/outcome data for an attempt chain that a
|
|
674
|
+
* verify-access call couldn't carry (e.g. the catalog was served from a local
|
|
675
|
+
* cache, or the deny happened transport-side). Must carry `considerationSet`
|
|
676
|
+
* and/or `outcome`.
|
|
677
|
+
*/
|
|
678
|
+
interface AttemptReport {
|
|
679
|
+
/** Attempt-chain handle — `att_` + 32 lowercase hex. */
|
|
680
|
+
attemptId: string;
|
|
681
|
+
/** Merchant/endpoint the attempt targeted; falls back to `config.counterpartyId`. */
|
|
682
|
+
counterpartyId?: string;
|
|
683
|
+
/** Canonical ASTRA-* id of the acting agent, when known. */
|
|
684
|
+
agentId?: string;
|
|
685
|
+
considerationSet?: ConsiderationSet;
|
|
686
|
+
outcome?: AttemptOutcome;
|
|
585
687
|
}
|
|
586
688
|
/**
|
|
587
689
|
* Raw commerce-protocol artifacts as verify-access accepts them (backend
|
|
@@ -929,4 +1031,4 @@ interface CommerceShieldProps {
|
|
|
929
1031
|
className?: string;
|
|
930
1032
|
}
|
|
931
1033
|
|
|
932
|
-
export type { AccessFailure as A,
|
|
1034
|
+
export type { AccessFailure as A, CallerMetadata as C, EnhancedVerificationResult as E, FiatSettlementBinding as F, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationRequest as V, AccessLevel as a, AgentCredentials as b, AstraSyncCredentials as c, AttemptOutcome as d, AttemptReport as e, CommerceArtifactsPayload as f, CommerceShieldProps as g, ConsiderationItem as h, ConsiderationSet as i, CounterpartyType as j, ExpressMiddlewareOptions as k, GuidanceInfo as l, ProtocolTransport as m, RuntimeChallengeResult as n, SettlementArtifact as o, SettlementArtifactBinding as p, SettlementArtifactBindingBase as q, StablecoinSettlementBinding as r, StepUpApprovalInfo as s, StepUpApprovalStatus as t, StepUpOutcome as u, TrustLevel as v, VerificationResult as w, VerifiedAgent as x, VerifiedDeveloper as y, VerifiedOrganization as z };
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-BntuzEEn.mjs';
|
|
2
2
|
import '../metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as CommerceShieldProps, w as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-SDu4Llbe.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, V as VerificationRequest,
|
|
1
|
+
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-BntuzEEn.mjs';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -42,6 +42,17 @@ declare function verify(config: GatewayConfig, request: VerificationRequest, opt
|
|
|
42
42
|
* Fire-and-forget — errors are silently swallowed.
|
|
43
43
|
*/
|
|
44
44
|
declare function recordDecision(config: GatewayConfig, sessionId: string, decision: 'granted' | 'denied', reason?: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Report post-hoc consideration/outcome data for an attempt chain (Trust
|
|
47
|
+
* Record, §33.5 #3). Use when the signal never reached verify-access: a
|
|
48
|
+
* catalog served from a local cache, a transport-side deny (sku not found,
|
|
49
|
+
* over budget), or a terminal outcome (settled / blocked on step-up).
|
|
50
|
+
* Authenticated with the same credentials as verify(); the backend responds
|
|
51
|
+
* 202 and folds the data into the attempt chain keyed by `attemptId`.
|
|
52
|
+
*
|
|
53
|
+
* Fire-and-forget — errors are silently swallowed, never throws.
|
|
54
|
+
*/
|
|
55
|
+
declare function reportAttempt(config: GatewayConfig, report: AttemptReport): Promise<void>;
|
|
45
56
|
/**
|
|
46
57
|
* Fetch the per-route policy for an endpoint from the AstraSync backend.
|
|
47
58
|
* v2.9.7 moved policy authority into the dashboard — the SDK no longer
|
|
@@ -148,4 +159,4 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
|
|
|
148
159
|
reason?: string;
|
|
149
160
|
}>;
|
|
150
161
|
|
|
151
|
-
export { type RouteAccessConfigShape, type VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
|
162
|
+
export { type RouteAccessConfigShape, type VerifyOptions, 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, V as VerificationRequest,
|
|
1
|
+
import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, e as AttemptReport, V as VerificationRequest, w as VerificationResult } from './types-SDu4Llbe.js';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -42,6 +42,17 @@ declare function verify(config: GatewayConfig, request: VerificationRequest, opt
|
|
|
42
42
|
* Fire-and-forget — errors are silently swallowed.
|
|
43
43
|
*/
|
|
44
44
|
declare function recordDecision(config: GatewayConfig, sessionId: string, decision: 'granted' | 'denied', reason?: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Report post-hoc consideration/outcome data for an attempt chain (Trust
|
|
47
|
+
* Record, §33.5 #3). Use when the signal never reached verify-access: a
|
|
48
|
+
* catalog served from a local cache, a transport-side deny (sku not found,
|
|
49
|
+
* over budget), or a terminal outcome (settled / blocked on step-up).
|
|
50
|
+
* Authenticated with the same credentials as verify(); the backend responds
|
|
51
|
+
* 202 and folds the data into the attempt chain keyed by `attemptId`.
|
|
52
|
+
*
|
|
53
|
+
* Fire-and-forget — errors are silently swallowed, never throws.
|
|
54
|
+
*/
|
|
55
|
+
declare function reportAttempt(config: GatewayConfig, report: AttemptReport): Promise<void>;
|
|
45
56
|
/**
|
|
46
57
|
* Fetch the per-route policy for an endpoint from the AstraSync backend.
|
|
47
58
|
* v2.9.7 moved policy authority into the dashboard — the SDK no longer
|
|
@@ -148,4 +159,4 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
|
|
|
148
159
|
reason?: string;
|
|
149
160
|
}>;
|
|
150
161
|
|
|
151
|
-
export { type RouteAccessConfigShape, type VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
|
162
|
+
export { type RouteAccessConfigShape, type VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, recordDecision, reportAttempt, reportCounterpartyPreCheckFailure, reportUnregisteredAttempt, verify, verifyAndRecord };
|
package/dist/verify.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(verify_exports, {
|
|
|
26
26
|
hasCredentials: () => hasCredentials,
|
|
27
27
|
quickVerify: () => quickVerify,
|
|
28
28
|
recordDecision: () => recordDecision,
|
|
29
|
+
reportAttempt: () => reportAttempt,
|
|
29
30
|
reportCounterpartyPreCheckFailure: () => reportCounterpartyPreCheckFailure,
|
|
30
31
|
reportUnregisteredAttempt: () => reportUnregisteredAttempt,
|
|
31
32
|
verify: () => verify,
|
|
@@ -42,7 +43,7 @@ function getTrustLevel(score) {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
// src/version.ts
|
|
45
|
-
var SDK_VERSION = "3.
|
|
46
|
+
var SDK_VERSION = "3.12.0";
|
|
46
47
|
|
|
47
48
|
// src/well-known.ts
|
|
48
49
|
var CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -249,6 +250,7 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
249
250
|
}
|
|
250
251
|
] : void 0,
|
|
251
252
|
correlationId: options.correlationId,
|
|
253
|
+
attemptId: options.attemptId,
|
|
252
254
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
253
255
|
};
|
|
254
256
|
}
|
|
@@ -278,6 +280,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
278
280
|
body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
|
|
279
281
|
if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
|
|
280
282
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
283
|
+
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
284
|
+
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
281
285
|
body.sdkVersion = SDK_VERSION;
|
|
282
286
|
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
283
287
|
const meta = {
|
|
@@ -305,6 +309,9 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
305
309
|
if (response.status === 410) {
|
|
306
310
|
return {
|
|
307
311
|
success: true,
|
|
312
|
+
// 3.12.0 (Trust Record): keep the server-echoed attempt handle even on
|
|
313
|
+
// the synthesised 410 deny shape (echoed on every branch).
|
|
314
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
308
315
|
access: {
|
|
309
316
|
allowed: false,
|
|
310
317
|
accessLevel: "none",
|
|
@@ -323,7 +330,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
323
330
|
return {
|
|
324
331
|
success: false,
|
|
325
332
|
error: data.message || data.error || `API returned ${response.status}`,
|
|
326
|
-
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0
|
|
333
|
+
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
|
|
334
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
|
|
327
335
|
};
|
|
328
336
|
}
|
|
329
337
|
return data;
|
|
@@ -357,7 +365,13 @@ async function verify(config, request, options) {
|
|
|
357
365
|
if (mergedConfig.debug) {
|
|
358
366
|
console.log("[VerificationGateway] Returning cached result");
|
|
359
367
|
}
|
|
360
|
-
|
|
368
|
+
const hit = { ...cached };
|
|
369
|
+
if (request.attemptId) {
|
|
370
|
+
hit.attemptId = request.attemptId;
|
|
371
|
+
} else {
|
|
372
|
+
delete hit.attemptId;
|
|
373
|
+
}
|
|
374
|
+
return hit;
|
|
361
375
|
}
|
|
362
376
|
}
|
|
363
377
|
const enrichedRequest = { ...request };
|
|
@@ -377,6 +391,7 @@ async function verify(config, request, options) {
|
|
|
377
391
|
return createGuidanceResponse(mergedConfig, apiResponse.error, {
|
|
378
392
|
source: "api_error",
|
|
379
393
|
correlationId: apiResponse.correlationId,
|
|
394
|
+
attemptId: apiResponse.attemptId,
|
|
380
395
|
urls
|
|
381
396
|
});
|
|
382
397
|
}
|
|
@@ -412,6 +427,9 @@ async function verify(config, request, options) {
|
|
|
412
427
|
// Anonymous traffic has no session → correlationId is the per-attempt
|
|
413
428
|
// linking key (the sessionId-equivalent for anonymous callers).
|
|
414
429
|
correlationId: apiResponse.correlationId,
|
|
430
|
+
// 3.12.0 (Trust Record): server echoes the attempt-chain handle on
|
|
431
|
+
// every branch — denials included (the funnel outlives one deny).
|
|
432
|
+
attemptId: apiResponse.attemptId,
|
|
415
433
|
recommendation: apiResponse.recommendation,
|
|
416
434
|
recommendationReasons: apiResponse.recommendationReasons,
|
|
417
435
|
stepUpApproval: apiResponse.stepUpApproval,
|
|
@@ -463,6 +481,8 @@ async function verify(config, request, options) {
|
|
|
463
481
|
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
464
482
|
// (no session row exists for unverified callers).
|
|
465
483
|
correlationId: apiResponse.correlationId,
|
|
484
|
+
// 3.12.0 (Trust Record): server-echoed attempt-chain handle.
|
|
485
|
+
attemptId: apiResponse.attemptId,
|
|
466
486
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
467
487
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
468
488
|
recommendation: apiResponse.recommendation,
|
|
@@ -507,6 +527,24 @@ async function recordDecision(config, sessionId, decision, reason) {
|
|
|
507
527
|
}).catch(() => {
|
|
508
528
|
});
|
|
509
529
|
}
|
|
530
|
+
async function reportAttempt(config, report) {
|
|
531
|
+
const apiBaseUrl = config.apiBaseUrl || DEFAULT_CONFIG.apiBaseUrl;
|
|
532
|
+
const headers = { "Content-Type": "application/json" };
|
|
533
|
+
if (config.apiKey) {
|
|
534
|
+
headers["Authorization"] = `Bearer ${config.apiKey}`;
|
|
535
|
+
headers["X-API-Key"] = config.apiKey;
|
|
536
|
+
}
|
|
537
|
+
const body = {
|
|
538
|
+
...report,
|
|
539
|
+
...!report.counterpartyId && config.counterpartyId && { counterpartyId: config.counterpartyId }
|
|
540
|
+
};
|
|
541
|
+
await fetch(`${apiBaseUrl}/agents/verify-access/attempt-report`, {
|
|
542
|
+
method: "POST",
|
|
543
|
+
headers,
|
|
544
|
+
body: JSON.stringify(body)
|
|
545
|
+
}).catch(() => {
|
|
546
|
+
});
|
|
547
|
+
}
|
|
510
548
|
async function fetchRoutes(config, counterpartyId) {
|
|
511
549
|
if (!counterpartyId) return null;
|
|
512
550
|
const headers = { "Content-Type": "application/json" };
|
|
@@ -585,6 +623,7 @@ async function quickVerify(config, credentials) {
|
|
|
585
623
|
hasCredentials,
|
|
586
624
|
quickVerify,
|
|
587
625
|
recordDecision,
|
|
626
|
+
reportAttempt,
|
|
588
627
|
reportCounterpartyPreCheckFailure,
|
|
589
628
|
reportUnregisteredAttempt,
|
|
590
629
|
verify,
|