Documentation
¶
Index ¶
- Constants
- func BroadcastStatsUpdate()
- func BroadcastTaskBlocked(taskID, title string)
- func BroadcastTaskClaimed(taskID, title, worker string)
- func BroadcastTaskCompleted(taskID, title string)
- func BroadcastTaskFailed(taskID, title, errMsg string)
- func BroadcastTaskGuidance(taskID, message string)
- func BroadcastTaskPaused(taskID string)
- func BroadcastTaskResumed(taskID string)
- func BroadcastTaskStarted(taskID, title, worker string)
- func SetGlobal(s *Server)
- type Client
- type Config
- type EpicWithCount
- type Event
- type Graph
- type GraphEdge
- type GraphNode
- type Hub
- type Server
- type Stats
- type TaskEvent
- type TaskWithEpic
- type WorkerInfo
- type WorktreeFile
Constants ¶
const ( EventTaskClaimed = "task_claimed" EventTaskStarted = "task_started" EventTaskCompleted = "task_completed" EventTaskFailed = "task_failed" EventTaskBlocked = "task_blocked" EventTaskPaused = "task_paused" EventTaskResumed = "task_resumed" EventTaskGuidance = "task_guidance" EventWorkerStatus = "worker_status" EventStatsUpdate = "stats_update" )
Event types for WebSocket broadcasting
Variables ¶
This section is empty.
Functions ¶
func BroadcastStatsUpdate ¶
func BroadcastStatsUpdate()
BroadcastStatsUpdate triggers an immediate stats update
func BroadcastTaskBlocked ¶
func BroadcastTaskBlocked(taskID, title string)
BroadcastTaskBlocked broadcasts when a task is blocked
func BroadcastTaskClaimed ¶
func BroadcastTaskClaimed(taskID, title, worker string)
BroadcastTaskClaimed broadcasts when a worker claims a task
func BroadcastTaskCompleted ¶
func BroadcastTaskCompleted(taskID, title string)
BroadcastTaskCompleted broadcasts when a task finishes successfully
func BroadcastTaskFailed ¶
func BroadcastTaskFailed(taskID, title, errMsg string)
BroadcastTaskFailed broadcasts when a task fails
func BroadcastTaskGuidance ¶
func BroadcastTaskGuidance(taskID, message string)
BroadcastTaskGuidance broadcasts when guidance is added to a task
func BroadcastTaskPaused ¶
func BroadcastTaskPaused(taskID string)
BroadcastTaskPaused broadcasts when a task is paused
func BroadcastTaskResumed ¶
func BroadcastTaskResumed(taskID string)
BroadcastTaskResumed broadcasts when a task is resumed
func BroadcastTaskStarted ¶
func BroadcastTaskStarted(taskID, title, worker string)
BroadcastTaskStarted broadcasts when execution begins
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a WebSocket client
type Config ¶
type Config struct {
Addr string
DatabaseURL string
DB *sql.DB // Pass existing connection
Store *db.Store
}
Config holds server configuration
type EpicWithCount ¶
type EpicWithCount struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Status string `json:"status"`
TaskCount int `json:"task_count"`
Completed int `json:"completed"`
Ready int `json:"ready"`
Active int `json:"active"`
}
EpicWithCount represents an epic with task counts
type GraphNode ¶
type GraphNode struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
}
GraphNode represents a task in the dependency graph
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub manages WebSocket connections
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the dashboard HTTP server
type Stats ¶
type Stats struct {
Total int `json:"total"`
Ready int `json:"ready"`
Claimed int `json:"claimed"`
InProgress int `json:"in_progress"`
Paused int `json:"paused"`
Blocked int `json:"blocked"`
Completed int `json:"completed"`
Failed int `json:"failed"`
Progress int `json:"progress"` // Percentage
}
Stats represents overall project statistics
type TaskEvent ¶
type TaskEvent struct {
TaskID string `json:"task_id"`
Title string `json:"title"`
Status string `json:"status"`
Worker string `json:"worker,omitempty"`
Error string `json:"error,omitempty"`
EpicID string `json:"epic_id,omitempty"`
}
TaskEvent is broadcast when a task state changes
type TaskWithEpic ¶
type TaskWithEpic struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
EpicID string `json:"epic_id"`
EpicTitle string `json:"epic_title"`
ParentID string `json:"parent_id"`
SequenceNumber int `json:"sequence_number"`
Priority int `json:"priority"`
Status string `json:"status"`
Attempts int `json:"attempts"`
MaxAttempts int `json:"max_attempts"`
LastError string `json:"last_error"`
ClaimedBy string `json:"claimed_by"`
ClaimedAt int64 `json:"claimed_at"`
Operator string `json:"operator"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
TaskWithEpic represents a task with epic information