#!/usr/bin/env python3
"""Cross-platform entrypoint for Wolai OpenAPI note CRUD flow."""

from __future__ import annotations

import subprocess
import sys
from pathlib import Path


def main() -> int:
    script_dir = Path(__file__).resolve().parent
    runner = script_dir / "openclaw_wolai_notes_crud.py"
    proc = subprocess.run(
        [sys.executable, str(runner), *sys.argv[1:]],
        capture_output=True,
        text=True,
    )
    if proc.stdout:
        sys.stdout.write(proc.stdout)
    if proc.stderr:
        sys.stderr.write(proc.stderr)
    return proc.returncode


if __name__ == "__main__":
    raise SystemExit(main())
