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 \
--bot-root /path/to/jesse-bot \
--jesse-root /path/to/jesse--port- WebSocket server port (required)--bot-root- Absolute path to the Jesse bot root directory (required)--jesse-root- Absolute path to the Jesse framework root directory (required)
./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 \
--bot-root /path/to/jesse-bot \
--jesse-root /path/to/jesseREM Extract win32-x64.zip
REM Run the server
cd win32-x64
start.bat --port 9011 --bot-root C:\path\to\jesse-bot --jesse-root C:\path\to\jesseThe Pyright language server is configured via pyrightconfig.json. The bridge automatically deploys this configuration file to the bot root directory specified by --bot-root on startup. 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.