Claude 24f816b6a3
Consolidate 22 sibling repos into layered organism structure
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):

- brain/        LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
                dispatch, A51 channels, and the OSINT cluster
- knowledge/    LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
                MITRE ATT&CK data
- reference/    defensive threat-reference (C3, shhbruh doc) + AdaYaml parser

License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.

Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.

https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
2026-06-10 06:53:01 +00:00

38 lines
1.2 KiB
TypeScript

// MCP Service for G.U.N.D.A.M.
// Handles communication with the Model Context Protocol server
export async function callMcpTool(toolName: string, args: any): Promise<any> {
try {
const response = await fetch("/api/mcp/messages", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: Math.random().toString(36).substring(7),
method: "tools/call",
params: {
name: toolName,
arguments: args,
},
}),
});
if (!response.ok) {
throw new Error(`MCP Tool Call Failed: ${response.statusText}`);
}
const data = await response.json();
// The SSE transport might return the response in a different way depending on implementation
// But for our simplified server.ts implementation, we'll try to parse it
if (data.result && data.result.content && data.result.content[0]) {
return JSON.parse(data.result.content[0].text);
}
return data;
} catch (error) {
console.error(`Error calling MCP tool ${toolName}:`, error);
return { error: error instanceof Error ? error.message : String(error) };
}
}