MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / _arun

Method _arun

openspace/grounding/backends/shell/session.py:100–111  ·  view source on GitHub ↗
(self, code: str, timeout: int = 90, working_dir: str | None = None, env: dict | None = None, conda_env: str | None = None)

Source from the content-addressed store, hash-verified

98 super().__init__()
99
100 async def _arun(self, code: str, timeout: int = 90, working_dir: str | None = None, env: dict | None = None, conda_env: str | None = None):
101 # Use provided params, or fall back to session defaults
102 effective_working_dir = working_dir or self._default_working_dir
103 effective_env = {**self._default_env, **(env or {})} # Merge default and provided env
104 effective_conda_env = conda_env or self._default_conda_env
105 return await self._session.connector.run_python_script(
106 code,
107 timeout=timeout,
108 working_dir=effective_working_dir,
109 env=effective_env if effective_env else None,
110 conda_env=effective_conda_env
111 )
112
113class BashScriptTool(BaseTool):
114 _name = "_bash_exec"

Callers

nothing calls this directly

Calls 1

run_python_scriptMethod · 0.45

Tested by

no test coverage detected