🛸 Fase 1.5 completa: AtomicDrones con visibilidad en Bitácora Web

Bugs corregidos (12): B1-B12 — crashes, tipos, métodos, logger
Ejecutor reescrito: evento web → heartbeat 30s → cierre automático
copiloto.rb y novato.rb deprecados → redirigen a dron lanzar
Plan P009 v3.2 — Fase 1.5 100%% completa
This commit is contained in:
Ricardo Monla
2026-04-09 10:12:04 -03:00
parent fb8c8eefe5
commit 6d7394b22e
9 changed files with 415 additions and 147 deletions
+24 -18
View File
@@ -35,25 +35,31 @@ module ADN
end
def ejecutar
if @args.empty? || @args.first == 'help' || @args.first == '--help'
mostrar_ayuda
return
end
puts "\n#{Color::YELLOW}⚠️ DEPRECADO: 'copiloto' ha sido reemplazado por 'dron lanzar'#{Color::RESET}"
puts ""
puts " El sistema AtomicDrones (Fase 1.5) reemplaza al copiloto con:"
puts " - Heartbeat visible en Bitácora Web cada 30s"
puts " - Timeout real implementado"
puts " - Registro automático en tablas internas + events"
puts ""
puts " #{Color::CYAN}Equivalencias:#{Color::RESET}"
puts " #{Color::DIM}copiloto lanzar --evento ID -- <cmd>#{Color::RESET}"
puts " #{Color::GREEN}→ dron lanzar --evento ID --nota \"...\" -- <cmd>#{Color::RESET}"
puts ""
puts " #{Color::DIM}copiloto vigilar --evento ID --pid PID#{Color::RESET}"
puts " #{Color::GREEN}→ dron flota (para ver drones activos)#{Color::RESET}"
puts ""
puts " #{Color::DIM}copiloto estado#{Color::RESET}"
puts " #{Color::GREEN}→ dron flota#{Color::RESET}"
puts ""
accion = @args.shift
case accion
when 'lanzar'
cmd_lanzar(@args)
when 'vigilar'
cmd_vigilar(@args)
when 'estado'
cmd_estado
when 'limpiar'
cmd_limpiar
else
puts "#{Color::RED}✗ Acción desconocida: #{accion}#{Color::RESET}"
mostrar_ayuda
exit 1
# Si hay argumentos, intentar redirigir automáticamente
if @args.first == 'lanzar'
@args.shift
puts "#{Color::YELLOW}Redirigiendo a 'dron lanzar'...#{Color::RESET}\n\n"
require_relative 'dron'
dron = ADN::SubcomandoDron.new(['lanzar'] + @args)
dron.ejecutar
end
end