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.
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/PKG-INFO +1 -1
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/pyproject.toml +1 -1
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli/guard.py +18 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/README.md +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/setup.cfg +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/setup.py +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.25 → conduct_cli-0.4.27}/src/conduct_cli.egg-info/top_level.txt +0 -0
|
@@ -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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|