diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index a53acf6..0000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(tree:*)", - "Bash(find:*)", - "Bash(.gitignore)", - "Bash(mkdir:*)", - "Bash(git clone:*)", - "Bash(cmake:*)", - "Bash(where:*)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" ..)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Debug)", - "Bash(git fetch:*)", - "Bash(git describe:*)", - "Bash(git checkout:*)", - "Bash(dir:*)", - "Bash(python -m pytest:*)", - "Bash(python -m venv:*)", - "Bash(python -m pip install:*)", - "Bash(git add:*)", - "Bash(git commit:*)", - "Bash(git push:*)", - "Bash(gh pr create:*)", - "Bash(if [ -d .vscode ])", - "Bash(then echo \"exists\")", - "Bash(else echo \"not exists\")", - "Bash(fi)", - "Bash(py --list:*)", - "Bash(if exist \"c:\\Projects\\Agent Arena\\.godot\" echo \".godot folder exists\" else echo \".godot folder not found\")", - "Bash(test:*)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Debug --target agent_arena)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Debug --clean-first)", - "Bash(del /F /Q agent_arena.*)", - "Bash(del /F /Q CMakeFilesagent_arena.dir* 2)", - "Bash(nul)", - "Bash(ls -la \"C:\\Projects\\Agent Arena\\bin\\windows\"\" 2>nul || echo \"Directory does not exist \")" - ], - "deny": [], - "ask": [] - } -} diff --git a/python/ipc/messages.py b/python/ipc/messages.py index 43d30e9..e4406d5 100644 --- a/python/ipc/messages.py +++ b/python/ipc/messages.py @@ -15,6 +15,7 @@ class PerceptionMessage: Contains all observations the agent receives from the simulation. """ + agent_id: str tick: int position: list[float] # [x, y, z] @@ -65,6 +66,7 @@ class ActionMessage: Contains the tool call and parameters for the agent to execute. """ + agent_id: str tick: int tool: str @@ -98,6 +100,7 @@ class TickRequest: """ Request sent from Godot to Python containing all agent perceptions for a tick. """ + tick: int perceptions: list[PerceptionMessage] simulation_state: dict[str, Any] = field(default_factory=dict) @@ -105,9 +108,7 @@ class TickRequest: @classmethod def from_dict(cls, data: dict[str, Any]) -> "TickRequest": """Create TickRequest from dictionary.""" - perceptions = [ - PerceptionMessage.from_dict(p) for p in data.get("perceptions", []) - ] + perceptions = [PerceptionMessage.from_dict(p) for p in data.get("perceptions", [])] return cls( tick=data["tick"], perceptions=perceptions, @@ -128,6 +129,7 @@ class TickResponse: """ Response sent from Python to Godot containing all agent actions for a tick. """ + tick: int actions: list[ActionMessage] metrics: dict[str, Any] = field(default_factory=dict) # Performance metrics diff --git a/python/ipc/server.py b/python/ipc/server.py index 9129b74..2f59ece 100644 --- a/python/ipc/server.py +++ b/python/ipc/server.py @@ -105,9 +105,7 @@ async def process_tick(request_data: dict[str, Any]) -> dict[str, Any]: tick_request = TickRequest.from_dict(request_data) tick = tick_request.tick - logger.debug( - f"Processing tick {tick} with {len(tick_request.perceptions)} agents" - ) + logger.debug(f"Processing tick {tick} with {len(tick_request.perceptions)} agents") # Build observations dict for runtime observations = {} @@ -220,9 +218,7 @@ async def run_async(self): if not self.app: self.create_app() - config = uvicorn.Config( - self.app, host=self.host, port=self.port, log_level="info" - ) + config = uvicorn.Config(self.app, host=self.host, port=self.port, log_level="info") server = uvicorn.Server(config) await server.serve()