coinopai-mcp 2.2.5 → 2.2.6
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/package.json +1 -1
- package/server.json +2 -2
- package/x402-guard.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coinopai-mcp",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"mcpName": "io.github.forgemeshlabs/coinopai-mcp",
|
|
5
5
|
"description": "Auditable market intelligence MCP with x402 payments, calibrated forecast ranges, anomaly review, risk context, and outcome audits. The hosted MCP at https://x402.coinopai.com/mcp has a free handshake (initialize, ping, tools/list); only tool calls are charged",
|
|
6
6
|
"main": "index.js",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/forgemeshlabs/coinopai-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "2.2.
|
|
9
|
+
"version": "2.2.6",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "coinopai-mcp",
|
|
14
|
-
"version": "2.2.
|
|
14
|
+
"version": "2.2.6",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
package/x402-guard.js
CHANGED
|
@@ -103,10 +103,11 @@ function createGuard(opts) {
|
|
|
103
103
|
function httpError(res, prefix, charged) {
|
|
104
104
|
let upstream;
|
|
105
105
|
try { upstream = JSON.parse(res.text); } catch { upstream = res.text.slice(0, 500); }
|
|
106
|
-
|
|
107
|
-
const
|
|
106
|
+
// The message stays short and fixed; the service body travels only as structured, capped data.
|
|
107
|
+
const code = upstream && typeof upstream === "object" && typeof upstream.error === "string" && /^[a-z0-9_-]{1,64}$/i.test(upstream.error) ? ` ${upstream.error}` : "";
|
|
108
|
+
const err = new Error(`${prefix}HTTP ${res.status}${code}`);
|
|
108
109
|
err.status = res.status;
|
|
109
|
-
err.upstream = upstream;
|
|
110
|
+
err.upstream = typeof upstream === "string" ? upstream.slice(0, 1500) : (JSON.stringify(upstream).length > 1500 ? JSON.stringify(upstream).slice(0, 1500) : upstream);
|
|
110
111
|
if (charged !== undefined) err.charged = charged;
|
|
111
112
|
else if (upstream && typeof upstream === "object" && typeof upstream.charged === "boolean") err.charged = upstream.charged;
|
|
112
113
|
return err;
|