feat: implementar tipo Robot como runtime ligero para bots command-only
Introduce la separacion Robot vs Agent en el sistema:
- agents/types.go: interfaz Runner comun (Run, Stop, Done, RegisterCommand)
que tanto Agent como Robot satisfacen
- agents/robot.go: struct Robot — runtime minimo que solo conecta a Matrix
y despacha comandos. Sin LLM, reglas, memoria, knowledge, skills ni tools.
Mensajes normales se ignoran silenciosamente
- internal/config/schema.go: campo Type en AgentMeta ("agent"|"robot")
- cmd/launcher: usa Runner interface para manejar ambos tipos uniformemente.
Si cfg.Agent.Type == "robot" crea NewRobot en vez de New (tanto en
arranque como en hot-reload)
- agents/_template_robot/config.yaml: plantilla minima (~55 lineas) para
robots command-only
El Robot soporta built-in commands reducidos (help, ping, status, info,
version) y comandos custom via RegisterCommand. No incluye tools, tool,
clear ni prompts ya que no tiene LLM ni memoria.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# ============================================
|
||||
# ROBOT PLANTILLA (command-only, sin LLM)
|
||||
# ============================================
|
||||
# Referencia canonica para robots. NO se lanza (template: true).
|
||||
# Un robot solo responde a comandos (!xxx). Mensajes normales se ignoran.
|
||||
# Copiar y adaptar para nuevos robots.
|
||||
|
||||
agent:
|
||||
id: "_template_robot"
|
||||
name: "Template Robot"
|
||||
version: "0.0.0"
|
||||
type: robot # robot = command-only, sin LLM ni reglas
|
||||
enabled: true
|
||||
template: true # el launcher ignora este robot
|
||||
description: "Robot plantilla. No se lanza."
|
||||
tags: [template, robot]
|
||||
|
||||
# ============================================
|
||||
# PERSONALIDAD (minima para robots)
|
||||
# ============================================
|
||||
personality:
|
||||
prefix: ""
|
||||
language: es
|
||||
|
||||
# ============================================
|
||||
# MATRIX
|
||||
# ============================================
|
||||
matrix:
|
||||
homeserver: "https://matrix.example.com"
|
||||
user_id: "@robot:matrix.example.com"
|
||||
access_token_env: MATRIX_TOKEN_ROBOT
|
||||
device_id: "DEVICEID"
|
||||
|
||||
encryption:
|
||||
enabled: false
|
||||
store_path: "./agents/_template_robot/data/crypto/"
|
||||
pickle_key_env: PICKLE_KEY_ROBOT
|
||||
trust_mode: tofu
|
||||
recovery_key_env: ""
|
||||
|
||||
rooms:
|
||||
listen: []
|
||||
respond: []
|
||||
admin: []
|
||||
|
||||
filters:
|
||||
command_prefix: "!"
|
||||
mention_respond: false # robots no responden a menciones (no hay LLM)
|
||||
dm_respond: false # robots no responden a DMs (no hay LLM)
|
||||
ignore_bots: true
|
||||
ignore_users: []
|
||||
unauthorized_response: silent
|
||||
min_power_level: 0
|
||||
|
||||
threads:
|
||||
enabled: true
|
||||
auto_thread: false
|
||||
Reference in New Issue
Block a user