mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-15 06:50:58 +00:00
chore(agent-runner): stack on latest tool runtime fixes
This commit is contained in:
@@ -157,6 +157,12 @@ def wrap_python_command_with_env(command: str, *, mount_path: str = '/workspace'
|
|||||||
export TMP="$_LB_TMP_DIR"
|
export TMP="$_LB_TMP_DIR"
|
||||||
export PIP_CACHE_DIR="$_LB_PIP_CACHE_DIR"
|
export PIP_CACHE_DIR="$_LB_PIP_CACHE_DIR"
|
||||||
|
|
||||||
|
_LB_SYSTEM_PYTHON="$(command -v python3 || command -v python || true)"
|
||||||
|
if [ -z "$_LB_SYSTEM_PYTHON" ]; then
|
||||||
|
echo "No Python interpreter found for workspace bootstrap" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
_lb_python_meta() {{
|
_lb_python_meta() {{
|
||||||
"$_LB_SYSTEM_PYTHON" - <<'PY'
|
"$_LB_SYSTEM_PYTHON" - <<'PY'
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|||||||
@@ -509,7 +509,8 @@ class TestPythonWorkspacePreparation:
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert command is not None
|
assert command is not None
|
||||||
assert 'python -m venv "$_LB_VENV_DIR"' in command
|
assert '_LB_SYSTEM_PYTHON="$(command -v python3 || command -v python || true)"' in command
|
||||||
|
assert '"$_LB_SYSTEM_PYTHON" -m venv "$_LB_VENV_DIR"' in command
|
||||||
assert 'python -m pip install -r "/workspace/.mcp/u1/workspace/requirements.txt"' in command
|
assert 'python -m pip install -r "/workspace/.mcp/u1/workspace/requirements.txt"' in command
|
||||||
assert 'pip install --no-cache-dir -r' not in command
|
assert 'pip install --no-cache-dir -r' not in command
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,8 @@ class TestSkillPathHelpers:
|
|||||||
|
|
||||||
command = wrap_skill_command_with_python_env('python scripts/run.py')
|
command = wrap_skill_command_with_python_env('python scripts/run.py')
|
||||||
|
|
||||||
assert 'python -m venv "$_LB_VENV_DIR"' in command
|
assert '_LB_SYSTEM_PYTHON="$(command -v python3 || command -v python || true)"' in command
|
||||||
|
assert '"$_LB_SYSTEM_PYTHON" -m venv "$_LB_VENV_DIR"' in command
|
||||||
assert 'export VIRTUAL_ENV="$_LB_VENV_DIR"' in command
|
assert 'export VIRTUAL_ENV="$_LB_VENV_DIR"' in command
|
||||||
assert command.rstrip().endswith('python scripts/run.py')
|
assert command.rstrip().endswith('python scripts/run.py')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user