scry-connect 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.
Files changed (98) hide show
  1. scry_connect-0.1.0/.gitignore +118 -0
  2. scry_connect-0.1.0/CHANGELOG.md +50 -0
  3. scry_connect-0.1.0/CHANGELOG.rst +48 -0
  4. scry_connect-0.1.0/LICENSE +201 -0
  5. scry_connect-0.1.0/NOTICE +5 -0
  6. scry_connect-0.1.0/PKG-INFO +222 -0
  7. scry_connect-0.1.0/README.md +178 -0
  8. scry_connect-0.1.0/config/default.yaml +31 -0
  9. scry_connect-0.1.0/docs/BLOOM_RELEASE.md +322 -0
  10. scry_connect-0.1.0/docs/PYPI_SETUP.md +148 -0
  11. scry_connect-0.1.0/docs/ros2-cmds/README.md +30 -0
  12. scry_connect-0.1.0/docs/ros2-cmds/ros2_action.md +91 -0
  13. scry_connect-0.1.0/docs/ros2-cmds/ros2_component.md +104 -0
  14. scry_connect-0.1.0/docs/ros2-cmds/ros2_control.md +238 -0
  15. scry_connect-0.1.0/docs/ros2-cmds/ros2_daemon.md +60 -0
  16. scry_connect-0.1.0/docs/ros2-cmds/ros2_doctor_wtf.md +127 -0
  17. scry_connect-0.1.0/docs/ros2-cmds/ros2_extensions.md +72 -0
  18. scry_connect-0.1.0/docs/ros2-cmds/ros2_lifecycle.md +89 -0
  19. scry_connect-0.1.0/docs/ros2-cmds/ros2_multicast.md +41 -0
  20. scry_connect-0.1.0/docs/ros2-cmds/ros2_param.md +150 -0
  21. scry_connect-0.1.0/docs/ros2-cmds/ros2_pkg.md +107 -0
  22. scry_connect-0.1.0/docs/ros2-cmds/ros2_service.md +135 -0
  23. scry_connect-0.1.0/docs/ros2-cmds/ros2_topic.md +191 -0
  24. scry_connect-0.1.0/launch/scry_connect_launch.xml +30 -0
  25. scry_connect-0.1.0/package.xml +116 -0
  26. scry_connect-0.1.0/pyproject.toml +159 -0
  27. scry_connect-0.1.0/resource/scry_connect +0 -0
  28. scry_connect-0.1.0/scry_connect/__init__.py +3 -0
  29. scry_connect-0.1.0/scry_connect/_version.py +24 -0
  30. scry_connect-0.1.0/scry_connect/adapters/__init__.py +29 -0
  31. scry_connect-0.1.0/scry_connect/adapters/env_config.py +34 -0
  32. scry_connect-0.1.0/scry_connect/adapters/file_token_store.py +64 -0
  33. scry_connect-0.1.0/scry_connect/adapters/rclpy_runtime.py +82 -0
  34. scry_connect-0.1.0/scry_connect/adapters/socket_network_probe.py +39 -0
  35. scry_connect-0.1.0/scry_connect/adapters/zeroconf_advertiser.py +90 -0
  36. scry_connect-0.1.0/scry_connect/cli.py +339 -0
  37. scry_connect-0.1.0/scry_connect/config.py +106 -0
  38. scry_connect-0.1.0/scry_connect/managers/__init__.py +85 -0
  39. scry_connect-0.1.0/scry_connect/managers/action.py +118 -0
  40. scry_connect-0.1.0/scry_connect/managers/bag.py +52 -0
  41. scry_connect-0.1.0/scry_connect/managers/behavior_tree.py +467 -0
  42. scry_connect-0.1.0/scry_connect/managers/component.py +106 -0
  43. scry_connect-0.1.0/scry_connect/managers/control.py +260 -0
  44. scry_connect-0.1.0/scry_connect/managers/daemon.py +25 -0
  45. scry_connect-0.1.0/scry_connect/managers/dds.py +133 -0
  46. scry_connect-0.1.0/scry_connect/managers/diagnostics.py +520 -0
  47. scry_connect-0.1.0/scry_connect/managers/docker.py +257 -0
  48. scry_connect-0.1.0/scry_connect/managers/doctor.py +72 -0
  49. scry_connect-0.1.0/scry_connect/managers/errors.py +21 -0
  50. scry_connect-0.1.0/scry_connect/managers/experiments.py +369 -0
  51. scry_connect-0.1.0/scry_connect/managers/extensions.py +28 -0
  52. scry_connect-0.1.0/scry_connect/managers/interface.py +36 -0
  53. scry_connect-0.1.0/scry_connect/managers/lifecycle.py +117 -0
  54. scry_connect-0.1.0/scry_connect/managers/multicast.py +71 -0
  55. scry_connect-0.1.0/scry_connect/managers/node.py +44 -0
  56. scry_connect-0.1.0/scry_connect/managers/param.py +234 -0
  57. scry_connect-0.1.0/scry_connect/managers/pkg.py +107 -0
  58. scry_connect-0.1.0/scry_connect/managers/process.py +681 -0
  59. scry_connect-0.1.0/scry_connect/managers/ros_types.py +344 -0
  60. scry_connect-0.1.0/scry_connect/managers/safe_filter.py +57 -0
  61. scry_connect-0.1.0/scry_connect/managers/service.py +146 -0
  62. scry_connect-0.1.0/scry_connect/managers/shell_runner.py +97 -0
  63. scry_connect-0.1.0/scry_connect/managers/system.py +574 -0
  64. scry_connect-0.1.0/scry_connect/managers/teleop.py +200 -0
  65. scry_connect-0.1.0/scry_connect/managers/tf.py +171 -0
  66. scry_connect-0.1.0/scry_connect/managers/topic.py +768 -0
  67. scry_connect-0.1.0/scry_connect/managers/watcher.py +348 -0
  68. scry_connect-0.1.0/scry_connect/ports/__init__.py +27 -0
  69. scry_connect-0.1.0/scry_connect/ports/config.py +21 -0
  70. scry_connect-0.1.0/scry_connect/ports/network_probe.py +17 -0
  71. scry_connect-0.1.0/scry_connect/ports/ros_runtime.py +42 -0
  72. scry_connect-0.1.0/scry_connect/ports/service_advertiser.py +32 -0
  73. scry_connect-0.1.0/scry_connect/ports/token_store.py +25 -0
  74. scry_connect-0.1.0/scry_connect/rate_limiter.py +29 -0
  75. scry_connect-0.1.0/scry_connect/resources/__init__.py +1 -0
  76. scry_connect-0.1.0/scry_connect/resources/handlers.py +36 -0
  77. scry_connect-0.1.0/scry_connect/ros_connect.py +230 -0
  78. scry_connect-0.1.0/scry_connect/safety.py +172 -0
  79. scry_connect-0.1.0/scry_connect/security.py +265 -0
  80. scry_connect-0.1.0/scry_connect/server.py +698 -0
  81. scry_connect-0.1.0/scry_connect/streaming/__init__.py +1 -0
  82. scry_connect-0.1.0/scry_connect/streaming/sse.py +303 -0
  83. scry_connect-0.1.0/scry_connect/tools/__init__.py +5 -0
  84. scry_connect-0.1.0/scry_connect/tools/registry.py +1911 -0
  85. scry_connect-0.1.0/setup.cfg +14 -0
  86. scry_connect-0.1.0/setup.py +119 -0
  87. scry_connect-0.1.0/tests/__init__.py +0 -0
  88. scry_connect-0.1.0/tests/test_behavior_tree.py +181 -0
  89. scry_connect-0.1.0/tests/test_config.py +20 -0
  90. scry_connect-0.1.0/tests/test_ports.py +165 -0
  91. scry_connect-0.1.0/tests/test_rate_limiter.py +32 -0
  92. scry_connect-0.1.0/tests/test_ros_types.py +111 -0
  93. scry_connect-0.1.0/tests/test_safe_filter.py +39 -0
  94. scry_connect-0.1.0/tests/test_safety.py +61 -0
  95. scry_connect-0.1.0/tests/test_security.py +160 -0
  96. scry_connect-0.1.0/tests/test_shell_runner.py +35 -0
  97. scry_connect-0.1.0/tests/test_skill_tool_references.py +98 -0
  98. scry_connect-0.1.0/tests/test_tools_registry.py +177 -0
@@ -0,0 +1,118 @@
1
+ # Shared .gitignore baseline. Each repo extends this with its own
2
+ # language/toolchain-specific entries (Python in scry-connect,
3
+ # Gradle/Android in scry-android, etc.)
4
+
5
+ # ── OS / editor noise ──────────────────────────────────────────────
6
+ .DS_Store
7
+ Thumbs.db
8
+ ehthumbs.db
9
+ desktop.ini
10
+
11
+ # JetBrains
12
+ .idea/
13
+ *.iml
14
+ *.iws
15
+
16
+ # VS Code
17
+ .vscode/
18
+ *.code-workspace
19
+
20
+ # Vim / Emacs
21
+ *.swp
22
+ *.swo
23
+ *~
24
+ \#*\#
25
+ .\#*
26
+
27
+ # Sublime
28
+ *.sublime-project
29
+ *.sublime-workspace
30
+
31
+ # ── Build / dependency artefacts ──────────────────────────────────
32
+ node_modules/
33
+ .cache/
34
+ .tmp/
35
+ .temp/
36
+ *.log
37
+ logs/
38
+
39
+ # ── Secrets — NEVER commit ────────────────────────────────────────
40
+ .env
41
+ .env.*
42
+ !.env.example
43
+ !.env.sample
44
+ *.pem
45
+ *.key
46
+ *.jks
47
+ *.keystore
48
+ *.p12
49
+ *.p8
50
+ *.mobileprovision
51
+ secrets/
52
+ credentials/
53
+
54
+ # ── Test / coverage ───────────────────────────────────────────────
55
+ .coverage
56
+ .coverage.*
57
+ htmlcov/
58
+ coverage/
59
+ .nyc_output/
60
+ *.lcov
61
+
62
+ # ── Misc ──────────────────────────────────────────────────────────
63
+ *.orig
64
+ *.bak
65
+ *.rej
66
+
67
+ # ── Python ─────────────────────────────────────────────────────────
68
+ __pycache__/
69
+ *.py[cod]
70
+ *$py.class
71
+ *.so
72
+
73
+ # Distribution / packaging
74
+ .Python
75
+ build/
76
+ develop-eggs/
77
+ dist/
78
+ downloads/
79
+ eggs/
80
+ .eggs/
81
+ lib/
82
+ lib64/
83
+ parts/
84
+ sdist/
85
+ var/
86
+ wheels/
87
+ *.egg-info/
88
+ *.egg
89
+ MANIFEST
90
+
91
+ # Virtual environments
92
+ .venv/
93
+ venv/
94
+ env/
95
+ ENV/
96
+ .python-version
97
+
98
+ # pytest
99
+ .pytest_cache/
100
+
101
+ # mypy
102
+ .mypy_cache/
103
+ .dmypy.json
104
+
105
+ # ruff
106
+ .ruff_cache/
107
+
108
+ # core dumps (e.g. from a crashed ros2 process)
109
+ core
110
+ core.*
111
+
112
+ # rosbags + recordings
113
+ *.db3
114
+ *.mcap
115
+ rosbag2_*/
116
+
117
+ # Generated by hatch-vcs at build time.
118
+ scry_connect/_version.py
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to **scry-connect** are documented here.
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
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Pre-commit hook configuration (ruff + ruff-format + generic hygiene
12
+ checks). Install with `pip install pre-commit && pre-commit install`.
13
+ - CI workflow on pull requests to `master`: lint (ruff) + build (sdist
14
+ + wheel).
15
+ - Release workflow on `v*` tags: builds + publishes to PyPI / TestPyPI
16
+ via OIDC Trusted Publishing, pushes Docker image to GHCR, creates a
17
+ GitHub Release with sdist + wheel attached.
18
+ - `Dockerfile` based on `ros:jazzy-ros-base` so rclpy + message types
19
+ ship inside the image.
20
+ - Apache 2.0 LICENSE, NOTICE, SECURITY.md, CONTRIBUTING.md, GitHub
21
+ issue + PR templates.
22
+ - ROS_DOMAIN_ID and ROS_DISTRO surfaced on the `/health` endpoint so
23
+ the Android discovery scan can distinguish multiple connects running
24
+ on the same host under different domains.
25
+ - mDNS instance name now includes the port (`<host>-<port>`) so two
26
+ connects on the same machine don't collide on registration.
27
+
28
+ ### Changed
29
+ - Project metadata polished for PyPI: author/maintainer separated,
30
+ full classifier list, project URLs, hatchling targets.
31
+ - Bulk lint + format pass to bring the codebase under ruff's check.
32
+ - Switched to dynamic versioning via `hatch-vcs`. Git tags like
33
+ `v0.1.0-beta.3` become PEP-440 `0.1.0b3` automatically; the version
34
+ is stamped into `scry_connect/_version.py` at build time.
35
+
36
+ ### Fixed
37
+ - Dockerfile: use UID 1001 for the `scry` user. UID 1000 collided
38
+ with the `ubuntu` user that ships in `ros:jazzy-ros-base`.
39
+ - Release workflow: `fetch-depth: 0` on the build-dist checkout so
40
+ hatch-vcs sees the git tag history.
41
+ - Docker workflow: install from the pre-built wheel artefact instead
42
+ of from source. Source installs inside the image fail because
43
+ `.git` isn't in the build context (which hatch-vcs needs).
44
+ - SSE stream no longer crashes when a topic uses an unknown ROS
45
+ message type (e.g. `nav2_msgs/action/NavigateToPose_FeedbackMessage`).
46
+ The handler now emits a clean `event: error` SSE frame.
47
+
48
+ ## [0.1.0] — unreleased
49
+
50
+ Initial release. See README.md for features and install instructions.
@@ -0,0 +1,48 @@
1
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2
+ Changelog for package scry_connect
3
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
+
5
+ This file is the ROS-specific changelog consumed by bloom-release when
6
+ building Debian packages. ``CHANGELOG.md`` is the source-of-truth for
7
+ PyPI / GHCR / GitHub Releases; both files are kept in sync but use
8
+ different formats because bloom and PyPI / GitHub each expect their
9
+ own conventions.
10
+
11
+ 0.1.0 (2026-05-16)
12
+ ------------------
13
+
14
+ Initial release.
15
+
16
+ * MCP (Model Context Protocol) server that exposes the ROS 2 graph
17
+ (topics, nodes, services, parameters, actions, lifecycle states,
18
+ diagnostics) as AI-callable tools.
19
+ * Pairs with the Scry Android app for natural-language robot
20
+ debugging — the AI proposes a tool call, the user approves, the
21
+ connect dispatches.
22
+ * HTTP + SSE transport for low-overhead streaming of topic data.
23
+ * Three auth modes:
24
+
25
+ * **open** — no token, LAN-only filter (default; mirrors
26
+ ``rosbridge`` / ``foxglove_bridge``)
27
+ * **token** — bearer token over HTTPS, QR pairing for the app
28
+ * **mTLS** — client-cert authentication for production deployments
29
+
30
+ * Write tools (publish, set parameter, lifecycle transition,
31
+ controller switch, etc.) require an explicit ``X-Scry-Confirm``
32
+ nonce minted by the app after the user approves the proposed
33
+ call.
34
+ * Token-bucket rate limiting (default 10 calls/sec) prevents
35
+ runaway AI loops from overwhelming the robot.
36
+ * mDNS / Zeroconf advertisement (``_scry._tcp.local.``) so the
37
+ Android app auto-discovers connects on the LAN.
38
+ * ``/health``, ``/mcp``, ``/stream``, ``/tools/categories``,
39
+ ``/auth/print_qr`` endpoints.
40
+ * Supports ROS 2 Jazzy, Humble, and Rolling; DDS-agnostic
41
+ (Fast-DDS, CycloneDDS, Connext, Zenoh).
42
+ * Distribution:
43
+
44
+ * ``apt install ros-jazzy-scry-connect`` (this changelog's audience)
45
+ * ``pip install scry-connect`` (PyPI)
46
+ * ``docker run ghcr.io/phaneron-robotics/scry-connect`` (GHCR)
47
+
48
+ * See ``CHANGELOG.md`` for the granular PR-by-PR development history.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Phaneron Robotics, Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ Scry
2
+ Copyright 2026 Phaneron Robotics, Inc.
3
+
4
+ This product includes software developed at
5
+ Phaneron Robotics, Inc. (https://www.phaneronrobotics.com/).
@@ -0,0 +1,222 @@
1
+ Metadata-Version: 2.4
2
+ Name: scry-connect
3
+ Version: 0.1.0
4
+ Summary: MCP server for ROS 2 — exposes robot capabilities as AI-callable tools
5
+ Project-URL: Homepage, https://github.com/phaneron-robotics/scry
6
+ Project-URL: Documentation, https://phaneron-robotics.github.io/scry-docs/
7
+ Project-URL: Repository, https://github.com/phaneron-robotics/scry-connect
8
+ Project-URL: Issues, https://github.com/phaneron-robotics/scry-connect/issues
9
+ Project-URL: Changelog, https://github.com/phaneron-robotics/scry-connect/blob/master/CHANGELOG.md
10
+ Author-email: "Phaneron Robotics, Inc." <info@phaneronrobotics.com>
11
+ Maintainer-email: Deep Kotadiya <deep@phaneronrobotics.com>
12
+ License: Apache-2.0
13
+ License-File: LICENSE
14
+ License-File: NOTICE
15
+ Keywords: agent,ai,debugging,fleet,introspection,mcp,rclpy,robotics,ros2
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: License :: OSI Approved :: Apache Software License
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Topic :: Scientific/Engineering
26
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
+ Classifier: Topic :: System :: Networking
28
+ Classifier: Typing :: Typed
29
+ Requires-Dist: mcp>=1.0.0
30
+ Requires-Dist: qrcode>=7.4
31
+ Requires-Dist: sse-starlette>=1.8.0
32
+ Requires-Dist: starlette>=0.36.0
33
+ Requires-Dist: uvicorn>=0.27.0
34
+ Requires-Dist: zeroconf>=0.131
35
+ Provides-Extra: dev
36
+ Requires-Dist: build>=1.0.0; extra == 'dev'
37
+ Requires-Dist: pre-commit>=3.6.0; extra == 'dev'
38
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
39
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
40
+ Requires-Dist: pytest>=7.0; extra == 'dev'
41
+ Requires-Dist: ruff>=0.2.0; extra == 'dev'
42
+ Requires-Dist: twine>=5.0.0; extra == 'dev'
43
+ Description-Content-Type: text/markdown
44
+
45
+ # scry-connect
46
+
47
+ MCP server for ROS 2 — exposes your robot's topics, nodes, services, parameters, actions, diagnostics, and introspection tools to AI agents.
48
+
49
+ Pairs with the Scry Android app.
50
+
51
+ ## Install
52
+
53
+ Pick the path that matches how your robot is deployed. All three install
54
+ the same `scry-connect` from PyPI — they just package it differently.
55
+
56
+ ### Option A — one-line installer (Docker or bare-metal, auto-detect)
57
+
58
+ ```bash
59
+ curl -fsSL https://raw.githubusercontent.com/phaneron-robotics/scry-connect/master/install.sh | bash
60
+ ```
61
+
62
+ The script detects your ROS distro, picks Docker if available else pip,
63
+ writes a systemd `--user` unit, starts the service, and prints a
64
+ pairing QR. Re-running upgrades in place. Mode override:
65
+ `SCRY_INSTALL_MODE=docker bash` or `SCRY_INSTALL_MODE=pip bash`.
66
+
67
+ ### Option B — sidecar Docker container
68
+
69
+ Drop into your existing `docker-compose.yml`:
70
+
71
+ ```yaml
72
+ services:
73
+ scry-connect:
74
+ image: ghcr.io/phaneron-robotics/scry-connect:${ROS_DISTRO:-jazzy}
75
+ network_mode: host
76
+ ipc: host
77
+ pid: host
78
+ restart: unless-stopped
79
+ environment:
80
+ - ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}
81
+ volumes:
82
+ - scry_config:/home/scry/.config/scry
83
+ - scry_audit:/var/log/scry
84
+
85
+ volumes:
86
+ scry_config:
87
+ scry_audit:
88
+ ```
89
+
90
+ A turnkey reference compose with every tunable surfaced lives at
91
+ [docker/docker-compose.yml](docker/docker-compose.yml).
92
+
93
+ | Tag | Resolves to |
94
+ |-----|------|
95
+ | `:humble`, `:jazzy`, `:kilted`, `:rolling` | Per-ROS-distro images (multi-arch: amd64 + arm64) |
96
+ | `:0.1.0-jazzy` | Pinned version on jazzy |
97
+ | `:latest` | Most recent stable release on the LTS distro (jazzy today) |
98
+
99
+ ### Option C — add scry-connect to your own robot image
100
+
101
+ If you already publish a robot Docker image, append one line to your
102
+ Dockerfile and run `scry-connect` alongside your existing nodes:
103
+
104
+ ```dockerfile
105
+ RUN pip install scry-connect
106
+ ```
107
+
108
+ No second ROS install required — `scry-connect` uses the `rclpy`
109
+ that's already in your image.
110
+
111
+ ### Option D — bare-metal pip (no Docker)
112
+
113
+ ```bash
114
+ source /opt/ros/$ROS_DISTRO/setup.bash
115
+ pip install --user scry-connect
116
+ scry-connect
117
+ ```
118
+
119
+ A reference [systemd user unit](install.sh) is written automatically
120
+ by Option A in pip mode.
121
+
122
+ Prereleases (alpha / beta / rc) live on TestPyPI:
123
+
124
+ ```bash
125
+ pip install -i https://test.pypi.org/simple/ scry-connect
126
+ ```
127
+
128
+ ## Run
129
+
130
+ ```bash
131
+ # Defaults to 0.0.0.0:5339 in open mode (LAN-only, no token).
132
+ scry-connect
133
+
134
+ # Common overrides
135
+ scry-connect --port 5339 --log-level INFO
136
+ scry-connect --token # token mode; prints QR for the phone
137
+ scry-connect --mtls # client-cert mode
138
+ scry-connect --skip-ros-check # smoke test without rclpy
139
+ ```
140
+
141
+ ## Endpoints
142
+
143
+ | Path | Method | Description |
144
+ |------|--------|-------------|
145
+ | `/mcp` | POST/GET | MCP JSON-RPC (Streamable HTTP) |
146
+ | `/stream?topic=/odom&rate=10` | GET | SSE topic stream |
147
+ | `/health` | GET | Health check |
148
+
149
+ ## Tools exposed
150
+
151
+ 22 tools grouped into: Topics, Nodes, Services, Parameters, Actions, Diagnostics, Logs, Introspection, System. See [docs/mcp-tools-reference.md](../docs/mcp-tools-reference.md).
152
+
153
+ ## Config (env vars)
154
+
155
+ | Variable | Default | Description |
156
+ |----------|---------|-------------|
157
+ | `SCRY_HOST` | `0.0.0.0` | Bind address |
158
+ | `SCRY_PORT` | `5339` | HTTP port |
159
+ | `SCRY_RATE_LIMIT` | `10` | Tool calls per second |
160
+ | `SCRY_LOG_LEVEL` | `INFO` | Log level |
161
+ | `SCRY_AUTH_MODE` | `open` | `open` \| `token` \| `mtls` |
162
+ | `SCRY_TOKEN` | (unset) | Force token mode with this shared token |
163
+ | `SCRY_PUBLIC_INTERNET` | `0` | In open mode, accept non-LAN callers |
164
+ | `SCRY_REQUIRE_DEADMAN` | `0` | Writes need `/scry/enable` heartbeat |
165
+ | `SCRY_AUDIT_LOG` | (unset) | Append JSONL audit trail to this path |
166
+ | `SCRY_MDNS` | `1` | Advertise `_scry._tcp` via Zeroconf |
167
+ | `ROS_DOMAIN_ID` | (inherited) | ROS 2 domain ID |
168
+ | `RMW_IMPLEMENTATION` | (inherited) | DDS/RMW implementation |
169
+
170
+ ## Development
171
+
172
+ ### Setup
173
+
174
+ ```bash
175
+ # Editable install + dev dependencies
176
+ pip install -e ".[dev]"
177
+
178
+ # Install pre-commit hooks (run once per fresh clone)
179
+ pip install pre-commit
180
+ pre-commit install
181
+ ```
182
+
183
+ After `pre-commit install`, every `git commit` automatically runs `ruff`
184
+ (auto-fix) + `ruff format` on the staged Python files. If anything was
185
+ fixed, the commit is rejected — `git add` the fixes and commit again.
186
+
187
+ ### Manual lint commands
188
+
189
+ ```bash
190
+ # Run pre-commit against every file (not just staged)
191
+ pre-commit run --all-files
192
+
193
+ # Run ruff directly
194
+ ruff check scry_connect tests # report issues
195
+ ruff check --fix scry_connect tests # auto-fix what can be fixed
196
+ ruff format scry_connect tests # apply formatter
197
+ ```
198
+
199
+ ### Tests
200
+
201
+ ```bash
202
+ pytest tests/
203
+ ```
204
+
205
+ Note: many tests require a working ROS 2 environment (rclpy). In CI we
206
+ only run lint + build; tests run on a real robot or local ROS 2 install.
207
+
208
+ ### CI / release pipeline
209
+
210
+ | Workflow | Trigger | What it does |
211
+ |----------|---------|--------------|
212
+ | **CI** | PR to master, push to master, manual | ruff check + format check, `python -m build` (sdist + wheel) |
213
+ | **Release** | Tag matching `v*`, manual | Build, publish to PyPI / TestPyPI (Trusted Publishing — no API key needed), push to `ghcr.io/phaneron-robotics/scry-connect`, create GitHub Release |
214
+ | **Dependency Graph** | Auto-managed | Tracks third-party deps for security alerts |
215
+
216
+ To cut a release: bump `version` in `pyproject.toml`, merge the bump PR,
217
+ then tag the merge commit. Prerelease tags (`v0.1.0-beta.1`) route to
218
+ TestPyPI + a prerelease GitHub Release. Stable tags (`v0.1.0`) route
219
+ to PyPI proper and the Docker image gets the `latest` tag.
220
+
221
+ See [docs/PYPI_SETUP.md](docs/PYPI_SETUP.md) for the one-time PyPI
222
+ Trusted Publishing setup.