feat(stardomain): 实现完整的沙箱执行引擎(local + Docker 双模式)

local 模式通过 tokio::process 真实执行命令,Docker 模式通过 bollard 创建容器运行,
两种模式均支持超时强杀、输出捕获和策略过滤。同时提供同步和异步 Python 接口。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 11:07:39 +00:00
parent 32bdbe77ff
commit 0bbd08638c
6 changed files with 331 additions and 28 deletions
+1
View File
@@ -19,6 +19,7 @@ pyo3 = { version = "0.28", features = ["extension-module"] }
pyo3-async-runtimes = { version = "0.28", features = ["tokio-runtime"] }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process", "time"] }
bollard = "0.18"
futures-util = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"