#!/usr/bin/env bash
set -euo pipefail

MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
CTRL="$MOSAIC_HOME/tools/orchestrator-matrix/controller/mosaic_orchestrator.py"

if [[ ! -f "$CTRL" ]]; then
  echo "[mosaic-orchestrator] missing controller: $CTRL" >&2
  exit 1
fi

exec python3 "$CTRL" --repo "$(pwd)" "$@"
