package dto

import (
	"github.com/tidbcloud/AgentTeam/desktop/internal/agentview"
)

type RuntimeBundleSummary struct {
	ServerTotal       int `json:"serverTotal"`
	ServerEnabled     int `json:"serverEnabled"`
	RuntimeTotal      int `json:"runtimeTotal"`
	RuntimeInstalled  int `json:"runtimeInstalled"`
	RuntimeReady      int `json:"runtimeReady"`
	RuntimeMissing    int `json:"runtimeMissing"`
	AgentTotal        int `json:"agentTotal"`
	AgentRunning      int `json:"agentRunning"`
	AgentWorking      int `json:"agentWorking"`
	Server12hReceived int `json:"server12hReceived"`
	Server12hSent     int `json:"server12hSent"`
}

type RuntimeBundleItem struct {
	Runtime       RuntimeResponse        `json:"runtime"`
	Detected      *DetectRuntimeResponse `json:"detected,omitempty"`
	Installed     bool                   `json:"installed"`
	Capable       bool                   `json:"capable"`
	Configured    bool                   `json:"configured"`
	Ready         bool                   `json:"ready"`
	Status        string                 `json:"status"`
	ReasonCode    string                 `json:"reasonCode,omitempty"`
	Message       string                 `json:"message,omitempty"`
	PrimaryAction string                 `json:"primaryAction,omitempty"`
	AgentCount    int                    `json:"agentCount"`
	Attention     string                 `json:"attention,omitempty"`
}

type RuntimeAgentItem struct {
	Agent          agentview.Snapshot `json:"agent"`
	Active         bool               `json:"active"`
	Working        bool               `json:"working"`
	DeliveryStatus string             `json:"deliveryStatus,omitempty"`
	Activity       string             `json:"activity,omitempty"`
	ActivityInfo   string             `json:"activityDetail,omitempty"`
	ServerID       string             `json:"serverId,omitempty"`
	MessageCount   int                `json:"messageCount,omitempty"`
	WorkDir        string             `json:"workDir,omitempty"`
	Attention      string             `json:"attention,omitempty"`
}
