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,359 @@
1
+ import type { TransportConfig } from "@agenticros/core";
2
+ import type { RosTransport } from "@agenticros/core";
3
+ import { createTransport, getTransportConfig } from "@agenticros/core";
4
+ import type { OpenClawPluginApi } from "./plugin-api.js";
5
+ import type { PluginLogger } from "./plugin-api.js";
6
+ import type { AgenticROSConfig } from "@agenticros/core";
7
+ import { readAgenticROSConfigFromFile } from "./config-file.js";
8
+ import { preflightWsEndpoint } from "./preflight.js";
9
+
10
+ /** Shared transport instance for all tools. */
11
+ let transport: RosTransport | null = null;
12
+
13
+ /** Tracks the active transport mode. */
14
+ let currentMode: TransportConfig["mode"] | null = null;
15
+
16
+ /** Concurrency guard — prevents overlapping switchTransport calls. */
17
+ let switching = false;
18
+
19
+ /**
20
+ * Serialize every connect attempt (no TOCTOU gap). Two callers that both see `transport` disconnected
21
+ * must not run `createTransport`+`connect()` in parallel — that duplicates Zenoh WebSockets and triggers
22
+ * remote-api 1006 / camera 503.
23
+ */
24
+ let transportConnectChain: Promise<void> = Promise.resolve();
25
+
26
+ /** Get the active transport. Throws if not connected. */
27
+ export function getTransport(): RosTransport {
28
+ if (!transport) {
29
+ throw new Error("Transport not initialized. Is the service running?");
30
+ }
31
+ return transport;
32
+ }
33
+
34
+ /** Get the active transport or null if not initialized. Use for status checks without throwing. */
35
+ export function getTransportOrNull(): RosTransport | null {
36
+ return transport;
37
+ }
38
+
39
+ /** Get the current transport mode, or null if no transport is active. */
40
+ export function getTransportMode(): TransportConfig["mode"] | null {
41
+ return currentMode;
42
+ }
43
+
44
+ /**
45
+ * Switch the active transport at runtime.
46
+ */
47
+ export async function switchTransport(config: TransportConfig, logger: PluginLogger): Promise<void> {
48
+ if (switching) {
49
+ throw new Error("A transport switch is already in progress. Please wait.");
50
+ }
51
+
52
+ switching = true;
53
+ try {
54
+ if (transport) {
55
+ await transport.disconnect();
56
+ transport = null;
57
+ currentMode = null;
58
+ }
59
+
60
+ const newTransport = await createTransport(config);
61
+
62
+ newTransport.onConnection((status: string) => {
63
+ logger.info(`ROS2 transport status: ${status}`);
64
+ });
65
+
66
+ await newTransport.connect();
67
+
68
+ transport = newTransport;
69
+ currentMode = config.mode;
70
+
71
+ logger.info(`ROS2 transport switched to ${config.mode}`);
72
+ } finally {
73
+ switching = false;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * The plugin owns all reconnection logic (tryConnect + pollWhenDisconnected). Tell the
79
+ * underlying transport client to NOT reconnect on its own — otherwise we get two
80
+ * concurrent reconnect timers per client. When the plugin then drops the transport
81
+ * reference (e.g. on poll-driven replace) the underlying client keeps reconnecting on
82
+ * its own, leaking one live WebSocket per replace cycle and hammering rosbridge.
83
+ */
84
+ function buildTransportConfig(transportCfg: TransportConfig): TransportConfig {
85
+ if (transportCfg.mode === "rosbridge") {
86
+ return {
87
+ ...transportCfg,
88
+ rosbridge: {
89
+ ...(transportCfg.rosbridge ?? { url: "ws://localhost:9090" }),
90
+ reconnect: false,
91
+ },
92
+ };
93
+ }
94
+ return transportCfg;
95
+ }
96
+
97
+ /**
98
+ * Preflight state for the configured router WebSocket endpoint.
99
+ *
100
+ * We use this to:
101
+ * 1. Suppress the noisy `WebSocket disconnected from remote-api-plugin: 1006` /
102
+ * `Restart connection (N/10)` spam emitted by zenoh-ts (and the analogous
103
+ * rosbridge reconnect chatter) when the user simply hasn't started the
104
+ * router yet. Instead of calling `Session.open()` against a dead port, we
105
+ * short-circuit with one clear actionable message.
106
+ * 2. Re-print a single positive message when the router becomes reachable
107
+ * again, so the user can see in the log that AgenticROS recovered.
108
+ */
109
+ const routerProbe = {
110
+ /** True if the last preflight result was reachable. Drives the up/down log message. */
111
+ lastReachable: null as boolean | null,
112
+ /** True once the multiline "how to fix it" banner has been printed in the current down-cycle. */
113
+ bannerPrinted: false,
114
+ };
115
+
116
+ /** What kind of `ws://`-style endpoint, if any, this transport mode talks to. */
117
+ function getRouterEndpoint(
118
+ cfg: TransportConfig,
119
+ ): { kind: "zenoh router" | "rosbridge"; url: string; startHint: string } | null {
120
+ if (cfg.mode === "zenoh") {
121
+ const url = (cfg.zenoh?.routerEndpoint ?? "").trim();
122
+ if (!url) return null;
123
+ return {
124
+ kind: "zenoh router",
125
+ url,
126
+ startHint:
127
+ "Start it with `zenohd -c scripts/zenohd-agenticros.json5` (port 10000, zenoh-plugin-remote-api). See docs/zenoh-agenticros.md.",
128
+ };
129
+ }
130
+ if (cfg.mode === "rosbridge") {
131
+ const url = (cfg.rosbridge?.url ?? "").trim();
132
+ if (!url) return null;
133
+ return {
134
+ kind: "rosbridge",
135
+ url,
136
+ startHint: "Start `rosbridge_server` on the robot (default port 9090).",
137
+ };
138
+ }
139
+ return null;
140
+ }
141
+
142
+ /**
143
+ * TCP-probe the router endpoint and emit human-friendly log messages on state
144
+ * transitions (down→up, up→down). Returns true when the endpoint is reachable
145
+ * (caller may proceed to open the WebSocket session); returns false when it
146
+ * isn't (caller should skip Session.open and let the next retry tick handle
147
+ * recovery).
148
+ */
149
+ async function checkRouterAndLog(
150
+ endpoint: { kind: string; url: string; startHint: string },
151
+ logger: PluginLogger,
152
+ ): Promise<boolean> {
153
+ const result = await preflightWsEndpoint(endpoint.url);
154
+
155
+ if (result.reachable) {
156
+ if (routerProbe.lastReachable === false) {
157
+ logger.info(
158
+ `AgenticROS: ${endpoint.kind} is now reachable at ${endpoint.url} — connecting…`,
159
+ );
160
+ }
161
+ routerProbe.lastReachable = true;
162
+ routerProbe.bannerPrinted = false;
163
+ return true;
164
+ }
165
+
166
+ if (!routerProbe.bannerPrinted) {
167
+ const target = result.host && result.port ? `${result.host}:${result.port}` : endpoint.url;
168
+ logger.warn(
169
+ [
170
+ "",
171
+ "─".repeat(72),
172
+ `AgenticROS: ${endpoint.kind} not reachable (${result.reason ?? "unknown"}).`,
173
+ ` endpoint: ${endpoint.url} (TCP ${target})`,
174
+ ` ${endpoint.startHint}`,
175
+ " Skipping WebSocket session open to avoid `remote-api-plugin: 1006` retry spam.",
176
+ " Will keep probing every 10–15s; this message reappears only if the router goes down again.",
177
+ "─".repeat(72),
178
+ ].join("\n"),
179
+ );
180
+ routerProbe.bannerPrinted = true;
181
+ } else if (routerProbe.lastReachable !== false) {
182
+ logger.warn(
183
+ `AgenticROS: ${endpoint.kind} still not reachable at ${endpoint.url} (${result.reason ?? "unknown"}).`,
184
+ );
185
+ }
186
+ routerProbe.lastReachable = false;
187
+ return false;
188
+ }
189
+
190
+ /**
191
+ * Connect the transport (create + connect). Idempotent: if already connected, no-op.
192
+ */
193
+ async function ensureTransportConnected(
194
+ api: OpenClawPluginApi,
195
+ transportCfg: TransportConfig,
196
+ ): Promise<void> {
197
+ const task = async () => {
198
+ if (transport && transport.getStatus() === "connected") {
199
+ return;
200
+ }
201
+ if (transport) {
202
+ try {
203
+ await transport.disconnect();
204
+ } catch {
205
+ /* ignore */
206
+ }
207
+ transport = null;
208
+ currentMode = null;
209
+ }
210
+ // Preflight the router endpoint for ws-based transports. If the port isn't
211
+ // reachable we skip Session.open() entirely — that's what suppresses the
212
+ // zenoh-ts internal `remote-api-plugin: 1006` / `Restart connection`
213
+ // retry spam when the user simply hasn't started zenohd / rosbridge yet.
214
+ const endpoint = getRouterEndpoint(transportCfg);
215
+ if (endpoint) {
216
+ const reachable = await checkRouterAndLog(endpoint, api.logger);
217
+ if (!reachable) {
218
+ return;
219
+ }
220
+ }
221
+ api.logger.info(`Connecting to ROS2 via ${transportCfg.mode} transport...`);
222
+ const newTransport = await createTransport(buildTransportConfig(transportCfg));
223
+ newTransport.onConnection((status: string) => {
224
+ api.logger.info(`ROS2 transport status: ${status}`);
225
+ });
226
+ await newTransport.connect();
227
+ transport = newTransport;
228
+ currentMode = transportCfg.mode;
229
+ api.logger.info(`ROS2 transport connected (mode: ${transportCfg.mode})`);
230
+ };
231
+
232
+ const next = transportConnectChain.then(task, task);
233
+ transportConnectChain = next.catch((err) => {
234
+ api.logger.warn(
235
+ "AgenticROS transport connect failed: " + (err instanceof Error ? err.message : String(err)),
236
+ );
237
+ });
238
+ await next;
239
+ }
240
+
241
+ const RETRY_INTERVAL_MS = 10000;
242
+ const DISCONNECTED_POLL_MS = 15000;
243
+
244
+ /**
245
+ * Register the ROS2 transport as an OpenClaw managed service and connect immediately
246
+ * so teleop/tools work even if the gateway never calls start(). Retries on failure and
247
+ * when the connection drops (e.g. Zenoh session closed).
248
+ */
249
+ export function registerService(api: OpenClawPluginApi, config: AgenticROSConfig): void {
250
+ const transportCfg = getTransportConfig(config);
251
+
252
+ let pollInterval: ReturnType<typeof setInterval> | null = null;
253
+ let retryTimer: ReturnType<typeof setTimeout> | null = null;
254
+
255
+ api.registerService({
256
+ id: "ros2-transport",
257
+
258
+ async start(_ctx) {
259
+ // OpenClaw awaits plugin service start() before marking sidecars ready and accepting
260
+ // webchat WebSockets. Zenoh connect() can hang indefinitely when the router is down,
261
+ // which would block the entire gateway. Connection is already initiated from register()
262
+ // (eager connect + retries); do not await it here.
263
+ void ensureTransportConnected(api, transportCfg).catch((err) => {
264
+ api.logger.warn(
265
+ "AgenticROS transport connect in service.start failed (retries continue): " +
266
+ (err instanceof Error ? err.message : String(err)),
267
+ );
268
+ });
269
+ },
270
+
271
+ async stop(_ctx) {
272
+ if (pollInterval) {
273
+ clearInterval(pollInterval);
274
+ pollInterval = null;
275
+ }
276
+ if (retryTimer) {
277
+ clearTimeout(retryTimer);
278
+ retryTimer = null;
279
+ }
280
+ if (transport) {
281
+ await transport.disconnect();
282
+ transport = null;
283
+ currentMode = null;
284
+ api.logger.info("ROS2 transport disconnected");
285
+ }
286
+ },
287
+ });
288
+
289
+ function tryConnect(): void {
290
+ if (transport && transport.getStatus() === "connected") return;
291
+ ensureTransportConnected(api, transportCfg)
292
+ .then(() => {})
293
+ .catch((err) => {
294
+ api.logger.warn(
295
+ "AgenticROS transport connect failed (retry in " + RETRY_INTERVAL_MS / 1000 + "s): " + (err instanceof Error ? err.message : String(err)),
296
+ );
297
+ if (retryTimer) clearTimeout(retryTimer);
298
+ retryTimer = setTimeout(tryConnect, RETRY_INTERVAL_MS);
299
+ });
300
+ }
301
+
302
+ // When we have a transport but it's disconnected (e.g. Zenoh session dropped), reconnect.
303
+ //
304
+ // IMPORTANT: do NOT drop the transport reference without calling disconnect() first.
305
+ // ensureTransportConnected() already does the right thing — it disconnects the old
306
+ // transport (which clears its timers and closes its WebSocket) before creating a new
307
+ // one. The previous version of this function nulled `transport` directly, which
308
+ // orphaned the WebSocket client and leaked one live connection per poll cycle.
309
+ function pollWhenDisconnected(): void {
310
+ if (transport && transport.getStatus() === "connected") return;
311
+ ensureTransportConnected(api, transportCfg).catch((err) => {
312
+ api.logger.warn(
313
+ "AgenticROS transport poll-reconnect failed: " +
314
+ (err instanceof Error ? err.message : String(err)),
315
+ );
316
+ });
317
+ }
318
+
319
+ // Connect eagerly; on failure retry every 10s
320
+ ensureTransportConnected(api, transportCfg).catch((err) => {
321
+ api.logger.warn("AgenticROS eager transport connect failed: " + (err instanceof Error ? err.message : String(err)));
322
+ if (retryTimer) clearTimeout(retryTimer);
323
+ retryTimer = setTimeout(tryConnect, RETRY_INTERVAL_MS);
324
+ });
325
+
326
+ // Every 15s, if disconnected (or session dropped), try to connect so we recover without restart
327
+ pollInterval = setInterval(pollWhenDisconnected, DISCONNECTED_POLL_MS);
328
+ }
329
+
330
+ /**
331
+ * Re-read config from file and try to connect the transport. Use from teleop "Reconnect" so the user
332
+ * can connect after starting the Zenoh router without restarting the gateway.
333
+ */
334
+ export async function tryReconnectFromFile(api: OpenClawPluginApi): Promise<{ ok: boolean; error?: string }> {
335
+ try {
336
+ const config = readAgenticROSConfigFromFile();
337
+ const transportCfg = getTransportConfig(config);
338
+ if (transportCfg.mode === "zenoh") {
339
+ const endpoint = (transportCfg.zenoh?.routerEndpoint ?? "").trim();
340
+ if (!endpoint) {
341
+ return { ok: false, error: "Zenoh router endpoint is empty. Set zenoh.routerEndpoint in config (e.g. ws://localhost:10000)." };
342
+ }
343
+ if (!/^wss?:\/\//i.test(endpoint)) {
344
+ return { ok: false, error: `Zenoh endpoint must be a WebSocket URL (ws:// or wss://). Got: "${endpoint}". Use e.g. ws://localhost:10000.` };
345
+ }
346
+ try {
347
+ new URL(endpoint);
348
+ } catch {
349
+ return { ok: false, error: `Invalid Zenoh URL: "${endpoint}". Use e.g. ws://localhost:10000.` };
350
+ }
351
+ }
352
+ await ensureTransportConnected(api, transportCfg);
353
+ return { ok: true };
354
+ } catch (err) {
355
+ const msg = err instanceof Error ? err.message : String(err);
356
+ api.logger.warn("AgenticROS tryReconnectFromFile failed: " + msg);
357
+ return { ok: false, error: msg };
358
+ }
359
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Skill contract types for AgenticROS skill packages.
3
+ * Skill packages implement registerSkill(api, config, context) and receive
4
+ * context.getTransport(), context.getDepthDistance(), and context.logger.
5
+ */
6
+
7
+ import type { RosTransport } from "@agenticros/core";
8
+ import type { OpenClawPluginApi } from "./plugin-api.js";
9
+ import type { AgenticROSConfig } from "@agenticros/core";
10
+ import type { PluginLogger } from "./plugin-api.js";
11
+
12
+ /** Result of sampling a depth topic (e.g. RealSense). */
13
+ export interface DepthSampleResult {
14
+ distance_m: number;
15
+ median_m: number;
16
+ valid: boolean;
17
+ topic: string;
18
+ encoding: string;
19
+ width: number;
20
+ height: number;
21
+ sample_count: number;
22
+ min_m: number;
23
+ max_m: number;
24
+ }
25
+
26
+ /** Result of sampling left/center/right sectors of a depth image (for turning toward person). */
27
+ export interface DepthSectorsResult {
28
+ left_m: number;
29
+ center_m: number;
30
+ right_m: number;
31
+ valid: boolean;
32
+ topic: string;
33
+ }
34
+
35
+ /**
36
+ * Context passed to each skill when it registers.
37
+ * - getTransport(): active ROS2 transport (throws if not connected).
38
+ * - getDepthDistance(transport, topic, timeoutMs?): sample depth in meters from a topic.
39
+ * - getDepthSectors(transport, topic, timeoutMs?): sample left/center/right sectors for turn direction.
40
+ * - logger: plugin logger.
41
+ */
42
+ export interface SkillContext {
43
+ getTransport(): RosTransport;
44
+ getDepthDistance(
45
+ transport: RosTransport,
46
+ topic: string,
47
+ timeoutMs?: number,
48
+ ): Promise<DepthSampleResult>;
49
+ getDepthSectors(
50
+ transport: RosTransport,
51
+ topic: string,
52
+ timeoutMs?: number,
53
+ ): Promise<DepthSectorsResult>;
54
+ logger: PluginLogger;
55
+ }
56
+
57
+ /**
58
+ * Skill package entry: called once at gateway start with the plugin api, full config, and skill context.
59
+ * The skill reads its config from config.skills.<skillId> and registers tools/commands via api.
60
+ */
61
+ export type RegisterSkill = (
62
+ api: OpenClawPluginApi,
63
+ config: AgenticROSConfig,
64
+ context: SkillContext,
65
+ ) => void | Promise<void>;
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Load skill packages from skillPackages (npm names) and skillPaths (directories).
3
+ * Each loaded skill is called with registerSkill(api, config, context).
4
+ */
5
+
6
+ import { pathToFileURL } from "node:url";
7
+ import { createRequire } from "node:module";
8
+ import { readFileSync, readdirSync, existsSync } from "node:fs";
9
+ import { join } from "node:path";
10
+ import type { OpenClawPluginApi } from "./plugin-api.js";
11
+ import type { AgenticROSConfig } from "@agenticros/core";
12
+ import type { RegisterSkill, SkillContext } from "./skill-api.js";
13
+ import { getTransport } from "./service.js";
14
+ import { getDepthDistance, getDepthSectors } from "./depth.js";
15
+
16
+ const require = createRequire(import.meta.url);
17
+
18
+ /** Loaded skill ids (e.g. "followme") for robot context. */
19
+ const loadedSkillIds: string[] = [];
20
+
21
+ /**
22
+ * Returns the list of skill ids that were successfully loaded.
23
+ * Used by robot-context to build "Available skills".
24
+ */
25
+ export function getLoadedSkillIds(): string[] {
26
+ return [...loadedSkillIds];
27
+ }
28
+
29
+ function deriveSkillId(packageName: string): string {
30
+ const lower = packageName.toLowerCase();
31
+ if (lower.startsWith("agenticros-skill-")) {
32
+ return lower.slice("agenticros-skill-".length);
33
+ }
34
+ return lower.replace(/^@[^/]+\//, "").replace(/[^a-z0-9]/g, "");
35
+ }
36
+
37
+ /**
38
+ * Load a single module and call registerSkill if present.
39
+ * Returns the skill id if successful.
40
+ */
41
+ async function loadSkillModule(
42
+ api: OpenClawPluginApi,
43
+ config: AgenticROSConfig,
44
+ context: SkillContext,
45
+ entryPath: string,
46
+ packageName: string,
47
+ ): Promise<string | null> {
48
+ const skillId = deriveSkillId(packageName);
49
+ try {
50
+ const url = pathToFileURL(entryPath).href;
51
+ const mod = await import(/* webpackIgnore: true */ url);
52
+ const registerSkill = mod.registerSkill ?? mod.default?.registerSkill ?? mod.default;
53
+ if (typeof registerSkill !== "function") {
54
+ api.logger.warn(`Skill ${packageName}: no registerSkill export, skipping`);
55
+ return null;
56
+ }
57
+ await Promise.resolve(registerSkill(api, config, context));
58
+ return skillId;
59
+ } catch (err) {
60
+ api.logger.error(`Failed to load skill ${packageName}: ${err}`);
61
+ return null;
62
+ }
63
+ }
64
+
65
+ /**
66
+ * Resolve a package name to its main entry path (Node resolution).
67
+ */
68
+ function resolvePackageEntry(packageName: string): string | null {
69
+ try {
70
+ const pkgPath = require.resolve(packageName, { paths: [process.cwd()] });
71
+ return pkgPath;
72
+ } catch {
73
+ return null;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Scan a directory for package.json with "agenticrosSkill": true and return entry path.
79
+ */
80
+ function findSkillInPath(dirPath: string): { entry: string; packageName: string } | null {
81
+ if (!existsSync(dirPath)) return null;
82
+ const pkgPath = join(dirPath, "package.json");
83
+ if (!existsSync(pkgPath)) return null;
84
+ let pkg: { agenticrosSkill?: boolean; main?: string; name?: string };
85
+ try {
86
+ pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
87
+ } catch {
88
+ return null;
89
+ }
90
+ if (!pkg.agenticrosSkill) return null;
91
+ const main = pkg.main ?? "index.js";
92
+ const entry = join(dirPath, main);
93
+ if (!existsSync(entry)) return null;
94
+ return { entry, packageName: pkg.name ?? "unknown" };
95
+ }
96
+
97
+ /**
98
+ * Load all skills from config.skillPackages and config.skillPaths.
99
+ * Builds context with getTransport, getDepthDistance, logger.
100
+ */
101
+ export async function loadSkills(
102
+ api: OpenClawPluginApi,
103
+ config: AgenticROSConfig,
104
+ ): Promise<void> {
105
+ const context: SkillContext = {
106
+ getTransport,
107
+ getDepthDistance,
108
+ getDepthSectors,
109
+ logger: api.logger,
110
+ };
111
+
112
+ const packages = config.skillPackages ?? [];
113
+ const paths = config.skillPaths ?? [];
114
+
115
+ loadedSkillIds.length = 0;
116
+
117
+ for (const pkgName of packages) {
118
+ const entryPath = resolvePackageEntry(pkgName);
119
+ if (!entryPath) {
120
+ api.logger.warn(`Skill package not found: ${pkgName}`);
121
+ continue;
122
+ }
123
+ const skillId = await loadSkillModule(api, config, context, entryPath, pkgName);
124
+ if (skillId) loadedSkillIds.push(skillId);
125
+ }
126
+
127
+ for (const dir of paths) {
128
+ const resolved = findSkillInPath(dir);
129
+ if (!resolved) {
130
+ api.logger.warn(`No agenticros skill in path: ${dir}`);
131
+ continue;
132
+ }
133
+ const skillId = await loadSkillModule(
134
+ api,
135
+ config,
136
+ context,
137
+ resolved.entry,
138
+ resolved.packageName,
139
+ );
140
+ if (skillId && !loadedSkillIds.includes(skillId)) loadedSkillIds.push(skillId);
141
+ }
142
+
143
+ if (loadedSkillIds.length > 0) {
144
+ api.logger.info(`AgenticROS: loaded skills: ${loadedSkillIds.join(", ")}`);
145
+ }
146
+ }