Files
agents_and_robots/pkg/tui/messages.go
T
egutierrez 1af0457c1f feat: update dashboard and process manager for unified launcher
Actualiza el dashboard TUI y el process manager para el modelo de launcher
unificado donde todos los agentes corren en un solo proceso.

Dashboard (pkg/tui):
- model.go: campos de estado del launcher (PID, uptime, memory, CPU, log size)
- model.go: ServerMenuOptions(running) contextual, AgentActionOptions(enabled)
- messages.go: MsgAgentsLoaded incluye estado del launcher, MsgServerActionDone/MsgRebuildDone simplificados
- update.go: intents nuevos (Enable/Disable agent, Start/Stop/Restart/Kill launcher)
- view.go: vista de servidor muestra stats del launcher, agentes muestran enabled/disabled

Shell adapter (shell/tui):
- adapter.go: reescrito para usar métodos unificados (StartUnified, StopUnified, ToggleEnabled, StatusAllUnified, UnifiedStats, UnifiedLogTail)

Process manager (shell/process):
- manager.go: métodos StartUnified, StopUnified, KillUnified, IsUnifiedRunning, UnifiedPID, UnifiedStats, UnifiedLogTail, StatusAllUnified, ToggleEnabled

Los agentes ya no se inician/detienen individualmente desde el dashboard.
Se habilitan/deshabilitan en config y se reinicia el launcher para aplicar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 09:05:57 +00:00

43 lines
1.1 KiB
Go

package tui
// Messages are pure data returned by the shell adapter.
// They carry the result of an I/O operation back into the pure Update.
// MsgAgentsLoaded carries refreshed agent data + launcher status.
type MsgAgentsLoaded struct {
Agents []AgentView
LauncherRunning bool
LauncherPID int
LauncherUptime string
LauncherMemory string
LauncherCPU string
LauncherLogSize string
}
// MsgActionDone reports the result of an action (start/stop/enable/disable).
type MsgActionDone struct {
AgentID string
Action string
Err error
}
// MsgLogsLoaded carries log lines for display.
type MsgLogsLoaded struct{ Lines []string }
// MsgServerActionDone reports the result of a launcher action.
type MsgServerActionDone struct {
Action string
Err error
}
// MsgRebuildDone reports the result of a rebuild & restart cycle.
type MsgRebuildDone struct {
BuildOK bool
BuildLog string // last lines of build output
Started bool // launcher started after build
Err error
}
// MsgTick triggers a periodic refresh.
type MsgTick struct{}