hte-cli 0.2.29__tar.gz → 0.2.30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hte_cli-0.2.29 → hte_cli-0.2.30}/PKG-INFO +1 -1
- {hte_cli-0.2.29 → hte_cli-0.2.30}/pyproject.toml +1 -1
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/cli.py +41 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/uv.lock +1 -1
- {hte_cli-0.2.29 → hte_cli-0.2.30}/.gitignore +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/README.md +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/__init__.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/__main__.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/api_client.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/config.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/errors.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/events.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/image_utils.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/runner.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/scorers.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/src/hte_cli/version_check.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/__init__.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/__init__.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/automated_runner.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/conftest.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/e2e_test.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/test_benchmark_flows.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/test_eval_logs.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/test_infrastructure.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/test_runtime_imports.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/test_session_lifecycle.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/e2e/verify_docker_deps.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/unit/__init__.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/unit/conftest.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/unit/test_image_utils.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/unit/test_runner.py +0 -0
- {hte_cli-0.2.29 → hte_cli-0.2.30}/tests/unit/test_scorers.py +0 -0
|
@@ -282,6 +282,11 @@ def session_join(ctx, session_id: str, force_setup: bool):
|
|
|
282
282
|
# Validate compose for sandbox-required benchmarks
|
|
283
283
|
benchmark = session_info.get("benchmark", "").lower()
|
|
284
284
|
SANDBOX_REQUIRED_BENCHMARKS = {"cybench", "intercode-ctf", "cvebench", "cybergym", "nyuctf"}
|
|
285
|
+
|
|
286
|
+
# NYU CTF requires a shared Docker network for agent/game-server communication
|
|
287
|
+
if benchmark == "nyuctf":
|
|
288
|
+
_ensure_nyuctf_network()
|
|
289
|
+
|
|
285
290
|
if benchmark in SANDBOX_REQUIRED_BENCHMARKS and not compose_yaml and not is_reconnect:
|
|
286
291
|
console.print(
|
|
287
292
|
f"[red]Error: {benchmark} requires a Docker sandbox but no compose file was found.[/red]"
|
|
@@ -1023,5 +1028,41 @@ def _check_docker() -> tuple[bool, str | None]:
|
|
|
1023
1028
|
return True, None
|
|
1024
1029
|
|
|
1025
1030
|
|
|
1031
|
+
def _ensure_nyuctf_network() -> None:
|
|
1032
|
+
"""Ensure the ctfnet Docker network exists for NYU CTF challenges.
|
|
1033
|
+
|
|
1034
|
+
NYU CTF tasks use a shared Docker network ('ctfnet') for communication
|
|
1035
|
+
between the agent container and game-server container. This network must
|
|
1036
|
+
exist before docker compose up is called, since it's declared as external.
|
|
1037
|
+
"""
|
|
1038
|
+
import subprocess
|
|
1039
|
+
|
|
1040
|
+
NETWORK_NAME = "ctfnet"
|
|
1041
|
+
|
|
1042
|
+
try:
|
|
1043
|
+
# Check if network exists
|
|
1044
|
+
result = subprocess.run(
|
|
1045
|
+
["docker", "network", "inspect", NETWORK_NAME],
|
|
1046
|
+
capture_output=True,
|
|
1047
|
+
text=True,
|
|
1048
|
+
timeout=10,
|
|
1049
|
+
)
|
|
1050
|
+
if result.returncode == 0:
|
|
1051
|
+
return # Network exists
|
|
1052
|
+
|
|
1053
|
+
# Create the network
|
|
1054
|
+
subprocess.run(
|
|
1055
|
+
["docker", "network", "create", NETWORK_NAME],
|
|
1056
|
+
capture_output=True,
|
|
1057
|
+
text=True,
|
|
1058
|
+
check=True,
|
|
1059
|
+
timeout=10,
|
|
1060
|
+
)
|
|
1061
|
+
except subprocess.CalledProcessError:
|
|
1062
|
+
pass # Network creation failed, will error later with clearer message
|
|
1063
|
+
except (subprocess.TimeoutExpired, FileNotFoundError):
|
|
1064
|
+
pass # Docker not available, will error later
|
|
1065
|
+
|
|
1066
|
+
|
|
1026
1067
|
if __name__ == "__main__":
|
|
1027
1068
|
cli()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|