#!/usr/bin/env bash
# Agentic evaluation dispatcher
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

case "${1:-help}" in
    setup)   exec bash "$SCRIPT_DIR/scripts/agentic/setup.sh" ;;
    run)     exec bash "$SCRIPT_DIR/scripts/agentic/run-eval.sh" "${@:2}" ;;
    quick)   exec bash "$SCRIPT_DIR/scripts/agentic/run-eval.sh" --suite quick "${@:2}" ;;
    code)    exec bash "$SCRIPT_DIR/scripts/agentic/run-eval.sh" --suite code "${@:2}" ;;
    tooluse) exec bash "$SCRIPT_DIR/scripts/agentic/run-eval.sh" --suite tooluse "${@:2}" ;;
    full)    exec bash "$SCRIPT_DIR/scripts/agentic/run-eval.sh" --suite full "${@:2}" ;;
    *)
        echo "Usage: agentic <command> [options]"
        echo ""
        echo "Commands:"
        echo "  setup     Install evaluation frameworks (inspect-ai, evalplus, bigcodebench)"
        echo "  quick     EvalPlus HumanEval+ + IFEval (~1 hour)"
        echo "  code      EvalPlus + BigCodeBench (~2-3 hours)"
        echo "  tooluse   BFCL function calling evaluation (~1-2 hours)"
        echo "  full      All evaluations (~5-6 hours)"
        echo "  run       Custom run (--suite SUITE --model NAME --endpoint URL)"
        echo ""
        echo "All commands require --model NAME. Examples:"
        echo "  agentic quick --model qwen3.5:35b-a3b-q8_0"
        echo "  agentic full --model qwen3-coder:30b-a3b --endpoint http://localhost:8080/v1"
        exit 1
        ;;
esac
