@astrasyncai/verification-gateway 5.10.0 → 5.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 (106) hide show
  1. package/README.md +4 -0
  2. package/dist/adapters/express.d.mts +1 -1
  3. package/dist/adapters/express.d.ts +1 -1
  4. package/dist/adapters/express.js +359 -30
  5. package/dist/adapters/express.js.map +1 -1
  6. package/dist/adapters/express.mjs +359 -30
  7. package/dist/adapters/express.mjs.map +1 -1
  8. package/dist/adapters/mcp.d.mts +5 -1
  9. package/dist/adapters/mcp.d.ts +5 -1
  10. package/dist/adapters/mcp.js +168 -41
  11. package/dist/adapters/mcp.js.map +1 -1
  12. package/dist/adapters/mcp.mjs +168 -41
  13. package/dist/adapters/mcp.mjs.map +1 -1
  14. package/dist/adapters/nextjs.d.mts +1 -1
  15. package/dist/adapters/nextjs.d.ts +1 -1
  16. package/dist/adapters/nextjs.js +352 -13
  17. package/dist/adapters/nextjs.js.map +1 -1
  18. package/dist/adapters/nextjs.mjs +352 -13
  19. package/dist/adapters/nextjs.mjs.map +1 -1
  20. package/dist/adapters/sdk.d.mts +9 -1
  21. package/dist/adapters/sdk.d.ts +9 -1
  22. package/dist/adapters/sdk.js +100 -8
  23. package/dist/adapters/sdk.js.map +1 -1
  24. package/dist/adapters/sdk.mjs +100 -8
  25. package/dist/adapters/sdk.mjs.map +1 -1
  26. package/dist/agent/index.js +1 -1
  27. package/dist/agent/index.js.map +1 -1
  28. package/dist/agent/index.mjs +1 -1
  29. package/dist/agent/index.mjs.map +1 -1
  30. package/dist/bin/astrasync-claude-hook.js +805 -16
  31. package/dist/bin/astrasync-codex-hook.js +805 -16
  32. package/dist/bin/astrasync-guard.js +894 -71
  33. package/dist/bin/astrasync.js +951 -74
  34. package/dist/browser/background.js +284 -7
  35. package/dist/browser/background.js.map +1 -1
  36. package/dist/browser/background.mjs +284 -7
  37. package/dist/browser/background.mjs.map +1 -1
  38. package/dist/cli/index.d.mts +8 -8
  39. package/dist/cli/index.d.ts +8 -8
  40. package/dist/cli/index.js +22 -64
  41. package/dist/cli/index.js.map +1 -1
  42. package/dist/cli/index.mjs +22 -64
  43. package/dist/cli/index.mjs.map +1 -1
  44. package/dist/codex/index.d.mts +5 -0
  45. package/dist/codex/index.d.ts +5 -0
  46. package/dist/codex/index.js +821 -24
  47. package/dist/codex/index.js.map +1 -1
  48. package/dist/codex/index.mjs +823 -26
  49. package/dist/codex/index.mjs.map +1 -1
  50. package/dist/cursor/extension.d.mts +9 -2
  51. package/dist/cursor/extension.d.ts +9 -2
  52. package/dist/cursor/extension.js +787 -11
  53. package/dist/cursor/extension.js.map +1 -1
  54. package/dist/cursor/extension.mjs +789 -11
  55. package/dist/cursor/extension.mjs.map +1 -1
  56. package/dist/edge-config.d.mts +1 -1
  57. package/dist/edge-config.d.ts +1 -1
  58. package/dist/edge-config.js +1 -1
  59. package/dist/edge-config.js.map +1 -1
  60. package/dist/edge-config.mjs +1 -1
  61. package/dist/edge-config.mjs.map +1 -1
  62. package/dist/edge-core/index.d.mts +128 -13
  63. package/dist/edge-core/index.d.ts +128 -13
  64. package/dist/edge-core/index.js +337 -55
  65. package/dist/edge-core/index.js.map +1 -1
  66. package/dist/edge-core/index.mjs +334 -55
  67. package/dist/edge-core/index.mjs.map +1 -1
  68. package/dist/enrolment-store-8DyaIOLe.d.mts +26 -0
  69. package/dist/enrolment-store-8DyaIOLe.d.ts +26 -0
  70. package/dist/gateway/gateway.js +284 -7
  71. package/dist/gateway/gateway.js.map +1 -1
  72. package/dist/gateway/gateway.mjs +284 -7
  73. package/dist/gateway/gateway.mjs.map +1 -1
  74. package/dist/git-trigger/git-hooks.d.mts +1 -1
  75. package/dist/git-trigger/git-hooks.d.ts +1 -1
  76. package/dist/index.d.mts +215 -5
  77. package/dist/index.d.ts +215 -5
  78. package/dist/index.js +3756 -80
  79. package/dist/index.js.map +1 -1
  80. package/dist/index.mjs +3748 -80
  81. package/dist/index.mjs.map +1 -1
  82. package/dist/platform-signatures.js +4 -1
  83. package/dist/platform-signatures.js.map +1 -1
  84. package/dist/platform-signatures.mjs +4 -1
  85. package/dist/platform-signatures.mjs.map +1 -1
  86. package/dist/registration/index.js +1 -1
  87. package/dist/registration/index.js.map +1 -1
  88. package/dist/registration/index.mjs +1 -1
  89. package/dist/registration/index.mjs.map +1 -1
  90. package/dist/transport/index.js +1 -1
  91. package/dist/transport/index.js.map +1 -1
  92. package/dist/transport/index.mjs +1 -1
  93. package/dist/transport/index.mjs.map +1 -1
  94. package/dist/{types-CTmUpNpS.d.mts → types-BCkwBA84.d.mts} +12 -0
  95. package/dist/{types-CTmUpNpS.d.ts → types-BCkwBA84.d.ts} +12 -0
  96. package/dist/{types-CtFXmDzm.d.ts → types-C_b4QTyO.d.ts} +18 -0
  97. package/dist/{types-DQrn_kei.d.mts → types-DlshIIR-.d.mts} +18 -0
  98. package/dist/ui/index.d.mts +1 -1
  99. package/dist/ui/index.d.ts +1 -1
  100. package/dist/verify.d.mts +35 -4
  101. package/dist/verify.d.ts +35 -4
  102. package/dist/verify.js +130 -16
  103. package/dist/verify.js.map +1 -1
  104. package/dist/verify.mjs +129 -16
  105. package/dist/verify.mjs.map +1 -1
  106. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { T as TokenGuidance, b as CounterpartyType } from '../types-DQrn_kei.mjs';
1
+ import { T as TokenGuidance, b as CounterpartyType } from '../types-DlshIIR-.mjs';
2
2
  import '../metadata-capture.mjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { T as TokenGuidance, b as CounterpartyType } from '../types-CtFXmDzm.js';
1
+ import { T as TokenGuidance, b as CounterpartyType } from '../types-C_b4QTyO.js';
2
2
  import '../metadata-capture.js';
3
3
 
4
4
  /**
package/dist/index.d.mts CHANGED
@@ -645,6 +645,18 @@ interface VerificationResult {
645
645
  * on misconfig (deterministic — retrying will not help) and on real denials.
646
646
  */
647
647
  retryable?: boolean;
648
+ /**
649
+ * 5.12.0: HTTP status the verify-access backend answered with on a
650
+ * non-2xx (e.g. 429, 503). Lets adapters and integrators tell a platform
651
+ * rate limit apart from an outage. Absent on network errors / timeouts.
652
+ */
653
+ httpStatus?: number;
654
+ /**
655
+ * 5.12.0: the backend's `Retry-After`, in milliseconds, when it sent one
656
+ * (429 / 503). Adapters relay it on their own 503 so callers back off for
657
+ * as long as the platform asked.
658
+ */
659
+ retryAfterMs?: number;
648
660
  /** Whether step-up authentication is required */
649
661
  requiresStepUp?: boolean;
650
662
  /** Whether approval is required */
@@ -1009,6 +1021,12 @@ interface AttemptReport {
1009
1021
  agentId?: string;
1010
1022
  considerationSet?: ConsiderationSet;
1011
1023
  outcome?: AttemptOutcome;
1024
+ /**
1025
+ * Where a catalog view was answered from: `bridge_cache` (the AstraSync
1026
+ * bridge's anonymous cache — no load on the merchant's site) or `merchant`
1027
+ * (fetched fresh). Attribution only.
1028
+ */
1029
+ servedFrom?: 'bridge_cache' | 'merchant';
1012
1030
  }
1013
1031
  /**
1014
1032
  * Raw commerce-protocol artifacts as verify-access accepts them (backend
@@ -1479,9 +1497,24 @@ declare function verify(config: GatewayConfig, request: VerificationRequest, opt
1479
1497
  * Authenticated with the same credentials as verify(); the backend responds
1480
1498
  * 202 and folds the data into the attempt chain keyed by `attemptId`.
1481
1499
  *
1482
- * Fire-and-forget — errors are silently swallowed, never throws.
1500
+ * Fire-and-forget — never throws. 5.12.0: a 429/5xx is retried once
1501
+ * (Retry-After honoured, capped at 2s) off the caller's path; a lost report
1502
+ * is surfaced via `options.onFailure`.
1483
1503
  */
1484
- declare function reportAttempt(config: GatewayConfig, report: AttemptReport): Promise<void>;
1504
+ declare function reportAttempt(config: GatewayConfig, report: AttemptReport, options?: ReportAttemptOptions): Promise<void>;
1505
+ /** 5.12.0: options for {@link reportAttempt}. */
1506
+ interface ReportAttemptOptions {
1507
+ /**
1508
+ * Called once when the report is finally lost (non-retryable status,
1509
+ * network error, or the single retry failed). For counters/telemetry;
1510
+ * exceptions it throws are swallowed.
1511
+ */
1512
+ onFailure?: (failure: {
1513
+ status?: number;
1514
+ error?: string;
1515
+ retried: boolean;
1516
+ }) => void;
1517
+ }
1485
1518
  /**
1486
1519
  * Fetch the per-route policy for an endpoint from the AstraSync backend.
1487
1520
  * v2.9.7 moved policy authority into the dashboard — the SDK no longer
@@ -1571,8 +1604,76 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
1571
1604
  identityVerified: boolean;
1572
1605
  policyAllowed: boolean;
1573
1606
  reason?: string;
1607
+ /**
1608
+ * 5.12.0: verification infrastructure was unavailable (timeout / 5xx /
1609
+ * the platform's 429) — NOT a denial. Callers should fail open on reads
1610
+ * or answer 503 + Retry-After (`retryAfterMs`, else 30s), never 401.
1611
+ */
1612
+ unavailable?: true;
1613
+ retryAfterMs?: number;
1574
1614
  }>;
1575
1615
 
1616
+ /**
1617
+ * 5.12.0 — HTTP adapter failure posture, lifted from edge-core
1618
+ * (`pipeline.ts` isApiErrorResult/unavailableOutcome, `enforce.ts` 503 +
1619
+ * Retry-After + buildUnavailableBody) so the Express and Next.js adapters
1620
+ * and `quickVerify` answer an AstraSync outage the way the edge does.
1621
+ *
1622
+ * The 1 Oct load test: the platform rate-limited a merchant's verify-access
1623
+ * calls (429), the SDK mapped that to `UNAUTHORIZED` 401 and failed closed
1624
+ * — even for anonymous catalogue reads — so the merchant was down for 11
1625
+ * minutes. Fail posture follows success posture:
1626
+ *
1627
+ * - observe routes and anonymous reads (GET/HEAD, no credentials) pass
1628
+ * through, stamped `X-Astra-Verification: unavailable`;
1629
+ * - enforced routes answer 503 + `Retry-After` (the backend's value, else
1630
+ * 30s) + `VERIFICATION_UNAVAILABLE`. Never 401 — the caller's identity
1631
+ * was never evaluated.
1632
+ *
1633
+ * Identity status mapping (contract correction, not a break): credentials
1634
+ * missing → 401; a presented id that is malformed or unknown → 403 with
1635
+ * registration guidance (re-authenticating with the same id cannot help).
1636
+ */
1637
+
1638
+ /** Response header stamped on a fail-open pass-through during an outage. */
1639
+ declare const VERIFICATION_STATUS_HEADER = "X-Astra-Verification";
1640
+ /**
1641
+ * A verify() result that is the SDK's typed, retryable api_error fallback —
1642
+ * infrastructure unavailability (timeout, 5xx, 429), not a policy deny and
1643
+ * not the deterministic merchant misconfig — or an adapter's internal-error
1644
+ * fail-closed result.
1645
+ */
1646
+ declare function isVerificationUnavailable(result: VerificationResult): boolean;
1647
+ /** Retry-After seconds to relay: the backend's value (≥1s), else 30. */
1648
+ declare function unavailableRetryAfterSeconds(result: VerificationResult): number;
1649
+ /** Machine-readable 503 body — same shape as edge-core's buildUnavailableBody. */
1650
+ declare function buildVerificationUnavailableBody(result: VerificationResult): {
1651
+ success: false;
1652
+ error: {
1653
+ code: 'VERIFICATION_UNAVAILABLE';
1654
+ message: string;
1655
+ retryable: true;
1656
+ retryAfterSeconds: number;
1657
+ failures?: VerificationResult['failures'];
1658
+ correlationId?: string;
1659
+ guidance: {
1660
+ message: string;
1661
+ };
1662
+ };
1663
+ };
1664
+ /** True when the deny is about a presented-but-malformed/unknown agent id. */
1665
+ declare function isRejectedIdentityClaim(result: VerificationResult): boolean;
1666
+ /**
1667
+ * HTTP status + code for an ordinary (non-outage, non-misconfig) deny:
1668
+ * missing identity → 401 UNAUTHORIZED; presented-but-rejected id → 403
1669
+ * AGENT_IDENTITY_REJECTED; identity fine but policy denied → 403 with the
1670
+ * adapter's policy code.
1671
+ */
1672
+ declare function denyStatusFor(result: VerificationResult, policyDeniedCode: string): {
1673
+ status: 401 | 403;
1674
+ code: string;
1675
+ };
1676
+
1576
1677
  /**
1577
1678
  * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
1578
1679
  * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
@@ -1828,6 +1929,12 @@ declare class VerificationGatewayClient {
1828
1929
  * fulfil against it only once the order is settled / pending_merchant. An
1829
1930
  * explicit `buyerEmail` (here or on the bridge handoff body) wins over the
1830
1931
  * account default.
1932
+ *
1933
+ * 5.12.0 approval binding: pass the bridge handoff body's `attemptId` (and
1934
+ * the same `checkoutSessionId`) so a step-up approval minted for this cart
1935
+ * is matched to — and only to — this confirm. A held cart's approval is
1936
+ * bound to its checkout session and exact value; a confirm for any other
1937
+ * cart is held for its own approval.
1831
1938
  */
1832
1939
  confirmCheckout(options: {
1833
1940
  astraId?: string;
@@ -1839,6 +1946,8 @@ declare class VerificationGatewayClient {
1839
1946
  currency?: string;
1840
1947
  checkoutSessionId?: string;
1841
1948
  checkoutItems?: VerificationRequest['checkoutItems'];
1949
+ /** 5.12.0: the `att_…` attempt-chain id from the bridge handoff body. */
1950
+ attemptId?: string;
1842
1951
  /** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
1843
1952
  * the platform default `fulfilment.email` to the buyer's account email. */
1844
1953
  buyerEmail?: string;
@@ -3700,6 +3809,10 @@ interface McpMiddlewareOptions extends GatewayConfig {
3700
3809
  * record what WOULD be denied with `failOnError: 'closed'` so merchants
3701
3810
  * can grep correlationId for impact analysis during the observation
3702
3811
  * window. Default flips to `'closed'` in a follow-up release.
3812
+ *
3813
+ * 5.12.0: `'closed'` answers the retryable verification-unavailable
3814
+ * JSON-RPC error (HTTP 503 + Retry-After, code -32003) — never an
3815
+ * identity-shaped 401.
3703
3816
  */
3704
3817
  failOnError?: 'open' | 'closed';
3705
3818
  }
@@ -4832,9 +4945,106 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
4832
4945
  * silently (never throwing), so this is a no-op there — which is correct:
4833
4946
  * in a browser the page's real UA is the honest identity.
4834
4947
  */
4835
- declare const SDK_USER_AGENT = "astrasync-sdk/5.10.0";
4948
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.12.0";
4836
4949
  declare const sdkFetch: typeof fetch;
4837
4950
 
4951
+ interface LocalPolicy {
4952
+ version: string;
4953
+ name: string;
4954
+ description?: string;
4955
+ purposes: LocalPurposeRule[];
4956
+ scope?: LocalScope;
4957
+ limits?: LocalLimits;
4958
+ riskThresholds?: LocalRiskThresholds;
4959
+ selfInstantiation?: LocalSelfInstantiation;
4960
+ }
4961
+ interface LocalPurposeRule {
4962
+ id: string;
4963
+ allowed: boolean;
4964
+ targets?: string[];
4965
+ blockedPatterns?: string[];
4966
+ requiresApproval?: boolean;
4967
+ }
4968
+ interface LocalScope {
4969
+ allowedDomains?: string[];
4970
+ blockedDomains?: string[];
4971
+ blockedResources?: string[];
4972
+ }
4973
+ interface LocalLimits {
4974
+ /**
4975
+ * Autonomous Limit — a transaction value at or below this is granted without
4976
+ * escalation. A value in the band `[autonomousThreshold, maxTransactionAmount)`
4977
+ * requires human approval (step-up → MANUAL_REVIEW), mirroring the backend
4978
+ * `checkWithinLimits` ladder. When omitted there is no autonomous band: every
4979
+ * positive value below the Hard Limit is granted (legacy flat-cap behaviour).
4980
+ */
4981
+ autonomousThreshold?: number;
4982
+ /**
4983
+ * Hard Limit — a transaction value at or above this is denied outright. (Named
4984
+ * `maxTransactionAmount` for backward compatibility with existing local policy
4985
+ * files; it is the SDK equivalent of the backend `approvalThreshold`.)
4986
+ */
4987
+ maxTransactionAmount?: number;
4988
+ maxRequestsPerHour?: number;
4989
+ currency?: string;
4990
+ }
4991
+ interface LocalRiskThresholds {
4992
+ autoAllow: {
4993
+ min: number;
4994
+ max: number;
4995
+ };
4996
+ requireApproval: {
4997
+ min: number;
4998
+ max: number;
4999
+ };
5000
+ autoBlock: {
5001
+ min: number;
5002
+ max: number;
5003
+ };
5004
+ }
5005
+ interface LocalSelfInstantiation {
5006
+ /** Whether sub-agent spawning is allowed */
5007
+ allowed: boolean;
5008
+ /** Maximum depth of sub-agent chain */
5009
+ maxDepth?: number;
5010
+ }
5011
+
5012
+ /**
5013
+ * PDLSS Policy Schema Validation
5014
+ *
5015
+ * Validates local YAML policy files against the PDLSS schema.
5016
+ * Ensures local policies can be uploaded to cloud without lossy transformation.
5017
+ */
5018
+ interface ValidationError {
5019
+ path: string;
5020
+ message: string;
5021
+ }
5022
+ interface ValidationResult {
5023
+ valid: boolean;
5024
+ errors: ValidationError[];
5025
+ }
5026
+ /**
5027
+ * Validate a parsed local policy object against the PDLSS schema.
5028
+ */
5029
+ declare function validatePolicy(policy: unknown): ValidationResult;
5030
+
5031
+ /**
5032
+ * PDLSS Policy Parser
5033
+ *
5034
+ * Parses local YAML policy files into typed LocalPolicy objects.
5035
+ * Validates against the PDLSS schema to ensure cloud compatibility.
5036
+ */
5037
+
5038
+ interface ParseResult {
5039
+ policy: LocalPolicy | null;
5040
+ validation: ValidationResult;
5041
+ rawYaml?: string;
5042
+ }
5043
+ /**
5044
+ * Parse a YAML string into a LocalPolicy.
5045
+ */
5046
+ declare function parseYaml(yamlContent: string): ParseResult;
5047
+
4838
5048
  /**
4839
5049
  * Single source-of-truth for the SDK's
4840
5050
  * package version emitted on verify-access bodies (and any future
@@ -4853,6 +5063,6 @@ declare const sdkFetch: typeof fetch;
4853
5063
  * is fine — bumping both in the release-ceremony commit keeps them
4854
5064
  * lockstep.
4855
5065
  */
4856
- declare const SDK_VERSION = "5.10.0";
5066
+ declare const SDK_VERSION = "5.12.0";
4857
5067
 
4858
- export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
5068
+ export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, buildVerificationUnavailableBody, clearCache, createMcpMiddleware, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isRejectedIdentityClaim, isVerificationUnavailable, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseYaml as parseLocalPolicyYaml, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify };
package/dist/index.d.ts CHANGED
@@ -645,6 +645,18 @@ interface VerificationResult {
645
645
  * on misconfig (deterministic — retrying will not help) and on real denials.
646
646
  */
647
647
  retryable?: boolean;
648
+ /**
649
+ * 5.12.0: HTTP status the verify-access backend answered with on a
650
+ * non-2xx (e.g. 429, 503). Lets adapters and integrators tell a platform
651
+ * rate limit apart from an outage. Absent on network errors / timeouts.
652
+ */
653
+ httpStatus?: number;
654
+ /**
655
+ * 5.12.0: the backend's `Retry-After`, in milliseconds, when it sent one
656
+ * (429 / 503). Adapters relay it on their own 503 so callers back off for
657
+ * as long as the platform asked.
658
+ */
659
+ retryAfterMs?: number;
648
660
  /** Whether step-up authentication is required */
649
661
  requiresStepUp?: boolean;
650
662
  /** Whether approval is required */
@@ -1009,6 +1021,12 @@ interface AttemptReport {
1009
1021
  agentId?: string;
1010
1022
  considerationSet?: ConsiderationSet;
1011
1023
  outcome?: AttemptOutcome;
1024
+ /**
1025
+ * Where a catalog view was answered from: `bridge_cache` (the AstraSync
1026
+ * bridge's anonymous cache — no load on the merchant's site) or `merchant`
1027
+ * (fetched fresh). Attribution only.
1028
+ */
1029
+ servedFrom?: 'bridge_cache' | 'merchant';
1012
1030
  }
1013
1031
  /**
1014
1032
  * Raw commerce-protocol artifacts as verify-access accepts them (backend
@@ -1479,9 +1497,24 @@ declare function verify(config: GatewayConfig, request: VerificationRequest, opt
1479
1497
  * Authenticated with the same credentials as verify(); the backend responds
1480
1498
  * 202 and folds the data into the attempt chain keyed by `attemptId`.
1481
1499
  *
1482
- * Fire-and-forget — errors are silently swallowed, never throws.
1500
+ * Fire-and-forget — never throws. 5.12.0: a 429/5xx is retried once
1501
+ * (Retry-After honoured, capped at 2s) off the caller's path; a lost report
1502
+ * is surfaced via `options.onFailure`.
1483
1503
  */
1484
- declare function reportAttempt(config: GatewayConfig, report: AttemptReport): Promise<void>;
1504
+ declare function reportAttempt(config: GatewayConfig, report: AttemptReport, options?: ReportAttemptOptions): Promise<void>;
1505
+ /** 5.12.0: options for {@link reportAttempt}. */
1506
+ interface ReportAttemptOptions {
1507
+ /**
1508
+ * Called once when the report is finally lost (non-retryable status,
1509
+ * network error, or the single retry failed). For counters/telemetry;
1510
+ * exceptions it throws are swallowed.
1511
+ */
1512
+ onFailure?: (failure: {
1513
+ status?: number;
1514
+ error?: string;
1515
+ retried: boolean;
1516
+ }) => void;
1517
+ }
1485
1518
  /**
1486
1519
  * Fetch the per-route policy for an endpoint from the AstraSync backend.
1487
1520
  * v2.9.7 moved policy authority into the dashboard — the SDK no longer
@@ -1571,8 +1604,76 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
1571
1604
  identityVerified: boolean;
1572
1605
  policyAllowed: boolean;
1573
1606
  reason?: string;
1607
+ /**
1608
+ * 5.12.0: verification infrastructure was unavailable (timeout / 5xx /
1609
+ * the platform's 429) — NOT a denial. Callers should fail open on reads
1610
+ * or answer 503 + Retry-After (`retryAfterMs`, else 30s), never 401.
1611
+ */
1612
+ unavailable?: true;
1613
+ retryAfterMs?: number;
1574
1614
  }>;
1575
1615
 
1616
+ /**
1617
+ * 5.12.0 — HTTP adapter failure posture, lifted from edge-core
1618
+ * (`pipeline.ts` isApiErrorResult/unavailableOutcome, `enforce.ts` 503 +
1619
+ * Retry-After + buildUnavailableBody) so the Express and Next.js adapters
1620
+ * and `quickVerify` answer an AstraSync outage the way the edge does.
1621
+ *
1622
+ * The 1 Oct load test: the platform rate-limited a merchant's verify-access
1623
+ * calls (429), the SDK mapped that to `UNAUTHORIZED` 401 and failed closed
1624
+ * — even for anonymous catalogue reads — so the merchant was down for 11
1625
+ * minutes. Fail posture follows success posture:
1626
+ *
1627
+ * - observe routes and anonymous reads (GET/HEAD, no credentials) pass
1628
+ * through, stamped `X-Astra-Verification: unavailable`;
1629
+ * - enforced routes answer 503 + `Retry-After` (the backend's value, else
1630
+ * 30s) + `VERIFICATION_UNAVAILABLE`. Never 401 — the caller's identity
1631
+ * was never evaluated.
1632
+ *
1633
+ * Identity status mapping (contract correction, not a break): credentials
1634
+ * missing → 401; a presented id that is malformed or unknown → 403 with
1635
+ * registration guidance (re-authenticating with the same id cannot help).
1636
+ */
1637
+
1638
+ /** Response header stamped on a fail-open pass-through during an outage. */
1639
+ declare const VERIFICATION_STATUS_HEADER = "X-Astra-Verification";
1640
+ /**
1641
+ * A verify() result that is the SDK's typed, retryable api_error fallback —
1642
+ * infrastructure unavailability (timeout, 5xx, 429), not a policy deny and
1643
+ * not the deterministic merchant misconfig — or an adapter's internal-error
1644
+ * fail-closed result.
1645
+ */
1646
+ declare function isVerificationUnavailable(result: VerificationResult): boolean;
1647
+ /** Retry-After seconds to relay: the backend's value (≥1s), else 30. */
1648
+ declare function unavailableRetryAfterSeconds(result: VerificationResult): number;
1649
+ /** Machine-readable 503 body — same shape as edge-core's buildUnavailableBody. */
1650
+ declare function buildVerificationUnavailableBody(result: VerificationResult): {
1651
+ success: false;
1652
+ error: {
1653
+ code: 'VERIFICATION_UNAVAILABLE';
1654
+ message: string;
1655
+ retryable: true;
1656
+ retryAfterSeconds: number;
1657
+ failures?: VerificationResult['failures'];
1658
+ correlationId?: string;
1659
+ guidance: {
1660
+ message: string;
1661
+ };
1662
+ };
1663
+ };
1664
+ /** True when the deny is about a presented-but-malformed/unknown agent id. */
1665
+ declare function isRejectedIdentityClaim(result: VerificationResult): boolean;
1666
+ /**
1667
+ * HTTP status + code for an ordinary (non-outage, non-misconfig) deny:
1668
+ * missing identity → 401 UNAUTHORIZED; presented-but-rejected id → 403
1669
+ * AGENT_IDENTITY_REJECTED; identity fine but policy denied → 403 with the
1670
+ * adapter's policy code.
1671
+ */
1672
+ declare function denyStatusFor(result: VerificationResult, policyDeniedCode: string): {
1673
+ status: 401 | 403;
1674
+ code: string;
1675
+ };
1676
+
1576
1677
  /**
1577
1678
  * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
1578
1679
  * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
@@ -1828,6 +1929,12 @@ declare class VerificationGatewayClient {
1828
1929
  * fulfil against it only once the order is settled / pending_merchant. An
1829
1930
  * explicit `buyerEmail` (here or on the bridge handoff body) wins over the
1830
1931
  * account default.
1932
+ *
1933
+ * 5.12.0 approval binding: pass the bridge handoff body's `attemptId` (and
1934
+ * the same `checkoutSessionId`) so a step-up approval minted for this cart
1935
+ * is matched to — and only to — this confirm. A held cart's approval is
1936
+ * bound to its checkout session and exact value; a confirm for any other
1937
+ * cart is held for its own approval.
1831
1938
  */
1832
1939
  confirmCheckout(options: {
1833
1940
  astraId?: string;
@@ -1839,6 +1946,8 @@ declare class VerificationGatewayClient {
1839
1946
  currency?: string;
1840
1947
  checkoutSessionId?: string;
1841
1948
  checkoutItems?: VerificationRequest['checkoutItems'];
1949
+ /** 5.12.0: the `att_…` attempt-chain id from the bridge handoff body. */
1950
+ attemptId?: string;
1842
1951
  /** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
1843
1952
  * the platform default `fulfilment.email` to the buyer's account email. */
1844
1953
  buyerEmail?: string;
@@ -3700,6 +3809,10 @@ interface McpMiddlewareOptions extends GatewayConfig {
3700
3809
  * record what WOULD be denied with `failOnError: 'closed'` so merchants
3701
3810
  * can grep correlationId for impact analysis during the observation
3702
3811
  * window. Default flips to `'closed'` in a follow-up release.
3812
+ *
3813
+ * 5.12.0: `'closed'` answers the retryable verification-unavailable
3814
+ * JSON-RPC error (HTTP 503 + Retry-After, code -32003) — never an
3815
+ * identity-shaped 401.
3703
3816
  */
3704
3817
  failOnError?: 'open' | 'closed';
3705
3818
  }
@@ -4832,9 +4945,106 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
4832
4945
  * silently (never throwing), so this is a no-op there — which is correct:
4833
4946
  * in a browser the page's real UA is the honest identity.
4834
4947
  */
4835
- declare const SDK_USER_AGENT = "astrasync-sdk/5.10.0";
4948
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.12.0";
4836
4949
  declare const sdkFetch: typeof fetch;
4837
4950
 
4951
+ interface LocalPolicy {
4952
+ version: string;
4953
+ name: string;
4954
+ description?: string;
4955
+ purposes: LocalPurposeRule[];
4956
+ scope?: LocalScope;
4957
+ limits?: LocalLimits;
4958
+ riskThresholds?: LocalRiskThresholds;
4959
+ selfInstantiation?: LocalSelfInstantiation;
4960
+ }
4961
+ interface LocalPurposeRule {
4962
+ id: string;
4963
+ allowed: boolean;
4964
+ targets?: string[];
4965
+ blockedPatterns?: string[];
4966
+ requiresApproval?: boolean;
4967
+ }
4968
+ interface LocalScope {
4969
+ allowedDomains?: string[];
4970
+ blockedDomains?: string[];
4971
+ blockedResources?: string[];
4972
+ }
4973
+ interface LocalLimits {
4974
+ /**
4975
+ * Autonomous Limit — a transaction value at or below this is granted without
4976
+ * escalation. A value in the band `[autonomousThreshold, maxTransactionAmount)`
4977
+ * requires human approval (step-up → MANUAL_REVIEW), mirroring the backend
4978
+ * `checkWithinLimits` ladder. When omitted there is no autonomous band: every
4979
+ * positive value below the Hard Limit is granted (legacy flat-cap behaviour).
4980
+ */
4981
+ autonomousThreshold?: number;
4982
+ /**
4983
+ * Hard Limit — a transaction value at or above this is denied outright. (Named
4984
+ * `maxTransactionAmount` for backward compatibility with existing local policy
4985
+ * files; it is the SDK equivalent of the backend `approvalThreshold`.)
4986
+ */
4987
+ maxTransactionAmount?: number;
4988
+ maxRequestsPerHour?: number;
4989
+ currency?: string;
4990
+ }
4991
+ interface LocalRiskThresholds {
4992
+ autoAllow: {
4993
+ min: number;
4994
+ max: number;
4995
+ };
4996
+ requireApproval: {
4997
+ min: number;
4998
+ max: number;
4999
+ };
5000
+ autoBlock: {
5001
+ min: number;
5002
+ max: number;
5003
+ };
5004
+ }
5005
+ interface LocalSelfInstantiation {
5006
+ /** Whether sub-agent spawning is allowed */
5007
+ allowed: boolean;
5008
+ /** Maximum depth of sub-agent chain */
5009
+ maxDepth?: number;
5010
+ }
5011
+
5012
+ /**
5013
+ * PDLSS Policy Schema Validation
5014
+ *
5015
+ * Validates local YAML policy files against the PDLSS schema.
5016
+ * Ensures local policies can be uploaded to cloud without lossy transformation.
5017
+ */
5018
+ interface ValidationError {
5019
+ path: string;
5020
+ message: string;
5021
+ }
5022
+ interface ValidationResult {
5023
+ valid: boolean;
5024
+ errors: ValidationError[];
5025
+ }
5026
+ /**
5027
+ * Validate a parsed local policy object against the PDLSS schema.
5028
+ */
5029
+ declare function validatePolicy(policy: unknown): ValidationResult;
5030
+
5031
+ /**
5032
+ * PDLSS Policy Parser
5033
+ *
5034
+ * Parses local YAML policy files into typed LocalPolicy objects.
5035
+ * Validates against the PDLSS schema to ensure cloud compatibility.
5036
+ */
5037
+
5038
+ interface ParseResult {
5039
+ policy: LocalPolicy | null;
5040
+ validation: ValidationResult;
5041
+ rawYaml?: string;
5042
+ }
5043
+ /**
5044
+ * Parse a YAML string into a LocalPolicy.
5045
+ */
5046
+ declare function parseYaml(yamlContent: string): ParseResult;
5047
+
4838
5048
  /**
4839
5049
  * Single source-of-truth for the SDK's
4840
5050
  * package version emitted on verify-access bodies (and any future
@@ -4853,6 +5063,6 @@ declare const sdkFetch: typeof fetch;
4853
5063
  * is fine — bumping both in the release-ceremony commit keeps them
4854
5064
  * lockstep.
4855
5065
  */
4856
- declare const SDK_VERSION = "5.10.0";
5066
+ declare const SDK_VERSION = "5.12.0";
4857
5067
 
4858
- export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
5068
+ export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, buildVerificationUnavailableBody, clearCache, createMcpMiddleware, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isRejectedIdentityClaim, isVerificationUnavailable, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseYaml as parseLocalPolicyYaml, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify };