Apple
cad3663508
feat(matrix-bridge-dagi): add egress, audit integration, fix router endpoint (PR-M1.4)
Closes the full Matrix ↔ DAGI loop:
Egress:
- invoke Router POST /v1/agents/{agent_id}/infer (field: prompt, response: response)
- send_text() reply to Matrix room with idempotent txn_id = make_txn_id(room_id, event_id)
- empty reply → skip send (no spam)
- reply truncated to 4000 chars if needed
Audit (via sofiia-console POST /api/audit/internal):
- matrix.message.received (on ingress)
- matrix.agent.replied (on successful reply)
- matrix.error (on router/send failure, with error_code)
- fire-and-forget: audit failures never crash the loop
Router URL fix:
- DAGI_GATEWAY_URL now points to dagi-router-node1:8000 (not gateway:9300)
- Session ID: stable per room — matrix:{room_localpart} (memory context)
9 tests: invoke endpoint, fallback fields, audit write, full cycle,
dedupe, empty reply skip, metric callbacks
Made-with: Cursor
2026-03-03 08:06:49 -08:00
..
2026-02-20 17:57:40 +01:00
2026-02-09 08:46:46 -08:00
2026-03-03 07:14:14 -08:00
2026-02-21 17:02:55 +01:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-01-28 06:40:34 -08:00
2026-01-28 06:40:34 -08:00
2026-03-03 07:14:14 -08:00
2026-01-17 08:16:37 -08:00
2026-01-17 08:16:37 -08:00
2026-02-19 00:14:12 -08:00
2026-02-19 00:14:12 -08:00
2026-02-19 00:14:18 -08:00
2026-02-09 08:46:46 -08:00
2026-02-09 08:46:46 -08:00
2026-02-27 03:09:12 -08:00
2026-02-09 08:46:46 -08:00
2026-01-17 08:16:37 -08:00
2026-02-09 08:46:46 -08:00
2026-01-28 06:40:34 -08:00
2026-02-09 08:46:46 -08:00
2026-02-09 08:46:46 -08:00
2026-02-09 11:46:15 -08:00
2026-03-03 08:06:49 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:15:39 -08:00
2026-03-03 07:14:14 -08:00
2026-02-19 00:14:12 -08:00
2026-02-19 00:14:12 -08:00
2026-02-19 00:14:12 -08:00
2026-02-19 00:14:12 -08:00
2026-02-09 08:46:46 -08:00
2026-02-20 17:57:40 +01:00
2026-01-28 06:40:34 -08:00
2026-01-28 06:40:34 -08:00
2026-02-09 08:46:46 -08:00
2026-01-28 06:40:34 -08:00
2026-03-03 07:14:14 -08:00
2026-02-09 08:46:46 -08:00
2026-02-19 00:14:18 -08:00
2026-03-03 08:03:49 -08:00
2026-03-03 07:14:14 -08:00
2026-03-03 07:13:29 -08:00
2025-11-17 05:24:36 -08:00