Skip to content

Releases: steipete/clawdis

warelay 1.3.0

02 Dec 12:59

Choose a tag to compare

warelay 1.3.0 (2025-12-02)

Highlights

  • Pluggable agents (Claude, Pi, Codex, Opencode): New inbound.reply.agent block 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, or exit, 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_id that 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 in command-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 in runReplyHeartbeat.
  • 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.json by mocking session persistence in all test files.
  • Signal session corruption prevention: Added IPC mechanism so warelay send and warelay heartbeat reuse 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: sendMessageWeb now 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 like warelay send --provider web automatically 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 minutesSinceLastMessage and warns when >30 minutes without messages. The 30-minute timeout is intentionally longer than typical heartbeatMinutes configs to avoid false positives.
  • Early allowFrom filtering: Unauthorized senders are now blocked in inbound.ts BEFORE 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 configuring allowFrom. Echo detection prevents infinite loops by tracking recently sent message text and skipping auto-replies when incoming messages match.
  • Echo detection: The fromMe filter in inbound.ts is deliberately removed for same-phone setups; instead, text-based echo detection in auto-reply.ts tracks 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 detected when from === to.
  • Configurable same-phone marker: New inbound.samePhoneMarker config 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

Testing

  • pnpm lint
  • pnpm test
  • pnpm build

warelay 1.2.2

28 Nov 07:18

Choose a tag to compare

  • 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

28 Nov 07:12

Choose a tag to compare

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

27 Nov 18:11

Choose a tag to compare

  • Heartbeat UX: default 10 m; prompt HEARTBEAT ultrathink; HEARTBEAT_OK suppresses sends; skipped heartbeats don’t refresh sessions; fallback heartbeats no longer start new sessions; supports heartbeatIdleMinutes.
  • Heartbeat tooling: warelay heartbeat --session-id, relay --heartbeat-now, helpers warelay relay:heartbeat and warelay relay:heartbeat:tmux.
  • Prompt structure: one-time sessionIntro, per-message ultrathink prefix; 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.md updated with current config, heartbeat behavior, and home directory.

warelay 1.1.0

26 Nov 02:18

Choose a tag to compare

  • 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

25 Nov 15:55

Choose a tag to compare

Features

  • Added cwd option 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 via logging.level in ~/.warelay/warelay.json; --verbose still forces debug.

Developer notes

  • Command auto-replies now pass { timeoutMs, cwd } into the command runner; custom runners/tests that stub runCommandWithTimeout should accept the options object as well as the legacy numeric timeout.

warelay 0.1.2

25 Nov 13:27

Choose a tag to compare

  • 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] --help

warelay 0.1.1

25 Nov 13:24

Choose a tag to compare

  • 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