feat: implementar comandos custom !echo y !dice para test-bot

- !echo <texto>: repite el texto recibido (util para assertions exactas)
- !dice / !dado: lanza un dado aleatorio (1-6)
- Registro en cmd/launcher/main.go via testbot.Commands()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 20:25:41 +00:00
parent 899108e3f8
commit 235c5ff827
2 changed files with 55 additions and 1 deletions
+8 -1
View File
@@ -33,7 +33,7 @@ import (
_ "github.com/enmanuel/agents/agents/assistant-bot"
_ "github.com/enmanuel/agents/agents/asistente-2"
_ "github.com/enmanuel/agents/agents/meteorologo"
_ "github.com/enmanuel/agents/agents/test-bot"
testbot "github.com/enmanuel/agents/agents/test-bot"
)
func main() {
@@ -181,6 +181,13 @@ func main() {
agentCleanup()
continue
}
// Register agent-specific commands for robots
if cfg.Agent.ID == "test-bot" {
for _, cmd := range testbot.Commands() {
robot.RegisterCommand(cmd.Spec, cmd.Handler)
}
}
runner = robot
agentLogger.Info("created robot", "id", cfg.Agent.ID)
} else {