{
  "description": "pi-loom Claude Code hook integration",
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|clear|compact",
        "hooks": [
          {
            "type": "command",
            "shell": "bash",
            "command": "_P=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; if command -v pi-loom-claude-hook >/dev/null 2>&1; then pi-loom-claude-hook SessionStart; elif [ -n \"$_P\" ] && [ -f \"$_P/../dist/claude-hook.js\" ]; then node \"$_P/../dist/claude-hook.js\" SessionStart; else node ./dist/claude-hook.js SessionStart; fi",
            "timeout": 10
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "shell": "bash",
            "command": "_P=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; if command -v pi-loom-claude-hook >/dev/null 2>&1; then pi-loom-claude-hook PostToolUse; elif [ -n \"$_P\" ] && [ -f \"$_P/../dist/claude-hook.js\" ]; then node \"$_P/../dist/claude-hook.js\" PostToolUse; else node ./dist/claude-hook.js PostToolUse; fi",
            "timeout": 10
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "shell": "bash",
            "command": "_P=\"${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}\"; if command -v pi-loom-claude-hook >/dev/null 2>&1; then pi-loom-claude-hook Stop; elif [ -n \"$_P\" ] && [ -f \"$_P/../dist/claude-hook.js\" ]; then node \"$_P/../dist/claude-hook.js\" Stop; else node ./dist/claude-hook.js Stop; fi",
            "timeout": 10
          }
        ]
      }
    ]
  }
}
