@agent-score/commerce 1.3.3 → 1.5.1

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@agent-score/commerce.svg)](https://www.npmjs.com/package/@agent-score/commerce)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
5
 
6
- The full merchant-side SDK for [AgentScore](https://agentscore.sh) agent commerce in one install. Ships identity gating, payment rail helpers, 402 challenge builders, MPP discovery, and Stripe multichain support. Built and maintained by AgentScore; works with any 402/MPP merchant in the ecosystem, AgentScore-gated or not.
6
+ The full merchant-side SDK for [AgentScore](https://agentscore.sh): agent commerce in one install. Ships identity gating, payment rail helpers, 402 challenge builders, MPP discovery, and Stripe multichain support. Built and maintained by AgentScore; works with any 402/MPP merchant in the ecosystem, AgentScore-gated or not.
7
7
 
8
8
  ## Install
9
9
 
@@ -13,7 +13,7 @@ npm install @agent-score/commerce
13
13
  bun add @agent-score/commerce
14
14
  ```
15
15
 
16
- Framework + protocol packages are optional peer deps install only what you use:
16
+ Framework + protocol packages are optional peer deps; install only what you use:
17
17
 
18
18
  ```bash
19
19
  npm install hono mppx @x402/core @x402/evm @solana/mpp @solana/kit stripe # whatever your stack needs
@@ -24,11 +24,11 @@ npm install hono mppx @x402/core @x402/evm @solana/mpp @solana/kit stripe # wh
24
24
  | Subpath | What it provides |
25
25
  |---|---|
26
26
  | `/identity/{hono,express,fastify,nextjs,web}` | Trust gate middleware: KYC, sanctions, age, jurisdiction. `agentscoreGate(...)`, `getAgentScoreData(c)`, `captureWallet(...)`, `verifyWalletSignerMatch(...)`. Plus shared denial helpers: `denialReasonStatus`, `denialReasonToBody`, `buildSignerMismatchBody`, `buildContactSupportNextSteps`, `verificationAgentInstructions`, `isFixableDenial`, `FIXABLE_DENIAL_REASONS`. |
27
- | `/payment` | `networks`, `USDC`, `rails` registries; `paymentDirective`, `buildPaymentDirective`, `wwwAuthenticateHeader`, `paymentRequiredHeader`, `aliasAmountFields` (v1↔v2 amount field shim emits both `amount` and `maxAmountRequired` so v1-only x402 parsers like Coinbase awal can read v2 bodies), `settlementOverrideHeader`, `dispatchSettlementByNetwork`, `extractPaymentSigner` (returns `{address, network}`); `createX402Server`, `createMppxServer`; drop-in x402 helpers: `validateX402NetworkConfig` (boot-time guard), `verifyX402Request` (parse + validate inbound X-Payment), `processX402Settle` (verify-then-settle with one call), `classifyX402SettleResult` (maps the tagged settle result to a recommended HTTP status / code / nextSteps so merchants get a controlled envelope without coupling to facilitator-specific error text). |
28
- | `/discovery` | `isDiscoveryProbeRequest`, `buildDiscoveryProbeResponse` (with optional `x402Sample` for x402-aware crawlers `awal x402 details` etc.), `sampleX402AcceptForNetwork` (USDC sample-accept builder for known CAIP-2 networks), `buildWellKnownMpp`, `buildLlmsTxt` + `llmsTxtIdentitySection` + `llmsTxtPaymentSection` (compact + verbose modes), `buildSkillMd` (Claude-Skill-compatible `/skill.md` agent-discovery manifest strictly agent-facing data only, no internal posture), `agentscoreOpenApiSnippets`, `createBazaarDiscovery`, `noindexNonDiscoveryPaths` (Hono middleware that emits `X-Robots-Tag: noindex` on every path except the agent-discovery surfaces defaults cover `/openapi.json`, `/llms.txt`, `/skill.md`, `/.well-known/{mpp.json,agent-card.json,ucp}`, `/favicon.{png,ico}`; pure helpers `isDiscoveryPath` + `defaultDiscoveryPaths` for non-Hono frameworks). |
29
- | `/challenge` | `build402Body`, `buildAcceptedMethods`, `buildIdentityMetadata`, `buildHowToPay`, `buildAgentInstructions` (auto-emits per-rail `compatible_clients` smoke-verified CLIs the agent should use; vendor override supported), `buildPricingBlock`, `firstEncounterAgentMemory`, `OrderReceipt`; `respond402` drop-in 402 emit that preserves mppx's `WWW-Authenticate` and layers x402's `PAYMENT-REQUIRED`. `buildValidationError` structured 4xx body builder (`{error: {code, message}, required_fields?, example_body?, next_steps?, ...extra}`) so vendors compose body shapes by name instead of inlining at every validation site. |
27
+ | `/payment` | `networks`, `USDC`, `rails` registries; `paymentDirective`, `buildPaymentDirective`, `wwwAuthenticateHeader`, `paymentRequiredHeader`, `aliasAmountFields` (v1↔v2 amount field shim: emits both `amount` and `maxAmountRequired` so v1-only x402 parsers like Coinbase awal can read v2 bodies), `settlementOverrideHeader`, `dispatchSettlementByNetwork`, `extractPaymentSigner` (returns `{address, network}`); `createX402Server`, `createMppxServer`; drop-in x402 helpers: `validateX402NetworkConfig` (boot-time guard), `verifyX402Request` (parse + validate inbound X-Payment), `processX402Settle` (verify-then-settle with one call), `classifyX402SettleResult` (maps the tagged settle result to a recommended HTTP status / code / nextSteps so merchants get a controlled envelope without coupling to facilitator-specific error text). |
28
+ | `/discovery` | `isDiscoveryProbeRequest`, `buildDiscoveryProbeResponse` (with optional `x402Sample` for x402-aware crawlers, e.g. `awal x402 details`), `sampleX402AcceptForNetwork` (USDC sample-accept builder for known CAIP-2 networks), `buildWellKnownMpp`, `buildLlmsTxt` + `llmsTxtIdentitySection` + `llmsTxtPaymentSection` (compact + verbose modes), `buildSkillMd` (Claude-Skill-compatible `/skill.md` agent-discovery manifest; strictly agent-facing data only, no internal posture), `agentscoreOpenApiSnippets`, `createBazaarDiscovery`, `noindexNonDiscoveryPaths` (Hono middleware that emits `X-Robots-Tag: noindex` on every path except the agent-discovery surfaces; defaults cover `/openapi.json`, `/llms.txt`, `/skill.md`, `/.well-known/{mpp.json,agent-card.json,ucp,jwks.json}`, `/favicon.{png,ico}`; pure helpers `isDiscoveryPath` + `defaultDiscoveryPaths` for non-Hono frameworks). |
29
+ | `/challenge` | `build402Body`, `buildAcceptedMethods`, `buildIdentityMetadata`, `buildHowToPay`, `buildAgentInstructions` (auto-emits per-rail `compatible_clients`: smoke-verified CLIs the agent should use; vendor override supported), `buildPricingBlock`, `firstEncounterAgentMemory`, `OrderReceipt`; `respond402`, a drop-in 402 emit that preserves mppx's `WWW-Authenticate` and layers x402's `PAYMENT-REQUIRED`. `buildValidationError`: structured 4xx body builder (`{error: {code, message}, required_fields?, example_body?, next_steps?, ...extra}`) so vendors compose body shapes by name instead of inlining at every validation site. |
30
30
  | `/stripe-multichain` | `createMultichainPaymentIntent`, `getDepositAddress`, `simulateCryptoDeposit`, `createMppxStripe`; `createPiCache` (TTL'd PI / deposit-address cache, Redis-backed when `redisUrl` set, in-memory otherwise), `simulateDepositIfTestMode` (gates on `sk_test_` and looks up the PI for you), `STRIPE_TEST_TX_HASH_SUCCESS` / `STRIPE_TEST_TX_HASH_FAILED` constants. Peer dep on `stripe`. |
31
- | `/api` | Everything from `@agent-score/sdk` re-exported in one place: `AgentScore` + `AgentScoreError`, `AGENTSCORE_TEST_ADDRESSES` + `isAgentScoreTestAddress`. **Don't add `@agent-score/sdk` as a separate dep** the two can drift versions and cause subtle type mismatches. |
31
+ | `/api` | Everything from `@agent-score/sdk` re-exported in one place: `AgentScore` + `AgentScoreError`, `AGENTSCORE_TEST_ADDRESSES` + `isAgentScoreTestAddress`. **Don't add `@agent-score/sdk` as a separate dep**; the two can drift versions and cause subtle type mismatches. |
32
32
 
33
33
  ## Quick start
34
34
 
@@ -53,7 +53,7 @@ const _gate = agentscoreGate({
53
53
  createSessionOnMissing: { apiKey: process.env.AGENTSCORE_API_KEY!, context: "wine-purchase" },
54
54
  });
55
55
 
56
- // Run the gate CONDITIONALLY only when a payment credential is already attached.
56
+ // Run the gate CONDITIONALLY: only when a payment credential is already attached.
57
57
  // Anonymous discovery (no payment header) flows through to the handler so any spec-
58
58
  // compliant x402 wallet can read the 402 challenge with rails + pricing without first
59
59
  // proving identity. Identity is verified at settle time on the retry leg.
@@ -95,10 +95,10 @@ const directives = [
95
95
  ];
96
96
  const wwwAuth = wwwAuthenticateHeader(directives);
97
97
 
98
- // Recover the on-chain signer from the inbound credential returns {address, network}.
98
+ // Recover the on-chain signer from the inbound credential; returns {address, network}.
99
99
  // Covers x402 EIP-3009 (EVM `from` address), Tempo MPP (`did:pkh:eip155` source),
100
100
  // and Solana MPP `solana/charge` (via `did:pkh:solana` source when set, else by
101
- // decoding the credential's signed-tx payload `@solana/kit` optional peer).
101
+ // decoding the credential's signed-tx payload; `@solana/kit` optional peer).
102
102
  const signer = await extractPaymentSigner(req, req.headers.get("x-payment") ?? undefined);
103
103
  ```
104
104
 
@@ -117,7 +117,7 @@ const mppx = await createMppxServer({
117
117
  tempo: { recipient: process.env.TEMPO_RECIPIENT! },
118
118
  solana: {
119
119
  recipient: process.env.SOLANA_RECIPIENT!,
120
- // Optional fee sponsor pass any `TransactionPartialSigner` from `@solana/kit`.
120
+ // Optional fee sponsor: pass any `TransactionPartialSigner` from `@solana/kit`.
121
121
  // signer: solanaFeePayerSigner,
122
122
  },
123
123
  stripe: { profileId: process.env.STRIPE_PROFILE_ID!, secretKey: process.env.STRIPE_SECRET_KEY! },
@@ -170,7 +170,7 @@ const responseBody = build402Body({
170
170
  ```typescript
171
171
  import { buildIdempotencyKey, buildPaymentHeaders } from "@agent-score/commerce/payment";
172
172
 
173
- // Stable per-payment key Stripe PI id wins, falls back to pi-{orderId}-{amountCents}.
173
+ // Stable per-payment key: Stripe PI id wins, falls back to pi-{orderId}-{amountCents}.
174
174
  const idempotencyKey = buildIdempotencyKey({ paymentIntentId, orderId, amountCents });
175
175
 
176
176
  // One-call WWW-Authenticate + PAYMENT-REQUIRED bundle from a single rails declaration.
@@ -190,16 +190,62 @@ return new Response(JSON.stringify(responseBody), { status: 402, headers });
190
190
  ### Identity publishing (cross-vendor standards)
191
191
 
192
192
  ```typescript
193
- import { buildA2AAgentCard, buildUCPProfile } from "@agent-score/commerce";
193
+ import { buildA2AAgentCard, buildUCPProfile, ucpA2AExtension } from "@agent-score/commerce";
194
+
195
+ // Google A2A v1.0 Signed Agent Card; publish at /.well-known/agent-card.json.
196
+ // Per UCP §A2A binding, the card MUST declare the canonical UCP extension URI;
197
+ // pass `ucpA2AExtension()` with empty capabilities until you bind formal UCP
198
+ // capabilities (dev.ucp.shopping.checkout, etc.).
199
+ const card = buildA2AAgentCard({ name, url, capabilities, extensions: [ucpA2AExtension()], data: assess });
200
+
201
+ // Google Universal Commerce Protocol; publish at /.well-known/ucp
202
+ // Output shape: { ucp: { version, services, capabilities, payment_handlers,
203
+ // name?, supported_versions? }, signing_keys: [...], signature?: "..." }
204
+ // — services / capabilities / payment_handlers are MAPS keyed by reverse-DNS
205
+ // service / capability / handler name (UCP spec §3 + §6).
206
+ const profile = buildUCPProfile({
207
+ name,
208
+ services: {
209
+ 'dev.ucp.shopping': [
210
+ { version: '2026-04-08', spec: 'https://ucp.dev/2026-04-08/specification/overview',
211
+ transport: 'mcp', endpoint: 'https://merchant.example/api/ucp/mcp',
212
+ schema: 'https://ucp.dev/services/shopping/openrpc.json' },
213
+ ],
214
+ },
215
+ payment_handlers: {
216
+ 'sh.agentscore.payment.tempo': [{
217
+ id: 'tempo', version: '2026-04-08',
218
+ spec: 'https://agentscore.sh/specification/payment-handlers/tempo',
219
+ schema: 'https://agentscore.sh/schemas/payment-handlers/tempo.json',
220
+ config: { recipient: TEMPO_ADDR },
221
+ }],
222
+ },
223
+ signing_keys, data: assess,
224
+ });
225
+ ```
226
+
227
+ UCP §6 doesn't mandate profile-body JWS signing; production UCP merchants commonly ship unsigned. AgentScore's `agentscore-profile+jws` is a vendor extension for trust-mode verifiers (regulated-commerce, AP2-aware) that opt into auditable profiles. Sign + verify via the optional `jose` peer dep (tested against jose v6.x; pin `jose@^6`):
194
228
 
195
- // Google A2A v1.0 Signed Agent Card — publish at /.well-known/agent-card.json
196
- const card = buildA2AAgentCard({ name, url, capabilities, data: assess });
229
+ ```typescript
230
+ import { buildJWKSResponse, generateUCPSigningKey, signUCPProfile, verifyUCPProfile, UCPVerificationError } from "@agent-score/commerce";
197
231
 
198
- // Google Universal Commerce Protocol publish at /.well-known/ucp
199
- const profile = buildUCPProfile({ name, services, payment_handlers, signing_keys, data: assess });
232
+ const { privateKey, publicJWK } = await generateUCPSigningKey({ kid: "merchant-2026-05" });
233
+ const profile = buildUCPProfile({ name, services, payment_handlers, signing_keys: [publicJWK] });
234
+ const signed = await signUCPProfile(profile, { signingKey: privateKey, kid: publicJWK.kid, alg: "EdDSA" });
235
+ const jwks = buildJWKSResponse([publicJWK]);
200
236
  ```
201
237
 
202
- ACP (Stripe + OpenAI Agentic Commerce Protocol) is a transactional checkout protocol with no identity-publishing surface ACP merchants integrate via the existing `build402Body` + `buildPaymentHeaders` + Stripe SPT rail.
238
+ `verifyUCPProfile` enforces the JWS protected header `typ: "agentscore-profile+jws"` (vendor-namespaced; UCP §6 does not define a profile-as-JWS typ), restricts `alg` to `EdDSA` / `ES256`, requires a `kid`, rejects duplicate kids in the JWKS, and compares the canonical body bytes against the JWS payload to catch swap-after-sign tampering. Failures throw `UCPVerificationError` with a discriminated `code` (`no_signature` / `missing_kid` / `kid_not_found` / `duplicate_kid` / `unsupported_alg` / `wrong_typ` / `signature_invalid` / `body_mismatch` / `malformed_jws` / `malformed_jwks` / `unusable_key` / `unrecognized_critical_header`). `malformed_jwks` covers a JWKS argument that isn't a `{ keys: [...] }` document. `unusable_key` covers a matched JWK whose `use` is not `sig` (e.g. `enc`). `unrecognized_critical_header` covers a JWS whose `crit` header lists an extension the verifier doesn't understand (RFC 7515 §4.1.11).
239
+
240
+ `signUCPProfile` rejects profiles containing non-integer `Number` values and integers outside `Number.MAX_SAFE_INTEGER` (cross-language float canonicalization is not stable; values past 2^53 lose precision when JS verifiers reparse the canonical body). Use decimal strings for monetary or fractional fields and for any integer that may exceed the safe range.
241
+
242
+ **Persisting the private JWK.** Mint once via `generateUCPSigningKey()`, export with `jose.exportJWK(privateKey)` to get the JSON-serializable form, store in your secret manager (AWS Secrets Manager, GCP Secret Manager, etc.). On each container start, read the secret, `jose.importJWK(jwk, alg)` to re-hydrate. Remote-signer flows (KMS-backed asymmetric keys) require an adapter layer that exposes a `KeyLike` jose can call; `jose` does not natively wrap KMS endpoints.
243
+
244
+ **Key rotation.** Mint a new key with a new `kid`, add the public JWK to your JWKS endpoint alongside the old one, then sign new profiles with the new key. Verifiers fetching the JWKS pick up both; any in-flight envelopes signed by the old key still verify until you remove that JWK from the JWKS. Set `Cache-Control: public, max-age=300` on `/.well-known/jwks.json` and wait at least that long after publishing the new key before removing the old JWK.
245
+
246
+ **Inline JWK in the profile vs separate JWKS endpoint.** UCP §6 mandates the separate `/.well-known/jwks.json` endpoint as the canonical trust source. The profile's `signing_keys[]` is informational; verifiers MUST resolve the kid against the JWKS (not the embedded copy), to prevent a swap-after-sign attack where a hostile actor replaces the inline key with their own.
247
+
248
+ ACP (Stripe + OpenAI Agentic Commerce Protocol) is a transactional checkout protocol with no identity-publishing surface; ACP merchants integrate via the existing `build402Body` + `buildPaymentHeaders` + Stripe SPT rail.
203
249
 
204
250
  ### Stripe multichain (peer dep on `stripe`)
205
251
 
@@ -222,8 +268,8 @@ const result = await createMultichainPaymentIntent({
222
268
  const baseAddress = getDepositAddress(result, "base");
223
269
  const solanaAddress = getDepositAddress(result, "solana");
224
270
 
225
- // PI / deposit-address cache. Redis-backed when REDIS_URL is set, in-memory otherwise
226
- // multi-task deployments need Redis so a deposit lands on whichever task settles it.
271
+ // PI / deposit-address cache. Redis-backed when REDIS_URL is set, in-memory otherwise.
272
+ // Multi-task deployments need Redis so a deposit lands on whichever task settles it.
227
273
  const piCache = createPiCache({ redisUrl: process.env.REDIS_URL });
228
274
  for (const addr of Object.values(result.depositAddresses)) {
229
275
  await piCache.cacheAddress(addr);
@@ -231,7 +277,7 @@ for (const addr of Object.values(result.depositAddresses)) {
231
277
  }
232
278
  piCache.cacheNetworkAddresses(result.paymentIntentId, result.depositAddresses);
233
279
 
234
- // Testnet helper gates on sk_test_ and looks up the PI for you. No-op on live keys.
280
+ // Testnet helper: gates on sk_test_ and looks up the PI for you. No-op on live keys.
235
281
  await simulateDepositIfTestMode({
236
282
  getPaymentIntentId: piCache.getPaymentIntentId,
237
283
  depositAddress: baseAddress!,
@@ -266,11 +312,11 @@ import {
266
312
  } from "@agent-score/commerce/payment";
267
313
  import { respond402 } from "@agent-score/commerce/challenge";
268
314
 
269
- // Boot-time guard raises if a configured network isn't supported.
315
+ // Boot-time guard: raises if a configured network isn't supported.
270
316
  validateX402NetworkConfig({ baseNetwork: X402_BASE });
271
317
 
272
318
  app.post("/purchase", async (c) => {
273
- // Path A agent presented an x402 X-Payment header
319
+ // Path A: agent presented an x402 X-Payment header
274
320
  if (c.req.header("payment-signature") || c.req.header("x-payment")) {
275
321
  const verified = await verifyX402Request({
276
322
  request: c.req.raw,
@@ -298,7 +344,7 @@ app.post("/purchase", async (c) => {
298
344
  return c.json({ ok: true }, { headers });
299
345
  }
300
346
 
301
- // Path B cold call (or Authorization: Payment for mppx). After mppx.compose() returns 402,
347
+ // Path B: cold call (or Authorization: Payment for mppx). After mppx.compose() returns 402,
302
348
  // respond402 PRESERVES mppx's WWW-Authenticate and ADDS x402's PAYMENT-REQUIRED.
303
349
  return respond402({
304
350
  mppxChallenge: mppxResult.challenge as Response,
@@ -322,22 +368,22 @@ app.use('/purchase', gate);
322
368
  app.post('/purchase', async (c) => {
323
369
  const { degraded, infraReason } = getGateDegradedState(c);
324
370
  if (degraded) {
325
- // Compliance was NOT enforced this request log/alert/refund-async/etc.
371
+ // Compliance was NOT enforced this request; log/alert/refund-async/etc.
326
372
  console.warn(`[gate] degraded: ${infraReason}`);
327
373
  }
328
374
  // ...rest of handler
329
375
  });
330
376
  ```
331
377
 
332
- When `failOpen: true` AND the failure is infra-shape, the gate carries `degraded: true` + `infraReason: 'quota_exceeded' | 'api_error' | 'network_timeout'` so merchants can log/alert without parsing console output. **Compliance denials (sanctions, age, jurisdiction, signer-mismatch) still deny regardless of `failOpen`** `failOpen` only covers "AgentScore couldn't tell us," never "AgentScore said no."
378
+ When `failOpen: true` AND the failure is infra-shape, the gate carries `degraded: true` + `infraReason: 'quota_exceeded' | 'api_error' | 'network_timeout'` so merchants can log/alert without parsing console output. **Compliance denials (sanctions, age, jurisdiction, signer-mismatch) still deny regardless of `failOpen`**; `failOpen` only covers "AgentScore couldn't tell us," never "AgentScore said no."
333
379
 
334
- For regulated commerce (alcohol, age-gated, sanctioned-jurisdiction-relevant) keep the default `failOpen: false` outage is the correct posture; bypassing compliance on infra failure is a compliance gap. For low-stakes commerce or high-uptime SLAs, opt in and use the `degraded` flag as the audit trail.
380
+ For regulated commerce (alcohol, age-gated, sanctioned-jurisdiction-relevant) keep the default `failOpen: false`: outage is the correct posture, and bypassing compliance on infra failure is a compliance gap. For low-stakes commerce or high-uptime SLAs, opt in and use the `degraded` flag as the audit trail.
335
381
 
336
382
  The `getGateDegradedState` helper is exported by every framework adapter (Hono, Express, Fastify, Next.js, Web Fetch). For `withAgentScoreGate` (Next.js / Web Fetch), the `degraded` + `infraReason` fields land directly on the `gate` object passed to your handler.
337
383
 
338
384
  ## Examples
339
385
 
340
- The [examples/](./examples) directory has 7 runnable single-file Hono apps covering common merchant scenarios copy-paste templates, not frameworks. See [examples/README.md](./examples/README.md) for the full table.
386
+ The [examples/](./examples) directory has 8 runnable single-file Hono apps covering common merchant scenarios; copy-paste templates, not frameworks. See [examples/README.md](./examples/README.md) for the full table.
341
387
 
342
388
  ## Vendor profile examples
343
389
 
@@ -348,11 +394,11 @@ The [examples/](./examples) directory has 7 runnable single-file Hono apps cover
348
394
  | Tempo-only merchant | `/payment` | `npm install @agent-score/commerce mppx` |
349
395
  | Crypto-native, no Stripe | `/identity/*`, `/payment`, `/challenge` | `npm install @agent-score/commerce @x402/core` |
350
396
 
351
- The SDK is genuinely a toolkit vendors compose only what they need. Helpers don't bundle assumptions about which rails or protocols you support, and don't recommend one rail over another.
397
+ The SDK is genuinely a toolkit; vendors compose only what they need. Helpers don't bundle assumptions about which rails or protocols you support, and don't recommend one rail over another.
352
398
 
353
399
  ## Stability
354
400
 
355
- `@agent-score/commerce@1.0.0` ships with the full merchant SDK surface stable. Helpers are protocol translations + configurable opinions most evolution is additive (new optional params, new helpers, new networks/rails). Major bumps are reserved for genuine protocol-mapping bugs.
401
+ The full merchant SDK surface is stable. Helpers are protocol translations + configurable opinions; most evolution is additive (new optional params, new helpers, new networks/rails). Major bumps are reserved for genuine protocol-mapping bugs.
356
402
 
357
403
  ## Documentation
358
404
 
package/dist/core.js CHANGED
@@ -220,7 +220,7 @@ function createAgentScoreCore(options) {
220
220
  } = options;
221
221
  const baseUrl = stripTrailingSlashes(rawBaseUrl);
222
222
  const agentMemoryHint = buildAgentMemoryHint();
223
- const defaultUa = `@agent-score/commerce@${"1.3.3"}`;
223
+ const defaultUa = `@agent-score/commerce@${"1.5.1"}`;
224
224
  const userAgentHeader = userAgent ? `${userAgent} (${defaultUa})` : defaultUa;
225
225
  const sdk = new import_sdk.AgentScore({ apiKey, baseUrl, userAgent: userAgentHeader });
226
226
  const sessionSdkCache = /* @__PURE__ */ new Map();
package/dist/core.mjs CHANGED
@@ -202,7 +202,7 @@ function createAgentScoreCore(options) {
202
202
  } = options;
203
203
  const baseUrl = stripTrailingSlashes(rawBaseUrl);
204
204
  const agentMemoryHint = buildAgentMemoryHint();
205
- const defaultUa = `@agent-score/commerce@${"1.3.3"}`;
205
+ const defaultUa = `@agent-score/commerce@${"1.5.1"}`;
206
206
  const userAgentHeader = userAgent ? `${userAgent} (${defaultUa})` : defaultUa;
207
207
  const sdk = new AgentScore({ apiKey, baseUrl, userAgent: userAgentHeader });
208
208
  const sessionSdkCache = /* @__PURE__ */ new Map();
@@ -607,6 +607,7 @@ var defaultDiscoveryPaths = /* @__PURE__ */ new Set([
607
607
  "/.well-known/x402",
608
608
  "/.well-known/agent-card.json",
609
609
  "/.well-known/ucp",
610
+ "/.well-known/jwks.json",
610
611
  "/favicon.png",
611
612
  "/favicon.ico"
612
613
  ]);