Skip to main content

detect_caller

Function detect_caller 

Source
pub fn detect_caller(stdin: &Value) -> CallerKind
Expand description

Detect which agent is calling the hook.

Priority:

  1. POLYHOOK_CALLER env var (explicit override)
  2. Agent-specific env vars
  3. Heuristics on the raw stdin JSON shape
  4. Unknown