Huuuuung/dsh-artifact-index ↗★ 0
dsh-artifact-index
Artifact index endpoint for the DeepSeek Harness web GUI: serves the JSON index contract and the file bytes that the dsh-artifacts sidebar tab reads.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Huuuuung/dsh-artifact-index说明文档
阅读完整 README ↗配置
配置写在 profile 的 cordis.patch.yml 里那条 mount row 的 config 下,
或者用环境变量。优先级:config > 环境变量 > 默认值。
- id: dsh-artifact-index
name: 'dsh-artifact-index'
config:
root:
maxItems: 500
maxFileBytes: 26214400
csp: sandbox
| 键 | 默认值 | 说明 |
|---|---|---|
root | $DSH_HOME/artifacts | 要索引的目录。不递归,只扫这一层。 |
maxItems | 500 | 返回条目数上限,超出部分丢弃并在日志里记一条警告。 |
maxFileBytes | 26214400(25 MB) | 单文件上限,超过返回 413。 |
csp | sandbox | 给 HTML/SVG/XML 响应加的 Content-Security-Policy。见下。 |
trustedHosts | [] | 额外允许的 Host。仅当 DSH 不跑在 loopback 上时才需要。 |
$DSH_HOME 指 DSH 的数据目录(Windows 下可用 echo $env:DSH_HOME 查看,
或从 dsh --profile desktop --dump-config 里找)。
环境变量:DSH_ARTIFACT_INDEX_ROOT 覆盖 root(当 config 未提供时)。
csp 三个取值:
| 值 | 实际下发的头 | 适用 |
|---|---|---|
sandbox(默认) | sandbox | artifact 内的脚本、表单、弹窗、同源访问全部失效。 |
sandbox-scripts | sandbox allow-scripts | 需要看 JS 渲染的 HTML artifact(如自绘图表)。 |
none | 不下发 | 只在明确理解风险时使用。 |