Claude/review details 01 l eu yz2 h9o x1 ncj vj bbm7 we - #2
Merged
Conversation
…tions Implemented complete ADMP (Agent Dispatch Messaging Protocol) backend server ready for Teleportation integration. Features: - Agent registration with Ed25519 keypair generation - Heartbeat-based session management (60s interval, 5min timeout) - Inbox operations (SEND, PULL, ACK, NACK, REPLY) - Message leasing with visibility timeouts - Signature verification for authenticated messaging - Trust management (allowlist-based authorization) - Background jobs for lease reclaim and message expiry - Production-ready with Docker, health checks, structured logging Architecture: - src/utils/crypto.js - Ed25519 signing and verification - src/storage/memory.js - In-memory storage (swappable with DB) - src/services/agent.service.js - Agent lifecycle management - src/services/inbox.service.js - Message delivery and processing - src/middleware/auth.js - Authentication middleware - src/routes/agents.js - Agent registration and heartbeat endpoints - src/routes/inbox.js - Inbox operations endpoints - src/server.js - Main server with background jobs API Endpoints: - POST /api/agents/register - Register new agent - POST /api/agents/:id/heartbeat - Update heartbeat - POST /api/agents/:id/messages - Send message (SEND) - POST /api/agents/:id/inbox/pull - Pull message with lease (PULL) - POST /api/agents/:id/messages/:mid/ack - Acknowledge (ACK) - POST /api/agents/:id/messages/:mid/nack - Negative ack (NACK) - POST /api/agents/:id/messages/:mid/reply - Reply to message - GET /api/messages/:id/status - Get message status - GET /api/agents/:id/inbox/stats - Get inbox statistics - GET /api/stats - System-wide statistics Deployment: - Docker and docker-compose.yml for containerized deployment - .env.example with all configuration options - Health check endpoint at /health - Graceful shutdown handling Documentation: - README.md with complete API documentation and examples - examples/basic-usage.js demonstrating agent messaging workflow - discovery/teleportation-mvp.md - Integration plan for Teleportation Ready for: - Teleportation session-to-agent mapping - External agent messaging with handshake protocol - Edge agent pattern for message filtering - Production deployment Refs: #1
Added webhook support so agents can receive messages via HTTP push instead of polling, reducing latency and server load. Features: - Webhook URL registration during agent registration or via dedicated endpoint - Automatic webhook delivery when messages arrive - HMAC-SHA256 signature verification for webhook security - Exponential backoff retry (3 attempts: 0s, 1s, 2s) - Graceful fallback to polling if webhook delivery fails - Webhook configuration endpoints (POST/GET/DELETE) Implementation: - src/services/webhook.service.js - Webhook delivery with retry logic - src/services/agent.service.js - Webhook configuration methods - src/services/inbox.service.js - Trigger webhook on message arrival - src/routes/agents.js - Webhook configuration endpoints API Endpoints: - POST /api/agents/register - Now accepts webhook_url and webhook_secret - POST /api/agents/:id/webhook - Configure webhook - GET /api/agents/:id/webhook - Get webhook config - DELETE /api/agents/:id/webhook - Remove webhook Webhook Behavior: - Messages pushed immediately to webhook URL (< 100ms latency) - Payload includes message envelope and HMAC signature - Retry with exponential backoff: 1s, 2s, 4s delays - After 3 failed attempts, message stays queued for polling - Non-blocking: webhook failures don't block message acceptance Examples: - examples/webhook-receiver.js - Complete webhook receiver implementation - examples/webhook-push.js - Demo of webhook registration and push delivery Documentation: - README.md updated with: - Webhook configuration in agent registration - Webhook endpoints documentation - Complete webhook section with examples - Webhook payload format and headers - Retry behavior table - Webhook vs polling comparison - Best practices Benefits: ⚡ Instant delivery (<100ms vs up to 60s polling) 📉 Lower latency for real-time agent communication 🔋 Reduced server load (no constant polling) ♻️ Automatic retry with exponential backoff 🛡️ Fallback to polling if webhook unavailable Perfect for Teleportation integration - sessions can register webhook URLs for instant message delivery instead of 60s polling interval. Refs: #2
8 tasks
5 tasks
This was referenced Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.