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

if [[ "${1:-}" == "--version" ]]; then
  echo "openclaw 2026.3.2"
  exit 0
fi

if [[ "${1:-}" == "-c" ]]; then
  cmd="${2:-}"
  if [[ "$cmd" == sessions_spawn* ]]; then
    echo "Session created: mock-openclaw-session"
    exit 0
  fi
  echo "ok"
  exit 0
fi

echo "openclaw mock: unsupported args: $*" >&2
exit 0
