Pre-existing uncommitted changes swept in with the STT work:
anaf-monitor snapshots/versions, cron job + newsletter state, 9 youtube KB
notes, tools/ocr_bon.py, and tools/tts.py.
Note: the tts.py change breaks 2 truncation tests in test_voice_normalize.py
(sanitize word-count) — flagged for a separate follow-up.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gemma 4 cloud audio was infeasible (31b-cloud has no audio; E4B broken
upstream, no deploy host), so improve faster-whisper instead.
- Pin temperature=0.0 to disable the fallback ladder that re-decoded unclear
audio up to 6x (source of the 16-24s latency outliers); reject hallucinated
segments via avg_logprob/compression_ratio in the new pure _filter_segments.
- Adopt mikr/whisper-small-ro-cv11 (CT2 int8) via configurable voice.stt_model:
spike showed WER 24%->10%, numbers fixed at source, +0.33s p50 (in budget).
- Add tools/voice_stt_mine.py (log mining) + tools/voice_stt_spike.py (model
eval with diacritic scoring) + tests for the gate and miner.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Expose a navigation layer to the agent and harden RAG, after analyzing the
OKF note and testing on the real KB.
- memory_search.search(): dedupe best-chunk-per-file (a relevant note can no
longer be buried by another file's chunks) + keyword fallback tagged
degraded:True when Ollama is unreachable (no more hard crash).
- update_notes_index.py: emit per-folder index.md + root router; prune empty
folders; fix latent subcategory->project bug.
- Exclude generated index.md from RAG rglob (reindex/incremental) + indexer
scans + heartbeat freshness check (prevents self-pollution / reindex thrash).
- CLAUDE.md: reframe memory as hybrid (navigation first, RAG for fuzzy recall).
- Delete stale orphan kb/youtube/index.json; correct the OKF source note.
- Tests: dedup, keyword fallback, index.md exclusion. Plan + review in docs/.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- tools/youtube_subs.py: get_subtitles() returneaza acum (title, desc, transcript).
Functii noi is_description_about_video() si extract_relevant_description()
detecteaza daca descrierea contine capitole/timestamps (nu doar promotie autori)
si curata trailing-urile promotionale inainte sa includa descrierea in output.
- dashboard/handlers/youtube.py: aceleasi functii adaugate; nota KB generata
include acum un bloc "Descriere / Index" daca descrierea e relevanta pentru video.
- memory/kb/youtube: nota Jeremy Grantham (AI bubble, investitii, toxicitate)
cu descrierea ca index de capitole.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gmail preserves the original sender when forwarding — whitelist check
was blocking all Fwd: emails not from mmarius28@gmail.com.
echo@romfast.ro is private, so any Fwd: arriving there is from Marius.
Also strip ***SPAM*** prefix from slugs for cleaner filenames.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Squashed branch: voice/dave-recv → master. Closes Pas 12 (DAVE E2E) and lands
voice-mode UX polish + verbal voice control on top of the Pas 1-10 scaffolding
already on master.
## DAVE E2E receive-side decrypt (e4f3177)
Vendored fork: discord-ext-voice-recv 0.5.3a+echo.dave1. Patches the receive
pipeline to handle Discord's mandatory DAVE encryption on voice gateway v=8.
- `_maybe_dave_decrypt`: uses davey.can_passthrough(user_id) as primary gate,
falls through to dave.decrypt for DAVE-epoch peers, drops on decrypt failure
without killing the reader thread.
- VAD fix: silero-vad v5+ requires exactly 512 samples; our 100ms window
(1600 samples) was silently raising ValueError → STT never fired. Now slice
into 512-sample chunks.
- Whisper: bumped beam_size 1→5 and added RO initial_prompt.
- Tests: 11 DAVE unit tests + 2 callback integration tests + contract test
with fork-version guard.
## Voice UX polish (d1bc77e)
- Killed the 3s "mă gândesc" filler (always collided with Claude p50 4-7s).
- Barge-in via `ttsq.clear()` at top of `on_segment_done`.
- DTX silence-flush poller (200ms tick) — Discord stops sending RTP packets
when silent, so the inline silence-check in sink.write() never fired for
trailing audio; background thread handles it.
- `EchoStreamingAudioSource.read()` non-blocking — old `get_frame(timeout=0.1)`
wrecked Discord's 20ms cadence and the client interpreted bursts as
stuttering (Marius heard "4 de minute" instead of full sentence).
- RO time expansion: 23:09 → "douăzeci și trei și nouă minute".
- Supertonic Unicode sanitize centralized in tools/tts.py.
- Whisper local_files_only=True — no HF metadata GET on each startup.
- Diagnostic logging through sink → VAD → Claude stream → TTS chain.
## Voice mode iteration (e589e48)
- `personality/VOICE_MODE.md` — voice-tailored system prompt (short, no
markdown, no abbreviations, time without seconds, distances in
"mii"/"milioane"); plumbed via build_system_prompt(voice_mode=True).
- Isolated voice session key `voice:<channel_id>` — voice doesn't share
context with text adapter on the same channel; auto-applied without
/clear ceremony. /clear drops both keys.
- Metric units + Romanian thousands (normalize.py): "384.000 km" →
"trei sute optzeci și patru de mii de kilometri" with feminine-correct
pluralization and "de" particle for ≥20.
- `/voice setvoice <M1-F5>` slash command with native autocomplete; swaps
live + persists voice.default_voice to config.json.
- Verbal voice change (src/voice/voice_commands.py + 29 tests) — "schimbă
vocea pe M5", "voce em cinci", with permissive substring fallback for
Whisper-mangled forms like "Mâcinci"=M5 and "unul cinci"=M5. Whisper
initial_prompt now lists voice vocabulary to bias STT toward clean
outputs.
- Fast barge-in: VAD ≥2 consecutive windows (~200ms) on Marius's user
while Echo has pending TTS frames → cut him off mid-sentence so user
doesn't wait the full silence + STT cycle. Acoustic echo bleed-through
still requires headphones (no AEC).
## Test suite
130 voice + router tests pass (test_voice_recv_dave, test_voice_session_cleanup,
test_voice_adapter_contract, test_voice_normalize, test_voice_commands,
test_router).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Parametrul `lang` era definit (DEFAULT_LANG = "ro") dar nu era inclus
in request-ul HTTP catre /v1/audio/speech. Adaugat "lang": lang in
body-ul JSON si lang="ro" explicit in _tts_synthesize().
OpenAPI-ul Supertonic confirma ca /v1/audio/speech accepta `lang`
ca parametru optional (OpenAISpeechRequest schema).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
email_digest.py folosea save_unread_emails() care salva în memory/kb/emails/.
Notițele KB trebuie create DOAR de heartbeat. Acum digest-ul face fetch
direct din IMAP (ca email_forward.py), fără side effects pe KB.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instrucțiunea era prea restrictivă (doar formulare/documente "acționabile").
Acum include orice URL relevant: articole, linkuri de citit, resurse.
Același comportament adăugat și în HEARTBEAT pentru TL;DR din KB.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
La salvarea unui email forwardat, se extrage acum expeditorul original
din body și se elimină prefixul Fwd: din titlu — în loc de adresa lui Marius.
Corectat și fișierul deja salvat din 07 mai.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
approved-tasks.json, dashboard/status.json, anaf-monitor/monitor.log
are auto-modified by background processes (heartbeat, cron jobs, ANAF
monitor). Untracking them stops the noisy "auto-commit from dashboard"
churn. Files stay on disk; readers (router._load_approved_tasks etc.)
already handle missing files by returning empty defaults.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
State files updated by dashboard/heartbeat/cron jobs, plus new KB
captures (samsung firmware todo, scout song reel, weekly youtube notes).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restructurare Ralph QC loop pe smart gate dispatcher tag-driven (în loc de
5 faze fixe), DAG dependsOn cu propagare blocked, retry guard 3-strike, rate
limit detection, plus dashboard live cu polling 5s.
Changes:
- tools/ralph_prd_generator.py: parametru optional final_plan_path; când e
furnizat, invocă Claude Opus pe final-plan.md pentru extragere user stories
cu schema extinsă (tags, dependsOn, acceptanceCriteria 3-5). Backward compat
păstrat — fără final_plan_path, fallback la heuristic-ul vechi.
- tools/ralph/prd-template.json: schema W3 (tags[], dependsOn[], retries,
failed, blocked, failureReason, requiresDesignReview).
- tools/ralph/prompt.md: 4 faze (impl, base quality, smart gates, commit) +
dispatcher pe story.tags. Tags vide → run-all-gates fallback (safe default).
- tools/ralph_dag.py (nou): tag validation heuristic anti-silent-regression
(force ui dacă diff atinge .vue/.tsx/.html/.css/.scss; force db pentru
migrations sau .sql; force vercel dacă există vercel.json) + topological
sort cu blocked propagation + atomic prd.json updates.
- tools/ralph/ralph.sh: --max-turns 30, DAG-aware story selection, retry
counter cu auto-fail la 3, rate limit detection (sleep 30min + 1 retry),
CLI subcommands prin tools/ralph_dag.py helper.
- dashboard/handlers/ralph.py (nou): /api/ralph/status + /<slug>/log + /prd
+ /stop. Defensive vs corrupt prd.json. Sandbox-ed PID kill.
- dashboard/ralph.html (nou): live cards 3/2/1 col responsive, polling 5s,
drawer pentru log/PRD viewer, status colors (--status-running/blocked/
failed/complete declarate inline), Lucide icons cu aria-labels.
- dashboard/api.py: mount /api/ralph/* (GET status/log/prd, POST stop).
- tests/: 72 teste noi (smart gates, DAG, retry, dashboard endpoint).
Note arhitecturale:
- Polling 5s ales peste SSE/WebSocket (suficient pentru iter Ralph 8-15min)
- Tag validation rulează POST-iter pe diff git pentru anti-silent-regression
- Rate limit retry: 1 dată per rulare, apoi mark failed=rate_limited
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add /send-document endpoint to WhatsApp bridge (base64 document send)
- save_email_as_note() now saves attachment files to disk alongside note
- email_digest: extract original sender for Fwd: emails so header shows
the real author, not the forwarder; send attachment files after summary
- email_forward: send attachment files as documents after text parts
- Add extract_original_sender() and save_email_attachment_files() helpers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Digest was attributing forwarded emails to the person who forwarded
them. Now Claude is instructed to identify the original sender from
the forwarded headers and ignore the forwarder entirely. Also drops
pleasantries/apologies from the summary — facts only.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous prompt produced narrative, personal-tone summaries. New prompt
enforces third-person, journalistic style: who sent what to whom first,
then concrete facts, dates, and actions — no interpretation or filler.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add get_email_attachments() helper that extracts filenames from MIME
parts. Email notes now include an Atașamente section; forwarded emails
show attachment names in the WhatsApp header.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rigid bullet schema worked for event emails but stripped all
narrative context from argumentative/organizational messages.
New prompt adapts structure to email type and prioritizes
completeness over brevity.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously digest and forward commands silently exited when inbox
was empty, leaving the user with no feedback after the initial
"processing..." confirmation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Audit-trail tool that translates OpenClaw's nested jobs.json schema
(schedule.expr with optional tz, payload.message, agentId, state) into
echo-core's flat schema. UTC -> Europe/Bucharest cron conversion with
DST-aware offset; Bucharest-tagged source expressions pass through
unchanged. Rewrites `cd ~/clawd` / `/home/moltbot/clawd/` -> echo-core
without matching `clawd-archive` or `clawdbot` substrings.
Built-in skip list covers night-execute and antfarm/feature-dev/*; YouTube:
prefix is auto-skipped. --dry-run, --skip-disabled, --skip, --channel,
--source, --target flags. Duplicate job names in target are skipped with
a warning; existing entries are preserved.
The Echo-Core scheduler's report_on='changes' contract parses
^GSTACK-CRON: changes=\d+$ from stdout to decide whether to forward
the run's output to a channel. monitor_v2.py now prints that marker
as its final stdout line with num_changes from the current run.
Also switches the success return value from len(all_changes) to 0.
Previously, any run that detected changes (N>0) exited with a non-zero
status, which the scheduler treats as an error (always forwarded,
ignoring report_on). Exit code now signals only fatal errors; the
marker carries the change count.
Loop through consecutive newsletter numbers until one is missing, so
backlog gets delivered in a single run. Use httpx for 404 check and
point to absolute claude binary path for cron. Enable job in config.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Digest summarizes unread emails via Claude CLI; forward sends raw
content (split to 4096 chars). Wired as /email digest and
/email forward slash commands, plus instant per-guild sync on ready.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- heartbeat saves unread whitelisted emails via email_process --save --json
- fix: add --add-dir so Claude CLI subprocess can access memory/ symlink
- email_check/process: use BODY.PEEK[] to avoid marking emails as read
- email_process: simplify credential loading via credential_store only
- config: heartbeat interval 30→120min, quiet hours end 08→07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>