v0.5.0: Binary-Free Mode - No OpenCode binary required
✨ Major Features: - Native session management without OpenCode binary - Provider routing: OpenCode Zen (free), Qwen OAuth, Z.AI - Streaming chat with tool execution loop - Mode detection API (/api/meta/mode) - MCP integration fix (resolved infinite loading) - NomadArch Native option in UI with comparison info 🆓 Free Models (No API Key): - GPT-5 Nano (400K context) - Grok Code Fast 1 (256K context) - GLM-4.7 (205K context) - Doubao Seed Code (256K context) - Big Pickle (200K context) 📦 New Files: - session-store.ts: Native session persistence - native-sessions.ts: REST API for sessions - lite-mode.ts: UI mode detection client - native-sessions.ts (UI): SolidJS store 🔧 Updated: - All installers: Optional binary download - All launchers: Mode detection display - Binary selector: Added NomadArch Native option - README: Binary-Free Mode documentation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# NomadArch Launcher for macOS and Linux
|
||||
# Version: 0.4.0
|
||||
# Version: 0.5.0 - Binary-Free Mode
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -17,10 +17,11 @@ cd "$SCRIPT_DIR"
|
||||
ERRORS=0
|
||||
WARNINGS=0
|
||||
AUTO_FIXED=0
|
||||
BINARY_FREE_MODE=0
|
||||
|
||||
echo ""
|
||||
echo "NomadArch Launcher (macOS/Linux)"
|
||||
echo "Version: 0.4.0"
|
||||
echo "Version: 0.5.0 - Binary-Free Mode"
|
||||
echo ""
|
||||
|
||||
echo "[PREFLIGHT 1/7] Checking Dependencies..."
|
||||
@@ -48,16 +49,16 @@ NPM_VERSION=$(npm --version)
|
||||
echo -e "${GREEN}[OK]${NC} npm: $NPM_VERSION"
|
||||
|
||||
echo ""
|
||||
echo "[PREFLIGHT 2/7] Checking for OpenCode CLI..."
|
||||
echo "[PREFLIGHT 2/7] Checking for OpenCode CLI (Optional)..."
|
||||
|
||||
if command -v opencode &> /dev/null; then
|
||||
echo -e "${GREEN}[OK]${NC} OpenCode CLI available in PATH"
|
||||
echo -e "${GREEN}[OK]${NC} OpenCode CLI available in PATH - Full Mode"
|
||||
elif [[ -f "$SCRIPT_DIR/bin/opencode" ]]; then
|
||||
echo -e "${GREEN}[OK]${NC} OpenCode binary found in bin/"
|
||||
echo -e "${GREEN}[OK]${NC} OpenCode binary found in bin/ - Full Mode"
|
||||
else
|
||||
echo -e "${YELLOW}[WARN]${NC} OpenCode CLI not found"
|
||||
echo "[INFO] Run Install-*.sh to set up OpenCode"
|
||||
((WARNINGS++))
|
||||
echo -e "${BLUE}[INFO]${NC} OpenCode CLI not found - Using Binary-Free Mode"
|
||||
echo -e "${BLUE}[INFO]${NC} Free models (GPT-5 Nano, Grok Code, GLM-4.7) available via OpenCode Zen"
|
||||
BINARY_FREE_MODE=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
@@ -84,7 +85,24 @@ SERVER_PORT=$DEFAULT_SERVER_PORT
|
||||
UI_PORT=$DEFAULT_UI_PORT
|
||||
|
||||
for port in {3001..3050}; do
|
||||
if ! lsof -i :$port -sTCP:LISTEN -t > /dev/null 2>&1; then
|
||||
# Try lsof first, then ss, then netstat
|
||||
if command -v lsof &> /dev/null; then
|
||||
if ! lsof -i :$port -sTCP:LISTEN -t > /dev/null 2>&1; then
|
||||
SERVER_PORT=$port
|
||||
break
|
||||
fi
|
||||
elif command -v ss &> /dev/null; then
|
||||
if ! ss -tuln | grep -q ":$port "; then
|
||||
SERVER_PORT=$port
|
||||
break
|
||||
fi
|
||||
elif command -v netstat &> /dev/null; then
|
||||
if ! netstat -tuln | grep -q ":$port "; then
|
||||
SERVER_PORT=$port
|
||||
break
|
||||
fi
|
||||
else
|
||||
# No port checking tools, just use default
|
||||
SERVER_PORT=$port
|
||||
break
|
||||
fi
|
||||
@@ -133,6 +151,12 @@ echo -e "${BLUE}[STATUS]${NC}"
|
||||
echo ""
|
||||
echo " Node.js: $NODE_VERSION"
|
||||
echo " npm: $NPM_VERSION"
|
||||
if [[ $BINARY_FREE_MODE -eq 1 ]]; then
|
||||
echo " Mode: Binary-Free Mode (No OpenCode binary required)"
|
||||
echo " Free Models: GPT-5 Nano, Grok Code, GLM-4.7, Doubao, Big Pickle"
|
||||
else
|
||||
echo " Mode: Full Mode (OpenCode binary available)"
|
||||
fi
|
||||
echo " Auto-fixes applied: $AUTO_FIXED"
|
||||
echo " Warnings: $WARNINGS"
|
||||
echo " Errors: $ERRORS"
|
||||
@@ -158,6 +182,7 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
fi
|
||||
|
||||
export CLI_PORT=$SERVER_PORT
|
||||
export NOMADARCH_BINARY_FREE_MODE=$BINARY_FREE_MODE
|
||||
npm run dev:electron
|
||||
|
||||
EXIT_CODE=$?
|
||||
|
||||
Reference in New Issue
Block a user