Add git worktree management to agentd for isolated agent workspaces.
Current state:
- Agents work directly in /home/ben/omni/ava
- No isolation between concurrent agents
- Conflicts if multiple agents edit same files
Target state:
- Each agent spawn gets its own git worktree
git worktree add /tmp/agentd/<run-id> HEAD- Agent works in isolated worktree
- On completion: merge/cherry-pick changes back, remove worktree
Implementation:
1. Add worktree creation in spawnPiAgent:
- git worktree add <path> <branch>
- Set workspace to worktree path
2. Add worktree cleanup on agent completion:
- git worktree remove <path>
3. Handle merge conflicts gracefully
4. Consider: keep worktree on failure for debugging
Configuration:
- worktree_root: /tmp/agentd/worktrees (or configurable)
- auto_cleanup: true/false
- base_branch: HEAD or specific branch
Added git worktree management to Omni/Agentd/Daemon.hs: create per-run worktrees under <workspace>/_/agentd/worktrees when base is a git repo, track worktree paths in RunningAgent, cleanup on success/stop, and fail spawn if worktree creation fails.