{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/ValueObject\/MessageMetadata.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message metadata (sources, chunks, collections)\n\nfinal class MessageMetadata\n{\n \/** @var array<mixed>|null *\/\n private ?array $sources;\n\n \/** @var array<string>|null *\/\n private ?array $collections;\n\n \/** @var array<mixed>|null *\/\n private ?array $chunksUsed;\n\n private ?int $contextLimit;\n\n \/**\n * @param array<mixed>|null $sources\n * @param array<string>|null $collections\n * @param array<mixed>|null $chunksUsed\n *\/\n private function __construct(\n ?array $sources,\n ?array $collections,\n ?array $chunksUsed,\n ?int $contextLimit\n ) {\n $this->sources = $sources;\n $this->collections = $collections;\n $this->chunksUsed = $chunksUsed;\n $this->contextLimit = $contextLimit;\n }\n\n \/**\n * @param array<mixed>|null $sources\n * @param array<string>|null $collections\n * @param array<mixed>|null $chunksUsed\n *\/\n public static function create(\n ?array $sources = null,\n ?array $collections = null,\n ?array $chunksUsed = null,\n ?int $contextLimit = null\n ): self {\n return new self($sources, $collections, $chunksUsed, $contextLimit);\n }\n\n public static function empty(): self\n {\n return new self(null, null, null, null);\n }\n\n \/** @return array<mixed>|null *\/\n public function sources(): ?array\n {\n return $this->sources;\n }\n\n \/** @return array<string>|null *\/\n public function collections(): ?array\n {\n return $this->collections;\n }\n\n \/** @return array<mixed>|null *\/\n public function chunksUsed(): ?array\n {\n return $this->chunksUsed;\n }\n\n public function contextLimit(): ?int\n {\n return $this->contextLimit;\n }\n\n public function hasSources(): bool\n {\n return $this->sources !== null && count($this->sources) > 0;\n }\n\n public function hasCollections(): bool\n {\n return $this->collections !== null && count($this->collections) > 0;\n }\n\n public function hasChunks(): bool\n {\n return $this->chunksUsed !== null && count($this->chunksUsed) > 0;\n }\n\n \/**\n * @param array<mixed> $sources\n *\/\n public function withSources(array $sources): self\n {\n return new self($sources, $this->collections, $this->chunksUsed, $this->contextLimit);\n }\n\n \/**\n * @param array<string> $collections\n *\/\n public function withCollections(array $collections): self\n {\n return new self($this->sources, $collections, $this->chunksUsed, $this->contextLimit);\n }\n\n \/**\n * @param array<mixed> $chunksUsed\n *\/\n public function withChunksUsed(array $chunksUsed): self\n {\n return new self($this->sources, $this->collections, $chunksUsed, $this->contextLimit);\n }\n\n public function withContextLimit(int $contextLimit): self\n {\n return new self($this->sources, $this->collections, $this->chunksUsed, $contextLimit);\n }\n\n public function equals(self $other): bool\n {\n return $this->sources === $other->sources\n && $this->collections === $other->collections\n && $this->chunksUsed === $other->chunksUsed\n && $this->contextLimit === $other->contextLimit;\n }\n}\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/ValueObject\/MessageMetadata.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message metadata (sources, chunks, collections)\n\nfinal class MessageMetadata\n{\n \/** @var array<mixed>|null *\/\n private ?array $sources;\n\n \/** @var array<string>|null *\/\n private ?array $collections;\n\n \/** @var array<mixed>|null *\/\n private ?array $chunksUsed;\n\n private ?int $contextLimit;\n\n \/**\n * @param array<mixed>|null $sources\n * @param array<string>|null $collections\n * @param array<mixed>|null $chunksUsed\n *\/\n private function __construct(\n ?array $sources,\n ?array $collections,\n ?array $chunksUsed,\n ?int $contextLimit\n ) {\n $this->sources = $sources;\n $this->collections = $collections;\n $this->chunksUsed = $chunksUsed;\n $this->contextLimit = $contextLimit;\n }\n\n \/**\n * @param array<mixed>|null $sources\n * @param array<string>|null $collections\n * @param array<mixed>|null $chunksUsed\n *\/\n public static function create(\n ?array $sources = null,\n ?array $collections = null,\n ?array $chunksUsed = null,\n ?int $contextLimit = null\n ): self {\n return new self($sources, $collections, $chunksUsed, $contextLimit);\n }\n\n public static function empty(): self\n {\n return new self(null, null, null, null);\n }\n\n \/** @return array<mixed>|null *\/\n public function sources(): ?array\n {\n return $this->sources;\n }\n\n \/** @return array<string>|null *\/\n public function collections(): ?array\n {\n return $this->collections;\n }\n\n \/** @return array<mixed>|null *\/\n public function chunksUsed(): ?array\n {\n return $this->chunksUsed;\n }\n\n public function contextLimit(): ?int\n {\n return $this->contextLimit;\n }\n\n public function hasSources(): bool\n {\n return $this->sources !== null && count($this->sources) > 0;\n }\n\n public function hasCollections(): bool\n {\n return $this->collections !== null && count($this->collections) > 0;\n }\n\n public function hasChunks(): bool\n {\n return $this->chunksUsed !== null && count($this->chunksUsed) > 0;\n }\n\n \/**\n * @param array<mixed> $sources\n *\/\n public function withSources(array $sources): self\n {\n return new self($sources, $this->collections, $this->chunksUsed, $this->contextLimit);\n }\n\n \/**\n * @param array<string> $collections\n *\/\n public function withCollections(array $collections): self\n {\n return new self($this->sources, $collections, $this->chunksUsed, $this->contextLimit);\n }\n\n \/**\n * @param array<mixed> $chunksUsed\n *\/\n public function withChunksUsed(array $chunksUsed): self\n {\n return new self($this->sources, $this->collections, $chunksUsed, $this->contextLimit);\n }\n\n public function withContextLimit(int $contextLimit): self\n {\n return new self($this->sources, $this->collections, $this->chunksUsed, $contextLimit);\n }\n\n public function equals(self $other): bool\n {\n return $this->sources === $other->sources\n && $this->collections === $other->collections\n && $this->chunksUsed === $other->chunksUsed\n && $this->contextLimit === $other->contextLimit;\n }\n}\n",
"structuredPatch": [],
"originalFile": null
}
}