feat(opensandbox): allow OpenSandbox SDK 1.x (#8403)

SDK 0.1.x doesn't send OPEN-SANDBOX-API-KEY on execd calls routed through
the server proxy (use_server_proxy: true); from 1.1.0 on the SDK attaches
the key to those calls in proxy mode and still never in direct mode.

Raise the harness extra to opensandbox>=1.1.0,<2.0.0 (lock: 0.1.15 ->
1.2.1, no other package changes). Every SDK call the provider makes keeps
its signature in 1.x. Update the install hint, the packaging test and the
README note on append, which 1.x doesn't provide either.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bas Cancrinus 2026-11-21 02:35:36 +01:00 committed by GitHub
parent c4ba921143
commit 715d50851f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 8 deletions

View File

@ -131,7 +131,7 @@ The full DeerFlow surface is implemented:
signal status need additional deadline information before it can safely be
normalized to 124.
- Text and binary file operations use OpenSandbox's native filesystem API.
Append is serialized as a read-modify-write because SDK 0.1.x has no append
Append is serialized as a read-modify-write because the SDK has no append
primitive.
- `list_dir`, `glob`, and `grep` use portable `find`/`grep` commands and the
shared DeerFlow result parsers.

View File

@ -73,7 +73,7 @@ def _import_sdk() -> tuple[type[SandboxSync], type[ConnectionConfigSync], type[R
from opensandbox.models.execd import RunCommandOpts
from opensandbox.sync import SandboxSync
except ImportError as exc: # pragma: no cover - depends on optional install state
raise ImportError("OpenSandboxProvider requires the optional 'opensandbox' dependency. Install it with: pip install 'deerflow-harness[opensandbox]' or pip install 'opensandbox>=0.1.15,<0.2.0'.") from exc
raise ImportError("OpenSandboxProvider requires the optional 'opensandbox' dependency. Install it with: pip install 'deerflow-harness[opensandbox]' or pip install 'opensandbox>=1.1.0,<2.0.0'.") from exc
return SandboxSync, ConnectionConfigSync, RunCommandOpts

View File

@ -97,7 +97,7 @@ boxlite = ["boxlite>=0.9.7"]
tenki = ["tenki>=1.4.0"]
# OpenSandbox remote sandbox provider (deerflow.community.opensandbox). The
# sync SDK is loaded only when this provider is selected.
opensandbox = ["opensandbox>=0.1.15,<0.2.0"]
opensandbox = ["opensandbox>=1.1.0,<2.0.0"]
# boxd machine sandbox provider (deerflow.community.boxd_sandbox). The SDK is
# loaded only when this provider is selected.
boxd = ["boxd>=0.3.2"]

View File

@ -25,7 +25,7 @@ def test_opensandbox_is_optional_harness_dependency() -> None:
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"]
assert optional_dependencies["opensandbox"] == ["opensandbox>=1.1.0,<2.0.0"]
def test_boxd_is_optional_harness_dependency() -> None:

11
backend/uv.lock generated
View File

@ -1130,7 +1130,7 @@ requires-dist = [
{ name = "markdownify", specifier = ">=1.2.2" },
{ name = "markitdown", extras = ["all", "xlsx"], specifier = ">=0.0.1a2" },
{ name = "monocle-apptrace", marker = "extra == 'monocle'", specifier = ">=0.8.8" },
{ name = "opensandbox", marker = "extra == 'opensandbox'", specifier = ">=0.1.15,<0.2.0" },
{ name = "opensandbox", marker = "extra == 'opensandbox'", specifier = ">=1.1.0,<2.0.0" },
{ name = "packaging", specifier = ">=24.2" },
{ name = "playwright", marker = "extra == 'browser'", specifier = ">=1.40" },
{ name = "psycopg", extras = ["binary"], marker = "extra == 'postgres'", specifier = ">=3.3.3" },
@ -3132,17 +3132,20 @@ wheels = [
[[package]]
name = "opensandbox"
version = "0.1.15"
version = "1.2.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "attrs" },
{ name = "httpcore" },
{ name = "httpx" },
{ name = "httpx-sse" },
{ name = "opentelemetry-api" },
{ name = "pydantic" },
{ name = "python-dateutil" },
]
sdist = { url = "https://files.pythonhosted.org/packages/43/21/654a3d69815b09690e926d553f3f4a178640d1206000a1b49f5e22c8eb68/opensandbox-0.1.15.tar.gz", hash = "sha256:017abc9b399b88da51bf077d6fb94ee89b1783e601495e85ba85fed478fed1b0", size = 228729, upload-time = "2026-07-24T09:36:29.988Z" }
sdist = { url = "https://files.pythonhosted.org/packages/ad/44/55e37c760f28b008051dcc0afcdb09a0d526929f54ce952c5e4a1dbe7967/opensandbox-1.2.1.tar.gz", hash = "sha256:079bdde72fb7cd047de09c04928820cbed7394ab5c537ddda9e5ac108b1855df", size = 339085, upload-time = "2026-11-13T00:34:19.168Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d5/5c/ab87ea696531210790feb8f575471036fccba29dedaff201736f15bbb3a7/opensandbox-0.1.15-py3-none-any.whl", hash = "sha256:992b01490551f4d8e3f99caa25e34cb9d1690f0c5027eeebab912738291957d1", size = 538522, upload-time = "2026-07-24T09:36:28.277Z" },
{ url = "https://files.pythonhosted.org/packages/85/a8/f72a8549ff5d076841c9180bfcea251cc8c64adb9ceb3b6d4b919f84f989/opensandbox-1.2.1-py3-none-any.whl", hash = "sha256:67c9210a06cc2c18e621b34b6b21ce143e04226b6773ea17924783b379a75585", size = 742873, upload-time = "2026-11-13T00:34:17.886Z" },
]
[[package]]