@devlab.group/agent-commerce 1.0.0 → 1.1.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 +20 -13
- package/dist/{chunk-BQNE3A5H.js → chunk-64UZVJEO.js} +3 -3
- package/dist/{chunk-BQNE3A5H.js.map → chunk-64UZVJEO.js.map} +1 -1
- package/dist/{chunk-MEPETSP6.js → chunk-M4I7I2UY.js} +3 -3
- package/dist/{chunk-MEPETSP6.js.map → chunk-M4I7I2UY.js.map} +1 -1
- package/dist/cli/index.js +105 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +102 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/{protocol-adapter-CZPOb9uG.d.ts → protocol-adapter-DZ8qkkAa.d.ts} +22 -2
- package/dist/{runtime-B-9IjMbO.d.ts → runtime-CC6EFmLP.d.ts} +1 -1
- package/dist/x402.d.ts +1 -1
- package/dist/x402.js +3 -3
- package/package.json +2 -1
package/dist/mcp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HttpProtocolAdapter } from './protocol-adapter-
|
|
1
|
+
import { H as HttpProtocolAdapter } from './protocol-adapter-DZ8qkkAa.js';
|
|
2
2
|
import 'node:http';
|
|
3
|
-
import './runtime-
|
|
3
|
+
import './runtime-CC6EFmLP.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* MCP protocol adapter.
|
package/dist/mcp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PACKAGE_VERSION, toCommerceError, CommerceError, PAYMENT_INPUT_FIELD, toErrorEnvelope, DELIVERY_SUMMARY_META_KEY, toDeliverySummary, toPaymentRequiredEnvelope } from './chunk-
|
|
1
|
+
import { PACKAGE_VERSION, toCommerceError, CommerceError, PAYMENT_INPUT_FIELD, toErrorEnvelope, DELIVERY_SUMMARY_META_KEY, toDeliverySummary, toPaymentRequiredEnvelope } from './chunk-64UZVJEO.js';
|
|
2
2
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
3
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
4
4
|
import { ListToolsRequestSchema, CallToolRequestSchema, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/sdk/types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { I as IsoTimestamp, j as PaymentResult, o as ProtocolName, l as PaymentSubmission, i as PaymentRequirement, A as AdapterDescriptor, R as ResourceRegistry, L as Logger, c as Clock, d as IdGenerator, a as AdapterHealth } from './runtime-
|
|
2
|
+
import { I as IsoTimestamp, j as PaymentResult, o as ProtocolName, l as PaymentSubmission, i as PaymentRequirement, A as AdapterDescriptor, R as ResourceRegistry, L as Logger, c as Clock, d as IdGenerator, a as AdapterHealth } from './runtime-CC6EFmLP.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Canonical commerce events.
|
|
@@ -216,7 +216,27 @@ interface HttpProtocolAdapter extends ProtocolAdapter {
|
|
|
216
216
|
/** Path prefix the gateway mounts this adapter at, e.g. '/mcp'. */
|
|
217
217
|
readonly mountPath: string;
|
|
218
218
|
handleHttp(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
219
|
+
/**
|
|
220
|
+
* Fixed paths this adapter owns *outside* its mount, for protocols whose
|
|
221
|
+
* specification pins a discovery URL (A2A's `/.well-known/agent-card.json`).
|
|
222
|
+
* The gateway mounts them with the same guarantees as `mountPath` — same
|
|
223
|
+
* unconsumed body, same concurrency cap, same failure isolation — so the
|
|
224
|
+
* gateway needs no per-protocol routing knowledge.
|
|
225
|
+
*
|
|
226
|
+
* Omitted by adapters that need none.
|
|
227
|
+
*/
|
|
228
|
+
readonly additionalHttpRoutes?: readonly AdapterHttpRoute[];
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* One fixed, method-scoped route owned by an adapter. Unlike `mountPath` it
|
|
232
|
+
* registers no wildcard: it matches exactly the path given.
|
|
233
|
+
*/
|
|
234
|
+
interface AdapterHttpRoute {
|
|
235
|
+
readonly method: 'GET' | 'POST';
|
|
236
|
+
/** Absolute gateway path, e.g. '/.well-known/agent-card.json'. */
|
|
237
|
+
readonly path: string;
|
|
238
|
+
handleHttp(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
219
239
|
}
|
|
220
240
|
declare function isHttpProtocolAdapter(adapter: ProtocolAdapter): adapter is HttpProtocolAdapter;
|
|
221
241
|
|
|
222
|
-
export { type CommerceEvent as C, type DeliveredOutcome as D, type ExecutionPipeline as E, type HttpProtocolAdapter as H, type PaymentRequiredOutcome as P, type PaymentAttempt as a, type CommerceReceipt as b, type ProtocolAdapter as c, COMMERCE_EVENT_TYPES as d, type CanonicalRequest as e, type CommerceEventType as f, type EventSink as g, type ExecutionOutcome as h, type ProtocolAdapterContext as i, isHttpProtocolAdapter as j };
|
|
242
|
+
export { type AdapterHttpRoute as A, type CommerceEvent as C, type DeliveredOutcome as D, type ExecutionPipeline as E, type HttpProtocolAdapter as H, type PaymentRequiredOutcome as P, type PaymentAttempt as a, type CommerceReceipt as b, type ProtocolAdapter as c, COMMERCE_EVENT_TYPES as d, type CanonicalRequest as e, type CommerceEventType as f, type EventSink as g, type ExecutionOutcome as h, type ProtocolAdapterContext as i, isHttpProtocolAdapter as j };
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
type JsonSchema = Record<string, unknown>;
|
|
15
15
|
/** Protocol surfaces a resource can be exposed through in this release. */
|
|
16
|
-
type ProtocolName = 'http' | 'mcp';
|
|
16
|
+
type ProtocolName = 'http' | 'mcp' | 'a2a';
|
|
17
17
|
/** Payment methods a resource can accept in this release. */
|
|
18
18
|
type PaymentMethodName = 'x402';
|
|
19
19
|
/** ISO-8601 timestamp string, always UTC with millisecond precision. */
|
package/dist/x402.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { X as X402FacilitatorConfig } from './guardrails-Dmwi63KB.js';
|
|
2
2
|
export { F as FacilitatorAuth } from './guardrails-Dmwi63KB.js';
|
|
3
|
-
import { L as Logger, c as Clock, d as IdGenerator, b as PaymentProvider } from './runtime-
|
|
3
|
+
import { L as Logger, c as Clock, d as IdGenerator, b as PaymentProvider } from './runtime-CC6EFmLP.js';
|
|
4
4
|
|
|
5
5
|
interface NetworkProfile {
|
|
6
6
|
/** CAIP-2 identifier, e.g. `eip155:84532`. */
|
package/dist/x402.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { assertPayToIsNotDevAddress, resolveX402Deployment, assertDevKeyIsLocalOnly, describeDeploymentMode } from './chunk-
|
|
2
|
-
export { SUPPORTED_NETWORK_IDS } from './chunk-
|
|
3
|
-
import { CommerceError, systemClock, NOOP_LOGGER, PACKAGE_VERSION } from './chunk-
|
|
1
|
+
import { assertPayToIsNotDevAddress, resolveX402Deployment, assertDevKeyIsLocalOnly, describeDeploymentMode } from './chunk-M4I7I2UY.js';
|
|
2
|
+
export { SUPPORTED_NETWORK_IDS } from './chunk-M4I7I2UY.js';
|
|
3
|
+
import { CommerceError, systemClock, NOOP_LOGGER, PACKAGE_VERSION } from './chunk-64UZVJEO.js';
|
|
4
4
|
import { PaymentRequirementsV2Schema, PaymentPayloadV2Schema } from '@x402/core/schemas';
|
|
5
5
|
import { getAddress, toHex, isAddress, createWalletClient, http, publicActions, createPublicClient, HttpRequestError, TimeoutError, WaitForTransactionReceiptTimeoutError, encodeAbiParameters, keccak256, ContractFunctionRevertedError, ContractFunctionExecutionError } from 'viem';
|
|
6
6
|
import { privateKeyToAccount } from 'viem/accounts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devlab.group/agent-commerce",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Open-source, self-hosted, non-custodial commerce and payment orchestration gateway for AI agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
+
"@a2a-js/sdk": "1.1.0",
|
|
124
125
|
"@biomejs/biome": "2.5.9",
|
|
125
126
|
"@coinbase/x402": "2.1.0",
|
|
126
127
|
"@modelcontextprotocol/sdk": "1.30.0",
|