{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/opt\/scripts\/pipeline\/generate.py",
"offset": 560,
"limit": 30
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/opt\/scripts\/pipeline\/generate.py",
"content": " )\n result = cursor.fetchone()\n cursor.close()\n return result\n\n\ndef get_prompt(name):\n \"\"\"Load prompt from database by name.\"\"\"\n cursor = db.execute(\n \"\"\"SELECT content FROM prompts WHERE name = %s AND is_active = 1 ORDER BY version DESC LIMIT 1\"\"\",\n (name,),\n )\n result = cursor.fetchone()\n cursor.close()\n return result[\"content\"] if result else None\n\n\ndef run_critic(content, critic_id, model=\"anthropic\"):\n \"\"\"\n Run a single critic on content.\n\n Returns:\n dict with feedback and rating\n \"\"\"\n db.connect()\n\n try:\n critic = get_critic(critic_id)\n if not critic:\n return {\"error\": f\"Critic {critic_id} not found\"}",
"numLines": 30,
"startLine": 560,
"totalLines": 878
}
}
}