cmux/tests/claude_teams_test_utils.py
Lawrence Chen 00587ed856
Add cmux claude-teams launcher (#1179)
* Add claude-teams CLI command

* Add claude-teams launcher regression test

* Exec claude-teams launcher in place

* Add existing-shim claude-teams regression test

* Reuse claude-teams shim and refresh dev CLI

* Add wrapper-selection claude-teams regression test

* Launch real claude binary for claude-teams

* Add claude-teams auto-mode launcher regression test

* Default claude-teams to fake tmux auto mode

* Build tagged reloads under DerivedData

* Add claude-teams tmux sequence regression test

* Fix claude-teams tmux teammate compatibility

* Add claude-teams split focus regression test

* Keep claude-teams leader pane focused

* Tighten claude-teams review fixes

* Pass claude-teams help through to Claude

* Use sentinel TERM_PROGRAM in claude-teams test
2026-03-11 02:42:33 -07:00

22 lines
712 B
Python

#!/usr/bin/env python3
from __future__ import annotations
import os
from pathlib import Path
def resolve_cmux_cli() -> str:
explicit = os.environ.get("CMUX_CLI_BIN") or os.environ.get("CMUX_CLI")
if explicit and os.path.exists(explicit) and os.access(explicit, os.X_OK):
return explicit
recorded_path = Path("/tmp/cmux-last-cli-path")
if recorded_path.exists():
candidate = recorded_path.read_text(encoding="utf-8").strip()
if candidate and os.path.exists(candidate) and os.access(candidate, os.X_OK):
return candidate
raise RuntimeError(
"Unable to find cmux CLI binary. Set CMUX_CLI_BIN or run ./scripts/reload.sh --tag <tag> first."
)