#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
export PYTHONPATH="$ROOT/services:$ROOT"
cmd="${1:-help}"; shift || true
case "$cmd" in
  status) python3 "$ROOT/services/channel_command_router/router.py" /status --role "${AIOS_ROLE:-user}" ;;
  command) python3 "$ROOT/services/channel_command_router/router.py" "${1:-/status}" --role "${AIOS_ROLE:-user}" ;;
  validate) bash "$ROOT/scripts/80-package-validate.sh" ;;
  gate) find "$ROOT/reports" -name '*.json' -maxdepth 4 2>/dev/null | sort | tail -20 ;;
  teacher) python3 "$ROOT/services/teacher_agent/teacher_agent.py" "$@" ;;
  *) echo "usage: aiosctl status|command <slash>|validate|gate|teacher" ;;
esac
