@devlab.group/agent-commerce 2.8.0 → 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.
- package/README.md +19 -17
- package/dist/ap2.js +2 -2
- package/dist/{chunk-WDD2ZUR3.js → chunk-46Y5M7BA.js} +3 -2
- package/dist/chunk-46Y5M7BA.js.map +1 -0
- package/dist/{chunk-QZW5YL3G.js → chunk-5Q6W7YTK.js} +3 -3
- package/dist/{chunk-QZW5YL3G.js.map → chunk-5Q6W7YTK.js.map} +1 -1
- package/dist/{chunk-ENK63GKR.js → chunk-JF45GSNA.js} +3 -3
- package/dist/{chunk-ENK63GKR.js.map → chunk-JF45GSNA.js.map} +1 -1
- package/dist/{cli/chunk-APC5BTQM.js → chunk-RF3DFVXH.js} +2 -2
- package/dist/{chunk-IWXVQYG5.js.map → chunk-RF3DFVXH.js.map} +1 -1
- package/dist/cli/{ap2-GYKFGE66.js → ap2-SJZAZQIR.js} +5 -5
- package/dist/cli/{ap2-GYKFGE66.js.map → ap2-SJZAZQIR.js.map} +1 -1
- package/dist/cli/chunk-25WJIUJU.js +8 -0
- package/dist/cli/{chunk-SAAT2XFX.js.map → chunk-25WJIUJU.js.map} +1 -1
- package/dist/cli/{chunk-DKWO6LLX.js → chunk-4WPHZLVO.js} +3 -2
- package/dist/cli/chunk-4WPHZLVO.js.map +1 -0
- package/dist/cli/chunk-IJFPWT4I.js +435 -0
- package/dist/cli/chunk-IJFPWT4I.js.map +1 -0
- package/dist/cli/{chunk-VWQMSWDF.js → chunk-K34CRXKX.js} +3 -3
- package/dist/cli/{chunk-VWQMSWDF.js.map → chunk-K34CRXKX.js.map} +1 -1
- package/dist/cli/{chunk-WFIR374D.js → chunk-L264N3ZV.js} +41 -5
- package/dist/cli/chunk-L264N3ZV.js.map +1 -0
- package/dist/cli/{chunk-SYXLQ5BS.js → chunk-NM7V2Y4I.js} +5 -5
- package/dist/cli/{chunk-SYXLQ5BS.js.map → chunk-NM7V2Y4I.js.map} +1 -1
- package/dist/cli/{chunk-3PGFOEVJ.js → chunk-SHIA2B6G.js} +32 -6
- package/dist/cli/chunk-SHIA2B6G.js.map +1 -0
- package/dist/cli/{chunk-YXXPZFWC.js → chunk-U3SEGD4H.js} +126 -18
- package/dist/cli/chunk-U3SEGD4H.js.map +1 -0
- package/dist/{chunk-IWXVQYG5.js → cli/chunk-UV23DWUY.js} +2 -2
- package/dist/cli/{chunk-APC5BTQM.js.map → chunk-UV23DWUY.js.map} +1 -1
- package/dist/cli/{config-JWMHWVRT.js → config-IBG46HTQ.js} +6 -6
- package/dist/cli/{config-JWMHWVRT.js.map → config-IBG46HTQ.js.map} +1 -1
- package/dist/cli/index.js +33 -13
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-OW5GY7TT.js → mcp-F3EQQWDZ.js} +3 -3
- package/dist/cli/{mcp-OW5GY7TT.js.map → mcp-F3EQQWDZ.js.map} +1 -1
- package/dist/cli/payment-providers-FPTGQBU7.js +6 -0
- package/dist/cli/{payment-providers-QL2BJYMD.js.map → payment-providers-FPTGQBU7.js.map} +1 -1
- package/dist/cli/{provider-3A2LVEQS.js → provider-XACFJ7MG.js} +4 -4
- package/dist/cli/{provider-3A2LVEQS.js.map → provider-XACFJ7MG.js.map} +1 -1
- package/dist/cli/receipts-AXCPPGOK.js +9 -0
- package/dist/cli/{receipts-FQUFGEQD.js.map → receipts-AXCPPGOK.js.map} +1 -1
- package/dist/cli/{run-KF5OQYPL.js → run-C3VWMM57.js} +830 -184
- package/dist/cli/run-C3VWMM57.js.map +1 -0
- package/dist/cli/{x402-5A7CVCIJ.js → x402-SUXWULOP.js} +5 -5
- package/dist/cli/{x402-5A7CVCIJ.js.map → x402-SUXWULOP.js.map} +1 -1
- package/dist/index.d.ts +74 -31
- package/dist/index.js +1290 -255
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/mpp.js +2 -2
- package/dist/{store-BzgwHOPu.d.ts → store-04pazhFP.d.ts} +52 -1
- package/dist/testing.js +468 -273
- package/dist/testing.js.map +1 -1
- package/dist/x402.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-WDD2ZUR3.js.map +0 -1
- package/dist/cli/chunk-3PGFOEVJ.js.map +0 -1
- package/dist/cli/chunk-6BWEHQPJ.js +0 -215
- package/dist/cli/chunk-6BWEHQPJ.js.map +0 -1
- package/dist/cli/chunk-DKWO6LLX.js.map +0 -1
- package/dist/cli/chunk-SAAT2XFX.js +0 -8
- package/dist/cli/chunk-WFIR374D.js.map +0 -1
- package/dist/cli/chunk-YXXPZFWC.js.map +0 -1
- package/dist/cli/payment-providers-QL2BJYMD.js +0 -6
- package/dist/cli/receipts-FQUFGEQD.js +0 -9
- package/dist/cli/run-KF5OQYPL.js.map +0 -1
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<!-- support-record:begin badges -->
|
|
12
12
|
<img alt="MCP" src="https://img.shields.io/badge/MCP-supported-6b4fbb">
|
|
13
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">
|
|
14
15
|
<img alt="MPP" src="https://img.shields.io/badge/MPP-experimental-f0a30a">
|
|
15
|
-
<img alt="A2A" src="https://img.shields.io/badge/A2A-experimental-f0a30a">
|
|
16
16
|
<img alt="ACP" src="https://img.shields.io/badge/ACP-experimental-f0a30a">
|
|
17
17
|
<img alt="AP2" src="https://img.shields.io/badge/AP2-experimental-f0a30a">
|
|
18
18
|
<!-- support-record:end -->
|
|
@@ -25,7 +25,7 @@ call and pay for it without adding those protocols to your backend.
|
|
|
25
25
|
|
|
26
26
|
Run the gateway in your infrastructure and describe each endpoint in YAML, or
|
|
27
27
|
generate draft resource definitions from OpenAPI. Resources can be exposed over
|
|
28
|
-
HTTP, MCP or
|
|
28
|
+
HTTP, MCP or A2A; dedicated resources can implement experimental
|
|
29
29
|
ACP checkout operations. Paid resources use x402 or experimental MPP and can
|
|
30
30
|
also require an AP2 mandate proving that the buyer approved the purchase. Funds
|
|
31
31
|
go directly to the merchant wallet, and the gateway needs neither the buyer's
|
|
@@ -308,16 +308,16 @@ See [docs/configuration.md](docs/configuration.md).
|
|
|
308
308
|
|
|
309
309
|
<!-- support-record:begin matrix -->
|
|
310
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** |
|
|
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`
|
|
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
321
|
|
|
322
322
|
<!-- support-record:end -->
|
|
323
323
|
|
|
@@ -342,7 +342,8 @@ prints the `unsupported` lists for A2A, ACP and AP2 when they are enabled.
|
|
|
342
342
|
### Versioning
|
|
343
343
|
|
|
344
344
|
Minor releases may break experimental configurations, integrations or types.
|
|
345
|
-
This includes MPP,
|
|
345
|
+
This includes MPP, ACP, AP2, the
|
|
346
|
+
[a2a-x402 extension](docs/protocols/a2a.md#x402-extension), ERC-8409 quotes, the
|
|
346
347
|
[public resource URL](docs/configuration.md#public-resource-url) and
|
|
347
348
|
[Bazaar metadata](docs/configuration.md#bazaar-metadata) in payment
|
|
348
349
|
challenges, and these interfaces:
|
|
@@ -356,6 +357,7 @@ challenges, and these interfaces:
|
|
|
356
357
|
in 2.7.0.
|
|
357
358
|
- `PaymentContext.protocol` and `AdapterHealthComponent.undetermined` (added
|
|
358
359
|
in 2.8.0), and the `./testing` entry.
|
|
360
|
+
- `TaskRecord` and the task storage methods on `ReceiptStore`, added in 2.9.0.
|
|
359
361
|
|
|
360
362
|
A profile moves from experimental to supported only when it meets the
|
|
361
363
|
[promotion criteria](docs/protocols.md#promotion-criteria).
|
|
@@ -525,7 +527,7 @@ INFO AP2 disabled
|
|
|
525
527
|
PASS Payments x402 v2 (scheme=exact) enabled - LOCAL dev chain (eip155:31337), destination=0x7099…79C8, facilitator=local (in-process), paymentFlow=authorization
|
|
526
528
|
PASS Payments (offers) 1 offer(s) pass their health checks
|
|
527
529
|
INFO Payments (MPP) MPP not configured
|
|
528
|
-
PASS Storage sqlite schema
|
|
530
|
+
PASS Storage sqlite schema v6 writable; receipts=2
|
|
529
531
|
PASS Transactions none unresolved
|
|
530
532
|
PASS Protocol versions reported by gateway /.well-known/agent-commerce
|
|
531
533
|
|
|
@@ -595,8 +597,8 @@ follows.
|
|
|
595
597
|
It exits 0 after a completed run, even if attempts remain unresolved, and 1 if
|
|
596
598
|
the run fails to complete. If a store error stops a hold scan, the command
|
|
597
599
|
prints the report, preserving any saved resolutions, and exits 1.
|
|
598
|
-
`reconcile` and `resolve`
|
|
599
|
-
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
|
|
600
602
|
retrying either command.
|
|
601
603
|
|
|
602
604
|
Each family needs its own evidence:
|
|
@@ -719,7 +721,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
719
721
|
|
|
720
722
|
**Now** - MCP, x402 v2, settlement on the local chain, Base Sepolia, Base
|
|
721
723
|
mainnet, Solana devnet and Solana mainnet, receipts, doctor, deterministic
|
|
722
|
-
demo,
|
|
724
|
+
demo, the A2A v1.0.1 adapter, the experimental ACP `2026-04-17` checkout adapter,
|
|
723
725
|
experimental AP2 v0.2.0 mandate verification, experimental MPP `charge`
|
|
724
726
|
payments, experimental OpenAPI import, experimental retries after a lost
|
|
725
727
|
response, and experimental discovery metadata for x402 Bazaar and MCP Registry
|
package/dist/ap2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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
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-
|
|
4
|
-
import { hasMethodGroup } from './chunk-
|
|
3
|
+
import { exclusionNames, descriptorStatus, PACKAGE_VERSION } from './chunk-JF45GSNA.js';
|
|
4
|
+
import { hasMethodGroup } from './chunk-46Y5M7BA.js';
|
|
5
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,6 +8,7 @@ var STORE_METHOD_GROUPS = {
|
|
|
8
8
|
"listOrphanAuthorizationHolds"
|
|
9
9
|
],
|
|
10
10
|
pending_tasks: ["putPendingTask", "getPendingTask", "takePendingTask"],
|
|
11
|
+
task_records: ["putTaskRecord", "getTaskRecord", "listTaskRecords"],
|
|
11
12
|
// Separate from `idempotency_claims`: a store can support claims without redelivery
|
|
12
13
|
response_redelivery: ["getIdempotencyKey"]
|
|
13
14
|
};
|
|
@@ -16,5 +17,5 @@ function hasMethodGroup(store, group) {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export { STORE_METHOD_GROUPS, hasMethodGroup };
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-46Y5M7BA.js.map
|
|
21
|
+
//# sourceMappingURL=chunk-46Y5M7BA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/store-method-groups.ts"],"names":[],"mappings":";AAKO,IAAM,mBAAA,GAAsB;AAAA,EACjC,kBAAA,EAAoB,CAAC,qBAAA,EAAuB,sBAAA,EAAwB,wBAAwB,CAAA;AAAA,EAC5F,mBAAA,EAAqB;AAAA,IACnB,0BAAA;AAAA,IACA,6BAAA;AAAA,IACA,2BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,aAAA,EAAe,CAAC,gBAAA,EAAkB,gBAAA,EAAkB,iBAAiB,CAAA;AAAA,EACrE,YAAA,EAAc,CAAC,eAAA,EAAiB,eAAA,EAAiB,iBAAiB,CAAA;AAAA;AAAA,EAElE,mBAAA,EAAqB,CAAC,mBAAmB;AAC3C;AASO,SAAS,cAAA,CACd,OACA,KAAA,EAC8C;AAC9C,EAAA,OACE,KAAA,KAAU,MAAA,IACV,mBAAA,CAAoB,KAAK,CAAA,CAAE,KAAA,CAAM,CAAC,MAAA,KAAW,OAAO,KAAA,CAAM,MAAM,CAAA,KAAM,UAAU,CAAA;AAEpF","file":"chunk-46Y5M7BA.js","sourcesContent":["// Optional ReceiptStore method groups. Adapters use a store for a group only\n// when all its methods are present; conformance checks that each group is\n// implemented in full or omitted.\nimport type { ReceiptStore } from './interfaces/store';\n\nexport const STORE_METHOD_GROUPS = {\n idempotency_claims: ['claimIdempotencyKey', 'updateIdempotencyKey', 'recoverIdempotencyKeys'],\n authorization_holds: [\n 'reserveAuthorizationHold',\n 'transitionAuthorizationHold',\n 'getAuthorizationHoldState',\n 'listOrphanAuthorizationHolds',\n ],\n pending_tasks: ['putPendingTask', 'getPendingTask', 'takePendingTask'],\n task_records: ['putTaskRecord', 'getTaskRecord', 'listTaskRecords'],\n // Separate from `idempotency_claims`: a store can support claims without redelivery\n response_redelivery: ['getIdempotencyKey'],\n} as const satisfies Record<string, readonly (keyof ReceiptStore)[]>;\n\nexport type StoreMethodGroup = keyof typeof STORE_METHOD_GROUPS;\n\n/** The required store methods for one group */\nexport type StoreGroupMethods<G extends StoreMethodGroup> = Required<\n Pick<ReceiptStore, (typeof STORE_METHOD_GROUPS)[G][number]>\n>;\n\nexport function hasMethodGroup<G extends StoreMethodGroup>(\n store: ReceiptStore | undefined,\n group: G,\n): store is ReceiptStore & StoreGroupMethods<G> {\n return (\n store !== undefined &&\n STORE_METHOD_GROUPS[group].every((method) => typeof store[method] === 'function')\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { x402_default, isWellKnownDevKey, findX402Network, normalizeAddress, assertPayToIsNotDevAddress, resolveX402Deployment, assertDevKeyIsLocalOnly, describeRpc, canonicalJson, X402_DEFAULT_PAYMENT_FLOW, REUSE_REJECTED_AUTHORIZATION_METADATA_KEY, SETTLE_AFTER_BACKEND_METADATA_KEY, sameAddress, LOCAL_CHAIN_ID, BAZAAR_EXTENSION_KEY, isTransactionReference, x402OfferName, CDP_FACILITATOR_URL, isEvmAddress, describeDeploymentMode } from './chunk-VHS6MGXJ.js';
|
|
2
|
-
import { exclusionNames, descriptorStatus, PACKAGE_VERSION } from './chunk-
|
|
2
|
+
import { exclusionNames, descriptorStatus, PACKAGE_VERSION } from './chunk-JF45GSNA.js';
|
|
3
3
|
import { CommerceError, systemClock, NOOP_LOGGER, redactedErrorText, RECONCILIATION_METADATA_KEY, isCommerceError } from './chunk-MDOGXTZD.js';
|
|
4
4
|
import { LOCATOR_VERSION, eip3009Locator, computeReplayKey, permit2Locator, computePermit2ReplayKey, isoFromSeconds } from './chunk-GA3O2A7R.js';
|
|
5
5
|
import { isRecord } from './chunk-2CJNA7MS.js';
|
|
@@ -2417,5 +2417,5 @@ function loadOptionalModule(load, missing) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
|
|
2419
2419
|
export { DEFAULT_IDS, chainIdFromCaip2, createX402PaymentProvider, parseCanonicalAmount };
|
|
2420
|
-
//# sourceMappingURL=chunk-
|
|
2421
|
-
//# sourceMappingURL=chunk-
|
|
2420
|
+
//# sourceMappingURL=chunk-5Q6W7YTK.js.map
|
|
2421
|
+
//# sourceMappingURL=chunk-5Q6W7YTK.js.map
|