08dcb332b7
Renombrar directorios de agentes para que coincidan exactamente con el agent.id del config.yaml, eliminando la disonancia entre nombres: - agents/assistant/ → agents/assistant-bot/ (ID: assistant-bot) - agents/asistente2/ → agents/asistente-2/ (ID: asistente-2) Se actualizan los imports en cmd/launcher/main.go, los store_path de crypto, los paths de storage/logs/audit en ambos configs para que apunten a ./agents/<agent-id>/data/. También se corrige el memory.db que se creaba en directorios fantasma fuera del directorio real del agente. Se eliminan las referencias a devops-bot en el config de assistant-bot (peers, delegation). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
// Package assistant defines the pure rules for the assistant bot.
|
|
// Since this bot is primarily LLM-driven, most rules just route to the LLM.
|
|
package assistant
|
|
|
|
import (
|
|
"github.com/enmanuel/agents/pkg/decision"
|
|
)
|
|
|
|
// Rules returns the decision rules for the assistant 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 tu asistente. Escríbeme directamente lo que necesitas:\n" +
|
|
"- Preguntas, explicaciones, resúmenes\n" +
|
|
"- Ayuda con código\n" +
|
|
"- Redacción de textos",
|
|
},
|
|
}},
|
|
},
|
|
|
|
// Any DM or mention → LLM
|
|
// This is the catch-all: if the message is a DM or a mention, send to LLM.
|
|
{
|
|
Name: "llm-all",
|
|
Match: func(ctx decision.MessageContext) bool {
|
|
return ctx.IsDirectMsg || ctx.IsMention
|
|
},
|
|
Actions: []decision.Action{{
|
|
Kind: decision.ActionKindLLM,
|
|
LLM: &decision.LLMAction{},
|
|
}},
|
|
},
|
|
}
|
|
}
|