@astrasyncai/verification-gateway 5.20.0 → 5.21.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/CHANGELOG.md +50 -3
- package/README.md +2 -2
- package/dist/adapters/express.d.mts +1 -1
- package/dist/adapters/express.d.ts +1 -1
- package/dist/adapters/express.js +1 -1
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +1 -1
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.d.ts +1 -1
- package/dist/adapters/mcp.js +1 -1
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +1 -1
- package/dist/adapters/nextjs.d.ts +1 -1
- package/dist/adapters/nextjs.js +1 -1
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +1 -1
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +8 -31
- package/dist/adapters/sdk.d.ts +8 -31
- package/dist/adapters/sdk.js +8 -22
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +8 -22
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +2 -2
- package/dist/bin/astrasync-codex-hook.js +2 -2
- package/dist/bin/astrasync-guard.js +2 -2
- package/dist/bin/astrasync.js +15 -2
- package/dist/browser/background.js +2 -2
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +2 -2
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +2 -2
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +2 -2
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +2 -2
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +2 -2
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +1 -1
- package/dist/edge-core/index.d.ts +1 -1
- package/dist/edge-core/index.js +1 -1
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +1 -1
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +2 -2
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +2 -2
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +1 -1
- package/dist/git-trigger/git-hooks.d.ts +1 -1
- package/dist/index.d.mts +152 -34
- package/dist/index.d.ts +152 -34
- package/dist/index.js +325 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +318 -40
- package/dist/index.mjs.map +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-D37aSQ9c.d.mts → types-B4zhOAlq.d.mts} +5 -0
- package/dist/{types-Dn8tXnei.d.ts → types-CtBXnWuV.d.ts} +5 -0
- package/dist/{types-CxjqmPl-.d.mts → types-DHHyXtuZ.d.mts} +5 -0
- package/dist/{types-CxjqmPl-.d.ts → types-DHHyXtuZ.d.ts} +5 -0
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +1 -1
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +1 -1
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,53 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
8
8
|
Full architectural context for each release lives in the platform spec at
|
|
9
9
|
`docs/research/adapter-architecture-technical-requirements.md`.
|
|
10
10
|
|
|
11
|
+
## [5.21.0] — 2026-10-26 — endpoint changes are dashboard-only, agent commerce studio rules
|
|
12
|
+
|
|
13
|
+
### Removed (breaking, security — shops' item 48)
|
|
14
|
+
|
|
15
|
+
- **`VerificationGatewayClient.updateEndpoint`** and the `EndpointOperationalPatch`
|
|
16
|
+
type. After registration, endpoint settings (checkout, catalogue, events,
|
|
17
|
+
skill and health check URLs) change in the dashboard only, behind the
|
|
18
|
+
owner's login and MFA; the platform now refuses API keys on
|
|
19
|
+
`PATCH /api/endpoints/:id` (403). Why: a merchant's API key lives in its
|
|
20
|
+
host's environment, and a host compromise must not let a leaked key point
|
|
21
|
+
agents at another checkout or catalogue under the merchant's verified
|
|
22
|
+
identity. Every dashboard change to one of these URLs alerts the owner.
|
|
23
|
+
- **`sendTestEvent(id, { approvalId })`.** From code the test event is
|
|
24
|
+
synthetic only (an `approvalId` is no longer sent; the platform answers 403
|
|
25
|
+
`dashboard_only` to an API key that sends one). A real held approval's
|
|
26
|
+
payload releases or re-drives that checkout, so it is sent from the
|
|
27
|
+
endpoint page in the dashboard.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **The default AstraSync API base is `https://astrasync.ai/api`** (gateway
|
|
32
|
+
online mode, the transport's default verify URL, README examples), the same
|
|
33
|
+
as `verify()`'s documented base. `api.astrasync.ai` still answers; pass
|
|
34
|
+
`apiBaseUrl` explicitly as before if you set one.
|
|
35
|
+
|
|
36
|
+
### Added — agent commerce studio rules
|
|
37
|
+
|
|
38
|
+
- **`createAgentCommerce({ apiBaseUrl, apiKey, counterpartyId })`** fetches
|
|
39
|
+
the rules you set in the dashboard (endpoint → Agent commerce) every 5
|
|
40
|
+
minutes and keeps the last good copy when a fetch fails: product
|
|
41
|
+
visibility, agent price, the image agents get, a verified-agent discount,
|
|
42
|
+
and card issuer offers. AstraSync stores rules only; it hosts nothing.
|
|
43
|
+
`report({ catalogUrl, checkoutUrl, eventsUrl })` tells the dashboard where
|
|
44
|
+
your kit lives — shown as suggestions you confirm; it never sets a URL.
|
|
45
|
+
- **`serveAgentCatalog({ commerce, products })`** serves your catalogue to
|
|
46
|
+
agents priced and filtered by those rules (`issuer_offer` marks a
|
|
47
|
+
cardholder-priced line). **`fromFeed(url)`** reads a Shopify
|
|
48
|
+
`products.json`, Google Merchant XML, CSV or JSON feed you already have.
|
|
49
|
+
- **Kits: `agentCommerce`.** The UCP and ACP kits price lines with the same
|
|
50
|
+
rules, so the agent's price is the price you charge. A cardholder price
|
|
51
|
+
applies on `X-Astra-Issuer-Program` (sent by the AstraSync bridge) and the
|
|
52
|
+
confirm carries `metadata.issuerProgram`; AstraSync refuses the purchase
|
|
53
|
+
unless the buyer is that programme's cardholder. Pass `metadata` through
|
|
54
|
+
in your `verifyPurchase`.
|
|
55
|
+
- `issuerOfferPrice` / `priceForAgent`: the shared price rule (percent off,
|
|
56
|
+
half up, clamped).
|
|
57
|
+
|
|
11
58
|
## [5.20.0] — 2026-10-19 — fewer backend calls, recoverable declined holds, endpoint ops from code
|
|
12
59
|
|
|
13
60
|
### Changed (behaviour)
|
|
@@ -48,12 +95,12 @@ Full architectural context for each release lives in the platform spec at
|
|
|
48
95
|
in the verify-access body (honoured only from a first-party AstraSync
|
|
49
96
|
service caller; a verify carrying it is never cached).
|
|
50
97
|
- `VerificationGatewayClient.updateEndpoint(id, { eventsUrl, healthCheckUrl,
|
|
51
|
-
|
|
98
|
+
skillUrl, catalogUrl, checkoutUrl })` → `PATCH /api/endpoints/:id`
|
|
52
99
|
(operational URLs only, API key of the owner or an org member) and
|
|
53
100
|
`sendTestEvent(id, { type, approvalId? })` → `POST
|
|
54
|
-
|
|
101
|
+
/api/endpoints/:id/events/test` (one signed step-up event delivered now;
|
|
55
102
|
returns `{ delivered, status, responseCode, error, eventId, type,
|
|
56
|
-
|
|
103
|
+
approvalId }`). Types `EndpointOperationalPatch`, `TestEventType`,
|
|
57
104
|
`TestEventResult`.
|
|
58
105
|
- Kits' `pollHeldSessions` releases a `lapsed` approval (UCP and ACP);
|
|
59
106
|
`StepUpApprovalStatus` gains `'lapsed'`.
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ import { createMiddleware } from '@astrasyncai/verification-gateway/nextjs';
|
|
|
73
73
|
// v2.3.7+ — per-route policy lives in the AstraSync dashboard.
|
|
74
74
|
// The SDK fetches it on init via counterpartyId; do NOT pass routes here.
|
|
75
75
|
export const middleware = createMiddleware({
|
|
76
|
-
apiBaseUrl: 'https://
|
|
76
|
+
apiBaseUrl: 'https://astrasync.ai/api', // always includes /api
|
|
77
77
|
apiKey: process.env.ASTRASYNC_API_KEY,
|
|
78
78
|
counterpartyId: 'ASTRAE-...',
|
|
79
79
|
showInterstitial: true,
|
|
@@ -90,7 +90,7 @@ export const config = {
|
|
|
90
90
|
import { createClient } from '@astrasyncai/verification-gateway/sdk';
|
|
91
91
|
|
|
92
92
|
const gateway = createClient({
|
|
93
|
-
apiBaseUrl: 'https://
|
|
93
|
+
apiBaseUrl: 'https://astrasync.ai/api', // always includes /api
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
// Verify another agent before interacting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, Request } from 'express';
|
|
2
|
-
import { e as VerificationResult, E as ExpressMiddlewareOptions, b as AstraSyncCredentials } from '../types-
|
|
2
|
+
import { e as VerificationResult, E as ExpressMiddlewareOptions, b as AstraSyncCredentials } from '../types-DHHyXtuZ.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* AstraSync Universal Verification Gateway - Express Middleware
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, Request } from 'express';
|
|
2
|
-
import { e as VerificationResult, E as ExpressMiddlewareOptions, b as AstraSyncCredentials } from '../types-
|
|
2
|
+
import { e as VerificationResult, E as ExpressMiddlewareOptions, b as AstraSyncCredentials } from '../types-DHHyXtuZ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* AstraSync Universal Verification Gateway - Express Middleware
|