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

MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
BRIDGE="$MOSAIC_HOME/tools/orchestrator-matrix/transport/matrix_transport.py"

if [[ ! -f "$BRIDGE" ]]; then
  echo "[mosaic-orch-matrix] missing transport bridge: $BRIDGE" >&2
  exit 1
fi

exec python3 "$BRIDGE" --repo "$(pwd)" --mode publish "$@"
