Commit Graph

36 Commits (b172b538fcc83fbe1938120b79d2faff0ea57b3f)

Author SHA1 Message Date
Peter Steinberger b172b538fc perf(pi): reuse tau rpc for command auto-replies 2025-12-02 20:09:51 +00:00
Peter Steinberger f31e89d5af Agents: add pluggable CLIs
Co-authored-by: RealSid08 <RealSid08@users.noreply.github.com>
2025-12-02 11:07:46 +00:00
Peter Steinberger 21ba0fb8a4 Fix test isolation to prevent loading real user config
Tests were picking up real ~/.warelay/warelay.json with emojis and
prefixes (like "🦞"), causing test assertions to fail. Added proper
config mocks to all test files.

Changes:
- Mock loadConfig() in index.core.test.ts, inbound.media.test.ts,
  monitor-inbox.test.ts
- Update test-helpers.ts default mock to disable all prefixes
- Tests now use clean config: no messagePrefix, no responsePrefix,
  no timestamp, allowFrom=["*"]

This ensures tests validate core behavior without user-specific config.
The responsePrefix feature itself is already fully config-driven - this
only fixes test isolation.
2025-11-30 18:00:57 +00:00
Peter Steinberger d88ede92b9 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
Peter Steinberger baf20af17f web: add heartbeat and bounded reconnect tuning 2025-11-26 02:34:43 +01:00
Peter Steinberger e5f677803f chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
Peter Steinberger a67f4db5e2 chore: format + lint 2025-11-26 00:30:30 +01:00
Peter Steinberger 8a01dc7f4c style: normalize indentation to 2 spaces 2025-11-26 00:15:10 +01:00
Peter Steinberger af8af4881b docs/tests: typing interval docs and coverage 2025-11-26 00:10:38 +01:00
Peter Steinberger d871dad85f feat: keep typing indicators alive during commands 2025-11-26 00:05:11 +01:00
Peter Steinberger 5b83d30887 test: cover sendSystemOnce default 2025-11-25 23:57:41 +01:00
Peter Steinberger 2e3b8a03aa feat: send session prompt once 2025-11-25 23:52:38 +01:00
Peter Steinberger e0425ad3e1 feat: support audio/video/doc media caps and transcript context 2025-11-25 23:21:35 +01:00
Peter Steinberger e642f128ae feat: transcribe audio and surface transcript to prompts 2025-11-25 23:13:22 +01:00
Peter Steinberger 7d0ae151e8 feat: optional audio transcription via CLI 2025-11-25 23:06:54 +01:00
Peter Steinberger 46be5eac7d Auto-reply: send timeout fallback and tests 2025-11-25 17:52:57 +01:00
Peter Steinberger 38659f5d3e test: sync updated specs 2025-11-25 12:12:29 +01:00
Peter Steinberger 8161b7a877 claude: tell Clawd to use ~/clawd markdown scratchpad 2025-11-25 06:49:10 +01:00
Peter Steinberger 0adc0ed7a6 claude: prefix prompt with Clawd identity 2025-11-25 06:41:27 +01:00
Peter Steinberger 716f31f17a auto-reply: handle empty stdout gracefully 2025-11-25 06:33:49 +01:00
Peter Steinberger ad55832cda fix: strip trailing punctuation from MEDIA tokens and add tests 2025-11-25 06:07:11 +01:00
Peter Steinberger 9fbeb2ccd3 test: cover MEDIA backticks and web media fallback logging 2025-11-25 06:04:41 +01:00
Peter Steinberger 072998a6ab refactor: extract MEDIA parsing helper and tidy whitespace 2025-11-25 05:49:18 +01:00
Peter Steinberger 6883c3ae4a fix: handle inline MEDIA tokens and host webhook media 2025-11-25 05:47:12 +01:00
Peter Steinberger 5ce869f86c fix: accept file/media tokens safely and improve web media send 2025-11-25 05:34:08 +01:00
Peter Steinberger 9bf35d3272 fix: harden MEDIA parsing and add tests 2025-11-25 05:25:57 +01:00
Peter Steinberger f4c5f2c193 test: cover media url extraction from command stdout 2025-11-25 05:21:59 +01:00
Peter Steinberger 54c763a679 chore: surface media URL in command prompts and tests 2025-11-25 05:20:50 +01:00
Peter Steinberger 6d41df2941 feat: download inbound media and expose to templating 2025-11-25 05:17:59 +01:00
Peter Steinberger 948ff7f035 feat: add image support across web and twilio 2025-11-25 04:58:31 +01:00
Peter Steinberger 13be898c07 feat: serialize command auto-replies with queue 2025-11-25 04:40:49 +01:00
Peter Steinberger d7cc94333a chore: logger cleanup and test fixes 2025-11-25 04:05:02 +01:00
Peter Steinberger ba3b271c39 Parse Claude JSON output to return text replies 2025-11-25 01:41:52 +01:00
Peter Steinberger d0c9bff4ca Ignore coverage output and document Claude text mode 2025-11-25 01:38:43 +01:00
Peter Steinberger 9dd257a92d Fix provider-web mocks and make tests green 2025-11-25 00:16:01 +01:00
Peter Steinberger 52e0c8de25 Fix lint warnings and tighten test mocks 2025-11-25 00:10:34 +01:00