@astrasyncai/verification-gateway 3.12.0 → 4.1.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 (134) hide show
  1. package/README.md +106 -29
  2. package/dist/adapter-interface/interface.d.mts +2 -2
  3. package/dist/adapter-interface/interface.d.ts +2 -2
  4. package/dist/adapters/express.d.mts +2 -2
  5. package/dist/adapters/express.d.ts +2 -2
  6. package/dist/adapters/express.js +482 -22
  7. package/dist/adapters/express.js.map +1 -1
  8. package/dist/adapters/express.mjs +482 -22
  9. package/dist/adapters/express.mjs.map +1 -1
  10. package/dist/adapters/http-pdlss.d.mts +3 -3
  11. package/dist/adapters/http-pdlss.d.ts +3 -3
  12. package/dist/adapters/http-pdlss.js.map +1 -1
  13. package/dist/adapters/http-pdlss.mjs.map +1 -1
  14. package/dist/adapters/mcp.d.mts +56 -36
  15. package/dist/adapters/mcp.d.ts +56 -36
  16. package/dist/adapters/mcp.js +309 -10
  17. package/dist/adapters/mcp.js.map +1 -1
  18. package/dist/adapters/mcp.mjs +309 -10
  19. package/dist/adapters/mcp.mjs.map +1 -1
  20. package/dist/adapters/nextjs.d.mts +2 -2
  21. package/dist/adapters/nextjs.d.ts +2 -2
  22. package/dist/adapters/nextjs.js +518 -25
  23. package/dist/adapters/nextjs.js.map +1 -1
  24. package/dist/adapters/nextjs.mjs +518 -25
  25. package/dist/adapters/nextjs.mjs.map +1 -1
  26. package/dist/adapters/sdk.d.mts +2 -2
  27. package/dist/adapters/sdk.d.ts +2 -2
  28. package/dist/adapters/sdk.js +72 -9
  29. package/dist/adapters/sdk.js.map +1 -1
  30. package/dist/adapters/sdk.mjs +72 -9
  31. package/dist/adapters/sdk.mjs.map +1 -1
  32. package/dist/agent/index.d.mts +2 -2
  33. package/dist/agent/index.d.ts +2 -2
  34. package/dist/agent/index.js.map +1 -1
  35. package/dist/agent/index.mjs.map +1 -1
  36. package/dist/bin/astrasync-claude-hook.js +83 -20
  37. package/dist/bin/astrasync-codex-hook.js +83 -20
  38. package/dist/bin/astrasync-guard.js +83 -20
  39. package/dist/bin/astrasync.js +150 -33
  40. package/dist/browser/background.js +83 -20
  41. package/dist/browser/background.js.map +1 -1
  42. package/dist/browser/background.mjs +83 -20
  43. package/dist/browser/background.mjs.map +1 -1
  44. package/dist/browser/browser-adapter.d.mts +2 -2
  45. package/dist/browser/browser-adapter.d.ts +2 -2
  46. package/dist/claude-code/claude-code-adapter.d.mts +2 -2
  47. package/dist/claude-code/claude-code-adapter.d.ts +2 -2
  48. package/dist/cli/index.d.mts +2 -2
  49. package/dist/cli/index.d.ts +2 -2
  50. package/dist/codex/index.d.mts +3 -3
  51. package/dist/codex/index.d.ts +3 -3
  52. package/dist/codex/index.js +83 -20
  53. package/dist/codex/index.js.map +1 -1
  54. package/dist/codex/index.mjs +83 -20
  55. package/dist/codex/index.mjs.map +1 -1
  56. package/dist/cursor/cursor-adapter.d.mts +2 -2
  57. package/dist/cursor/cursor-adapter.d.ts +2 -2
  58. package/dist/cursor/extension.d.mts +2 -2
  59. package/dist/cursor/extension.d.ts +2 -2
  60. package/dist/cursor/extension.js +83 -20
  61. package/dist/cursor/extension.js.map +1 -1
  62. package/dist/cursor/extension.mjs +83 -20
  63. package/dist/cursor/extension.mjs.map +1 -1
  64. package/dist/edge-config.d.mts +22 -7
  65. package/dist/edge-config.d.ts +22 -7
  66. package/dist/edge-config.js.map +1 -1
  67. package/dist/edge-config.mjs.map +1 -1
  68. package/dist/edge-core/index.d.mts +425 -0
  69. package/dist/edge-core/index.d.ts +425 -0
  70. package/dist/edge-core/index.js +1482 -0
  71. package/dist/edge-core/index.js.map +1 -0
  72. package/dist/edge-core/index.mjs +1437 -0
  73. package/dist/edge-core/index.mjs.map +1 -0
  74. package/dist/{express-B39o89gf.d.mts → express-BVd1_3FE.d.ts} +9 -7
  75. package/dist/{express-BuxKNO_q.d.ts → express-D_4hTn5Z.d.mts} +9 -7
  76. package/dist/gateway/gateway.d.mts +2 -2
  77. package/dist/gateway/gateway.d.ts +2 -2
  78. package/dist/gateway/gateway.js +83 -20
  79. package/dist/gateway/gateway.js.map +1 -1
  80. package/dist/gateway/gateway.mjs +83 -20
  81. package/dist/gateway/gateway.mjs.map +1 -1
  82. package/dist/git-trigger/git-hooks.d.mts +2 -2
  83. package/dist/git-trigger/git-hooks.d.ts +2 -2
  84. package/dist/{index-CLHdqs2M.d.ts → index-B0YHu_SP.d.ts} +30 -27
  85. package/dist/{index-DME3w3lf.d.mts → index-BPEBlOsE.d.mts} +30 -27
  86. package/dist/{index-CqydB4ks.d.mts → index-DQb5-_1X.d.mts} +1 -1
  87. package/dist/{index-BG62SXso.d.ts → index-T1aBoUcc.d.ts} +1 -1
  88. package/dist/index.d.mts +11 -11
  89. package/dist/index.d.ts +11 -11
  90. package/dist/index.js +595 -272
  91. package/dist/index.js.map +1 -1
  92. package/dist/index.mjs +592 -272
  93. package/dist/index.mjs.map +1 -1
  94. package/dist/local-evaluator/evaluator.d.mts +2 -2
  95. package/dist/local-evaluator/evaluator.d.ts +2 -2
  96. package/dist/metadata-capture.d.mts +63 -4
  97. package/dist/metadata-capture.d.ts +63 -4
  98. package/dist/metadata-capture.js +67 -0
  99. package/dist/metadata-capture.js.map +1 -1
  100. package/dist/metadata-capture.mjs +64 -0
  101. package/dist/metadata-capture.mjs.map +1 -1
  102. package/dist/{nextjs-D74W7wt-.d.mts → nextjs-WyeVr2Kp.d.mts} +3 -3
  103. package/dist/{nextjs-Ddlw_J1J.d.ts → nextjs-w7RTbP1P.d.ts} +3 -3
  104. package/dist/platform-signatures.d.mts +5 -6
  105. package/dist/platform-signatures.d.ts +5 -6
  106. package/dist/platform-signatures.js.map +1 -1
  107. package/dist/platform-signatures.mjs.map +1 -1
  108. package/dist/registration/index.d.mts +10 -11
  109. package/dist/registration/index.d.ts +10 -11
  110. package/dist/registration/index.js.map +1 -1
  111. package/dist/registration/index.mjs.map +1 -1
  112. package/dist/{sdk-CT7gdkfR.d.ts → sdk-CbTNIkAa.d.mts} +4 -4
  113. package/dist/{sdk-Bn6bj7kt.d.mts → sdk-QeX0Z8Ho.d.ts} +4 -4
  114. package/dist/transport/index.d.mts +2 -2
  115. package/dist/transport/index.d.ts +2 -2
  116. package/dist/transport/index.js.map +1 -1
  117. package/dist/transport/index.mjs.map +1 -1
  118. package/dist/{types-DHu7m9HI.d.ts → types-BLUx92FJ.d.ts} +1 -1
  119. package/dist/{types-Djw4GLtz.d.mts → types-DqfPU5Bl.d.mts} +1 -1
  120. package/dist/{types-BntuzEEn.d.mts → types-r850cOt0.d.mts} +121 -88
  121. package/dist/{types-SDu4Llbe.d.ts → types-sMxBT-nM.d.ts} +121 -88
  122. package/dist/ui/index.d.mts +11 -7
  123. package/dist/ui/index.d.ts +11 -7
  124. package/dist/ui/index.js +13 -9
  125. package/dist/ui/index.js.map +1 -1
  126. package/dist/ui/index.mjs +10 -8
  127. package/dist/ui/index.mjs.map +1 -1
  128. package/dist/verify.d.mts +11 -8
  129. package/dist/verify.d.ts +11 -8
  130. package/dist/verify.js +76 -8
  131. package/dist/verify.js.map +1 -1
  132. package/dist/verify.mjs +75 -8
  133. package/dist/verify.mjs.map +1 -1
  134. package/package.json +8 -2
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.mjs';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-Djw4GLtz.mjs';
3
- import '../types-BntuzEEn.mjs';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-DqfPU5Bl.mjs';
3
+ import '../types-r850cOt0.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-DHu7m9HI.js';
3
- import '../types-SDu4Llbe.js';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-BLUx92FJ.js';
3
+ import '../types-sMxBT-nM.js';
4
4
  import '../metadata-capture.js';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-SDu4Llbe.js';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-sMxBT-nM.js';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -57,7 +57,7 @@ declare function extractMcpCredentials(params: McpParams): AstraSyncCredentials
57
57
  /**
58
58
  * Protocol request -> AstraSync PDLSS purpose category mapping.
59
59
  *
60
- * Per spec v2.6 §7.4.3 commerce purpose mapping table, extended with MPP + x402
60
+ * Commerce purpose mapping table, extended with MPP + x402
61
61
  * entries (April 2026 protocol landscape).
62
62
  */
63
63
  type CommercePurpose = 'commerce.checkout.create' | 'commerce.checkout.update' | 'commerce.checkout.confirm' | 'commerce.checkout.cancel' | 'commerce.payment.execute' | 'commerce.payment.stream' | 'commerce.delegation.intent' | 'commerce.delegation.checkout' | 'commerce.delegation.payment' | 'commerce.identity_probe' | 'commerce.browsing';
@@ -158,7 +158,8 @@ declare function extractX402TransactionValue(req: X402RequestForValue): Transact
158
158
  * RFC 9421 HTTP Message Signatures parser.
159
159
  *
160
160
  * Wraps `structured-headers` (transitive dep of http-message-signatures) to
161
- * parse the Signature-Input and Signature Dictionary headers per RFC 9421 §2.
161
+ * parse the Signature-Input and Signature Dictionary headers per RFC 9421
162
+ * Section 2.
162
163
  *
163
164
  * Produces structured metadata (kid, algorithm, covered components, tag,
164
165
  * created/expires/nonce, signature bytes) without verifying the signature —
@@ -177,7 +178,7 @@ interface RFC9421SignatureParams {
177
178
  kid: string;
178
179
  /** Algorithm declared in the Signature-Input params (e.g. "ecdsa-p256-sha256", "ed25519"). */
179
180
  alg?: string;
180
- /** Covered components, in order, per RFC 9421 §2.1. */
181
+ /** Covered components, in order, per RFC 9421 Section 2.1. */
181
182
  covered: string[];
182
183
  /** Base64url-encoded signature bytes extracted from the paired Signature header. */
183
184
  signatureBase64: string;
@@ -214,9 +215,9 @@ interface ResolveContext {
214
215
  /**
215
216
  * Shared nonce/signature replay-protection store for transport verifiers.
216
217
  *
217
- * Audit F-A1-05: every transport-signature verifier (RFC9421, VI, AP2, ACP,
218
- * MPP) validates a created/expires window but none consult a seen-nonce
219
- * cache. Any captured signed request can be replayed within the (default
218
+ * Rationale: every transport-signature verifier (RFC9421, VI, AP2, ACP,
219
+ * MPP) validates a created/expires window, but without a seen-nonce
220
+ * cache any captured signed request can be replayed within the (default
220
221
  * 300s, now tightened to 60s) tolerance window.
221
222
  *
222
223
  * This module ships a bounded in-memory LRU as the default. Production
@@ -264,11 +265,11 @@ interface RFC9421VerifyRequest {
264
265
  }
265
266
  interface RFC9421VerifyOptions {
266
267
  resolver: RegistryResolver;
267
- /** Seconds of tolerance around created/expires. Default 60 (audit F-A1-05 tightening from 300). */
268
+ /** Seconds of tolerance around created/expires. Default 60 (tightened from 300). */
268
269
  clockSkewSec?: number;
269
270
  /** Injectable for deterministic tests. */
270
271
  now?: () => number;
271
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
272
+ /** Optional replay-protection store. Defaults to in-process LRU. */
272
273
  nonceStore?: NonceStore;
273
274
  }
274
275
  interface RFC9421VerifyResult {
@@ -502,8 +503,8 @@ declare function verifyStripeWebhook(payload: string, signatureHeader: string |
502
503
  * against a transaction context.
503
504
  *
504
505
  * Types 5/6/7 (budget, recurrence, agent_recurrence) extract through but
505
- * enforcement is deferred to the cross-merchant budget service (§3.3.15,
506
- * separate PR). This module returns per-constraint {ok, reason} results
506
+ * enforcement is deferred to the cross-merchant budget service.
507
+ * This module returns per-constraint {ok, reason} results
507
508
  * so a policy layer can decide hard-deny vs trust-signal.
508
509
  */
509
510
 
@@ -722,8 +723,8 @@ declare function extractAP2Mandates(input: AP2MandateTripleInput): AP2MandateTri
722
723
  interface AP2VerifyInput {
723
724
  triple: AP2MandateTriple;
724
725
  /**
725
- * Clock skew tolerance in seconds for expiry checks. Default 60s (audit
726
- * F-A1-05 tightening from the previous 300s default).
726
+ * Clock skew tolerance in seconds for expiry checks. Default 60s
727
+ * (tightened from the previous 300s default).
727
728
  */
728
729
  clockSkewSec?: number;
729
730
  now?: () => number;
@@ -731,7 +732,6 @@ interface AP2VerifyInput {
731
732
  * Optional replay-protection store. Defaults to in-process LRU. When the
732
733
  * payment mandate carries an id, this verifier registers it as seen so
733
734
  * the same payment mandate replayed within the expiry window is rejected.
734
- * Audit F-A1-05.
735
735
  */
736
736
  nonceStore?: NonceStore;
737
737
  }
@@ -780,11 +780,11 @@ interface ACPVerifyInput {
780
780
  jwk: JWK;
781
781
  alg?: ACPSignatureAlgorithm | string;
782
782
  }>;
783
- /** Clock skew tolerance in seconds (default 60, audit F-A1-05 tightening from 300). */
783
+ /** Clock skew tolerance in seconds (default 60, tightened from 300). */
784
784
  clockSkewSec?: number;
785
785
  /** Injectable now for tests. */
786
786
  now?: () => number;
787
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
787
+ /** Optional replay-protection store. Defaults to in-process LRU. */
788
788
  nonceStore?: NonceStore;
789
789
  }
790
790
  interface ACPVerifyResult {
@@ -917,11 +917,11 @@ interface MPPVerifyInput {
917
917
  context: MPPRequestContext;
918
918
  /** Raw request body to validate BodyDigest against, if the challenge declares one. */
919
919
  rawBody?: string;
920
- /** Seconds of clock-skew tolerance on challenge.expires. Default 60 (audit F-A1-05). */
920
+ /** Seconds of clock-skew tolerance on challenge.expires. Default 60. */
921
921
  clockSkewSec?: number;
922
922
  /** Injectable for deterministic tests. */
923
923
  now?: () => number;
924
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
924
+ /** Optional replay-protection store. Defaults to in-process LRU. */
925
925
  nonceStore?: NonceStore;
926
926
  }
927
927
  interface MPPVerifyResult {
@@ -1046,7 +1046,7 @@ interface VILayer {
1046
1046
  }
1047
1047
  interface VIVerifyInput {
1048
1048
  /**
1049
- * Layers in chain order. L1 is REQUIRED by default (audit F-A1-02) —
1049
+ * Layers in chain order. L1 is REQUIRED by default —
1050
1050
  * without L1 there is no chain root and L2 can be verified against any
1051
1051
  * attacker-supplied key. Callers who have resolved L2's signing key by
1052
1052
  * a trusted out-of-band mechanism (wallet binding, prior protocol step)
@@ -1066,14 +1066,14 @@ interface VIVerifyInput {
1066
1066
  */
1067
1067
  verifySignature: (layer: VILayer, expectedKey: JWK | null) => Promise<boolean>;
1068
1068
  /**
1069
- * Clock skew tolerance in seconds for expiry checks. Default 60s (audit
1070
- * F-A1-05 tightening from the previous 300s default).
1069
+ * Clock skew tolerance in seconds for expiry checks. Default 60s
1070
+ * (tightened from the previous 300s default).
1071
1071
  */
1072
1072
  clockSkewSec?: number;
1073
1073
  now?: () => number;
1074
1074
  /**
1075
- * Explicit opt-in to verify a chain with L1 omitted. Audit F-A1-02 fix
1076
- * — defaults to false. When true, `expectedL2Key` MUST also be supplied
1075
+ * Explicit opt-in to verify a chain with L1 omitted.
1076
+ * Defaults to false. When true, `expectedL2Key` MUST also be supplied
1077
1077
  * (used as the expected signing key for L2 verification).
1078
1078
  */
1079
1079
  allowUnboundChain?: boolean;
@@ -1106,8 +1106,10 @@ declare function verifyVIChain(input: VIVerifyInput): Promise<VIVerifyResult>;
1106
1106
  * evaluation + trust signals into a single CommerceContext result.
1107
1107
  *
1108
1108
  * This is AstraSync whitespace: the orchestration over the library-backed
1109
- * primitives. PR 3's Commerce Shield Lambda will call this per request;
1110
- * the admin playground page will call it ad-hoc.
1109
+ * primitives. The backend verify-access service is the sole per-request
1110
+ * caller — the edge adapters forward raw artifacts to verify-access and
1111
+ * never call this module directly. The admin transport playground also
1112
+ * calls it ad-hoc.
1111
1113
  *
1112
1114
  * Policy:
1113
1115
  * - Hard-deny (ok=false) on bad signatures, expired mandates, constraint
@@ -1201,10 +1203,11 @@ interface CommerceContext {
1201
1203
  declare function runCommercePipeline(input: CommercePipelineInput): Promise<CommerceContext>;
1202
1204
 
1203
1205
  /**
1204
- * Pluggable extractor registry for PR 3 Commerce Shield Lambda@Edge.
1206
+ * Pluggable extractor registry for the Trusted Agent Gateway edge
1207
+ * adapters and other callers that need a curated extractor set.
1205
1208
  *
1206
1209
  * Built-in extractors (VI, UCP, ACP, RFC 9421, MPP, x402, Stripe webhook)
1207
- * are NOT auto-registered. PR 3 Lambda imports this module, picks the set
1210
+ * are NOT auto-registered. A caller imports this module, picks the set
1208
1211
  * it wants, and calls registerTransportExtractor() for each.
1209
1212
  *
1210
1213
  * Re-registering by name replaces the prior extractor (idempotent).
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-BntuzEEn.mjs';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport } from './types-r850cOt0.mjs';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -57,7 +57,7 @@ declare function extractMcpCredentials(params: McpParams): AstraSyncCredentials
57
57
  /**
58
58
  * Protocol request -> AstraSync PDLSS purpose category mapping.
59
59
  *
60
- * Per spec v2.6 §7.4.3 commerce purpose mapping table, extended with MPP + x402
60
+ * Commerce purpose mapping table, extended with MPP + x402
61
61
  * entries (April 2026 protocol landscape).
62
62
  */
63
63
  type CommercePurpose = 'commerce.checkout.create' | 'commerce.checkout.update' | 'commerce.checkout.confirm' | 'commerce.checkout.cancel' | 'commerce.payment.execute' | 'commerce.payment.stream' | 'commerce.delegation.intent' | 'commerce.delegation.checkout' | 'commerce.delegation.payment' | 'commerce.identity_probe' | 'commerce.browsing';
@@ -158,7 +158,8 @@ declare function extractX402TransactionValue(req: X402RequestForValue): Transact
158
158
  * RFC 9421 HTTP Message Signatures parser.
159
159
  *
160
160
  * Wraps `structured-headers` (transitive dep of http-message-signatures) to
161
- * parse the Signature-Input and Signature Dictionary headers per RFC 9421 §2.
161
+ * parse the Signature-Input and Signature Dictionary headers per RFC 9421
162
+ * Section 2.
162
163
  *
163
164
  * Produces structured metadata (kid, algorithm, covered components, tag,
164
165
  * created/expires/nonce, signature bytes) without verifying the signature —
@@ -177,7 +178,7 @@ interface RFC9421SignatureParams {
177
178
  kid: string;
178
179
  /** Algorithm declared in the Signature-Input params (e.g. "ecdsa-p256-sha256", "ed25519"). */
179
180
  alg?: string;
180
- /** Covered components, in order, per RFC 9421 §2.1. */
181
+ /** Covered components, in order, per RFC 9421 Section 2.1. */
181
182
  covered: string[];
182
183
  /** Base64url-encoded signature bytes extracted from the paired Signature header. */
183
184
  signatureBase64: string;
@@ -214,9 +215,9 @@ interface ResolveContext {
214
215
  /**
215
216
  * Shared nonce/signature replay-protection store for transport verifiers.
216
217
  *
217
- * Audit F-A1-05: every transport-signature verifier (RFC9421, VI, AP2, ACP,
218
- * MPP) validates a created/expires window but none consult a seen-nonce
219
- * cache. Any captured signed request can be replayed within the (default
218
+ * Rationale: every transport-signature verifier (RFC9421, VI, AP2, ACP,
219
+ * MPP) validates a created/expires window, but without a seen-nonce
220
+ * cache any captured signed request can be replayed within the (default
220
221
  * 300s, now tightened to 60s) tolerance window.
221
222
  *
222
223
  * This module ships a bounded in-memory LRU as the default. Production
@@ -264,11 +265,11 @@ interface RFC9421VerifyRequest {
264
265
  }
265
266
  interface RFC9421VerifyOptions {
266
267
  resolver: RegistryResolver;
267
- /** Seconds of tolerance around created/expires. Default 60 (audit F-A1-05 tightening from 300). */
268
+ /** Seconds of tolerance around created/expires. Default 60 (tightened from 300). */
268
269
  clockSkewSec?: number;
269
270
  /** Injectable for deterministic tests. */
270
271
  now?: () => number;
271
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
272
+ /** Optional replay-protection store. Defaults to in-process LRU. */
272
273
  nonceStore?: NonceStore;
273
274
  }
274
275
  interface RFC9421VerifyResult {
@@ -502,8 +503,8 @@ declare function verifyStripeWebhook(payload: string, signatureHeader: string |
502
503
  * against a transaction context.
503
504
  *
504
505
  * Types 5/6/7 (budget, recurrence, agent_recurrence) extract through but
505
- * enforcement is deferred to the cross-merchant budget service (§3.3.15,
506
- * separate PR). This module returns per-constraint {ok, reason} results
506
+ * enforcement is deferred to the cross-merchant budget service.
507
+ * This module returns per-constraint {ok, reason} results
507
508
  * so a policy layer can decide hard-deny vs trust-signal.
508
509
  */
509
510
 
@@ -722,8 +723,8 @@ declare function extractAP2Mandates(input: AP2MandateTripleInput): AP2MandateTri
722
723
  interface AP2VerifyInput {
723
724
  triple: AP2MandateTriple;
724
725
  /**
725
- * Clock skew tolerance in seconds for expiry checks. Default 60s (audit
726
- * F-A1-05 tightening from the previous 300s default).
726
+ * Clock skew tolerance in seconds for expiry checks. Default 60s
727
+ * (tightened from the previous 300s default).
727
728
  */
728
729
  clockSkewSec?: number;
729
730
  now?: () => number;
@@ -731,7 +732,6 @@ interface AP2VerifyInput {
731
732
  * Optional replay-protection store. Defaults to in-process LRU. When the
732
733
  * payment mandate carries an id, this verifier registers it as seen so
733
734
  * the same payment mandate replayed within the expiry window is rejected.
734
- * Audit F-A1-05.
735
735
  */
736
736
  nonceStore?: NonceStore;
737
737
  }
@@ -780,11 +780,11 @@ interface ACPVerifyInput {
780
780
  jwk: JWK;
781
781
  alg?: ACPSignatureAlgorithm | string;
782
782
  }>;
783
- /** Clock skew tolerance in seconds (default 60, audit F-A1-05 tightening from 300). */
783
+ /** Clock skew tolerance in seconds (default 60, tightened from 300). */
784
784
  clockSkewSec?: number;
785
785
  /** Injectable now for tests. */
786
786
  now?: () => number;
787
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
787
+ /** Optional replay-protection store. Defaults to in-process LRU. */
788
788
  nonceStore?: NonceStore;
789
789
  }
790
790
  interface ACPVerifyResult {
@@ -917,11 +917,11 @@ interface MPPVerifyInput {
917
917
  context: MPPRequestContext;
918
918
  /** Raw request body to validate BodyDigest against, if the challenge declares one. */
919
919
  rawBody?: string;
920
- /** Seconds of clock-skew tolerance on challenge.expires. Default 60 (audit F-A1-05). */
920
+ /** Seconds of clock-skew tolerance on challenge.expires. Default 60. */
921
921
  clockSkewSec?: number;
922
922
  /** Injectable for deterministic tests. */
923
923
  now?: () => number;
924
- /** Optional replay-protection store. Defaults to in-process LRU. Audit F-A1-05. */
924
+ /** Optional replay-protection store. Defaults to in-process LRU. */
925
925
  nonceStore?: NonceStore;
926
926
  }
927
927
  interface MPPVerifyResult {
@@ -1046,7 +1046,7 @@ interface VILayer {
1046
1046
  }
1047
1047
  interface VIVerifyInput {
1048
1048
  /**
1049
- * Layers in chain order. L1 is REQUIRED by default (audit F-A1-02) —
1049
+ * Layers in chain order. L1 is REQUIRED by default —
1050
1050
  * without L1 there is no chain root and L2 can be verified against any
1051
1051
  * attacker-supplied key. Callers who have resolved L2's signing key by
1052
1052
  * a trusted out-of-band mechanism (wallet binding, prior protocol step)
@@ -1066,14 +1066,14 @@ interface VIVerifyInput {
1066
1066
  */
1067
1067
  verifySignature: (layer: VILayer, expectedKey: JWK | null) => Promise<boolean>;
1068
1068
  /**
1069
- * Clock skew tolerance in seconds for expiry checks. Default 60s (audit
1070
- * F-A1-05 tightening from the previous 300s default).
1069
+ * Clock skew tolerance in seconds for expiry checks. Default 60s
1070
+ * (tightened from the previous 300s default).
1071
1071
  */
1072
1072
  clockSkewSec?: number;
1073
1073
  now?: () => number;
1074
1074
  /**
1075
- * Explicit opt-in to verify a chain with L1 omitted. Audit F-A1-02 fix
1076
- * — defaults to false. When true, `expectedL2Key` MUST also be supplied
1075
+ * Explicit opt-in to verify a chain with L1 omitted.
1076
+ * Defaults to false. When true, `expectedL2Key` MUST also be supplied
1077
1077
  * (used as the expected signing key for L2 verification).
1078
1078
  */
1079
1079
  allowUnboundChain?: boolean;
@@ -1106,8 +1106,10 @@ declare function verifyVIChain(input: VIVerifyInput): Promise<VIVerifyResult>;
1106
1106
  * evaluation + trust signals into a single CommerceContext result.
1107
1107
  *
1108
1108
  * This is AstraSync whitespace: the orchestration over the library-backed
1109
- * primitives. PR 3's Commerce Shield Lambda will call this per request;
1110
- * the admin playground page will call it ad-hoc.
1109
+ * primitives. The backend verify-access service is the sole per-request
1110
+ * caller — the edge adapters forward raw artifacts to verify-access and
1111
+ * never call this module directly. The admin transport playground also
1112
+ * calls it ad-hoc.
1111
1113
  *
1112
1114
  * Policy:
1113
1115
  * - Hard-deny (ok=false) on bad signatures, expired mandates, constraint
@@ -1201,10 +1203,11 @@ interface CommerceContext {
1201
1203
  declare function runCommercePipeline(input: CommercePipelineInput): Promise<CommerceContext>;
1202
1204
 
1203
1205
  /**
1204
- * Pluggable extractor registry for PR 3 Commerce Shield Lambda@Edge.
1206
+ * Pluggable extractor registry for the Trusted Agent Gateway edge
1207
+ * adapters and other callers that need a curated extractor set.
1205
1208
  *
1206
1209
  * Built-in extractors (VI, UCP, ACP, RFC 9421, MPP, x402, Stripe webhook)
1207
- * are NOT auto-registered. PR 3 Lambda imports this module, picks the set
1210
+ * are NOT auto-registered. A caller imports this module, picks the set
1208
1211
  * it wants, and calls registerTransportExtractor() for each.
1209
1212
  *
1210
1213
  * Re-registering by name replaces the prior extractor (idempotent).
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-BntuzEEn.mjs';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-r850cOt0.mjs';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-SDu4Llbe.js';
1
+ import { c as AstraSyncCredentials, m as ProtocolTransport, G as GatewayConfig } from './types-sMxBT-nM.js';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
package/dist/index.d.mts CHANGED
@@ -1,16 +1,16 @@
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';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-r850cOt0.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 VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-r850cOt0.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-CbTNIkAa.mjs';
4
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';
5
+ export { e as express } from './express-D_4hTn5Z.mjs';
6
+ export { n as nextjs } from './nextjs-WyeVr2Kp.mjs';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-BPEBlOsE.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-CqydB4ks.mjs';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-DQb5-_1X.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
- export { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
13
+ export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.mjs';
14
14
  import 'express';
15
15
  import 'next/server';
16
16
  import 'jose';
@@ -128,7 +128,7 @@ declare function getWellKnownUrls(apiBaseUrl: string): Promise<WellKnownAgenticC
128
128
  declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCommerce | undefined;
129
129
 
130
130
  /**
131
- * Round-13 (F14 closure / R13-7): single source-of-truth for the SDK's
131
+ * Single source-of-truth for the SDK's
132
132
  * package version emitted on verify-access bodies (and any future
133
133
  * telemetry). Bumped alongside `package.json#version` on every release.
134
134
  *
@@ -141,10 +141,10 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
141
141
  * bundlers, Deno) without runtime fs / network access.
142
142
  *
143
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
144
+ * this constant if the two ever diverge in the wild. A manual bump
145
145
  * is fine — bumping both in the release-ceremony commit keeps them
146
146
  * lockstep.
147
147
  */
148
- declare const SDK_VERSION = "3.12.0";
148
+ declare const SDK_VERSION = "4.1.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,16 +1,16 @@
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';
1
+ import { G as GatewayConfig, s as StepUpApprovalInfo, u as StepUpOutcome, t as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-sMxBT-nM.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 VerificationInterstitialProps, w as VerificationRequest, x as VerificationResult, y as VerifiedAgent, z as VerifiedDeveloper, B as VerifiedOrganization } from './types-sMxBT-nM.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-QeX0Z8Ho.js';
4
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';
5
+ export { e as express } from './express-BVd1_3FE.js';
6
+ export { n as nextjs } from './nextjs-w7RTbP1P.js';
7
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-B0YHu_SP.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-BG62SXso.js';
10
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-T1aBoUcc.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
- export { MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
13
+ export { CAPTURE_SCHEMA_VERSION, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, ObservedMetadata, SanitizeHeadersResult, buildSdkObservedMetadata, deriveConnectionFromHeaders, extractApiKeyFormat, extractPlatformHeaders, sanitizeHeaders } from './metadata-capture.js';
14
14
  import 'express';
15
15
  import 'next/server';
16
16
  import 'jose';
@@ -128,7 +128,7 @@ declare function getWellKnownUrls(apiBaseUrl: string): Promise<WellKnownAgenticC
128
128
  declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCommerce | undefined;
129
129
 
130
130
  /**
131
- * Round-13 (F14 closure / R13-7): single source-of-truth for the SDK's
131
+ * Single source-of-truth for the SDK's
132
132
  * package version emitted on verify-access bodies (and any future
133
133
  * telemetry). Bumped alongside `package.json#version` on every release.
134
134
  *
@@ -141,10 +141,10 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
141
141
  * bundlers, Deno) without runtime fs / network access.
142
142
  *
143
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
144
+ * this constant if the two ever diverge in the wild. A manual bump
145
145
  * is fine — bumping both in the release-ceremony commit keeps them
146
146
  * lockstep.
147
147
  */
148
- declare const SDK_VERSION = "3.12.0";
148
+ declare const SDK_VERSION = "4.1.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 };