{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/scripts\/pipeline\/db.py",
"offset": 220,
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/scripts\/pipeline\/db.py",
"content": " # Prompts\n def get_prompt(self, name, version=None):\n \"\"\"Get a prompt by name (optionally specific version).\"\"\"\n if version:\n cursor = self.execute(\"SELECT content FROM prompts WHERE name = %s AND version = %s\", (name, version))\n else:\n cursor = self.execute(\n \"\"\"SELECT content FROM prompts\n WHERE name = %s AND is_active = 1\n 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 def get_prompt_by_use_case(self, use_case: str, version: str = None) -> dict | None:\n \"\"\"\n Get prompt by use_case with full metadata for provenance tracking.\n\n Args:\n use_case: The use case (entity_extraction, semantic_analysis, statement_extraction, etc.)\n version: Optional specific version (otherwise latest active)\n\n Returns:\n Dict with id, name, version, content, use_case or None\n \"\"\"\n if version:\n cursor = self.execute(\n \"\"\"SELECT id, name, version, content, use_case\n FROM prompts\n WHERE use_case = %s AND version = %s\"\"\",\n (use_case, version),\n )\n else:\n cursor = self.execute(\n \"\"\"SELECT id, name, version, content, use_case\n FROM prompts\n WHERE use_case = %s AND is_active = 1\n ORDER BY version DESC LIMIT 1\"\"\",\n (use_case,),\n )\n result = cursor.fetchone()\n cursor.close()\n return result\n\n # Protokoll Logging (LLM calls)\n def log_to_protokoll(\n self,\n client_name,",
"numLines": 50,
"startLine": 220,
"totalLines": 718
}
}
}