fix(sling): auto-attach work molecule and handle dead polecats
Combines three related sling improvements: 1. Auto-attach mol-polecat-work (Issue #288) - Automatically attach work molecule when slinging to polecats - Ensures polecats have standard guidance molecule attached 2. Fix polecat hook with molecule (Issue #197) - Use beads.ResolveHookDir() for correct directory resolution - Prevents bd cook from failing in polecat worktree 3. Spawn fresh polecat when target has no session - When slinging to a dead polecat, spawn fresh one instead of failing - Fixes stale convoys not progressing due to done polecats
This commit is contained in:
@@ -111,6 +111,11 @@ func runBatchSling(beadIDs []string, rigName string, townBeadsDir string) error
|
||||
// Update agent bead state
|
||||
updateAgentHookBead(targetAgent, beadID, hookWorkDir, townBeadsDir)
|
||||
|
||||
// Auto-attach mol-polecat-work molecule to polecat agent bead
|
||||
if err := attachPolecatWorkMolecule(targetAgent, hookWorkDir, townRoot); err != nil {
|
||||
fmt.Printf(" %s Could not attach work molecule: %v\n", style.Dim.Render("Warning:"), err)
|
||||
}
|
||||
|
||||
// Store args if provided
|
||||
if slingArgs != "" {
|
||||
if err := storeArgsInBead(beadID, slingArgs); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user