Files
agents_and_robots/dev-scripts/logs.sh
T
egutierrez bd8e1432e5 feat: add assistant bot with LLM integration and configuration
- Implemented the assistant bot with basic command handling and LLM routing.
- Created configuration file for the assistant bot with personality, behavior, and LLM settings.
- Added system prompt for the assistant bot to define its capabilities and limitations.
- Developed registration script for creating Matrix bot users via Synapse admin API.
- Introduced common development scripts for agent management (start, stop, list, logs).
- Scaffolded new agent creation script to streamline the addition of new agents.
- Implemented agent removal script to disable agents without deleting data.
2026-03-03 23:57:13 +00:00

32 lines
915 B
Bash
Executable File

#!/usr/bin/env bash
# logs.sh — sigue los logs de uno o todos los agentes
#
# Uso:
# ./dev-scripts/logs.sh # tail -f de todos los logs activos
# ./dev-scripts/logs.sh assistant-bot # solo ese agente
# ./dev-scripts/logs.sh assistant-bot 100 # últimas 100 líneas
source "$(dirname "$0")/_common.sh"
TARGET="${1:-}"
LINES="${2:-50}"
log_files=()
while IFS='|' read -r id _version _enabled _desc _cfg; do
[[ -n "$TARGET" && "$id" != "$TARGET" ]] && continue
local_log="$(log_file "$id")"
[[ -f "$local_log" ]] && log_files+=("$local_log")
done < <(list_agents_raw)
if [[ "${#log_files[@]}" -eq 0 ]]; then
[[ -n "$TARGET" ]] && fail "No hay logs para '$TARGET' (¿ha sido iniciado alguna vez?)"
fail "No hay logs todavía — inicia algún agente primero"
fi
info "Siguiendo logs: ${log_files[*]}"
dim " Ctrl+C para salir"
echo ""
tail -n "$LINES" -f "${log_files[@]}"