Releases: steipete/clawdis
Releases · steipete/clawdis
warelay 1.3.0
warelay 1.3.0 (2025-12-02)
Highlights
- Pluggable agents (Claude, Pi, Codex, Opencode): New
inbound.reply.agentblock chooses the CLI and parser per command reply; per-agent argv builders inject the right flags/identity/prompt handling and parse NDJSON streams, enabling Pi/Codex swaps without changing templates. - Safety stop words for agents: If an inbound message is exactly
stop,esc,abort,wait, orexit, warelay immediately replies “Agent was aborted.”, kills the pending agent run, and marks the session so the next prompt is prefixed with a reminder that the previous run was aborted. - Agent session reliability: Only Claude currently returns a
session_idthat warelay persists; other agents (Gemini, Opencode, Codex, Pi) don’t emit stable session identifiers, so multi-turn continuity may reset between runs for those harnesses.
Bug Fixes
- Empty result field handling: Fixed bug where Claude CLI returning
result: ""(empty string) would cause raw JSON to be sent to WhatsApp instead of being treated as valid empty output. Changed truthy check to explicit type check incommand-reply.ts. - Response prefix on heartbeat replies: Fixed
responsePrefix(e.g.,🦞) not being applied to heartbeat alert messages. The prefix was only applied in the regular message handler, not inrunReplyHeartbeat. - User-visible error messages: Command failures (non-zero exit, killed processes, exceptions) now return user-friendly error messages to WhatsApp instead of silently failing with empty responses.
- Test session isolation: Fixed tests corrupting production
sessions.jsonby mocking session persistence in all test files. - Signal session corruption prevention: Added IPC mechanism so
warelay sendandwarelay heartbeatreuse the running relay's WhatsApp connection instead of creating new Baileys sockets. Previously, using these commands while the relay was running could corrupt the Signal session ratchet (both connections wrote to the same auth state), causing the relay's subsequent sends to fail silently. - Web send media kinds:
sendMessageWebnow honors media kind when sending via WhatsApp Web: audio → PTT with correct opus mimetype, video → video, image → image, other → document with filename. Previously all media were sent as images, breaking audio/video/doc sends.
Changes
- IPC server for relay: The web relay now starts a Unix socket server at
~/.warelay/relay.sock. Commands likewarelay send --provider webautomatically connect via IPC when the relay is running, falling back to direct connection otherwise. - Batched inbound messaging with timestamps: When multiple WhatsApp messages queue up, they’re sent to the agent in one combined batch, each line timestamped consistently to preserve ordering and context.
- Typing indicator after IPC send: After sending a message via IPC (e.g.,
warelay send), the relay now automatically shows the typing indicator ("composing") to signal that more messages may be coming. - Auto-recovery from stuck WhatsApp sessions: Added watchdog timer that detects when WhatsApp event emitter stops firing (e.g., after Bad MAC decryption errors) and automatically restarts the connection after 30 minutes of no message activity. Heartbeat logging now includes
minutesSinceLastMessageand warns when >30 minutes without messages. The 30-minute timeout is intentionally longer than typicalheartbeatMinutesconfigs to avoid false positives. - Early allowFrom filtering: Unauthorized senders are now blocked in
inbound.tsBEFORE encryption/decryption attempts, preventing Bad MAC errors from corrupting session state. Previously, messages from unauthorized senders would trigger decryption failures that could silently kill the event emitter. - Test isolation improvements: Mock
loadConfig()in all test files to prevent loading real user config (with emojis/prefixes) during tests. Default test config now has no prefixes/timestamps for cleaner assertions. - Same-phone mode (self-messaging): warelay now supports running on the same phone number you message from. This enables setups where you chat with yourself to control an AI assistant. Same-phone mode (
from === to) is always allowed, even without configuringallowFrom. Echo detection prevents infinite loops by tracking recently sent message text and skipping auto-replies when incoming messages match. - Echo detection: The
fromMefilter ininbound.tsis deliberately removed for same-phone setups; instead, text-based echo detection inauto-reply.tstracks sent messages in a bounded Set (max 100 entries) and skips processing when a match is found. - Same-phone detection logging: Verbose mode now logs
📱 Same-phone mode detectedwhenfrom === to. - Configurable same-phone marker: New
inbound.samePhoneMarkerconfig option to customize the prefix added to messages in same-phone mode (default:[same-phone]). Set it to something cute like[🦞 same-phone]to help distinguish bot replies.
Contributors
- @RealSid08 (Sidhaarth Krishnan)
Testing
- pnpm lint
- pnpm test
- pnpm build
warelay 1.2.2
- Manual heartbeat sends: warelay heartbeat accepts --message/--body with --provider web|twilio to push real outbound messages; --dry-run previews payloads without sending.
- SHA256: bb4f80a8c4d92ceede657b43abb67864939c580155716963c3207b566719bd58
warelay 1.2.1
warelay 1.2.1\n\n- Heartbeat: warelay heartbeat now supports --message/--body for manual sends on web or twilio, with --dry-run to preview payloads.\n- Media handling: MIME-first detection (magic bytes > headers > extension) so images/audio/video/doc send correctly even with wrong suffixes, and images still recompress under caps.\n- Hosting/inbound: hosted and saved media files are renamed with the detected extension, ensuring correct Content-Type for Twilio/web round-trips (including Baileys inbound saves).\n- Docs/tests: changelog and image docs updated; added coverage for inbound media extension preservation.\n
warelay 1.2.0
- Heartbeat UX: default 10 m; prompt
HEARTBEAT ultrathink;HEARTBEAT_OKsuppresses sends; skipped heartbeats don’t refresh sessions; fallback heartbeats no longer start new sessions; supportsheartbeatIdleMinutes. - Heartbeat tooling:
warelay heartbeat --session-id, relay--heartbeat-now, helperswarelay relay:heartbeatandwarelay relay:heartbeat:tmux. - Prompt structure: one-time
sessionIntro, per-messageultrathinkprefix; sessions idle-expire after 7 days (configurable). - Robustness: WebSocket error guards and global unhandled handlers; Baileys @lid resolution; webhook media hosting uses shared host module (test-covered).
- Docs: README highlights Clawd;
docs/claude-config.mdupdated with current config, heartbeat behavior, and home directory.
warelay 1.1.0
- Web auto-replies now resize/recompress media, honor inbound.reply.mediaMaxMb, detect media kind, and enforce provider caps.
- Sessions can send the system prompt only once (optional sessionIntro) and typing indicators refresh on a configurable interval.
- Optional voice-note transcription feeds a Transcript block plus media path into prompts before replying.
- Command auto-replies return structured {payload, meta}, respect mediaMaxMb for local media, log Claude metadata, and include the command cwd in timeout messages.
- Added focused tests for command and transcription helpers.
Checksum (sha256): 9aaaaad7ca87287529b86f857d66d2c3123c23f7a764e36c68b520f57ae82bfa
warelay 0.1.3
Features
- Added
cwdoption to command reply config so external reply commands (e.g., Claude Code) run in the intended working directory for correct context. - Added configurable file-based logging (default
/tmp/warelay/warelay.log), with level set vialogging.levelin~/.warelay/warelay.json;--verbosestill forces debug.
Developer notes
- Command auto-replies now pass
{ timeoutMs, cwd }into the command runner; custom runners/tests that stubrunCommandWithTimeoutshould accept the options object as well as the legacy numeric timeout.
warelay 0.1.2
- Fix commander help config for TypeScript build (subcommandTerm).
- Bump version and web UA to 0.1.2; keeps tagline/help polish from 0.1.1.
Install:
npm install -g [email protected]
# or
npx [email protected] --helpwarelay 0.1.1
- Added executable shim so npx [email protected] runs the CLI directly.
- Help/version banner uses README tagline with color and a colored examples footer.
- Added --verbose to send and status for consistent noisy output.
- Lowercased branding and updated web provider UA to warelay/cli/0.1.1.
Install:
npm install -g [email protected]
# or
npx [email protected] --help