feat: respuestas como reply de Matrix + presencia online/offline

Añade soporte para que las respuestas de los bots sean replies nativos
de Matrix (m.in_reply_to) en lugar de mensajes sueltos. Los clientes
Matrix mostrarán el mensaje original citado.

Cambios:
- EventID en MessageContext para capturar el ID del evento entrante
- InReplyTo en ReplyAction para indicar a qué evento responder
- SendReplyMarkdown en el cliente Matrix (shell/matrix/client.go)
- Runner usa SendReplyMarkdown cuando InReplyTo está presente
- runtime.go pasa InReplyTo en todas las respuestas LLM y comandos
- SetPresence online al arrancar, offline al apagar (graceful)

No se tocan: herramientas, TUI, configuración de agentes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 15:46:07 +00:00
parent 29decb3321
commit 76ff9394d0
5 changed files with 51 additions and 10 deletions
+5 -3
View File
@@ -9,6 +9,7 @@ type MessageContext struct {
SenderID string
SenderName string
RoomID string
EventID string // Matrix event ID of the incoming message
Content string
Command string // parsed command name, e.g. "deploy"
Args []string // parsed arguments
@@ -47,9 +48,10 @@ type Action struct {
}
type ReplyAction struct {
Content string
ThreadID string // empty = new thread
Reaction string // optional Matrix reaction
Content string
ThreadID string // empty = new thread
InReplyTo string // Matrix event ID to reply to (m.in_reply_to)
Reaction string // optional Matrix reaction
}
type LLMAction struct {