#!/usr/bin/env bash
# helios-rpc-wrapper.sh
# Invoked by Electron/Desktop via: wsl.exe -- bash /path/to/wrapper.sh --mode rpc ...
# Sources the login env (nvm, PATH, AWS credentials) then delegates to bin/helios
# with all args forwarded as-is.
# This is the correct entry point for the converged panel — identical to what
# the terminal does when you run: helios --mode rpc ...

# Source login env so nvm, AWS credentials, and PATH are all set
source ~/.bashrc 2>/dev/null || true
source ~/.profile 2>/dev/null || true

# Canonical repo path — per AGENTS.md, always use Desktop path (not ~/helios-agent stale WSL copy)
HELIOS_AGENT_ROOT="/mnt/c/Users/chiko/Desktop/Helios/helios-agent-main"

# Delegate to bin/helios with all forwarded args
exec "${HELIOS_AGENT_ROOT}/bin/helios" "$@"