@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.
- package/README.md +106 -29
- package/dist/adapter-interface/interface.d.mts +2 -2
- package/dist/adapter-interface/interface.d.ts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.js +482 -22
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +482 -22
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/http-pdlss.d.mts +3 -3
- package/dist/adapters/http-pdlss.d.ts +3 -3
- package/dist/adapters/http-pdlss.js.map +1 -1
- package/dist/adapters/http-pdlss.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +56 -36
- package/dist/adapters/mcp.d.ts +56 -36
- package/dist/adapters/mcp.js +309 -10
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +309 -10
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +2 -2
- package/dist/adapters/nextjs.d.ts +2 -2
- package/dist/adapters/nextjs.js +518 -25
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +518 -25
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +2 -2
- package/dist/adapters/sdk.d.ts +2 -2
- package/dist/adapters/sdk.js +72 -9
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +72 -9
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +83 -20
- package/dist/bin/astrasync-codex-hook.js +83 -20
- package/dist/bin/astrasync-guard.js +83 -20
- package/dist/bin/astrasync.js +150 -33
- package/dist/browser/background.js +83 -20
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +83 -20
- package/dist/browser/background.mjs.map +1 -1
- package/dist/browser/browser-adapter.d.mts +2 -2
- package/dist/browser/browser-adapter.d.ts +2 -2
- package/dist/claude-code/claude-code-adapter.d.mts +2 -2
- package/dist/claude-code/claude-code-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/codex/index.d.mts +3 -3
- package/dist/codex/index.d.ts +3 -3
- package/dist/codex/index.js +83 -20
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +83 -20
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/cursor-adapter.d.mts +2 -2
- package/dist/cursor/cursor-adapter.d.ts +2 -2
- package/dist/cursor/extension.d.mts +2 -2
- package/dist/cursor/extension.d.ts +2 -2
- package/dist/cursor/extension.js +83 -20
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +83 -20
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +22 -7
- package/dist/edge-config.d.ts +22 -7
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +425 -0
- package/dist/edge-core/index.d.ts +425 -0
- package/dist/edge-core/index.js +1482 -0
- package/dist/edge-core/index.js.map +1 -0
- package/dist/edge-core/index.mjs +1437 -0
- package/dist/edge-core/index.mjs.map +1 -0
- package/dist/{express-B39o89gf.d.mts → express-BVd1_3FE.d.ts} +9 -7
- package/dist/{express-BuxKNO_q.d.ts → express-D_4hTn5Z.d.mts} +9 -7
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +83 -20
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +83 -20
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +2 -2
- package/dist/git-trigger/git-hooks.d.ts +2 -2
- package/dist/{index-CLHdqs2M.d.ts → index-B0YHu_SP.d.ts} +30 -27
- package/dist/{index-DME3w3lf.d.mts → index-BPEBlOsE.d.mts} +30 -27
- package/dist/{index-CqydB4ks.d.mts → index-DQb5-_1X.d.mts} +1 -1
- package/dist/{index-BG62SXso.d.ts → index-T1aBoUcc.d.ts} +1 -1
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +595 -272
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +592 -272
- package/dist/index.mjs.map +1 -1
- package/dist/local-evaluator/evaluator.d.mts +2 -2
- package/dist/local-evaluator/evaluator.d.ts +2 -2
- package/dist/metadata-capture.d.mts +63 -4
- package/dist/metadata-capture.d.ts +63 -4
- package/dist/metadata-capture.js +67 -0
- package/dist/metadata-capture.js.map +1 -1
- package/dist/metadata-capture.mjs +64 -0
- package/dist/metadata-capture.mjs.map +1 -1
- package/dist/{nextjs-D74W7wt-.d.mts → nextjs-WyeVr2Kp.d.mts} +3 -3
- package/dist/{nextjs-Ddlw_J1J.d.ts → nextjs-w7RTbP1P.d.ts} +3 -3
- package/dist/platform-signatures.d.mts +5 -6
- package/dist/platform-signatures.d.ts +5 -6
- package/dist/platform-signatures.js.map +1 -1
- package/dist/platform-signatures.mjs.map +1 -1
- package/dist/registration/index.d.mts +10 -11
- package/dist/registration/index.d.ts +10 -11
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/{sdk-CT7gdkfR.d.ts → sdk-CbTNIkAa.d.mts} +4 -4
- package/dist/{sdk-Bn6bj7kt.d.mts → sdk-QeX0Z8Ho.d.ts} +4 -4
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-DHu7m9HI.d.ts → types-BLUx92FJ.d.ts} +1 -1
- package/dist/{types-Djw4GLtz.d.mts → types-DqfPU5Bl.d.mts} +1 -1
- package/dist/{types-BntuzEEn.d.mts → types-r850cOt0.d.mts} +121 -88
- package/dist/{types-SDu4Llbe.d.ts → types-sMxBT-nM.d.ts} +121 -88
- package/dist/ui/index.d.mts +11 -7
- package/dist/ui/index.d.ts +11 -7
- package/dist/ui/index.js +13 -9
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +10 -8
- package/dist/ui/index.mjs.map +1 -1
- package/dist/verify.d.mts +11 -8
- package/dist/verify.d.ts +11 -8
- package/dist/verify.js +76 -8
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +75 -8
- package/dist/verify.mjs.map +1 -1
- 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
|
|
10
|
-
| ----------------------------------------------------------------------------------------- |
|
|
11
|
-
| **Registering an agent with the KYA backend** | `@astrasyncai/verification-gateway/registration`
|
|
12
|
-
| **Building an agent that calls out to other services** (per-request credential injection) | `@astrasyncai/verification-gateway/agent`
|
|
13
|
-
| **Running an Express API that AI agents call into** | `@astrasyncai/verification-gateway/express`
|
|
14
|
-
| **Running a Next.js app that AI agents call into** | `@astrasyncai/verification-gateway/nextjs`
|
|
15
|
-
| **Running an MCP server that AI agents call into** | `@astrasyncai/verification-gateway/mcp`
|
|
16
|
-
| **Doing direct verification (no framework)** | `@astrasyncai/verification-gateway/sdk`
|
|
17
|
-
| **Parsing protocol-level credentials** (HTTP / A2A / MCP / x402 / AP2 / MPP) | `@astrasyncai/verification-gateway/transport`
|
|
18
|
-
| **Evaluating PDLSS offline** (local / hybrid mode) | `@astrasyncai/verification-gateway/gateway`
|
|
19
|
-
| **Governing Claude Code with a local policy** | `@astrasyncai/verification-gateway/claude-code`
|
|
20
|
-
| **Receiving webhook callbacks** | `@astrasyncai/verification-gateway/webhooks`
|
|
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
|
|
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
|
-
|
|
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
|
|
316
|
-
|
|
|
317
|
-
| `none`
|
|
318
|
-
| `
|
|
319
|
-
| `read-only`
|
|
320
|
-
| `standard`
|
|
321
|
-
| `full`
|
|
322
|
-
| `internal`
|
|
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 {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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
|
-
##
|
|
570
|
+
## Verification interstitial
|
|
565
571
|
|
|
566
|
-
When an unverified agent visits a protected page, the
|
|
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-
|
|
3
|
-
import '../types-
|
|
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-
|
|
3
|
-
import '../types-
|
|
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-
|
|
3
|
-
export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-
|
|
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-
|
|
3
|
-
export { c as createMiddleware, a as extractAstraSyncCredentials } from '../express-
|
|
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';
|