diff --git a/HEARTBEAT.md b/HEARTBEAT.md index 9e45234..8e6b6b6 100644 --- a/HEARTBEAT.md +++ b/HEARTBEAT.md @@ -142,6 +142,11 @@ Search X/Twitter for news Johan cares about: - @moltbot — Mr. Lobster, Clawdbot/Moltbot creator - @realDonaldTrump — What's Trump posting/doing +**OpenClaw Issues (check weekly):** +- Session reset deleting transcripts from memory search index (our patch: include `.deleted` files) +- `dangerouslyDisableDeviceAuth` clearing operator scopes (our patch: preserve scopes) +- Watch releases + GitHub issues for official fixes → remove patches when fixed upstream + **Netherlands:** - Dutch news (usually quiet, but flag anything significant) - Tax on unrealized profits (vermogensbelasting box 3) — this is a big deal diff --git a/TOOLS.md b/TOOLS.md index 9592697..9b86bc7 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -349,3 +349,11 @@ Add whatever helps you do your job. This is your cheat sheet. - **Automation:** `automation.govee_button_2_suction_machine` → toggles suction machine - **Pairing:** Hold 5 sec (LED flashes), press once to broadcast, add from HA UI quickly - **Note:** BLE proxy must be enabled on nearby Athom sensor (Office1 b372f4 has it now) + +### Office Tablet (office1.tbl) +- **Media player:** `media_player.lenovo_tab_m8_7` +- **TTS notify:** `notify.lenovo_tab_m8_text_to_speech_7` +- **Overlay notify:** `notify.lenovo_tab_m8_overlay_message_7` +- **Screen:** `light.office_tbl_screen` +- **Fully Kiosk media_player:** `media_player.office_tbl` +- **Use for:** James voice output testing, announcements diff --git a/memory/2026-02-16.md b/memory/2026-02-16.md new file mode 100644 index 0000000..1df6085 --- /dev/null +++ b/memory/2026-02-16.md @@ -0,0 +1,55 @@ +# 2026-02-16 + +## Briefing Preference +- Johan prefers X/Twitter as primary news source for briefings over legacy media +- Speed matters — X breaks news hours before traditional outlets +- Lean into high-engagement posts, real-time threads, not CNN/Reuters rewrites + +## OpenClaw Source Patches (reapply after updates) +1. **Scope preservation with dangerouslyDisableDeviceAuth** + - File: `dist/gateway-cli-DbznSfRg.js` + - Change: `if (scopes.length > 0)` → `if (scopes.length > 0 && !disableControlUiDeviceAuth)` + - Why: Without this, `dangerouslyDisableDeviceAuth` nullifies device → clears scopes → operator.read/write denied + +2. **Index deleted session transcripts in memory search** + - File: `dist/sqlite-C54NeA1C.js` + - Change: `.filter((name) => name.endsWith(".jsonl"))` → `.filter((name) => name.endsWith(".jsonl") || name.includes(".jsonl.deleted."))` + - Why: Daily session reset marks old transcripts as `.deleted`, making them invisible to memory search + +## TTS → Tablet Pipeline (idea) +- Generate high-quality TTS (Fish Audio S1 / ElevenLabs) → mp3 +- Serve from forge (dashboard server or simple http) +- Play via `media_player.play_media` on Fully Kiosk tablets +- Tablets: `media_player.lenovo_tab_m8_*` (many), `media_player.casita_tbl`, etc. +- **Office tablet only for testing** (people sleeping!) +- Could become James's "voice" — intercom-style announcements with a premium voice +- Need to identify which media_player entity maps to the office tablet + +## Smart Home Voice Vision +- Goal: push smart home to next level with contextual voice announcements +- Pipeline proven: Edge TTS → mp3 → media_player on Fully tablets ✅ +- Use cases: + - "The UPS driver is approaching the front door" (before doorbell) + - "Misha is arriving" (car in driveway) + - "The dryer upstairs finished" (Miele integration) + - Russian announcements for MiL/FiL (ru-RU voices) + - Delivery alerts tied to tracker +- Russian voices for in-laws — house speaks their language +- Need Tanya's buy-in before expanding beyond office tablet +- Fish Audio S1 ($5/mo) for premium voice quality when ready + +## Wake Permission +- Johan allows James to wake him from **8:00 AM ET** onwards +- Only for **genuinely important** events (Kaseya critical, urgent emails, etc.) +- No FYI-level noise — real alerts only + +## Fish Audio S1 — LIVE ✅ +- API key: stored in memory (need to add to Vaultwarden when session refreshed) +- Voice: **Adrian** (reference_id: `bf322df2096a46f18c579d0baa36f41d`) +- Model: `s1` +- Pricing: $5/M UTF-8 bytes (pay-as-you-go, no subscription needed) +- API: `POST https://api.fish.audio/v1/tts` with Bearer auth +- Successfully generated and played on office tablet (media_player.lenovo_tab_m8_7) +- Johan picked Adrian over Ethan, Andrew (Edge), Guy (Edge), Brian (Edge), Christopher (Edge) +- Pipeline: Fish API → mp3 → python http server on :8199 → media_player.play_media +- TODO: Make persistent TTS service (not ad-hoc python server), store key in Vaultwarden diff --git a/memory/claude-usage.db b/memory/claude-usage.db index 5f3a3ad..e9ba2dc 100644 Binary files a/memory/claude-usage.db and b/memory/claude-usage.db differ diff --git a/memory/claude-usage.json b/memory/claude-usage.json index f3e48c8..90dcdc9 100644 --- a/memory/claude-usage.json +++ b/memory/claude-usage.json @@ -1,9 +1,9 @@ { - "last_updated": "2026-02-16T05:00:03.479295Z", + "last_updated": "2026-02-16T11:00:04.103753Z", "source": "api", - "session_percent": 4, - "session_resets": "2026-02-16T08:00:00.446402+00:00", - "weekly_percent": 16, - "weekly_resets": "2026-02-21T19:00:00.446421+00:00", - "sonnet_percent": 6 + "session_percent": 12, + "session_resets": "2026-02-16T13:00:01.072322+00:00", + "weekly_percent": 19, + "weekly_resets": "2026-02-21T19:00:00.072342+00:00", + "sonnet_percent": 7 } \ No newline at end of file diff --git a/memory/corrections.md b/memory/corrections.md index 27f340a..75ff426 100644 --- a/memory/corrections.md +++ b/memory/corrections.md @@ -104,3 +104,9 @@ When Johan pushes back, log the **principle**, not just the symptom. **Why:** Weekends + holidays = night shift runs until 7AM (not 5AM). I had the schedule and still got it wrong. **Applies to:** Any time-of-day assumptions, "good morning", "get some rest", etc. **Test:** Before any time-based pleasantry, check: what block is Johan in RIGHT NOW? Weekend/holiday = 7AM cutoff. + +### PRINCIPLE: Code-fence all copy-paste values +**Trigger:** Admin token for Vaultwarden got line-wrapped with a space mid-string, breaking copy-paste +**Why:** Johan copies tokens/URLs/passwords from chat. Line wrapping inserts invisible spaces that break them silently. +**Applies to:** Any value Johan needs to copy: tokens, passwords, URLs, API keys, commands +**Test:** "Is this a value Johan will copy-paste? If yes, wrap in backticks/code block." diff --git a/scripts/daily-updates.sh b/scripts/daily-updates.sh index be95a2d..3264c44 100755 --- a/scripts/daily-updates.sh +++ b/scripts/daily-updates.sh @@ -64,6 +64,8 @@ if [ "$OC_BEFORE" != "$OC_LATEST" ] && [ "$OC_LATEST" != "unknown" ]; then update_json "openclaw.after" "\"$OC_AFTER\"" update_json "openclaw.updated" "true" echo "Updated: $OC_BEFORE → $OC_AFTER" + # Reapply source patches + /home/johan/clawd/scripts/openclaw-post-update-patches.sh 2>&1 else update_json "openclaw.updated" "false" update_json "openclaw.error" "\"npm update failed\"" diff --git a/scripts/openclaw-post-update-patches.sh b/scripts/openclaw-post-update-patches.sh new file mode 100755 index 0000000..7863884 --- /dev/null +++ b/scripts/openclaw-post-update-patches.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# OpenClaw post-update patches +# Run after every openclaw update to reapply source fixes +# These should be removed once officially fixed upstream + +OC_DIR=$(npm -g root 2>/dev/null)/openclaw/dist +PATCHED=0 + +# Patch 1: Preserve operator scopes with dangerouslyDisableDeviceAuth +FILE="$OC_DIR/gateway-cli-DbznSfRg.js" +if [ -f "$FILE" ] && grep -q 'if (scopes.length > 0) {' "$FILE" 2>/dev/null; then + sed -i 's/if (scopes.length > 0) {/if (scopes.length > 0 \&\& !disableControlUiDeviceAuth) {/' "$FILE" + echo "✅ Patch 1: Scope preservation applied" + PATCHED=$((PATCHED + 1)) +else + echo "⏭️ Patch 1: Already applied or file changed" +fi + +# Patch 2: Index deleted session transcripts in memory search +FILE="$OC_DIR/sqlite-C54NeA1C.js" +if [ -f "$FILE" ] && grep -q '\.filter((name) => name\.endsWith("\.jsonl"))' "$FILE" 2>/dev/null; then + sed -i 's/\.filter((name) => name\.endsWith("\.jsonl"))/\.filter((name) => name.endsWith(".jsonl") || name.includes(".jsonl.deleted."))/' "$FILE" + echo "✅ Patch 2: Deleted transcript indexing applied" + PATCHED=$((PATCHED + 1)) +else + echo "⏭️ Patch 2: Already applied or file changed" +fi + +echo "Patches applied: $PATCHED" + +# Note: After patching, gateway needs restart +# The daily-updates.timer already restarts if OC changed