conduct-cli 0.4.18__tar.gz → 0.4.19__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: conduct-cli
3
- Version: 0.4.18
3
+ Version: 0.4.19
4
4
  Summary: CLI for Conduct AI — install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "conduct-cli"
7
- version = "0.4.18"
7
+ version = "0.4.19"
8
8
  description = "CLI for Conduct AI — install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -502,10 +502,12 @@ def _install_codex_hook(hook_path: Path) -> None:
502
502
  hook_section = hooks.setdefault("hooks", {})
503
503
 
504
504
  # PreToolUse
505
- pre_cmd = f"python3 {hook_path}"
505
+ pre_cmd = f"{sys.executable} {hook_path}"
506
+ hook_path_str = str(hook_path)
506
507
  pre = hook_section.setdefault("PreToolUse", [])
508
+ # Match by hook path so old python3/python3.11 entries are treated as already registered
507
509
  pre_already = any(
508
- e.get("command") == pre_cmd
510
+ hook_path_str in e.get("command", "")
509
511
  for h in pre
510
512
  for e in h.get("hooks", [])
511
513
  )
@@ -513,9 +515,16 @@ def _install_codex_hook(hook_path: Path) -> None:
513
515
  if not pre_already:
514
516
  pre.append({"matcher": ".*", "hooks": [{"type": "command", "command": pre_cmd}]})
515
517
  changed = True
516
-
517
- # PostToolUse self-contained: python3 /path/hook.py post (no PATH dependency)
518
- post_cmd = f"python3 {hook_path} post"
518
+ else:
519
+ # Update existing entry to use current sys.executable
520
+ for h in pre:
521
+ for e in h.get("hooks", []):
522
+ if hook_path_str in e.get("command", "") and e["command"] != pre_cmd:
523
+ e["command"] = pre_cmd
524
+ changed = True
525
+
526
+ # PostToolUse
527
+ post_cmd = f"{sys.executable} {hook_path} post"
519
528
  post = hook_section.setdefault("PostToolUse", [])
520
529
  # Remove stale conductguard-post entries registered by older CLI versions
521
530
  stale = "conductguard-post"
@@ -527,7 +536,7 @@ def _install_codex_hook(hook_path: Path) -> None:
527
536
  cleaned = True
528
537
  post[:] = [h for h in post if h.get("hooks")]
529
538
  post_already = any(
530
- e.get("command") == post_cmd
539
+ hook_path_str in e.get("command", "")
531
540
  for h in post
532
541
  for e in h.get("hooks", [])
533
542
  )
@@ -610,9 +619,10 @@ def _install_claude_hook(hook_path: Path) -> None:
610
619
 
611
620
  # PreToolUse — existing hook script
612
621
  pre = hooks.setdefault("PreToolUse", [])
613
- pre_cmd = f"python3 {hook_path}"
622
+ pre_cmd = f"{sys.executable} {hook_path}"
623
+ hook_path_str = str(hook_path)
614
624
  pre_already = any(
615
- e.get("command") == pre_cmd
625
+ hook_path_str in e.get("command", "")
616
626
  for h in pre
617
627
  for e in h.get("hooks", [])
618
628
  )
@@ -620,10 +630,17 @@ def _install_claude_hook(hook_path: Path) -> None:
620
630
  if not pre_already:
621
631
  pre.append({"matcher": ".*", "hooks": [{"type": "command", "command": pre_cmd}]})
622
632
  changed = True
623
-
624
- # PostToolUse self-contained: python3 /path/hook.py post (no PATH dependency)
633
+ else:
634
+ # Update existing entry to use current sys.executable
635
+ for h in pre:
636
+ for e in h.get("hooks", []):
637
+ if hook_path_str in e.get("command", "") and e["command"] != pre_cmd:
638
+ e["command"] = pre_cmd
639
+ changed = True
640
+
641
+ # PostToolUse
625
642
  post = hooks.setdefault("PostToolUse", [])
626
- post_cmd = f"python3 {hook_path} post"
643
+ post_cmd = f"{sys.executable} {hook_path} post"
627
644
  # Remove stale conductguard-post entries registered by older CLI versions
628
645
  stale = "conductguard-post"
629
646
  cleaned = False
@@ -634,7 +651,7 @@ def _install_claude_hook(hook_path: Path) -> None:
634
651
  cleaned = True
635
652
  post[:] = [h for h in post if h.get("hooks")]
636
653
  post_already = any(
637
- e.get("command") == post_cmd
654
+ hook_path_str in e.get("command", "")
638
655
  for h in post
639
656
  for e in h.get("hooks", [])
640
657
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.18
3
+ Version: 0.4.19
4
4
  Summary: CLI for Conduct AI — install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: MIT
File without changes
File without changes
File without changes