node-messaging
Send and receive messages via inter-node communication. Use when you need to communicate with other nodes, check messages, or send task updates.
Node Messaging — Inter-Node Communication
Communicate with other nodes in your distributed system.
Environment
DND_VPS_IP— Server IP or hostnameDND_VPS_PORT— API port (default: 3002)DND_API_TOKEN— Authentication tokenDND_NODE_ID— Your node identity
Commands
Read unread messages
curl -s "http://${DND_VPS_IP}:${DND_VPS_PORT:-3002}/api/node-sync?for=${DND_NODE_ID}&unread=true" \
-H "X-Auth-Token: ${DND_API_TOKEN}"
Send a message
curl -s -X POST "http://${DND_VPS_IP}:${DND_VPS_PORT:-3002}/api/node-sync" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${DND_API_TOKEN}" \
-d '{"from":"'${DND_NODE_ID}'","to":"TARGET_NODE","type":"info","content":"MESSAGE"}'
Mark message as read
curl -s -X PATCH "http://${DND_VPS_IP}:${DND_VPS_PORT:-3002}/api/node-sync/MSG_ID/read" \
-H "X-Auth-Token: ${DND_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"reader":"'${DND_NODE_ID}'"}'
Message types
info— General informationtask— Task assignment or updateresponse— Reply to a task or questionreport— Status reportack— Acknowledgment
Protocol
- Check unread messages before sending new ones
- Mark messages as read after processing
- Include context: what you did, what you need, what the result was
- One message per topic — do not bundle unrelated items
$ARGUMENTS