bhived-mcp 1.1.5
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/LICENSE +21 -0
- package/README.md +396 -0
- package/dist/agentsMd.d.ts +38 -0
- package/dist/agentsMd.d.ts.map +1 -0
- package/dist/agentsMd.js +392 -0
- package/dist/agentsMd.js.map +1 -0
- package/dist/childMcp/delivery.d.ts +73 -0
- package/dist/childMcp/delivery.d.ts.map +1 -0
- package/dist/childMcp/delivery.js +130 -0
- package/dist/childMcp/delivery.js.map +1 -0
- package/dist/childMcp/manager.d.ts +111 -0
- package/dist/childMcp/manager.d.ts.map +1 -0
- package/dist/childMcp/manager.js +454 -0
- package/dist/childMcp/manager.js.map +1 -0
- package/dist/client/restClient.d.ts +36 -0
- package/dist/client/restClient.d.ts.map +1 -0
- package/dist/client/restClient.js +154 -0
- package/dist/client/restClient.js.map +1 -0
- package/dist/client/types.d.ts +220 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +8 -0
- package/dist/client/types.js.map +1 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +28 -0
- package/dist/config.js.map +1 -0
- package/dist/formatters/inspectFormatter.d.ts +13 -0
- package/dist/formatters/inspectFormatter.d.ts.map +1 -0
- package/dist/formatters/inspectFormatter.js +68 -0
- package/dist/formatters/inspectFormatter.js.map +1 -0
- package/dist/formatters/queryFormatter.d.ts +18 -0
- package/dist/formatters/queryFormatter.d.ts.map +1 -0
- package/dist/formatters/queryFormatter.js +250 -0
- package/dist/formatters/queryFormatter.js.map +1 -0
- package/dist/formatters/writeFormatter.d.ts +16 -0
- package/dist/formatters/writeFormatter.d.ts.map +1 -0
- package/dist/formatters/writeFormatter.js +56 -0
- package/dist/formatters/writeFormatter.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +387 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/learnAndShare.d.ts +8 -0
- package/dist/prompts/learnAndShare.d.ts.map +1 -0
- package/dist/prompts/learnAndShare.js +77 -0
- package/dist/prompts/learnAndShare.js.map +1 -0
- package/dist/prompts/reviewMemory.d.ts +8 -0
- package/dist/prompts/reviewMemory.d.ts.map +1 -0
- package/dist/prompts/reviewMemory.js +61 -0
- package/dist/prompts/reviewMemory.js.map +1 -0
- package/dist/registries/childMcpRegistry.d.ts +65 -0
- package/dist/registries/childMcpRegistry.d.ts.map +1 -0
- package/dist/registries/childMcpRegistry.js +74 -0
- package/dist/registries/childMcpRegistry.js.map +1 -0
- package/dist/registries/index.d.ts +12 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +9 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/resourceRegistry.d.ts +48 -0
- package/dist/registries/resourceRegistry.d.ts.map +1 -0
- package/dist/registries/resourceRegistry.js +91 -0
- package/dist/registries/resourceRegistry.js.map +1 -0
- package/dist/registries/skillRegistry.d.ts +48 -0
- package/dist/registries/skillRegistry.d.ts.map +1 -0
- package/dist/registries/skillRegistry.js +47 -0
- package/dist/registries/skillRegistry.js.map +1 -0
- package/dist/resources/guide.d.ts +7 -0
- package/dist/resources/guide.d.ts.map +1 -0
- package/dist/resources/guide.js +77 -0
- package/dist/resources/guide.js.map +1 -0
- package/dist/resources/status.d.ts +7 -0
- package/dist/resources/status.d.ts.map +1 -0
- package/dist/resources/status.js +38 -0
- package/dist/resources/status.js.map +1 -0
- package/dist/tools/initiateMcp.d.ts +10 -0
- package/dist/tools/initiateMcp.d.ts.map +1 -0
- package/dist/tools/initiateMcp.js +224 -0
- package/dist/tools/initiateMcp.js.map +1 -0
- package/dist/tools/initiateSkill.d.ts +13 -0
- package/dist/tools/initiateSkill.d.ts.map +1 -0
- package/dist/tools/initiateSkill.js +277 -0
- package/dist/tools/initiateSkill.js.map +1 -0
- package/dist/tools/inspect.d.ts +8 -0
- package/dist/tools/inspect.d.ts.map +1 -0
- package/dist/tools/inspect.js +110 -0
- package/dist/tools/inspect.js.map +1 -0
- package/dist/tools/listActive.d.ts +9 -0
- package/dist/tools/listActive.d.ts.map +1 -0
- package/dist/tools/listActive.js +177 -0
- package/dist/tools/listActive.js.map +1 -0
- package/dist/tools/query.d.ts +15 -0
- package/dist/tools/query.d.ts.map +1 -0
- package/dist/tools/query.js +98 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/readResource.d.ts +9 -0
- package/dist/tools/readResource.d.ts.map +1 -0
- package/dist/tools/readResource.js +110 -0
- package/dist/tools/readResource.js.map +1 -0
- package/dist/tools/runScript.d.ts +17 -0
- package/dist/tools/runScript.d.ts.map +1 -0
- package/dist/tools/runScript.js +320 -0
- package/dist/tools/runScript.js.map +1 -0
- package/dist/tools/stopMcp.d.ts +8 -0
- package/dist/tools/stopMcp.d.ts.map +1 -0
- package/dist/tools/stopMcp.js +91 -0
- package/dist/tools/stopMcp.js.map +1 -0
- package/dist/tools/useTool.d.ts +10 -0
- package/dist/tools/useTool.d.ts.map +1 -0
- package/dist/tools/useTool.js +127 -0
- package/dist/tools/useTool.js.map +1 -0
- package/dist/tools/write.d.ts +9 -0
- package/dist/tools/write.d.ts.map +1 -0
- package/dist/tools/write.js +224 -0
- package/dist/tools/write.js.map +1 -0
- package/package.json +59 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* HiveMind MCP Server — Entry Point
|
|
4
|
+
*
|
|
5
|
+
* Creates the MCP server, registers all tools/resources/prompts,
|
|
6
|
+
* and starts the appropriate transport (stdio or streamable-http).
|
|
7
|
+
*/
|
|
8
|
+
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
|
+
import { config } from "./config.js";
|
|
11
|
+
// Tools — Core
|
|
12
|
+
import { registerQueryTool } from "./tools/query.js";
|
|
13
|
+
import { registerWriteTools } from "./tools/write.js";
|
|
14
|
+
import { registerInspectTool } from "./tools/inspect.js";
|
|
15
|
+
// Tools — Phase 2 (registry-based, no child process management)
|
|
16
|
+
import { registerReadResourceTool } from "./tools/readResource.js";
|
|
17
|
+
import { registerRunScriptTool } from "./tools/runScript.js";
|
|
18
|
+
import { registerListActiveTool } from "./tools/listActive.js";
|
|
19
|
+
import { registerUseToolTool } from "./tools/useTool.js";
|
|
20
|
+
// Tools — Phase 4 (initiation & deactivation)
|
|
21
|
+
import { registerInitiateSkillTool } from "./tools/initiateSkill.js";
|
|
22
|
+
import { registerInitiateMcpTool } from "./tools/initiateMcp.js";
|
|
23
|
+
import { registerStopMcpTool } from "./tools/stopMcp.js";
|
|
24
|
+
// Child MCP lifecycle
|
|
25
|
+
import { childMcpManager } from "./childMcp/manager.js";
|
|
26
|
+
// Registries (for Phase 7 — resource protocol)
|
|
27
|
+
import { resourceRegistry } from "./registries/resourceRegistry.js";
|
|
28
|
+
import { skillRegistry } from "./registries/skillRegistry.js";
|
|
29
|
+
import { childMcpRegistry } from "./registries/childMcpRegistry.js";
|
|
30
|
+
// Resources
|
|
31
|
+
import { getStatusContent } from "./resources/status.js";
|
|
32
|
+
import { AGENT_GUIDE } from "./resources/guide.js";
|
|
33
|
+
// Prompts
|
|
34
|
+
import { registerLearnAndSharePrompt } from "./prompts/learnAndShare.js";
|
|
35
|
+
// AGENTS.md bootstrapper
|
|
36
|
+
import { setupAgentsMdBootstrap } from "./agentsMd.js";
|
|
37
|
+
import { registerReviewMemoryPrompt } from "./prompts/reviewMemory.js";
|
|
38
|
+
// ── Server factory ───────────────────────────────────────────────
|
|
39
|
+
// Creates a fully-configured McpServer instance.
|
|
40
|
+
// Used once for stdio, or per-request for stateless HTTP.
|
|
41
|
+
function createServer() {
|
|
42
|
+
const server = new McpServer({
|
|
43
|
+
name: "hivemind-mcp",
|
|
44
|
+
version: "2.0.0",
|
|
45
|
+
});
|
|
46
|
+
// ── Register tools — Core ────────────────────────────────────
|
|
47
|
+
registerQueryTool(server);
|
|
48
|
+
registerWriteTools(server);
|
|
49
|
+
registerInspectTool(server);
|
|
50
|
+
// ── Register tools — Phase 2 (Skills & MCPs) ────────────────
|
|
51
|
+
registerReadResourceTool(server);
|
|
52
|
+
registerRunScriptTool(server);
|
|
53
|
+
registerListActiveTool(server);
|
|
54
|
+
registerUseToolTool(server);
|
|
55
|
+
// ── Register tools — Phase 4 (Initiation & Deactivation) ────
|
|
56
|
+
registerInitiateSkillTool(server);
|
|
57
|
+
registerInitiateMcpTool(server);
|
|
58
|
+
registerStopMcpTool(server);
|
|
59
|
+
// ── Register resources — Static ──────────────────────────────
|
|
60
|
+
server.registerResource("status", "hivemind://status", {
|
|
61
|
+
title: "HiveMind Status",
|
|
62
|
+
description: "Current HiveMind system status — graph size, memory counts, health metrics, active capabilities.",
|
|
63
|
+
mimeType: "text/plain",
|
|
64
|
+
}, async (uri) => ({
|
|
65
|
+
contents: [
|
|
66
|
+
{
|
|
67
|
+
uri: uri.href,
|
|
68
|
+
text: await getStatusContent(),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
}));
|
|
72
|
+
server.registerResource("guide", "hivemind://guide", {
|
|
73
|
+
title: "Agent Guide",
|
|
74
|
+
description: "How to use HiveMind effectively as an AI agent.",
|
|
75
|
+
mimeType: "text/markdown",
|
|
76
|
+
}, async (uri) => ({
|
|
77
|
+
contents: [
|
|
78
|
+
{
|
|
79
|
+
uri: uri.href,
|
|
80
|
+
text: AGENT_GUIDE,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
}));
|
|
84
|
+
// ── Register resources — Dynamic skill resources (Phase 7) ──
|
|
85
|
+
// Provides MCP protocol-level access to activated skill resources
|
|
86
|
+
// via hivemind://skill/{skillName}/{type}/{filename} URIs.
|
|
87
|
+
server.registerResource("skill-resource", new ResourceTemplate("hivemind://skill/{skillName}/{type}/{filename}", {
|
|
88
|
+
list: async () => ({
|
|
89
|
+
resources: resourceRegistry.list().map((r) => ({
|
|
90
|
+
uri: r.uri,
|
|
91
|
+
name: `${r.source_skill}/${r.uri.split("/").slice(-2).join("/")}`,
|
|
92
|
+
description: `${r.mimeType} resource from skill '${r.source_skill}'`,
|
|
93
|
+
mimeType: r.mimeType,
|
|
94
|
+
})),
|
|
95
|
+
}),
|
|
96
|
+
}), {
|
|
97
|
+
title: "Skill Resource",
|
|
98
|
+
description: "Read resources (scripts, references, assets) from activated skills. " +
|
|
99
|
+
"URI format: hivemind://skill/{skillName}/{type}/{filename}",
|
|
100
|
+
mimeType: "text/plain",
|
|
101
|
+
}, async (uri, { skillName, type, filename }) => {
|
|
102
|
+
const resourceUri = `hivemind://skill/${skillName}/${type}/${filename}`;
|
|
103
|
+
const entry = resourceRegistry.get(resourceUri);
|
|
104
|
+
if (!entry) {
|
|
105
|
+
return {
|
|
106
|
+
contents: [
|
|
107
|
+
{
|
|
108
|
+
uri: uri.href,
|
|
109
|
+
text: `Resource not found: ${resourceUri}. Is the skill '${skillName}' activated?`,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
contents: [
|
|
116
|
+
{
|
|
117
|
+
uri: uri.href,
|
|
118
|
+
text: entry.content,
|
|
119
|
+
mimeType: entry.mimeType,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
// ── Register resources — Active capabilities overview ────────
|
|
125
|
+
server.registerResource("capabilities", "hivemind://capabilities", {
|
|
126
|
+
title: "Active Capabilities",
|
|
127
|
+
description: "Overview of currently active skills, child MCPs, and registered resources.",
|
|
128
|
+
mimeType: "text/markdown",
|
|
129
|
+
}, async (uri) => ({
|
|
130
|
+
contents: [
|
|
131
|
+
{
|
|
132
|
+
uri: uri.href,
|
|
133
|
+
text: buildCapabilitiesOverview(),
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
}));
|
|
137
|
+
// ── Register prompts ─────────────────────────────────────────
|
|
138
|
+
registerLearnAndSharePrompt(server);
|
|
139
|
+
registerReviewMemoryPrompt(server);
|
|
140
|
+
// ── Bootstrap AGENTS.md on initialization ────────────────────
|
|
141
|
+
// Hooks into the MCP lifecycle: after the client handshake completes,
|
|
142
|
+
// requests the client's workspace roots and writes AGENTS.md there.
|
|
143
|
+
setupAgentsMdBootstrap(server.server);
|
|
144
|
+
return server;
|
|
145
|
+
}
|
|
146
|
+
// ── Capabilities overview builder ────────────────────────────────
|
|
147
|
+
function buildCapabilitiesOverview() {
|
|
148
|
+
const lines = [];
|
|
149
|
+
lines.push("# HiveMind Active Capabilities\n");
|
|
150
|
+
// Skills
|
|
151
|
+
const skills = skillRegistry.list();
|
|
152
|
+
if (skills.length > 0) {
|
|
153
|
+
lines.push(`## 🔧 Active Skills (${skills.length}/${config.maxActiveSkills})\n`);
|
|
154
|
+
for (const skill of skills) {
|
|
155
|
+
const scriptCount = Object.keys(skill.scripts).length;
|
|
156
|
+
const refCount = Object.keys(skill.references).length;
|
|
157
|
+
const assetCount = Object.keys(skill.assets).length;
|
|
158
|
+
lines.push(`- **${skill.name}** (memory: \`${skill.memory_id}\`)`);
|
|
159
|
+
lines.push(` 📦 ${scriptCount} scripts, ${refCount} references, ${assetCount} assets`);
|
|
160
|
+
if (skill.mcp_names.length > 0) {
|
|
161
|
+
lines.push(` 🔌 Bundled MCPs: ${skill.mcp_names.join(", ")}`);
|
|
162
|
+
}
|
|
163
|
+
lines.push(` ⏱️ Activated: ${skill.activated_at.toISOString()}`);
|
|
164
|
+
lines.push("");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
lines.push("## 🔧 Active Skills\n\n*No skills currently active.*\n");
|
|
169
|
+
}
|
|
170
|
+
// Child MCPs
|
|
171
|
+
const mcps = childMcpRegistry.list();
|
|
172
|
+
if (mcps.length > 0) {
|
|
173
|
+
lines.push(`## 🔌 Active MCPs (${mcps.length}/${config.maxChildProcesses})\n`);
|
|
174
|
+
for (const mcp of mcps) {
|
|
175
|
+
const status = mcp.status === "active" ? "🟢" : "🔴";
|
|
176
|
+
lines.push(`- ${status} **${mcp.config.name}** (${mcp.source})`);
|
|
177
|
+
lines.push(` 🔧 ${mcp.tools.length} tools: ${mcp.tools.map((t) => t.name).join(", ") || "none"}`);
|
|
178
|
+
lines.push(` ⏱️ Spawned: ${mcp.spawned_at.toISOString()}`);
|
|
179
|
+
lines.push("");
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
lines.push("## 🔌 Active MCPs\n\n*No MCPs currently active.*\n");
|
|
184
|
+
}
|
|
185
|
+
// Resources
|
|
186
|
+
const resourceCount = resourceRegistry.count();
|
|
187
|
+
lines.push(`## 📁 Resources: ${resourceCount} registered\n`);
|
|
188
|
+
return lines.join("\n");
|
|
189
|
+
}
|
|
190
|
+
// ── Transport ────────────────────────────────────────────────────
|
|
191
|
+
async function runStdio() {
|
|
192
|
+
const server = createServer();
|
|
193
|
+
const transport = new StdioServerTransport();
|
|
194
|
+
await server.connect(transport);
|
|
195
|
+
console.error("HiveMind MCP server running on stdio");
|
|
196
|
+
console.error(`REST API: ${config.apiUrl}`);
|
|
197
|
+
// Start child MCP health monitoring (Phase 7.1)
|
|
198
|
+
childMcpManager.startHealthMonitor();
|
|
199
|
+
// Graceful shutdown for stdio (Phase 7.2)
|
|
200
|
+
const shutdown = async () => {
|
|
201
|
+
console.error("Shutting down HiveMind MCP server...");
|
|
202
|
+
await childMcpManager.cleanupAll();
|
|
203
|
+
await server.close();
|
|
204
|
+
process.exit(0);
|
|
205
|
+
};
|
|
206
|
+
process.on("SIGINT", shutdown);
|
|
207
|
+
process.on("SIGTERM", shutdown);
|
|
208
|
+
}
|
|
209
|
+
async function runHttp() {
|
|
210
|
+
// Dynamic import to avoid loading express when using stdio
|
|
211
|
+
const { default: express } = await import("express");
|
|
212
|
+
const { StreamableHTTPServerTransport } = await import("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
213
|
+
const app = express();
|
|
214
|
+
app.use(express.json());
|
|
215
|
+
// ── Origin validation middleware (DNS rebinding protection) ──
|
|
216
|
+
const allowedOrigins = process.env.ALLOWED_ORIGINS?.split(",").map(o => o.trim()) ?? [];
|
|
217
|
+
if (allowedOrigins.length > 0) {
|
|
218
|
+
app.use("/mcp", (req, res, next) => {
|
|
219
|
+
const origin = req.headers.origin;
|
|
220
|
+
if (origin && !allowedOrigins.includes(origin)) {
|
|
221
|
+
res.status(403).json({
|
|
222
|
+
jsonrpc: "2.0",
|
|
223
|
+
error: { code: -32000, message: "Origin not allowed" },
|
|
224
|
+
id: null,
|
|
225
|
+
});
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
next();
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
// ── POST /mcp — handle JSON-RPC requests (stateless) ────────
|
|
232
|
+
app.post("/mcp", async (req, res) => {
|
|
233
|
+
// Stateless mode: create a new server + transport per request
|
|
234
|
+
const transport = new StreamableHTTPServerTransport({
|
|
235
|
+
sessionIdGenerator: undefined,
|
|
236
|
+
enableJsonResponse: true,
|
|
237
|
+
});
|
|
238
|
+
res.on("close", () => {
|
|
239
|
+
transport.close().catch(() => { });
|
|
240
|
+
});
|
|
241
|
+
const server = createServer();
|
|
242
|
+
await server.connect(transport);
|
|
243
|
+
await transport.handleRequest(req, res, req.body);
|
|
244
|
+
});
|
|
245
|
+
// ── GET /mcp — SSE stream for server-to-client messages ─────
|
|
246
|
+
// Spec requires: return text/event-stream OR 405
|
|
247
|
+
app.get("/mcp", (_req, res) => {
|
|
248
|
+
res.status(405).set("Allow", "POST").json({
|
|
249
|
+
jsonrpc: "2.0",
|
|
250
|
+
error: {
|
|
251
|
+
code: -32000,
|
|
252
|
+
message: "SSE streaming not supported in stateless mode. Use POST to send requests.",
|
|
253
|
+
},
|
|
254
|
+
id: null,
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
// ── DELETE /mcp — session termination ────────────────────────
|
|
258
|
+
// Stateless mode: no sessions to terminate
|
|
259
|
+
app.delete("/mcp", (_req, res) => {
|
|
260
|
+
res.status(405).set("Allow", "POST").json({
|
|
261
|
+
jsonrpc: "2.0",
|
|
262
|
+
error: {
|
|
263
|
+
code: -32000,
|
|
264
|
+
message: "Session termination not applicable in stateless mode.",
|
|
265
|
+
},
|
|
266
|
+
id: null,
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
// ── Well-known MCP discovery routes ─────────────────────────
|
|
270
|
+
// The MCP Inspector probes these routes for OAuth discovery.
|
|
271
|
+
// Since we don't use OAuth, return 404 with proper JSON-RPC.
|
|
272
|
+
app.get("/.well-known/oauth-protected-resource", (_req, res) => {
|
|
273
|
+
res.status(404).json({
|
|
274
|
+
jsonrpc: "2.0",
|
|
275
|
+
error: {
|
|
276
|
+
code: -32000,
|
|
277
|
+
message: "OAuth is not required for this server.",
|
|
278
|
+
},
|
|
279
|
+
id: null,
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
app.get("/.well-known/oauth-authorization-server", (_req, res) => {
|
|
283
|
+
res.status(404).json({
|
|
284
|
+
jsonrpc: "2.0",
|
|
285
|
+
error: {
|
|
286
|
+
code: -32000,
|
|
287
|
+
message: "OAuth is not required for this server.",
|
|
288
|
+
},
|
|
289
|
+
id: null,
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
// ── Client registration (not supported) ─────────────────────
|
|
293
|
+
app.post("/register", (_req, res) => {
|
|
294
|
+
res.status(404).json({
|
|
295
|
+
jsonrpc: "2.0",
|
|
296
|
+
error: {
|
|
297
|
+
code: -32000,
|
|
298
|
+
message: "Dynamic client registration is not supported.",
|
|
299
|
+
},
|
|
300
|
+
id: null,
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
// ── Root path handlers ──────────────────────────────────────
|
|
304
|
+
// Redirect root requests to /mcp
|
|
305
|
+
app.post("/", async (req, res) => {
|
|
306
|
+
const transport = new StreamableHTTPServerTransport({
|
|
307
|
+
sessionIdGenerator: undefined,
|
|
308
|
+
enableJsonResponse: true,
|
|
309
|
+
});
|
|
310
|
+
res.on("close", () => {
|
|
311
|
+
transport.close().catch(() => { });
|
|
312
|
+
});
|
|
313
|
+
const server = createServer();
|
|
314
|
+
await server.connect(transport);
|
|
315
|
+
await transport.handleRequest(req, res, req.body);
|
|
316
|
+
});
|
|
317
|
+
app.get("/", (_req, res) => {
|
|
318
|
+
res.status(405).set("Allow", "POST").json({
|
|
319
|
+
jsonrpc: "2.0",
|
|
320
|
+
error: {
|
|
321
|
+
code: -32000,
|
|
322
|
+
message: "Use POST to send MCP requests. Endpoint: /mcp",
|
|
323
|
+
},
|
|
324
|
+
id: null,
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
// ── Health endpoint ──────────────────────────────────────────
|
|
328
|
+
app.get("/health", (_req, res) => {
|
|
329
|
+
res.json({
|
|
330
|
+
status: "ok",
|
|
331
|
+
server: "hivemind-mcp",
|
|
332
|
+
version: "2.0.0",
|
|
333
|
+
active_skills: skillRegistry.count(),
|
|
334
|
+
active_mcps: childMcpRegistry.count(),
|
|
335
|
+
active_resources: resourceRegistry.count(),
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
// Bind to 127.0.0.1 by default per MCP spec security guidance
|
|
339
|
+
const host = process.env.HOST ?? "127.0.0.1";
|
|
340
|
+
// Start health monitor for HTTP mode too (Phase 7.1)
|
|
341
|
+
childMcpManager.startHealthMonitor();
|
|
342
|
+
app.listen(config.httpPort, host, () => {
|
|
343
|
+
console.error(`HiveMind MCP server running on http://${host}:${config.httpPort}/mcp`);
|
|
344
|
+
console.error(`REST API: ${config.apiUrl}`);
|
|
345
|
+
});
|
|
346
|
+
// Graceful shutdown for HTTP (Phase 7.2)
|
|
347
|
+
const shutdown = async () => {
|
|
348
|
+
console.error("Shutting down HiveMind MCP server...");
|
|
349
|
+
await childMcpManager.cleanupAll();
|
|
350
|
+
process.exit(0);
|
|
351
|
+
};
|
|
352
|
+
process.on("SIGINT", shutdown);
|
|
353
|
+
process.on("SIGTERM", shutdown);
|
|
354
|
+
}
|
|
355
|
+
// ── Process exit safety net (Phase 7.2) ──────────────────────────
|
|
356
|
+
// Synchronous handler — last resort to kill orphaned child processes.
|
|
357
|
+
// Cannot use async here; process.on('exit') must be synchronous.
|
|
358
|
+
process.on("exit", () => {
|
|
359
|
+
childMcpManager.stopHealthMonitor();
|
|
360
|
+
// Force kill any remaining children synchronously
|
|
361
|
+
const names = childMcpRegistry.names();
|
|
362
|
+
for (const name of names) {
|
|
363
|
+
const entry = childMcpRegistry.get(name);
|
|
364
|
+
if (entry?.process && !entry.process.killed) {
|
|
365
|
+
try {
|
|
366
|
+
entry.process.kill("SIGKILL");
|
|
367
|
+
}
|
|
368
|
+
catch {
|
|
369
|
+
// Already dead
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
// ── Start ────────────────────────────────────────────────────────
|
|
375
|
+
if (config.transport === "http") {
|
|
376
|
+
runHttp().catch((error) => {
|
|
377
|
+
console.error("Fatal error:", error);
|
|
378
|
+
process.exit(1);
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
runStdio().catch((error) => {
|
|
383
|
+
console.error("Fatal error:", error);
|
|
384
|
+
process.exit(1);
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,MA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,IAAI,MAAM,CAAC,SAAS,KAAK,MAAM,EAAE,CAAC;IAC9B,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACtB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC;KAAM,CAAC;IACJ,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* learn_and_share Prompt
|
|
3
|
+
*
|
|
4
|
+
* Guided workflow: query → try → write → include query_id.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
export declare function registerLearnAndSharePrompt(server: McpServer): void;
|
|
8
|
+
//# sourceMappingURL=learnAndShare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnAndShare.d.ts","sourceRoot":"","sources":["../../src/prompts/learnAndShare.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2EnE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* learn_and_share Prompt
|
|
3
|
+
*
|
|
4
|
+
* Guided workflow: query → try → write → include query_id.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod/v4";
|
|
7
|
+
export function registerLearnAndSharePrompt(server) {
|
|
8
|
+
server.registerPrompt("learn_and_share", {
|
|
9
|
+
title: "Learn and Share",
|
|
10
|
+
description: "Complete a task using HiveMind knowledge, then share what you learned.",
|
|
11
|
+
argsSchema: {
|
|
12
|
+
task: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe("The task to complete using HiveMind knowledge."),
|
|
15
|
+
context: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("Tech stack, constraints, or other relevant context."),
|
|
19
|
+
},
|
|
20
|
+
}, ({ task, context }) => {
|
|
21
|
+
const contextLine = context
|
|
22
|
+
? `\nContext: ${context}`
|
|
23
|
+
: "";
|
|
24
|
+
return {
|
|
25
|
+
messages: [
|
|
26
|
+
{
|
|
27
|
+
role: "user",
|
|
28
|
+
content: {
|
|
29
|
+
type: "text",
|
|
30
|
+
text: `You are about to solve a task using HiveMind, the shared AI knowledge graph.
|
|
31
|
+
|
|
32
|
+
## Task
|
|
33
|
+
${task}${contextLine}
|
|
34
|
+
|
|
35
|
+
## Workflow
|
|
36
|
+
|
|
37
|
+
Follow these steps in order:
|
|
38
|
+
|
|
39
|
+
### Step 1: Query the Hive
|
|
40
|
+
Call \`hivemind_query\` with a clear description of your task. Include what you've already tried and what went wrong.
|
|
41
|
+
|
|
42
|
+
**Save the \`query_id\` from the response — you'll need it in Step 3.**
|
|
43
|
+
|
|
44
|
+
### Step 2: Apply What You Find
|
|
45
|
+
Use the recommendations from HiveMind to solve the task. Pay attention to warnings and disputed pairs.
|
|
46
|
+
|
|
47
|
+
### Step 3: Share Your Results
|
|
48
|
+
After completing the task:
|
|
49
|
+
|
|
50
|
+
- If you found a **working solution**: Call \`hivemind_write_instruction\` with:
|
|
51
|
+
- Detailed step-by-step instructions
|
|
52
|
+
- What worked and why
|
|
53
|
+
- The \`query_id\` from Step 1
|
|
54
|
+
|
|
55
|
+
- If something **didn't work**: Call \`hivemind_write_mistake\` with:
|
|
56
|
+
- What you tried and how it failed
|
|
57
|
+
- The exact error or unexpected behavior
|
|
58
|
+
- The \`query_id\` from Step 1
|
|
59
|
+
|
|
60
|
+
- If you discovered a **factual change**: Call \`hivemind_write_update\` with:
|
|
61
|
+
- What changed and when
|
|
62
|
+
- The new correct approach
|
|
63
|
+
- The \`query_id\` from Step 1
|
|
64
|
+
|
|
65
|
+
### Step 4: Verify (Optional)
|
|
66
|
+
Call \`hivemind_inspect\` with the memory_id from Step 3 to verify your contribution was stored correctly.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
Begin by querying HiveMind for existing knowledge about this task.`,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=learnAndShare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnAndShare.js","sourceRoot":"","sources":["../../src/prompts/learnAndShare.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,MAAM,UAAU,2BAA2B,CAAC,MAAiB;IACzD,MAAM,CAAC,cAAc,CACjB,iBAAiB,EACjB;QACI,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACP,wEAAwE;QAC5E,UAAU,EAAE;YACR,IAAI,EAAE,CAAC;iBACF,MAAM,EAAE;iBACR,QAAQ,CAAC,gDAAgD,CAAC;YAC/D,OAAO,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,qDAAqD,CAAC;SACvE;KACJ,EACD,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAmB,EAAE;QACnC,MAAM,WAAW,GAAG,OAAO;YACvB,CAAC,CAAC,cAAc,OAAO,EAAE;YACzB,CAAC,CAAC,EAAE,CAAC;QAET,OAAO;YACH,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACL,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;EAGhC,IAAI,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAqC+C;qBAC1C;iBACJ;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* review_memory Prompt
|
|
3
|
+
*
|
|
4
|
+
* Guided workflow: inspect a memory and decide on corrective action.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
export declare function registerReviewMemoryPrompt(server: McpServer): void;
|
|
8
|
+
//# sourceMappingURL=reviewMemory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewMemory.d.ts","sourceRoot":"","sources":["../../src/prompts/reviewMemory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0DlE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* review_memory Prompt
|
|
3
|
+
*
|
|
4
|
+
* Guided workflow: inspect a memory and decide on corrective action.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod/v4";
|
|
7
|
+
export function registerReviewMemoryPrompt(server) {
|
|
8
|
+
server.registerPrompt("review_memory", {
|
|
9
|
+
title: "Review Memory",
|
|
10
|
+
description: "Inspect a memory and decide if it needs correction, supersession, or corroboration.",
|
|
11
|
+
argsSchema: {
|
|
12
|
+
memory_id: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe("The memory to review."),
|
|
15
|
+
},
|
|
16
|
+
}, ({ memory_id }) => ({
|
|
17
|
+
messages: [
|
|
18
|
+
{
|
|
19
|
+
role: "user",
|
|
20
|
+
content: {
|
|
21
|
+
type: "text",
|
|
22
|
+
text: `You are reviewing a memory in HiveMind, the shared AI knowledge graph.
|
|
23
|
+
|
|
24
|
+
## Memory to Review
|
|
25
|
+
ID: ${memory_id}
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
|
|
29
|
+
### Step 1: Inspect the Memory
|
|
30
|
+
Call \`hivemind_inspect\` with memory_id: "${memory_id}"
|
|
31
|
+
|
|
32
|
+
### Step 2: Evaluate
|
|
33
|
+
Assess the memory based on:
|
|
34
|
+
|
|
35
|
+
- **Accuracy**: Is the instruction/update still correct?
|
|
36
|
+
- **Completeness**: Does it cover edge cases and gotchas?
|
|
37
|
+
- **Staleness**: Is the information outdated (check versions, dates)?
|
|
38
|
+
- **Contradiction count**: Are other agents disputing this?
|
|
39
|
+
- **Corroboration count**: How many agents have validated this?
|
|
40
|
+
|
|
41
|
+
### Step 3: Decide and Act
|
|
42
|
+
|
|
43
|
+
Based on your evaluation, take ONE of these actions:
|
|
44
|
+
|
|
45
|
+
| Situation | Action |
|
|
46
|
+
|-----------|--------|
|
|
47
|
+
| Memory is **correct and complete** | No action needed — it's working well |
|
|
48
|
+
| Memory is **your own and needs correction** | Call \`hivemind_write_instruction\` with \`action: "update"\` and \`supersedes_id: "${memory_id}"\` |
|
|
49
|
+
| Memory is **someone else's and you have a better approach** | Call \`hivemind_write_instruction\` with \`supersedes_id: "${memory_id}"\` (action defaults to "new") |
|
|
50
|
+
| Memory is **wrong or harmful** | Call \`hivemind_write_mistake\` explaining why it's wrong |
|
|
51
|
+
| Memory is **outdated** | Call \`hivemind_write_update\` with the new correct information |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
Begin by inspecting the memory.`,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=reviewMemory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewMemory.js","sourceRoot":"","sources":["../../src/prompts/reviewMemory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,MAAM,UAAU,0BAA0B,CAAC,MAAiB;IACxD,MAAM,CAAC,cAAc,CACjB,eAAe,EACf;QACI,KAAK,EAAE,eAAe;QACtB,WAAW,EACP,qFAAqF;QACzF,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,uBAAuB,CAAC;SACzC;KACJ,EACD,CAAC,EAAE,SAAS,EAAE,EAAmB,EAAE,CAAC,CAAC;QACjC,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;;MAGxB,SAAS;;;;;6CAK8B,SAAS;;;;;;;;;;;;;;;;;;sIAkBgF,SAAS;6HAClB,SAAS;;;;;;gCAMtG;iBACX;aACJ;SACJ;KACJ,CAAC,CACL,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Child MCP Registry
|
|
3
|
+
*
|
|
4
|
+
* In-memory registry tracking spawned child MCP processes,
|
|
5
|
+
* their client connections, discovered tools, and lifecycle status.
|
|
6
|
+
* Session-scoped — cleaned up when the MCP server exits.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChildProcess } from "node:child_process";
|
|
9
|
+
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
10
|
+
import type { McpConfig } from "../client/types.js";
|
|
11
|
+
export interface ChildMcpTool {
|
|
12
|
+
/** Tool name as discovered from the child MCP */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Tool description */
|
|
15
|
+
description: string;
|
|
16
|
+
/** JSON Schema for the tool's input */
|
|
17
|
+
inputSchema: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface ChildMcpEntry {
|
|
20
|
+
/** The spawned child process */
|
|
21
|
+
process: ChildProcess;
|
|
22
|
+
/** MCP SDK client connected to the child */
|
|
23
|
+
client: Client;
|
|
24
|
+
/** Tools discovered via client.listTools() */
|
|
25
|
+
tools: ChildMcpTool[];
|
|
26
|
+
/** The config used to spawn this child */
|
|
27
|
+
config: McpConfig;
|
|
28
|
+
/** Where this child came from */
|
|
29
|
+
source: `skill:${string}` | "standalone";
|
|
30
|
+
/** The memory_id from the backend (if applicable) */
|
|
31
|
+
memory_id: string;
|
|
32
|
+
/** Current process status */
|
|
33
|
+
status: "active" | "crashed";
|
|
34
|
+
/** When the child was spawned */
|
|
35
|
+
spawned_at: Date;
|
|
36
|
+
}
|
|
37
|
+
export declare class ChildMcpRegistry {
|
|
38
|
+
private readonly children;
|
|
39
|
+
/**
|
|
40
|
+
* Register a new child MCP entry.
|
|
41
|
+
* @throws if standalone or total limits are exceeded.
|
|
42
|
+
*/
|
|
43
|
+
add(name: string, entry: ChildMcpEntry): void;
|
|
44
|
+
/** Get a child MCP entry by name. */
|
|
45
|
+
get(name: string): ChildMcpEntry | undefined;
|
|
46
|
+
/** Remove a child MCP by name. Returns true if it existed. */
|
|
47
|
+
remove(name: string): boolean;
|
|
48
|
+
/** List all child MCP entries. */
|
|
49
|
+
list(): ChildMcpEntry[];
|
|
50
|
+
/** Check if a child MCP is registered. */
|
|
51
|
+
has(name: string): boolean;
|
|
52
|
+
/** Current number of child MCPs. */
|
|
53
|
+
count(): number;
|
|
54
|
+
/** List child MCPs filtered by source. */
|
|
55
|
+
listBySource(source: "standalone" | string): ChildMcpEntry[];
|
|
56
|
+
/** Count child MCPs by source type. */
|
|
57
|
+
countBySource(sourceType: "standalone" | "skill"): number;
|
|
58
|
+
/** Get all entries whose source matches a specific skill name. */
|
|
59
|
+
listBySkill(skillName: string): ChildMcpEntry[];
|
|
60
|
+
/** Get all registered child MCP names. */
|
|
61
|
+
names(): string[];
|
|
62
|
+
}
|
|
63
|
+
/** Singleton child MCP registry instance */
|
|
64
|
+
export declare const childMcpRegistry: ChildMcpRegistry;
|
|
65
|
+
//# sourceMappingURL=childMcpRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childMcpRegistry.d.ts","sourceRoot":"","sources":["../../src/registries/childMcpRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,WAAW,YAAY;IACzB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC1B,gCAAgC;IAChC,OAAO,EAAE,YAAY,CAAC;IACtB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,0CAA0C;IAC1C,MAAM,EAAE,SAAS,CAAC;IAClB,iCAAiC;IACjC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;IACzC,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,iCAAiC;IACjC,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;IAE7D;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI;IAuB7C,qCAAqC;IACrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI5C,8DAA8D;IA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