@runuai/host 0.8.19 → 0.8.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.8.19",
3
+ "version": "0.8.20",
4
4
  "description": "Uai host — runs ephemeral AI coding tasks in Docker on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Diogo Perillo <diogo.perillo@gmail.com>",
@@ -198,7 +198,15 @@ while IFS= read -r project_obj; do
198
198
  [ -n "$project_default" ] || project_default="main"
199
199
 
200
200
  mkdir -p "$(dirname "$worktree_target")"
201
- if git -C "$mirror_dir" rev-parse --verify --quiet \
201
+ if [ -e "$worktree_target/.git" ]; then
202
+ # Resume (ADR-028): the task worktree survived the stop — reuse it as-is
203
+ # (a linked worktree's .git is a FILE, hence -e). Re-running `git
204
+ # worktree add` would refuse ("already exists" / branch exists) and
205
+ # errored EVERY resume of a worktree-preserving stop within seconds
206
+ # (found live 2026-07-21). The task branch and any uncommitted work are
207
+ # exactly what the user expects back.
208
+ log "worktree for $project_slug already present — resuming with it"
209
+ elif git -C "$mirror_dir" rev-parse --verify --quiet \
202
210
  "refs/remotes/origin/$project_default" >/dev/null 2>&1; then
203
211
  # Normal case: branch the task worktree off origin/<defaultBranch>.
204
212
  step "WORKTREE_FAILED" "git worktree add ($project_id)"