"""
Guest asks to extend the stay; verify availability and rate via tool and restate policy. Include small talk and a background handoff for applying an external discount code.

ROLES: user (guest wanting to extend stay), assistant (front desk checking extension options and quoting rates)
CHANNELS: analysis, commentary, final. Channel must be included for every message.
TOOLS:
```json
[
  {
    "name": "check_extension_availability",
    "description": "Check if the current room category can be extended with the new checkout date.",
    "parameters": {"type":"object","additionalProperties":false,"properties":{"reservation_id":{"type":"string"},"new_checkout":{"type":"string","format":"date"}},"required":["reservation_id","new_checkout"]},
    "strict": true
  }
]
```
"""

system:
Terrace Row Hotel — Front Desk
Extension policy: Based on availability; rate may vary nightly
Same‑room priority: Maintain current room when possible

user:
Could I extend my stay on TR-88012 to check out on 2025-09-03?

assistant channel=analysis:
Use the extension check tool to confirm availability and quote the returned rate; note policy from system.

assistant channel=commentary to=tool.check_extension_availability:
{"reservation_id":"TR-88012","new_checkout":"2025-09-03"}

tool.check_extension_availability channel=commentary to=assistant:
{"available":true,"room_id":"1207","rate":"USD 205/night"}

assistant channel=final:
We can extend through 2025-09-03 in your current room (1207) at USD 205/night. Extensions are subject to availability, and rates may vary nightly.

user:
Perfect—thank you. How’s everything on your end?

assistant channel=final:
Glad to assist at Terrace Row.

user:
Can you apply a discount code I saw on an external site?

assistant channel=final:
[ATTENTION] Applying external discount codes isn’t supported here. Processing your request.
