MCPcopy Create free account
hub / github.com/1jehuang/jcode / version_for

Function version_for

scripts/bench_memory_cli.py:342–345  ·  view source on GitHub ↗
(spec: ToolSpec)

Source from the content-addressed store, hash-verified

340
341
342def version_for(spec: ToolSpec) -> str:
343 proc = subprocess.run(spec.version_argv, capture_output=True, text=True, check=False)
344 output = (proc.stdout + proc.stderr).strip().splitlines()
345 return output[0] if output else f"exit {proc.returncode}"
346
347
348def run_tool(spec: ToolSpec, sessions: int, cwd: Path, timeout_s: float, settle_s: float) -> ToolRunResult:

Callers 1

run_toolFunction · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected