mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-20 03:10:34 +00:00
* feat(sandbox): add boxd sandbox provider Adds deerflow.community.boxd_sandbox:BoxdSandboxProvider. Each user/thread scope runs in an isolated boxd machine. New machines get the thread's files and skills before they are handed out, release mirrors outputs back to thread storage, and released machines wait in the shared warm pool. The boxd SDK is an optional extra (deerflow-harness[boxd]). Unit tests run against a fake client; tests/test_boxd_sandbox_live.py runs against real machines when DEER_FLOW_RUN_LIVE_TESTS=1 and BOXD_API_KEY are set. * fix(boxd): retain failed cleanup and bound output mirror calls --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
41 lines
1.8 KiB
Python
41 lines
1.8 KiB
Python
from __future__ import annotations
|
|
|
|
import tomllib
|
|
from pathlib import Path
|
|
|
|
|
|
def test_boxlite_is_optional_harness_dependency() -> None:
|
|
"""BoxLite should not make core harness installs platform-dependent."""
|
|
pyproject_path = Path(__file__).resolve().parents[1] / "packages" / "harness" / "pyproject.toml"
|
|
pyproject = tomllib.loads(pyproject_path.read_text(encoding="utf-8"))
|
|
|
|
core_dependencies = pyproject["project"]["dependencies"]
|
|
optional_dependencies = pyproject["project"]["optional-dependencies"]
|
|
|
|
assert not any(dep.startswith("boxlite") for dep in core_dependencies)
|
|
assert any(dep.startswith("boxlite>=0.9.7") for dep in optional_dependencies["boxlite"])
|
|
|
|
|
|
def test_opensandbox_is_optional_harness_dependency() -> None:
|
|
"""OpenSandbox should be installed only when its provider is selected."""
|
|
pyproject_path = Path(__file__).resolve().parents[1] / "packages" / "harness" / "pyproject.toml"
|
|
pyproject = tomllib.loads(pyproject_path.read_text(encoding="utf-8"))
|
|
|
|
core_dependencies = pyproject["project"]["dependencies"]
|
|
optional_dependencies = pyproject["project"]["optional-dependencies"]
|
|
|
|
assert not any(dep.startswith("opensandbox") for dep in core_dependencies)
|
|
assert optional_dependencies["opensandbox"] == ["opensandbox>=0.1.15,<0.2.0"]
|
|
|
|
|
|
def test_boxd_is_optional_harness_dependency() -> None:
|
|
"""The boxd SDK should be installed only when its provider is selected."""
|
|
pyproject_path = Path(__file__).resolve().parents[1] / "packages" / "harness" / "pyproject.toml"
|
|
pyproject = tomllib.loads(pyproject_path.read_text(encoding="utf-8"))
|
|
|
|
core_dependencies = pyproject["project"]["dependencies"]
|
|
optional_dependencies = pyproject["project"]["optional-dependencies"]
|
|
|
|
assert not any(dep.startswith("boxd") for dep in core_dependencies)
|
|
assert optional_dependencies["boxd"] == ["boxd>=0.3.2"]
|