@noelclaw/mcp 1.5.4 → 1.5.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.
Files changed (2) hide show
  1. package/dist/tools/swarm.js +17 -46
  2. package/package.json +1 -1
@@ -94,29 +94,18 @@ async function handleSwarmTool(name, args) {
94
94
  (0, convex_js_1.callConvex)("/swarm/memory/write", "POST", { agentId: "market-monitor", key: "sol_price", value: priceOnly(snapshot.sol) }, "write_swarm_memory"),
95
95
  ]);
96
96
  }
97
- const fmtChange = (n) => `${n >= 0 ? "+" : ""}${n.toFixed(1)}%`;
98
- const arrow = (n) => n >= 0 ? "▲" : "▼";
99
97
  const p = (n) => `$${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
100
- const marketLines = snapshot ? [
101
- ``,
102
- `📡 **Market Snapshot**`,
103
- `| Asset | Price | 24h |`,
104
- `|-------|-------|-----|`,
105
- `| BTC | ${p(snapshot.btc)} | ${arrow(snapshot.btcChange)} ${fmtChange(snapshot.btcChange)} |`,
106
- `| ETH | ${p(snapshot.eth)} | ${arrow(snapshot.ethChange)} ${fmtChange(snapshot.ethChange)} |`,
107
- `| SOL | ${p(snapshot.sol)} | ${arrow(snapshot.solChange)} ${fmtChange(snapshot.solChange)} |`,
108
- ] : [];
109
98
  return {
110
99
  content: [{
111
100
  type: "text",
112
101
  text: [
113
- `🤖 **Swarm is live.**`,
114
- `Session: \`${data.sessionId}\``,
115
- `Started: ${new Date(data.startedAt).toUTCString()}`,
116
- ...marketLines,
102
+ `🤖 **Swarm Started**`,
103
+ `Session ID: ${data.sessionId}`,
104
+ `Started at: ${data.startedAt}`,
105
+ snapshot ? `Market: BTC ${p(snapshot.btc)} | ETH ${p(snapshot.eth)} | SOL ${p(snapshot.sol)}` : "",
117
106
  ``,
118
- `5 agents active — market monitor, sentiment tracker, workflow executor, signal scanner, vault writer.`,
119
- ].join("\n"),
107
+ `Use \`get_swarm_status\` to monitor, \`stop_swarm\` to stop.`,
108
+ ].filter(Boolean).join("\n"),
120
109
  }],
121
110
  };
122
111
  }
@@ -134,41 +123,23 @@ async function handleSwarmTool(name, args) {
134
123
  const memory = data.memory ?? [];
135
124
  const scores = data.scores ?? [];
136
125
  const lines = [
137
- `🤖 **Swarm Status** — ${data.active ? "🟢 Active" : "⚫ Offline"}`,
138
- data.active && session ? `Session: \`${session.id}\`` : `No active swarm.`,
126
+ `🤖 **Swarm Status**`,
127
+ data.active && session ? `Status: active | Session: ${session.id}` : `No active swarm.`,
139
128
  ``,
140
129
  ];
141
130
  if (memory.length > 0) {
142
- // Separate market data from other memory
143
- const marketKeys = ["BTC/USD", "ETH/USD", "SOL/USD"];
144
- const marketEntries = memory.filter((m) => marketKeys.includes(m.key));
145
- const otherEntries = memory.filter((m) => !marketKeys.includes(m.key) && !["btc_price", "eth_price", "sol_price"].includes(m.key));
146
- if (marketEntries.length > 0) {
147
- lines.push(`📡 **Live Market Feed**`);
148
- for (const m of marketEntries) {
149
- const val = m.value.split(" (")[0]; // strip timestamp
150
- lines.push(` ${m.key.padEnd(7)} ${val}`);
151
- }
152
- lines.push("");
153
- }
154
- if (otherEntries.length > 0) {
155
- lines.push(`🧠 **Agent Memory** (${otherEntries.length} entries)`);
156
- for (const m of otherEntries.slice(0, 6)) {
157
- lines.push(` [${m.agentId}] **${m.key}**: ${String(m.value).slice(0, 80)}`);
158
- }
159
- if (otherEntries.length > 6)
160
- lines.push(` …and ${otherEntries.length - 6} more`);
161
- lines.push("");
162
- }
131
+ lines.push(`**Shared Memory** (${memory.length} entries)`);
132
+ for (const m of memory.slice(0, 5))
133
+ lines.push(`• [${m.agentId}] ${m.key}: ${m.value.slice(0, 80)}`);
134
+ if (memory.length > 5)
135
+ lines.push(` …and ${memory.length - 5} more`);
136
+ lines.push("");
163
137
  }
164
138
  if (scores.length > 0) {
165
- lines.push(`⚡ **Skill Performance**`);
139
+ lines.push(`**Execution Scores** (top skills)`);
166
140
  const sorted = scores.sort((a, b) => b.lastScore - a.lastScore).slice(0, 5);
167
- for (const s of sorted) {
168
- const pct = (s.lastScore * 100).toFixed(0);
169
- const bar = "█".repeat(Math.round(s.lastScore * 10)) + "░".repeat(10 - Math.round(s.lastScore * 10));
170
- lines.push(` ${bar} ${pct}% ${s.skillName} (${s.successCount}W / ${s.failCount}L)`);
171
- }
141
+ for (const s of sorted)
142
+ lines.push(`• ${s.skillName}: ${(s.lastScore * 100).toFixed(0)}% | ${s.successCount}W/${s.failCount}L | avg ${Math.round(s.avgDurationMs / 1000)}s`);
172
143
  }
173
144
  return { content: [{ type: "text", text: lines.join("\n") }] };
174
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noelclaw/mcp",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
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": {