feat: add dynamic autonomous DAVE presence

This commit is contained in:
2026-07-05 22:47:08 +02:00
parent 35e4f901f7
commit 08b6016dfb
10 changed files with 429 additions and 4 deletions

View File

@@ -141,6 +141,14 @@ BRIEF_VERBOSITY=standard
SECURITY_ONBOARDING_ENABLED=true
# Generate once with: openssl rand -base64 48
SECURITY_PROFILE_ENCRYPTION_KEY=replace-with-a-unique-random-secret
DAVE_PRESENCE_ENABLED=false
DAVE_PRESENCE_MAX_MESSAGES_PER_DAY=4
DAVE_PRESENCE_MIN_GAP_MINUTES=75
DAVE_PRESENCE_MIN_INTERVAL_MINUTES=45
DAVE_PRESENCE_MAX_INTERVAL_MINUTES=180
DAVE_PRESENCE_IDLE_AFTER_MINUTES=60
DAVE_PRESENCE_CHECK_INTERVAL_MINUTES=5
DAVE_PRESENCE_TIMEZONE=Europe/Berlin
LLM_PROVIDER=openrouter
LLM_BASE_URL=https://openrouter.ai/api/v1
@@ -412,6 +420,12 @@ The Security Manager uses the profile to rank proximity, severity, time horizon,
The Security Manager's conversational identity is **DAVE**, a synthetic security-management construct. DAVE adapts language, formality, directness, answer length, formatting, and technical depth to the operator's current message and bounded chat history. Explicit style requests take priority. The adaptation does not copy spelling mistakes, hostility, panic, or unsupported certainty, and urgent safety instructions remain concise and unambiguous. DAVE does not claim human emotions, consciousness, a body, or access beyond the terminal's allowlisted tools.
#### Dynamic DAVE Presence
`DAVE_PRESENCE_ENABLED=true` lets DAVE initiate Telegram conversations without fixed daily times. Evaluations occur at randomized intervals and can be pulled forward by material sweep changes. DAVE considers current data freshness, source integrity, recent changes, evidence, the encrypted Security Manager profile, time since your last interaction, and whether another message would add value. It may send a relevant warning, situation update, evidence-grounded all-clear, practical suggestion, or one natural context question. It stays silent when a message would only add noise.
Dynamic presence respects profile quiet hours, a daily message cap, a minimum gap between messages, and an idle period after your own chat activity. Evaluation timing and counters persist in `runs/dave-presence-state.json`, preventing restart spam. Scheduled presence cannot execute mutating tools or bypass confirmation. This feature is opt-in because it consumes LLM requests and sends unsolicited Telegram messages.
### Discord Bot (Two-Way)
Intelligence Terminal also supports Discord as a full-featured bot with slash commands and rich embed alerts. It mirrors the Telegram bot's capabilities with Discord-native formatting.
@@ -693,6 +707,14 @@ All settings are in `.env` with sensible defaults:
| `BRIEF_VERBOSITY` | `standard` | Briefing detail level |
| `SECURITY_ONBOARDING_ENABLED` | `true` | Start language-first Security Manager onboarding when no profile exists |
| `SECURITY_PROFILE_ENCRYPTION_KEY` | disabled | Unique secret of at least 32 characters used to encrypt the local profile |
| `DAVE_PRESENCE_ENABLED` | `false` | Enable dynamic, unsolicited DAVE Telegram presence |
| `DAVE_PRESENCE_MAX_MESSAGES_PER_DAY` | `4` | Hard daily cap for dynamic presence messages |
| `DAVE_PRESENCE_MIN_GAP_MINUTES` | `75` | Minimum gap between DAVE-initiated messages |
| `DAVE_PRESENCE_MIN_INTERVAL_MINUTES` | `45` | Lower bound for randomized evaluation intervals |
| `DAVE_PRESENCE_MAX_INTERVAL_MINUTES` | `180` | Upper bound for randomized evaluation intervals |
| `DAVE_PRESENCE_IDLE_AFTER_MINUTES` | `60` | Delay unsolicited evaluation after operator activity |
| `DAVE_PRESENCE_CHECK_INTERVAL_MINUTES` | `5` | Lightweight timer resolution for due evaluations |
| `DAVE_PRESENCE_TIMEZONE` | `Europe/Berlin` | Fallback timezone when the profile has none |
| `LLM_PROVIDER` | disabled | `litellm`, `openrouter`, `openai-compatible`, `lmstudio`, `ollama`, `anthropic`, `openai`, `gemini`, `codex`, `minimax`, `mistral`, or `grok` |
| `LLM_BASE_URL` | provider default | API base URL; required for LiteLLM and custom endpoints |
| `LLM_API_KEY` | — | Provider or proxy API key; required for LiteLLM |