ravi.bot 0.1.24 → 0.2.0

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 CHANGED
@@ -9,6 +9,8 @@ A Claude-powered conversational bot with WhatsApp and Matrix integration, sessio
9
9
  - **Session Routing** - Route conversations to different agents based on rules
10
10
  - **Message Queue** - Smart interruption handling when tools are running
11
11
  - **Debounce** - Group rapid messages before processing
12
+ - **Heartbeat** - Proactive agent runs on schedule to check pending tasks
13
+ - **Cron Jobs** - Schedule prompts with cron expressions, intervals, or one-shot times
12
14
  - **Multi-Agent** - Configure multiple agents with different capabilities
13
15
  - **Daemon Mode** - Run as a system service (launchd/systemd)
14
16
 
@@ -82,6 +84,41 @@ ravi agents debounce main 2000 # Set 2s debounce
82
84
  ravi agents tools main # Manage tool whitelist
83
85
  ```
84
86
 
87
+ ### Heartbeat (Scheduled Tasks)
88
+
89
+ ```bash
90
+ ravi heartbeat status # Show all agents
91
+ ravi heartbeat enable main 30m # Run every 30 minutes
92
+ ravi heartbeat disable main # Disable
93
+ ravi heartbeat set main interval 1h # Change interval
94
+ ravi heartbeat set main active-hours 09:00-22:00 # Limit hours
95
+ ravi heartbeat trigger main # Manual trigger
96
+ ```
97
+
98
+ Create `~/ravi/main/HEARTBEAT.md` with pending tasks. Agent runs periodically and executes them. If nothing to do, agent responds with `HEARTBEAT_OK` (suppressed).
99
+
100
+ ### Cron Jobs (Scheduled Prompts)
101
+
102
+ ```bash
103
+ ravi cron list # List all jobs
104
+ ravi cron add "Report" --cron "0 9 * * *" --message "Daily report"
105
+ ravi cron add "Check" --every 30m --message "Check status"
106
+ ravi cron add "Remind" --at "2025-02-01T15:00" --message "Meeting soon"
107
+ ravi cron show <id> # Show job details
108
+ ravi cron enable <id> # Enable job
109
+ ravi cron disable <id> # Disable job
110
+ ravi cron set <id> <key> <value> # Edit property
111
+ ravi cron run <id> # Manual trigger
112
+ ravi cron rm <id> # Delete job
113
+ ```
114
+
115
+ **Schedule types:**
116
+ - `--cron "0 9 * * *"` - Cron expression (with `--tz` for timezone)
117
+ - `--every 30m` - Interval (`30s`, `5m`, `1h`, `2d`)
118
+ - `--at "2025-02-01T15:00"` - One-shot at specific time
119
+
120
+ **Options:** `--agent`, `--isolated`, `--delete-after`, `--description`
121
+
85
122
  ### Contacts (WhatsApp)
86
123
 
87
124
  ```bash
@@ -113,6 +150,7 @@ ravi routes set "+5511*" priority 10
113
150
  ravi settings list
114
151
  ravi settings set defaultAgent main
115
152
  ravi settings set defaultDmScope per-peer
153
+ ravi settings set defaultTimezone America/Sao_Paulo
116
154
  ```
117
155
 
118
156
  ### Agent Options
@@ -172,6 +210,7 @@ When messages arrive while processing:
172
210
  ├── ravi.db # All config: agents, routes, sessions, contacts (SQLite)
173
211
  └── main/ # Agent working directory
174
212
  ├── CLAUDE.md # Agent instructions
213
+ ├── HEARTBEAT.md # Pending tasks for heartbeat (optional)
175
214
  └── ... # Agent-specific files
176
215
 
177
216
  ~/.ravi/ # Ravi config directory