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
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ros2-medkit-mcp"
version = "0.5.0"
version = "0.6.0"
description = "MCP server adapter for ros2_medkit SOVD HTTP API"
authors = ["bburda <bartoszburda93@gmail.com>"]
readme = "README.md"
Expand All @@ -15,7 +15,7 @@ pydantic = "^2.10.0"
uvicorn = { version = "^0.34.0", extras = ["standard"] }
starlette = "^0.45.0"
# Distributed via GitHub Releases wheel (no PyPI yet). Replace with version constraint when available.
ros2-medkit-client = {url = "https://github.com/selfpatch/ros2_medkit_clients/releases/download/py-v0.5.0/ros2_medkit_client-0.5.0-py3-none-any.whl"}
ros2-medkit-client = {url = "https://github.com/selfpatch/ros2_medkit_clients/releases/download/py-v0.6.0/ros2_medkit_client-0.6.0-py3-none-any.whl"}
Comment thread
bburda marked this conversation as resolved.

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ros2_medkit_mcp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""ros2_medkit_mcp - MCP adapter for ros2_medkit SOVD HTTP API."""

__version__ = "0.5.0"
__version__ = "0.6.0"
23 changes: 13 additions & 10 deletions src/ros2_medkit_mcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,15 @@ async def _raw_upload(
raise SovdClientError(message=f"Request failed: {e}") from e

async def _raw_get_items(self, path: str, params: dict[str, str]) -> list[dict[str, Any]]:
"""GET a collection via raw httpx with query parameters.

The 0.5.0 generated client cannot pass query parameters: the spec omits
them even though the gateway reads them (see selfpatch/ros2_medkit#416).
Use raw httpx for filtered list calls until the client is regenerated
from the fixed spec. Path segments must be pre-encoded by the caller.
"""GET a collection via raw httpx with string query parameters.

The generated per-endpoint list functions type their filter parameters
as endpoint-specific enums (e.g. ``ListComponentFaultsStatus``,
``ListComponentLogsSeverity``). Routing the filtered list calls (faults,
logs, updates) through this single helper passes plain string filters
straight through, instead of mapping each filter to its per-entity-type
enum and rejecting values the gateway would otherwise accept. Path
segments must be pre-encoded by the caller.
"""
try:
hc = await self._httpx_client()
Expand Down Expand Up @@ -1418,16 +1421,16 @@ async def get_update_status(self, update_id: str) -> dict[str, Any]:
return await self._call(updates.get_update_status.asyncio, update_id=update_id)

async def prepare_update(self, update_id: str) -> dict[str, Any]:
# 0.5.0: prepare is a body-less PUT returning 202 Accepted; the endpoint
# takes no request body.
# prepare is a body-less PUT returning 202 Accepted; the endpoint takes
# no request body.
return await self._call_update_action(updates.prepare_update.asyncio, update_id=update_id)

async def execute_update(self, update_id: str) -> dict[str, Any]:
# 0.5.0: execute is a body-less PUT returning 202 Accepted (see prepare_update).
# execute is a body-less PUT returning 202 Accepted (see prepare_update).
return await self._call_update_action(updates.execute_update.asyncio, update_id=update_id)

async def automate_update(self, update_id: str) -> dict[str, Any]:
# 0.5.0: automate is a body-less PUT returning 202 Accepted (see prepare_update).
# automate is a body-less PUT returning 202 Accepted (see prepare_update).
return await self._call_update_action(updates.automate_update.asyncio, update_id=update_id)

async def _call_update_action(self, api_func: Any, **kwargs: Any) -> dict[str, Any]:
Expand Down
Loading