whatsapp-pi 1.0.47 → 1.0.48
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/README.md +12 -10
- package/package.json +1 -1
- package/src/i18n.ts +710 -0
- package/src/services/audio.service.ts +4 -3
- package/src/services/baileys-console-filter.ts +7 -5
- package/src/services/incoming-media.service.ts +17 -16
- package/src/services/incoming-message.resolver.ts +150 -129
- package/src/services/message.sender.ts +121 -115
- package/src/services/recents.service.ts +2 -2
- package/src/services/session.manager.ts +85 -30
- package/src/services/whatsapp-pi.logger.ts +6 -2
- package/src/services/whatsapp.service.ts +665 -660
- package/src/ui/menu.handler.ts +242 -107
- package/src/ui/message-detail.view.ts +9 -8
- package/src/ui/message-reply.view.ts +9 -8
- package/whatsapp-pi.ts +33 -18
package/README.md
CHANGED
|
@@ -17,6 +17,9 @@ Pi is a powerful agentic AI coding assistant that operates in your terminal. Thi
|
|
|
17
17
|
- Add contacts with optional names for easy identification
|
|
18
18
|
- View ignored numbers (not in allow list) and add them when needed
|
|
19
19
|
- Manage aliases and print allowed numbers from the menu
|
|
20
|
+
- **Allowed Groups**: Control which WhatsApp groups can interact with Pi
|
|
21
|
+
- Add group JIDs with optional aliases
|
|
22
|
+
- Only groups in Allowed Groups are processed by the agent
|
|
20
23
|
- **Recents & History**: Browse recent conversations, inspect full message history, and reply from message detail view
|
|
21
24
|
- **Reliable Messaging**: Queue-based message sending with retry logic
|
|
22
25
|
- **TUI Integration**: Menu-driven interface for managing connections, contacts, and recent chats
|
|
@@ -55,7 +58,7 @@ After connecting WhatsApp once from the menu and scanning the QR code, you can s
|
|
|
55
58
|
pi --whatsapp-pi-online
|
|
56
59
|
```
|
|
57
60
|
|
|
58
|
-
3. Use the menu to connect WhatsApp and manage allowed
|
|
61
|
+
3. Use the menu to connect WhatsApp and manage allowed numbers and groups
|
|
59
62
|
|
|
60
63
|
## Development / Testing
|
|
61
64
|
|
|
@@ -93,27 +96,26 @@ pi -e whatsapp-pi.ts --whatsapp-pi-online
|
|
|
93
96
|
- **Logoff (Delete Session)** - Remove all credentials and session data
|
|
94
97
|
- **Recents** - Open recent conversations, view history, and reply
|
|
95
98
|
- **Allowed Numbers** - Manage contacts that can interact with Pi
|
|
96
|
-
- **
|
|
99
|
+
- **Allowed Groups** - Manage WhatsApp groups that can interact with Pi
|
|
97
100
|
|
|
98
101
|
### Allowed Numbers Management
|
|
99
102
|
- **Add Number** - Add a new contact to the allow list (format: +5511999999999)
|
|
100
103
|
- **Select a contact** - Open a submenu with **History**, **Send Message**, **Print Number**, alias actions, **Remove Number**, and **Back**
|
|
101
104
|
- **Back** - Return to main menu
|
|
102
105
|
|
|
106
|
+
### Allowed Groups Management
|
|
107
|
+
- **Add Group** - Add a WhatsApp group JID to the allowed groups list (format: 120363012345@g.us)
|
|
108
|
+
- **Select a group** - Open a submenu with **History**, **Send Message**, **Print Group JID**, alias actions, **Remove Group**, and **Back**
|
|
109
|
+
- **Back** - Return to main menu
|
|
110
|
+
|
|
103
111
|
### Recents Management
|
|
104
112
|
- **History** - Open full message history for that conversation
|
|
105
113
|
- **Send Message** - Send a new message without Pi suffix
|
|
106
114
|
- **Reply** - Open message detail, then press `R` to reply
|
|
107
|
-
- **Allow Number** - Move a recent sender into the allow list
|
|
115
|
+
- **Allow Number / Allow Group** - Move a recent sender into the appropriate allow list
|
|
108
116
|
- **Remove Alias** - Clear saved alias for that sender
|
|
109
117
|
- **Back** - Return to main menu
|
|
110
118
|
|
|
111
|
-
### Blocked Numbers Management
|
|
112
|
-
- **View List** - See all numbers that have been ignored (not in allow list)
|
|
113
|
-
- **Allow** - Move a blocked number to the allowed list
|
|
114
|
-
- **Delete** - Remove a number from the blocked list
|
|
115
|
-
- **Back** - Return to main menu
|
|
116
|
-
|
|
117
119
|
## Project Structure
|
|
118
120
|
|
|
119
121
|
```
|
|
@@ -138,7 +140,7 @@ npm test
|
|
|
138
140
|
### Recent Feature Updates (2026-05)
|
|
139
141
|
|
|
140
142
|
- **Auto-Connect Support**: Use the `--whatsapp-pi-online` flag to connect on startup when credentials already exist.
|
|
141
|
-
- **Group-Only Mode**: Use `--whatsapp-group <jid>` to bind Pi to a single WhatsApp group.
|
|
143
|
+
- **Group-Only Mode**: Use `--whatsapp-group <jid>` to bind Pi to a single WhatsApp group. The group must also be present in Allowed Groups.
|
|
142
144
|
- **Recents Store**: Recent conversations and message history are persisted in `~/.pi/whatsapp-pi/recents/recents.json`.
|
|
143
145
|
- **Message Detail / Reply**: Open a message from history to inspect full content and reply with `R`.
|
|
144
146
|
- **Media Support**: Images are forwarded for vision analysis, audio is transcribed with Whisper, and documents are saved under `./.pi-data/whatsapp/documents/`.
|