@astrasyncai/verification-gateway 3.8.0 → 3.10.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 (114) hide show
  1. package/dist/adapter-interface/interface.d.mts +3 -2
  2. package/dist/adapter-interface/interface.d.ts +3 -2
  3. package/dist/adapters/express.d.mts +3 -2
  4. package/dist/adapters/express.d.ts +3 -2
  5. package/dist/adapters/express.js +152 -2
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +152 -2
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/http-pdlss.d.mts +81 -0
  10. package/dist/adapters/http-pdlss.d.ts +81 -0
  11. package/dist/adapters/http-pdlss.js +117 -0
  12. package/dist/adapters/http-pdlss.js.map +1 -0
  13. package/dist/adapters/http-pdlss.mjs +87 -0
  14. package/dist/adapters/http-pdlss.mjs.map +1 -0
  15. package/dist/adapters/mcp.d.mts +2 -1
  16. package/dist/adapters/mcp.d.ts +2 -1
  17. package/dist/adapters/mcp.js +2 -1
  18. package/dist/adapters/mcp.js.map +1 -1
  19. package/dist/adapters/mcp.mjs +2 -1
  20. package/dist/adapters/mcp.mjs.map +1 -1
  21. package/dist/adapters/nextjs.d.mts +3 -2
  22. package/dist/adapters/nextjs.d.ts +3 -2
  23. package/dist/adapters/nextjs.js +152 -2
  24. package/dist/adapters/nextjs.js.map +1 -1
  25. package/dist/adapters/nextjs.mjs +152 -2
  26. package/dist/adapters/nextjs.mjs.map +1 -1
  27. package/dist/adapters/sdk.d.mts +3 -2
  28. package/dist/adapters/sdk.d.ts +3 -2
  29. package/dist/adapters/sdk.js +2 -1
  30. package/dist/adapters/sdk.js.map +1 -1
  31. package/dist/adapters/sdk.mjs +2 -1
  32. package/dist/adapters/sdk.mjs.map +1 -1
  33. package/dist/agent/index.d.mts +3 -2
  34. package/dist/agent/index.d.ts +3 -2
  35. package/dist/bin/astrasync-claude-hook.js +17 -1
  36. package/dist/bin/astrasync-guard.js +17 -1
  37. package/dist/bin/astrasync.js +43 -1
  38. package/dist/browser/background.js +17 -1
  39. package/dist/browser/background.js.map +1 -1
  40. package/dist/browser/background.mjs +17 -1
  41. package/dist/browser/background.mjs.map +1 -1
  42. package/dist/browser/browser-adapter.d.mts +3 -2
  43. package/dist/browser/browser-adapter.d.ts +3 -2
  44. package/dist/claude-code/claude-code-adapter.d.mts +3 -2
  45. package/dist/claude-code/claude-code-adapter.d.ts +3 -2
  46. package/dist/cli/index.d.mts +3 -2
  47. package/dist/cli/index.d.ts +3 -2
  48. package/dist/cursor/cursor-adapter.d.mts +3 -2
  49. package/dist/cursor/cursor-adapter.d.ts +3 -2
  50. package/dist/cursor/extension.d.mts +3 -2
  51. package/dist/cursor/extension.d.ts +3 -2
  52. package/dist/cursor/extension.js +17 -1
  53. package/dist/cursor/extension.js.map +1 -1
  54. package/dist/cursor/extension.mjs +17 -1
  55. package/dist/cursor/extension.mjs.map +1 -1
  56. package/dist/edge-config.d.mts +131 -0
  57. package/dist/edge-config.d.ts +131 -0
  58. package/dist/edge-config.js +162 -0
  59. package/dist/edge-config.js.map +1 -0
  60. package/dist/edge-config.mjs +131 -0
  61. package/dist/edge-config.mjs.map +1 -0
  62. package/dist/{express-C8nJGi5P.d.ts → express-ClNtDhhc.d.ts} +1 -1
  63. package/dist/{express-Di_hnZZS.d.mts → express-DCXa1oqj.d.mts} +1 -1
  64. package/dist/gateway/gateway.d.mts +3 -2
  65. package/dist/gateway/gateway.d.ts +3 -2
  66. package/dist/gateway/gateway.js +17 -1
  67. package/dist/gateway/gateway.js.map +1 -1
  68. package/dist/gateway/gateway.mjs +17 -1
  69. package/dist/gateway/gateway.mjs.map +1 -1
  70. package/dist/git-trigger/git-hooks.d.mts +3 -2
  71. package/dist/git-trigger/git-hooks.d.ts +3 -2
  72. package/dist/{index-CXcvO9Au.d.mts → index-BrNKDmiR.d.mts} +1 -1
  73. package/dist/{index-CuCkjT7B.d.ts → index-CfHurO1P.d.ts} +1 -1
  74. package/dist/{index-CBQr4FGs.d.ts → index-D2ztkumS.d.ts} +1 -1
  75. package/dist/{index-DALAqct7.d.mts → index-Dr_XiN65.d.mts} +1 -1
  76. package/dist/index.d.mts +27 -82
  77. package/dist/index.d.ts +27 -82
  78. package/dist/index.js +435 -12
  79. package/dist/index.js.map +1 -1
  80. package/dist/index.mjs +417 -12
  81. package/dist/index.mjs.map +1 -1
  82. package/dist/local-evaluator/evaluator.d.mts +3 -2
  83. package/dist/local-evaluator/evaluator.d.ts +3 -2
  84. package/dist/metadata-capture.d.mts +87 -0
  85. package/dist/metadata-capture.d.ts +87 -0
  86. package/dist/metadata-capture.js +184 -0
  87. package/dist/metadata-capture.js.map +1 -0
  88. package/dist/metadata-capture.mjs +154 -0
  89. package/dist/metadata-capture.mjs.map +1 -0
  90. package/dist/{nextjs-IyXWW2KL.d.ts → nextjs-CEBVBsdi.d.ts} +1 -1
  91. package/dist/{nextjs-BMAe8ode.d.mts → nextjs-DcQIk6Zj.d.mts} +1 -1
  92. package/dist/platform-signatures.d.mts +97 -0
  93. package/dist/platform-signatures.d.ts +97 -0
  94. package/dist/platform-signatures.js +116 -0
  95. package/dist/platform-signatures.js.map +1 -0
  96. package/dist/platform-signatures.mjs +89 -0
  97. package/dist/platform-signatures.mjs.map +1 -0
  98. package/dist/{sdk-Cn4KcZ5G.d.mts → sdk-CZkbSOeO.d.mts} +1 -1
  99. package/dist/{sdk-ThdA_NtL.d.ts → sdk-H0JCLW2y.d.ts} +1 -1
  100. package/dist/transport/index.d.mts +3 -2
  101. package/dist/transport/index.d.ts +3 -2
  102. package/dist/{types-DedAJbNI.d.mts → types-9tns4wyl.d.ts} +88 -1
  103. package/dist/{types-CSFci5zD.d.mts → types-D0lCtFQ7.d.mts} +1 -1
  104. package/dist/{types-D1kyMiml.d.ts → types-YbiXYKx1.d.ts} +1 -1
  105. package/dist/{types-DedAJbNI.d.ts → types-sy3tq8lp.d.mts} +88 -1
  106. package/dist/ui/index.d.mts +2 -1
  107. package/dist/ui/index.d.ts +2 -1
  108. package/dist/verify.d.mts +151 -0
  109. package/dist/verify.d.ts +151 -0
  110. package/dist/verify.js +593 -0
  111. package/dist/verify.js.map +1 -0
  112. package/dist/verify.mjs +557 -0
  113. package/dist/verify.mjs.map +1 -0
  114. package/package.json +26 -1
@@ -1,6 +1,7 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.mjs';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-CSFci5zD.mjs';
3
- import '../types-DedAJbNI.mjs';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-D0lCtFQ7.mjs';
3
+ import '../types-sy3tq8lp.mjs';
4
+ import '../metadata-capture.mjs';
4
5
 
5
6
  /**
6
7
  * Git Trigger — Enterprise git push / PR verification
@@ -1,6 +1,7 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.js';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-D1kyMiml.js';
3
- import '../types-DedAJbNI.js';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-YbiXYKx1.js';
3
+ import '../types-9tns4wyl.js';
4
+ import '../metadata-capture.js';
4
5
 
5
6
  /**
6
7
  * Git Trigger — Enterprise git push / PR verification
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-DedAJbNI.mjs';
1
+ import { c as AstraSyncCredentials, h as ProtocolTransport } from './types-sy3tq8lp.mjs';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-DedAJbNI.js';
1
+ import { c as AstraSyncCredentials, h as ProtocolTransport, G as GatewayConfig } from './types-9tns4wyl.js';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-DedAJbNI.js';
1
+ import { c as AstraSyncCredentials, h as ProtocolTransport } from './types-9tns4wyl.js';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-DedAJbNI.mjs';
1
+ import { c as AstraSyncCredentials, h as ProtocolTransport, G as GatewayConfig } from './types-sy3tq8lp.mjs';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
package/dist/index.d.mts CHANGED
@@ -1,68 +1,20 @@
1
- import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, q as VerificationResult, m as StepUpApprovalInfo, o as StepUpOutcome, n as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-DedAJbNI.mjs';
2
- export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, F as FiatSettlementBinding, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, j as SettlementArtifactBinding, k as SettlementArtifactBindingBase, l as StablecoinSettlementBinding, T as TokenGuidance, p as TrustLevel, r as VerifiedAgent, s as VerifiedDeveloper, t as VerifiedOrganization } from './types-DedAJbNI.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-Cn4KcZ5G.mjs';
4
- export { e as express } from './express-Di_hnZZS.mjs';
5
- export { n as nextjs } from './nextjs-BMAe8ode.mjs';
6
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-CXcvO9Au.mjs';
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';
7
8
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.mjs';
8
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';
9
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-DALAqct7.mjs';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-Dr_XiN65.mjs';
11
+ export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.mjs';
12
+ export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.mjs';
13
+ export { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
10
14
  import 'express';
11
15
  import 'next/server';
12
16
  import 'jose';
13
17
 
14
- /**
15
- * AstraSync Universal Verification Gateway - Core Verification Logic
16
- *
17
- * This module handles the core verification logic, calling the AstraSync API
18
- * and processing the response into a standardized VerificationResult.
19
- */
20
-
21
- /**
22
- * Clear the verification cache
23
- */
24
- declare function clearCache(): void;
25
- /**
26
- * Extract agent credentials from various sources
27
- */
28
- declare function extractCredentials(headers: Record<string, string | string[] | undefined>, query?: Record<string, string | undefined>): AgentCredentials;
29
- /**
30
- * Check if credentials are present
31
- */
32
- declare function hasCredentials(credentials: AgentCredentials): boolean;
33
- /**
34
- * Options for a single verify() call (as opposed to GatewayConfig, which is
35
- * per-gateway). Mirrors the Java SDK's `verify(request, bypassCache)`.
36
- */
37
- interface VerifyOptions {
38
- /**
39
- * Skip the cache READ for this call so the request is guaranteed to reach
40
- * the backend (the result is still written to the cache if cacheable).
41
- * Used by the step-up hold-and-poll retry: the re-verify after an approval
42
- * must hit the server to redeem the single-use approval.
43
- */
44
- bypassCache?: boolean;
45
- }
46
- /**
47
- * Main verification function
48
- */
49
- declare function verify(config: GatewayConfig, request: VerificationRequest, options?: VerifyOptions): Promise<VerificationResult>;
50
- /**
51
- * Quick verification — checks credentials and policy in one call.
52
- *
53
- * Round-18 G4: return shape mirrors `VerificationResult`'s split — partners
54
- * writing custom handlers around `quickVerify` get the same identity/policy
55
- * distinction as those calling `verify()` directly. Map to HTTP status the
56
- * same way: `!identityVerified` → 401; `identityVerified && !policyAllowed`
57
- * → 403.
58
- */
59
- declare function quickVerify(config: GatewayConfig, credentials: AgentCredentials): Promise<{
60
- identityVerified: boolean;
61
- policyAllowed: boolean;
62
- accessLevel: AccessLevel;
63
- reason?: string;
64
- }>;
65
-
66
18
  /**
67
19
  * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
68
20
  * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
@@ -176,30 +128,23 @@ declare function getWellKnownUrls(apiBaseUrl: string): Promise<WellKnownAgenticC
176
128
  declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCommerce | undefined;
177
129
 
178
130
  /**
179
- * AstraSync Universal Verification Gateway
180
- *
181
- * A single verification library for any system to verify AI agents.
182
- * One codebase, multiple deployment targets.
183
- *
184
- * @example
185
- * ```typescript
186
- * import { verify, extractCredentials } from '@astrasyncai/verification-gateway';
131
+ * Round-13 (F14 closure / R13-7): single source-of-truth for the SDK's
132
+ * package version emitted on verify-access bodies (and any future
133
+ * telemetry). Bumped alongside `package.json#version` on every release.
187
134
  *
188
- * const credentials = extractCredentials(request.headers);
189
- * const result = await verify(config, { credentials, purpose: 'data-access' });
135
+ * Why a constant rather than `import pkg from '../package.json'`:
136
+ * - `tsconfig.json` sets `rootDir: ./src`; importing the sibling
137
+ * package.json fails the build with "outside rootDir".
138
+ * - Build-time string replacement (tsup `define`, esbuild banner, etc.)
139
+ * adds toolchain coupling for a trivial gain.
140
+ * - Embedded readonly constant works in every environment (Node, browser,
141
+ * bundlers, Deno) without runtime fs / network access.
190
142
  *
191
- * if (result.identityVerified && result.policyAllowed && result.accessLevel !== 'none') {
192
- * // Grant access based on result.accessLevel
193
- * }
194
- *
195
- * // Or map to HTTP status codes directly:
196
- * if (!result.identityVerified) return res.status(401).json({ ... }); // re-auth
197
- * if (!result.policyAllowed) return res.status(403).json({ ... }); // step up / update PDLSS
198
- * ```
199
- *
200
- * @packageDocumentation
143
+ * Release discipline: a CI lint can grep `package.json#version` against
144
+ * this constant if the two ever diverge in the wild. Round-13 manual bump
145
+ * is fine — bumping both in the release-ceremony commit keeps them
146
+ * lockstep.
201
147
  */
148
+ declare const SDK_VERSION = "3.10.0";
202
149
 
203
- declare const VERSION = "3.4.0";
204
-
205
- export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, VERSION, VerificationRequest, VerificationResult, type VerifyOptions, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, pollStepUpStatus, prefetchWellKnown, quickVerify, verify };
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,68 +1,20 @@
1
- import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, q as VerificationResult, m as StepUpApprovalInfo, o as StepUpOutcome, n as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-DedAJbNI.js';
2
- export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, F as FiatSettlementBinding, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, j as SettlementArtifactBinding, k as SettlementArtifactBindingBase, l as StablecoinSettlementBinding, T as TokenGuidance, p as TrustLevel, r as VerifiedAgent, s as VerifiedDeveloper, t as VerifiedOrganization } from './types-DedAJbNI.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-ThdA_NtL.js';
4
- export { e as express } from './express-C8nJGi5P.js';
5
- export { n as nextjs } from './nextjs-IyXWW2KL.js';
6
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-CBQr4FGs.js';
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';
7
8
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.js';
8
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';
9
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-CuCkjT7B.js';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-CfHurO1P.js';
11
+ export { DEFAULT_EDGE_CONFIG, EdgeConfig, EdgeMode, EdgePathRule, EdgeVerificationDepth, FetchEdgeConfigResult, FetchEdgeConfigSuccess, _resetEdgeConfigCache, degradeToObserve, fetchEdgeConfig, getEdgeConfig, isEdgeConfig, matchEdgePathRule } from './edge-config.js';
12
+ export { DynamicPlatformFingerprint, PLATFORM_AGENT_SIGNATURES, PlatformAgentVendor, PlatformDetectionInput, PlatformFingerprint, PlatformSignatureDef, detectPlatformFingerprint, matchPlatformSignature } from './platform-signatures.js';
13
+ export { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
10
14
  import 'express';
11
15
  import 'next/server';
12
16
  import 'jose';
13
17
 
14
- /**
15
- * AstraSync Universal Verification Gateway - Core Verification Logic
16
- *
17
- * This module handles the core verification logic, calling the AstraSync API
18
- * and processing the response into a standardized VerificationResult.
19
- */
20
-
21
- /**
22
- * Clear the verification cache
23
- */
24
- declare function clearCache(): void;
25
- /**
26
- * Extract agent credentials from various sources
27
- */
28
- declare function extractCredentials(headers: Record<string, string | string[] | undefined>, query?: Record<string, string | undefined>): AgentCredentials;
29
- /**
30
- * Check if credentials are present
31
- */
32
- declare function hasCredentials(credentials: AgentCredentials): boolean;
33
- /**
34
- * Options for a single verify() call (as opposed to GatewayConfig, which is
35
- * per-gateway). Mirrors the Java SDK's `verify(request, bypassCache)`.
36
- */
37
- interface VerifyOptions {
38
- /**
39
- * Skip the cache READ for this call so the request is guaranteed to reach
40
- * the backend (the result is still written to the cache if cacheable).
41
- * Used by the step-up hold-and-poll retry: the re-verify after an approval
42
- * must hit the server to redeem the single-use approval.
43
- */
44
- bypassCache?: boolean;
45
- }
46
- /**
47
- * Main verification function
48
- */
49
- declare function verify(config: GatewayConfig, request: VerificationRequest, options?: VerifyOptions): Promise<VerificationResult>;
50
- /**
51
- * Quick verification — checks credentials and policy in one call.
52
- *
53
- * Round-18 G4: return shape mirrors `VerificationResult`'s split — partners
54
- * writing custom handlers around `quickVerify` get the same identity/policy
55
- * distinction as those calling `verify()` directly. Map to HTTP status the
56
- * same way: `!identityVerified` → 401; `identityVerified && !policyAllowed`
57
- * → 403.
58
- */
59
- declare function quickVerify(config: GatewayConfig, credentials: AgentCredentials): Promise<{
60
- identityVerified: boolean;
61
- policyAllowed: boolean;
62
- accessLevel: AccessLevel;
63
- reason?: string;
64
- }>;
65
-
66
18
  /**
67
19
  * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
68
20
  * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
@@ -176,30 +128,23 @@ declare function getWellKnownUrls(apiBaseUrl: string): Promise<WellKnownAgenticC
176
128
  declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCommerce | undefined;
177
129
 
178
130
  /**
179
- * AstraSync Universal Verification Gateway
180
- *
181
- * A single verification library for any system to verify AI agents.
182
- * One codebase, multiple deployment targets.
183
- *
184
- * @example
185
- * ```typescript
186
- * import { verify, extractCredentials } from '@astrasyncai/verification-gateway';
131
+ * Round-13 (F14 closure / R13-7): single source-of-truth for the SDK's
132
+ * package version emitted on verify-access bodies (and any future
133
+ * telemetry). Bumped alongside `package.json#version` on every release.
187
134
  *
188
- * const credentials = extractCredentials(request.headers);
189
- * const result = await verify(config, { credentials, purpose: 'data-access' });
135
+ * Why a constant rather than `import pkg from '../package.json'`:
136
+ * - `tsconfig.json` sets `rootDir: ./src`; importing the sibling
137
+ * package.json fails the build with "outside rootDir".
138
+ * - Build-time string replacement (tsup `define`, esbuild banner, etc.)
139
+ * adds toolchain coupling for a trivial gain.
140
+ * - Embedded readonly constant works in every environment (Node, browser,
141
+ * bundlers, Deno) without runtime fs / network access.
190
142
  *
191
- * if (result.identityVerified && result.policyAllowed && result.accessLevel !== 'none') {
192
- * // Grant access based on result.accessLevel
193
- * }
194
- *
195
- * // Or map to HTTP status codes directly:
196
- * if (!result.identityVerified) return res.status(401).json({ ... }); // re-auth
197
- * if (!result.policyAllowed) return res.status(403).json({ ... }); // step up / update PDLSS
198
- * ```
199
- *
200
- * @packageDocumentation
143
+ * Release discipline: a CI lint can grep `package.json#version` against
144
+ * this constant if the two ever diverge in the wild. Round-13 manual bump
145
+ * is fine — bumping both in the release-ceremony commit keeps them
146
+ * lockstep.
201
147
  */
148
+ declare const SDK_VERSION = "3.10.0";
202
149
 
203
- declare const VERSION = "3.4.0";
204
-
205
- export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, VERSION, VerificationRequest, VerificationResult, type VerifyOptions, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, pollStepUpStatus, prefetchWellKnown, quickVerify, verify };
150
+ export { EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, SDK_VERSION as VERSION, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, getCachedWellKnownUrls, getWellKnownUrls, pollStepUpStatus, prefetchWellKnown };