This directory contains the core node scripts for the OpenClaw project.
The websocket-server.ts file implements a mock robot WebSocket server that simulates communication with a robot. It listens for robot_action messages and sends back simulated responses.
To install dependencies using pnpm:
pnpm installTo build the TypeScript files:
pnpm run buildThis will compile the websocket-server.ts file to both CommonJS and ES Module formats in the dist/ directory.
To run the WebSocket server directly:
node nodes/robot_websocket/websocket-server.tsOr using tsx:
npx tsx nodes/robot_websocket/websocket-server.tsThe server will listen on port 8080 for incoming WebSocket connections.