Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .claude/settings.local.json

This file was deleted.

8 changes: 5 additions & 3 deletions python/ipc/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -65,6 +66,7 @@ class ActionMessage:

Contains the tool call and parameters for the agent to execute.
"""

agent_id: str
tick: int
tool: str
Expand Down Expand Up @@ -98,16 +100,15 @@ 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)

@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,
Expand All @@ -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
Expand Down
8 changes: 2 additions & 6 deletions python/ipc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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()

Expand Down
Loading