agent402-mcp 0.13.18 → 0.13.19
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/index.js +6 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -295,8 +295,10 @@ function acceptsOf(obj) {
|
|
|
295
295
|
* leaves the body `{}`; v1 sellers put it in the body. Header first.
|
|
296
296
|
*
|
|
297
297
|
* Each accept is priced from the known-asset table (./known-assets.js), never
|
|
298
|
-
* from a decimals value the seller sends. The credits gate debits
|
|
299
|
-
* quote,
|
|
298
|
+
* from a decimals value the seller sends. The credits gate debits the route's
|
|
299
|
+
* own quote, and no accept is below it (a chain premium or price floor only
|
|
300
|
+
* raises an accept), so the cheapest known accept is the price: counting the
|
|
301
|
+
* dearest would charge the budget for another chain's floor. */
|
|
300
302
|
async function quotedUsd(url, init, listUsd) {
|
|
301
303
|
if (!CAPS_CONFIGURED) return { usd: listUsd };
|
|
302
304
|
let q = null;
|
|
@@ -312,9 +314,9 @@ async function quotedUsd(url, init, listUsd) {
|
|
|
312
314
|
q = quoteOf(acceptsOf(body));
|
|
313
315
|
}
|
|
314
316
|
} catch { return { usd: listUsd }; /* no readable 402: the advertised price */ }
|
|
315
|
-
if (!q || q.
|
|
317
|
+
if (!q || q.min == null) return { usd: listUsd };
|
|
316
318
|
// Larger of the two: an understated catalog must not lower the ceiling.
|
|
317
|
-
return { usd: Math.max(listUsd, q.
|
|
319
|
+
return { usd: Math.max(listUsd, q.min) };
|
|
318
320
|
}
|
|
319
321
|
|
|
320
322
|
// A refused call's tool text. A 402 body from an x402 v2 seller may also carry
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent402-mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.19",
|
|
4
4
|
"mcpName": "io.github.MikeyPetrillo/agent402",
|
|
5
5
|
"author": "Havok Holdings LLC <mike@agent402.tools> (https://agent402.tools)",
|
|
6
6
|
"homepage": "https://agent402.tools",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"fast-uri": "3.1.8",
|
|
89
89
|
"body-parser": "2.3.0",
|
|
90
90
|
"@hono/node-server": "2.0.12",
|
|
91
|
-
"ip-address": "10.7.
|
|
91
|
+
"ip-address": "10.7.4",
|
|
92
92
|
"@solana-program/token": "0.17.0",
|
|
93
93
|
"@solana-program/compute-budget": "0.19.0",
|
|
94
94
|
"@solana-program/token-2022": "0.19.0",
|