OpenWriterControle/scripts/dashboard.sh
darrenhinde aebd68e046 feat: add monorepo structure with versioning and CI/CD
Monorepo Features:
- Root package.json with convenient npm scripts for all agents
- Easy testing from root: npm test, npm run test:openagent, npm run test:opencoder
- Multi-model support: test with Grok, Claude, or GPT-4
- Quick dashboard access: npm run dashboard
- No folder navigation required

Versioning System:
- VERSION file tracking current version (0.1.0-alpha.1)
- CHANGELOG.md with comprehensive version history
- Version bump scripts for alpha, beta, rc, and stable releases
- Semantic versioning with progression: Alpha → Beta → RC → Stable

CI/CD:
- GitHub Actions workflow for automated testing
- Pre-merge validation for agent changes
- Smoke tests for both openagent and opencoder
- Automated test result reporting
- Runs on PRs to main/dev and pushes to main

Helper Scripts:
- scripts/test.sh: Advanced test runner with multi-agent support
- scripts/dashboard.sh: Enhanced dashboard launcher with auto-open
- scripts/bump-version.sh: Version management tool

Documentation:
- QUICK_START.md: Comprehensive testing and usage guide
- Clear examples for all test scenarios
- Multi-agent and multi-model workflows

Benefits:
- Easy testing from root directory
- Automated quality checks before merges
- Clear version tracking and history
- Developer-friendly workflows
- No breaking changes to existing structure
2025-11-26 21:49:50 +00:00

58 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# Enhanced dashboard launcher with auto-open
# Usage: ./scripts/dashboard.sh [port] [auto-open]
set -e
PORT=${1:-8000}
AUTO_OPEN=${2:-true}
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo -e "${BLUE}🚀 Starting OpenCode Agents Dashboard...${NC}"
echo -e "${BLUE}📊 Results directory: evals/results${NC}"
echo -e "${BLUE}🌐 URL: http://localhost:$PORT${NC}"
echo ""
# Navigate to results directory
cd "$(dirname "$0")/../evals/results" || exit 1
# Check if results exist
if [ ! -f "latest.json" ]; then
echo -e "${YELLOW}⚠️ No test results found yet.${NC}"
echo -e "${YELLOW} Run tests first: npm test${NC}"
echo ""
fi
# Start server in background
./serve.sh "$PORT" &
SERVER_PID=$!
# Wait for server to start
sleep 2
# Auto-open browser
if [ "$AUTO_OPEN" = "true" ]; then
echo -e "${GREEN}🌐 Opening browser...${NC}"
if command -v open &> /dev/null; then
open "http://localhost:$PORT"
elif command -v xdg-open &> /dev/null; then
xdg-open "http://localhost:$PORT"
elif command -v start &> /dev/null; then
start "http://localhost:$PORT"
else
echo -e "${YELLOW}⚠️ Could not auto-open browser. Please visit: http://localhost:$PORT${NC}"
fi
fi
echo ""
echo -e "${GREEN}✅ Dashboard running (PID: $SERVER_PID)${NC}"
echo -e "${YELLOW}Press Ctrl+C to stop${NC}"
echo ""
# Wait for Ctrl+C
wait $SERVER_PID