A WebSocket bridge for the Pyright language server with a bundled Node.js runtime. This service provides Python language server capabilities (autocomplete, type checking, diagnostics, etc.) through a WebSocket interface, primarily used by the Jesse dashboard to provide IntelliSense features for Jesse strategies.
This repository delivers:
- WebSocket Bridge - Translates WebSocket messages to Pyright LSP protocol
- Bundled Runtime - Includes Node.js, eliminating system dependencies
- Cross-Platform Support - Works on Linux, macOS, and Windows
- Optimized Builds - ~70% size reduction with production-only dependencies
- TypeScript - Main language for the bridge implementation
- Node.js - Runtime environment
- Pyright - Microsoft's static type checker for Python
- WebSocket (ws) - WebSocket communication
- vscode-ws-jsonrpc - JSON-RPC over WebSocket
- esbuild - Fast JavaScript bundler
npm installnpm start -- \
--port 9011 \
--project-root /path/to/project \
--jesse-relative-path jesse_folder_name \
--bot-relative-path jesse-bot_folder_name--port- WebSocket server port (default: 9011)--project-root- Root directory of the Python project--jesse-relative-path- Relative path to Jesse framework folder--bot-relative-path- Relative path to Jesse bot folder
./build.shOutput: output/linux-x64.tar.gz (~34 MB)
./build-all.shOutputs:
linux-x64.tar.gz/linux-arm64.tar.gzdarwin-x64.tar.gz/darwin-arm64.tar.gzwin32-x64.zip
# Extract the archive
tar -xzf linux-x64.tar.gz
# Run the server
cd linux-x64
./start.sh \
--port 9011 \
--project-root /path/to/project \
--jesse-relative-path jesse_folder_name \
--bot-relative-path jesse-bot_folder_nameREM Extract win32-x64.zip
REM Run the server
cd win32-x64
start.bat --port 9011 --project-root C:\path\to\project --jesse-relative-path jesse_folder_name --bot-relative-path jesse-bot_folder_nameThe Pyright language server is configured via pyrightconfig.json in the project root. You can customize type checking behavior, Python version, include/exclude patterns, and more.
- ✅ Bundled Node.js runtime (no system dependencies)
- ✅ Optimized build (~70% size reduction)
- ✅ Cross-platform support (Linux, macOS, Windows)
- ✅ Production-ready dependencies only
- ✅ WebSocket-based communication
- ✅ Full Pyright LSP capabilities
The bridge acts as a middleware between WebSocket clients (like the Jesse dashboard) and the Pyright language server:
Client (Jesse Dashboard) <-> WebSocket <-> Bridge <-> Pyright LSP
Messages are translated between WebSocket and the Language Server Protocol, enabling Python IntelliSense features in web-based interfaces.
index.ts- Entry point and CLI argument handlingpyright-bridge.ts- WebSocket bridge implementationpyrightconfig.json- Pyright configurationpackage.json- Node.js project configurationbuild.sh- Build script for Linux x64build-all.sh- Build script for all platformsoutput/- Build output directory (generated)
This project is part of the Jesse ecosystem.