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,19 @@
1
+ /**
2
+ * Runners for the simulation modes.
3
+ *
4
+ * `agenticros up sim-amr` -> scripts/sim/run_sim.sh --robot amr
5
+ * `agenticros up sim-arm` -> scripts/sim/run_sim.sh --robot arm
6
+ *
7
+ * Phase 1 ships these as stubs that point the user at the Phase 2 work; once
8
+ * scripts/sim/run_sim.sh + the agenticros_sim ROS 2 package land, the two
9
+ * functions below become single-line execa invocations of run_sim.sh.
10
+ */
11
+ export interface SimRunOptions {
12
+ namespace?: string;
13
+ useRviz?: boolean;
14
+ /** True = headless gz (-s --headless-rendering). Auto-detected from $DISPLAY upstream. */
15
+ headless?: boolean;
16
+ }
17
+ export declare function runSimAmr(opts: SimRunOptions): Promise<void>;
18
+ export declare function runSimArm(opts: SimRunOptions): Promise<void>;
19
+ //# sourceMappingURL=sim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim.d.ts","sourceRoot":"","sources":["../../src/runners/sim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAoCD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Runners for the simulation modes.
3
+ *
4
+ * `agenticros up sim-amr` -> scripts/sim/run_sim.sh --robot amr
5
+ * `agenticros up sim-arm` -> scripts/sim/run_sim.sh --robot arm
6
+ *
7
+ * Phase 1 ships these as stubs that point the user at the Phase 2 work; once
8
+ * scripts/sim/run_sim.sh + the agenticros_sim ROS 2 package land, the two
9
+ * functions below become single-line execa invocations of run_sim.sh.
10
+ */
11
+ import { existsSync } from "node:fs";
12
+ import { join } from "node:path";
13
+ import { execa } from "execa";
14
+ import { getCliPaths } from "../util/paths.js";
15
+ import { err, header, info, warn } from "../util/logger.js";
16
+ import { writeState } from "../util/state.js";
17
+ async function runSim(robot, opts) {
18
+ header(`AgenticROS - sim ${robot.toUpperCase()}`);
19
+ const paths = getCliPaths();
20
+ const script = join(paths.scriptsDir, "sim", "run_sim.sh");
21
+ if (!existsSync(script)) {
22
+ warn(`scripts/sim/run_sim.sh not found at ${script}.\n` +
23
+ " Simulation support is delivered in Phase 2 of the CLI plan. Until then,\n" +
24
+ " use `agenticros up real` against a real robot, or check back after the\n" +
25
+ " agenticros_sim ROS 2 package is published.");
26
+ return;
27
+ }
28
+ const ns = opts.namespace ?? "sim_robot";
29
+ writeState({ lastNamespace: ns });
30
+ const args = ["--robot", robot, "--namespace", ns];
31
+ if (opts.useRviz)
32
+ args.push("--rviz");
33
+ if (opts.headless)
34
+ args.push("--no-gui");
35
+ info(`Invoking ${script} ${args.join(" ")}…`);
36
+ try {
37
+ await execa("bash", [script, ...args], {
38
+ env: { ...process.env, AGENTICROS_ROBOT_NAMESPACE: ns },
39
+ stdio: "inherit",
40
+ });
41
+ }
42
+ catch (e) {
43
+ err(`Sim launch failed: ${e instanceof Error ? e.message : String(e)}`);
44
+ process.exit(1);
45
+ }
46
+ }
47
+ export async function runSimAmr(opts) {
48
+ return runSim("amr", opts);
49
+ }
50
+ export async function runSimArm(opts) {
51
+ return runSim("arm", opts);
52
+ }
53
+ //# sourceMappingURL=sim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim.js","sourceRoot":"","sources":["../../src/runners/sim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO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CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,GAAG,CAAC,sBAAsB,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAmB;IACjD,OAAO,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAmB;IACjD,OAAO,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Environment + system detection helpers shared by doctor, init, and the runners.
3
+ */
4
+ export interface RosInfo {
5
+ distro: string | undefined;
6
+ setupBash: string | undefined;
7
+ }
8
+ /** Look for /opt/ros/<distro>/setup.bash. Returns the first that exists, or undefined. */
9
+ export declare function detectRosDistro(preferred?: string): RosInfo;
10
+ /**
11
+ * Build the bash command prelude that sources ROS and the AgenticROS overlay
12
+ * before running a subsequent command. Used by runners that invoke shell scripts
13
+ * which expect `ros2`, `colcon`, etc. on PATH.
14
+ */
15
+ export declare function buildRosSourcedShellCmd(body: string, opts?: {
16
+ distro?: string;
17
+ overlay?: string;
18
+ }): string;
19
+ /** True when Gazebo Harmonic (`gz sim`) is installed. */
20
+ export declare function hasGazeboHarmonic(): boolean;
21
+ export declare const isLinux: boolean;
22
+ /** Whether we appear to be running on a Jetson (Tegra kernel). */
23
+ export declare function isJetson(): boolean;
24
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/C,MAAM,CAOR;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,eAAO,MAAM,OAAO,SAA+B,CAAC;AAEpD,kEAAkE;AAClE,wBAAgB,QAAQ,IAAI,OAAO,CAMlC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Environment + system detection helpers shared by doctor, init, and the runners.
3
+ */
4
+ import { existsSync } from "node:fs";
5
+ import { join } from "node:path";
6
+ /** Common ROS 2 install locations under /opt/ros/<distro>/setup.bash. */
7
+ const KNOWN_DISTROS = ["humble", "iron", "jazzy", "rolling"];
8
+ /** Look for /opt/ros/<distro>/setup.bash. Returns the first that exists, or undefined. */
9
+ export function detectRosDistro(preferred) {
10
+ const candidates = preferred
11
+ ? [preferred, ...KNOWN_DISTROS.filter((d) => d !== preferred)]
12
+ : [...KNOWN_DISTROS];
13
+ for (const distro of candidates) {
14
+ const setupBash = `/opt/ros/${distro}/setup.bash`;
15
+ if (existsSync(setupBash))
16
+ return { distro, setupBash };
17
+ }
18
+ return { distro: undefined, setupBash: undefined };
19
+ }
20
+ /**
21
+ * Build the bash command prelude that sources ROS and the AgenticROS overlay
22
+ * before running a subsequent command. Used by runners that invoke shell scripts
23
+ * which expect `ros2`, `colcon`, etc. on PATH.
24
+ */
25
+ export function buildRosSourcedShellCmd(body, opts = {}) {
26
+ const ros = detectRosDistro(opts.distro);
27
+ const parts = [];
28
+ if (ros.setupBash)
29
+ parts.push(`source "${ros.setupBash}"`);
30
+ if (opts.overlay && existsSync(opts.overlay))
31
+ parts.push(`source "${opts.overlay}"`);
32
+ parts.push(body);
33
+ return parts.join(" && ");
34
+ }
35
+ /** True when Gazebo Harmonic (`gz sim`) is installed. */
36
+ export function hasGazeboHarmonic() {
37
+ for (const dir of ["/usr/bin", "/usr/local/bin"]) {
38
+ if (existsSync(join(dir, "gz")))
39
+ return true;
40
+ }
41
+ return false;
42
+ }
43
+ export const isLinux = process.platform === "linux";
44
+ /** Whether we appear to be running on a Jetson (Tegra kernel). */
45
+ export function isJetson() {
46
+ try {
47
+ return existsSync("/etc/nv_tegra_release");
48
+ }
49
+ catch {
50
+ return false;
51
+ }
52
+ }
53
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/util/env.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,yEAAyE;AACzE,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAU,CAAC;AAOtE,0FAA0F;AAC1F,MAAM,UAAU,eAAe,CAAC,SAAkB;IAChD,MAAM,UAAU,GAAG,SAAS;QAC1B,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,SAAS,GAAG,YAAY,MAAM,aAAa,CAAC;QAClD,IAAI,UAAU,CAAC,SAAS,CAAC;YAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,IAAY,EACZ,OAA8C,EAAE;IAEhD,MAAM,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,GAAG,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;IAC3D,IAAI,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;IACrF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,iBAAiB;IAC/B,KAAK,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,EAAE,CAAC;QACjD,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAEpD,kEAAkE;AAClE,MAAM,UAAU,QAAQ;IACtB,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Logging primitives for the CLI: coloured headers, status lines, spinners.
3
+ *
4
+ * Wraps picocolors + ora behind a thin interface so the rest of the CLI imports
5
+ * a single module. Honours `--no-color` (picocolors respects FORCE_COLOR / NO_COLOR
6
+ * automatically) and degrades gracefully when stdout is not a TTY.
7
+ */
8
+ /** Whether stdout is a TTY (used to suppress spinners in pipes / CI). */
9
+ export declare const isTty: boolean;
10
+ export declare const colors: import("picocolors/types.js").Colors & {
11
+ createColors: (enabled?: boolean) => import("picocolors/types.js").Colors;
12
+ };
13
+ export declare function header(title: string): void;
14
+ export declare function info(message: string): void;
15
+ export declare function ok(message: string): void;
16
+ export declare function warn(message: string): void;
17
+ export declare function err(message: string): void;
18
+ export declare function dim(message: string): void;
19
+ /**
20
+ * Spinner for a short async operation. Falls back to a plain "› message …" line
21
+ * when stdout is not a TTY.
22
+ */
23
+ export declare function withSpinner<T>(message: string, task: () => Promise<T>): Promise<T>;
24
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,yEAAyE;AACzE,eAAO,MAAM,KAAK,EAAE,OAAuC,CAAC;AAE5D,eAAO,MAAM,MAAM;0BAXV,CAAC;CAWc,CAAC;AAEzB,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAK1C;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,wBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAExC;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Logging primitives for the CLI: coloured headers, status lines, spinners.
3
+ *
4
+ * Wraps picocolors + ora behind a thin interface so the rest of the CLI imports
5
+ * a single module. Honours `--no-color` (picocolors respects FORCE_COLOR / NO_COLOR
6
+ * automatically) and degrades gracefully when stdout is not a TTY.
7
+ */
8
+ import oraImport from "ora";
9
+ import pc from "picocolors";
10
+ /** Whether stdout is a TTY (used to suppress spinners in pipes / CI). */
11
+ export const isTty = Boolean(process.stdout.isTTY);
12
+ export const colors = pc;
13
+ export function header(title) {
14
+ const line = "─".repeat(Math.min(title.length + 4, 60));
15
+ process.stdout.write(`\n${pc.bold(pc.cyan(`╔${line}╗`))}\n`);
16
+ process.stdout.write(`${pc.bold(pc.cyan(`║ ${title} ║`))}\n`);
17
+ process.stdout.write(`${pc.bold(pc.cyan(`╚${line}╝`))}\n\n`);
18
+ }
19
+ export function info(message) {
20
+ process.stdout.write(`${pc.cyan("›")} ${message}\n`);
21
+ }
22
+ export function ok(message) {
23
+ process.stdout.write(`${pc.green("✓")} ${message}\n`);
24
+ }
25
+ export function warn(message) {
26
+ process.stdout.write(`${pc.yellow("!")} ${pc.yellow(message)}\n`);
27
+ }
28
+ export function err(message) {
29
+ process.stderr.write(`${pc.red("✗")} ${pc.red(message)}\n`);
30
+ }
31
+ export function dim(message) {
32
+ process.stdout.write(` ${pc.dim(message)}\n`);
33
+ }
34
+ /**
35
+ * Spinner for a short async operation. Falls back to a plain "› message …" line
36
+ * when stdout is not a TTY.
37
+ */
38
+ export async function withSpinner(message, task) {
39
+ if (!isTty) {
40
+ process.stdout.write(`${pc.cyan("›")} ${message} ...\n`);
41
+ try {
42
+ const value = await task();
43
+ process.stdout.write(`${pc.green("✓")} ${message}\n`);
44
+ return value;
45
+ }
46
+ catch (e) {
47
+ process.stdout.write(`${pc.red("✗")} ${message}\n`);
48
+ throw e;
49
+ }
50
+ }
51
+ const spinner = oraImport({ text: message, spinner: "dots" }).start();
52
+ try {
53
+ const value = await task();
54
+ spinner.succeed(message);
55
+ return value;
56
+ }
57
+ catch (e) {
58
+ spinner.fail(message);
59
+ throw e;
60
+ }
61
+ }
62
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,SAAuB,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,yEAAyE;AACzE,MAAM,CAAC,MAAM,KAAK,GAAY,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC;AAEzB,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACxD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC;AAC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,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC;YACpD,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAQ,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3E,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Path discovery for the AgenticROS CLI.
3
+ *
4
+ * The CLI can be invoked three ways:
5
+ * 1. Workspace mode - from a cloned monorepo. Scripts live under
6
+ * <repo-root>/scripts/, ros2 sources under <repo-root>/ros2_ws/src/, and
7
+ * built MCP under <repo-root>/packages/agenticros-claude-code/dist/.
8
+ * 2. Installed mode - after `npx agenticros init` has copied the bundled
9
+ * snapshot into ~/agenticros (the install dir). Same layout as workspace
10
+ * mode but rooted at the install dir. This is the "post-init" steady state.
11
+ * 3. Bundle mode - first invocation of `npx agenticros` before init has run.
12
+ * Paths point into the package's own runtime/ directory, populated at
13
+ * publish time by scripts/pack-runtime.mjs. Only read-only tools (doctor,
14
+ * version, --help) are guaranteed to work in bundle mode.
15
+ *
16
+ * Workspace mode is preferred when detected so contributors see their live edits.
17
+ * Installed mode is preferred over bundle mode so that init-time builds (which
18
+ * write dist artifacts into ~/agenticros) are honoured on subsequent invocations.
19
+ */
20
+ export type CliMode = "workspace" | "installed" | "bundle";
21
+ export interface CliPaths {
22
+ /** Discovered execution mode. */
23
+ mode: CliMode;
24
+ /** Backwards-compat alias for code that just wants the workspace/installed branch. */
25
+ workspaceMode: boolean;
26
+ /** Directory containing the agenticros CLI package (where runtime/ would live). */
27
+ pkgDir: string;
28
+ /**
29
+ * Active "repo root" the CLI is operating against. For workspace mode this is
30
+ * the cloned monorepo. For installed mode this is the install dir. For bundle
31
+ * mode this is undefined (no writable repo root yet).
32
+ */
33
+ repoRoot: string | undefined;
34
+ /** Directory where AgenticROS user data lives ($HOME/.agenticros). */
35
+ userDataDir: string;
36
+ /** Default install directory written by `agenticros init` (~/agenticros). */
37
+ installDir: string;
38
+ /** Path to the scripts/ directory (live workspace or bundled snapshot). */
39
+ scriptsDir: string;
40
+ /** Path to ros2_ws/src/ source root (live workspace or bundled snapshot). */
41
+ ros2WsSrcDir: string;
42
+ /** Path to the MCP server build directory (agenticros-claude-code/dist or runtime/mcp). */
43
+ mcpDistDir: string;
44
+ /** Path to bundled sample configs (only meaningful in npm mode; falls back to repo docs/). */
45
+ configsDir: string;
46
+ /**
47
+ * Path to the bundled snapshot of the monorepo (only set in bundle mode and
48
+ * for `agenticros init` in installed mode where it's the source-of-truth for
49
+ * the initial copy). Undefined in workspace mode.
50
+ */
51
+ bundleDir: string | undefined;
52
+ }
53
+ export declare function getCliPaths(): CliPaths;
54
+ /** For tests / dev — reset cached path detection. */
55
+ export declare function resetPathsCache(): void;
56
+ export declare function resolveScriptPath(name: string): string;
57
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/util/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,QAAQ;IACvB,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,aAAa,EAAE,OAAO,CAAC;IACvB,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAkCD,wBAAgB,WAAW,IAAI,QAAQ,CAiFtC;AAED,qDAAqD;AACrD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Path discovery for the AgenticROS CLI.
3
+ *
4
+ * The CLI can be invoked three ways:
5
+ * 1. Workspace mode - from a cloned monorepo. Scripts live under
6
+ * <repo-root>/scripts/, ros2 sources under <repo-root>/ros2_ws/src/, and
7
+ * built MCP under <repo-root>/packages/agenticros-claude-code/dist/.
8
+ * 2. Installed mode - after `npx agenticros init` has copied the bundled
9
+ * snapshot into ~/agenticros (the install dir). Same layout as workspace
10
+ * mode but rooted at the install dir. This is the "post-init" steady state.
11
+ * 3. Bundle mode - first invocation of `npx agenticros` before init has run.
12
+ * Paths point into the package's own runtime/ directory, populated at
13
+ * publish time by scripts/pack-runtime.mjs. Only read-only tools (doctor,
14
+ * version, --help) are guaranteed to work in bundle mode.
15
+ *
16
+ * Workspace mode is preferred when detected so contributors see their live edits.
17
+ * Installed mode is preferred over bundle mode so that init-time builds (which
18
+ * write dist artifacts into ~/agenticros) are honoured on subsequent invocations.
19
+ */
20
+ import { existsSync, readFileSync } from "node:fs";
21
+ import { dirname, join, resolve } from "node:path";
22
+ import { fileURLToPath } from "node:url";
23
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
24
+ /**
25
+ * True when `dir` looks like an AgenticROS monorepo root (live or installed
26
+ * snapshot): its package.json is `agenticros-monorepo`.
27
+ */
28
+ function isAgenticrosMonorepo(dir) {
29
+ const pkgPath = join(dir, "package.json");
30
+ if (!existsSync(pkgPath))
31
+ return false;
32
+ try {
33
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
34
+ return pkg.name === "agenticros-monorepo";
35
+ }
36
+ catch {
37
+ return false;
38
+ }
39
+ }
40
+ /**
41
+ * Walk up from `startDir` looking for an agenticros-monorepo package.json.
42
+ * Returns the repo root or undefined.
43
+ */
44
+ function findRepoRoot(startDir) {
45
+ let dir = startDir;
46
+ for (let i = 0; i < 8; i++) {
47
+ if (isAgenticrosMonorepo(dir))
48
+ return dir;
49
+ const parent = dirname(dir);
50
+ if (parent === dir)
51
+ break;
52
+ dir = parent;
53
+ }
54
+ return undefined;
55
+ }
56
+ let cached;
57
+ export function getCliPaths() {
58
+ if (cached)
59
+ return cached;
60
+ // moduleDir is .../packages/agenticros-cli/dist/util in workspace, or
61
+ // .../node_modules/agenticros/dist/util in npm install. The published bundle
62
+ // is a single file dist/index.js, so moduleDir will be .../dist.
63
+ // Walk up to find the package dir (the one with our package.json).
64
+ let pkgDir = moduleDir;
65
+ for (let i = 0; i < 5; i++) {
66
+ if (existsSync(join(pkgDir, "package.json")))
67
+ break;
68
+ pkgDir = dirname(pkgDir);
69
+ }
70
+ const workspaceRoot = findRepoRoot(pkgDir);
71
+ const home = process.env["HOME"] ?? process.env["USERPROFILE"] ?? ".";
72
+ const userDataDir = join(home, ".agenticros");
73
+ const installDir = process.env["AGENTICROS_HOME"] ?? join(home, "agenticros");
74
+ const bundleDir = join(pkgDir, "runtime");
75
+ // Workspace mode wins outright: contributors get live edits.
76
+ if (workspaceRoot) {
77
+ cached = {
78
+ mode: "workspace",
79
+ workspaceMode: true,
80
+ pkgDir,
81
+ repoRoot: workspaceRoot,
82
+ userDataDir,
83
+ installDir,
84
+ scriptsDir: join(workspaceRoot, "scripts"),
85
+ ros2WsSrcDir: join(workspaceRoot, "ros2_ws", "src"),
86
+ mcpDistDir: join(workspaceRoot, "packages", "agenticros-claude-code", "dist"),
87
+ configsDir: join(workspaceRoot, "docs"),
88
+ bundleDir: existsSync(bundleDir) ? bundleDir : undefined,
89
+ };
90
+ return cached;
91
+ }
92
+ // Installed mode: ~/agenticros has been populated by a prior `agenticros init`.
93
+ if (isAgenticrosMonorepo(installDir)) {
94
+ cached = {
95
+ mode: "installed",
96
+ workspaceMode: true,
97
+ pkgDir,
98
+ repoRoot: installDir,
99
+ userDataDir,
100
+ installDir,
101
+ scriptsDir: join(installDir, "scripts"),
102
+ ros2WsSrcDir: join(installDir, "ros2_ws", "src"),
103
+ mcpDistDir: join(installDir, "packages", "agenticros-claude-code", "dist"),
104
+ configsDir: join(installDir, "docs"),
105
+ bundleDir: existsSync(bundleDir) ? bundleDir : undefined,
106
+ };
107
+ return cached;
108
+ }
109
+ // Bundle mode: first invocation of `npx agenticros` before init.
110
+ cached = {
111
+ mode: "bundle",
112
+ workspaceMode: false,
113
+ pkgDir,
114
+ repoRoot: undefined,
115
+ userDataDir,
116
+ installDir,
117
+ scriptsDir: join(bundleDir, "scripts"),
118
+ ros2WsSrcDir: join(bundleDir, "ros2_ws", "src"),
119
+ mcpDistDir: join(bundleDir, "packages", "agenticros-claude-code", "dist"),
120
+ configsDir: join(bundleDir, "docs"),
121
+ bundleDir,
122
+ };
123
+ return cached;
124
+ }
125
+ /** For tests / dev — reset cached path detection. */
126
+ export function resetPathsCache() {
127
+ cached = undefined;
128
+ }
129
+ export function resolveScriptPath(name) {
130
+ return resolve(getCliPaths().scriptsDir, name);
131
+ }
132
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/util/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,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;AACjD,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Pidfile management for processes the CLI spawns into the background
3
+ * (RealSense camera, Gazebo, etc.). Same /tmp/agenticros-*.pid convention as
4
+ * the existing scripts/start_demo.sh.
5
+ */
6
+ export type ManagedProcess = "camera" | "sim" | "mcp" | "rosbridge";
7
+ export declare function writePid(name: ManagedProcess, pid: number): void;
8
+ export declare function readPid(name: ManagedProcess): number | undefined;
9
+ /** True if the recorded PID exists and is still alive. */
10
+ export declare function isPidAlive(name: ManagedProcess): boolean;
11
+ /** Kill the recorded process gently (SIGTERM). Returns the pid that was signalled. */
12
+ export declare function killPid(name: ManagedProcess, signal?: NodeJS.Signals): number | undefined;
13
+ export declare function clearPid(name: ManagedProcess): void;
14
+ /** Log file path for a managed process, matching the start_demo.sh convention. */
15
+ export declare function logPath(name: ManagedProcess): string;
16
+ //# sourceMappingURL=pidfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pidfile.d.ts","sourceRoot":"","sources":["../../src/util/pidfile.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,KAAK,GACL,KAAK,GACL,WAAW,CAAC;AAMhB,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAEhE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAMhE;AAED,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CASxD;AAED,sFAAsF;AACtF,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,GAAE,MAAM,CAAC,OAAmB,GAAG,MAAM,GAAG,SAAS,CASpG;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CASnD;AAED,kFAAkF;AAClF,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEpD"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Pidfile management for processes the CLI spawns into the background
3
+ * (RealSense camera, Gazebo, etc.). Same /tmp/agenticros-*.pid convention as
4
+ * the existing scripts/start_demo.sh.
5
+ */
6
+ import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
7
+ const PID_DIR = "/tmp";
8
+ function pidPath(name) {
9
+ return `${PID_DIR}/agenticros-${name}.pid`;
10
+ }
11
+ export function writePid(name, pid) {
12
+ writeFileSync(pidPath(name), String(pid));
13
+ }
14
+ export function readPid(name) {
15
+ const p = pidPath(name);
16
+ if (!existsSync(p))
17
+ return undefined;
18
+ const raw = readFileSync(p, "utf8").trim();
19
+ const pid = Number(raw);
20
+ return Number.isFinite(pid) && pid > 0 ? pid : undefined;
21
+ }
22
+ /** True if the recorded PID exists and is still alive. */
23
+ export function isPidAlive(name) {
24
+ const pid = readPid(name);
25
+ if (!pid)
26
+ return false;
27
+ try {
28
+ process.kill(pid, 0);
29
+ return true;
30
+ }
31
+ catch {
32
+ return false;
33
+ }
34
+ }
35
+ /** Kill the recorded process gently (SIGTERM). Returns the pid that was signalled. */
36
+ export function killPid(name, signal = "SIGTERM") {
37
+ const pid = readPid(name);
38
+ if (!pid)
39
+ return undefined;
40
+ try {
41
+ process.kill(pid, signal);
42
+ return pid;
43
+ }
44
+ catch {
45
+ return undefined;
46
+ }
47
+ }
48
+ export function clearPid(name) {
49
+ const p = pidPath(name);
50
+ if (existsSync(p)) {
51
+ try {
52
+ unlinkSync(p);
53
+ }
54
+ catch {
55
+ // best effort
56
+ }
57
+ }
58
+ }
59
+ /** Log file path for a managed process, matching the start_demo.sh convention. */
60
+ export function logPath(name) {
61
+ return `/tmp/agenticros-${name}.log`;
62
+ }
63
+ //# sourceMappingURL=pidfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pidfile.js","sourceRoot":"","sources":["../../src/util/pidfile.ts"],"names":[],"mappings":"AAAA;;;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,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC1B,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAoB;IAC3C,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC;YACH,UAAU,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;IACH,CAAC;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,OAAO,CAAC,IAAoB;IAC1C,OAAO,mBAAmB,IAAI,MAAM,CAAC;AACvC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Persistent CLI state stored in ~/.agenticros/cli-state.json.
3
+ *
4
+ * Used by the interactive menu to remember last-used choices so subsequent
5
+ * runs default sensibly. Intentionally tiny — anything bigger belongs in
6
+ * ~/.agenticros/config.json (the AgenticROS runtime config).
7
+ */
8
+ export interface CliState {
9
+ /** "real" | "sim-amr" | "sim-arm" */
10
+ lastMode?: string;
11
+ /** Last AgenticROS robot namespace used (e.g. "sim_robot" or a UUID-derived id). */
12
+ lastNamespace?: string;
13
+ /** Last ROS distro choice for `up real` (e.g. "humble" / "jazzy"). */
14
+ lastRosDistro?: string;
15
+ /** Whether to show RViz by default for sim launches. */
16
+ lastUseRviz?: boolean;
17
+ /** ISO timestamp of the last `agenticros up` invocation, for "(yesterday)" hints. */
18
+ lastUpAt?: string;
19
+ /** Schema version — bump when we add migrations. */
20
+ v?: number;
21
+ }
22
+ export declare function readState(): CliState;
23
+ export declare function writeState(patch: Partial<CliState>): CliState;
24
+ /** Friendly age string for menu hints: "today", "yesterday", "3 days ago". */
25
+ export declare function formatAge(iso: string | undefined): string | undefined;
26
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/util/state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAMD,wBAAgB,SAAS,IAAI,QAAQ,CAWpC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAO7D;AAED,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAUrE"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Persistent CLI state stored in ~/.agenticros/cli-state.json.
3
+ *
4
+ * Used by the interactive menu to remember last-used choices so subsequent
5
+ * runs default sensibly. Intentionally tiny — anything bigger belongs in
6
+ * ~/.agenticros/config.json (the AgenticROS runtime config).
7
+ */
8
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
9
+ import { dirname, join } from "node:path";
10
+ import { getCliPaths } from "./paths.js";
11
+ function statePath() {
12
+ return join(getCliPaths().userDataDir, "cli-state.json");
13
+ }
14
+ export function readState() {
15
+ const p = statePath();
16
+ if (!existsSync(p))
17
+ return {};
18
+ try {
19
+ const raw = readFileSync(p, "utf8");
20
+ const obj = JSON.parse(raw);
21
+ if (typeof obj === "object" && obj !== null)
22
+ return obj;
23
+ return {};
24
+ }
25
+ catch {
26
+ return {};
27
+ }
28
+ }
29
+ export function writeState(patch) {
30
+ const p = statePath();
31
+ mkdirSync(dirname(p), { recursive: true });
32
+ const current = readState();
33
+ const next = { v: 1, ...current, ...patch };
34
+ writeFileSync(p, JSON.stringify(next, null, 2));
35
+ return next;
36
+ }
37
+ /** Friendly age string for menu hints: "today", "yesterday", "3 days ago". */
38
+ export function formatAge(iso) {
39
+ if (!iso)
40
+ return undefined;
41
+ const then = new Date(iso).getTime();
42
+ if (!Number.isFinite(then))
43
+ return undefined;
44
+ const days = Math.floor((Date.now() - then) / 86_400_000);
45
+ if (days <= 0)
46
+ return "today";
47
+ if (days === 1)
48
+ return "yesterday";
49
+ if (days < 30)
50
+ return `${days} days ago`;
51
+ if (days < 365)
52
+ return `${Math.floor(days / 30)} months ago`;
53
+ return `${Math.floor(days / 365)} years ago`;
54
+ }
55
+ //# sourceMappingURL=state.js.map