feat: add asistente-2 agent with tool-use and E2EE verification
Nuevo agente asistente-2 con herramienta current_time habilitada para demostrar el flujo completo de tool-use (LLM → tool call → resultado → respuesta). Incluye: - agents/asistente2/: reglas puras, config con tool_use.enabled, system prompt - tools/time.go: herramienta current_time (siempre disponible para todos los agentes) - cmd/verify/: comando para subir cross-signing keys y eliminar el warning "Encrypted by a device not verified by its owner" - Registro en runtime.go (current_time) y launcher/main.go (rulesRegistry) El cmd/verify usa mautrix GenerateAndUploadCrossSigningKeysWithPassword para configurar cross-signing via UIA con la password del bot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// Package asistente2 defines the pure rules for the asistente-2 bot.
|
||||
// This agent uses tool_use (current_time) to demonstrate the tool-use loop.
|
||||
package asistente2
|
||||
|
||||
import (
|
||||
"github.com/enmanuel/agents/pkg/decision"
|
||||
)
|
||||
|
||||
// Rules returns the decision rules for the asistente-2 bot.
|
||||
func Rules() []decision.Rule {
|
||||
return []decision.Rule{
|
||||
// !help — explicit help command
|
||||
{
|
||||
Name: "help",
|
||||
Match: decision.MatchCommand("help"),
|
||||
Actions: []decision.Action{{
|
||||
Kind: decision.ActionKindReply,
|
||||
Reply: &decision.ReplyAction{
|
||||
Content: "Soy asistente-2. Puedo responder preguntas y además consultar la hora actual.\n" +
|
||||
"- Pregúntame cualquier cosa\n" +
|
||||
"- Puedo decirte la fecha y hora actual\n\n" +
|
||||
"Escríbeme directamente lo que necesitas.",
|
||||
},
|
||||
}},
|
||||
},
|
||||
|
||||
// Any DM or mention → LLM (with tool-use enabled)
|
||||
{
|
||||
Name: "llm-all",
|
||||
Match: func(ctx decision.MessageContext) bool {
|
||||
return ctx.IsDirectMsg || ctx.IsMention
|
||||
},
|
||||
Actions: []decision.Action{{
|
||||
Kind: decision.ActionKindLLM,
|
||||
LLM: &decision.LLMAction{},
|
||||
}},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user