{
"event": "PostToolUse",
"tool_name": "Read",
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Repository\/KiProtokollRepositoryInterface.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Repository;\n\n\/\/ @responsibility: Contract für KI-Protokoll-Persistenz\n\ninterface KiProtokollRepositoryInterface\n{\n \/**\n * @return array<string, mixed>|null\n *\/\n public function findById(int $id): ?array;\n\n \/**\n * @return array<array<string, mixed>>\n *\/\n public function findLatest(int $limit = 20): array;\n\n \/**\n * @return array<array<string, mixed>>\n *\/\n public function findPaginated(\n ?string $search = null,\n ?string $status = null,\n ?string $model = null,\n int $limit = 50,\n int $offset = 0\n ): array;\n\n public function countFiltered(?string $search = null, ?string $status = null, ?string $model = null): int;\n\n \/**\n * @return array<string, mixed>\n *\/\n public function getStatistics(): array;\n\n \/**\n * @return array<string>\n *\/\n public function getDistinctModels(): array;\n\n public function findPreviousId(int $id): ?int;\n\n public function findNextId(int $id): ?int;\n\n \/**\n * Insert new protokoll entry with status 'pending'.\n * Sets request_timestamp = NOW(6).\n *\n * @return int The inserted ID\n *\/\n public function insert(\n string $clientName,\n string $request,\n string $model,\n string $requestIp\n ): int;\n\n \/**\n * Complete a pending protokoll entry with response data.\n * Sets response_timestamp = NOW(6), calculates tokens_total.\n *\/\n public function complete(\n int $id,\n string $response,\n int $durationMs,\n ?int $tokensInput,\n ?int $tokensOutput\n ): void;\n\n \/**\n * Mark a protokoll entry as failed with error message.\n *\/\n public function fail(int $id, string $errorMessage): void;\n\n \/**\n * Mark stale 'pending' entries as 'error'.\n *\n * @param int $minutesOld Age threshold in minutes (default: 10)\n * @return int Number of affected rows\n *\/\n public function cleanupStale(int $minutesOld = 10): int;\n}\n",
"numLines": 86,
"startLine": 1,
"totalLines": 86
}
}
}