@devlab.group/agent-commerce 2.9.0 → 2.9.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 +19 -14
- package/dist/ap2.js +1 -1
- package/dist/{chunk-JF45GSNA.js → chunk-J3K7E4CA.js} +3 -3
- package/dist/{chunk-JF45GSNA.js.map → chunk-J3K7E4CA.js.map} +1 -1
- package/dist/{chunk-5Q6W7YTK.js → chunk-TEI6GTUG.js} +7 -3
- package/dist/chunk-TEI6GTUG.js.map +1 -0
- package/dist/cli/{ap2-SJZAZQIR.js → ap2-MUNB4HHC.js} +3 -3
- package/dist/cli/{ap2-SJZAZQIR.js.map → ap2-MUNB4HHC.js.map} +1 -1
- package/dist/cli/chunk-JP5NQ5II.js +8 -0
- package/dist/cli/{chunk-25WJIUJU.js.map → chunk-JP5NQ5II.js.map} +1 -1
- package/dist/cli/{chunk-IJFPWT4I.js → chunk-KLKNFJTT.js} +109 -4
- package/dist/cli/chunk-KLKNFJTT.js.map +1 -0
- package/dist/cli/{chunk-K34CRXKX.js → chunk-RAWPZIG6.js} +7 -3
- package/dist/cli/chunk-RAWPZIG6.js.map +1 -0
- package/dist/cli/{chunk-NM7V2Y4I.js → chunk-SEDRU2KV.js} +5 -5
- package/dist/cli/{chunk-NM7V2Y4I.js.map → chunk-SEDRU2KV.js.map} +1 -1
- package/dist/cli/{chunk-U3SEGD4H.js → chunk-UX7GRVL4.js} +3 -3
- package/dist/cli/{chunk-U3SEGD4H.js.map → chunk-UX7GRVL4.js.map} +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/{mcp-F3EQQWDZ.js → mcp-55FLXKCC.js} +3 -3
- package/dist/cli/{mcp-F3EQQWDZ.js.map → mcp-55FLXKCC.js.map} +1 -1
- package/dist/cli/payment-providers-4OC2TONC.js +6 -0
- package/dist/cli/{payment-providers-FPTGQBU7.js.map → payment-providers-4OC2TONC.js.map} +1 -1
- package/dist/cli/{provider-XACFJ7MG.js → provider-H57SJDEJ.js} +4 -4
- package/dist/cli/{provider-XACFJ7MG.js.map → provider-H57SJDEJ.js.map} +1 -1
- package/dist/cli/{receipts-AXCPPGOK.js → receipts-SMX4MFO5.js} +4 -4
- package/dist/cli/{receipts-AXCPPGOK.js.map → receipts-SMX4MFO5.js.map} +1 -1
- package/dist/cli/{run-C3VWMM57.js → run-BS7323JH.js} +8 -8
- package/dist/cli/run-BS7323JH.js.map +1 -0
- package/dist/cli/{x402-SUXWULOP.js → x402-RNV3VHJT.js} +5 -5
- package/dist/cli/{x402-SUXWULOP.js.map → x402-RNV3VHJT.js.map} +1 -1
- package/dist/index.js +108 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/mpp.js +2 -2
- package/dist/x402.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-5Q6W7YTK.js.map +0 -1
- package/dist/cli/chunk-25WJIUJU.js +0 -8
- package/dist/cli/chunk-IJFPWT4I.js.map +0 -1
- package/dist/cli/chunk-K34CRXKX.js.map +0 -1
- package/dist/cli/payment-providers-FPTGQBU7.js +0 -6
- package/dist/cli/run-C3VWMM57.js.map +0 -1
package/README.md
CHANGED
|
@@ -308,16 +308,17 @@ See [docs/configuration.md](docs/configuration.md).
|
|
|
308
308
|
|
|
309
309
|
<!-- support-record:begin matrix -->
|
|
310
310
|
|
|
311
|
-
| Protocol
|
|
312
|
-
|
|
|
313
|
-
| **HTTP**
|
|
314
|
-
| **MCP**
|
|
315
|
-
| **x402**
|
|
316
|
-
| **MPP**
|
|
317
|
-
| **A2A**
|
|
318
|
-
| **ACP**
|
|
319
|
-
| **AP2**
|
|
320
|
-
| **ERC-8409**
|
|
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 |
|
|
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
|
+
| **A2A x402 extension** | Experimental | v0.1.0, commit `a5590226` | `TASK_STATE_INPUT_REQUIRED` with x402 v2 requirements, payment by a follow-up message on the task, receipts in the final status; A2A 1.0 wire forms, x402 only |
|
|
321
322
|
|
|
322
323
|
<!-- support-record:end -->
|
|
323
324
|
|
|
@@ -327,9 +328,11 @@ UCP is planned and has no implementation.
|
|
|
327
328
|
mandate before a paid resource settles; the gateway does not issue the mandate
|
|
328
329
|
or its Checkout Receipt.
|
|
329
330
|
|
|
330
|
-
The experimental entries above
|
|
331
|
-
|
|
332
|
-
[
|
|
331
|
+
The experimental entries above are disabled by default and cover documented
|
|
332
|
+
subsets:
|
|
333
|
+
[ACP](docs/protocols/acp.md), [AP2](docs/protocols/ap2.md#not-implemented),
|
|
334
|
+
[MPP](docs/protocols/mpp.md), the
|
|
335
|
+
[a2a-x402 extension](docs/protocols/a2a.md#x402-extension) and
|
|
333
336
|
[ERC-8409 quotes](docs/protocols/x402.md#erc-8409-signed-quotes). Supported
|
|
334
337
|
[MCP](docs/protocols/mcp.md) and [x402](docs/protocols/x402.md) are also scoped.
|
|
335
338
|
ACP exposes only its five checkout operations; merchant `payment_data` is never
|
|
@@ -537,7 +540,9 @@ Score: 10/10 checks passed
|
|
|
537
540
|
`doctor` compares live settlement terms with local config for each rail and
|
|
538
541
|
resource: offer order, network, token, payee and transfer method, plus decimals
|
|
539
542
|
and payment flows when published. Mismatches fail the check. It also names
|
|
540
|
-
failing offers when health is published
|
|
543
|
+
failing and degraded offers when health is published. The gateway logs
|
|
544
|
+
reported rail health details at warn when a rail starts failing, and at
|
|
545
|
+
debug otherwise.
|
|
541
546
|
|
|
542
547
|
`Secrets` lists each config placeholder (`${VAR}`) as missing, set or
|
|
543
548
|
defaulted. Config loading stops at the first missing variable; this check
|
package/dist/ap2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
+
import { exclusionNames, descriptorStatus, PACKAGE_VERSION } from './chunk-J3K7E4CA.js';
|
|
4
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';
|
|
@@ -15,8 +15,8 @@ function featureStatus(record, name) {
|
|
|
15
15
|
}
|
|
16
16
|
return feature.status;
|
|
17
17
|
}
|
|
18
|
-
var PACKAGE_VERSION = "2.9.
|
|
18
|
+
var PACKAGE_VERSION = "2.9.1" ;
|
|
19
19
|
|
|
20
20
|
export { PACKAGE_VERSION, descriptorStatus, exclusionNames, featureStatus };
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-J3K7E4CA.js.map
|
|
22
|
+
//# sourceMappingURL=chunk-J3K7E4CA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/support/claims.ts","../src/version.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,iBAAiB,MAAA,EAAkD;AACjF,EAAA,OAAO,MAAA,CAAO,MAAA,KAAW,WAAA,GAAc,QAAA,GAAW,cAAA;AACpD;AAGO,SAAS,eAAe,MAAA,EAA0C;AACvE,EAAA,OAAO,OAAO,UAAA,CAAW,GAAA,CAAI,CAAC,SAAA,KAAc,UAAU,IAAI,CAAA;AAC5D;AAEO,SAAS,aAAA,CAAc,QAAuB,IAAA,EAA6B;AAChF,EAAA,MAAM,OAAA,GAAU,OAAO,QAAA,CAAS,IAAA,CAAK,CAAC,SAAA,KAAc,SAAA,CAAU,SAAS,IAAI,CAAA;AAC3E,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,MAAM,IAAI,aAAA,CAAc,gBAAA,EAAkB,CAAA,+BAAA,EAAkC,IAAI,CAAA,CAAA,CAAG,CAAA;AAAA,EACrF;AACA,EAAA,OAAO,OAAA,CAAQ,MAAA;AACjB;ACXO,IAAM,eAAA,GACmC,OAAA","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/support/claims.ts","../src/version.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,iBAAiB,MAAA,EAAkD;AACjF,EAAA,OAAO,MAAA,CAAO,MAAA,KAAW,WAAA,GAAc,QAAA,GAAW,cAAA;AACpD;AAGO,SAAS,eAAe,MAAA,EAA0C;AACvE,EAAA,OAAO,OAAO,UAAA,CAAW,GAAA,CAAI,CAAC,SAAA,KAAc,UAAU,IAAI,CAAA;AAC5D;AAEO,SAAS,aAAA,CAAc,QAAuB,IAAA,EAA6B;AAChF,EAAA,MAAM,OAAA,GAAU,OAAO,QAAA,CAAS,IAAA,CAAK,CAAC,SAAA,KAAc,SAAA,CAAU,SAAS,IAAI,CAAA;AAC3E,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,MAAM,IAAI,aAAA,CAAc,gBAAA,EAAkB,CAAA,+BAAA,EAAkC,IAAI,CAAA,CAAA,CAAG,CAAA;AAAA,EACrF;AACA,EAAA,OAAO,OAAA,CAAQ,MAAA;AACjB;ACXO,IAAM,eAAA,GACmC,OAAA","file":"chunk-J3K7E4CA.js","sourcesContent":["/**\n * Read support status, feature status and exclusion names for descriptors,\n * discovery and `doctor`, without loading external packages.\n * `scripts/support-record.ts` validates records in tests and tooling; runtime\n * readers trust them.\n */\nimport { CommerceError } from '../core/errors';\n\n/** The fields of a support record that runtime code reads */\nexport interface SupportClaims {\n readonly status: string;\n readonly features: readonly { readonly name: string; readonly status: string }[];\n readonly exclusions: readonly { readonly name: string }[];\n}\n\nexport type FeatureStatus = 'supported' | 'experimental' | 'partial';\n\n/** Maps `supported` to `stable` without changing the descriptor's status union */\nexport function descriptorStatus(record: SupportClaims): 'stable' | 'experimental' {\n return record.status === 'supported' ? 'stable' : 'experimental';\n}\n\n/** The strings a descriptor publishes in `unsupported` */\nexport function exclusionNames(record: SupportClaims): readonly string[] {\n return record.exclusions.map((exclusion) => exclusion.name);\n}\n\nexport function featureStatus(record: SupportClaims, name: string): FeatureStatus {\n const feature = record.features.find((candidate) => candidate.name === name);\n if (feature === undefined) {\n throw new CommerceError('INTERNAL_ERROR', `support record has no feature \"${name}\"`);\n }\n return feature.status as FeatureStatus;\n}\n","/**\n * The package version, resolved once for the whole package.\n *\n * The build injects `__OAC_PACKAGE_VERSION__` (tsup.config.ts), because a\n * relative manifest path resolves from the wrong depth once `src/**` is\n * bundled. From source, the root manifest is read instead. `typeof` on an\n * undeclared identifier is safe, so the source path runs without the constant.\n */\nimport { createRequire } from 'node:module';\n\ndeclare const __OAC_PACKAGE_VERSION__: string | undefined;\n\nfunction readFromManifest(): string {\n try {\n const require = createRequire(import.meta.url);\n // src/version.ts -> repository root\n return (require('../package.json') as { version?: string }).version ?? '0.0.0-unknown';\n } catch {\n return '0.0.0-unknown';\n }\n}\n\nexport const PACKAGE_VERSION: string =\n typeof __OAC_PACKAGE_VERSION__ === 'string' ? __OAC_PACKAGE_VERSION__ : readFromManifest();\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-J3K7E4CA.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';
|
|
@@ -2035,6 +2035,10 @@ function createSettle(ctx, bazaar) {
|
|
|
2035
2035
|
);
|
|
2036
2036
|
}
|
|
2037
2037
|
if (sdkResult.errorReason === SETTLEMENT_PENDING_REASON || sdkResult.errorMessage?.startsWith(SETTLEMENT_PENDING_REASON) === true || UNKNOWN_OUTCOME_REASONS.has(sdkResult.errorReason ?? "") || NO_VERDICT_REASONS.has(sdkResult.errorReason ?? "") || scope.transportFailed()) {
|
|
2038
|
+
logger.warn(
|
|
2039
|
+
{ reportedReason: redactedErrorText(sdkResult.errorReason ?? "") },
|
|
2040
|
+
"x402 settle(): settlement was broadcast but could not be confirmed; outcome unknown"
|
|
2041
|
+
);
|
|
2038
2042
|
throw new CommerceError(
|
|
2039
2043
|
"PAYMENT_PROVIDER_UNAVAILABLE",
|
|
2040
2044
|
"x402 provider: settlement was broadcast but could not be confirmed",
|
|
@@ -2417,5 +2421,5 @@ function loadOptionalModule(load, missing) {
|
|
|
2417
2421
|
}
|
|
2418
2422
|
|
|
2419
2423
|
export { DEFAULT_IDS, chainIdFromCaip2, createX402PaymentProvider, parseCanonicalAmount };
|
|
2420
|
-
//# sourceMappingURL=chunk-
|
|
2421
|
-
//# sourceMappingURL=chunk-
|
|
2424
|
+
//# sourceMappingURL=chunk-TEI6GTUG.js.map
|
|
2425
|
+
//# sourceMappingURL=chunk-TEI6GTUG.js.map
|