Files
agents_and_robots/pkg/tui/messages.go
T

38 lines
990 B
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.
type MsgAgentsLoaded struct{ Agents []AgentView }
// MsgActionDone reports the result of an agent action (start/stop/kill/restart).
type MsgActionDone struct {
AgentID string
Action string
Err error
}
// MsgLogsLoaded carries log lines for the selected agent.
type MsgLogsLoaded struct{ Lines []string }
// MsgServerActionDone reports the result of a server-wide bulk action.
type MsgServerActionDone struct {
Action string
Total int
Failed int
Errors []string
}
// 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
}
// MsgTick triggers a periodic refresh.
type MsgTick struct{}