fix: spawn and swarm bug fixes from MVP testing
- spawn.go: Parse bd show --json as array, fix issue_type json tag - session/manager.go: Check filesystem directly in hasPolecat() to handle newly-created polecats - swarm/manager.go: Use bd show to get children via dependents field instead of non-existent bd list --parent flag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ type BeadsIssue struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Priority int `json:"priority"`
|
||||
Type string `json:"type"`
|
||||
Type string `json:"issue_type"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
@@ -256,12 +256,16 @@ func fetchBeadsIssue(rigPath, issueID string) (*BeadsIssue, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var issue BeadsIssue
|
||||
if err := json.Unmarshal(stdout.Bytes(), &issue); err != nil {
|
||||
// bd show --json returns an array, take the first element
|
||||
var issues []BeadsIssue
|
||||
if err := json.Unmarshal(stdout.Bytes(), &issues); err != nil {
|
||||
return nil, fmt.Errorf("parsing issue: %w", err)
|
||||
}
|
||||
if len(issues) == 0 {
|
||||
return nil, fmt.Errorf("issue not found: %s", issueID)
|
||||
}
|
||||
|
||||
return &issue, nil
|
||||
return &issues[0], nil
|
||||
}
|
||||
|
||||
// buildSpawnContext creates the initial context message for the polecat.
|
||||
|
||||
Reference in New Issue
Block a user