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

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

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

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