#!/usr/bin/env python3
"""Add bounded provider-stream recovery to the Hermes conversation loop."""

from __future__ import annotations

import argparse
from pathlib import Path

from patch_codex_runtime import patch_stream_recovery


def main() -> int:
    """Patch one conversation loop without changing provider adapters."""
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("source", type=Path)
    parser.add_argument("destination", type=Path)
    args = parser.parse_args()
    patch_stream_recovery(args.source, args.destination)
    return 0


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