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.
- package/LICENSE +192 -0
- package/README.md +90 -4
- package/dist/commands/config.d.ts +20 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +179 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/doctor.d.ts +33 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +232 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/down.d.ts +15 -0
- package/dist/commands/down.d.ts.map +1 -0
- package/dist/commands/down.js +91 -0
- package/dist/commands/down.js.map +1 -0
- package/dist/commands/init.d.ts +21 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +259 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/logs.d.ts +18 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +67 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/status.d.ts +12 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +56 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/up.d.ts +20 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +70 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/menu.d.ts +9 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +96 -0
- package/dist/menu.js.map +1 -0
- package/dist/runners/real-robot.d.ts +15 -0
- package/dist/runners/real-robot.d.ts.map +1 -0
- package/dist/runners/real-robot.js +46 -0
- package/dist/runners/real-robot.js.map +1 -0
- package/dist/runners/sim.d.ts +19 -0
- package/dist/runners/sim.d.ts.map +1 -0
- package/dist/runners/sim.js +53 -0
- package/dist/runners/sim.js.map +1 -0
- package/dist/util/env.d.ts +24 -0
- package/dist/util/env.d.ts.map +1 -0
- package/dist/util/env.js +53 -0
- package/dist/util/env.js.map +1 -0
- package/dist/util/logger.d.ts +24 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +62 -0
- package/dist/util/logger.js.map +1 -0
- package/dist/util/paths.d.ts +57 -0
- package/dist/util/paths.d.ts.map +1 -0
- package/dist/util/paths.js +132 -0
- package/dist/util/paths.js.map +1 -0
- package/dist/util/pidfile.d.ts +16 -0
- package/dist/util/pidfile.d.ts.map +1 -0
- package/dist/util/pidfile.js +63 -0
- package/dist/util/pidfile.js.map +1 -0
- package/dist/util/state.d.ts +26 -0
- package/dist/util/state.d.ts.map +1 -0
- package/dist/util/state.js +55 -0
- package/dist/util/state.js.map +1 -0
- package/package.json +60 -1
- package/runtime/BUNDLE.json +11 -0
- package/runtime/LICENSE +192 -0
- package/runtime/README.md +273 -0
- package/runtime/docs/architecture.md +366 -0
- package/runtime/docs/cli.md +140 -0
- package/runtime/docs/memory.md +292 -0
- package/runtime/docs/robot-setup.md +347 -0
- package/runtime/package.json +28 -0
- package/runtime/packages/agenticros/agenticros-agenticros-0.0.1.tgz +0 -0
- package/runtime/packages/agenticros/openclaw.plugin.json +451 -0
- package/runtime/packages/agenticros/package.json +41 -0
- package/runtime/packages/agenticros/src/camera-snapshot-cache.ts +59 -0
- package/runtime/packages/agenticros/src/camera-snapshot-routes.ts +44 -0
- package/runtime/packages/agenticros/src/commands/estop.ts +41 -0
- package/runtime/packages/agenticros/src/commands/transport.ts +195 -0
- package/runtime/packages/agenticros/src/config-file.ts +136 -0
- package/runtime/packages/agenticros/src/config-page.ts +498 -0
- package/runtime/packages/agenticros/src/context/robot-context.ts +373 -0
- package/runtime/packages/agenticros/src/depth.ts +313 -0
- package/runtime/packages/agenticros/src/describer.ts +157 -0
- package/runtime/packages/agenticros/src/image-binary-trim.ts +16 -0
- package/runtime/packages/agenticros/src/index.ts +85 -0
- package/runtime/packages/agenticros/src/landing-page.ts +38 -0
- package/runtime/packages/agenticros/src/memory.ts +44 -0
- package/runtime/packages/agenticros/src/plugin-api.ts +173 -0
- package/runtime/packages/agenticros/src/plugin-image-base64.ts +69 -0
- package/runtime/packages/agenticros/src/preflight.ts +110 -0
- package/runtime/packages/agenticros/src/routes.ts +328 -0
- package/runtime/packages/agenticros/src/safety/validator.ts +43 -0
- package/runtime/packages/agenticros/src/service.ts +359 -0
- package/runtime/packages/agenticros/src/skill-api.ts +65 -0
- package/runtime/packages/agenticros/src/skill-loader.ts +146 -0
- package/runtime/packages/agenticros/src/teleop/page.ts +498 -0
- package/runtime/packages/agenticros/src/teleop/routes.ts +650 -0
- package/runtime/packages/agenticros/src/tools/index.ts +26 -0
- package/runtime/packages/agenticros/src/tools/ros2-action.ts +50 -0
- package/runtime/packages/agenticros/src/tools/ros2-camera.ts +221 -0
- package/runtime/packages/agenticros/src/tools/ros2-depth-distance.ts +58 -0
- package/runtime/packages/agenticros/src/tools/ros2-introspect.ts +62 -0
- package/runtime/packages/agenticros/src/tools/ros2-memory.ts +158 -0
- package/runtime/packages/agenticros/src/tools/ros2-param.ts +87 -0
- package/runtime/packages/agenticros/src/tools/ros2-publish.ts +52 -0
- package/runtime/packages/agenticros/src/tools/ros2-service.ts +46 -0
- package/runtime/packages/agenticros/src/tools/ros2-subscribe.ts +71 -0
- package/runtime/packages/agenticros/tsconfig.json +9 -0
- package/runtime/packages/agenticros-claude-code/README.md +260 -0
- package/runtime/packages/agenticros-claude-code/config.example.json +9 -0
- package/runtime/packages/agenticros-claude-code/dist/config.d.ts +8 -0
- package/runtime/packages/agenticros-claude-code/dist/config.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/config.js +93 -0
- package/runtime/packages/agenticros-claude-code/dist/config.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/depth.d.ts +20 -0
- package/runtime/packages/agenticros-claude-code/dist/depth.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/depth.js +126 -0
- package/runtime/packages/agenticros-claude-code/dist/depth.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts +6 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js +36 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts +33 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js +134 -0
- package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts +43 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js +73 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts +58 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js +251 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts +61 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js +268 -0
- package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/index.d.ts +3 -0
- package/runtime/packages/agenticros-claude-code/dist/index.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/index.js +111 -0
- package/runtime/packages/agenticros-claude-code/dist/index.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/memory.d.ts +17 -0
- package/runtime/packages/agenticros-claude-code/dist/memory.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/memory.js +44 -0
- package/runtime/packages/agenticros-claude-code/dist/memory.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/safety.d.ts +10 -0
- package/runtime/packages/agenticros-claude-code/dist/safety.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/safety.js +34 -0
- package/runtime/packages/agenticros-claude-code/dist/safety.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/tools.d.ts +36 -0
- package/runtime/packages/agenticros-claude-code/dist/tools.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/tools.js +777 -0
- package/runtime/packages/agenticros-claude-code/dist/tools.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/transport.d.ts +17 -0
- package/runtime/packages/agenticros-claude-code/dist/transport.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/transport.js +46 -0
- package/runtime/packages/agenticros-claude-code/dist/transport.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts +42 -0
- package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts.map +1 -0
- package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js +114 -0
- package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js.map +1 -0
- package/runtime/packages/agenticros-claude-code/package.json +29 -0
- package/runtime/packages/agenticros-claude-code/src/config.ts +96 -0
- package/runtime/packages/agenticros-claude-code/src/depth.ts +173 -0
- package/runtime/packages/agenticros-claude-code/src/find-object/coco-classes.ts +38 -0
- package/runtime/packages/agenticros-claude-code/src/find-object/find-object.ts +190 -0
- package/runtime/packages/agenticros-claude-code/src/follow-me/controller.ts +109 -0
- package/runtime/packages/agenticros-claude-code/src/follow-me/depth-loop.ts +420 -0
- package/runtime/packages/agenticros-claude-code/src/follow-me/detector.ts +303 -0
- package/runtime/packages/agenticros-claude-code/src/follow-me/loop.ts +330 -0
- package/runtime/packages/agenticros-claude-code/src/index.ts +125 -0
- package/runtime/packages/agenticros-claude-code/src/memory.ts +51 -0
- package/runtime/packages/agenticros-claude-code/src/safety.ts +44 -0
- package/runtime/packages/agenticros-claude-code/src/tools.ts +891 -0
- package/runtime/packages/agenticros-claude-code/src/transport.ts +58 -0
- package/runtime/packages/agenticros-claude-code/src/zero-shot/detector.ts +169 -0
- package/runtime/packages/agenticros-claude-code/tsconfig.json +9 -0
- package/runtime/packages/agenticros-claude-code/yolo-debug.mjs +106 -0
- package/runtime/packages/agenticros-gemini/README.md +139 -0
- package/runtime/packages/agenticros-gemini/package.json +28 -0
- package/runtime/packages/agenticros-gemini/scripts/smoke-api.mjs +42 -0
- package/runtime/packages/agenticros-gemini/src/chat.ts +139 -0
- package/runtime/packages/agenticros-gemini/src/config.ts +92 -0
- package/runtime/packages/agenticros-gemini/src/depth.ts +173 -0
- package/runtime/packages/agenticros-gemini/src/index.ts +58 -0
- package/runtime/packages/agenticros-gemini/src/memory.ts +32 -0
- package/runtime/packages/agenticros-gemini/src/safety.ts +44 -0
- package/runtime/packages/agenticros-gemini/src/tools.ts +516 -0
- package/runtime/packages/agenticros-gemini/src/transport.ts +58 -0
- package/runtime/packages/agenticros-gemini/tsconfig.json +8 -0
- package/runtime/packages/core/package.json +47 -0
- package/runtime/packages/core/src/banner.ts +32 -0
- package/runtime/packages/core/src/cmd-vel-twist.ts +31 -0
- package/runtime/packages/core/src/config.ts +279 -0
- package/runtime/packages/core/src/index.ts +54 -0
- package/runtime/packages/core/src/memory/__tests__/factory.test.ts +70 -0
- package/runtime/packages/core/src/memory/__tests__/local-provider.test.ts +195 -0
- package/runtime/packages/core/src/memory/__tests__/mem0-provider.test.ts +192 -0
- package/runtime/packages/core/src/memory/__tests__/smart-defaults.test.ts +46 -0
- package/runtime/packages/core/src/memory/factory.ts +63 -0
- package/runtime/packages/core/src/memory/index.ts +10 -0
- package/runtime/packages/core/src/memory/local/provider.ts +229 -0
- package/runtime/packages/core/src/memory/mem0/provider.ts +379 -0
- package/runtime/packages/core/src/memory/types.ts +96 -0
- package/runtime/packages/core/src/topic-utils.ts +95 -0
- package/runtime/packages/core/src/transport/factory.ts +47 -0
- package/runtime/packages/core/src/transport/local/conversion.ts +333 -0
- package/runtime/packages/core/src/transport/local/entities.ts +129 -0
- package/runtime/packages/core/src/transport/local/transport.ts +406 -0
- package/runtime/packages/core/src/transport/rosbridge/actions.ts +81 -0
- package/runtime/packages/core/src/transport/rosbridge/adapter.ts +157 -0
- package/runtime/packages/core/src/transport/rosbridge/client.ts +438 -0
- package/runtime/packages/core/src/transport/rosbridge/services.ts +41 -0
- package/runtime/packages/core/src/transport/rosbridge/topics.ts +60 -0
- package/runtime/packages/core/src/transport/rosbridge/types.ts +118 -0
- package/runtime/packages/core/src/transport/transport.ts +77 -0
- package/runtime/packages/core/src/transport/types.ts +137 -0
- package/runtime/packages/core/src/transport/webrtc/signaling-client.ts +196 -0
- package/runtime/packages/core/src/transport/webrtc/signaling-types.ts +130 -0
- package/runtime/packages/core/src/transport/webrtc/transport.ts +516 -0
- package/runtime/packages/core/src/transport/zenoh/adapter.ts +357 -0
- package/runtime/packages/core/src/transport/zenoh/cdr.ts +183 -0
- package/runtime/packages/core/src/transport/zenoh/keys.ts +51 -0
- package/runtime/packages/core/tsconfig.json +9 -0
- package/runtime/packages/ros-camera/package.json +30 -0
- package/runtime/packages/ros-camera/src/index.ts +13 -0
- package/runtime/packages/ros-camera/src/snapshot.ts +372 -0
- package/runtime/packages/ros-camera/tsconfig.json +9 -0
- package/runtime/pnpm-lock.yaml +5260 -0
- package/runtime/pnpm-workspace.yaml +2 -0
- package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/__init__.py +0 -0
- package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/agent_node.py +561 -0
- package/runtime/ros2_ws/src/agenticros_agent/package.xml +25 -0
- package/runtime/ros2_ws/src/agenticros_agent/resource/agenticros_agent +0 -0
- package/runtime/ros2_ws/src/agenticros_agent/setup.cfg +4 -0
- package/runtime/ros2_ws/src/agenticros_agent/setup.py +25 -0
- package/runtime/ros2_ws/src/agenticros_bringup/README.md +128 -0
- package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/__init__.py +1 -0
- package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/cmd_vel_relay.py +33 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/cmd_vel_bridge.launch.py +58 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/gazebo_turtlebot3.launch.py +69 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo.launch.py +55 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo_rviz.launch.py +48 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/realsense_rosbridge.launch.py +154 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/rosbridge_gazebo.launch.py +54 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/rviz.launch.py +38 -0
- package/runtime/ros2_ws/src/agenticros_bringup/launch/turtlebot3_gazebo_rviz.launch.py +42 -0
- package/runtime/ros2_ws/src/agenticros_bringup/package.xml +24 -0
- package/runtime/ros2_ws/src/agenticros_bringup/resource/agenticros_bringup +0 -0
- package/runtime/ros2_ws/src/agenticros_bringup/rviz/turtlebot3_agenticros.rviz +174 -0
- package/runtime/ros2_ws/src/agenticros_bringup/setup.cfg +4 -0
- package/runtime/ros2_ws/src/agenticros_bringup/setup.py +28 -0
- package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/__init__.py +0 -0
- package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/discovery_node.py +172 -0
- package/runtime/ros2_ws/src/agenticros_discovery/package.xml +22 -0
- package/runtime/ros2_ws/src/agenticros_discovery/resource/agenticros_discovery +0 -0
- package/runtime/ros2_ws/src/agenticros_discovery/setup.cfg +5 -0
- package/runtime/ros2_ws/src/agenticros_discovery/setup.py +25 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/README.md +66 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__init__.py +1 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__main__.py +5 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follow_me_node.py +278 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follower_controller.py +631 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/person_tracker.py +635 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/package.xml +22 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/resource/agenticros_follow_me +0 -0
- package/runtime/ros2_ws/src/agenticros_follow_me/setup.py +25 -0
- package/runtime/ros2_ws/src/agenticros_msgs/CMakeLists.txt +26 -0
- package/runtime/ros2_ws/src/agenticros_msgs/msg/CapabilityManifest.msg +9 -0
- package/runtime/ros2_ws/src/agenticros_msgs/package.xml +22 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeGetStatus.srv +11 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetDistance.srv +4 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetTarget.srv +6 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStart.srv +5 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStop.srv +3 -0
- package/runtime/ros2_ws/src/agenticros_msgs/srv/GetCapabilities.srv +5 -0
- package/runtime/ros2_ws/src/agenticros_sim/CMakeLists.txt +24 -0
- package/runtime/ros2_ws/src/agenticros_sim/README.md +120 -0
- package/runtime/ros2_ws/src/agenticros_sim/config/agenticros-sim.config.json +28 -0
- package/runtime/ros2_ws/src/agenticros_sim/config/amr_bridge.yaml +111 -0
- package/runtime/ros2_ws/src/agenticros_sim/config/amr_view.rviz +172 -0
- package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.dsv.in +3 -0
- package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.sh.in +7 -0
- package/runtime/ros2_ws/src/agenticros_sim/launch/sim_amr.launch.py +159 -0
- package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.config +17 -0
- package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.sdf +244 -0
- package/runtime/ros2_ws/src/agenticros_sim/package.xml +27 -0
- package/runtime/ros2_ws/src/agenticros_sim/worlds/agenticros_indoor.sdf +183 -0
- package/runtime/scripts/activate_workspace.sh +285 -0
- package/runtime/scripts/agenticros-describer.policy.yaml +96 -0
- package/runtime/scripts/agenticros-proxy.cjs +99 -0
- package/runtime/scripts/agenticros-rosbridge.policy.yaml +62 -0
- package/runtime/scripts/check-cli-tarball-size.mjs +42 -0
- package/runtime/scripts/configure_agenticros.sh +200 -0
- package/runtime/scripts/configure_for_sim.sh +64 -0
- package/runtime/scripts/fix-openclaw-control-ui-path.sh +20 -0
- package/runtime/scripts/install_cli.sh +94 -0
- package/runtime/scripts/install_rosbridge_from_source.sh +67 -0
- package/runtime/scripts/lib/agenticros-banner.sh +28 -0
- package/runtime/scripts/onboard_robot.sh +75 -0
- package/runtime/scripts/openai.policy.yaml +77 -0
- package/runtime/scripts/openclaw-dashboard-url.cjs +49 -0
- package/runtime/scripts/pack-runtime.mjs +245 -0
- package/runtime/scripts/run_demo_native.sh +43 -0
- package/runtime/scripts/run_nemoclaw_host_stack.sh +91 -0
- package/runtime/scripts/run_robot_rosbridge.sh +36 -0
- package/runtime/scripts/sandbox_rosbridge_relay.py +137 -0
- package/runtime/scripts/setup-openclaw-local.cjs +75 -0
- package/runtime/scripts/setup_gateway_plugin.sh +329 -0
- package/runtime/scripts/setup_robot.sh +113 -0
- package/runtime/scripts/setup_workspace.sh +484 -0
- package/runtime/scripts/sim/run_sim.sh +146 -0
- package/runtime/scripts/smoke_test_nemoclaw.sh +123 -0
- package/runtime/scripts/start_demo.sh +55 -0
- package/runtime/scripts/sync-skill-tools.mjs +335 -0
- package/runtime/scripts/test-follow-me-sim.mjs +135 -0
- package/runtime/scripts/test-mcp-e2e.mjs +184 -0
- package/runtime/scripts/test-rclnodejs.mts +129 -0
- package/runtime/scripts/use-openclaw-2026.2.26.sh +19 -0
- package/runtime/scripts/use-openclaw-2026.3.11.sh +19 -0
- package/runtime/scripts/zenoh-bridge-ros2dds-robot.json5 +30 -0
- package/runtime/scripts/zenohd-agenticros.json5 +11 -0
- package/runtime/scripts/zenohd-rosclaw.json5 +11 -0
- package/runtime/tsconfig.base.json +19 -0
- package/index.js +0 -6
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import type { OpenClawPluginApi, HttpRouteHandler, HttpRouteResponse } from "./plugin-api.js";
|
|
2
|
+
import type { AgenticROSConfig } from "@agenticros/core";
|
|
3
|
+
import { parseConfig } from "@agenticros/core";
|
|
4
|
+
import {
|
|
5
|
+
readOpenClawConfig,
|
|
6
|
+
writeAgenticROSConfig,
|
|
7
|
+
getOpenClawConfigPath,
|
|
8
|
+
ConfigFileError,
|
|
9
|
+
readAgenticROSConfigFromFile,
|
|
10
|
+
} from "./config-file.js";
|
|
11
|
+
import { getLandingPageHtml } from "./landing-page.js";
|
|
12
|
+
import { getConfigPageHtml, getConfigPageScript } from "./config-page.js";
|
|
13
|
+
import { registerTeleopRoutes } from "./teleop/routes.js";
|
|
14
|
+
import { registerCameraSnapshotRoutes } from "./camera-snapshot-routes.js";
|
|
15
|
+
import { getMemory, getMemoryInitError } from "./memory.js";
|
|
16
|
+
import { resolveMemoryNamespace } from "@agenticros/core";
|
|
17
|
+
|
|
18
|
+
async function readJsonBodyFromReq(req: { readJsonBody?: () => Promise<Record<string, unknown> | null>; body?: unknown; on?: (e: string, cb: (c?: Buffer) => void) => void }): Promise<Record<string, unknown>> {
|
|
19
|
+
if (typeof req.readJsonBody === "function") {
|
|
20
|
+
const out = await req.readJsonBody();
|
|
21
|
+
if (out && typeof out === "object") return out;
|
|
22
|
+
}
|
|
23
|
+
const raw = req.body;
|
|
24
|
+
if (typeof raw === "object" && raw !== null) return raw as Record<string, unknown>;
|
|
25
|
+
if (raw && typeof (raw as Promise<unknown>).then === "function") {
|
|
26
|
+
const parsed = await (raw as Promise<Record<string, unknown>>);
|
|
27
|
+
if (parsed && typeof parsed === "object") return parsed;
|
|
28
|
+
}
|
|
29
|
+
if (typeof req.on === "function") {
|
|
30
|
+
const chunks: Buffer[] = [];
|
|
31
|
+
const body = await new Promise<string>((resolve, reject) => {
|
|
32
|
+
(req as NodeJS.ReadableStream).on("data", (chunk: Buffer | string) => {
|
|
33
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
34
|
+
});
|
|
35
|
+
(req as NodeJS.ReadableStream).on("end", () =>
|
|
36
|
+
resolve(Buffer.concat(chunks).toString("utf8")),
|
|
37
|
+
);
|
|
38
|
+
(req as NodeJS.ReadableStream).on("error", reject);
|
|
39
|
+
});
|
|
40
|
+
if (body.trim()) {
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(body) as Record<string, unknown>;
|
|
43
|
+
} catch {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns a JSON-serializable copy of config with sensitive fields redacted.
|
|
53
|
+
*/
|
|
54
|
+
function configForApi(config: AgenticROSConfig): Record<string, unknown> {
|
|
55
|
+
const out = JSON.parse(JSON.stringify(config)) as Record<string, unknown>;
|
|
56
|
+
const webrtc = out.webrtc as Record<string, unknown> | undefined;
|
|
57
|
+
if (webrtc && typeof webrtc.robotKey === "string" && webrtc.robotKey.length > 0) {
|
|
58
|
+
webrtc.robotKey = "(set)";
|
|
59
|
+
}
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Merge an incoming save payload with the existing on-disk config so partial forms do not erase
|
|
65
|
+
* nested keys (e.g. skills.followme vs other skill ids).
|
|
66
|
+
*/
|
|
67
|
+
function mergeIncomingAgenticROSConfig(
|
|
68
|
+
existing: Record<string, unknown> | undefined,
|
|
69
|
+
incoming: Record<string, unknown>,
|
|
70
|
+
): Record<string, unknown> {
|
|
71
|
+
const base =
|
|
72
|
+
existing && typeof existing === "object" ? (JSON.parse(JSON.stringify(existing)) as Record<string, unknown>) : {};
|
|
73
|
+
for (const key of Object.keys(incoming)) {
|
|
74
|
+
if (key === "skills") {
|
|
75
|
+
const exSkills = (base.skills as Record<string, unknown>) ?? {};
|
|
76
|
+
const inSkills = incoming.skills as Record<string, unknown> | undefined;
|
|
77
|
+
if (!inSkills || typeof inSkills !== "object" || Array.isArray(inSkills)) continue;
|
|
78
|
+
base.skills = { ...exSkills, ...inSkills };
|
|
79
|
+
const exFm = (exSkills.followme as Record<string, unknown>) ?? {};
|
|
80
|
+
const rawFm = inSkills.followme;
|
|
81
|
+
if (rawFm !== undefined && typeof rawFm === "object" && rawFm !== null && !Array.isArray(rawFm)) {
|
|
82
|
+
const inFm = rawFm as Record<string, unknown>;
|
|
83
|
+
(base.skills as Record<string, unknown>).followme = { ...exFm, ...inFm };
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
base[key] = incoming[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return base;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Register all AgenticROS HTTP routes: landing, config, config API, and teleop.
|
|
94
|
+
* Only call when api.registerHttpRoute is available.
|
|
95
|
+
*/
|
|
96
|
+
export function registerRoutes(api: OpenClawPluginApi, config: AgenticROSConfig): void {
|
|
97
|
+
const register = api.registerHttpRoute;
|
|
98
|
+
if (typeof register !== "function") {
|
|
99
|
+
api.logger.info("AgenticROS HTTP: registerHttpRoute not available, skipping routes");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const makeLandingHandler = (basePath: string): HttpRouteHandler => (_req, res) => {
|
|
104
|
+
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
105
|
+
res.statusCode = 200;
|
|
106
|
+
res.end(getLandingPageHtml(basePath));
|
|
107
|
+
};
|
|
108
|
+
const configPageHandler: HttpRouteHandler = (_req, res) => {
|
|
109
|
+
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
110
|
+
res.statusCode = 200;
|
|
111
|
+
res.end(getConfigPageHtml());
|
|
112
|
+
};
|
|
113
|
+
const configScriptHandler: HttpRouteHandler = (_req, res) => {
|
|
114
|
+
res.setHeader("Content-Type", "application/javascript; charset=utf-8");
|
|
115
|
+
res.statusCode = 200;
|
|
116
|
+
res.end(getConfigPageScript());
|
|
117
|
+
};
|
|
118
|
+
const configJsonHandler: HttpRouteHandler = (_req, res) => {
|
|
119
|
+
let payload: Record<string, unknown>;
|
|
120
|
+
try {
|
|
121
|
+
// Always reflect on-disk openclaw.json so the form matches manual edits / external saves without relying on a stale startup snapshot.
|
|
122
|
+
payload = configForApi(readAgenticROSConfigFromFile());
|
|
123
|
+
} catch (err) {
|
|
124
|
+
api.logger.warn(
|
|
125
|
+
"AgenticROS config.json: could not read OpenClaw config file, using startup snapshot: " +
|
|
126
|
+
(err instanceof Error ? err.message : String(err)),
|
|
127
|
+
);
|
|
128
|
+
payload = configForApi(config);
|
|
129
|
+
}
|
|
130
|
+
res.setHeader("Content-Type", "application/json");
|
|
131
|
+
res.setHeader("Cache-Control", "no-store");
|
|
132
|
+
res.statusCode = 200;
|
|
133
|
+
res.end(JSON.stringify(payload));
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// Register under /agenticros, /api/agenticros, and /plugins/agenticros. auth: "plugin" so 2026.3.11+ accepts; requireAuth: false for older gateways.
|
|
137
|
+
const route = (opts: { path: string; method?: string; handler: HttpRouteHandler }) =>
|
|
138
|
+
register({ ...opts, requireAuth: false, auth: "plugin" });
|
|
139
|
+
for (const base of ["/agenticros", "/api/agenticros", "/plugins/agenticros"]) {
|
|
140
|
+
route({ path: `${base}/`, method: "GET", handler: makeLandingHandler(base) });
|
|
141
|
+
route({ path: `${base}/config`, method: "GET", handler: configPageHandler });
|
|
142
|
+
route({ path: `${base}/config.js`, method: "GET", handler: configScriptHandler });
|
|
143
|
+
route({ path: `${base}/config.json`, method: "GET", handler: configJsonHandler });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const sendJson = (res: HttpRouteResponse, status: number, data: { success: boolean; error?: string; message?: string; configPath?: string }) => {
|
|
147
|
+
res.setHeader("Content-Type", "application/json");
|
|
148
|
+
res.statusCode = status;
|
|
149
|
+
res.end(JSON.stringify(data));
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
async function performConfigSave(body: Record<string, unknown>): Promise<{ success: boolean; error?: string; message?: string; configPath?: string; statusCode?: number }> {
|
|
153
|
+
try {
|
|
154
|
+
let merged: AgenticROSConfig;
|
|
155
|
+
let existingAgenticROS: Record<string, unknown> | undefined;
|
|
156
|
+
try {
|
|
157
|
+
const full = readOpenClawConfig();
|
|
158
|
+
const plugins = full.plugins as Record<string, unknown> | undefined;
|
|
159
|
+
const entries = plugins?.entries as Record<string, unknown> | undefined;
|
|
160
|
+
const agenticrosEntry = entries?.agenticros as Record<string, unknown> | undefined;
|
|
161
|
+
existingAgenticROS = agenticrosEntry?.config as Record<string, unknown> | undefined;
|
|
162
|
+
} catch (err) {
|
|
163
|
+
if (err instanceof ConfigFileError && err.code === "ENOENT") {
|
|
164
|
+
api.logger.warn("AgenticROS config file missing: " + err.message);
|
|
165
|
+
return { success: false, error: err.message, statusCode: 503 };
|
|
166
|
+
}
|
|
167
|
+
if (err instanceof ConfigFileError && err.code === "EACCES") {
|
|
168
|
+
api.logger.warn("AgenticROS config file access denied: " + err.message);
|
|
169
|
+
return { success: false, error: err.message, statusCode: 500 };
|
|
170
|
+
}
|
|
171
|
+
const readMsg = err instanceof Error ? err.message : "Failed to read config file";
|
|
172
|
+
api.logger.warn("AgenticROS config read failed: " + readMsg);
|
|
173
|
+
return { success: false, error: readMsg, statusCode: 500 };
|
|
174
|
+
}
|
|
175
|
+
try {
|
|
176
|
+
const combined =
|
|
177
|
+
existingAgenticROS && typeof existingAgenticROS === "object"
|
|
178
|
+
? mergeIncomingAgenticROSConfig(existingAgenticROS, body)
|
|
179
|
+
: body;
|
|
180
|
+
merged = parseConfig(combined);
|
|
181
|
+
} catch (err) {
|
|
182
|
+
const msg =
|
|
183
|
+
err && typeof err === "object" && "message" in err
|
|
184
|
+
? String((err as Error).message)
|
|
185
|
+
: "Validation failed";
|
|
186
|
+
api.logger.warn("AgenticROS config save validation failed: " + msg);
|
|
187
|
+
return { success: false, error: msg };
|
|
188
|
+
}
|
|
189
|
+
const existingKey =
|
|
190
|
+
(existingAgenticROS?.webrtc as Record<string, unknown> | undefined)?.robotKey;
|
|
191
|
+
if (typeof existingKey === "string" && existingKey.length > 0) {
|
|
192
|
+
merged.webrtc.robotKey = existingKey;
|
|
193
|
+
}
|
|
194
|
+
try {
|
|
195
|
+
writeAgenticROSConfig(merged as unknown as Record<string, unknown>);
|
|
196
|
+
} catch (err) {
|
|
197
|
+
const msg = err instanceof ConfigFileError ? err.message : (err instanceof Error ? err.message : "Failed to write config");
|
|
198
|
+
api.logger.warn("AgenticROS config write failed: " + msg);
|
|
199
|
+
return { success: false, error: msg };
|
|
200
|
+
}
|
|
201
|
+
const configPath = getOpenClawConfigPath();
|
|
202
|
+
return {
|
|
203
|
+
success: true,
|
|
204
|
+
message: "Config saved. Restart the OpenClaw gateway for changes to take effect.",
|
|
205
|
+
configPath,
|
|
206
|
+
};
|
|
207
|
+
} catch (err) {
|
|
208
|
+
const msg = err instanceof Error ? err.message : "Save failed";
|
|
209
|
+
api.logger.warn("AgenticROS config save error: " + msg);
|
|
210
|
+
return { success: false, error: msg };
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const configSaveHandler: HttpRouteHandler = async (req, res) => {
|
|
215
|
+
try {
|
|
216
|
+
let body: Record<string, unknown>;
|
|
217
|
+
const method = (req as { method?: string }).method;
|
|
218
|
+
if (method === "GET") {
|
|
219
|
+
const url = (req as { url?: string }).url ?? "";
|
|
220
|
+
const q = url.includes("?") ? url.slice(url.indexOf("?") + 1) : "";
|
|
221
|
+
const params = new URLSearchParams(q);
|
|
222
|
+
const payloadEnc = params.get("payload");
|
|
223
|
+
if (!payloadEnc) {
|
|
224
|
+
sendJson(res, 400, { success: false, error: "Missing payload query parameter (base64url-encoded JSON)" });
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
try {
|
|
228
|
+
const decoded = Buffer.from(payloadEnc.replace(/-/g, "+").replace(/_/g, "/"), "base64").toString("utf8");
|
|
229
|
+
body = JSON.parse(decoded) as Record<string, unknown>;
|
|
230
|
+
} catch (e) {
|
|
231
|
+
const msg = e instanceof Error ? e.message : "Invalid payload";
|
|
232
|
+
sendJson(res, 400, { success: false, error: msg });
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
} else {
|
|
236
|
+
try {
|
|
237
|
+
body = await readJsonBodyFromReq(req as Parameters<typeof readJsonBodyFromReq>[0]);
|
|
238
|
+
} catch (e) {
|
|
239
|
+
const bodyMsg = e instanceof Error ? e.message : "Invalid request body";
|
|
240
|
+
api.logger.warn("AgenticROS config save invalid body: " + bodyMsg);
|
|
241
|
+
sendJson(res, 400, { success: false, error: bodyMsg });
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const result = await performConfigSave(body);
|
|
246
|
+
const status = result.success ? 200 : (result.statusCode ?? 400);
|
|
247
|
+
sendJson(res, status, result);
|
|
248
|
+
} catch (err) {
|
|
249
|
+
const msg = err instanceof Error ? err.message : "Save failed";
|
|
250
|
+
sendJson(res, 500, { success: false, error: msg });
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
for (const base of ["/agenticros", "/api/agenticros", "/plugins/agenticros"]) {
|
|
255
|
+
route({ path: `${base}/config/save`, method: "POST", handler: configSaveHandler });
|
|
256
|
+
route({ path: `${base}/config/save`, method: "PUT", handler: configSaveHandler });
|
|
257
|
+
route({ path: `${base}/config/save`, method: "GET", handler: configSaveHandler });
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const memoryStatusHandler: HttpRouteHandler = async (_req, res) => {
|
|
261
|
+
res.setHeader("Content-Type", "application/json");
|
|
262
|
+
res.setHeader("Cache-Control", "no-store");
|
|
263
|
+
const memory = getMemory();
|
|
264
|
+
if (!memory) {
|
|
265
|
+
res.statusCode = 200;
|
|
266
|
+
res.end(
|
|
267
|
+
JSON.stringify({
|
|
268
|
+
success: true,
|
|
269
|
+
enabled: false,
|
|
270
|
+
reason:
|
|
271
|
+
getMemoryInitError() ??
|
|
272
|
+
"Memory disabled. Set memory.enabled=true to use the four memory_* tools.",
|
|
273
|
+
}),
|
|
274
|
+
);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
try {
|
|
278
|
+
const namespace = resolveMemoryNamespace(config);
|
|
279
|
+
const status = await memory.status(namespace);
|
|
280
|
+
res.statusCode = 200;
|
|
281
|
+
res.end(JSON.stringify({ success: true, ...status }));
|
|
282
|
+
} catch (err) {
|
|
283
|
+
res.statusCode = 500;
|
|
284
|
+
res.end(
|
|
285
|
+
JSON.stringify({
|
|
286
|
+
success: false,
|
|
287
|
+
error: err instanceof Error ? err.message : String(err),
|
|
288
|
+
}),
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const memoryClearHandler: HttpRouteHandler = async (_req, res) => {
|
|
294
|
+
res.setHeader("Content-Type", "application/json");
|
|
295
|
+
const memory = getMemory();
|
|
296
|
+
if (!memory) {
|
|
297
|
+
res.statusCode = 400;
|
|
298
|
+
res.end(JSON.stringify({ success: false, error: "Memory not enabled" }));
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
try {
|
|
302
|
+
const namespace = resolveMemoryNamespace(config);
|
|
303
|
+
const result = await memory.forget({ namespace });
|
|
304
|
+
res.statusCode = 200;
|
|
305
|
+
res.end(JSON.stringify({ success: true, ...result, namespace }));
|
|
306
|
+
} catch (err) {
|
|
307
|
+
res.statusCode = 500;
|
|
308
|
+
res.end(
|
|
309
|
+
JSON.stringify({
|
|
310
|
+
success: false,
|
|
311
|
+
error: err instanceof Error ? err.message : String(err),
|
|
312
|
+
}),
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
for (const base of ["/agenticros", "/api/agenticros", "/plugins/agenticros"]) {
|
|
318
|
+
route({ path: `${base}/memory/status`, method: "GET", handler: memoryStatusHandler });
|
|
319
|
+
route({ path: `${base}/memory/clear`, method: "POST", handler: memoryClearHandler });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
registerCameraSnapshotRoutes(api);
|
|
323
|
+
registerTeleopRoutes(api, config);
|
|
324
|
+
|
|
325
|
+
api.logger.info(
|
|
326
|
+
"AgenticROS HTTP routes registered (GET /agenticros/, /config, /config.json; GET/POST/PUT /config/save; memory status + clear; camera snapshot + teleop routes)",
|
|
327
|
+
);
|
|
328
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { OpenClawPluginApi } from "../plugin-api.js";
|
|
2
|
+
import type { AgenticROSConfig } from "@agenticros/core";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Register the before_tool_call safety validation hook.
|
|
6
|
+
* Intercepts tool calls and validates them against safety limits.
|
|
7
|
+
*/
|
|
8
|
+
export function registerSafetyHook(api: OpenClawPluginApi, config: AgenticROSConfig): void {
|
|
9
|
+
const safety = config.safety;
|
|
10
|
+
|
|
11
|
+
api.on("before_tool_call", async (event, _ctx) => {
|
|
12
|
+
if (event.toolName === "ros2_publish") {
|
|
13
|
+
const msg = event.params["message"] as Record<string, unknown> | undefined;
|
|
14
|
+
if (msg) {
|
|
15
|
+
// Check velocity limits for Twist messages
|
|
16
|
+
const linear = msg["linear"] as Record<string, number> | undefined;
|
|
17
|
+
const angular = msg["angular"] as Record<string, number> | undefined;
|
|
18
|
+
|
|
19
|
+
if (linear) {
|
|
20
|
+
const speed = Math.sqrt(
|
|
21
|
+
(linear["x"] ?? 0) ** 2 +
|
|
22
|
+
(linear["y"] ?? 0) ** 2 +
|
|
23
|
+
(linear["z"] ?? 0) ** 2,
|
|
24
|
+
);
|
|
25
|
+
if (speed > safety.maxLinearVelocity) {
|
|
26
|
+
api.logger.warn(`Blocked: linear velocity ${speed} exceeds limit ${safety.maxLinearVelocity}`);
|
|
27
|
+
return { block: true, blockReason: `Linear velocity ${speed.toFixed(2)} m/s exceeds safety limit of ${safety.maxLinearVelocity} m/s` };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (angular) {
|
|
32
|
+
const rate = Math.abs(angular["z"] ?? 0);
|
|
33
|
+
if (rate > safety.maxAngularVelocity) {
|
|
34
|
+
api.logger.warn(`Blocked: angular velocity ${rate} exceeds limit ${safety.maxAngularVelocity}`);
|
|
35
|
+
return { block: true, blockReason: `Angular velocity ${rate.toFixed(2)} rad/s exceeds safety limit of ${safety.maxAngularVelocity} rad/s` };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// TODO: Add workspace limit checks for navigation goals
|
|
42
|
+
});
|
|
43
|
+
}
|