{
"event": "PostToolUse",
"raw_data": {
"session_id": "ff098a73-f251-4037-92a8-8d3fbd176fd4",
"transcript_path": "\/root\/.claude\/projects\/-var-www\/ff098a73-f251-4037-92a8-8d3fbd176fd4.jsonl",
"cwd": "\/var\/www\/dev.campus.systemische-tools.de",
"permission_mode": "acceptEdits",
"hook_event_name": "PostToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/FileBackupRepository.php",
"limit": 50
},
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/FileBackupRepository.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Persistence;\n\n\/\/ @responsibility: Persistenz für Datei-Backup-Historie (Restore-Validierung)\n\nuse PDO;\n\nclass FileBackupRepository\n{\n private PDO $db;\n\n \/**\n * Allowlist of base paths where file restoration is permitted.\n * Only files within these directories can be restored.\n *\/\n private const ALLOWED_RESTORE_PATHS = [\n '\/var\/www\/dev.campus.systemische-tools.de\/',\n '\/var\/www\/prod.campus.systemische-tools.de\/',\n ];\n\n public function __construct(PDO $pdo)\n {\n $this->db = $pdo;\n }\n\n \/**\n * Find all backups with optional filters.\n *\n * @param array<string, mixed> $filters\n *\/\n public function findAll(array $filters = [], int $limit = 50, int $offset = 0): array\n {\n $sql = 'SELECT id, file_path, content_hash, file_size, version, change_type,\n changed_at, changed_by, reason\n FROM file_backup_history WHERE 1=1';\n $params = [];\n\n if (!empty($filters['search'])) {\n $sql .= ' AND file_path LIKE :search';\n $params['search'] = '%' . $filters['search'] . '%';\n }\n\n if (!empty($filters['change_type'])) {\n $sql .= ' AND change_type = :change_type';\n $params['change_type'] = $filters['change_type'];\n }\n",
"numLines": 50,
"startLine": 1,
"totalLines": 295
}
},
"tool_use_id": "toolu_01LgmnHEdoHvWCs9aZQQQEgC"
}
}