@noelclaw/mcp 1.5.1 → 1.5.3
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/dist/tools/miroshark.js +28 -0
- package/dist/tools/swarm.js +4 -0
- package/package.json +1 -1
package/dist/tools/miroshark.js
CHANGED
|
@@ -33,6 +33,20 @@ exports.MIROSHARK_TOOLS = [
|
|
|
33
33
|
required: ["simulation_id"],
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
name: "miroshark_stop",
|
|
38
|
+
description: "Stop a running MiroShark simulation.",
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: "object",
|
|
41
|
+
properties: {
|
|
42
|
+
simulation_id: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Simulation ID to stop",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: ["simulation_id"],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
36
50
|
];
|
|
37
51
|
// ── HTTP helpers ──────────────────────────────────────────────────────────────
|
|
38
52
|
function authHeaders() {
|
|
@@ -262,5 +276,19 @@ async function handleMirosharkTool(name, args) {
|
|
|
262
276
|
return { content: [{ type: "text", text: `MiroShark error: ${err.message}` }], isError: true };
|
|
263
277
|
}
|
|
264
278
|
}
|
|
279
|
+
// ── miroshark_stop ────────────────────────────────────────────────────────
|
|
280
|
+
if (name === "miroshark_stop") {
|
|
281
|
+
if (!a.simulation_id?.trim()) {
|
|
282
|
+
return { content: [{ type: "text", text: "simulation_id is required" }], isError: true };
|
|
283
|
+
}
|
|
284
|
+
const simId = a.simulation_id.trim();
|
|
285
|
+
try {
|
|
286
|
+
await miroJson(`/miroshark/api/simulation/${simId}/stop`, "POST", {});
|
|
287
|
+
return { content: [{ type: "text", text: `⏹️ Simulation \`${simId}\` stopped.` }] };
|
|
288
|
+
}
|
|
289
|
+
catch (err) {
|
|
290
|
+
return { content: [{ type: "text", text: `MiroShark error: ${err.message}` }], isError: true };
|
|
291
|
+
}
|
|
292
|
+
}
|
|
265
293
|
return null;
|
|
266
294
|
}
|
package/dist/tools/swarm.js
CHANGED
|
@@ -84,10 +84,14 @@ async function handleSwarmTool(name, args) {
|
|
|
84
84
|
if (snapshot) {
|
|
85
85
|
const ts = new Date().toUTCString();
|
|
86
86
|
const fmt = (n) => `$${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} (${ts})`;
|
|
87
|
+
const priceOnly = (n) => `$${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
87
88
|
await Promise.all([
|
|
88
89
|
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "BTC/USD", value: fmt(snapshot.btc) }, "write_swarm_memory"),
|
|
89
90
|
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "ETH/USD", value: fmt(snapshot.eth) }, "write_swarm_memory"),
|
|
90
91
|
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "SOL/USD", value: fmt(snapshot.sol) }, "write_swarm_memory"),
|
|
92
|
+
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "btc_price", value: priceOnly(snapshot.btc) }, "write_swarm_memory"),
|
|
93
|
+
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "eth_price", value: priceOnly(snapshot.eth) }, "write_swarm_memory"),
|
|
94
|
+
(0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "sol_price", value: priceOnly(snapshot.sol) }, "write_swarm_memory"),
|
|
91
95
|
]);
|
|
92
96
|
}
|
|
93
97
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noelclaw/mcp",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Noelclaw as an MCP skill — persistent memory, multi-agent coordination, scenario simulation, DeFi execution, and Sentinel-gated playbooks.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|