Wrapper that injects project_dir into context for security hook.
(input_data, tool_use_id=None, context=None)
| 477 | |
| 478 | # Create a wrapper for bash_security_hook that passes project_dir via context |
| 479 | async def bash_hook_with_context(input_data, tool_use_id=None, context=None): |
| 480 | """Wrapper that injects project_dir into context for security hook.""" |
| 481 | if context is None: |
| 482 | context = {} |
| 483 | context["project_dir"] = str(project_dir.resolve()) |
| 484 | return await bash_security_hook(input_data, tool_use_id, context) |
| 485 | |
| 486 | # PreCompact hook for logging and customizing context compaction. |
| 487 | # Compaction is handled automatically by Claude Code CLI when context approaches limits. |
nothing calls this directly
no test coverage detected