@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
package/README.md CHANGED
@@ -6,18 +6,19 @@ The AstraSync KYA Platform SDK. One package, two roles: register agents with the
6
6
 
7
7
  As of v2.4.0 this is the only npm package you need for AstraSync integration. Pick the subpath that matches what you're doing:
8
8
 
9
- | If you're… | Import from | Get |
10
- | ----------------------------------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------- |
11
- | **Registering an agent with the KYA backend** | `@astrasyncai/verification-gateway/registration` | `AstraSync` class — `register()`, `verify()`, `health()`. The `astrasync` CLI is bundled too. |
12
- | **Building an agent that calls out to other services** (per-request credential injection) | `@astrasyncai/verification-gateway/agent` | `AgentClient`, `ChallengeHandler`, ownership validation, runtime PDLSS shape. |
13
- | **Running an Express API that AI agents call into** | `@astrasyncai/verification-gateway/express` | `createMiddleware()` — protect routes, attach verification context. |
14
- | **Running a Next.js app that AI agents call into** | `@astrasyncai/verification-gateway/nextjs` | `createMiddleware()`, Commerce Shield wiring. |
15
- | **Running an MCP server that AI agents call into** | `@astrasyncai/verification-gateway/mcp` | MCP tool gates + inner-hop dedupe headers. |
16
- | **Doing direct verification (no framework)** | `@astrasyncai/verification-gateway/sdk` | `VerificationGatewayClient` with retry / backoff / timeout. |
17
- | **Parsing protocol-level credentials** (HTTP / A2A / MCP / x402 / AP2 / MPP) | `@astrasyncai/verification-gateway/transport` | Cross-protocol credential extraction + injection. |
18
- | **Evaluating PDLSS offline** (local / hybrid mode) | `@astrasyncai/verification-gateway/gateway` | `AstraSyncGateway` (online / local / hybrid). |
19
- | **Governing Claude Code with a local policy** | `@astrasyncai/verification-gateway/claude-code` | PreToolUse-hook adapter; `astrasync-guard install-claude-code` sets it up. |
20
- | **Receiving webhook callbacks** | `@astrasyncai/verification-gateway/webhooks` | `verifyAstraSyncWebhook()`, `signAstraSyncWebhook()`. |
9
+ | If you're… | Import from | Get |
10
+ | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
11
+ | **Registering an agent with the KYA backend** | `@astrasyncai/verification-gateway/registration` | `AstraSync` class — `register()`, `verify()`, `health()`. The `astrasync` CLI is bundled too. |
12
+ | **Building an agent that calls out to other services** (per-request credential injection) | `@astrasyncai/verification-gateway/agent` | `AgentClient`, `ChallengeHandler`, ownership validation, runtime PDLSS shape. |
13
+ | **Running an Express API that AI agents call into** | `@astrasyncai/verification-gateway/express` | `createMiddleware()` — protect routes, attach verification context. |
14
+ | **Running a Next.js app that AI agents call into** | `@astrasyncai/verification-gateway/nextjs` | `createMiddleware()`, verification-interstitial wiring. |
15
+ | **Running an MCP server that AI agents call into** | `@astrasyncai/verification-gateway/mcp` | MCP tool gates + inner-hop dedupe headers. |
16
+ | **Doing direct verification (no framework)** | `@astrasyncai/verification-gateway/sdk` | `VerificationGatewayClient` with retry / backoff / timeout. |
17
+ | **Parsing protocol-level credentials** (HTTP / A2A / MCP / x402 / AP2 / MPP) | `@astrasyncai/verification-gateway/transport` | Cross-protocol credential extraction + injection. |
18
+ | **Evaluating PDLSS offline** (local / hybrid mode) | `@astrasyncai/verification-gateway/gateway` | `AstraSyncGateway` (online / local / hybrid). |
19
+ | **Governing Claude Code with a local policy** | `@astrasyncai/verification-gateway/claude-code` | PreToolUse-hook adapter; `astrasync-guard install-claude-code` sets it up. |
20
+ | **Receiving webhook callbacks** | `@astrasyncai/verification-gateway/webhooks` | `verifyAstraSyncWebhook()`, `signAstraSyncWebhook()`. |
21
+ | **Building on the Trusted Agent Gateway edge machinery** | `.../edge-config`, `.../platform-signatures`, `.../metadata-capture` | Dashboard-managed edge policy, platform fingerprint registry, shared header sanitiser — see [Metadata capture](#metadata-capture). |
21
22
 
22
23
  > All subpaths talk to the same backend — `POST /agents/verify-access` for verification, `POST /agents/register` for registration. The contract is shared; the role is just which side of the handshake you're sitting on.
23
24
 
@@ -28,7 +29,7 @@ Before v2.4.0 the agent-registration half shipped as a separate package (`@astra
28
29
  The Verification Gateway provides a single, universal solution for verifying AI agents. One codebase, multiple deployment targets:
29
30
 
30
31
  - **Express.js middleware** - Protect API endpoints
31
- - **Next.js middleware** - Protect web applications with Commerce Shield
32
+ - **Next.js middleware** - Protect web applications with the verification interstitial
32
33
  - **SDK functions** - Direct verification for agent-to-agent or serverless
33
34
 
34
35
  All verification flows through the same `POST /agents/verify-access` endpoint, ensuring consistent PDLSS (Permission, Duration, Limit, Scope, Self-instantiation) enforcement.
@@ -75,7 +76,7 @@ export const middleware = createMiddleware({
75
76
  apiBaseUrl: 'https://api.astrasync.ai',
76
77
  apiKey: process.env.ASTRASYNC_API_KEY,
77
78
  counterpartyId: 'ASTRAE-...',
78
- showCommerceShield: true,
79
+ showInterstitial: true,
79
80
  });
80
81
 
81
82
  export const config = {
@@ -312,14 +313,14 @@ the claimed agent. The marker only gates the dedupe-skip decision.
312
313
 
313
314
  ## Access Levels
314
315
 
315
- | Level | Description |
316
- | ----------- | --------------------------------- |
317
- | `none` | No credentials provided |
318
- | `guidance` | Commerce Shield overlay shown |
319
- | `read-only` | Can browse, no mutations |
320
- | `standard` | Normal access per PDLSS |
321
- | `full` | Full access for high-trust agents |
322
- | `internal` | Organization member access |
316
+ | Level | Description |
317
+ | ------------ | ----------------------------------------------- |
318
+ | `none` | No credentials provided |
319
+ | `restricted` | Minimal access; verification interstitial shown |
320
+ | `read-only` | Can browse, no mutations |
321
+ | `standard` | Normal access per PDLSS |
322
+ | `full` | Full access for high-trust agents |
323
+ | `internal` | Organization member access |
323
324
 
324
325
  ## Trust Levels
325
326
 
@@ -335,10 +336,15 @@ the claimed agent. The marker only gates the dedupe-skip decision.
335
336
  The package includes React components for displaying verification status:
336
337
 
337
338
  ```tsx
338
- import { CommerceShield, TrustLevelBadge, GuidanceCard } from '@astrasyncai/verification-gateway/ui';
339
-
340
- // Commerce Shield overlay
341
- <CommerceShield
339
+ import {
340
+ VerificationInterstitial,
341
+ TrustLevelBadge,
342
+ GuidanceCard,
343
+ } from '@astrasyncai/verification-gateway/ui';
344
+
345
+ // Verification interstitial overlay (renamed from CommerceShield in 4.1.0;
346
+ // the old component/hook/props names still work as deprecated aliases)
347
+ <VerificationInterstitial
342
348
  visible={!verified}
343
349
  result={verificationResult}
344
350
  onRegister={() => window.location.href = '/register'}
@@ -561,16 +567,81 @@ interface GatewayConfig {
561
567
  }
562
568
  ```
563
569
 
564
- ## Commerce Shield
570
+ ## Verification interstitial
565
571
 
566
- When an unverified agent visits a protected page, the Commerce Shield overlay displays:
572
+ When an unverified agent visits a protected web page, the Next.js middleware serves the **verification interstitial** — an HTML overlay (user-visible title: "AstraSync Agent Verification") that displays:
567
573
 
568
574
  - Registration guidance
569
575
  - Steps to get verified
570
576
  - Link to documentation
571
577
  - Optional guest access
572
578
 
573
- This creates a smooth experience for agents while maintaining security.
579
+ This creates a smooth experience for agents while maintaining security. Control it with `showInterstitial` (default `true`) on the Next.js middleware options; the React building blocks ship on the `./ui` subpath (see [UI Components](#ui-components)).
580
+
581
+ > **Renamed in 4.1.0** — this feature was previously called "Commerce Shield". The old names still work as deprecated aliases and will be removed in the next major: `showCommerceShield` (option; `showInterstitial` wins when both are set), `CommerceShield` / `useCommerceShield` / `CommerceShieldProps` (from `./ui` and the root barrel).
582
+
583
+ ## Trusted Agent Gateway (edge adapters)
584
+
585
+ The **Trusted Agent Gateway (TAG)** is AstraSync's verification gateway at the CDN edge: it classifies and (optionally) verifies every inbound agent request in front of your existing site — in **observe** mode (verify, classify, and record everything; block nothing) or **enforce** mode — with zero site changes. Two packages deploy it:
586
+
587
+ - [`@astrasyncai/adapter-lambda`](https://www.npmjs.com/package/@astrasyncai/adapter-lambda) — CloudFront / Lambda@Edge (CloudFormation template + deploy script included).
588
+ - [`@astrasyncai/adapter-edge`](https://www.npmjs.com/package/@astrasyncai/adapter-edge) — Vercel Edge Middleware, Cloudflare Workers, and Fastly Compute, via per-platform subpaths (shipping in this release).
589
+
590
+ Both consume the same dashboard-managed policy (`./edge-config`), the same platform fingerprint registry (`./platform-signatures`), and the same header sanitiser (`./metadata-capture`) as this SDK — one classification everywhere.
591
+
592
+ ### What each integration captures
593
+
594
+ | Integration | Header-level capture (`ObservedMetadata`) | Connection layer (IP / ASN / country / TLS / HTTP version / device class) |
595
+ | ------------------------------------------------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
596
+ | Edge adapters (`adapter-lambda`, `adapter-edge`) | Yes | **Yes** — native platform signals (the authoritative source) |
597
+ | `express` + `nextjs` SDK adapters | Yes — **automatic on every verify** (no config, no opt-out) | Derived from CDN-injected headers when your origin sits behind Cloudflare / Fastly / Vercel / CloudFront (`deriveConnectionFromHeaders`, from 4.1.0); absent otherwise |
598
+ | `mcp` SDK adapter | Yes — from 4.1.0 | Same CDN-header derivation as express/nextjs |
599
+
600
+ > **Note:** `runCommercePipeline` (on the `./transport` subpath) is the **server-side** orchestrator of commerce-protocol verification — it runs inside the AstraSync verify-access service. The edge adapters forward raw commerce artifacts to verify-access and never bundle or call the pipeline themselves.
601
+
602
+ ### Which `EdgeConfig` fields each integration consumes
603
+
604
+ The dashboard-managed `EdgeConfig` drives the **edge** posture. The observe/enforce × depth posture is **edge-only by design**: SDK adapters enforce via your dashboard **route policy** (fetched automatically on startup), not via `EdgeConfig` — the SDK consumes only the `sampling` block, which governs its anonymous traffic beacon.
605
+
606
+ | `EdgeConfig` field | Edge adapters (`adapter-lambda`, `adapter-edge`) | SDK adapters (`express` / `nextjs` / `mcp`) |
607
+ | ------------------------------ | ------------------------------------------------ | ------------------------------------------------- |
608
+ | `mode` (`observe` / `enforce`) | Yes — the deployment posture | — (enforcement comes from dashboard route policy) |
609
+ | `depth` | Yes — classify / authenticate / authorize | — |
610
+ | `pathRules` | Yes — per-path mode/depth/skip overrides | — |
611
+ | `sampling.anonymousBeaconRate` | Yes — anonymous-bot beacon sampling | Yes — governs the SDK anonymous beacon |
612
+ | `failurePosture` | Yes — always fail-open in v1 | — |
613
+
614
+ ## Metadata capture
615
+
616
+ Three subpath exports back the capture machinery (all edge-safe — no Node built-ins — and also re-exported flat from the package root):
617
+
618
+ ### `./metadata-capture`
619
+
620
+ The ONE sanitiser deciding what is safe to store from an inbound agent's request. Used identically by the edge adapters, the SDK adapters, and the backend.
621
+
622
+ - `sanitizeHeaders(raw)` → `{ headers, apiKeyFormat?, platformHeaders? }` — drops genuine secrets (cookies, signatures, AstraSync credential headers), reduces credential headers to a safe **format prefix** (e.g. `sk-ant-api03` — a platform signal, never the key), keeps everything else verbatim, and enforces size caps (`MAX_HEADERS`, `MAX_HEADER_VALUE_BYTES`, `MAX_TOTAL_BYTES`).
623
+ - `extractApiKeyFormat(value)` — the safe key-format prefix of a credential header value, or `undefined` for unrecognised/opaque tokens.
624
+ - `extractPlatformHeaders(sanitized)` — the platform-signal subset (`openai-organization`, `anthropic-version`, `x-goog-user-project`, …) of an already-sanitised map.
625
+ - `deriveConnectionFromHeaders(headers)` — promotes CDN-injected headers (Cloudflare / Fastly / Vercel / CloudFront geo, client-IP, and TLS-fingerprint headers, incl. `cf-ja3-hash` / `cf-ja4`) into the `connection` block, so SDK-only deployments behind a CDN still get connection-layer attribution. Native edge signals remain authoritative; this is the SDK-level fallback.
626
+ - `buildSdkObservedMetadata(rawHeaders)` — the one builder the express / nextjs / mcp adapters share: sanitised headers + `apiKeyFormat` + `platformHeaders` + derived `connection` + `schemaVersion`.
627
+ - `CAPTURE_SCHEMA_VERSION` — the capture-semantics version stamped on every `ObservedMetadata` (currently `1`). Capture semantics are **frozen within a major version**: `schemaVersion` bumps only on a semantic change to what is kept/dropped/derived, never for additive signals. The verify body's `sdkVersion` disambiguates builds.
628
+ - Types: `ObservedMetadata` (`{ headers, apiKeyFormat?, platformHeaders?, connection?, schemaVersion? }` — `connection` is populated natively by edge adapters and via CDN-header derivation by SDK adapters), `SanitizeHeadersResult`.
629
+
630
+ ### `./platform-signatures`
631
+
632
+ The shared registry of known platform-agent fingerprints (Claude / ChatGPT / Gemini / Cursor / Goose / Perplexity) — the single source of truth for backend and edge classification.
633
+
634
+ - `PLATFORM_AGENT_SIGNATURES` — the seed signature set (UA patterns, agent-card patterns, API-key-format patterns, header patterns).
635
+ - `detectPlatformFingerprint(input)` → `{ vendor, fingerprintKey, displayName } | undefined` — first-match-wins detection over the seed set.
636
+ - `matchPlatformSignature(signatures, input)` — the same matcher over a caller-supplied signature set (for merged/dynamic registries).
637
+
638
+ ### `./edge-config`
639
+
640
+ The per-endpoint policy a Trusted Agent Gateway deployment fetches from the AstraSync dashboard.
641
+
642
+ - `getEdgeConfig(config, counterpartyId)` — cached fetch (TTL + stale-while-revalidate). Fail posture is asymmetric by design: an unreachable backend can never turn enforcement ON, and a config stale for >24h automatically degrades any `enforce` back to `observe`.
643
+ - `fetchEdgeConfig(...)` — one uncached fetch (ETag/304 aware); `matchEdgePathRule(rules, path)` — first-match-wins `*`-glob path rules; `degradeToObserve(config)`; `isEdgeConfig(value)`; `DEFAULT_EDGE_CONFIG` (observe-only, classify depth).
644
+ - Types: `EdgeConfig` (`{ version, mode, depth, pathRules, sampling, failurePosture }`), `EdgeMode` (`'observe' | 'enforce'`), `EdgeVerificationDepth` (`'classify' | 'authenticate' | 'authorize'`), `EdgePathRule`.
574
645
 
575
646
  ## Two `baseUrl` conventions — same package, different clients
576
647
 
@@ -627,6 +698,12 @@ The installer registers the `astrasync-claude-hook` binary in Claude Code's `set
627
698
 
628
699
  ## Changelog
629
700
 
701
+ ### v4.1.0 — Trusted Agent Gateway naming + MCP metadata capture
702
+
703
+ - The Next.js unverified-agent overlay is now the **verification interstitial**: `showInterstitial` option, `VerificationInterstitial` / `useVerificationInterstitial` / `VerificationInterstitialProps`. The old `showCommerceShield` / `CommerceShield` / `useCommerceShield` / `CommerceShieldProps` names keep working as deprecated aliases until the next major (`showInterstitial` wins when both options are set).
704
+ - The MCP middleware now captures header-level `ObservedMetadata` on every verify-access call (parity with the express/nextjs adapters).
705
+ - The edge product is the **Trusted Agent Gateway (TAG)** — see the new README sections above.
706
+
630
707
  ### v3.8.0 — Settlement voucher wire format v2
631
708
 
632
709
  - **BREAKING type change:** `SettlementArtifact.binding` is now a union — `StablecoinSettlementBinding` (v2: `amountMinor` integer minor units + `assetDecimals`, pinned `chainId`/`tokenContract`/CAIP-19 `asset`) or `FiatSettlementBinding` (processor artifacts keep major-unit `amount`). The float `amount` field is gone from stablecoin bindings. Matches the server's `ver: 2` wire format, which redeems/verifies reject other versions of.
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.mjs';
2
- import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-Djw4GLtz.mjs';
3
- import '../types-BntuzEEn.mjs';
2
+ import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } 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 { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-DHu7m9HI.js';
3
- import '../types-SDu4Llbe.js';
2
+ import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } 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
1
  import 'express';
2
- import '../types-BntuzEEn.mjs';
3
- export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-B39o89gf.mjs';
2
+ import '../types-r850cOt0.mjs';
3
+ export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-D_4hTn5Z.mjs';
4
4
  import '../metadata-capture.mjs';
@@ -1,4 +1,4 @@
1
1
  import 'express';
2
- import '../types-SDu4Llbe.js';
3
- export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-BuxKNO_q.js';
2
+ import '../types-sMxBT-nM.js';
3
+ export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-BVd1_3FE.js';
4
4
  import '../metadata-capture.js';