luv-cli 0.0.9__tar.gz → 0.0.10__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luv-cli
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Launch Claude Code agents on GitHub repos with isolated workspaces and optional Docker dev environments
5
5
  Project-URL: Homepage, https://github.com/exospherehost/luv
6
6
  Project-URL: Repository, https://github.com/exospherehost/luv
@@ -145,6 +145,34 @@ def docker_env_flags(env_vars: dict[str, str]) -> list[str]:
145
145
  return flags
146
146
 
147
147
 
148
+ def ensure_failproofai_installed() -> None:
149
+ """Install failproofai globally via npm — skip if already on PATH."""
150
+ if shutil.which("failproofai") is not None:
151
+ return
152
+ if shutil.which("npm") is None:
153
+ die("'npm' not found in PATH; install Node.js to use failproofai")
154
+ print("luv: installing failproofai globally...")
155
+ r = subprocess.run(["npm", "install", "-g", "failproofai"])
156
+ if r.returncode != 0:
157
+ die("'npm install -g failproofai' failed")
158
+
159
+
160
+ def run_failproofai_project(clone_dir: Path) -> None:
161
+ """Run failproofai project-scope initialization in the cloned repo.
162
+
163
+ On failure, remove the clone_dir so the next run re-clones and retries
164
+ cleanly instead of short-circuiting to a half-initialized folder.
165
+ """
166
+ print(f"luv: running failproofai project setup in {clone_dir.name}...")
167
+ r = subprocess.run(
168
+ ["npx", "-y", "failproofai", "p", "-i", "all", "--scope", "project"],
169
+ cwd=str(clone_dir),
170
+ )
171
+ if r.returncode != 0:
172
+ shutil.rmtree(clone_dir, ignore_errors=True)
173
+ die("'npx -y failproofai p -i all --scope project' failed")
174
+
175
+
148
176
  def ensure_pr_rules() -> None:
149
177
  claude_dir = Path.home() / ".claude"
150
178
  claude_md = claude_dir / "CLAUDE.md"
@@ -522,6 +550,8 @@ def open_existing(org: str, repo: str, number: int, prompt: str | None, nav_mode
522
550
  if r.returncode != 0:
523
551
  die(f"git checkout {branch} failed (exit {r.returncode})")
524
552
 
553
+ run_failproofai_project(clone_dir)
554
+
525
555
  print(f"luv: ready — {clone_dir.name}, branch {branch}")
526
556
  ensure_pr_rules()
527
557
  if nav_mode:
@@ -564,6 +594,8 @@ def open_pr(org: str, repo: str, number: int, prompt: str | None, nav_mode: bool
564
594
  if r.returncode != 0:
565
595
  die(f"git checkout {branch} failed (exit {r.returncode})")
566
596
 
597
+ run_failproofai_project(clone_dir)
598
+
567
599
  print(f"luv: ready — {clone_dir.name}, branch {branch}")
568
600
  ensure_pr_rules()
569
601
  if nav_mode:
@@ -622,6 +654,8 @@ Docker:
622
654
  cmd_init()
623
655
  return
624
656
 
657
+ ensure_failproofai_installed()
658
+
625
659
  # luv -l <PR URL>
626
660
  if args[0] == "-l":
627
661
  if len(args) < 2:
@@ -711,13 +745,16 @@ Docker:
711
745
  if r.returncode != 0:
712
746
  die(f"git checkout -b failed (exit {r.returncode})")
713
747
 
714
- # 6. Ensure PR rules in ~/.claude/CLAUDE.md and bypass-permissions default
748
+ # 6. Run failproofai project setup in the fresh clone
749
+ run_failproofai_project(clone_dir)
750
+
751
+ # 7. Ensure PR rules in ~/.claude/CLAUDE.md and bypass-permissions default
715
752
  ensure_pr_rules()
716
753
  ensure_default_permission_mode()
717
754
 
718
755
  print(f"luv: ready — {clone_dir.name}, branch {branch}")
719
756
 
720
- # 7. Launch claude, resume session, or open shell (replace this process)
757
+ # 8. Launch claude, resume session, or open shell (replace this process)
721
758
  if nav_mode:
722
759
  navigate(clone_dir, extra_env=extra_env)
723
760
  elif resume_mode:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "luv-cli"
7
- version = "0.0.9"
7
+ version = "0.0.10"
8
8
  description = "Launch Claude Code agents on GitHub repos with isolated workspaces and optional Docker dev environments"
9
9
  requires-python = ">=3.10"
10
10
  license = "MIT"
File without changes
File without changes
File without changes
File without changes