agentvibes 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bmad-core/agent-teams/team-all.yaml +15 -0
- package/.bmad-core/agent-teams/team-fullstack.yaml +19 -0
- package/.bmad-core/agent-teams/team-ide-minimal.yaml +11 -0
- package/.bmad-core/agent-teams/team-no-ui.yaml +14 -0
- package/.bmad-core/agents/analyst.md +84 -0
- package/.bmad-core/agents/architect.md +85 -0
- package/.bmad-core/agents/bmad-master.md +110 -0
- package/.bmad-core/agents/bmad-orchestrator.md +147 -0
- package/.bmad-core/agents/dev.md +81 -0
- package/.bmad-core/agents/pm.md +84 -0
- package/.bmad-core/agents/po.md +79 -0
- package/.bmad-core/agents/qa.md +87 -0
- package/.bmad-core/agents/sm.md +65 -0
- package/.bmad-core/agents/ux-expert.md +69 -0
- package/.bmad-core/checklists/architect-checklist.md +440 -0
- package/.bmad-core/checklists/change-checklist.md +184 -0
- package/.bmad-core/checklists/pm-checklist.md +372 -0
- package/.bmad-core/checklists/po-master-checklist.md +434 -0
- package/.bmad-core/checklists/story-dod-checklist.md +96 -0
- package/.bmad-core/checklists/story-draft-checklist.md +155 -0
- package/.bmad-core/core-config.yaml +22 -0
- package/.bmad-core/data/bmad-kb.md +809 -0
- package/.bmad-core/data/brainstorming-techniques.md +38 -0
- package/.bmad-core/data/elicitation-methods.md +156 -0
- package/.bmad-core/data/technical-preferences.md +5 -0
- package/.bmad-core/data/test-levels-framework.md +148 -0
- package/.bmad-core/data/test-priorities-matrix.md +174 -0
- package/.bmad-core/enhanced-ide-development-workflow.md +248 -0
- package/.bmad-core/install-manifest.yaml +230 -0
- package/.bmad-core/tasks/advanced-elicitation.md +119 -0
- package/.bmad-core/tasks/apply-qa-fixes.md +150 -0
- package/.bmad-core/tasks/brownfield-create-epic.md +162 -0
- package/.bmad-core/tasks/brownfield-create-story.md +149 -0
- package/.bmad-core/tasks/correct-course.md +72 -0
- package/.bmad-core/tasks/create-brownfield-story.md +314 -0
- package/.bmad-core/tasks/create-deep-research-prompt.md +280 -0
- package/.bmad-core/tasks/create-doc.md +103 -0
- package/.bmad-core/tasks/create-next-story.md +114 -0
- package/.bmad-core/tasks/document-project.md +345 -0
- package/.bmad-core/tasks/execute-checklist.md +88 -0
- package/.bmad-core/tasks/facilitate-brainstorming-session.md +138 -0
- package/.bmad-core/tasks/generate-ai-frontend-prompt.md +53 -0
- package/.bmad-core/tasks/index-docs.md +175 -0
- package/.bmad-core/tasks/kb-mode-interaction.md +77 -0
- package/.bmad-core/tasks/nfr-assess.md +345 -0
- package/.bmad-core/tasks/qa-gate.md +163 -0
- package/.bmad-core/tasks/review-story.md +316 -0
- package/.bmad-core/tasks/risk-profile.md +355 -0
- package/.bmad-core/tasks/shard-doc.md +187 -0
- package/.bmad-core/tasks/test-design.md +176 -0
- package/.bmad-core/tasks/trace-requirements.md +266 -0
- package/.bmad-core/tasks/validate-next-story.md +136 -0
- package/.bmad-core/templates/architecture-tmpl.yaml +651 -0
- package/.bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
- package/.bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -0
- package/.bmad-core/templates/brownfield-prd-tmpl.yaml +281 -0
- package/.bmad-core/templates/competitor-analysis-tmpl.yaml +307 -0
- package/.bmad-core/templates/front-end-architecture-tmpl.yaml +219 -0
- package/.bmad-core/templates/front-end-spec-tmpl.yaml +350 -0
- package/.bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -0
- package/.bmad-core/templates/market-research-tmpl.yaml +253 -0
- package/.bmad-core/templates/prd-tmpl.yaml +203 -0
- package/.bmad-core/templates/project-brief-tmpl.yaml +222 -0
- package/.bmad-core/templates/qa-gate-tmpl.yaml +103 -0
- package/.bmad-core/templates/story-tmpl.yaml +138 -0
- package/.bmad-core/user-guide.md +577 -0
- package/.bmad-core/utils/bmad-doc-template.md +327 -0
- package/.bmad-core/utils/workflow-management.md +71 -0
- package/.bmad-core/workflows/brownfield-fullstack.yaml +298 -0
- package/.bmad-core/workflows/brownfield-service.yaml +188 -0
- package/.bmad-core/workflows/brownfield-ui.yaml +198 -0
- package/.bmad-core/workflows/greenfield-fullstack.yaml +241 -0
- package/.bmad-core/workflows/greenfield-service.yaml +207 -0
- package/.bmad-core/workflows/greenfield-ui.yaml +236 -0
- package/.bmad-core/working-in-the-brownfield.md +606 -0
- package/.claude/commands/BMad/analyst.md +88 -0
- package/.claude/commands/BMad/architect.md +89 -0
- package/.claude/commands/BMad/bmad-master.md +114 -0
- package/.claude/commands/BMad/bmad-orchestrator.md +151 -0
- package/.claude/commands/BMad/dev.md +85 -0
- package/.claude/commands/BMad/pm.md +88 -0
- package/.claude/commands/BMad/po.md +83 -0
- package/.claude/commands/BMad/qa.md +91 -0
- package/.claude/commands/BMad/sm.md +69 -0
- package/.claude/commands/BMad/tasks/advanced-elicitation.md +123 -0
- package/.claude/commands/BMad/tasks/apply-qa-fixes.md +154 -0
- package/.claude/commands/BMad/tasks/brownfield-create-epic.md +166 -0
- package/.claude/commands/BMad/tasks/brownfield-create-story.md +153 -0
- package/.claude/commands/BMad/tasks/correct-course.md +76 -0
- package/.claude/commands/BMad/tasks/create-brownfield-story.md +318 -0
- package/.claude/commands/BMad/tasks/create-deep-research-prompt.md +284 -0
- package/.claude/commands/BMad/tasks/create-doc.md +107 -0
- package/.claude/commands/BMad/tasks/create-next-story.md +118 -0
- package/.claude/commands/BMad/tasks/document-project.md +349 -0
- package/.claude/commands/BMad/tasks/execute-checklist.md +92 -0
- package/.claude/commands/BMad/tasks/facilitate-brainstorming-session.md +142 -0
- package/.claude/commands/BMad/tasks/generate-ai-frontend-prompt.md +57 -0
- package/.claude/commands/BMad/tasks/index-docs.md +179 -0
- package/.claude/commands/BMad/tasks/kb-mode-interaction.md +81 -0
- package/.claude/commands/BMad/tasks/nfr-assess.md +349 -0
- package/.claude/commands/BMad/tasks/qa-gate.md +167 -0
- package/.claude/commands/BMad/tasks/review-story.md +320 -0
- package/.claude/commands/BMad/tasks/risk-profile.md +359 -0
- package/.claude/commands/BMad/tasks/shard-doc.md +191 -0
- package/.claude/commands/BMad/tasks/test-design.md +180 -0
- package/.claude/commands/BMad/tasks/trace-requirements.md +270 -0
- package/.claude/commands/BMad/tasks/validate-next-story.md +140 -0
- package/.claude/commands/BMad/ux-expert.md +73 -0
- package/.claude/github-star-reminder.txt +1 -0
- package/.claude/piper-voices-dir.txt +1 -0
- package/.claude/plugins/bmad-voices-enabled.flag +0 -0
- package/.mcp.json +88 -0
- package/RELEASE_NOTES_v2.4.0_DRAFT.md +116 -0
- package/RELEASE_NOTES_v2.4.1_DRAFT.md +61 -0
- package/docs/macos-piper-issue.md +172 -0
- package/docs/stargazer-cms-prd.md +1918 -0
- package/docs/whatsapp-plugin-github-issue.md +393 -0
- package/docs/whatsapp-tts-plugin-feasibility.md +418 -0
- package/docs/whatsapp-tts-standalone-plugin.md +628 -0
- package/linkedin/vibe-coding-and-pulseaudio.md +121 -0
- package/mcp-server/agentvibes.db +0 -0
- package/package.json +1 -1
- package/scripts/audio-tunnel.config +17 -0
- package/src/installer.js +40 -4
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
# WhatsApp TTS Plugin - Feasibility Analysis
|
|
2
|
+
|
|
3
|
+
## Executive Summary
|
|
4
|
+
|
|
5
|
+
**Status**: ✅ **HIGHLY FEASIBLE** - All components exist and can be integrated with minimal code changes.
|
|
6
|
+
|
|
7
|
+
The WhatsApp TTS plugin for AgentVibes is completely feasible and can be implemented as an **MCP server extension** that integrates the existing WhatsApp MCP server with AgentVibes TTS capabilities.
|
|
8
|
+
|
|
9
|
+
## Project Overview
|
|
10
|
+
|
|
11
|
+
Create an AgentVibes plugin that enables voice notifications for WhatsApp messages through MCP (Model Context Protocol). When activated, the plugin will:
|
|
12
|
+
|
|
13
|
+
1. Monitor incoming WhatsApp messages via the WhatsApp MCP server
|
|
14
|
+
2. Use voice differentiation (round-robin) for different contacts in group chats
|
|
15
|
+
3. Provide MCP commands to enable/disable notifications per contact/channel
|
|
16
|
+
4. Automatically read messages aloud using AgentVibes TTS
|
|
17
|
+
|
|
18
|
+
## Architecture Analysis
|
|
19
|
+
|
|
20
|
+
### Component 1: WhatsApp MCP Server (Existing)
|
|
21
|
+
|
|
22
|
+
**Location**: `/home/fire/claude/whatsapp-mcp/`
|
|
23
|
+
|
|
24
|
+
**Key Components**:
|
|
25
|
+
- **Go Bridge** (`whatsapp-bridge/main.go`): Connects to WhatsApp API, stores messages in SQLite
|
|
26
|
+
- Message handler: `handleMessage()` at line 412
|
|
27
|
+
- Captures: sender, content, timestamp, chat JID, media type
|
|
28
|
+
- Outputs to console: `fmt.Printf("[%s] %s %s: %s\n", timestamp, direction, sender, content)` at line 468
|
|
29
|
+
|
|
30
|
+
- **Python MCP Server** (`whatsapp-mcp-server/main.py`): Exposes tools via MCP protocol
|
|
31
|
+
- Existing tools: `search_contacts`, `list_messages`, `list_chats`, `send_message`, etc.
|
|
32
|
+
- Built on FastMCP framework
|
|
33
|
+
|
|
34
|
+
**Database Structure**:
|
|
35
|
+
```sql
|
|
36
|
+
chats (jid, name, last_message_time)
|
|
37
|
+
messages (id, chat_jid, sender, content, timestamp, is_from_me, media_type, ...)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Component 2: AgentVibes TTS System (Existing)
|
|
41
|
+
|
|
42
|
+
**Location**: `/home/fire/claude/AgentVibes/`
|
|
43
|
+
|
|
44
|
+
**Key Components**:
|
|
45
|
+
- **MCP Server** (`mcp-server/server.py`): Exposes TTS capabilities via MCP
|
|
46
|
+
- Tool: `text_to_speech(text, voice, personality, language)`
|
|
47
|
+
- Voice management: `list_voices()`, `set_voice(voice_name)`
|
|
48
|
+
- Supports: ElevenLabs (150+ voices), Piper TTS (50+ voices)
|
|
49
|
+
|
|
50
|
+
- **Voice Manager** (`.claude/hooks/voice-manager.sh`): Controls voice selection
|
|
51
|
+
- **Play TTS** (`.claude/hooks/play-tts.sh`): Core TTS execution script
|
|
52
|
+
|
|
53
|
+
**Available Voices**: 27+ unique voices with multilingual support
|
|
54
|
+
|
|
55
|
+
## Proposed Architecture
|
|
56
|
+
|
|
57
|
+
### ✅ RECOMMENDED: Standalone Plugin (Independent Repository)
|
|
58
|
+
|
|
59
|
+
**UPDATE**: After analysis, a **completely standalone plugin** is the superior approach.
|
|
60
|
+
|
|
61
|
+
Create an independent repository that depends on AgentVibes as an external service:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
┌─────────────────────────────────────┐
|
|
65
|
+
│ whatsapp-agentvibes-plugin │ ← New Standalone Repo
|
|
66
|
+
│ (Independent MCP Server) │
|
|
67
|
+
└──────────────┬──────────────────────┘
|
|
68
|
+
│ depends on (subprocess calls)
|
|
69
|
+
│
|
|
70
|
+
┌────────┴─────────┬────────────────┐
|
|
71
|
+
▼ ▼ ▼
|
|
72
|
+
┌────────────┐ ┌──────────────┐ ┌─────────────┐
|
|
73
|
+
│ WhatsApp │ │ AgentVibes │ │ FastMCP │
|
|
74
|
+
│ MCP Server │ │ (installed) │ │ (Python) │
|
|
75
|
+
└────────────┘ └──────────────┘ └─────────────┘
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Key Architecture Points**:
|
|
79
|
+
- **Standalone repo**: `whatsapp-agentvibes` (separate from AgentVibes codebase)
|
|
80
|
+
- **AgentVibes integration**: Calls `play-tts.sh` via subprocess (no code imports)
|
|
81
|
+
- **WhatsApp data**: Reads SQLite database directly (read-only)
|
|
82
|
+
- **Distribution**: pip package on PyPI
|
|
83
|
+
- **Configuration**: Separate `~/.config/whatsapp-agentvibes/config.json`
|
|
84
|
+
|
|
85
|
+
### Why Standalone?
|
|
86
|
+
|
|
87
|
+
✅ **Separation of Concerns**: Plugin development doesn't affect AgentVibes core
|
|
88
|
+
✅ **Independent Versioning**: Plugin can release updates independently
|
|
89
|
+
✅ **Easier Maintenance**: Different maintainers can own different repos
|
|
90
|
+
✅ **Cleaner Dependencies**: Users only install what they need
|
|
91
|
+
✅ **Community Contributions**: Easier for external contributors
|
|
92
|
+
✅ **Plugin Ecosystem**: Opens path for Signal-TTS, Telegram-TTS, Slack-TTS, etc.
|
|
93
|
+
|
|
94
|
+
### ❌ Rejected: Integrated Approach
|
|
95
|
+
|
|
96
|
+
Building inside AgentVibes repo would:
|
|
97
|
+
- Couple messaging features to TTS engine
|
|
98
|
+
- Make AgentVibes responsible for messaging integrations
|
|
99
|
+
- Complicate versioning and releases
|
|
100
|
+
- Limit community contributions
|
|
101
|
+
- Mix concerns (TTS vs messaging)
|
|
102
|
+
|
|
103
|
+
## Feature Design
|
|
104
|
+
|
|
105
|
+
### Round-Robin Voice Assignment
|
|
106
|
+
|
|
107
|
+
**Strategy**: Hash-based voice assignment with persistent storage
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
def assign_voice_to_contact(contact_jid: str, available_voices: list) -> str:
|
|
111
|
+
"""Assigns a consistent voice to a contact using hash-based selection"""
|
|
112
|
+
# Generate stable hash from contact JID
|
|
113
|
+
contact_hash = hash(contact_jid) % len(available_voices)
|
|
114
|
+
return available_voices[contact_hash]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Benefits**:
|
|
118
|
+
- Same contact always gets same voice (consistency)
|
|
119
|
+
- Automatic distribution across available voices
|
|
120
|
+
- No manual voice assignment needed
|
|
121
|
+
|
|
122
|
+
**Persistence**:
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"contact_voices": {
|
|
126
|
+
"1234567890@s.whatsapp.net": "Aria",
|
|
127
|
+
"0987654321@s.whatsapp.net": "Northern Terry",
|
|
128
|
+
"group123@g.us": {
|
|
129
|
+
"sender1@s.whatsapp.net": "Cowboy Bob",
|
|
130
|
+
"sender2@s.whatsapp.net": "Kristin"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### MCP Commands (New Tools)
|
|
137
|
+
|
|
138
|
+
1. **`whatsapp_enable_notifications(contact_or_chat: str)`**
|
|
139
|
+
- Enable TTS notifications for a specific contact or group
|
|
140
|
+
- Assigns voice automatically via round-robin
|
|
141
|
+
- Returns: "✅ Enabled notifications for {name} with voice {voice}"
|
|
142
|
+
|
|
143
|
+
2. **`whatsapp_disable_notifications(contact_or_chat: str)`**
|
|
144
|
+
- Disable TTS notifications for a specific contact or group
|
|
145
|
+
- Returns: "❌ Disabled notifications for {name}"
|
|
146
|
+
|
|
147
|
+
3. **`whatsapp_list_notification_channels()`**
|
|
148
|
+
- Shows all contacts/groups with notifications enabled
|
|
149
|
+
- Displays assigned voices
|
|
150
|
+
- Returns formatted list
|
|
151
|
+
|
|
152
|
+
4. **`whatsapp_set_contact_voice(contact: str, voice: str)`**
|
|
153
|
+
- Override automatic voice assignment
|
|
154
|
+
- Manually set specific voice for a contact
|
|
155
|
+
- Returns: "✅ Set {contact} voice to {voice}"
|
|
156
|
+
|
|
157
|
+
5. **`whatsapp_get_notification_status()`**
|
|
158
|
+
- Show global notification status
|
|
159
|
+
- List enabled contacts with their voices
|
|
160
|
+
- Show round-robin statistics
|
|
161
|
+
|
|
162
|
+
### Message Monitoring Implementation
|
|
163
|
+
|
|
164
|
+
**Approach**: Polling SQLite database with timestamp tracking
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
class WhatsAppTTSMonitor:
|
|
168
|
+
def __init__(self):
|
|
169
|
+
self.last_checked = datetime.now()
|
|
170
|
+
self.enabled_contacts = self.load_config()
|
|
171
|
+
|
|
172
|
+
async def check_new_messages(self):
|
|
173
|
+
"""Poll database for messages since last check"""
|
|
174
|
+
query = """
|
|
175
|
+
SELECT id, chat_jid, sender, content, timestamp, is_from_me
|
|
176
|
+
FROM messages
|
|
177
|
+
WHERE timestamp > ? AND is_from_me = 0
|
|
178
|
+
ORDER BY timestamp ASC
|
|
179
|
+
"""
|
|
180
|
+
messages = await db.execute(query, (self.last_checked,))
|
|
181
|
+
|
|
182
|
+
for msg in messages:
|
|
183
|
+
await self.process_message(msg)
|
|
184
|
+
|
|
185
|
+
self.last_checked = datetime.now()
|
|
186
|
+
|
|
187
|
+
async def process_message(self, msg):
|
|
188
|
+
"""Determine if message should trigger TTS"""
|
|
189
|
+
# Check if notifications enabled for this contact/chat
|
|
190
|
+
if msg.chat_jid in self.enabled_contacts:
|
|
191
|
+
voice = self.get_voice_for_sender(msg.chat_jid, msg.sender)
|
|
192
|
+
await self.speak_message(msg.content, voice, msg.sender)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Alternative**: Event-based (requires modifying Go bridge)
|
|
196
|
+
- More efficient but requires code changes to `handleMessage()` in Go
|
|
197
|
+
- Can add webhook/callback after line 470 in main.go
|
|
198
|
+
- Polling is simpler and doesn't modify existing systems
|
|
199
|
+
|
|
200
|
+
## Implementation Plan
|
|
201
|
+
|
|
202
|
+
### Phase 1: Core Integration (Week 1)
|
|
203
|
+
|
|
204
|
+
1. Create new MCP server: `agentvibes-whatsapp-mcp/`
|
|
205
|
+
- Merge WhatsApp MCP tools
|
|
206
|
+
- Add AgentVibes TTS integration
|
|
207
|
+
- Implement configuration storage (JSON file)
|
|
208
|
+
|
|
209
|
+
2. Implement voice assignment logic
|
|
210
|
+
- Hash-based round-robin
|
|
211
|
+
- Persistent voice-to-contact mapping
|
|
212
|
+
- Configuration save/load
|
|
213
|
+
|
|
214
|
+
3. Add basic MCP tools
|
|
215
|
+
- `whatsapp_enable_notifications`
|
|
216
|
+
- `whatsapp_disable_notifications`
|
|
217
|
+
- `whatsapp_list_notification_channels`
|
|
218
|
+
|
|
219
|
+
### Phase 2: Message Monitoring (Week 2)
|
|
220
|
+
|
|
221
|
+
1. Implement SQLite polling
|
|
222
|
+
- Connect to WhatsApp messages.db
|
|
223
|
+
- Track last checked timestamp
|
|
224
|
+
- Query new messages periodically
|
|
225
|
+
|
|
226
|
+
2. Message filtering
|
|
227
|
+
- Filter by enabled contacts
|
|
228
|
+
- Skip messages from self (is_from_me = true)
|
|
229
|
+
- Handle group vs direct messages
|
|
230
|
+
|
|
231
|
+
3. TTS integration
|
|
232
|
+
- Call AgentVibes play-tts.sh script
|
|
233
|
+
- Pass contact name + message content
|
|
234
|
+
- Handle voice selection
|
|
235
|
+
|
|
236
|
+
### Phase 3: Advanced Features (Week 3)
|
|
237
|
+
|
|
238
|
+
1. Voice management tools
|
|
239
|
+
- `whatsapp_set_contact_voice` (manual override)
|
|
240
|
+
- `whatsapp_get_notification_status` (statistics)
|
|
241
|
+
|
|
242
|
+
2. Group chat handling
|
|
243
|
+
- Per-sender voice assignment within groups
|
|
244
|
+
- Optional: Prefix speaker name ("John says: Hello")
|
|
245
|
+
|
|
246
|
+
3. Configuration UI enhancements
|
|
247
|
+
- Natural language commands
|
|
248
|
+
- Bulk enable/disable operations
|
|
249
|
+
|
|
250
|
+
### Phase 4: Testing & Documentation (Week 4)
|
|
251
|
+
|
|
252
|
+
1. End-to-end testing
|
|
253
|
+
2. Documentation
|
|
254
|
+
3. Example usage scenarios
|
|
255
|
+
4. Error handling and edge cases
|
|
256
|
+
|
|
257
|
+
## Technical Considerations
|
|
258
|
+
|
|
259
|
+
### Pros
|
|
260
|
+
✅ **Zero modification to existing systems** - WhatsApp bridge and AgentVibes remain unchanged
|
|
261
|
+
✅ **Leverages MCP protocol** - Native Claude Desktop/Code integration
|
|
262
|
+
✅ **Reuses existing infrastructure** - Both message storage and TTS already work
|
|
263
|
+
✅ **Natural language control** - "Enable notifications for Mom's chat"
|
|
264
|
+
✅ **Voice variety** - 27+ voices available for round-robin
|
|
265
|
+
|
|
266
|
+
### Challenges
|
|
267
|
+
⚠️ **Database polling latency** - 1-5 second delay before TTS (acceptable for notifications)
|
|
268
|
+
⚠️ **Voice assignment persistence** - Need to store contact-voice mappings
|
|
269
|
+
⚠️ **Group chat complexity** - Multiple senders require per-sender voice tracking
|
|
270
|
+
⚠️ **Media messages** - How to announce images/videos/voice notes?
|
|
271
|
+
|
|
272
|
+
### Solutions
|
|
273
|
+
- **Polling**: Use 2-second intervals for responsive notifications
|
|
274
|
+
- **Persistence**: JSON config file in `.claude/whatsapp-notifications.json`
|
|
275
|
+
- **Groups**: Extend mapping to `{group_jid: {sender_jid: voice}}`
|
|
276
|
+
- **Media**: Speak "[Name] sent a photo" or "[Name] sent a voice message"
|
|
277
|
+
|
|
278
|
+
## Resource Requirements
|
|
279
|
+
|
|
280
|
+
### Development Time
|
|
281
|
+
- **Phase 1**: 8-12 hours (core integration)
|
|
282
|
+
- **Phase 2**: 6-8 hours (monitoring)
|
|
283
|
+
- **Phase 3**: 4-6 hours (advanced features)
|
|
284
|
+
- **Phase 4**: 4-6 hours (testing/docs)
|
|
285
|
+
- **Total**: ~25-35 hours
|
|
286
|
+
|
|
287
|
+
### Runtime Resources
|
|
288
|
+
- **Memory**: +50-100 MB (Python process with polling)
|
|
289
|
+
- **CPU**: Negligible (2-second polls, TTS on demand)
|
|
290
|
+
- **Storage**: ~10 KB (configuration file)
|
|
291
|
+
|
|
292
|
+
### Dependencies
|
|
293
|
+
- Existing: WhatsApp MCP server, AgentVibes
|
|
294
|
+
- New: None (uses existing FastMCP framework)
|
|
295
|
+
|
|
296
|
+
## Example Usage Scenarios
|
|
297
|
+
|
|
298
|
+
### Scenario 1: Enable notifications for a contact
|
|
299
|
+
```
|
|
300
|
+
User: "Enable WhatsApp notifications for my mom"
|
|
301
|
+
Claude: [Calls whatsapp_search_contacts("mom")]
|
|
302
|
+
[Finds: Jane Smith, +1234567890]
|
|
303
|
+
[Calls whatsapp_enable_notifications("+1234567890@s.whatsapp.net")]
|
|
304
|
+
✅ Enabled notifications for Jane Smith with voice "Aria"
|
|
305
|
+
|
|
306
|
+
[Later, message arrives from Jane]
|
|
307
|
+
TTS: "Message from Jane Smith: Don't forget to call me tonight"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Scenario 2: Group chat with multiple voices
|
|
311
|
+
```
|
|
312
|
+
User: "Enable notifications for the Family group"
|
|
313
|
+
Claude: [Calls whatsapp_list_chats("Family")]
|
|
314
|
+
[Calls whatsapp_enable_notifications("group123@g.us")]
|
|
315
|
+
✅ Enabled notifications for Family group
|
|
316
|
+
Voices will be assigned per sender automatically
|
|
317
|
+
|
|
318
|
+
[Later, messages arrive]
|
|
319
|
+
TTS (Aria voice): "Dad: Can someone pick up milk?"
|
|
320
|
+
TTS (Terry voice): "Mom: I'll get it on the way home"
|
|
321
|
+
TTS (Bob voice): "Sister: Thanks Mom!"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Scenario 3: Managing notifications
|
|
325
|
+
```
|
|
326
|
+
User: "Show me all WhatsApp notification channels"
|
|
327
|
+
Claude: [Calls whatsapp_list_notification_channels()]
|
|
328
|
+
|
|
329
|
+
🔔 WhatsApp Notifications Active:
|
|
330
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
331
|
+
1. Jane Smith (+1234567890)
|
|
332
|
+
Voice: Aria
|
|
333
|
+
Last message: 2 minutes ago
|
|
334
|
+
|
|
335
|
+
2. Family Group
|
|
336
|
+
Voice assignments:
|
|
337
|
+
• Dad → Northern Terry
|
|
338
|
+
• Mom → Kristin
|
|
339
|
+
• Sister → Cowboy Bob
|
|
340
|
+
Last message: 5 minutes ago
|
|
341
|
+
|
|
342
|
+
3. Work Team
|
|
343
|
+
Voice: Jenny
|
|
344
|
+
Last message: 1 hour ago
|
|
345
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Security & Privacy
|
|
349
|
+
|
|
350
|
+
### Data Access
|
|
351
|
+
- **Read-only access** to WhatsApp SQLite database
|
|
352
|
+
- **No message forwarding** - all processing local
|
|
353
|
+
- **User-controlled** - notifications only for explicitly enabled contacts
|
|
354
|
+
|
|
355
|
+
### Configuration Storage
|
|
356
|
+
- Stored locally in `.claude/whatsapp-notifications.json`
|
|
357
|
+
- Contains: JIDs (identifiers), voice assignments
|
|
358
|
+
- No message content stored by plugin
|
|
359
|
+
|
|
360
|
+
### Permissions
|
|
361
|
+
- User must explicitly enable per-contact
|
|
362
|
+
- Can disable anytime via MCP command
|
|
363
|
+
- Respects WhatsApp MCP server's existing security
|
|
364
|
+
|
|
365
|
+
## Alternatives Considered
|
|
366
|
+
|
|
367
|
+
### Alternative 1: Direct Go Bridge Modification
|
|
368
|
+
**Pros**: Real-time, no polling lag
|
|
369
|
+
**Cons**: Modifies existing codebase, harder to maintain
|
|
370
|
+
**Verdict**: ❌ Rejected - maintain separation of concerns
|
|
371
|
+
|
|
372
|
+
### Alternative 2: Webhook-based System
|
|
373
|
+
**Pros**: Event-driven, more efficient
|
|
374
|
+
**Cons**: Requires network layer, authentication complexity
|
|
375
|
+
**Verdict**: ❌ Rejected - overkill for local system
|
|
376
|
+
|
|
377
|
+
### Alternative 3: Browser Extension
|
|
378
|
+
**Pros**: Works with WhatsApp Web directly
|
|
379
|
+
**Cons**: No access to MCP, can't use AgentVibes voices
|
|
380
|
+
**Verdict**: ❌ Rejected - loses MCP integration benefits
|
|
381
|
+
|
|
382
|
+
## Conclusion
|
|
383
|
+
|
|
384
|
+
This plugin is **highly feasible** and should be implemented as a **standalone Python package** in an independent repository.
|
|
385
|
+
|
|
386
|
+
**Key Success Factors**:
|
|
387
|
+
1. ✅ No modifications to AgentVibes or WhatsApp MCP required
|
|
388
|
+
2. ✅ Clean separation of concerns (TTS engine vs messaging integration)
|
|
389
|
+
3. ✅ Independent versioning and release cycles
|
|
390
|
+
4. ✅ Opens path for plugin ecosystem (Signal, Telegram, Slack, etc.)
|
|
391
|
+
5. ✅ Subprocess-based AgentVibes integration (simple, reliable)
|
|
392
|
+
6. ✅ Simple SQLite polling for message detection
|
|
393
|
+
7. ✅ Hash-based voice assignment for consistency
|
|
394
|
+
8. ✅ Natural language command interface via MCP
|
|
395
|
+
|
|
396
|
+
**Repository Structure**:
|
|
397
|
+
- **Name**: `whatsapp-agentvibes` or `agentvibes-whatsapp-plugin`
|
|
398
|
+
- **Location**: New independent GitHub repository
|
|
399
|
+
- **Distribution**: PyPI package (`pip install whatsapp-agentvibes`)
|
|
400
|
+
- **Dependencies**: AgentVibes (subprocess), WhatsApp MCP (SQLite), FastMCP (Python)
|
|
401
|
+
|
|
402
|
+
**Recommendation**: Proceed with **Standalone Plugin Architecture** using the phased implementation plan above.
|
|
403
|
+
|
|
404
|
+
**See also**: `/docs/whatsapp-tts-standalone-plugin.md` for detailed standalone architecture design.
|
|
405
|
+
|
|
406
|
+
## Next Steps
|
|
407
|
+
|
|
408
|
+
1. Create GitHub issue with detailed implementation tasks
|
|
409
|
+
2. Set up project structure: `agentvibes-whatsapp-plugin/`
|
|
410
|
+
3. Implement Phase 1 (core integration)
|
|
411
|
+
4. Create demo video showing the feature in action
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
**Document Version**: 1.0
|
|
416
|
+
**Date**: 2025-11-12
|
|
417
|
+
**Author**: AgentVibes + Claude AI
|
|
418
|
+
**Status**: Ready for Implementation
|