feat: add read_peer_file and list_peer_files MCP tools

Wire up MCP tool handlers for the peer file sharing relay. Peers can
now read files and list directories from other peers' local filesystems
through the mesh broker. Includes name-to-pubkey resolution, base64
decode, and instructions table update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-07 23:56:42 +01:00
parent 05d9b56f28
commit 504111c50c
2 changed files with 138 additions and 0 deletions

View File

@@ -856,4 +856,37 @@ export const TOOLS: Tool[] = [
required: ["peer"],
},
},
// --- Webhooks ---
{
name: "create_webhook",
description:
"Create an inbound webhook. Returns a URL that external services (GitHub, CI/CD, monitoring) can POST to — the payload becomes a mesh message to all peers.",
inputSchema: {
type: "object",
properties: {
name: {
type: "string",
description: "Webhook name (e.g. 'github-ci', 'datadog-alerts')",
},
},
required: ["name"],
},
},
{
name: "list_webhooks",
description: "List active webhooks for this mesh.",
inputSchema: { type: "object", properties: {} },
},
{
name: "delete_webhook",
description: "Deactivate a webhook.",
inputSchema: {
type: "object",
properties: {
name: { type: "string", description: "Webhook name to deactivate" },
},
required: ["name"],
},
},
];