conduct-cli 0.4.25__tar.gz → 0.4.27__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.25
3
+ Version: 0.4.27
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.25"
7
+ version = "0.4.27"
8
8
  description = "CLI for Conduct AI — install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -374,6 +374,10 @@ def main():
374
374
  msg = f"[ConductGuard] {reason or 'Budget hard cap reached. Contact your manager.'}"
375
375
  print(msg)
376
376
  print(msg, file=sys.stderr)
377
+ tool_name = (data.get("tool_name") or "").lower()
378
+ tool_input = data.get("tool_input") or {}
379
+ session_id = data.get("session_id")
380
+ _post_event(tool_name, tool_input, "blocked", "budget-hard-cap", reason or "Monthly budget hard cap reached.", session_id=session_id)
377
381
  sys.exit(2)
378
382
 
379
383
  session_id = data.get("session_id")
@@ -680,6 +684,18 @@ def _install_claude_hook(hook_path: Path) -> None:
680
684
  if cleaned:
681
685
  changed = True
682
686
 
687
+ # Stop — auto-sync RTK + Booster savings at end of every session
688
+ stop = hooks.setdefault("Stop", [])
689
+ stop_cmd = "conduct guard sync"
690
+ stop_already = any(
691
+ stop_cmd in e.get("command", "")
692
+ for h in stop
693
+ for e in h.get("hooks", [])
694
+ )
695
+ if not stop_already:
696
+ stop.append({"hooks": [{"type": "command", "command": stop_cmd}]})
697
+ changed = True
698
+
683
699
  if changed:
684
700
  claude_settings.parent.mkdir(parents=True, exist_ok=True)
685
701
  claude_settings.write_text(json.dumps(settings, indent=2))
@@ -687,6 +703,8 @@ def _install_claude_hook(hook_path: Path) -> None:
687
703
  print(f" {GREEN}Claude Code PreToolUse hook registered{RESET}")
688
704
  if not post_already or cleaned:
689
705
  print(f" {GREEN}Claude Code PostToolUse hook registered{RESET}")
706
+ if not stop_already:
707
+ print(f" {GREEN}Claude Code Stop hook registered (auto-sync savings){RESET}")
690
708
  else:
691
709
  print(f" {GRAY}Claude Code hooks already registered{RESET}")
692
710
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.25
3
+ Version: 0.4.27
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