Commit Graph

42 Commits

Author SHA1 Message Date
Peter Steinberger
61e76cb43b Auto-reply: allow array payloads in signature 2025-12-03 00:35:57 +00:00
Peter Steinberger
849244d93e CI: fix command-reply payload typing 2025-12-03 00:33:58 +00:00
Peter Steinberger
61723fa0d0 Auto-reply: format and lint fixes 2025-12-03 00:30:05 +00:00
Peter Steinberger
d25d12ca8a Auto-reply: smarter chunking breaks 2025-12-03 00:25:01 +00:00
Peter Steinberger
0f378bb640 limits: chunk replies for twilio/web 2025-12-02 23:10:16 +00:00
Peter Steinberger
f374561579 auto-reply: support multi-text RPC outputs 2025-12-02 23:03:55 +00:00
Peter Steinberger
45d9bca433 revert: mark system prompt sent on first turn 2025-12-02 21:23:56 +00:00
Joao Lisboa
57b48d9ad9 fix: send Claude identity prefix on first session message
The systemSent variable was being set to true before being passed to
runCommandReply, causing the identity prefix to never be injected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:07:13 +00:00
Peter Steinberger
2a2b662c3e perf(pi): reuse tau rpc for command auto-replies 2025-12-02 20:09:51 +00:00
Peter Steinberger
d61e641496 Agents: add pluggable CLIs
Co-authored-by: RealSid08 <RealSid08@users.noreply.github.com>
2025-12-02 11:07:46 +00:00
Peter Steinberger
a7b6914a64 feat: same-phone mode with echo detection and configurable marker
Adds full support for self-messaging setups where you chat with yourself
and an AI assistant replies in the same WhatsApp bubble.

Changes:
- Same-phone mode (from === to) always allowed, bypasses allowFrom check
- Echo detection via bounded Set (max 100) prevents infinite loops
- Configurable samePhoneMarker in config (default: "[same-phone]")
- Messages prefixed with marker so assistants know the context
- fromMe filter removed from inbound.ts (echo detection in auto-reply)
- Verbose logging for same-phone detection and echo skips

Tests:
- Same-phone allowed without/despite allowFrom configuration
- Body prefixed only when from === to
- Non-same-phone rejected when not in allowFrom
2025-11-29 04:52:21 +00:00
Marcus Neves
b3b23234d3 fix: add @lid format support and allowFrom wildcard handling
- Add support for WhatsApp Linked ID (@lid) format in jidToE164()
- Use existing lid-mapping-*_reverse.json files for LID resolution
- Fix allowFrom wildcard '*' to actually allow all senders
- Maintain backward compatibility with @s.whatsapp.net format

Fixes issues where:
- Messages from newer WhatsApp versions are silently dropped
- allowFrom: ['*'] configuration doesn't work as documented
2025-11-26 18:03:12 +01:00
Peter Steinberger
00cd24e7e5 web: add heartbeat and bounded reconnect tuning 2025-11-26 02:34:43 +01:00
Peter Steinberger
49940f3d01 test(auto-reply): add helper coverage and docs 2025-11-26 02:09:50 +01:00
Peter Steinberger
5da713bbd4 refactor(auto-reply): split reply helpers 2025-11-26 02:03:51 +01:00
Peter Steinberger
2af00b9765 Auto-reply: refresh typing indicator every 8s 2025-11-26 01:27:51 +01:00
Peter Steinberger
f4a3c406d0 refactor(web): split provider module 2025-11-26 01:16:54 +01:00
Peter Steinberger
9fa3cbab8a chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
Peter Steinberger
41dc5ed5eb feat: keep typing indicators alive during commands 2025-11-26 00:05:11 +01:00
Peter Steinberger
1dfc2ccf6e feat: send session prompt once 2025-11-25 23:52:38 +01:00
Peter Steinberger
ecf0986fe4 feat: transcribe audio and surface transcript to prompts 2025-11-25 23:13:22 +01:00
Peter Steinberger
9b8bcf36c3 feat: optional audio transcription via CLI 2025-11-25 23:06:54 +01:00
Peter Steinberger
87f9b1f0f4 web: compress auto-reply media 2025-11-25 20:09:03 +01:00
Peter Steinberger
7dc5681102 Auto-reply: send timeout fallback and tests 2025-11-25 17:52:57 +01:00
Peter Steinberger
0fef193518 Add cwd option for command replies 2025-11-25 16:19:24 +01:00
Peter Steinberger
48c04dba22 fix: restore zod typing and import ClaudeJsonParseResult 2025-11-25 12:25:05 +01:00
Peter Steinberger
d298ca2d81 chore: sync source updates 2025-11-25 12:12:13 +01:00
Peter Steinberger
184781b85d claude: prefix prompt with Clawd identity 2025-11-25 06:41:27 +01:00
Peter Steinberger
018c0fab6d auto-reply: handle empty stdout gracefully 2025-11-25 06:33:49 +01:00
Peter Steinberger
e79ea15d47 debug: log MEDIA extraction and parse Claude text for tokens 2025-11-25 06:14:12 +01:00
Peter Steinberger
60e9344c2a refactor: extract MEDIA parsing helper and tidy whitespace 2025-11-25 05:49:18 +01:00
Peter Steinberger
b33f4e710a fix: handle inline MEDIA tokens and host webhook media 2025-11-25 05:47:12 +01:00
Peter Steinberger
ccacfcc223 fix: accept file/media tokens safely and improve web media send 2025-11-25 05:34:08 +01:00
Peter Steinberger
3069bd5c0e fix: harden MEDIA parsing and add tests 2025-11-25 05:25:57 +01:00
Peter Steinberger
0bcb3b404d chore: surface media URL in command prompts and tests 2025-11-25 05:20:50 +01:00
Peter Steinberger
0bd9c5f5c7 feat: add image support across web and twilio 2025-11-25 04:58:31 +01:00
Peter Steinberger
d580c7669c feat: serialize command auto-replies with queue 2025-11-25 04:40:49 +01:00
Peter Steinberger
ed52110cb2 chore: finish logger sweep and add retry tests 2025-11-25 04:30:40 +01:00
Peter Steinberger
b8c813ddeb chore: logger cleanup and test fixes 2025-11-25 04:05:02 +01:00
Peter Steinberger
ee264e7ea5 chore: harden claude json parsing and logging 2025-11-25 03:50:52 +01:00
Peter Steinberger
03782e9a70 feat: add logger and twilio poll backoff 2025-11-25 03:48:49 +01:00
Peter Steinberger
c1bdf9ca35 Extract auto-reply helpers into modules 2025-11-25 02:16:54 +01:00