MCPcopy Create free account
hub / github.com/modelscope/ms-agent / _execute_in_sandbox

Method _execute_in_sandbox

ms_agent/skill/container.py:852–862  ·  view source on GitHub ↗

Execute code in EnclaveSandbox.

(
            self,
            python_code: Union[str, List[str]] = None,
            shell_command: Union[str, List[str]] = None,
            requirements: List[str] = None)

Source from the content-addressed store, hash-verified

850 return '\n'.join(stdout_parts), '\n'.join(stderr_parts), exit_code
851
852 async def _execute_in_sandbox(
853 self,
854 python_code: Union[str, List[str]] = None,
855 shell_command: Union[str, List[str]] = None,
856 requirements: List[str] = None) -> Dict[str, Any]:
857 """Execute code in EnclaveSandbox."""
858 sandbox = self._get_sandbox()
859 return await sandbox.async_execute(
860 python_code=python_code,
861 shell_command=shell_command,
862 requirements=requirements)
863
864 async def execute_python_script(
865 self,

Callers 4

execute_python_scriptMethod · 0.95
execute_python_codeMethod · 0.95
execute_shellMethod · 0.95
execute_javascriptMethod · 0.95

Calls 2

_get_sandboxMethod · 0.95
async_executeMethod · 0.45

Tested by

no test coverage detected