feat(mail): add queue management commands

Add beads-native queue management commands to gt mail:
- gt mail queue create <name> --claimers <pattern>
- gt mail queue show <name>
- gt mail queue list
- gt mail queue delete <name>

Also enhanced QueueFields struct with CreatedBy and CreatedAt fields
to support queue metadata tracking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/dennis
2026-01-14 21:29:37 -08:00
committed by Steve Yegge
parent 7bbc09230e
commit e30e46a87a
2 changed files with 316 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ type QueueFields struct {
ProcessingCount int // Number of items currently being processed
CompletedCount int // Number of items completed
FailedCount int // Number of items that failed
CreatedBy string // Who created this queue
CreatedAt string // ISO 8601 timestamp of creation
}
// Queue status constants
@@ -78,6 +80,13 @@ func FormatQueueDescription(title string, fields *QueueFields) string {
lines = append(lines, fmt.Sprintf("completed_count: %d", fields.CompletedCount))
lines = append(lines, fmt.Sprintf("failed_count: %d", fields.FailedCount))
if fields.CreatedBy != "" {
lines = append(lines, fmt.Sprintf("created_by: %s", fields.CreatedBy))
}
if fields.CreatedAt != "" {
lines = append(lines, fmt.Sprintf("created_at: %s", fields.CreatedAt))
}
return strings.Join(lines, "\n")
}
@@ -137,6 +146,10 @@ func ParseQueueFields(description string) *QueueFields {
if v, err := strconv.Atoi(value); err == nil {
fields.FailedCount = v
}
case "created_by":
fields.CreatedBy = value
case "created_at":
fields.CreatedAt = value
}
}