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>
This commit is contained in:
+19
-14
@@ -3,34 +3,39 @@ 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.
|
||||
type MsgAgentsLoaded struct{ Agents []AgentView }
|
||||
// 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 agent action (start/stop/kill/restart).
|
||||
// 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 the selected agent.
|
||||
// MsgLogsLoaded carries log lines for display.
|
||||
type MsgLogsLoaded struct{ Lines []string }
|
||||
|
||||
// MsgServerActionDone reports the result of a server-wide bulk action.
|
||||
// MsgServerActionDone reports the result of a launcher action.
|
||||
type MsgServerActionDone struct {
|
||||
Action string
|
||||
Total int
|
||||
Failed int
|
||||
Errors []string
|
||||
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
|
||||
Restarted int // agents restarted after build
|
||||
Failed int
|
||||
Errors []string
|
||||
BuildOK bool
|
||||
BuildLog string // last lines of build output
|
||||
Started bool // launcher started after build
|
||||
Err error
|
||||
}
|
||||
|
||||
// MsgTick triggers a periodic refresh.
|
||||
|
||||
Reference in New Issue
Block a user