package dto

import "time"

type WorkflowPlanAgentEditTarget struct {
	Kind     string `json:"kind"`
	ID       string `json:"id"`
	NodeType string `json:"nodeType,omitempty"`
}

type WorkflowPlanAgentEditRequestTarget struct {
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

type WorkflowPlanAgentEditRequest struct {
	ResponderAgentID  string                             `json:"responderAgentId"`
	ClientMessageID   string                             `json:"clientMessageId"`
	BaseDraftRevision int64                              `json:"baseDraftRevision"`
	Instruction       string                             `json:"instruction"`
	Target            WorkflowPlanAgentEditRequestTarget `json:"target"`
}

type WorkflowPlanAgentEditRequestResponse struct {
	Message           AppMessage                  `json:"message"`
	Target            WorkflowPlanAgentEditTarget `json:"target"`
	ResponderAgent    WorkflowPlanAgentEditAgent  `json:"responderAgent"`
	BaseDraftRevision int64                       `json:"baseDraftRevision"`
	Wake              WorkflowPlanAgentEditWake   `json:"wake"`
}

type WorkflowPlanAgentEditMessagesResponse struct {
	Messages      []AppMessage                 `json:"messages"`
	Agents        []WorkflowPlanAgentEditAgent `json:"agents,omitempty"`
	HasMore       bool                         `json:"hasMore"`
	NextBeforeSeq int64                        `json:"nextBeforeSeq,omitempty"`
	Wake          *WorkflowPlanAgentEditWake   `json:"wake,omitempty"`
}

type WorkflowPlanAgentEditWakeResponse struct {
	Wake *WorkflowPlanAgentEditWake `json:"wake,omitempty"`
}

type WorkflowPlanAgentEditWake struct {
	MessageID         string    `json:"messageId"`
	AgentID           string    `json:"agentId"`
	BaseDraftRevision int64     `json:"baseDraftRevision"`
	Status            string    `json:"status"`
	Detail            string    `json:"detail,omitempty"`
	Timestamp         time.Time `json:"timestamp"`
	Active            bool      `json:"active"`
}

type WorkflowPlanAgentEditAgent struct {
	ID           string   `json:"id"`
	Kind         string   `json:"kind"`
	Label        string   `json:"label"`
	Token        string   `json:"token"`
	Detail       string   `json:"detail,omitempty"`
	AvatarURL    string   `json:"avatarUrl,omitempty"`
	SearchValues []string `json:"searchValues,omitempty"`
}

type WorkflowPlanAgentEditAgentsResponse struct {
	Agents     []WorkflowPlanAgentEditAgent `json:"agents"`
	NextCursor string                       `json:"nextCursor,omitempty"`
}
