MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / ClashDockerEnvironment

Class ClashDockerEnvironment

codeclash/utils/environment.py:23–33  ·  view source on GitHub ↗

DockerEnvironment that also accepts a plain command string. mini-swe-agent v2's `execute` takes an action dict (`{"command": ...}`), but CodeClash's arena code calls `execute("some shell command")` directly. Normalize so both work.

Source from the content-addressed store, hash-verified

21 for var in _SECRET_ENV_VARS:
22 val = os.getenv(var)
23 if val and val in text:
24 text = text.replace(val, f"<REDACTED_{var}>")
25 return text
26
27
28def _scratch_dir() -> str | None:
29 """Local scratch dir for staging `docker cp` transfers. Defaults to the system temp dir.
30 Override with CODECLASH_TMPDIR (e.g. on AWS Batch, where the default temp dir misbehaves)."""
31 override = os.getenv("CODECLASH_TMPDIR")
32 if override:
33 Path(override).mkdir(parents=True, exist_ok=True)
34 return override
35
36

Callers 1

get_environmentMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected