feat: add environment variable injection for Docker sandbox

- Add environment field to sandbox config for injecting env vars into container
- Support $VAR syntax to resolve values from host environment variables
- Refactor frontend API modules to use centralized getBackendBaseURL()
- Improve Doraemon skill with explicit input/output path arguments
- Add .env.example file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hetao
2026-01-24 22:33:29 +08:00
parent 869af570c9
commit 6e147a772e
8 changed files with 72 additions and 18 deletions

View File

@@ -22,6 +22,7 @@ class SandboxConfig(BaseModel):
auto_start: Whether to automatically start Docker container (default: true)
container_prefix: Prefix for container names (default: deer-flow-sandbox)
mounts: List of volume mounts to share directories with the container
environment: Environment variables to inject into the container (values starting with $ are resolved from host env)
"""
use: str = Field(
@@ -52,5 +53,10 @@ class SandboxConfig(BaseModel):
default_factory=list,
description="List of volume mounts to share directories between host and container",
)
environment: dict[str, str] = Field(
default_factory=dict,
description="Environment variables to inject into the sandbox container. "
"Values starting with $ will be resolved from host environment variables.",
)
model_config = ConfigDict(extra="allow")