MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _read

Function _read

tests/test_hook_compact.py:58–72  ·  view source on GitHub ↗
(f, tmp_path, *, sid=SID, agent=None, strict=False)

Source from the content-addressed store, hash-verified

56
57
58def _read(f, tmp_path, *, sid=SID, agent=None, strict=False):
59 payload = {
60 "session_id": sid,
61 "transcript_path": f"/home/u/.claude/projects/p/{sid}.jsonl",
62 "cwd": str(tmp_path),
63 "permission_mode": "default",
64 "hook_event_name": "PreToolUse",
65 "tool_name": "Read",
66 "tool_input": {"file_path": str(f)},
67 "tool_use_id": "toolu_01",
68 }
69 if agent:
70 payload["agent_id"] = agent
71 payload["agent_type"] = "Explore"
72 return _guard("read", payload, tmp_path, strict=strict)
73
74
75def _session_start(source, tmp_path, *, sid=SID):

Calls 1

_guardFunction · 0.85

Tested by

no test coverage detected