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

VERSION="0.5.0-issue13-live3"
WORKSPACE="${FREE_ENTRY_WORKSPACE:-${HOME}/.kickstart/free-entry}"

mkdir -p "$WORKSPACE"
echo "Mittelstand KI-Startbahn Free Entry Starter $VERSION"
echo "Dieser lokale Assistent fragt keine Zahlungsdaten ab und aendert keine produktiven Systeme."

if [[ "${1:-}" == "--smoke" ]]; then
  cat > "$WORKSPACE/free-entry-starter-smoke.json" <<JSON
{"platform":"macos","version":"$VERSION","preflight_status":"passed","download_start_status":"ready","workspace_status":"safe_workspace_only"}
JSON
  echo "Free Entry starter smoke passed"
  exit 0
fi

echo "Naechster Schritt: Lokalen Assistenten starten und die Vorpruefung abwarten."