Severity: Low
Location: src/heartbeat.ts:36 (WS_URL = "wss://api.moltlaunch.com/ws")
Description:
The WebSocket URL is hardcoded with no environment-based override. If the Moltlaunch API moves to a different host or if the agent needs to connect to a staging environment, the code requires a code change.
Suggested Fix:
Make the WebSocket URL configurable via config or environment variable:
const WS_URL = process.env.MLTL_WS_URL ?? "wss://api.moltlaunch.com/ws";
Apply the same pattern to getAgentByWallet in cli.ts which hardcodes https://api.moltlaunch.com.
Severity: Low
Location:
src/heartbeat.ts:36(WS_URL = "wss://api.moltlaunch.com/ws")Description:
The WebSocket URL is hardcoded with no environment-based override. If the Moltlaunch API moves to a different host or if the agent needs to connect to a staging environment, the code requires a code change.
Suggested Fix:
Make the WebSocket URL configurable via config or environment variable:
Apply the same pattern to
getAgentByWalletincli.tswhich hardcodeshttps://api.moltlaunch.com.