Part of #9 **Dependencies:** #16 (Workflow Engine) ## Description 允许用户编写 Python DSL 自定义工作流,通过 RestrictedPython 沙箱安全执行,暴露安全的 API (call_llm, get_scene, save_scene)。 **OpenSpec Spec:** \`custom-workflow\` ## Tasks - [ ] 4.1 Implement RestrictedPython sandbox for user DSL scripts - [ ] 4.2 Implement AST whitelist validation - [ ] 4.3 Build DSL editor UI with syntax highlighting - [ ] 4.4 Write security tests (injection prevention) ## Acceptance Criteria - [ ] 用户可编写 Python DSL 自定义工作流 - [ ] AST 白名单阻止危险操作 (file I/O, network, exec) - [ ] 沙箱暴露 call_llm / get_scene / save_scene 安全 API - [ ] 安全测试覆盖注入攻击场景
Part of #9
Dependencies: #16 (Workflow Engine)
Description
允许用户编写 Python DSL 自定义工作流,通过 RestrictedPython 沙箱安全执行,暴露安全的 API (call_llm, get_scene, save_scene)。
OpenSpec Spec: `custom-workflow`
Tasks
Acceptance Criteria