"""Basic example: use claude-runner as a direct LLM call (no tools, single turn)."""

import asyncio
import sys

from claude_runner import clean_claude_env, run

clean_claude_env()


async def main():
    print("Sending prompt...")
    result = await run(
        "What is 2 + 2? Reply with just the number.",
        timeout_minutes=2,
    )

    if result.is_error:
        print(f"Error: {result.error}")
        return

    print(f"Response: {result.text.strip()}")
    print(f"Cost: ${result.cost_usd:.4f}")
    print(f"Duration: {result.duration_ms}ms")
    print(f"Turns: {result.num_turns}")


asyncio.run(main())
sys.stdout.flush()
