MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / bash_hook_with_context

Function bash_hook_with_context

client.py:479–484  ·  view source on GitHub ↗

Wrapper that injects project_dir into context for security hook.

(input_data, tool_use_id=None, context=None)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

bash_security_hookFunction · 0.90

Tested by

no test coverage detected