@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.
Files changed (95) hide show
  1. package/CHANGELOG.md +50 -3
  2. package/README.md +2 -2
  3. package/dist/adapters/express.d.mts +1 -1
  4. package/dist/adapters/express.d.ts +1 -1
  5. package/dist/adapters/express.js +1 -1
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +1 -1
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +1 -1
  10. package/dist/adapters/mcp.d.ts +1 -1
  11. package/dist/adapters/mcp.js +1 -1
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +1 -1
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +1 -1
  16. package/dist/adapters/nextjs.d.ts +1 -1
  17. package/dist/adapters/nextjs.js +1 -1
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +1 -1
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +8 -31
  22. package/dist/adapters/sdk.d.ts +8 -31
  23. package/dist/adapters/sdk.js +8 -22
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +8 -22
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.js +1 -1
  28. package/dist/agent/index.js.map +1 -1
  29. package/dist/agent/index.mjs +1 -1
  30. package/dist/agent/index.mjs.map +1 -1
  31. package/dist/bin/astrasync-claude-hook.js +2 -2
  32. package/dist/bin/astrasync-codex-hook.js +2 -2
  33. package/dist/bin/astrasync-guard.js +2 -2
  34. package/dist/bin/astrasync.js +15 -2
  35. package/dist/browser/background.js +2 -2
  36. package/dist/browser/background.js.map +1 -1
  37. package/dist/browser/background.mjs +2 -2
  38. package/dist/browser/background.mjs.map +1 -1
  39. package/dist/cli/index.js +1 -1
  40. package/dist/cli/index.js.map +1 -1
  41. package/dist/cli/index.mjs +1 -1
  42. package/dist/cli/index.mjs.map +1 -1
  43. package/dist/codex/index.js +2 -2
  44. package/dist/codex/index.js.map +1 -1
  45. package/dist/codex/index.mjs +2 -2
  46. package/dist/codex/index.mjs.map +1 -1
  47. package/dist/cursor/extension.js +2 -2
  48. package/dist/cursor/extension.js.map +1 -1
  49. package/dist/cursor/extension.mjs +2 -2
  50. package/dist/cursor/extension.mjs.map +1 -1
  51. package/dist/edge-config.d.mts +1 -1
  52. package/dist/edge-config.d.ts +1 -1
  53. package/dist/edge-config.js +1 -1
  54. package/dist/edge-config.js.map +1 -1
  55. package/dist/edge-config.mjs +1 -1
  56. package/dist/edge-config.mjs.map +1 -1
  57. package/dist/edge-core/index.d.mts +1 -1
  58. package/dist/edge-core/index.d.ts +1 -1
  59. package/dist/edge-core/index.js +1 -1
  60. package/dist/edge-core/index.js.map +1 -1
  61. package/dist/edge-core/index.mjs +1 -1
  62. package/dist/edge-core/index.mjs.map +1 -1
  63. package/dist/gateway/gateway.js +2 -2
  64. package/dist/gateway/gateway.js.map +1 -1
  65. package/dist/gateway/gateway.mjs +2 -2
  66. package/dist/gateway/gateway.mjs.map +1 -1
  67. package/dist/git-trigger/git-hooks.d.mts +1 -1
  68. package/dist/git-trigger/git-hooks.d.ts +1 -1
  69. package/dist/index.d.mts +152 -34
  70. package/dist/index.d.ts +152 -34
  71. package/dist/index.js +325 -40
  72. package/dist/index.js.map +1 -1
  73. package/dist/index.mjs +318 -40
  74. package/dist/index.mjs.map +1 -1
  75. package/dist/registration/index.js +1 -1
  76. package/dist/registration/index.js.map +1 -1
  77. package/dist/registration/index.mjs +1 -1
  78. package/dist/registration/index.mjs.map +1 -1
  79. package/dist/transport/index.js +1 -1
  80. package/dist/transport/index.js.map +1 -1
  81. package/dist/transport/index.mjs +1 -1
  82. package/dist/transport/index.mjs.map +1 -1
  83. package/dist/{types-D37aSQ9c.d.mts → types-B4zhOAlq.d.mts} +5 -0
  84. package/dist/{types-Dn8tXnei.d.ts → types-CtBXnWuV.d.ts} +5 -0
  85. package/dist/{types-CxjqmPl-.d.mts → types-DHHyXtuZ.d.mts} +5 -0
  86. package/dist/{types-CxjqmPl-.d.ts → types-DHHyXtuZ.d.ts} +5 -0
  87. package/dist/ui/index.d.mts +1 -1
  88. package/dist/ui/index.d.ts +1 -1
  89. package/dist/verify.d.mts +1 -1
  90. package/dist/verify.d.ts +1 -1
  91. package/dist/verify.js +1 -1
  92. package/dist/verify.js.map +1 -1
  93. package/dist/verify.mjs +1 -1
  94. package/dist/verify.mjs.map +1 -1
  95. 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
- skillUrl, catalogUrl, checkoutUrl })` → `PATCH /api/endpoints/:id`
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
- /api/endpoints/:id/events/test` (one signed step-up event delivered now;
101
+ /api/endpoints/:id/events/test` (one signed step-up event delivered now;
55
102
  returns `{ delivered, status, responseCode, error, eventId, type,
56
- approvalId }`). Types `EndpointOperationalPatch`, `TestEventType`,
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://api.astrasync.ai',
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://api.astrasync.ai',
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-CxjqmPl-.mjs';
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-CxjqmPl-.js';
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
@@ -479,7 +479,7 @@ function routePolicyOf(route) {
479
479
  }
480
480
 
481
481
  // src/version.ts
482
- var SDK_VERSION = "5.20.0";
482
+ var SDK_VERSION = "5.21.0";
483
483
 
484
484
  // src/http.ts
485
485
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;