@astrasyncai/verification-gateway 5.2.0 → 5.4.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 (127) 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 +8 -3
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +8 -3
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +2 -2
  10. package/dist/adapters/mcp.d.ts +2 -2
  11. package/dist/adapters/mcp.js +8 -3
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +8 -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 +8 -3
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +8 -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 +47 -3
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +47 -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/agent/index.js +1 -1
  30. package/dist/agent/index.js.map +1 -1
  31. package/dist/agent/index.mjs +1 -1
  32. package/dist/agent/index.mjs.map +1 -1
  33. package/dist/bin/astrasync-claude-hook.js +8 -3
  34. package/dist/bin/astrasync-codex-hook.js +8 -3
  35. package/dist/bin/astrasync-guard.js +8 -3
  36. package/dist/bin/astrasync.js +8 -3
  37. package/dist/browser/background.js +8 -3
  38. package/dist/browser/background.js.map +1 -1
  39. package/dist/browser/background.mjs +8 -3
  40. package/dist/browser/background.mjs.map +1 -1
  41. package/dist/browser/browser-adapter.d.mts +2 -2
  42. package/dist/browser/browser-adapter.d.ts +2 -2
  43. package/dist/claude-code/claude-code-adapter.d.mts +2 -2
  44. package/dist/claude-code/claude-code-adapter.d.ts +2 -2
  45. package/dist/cli/index.d.mts +2 -2
  46. package/dist/cli/index.d.ts +2 -2
  47. package/dist/cli/index.js +1 -1
  48. package/dist/cli/index.js.map +1 -1
  49. package/dist/cli/index.mjs +1 -1
  50. package/dist/cli/index.mjs.map +1 -1
  51. package/dist/codex/index.d.mts +2 -2
  52. package/dist/codex/index.d.ts +2 -2
  53. package/dist/codex/index.js +8 -3
  54. package/dist/codex/index.js.map +1 -1
  55. package/dist/codex/index.mjs +8 -3
  56. package/dist/codex/index.mjs.map +1 -1
  57. package/dist/cursor/cursor-adapter.d.mts +2 -2
  58. package/dist/cursor/cursor-adapter.d.ts +2 -2
  59. package/dist/cursor/extension.d.mts +2 -2
  60. package/dist/cursor/extension.d.ts +2 -2
  61. package/dist/cursor/extension.js +8 -3
  62. package/dist/cursor/extension.js.map +1 -1
  63. package/dist/cursor/extension.mjs +8 -3
  64. package/dist/cursor/extension.mjs.map +1 -1
  65. package/dist/edge-config.d.mts +1 -1
  66. package/dist/edge-config.d.ts +1 -1
  67. package/dist/edge-config.js +1 -1
  68. package/dist/edge-config.js.map +1 -1
  69. package/dist/edge-config.mjs +1 -1
  70. package/dist/edge-config.mjs.map +1 -1
  71. package/dist/edge-core/index.d.mts +1 -1
  72. package/dist/edge-core/index.d.ts +1 -1
  73. package/dist/edge-core/index.js +8 -3
  74. package/dist/edge-core/index.js.map +1 -1
  75. package/dist/edge-core/index.mjs +8 -3
  76. package/dist/edge-core/index.mjs.map +1 -1
  77. package/dist/{express-KkBZBMqi.d.mts → express-BIAT2pe0.d.mts} +1 -1
  78. package/dist/{express-xK8pRrmj.d.ts → express-D3Tf-b23.d.ts} +1 -1
  79. package/dist/gateway/gateway.d.mts +2 -2
  80. package/dist/gateway/gateway.d.ts +2 -2
  81. package/dist/gateway/gateway.js +8 -3
  82. package/dist/gateway/gateway.js.map +1 -1
  83. package/dist/gateway/gateway.mjs +8 -3
  84. package/dist/gateway/gateway.mjs.map +1 -1
  85. package/dist/git-trigger/git-hooks.d.mts +2 -2
  86. package/dist/git-trigger/git-hooks.d.ts +2 -2
  87. package/dist/{index-GPDn_EGI.d.mts → index-BVJkTyIF.d.mts} +1 -1
  88. package/dist/{index-DIRzR5IS.d.mts → index-By021oSN.d.mts} +1 -1
  89. package/dist/{index-Hnz5VyMR.d.ts → index-DaMXZabg.d.ts} +1 -1
  90. package/dist/{index-DLQ4Rcuc.d.ts → index-iJ9_DdLk.d.ts} +1 -1
  91. package/dist/index.d.mts +10 -10
  92. package/dist/index.d.ts +10 -10
  93. package/dist/index.js +47 -3
  94. package/dist/index.js.map +1 -1
  95. package/dist/index.mjs +47 -3
  96. package/dist/index.mjs.map +1 -1
  97. package/dist/local-evaluator/evaluator.d.mts +2 -2
  98. package/dist/local-evaluator/evaluator.d.ts +2 -2
  99. package/dist/{mcp-Dju_Sr1o.d.mts → mcp-BqfTDZLh.d.mts} +1 -1
  100. package/dist/{mcp-DPpu4xQz.d.ts → mcp-OrVOrH-s.d.ts} +1 -1
  101. package/dist/{nextjs-BuoDBN4g.d.mts → nextjs-DGJXzWst.d.mts} +1 -1
  102. package/dist/{nextjs-rZKzY_8o.d.ts → nextjs-xM-jdNrX.d.ts} +1 -1
  103. package/dist/registration/index.js +1 -1
  104. package/dist/registration/index.js.map +1 -1
  105. package/dist/registration/index.mjs +1 -1
  106. package/dist/registration/index.mjs.map +1 -1
  107. package/dist/{sdk-CdO6TIEf.d.mts → sdk-C1IOA5LE.d.ts} +32 -1
  108. package/dist/{sdk-DxHuIJBm.d.ts → sdk-C6_-6D-9.d.mts} +32 -1
  109. package/dist/transport/index.d.mts +2 -2
  110. package/dist/transport/index.d.ts +2 -2
  111. package/dist/transport/index.js +1 -1
  112. package/dist/transport/index.js.map +1 -1
  113. package/dist/transport/index.mjs +1 -1
  114. package/dist/transport/index.mjs.map +1 -1
  115. package/dist/{types-CNBaZKxY.d.ts → types-76TB0fxW.d.ts} +52 -1
  116. package/dist/{types-CSHcByFX.d.mts → types-CD1F9fmp.d.mts} +52 -1
  117. package/dist/{types-3UV7IZx7.d.ts → types-DGh2akuh.d.ts} +1 -1
  118. package/dist/{types-CoDjpbVY.d.mts → types-z_RNjHWm.d.mts} +1 -1
  119. package/dist/ui/index.d.mts +1 -1
  120. package/dist/ui/index.d.ts +1 -1
  121. package/dist/verify.d.mts +1 -1
  122. package/dist/verify.d.ts +1 -1
  123. package/dist/verify.js +8 -3
  124. package/dist/verify.js.map +1 -1
  125. package/dist/verify.mjs +8 -3
  126. package/dist/verify.mjs.map +1 -1
  127. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.mjs';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-CoDjpbVY.mjs';
3
- import '../types-CSHcByFX.mjs';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-z_RNjHWm.mjs';
3
+ import '../types-CD1F9fmp.mjs';
4
4
  import '../metadata-capture.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.js';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-3UV7IZx7.js';
3
- import '../types-CNBaZKxY.js';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-DGh2akuh.js';
3
+ import '../types-76TB0fxW.js';
4
4
  import '../metadata-capture.js';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { b as AstraSyncCredentials, l as ProtocolTransport, G as GatewayConfig } from './types-CSHcByFX.mjs';
1
+ import { b as AstraSyncCredentials, l as ProtocolTransport, G as GatewayConfig } from './types-CD1F9fmp.mjs';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { b as AstraSyncCredentials, l as ProtocolTransport } from './types-CSHcByFX.mjs';
1
+ import { b as AstraSyncCredentials, l as ProtocolTransport } from './types-CD1F9fmp.mjs';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { b as AstraSyncCredentials, l as ProtocolTransport, G as GatewayConfig } from './types-CNBaZKxY.js';
1
+ import { b as AstraSyncCredentials, l as ProtocolTransport, G as GatewayConfig } from './types-76TB0fxW.js';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { b as AstraSyncCredentials, l as ProtocolTransport } from './types-CNBaZKxY.js';
1
+ import { b as AstraSyncCredentials, l as ProtocolTransport } from './types-76TB0fxW.js';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
- import { G as GatewayConfig, r as StepUpApprovalInfo, t as StepUpOutcome, s as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CSHcByFX.mjs';
2
- export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as StablecoinSettlementBinding, T as TokenGuidance, u as TrustLevel, V as VerificationInterstitialProps, v as VerificationRequest, w as VerificationResult, x as VerifiedAgent, y as VerifiedDeveloper, z as VerifiedOrganization } from './types-CSHcByFX.mjs';
3
- export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-CdO6TIEf.mjs';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CD1F9fmp.mjs';
2
+ export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as SettlementOutcomeInfo, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-CD1F9fmp.mjs';
3
+ export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-C6_-6D-9.mjs';
4
4
  export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.mjs';
5
- export { e as express } from './express-KkBZBMqi.mjs';
6
- export { n as nextjs } from './nextjs-BuoDBN4g.mjs';
7
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-DIRzR5IS.mjs';
8
- export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-Dju_Sr1o.mjs';
5
+ export { e as express } from './express-BIAT2pe0.mjs';
6
+ export { n as nextjs } from './nextjs-DGJXzWst.mjs';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-By021oSN.mjs';
8
+ export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-BqfTDZLh.mjs';
9
9
  export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.mjs';
10
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-GPDn_EGI.mjs';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-BVJkTyIF.mjs';
11
11
  export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.mjs';
12
12
  export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.mjs';
13
13
  export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
@@ -177,7 +177,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
177
177
  * silently (never throwing), so this is a no-op there — which is correct:
178
178
  * in a browser the page's real UA is the honest identity.
179
179
  */
180
- declare const SDK_USER_AGENT = "astrasync-sdk/5.2.0";
180
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.4.0";
181
181
  declare const sdkFetch: typeof fetch;
182
182
 
183
183
  /**
@@ -198,6 +198,6 @@ declare const sdkFetch: typeof fetch;
198
198
  * is fine — bumping both in the release-ceremony commit keeps them
199
199
  * lockstep.
200
200
  */
201
- declare const SDK_VERSION = "5.2.0";
201
+ declare const SDK_VERSION = "5.4.0";
202
202
 
203
203
  export { EnhancedVerificationResult, GatewayConfig, RUNTIME_SIGNATURES, type RuntimeSignature, SDK_USER_AGENT, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, detectRuntime, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown, sdkFetch };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { G as GatewayConfig, r as StepUpApprovalInfo, t as StepUpOutcome, s as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CNBaZKxY.js';
2
- export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as StablecoinSettlementBinding, T as TokenGuidance, u as TrustLevel, V as VerificationInterstitialProps, v as VerificationRequest, w as VerificationResult, x as VerifiedAgent, y as VerifiedDeveloper, z as VerifiedOrganization } from './types-CNBaZKxY.js';
3
- export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-DxHuIJBm.js';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-76TB0fxW.js';
2
+ export { a as AgentCredentials, b as AstraSyncCredentials, c as AttemptOutcome, d as AttemptReport, C as CallerMetadata, e as CommerceArtifactsPayload, f as CommerceShieldProps, g as ConsiderationItem, h as ConsiderationSet, i as CounterpartyType, j as ExpressMiddlewareOptions, F as FiatSettlementBinding, k as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, l as ProtocolTransport, R as RouteAccessConfig, m as RuntimeChallengeResult, S as SDKOptions, n as SettlementArtifact, o as SettlementArtifactBinding, p as SettlementArtifactBindingBase, q as SettlementOutcomeInfo, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-76TB0fxW.js';
3
+ export { T as TRUST_LEVEL_RANGES, g as getTrustLevel, s as sdk } from './sdk-C1IOA5LE.js';
4
4
  export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.js';
5
- export { e as express } from './express-xK8pRrmj.js';
6
- export { n as nextjs } from './nextjs-rZKzY_8o.js';
7
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-DLQ4Rcuc.js';
8
- export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-DPpu4xQz.js';
5
+ export { e as express } from './express-D3Tf-b23.js';
6
+ export { n as nextjs } from './nextjs-xM-jdNrX.js';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-iJ9_DdLk.js';
8
+ export { M as MCP_VERIFIED_HOP_HEADER, a as MCP_VERIFIED_HOP_MAX_AGE_MS, b as McpMiddlewareOptions, T as ToolGate, c as ToolGateConfig, V as VerifiedHopMarker, d as createMcpMiddleware, i as isVerifiedHopValidFor, f as parseVerifiedHop, s as serializeVerifiedHop } from './mcp-OrVOrH-s.js';
9
9
  export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.js';
10
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-Hnz5VyMR.js';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-DaMXZabg.js';
11
11
  export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.js';
12
12
  export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.js';
13
13
  export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
@@ -177,7 +177,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
177
177
  * silently (never throwing), so this is a no-op there — which is correct:
178
178
  * in a browser the page's real UA is the honest identity.
179
179
  */
180
- declare const SDK_USER_AGENT = "astrasync-sdk/5.2.0";
180
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.4.0";
181
181
  declare const sdkFetch: typeof fetch;
182
182
 
183
183
  /**
@@ -198,6 +198,6 @@ declare const sdkFetch: typeof fetch;
198
198
  * is fine — bumping both in the release-ceremony commit keeps them
199
199
  * lockstep.
200
200
  */
201
- declare const SDK_VERSION = "5.2.0";
201
+ declare const SDK_VERSION = "5.4.0";
202
202
 
203
203
  export { EnhancedVerificationResult, GatewayConfig, RUNTIME_SIGNATURES, type RuntimeSignature, SDK_USER_AGENT, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, detectRuntime, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown, sdkFetch };
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ function getTrustLevel(score) {
112
112
  }
113
113
 
114
114
  // src/version.ts
115
- var SDK_VERSION = "5.2.0";
115
+ var SDK_VERSION = "5.4.0";
116
116
 
117
117
  // src/http.ts
118
118
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
@@ -465,6 +465,9 @@ async function callVerifyAccessAPI(config, request) {
465
465
  if (requestData.runtimeChallengeOptions)
466
466
  body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
467
467
  if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
468
+ if (requestData.commercePhase) body.commercePhase = requestData.commercePhase;
469
+ if (requestData.checkoutSessionId) body.checkoutSessionId = requestData.checkoutSessionId;
470
+ if (requestData.checkoutItems) body.checkoutItems = requestData.checkoutItems;
468
471
  if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
469
472
  if (requestData.attemptId) body.attemptId = requestData.attemptId;
470
473
  if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
@@ -636,7 +639,8 @@ async function verify(config, request, options) {
636
639
  recommendation: apiResponse.recommendation,
637
640
  recommendationReasons: apiResponse.recommendationReasons,
638
641
  stepUpApproval: apiResponse.stepUpApproval,
639
- settlement: apiResponse.settlement
642
+ settlement: apiResponse.settlement,
643
+ settlementOutcome: apiResponse.settlementOutcome
640
644
  };
641
645
  return result2;
642
646
  }
@@ -693,7 +697,8 @@ async function verify(config, request, options) {
693
697
  recommendationReasons: apiResponse.recommendationReasons,
694
698
  warningHeader: apiResponse.warningHeader,
695
699
  stepUpApproval: apiResponse.stepUpApproval,
696
- settlement: apiResponse.settlement
700
+ settlement: apiResponse.settlement,
701
+ settlementOutcome: apiResponse.settlementOutcome
697
702
  };
698
703
  if (result.recommendation === "deny") {
699
704
  result.policyAllowed = false;
@@ -2702,6 +2707,45 @@ var VerificationGatewayClient = class {
2702
2707
  })
2703
2708
  );
2704
2709
  }
2710
+ /**
2711
+ * 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
2712
+ * first-party charge-at-redeem (server-side settlement on the owner's saved
2713
+ * instrument). This is the supported public surface for the confirm leg;
2714
+ * `verify()` deliberately does not expose the checkout fields, so settlement
2715
+ * can never fire by accident from a generic verify.
2716
+ *
2717
+ * Sends `commercePhase: 'confirm'` plus the checkout session id (per-cart
2718
+ * idempotency) and line items (order/receipt plane), and identifies the
2719
+ * merchant via `counterpartyUrl`/`counterpartyType` (required — the backend
2720
+ * only settles a merchant-mediated grant against a first-party storefront).
2721
+ * `purpose`/`action` default to the canonical shopping pair.
2722
+ *
2723
+ * Returns the full `VerificationResult`: read `.settlementOutcome` for the
2724
+ * settled/failed/requires_action/no_instrument outcome (+ `orderId`), and the
2725
+ * identity/policy/`failures` fields for a denial. On any non-`confirm`/first-
2726
+ * party path `settlementOutcome` is simply absent — no money moves.
2727
+ */
2728
+ async confirmCheckout(options) {
2729
+ const credentials = {
2730
+ astraId: options.astraId,
2731
+ apiKey: options.apiKey,
2732
+ jwt: options.jwt
2733
+ };
2734
+ return this.executeWithRetry(
2735
+ () => verify(this.config, {
2736
+ credentials,
2737
+ purpose: options.purpose ?? "shopping",
2738
+ action: options.action ?? "shopping.purchase",
2739
+ transactionValue: options.transactionValue,
2740
+ currency: options.currency,
2741
+ commercePhase: "confirm",
2742
+ checkoutSessionId: options.checkoutSessionId,
2743
+ checkoutItems: options.checkoutItems,
2744
+ counterpartyUrl: options.counterpartyUrl,
2745
+ counterpartyType: options.counterpartyType
2746
+ })
2747
+ );
2748
+ }
2705
2749
  /**
2706
2750
  * Quick verification — checks credentials and policy in one call.
2707
2751
  *