feat: add bd activity command for real-time state feed (bd-xo1o.3)
Implements activity feed for watching molecule/issue state changes: - bd activity: show last 100 events - bd activity --follow: real-time streaming - bd activity --mol <id>: filter by molecule prefix - bd activity --since 5m: time-based filtering - bd activity --type update: filter by event type Adds new mutation event types for richer activity display: - MutationBonded: molecule bonded to parent - MutationSquashed: wisp squashed to digest - MutationBurned: wisp discarded - MutationStatus: status transitions with old/new state Event symbols: + created, → in_progress, ✓ completed, ⊘ deleted, ◉ squashed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,13 +69,23 @@ const (
|
||||
MutationUpdate = "update"
|
||||
MutationDelete = "delete"
|
||||
MutationComment = "comment"
|
||||
// Molecule-specific event types for activity feed
|
||||
MutationBonded = "bonded" // Molecule bonded to parent (dynamic bond)
|
||||
MutationSquashed = "squashed" // Wisp squashed to digest
|
||||
MutationBurned = "burned" // Wisp discarded without digest
|
||||
MutationStatus = "status" // Status change (in_progress, completed, failed)
|
||||
)
|
||||
|
||||
// MutationEvent represents a database mutation for event-driven sync
|
||||
type MutationEvent struct {
|
||||
Type string // One of: MutationCreate, MutationUpdate, MutationDelete, MutationComment
|
||||
Type string // One of the Mutation* constants
|
||||
IssueID string // e.g., "bd-42"
|
||||
Timestamp time.Time
|
||||
// Optional metadata for richer events (used by status, bonded, etc.)
|
||||
OldStatus string `json:"old_status,omitempty"` // Previous status (for status events)
|
||||
NewStatus string `json:"new_status,omitempty"` // New status (for status events)
|
||||
ParentID string `json:"parent_id,omitempty"` // Parent molecule (for bonded events)
|
||||
StepCount int `json:"step_count,omitempty"` // Number of steps (for bonded events)
|
||||
}
|
||||
|
||||
// NewServer creates a new RPC server
|
||||
|
||||
Reference in New Issue
Block a user