fix(cli): label agent flags as private beta

This commit is contained in:
syachamaneni-lc
2026-09-23 09:49:51 -07:00
parent bdb85b5aa8
commit f085820dd3
2 changed files with 17 additions and 0 deletions
+5
View File
@@ -1982,6 +1982,7 @@ def _deploy_cmd(
validate_deploy_commands(install_command, build_command)
agent = None
if agent_id is not None or environment is not None:
em.note("--agent-id and --environment flags are in private beta")
if not agent_id or not agent_id.strip() or not environment:
raise click.UsageError(
"--agent-id and --environment are required together."
@@ -2138,6 +2139,10 @@ def deploy_list(
agent_id: str | None,
environment: str | None,
) -> None:
if agent_id is not None or environment is not None:
click.secho(
"--agent-id and --environment flags are in private beta", fg="yellow"
)
if agent_id is not None and not agent_id.strip():
raise click.UsageError("--agent-id must not be empty.")
filters = {}
@@ -71,6 +71,7 @@ def test_agent_create(deployment_api, tmp_path, monkeypatch):
_, requests, build = deployment_api
result = CliRunner().invoke(cli, AGENT_ARGS)
assert result.exit_code == 0, result.output
assert "--agent-id and --environment flags are in private beta" in result.output
assert dict(requests[0].url.params) == {
"name_contains": "",
"agent_id": "customer-support",
@@ -103,3 +104,14 @@ def test_agent_rejects_explicit_name(deployment_api, monkeypatch):
assert result.exit_code == 2
assert "cannot be combined" in result.output
assert not requests
@pytest.mark.parametrize(
"args", [["--agent-id", "customer-support"], ["--environment", "staging"], []]
)
def test_agent_list_beta_notice(deployment_api, args):
result = CliRunner().invoke(cli, ["deploy", "list", *args])
assert result.exit_code == 0, result.output
assert (
"--agent-id and --environment flags are in private beta" in result.output
) == bool(args)