#!/usr/bin/env python3
"""Thin wrapper — delegates to oracle.cli ingest subcommand.

Kept for backward compatibility with existing cron/calls.
"""
import sys
import os

sys.path.insert(0, os.path.dirname(__file__))

# Translate old args to new CLI format
args = sys.argv[1:]
cli_args = ["ingest"]
for i, arg in enumerate(args):
    if arg in ("--sources", "--limit"):
        cli_args.append(arg)
        if i + 1 < len(args):
            cli_args.append(args[i + 1])
    elif arg == "--dry-run":
        cli_args.append("--dry-run")
    elif arg == "--verify":
        pass  # verify handled internally

from oracle.cli import main as cli_main

sys.argv = ["oracle"] + cli_args
cli_main()
