@astrasyncai/verification-gateway 3.11.0 → 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.
Files changed (103) hide show
  1. package/dist/adapter-interface/interface.d.mts +2 -2
  2. package/dist/adapter-interface/interface.d.ts +2 -2
  3. package/dist/adapters/express.d.mts +2 -2
  4. package/dist/adapters/express.d.ts +2 -2
  5. package/dist/adapters/express.js +22 -3
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +22 -3
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +1 -1
  10. package/dist/adapters/mcp.d.ts +1 -1
  11. package/dist/adapters/mcp.js +22 -3
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +22 -3
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +2 -2
  16. package/dist/adapters/nextjs.d.ts +2 -2
  17. package/dist/adapters/nextjs.js +22 -3
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +22 -3
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +2 -2
  22. package/dist/adapters/sdk.d.ts +2 -2
  23. package/dist/adapters/sdk.js +22 -3
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +22 -3
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.d.mts +2 -2
  28. package/dist/agent/index.d.ts +2 -2
  29. package/dist/bin/astrasync-claude-hook.js +84 -21
  30. package/dist/bin/astrasync-codex-hook.js +84 -21
  31. package/dist/bin/astrasync-guard.js +84 -21
  32. package/dist/bin/astrasync.js +85 -21
  33. package/dist/browser/background.js +84 -21
  34. package/dist/browser/background.js.map +1 -1
  35. package/dist/browser/background.mjs +84 -21
  36. package/dist/browser/background.mjs.map +1 -1
  37. package/dist/browser/browser-adapter.d.mts +2 -2
  38. package/dist/browser/browser-adapter.d.ts +2 -2
  39. package/dist/claude-code/claude-code-adapter.d.mts +2 -2
  40. package/dist/claude-code/claude-code-adapter.d.ts +2 -2
  41. package/dist/cli/index.d.mts +2 -2
  42. package/dist/cli/index.d.ts +2 -2
  43. package/dist/codex/index.d.mts +2 -2
  44. package/dist/codex/index.d.ts +2 -2
  45. package/dist/codex/index.js +84 -21
  46. package/dist/codex/index.js.map +1 -1
  47. package/dist/codex/index.mjs +84 -21
  48. package/dist/codex/index.mjs.map +1 -1
  49. package/dist/cursor/cursor-adapter.d.mts +2 -2
  50. package/dist/cursor/cursor-adapter.d.ts +2 -2
  51. package/dist/cursor/extension.d.mts +2 -2
  52. package/dist/cursor/extension.d.ts +2 -2
  53. package/dist/cursor/extension.js +84 -21
  54. package/dist/cursor/extension.js.map +1 -1
  55. package/dist/cursor/extension.mjs +84 -21
  56. package/dist/cursor/extension.mjs.map +1 -1
  57. package/dist/edge-config.d.mts +1 -1
  58. package/dist/edge-config.d.ts +1 -1
  59. package/dist/{express-DCXa1oqj.d.mts → express-B39o89gf.d.mts} +1 -1
  60. package/dist/{express-ClNtDhhc.d.ts → express-BuxKNO_q.d.ts} +1 -1
  61. package/dist/gateway/gateway.d.mts +2 -2
  62. package/dist/gateway/gateway.d.ts +2 -2
  63. package/dist/gateway/gateway.js +84 -21
  64. package/dist/gateway/gateway.js.map +1 -1
  65. package/dist/gateway/gateway.mjs +84 -21
  66. package/dist/gateway/gateway.mjs.map +1 -1
  67. package/dist/git-trigger/git-hooks.d.mts +2 -2
  68. package/dist/git-trigger/git-hooks.d.ts +2 -2
  69. package/dist/{index-CfHurO1P.d.ts → index-BG62SXso.d.ts} +1 -1
  70. package/dist/{index-D2ztkumS.d.ts → index-CLHdqs2M.d.ts} +1 -1
  71. package/dist/{index-Dr_XiN65.d.mts → index-CqydB4ks.d.mts} +1 -1
  72. package/dist/{index-BrNKDmiR.d.mts → index-DME3w3lf.d.mts} +1 -1
  73. package/dist/index.d.mts +9 -9
  74. package/dist/index.d.ts +9 -9
  75. package/dist/index.js +42 -3
  76. package/dist/index.js.map +1 -1
  77. package/dist/index.mjs +41 -3
  78. package/dist/index.mjs.map +1 -1
  79. package/dist/local-evaluator/evaluator.d.mts +11 -2
  80. package/dist/local-evaluator/evaluator.d.ts +11 -2
  81. package/dist/local-evaluator/evaluator.js +20 -9
  82. package/dist/local-evaluator/evaluator.js.map +1 -1
  83. package/dist/local-evaluator/evaluator.mjs +20 -9
  84. package/dist/local-evaluator/evaluator.mjs.map +1 -1
  85. package/dist/{nextjs-DcQIk6Zj.d.mts → nextjs-D74W7wt-.d.mts} +1 -1
  86. package/dist/{nextjs-CEBVBsdi.d.ts → nextjs-Ddlw_J1J.d.ts} +1 -1
  87. package/dist/{sdk-CZkbSOeO.d.mts → sdk-Bn6bj7kt.d.mts} +1 -1
  88. package/dist/{sdk-H0JCLW2y.d.ts → sdk-CT7gdkfR.d.ts} +1 -1
  89. package/dist/transport/index.d.mts +2 -2
  90. package/dist/transport/index.d.ts +2 -2
  91. package/dist/{types-sy3tq8lp.d.mts → types-BntuzEEn.d.mts} +103 -1
  92. package/dist/{types-BV6abBnF.d.mts → types-DHu7m9HI.d.ts} +7 -2
  93. package/dist/{types-C23_uaY8.d.ts → types-Djw4GLtz.d.mts} +7 -2
  94. package/dist/{types-9tns4wyl.d.ts → types-SDu4Llbe.d.ts} +103 -1
  95. package/dist/ui/index.d.mts +1 -1
  96. package/dist/ui/index.d.ts +1 -1
  97. package/dist/verify.d.mts +13 -2
  98. package/dist/verify.d.ts +13 -2
  99. package/dist/verify.js +42 -3
  100. package/dist/verify.js.map +1 -1
  101. package/dist/verify.mjs +41 -3
  102. package/dist/verify.mjs.map +1 -1
  103. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import '../types-sy3tq8lp.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-BrNKDmiR.mjs';
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-9tns4wyl.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-D2ztkumS.js';
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, CommerceArtifactsPayload 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, CommerceShieldProps as d, CounterpartyType as e, ExpressMiddlewareOptions as f, GuidanceInfo as g, ProtocolTransport as h, RuntimeChallengeResult as i, SettlementArtifact as j, SettlementArtifactBinding as k, SettlementArtifactBindingBase as l, StablecoinSettlementBinding as m, StepUpApprovalInfo as n, StepUpApprovalStatus as o, StepUpOutcome as p, TrustLevel as q, VerificationResult as r, VerifiedAgent as s, VerifiedDeveloper as t, VerifiedOrganization as u };
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, e as CounterpartyType, T as TokenGuidance } from './types-sy3tq8lp.mjs';
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.
@@ -84,7 +84,12 @@ interface VerificationDecision {
84
84
  trustScore?: number;
85
85
  tokenGuidance?: TokenGuidance;
86
86
  sessionId?: string;
87
- /** PDLSS dimensions that were evaluated */
87
+ /**
88
+ * PDLSS dimensions that were evaluated. `true` = the dimension was
89
+ * configured in the policy and therefore ran; `false` = the dimension is
90
+ * absent from the policy and was skipped — NOT "failed" (a failed
91
+ * dimension never produces an ALLOW; this field is only set on ALLOW).
92
+ */
88
93
  evaluatedDimensions?: {
89
94
  purpose: boolean;
90
95
  scope: boolean;
@@ -1,4 +1,4 @@
1
- import { a as AccessLevel, e as CounterpartyType, T as TokenGuidance } from './types-9tns4wyl.js';
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.
@@ -84,7 +84,12 @@ interface VerificationDecision {
84
84
  trustScore?: number;
85
85
  tokenGuidance?: TokenGuidance;
86
86
  sessionId?: string;
87
- /** PDLSS dimensions that were evaluated */
87
+ /**
88
+ * PDLSS dimensions that were evaluated. `true` = the dimension was
89
+ * configured in the policy and therefore ran; `false` = the dimension is
90
+ * absent from the policy and was skipped — NOT "failed" (a failed
91
+ * dimension never produces an ALLOW; this field is only set on ALLOW).
92
+ */
88
93
  evaluatedDimensions?: {
89
94
  purpose: boolean;
90
95
  scope: boolean;
@@ -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, CommerceArtifactsPayload 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, CommerceShieldProps as d, CounterpartyType as e, ExpressMiddlewareOptions as f, GuidanceInfo as g, ProtocolTransport as h, RuntimeChallengeResult as i, SettlementArtifact as j, SettlementArtifactBinding as k, SettlementArtifactBindingBase as l, StablecoinSettlementBinding as m, StepUpApprovalInfo as n, StepUpApprovalStatus as o, StepUpOutcome as p, TrustLevel as q, VerificationResult as r, VerifiedAgent as s, VerifiedDeveloper as t, VerifiedOrganization as u };
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 { d as CommerceShieldProps, r as VerificationResult, b as AgentCredentials, g as GuidanceInfo, q as TrustLevel } from '../types-sy3tq8lp.mjs';
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
  /**
@@ -1,4 +1,4 @@
1
- import { d as CommerceShieldProps, r as VerificationResult, b as AgentCredentials, g as GuidanceInfo, q as TrustLevel } from '../types-9tns4wyl.js';
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, r as VerificationResult } from './types-sy3tq8lp.mjs';
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, r as VerificationResult } from './types-9tns4wyl.js';
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.11.0";
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
- return cached;
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,