@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.
Files changed (99) 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 +22 -3
  30. package/dist/bin/astrasync-codex-hook.js +22 -3
  31. package/dist/bin/astrasync-guard.js +22 -3
  32. package/dist/bin/astrasync.js +23 -3
  33. package/dist/browser/background.js +22 -3
  34. package/dist/browser/background.js.map +1 -1
  35. package/dist/browser/background.mjs +22 -3
  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 +22 -3
  46. package/dist/codex/index.js.map +1 -1
  47. package/dist/codex/index.mjs +22 -3
  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 +22 -3
  54. package/dist/cursor/extension.js.map +1 -1
  55. package/dist/cursor/extension.mjs +22 -3
  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 +22 -3
  64. package/dist/gateway/gateway.js.map +1 -1
  65. package/dist/gateway/gateway.mjs +22 -3
  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 +2 -2
  80. package/dist/local-evaluator/evaluator.d.ts +2 -2
  81. package/dist/{nextjs-DcQIk6Zj.d.mts → nextjs-D74W7wt-.d.mts} +1 -1
  82. package/dist/{nextjs-CEBVBsdi.d.ts → nextjs-Ddlw_J1J.d.ts} +1 -1
  83. package/dist/{sdk-CZkbSOeO.d.mts → sdk-Bn6bj7kt.d.mts} +1 -1
  84. package/dist/{sdk-H0JCLW2y.d.ts → sdk-CT7gdkfR.d.ts} +1 -1
  85. package/dist/transport/index.d.mts +2 -2
  86. package/dist/transport/index.d.ts +2 -2
  87. package/dist/{types-sy3tq8lp.d.mts → types-BntuzEEn.d.mts} +103 -1
  88. package/dist/{types-DhFPiZ3t.d.ts → types-DHu7m9HI.d.ts} +1 -1
  89. package/dist/{types-cQVCMeNV.d.mts → types-Djw4GLtz.d.mts} +1 -1
  90. package/dist/{types-9tns4wyl.d.ts → types-SDu4Llbe.d.ts} +103 -1
  91. package/dist/ui/index.d.mts +1 -1
  92. package/dist/ui/index.d.ts +1 -1
  93. package/dist/verify.d.mts +13 -2
  94. package/dist/verify.d.ts +13 -2
  95. package/dist/verify.js +42 -3
  96. package/dist/verify.js.map +1 -1
  97. package/dist/verify.mjs +41 -3
  98. package/dist/verify.mjs.map +1 -1
  99. 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-cQVCMeNV.mjs';
3
- import '../types-sy3tq8lp.mjs';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-Djw4GLtz.mjs';
3
+ import '../types-BntuzEEn.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-DhFPiZ3t.js';
3
- import '../types-9tns4wyl.js';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-DHu7m9HI.js';
3
+ import '../types-SDu4Llbe.js';
4
4
  import '../metadata-capture.js';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, h as ProtocolTransport, G as GatewayConfig } from './types-9tns4wyl.js';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-SDu4Llbe.js';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, h as ProtocolTransport } from './types-9tns4wyl.js';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-SDu4Llbe.js';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, h as ProtocolTransport, G as GatewayConfig } from './types-sy3tq8lp.mjs';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-BntuzEEn.mjs';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, h as ProtocolTransport } from './types-sy3tq8lp.mjs';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-BntuzEEn.mjs';
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, n as StepUpApprovalInfo, p as StepUpOutcome, o as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-sy3tq8lp.mjs';
2
- export { a as AccessLevel, b as AgentCredentials, c as AstraSyncCredentials, C as CommerceArtifactsPayload, d as CommerceShieldProps, e as CounterpartyType, f as ExpressMiddlewareOptions, F as FiatSettlementBinding, g as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, h as ProtocolTransport, R as RouteAccessConfig, i as RuntimeChallengeResult, S as SDKOptions, j as SettlementArtifact, k as SettlementArtifactBinding, l as SettlementArtifactBindingBase, m as StablecoinSettlementBinding, T as TokenGuidance, q as TrustLevel, V as VerificationRequest, r as VerificationResult, s as VerifiedAgent, t as VerifiedDeveloper, u as VerifiedOrganization } from './types-sy3tq8lp.mjs';
3
- export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-CZkbSOeO.mjs';
4
- export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportUnregisteredAttempt, verify } from './verify.mjs';
5
- export { e as express } from './express-DCXa1oqj.mjs';
6
- export { n as nextjs } from './nextjs-DcQIk6Zj.mjs';
7
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-BrNKDmiR.mjs';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-BntuzEEn.mjs';
2
+ export { a as AccessLevel, b as AgentCredentials, c as AstraSyncCredentials, d as AttemptOutcome, e as AttemptReport, C as CallerMetadata, f as CommerceArtifactsPayload, g as CommerceShieldProps, h as ConsiderationItem, i as ConsiderationSet, j as CounterpartyType, k as ExpressMiddlewareOptions, F as FiatSettlementBinding, l as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, m as ProtocolTransport, R as RouteAccessConfig, n as RuntimeChallengeResult, S as SDKOptions, o as SettlementArtifact, p as SettlementArtifactBinding, q as SettlementArtifactBindingBase, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationRequest, w as VerificationResult, x as VerifiedAgent, y as VerifiedDeveloper, z as VerifiedOrganization } from './types-BntuzEEn.mjs';
3
+ export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-Bn6bj7kt.mjs';
4
+ export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.mjs';
5
+ export { e as express } from './express-B39o89gf.mjs';
6
+ export { n as nextjs } from './nextjs-D74W7wt-.mjs';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-DME3w3lf.mjs';
8
8
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.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-Dr_XiN65.mjs';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-CqydB4ks.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 { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
@@ -145,6 +145,6 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
145
145
  * is fine — bumping both in the release-ceremony commit keeps them
146
146
  * lockstep.
147
147
  */
148
- declare const SDK_VERSION = "3.11.1";
148
+ declare const SDK_VERSION = "3.12.0";
149
149
 
150
150
  export { EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { G as GatewayConfig, n as StepUpApprovalInfo, p as StepUpOutcome, o as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-9tns4wyl.js';
2
- export { a as AccessLevel, b as AgentCredentials, c as AstraSyncCredentials, C as CommerceArtifactsPayload, d as CommerceShieldProps, e as CounterpartyType, f as ExpressMiddlewareOptions, F as FiatSettlementBinding, g as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, h as ProtocolTransport, R as RouteAccessConfig, i as RuntimeChallengeResult, S as SDKOptions, j as SettlementArtifact, k as SettlementArtifactBinding, l as SettlementArtifactBindingBase, m as StablecoinSettlementBinding, T as TokenGuidance, q as TrustLevel, V as VerificationRequest, r as VerificationResult, s as VerifiedAgent, t as VerifiedDeveloper, u as VerifiedOrganization } from './types-9tns4wyl.js';
3
- export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-H0JCLW2y.js';
4
- export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportUnregisteredAttempt, verify } from './verify.js';
5
- export { e as express } from './express-ClNtDhhc.js';
6
- export { n as nextjs } from './nextjs-CEBVBsdi.js';
7
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-D2ztkumS.js';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-SDu4Llbe.js';
2
+ export { a as AccessLevel, b as AgentCredentials, c as AstraSyncCredentials, d as AttemptOutcome, e as AttemptReport, C as CallerMetadata, f as CommerceArtifactsPayload, g as CommerceShieldProps, h as ConsiderationItem, i as ConsiderationSet, j as CounterpartyType, k as ExpressMiddlewareOptions, F as FiatSettlementBinding, l as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, m as ProtocolTransport, R as RouteAccessConfig, n as RuntimeChallengeResult, S as SDKOptions, o as SettlementArtifact, p as SettlementArtifactBinding, q as SettlementArtifactBindingBase, r as StablecoinSettlementBinding, T as TokenGuidance, v as TrustLevel, V as VerificationRequest, w as VerificationResult, x as VerifiedAgent, y as VerifiedDeveloper, z as VerifiedOrganization } from './types-SDu4Llbe.js';
3
+ export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-CT7gdkfR.js';
4
+ export { VerifyOptions, clearCache, extractCredentials, fetchRoutes, hasCredentials, quickVerify, reportAttempt, reportUnregisteredAttempt, verify } from './verify.js';
5
+ export { e as express } from './express-BuxKNO_q.js';
6
+ export { n as nextjs } from './nextjs-Ddlw_J1J.js';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-CLHdqs2M.js';
8
8
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.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-CfHurO1P.js';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-BG62SXso.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 { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
@@ -145,6 +145,6 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
145
145
  * is fine — bumping both in the release-ceremony commit keeps them
146
146
  * lockstep.
147
147
  */
148
- declare const SDK_VERSION = "3.11.1";
148
+ declare const SDK_VERSION = "3.12.0";
149
149
 
150
150
  export { EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown };
package/dist/index.js CHANGED
@@ -82,6 +82,7 @@ __export(src_exports, {
82
82
  prefetchWellKnown: () => prefetchWellKnown,
83
83
  quickVerify: () => quickVerify,
84
84
  recordDecision: () => recordDecision2,
85
+ reportAttempt: () => reportAttempt,
85
86
  reportUnregisteredAttempt: () => reportUnregisteredAttempt,
86
87
  sanitizeHeaders: () => sanitizeHeaders,
87
88
  sdk: () => sdk_exports,
@@ -213,7 +214,7 @@ function getCapabilities(accessLevel) {
213
214
  }
214
215
 
215
216
  // src/version.ts
216
- var SDK_VERSION = "3.11.1";
217
+ var SDK_VERSION = "3.12.0";
217
218
 
218
219
  // src/well-known.ts
219
220
  var CACHE_TTL_MS = 60 * 60 * 1e3;
@@ -472,6 +473,7 @@ function createGuidanceResponse(_config, reason, options = {}) {
472
473
  }
473
474
  ] : void 0,
474
475
  correlationId: options.correlationId,
476
+ attemptId: options.attemptId,
475
477
  verifiedAt: /* @__PURE__ */ new Date()
476
478
  };
477
479
  }
@@ -501,6 +503,8 @@ async function callVerifyAccessAPI(config, request) {
501
503
  body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
502
504
  if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
503
505
  if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
506
+ if (requestData.attemptId) body.attemptId = requestData.attemptId;
507
+ if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
504
508
  body.sdkVersion = SDK_VERSION;
505
509
  if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
506
510
  const meta = {
@@ -528,6 +532,9 @@ async function callVerifyAccessAPI(config, request) {
528
532
  if (response.status === 410) {
529
533
  return {
530
534
  success: true,
535
+ // 3.12.0 (Trust Record): keep the server-echoed attempt handle even on
536
+ // the synthesised 410 deny shape (echoed on every branch).
537
+ attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
531
538
  access: {
532
539
  allowed: false,
533
540
  accessLevel: "none",
@@ -546,7 +553,8 @@ async function callVerifyAccessAPI(config, request) {
546
553
  return {
547
554
  success: false,
548
555
  error: data.message || data.error || `API returned ${response.status}`,
549
- correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0
556
+ correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
557
+ attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
550
558
  };
551
559
  }
552
560
  return data;
@@ -580,7 +588,13 @@ async function verify(config, request, options) {
580
588
  if (mergedConfig.debug) {
581
589
  console.log("[VerificationGateway] Returning cached result");
582
590
  }
583
- return cached;
591
+ const hit = { ...cached };
592
+ if (request.attemptId) {
593
+ hit.attemptId = request.attemptId;
594
+ } else {
595
+ delete hit.attemptId;
596
+ }
597
+ return hit;
584
598
  }
585
599
  }
586
600
  const enrichedRequest = { ...request };
@@ -600,6 +614,7 @@ async function verify(config, request, options) {
600
614
  return createGuidanceResponse(mergedConfig, apiResponse.error, {
601
615
  source: "api_error",
602
616
  correlationId: apiResponse.correlationId,
617
+ attemptId: apiResponse.attemptId,
603
618
  urls
604
619
  });
605
620
  }
@@ -635,6 +650,9 @@ async function verify(config, request, options) {
635
650
  // Anonymous traffic has no session → correlationId is the per-attempt
636
651
  // linking key (the sessionId-equivalent for anonymous callers).
637
652
  correlationId: apiResponse.correlationId,
653
+ // 3.12.0 (Trust Record): server echoes the attempt-chain handle on
654
+ // every branch — denials included (the funnel outlives one deny).
655
+ attemptId: apiResponse.attemptId,
638
656
  recommendation: apiResponse.recommendation,
639
657
  recommendationReasons: apiResponse.recommendationReasons,
640
658
  stepUpApproval: apiResponse.stepUpApproval,
@@ -686,6 +704,8 @@ async function verify(config, request, options) {
686
704
  // v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
687
705
  // (no session row exists for unverified callers).
688
706
  correlationId: apiResponse.correlationId,
707
+ // 3.12.0 (Trust Record): server-echoed attempt-chain handle.
708
+ attemptId: apiResponse.attemptId,
689
709
  runtimeChallenge: apiResponse.runtimeChallenge,
690
710
  tokenGuidance: apiResponse.tokenGuidance,
691
711
  recommendation: apiResponse.recommendation,
@@ -730,6 +750,24 @@ async function recordDecision(config, sessionId, decision, reason) {
730
750
  }).catch(() => {
731
751
  });
732
752
  }
753
+ async function reportAttempt(config, report) {
754
+ const apiBaseUrl = config.apiBaseUrl || DEFAULT_CONFIG.apiBaseUrl;
755
+ const headers = { "Content-Type": "application/json" };
756
+ if (config.apiKey) {
757
+ headers["Authorization"] = `Bearer ${config.apiKey}`;
758
+ headers["X-API-Key"] = config.apiKey;
759
+ }
760
+ const body = {
761
+ ...report,
762
+ ...!report.counterpartyId && config.counterpartyId && { counterpartyId: config.counterpartyId }
763
+ };
764
+ await fetch(`${apiBaseUrl}/agents/verify-access/attempt-report`, {
765
+ method: "POST",
766
+ headers,
767
+ body: JSON.stringify(body)
768
+ }).catch(() => {
769
+ });
770
+ }
733
771
  async function fetchRoutes(config, counterpartyId) {
734
772
  if (!counterpartyId) return null;
735
773
  const headers = { "Content-Type": "application/json" };
@@ -6185,6 +6223,7 @@ function detectPlatformFingerprint(input) {
6185
6223
  prefetchWellKnown,
6186
6224
  quickVerify,
6187
6225
  recordDecision,
6226
+ reportAttempt,
6188
6227
  reportUnregisteredAttempt,
6189
6228
  sanitizeHeaders,
6190
6229
  sdk,