sandbox-executor
Installation
SKILL.md
沙盒执行器
当任务需要 Python 或 Shell 脚本(如安装第三方库、调用外部 API、网页抓取),使用 sandboxExec() 在安全沙盒中执行。
核心函数
var result = sandboxExec(language, code, options);
| 参数 | 类型 | 说明 |
|---|---|---|
| language | string | "python" 或 "shell" |
| code | string | 要执行的代码 |
| options.pip | string[] | Python 依赖包列表(可选) |
| options.timeout | number | 超时秒数,默认 60,最大 120 |