agenticros 0.0.1 → 0.1.1

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 (330) hide show
  1. package/LICENSE +192 -0
  2. package/README.md +90 -4
  3. package/dist/commands/config.d.ts +20 -0
  4. package/dist/commands/config.d.ts.map +1 -0
  5. package/dist/commands/config.js +179 -0
  6. package/dist/commands/config.js.map +1 -0
  7. package/dist/commands/doctor.d.ts +33 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +232 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/down.d.ts +15 -0
  12. package/dist/commands/down.d.ts.map +1 -0
  13. package/dist/commands/down.js +91 -0
  14. package/dist/commands/down.js.map +1 -0
  15. package/dist/commands/init.d.ts +21 -0
  16. package/dist/commands/init.d.ts.map +1 -0
  17. package/dist/commands/init.js +259 -0
  18. package/dist/commands/init.js.map +1 -0
  19. package/dist/commands/logs.d.ts +18 -0
  20. package/dist/commands/logs.d.ts.map +1 -0
  21. package/dist/commands/logs.js +67 -0
  22. package/dist/commands/logs.js.map +1 -0
  23. package/dist/commands/status.d.ts +12 -0
  24. package/dist/commands/status.d.ts.map +1 -0
  25. package/dist/commands/status.js +56 -0
  26. package/dist/commands/status.js.map +1 -0
  27. package/dist/commands/up.d.ts +20 -0
  28. package/dist/commands/up.d.ts.map +1 -0
  29. package/dist/commands/up.js +70 -0
  30. package/dist/commands/up.js.map +1 -0
  31. package/dist/index.d.ts +12 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +107 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/menu.d.ts +9 -0
  36. package/dist/menu.d.ts.map +1 -0
  37. package/dist/menu.js +96 -0
  38. package/dist/menu.js.map +1 -0
  39. package/dist/runners/real-robot.d.ts +15 -0
  40. package/dist/runners/real-robot.d.ts.map +1 -0
  41. package/dist/runners/real-robot.js +46 -0
  42. package/dist/runners/real-robot.js.map +1 -0
  43. package/dist/runners/sim.d.ts +19 -0
  44. package/dist/runners/sim.d.ts.map +1 -0
  45. package/dist/runners/sim.js +53 -0
  46. package/dist/runners/sim.js.map +1 -0
  47. package/dist/util/env.d.ts +24 -0
  48. package/dist/util/env.d.ts.map +1 -0
  49. package/dist/util/env.js +53 -0
  50. package/dist/util/env.js.map +1 -0
  51. package/dist/util/logger.d.ts +24 -0
  52. package/dist/util/logger.d.ts.map +1 -0
  53. package/dist/util/logger.js +62 -0
  54. package/dist/util/logger.js.map +1 -0
  55. package/dist/util/paths.d.ts +57 -0
  56. package/dist/util/paths.d.ts.map +1 -0
  57. package/dist/util/paths.js +132 -0
  58. package/dist/util/paths.js.map +1 -0
  59. package/dist/util/pidfile.d.ts +16 -0
  60. package/dist/util/pidfile.d.ts.map +1 -0
  61. package/dist/util/pidfile.js +63 -0
  62. package/dist/util/pidfile.js.map +1 -0
  63. package/dist/util/state.d.ts +26 -0
  64. package/dist/util/state.d.ts.map +1 -0
  65. package/dist/util/state.js +55 -0
  66. package/dist/util/state.js.map +1 -0
  67. package/package.json +60 -1
  68. package/runtime/BUNDLE.json +11 -0
  69. package/runtime/LICENSE +192 -0
  70. package/runtime/README.md +273 -0
  71. package/runtime/docs/architecture.md +366 -0
  72. package/runtime/docs/cli.md +140 -0
  73. package/runtime/docs/memory.md +292 -0
  74. package/runtime/docs/robot-setup.md +347 -0
  75. package/runtime/package.json +28 -0
  76. package/runtime/packages/agenticros/agenticros-agenticros-0.0.1.tgz +0 -0
  77. package/runtime/packages/agenticros/openclaw.plugin.json +451 -0
  78. package/runtime/packages/agenticros/package.json +41 -0
  79. package/runtime/packages/agenticros/src/camera-snapshot-cache.ts +59 -0
  80. package/runtime/packages/agenticros/src/camera-snapshot-routes.ts +44 -0
  81. package/runtime/packages/agenticros/src/commands/estop.ts +41 -0
  82. package/runtime/packages/agenticros/src/commands/transport.ts +195 -0
  83. package/runtime/packages/agenticros/src/config-file.ts +136 -0
  84. package/runtime/packages/agenticros/src/config-page.ts +498 -0
  85. package/runtime/packages/agenticros/src/context/robot-context.ts +373 -0
  86. package/runtime/packages/agenticros/src/depth.ts +313 -0
  87. package/runtime/packages/agenticros/src/describer.ts +157 -0
  88. package/runtime/packages/agenticros/src/image-binary-trim.ts +16 -0
  89. package/runtime/packages/agenticros/src/index.ts +85 -0
  90. package/runtime/packages/agenticros/src/landing-page.ts +38 -0
  91. package/runtime/packages/agenticros/src/memory.ts +44 -0
  92. package/runtime/packages/agenticros/src/plugin-api.ts +173 -0
  93. package/runtime/packages/agenticros/src/plugin-image-base64.ts +69 -0
  94. package/runtime/packages/agenticros/src/preflight.ts +110 -0
  95. package/runtime/packages/agenticros/src/routes.ts +328 -0
  96. package/runtime/packages/agenticros/src/safety/validator.ts +43 -0
  97. package/runtime/packages/agenticros/src/service.ts +359 -0
  98. package/runtime/packages/agenticros/src/skill-api.ts +65 -0
  99. package/runtime/packages/agenticros/src/skill-loader.ts +146 -0
  100. package/runtime/packages/agenticros/src/teleop/page.ts +498 -0
  101. package/runtime/packages/agenticros/src/teleop/routes.ts +650 -0
  102. package/runtime/packages/agenticros/src/tools/index.ts +26 -0
  103. package/runtime/packages/agenticros/src/tools/ros2-action.ts +50 -0
  104. package/runtime/packages/agenticros/src/tools/ros2-camera.ts +221 -0
  105. package/runtime/packages/agenticros/src/tools/ros2-depth-distance.ts +58 -0
  106. package/runtime/packages/agenticros/src/tools/ros2-introspect.ts +62 -0
  107. package/runtime/packages/agenticros/src/tools/ros2-memory.ts +158 -0
  108. package/runtime/packages/agenticros/src/tools/ros2-param.ts +87 -0
  109. package/runtime/packages/agenticros/src/tools/ros2-publish.ts +52 -0
  110. package/runtime/packages/agenticros/src/tools/ros2-service.ts +46 -0
  111. package/runtime/packages/agenticros/src/tools/ros2-subscribe.ts +71 -0
  112. package/runtime/packages/agenticros/tsconfig.json +9 -0
  113. package/runtime/packages/agenticros-claude-code/README.md +260 -0
  114. package/runtime/packages/agenticros-claude-code/config.example.json +9 -0
  115. package/runtime/packages/agenticros-claude-code/dist/config.d.ts +8 -0
  116. package/runtime/packages/agenticros-claude-code/dist/config.d.ts.map +1 -0
  117. package/runtime/packages/agenticros-claude-code/dist/config.js +93 -0
  118. package/runtime/packages/agenticros-claude-code/dist/config.js.map +1 -0
  119. package/runtime/packages/agenticros-claude-code/dist/depth.d.ts +20 -0
  120. package/runtime/packages/agenticros-claude-code/dist/depth.d.ts.map +1 -0
  121. package/runtime/packages/agenticros-claude-code/dist/depth.js +126 -0
  122. package/runtime/packages/agenticros-claude-code/dist/depth.js.map +1 -0
  123. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts +6 -0
  124. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts.map +1 -0
  125. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js +36 -0
  126. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js.map +1 -0
  127. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts +33 -0
  128. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts.map +1 -0
  129. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js +134 -0
  130. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js.map +1 -0
  131. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts +43 -0
  132. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts.map +1 -0
  133. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js +73 -0
  134. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js.map +1 -0
  135. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts +58 -0
  136. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts.map +1 -0
  137. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js +251 -0
  138. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js.map +1 -0
  139. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts +61 -0
  140. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts.map +1 -0
  141. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js +268 -0
  142. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js.map +1 -0
  143. package/runtime/packages/agenticros-claude-code/dist/index.d.ts +3 -0
  144. package/runtime/packages/agenticros-claude-code/dist/index.d.ts.map +1 -0
  145. package/runtime/packages/agenticros-claude-code/dist/index.js +111 -0
  146. package/runtime/packages/agenticros-claude-code/dist/index.js.map +1 -0
  147. package/runtime/packages/agenticros-claude-code/dist/memory.d.ts +17 -0
  148. package/runtime/packages/agenticros-claude-code/dist/memory.d.ts.map +1 -0
  149. package/runtime/packages/agenticros-claude-code/dist/memory.js +44 -0
  150. package/runtime/packages/agenticros-claude-code/dist/memory.js.map +1 -0
  151. package/runtime/packages/agenticros-claude-code/dist/safety.d.ts +10 -0
  152. package/runtime/packages/agenticros-claude-code/dist/safety.d.ts.map +1 -0
  153. package/runtime/packages/agenticros-claude-code/dist/safety.js +34 -0
  154. package/runtime/packages/agenticros-claude-code/dist/safety.js.map +1 -0
  155. package/runtime/packages/agenticros-claude-code/dist/tools.d.ts +36 -0
  156. package/runtime/packages/agenticros-claude-code/dist/tools.d.ts.map +1 -0
  157. package/runtime/packages/agenticros-claude-code/dist/tools.js +777 -0
  158. package/runtime/packages/agenticros-claude-code/dist/tools.js.map +1 -0
  159. package/runtime/packages/agenticros-claude-code/dist/transport.d.ts +17 -0
  160. package/runtime/packages/agenticros-claude-code/dist/transport.d.ts.map +1 -0
  161. package/runtime/packages/agenticros-claude-code/dist/transport.js +46 -0
  162. package/runtime/packages/agenticros-claude-code/dist/transport.js.map +1 -0
  163. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts +42 -0
  164. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts.map +1 -0
  165. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js +114 -0
  166. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js.map +1 -0
  167. package/runtime/packages/agenticros-claude-code/package.json +29 -0
  168. package/runtime/packages/agenticros-claude-code/src/config.ts +96 -0
  169. package/runtime/packages/agenticros-claude-code/src/depth.ts +173 -0
  170. package/runtime/packages/agenticros-claude-code/src/find-object/coco-classes.ts +38 -0
  171. package/runtime/packages/agenticros-claude-code/src/find-object/find-object.ts +190 -0
  172. package/runtime/packages/agenticros-claude-code/src/follow-me/controller.ts +109 -0
  173. package/runtime/packages/agenticros-claude-code/src/follow-me/depth-loop.ts +420 -0
  174. package/runtime/packages/agenticros-claude-code/src/follow-me/detector.ts +303 -0
  175. package/runtime/packages/agenticros-claude-code/src/follow-me/loop.ts +330 -0
  176. package/runtime/packages/agenticros-claude-code/src/index.ts +125 -0
  177. package/runtime/packages/agenticros-claude-code/src/memory.ts +51 -0
  178. package/runtime/packages/agenticros-claude-code/src/safety.ts +44 -0
  179. package/runtime/packages/agenticros-claude-code/src/tools.ts +891 -0
  180. package/runtime/packages/agenticros-claude-code/src/transport.ts +58 -0
  181. package/runtime/packages/agenticros-claude-code/src/zero-shot/detector.ts +169 -0
  182. package/runtime/packages/agenticros-claude-code/tsconfig.json +9 -0
  183. package/runtime/packages/agenticros-claude-code/yolo-debug.mjs +106 -0
  184. package/runtime/packages/agenticros-gemini/README.md +139 -0
  185. package/runtime/packages/agenticros-gemini/package.json +28 -0
  186. package/runtime/packages/agenticros-gemini/scripts/smoke-api.mjs +42 -0
  187. package/runtime/packages/agenticros-gemini/src/chat.ts +139 -0
  188. package/runtime/packages/agenticros-gemini/src/config.ts +92 -0
  189. package/runtime/packages/agenticros-gemini/src/depth.ts +173 -0
  190. package/runtime/packages/agenticros-gemini/src/index.ts +58 -0
  191. package/runtime/packages/agenticros-gemini/src/memory.ts +32 -0
  192. package/runtime/packages/agenticros-gemini/src/safety.ts +44 -0
  193. package/runtime/packages/agenticros-gemini/src/tools.ts +516 -0
  194. package/runtime/packages/agenticros-gemini/src/transport.ts +58 -0
  195. package/runtime/packages/agenticros-gemini/tsconfig.json +8 -0
  196. package/runtime/packages/core/package.json +47 -0
  197. package/runtime/packages/core/src/banner.ts +32 -0
  198. package/runtime/packages/core/src/cmd-vel-twist.ts +31 -0
  199. package/runtime/packages/core/src/config.ts +279 -0
  200. package/runtime/packages/core/src/index.ts +54 -0
  201. package/runtime/packages/core/src/memory/__tests__/factory.test.ts +70 -0
  202. package/runtime/packages/core/src/memory/__tests__/local-provider.test.ts +195 -0
  203. package/runtime/packages/core/src/memory/__tests__/mem0-provider.test.ts +192 -0
  204. package/runtime/packages/core/src/memory/__tests__/smart-defaults.test.ts +46 -0
  205. package/runtime/packages/core/src/memory/factory.ts +63 -0
  206. package/runtime/packages/core/src/memory/index.ts +10 -0
  207. package/runtime/packages/core/src/memory/local/provider.ts +229 -0
  208. package/runtime/packages/core/src/memory/mem0/provider.ts +379 -0
  209. package/runtime/packages/core/src/memory/types.ts +96 -0
  210. package/runtime/packages/core/src/topic-utils.ts +95 -0
  211. package/runtime/packages/core/src/transport/factory.ts +47 -0
  212. package/runtime/packages/core/src/transport/local/conversion.ts +333 -0
  213. package/runtime/packages/core/src/transport/local/entities.ts +129 -0
  214. package/runtime/packages/core/src/transport/local/transport.ts +406 -0
  215. package/runtime/packages/core/src/transport/rosbridge/actions.ts +81 -0
  216. package/runtime/packages/core/src/transport/rosbridge/adapter.ts +157 -0
  217. package/runtime/packages/core/src/transport/rosbridge/client.ts +438 -0
  218. package/runtime/packages/core/src/transport/rosbridge/services.ts +41 -0
  219. package/runtime/packages/core/src/transport/rosbridge/topics.ts +60 -0
  220. package/runtime/packages/core/src/transport/rosbridge/types.ts +118 -0
  221. package/runtime/packages/core/src/transport/transport.ts +77 -0
  222. package/runtime/packages/core/src/transport/types.ts +137 -0
  223. package/runtime/packages/core/src/transport/webrtc/signaling-client.ts +196 -0
  224. package/runtime/packages/core/src/transport/webrtc/signaling-types.ts +130 -0
  225. package/runtime/packages/core/src/transport/webrtc/transport.ts +516 -0
  226. package/runtime/packages/core/src/transport/zenoh/adapter.ts +357 -0
  227. package/runtime/packages/core/src/transport/zenoh/cdr.ts +183 -0
  228. package/runtime/packages/core/src/transport/zenoh/keys.ts +51 -0
  229. package/runtime/packages/core/tsconfig.json +9 -0
  230. package/runtime/packages/ros-camera/package.json +30 -0
  231. package/runtime/packages/ros-camera/src/index.ts +13 -0
  232. package/runtime/packages/ros-camera/src/snapshot.ts +372 -0
  233. package/runtime/packages/ros-camera/tsconfig.json +9 -0
  234. package/runtime/pnpm-lock.yaml +5260 -0
  235. package/runtime/pnpm-workspace.yaml +2 -0
  236. package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/__init__.py +0 -0
  237. package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/agent_node.py +561 -0
  238. package/runtime/ros2_ws/src/agenticros_agent/package.xml +25 -0
  239. package/runtime/ros2_ws/src/agenticros_agent/resource/agenticros_agent +0 -0
  240. package/runtime/ros2_ws/src/agenticros_agent/setup.cfg +4 -0
  241. package/runtime/ros2_ws/src/agenticros_agent/setup.py +25 -0
  242. package/runtime/ros2_ws/src/agenticros_bringup/README.md +128 -0
  243. package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/__init__.py +1 -0
  244. package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/cmd_vel_relay.py +33 -0
  245. package/runtime/ros2_ws/src/agenticros_bringup/launch/cmd_vel_bridge.launch.py +58 -0
  246. package/runtime/ros2_ws/src/agenticros_bringup/launch/gazebo_turtlebot3.launch.py +69 -0
  247. package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo.launch.py +55 -0
  248. package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo_rviz.launch.py +48 -0
  249. package/runtime/ros2_ws/src/agenticros_bringup/launch/realsense_rosbridge.launch.py +154 -0
  250. package/runtime/ros2_ws/src/agenticros_bringup/launch/rosbridge_gazebo.launch.py +54 -0
  251. package/runtime/ros2_ws/src/agenticros_bringup/launch/rviz.launch.py +38 -0
  252. package/runtime/ros2_ws/src/agenticros_bringup/launch/turtlebot3_gazebo_rviz.launch.py +42 -0
  253. package/runtime/ros2_ws/src/agenticros_bringup/package.xml +24 -0
  254. package/runtime/ros2_ws/src/agenticros_bringup/resource/agenticros_bringup +0 -0
  255. package/runtime/ros2_ws/src/agenticros_bringup/rviz/turtlebot3_agenticros.rviz +174 -0
  256. package/runtime/ros2_ws/src/agenticros_bringup/setup.cfg +4 -0
  257. package/runtime/ros2_ws/src/agenticros_bringup/setup.py +28 -0
  258. package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/__init__.py +0 -0
  259. package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/discovery_node.py +172 -0
  260. package/runtime/ros2_ws/src/agenticros_discovery/package.xml +22 -0
  261. package/runtime/ros2_ws/src/agenticros_discovery/resource/agenticros_discovery +0 -0
  262. package/runtime/ros2_ws/src/agenticros_discovery/setup.cfg +5 -0
  263. package/runtime/ros2_ws/src/agenticros_discovery/setup.py +25 -0
  264. package/runtime/ros2_ws/src/agenticros_follow_me/README.md +66 -0
  265. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__init__.py +1 -0
  266. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__main__.py +5 -0
  267. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follow_me_node.py +278 -0
  268. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follower_controller.py +631 -0
  269. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/person_tracker.py +635 -0
  270. package/runtime/ros2_ws/src/agenticros_follow_me/package.xml +22 -0
  271. package/runtime/ros2_ws/src/agenticros_follow_me/resource/agenticros_follow_me +0 -0
  272. package/runtime/ros2_ws/src/agenticros_follow_me/setup.py +25 -0
  273. package/runtime/ros2_ws/src/agenticros_msgs/CMakeLists.txt +26 -0
  274. package/runtime/ros2_ws/src/agenticros_msgs/msg/CapabilityManifest.msg +9 -0
  275. package/runtime/ros2_ws/src/agenticros_msgs/package.xml +22 -0
  276. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeGetStatus.srv +11 -0
  277. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetDistance.srv +4 -0
  278. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetTarget.srv +6 -0
  279. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStart.srv +5 -0
  280. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStop.srv +3 -0
  281. package/runtime/ros2_ws/src/agenticros_msgs/srv/GetCapabilities.srv +5 -0
  282. package/runtime/ros2_ws/src/agenticros_sim/CMakeLists.txt +24 -0
  283. package/runtime/ros2_ws/src/agenticros_sim/README.md +120 -0
  284. package/runtime/ros2_ws/src/agenticros_sim/config/agenticros-sim.config.json +28 -0
  285. package/runtime/ros2_ws/src/agenticros_sim/config/amr_bridge.yaml +111 -0
  286. package/runtime/ros2_ws/src/agenticros_sim/config/amr_view.rviz +172 -0
  287. package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.dsv.in +3 -0
  288. package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.sh.in +7 -0
  289. package/runtime/ros2_ws/src/agenticros_sim/launch/sim_amr.launch.py +159 -0
  290. package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.config +17 -0
  291. package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.sdf +244 -0
  292. package/runtime/ros2_ws/src/agenticros_sim/package.xml +27 -0
  293. package/runtime/ros2_ws/src/agenticros_sim/worlds/agenticros_indoor.sdf +183 -0
  294. package/runtime/scripts/activate_workspace.sh +285 -0
  295. package/runtime/scripts/agenticros-describer.policy.yaml +96 -0
  296. package/runtime/scripts/agenticros-proxy.cjs +99 -0
  297. package/runtime/scripts/agenticros-rosbridge.policy.yaml +62 -0
  298. package/runtime/scripts/check-cli-tarball-size.mjs +42 -0
  299. package/runtime/scripts/configure_agenticros.sh +200 -0
  300. package/runtime/scripts/configure_for_sim.sh +64 -0
  301. package/runtime/scripts/fix-openclaw-control-ui-path.sh +20 -0
  302. package/runtime/scripts/install_cli.sh +94 -0
  303. package/runtime/scripts/install_rosbridge_from_source.sh +67 -0
  304. package/runtime/scripts/lib/agenticros-banner.sh +28 -0
  305. package/runtime/scripts/onboard_robot.sh +75 -0
  306. package/runtime/scripts/openai.policy.yaml +77 -0
  307. package/runtime/scripts/openclaw-dashboard-url.cjs +49 -0
  308. package/runtime/scripts/pack-runtime.mjs +245 -0
  309. package/runtime/scripts/run_demo_native.sh +43 -0
  310. package/runtime/scripts/run_nemoclaw_host_stack.sh +91 -0
  311. package/runtime/scripts/run_robot_rosbridge.sh +36 -0
  312. package/runtime/scripts/sandbox_rosbridge_relay.py +137 -0
  313. package/runtime/scripts/setup-openclaw-local.cjs +75 -0
  314. package/runtime/scripts/setup_gateway_plugin.sh +329 -0
  315. package/runtime/scripts/setup_robot.sh +113 -0
  316. package/runtime/scripts/setup_workspace.sh +484 -0
  317. package/runtime/scripts/sim/run_sim.sh +146 -0
  318. package/runtime/scripts/smoke_test_nemoclaw.sh +123 -0
  319. package/runtime/scripts/start_demo.sh +55 -0
  320. package/runtime/scripts/sync-skill-tools.mjs +335 -0
  321. package/runtime/scripts/test-follow-me-sim.mjs +135 -0
  322. package/runtime/scripts/test-mcp-e2e.mjs +184 -0
  323. package/runtime/scripts/test-rclnodejs.mts +129 -0
  324. package/runtime/scripts/use-openclaw-2026.2.26.sh +19 -0
  325. package/runtime/scripts/use-openclaw-2026.3.11.sh +19 -0
  326. package/runtime/scripts/zenoh-bridge-ros2dds-robot.json5 +30 -0
  327. package/runtime/scripts/zenohd-agenticros.json5 +11 -0
  328. package/runtime/scripts/zenohd-rosclaw.json5 +11 -0
  329. package/runtime/tsconfig.base.json +19 -0
  330. package/index.js +0 -6
@@ -0,0 +1,58 @@
1
+ import type { RosTransport } from "@agenticros/core";
2
+ import { createTransport, getTransportConfig } from "@agenticros/core";
3
+ import type { AgenticROSConfig } from "@agenticros/core";
4
+
5
+ let transport: RosTransport | null = null;
6
+
7
+ /**
8
+ * Get the active transport. Throws if not connected.
9
+ */
10
+ export function getTransport(): RosTransport {
11
+ if (!transport) {
12
+ throw new Error("Transport not initialized. Ensure config is loaded and connect() has been called.");
13
+ }
14
+ return transport;
15
+ }
16
+
17
+ export function getTransportOrNull(): RosTransport | null {
18
+ return transport;
19
+ }
20
+
21
+ const CONNECT_TIMEOUT_MS = 15_000;
22
+
23
+ /**
24
+ * Create and connect the transport. Idempotent.
25
+ * Fails after CONNECT_TIMEOUT_MS if Zenoh/router is unreachable.
26
+ */
27
+ export async function connect(config: AgenticROSConfig): Promise<void> {
28
+ if (transport && transport.getStatus() === "connected") {
29
+ return;
30
+ }
31
+ if (transport) {
32
+ await transport.disconnect();
33
+ transport = null;
34
+ }
35
+ const transportCfg = getTransportConfig(config);
36
+ const newTransport = await createTransport(transportCfg);
37
+ const timeoutPromise = new Promise<never>((_, reject) => {
38
+ setTimeout(
39
+ () => reject(new Error(
40
+ `Transport connection timed out after ${CONNECT_TIMEOUT_MS / 1000}s. ` +
41
+ "Is zenohd running? (e.g. ws://localhost:10000). Check config and MCP log.",
42
+ )),
43
+ CONNECT_TIMEOUT_MS,
44
+ );
45
+ });
46
+ await Promise.race([newTransport.connect(), timeoutPromise]);
47
+ transport = newTransport;
48
+ }
49
+
50
+ /**
51
+ * Disconnect and clear the transport. Call on process exit.
52
+ */
53
+ export async function disconnect(): Promise<void> {
54
+ if (transport) {
55
+ await transport.disconnect();
56
+ transport = null;
57
+ }
58
+ }
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Zero-shot object detector using OWL-v2 via @huggingface/transformers.
3
+ *
4
+ * Accepts arbitrary text prompts at runtime ("person", "person in red shirt",
5
+ * "stroller", "bottle on the table") and returns bounding boxes for any
6
+ * region that matches. Truly open-vocabulary — no class list baked in.
7
+ *
8
+ * Model: Xenova/owlv2-base-patch16-finetuned (downloaded on first use,
9
+ * cached under ~/.cache/huggingface). Override with AGENTICROS_OWLV2_MODEL.
10
+ *
11
+ * Both `@huggingface/transformers` and `sharp` are loaded lazily on first
12
+ * use so a missing optional dep cannot crash MCP server startup — it only
13
+ * surfaces when the user actually calls the zero-shot detector.
14
+ */
15
+
16
+ // Type-only imports keep the types available at compile time without forcing
17
+ // the runtime modules to load when this file is imported.
18
+ type TransformersModule = typeof import("@huggingface/transformers");
19
+ type SharpFn = (input: Buffer | Uint8Array) => import("sharp").Sharp;
20
+ import type {
21
+ ZeroShotObjectDetectionPipeline,
22
+ RawImage as RawImageType,
23
+ } from "@huggingface/transformers";
24
+
25
+ const DEFAULT_MODEL = "Xenova/owlv2-base-patch16-finetuned";
26
+
27
+ let transformersModule: TransformersModule | null = null;
28
+ let sharpFn: SharpFn | null = null;
29
+
30
+ async function loadDeps(): Promise<{
31
+ transformers: TransformersModule;
32
+ sharp: SharpFn;
33
+ }> {
34
+ if (transformersModule && sharpFn) {
35
+ return { transformers: transformersModule, sharp: sharpFn };
36
+ }
37
+ try {
38
+ const [tMod, sharpMod] = await Promise.all([
39
+ import("@huggingface/transformers"),
40
+ import("sharp"),
41
+ ]);
42
+ const tAny = tMod as unknown as { default?: TransformersModule };
43
+ transformersModule = tAny.default ?? (tMod as unknown as TransformersModule);
44
+ const sharpAny = sharpMod as unknown as { default?: SharpFn };
45
+ sharpFn = sharpAny.default ?? (sharpMod as unknown as SharpFn);
46
+ } catch (err) {
47
+ const hint = err instanceof Error ? err.message : String(err);
48
+ throw new Error(
49
+ `Zero-shot detection requires the optional packages '@huggingface/transformers' and 'sharp'. ` +
50
+ `Install them in this workspace (pnpm install) to enable open-vocabulary detection. ` +
51
+ `Underlying error: ${hint}`,
52
+ );
53
+ }
54
+ return { transformers: transformersModule!, sharp: sharpFn! };
55
+ }
56
+
57
+ export interface ZeroShotDetection {
58
+ label: string;
59
+ confidence: number;
60
+ x: number;
61
+ y: number;
62
+ width: number;
63
+ height: number;
64
+ cx: number;
65
+ cy: number;
66
+ }
67
+
68
+ export interface ZeroShotDetectOptions {
69
+ threshold?: number;
70
+ topK?: number;
71
+ }
72
+
73
+ export class ZeroShotDetector {
74
+ private detector: ZeroShotObjectDetectionPipeline | null = null;
75
+ private loading: Promise<void> | null = null;
76
+ private readonly modelId: string;
77
+
78
+ constructor(modelId?: string) {
79
+ this.modelId =
80
+ modelId ??
81
+ (process.env["AGENTICROS_OWLV2_MODEL"]?.trim() || DEFAULT_MODEL);
82
+ }
83
+
84
+ async load(): Promise<void> {
85
+ if (this.detector) return;
86
+ if (this.loading) return this.loading;
87
+ this.loading = (async () => {
88
+ const { transformers } = await loadDeps();
89
+ process.stderr.write(
90
+ `[AgenticROS] zero-shot: loading ${this.modelId} (first run downloads ~150 MB)…\n`,
91
+ );
92
+ this.detector = (await transformers.pipeline(
93
+ "zero-shot-object-detection",
94
+ this.modelId,
95
+ { dtype: "q8" },
96
+ )) as unknown as ZeroShotObjectDetectionPipeline;
97
+ process.stderr.write(`[AgenticROS] zero-shot: model ready\n`);
98
+ })();
99
+ try {
100
+ await this.loading;
101
+ } finally {
102
+ this.loading = null;
103
+ }
104
+ }
105
+
106
+ async detectByText(
107
+ image: Buffer | Uint8Array,
108
+ prompts: string[],
109
+ opts: ZeroShotDetectOptions = {},
110
+ ): Promise<{ width: number; height: number; detections: ZeroShotDetection[] }> {
111
+ if (!this.detector) await this.load();
112
+ if (prompts.length === 0) return { width: 0, height: 0, detections: [] };
113
+
114
+ const { transformers, sharp: sharpFnLocal } = await loadDeps();
115
+
116
+ const decoded = await sharpFnLocal(image)
117
+ .removeAlpha()
118
+ .raw()
119
+ .toBuffer({ resolveWithObject: true });
120
+ const w = decoded.info.width;
121
+ const h = decoded.info.height;
122
+ const rawImg: RawImageType = new transformers.RawImage(
123
+ new Uint8Array(decoded.data),
124
+ w,
125
+ h,
126
+ 3,
127
+ );
128
+
129
+ const pipelineOpts: { threshold: number; top_k?: number } = {
130
+ threshold: opts.threshold ?? 0.1,
131
+ };
132
+ if (opts.topK != null) pipelineOpts.top_k = opts.topK;
133
+ const out = await this.detector!(rawImg, prompts, pipelineOpts);
134
+
135
+ // Single-image input → Array<{label, score, box}>; the pipeline returns the
136
+ // batched form only for batched input. Normalize defensively.
137
+ const raw = Array.isArray(out) && Array.isArray((out as unknown[])[0])
138
+ ? (out as unknown[][])[0]!
139
+ : (out as unknown[]);
140
+
141
+ const detections: ZeroShotDetection[] = (raw as Array<{
142
+ label: string;
143
+ score: number;
144
+ box: { xmin: number; ymin: number; xmax: number; ymax: number };
145
+ }>).map((d) => {
146
+ const width = d.box.xmax - d.box.xmin;
147
+ const height = d.box.ymax - d.box.ymin;
148
+ return {
149
+ label: d.label,
150
+ confidence: d.score,
151
+ x: d.box.xmin,
152
+ y: d.box.ymin,
153
+ width,
154
+ height,
155
+ cx: d.box.xmin + width / 2,
156
+ cy: d.box.ymin + height / 2,
157
+ };
158
+ });
159
+
160
+ return { width: w, height: h, detections };
161
+ }
162
+
163
+ async dispose(): Promise<void> {
164
+ if (this.detector) {
165
+ await this.detector.dispose();
166
+ this.detector = null;
167
+ }
168
+ }
169
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src"
6
+ },
7
+ "include": ["src/**/*"],
8
+ "exclude": ["node_modules", "dist"]
9
+ }
@@ -0,0 +1,106 @@
1
+ // Debug script: capture a frame from the camera and dump ALL YOLO detections
2
+ // across every COCO class above a very low confidence threshold.
3
+ import { loadConfig } from "/home/ubuntu/Projects/agenticros/packages/agenticros-claude-code/dist/config.js";
4
+ import { connect, disconnect, getTransport } from "/home/ubuntu/Projects/agenticros/packages/agenticros-claude-code/dist/transport.js";
5
+ import { resolveCameraSubscribeTopic } from "/home/ubuntu/Projects/agenticros/packages/core/dist/index.js";
6
+ import { ROS_MSG_COMPRESSED_IMAGE, cameraSnapshotFromPlainMessage } from "/home/ubuntu/Projects/agenticros/packages/ros-camera/dist/index.js";
7
+ import { PersonDetector } from "/home/ubuntu/Projects/agenticros/packages/agenticros-claude-code/dist/follow-me/detector.js";
8
+ import * as ort from "onnxruntime-node";
9
+ import sharp from "sharp";
10
+ import fs from "node:fs";
11
+
12
+ const COCO = [
13
+ "person","bicycle","car","motorcycle","airplane","bus","train","truck",
14
+ "boat","traffic light","fire hydrant","stop sign","parking meter","bench",
15
+ "bird","cat","dog","horse","sheep","cow","elephant","bear","zebra",
16
+ "giraffe","backpack","umbrella","handbag","tie","suitcase","frisbee",
17
+ "skis","snowboard","sports ball","kite","baseball bat","baseball glove",
18
+ "skateboard","surfboard","tennis racket","bottle","wine glass","cup",
19
+ "fork","knife","spoon","bowl","banana","apple","sandwich","orange",
20
+ "broccoli","carrot","hot dog","pizza","donut","cake","chair","couch",
21
+ "potted plant","bed","dining table","toilet","tv","laptop","mouse",
22
+ "remote","keyboard","cell phone","microwave","oven","toaster","sink",
23
+ "refrigerator","book","clock","vase","scissors","teddy bear","hair drier",
24
+ "toothbrush",
25
+ ];
26
+
27
+ async function captureFrame(transport, topic) {
28
+ return new Promise((resolve, reject) => {
29
+ const sub = transport.subscribe(
30
+ { topic, type: ROS_MSG_COMPRESSED_IMAGE },
31
+ (msg) => {
32
+ clearTimeout(timer);
33
+ sub.unsubscribe();
34
+ try {
35
+ const payload = cameraSnapshotFromPlainMessage("CompressedImage", msg);
36
+ resolve(Buffer.from(payload.dataBase64, "base64"));
37
+ } catch (e) { reject(e); }
38
+ },
39
+ );
40
+ const timer = setTimeout(() => { sub.unsubscribe(); reject(new Error("timeout")); }, 5000);
41
+ });
42
+ }
43
+
44
+ const INPUT_SIZE = 640;
45
+
46
+ async function detectAll(image, modelPath) {
47
+ const session = await ort.InferenceSession.create(modelPath, { executionProviders: ["cpu"], graphOptimizationLevel: "all" });
48
+ const meta = await sharp(image).metadata();
49
+ const origW = meta.width, origH = meta.height;
50
+ const scale = Math.min(INPUT_SIZE / origW, INPUT_SIZE / origH);
51
+ const newW = Math.round(origW * scale), newH = Math.round(origH * scale);
52
+ const padX = Math.floor((INPUT_SIZE - newW) / 2), padY = Math.floor((INPUT_SIZE - newH) / 2);
53
+ const { data } = await sharp(image)
54
+ .resize(newW, newH, { fit: "fill" })
55
+ .extend({ top: padY, bottom: INPUT_SIZE - newH - padY, left: padX, right: INPUT_SIZE - newW - padX, background: { r:114,g:114,b:114 } })
56
+ .removeAlpha().raw().toBuffer({ resolveWithObject: true });
57
+ const pixels = INPUT_SIZE * INPUT_SIZE;
58
+ const input = new Float32Array(3 * pixels);
59
+ for (let i = 0; i < pixels; i++) {
60
+ input[i] = data[i*3] / 255;
61
+ input[pixels + i] = data[i*3 + 1] / 255;
62
+ input[2*pixels + i] = data[i*3 + 2] / 255;
63
+ }
64
+ const tensor = new ort.Tensor("float32", input, [1, 3, INPUT_SIZE, INPUT_SIZE]);
65
+ const inputName = session.inputNames[0];
66
+ const outputName = session.outputNames[0];
67
+ const out = await session.run({ [inputName]: tensor });
68
+ const result = out[outputName];
69
+ const [, _features, nAnchors] = result.dims;
70
+ const arr = result.data;
71
+ // For each anchor, find best class
72
+ const perClassMax = new Array(80).fill(0);
73
+ let overallMax = { score: 0, classId: -1, anchor: -1 };
74
+ for (let i = 0; i < nAnchors; i++) {
75
+ for (let c = 0; c < 80; c++) {
76
+ const s = arr[(4 + c) * nAnchors + i];
77
+ if (s > perClassMax[c]) perClassMax[c] = s;
78
+ if (s > overallMax.score) overallMax = { score: s, classId: c, anchor: i };
79
+ }
80
+ }
81
+ await session.release();
82
+ return { perClassMax, overallMax, imageW: origW, imageH: origH };
83
+ }
84
+
85
+ (async () => {
86
+ const config = loadConfig();
87
+ console.error("connecting transport...");
88
+ await connect(config);
89
+ const transport = getTransport();
90
+ const topic = resolveCameraSubscribeTopic(config, (config.robot?.cameraTopic ?? "").trim() || "/camera/camera/color/image_raw/compressed");
91
+ console.error(`subscribing topic=${topic}`);
92
+ const buf = await captureFrame(transport, topic);
93
+ fs.writeFileSync("/tmp/yolo-frame.jpg", buf);
94
+ console.error(`got frame ${buf.length} bytes, saved /tmp/yolo-frame.jpg`);
95
+ const modelPath = process.env.AGENTICROS_YOLOV8_MODEL || "/home/ubuntu/.agenticros/models/yolov8n.onnx";
96
+ const { perClassMax, overallMax, imageW, imageH } = await detectAll(buf, modelPath);
97
+ console.error(`image ${imageW}x${imageH}`);
98
+ console.error(`overall best: class=${overallMax.classId} (${COCO[overallMax.classId]}) score=${overallMax.score.toFixed(3)}`);
99
+ const ranked = perClassMax.map((s, c) => ({ s, c })).sort((a,b) => b.s - a.s).slice(0, 15);
100
+ console.error("top 15 classes (max anchor score):");
101
+ for (const { s, c } of ranked) {
102
+ console.error(` ${s.toFixed(3)} ${c} ${COCO[c]}`);
103
+ }
104
+ await disconnect();
105
+ process.exit(0);
106
+ })().catch(e => { console.error("ERR", e); process.exit(1); });
@@ -0,0 +1,139 @@
1
+ # AgenticROS Gemini adapter
2
+
3
+ CLI that uses **Google Gemini** to chat with your ROS2 robot. Same tool set as the Claude Code adapter (list topics, publish, subscribe, services, actions, params, camera snapshot, depth distance). No MCP — Gemini function calling is used directly.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js 20+
8
+ - ROS2 transport available (Zenoh router, rosbridge, or local DDS)
9
+ - **Gemini API key** ([Google AI Studio](https://aistudio.google.com/apikey))
10
+
11
+ ## Config
12
+
13
+ Same as other adapters (Claude Code, OpenClaw):
14
+
15
+ 1. **`AGENTICROS_CONFIG_PATH`** — path to a JSON file
16
+ 2. **`~/.agenticros/config.json`**
17
+ 3. **OpenClaw config** — if the above are missing, uses `OPENCLAW_CONFIG` or `~/.openclaw/openclaw.json` → `plugins.entries.agenticros.config`
18
+
19
+ Example `~/.agenticros/config.json`:
20
+
21
+ ```json
22
+ {
23
+ "transport": { "mode": "zenoh" },
24
+ "zenoh": { "routerEndpoint": "ws://localhost:10000" },
25
+ "robot": {
26
+ "name": "MyRobot",
27
+ "namespace": "",
28
+ "cameraTopic": "/camera/camera/color/image_raw/compressed"
29
+ }
30
+ }
31
+ ```
32
+
33
+ ## Build
34
+
35
+ From the repo root:
36
+
37
+ ```bash
38
+ pnpm install
39
+ pnpm build
40
+ ```
41
+
42
+ Or only this package: `pnpm --filter @agenticros/core build && pnpm --filter @agenticros/gemini build`.
43
+
44
+ **Important:** Run `pnpm build` with nothing after it on the same line. If you paste extra words (e.g. from a comment like “if you haven’t already”), pnpm passes them to `tsc` and the build fails.
45
+
46
+ ### Quick API test (no ROS)
47
+
48
+ After building, with a **real** key from [Google AI Studio](https://aistudio.google.com/apikey):
49
+
50
+ ```bash
51
+ cd packages/agenticros-gemini
52
+ export GEMINI_API_KEY="your-key-here"
53
+ pnpm run smoke-api
54
+ ```
55
+
56
+ You should see `Gemini: OK` (or similar). If you see `API_KEY_INVALID`, the key is wrong, revoked, or still the placeholder `YOUR_NEW_KEY_HERE`.
57
+
58
+ ### HTTP 429 / “quota exceeded” / `RESOURCE_EXHAUSTED`
59
+
60
+ Your key is valid, but Google’s **free-tier limits** for that model are used up (or set to 0 for the project). This is **not** an AgenticROS bug.
61
+
62
+ - Wait and retry (errors often include a suggested delay, e.g. ~12s).
63
+ - Try another model: `export GEMINI_MODEL=gemini-2.5-flash` or `gemini-2.0-flash` (defaults may change; see [models](https://ai.google.dev/gemini-api/docs/models)).
64
+ - Check usage and limits: [rate limits](https://ai.google.dev/gemini-api/docs/rate-limits), [AI Studio](https://aistudio.google.com/), and enable billing if you need higher quotas.
65
+
66
+ The main CLI also respects **`GEMINI_MODEL`** (same as the smoke script after rebuild).
67
+
68
+ ## Usage
69
+
70
+ Set **`GEMINI_API_KEY`** (or **`GOOGLE_API_KEY`**) and run the CLI:
71
+
72
+ ```bash
73
+ export GEMINI_API_KEY=your_key_here
74
+ pnpm --filter @agenticros/gemini exec agenticros-gemini "What do you see?"
75
+ ```
76
+
77
+ Or with a message from stdin:
78
+
79
+ ```bash
80
+ echo "List ROS2 topics" | GEMINI_API_KEY=xxx node packages/agenticros-gemini/dist/index.js
81
+ ```
82
+
83
+ From the package directory after building:
84
+
85
+ ```bash
86
+ cd packages/agenticros-gemini
87
+ GEMINI_API_KEY=xxx node dist/index.js "Move the robot forward 0.2 m/s for 2 seconds then stop."
88
+ ```
89
+
90
+ ## Tested examples
91
+
92
+ From the repo root:
93
+
94
+ ```bash
95
+ pnpm --filter @agenticros/gemini run chat -- "Use ros2_camera_snapshot on /camera/camera/color/image_raw/compressed with message_type CompressedImage, then describe what you see in detail."
96
+
97
+ pnpm --filter @agenticros/gemini run chat -- "Use ros2_depth_distance and report meters."
98
+
99
+ pnpm --filter @agenticros/gemini run chat -- "Publish geometry_msgs/msg/Twist to /cmd_vel with linear.x=0.2, linear.y=0, linear.z=0, angular.x=0, angular.y=0, angular.z=0."
100
+
101
+ pnpm --filter @agenticros/gemini run chat -- "Publish a stop command to cmd_vel."
102
+ ```
103
+
104
+ For motion tests, send an explicit stop command as a separate command right after forward motion.
105
+
106
+ ## Tools
107
+
108
+ The same ROS2 tools as the OpenClaw and Claude Code adapters:
109
+
110
+ | Tool | Description |
111
+ |------|-------------|
112
+ | `ros2_list_topics` | List topics and types |
113
+ | `ros2_publish` | Publish to a topic (e.g. cmd_vel) |
114
+ | `ros2_subscribe_once` | Get next message from a topic |
115
+ | `ros2_service_call` | Call a ROS2 service |
116
+ | `ros2_action_goal` | Send goal to an action server |
117
+ | `ros2_param_get` / `ros2_param_set` | Get/set node parameters |
118
+ | `ros2_camera_snapshot` | One frame from camera topic (image returned to model) |
119
+ | `ros2_depth_distance` | Distance in meters from depth camera |
120
+ | `memory_remember` *(when enabled)* | Store a durable fact for the robot — shared with OpenClaw, Claude Desktop, Claude Code |
121
+ | `memory_recall` *(when enabled)* | Semantic search across long-term memory |
122
+ | `memory_forget` *(when enabled)* | Delete by id, query, or whole namespace |
123
+ | `memory_status` *(when enabled)* | Health check + record count + embedder info |
124
+
125
+ Safety limits from config (max linear/angular velocity) are applied before `ros2_publish`.
126
+
127
+ ### Optional: shared memory across agents
128
+
129
+ The four `memory_*` tools are only exposed to Gemini when memory is **enabled** in `~/.agenticros/config.json`. Once enabled, the underlying store (`~/.mem0/vector_store.db` for the mem0 backend) is shared across every adapter for the same robot — so a fact remembered from Claude Desktop is immediately recall-able from Gemini, and vice versa. Memory tools work even when zenohd is not running. See [`docs/memory.md`](../../docs/memory.md) for setup recipes and troubleshooting.
130
+
131
+ ## Zenoh / transport
132
+
133
+ The CLI connects to ROS2 via the same core transport as the other adapters. For Zenoh:
134
+
135
+ 1. Start **zenohd** with the remote-api plugin (e.g. port 10000): see `scripts/zenohd-agenticros.json5` or [docs/zenoh-agenticros.md](../../docs/zenoh-agenticros.md).
136
+ 2. Set `zenoh.routerEndpoint` in config (e.g. `ws://localhost:10000`).
137
+ 3. Run the Gemini CLI; it will connect at startup and use the tools in a loop until the model returns a final text answer.
138
+
139
+ If the transport is not connected (e.g. zenohd not running), tool calls will fail with a clear error.
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@agenticros/gemini",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "AgenticROS Gemini adapter — chat with your ROS2 robot using Google Gemini",
6
+ "main": "./dist/index.js",
7
+ "bin": {
8
+ "agenticros-gemini": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "typecheck": "tsc --noEmit",
13
+ "smoke-api": "node scripts/smoke-api.mjs",
14
+ "chat": "node dist/index.js"
15
+ },
16
+ "dependencies": {
17
+ "@agenticros/core": "workspace:*",
18
+ "@agenticros/ros-camera": "workspace:*",
19
+ "@google/genai": "^1.0.0",
20
+ "zod": "^3.24.0"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^20.17.0",
24
+ "typescript": "^5.7.0"
25
+ },
26
+ "author": "PlaiPin",
27
+ "license": "Apache-2.0"
28
+ }
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Minimal Gemini API check (no ROS, no AgenticROS config).
4
+ *
5
+ * export GEMINI_API_KEY="your-real-key"
6
+ * node scripts/smoke-api.mjs
7
+ *
8
+ * Run from packages/agenticros-gemini after: pnpm build
9
+ * (This script resolves @google/genai from the package's node_modules.)
10
+ */
11
+ import { GoogleGenAI } from "@google/genai";
12
+
13
+ const key = process.env.GEMINI_API_KEY ?? process.env.GOOGLE_API_KEY;
14
+ if (!key || key.trim() === "" || key === "YOUR_NEW_KEY_HERE") {
15
+ console.error(
16
+ "Set GEMINI_API_KEY (or GOOGLE_API_KEY) to a real key from https://aistudio.google.com/apikey",
17
+ );
18
+ process.exit(1);
19
+ }
20
+
21
+ const model = (process.env.GEMINI_MODEL ?? "gemini-2.5-flash").trim();
22
+ console.error(`[smoke-api] model=${model} (set GEMINI_MODEL to override)`);
23
+
24
+ const ai = new GoogleGenAI({ apiKey: key });
25
+ try {
26
+ const r = await ai.models.generateContent({
27
+ model,
28
+ contents: "Reply with exactly one word: OK",
29
+ });
30
+ console.log("Gemini:", r.text?.trim() ?? "(no text)");
31
+ } catch (e) {
32
+ const msg = e instanceof Error ? e.message : String(e);
33
+ if (msg.includes("429") || msg.includes("RESOURCE_EXHAUSTED") || msg.includes("quota")) {
34
+ console.error(
35
+ "\nHTTP 429 / quota: free-tier limits for this model may be exhausted. Try:\n" +
36
+ " • Wait a minute and retry (see Retry-After in the error)\n" +
37
+ " • export GEMINI_MODEL=gemini-2.0-flash # or another model your project allows\n" +
38
+ " • https://ai.google.dev/gemini-api/docs/rate-limits and Google AI Studio billing\n",
39
+ );
40
+ }
41
+ throw e;
42
+ }