MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / _handle_request

Method _handle_request

relay/server.py:494–506  ·  view source on GitHub ↗

Handle a REQUEST message from CLI

(self, msg: dict[str, Any])

Source from the content-addressed store, hash-verified

492 await write_frame(writer, response.to_dict())
493
494 async def _handle_request(self, msg: dict[str, Any]) -> dict[str, Any]:
495 """Handle a REQUEST message from CLI"""
496 request_id = msg.get("id", "")
497 instance_id = msg.get("instance")
498 command = msg.get("command", "")
499 params = msg.get("params", {})
500 timeout_ms = msg.get("timeout_ms", COMMAND_TIMEOUT_MS)
501
502 # Use request cache for idempotency
503 return await self.request_cache.handle_request(
504 request_id,
505 lambda: self._execute_command(request_id, instance_id, command, params, timeout_ms),
506 )
507
508 def _get_instance_or_error(
509 self,

Callers 1

_handle_cli_messageMethod · 0.95

Calls 3

_execute_commandMethod · 0.95
handle_requestMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected