docker_shell_exec
docker_shell_exec
¶
Container-scoped shell executor.
Runs commands inside the currently-active TB v2.1 task container (set via
:func:openjarvis.tools.docker_shell_exec.set_active_container). When no
container is active the tool refuses to run — it is explicitly not a
host-shell alternative.
The expected lifecycle is:
from openjarvis.tools.docker_shell_exec import set_active_container
set_active_container(container_name)
try:
# run agent — every shell command goes through `docker exec`
finally:
set_active_container(None)
The TB v2.1 task environment sets/clears this context automatically.