(path, proj, *, sid=SID)
| 79 | |
| 80 | |
| 81 | def _read_tool(path, proj, *, sid=SID): |
| 82 | payload = {"session_id": sid, "hook_event_name": "PreToolUse", "tool_name": "Read", |
| 83 | "cwd": str(proj), "tool_input": {"file_path": str(path)}} |
| 84 | r = subprocess.run([sys.executable, "-m", "graphify", "hook-guard", "read"], input=json.dumps(payload), |
| 85 | capture_output=True, text=True, cwd=proj, env=_env(proj)) |
| 86 | return r.stdout |
| 87 | |
| 88 | |
| 89 | def _is_read_nudge(out): |
no test coverage detected