Inbox injection: POST /api/messages + MCP inject_message (#12)
CI / build + unit (pull_request) Successful in 41s

This commit is contained in:
2026-09-24 23:46:29 +00:00
parent 0571c7095e
commit ca39bb9671
10 changed files with 253 additions and 7 deletions
+9
View File
@@ -77,6 +77,15 @@ export function createMeshMcpServer(mesh: MeshService): McpServer {
async () => jsonResult(mesh.messages()),
);
server.registerTool(
'inject_message',
{
description: `Synthetic inbox injection for external triggers: records an rx entry in the message history as if received on the mesh — NOT sent over RF, nothing goes to the bridge or air. Appears in get_messages like any other rx record (channel 0). from is optional (integer in 1..0xffffffff); empty text or invalid from are tool errors.${CHANNEL_NOTE}`,
inputSchema: { text: z.string(), from: z.number().int().optional() },
},
async ({ text, from }) => jsonResult(mesh.injectMessage(text, from)),
);
server.registerTool(
'get_telemetry',
{