feat(rpc): add GetWorkerStatus RPC endpoint (bd-l13p)
New RPC endpoint to get all workers and their current molecule/step in one call. Returns: assignee, moleculeID, moleculeTitle, currentStep, totalSteps, stepTitle, lastActivity, status. Enables activity feed TUI to show worker state without multiple round trips. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,7 @@ const (
|
||||
OpGetMutations = "get_mutations"
|
||||
OpShutdown = "shutdown"
|
||||
OpDelete = "delete"
|
||||
OpGetWorkerStatus = "get_worker_status"
|
||||
|
||||
// Gate operations (bd-likt)
|
||||
OpGateCreate = "gate_create"
|
||||
@@ -464,3 +465,27 @@ type GateWaitArgs struct {
|
||||
type GateWaitResult struct {
|
||||
AddedCount int `json:"added_count"` // Number of new waiters added
|
||||
}
|
||||
|
||||
// GetWorkerStatusArgs represents arguments for retrieving worker status
|
||||
type GetWorkerStatusArgs struct {
|
||||
// Assignee filters to a specific worker (optional, empty = all workers)
|
||||
Assignee string `json:"assignee,omitempty"`
|
||||
}
|
||||
|
||||
// WorkerStatus represents the status of a single worker and their current work
|
||||
type WorkerStatus struct {
|
||||
Assignee string `json:"assignee"` // Worker identifier
|
||||
MoleculeID string `json:"molecule_id,omitempty"` // Parent molecule/epic ID (if working on a step)
|
||||
MoleculeTitle string `json:"molecule_title,omitempty"` // Parent molecule/epic title
|
||||
CurrentStep int `json:"current_step,omitempty"` // Current step number (1-indexed)
|
||||
TotalSteps int `json:"total_steps,omitempty"` // Total number of steps in molecule
|
||||
StepID string `json:"step_id,omitempty"` // Current step issue ID
|
||||
StepTitle string `json:"step_title,omitempty"` // Current step issue title
|
||||
LastActivity string `json:"last_activity"` // ISO 8601 timestamp of last update
|
||||
Status string `json:"status"` // Current work status (in_progress, blocked, etc.)
|
||||
}
|
||||
|
||||
// GetWorkerStatusResponse is the response for get_worker_status operation
|
||||
type GetWorkerStatusResponse struct {
|
||||
Workers []WorkerStatus `json:"workers"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user