drscrewdriver/dsh-seatbelt-sandbox

Plugin ⭐ 1 BSD-3-Clause security

macOS Seatbelt(libsandbox)沙箱适配器,为 DeepSeek Harness(dsh)提供 cordis 插件形态的 seatbelt rung 替换:部署时在 cordis.yml 里把 sandbox 插件从 @deepseek-ai/dsh-sandbox-local 换成 dsh-seatbelt-sandbox,即可让 dsh 的 macOS 沙箱从 Apple 弃用的 sandbox-exec CLI 切换到直接调用私有 libsandbox API 的自带 loader——无需修改 dsh 源码、无需提 PR。

catalog description:dsh-seatbelt 方面沙箱增强尝试使用非exec工具直接对接系统seatbelt相关api

Install

# 1. 获取源码
#    git clone git@github.com:drscrewdriver/dsh-seatbelt-sandbox.git && cd dsh-seatbelt-sandbox

# 2. 安装依赖 + 构建(git 安装后 node_modules/、lib/、bin/ 三者全部缺失,缺一不可)
npm install                 # node_modules/
npm run build               # lib/(tsc 编译;缺了它插件 main 指向的 lib/index.js 不存在,加载直接失败)
npm run build:native        # bin/darwin-<arch>/seatbelt-run(含 Mach-O 校验)
./bin/darwin-$(uname -m)/seatbelt-run --self-test && echo OK   # 自检:libsandbox 可用

# 3. 完整测试(12 单元 + 5 macOS e2e,无 skip)
npm test

# 4. 接入 dsh(完整步骤见下节「dsh plugin 命令组装」)
dsh plugin --profile web add /absolute/path/to/dsh-seatbelt-sandbox
#    (或 git 安装:dsh plugin --profile web add git+ssh://git@github.com/drscrewdriver/dsh-seatbelt-sandbox.git)
dsh web --dump-config | grep -B1 -A3 'sandbox-seatbelt'  # 确认官方行 disabled + 本插件新行
node examples/verify-dsh-boot.mjs                         # 真实 boot 8 项断言,全绿即装配正确
kill <正在运行的 dsh web PID> && dsh web                  # 重启使新装配生效(必做:运行中实例不热载 bundle 层)

Add drscrewdriver/dsh-seatbelt-sandbox to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.