@devlab.group/agent-commerce 2.7.2 → 2.9.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 (133) hide show
  1. package/README.md +79 -30
  2. package/dist/ap2.d.ts +3 -11
  3. package/dist/ap2.js +97 -28
  4. package/dist/ap2.js.map +1 -1
  5. package/dist/{chunk-77HLISG4.js → chunk-2PVRHMVT.js} +14 -10
  6. package/dist/chunk-2PVRHMVT.js.map +1 -0
  7. package/dist/{chunk-WDD2ZUR3.js → chunk-46Y5M7BA.js} +3 -2
  8. package/dist/chunk-46Y5M7BA.js.map +1 -0
  9. package/dist/{chunk-XXHC6AA3.js → chunk-5Q6W7YTK.js} +160 -41
  10. package/dist/chunk-5Q6W7YTK.js.map +1 -0
  11. package/dist/chunk-JF45GSNA.js +22 -0
  12. package/dist/chunk-JF45GSNA.js.map +1 -0
  13. package/dist/{chunk-YHNTTMED.js → chunk-MDOGXTZD.js} +2 -2
  14. package/dist/chunk-MDOGXTZD.js.map +1 -0
  15. package/dist/chunk-MNI6APE6.js +64 -0
  16. package/dist/chunk-MNI6APE6.js.map +1 -0
  17. package/dist/{chunk-IWXVQYG5.js → chunk-RF3DFVXH.js} +2 -2
  18. package/dist/{chunk-IWXVQYG5.js.map → chunk-RF3DFVXH.js.map} +1 -1
  19. package/dist/{chunk-DJRWYDKJ.js → chunk-RXYGC7A3.js} +3 -3
  20. package/dist/{chunk-DJRWYDKJ.js.map → chunk-RXYGC7A3.js.map} +1 -1
  21. package/dist/{chunk-5AO5N2XY.js → chunk-VHS6MGXJ.js} +621 -4
  22. package/dist/chunk-VHS6MGXJ.js.map +1 -0
  23. package/dist/cli/{ap2-O3HJSS2E.js → ap2-SJZAZQIR.js} +36 -9
  24. package/dist/cli/ap2-SJZAZQIR.js.map +1 -0
  25. package/dist/cli/chunk-25WJIUJU.js +8 -0
  26. package/dist/cli/{chunk-B4QJV7OC.js.map → chunk-25WJIUJU.js.map} +1 -1
  27. package/dist/cli/chunk-2PO65227.js +619 -0
  28. package/dist/cli/chunk-2PO65227.js.map +1 -0
  29. package/dist/cli/{chunk-DKWO6LLX.js → chunk-4WPHZLVO.js} +3 -2
  30. package/dist/cli/chunk-4WPHZLVO.js.map +1 -0
  31. package/dist/cli/chunk-4YZULHX2.js +64 -0
  32. package/dist/cli/chunk-4YZULHX2.js.map +1 -0
  33. package/dist/cli/chunk-526C4KZA.js +93 -0
  34. package/dist/cli/chunk-526C4KZA.js.map +1 -0
  35. package/dist/cli/{chunk-FETTSOMT.js → chunk-5CH5VFC6.js} +139 -4
  36. package/dist/cli/chunk-5CH5VFC6.js.map +1 -0
  37. package/dist/cli/chunk-GISJ73ML.js +20 -0
  38. package/dist/cli/chunk-GISJ73ML.js.map +1 -0
  39. package/dist/cli/chunk-IJFPWT4I.js +435 -0
  40. package/dist/cli/chunk-IJFPWT4I.js.map +1 -0
  41. package/dist/cli/{chunk-QUFFT5K3.js → chunk-K34CRXKX.js} +141 -42
  42. package/dist/cli/chunk-K34CRXKX.js.map +1 -0
  43. package/dist/cli/{chunk-OETKXDGA.js → chunk-L264N3ZV.js} +127 -274
  44. package/dist/cli/chunk-L264N3ZV.js.map +1 -0
  45. package/dist/cli/chunk-MASLG557.js +26 -0
  46. package/dist/cli/chunk-MASLG557.js.map +1 -0
  47. package/dist/cli/{chunk-S5TQXKQ7.js → chunk-NM7V2Y4I.js} +7 -5
  48. package/dist/cli/chunk-NM7V2Y4I.js.map +1 -0
  49. package/dist/cli/chunk-RQ7W3NA5.js +143 -0
  50. package/dist/cli/chunk-RQ7W3NA5.js.map +1 -0
  51. package/dist/cli/chunk-RWBUHDU7.js +48 -0
  52. package/dist/cli/chunk-RWBUHDU7.js.map +1 -0
  53. package/dist/cli/{chunk-GBBG66O6.js → chunk-SHIA2B6G.js} +161 -106
  54. package/dist/cli/chunk-SHIA2B6G.js.map +1 -0
  55. package/dist/cli/{chunk-FL4HPCD4.js → chunk-THH7Y3OO.js} +3 -35
  56. package/dist/cli/chunk-THH7Y3OO.js.map +1 -0
  57. package/dist/cli/{chunk-XRG5UTIC.js → chunk-U3SEGD4H.js} +127 -19
  58. package/dist/cli/chunk-U3SEGD4H.js.map +1 -0
  59. package/dist/cli/{chunk-55AI6CLW.js → chunk-USIXWAXZ.js} +2 -2
  60. package/dist/cli/chunk-USIXWAXZ.js.map +1 -0
  61. package/dist/cli/{chunk-APC5BTQM.js → chunk-UV23DWUY.js} +2 -2
  62. package/dist/cli/{chunk-APC5BTQM.js.map → chunk-UV23DWUY.js.map} +1 -1
  63. package/dist/cli/config-IBG46HTQ.js +14 -0
  64. package/dist/cli/{config-ODN4IEMZ.js.map → config-IBG46HTQ.js.map} +1 -1
  65. package/dist/cli/index.js +373 -82
  66. package/dist/cli/index.js.map +1 -1
  67. package/dist/cli/{mcp-G2D2Z77G.js → mcp-F3EQQWDZ.js} +84 -45
  68. package/dist/cli/mcp-F3EQQWDZ.js.map +1 -0
  69. package/dist/cli/payment-providers-FPTGQBU7.js +6 -0
  70. package/dist/cli/{payment-providers-7RIIZ5OF.js.map → payment-providers-FPTGQBU7.js.map} +1 -1
  71. package/dist/cli/{provider-ARV3VAQ7.js → provider-XACFJ7MG.js} +145 -23
  72. package/dist/cli/provider-XACFJ7MG.js.map +1 -0
  73. package/dist/cli/receipts-AXCPPGOK.js +9 -0
  74. package/dist/cli/{receipts-HLQ7D722.js.map → receipts-AXCPPGOK.js.map} +1 -1
  75. package/dist/cli/{run-BHODKC6H.js → run-C3VWMM57.js} +912 -237
  76. package/dist/cli/run-C3VWMM57.js.map +1 -0
  77. package/dist/cli/{x402-LHW2YQ6W.js → x402-SUXWULOP.js} +12 -8
  78. package/dist/cli/x402-SUXWULOP.js.map +1 -0
  79. package/dist/index.d.ts +108 -41
  80. package/dist/index.js +1614 -633
  81. package/dist/index.js.map +1 -1
  82. package/dist/mcp.d.ts +2 -2
  83. package/dist/mcp.js +80 -42
  84. package/dist/mcp.js.map +1 -1
  85. package/dist/mpp.d.ts +3 -2
  86. package/dist/mpp.js +139 -20
  87. package/dist/mpp.js.map +1 -1
  88. package/dist/{protocol-adapter-DdFL5LBU.d.ts → protocol-adapter-D6JH_kk-.d.ts} +2 -2
  89. package/dist/{runtime-BmaSp2Ce.d.ts → runtime-D8u6lYfx.d.ts} +10 -0
  90. package/dist/{store-DQwbKhnc.d.ts → store-04pazhFP.d.ts} +54 -3
  91. package/dist/testing.d.ts +1 -1
  92. package/dist/testing.js +469 -274
  93. package/dist/testing.js.map +1 -1
  94. package/dist/{transaction-BXXJltZ-.d.ts → transaction-F9ZvhokH.d.ts} +1 -1
  95. package/dist/types-Dl27vhEc.d.ts +167 -0
  96. package/dist/x402.d.ts +7 -110
  97. package/dist/x402.js +6 -5
  98. package/dist/x402.js.map +1 -1
  99. package/package.json +3 -1
  100. package/dist/chunk-2573DASO.js +0 -8
  101. package/dist/chunk-2573DASO.js.map +0 -1
  102. package/dist/chunk-5AO5N2XY.js.map +0 -1
  103. package/dist/chunk-77HLISG4.js.map +0 -1
  104. package/dist/chunk-WDD2ZUR3.js.map +0 -1
  105. package/dist/chunk-XXHC6AA3.js.map +0 -1
  106. package/dist/chunk-YHNTTMED.js.map +0 -1
  107. package/dist/cli/ap2-O3HJSS2E.js.map +0 -1
  108. package/dist/cli/chunk-3NVJAQRO.js +0 -119
  109. package/dist/cli/chunk-3NVJAQRO.js.map +0 -1
  110. package/dist/cli/chunk-55AI6CLW.js.map +0 -1
  111. package/dist/cli/chunk-66NTYSXI.js +0 -277
  112. package/dist/cli/chunk-66NTYSXI.js.map +0 -1
  113. package/dist/cli/chunk-B4QJV7OC.js +0 -8
  114. package/dist/cli/chunk-DKWO6LLX.js.map +0 -1
  115. package/dist/cli/chunk-FETTSOMT.js.map +0 -1
  116. package/dist/cli/chunk-FL4HPCD4.js.map +0 -1
  117. package/dist/cli/chunk-GBBG66O6.js.map +0 -1
  118. package/dist/cli/chunk-H7EBJ4I3.js +0 -53
  119. package/dist/cli/chunk-H7EBJ4I3.js.map +0 -1
  120. package/dist/cli/chunk-OETKXDGA.js.map +0 -1
  121. package/dist/cli/chunk-QUFFT5K3.js.map +0 -1
  122. package/dist/cli/chunk-S5TQXKQ7.js.map +0 -1
  123. package/dist/cli/chunk-TPC4EJLT.js +0 -11
  124. package/dist/cli/chunk-TPC4EJLT.js.map +0 -1
  125. package/dist/cli/chunk-XRG5UTIC.js.map +0 -1
  126. package/dist/cli/config-ODN4IEMZ.js +0 -13
  127. package/dist/cli/mcp-G2D2Z77G.js.map +0 -1
  128. package/dist/cli/payment-providers-7RIIZ5OF.js +0 -6
  129. package/dist/cli/provider-ARV3VAQ7.js.map +0 -1
  130. package/dist/cli/receipts-HLQ7D722.js +0 -9
  131. package/dist/cli/run-BHODKC6H.js.map +0 -1
  132. package/dist/cli/x402-LHW2YQ6W.js.map +0 -1
  133. package/dist/networks-DDHYJLcg.d.ts +0 -39
package/README.md CHANGED
@@ -8,12 +8,14 @@
8
8
  <a href="#quickstart"><img alt="Quickstart" src="https://img.shields.io/badge/quickstart-5%20minutes-2ea44f"></a>
9
9
  <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
10
10
  <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-3178c6">
11
+ <!-- support-record:begin badges -->
11
12
  <img alt="MCP" src="https://img.shields.io/badge/MCP-supported-6b4fbb">
12
13
  <img alt="x402" src="https://img.shields.io/badge/x402-supported-0052ff">
14
+ <img alt="A2A" src="https://img.shields.io/badge/A2A-supported-2ea44f">
13
15
  <img alt="MPP" src="https://img.shields.io/badge/MPP-experimental-f0a30a">
14
- <img alt="A2A" src="https://img.shields.io/badge/A2A-experimental-f0a30a">
15
16
  <img alt="ACP" src="https://img.shields.io/badge/ACP-experimental-f0a30a">
16
17
  <img alt="AP2" src="https://img.shields.io/badge/AP2-experimental-f0a30a">
18
+ <!-- support-record:end -->
17
19
  </p>
18
20
 
19
21
  ## What it is, in ten seconds
@@ -23,7 +25,7 @@ call and pay for it without adding those protocols to your backend.
23
25
 
24
26
  Run the gateway in your infrastructure and describe each endpoint in YAML, or
25
27
  generate draft resource definitions from OpenAPI. Resources can be exposed over
26
- HTTP, MCP or experimental A2A; dedicated resources can implement experimental
28
+ HTTP, MCP or A2A; dedicated resources can implement experimental
27
29
  ACP checkout operations. Paid resources use x402 or experimental MPP and can
28
30
  also require an AP2 mandate proving that the buyer approved the purchase. Funds
29
31
  go directly to the merchant wallet, and the gateway needs neither the buyer's
@@ -71,7 +73,8 @@ agent-commerce doctor
71
73
 
72
74
  Requires **Node >= 22**. The package includes the `agent-commerce` CLI
73
75
  (`init`, `validate`, `start`, `doctor`, `reconcile`, `resolve`, `demo`,
74
- `import openapi`, `version`) and a library for embedding the gateway.
76
+ `import openapi`, `export mcp-registry`, `version`) and a library for embedding
77
+ the gateway.
75
78
  The default install excludes optional protocol, payment and authorization
76
79
  peers. The OpenAPI parser is a regular dependency because import is part of the
77
80
  CLI.
@@ -84,10 +87,10 @@ agent-commerce start --config config.yaml --env-file .env
84
87
  Install the optional peers for the features you enable, listed below. Missing
85
88
  startup imports stop the gateway with an error naming the package; missing
86
89
  Solana, NEAR or CDP peers fail provider health checks or payment requests.
87
- `start`, `validate`, `doctor`, `reconcile` and `resolve` accept `--env-file <path>` to
88
- load environment variables before reading the config. Variables already set in
89
- the environment take precedence. To embed the gateway in your own process, use
90
- the library:
90
+ `start`, `validate`, `doctor`, `reconcile`, `resolve` and `export mcp-registry`
91
+ accept `--env-file <path>` to load environment variables before reading the
92
+ config. Variables already set in the environment take precedence. To embed the
93
+ gateway in your own process, use the library:
91
94
 
92
95
  ```ts
93
96
  import { createGateway, loadConfig, receipts } from '@devlab.group/agent-commerce';
@@ -303,17 +306,22 @@ See [docs/configuration.md](docs/configuration.md).
303
306
 
304
307
  ## Protocol support
305
308
 
306
- | Protocol | Status | Pinned revision |
307
- | ------------ | ------------ | ------------------------------------------------------------------------------------------------------------ |
308
- | **HTTP** | Supported | native routes |
309
- | **MCP** | Supported | `2026-07-28` and `2025-11-25`, `@modelcontextprotocol/server@2.3.0` |
310
- | **x402** | Supported | x402 v2 (`@x402/core`, `@x402/evm`, `@x402/svm`, `@x402/near`), scheme `exact`, EVM and Solana; NEAR partial |
311
- | **MPP** | Experimental | `mppx@0.13.1`, `charge` + `evm` + EIP-3009, USDC on Base Sepolia and Base |
312
- | **A2A** | Experimental | A2A v1.0.1, binding `JSONRPC`, method `SendMessage`, x402 extension |
313
- | **ACP** | Experimental | ACP `2026-04-17`, REST checkout + discovery |
314
- | **AP2** | Experimental | AP2 `v0.2.0`, Direct Checkout Mandate verification |
315
- | **ERC-8409** | Experimental | draft `SergeevDmitry/ERCs@0ee33230`: signed quotes on x402 EVM offers |
316
- | UCP | Planned | no implementation |
309
+ <!-- support-record:begin matrix -->
310
+
311
+ | Protocol | Status | Pinned revision | Implemented subset |
312
+ | ------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
313
+ | **HTTP** | Supported | native | resource routes and rail-specific payment headers |
314
+ | **MCP** | Supported | MCP `2026-07-28` and `2025-11-25`; `@modelcontextprotocol/server@2.3.0` | tool discovery, invocation, payment-required and error mapping |
315
+ | **x402** | Supported | x402 v2; `@x402/core@2.30.0`, `@x402/evm@2.30.0`, `@x402/svm@2.30.0`, `@x402/near@2.30.0` | `exact` on EVM through EIP-3009 or Permit2, on Solana, and on NEAR (partial): challenge, verification, settlement and replay binding |
316
+ | **MPP** | Experimental | drafts at `tempoxyz/mpp-specs@806fdb8`; `mppx@0.13.1` | `charge`/`evm`/EIP-3009 with USDC on Base Sepolia and Base, over HTTP, MCP and A2A |
317
+ | **A2A** | Supported | v1.0.1; negotiation `1.0`; `JSONRPC` binding | Agent Card, `SendMessage` with `returnImmediately`, `GetTask`, `ListTasks`, `CancelTask` and the paid flow; the x402 extension is experimental |
318
+ | **ACP** | Experimental | stable snapshot `2026-04-17`; REST binding | discovery and the five checkout operations |
319
+ | **AP2** | Experimental | v0.2.0, tag 2026-04-28, commit `b4587ac`; Direct mode; `jose@6.2.12`, `@sd-jwt/core@0.20.1`, `canonicalize@5.0.0` | closed Checkout Mandate verification before settlement |
320
+ | **ERC-8409** | Experimental | draft `SergeevDmitry/ERCs@0ee33230` | signed quotes on x402 EVM offers; issuer published in `/.well-known/agent-commerce` |
321
+
322
+ <!-- support-record:end -->
323
+
324
+ UCP is planned and has no implementation.
317
325
 
318
326
  [AP2](docs/protocols/ap2.md) is an authorization method, not a transport. It verifies a
319
327
  mandate before a paid resource settles; the gateway does not issue the mandate
@@ -333,11 +341,26 @@ prints the `unsupported` lists for A2A, ACP and AP2 when they are enabled.
333
341
 
334
342
  ### Versioning
335
343
 
336
- Minor releases may break experimental configurations, integrations or types:
337
- MPP, A2A, ACP, AP2, ERC-8409 quotes, `agent-commerce import openapi`,
338
- `PaymentProvider.reconcile`, the `ReceiptStore` methods and types added in
339
- 2.6.0, the `idempotency` resource settings with the store and provider methods
340
- added in 2.7.0, and the `./testing` entry.
344
+ Minor releases may break experimental configurations, integrations or types.
345
+ This includes MPP, ACP, AP2, the
346
+ [a2a-x402 extension](docs/protocols/a2a.md#x402-extension), ERC-8409 quotes, the
347
+ [public resource URL](docs/configuration.md#public-resource-url) and
348
+ [Bazaar metadata](docs/configuration.md#bazaar-metadata) in payment
349
+ challenges, and these interfaces:
350
+
351
+ - `agent-commerce import openapi`.
352
+ - `agent-commerce export mcp-registry`, `doctor --registry` and the
353
+ `protocols.mcp.registry` keys.
354
+ - `PaymentProvider.reconcile` and the `ReceiptStore` methods and types added
355
+ in 2.6.0.
356
+ - The `idempotency` resource settings and the store and provider methods added
357
+ in 2.7.0.
358
+ - `PaymentContext.protocol` and `AdapterHealthComponent.undetermined` (added
359
+ in 2.8.0), and the `./testing` entry.
360
+ - `TaskRecord` and the task storage methods on `ReceiptStore`, added in 2.9.0.
361
+
362
+ A profile moves from experimental to supported only when it meets the
363
+ [promotion criteria](docs/protocols.md#promotion-criteria).
341
364
 
342
365
  The journal's `Transaction` type, `ReceiptStore` journal methods and
343
366
  `/api/transactions` response shape are supported. The `transactionId` fields,
@@ -494,6 +517,7 @@ spend real USDC when their opt-ins and credentials are present.
494
517
  $ npm run agent-commerce -- doctor --config config-demo.yaml
495
518
 
496
519
  PASS Config valid: 2 resource(s), merchant "Demo Data Store" (using local chain manifest .deploy/local.json for X402_ASSET, X402_ASSET_NAME, X402_ASSET_VERSION, X402_ASSET_DECIMALS, MERCHANT_WALLET, X402_FACILITATOR_PRIVATE_KEY)
520
+ PASS Secrets 6 set (MERCHANT_WALLET, X402_ASSET, X402_ASSET_DECIMALS, X402_ASSET_NAME, X402_ASSET_VERSION, X402_FACILITATOR_PRIVATE_KEY); 8 defaulted (ADMIN_TOKEN, DASHBOARD_ORIGIN, GATEWAY_PORT, GATEWAY_PUBLIC_BASE_URL, MERCHANT_API_BASE_URL, RECEIPT_STORE_PATH, X402_NETWORK, X402_RPC_URL)
497
521
  PASS Gateway healthy and ready at http://127.0.0.1:8080
498
522
  PASS Backend 2/2 backend host(s) reachable
499
523
  PASS Protocols http=on mcp=on (/mcp) a2a=off acp=off
@@ -501,12 +525,13 @@ INFO A2A disabled
501
525
  INFO ACP disabled
502
526
  INFO AP2 disabled
503
527
  PASS Payments x402 v2 (scheme=exact) enabled - LOCAL dev chain (eip155:31337), destination=0x7099…79C8, facilitator=local (in-process), paymentFlow=authorization
528
+ PASS Payments (offers) 1 offer(s) pass their health checks
504
529
  INFO Payments (MPP) MPP not configured
505
- PASS Storage sqlite schema v5 writable; receipts=2
530
+ PASS Storage sqlite schema v6 writable; receipts=2
506
531
  PASS Transactions none unresolved
507
532
  PASS Protocol versions reported by gateway /.well-known/agent-commerce
508
533
 
509
- Score: 8/8 checks passed
534
+ Score: 10/10 checks passed
510
535
  ```
511
536
 
512
537
  `doctor` compares live settlement terms with local config for each rail and
@@ -514,6 +539,29 @@ resource: offer order, network, token, payee and transfer method, plus decimals
514
539
  and payment flows when published. Mismatches fail the check. It also names
515
540
  failing offers when health is published; reasons appear in gateway debug logs.
516
541
 
542
+ `Secrets` lists each config placeholder (`${VAR}`) as missing, set or
543
+ defaulted. Config loading stops at the first missing variable; this check
544
+ reports them all. It fails if any are missing and prints names only, never
545
+ values or defaults.
546
+
547
+ A check that cannot reach a verdict carries `undetermined`: `unreachable`
548
+ for known transport failures, such as refused or reset connections, timeouts
549
+ or temporary DNS failures; `skipped` when a prerequisite fails. Unresolvable
550
+ hostnames and TLS errors leave the check unmarked.
551
+ Text output appends `[not determined: <reason>]`. The marker does not affect
552
+ status, score or exit code; an unreachable gateway still fails its check.
553
+
554
+ `--registry` (experimental) adds an `MCP Registry` check. It fetches the
555
+ latest listing for `protocols.mcp.registry.name` from
556
+ `registry.modelcontextprotocol.io`, sending only that name and a fixed
557
+ `include_deleted=true` flag, and compares it with what `export mcp-registry`
558
+ would write. Differences, deprecated or deleted listings, missing listings and
559
+ request failures produce WARN rather than FAIL.
560
+ Recognized transport failures also get the `unreachable` marker. The check
561
+ names differing fields and uses fixed messages for known lifecycle statuses,
562
+ without echoing arbitrary registry values or request error messages. See
563
+ [MCP Registry listing](docs/protocols/mcp.md#mcp-registry-listing).
564
+
517
565
  Exits non-zero if anything fails. `--json` for machines.
518
566
 
519
567
  ### `agent-commerce reconcile`
@@ -549,8 +597,8 @@ follows.
549
597
  It exits 0 after a completed run, even if attempts remain unresolved, and 1 if
550
598
  the run fails to complete. If a store error stops a hold scan, the command
551
599
  prints the report, preserving any saved resolutions, and exits 1.
552
- `reconcile` and `resolve` refuse receipt databases below schema v5 without
553
- migrating them. Back up the database, then start the gateway once before
600
+ `reconcile` and `resolve` reject receipt databases with an older schema
601
+ without migrating them. Back up the database, then start the gateway once before
554
602
  retrying either command.
555
603
 
556
604
  Each family needs its own evidence:
@@ -673,10 +721,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
673
721
 
674
722
  **Now** - MCP, x402 v2, settlement on the local chain, Base Sepolia, Base
675
723
  mainnet, Solana devnet and Solana mainnet, receipts, doctor, deterministic
676
- demo, experimental A2A v1.0.1 and ACP `2026-04-17` checkout adapters,
724
+ demo, the A2A v1.0.1 adapter, the experimental ACP `2026-04-17` checkout adapter,
677
725
  experimental AP2 v0.2.0 mandate verification, experimental MPP `charge`
678
- payments, experimental OpenAPI import, and experimental retries after a lost
679
- response.
726
+ payments, experimental OpenAPI import, experimental retries after a lost
727
+ response, and experimental discovery metadata for x402 Bazaar and MCP Registry
728
+ listings.
680
729
 
681
730
  **Next** - a `doctor` GitHub Action · UCP ·
682
731
  autonomous-mode AP2 (open mandates, agent key binding, constraint evaluation) ·
package/dist/ap2.d.ts CHANGED
@@ -3,7 +3,7 @@ export { A as AP2_CHECKOUT_MANDATE_VCT, a as AP2_CHECKOUT_PROFILE, b as AP2_DEFA
3
3
  import { AuthorizationProvider, Clock } from './index.js';
4
4
  import { Logger } from './index.js';
5
5
  import { ReceiptStore } from './index.js';
6
- import './transaction-BXXJltZ-.js';
6
+ import './transaction-F9ZvhokH.js';
7
7
 
8
8
  /**
9
9
  * A private ES256 key: either a private JWK (the pair of the public one in the
@@ -54,19 +54,11 @@ interface CreateCheckoutJwtOptions {
54
54
  */
55
55
  declare function createCheckoutJwt(options: CreateCheckoutJwtOptions): Promise<string>;
56
56
 
57
- /**
58
- * Adapter self-description.
59
- *
60
- * Imports nothing but core types and the pins, so `doctor` can report AP2
61
- * without pulling `jose` or `@sd-jwt/core` into the CLI bundle.
62
- */
63
-
64
57
  /** What this provider actually verifies */
65
58
  declare const AP2_CAPABILITIES: readonly string[];
66
59
  /**
67
- * Major AP2 features this provider does not support, published in its
68
- * descriptor and printed by `doctor`, so no client assumes full protocol
69
- * support
60
+ * Unsupported AP2 features from the support record, published in the descriptor
61
+ * and printed by `doctor` to show the limits of protocol support
70
62
  */
71
63
  declare const AP2_UNSUPPORTED: readonly string[];
72
64
 
package/dist/ap2.js CHANGED
@@ -1,8 +1,8 @@
1
- import { AP2_CHECKOUT_MANDATE_VCT, AP2_SIGNING_ALGORITHM, AP2_DIGEST_ALGORITHM, AP2_CHECKOUT_PROFILE, AP2_SPEC_VERSION, AP2_KEY_TYPE, AP2_JWK_CURVE, openSqliteDatabase } from './chunk-DJRWYDKJ.js';
2
- export { AP2_CHECKOUT_MANDATE_VCT, AP2_CHECKOUT_PROFILE, AP2_DEFAULT_CLOCK_SKEW_SECONDS, AP2_MAX_CLOCK_SKEW_SECONDS, AP2_SIGNING_ALGORITHM, AP2_SPEC_VERSION } from './chunk-DJRWYDKJ.js';
3
- import { PACKAGE_VERSION } from './chunk-2573DASO.js';
4
- import { hasMethodGroup } from './chunk-WDD2ZUR3.js';
5
- import { systemClock, NOOP_LOGGER, CommerceError } from './chunk-YHNTTMED.js';
1
+ import { AP2_CHECKOUT_MANDATE_VCT, AP2_SIGNING_ALGORITHM, AP2_DIGEST_ALGORITHM, AP2_CHECKOUT_PROFILE, AP2_SPEC_VERSION, AP2_KEY_TYPE, AP2_JWK_CURVE, openSqliteDatabase } from './chunk-RXYGC7A3.js';
2
+ export { AP2_CHECKOUT_MANDATE_VCT, AP2_CHECKOUT_PROFILE, AP2_DEFAULT_CLOCK_SKEW_SECONDS, AP2_MAX_CLOCK_SKEW_SECONDS, AP2_SIGNING_ALGORITHM, AP2_SPEC_VERSION } from './chunk-RXYGC7A3.js';
3
+ import { exclusionNames, descriptorStatus, PACKAGE_VERSION } from './chunk-JF45GSNA.js';
4
+ import { hasMethodGroup } from './chunk-46Y5M7BA.js';
5
+ import { systemClock, NOOP_LOGGER, CommerceError } from './chunk-MDOGXTZD.js';
6
6
  import { isRecord } from './chunk-2CJNA7MS.js';
7
7
  import { SignJWT, importPKCS8, importJWK, jwtVerify, decodeProtectedHeader, decodeJwt } from 'jose';
8
8
  import canonicalize from 'canonicalize';
@@ -199,6 +199,96 @@ async function createCheckoutJwt(options) {
199
199
  return new SignJWT({ agent_commerce: agentCommerce }).setProtectedHeader({ alg: AP2_SIGNING_ALGORITHM, kid, typ: "JWT" }).setIssuer(issuer).setAudience(audience).setIssuedAt(issuedAt).setExpirationTime(issuedAt + expiresIn).setJti(options.jwtId ?? crypto.randomUUID()).sign(key);
200
200
  }
201
201
 
202
+ // src/support/ap2.json
203
+ var ap2_default = {
204
+ name: "ap2",
205
+ kind: "authorization",
206
+ title: "AP2",
207
+ status: "experimental",
208
+ role: "Authorization method, not a payment rail: a paid resource can require a verified mandate in addition to its x402 or MPP payment, never instead of it.",
209
+ subset: "closed Checkout Mandate verification before settlement",
210
+ spec: {
211
+ revisions: ["v0.2.0"],
212
+ display: "v0.2.0, tag 2026-04-28, commit `b4587ac`; Direct mode",
213
+ source: {
214
+ repo: "google-agentic-commerce/AP2",
215
+ commit: "b4587ac1d055888a73b4b21750973cffba961793"
216
+ },
217
+ stable: false,
218
+ statement: "Standardization of the specification will continue within the Agentic Authentication Technical and Payments Technical Working Groups in FIDO",
219
+ checked: "2026-11-17"
220
+ },
221
+ packages: [
222
+ { name: "jose", use: "runtime" },
223
+ { name: "@sd-jwt/core", use: "runtime" },
224
+ { name: "canonicalize", use: "runtime" }
225
+ ],
226
+ artifacts: [
227
+ {
228
+ path: "tests/fixtures/ap2/v0.2.0",
229
+ revision: "b4587ac1d055888a73b4b21750973cffba961793"
230
+ }
231
+ ],
232
+ features: [
233
+ { name: "direct-mode", status: "experimental" },
234
+ { name: "trusted-agent-provider", status: "experimental" },
235
+ { name: "mandate.checkout.1", status: "experimental" },
236
+ { name: "sd-jwt-presentation", status: "experimental" },
237
+ { name: "ES256", status: "experimental" },
238
+ { name: "sha-256", status: "experimental" },
239
+ { name: "static-inline-trust", status: "experimental" },
240
+ { name: "merchant-checkout-jwt-binding", status: "experimental" },
241
+ { name: "agent-commerce/ap2/checkout/v1", status: "experimental" },
242
+ { name: "purchase-binding", status: "experimental" },
243
+ { name: "replay-defence", status: "experimental" }
244
+ ],
245
+ exclusions: [
246
+ { name: "autonomous mode" },
247
+ {
248
+ name: "open checkout mandates (mandate.checkout.open.1)",
249
+ note: "Rejected because the provider does not evaluate spending constraints."
250
+ },
251
+ { name: "payment mandates (mandate.payment.1)" },
252
+ { name: "spending constraint evaluation" },
253
+ { name: "cnf-bound agent keys" },
254
+ { name: "user credential delegation (OpenID4VP)" },
255
+ { name: "delegation chains and key-binding JWTs" },
256
+ {
257
+ name: "JWKS and any key discovery by URL (jku, x5u)",
258
+ note: "Operators supply all keys in config."
259
+ },
260
+ { name: "issuer metadata fetching" },
261
+ { name: "remote revocation" },
262
+ { name: "key rotation without a config change" },
263
+ { name: "signature algorithms other than ES256" },
264
+ { name: "digest algorithms other than sha-256" },
265
+ { name: "mandate issuance" },
266
+ { name: "checkout receipts" },
267
+ {
268
+ name: "AP2 transport adapter or /.well-known/ap2",
269
+ note: "HTTP, MCP and A2A carry the mandate in the gateway's own carriers; AP2 v0.2.0 defines none."
270
+ },
271
+ { name: "AP2 as a payment rail" },
272
+ { name: "AP2 over the ACP checkout adapter" }
273
+ ],
274
+ deviations: [],
275
+ conformance: {
276
+ suite: "Tests using mandates minted by the AP2 v0.2.0 reference SDK, plus end-to-end refusal cases.",
277
+ tests: [
278
+ "tests/unit/authorization-ap2/sdk-vectors.test.ts",
279
+ "tests/integration/ap2-x402-conformance.test.ts"
280
+ ],
281
+ skipped: []
282
+ },
283
+ gaps: [
284
+ {
285
+ requirement: "Return a Checkout Receipt once the merchant has accepted or rejected a Checkout Mandate",
286
+ state: "open"
287
+ }
288
+ ],
289
+ docs: ["docs/protocols/ap2.md"]
290
+ };
291
+
202
292
  // src/authorization/ap2/descriptor.ts
203
293
  var AP2_CAPABILITIES = [
204
294
  "direct-mode",
@@ -213,28 +303,7 @@ var AP2_CAPABILITIES = [
213
303
  "purchase-binding",
214
304
  "replay-defence"
215
305
  ];
216
- var AP2_UNSUPPORTED = [
217
- // Mandate kinds. Open mandates are refused: see AP2_CHECKOUT_MANDATE_VCT
218
- "autonomous mode",
219
- "open checkout mandates (mandate.checkout.open.1)",
220
- "payment mandates (mandate.payment.1)",
221
- "spending constraint evaluation",
222
- "cnf-bound agent keys",
223
- // Delegation models other than a trusted agent provider
224
- "user credential delegation (OpenID4VP)",
225
- "delegation chains and key-binding JWTs",
226
- // Key handling. Every key is written into config by an operator
227
- "JWKS and any key discovery by URL (jku, x5u)",
228
- "issuer metadata fetching",
229
- "key rotation without a config change",
230
- // Algorithms
231
- "signature algorithms other than ES256",
232
- "digest algorithms other than sha-256",
233
- // Roles this gateway does not play
234
- "mandate issuance",
235
- "checkout receipts",
236
- "AP2 over the ACP checkout adapter"
237
- ];
306
+ var AP2_UNSUPPORTED = exclusionNames(ap2_default);
238
307
  function buildAp2Descriptor(implementationVersion) {
239
308
  return {
240
309
  name: "ap2",
@@ -242,7 +311,7 @@ function buildAp2Descriptor(implementationVersion) {
242
311
  implementationVersion,
243
312
  supportedSpec: `ap2/v${AP2_SPEC_VERSION} mode=direct`,
244
313
  capabilities: AP2_CAPABILITIES,
245
- status: "experimental",
314
+ status: descriptorStatus(ap2_default),
246
315
  unsupported: AP2_UNSUPPORTED
247
316
  };
248
317
  }