from helixor_agent import tool

@tool
def get_order(order_id: str) -> dict:
    """Read a synthetic demonstration order; this tool has no external effects."""
    sample = {
        "A1001": {"item": "Speckled mug", "status": "shipped", "delivery_window": "2 business days"},
        "A1002": {"item": "Mug set", "status": "delivered", "delivery_window": "Already delivered"},
    }
    key = order_id.strip().upper()
    if key not in sample:
        raise ValueError(f"DEMO_ORDER_UNKNOWN: use A1001 or A1002; no record for {key}")
    return {"order_id": key, **sample[key], "source": "synthetic demo catalog", "refund_issued": False}
