From feab700d28892da46b428ec36661d647409eebfe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 19:01:04 +0000 Subject: [PATCH 1/2] Initial plan From e43bd81fbc727da8d054bc799dbe76f2e9e1cb29 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 19:03:22 +0000 Subject: [PATCH 2/2] fix(cli): generic error msg in validate_metrics_watch_path and sync sys.argv for programmatic main(argv=...) Co-authored-by: mahimairaja <81288263+mahimairaja@users.noreply.github.com> Agent-Logs-Url: https://github.com/mahimairaja/openrtc-python/sessions/8c419ba3-63a6-4ee9-9afc-eed8d22cd894 --- src/openrtc/cli_app.py | 6 +++++- src/openrtc/tui_app.py | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/openrtc/cli_app.py b/src/openrtc/cli_app.py index d98afe4..41ca56e 100644 --- a/src/openrtc/cli_app.py +++ b/src/openrtc/cli_app.py @@ -334,8 +334,12 @@ def main(argv: list[str] | None = None) -> int: previous_argv = sys.argv try: if argv is not None: + injected_args = inject_cli_positional_paths(list(argv)) + # Mirror a real CLI invocation so LiveKit handoff logic that + # inspects sys.argv sees the injected arguments (e.g. --reload). + sys.argv = [previous_argv[0], *injected_args] cli.main( - args=inject_cli_positional_paths(list(argv)), + args=injected_args, prog_name="openrtc", standalone_mode=True, ) diff --git a/src/openrtc/tui_app.py b/src/openrtc/tui_app.py index 55a4afc..273dfb8 100644 --- a/src/openrtc/tui_app.py +++ b/src/openrtc/tui_app.py @@ -17,10 +17,10 @@ def validate_metrics_watch_path(path: Path) -> None: resolved = path.resolve() if resolved.exists() and resolved.is_dir(): raise ValueError( - "'--watch' must be a JSONL file path (the same path you pass to " - "'--metrics-jsonl' on the OpenRTC worker). This value is a directory " - "— for example, use a file such as ./metrics.jsonl, not your agents " - f"folder. Got: {resolved}" + "The metrics watch path must be a JSONL file path (the same path you " + "pass to '--metrics-jsonl' on the OpenRTC worker). This value is a " + "directory — for example, use a file such as ./metrics.jsonl, not your " + f"agents folder. Got: {resolved}" )