Single Public Gateway Route
All functions converge to a single public gateway route app/api/claw/route.ts, leveraging serverless advantages (on-demand startup, auto-scaling, pay-as-you-go). All external interactions (health checks, pairing authentication, message reception, Webhook calls) are processed through this entry point.
Persistent Queue & Autonomous Capabilities
Using Workflow DevKit's use workflow and use step primitives, workflow steps are naturally persistent (auto-recovered if interrupted). The daemonWorkflow() function uses sleep("1s") to simulate the main loop of traditional daemons, with a 1-minute Cron watchdog to ensure continuous operation, overcoming Vercel Cron's 1-second scheduling limitation.
Multi-channel Message Support
Native support for three channels:
- Telegram: Full Bot API support with Webhook verification key.
- WhatsApp Cloud API: Meta official API integration with verification token and access token configuration.
- Textbelt SMS: JSON-formatted SMS reply Webhook endpoint.
Each channel has independent endpoints but uses a unified internal mechanism.