v1.3.0: COMPLETE - Full Rig Integration with Production Setup
This commit is contained in:
31
scripts/start-all.ps1
Normal file
31
scripts/start-all.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
# QwenClaw Complete Startup Script (PowerShell)
|
||||
# Starts both Rig service and QwenClaw daemon
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location $ScriptDir/..
|
||||
|
||||
Write-Host "🐾 Starting QwenClaw with Rig Integration..." -ForegroundColor Cyan
|
||||
|
||||
# Start Rig service in background
|
||||
Write-Host "🦀 Starting Rig service..." -ForegroundColor Yellow
|
||||
Start-Process powershell -ArgumentList "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ".\scripts\start-rig.ps1"
|
||||
|
||||
# Wait for Rig to start
|
||||
Write-Host "⏳ Waiting for Rig service to be ready..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
# Check if Rig is healthy
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "http://127.0.0.1:8080/health" -TimeoutSec 2 -UseBasicParsing
|
||||
if ($response.StatusCode -eq 200) {
|
||||
Write-Host "✅ Rig service is ready!" -ForegroundColor Green
|
||||
}
|
||||
} catch {
|
||||
Write-Host "⚠️ Rig service may not be ready yet, continuing anyway..." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Start QwenClaw daemon
|
||||
Write-Host "🐾 Starting QwenClaw daemon..." -ForegroundColor Cyan
|
||||
bun run start --web
|
||||
30
scripts/start-all.sh
Normal file
30
scripts/start-all.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
# QwenClaw Complete Startup Script
|
||||
# Starts both Rig service and QwenClaw daemon
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR/.."
|
||||
|
||||
echo "🐾 Starting QwenClaw with Rig Integration..."
|
||||
|
||||
# Start Rig service in background
|
||||
echo "🦀 Starting Rig service..."
|
||||
./scripts/start-rig.sh &
|
||||
RIG_PID=$!
|
||||
|
||||
# Wait for Rig to start
|
||||
echo "⏳ Waiting for Rig service to be ready..."
|
||||
sleep 5
|
||||
|
||||
# Check if Rig is healthy
|
||||
if curl -s http://127.0.0.1:8080/health > /dev/null 2>&1; then
|
||||
echo "✅ Rig service is ready!"
|
||||
else
|
||||
echo "⚠️ Rig service may not be ready yet, continuing anyway..."
|
||||
fi
|
||||
|
||||
# Start QwenClaw daemon
|
||||
echo "🐾 Starting QwenClaw daemon..."
|
||||
exec bun run start --web
|
||||
38
scripts/start-rig.ps1
Normal file
38
scripts/start-rig.ps1
Normal file
@@ -0,0 +1,38 @@
|
||||
# QwenClaw Rig Service Startup Script (PowerShell)
|
||||
# Starts the Rig AI agent service
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$RigDir = Join-Path $ScriptDir "..\rig-service"
|
||||
|
||||
Write-Host "🦀 Starting QwenClaw Rig Service..." -ForegroundColor Cyan
|
||||
|
||||
Set-Location $RigDir
|
||||
|
||||
# Check if built
|
||||
if (-not (Test-Path "target\release\qwenclaw-rig.exe")) {
|
||||
Write-Host "⚠️ Rig service not built. Building now..." -ForegroundColor Yellow
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
# Load environment variables
|
||||
$EnvFile = Join-Path $RigDir ".env"
|
||||
if (Test-Path $EnvFile) {
|
||||
Get-Content $EnvFile | ForEach-Object {
|
||||
if ($_ -match '^\s*([^#=]+)\s*=\s*(.+)\s*$' -and $_ -notmatch '^#') {
|
||||
$name = $matches[1].Trim()
|
||||
$value = $matches[2].Trim()
|
||||
Set-Item -Force -Path "ENV:$name" -Value $value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Set defaults if not set
|
||||
if (-not $env:RIG_HOST) { $env:RIG_HOST = "127.0.0.1" }
|
||||
if (-not $env:RIG_PORT) { $env:RIG_PORT = "8080" }
|
||||
|
||||
Write-Host "🚀 Starting Rig service on http://$($env:RIG_HOST):$($env:RIG_PORT)" -ForegroundColor Green
|
||||
|
||||
# Start service
|
||||
cargo run --release
|
||||
33
scripts/start-rig.sh
Normal file
33
scripts/start-rig.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# QwenClaw Rig Service Startup Script
|
||||
# Starts the Rig AI agent service
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
RIG_DIR="$SCRIPT_DIR/../rig-service"
|
||||
|
||||
echo "🦀 Starting QwenClaw Rig Service..."
|
||||
|
||||
cd "$RIG_DIR"
|
||||
|
||||
# Check if built
|
||||
if [ ! -f "target/release/qwenclaw-rig" ]; then
|
||||
echo "⚠️ Rig service not built. Building now..."
|
||||
cargo build --release
|
||||
fi
|
||||
|
||||
# Load environment variables
|
||||
if [ -f ".env" ]; then
|
||||
export $(cat .env | grep -v '^#' | xargs)
|
||||
fi
|
||||
|
||||
# Set defaults if not set
|
||||
export RIG_HOST="${RIG_HOST:-127.0.0.1}"
|
||||
export RIG_PORT="${RIG_PORT:-8080}"
|
||||
export OPENAI_API_KEY="${OPENAI_API_KEY:-}"
|
||||
|
||||
echo "🚀 Starting Rig service on http://$RIG_HOST:$RIG_PORT"
|
||||
|
||||
# Start service
|
||||
exec cargo run --release
|
||||
Reference in New Issue
Block a user