Commit Graph

378 Commits

Author SHA1 Message Date
Christian Gick
4463cdfee9 chore: Trigger rebuild 2026-03-19 08:36:16 +02:00
Christian Gick
5724195fe0 fix: skyvern DB driver (postgresql+psycopg), add volumes, chromium-headful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:35:55 +02:00
Christian Gick
0f251ddc37 chore: Trigger rebuild 2026-03-19 08:25:43 +02:00
Christian Gick
f3c7f994a2 feat: integrate Skyvern for browser automation
Add Skyvern container (public.ecr.aws) with dedicated PostgreSQL,
connected to LiteLLM proxy for LLM calls. Replace browser_executor
stub with full Skyvern API integration (create task, poll, extract).
Implement skyvern pipeline step for workflow chaining.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:25:07 +02:00
Christian Gick
e44e89aa00 chore: Trigger rebuild 2026-03-19 08:22:55 +02:00
Christian Gick
a22a922b43 Add Skyvern integration and browser executor enhancements
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:19:32 +02:00
Christian Gick
e94a5cfee4 chore: Trigger rebuild 2026-03-19 07:45:13 +02:00
Christian Gick
f27d545012 fix(MAT-164): proactive key poll on screen share + faster DEC_FAILED recovery
When a video track is subscribed (screen share starts), Element Call
rotates the E2EE key. Instead of waiting for DEC_FAILED, proactively
poll the timeline for the new key (6x @ 500ms = 3s window).

Also reduce DEC_FAILED threshold from 3→1 and cooldown from 5s→2s
for faster recovery when the proactive poll misses the rotation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 07:44:51 +02:00
Christian Gick
de3d67f756 chore: remove Claude Code artifacts from repository
- Delete tracked CLAUDE.md.migrated.20260308
- Update confluence-collab submodule (removed Claude Code docstring ref)
- .claude-session/ already gitignored, removed local copy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 07:04:56 +02:00
Christian Gick
4e92b8c053 chore: Trigger rebuild 2026-03-18 18:30:57 +02:00
Christian Gick
69ac33eb0a fix: strip emoji variation selectors in approval reaction matching
Element appends U+FE0F to emoji reactions (👍️ vs 👍). Strip before
matching against approval map.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:30:36 +02:00
Christian Gick
62d11ddfa8 chore: Trigger rebuild 2026-03-18 18:28:41 +02:00
Christian Gick
57cb676b93 debug: add logging to reaction handler for approval flow diagnosis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:28:22 +02:00
Christian Gick
7f9769577b chore: Trigger rebuild 2026-03-18 18:25:10 +02:00
Christian Gick
c6ccacee9e fix: use ReactionEvent instead of UnknownEvent for approval reactions
matrix-nio parses m.reaction as ReactionEvent with .reacts_to and .key
fields. UnknownEvent handler never fired for reactions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:24:47 +02:00
Christian Gick
89aa46aeb2 chore: Trigger rebuild 2026-03-18 18:19:22 +02:00
Christian Gick
d985f9a593 fix: convert markdown to HTML in approval messages
Matrix needs formatted_body as HTML, not raw markdown. Added _md_to_html
for bold/italic/code conversion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:19:00 +02:00
Christian Gick
95d5aa72f2 chore: Trigger rebuild 2026-03-18 17:41:30 +02:00
Christian Gick
bd8d96335e feat: add pipeline engine with approval flow and file triggers
Sequential step executor (script, claude_prompt, approval, api_call,
template, skyvern placeholder), reaction-based approvals, file upload
trigger matching, portal API state sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 17:06:07 +02:00
Christian Gick
f4feb3bfe1 chore: Trigger rebuild 2026-03-17 18:33:12 +02:00
Christian Gick
ef960844e5 chore: Trigger rebuild 2026-03-16 14:37:01 +02:00
Christian Gick
c9b88a155b feat(MAT-174): Fast pending check loop — Run Now triggers within 15s
Separate 15s poll for manual triggers (lastStatus=pending) from the
5-minute full job sync. Run Now button now fires within seconds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:36:38 +02:00
Christian Gick
3928e85279 chore: Trigger rebuild 2026-03-16 14:18:09 +02:00
Christian Gick
bd65b12e5d fix(MAT-174): Stricter LLM filter prompt — exclude when in doubt
Require ALL criteria to clearly match. Exclude general articles,
category pages, unconfirmed locations. When in doubt, exclude.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:17:49 +02:00
Christian Gick
6937b91fe3 chore: Trigger rebuild 2026-03-16 14:17:10 +02:00
Christian Gick
3d5351a24a fix(MAT-174): Fix manage link — use markdown link to avoid italic underscore in URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:16:49 +02:00
Christian Gick
441def5fa3 chore: Trigger rebuild 2026-03-16 14:08:07 +02:00
Christian Gick
9ec45339e9 fix(MAT-174): Robust LLM filter JSON extraction with regex
LLM sometimes returns extra text around the JSON array. Use regex to
extract the array pattern instead of parsing the full response.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:07:47 +02:00
Christian Gick
ec46c37bc5 chore: Trigger rebuild 2026-03-16 10:16:07 +02:00
Christian Gick
19b72dfe07 feat(MAT-174): LLM-based result filtering for cron search jobs
Brave Search results are passed through LiteLLM (claude-haiku) when
job config includes a `criteria` field. LLM returns indices of matching
results, filtering out noise before posting to Matrix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 10:14:01 +02:00
Christian Gick
846634738b chore: Trigger rebuild 2026-03-16 09:42:42 +02:00
Christian Gick
193c3ad329 fix(MAT-174): Python 3.11 backslash-in-fstring compat
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:42:24 +02:00
Christian Gick
5e2a7715a1 chore: Trigger rebuild 2026-03-16 09:34:49 +02:00
Christian Gick
4d8ea44b3d feat(MAT-174): Add cron job scheduler and executors
Cron package that syncs jobs from matrixhost portal API, schedules execution
with timezone-aware timing, and posts results to Matrix rooms. Includes
Brave Search, reminder, and browser scrape (placeholder) executors with
formatter. 31 pytest tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:31:19 +02:00
Christian Gick
21b8a4efb1 fix(MAT-166): robust option matching + language-aware UI for article summary
Replace brittle exact-string matching with keyword/substring classifier
that handles edge cases (punctuation, partial matches, German variants).
Detect article language and present all prompts in the users language.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:41:54 +02:00
Christian Gick
62cc2a92fe fix: add German keywords for audio/text summary options (MAT-166)
'Audiozusammenfassung' and 'Textzusammenfassung' now correctly trigger
the audio/text summary flows instead of falling through to regular LLM
which says it can't create audio files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:29:06 +02:00
Christian Gick
cdd876fe24 fix: retry video frame capture after 2s on E2EE decryption failure
When text bot captures a frame during active call and gets 8x8 garbage
(E2EE not yet decrypted), retry once after 2s to allow key propagation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:20:21 +02:00
Christian Gick
1a0a2ec305 fix: E2EE key re-fetch now triggers on DEC_FAILED before cooldown
The re-fetch check was placed after the 5s cooldown return, so it never
executed. Now it triggers after 3+ DEC_FAILED regardless of cooldown.
Also relaxed stale key age filter from 60s to 300s to handle key
rotation during ongoing calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:51:10 +02:00
Christian Gick
488e50e73c fix: handle Element Call same-index key rotation on screen share
Element Call rotates E2EE keys by re-sending index 0 with a new value
when screen share starts. The LiveKit frame cryptor caches derived AES
keys per index, so overwriting index 0 does not force re-derivation.

Fix: detect when index 0 value changes and map to incrementing internal
index so the frame cryptor gets a fresh key slot. Sets all accumulated
keys on late arrival so cryptor can try both during transition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:43:56 +02:00
Christian Gick
3706f568b6 fix: skip stale E2EE keys and re-fetch on persistent DEC_FAILED
- Timeline key fetch now filters by sent_ts (max 60s age) to avoid
  using keys from a previous call session
- After 3+ consecutive DEC_FAILED events, automatically re-fetches
  key from timeline in case rotation happened
- Tracks DEC_FAILED count per participant, resets on OK

This should fix the issue where the bot picks up stale encryption keys
from previous calls and can't decrypt the current caller's audio.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:38:10 +02:00
Christian Gick
a155f39ede feat: instant "Einen Moment" filler when look_at_screen is invoked
Plays immediate spoken feedback so the user knows the bot is processing
their screen share / camera before the vision API responds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:29:21 +02:00
Christian Gick
5521819358 fix: add missing time import in voice.py E2EE handler
The on_e2ee_state callback crashed with NameError on time.monotonic()
when video tracks (screen share) arrived, preventing E2EE key re-derivation
and causing the bot to miss screen-share related questions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:22:04 +02:00
Christian Gick
f73de35fd4 feat: scanned PDF fallback via vision for both plain and E2EE rooms (MAT-156)
Render scanned/image-based PDF pages to PNG at 200 DPI and send to AI
model as image content when text extraction returns empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:35:47 +02:00
Christian Gick
0c7070ebc4 fix(e2ee): remove diagnostic logging, video E2EE confirmed working (MAT-144)
Root cause: aggressive video re-keying (set_key at 0.3/0.8/2/5s intervals)
briefly cleared encryption_key between SetKey and HKDF callback, causing
DEC_FAILED oscillation. Single set_key per track subscription is sufficient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:16:37 +02:00
Christian Gick
4ae65524ac fix(e2ee): revert to PR #904 branch, add MAT-144 diagnostics
PR #921 requires custom WebRTC build not yet available.
Added diagnostic logging: encryption_type per track, frame_cryptors count,
and DEC_FAILED re-keying cooldown (5s) to reduce log spam.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 10:12:51 +02:00
Christian Gick
f85562ed28 fix(e2ee): switch to PR #921 Rust FFI branch for native HKDF (MAT-144)
PR #904 callback-based HKDF hack only fired for the first frame cryptor
(audio), leaving video frame cryptors with PBKDF2 - DEC_FAILED oscillation.
PR #921 integrates HKDF natively at the WebRTC C++ level, applying uniformly
to all frame cryptors (audio + video).

Also removes aggressive video re-keying workaround and adds 5s cooldown
to DEC_FAILED re-keying handler to prevent tight loops.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 09:52:32 +02:00
Christian Gick
4fc268cdd7 chore: Trigger rebuild 2026-03-10 09:38:37 +02:00
Christian Gick
1118ab5060 fix(e2ee): aggressive video re-keying after track subscription (MAT-144)
Video frame cryptors may not be fully initialized when set_key() is
first called during on_track_subscribed. Audio works immediately but
video oscillates OK↔DEC_FAILED with the same key.

Add staggered re-keying at 0.3s, 0.8s, 2s, 5s after video track
subscription to ensure the key is applied after the frame cryptor
is fully ready.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 09:38:17 +02:00
Christian Gick
7e59593c3e chore: Trigger rebuild 2026-03-10 08:34:46 +02:00
Christian Gick
61531d9913 fix(voice): disable activity video animation — causing lag (MAT-149)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:34:09 +02:00