remote-ros-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- remote_ros_mcp-0.1.0/.github/workflows/ci.yml +78 -0
- remote_ros_mcp-0.1.0/.github/workflows/release.yml +97 -0
- remote_ros_mcp-0.1.0/.gitignore +274 -0
- remote_ros_mcp-0.1.0/.python-version +1 -0
- remote_ros_mcp-0.1.0/AGENTS.md +112 -0
- remote_ros_mcp-0.1.0/CHANGELOG.md +57 -0
- remote_ros_mcp-0.1.0/LICENSE +17 -0
- remote_ros_mcp-0.1.0/PKG-INFO +202 -0
- remote_ros_mcp-0.1.0/README.md +175 -0
- remote_ros_mcp-0.1.0/README_KO.md +196 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/action.proto +92 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/admin.proto +162 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/common.proto +35 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/health.proto +25 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/service.proto +53 -0
- remote_ros_mcp-0.1.0/proto/wrosbridge/v1/topic.proto +44 -0
- remote_ros_mcp-0.1.0/pyproject.toml +79 -0
- remote_ros_mcp-0.1.0/scripts/generate_protos.py +87 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/__init__.py +2 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/cli.py +368 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/client/__init__.py +5 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/client/client.py +361 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/codecs/__init__.py +12 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/codecs/base.py +217 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/codecs/registry.py +90 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/codecs/standard.py +326 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/config.py +106 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/__init__.py +0 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/__init__.py +0 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/__init__.py +0 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/action_pb2.py +57 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/action_pb2_grpc.py +229 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/admin_pb2.py +77 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/admin_pb2_grpc.py +370 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/common_pb2.py +43 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/common_pb2_grpc.py +24 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/health_pb2.py +43 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/health_pb2_grpc.py +97 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/service_pb2.py +43 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/service_pb2_grpc.py +101 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/topic_pb2.py +46 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/proto/wrosbridge/v1/topic_pb2_grpc.py +142 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/__init__.py +5 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/app.py +58 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/tools_action.py +102 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/tools_data.py +105 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/tools_graph.py +72 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/server/tools_test.py +246 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/utils/errors.py +30 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/utils/logger.py +29 -0
- remote_ros_mcp-0.1.0/src/remote_ros_mcp/utils/ring_buffer.py +49 -0
- remote_ros_mcp-0.1.0/tests/__init__.py +1 -0
- remote_ros_mcp-0.1.0/tests/conftest.py +13 -0
- remote_ros_mcp-0.1.0/tests/mock_server.py +207 -0
- remote_ros_mcp-0.1.0/tests/test_cli.py +52 -0
- remote_ros_mcp-0.1.0/tests/test_client.py +78 -0
- remote_ros_mcp-0.1.0/tests/test_codecs.py +96 -0
- remote_ros_mcp-0.1.0/tests/test_config.py +132 -0
- remote_ros_mcp-0.1.0/tests/test_tools.py +131 -0
- remote_ros_mcp-0.1.0/tests/test_verification.py +102 -0
- remote_ros_mcp-0.1.0/uv.lock +1384 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint-and-typecheck:
|
|
15
|
+
name: Lint & Typecheck
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
run: uv python install 3.12
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync --all-extras
|
|
31
|
+
|
|
32
|
+
- name: Check code formatting (ruff)
|
|
33
|
+
run: uv run ruff format --check .
|
|
34
|
+
|
|
35
|
+
- name: Lint code (ruff)
|
|
36
|
+
run: uv run ruff check .
|
|
37
|
+
|
|
38
|
+
- name: Type check (mypy)
|
|
39
|
+
run: uv run mypy src
|
|
40
|
+
|
|
41
|
+
test:
|
|
42
|
+
name: Run Test Suite
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- name: Checkout repository
|
|
46
|
+
uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- name: Install uv
|
|
49
|
+
uses: astral-sh/setup-uv@v5
|
|
50
|
+
with:
|
|
51
|
+
enable-cache: true
|
|
52
|
+
|
|
53
|
+
- name: Set up Python
|
|
54
|
+
run: uv python install 3.12
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: uv sync --all-extras
|
|
58
|
+
|
|
59
|
+
- name: Run pytest with coverage
|
|
60
|
+
run: uv run pytest -v --cov=remote_ros_mcp --cov-report=term-missing
|
|
61
|
+
|
|
62
|
+
build-check:
|
|
63
|
+
name: Build Distribution Check
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- name: Checkout repository
|
|
67
|
+
uses: actions/checkout@v4
|
|
68
|
+
|
|
69
|
+
- name: Install uv
|
|
70
|
+
uses: astral-sh/setup-uv@v5
|
|
71
|
+
with:
|
|
72
|
+
enable-cache: true
|
|
73
|
+
|
|
74
|
+
- name: Set up Python
|
|
75
|
+
run: uv python install 3.12
|
|
76
|
+
|
|
77
|
+
- name: Build distributions
|
|
78
|
+
run: uv build
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: Release & Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test-and-build:
|
|
17
|
+
name: Test & Build Package
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v5
|
|
25
|
+
with:
|
|
26
|
+
enable-cache: true
|
|
27
|
+
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
run: uv python install 3.12
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync --all-extras
|
|
33
|
+
|
|
34
|
+
- name: Run lint & typecheck
|
|
35
|
+
run: |
|
|
36
|
+
uv run ruff check .
|
|
37
|
+
uv run ruff format --check .
|
|
38
|
+
uv run mypy src
|
|
39
|
+
|
|
40
|
+
- name: Run test suite
|
|
41
|
+
run: uv run pytest -v
|
|
42
|
+
|
|
43
|
+
- name: Build distributions
|
|
44
|
+
run: uv build
|
|
45
|
+
|
|
46
|
+
- name: Upload distribution artifacts
|
|
47
|
+
uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: dist
|
|
50
|
+
path: dist/
|
|
51
|
+
if-no-files-found: error
|
|
52
|
+
retention-days: 5
|
|
53
|
+
|
|
54
|
+
publish-to-pypi:
|
|
55
|
+
name: Publish to PyPI (Trusted Publisher)
|
|
56
|
+
needs: [test-and-build]
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
environment:
|
|
59
|
+
name: pypi
|
|
60
|
+
url: https://pypi.org/p/remote-ros-mcp
|
|
61
|
+
permissions:
|
|
62
|
+
id-token: write # Mandatory for PyPI Trusted Publishing (OIDC)
|
|
63
|
+
|
|
64
|
+
steps:
|
|
65
|
+
- name: Download distribution artifacts
|
|
66
|
+
uses: actions/download-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: dist
|
|
69
|
+
path: dist/
|
|
70
|
+
|
|
71
|
+
- name: Publish package distributions to PyPI
|
|
72
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
73
|
+
with:
|
|
74
|
+
packages-dir: dist/
|
|
75
|
+
|
|
76
|
+
github-release:
|
|
77
|
+
name: Create GitHub Release
|
|
78
|
+
needs: [publish-to-pypi]
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
permissions:
|
|
81
|
+
contents: write # Required for creating releases and uploading assets
|
|
82
|
+
|
|
83
|
+
steps:
|
|
84
|
+
- name: Checkout repository
|
|
85
|
+
uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- name: Download distribution artifacts
|
|
88
|
+
uses: actions/download-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: dist
|
|
91
|
+
path: dist/
|
|
92
|
+
|
|
93
|
+
- name: Create GitHub Release
|
|
94
|
+
uses: softprops/action-gh-release@v2
|
|
95
|
+
with:
|
|
96
|
+
files: dist/*
|
|
97
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,python,visualstudiocode,windows
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,python,visualstudiocode,windows
|
|
3
|
+
|
|
4
|
+
### Linux ###
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
### macOS ###
|
|
20
|
+
# General
|
|
21
|
+
.DS_Store
|
|
22
|
+
.AppleDouble
|
|
23
|
+
.LSOverride
|
|
24
|
+
|
|
25
|
+
# Icon must end with two \r
|
|
26
|
+
Icon
|
|
27
|
+
|
|
28
|
+
# Thumbnails
|
|
29
|
+
._*
|
|
30
|
+
|
|
31
|
+
# Files that might appear in the root of a volume
|
|
32
|
+
.DocumentRevisions-V100
|
|
33
|
+
.fseventsd
|
|
34
|
+
.Spotlight-V100
|
|
35
|
+
.TemporaryItems
|
|
36
|
+
.Trashes
|
|
37
|
+
.VolumeIcon.icns
|
|
38
|
+
.com.apple.timemachine.donotpresent
|
|
39
|
+
|
|
40
|
+
# Directories potentially created on remote AFP share
|
|
41
|
+
.AppleDB
|
|
42
|
+
.AppleDesktop
|
|
43
|
+
Network Trash Folder
|
|
44
|
+
Temporary Items
|
|
45
|
+
.apdisk
|
|
46
|
+
|
|
47
|
+
### macOS Patch ###
|
|
48
|
+
# iCloud generated files
|
|
49
|
+
*.icloud
|
|
50
|
+
|
|
51
|
+
### Python ###
|
|
52
|
+
# Byte-compiled / optimized / DLL files
|
|
53
|
+
__pycache__/
|
|
54
|
+
*.py[cod]
|
|
55
|
+
*$py.class
|
|
56
|
+
|
|
57
|
+
# C extensions
|
|
58
|
+
*.so
|
|
59
|
+
|
|
60
|
+
# Distribution / packaging
|
|
61
|
+
.Python
|
|
62
|
+
build/
|
|
63
|
+
develop-eggs/
|
|
64
|
+
dist/
|
|
65
|
+
downloads/
|
|
66
|
+
eggs/
|
|
67
|
+
.eggs/
|
|
68
|
+
lib/
|
|
69
|
+
lib64/
|
|
70
|
+
parts/
|
|
71
|
+
sdist/
|
|
72
|
+
var/
|
|
73
|
+
wheels/
|
|
74
|
+
share/python-wheels/
|
|
75
|
+
*.egg-info/
|
|
76
|
+
.installed.cfg
|
|
77
|
+
*.egg
|
|
78
|
+
MANIFEST
|
|
79
|
+
|
|
80
|
+
# PyInstaller
|
|
81
|
+
# Usually these files are written by a python script from a template
|
|
82
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
83
|
+
*.manifest
|
|
84
|
+
*.spec
|
|
85
|
+
|
|
86
|
+
# Installer logs
|
|
87
|
+
pip-log.txt
|
|
88
|
+
pip-delete-this-directory.txt
|
|
89
|
+
|
|
90
|
+
# Unit test / coverage reports
|
|
91
|
+
htmlcov/
|
|
92
|
+
.tox/
|
|
93
|
+
.nox/
|
|
94
|
+
.coverage
|
|
95
|
+
.coverage.*
|
|
96
|
+
.cache
|
|
97
|
+
nosetests.xml
|
|
98
|
+
coverage.xml
|
|
99
|
+
*.cover
|
|
100
|
+
*.py,cover
|
|
101
|
+
.hypothesis/
|
|
102
|
+
.pytest_cache/
|
|
103
|
+
cover/
|
|
104
|
+
|
|
105
|
+
# Translations
|
|
106
|
+
*.mo
|
|
107
|
+
*.pot
|
|
108
|
+
|
|
109
|
+
# Django stuff:
|
|
110
|
+
*.log
|
|
111
|
+
local_settings.py
|
|
112
|
+
db.sqlite3
|
|
113
|
+
db.sqlite3-journal
|
|
114
|
+
|
|
115
|
+
# Flask stuff:
|
|
116
|
+
instance/
|
|
117
|
+
.webassets-cache
|
|
118
|
+
|
|
119
|
+
# Scrapy stuff:
|
|
120
|
+
.scrapy
|
|
121
|
+
|
|
122
|
+
# Sphinx documentation
|
|
123
|
+
docs/_build/
|
|
124
|
+
|
|
125
|
+
# PyBuilder
|
|
126
|
+
.pybuilder/
|
|
127
|
+
target/
|
|
128
|
+
|
|
129
|
+
# Jupyter Notebook
|
|
130
|
+
.ipynb_checkpoints
|
|
131
|
+
|
|
132
|
+
# IPython
|
|
133
|
+
profile_default/
|
|
134
|
+
ipython_config.py
|
|
135
|
+
|
|
136
|
+
# pyenv
|
|
137
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
138
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
139
|
+
# .python-version
|
|
140
|
+
|
|
141
|
+
# pipenv
|
|
142
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
143
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
144
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
145
|
+
# install all needed dependencies.
|
|
146
|
+
#Pipfile.lock
|
|
147
|
+
|
|
148
|
+
# poetry
|
|
149
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
150
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
151
|
+
# commonly ignored for libraries.
|
|
152
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
153
|
+
#poetry.lock
|
|
154
|
+
|
|
155
|
+
# pdm
|
|
156
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
157
|
+
#pdm.lock
|
|
158
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
159
|
+
# in version control.
|
|
160
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
161
|
+
.pdm.toml
|
|
162
|
+
|
|
163
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
164
|
+
__pypackages__/
|
|
165
|
+
|
|
166
|
+
# Celery stuff
|
|
167
|
+
celerybeat-schedule
|
|
168
|
+
celerybeat.pid
|
|
169
|
+
|
|
170
|
+
# SageMath parsed files
|
|
171
|
+
*.sage.py
|
|
172
|
+
|
|
173
|
+
# Environments
|
|
174
|
+
.env
|
|
175
|
+
.venv
|
|
176
|
+
env/
|
|
177
|
+
venv/
|
|
178
|
+
ENV/
|
|
179
|
+
env.bak/
|
|
180
|
+
venv.bak/
|
|
181
|
+
|
|
182
|
+
# Spyder project settings
|
|
183
|
+
.spyderproject
|
|
184
|
+
.spyproject
|
|
185
|
+
|
|
186
|
+
# Rope project settings
|
|
187
|
+
.ropeproject
|
|
188
|
+
|
|
189
|
+
# mkdocs documentation
|
|
190
|
+
/site
|
|
191
|
+
|
|
192
|
+
# mypy
|
|
193
|
+
.mypy_cache/
|
|
194
|
+
.dmypy.json
|
|
195
|
+
dmypy.json
|
|
196
|
+
|
|
197
|
+
# Pyre type checker
|
|
198
|
+
.pyre/
|
|
199
|
+
|
|
200
|
+
# pytype static type analyzer
|
|
201
|
+
.pytype/
|
|
202
|
+
|
|
203
|
+
# Cython debug symbols
|
|
204
|
+
cython_debug/
|
|
205
|
+
|
|
206
|
+
# PyCharm
|
|
207
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
208
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
209
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
210
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
211
|
+
#.idea/
|
|
212
|
+
|
|
213
|
+
### Python Patch ###
|
|
214
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
215
|
+
poetry.toml
|
|
216
|
+
|
|
217
|
+
# ruff
|
|
218
|
+
.ruff_cache/
|
|
219
|
+
|
|
220
|
+
# LSP config files
|
|
221
|
+
pyrightconfig.json
|
|
222
|
+
|
|
223
|
+
### VisualStudioCode ###
|
|
224
|
+
.vscode/*
|
|
225
|
+
!.vscode/settings.json
|
|
226
|
+
!.vscode/tasks.json
|
|
227
|
+
!.vscode/launch.json
|
|
228
|
+
!.vscode/extensions.json
|
|
229
|
+
!.vscode/*.code-snippets
|
|
230
|
+
|
|
231
|
+
# Local History for Visual Studio Code
|
|
232
|
+
.history/
|
|
233
|
+
|
|
234
|
+
# Built Visual Studio Code Extensions
|
|
235
|
+
*.vsix
|
|
236
|
+
|
|
237
|
+
### VisualStudioCode Patch ###
|
|
238
|
+
# Ignore all local history of files
|
|
239
|
+
.history
|
|
240
|
+
.ionide
|
|
241
|
+
|
|
242
|
+
### Windows ###
|
|
243
|
+
# Windows thumbnail cache files
|
|
244
|
+
Thumbs.db
|
|
245
|
+
Thumbs.db:encryptable
|
|
246
|
+
ehthumbs.db
|
|
247
|
+
ehthumbs_vista.db
|
|
248
|
+
|
|
249
|
+
# Dump file
|
|
250
|
+
*.stackdump
|
|
251
|
+
|
|
252
|
+
# Folder config file
|
|
253
|
+
[Dd]esktop.ini
|
|
254
|
+
|
|
255
|
+
# Recycle Bin used on file shares
|
|
256
|
+
$RECYCLE.BIN/
|
|
257
|
+
|
|
258
|
+
# Windows Installer files
|
|
259
|
+
*.cab
|
|
260
|
+
*.msi
|
|
261
|
+
*.msix
|
|
262
|
+
*.msm
|
|
263
|
+
*.msp
|
|
264
|
+
|
|
265
|
+
# Windows shortcuts
|
|
266
|
+
*.lnk
|
|
267
|
+
|
|
268
|
+
# End of https://www.toptal.com/developers/gitignore/api/linux,macos,python,visualstudiocode,windows
|
|
269
|
+
|
|
270
|
+
# IDEs & Editors
|
|
271
|
+
.idea/
|
|
272
|
+
*.swp
|
|
273
|
+
*.swo
|
|
274
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Welcome! This document provides technical guidelines and developer protocols for AI agents and human contributors working on `remote-ros-mcp`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Project Mission & Architecture
|
|
8
|
+
|
|
9
|
+
`remote-ros-mcp` is a production-grade **Model Context Protocol (MCP)** server designed to empower LLM coding agents working on ROS2 robotics systems. It bridges between LLM development environments and a remote robot running `wrosbridge` (C++17/ROS2 Jazzy gRPC Gateway).
|
|
10
|
+
|
|
11
|
+
### Key Architectural Tenets
|
|
12
|
+
1. **Separation of Concerns**:
|
|
13
|
+
- `grpc_client`: Clean gRPC transport layer communicating with `wrosbridge.v1` Protobuf services.
|
|
14
|
+
- `codecs`: Robust bidirectional CDR (Common Data Representation) <-> Python Dict/JSON serialization.
|
|
15
|
+
- `mcp_server`: FastMCP tools and resource endpoints consumed by AI agents.
|
|
16
|
+
- `testing`: Dedicated assertion, mocking, frequency measurement, and inspection toolsets.
|
|
17
|
+
- `cli`: Standalone CLI for diagnostics and verification without an MCP host.
|
|
18
|
+
2. **Zero-Local-ROS2 Dependency**:
|
|
19
|
+
- The MCP host environment does NOT require ROS2 (rclpy/rclcpp) installed locally. All communication is pure gRPC over TCP with optional TLS and API Key authentication.
|
|
20
|
+
3. **LLM-Friendly Interfaces**:
|
|
21
|
+
- No raw bytes exposed to LLM prompts unless requested. All payloads are parsed into standard JSON objects.
|
|
22
|
+
- Timeouts, cancellations, and long-running streaming operations are wrapped in safe request-response or sampling semantics.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Directory Layout
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
remote-ros-mcp/
|
|
30
|
+
├── AGENTS.md # Developer & Agent guidelines
|
|
31
|
+
├── pyproject.toml # uv & project dependencies
|
|
32
|
+
├── README.md / README_KO.md # Documentation
|
|
33
|
+
├── CHANGELOG.md # Semantic versioning change log
|
|
34
|
+
├── proto/ # wrosbridge Protobuf definitions
|
|
35
|
+
│ └── wrosbridge/v1/
|
|
36
|
+
├── scripts/
|
|
37
|
+
│ └── generate_protos.py # Script to generate Python gRPC stubs
|
|
38
|
+
├── src/
|
|
39
|
+
│ └── remote_ros_mcp/
|
|
40
|
+
│ ├── __init__.py
|
|
41
|
+
│ ├── cli.py # CLI entrypoint
|
|
42
|
+
│ ├── config.py # Environment & connection settings
|
|
43
|
+
│ ├── proto/ # Compiled protobuf stubs (wrosbridge_pb2)
|
|
44
|
+
│ ├── codecs/ # ROS2 CDR <-> JSON encoders/decoders
|
|
45
|
+
│ │ ├── base.py
|
|
46
|
+
│ │ ├── standard.py # std_msgs, geometry_msgs, sensor_msgs, etc.
|
|
47
|
+
│ │ └── registry.py
|
|
48
|
+
│ ├── client/ # wrosbridge gRPC client wrappers
|
|
49
|
+
│ │ ├── client.py
|
|
50
|
+
│ │ ├── health.py
|
|
51
|
+
│ │ ├── admin.py
|
|
52
|
+
│ │ ├── topic.py
|
|
53
|
+
│ │ ├── service.py
|
|
54
|
+
│ │ └── action.py
|
|
55
|
+
│ ├── server/ # FastMCP server definition & tools
|
|
56
|
+
│ │ ├── app.py
|
|
57
|
+
│ │ ├── tools_graph.py
|
|
58
|
+
│ │ ├── tools_data.py
|
|
59
|
+
│ │ ├── tools_action.py
|
|
60
|
+
│ │ └── tools_test.py # Verification & test tools
|
|
61
|
+
│ └── utils/
|
|
62
|
+
│ ├── errors.py
|
|
63
|
+
│ └── ring_buffer.py
|
|
64
|
+
└── tests/
|
|
65
|
+
├── conftest.py
|
|
66
|
+
├── mock_server.py # Mock wrosbridge gRPC server for testing
|
|
67
|
+
├── test_codecs.py
|
|
68
|
+
├── test_client.py
|
|
69
|
+
├── test_tools.py
|
|
70
|
+
├── test_verification.py
|
|
71
|
+
└── test_cli.py
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 3. TDD & Testing Protocols
|
|
77
|
+
|
|
78
|
+
1. **Test-First Discipline**:
|
|
79
|
+
- Every tool, codec, and client method must have comprehensive unit tests.
|
|
80
|
+
- Use `tests/mock_server.py` to simulate all `wrosbridge.v1` gRPC endpoints (`Health`, `AdminService`, `TopicService`, `ServiceService`, `ActionService`).
|
|
81
|
+
- Run tests via `uv run pytest` before committing or finalizing any feature.
|
|
82
|
+
2. **Deterministic & Fast**:
|
|
83
|
+
- Do NOT depend on a live robot or network connectivity for unit tests. All tests must pass in an isolated CI/offline environment.
|
|
84
|
+
3. **Coverage & Edge Cases**:
|
|
85
|
+
- Test invalid payloads, unsupported message types, timeout expirations, connection cancellations, and malformed inputs.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 4. Code Quality & Standards
|
|
90
|
+
|
|
91
|
+
1. **Linting & Formatting**:
|
|
92
|
+
- Code must format cleanly with `ruff check .` and `ruff format .`.
|
|
93
|
+
- Maintain static typing consistency with `mypy src`.
|
|
94
|
+
2. **Comment & Documentation Hygiene**:
|
|
95
|
+
- Comments must be concise and explain *why*, not *what*.
|
|
96
|
+
- Never leave agent monologues, debugging breadcrumbs, or unmaintained comments in the codebase.
|
|
97
|
+
- Keep docstrings compliant with Google Python style.
|
|
98
|
+
3. **CLI Design Guidelines (`clig.dev`)**:
|
|
99
|
+
- Output clean machine-readable data to `stdout` (support `--json`).
|
|
100
|
+
- Route diagnostic logs and progress indicators strictly to `stderr`.
|
|
101
|
+
- Use non-zero exit codes for failures: `0` (Success), `1` (General error), `2` (Invalid argument / configuration).
|
|
102
|
+
- Ensure non-interactive safe execution (`--no-input`).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 5. Security & Error Handling
|
|
107
|
+
|
|
108
|
+
1. **Never Log Sensitive Credentials**:
|
|
109
|
+
- Do not print API keys or token strings in logs or stdout.
|
|
110
|
+
2. **Standardized Error Responses**:
|
|
111
|
+
- Follow standard gRPC status mapping and clear error messages with actionable hints for LLM agents.
|
|
112
|
+
- Catch network errors and wrap them in friendly `BridgeConnectionError`, `CodecError`, or `ServiceUnavailableError`.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-09-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Ecosystem Integration (`wpycli`, `wpyconf`, `wpylog`)**:
|
|
12
|
+
- Replaced ad-hoc CLI/config with the `wpy` library suite.
|
|
13
|
+
- **`wpycli`**: Clean command hierarchy, flag sets, terminal styling, and stdout/stderr separation.
|
|
14
|
+
- **`wpyconf` (`wconfig`)**: Multi-source configuration layering and platform user config directories.
|
|
15
|
+
- **`wpylog` (`wlogger`)**: Unified structured logging for runtime diagnostics.
|
|
16
|
+
- **Command Alias `rrmcp`**: Added `rrmcp` entrypoint alias in `pyproject.toml` for fast invocation (`uv run rrmcp ...`).
|
|
17
|
+
- **Comprehensive `.gitignore` Generated via `iggen`**: Standardized multi-platform rules for Linux, macOS, Windows, Python, and VS Code.
|
|
18
|
+
- **Configuration File Management (`remote-ros-mcp config`)**:
|
|
19
|
+
- Platform-standard configuration directory resolution (XDG on Linux, Application Support on macOS, AppData on Windows).
|
|
20
|
+
- Subcommands: `init` (create default file), `path` (print location), `show` (display active/file config with `--json`), `set` (modify and type-cast settings).
|
|
21
|
+
- Layered configuration hierarchy: `CLI Flags > Environment Variables > config.json > Defaults`.
|
|
22
|
+
- **MCP Server Core**: FastMCP-based standard Model Context Protocol server exposing ROS2 robotics endpoints via stdio transport.
|
|
23
|
+
- **wrosbridge gRPC Gateway Integration**:
|
|
24
|
+
- Full client support for `Health`, `AdminService`, `TopicService`, `ServiceService`, and `ActionService`.
|
|
25
|
+
- Secure transport via optional TLS and API Key header (`x-api-key`) authentication.
|
|
26
|
+
- **Bidirectional ROS2 CDR Codec Engine**:
|
|
27
|
+
- Low-level `CDRWriter` and `CDRReader` supporting Little-Endian CDR serialization.
|
|
28
|
+
- Native standard codecs for `std_msgs` (String, Bool, Int32/64, Float32/64), `geometry_msgs` (Twist, Vector3, Point, Pose, Quaternion), `std_srvs` (SetBool, Trigger), and `example_interfaces` (AddTwoInts).
|
|
29
|
+
- Robust `FallbackCodec` for arbitrary payloads and schema-less message handling.
|
|
30
|
+
- **Graph & Introspection Tools**:
|
|
31
|
+
- `ros2_health_check`: Verify remote gateway status.
|
|
32
|
+
- `ros2_get_nodes`: Discover active ROS2 nodes, namespaces, pub/sub topics, and services.
|
|
33
|
+
- `ros2_get_topics`: Discover topic list and publisher/subscriber mapping.
|
|
34
|
+
- `ros2_get_services`: List available services.
|
|
35
|
+
- `ros2_get_parameters` / `ros2_set_parameters`: Real-time node parameter management.
|
|
36
|
+
- `ros2_lookup_tf`: Geometric coordinate transformation lookup between reference frames.
|
|
37
|
+
- **Data Exchange Tools**:
|
|
38
|
+
- `ros2_topic_publish`: Publish JSON payloads directly to ROS2 topics.
|
|
39
|
+
- `ros2_topic_echo`: Sample recent N messages or listen to live topic streams.
|
|
40
|
+
- `ros2_call_service`: Synchronously invoke ROS2 services with timeout protection.
|
|
41
|
+
- `ros2_action_send_goal`: Asynchronous goal dispatch and automated completion waiting for ROS2 Actions.
|
|
42
|
+
- `ros2_action_cancel_goal`: Cancel executing action goals.
|
|
43
|
+
- **Testing & Verification Suite**:
|
|
44
|
+
- `ros2_assert_topic_published`: Python condition-based topic publication assertion for automated code validation.
|
|
45
|
+
- `ros2_measure_topic_hz`: Publishing frequency (Hz), average period, and jitter measurements.
|
|
46
|
+
- `ros2_mock_publish_sequence`: Sequence injector to stimulate and verify subscriber node behavior.
|
|
47
|
+
- `ros2_record_and_inspect`: Topic data recorder and preview summarizer.
|
|
48
|
+
- **MCP Resources**:
|
|
49
|
+
- `ros2://health`: Gateway connection and serving status.
|
|
50
|
+
- `ros2://graph/nodes`: Live ROS2 graph nodes.
|
|
51
|
+
- `ros2://graph/topics`: Live ROS2 topic list.
|
|
52
|
+
- **CLI Utility**:
|
|
53
|
+
- `remote-ros-mcp run`: Launch MCP stdio server.
|
|
54
|
+
- `remote-ros-mcp test-connection`: Standalone health & connection diagnostics (`--json` supported).
|
|
55
|
+
- `remote-ros-mcp inspect`: Standalone node, topic, and service discovery (`--json` supported).
|
|
56
|
+
- **Testing Infrastructure**:
|
|
57
|
+
- In-memory `MockWrosbridgeServer` enabling 100% offline, deterministic TDD test suite.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 Robotics & AI Team
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|